aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-02-11 15:02:44 -0800
committerIan Lance Taylor <iant@golang.org>2022-02-11 15:02:44 -0800
commit9a510fb0970d3d9a4201bce8965cabe67850386b (patch)
tree43d7fd2bbfd7ad8c9625a718a5e8718889351994 /gcc/testsuite
parenta6d3012b274f38b20e2a57162106f625746af6c6 (diff)
parent8dc2499aa62f768c6395c9754b8cabc1ce25c494 (diff)
downloadgcc-9a510fb0970d3d9a4201bce8965cabe67850386b.zip
gcc-9a510fb0970d3d9a4201bce8965cabe67850386b.tar.gz
gcc-9a510fb0970d3d9a4201bce8965cabe67850386b.tar.bz2
Merge from trunk revision 8dc2499aa62f768c6395c9754b8cabc1ce25c494
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog18328
-rw-r--r--gcc/testsuite/ChangeLog-202120646
-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/c-c++-common/Waddress-5.c133
-rw-r--r--gcc/testsuite/c-c++-common/Waddress-6.c32
-rw-r--r--gcc/testsuite/c-c++-common/Walloca-larger-than.C21
-rw-r--r--gcc/testsuite/c-c++-common/Walloca-larger-than.c22
-rw-r--r--gcc/testsuite/c-c++-common/Warray-bounds-9.c3
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-1.c12
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-10.c27
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-11.c13
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-12.c19
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-13.c17
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-14.c38
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-15.c59
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-16.c26
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-17.c30
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-18.c11
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-19.c11
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-2.c9
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-20.c11
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-21.c11
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-22.c11
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-23.c11
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-3.c11
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-4.c188
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-5.c188
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-6.c155
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-7.c9
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-8.c13
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-9.c29
-rw-r--r--gcc/testsuite/c-c++-common/Wbidi-chars-ranges.c54
-rw-r--r--gcc/testsuite/c-c++-common/Wdangling-pointer-2.c438
-rw-r--r--gcc/testsuite/c-c++-common/Wdangling-pointer-3.c64
-rw-r--r--gcc/testsuite/c-c++-common/Wdangling-pointer-4.c74
-rw-r--r--gcc/testsuite/c-c++-common/Wdangling-pointer-5.c91
-rw-r--r--gcc/testsuite/c-c++-common/Wdangling-pointer-6.c32
-rw-r--r--gcc/testsuite/c-c++-common/Wdangling-pointer.c435
-rw-r--r--gcc/testsuite/c-c++-common/Wformat-pr104148.c33
-rw-r--r--gcc/testsuite/c-c++-common/Wimplicit-fallthrough-38.c24
-rw-r--r--gcc/testsuite/c-c++-common/Winvalid-memory-model.c239
-rw-r--r--gcc/testsuite/c-c++-common/Wno-attributes-1.c54
-rw-r--r--gcc/testsuite/c-c++-common/Wno-attributes-2.c55
-rw-r--r--gcc/testsuite/c-c++-common/Wno-attributes-3.c9
-rw-r--r--gcc/testsuite/c-c++-common/Wno-attributes-4.c7
-rw-r--r--gcc/testsuite/c-c++-common/Wno-attributes-5.c8
-rw-r--r--gcc/testsuite/c-c++-common/Wno-attributes-6.c16
-rw-r--r--gcc/testsuite/c-c++-common/Wstringop-overflow-2.c70
-rw-r--r--gcc/testsuite/c-c++-common/Wuse-after-free-2.c169
-rw-r--r--gcc/testsuite/c-c++-common/Wuse-after-free-3.c83
-rw-r--r--gcc/testsuite/c-c++-common/Wuse-after-free-4.c102
-rw-r--r--gcc/testsuite/c-c++-common/Wuse-after-free-5.c103
-rw-r--r--gcc/testsuite/c-c++-common/Wuse-after-free-6.c105
-rw-r--r--gcc/testsuite/c-c++-common/Wuse-after-free-7.c103
-rw-r--r--gcc/testsuite/c-c++-common/Wuse-after-free.c167
-rw-r--r--gcc/testsuite/c-c++-common/asan/null-deref-1.c2
-rw-r--r--gcc/testsuite/c-c++-common/attr-retain-5.c3
-rw-r--r--gcc/testsuite/c-c++-common/attr-retain-6.c3
-rw-r--r--gcc/testsuite/c-c++-common/attr-retain-9.c3
-rw-r--r--gcc/testsuite/c-c++-common/attr-used-5.c2
-rw-r--r--gcc/testsuite/c-c++-common/attr-used-6.c2
-rw-r--r--gcc/testsuite/c-c++-common/attr-used-9.c2
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-1.c20
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-10.c2
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-11.c3
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-12.c3
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-13.c4
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-14.c4
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-15.c3
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-16.c3
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-2.c20
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-3.c6
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-4.c6
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-5.c6
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-6.c6
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-7.c8
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-8.c8
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-9.c4
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-esra.c6
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-padding-1.c2
-rw-r--r--gcc/testsuite/c-c++-common/builtin-assoc-barrier-1.c71
-rw-r--r--gcc/testsuite/c-c++-common/cpp/dir-only-9.c13
-rw-r--r--gcc/testsuite/c-c++-common/cpp/line-2.c2
-rw-r--r--gcc/testsuite/c-c++-common/cpp/line-3.c2
-rw-r--r--gcc/testsuite/c-c++-common/cpp/pr104147.c27
-rw-r--r--gcc/testsuite/c-c++-common/cpp/ucnid-2011-1-utf8.c6
-rw-r--r--gcc/testsuite/c-c++-common/cpp/ucnid-2011-1.c6
-rw-r--r--gcc/testsuite/c-c++-common/cpp/va-opt-8.c18
-rw-r--r--gcc/testsuite/c-c++-common/cpp/va-opt-9.c20
-rw-r--r--gcc/testsuite/c-c++-common/diagnostic-format-json-1.c1
-rw-r--r--gcc/testsuite/c-c++-common/diagnostic-format-json-2.c1
-rw-r--r--gcc/testsuite/c-c++-common/diagnostic-format-json-3.c1
-rw-r--r--gcc/testsuite/c-c++-common/diagnostic-format-json-4.c2
-rw-r--r--gcc/testsuite/c-c++-common/diagnostic-format-json-5.c1
-rw-r--r--gcc/testsuite/c-c++-common/goacc/builtin-goacc-parlevel-id-size.c8
-rw-r--r--gcc/testsuite/c-c++-common/goacc/classify-kernels-parloops.c41
-rw-r--r--gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized-parloops.c45
-rw-r--r--gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized.c5
-rw-r--r--gcc/testsuite/c-c++-common/goacc/classify-kernels.c5
-rw-r--r--gcc/testsuite/c-c++-common/goacc/deep-copy-arrayofstruct.c5
-rw-r--r--gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c29
-rw-r--r--gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c98
-rw-r--r--gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c109
-rw-r--r--gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c16
-rw-r--r--gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr100280-1.c19
-rw-r--r--gcc/testsuite/c-c++-common/goacc/mdc-1.c4
-rw-r--r--gcc/testsuite/c-c++-common/goacc/nested-reductions-1-kernels.c11
-rw-r--r--gcc/testsuite/c-c++-common/goacc/nested-reductions-1-parallel.c14
-rw-r--r--gcc/testsuite/c-c++-common/goacc/nested-reductions-1-routine.c11
-rw-r--r--gcc/testsuite/c-c++-common/goacc/nested-reductions-2-kernels.c11
-rw-r--r--gcc/testsuite/c-c++-common/goacc/nested-reductions-2-parallel.c14
-rw-r--r--gcc/testsuite/c-c++-common/goacc/nested-reductions-2-routine.c12
-rw-r--r--gcc/testsuite/c-c++-common/goacc/orphan-reductions-1.c56
-rw-r--r--gcc/testsuite/c-c++-common/goacc/orphan-reductions-2.c91
-rw-r--r--gcc/testsuite/c-c++-common/goacc/orphan-reductions-3.c102
-rw-r--r--gcc/testsuite/c-c++-common/goacc/pr102432.c23
-rw-r--r--gcc/testsuite/c-c++-common/goacc/routine-4-extern.c72
-rw-r--r--gcc/testsuite/c-c++-common/goacc/routine-4.c72
-rw-r--r--gcc/testsuite/c-c++-common/goacc/routine-5.c8
-rw-r--r--gcc/testsuite/c-c++-common/goacc/uninit-dim-clause.c6
-rw-r--r--gcc/testsuite/c-c++-common/goacc/uninit-firstprivate-clause.c1
-rw-r--r--gcc/testsuite/c-c++-common/goacc/uninit-if-clause.c8
-rw-r--r--gcc/testsuite/c-c++-common/gomp/clauses-1.c49
-rw-r--r--gcc/testsuite/c-c++-common/gomp/loop-10.c35
-rw-r--r--gcc/testsuite/c-c++-common/gomp/loop-11.c5
-rw-r--r--gcc/testsuite/c-c++-common/gomp/num-teams-1.c48
-rw-r--r--gcc/testsuite/c-c++-common/gomp/num-teams-2.c27
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr102431.c16
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr102432.c23
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr103642.c34
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr103705.c14
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pragma-1.c50
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pragma-2.c50
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pragma-3.c20
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pragma-4.c20
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pragma-5.c20
-rw-r--r--gcc/testsuite/c-c++-common/gomp/target-device-ancestor-3.c2
-rw-r--r--gcc/testsuite/c-c++-common/gomp/target-enter-data-1.c24
-rw-r--r--gcc/testsuite/c-c++-common/gomp/target-has-device-addr-1.c65
-rw-r--r--gcc/testsuite/c-c++-common/gomp/target-has-device-addr-2.c17
-rw-r--r--gcc/testsuite/c-c++-common/gomp/target-implicit-map-1.c39
-rw-r--r--gcc/testsuite/c-c++-common/gomp/target-implicit-map-2.c52
-rw-r--r--gcc/testsuite/c-c++-common/gomp/target-is-device-ptr-1.c22
-rw-r--r--gcc/testsuite/c-c++-common/gomp/target-is-device-ptr-2.c17
-rw-r--r--gcc/testsuite/c-c++-common/gomp/teams-3.c64
-rw-r--r--gcc/testsuite/c-c++-common/pr101537.c26
-rw-r--r--gcc/testsuite/c-c++-common/pr102281.c17
-rw-r--r--gcc/testsuite/c-c++-common/pr103881.c20
-rw-r--r--gcc/testsuite/c-c++-common/pr83059.c9
-rw-r--r--gcc/testsuite/c-c++-common/tm/inline-asm.c2
-rw-r--r--gcc/testsuite/c-c++-common/torture/builtin-clear-padding-4.c2
-rw-r--r--gcc/testsuite/c-c++-common/torture/builtin-convertvector-2.c26
-rw-r--r--gcc/testsuite/c-c++-common/torture/builtin-shufflevector-2.c26
-rw-r--r--gcc/testsuite/c-c++-common/torture/builtin-shufflevector-3.c16
-rw-r--r--gcc/testsuite/c-c++-common/torture/harden-comp.c14
-rw-r--r--gcc/testsuite/c-c++-common/torture/harden-cond.c18
-rw-r--r--gcc/testsuite/c-c++-common/tsan/free_race.c1
-rw-r--r--gcc/testsuite/c-c++-common/tsan/free_race2.c1
-rw-r--r--gcc/testsuite/config/default.exp2
-rw-r--r--gcc/testsuite/g++.dg/README2
-rw-r--r--gcc/testsuite/g++.dg/abi/abi-tag16.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/abi-tag18a.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/guard4.C3
-rw-r--r--gcc/testsuite/g++.dg/abi/lambda-defarg1.C1
-rw-r--r--gcc/testsuite/g++.dg/abi/macro0.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle26.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/no_unique_address2.C27
-rw-r--r--gcc/testsuite/g++.dg/abi/no_unique_address6.C23
-rw-r--r--gcc/testsuite/g++.dg/abi/nsdmi-aggr1.C39
-rw-r--r--gcc/testsuite/g++.dg/abi/nsdmi-aggr1a.C35
-rw-r--r--gcc/testsuite/g++.dg/analyzer/analyzer.exp2
-rw-r--r--gcc/testsuite/g++.dg/analyzer/pr102662.C39
-rw-r--r--gcc/testsuite/g++.dg/asan/asan.exp2
-rw-r--r--gcc/testsuite/g++.dg/asan/asan_test.C2
-rw-r--r--gcc/testsuite/g++.dg/bprob/bprob.exp2
-rw-r--r--gcc/testsuite/g++.dg/charset/charset.exp2
-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.exp2
-rw-r--r--gcc/testsuite/g++.dg/concepts/diagnostic18.C4
-rw-r--r--gcc/testsuite/g++.dg/coroutines/coroutines.exp2
-rw-r--r--gcc/testsuite/g++.dg/coroutines/pr100127.C65
-rw-r--r--gcc/testsuite/g++.dg/coroutines/pr100772-a.C77
-rw-r--r--gcc/testsuite/g++.dg/coroutines/pr100772-b.C93
-rw-r--r--gcc/testsuite/g++.dg/coroutines/pr96517.C29
-rw-r--r--gcc/testsuite/g++.dg/cpp/pr103012.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp/ucnid-1-utf8.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp/ucnid-1.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp/ucnid-4-utf8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-void1.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto25.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-104226.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-104472.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-condition.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-empty14a.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-fp-except1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-neg3.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-specialization.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-bitfield1.C65
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-bitfield2.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/dr2351.C51
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/error2.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/fntmp-equiv1.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor19.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C1
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-array14.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist116.C29
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist117.C40
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist122.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist127.C39
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist128.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-104403.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg10.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh.C34
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle3.C1
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle5.C1
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9.C41
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9a.C42
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic14a.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic15.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic16.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept06.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept07.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept71.C31
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept72.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept73.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept74.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept74a.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-array1.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template21.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template21a.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-warn1.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-warn1.h2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr56868.C (renamed from gcc/testsuite/g++.dg/cpp0x/pr56868.cpp)0
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr65327.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual21.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn2.C1
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn12.C1
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-89074-1.C28
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-89074-2.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-89074-3.C132
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-89285-2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-89285.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-base2.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-base2a.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-loop5.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/decltype-auto2.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/decltype-auto3.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/decltype-auto4.C65
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/decltype-auto5.C35
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-85713-2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/noexcept2.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr104031.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60054.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60332.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/var-templ69.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/aggr-base11.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction-new1.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction100.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction101.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction101a.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction101b.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction102.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction102a.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction102b.C30
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction103.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction104.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction105.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction106.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/constexpr-89074-1.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/constexpr-if36.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/constexpr-lambda7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/decomp-decltype1.C28
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/eval-order11.C89
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/fold13.C29
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/inh-ctor23.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/lambda-this1.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/lambda-this8.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/noexcept-type25.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/nontype-auto20.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-array2.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-array3.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-array4.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-fncast1.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-fncast10.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-fncast11.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-fncast2.C62
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-fncast3.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-fncast4.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-fncast5.C39
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-fncast6.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-fncast7.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-fncast8.C42
-rw-r--r--gcc/testsuite/g++.dg/cpp23/auto-fncast9.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp23/concepts-err1.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp23/constexpr-nonlit4.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp23/constexpr-nonlit5.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp23/normalize3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp23/normalize4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp23/normalize5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp23/normalize7.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp23/subscript1.C55
-rw-r--r--gcc/testsuite/g++.dg/cpp23/subscript2.C51
-rw-r--r--gcc/testsuite/g++.dg/cpp23/subscript3.C90
-rw-r--r--gcc/testsuite/g++.dg/cpp23/subscript4.C44
-rw-r--r--gcc/testsuite/g++.dg/cpp23/subscript5.C28
-rw-r--r--gcc/testsuite/g++.dg/cpp23/subscript6.C31
-rw-r--r--gcc/testsuite/g++.dg/cpp23/ucnid-2-utf8.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/bit-cast11.C63
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/bit-cast12.C68
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/bit-cast13.C63
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/bit-cast14.C75
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/comma1.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/comma3.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/comma4.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/comma5.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-class3.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-class4.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-lambda18.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-lambda19.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-memfun2.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec10.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec11.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr104410.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-2.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-3.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr84979.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr85846.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr98394.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-this1.C30
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-uneval5.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-var-templ2.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/consteval-memfn1.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/consteval-memfn2.C34
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/consteval20.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/consteval23.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/consteval25.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/consteval26.C39
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/consteval27.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/consteval28.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dtor11.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-virtual20.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit11.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit12.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/desig20.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/desig21.C48
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/destroying-delete5.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/destroying-delete6.C36
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/fn-template23.C36
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/fn-template24.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/fn-template25.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-this3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class50.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class50a.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class51.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth15.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc20.C44
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/debug.exp2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/auto1.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pr101378.C13
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pr104407.C12
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pubnames-3.C2
-rw-r--r--gcc/testsuite/g++.dg/dfp/dfp.exp2
-rw-r--r--gcc/testsuite/g++.dg/dg.exp2
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/ptrtomem3.C14
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/recur-align.C19
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/redeclaration-2.C19
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/scope1.C12
-rw-r--r--gcc/testsuite/g++.dg/eh/aggregate1.C56
-rw-r--r--gcc/testsuite/g++.dg/eh/aggregate2.C27
-rw-r--r--gcc/testsuite/g++.dg/eh/array1.C8
-rw-r--r--gcc/testsuite/g++.dg/eh/array2.C43
-rw-r--r--gcc/testsuite/g++.dg/eh/array3.C40
-rw-r--r--gcc/testsuite/g++.dg/eh/cleanup6.C13
-rw-r--r--gcc/testsuite/g++.dg/eh/ctor-fntry1.C23
-rw-r--r--gcc/testsuite/g++.dg/eh/delegating1.C28
-rw-r--r--gcc/testsuite/g++.dg/eh/delete1.C2
-rw-r--r--gcc/testsuite/g++.dg/eh/forced3.C2
-rw-r--r--gcc/testsuite/g++.dg/eh/new2.C10
-rw-r--r--gcc/testsuite/g++.dg/eh/ref-temp1.C51
-rw-r--r--gcc/testsuite/g++.dg/eh/ref-temp2.C15
-rw-r--r--gcc/testsuite/g++.dg/eh/return1.C56
-rw-r--r--gcc/testsuite/g++.dg/eh/unexpected1.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/boolcomplex-1.C (renamed from gcc/testsuite/g++.dg/ext/boolcomplex-1.c)0
-rw-r--r--gcc/testsuite/g++.dg/ext/builtin-dynamic-object-size1.C5
-rw-r--r--gcc/testsuite/g++.dg/ext/builtin-dynamic-object-size2.C5
-rw-r--r--gcc/testsuite/g++.dg/ext/complex10.C5
-rw-r--r--gcc/testsuite/g++.dg/ext/flexary37.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/integer-pack5.C29
-rw-r--r--gcc/testsuite/g++.dg/ext/is_enum2.C10
-rw-r--r--gcc/testsuite/g++.dg/ext/is_literal_type3.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/visibility/template7.C2
-rw-r--r--gcc/testsuite/g++.dg/gcov/gcov-12.C2
-rw-r--r--gcc/testsuite/g++.dg/gcov/gcov-2.C2
-rw-r--r--gcc/testsuite/g++.dg/gcov/gcov.exp2
-rw-r--r--gcc/testsuite/g++.dg/gcov/pr16855-priority.C6
-rw-r--r--gcc/testsuite/g++.dg/gcov/pr16855.C4
-rw-r--r--gcc/testsuite/g++.dg/goacc-gomp/goacc-gomp.exp2
-rw-r--r--gcc/testsuite/g++.dg/goacc/goacc.exp2
-rw-r--r--gcc/testsuite/g++.dg/gomp/attrs-1.C53
-rw-r--r--gcc/testsuite/g++.dg/gomp/attrs-2.C53
-rw-r--r--gcc/testsuite/g++.dg/gomp/gomp.exp2
-rw-r--r--gcc/testsuite/g++.dg/gomp/loop-8.C128
-rw-r--r--gcc/testsuite/g++.dg/gomp/masked-1.C14
-rw-r--r--gcc/testsuite/g++.dg/gomp/num-teams-1.C122
-rw-r--r--gcc/testsuite/g++.dg/gomp/num-teams-2.C64
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr102431.C13
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr103704.C19
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr103851.C15
-rw-r--r--gcc/testsuite/g++.dg/gomp/target-3.C36
-rw-r--r--gcc/testsuite/g++.dg/gomp/target-lambda-1.C94
-rw-r--r--gcc/testsuite/g++.dg/gomp/target-lambda-2.C35
-rw-r--r--gcc/testsuite/g++.dg/gomp/target-this-1.C33
-rw-r--r--gcc/testsuite/g++.dg/gomp/target-this-2.C49
-rw-r--r--gcc/testsuite/g++.dg/gomp/target-this-3.C105
-rw-r--r--gcc/testsuite/g++.dg/gomp/target-this-4.C107
-rw-r--r--gcc/testsuite/g++.dg/gomp/target-this-5.C34
-rw-r--r--gcc/testsuite/g++.dg/gomp/this-2.C24
-rw-r--r--gcc/testsuite/g++.dg/gomp/unmappable-1.C2
-rw-r--r--gcc/testsuite/g++.dg/graphite/graphite.exp2
-rw-r--r--gcc/testsuite/g++.dg/hwasan/hwasan.exp2
-rw-r--r--gcc/testsuite/g++.dg/init/aggr15.C11
-rw-r--r--gcc/testsuite/g++.dg/init/aggr7-eh.C62
-rw-r--r--gcc/testsuite/g++.dg/init/aggr7-eh2.C98
-rw-r--r--gcc/testsuite/g++.dg/init/aggr7-eh3.C98
-rw-r--r--gcc/testsuite/g++.dg/init/array12.C11
-rw-r--r--gcc/testsuite/g++.dg/init/array41a.C27
-rw-r--r--gcc/testsuite/g++.dg/init/array61.C16
-rw-r--r--gcc/testsuite/g++.dg/init/assign2.C6
-rw-r--r--gcc/testsuite/g++.dg/init/bitfield6.C20
-rw-r--r--gcc/testsuite/g++.dg/init/delete4.C14
-rw-r--r--gcc/testsuite/g++.dg/init/new50.C9
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-35.C5
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-36.C4
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-37.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-40.C10
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-44.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/imm-devirt-1.C4
-rw-r--r--gcc/testsuite/g++.dg/ipa/ipa-icf-4.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/modref-1.C35
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr103099.C25
-rw-r--r--gcc/testsuite/g++.dg/lookup/builtin5.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/memfn1.C16
-rw-r--r--gcc/testsuite/g++.dg/lookup/operator-3-ops.h53
-rw-r--r--gcc/testsuite/g++.dg/lookup/operator-3.C56
-rw-r--r--gcc/testsuite/g++.dg/lookup/operator-3a.C61
-rw-r--r--gcc/testsuite/g++.dg/lookup/operator-4.C74
-rw-r--r--gcc/testsuite/g++.dg/lookup/operator-4a.C76
-rw-r--r--gcc/testsuite/g++.dg/lookup/operator-5.C74
-rw-r--r--gcc/testsuite/g++.dg/lookup/operator-5a.C76
-rw-r--r--gcc/testsuite/g++.dg/lookup/operator-6.C59
-rw-r--r--gcc/testsuite/g++.dg/lookup/operator-7.C27
-rw-r--r--gcc/testsuite/g++.dg/lookup/operator-8.C34
-rw-r--r--gcc/testsuite/g++.dg/lto/alignas1_0.C7
-rw-r--r--gcc/testsuite/g++.dg/lto/inline-crossmodule-1_0.C2
-rw-r--r--gcc/testsuite/g++.dg/lto/lto.exp2
-rw-r--r--gcc/testsuite/g++.dg/modules/enum-1_a.C2
-rw-r--r--gcc/testsuite/g++.dg/modules/explicit-bool-1_a.H23
-rw-r--r--gcc/testsuite/g++.dg/modules/explicit-bool-1_b.C6
-rw-r--r--gcc/testsuite/g++.dg/modules/fn-inline-1_c.C2
-rw-r--r--gcc/testsuite/g++.dg/modules/modules.exp2
-rw-r--r--gcc/testsuite/g++.dg/modules/pmf-1_a.H2
-rw-r--r--gcc/testsuite/g++.dg/modules/pmf-1_b.C2
-rw-r--r--gcc/testsuite/g++.dg/modules/used-1_c.C2
-rw-r--r--gcc/testsuite/g++.dg/opt/pr100469.C32
-rw-r--r--gcc/testsuite/g++.dg/opt/pr101597.C13
-rw-r--r--gcc/testsuite/g++.dg/opt/pr102970.C60
-rw-r--r--gcc/testsuite/g++.dg/opt/pr103742.C36
-rw-r--r--gcc/testsuite/g++.dg/opt/pr103756.C57
-rw-r--r--gcc/testsuite/g++.dg/opt/pr103842.C31
-rw-r--r--gcc/testsuite/g++.dg/opt/pr103989.C30
-rw-r--r--gcc/testsuite/g++.dg/opt/pr104334.C40
-rw-r--r--gcc/testsuite/g++.dg/opt/pr47639.C17
-rw-r--r--gcc/testsuite/g++.dg/opt/pr47639.c17
-rw-r--r--gcc/testsuite/g++.dg/other/pr88187.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/no-typename1.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/template-keyword2.C8
-rw-r--r--gcc/testsuite/g++.dg/pch/pch.exp2
-rw-r--r--gcc/testsuite/g++.dg/plugin/plugin.exp2
-rw-r--r--gcc/testsuite/g++.dg/pr102955.C14
-rw-r--r--gcc/testsuite/g++.dg/pr102988.C17
-rw-r--r--gcc/testsuite/g++.dg/pr103007.C19
-rw-r--r--gcc/testsuite/g++.dg/pr103024.C12
-rw-r--r--gcc/testsuite/g++.dg/pr103038.C5
-rw-r--r--gcc/testsuite/g++.dg/pr103122.C15
-rw-r--r--gcc/testsuite/g++.dg/pr103326.C15
-rw-r--r--gcc/testsuite/g++.dg/pr103530.C27
-rw-r--r--gcc/testsuite/g++.dg/pr83541.C17
-rw-r--r--gcc/testsuite/g++.dg/pr83979.C (renamed from gcc/testsuite/g++.dg/pr83979.c)0
-rw-r--r--gcc/testsuite/g++.dg/pr96707.C10
-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/template/array35.C11
-rw-r--r--gcc/testsuite/g++.dg/template/array36.C15
-rw-r--r--gcc/testsuite/g++.dg/template/attr-used.C16
-rw-r--r--gcc/testsuite/g++.dg/template/crash106.C4
-rw-r--r--gcc/testsuite/g++.dg/template/dependent-name17.C49
-rw-r--r--gcc/testsuite/g++.dg/template/dependent-name18.C5
-rw-r--r--gcc/testsuite/g++.dg/template/explicit-args6.C2
-rw-r--r--gcc/testsuite/g++.dg/template/lookup18.C17
-rw-r--r--gcc/testsuite/g++.dg/template/nested7.C12
-rw-r--r--gcc/testsuite/g++.dg/template/non-dependent16.C37
-rw-r--r--gcc/testsuite/g++.dg/template/non-dependent16a.C36
-rw-r--r--gcc/testsuite/g++.dg/template/non-dependent16b.C37
-rw-r--r--gcc/testsuite/g++.dg/template/non-dependent17.C21
-rw-r--r--gcc/testsuite/g++.dg/template/non-dependent18.C19
-rw-r--r--gcc/testsuite/g++.dg/template/non-dependent19.C14
-rw-r--r--gcc/testsuite/g++.dg/template/non-dependent19a.C16
-rw-r--r--gcc/testsuite/g++.dg/template/non-dependent20.C16
-rw-r--r--gcc/testsuite/g++.dg/template/partial-specialization10.C25
-rw-r--r--gcc/testsuite/g++.dg/template/partial20.C7
-rw-r--r--gcc/testsuite/g++.dg/template/redecl4.C2
-rw-r--r--gcc/testsuite/g++.dg/template/sfinae32.C24
-rw-r--r--gcc/testsuite/g++.dg/template/sfinae32a.C24
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local11.C2
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local11a.C2
-rw-r--r--gcc/testsuite/g++.dg/tls/tls.exp2
-rw-r--r--gcc/testsuite/g++.dg/tm/asm-1.C (renamed from gcc/testsuite/g++.dg/tm/asm-1.c)0
-rw-r--r--gcc/testsuite/g++.dg/tm/pr46653.C2
-rw-r--r--gcc/testsuite/g++.dg/tm/tm.exp2
-rw-r--r--gcc/testsuite/g++.dg/torture/pr103040.C37
-rw-r--r--gcc/testsuite/g++.dg/torture/pr103073.C8
-rw-r--r--gcc/testsuite/g++.dg/torture/pr103266.C23
-rw-r--r--gcc/testsuite/g++.dg/torture/pr103351.C88
-rw-r--r--gcc/testsuite/g++.dg/torture/pr103361.C18
-rw-r--r--gcc/testsuite/g++.dg/torture/pr103669.C22
-rw-r--r--gcc/testsuite/g++.dg/torture/pr104450.C16
-rw-r--r--gcc/testsuite/g++.dg/torture/pr57993-2.C215
-rw-r--r--gcc/testsuite/g++.dg/torture/pr71792.C42
-rw-r--r--gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp2
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/indir-call-recursive-inlining.C54
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/tree-prof.exp2
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/aggregate1.C19
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr102216-1.C21
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr102216-2.C45
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr103168.C24
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/stabilize1.C13
-rw-r--r--gcc/testsuite/g++.dg/tsan/tsan.exp2
-rw-r--r--gcc/testsuite/g++.dg/ubsan/pr70035.C2
-rw-r--r--gcc/testsuite/g++.dg/ubsan/ubsan.exp2
-rw-r--r--gcc/testsuite/g++.dg/uninit-pred-loop-1_a.C (renamed from gcc/testsuite/g++.dg/uninit-pred-loop-1_a.cc)0
-rw-r--r--gcc/testsuite/g++.dg/uninit-pred-loop-1_b.C21
-rw-r--r--gcc/testsuite/g++.dg/uninit-pred-loop-1_b.cc21
-rw-r--r--gcc/testsuite/g++.dg/uninit-pred-loop-1_c.C23
-rw-r--r--gcc/testsuite/g++.dg/uninit-pred-loop-1_c.cc23
-rw-r--r--gcc/testsuite/g++.dg/uninit-pred-loop_1.C (renamed from gcc/testsuite/g++.dg/uninit-pred-loop_1.cc)0
-rw-r--r--gcc/testsuite/g++.dg/vect/pr103494.cc26
-rw-r--r--gcc/testsuite/g++.dg/vect/pr71483.cc (renamed from gcc/testsuite/g++.dg/vect/pr71483.c)0
-rw-r--r--[-rwxr-xr-x]gcc/testsuite/g++.dg/vect/pr99149.cc3
-rw-r--r--[-rwxr-xr-x]gcc/testsuite/g++.dg/vect/pr99220.cc0
-rw-r--r--gcc/testsuite/g++.dg/vect/slp-pr98855.cc10
-rw-r--r--gcc/testsuite/g++.dg/vect/vect.exp2
-rw-r--r--gcc/testsuite/g++.dg/warn/Waddress-5.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Waddress-7.C76
-rw-r--r--gcc/testsuite/g++.dg/warn/Waddress-8.C85
-rw-r--r--gcc/testsuite/g++.dg/warn/Walways-true-2.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Warray-bounds-16.C6
-rw-r--r--gcc/testsuite/g++.dg/warn/Wdangling-pointer-2.C23
-rw-r--r--gcc/testsuite/g++.dg/warn/Wdangling-pointer-3.C39
-rw-r--r--gcc/testsuite/g++.dg/warn/Wdangling-pointer.C74
-rw-r--r--gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-6.C4
-rw-r--r--gcc/testsuite/g++.dg/warn/Wignored-qualifiers2.C17
-rw-r--r--gcc/testsuite/g++.dg/warn/Winfinite-recursion-2.C75
-rw-r--r--gcc/testsuite/g++.dg/warn/Winfinite-recursion-3.C77
-rw-r--r--gcc/testsuite/g++.dg/warn/Winfinite-recursion.C34
-rw-r--r--gcc/testsuite/g++.dg/warn/Winvalid-memory-model-2.C79
-rw-r--r--gcc/testsuite/g++.dg/warn/Winvalid-memory-model.C84
-rw-r--r--gcc/testsuite/g++.dg/warn/Wmismatched-dealloc-3.C70
-rw-r--r--gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-5.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Wmismatched-tags-9.C32
-rw-r--r--gcc/testsuite/g++.dg/warn/Wreturn-type-13.C35
-rw-r--r--gcc/testsuite/g++.dg/warn/Wshadow-18.C22
-rw-r--r--gcc/testsuite/g++.dg/warn/Wstringop-overflow-3.C44
-rw-r--r--gcc/testsuite/g++.dg/warn/Wstringop-overflow-8.C10
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-14.C31
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-15.C118
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-16.C12
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-17.C33
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-18.C22
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-19.C50
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-20.C16
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-21.C20
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-22.C37
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-23.C24
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-24.C89
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-25.C12
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-26.C22
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-27.C20
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-28.C60
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-29.C60
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-30.C13
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-31.C73
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-32.C14
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuse-after-free.C158
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuse-after-free2.C10
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuse-after-free3.C16
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuse-after-free4.C27
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuseless-cast2.C24
-rw-r--r--gcc/testsuite/g++.dg/warn/pr104025.C20
-rw-r--r--gcc/testsuite/g++.dg/warn/pr83054.C9
-rw-r--r--gcc/testsuite/g++.dg/warn/ref-temp1.C3
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/README2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/spec1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/spec2.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/spec3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/spec4.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.martin/new1.C18
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh33.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh34.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh50.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/eh51.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/delete6.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/README2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb43.C1
-rw-r--r--gcc/testsuite/g++.old-deja/old-deja.exp2
-rw-r--r--gcc/testsuite/g++.target/aarch64/aarch64.exp2
-rw-r--r--gcc/testsuite/g++.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp2
-rw-r--r--gcc/testsuite/g++.target/aarch64/sve/aarch64-sve.exp2
-rw-r--r--gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp2
-rw-r--r--gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle.exp2
-rw-r--r--gcc/testsuite/g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp2
-rw-r--r--gcc/testsuite/g++.target/arm/arm.exp2
-rw-r--r--gcc/testsuite/g++.target/arm/mve.exp2
-rw-r--r--gcc/testsuite/g++.target/arm/pr103676.C32
-rw-r--r--gcc/testsuite/g++.target/i386/avx512vl-pr100738-1.C8
-rw-r--r--gcc/testsuite/g++.target/i386/i386.exp2
-rw-r--r--gcc/testsuite/g++.target/i386/pr100738-1.C19
-rw-r--r--gcc/testsuite/g++.target/i386/pr101180.C25
-rw-r--r--gcc/testsuite/g++.target/i386/pr102024.C12
-rw-r--r--gcc/testsuite/g++.target/i386/pr102566-1.C31
-rw-r--r--gcc/testsuite/g++.target/i386/pr102566-2.C31
-rw-r--r--gcc/testsuite/g++.target/i386/pr102566-3.C31
-rw-r--r--gcc/testsuite/g++.target/i386/pr102566-4.C29
-rw-r--r--gcc/testsuite/g++.target/i386/pr102566-5a.C31
-rw-r--r--gcc/testsuite/g++.target/i386/pr102566-5b.C31
-rw-r--r--gcc/testsuite/g++.target/i386/pr102566-6a.C31
-rw-r--r--gcc/testsuite/g++.target/i386/pr102566-6b.C31
-rw-r--r--gcc/testsuite/g++.target/i386/pr103012.C19
-rw-r--r--gcc/testsuite/g++.target/i386/pr103696.C25
-rw-r--r--gcc/testsuite/g++.target/i386/pr103750-fwprop-1.C26
-rw-r--r--gcc/testsuite/g++.target/i386/pr103861-1-sse4.C5
-rw-r--r--gcc/testsuite/g++.target/i386/pr103861-1-xop.C5
-rw-r--r--gcc/testsuite/g++.target/i386/pr103861-1.C17
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-1.C71
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-10.C7
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-11.C8
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-12.C8
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-13.C62
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-14.C7
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-15.C8
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-16.C8
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-17.C8
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-18.C8
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-19.C8
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-2.C7
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-20.C8
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-3.C8
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-4.C8
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-5.C66
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-6.C7
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-7.C8
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-8.C8
-rw-r--r--gcc/testsuite/g++.target/i386/pr103973-9.C67
-rw-r--r--gcc/testsuite/g++.target/i386/pr35513-1.C25
-rw-r--r--gcc/testsuite/g++.target/i386/pr35513-2.C53
-rw-r--r--gcc/testsuite/g++.target/msp430/msp430.exp2
-rw-r--r--gcc/testsuite/g++.target/nios2/nios2.exp2
-rw-r--r--gcc/testsuite/g++.target/powerpc/powerpc.exp2
-rw-r--r--gcc/testsuite/g++.target/riscv/riscv.exp2
-rw-r--r--gcc/testsuite/g++.target/s390/s390.exp2
-rw-r--r--gcc/testsuite/g++.target/xtensa/xtensa.exp2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/compile.exp2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr100241-1.c48
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr100278.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr100576.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr101189.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr101941-1.c50
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr103288-1.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr103314-1.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr103317-1.c13
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr103513.c8
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr103682.c3
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr103813.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr104327.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr104499.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr97576.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr99787-1.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/vector-dup-1.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/execute.exp2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr100453.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr101335.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr103052.c35
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr103209.c36
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr103255.c41
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr103376.c29
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr103405.c37
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr103417.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr10352-1.c12
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr104196.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp2
-rw-r--r--gcc/testsuite/gcc.dg-selftests/dg-final.exp2
-rw-r--r--gcc/testsuite/gcc.dg/20021029-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/README2
-rw-r--r--gcc/testsuite/gcc.dg/Walloca-larger-than-4.c3
-rw-r--r--gcc/testsuite/gcc.dg/Walways-true-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/Warray-bounds-48.c5
-rw-r--r--gcc/testsuite/gcc.dg/Warray-bounds-51.c2
-rw-r--r--gcc/testsuite/gcc.dg/Warray-bounds-91.c145
-rw-r--r--gcc/testsuite/gcc.dg/Warray-bounds-92.c149
-rw-r--r--gcc/testsuite/gcc.dg/Warray-parameter-10.c20
-rw-r--r--gcc/testsuite/gcc.dg/Warray-parameter-11.c24
-rw-r--r--gcc/testsuite/gcc.dg/Warray-parameter-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/Wdangling-pointer-2.c82
-rw-r--r--gcc/testsuite/gcc.dg/Wdangling-pointer.c76
-rw-r--r--gcc/testsuite/gcc.dg/Wfree-nonheap-object-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wfree-nonheap-object.c3
-rw-r--r--gcc/testsuite/gcc.dg/Winfinite-recursion-2.c252
-rw-r--r--gcc/testsuite/gcc.dg/Winfinite-recursion.c227
-rw-r--r--gcc/testsuite/gcc.dg/Wmismatched-dealloc-2.c13
-rw-r--r--gcc/testsuite/gcc.dg/Wmismatched-dealloc-3.c5
-rw-r--r--gcc/testsuite/gcc.dg/Wobjsize-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-14.c4
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-15.c14
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-21.c8
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-28.c8
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-56.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-57.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-58.c22
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-59.c18
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-62.c6
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-67.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-68.c29
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-69.c2
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-71.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-75.c36
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-76.c36
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-82.c29
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-83.c19
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-84.c15
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-85.c153
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-86.c63
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-87.c147
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-88.c327
-rw-r--r--gcc/testsuite/gcc.dg/Wuse-after-free-2.c115
-rw-r--r--gcc/testsuite/gcc.dg/Wuse-after-free-3.c22
-rw-r--r--gcc/testsuite/gcc.dg/Wuse-after-free.c41
-rw-r--r--gcc/testsuite/gcc.dg/Wvla-larger-than-5.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wzero-length-array-bounds-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/add-mul-overflow-1.c28
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/aliasing-3.c75
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/analyzer-decls.h3
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2a.c5
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3a.c5
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/analyzer.exp2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/asm-x86-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/asm-x86-lp64-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/asm-x86-lp64-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/attr-tainted_args-1.c88
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/attr-tainted_args-misuses.c6
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/calloc-1.c27
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/capacity-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/capacity-3.c4
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/casts-1.c45
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/data-model-1.c13
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/edges-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/escaping-1.c27
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/explode-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/fields.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/file-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/file-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/file-paths-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/file-pr58237.c8
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/gzio-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/gzio-3a.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/leak-3.c41
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/malloc-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/memcpy-1.c125
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/memset-CVE-2017-18549-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr101547.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr101875.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr101962.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr102692.c110
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr102695.c44
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr103217-2.c52
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr103217-3.c52
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr103217-4.c52
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr103217-5.c47
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr103217.c42
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr103526.c50
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr104029.c115
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr104062.c13
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr104089.c11
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr104224.c106
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr104369-1.c86
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr104369-2.c79
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr104417.c7
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr104452.c10
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr93382.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr94047.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr94362-1.c60
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr94362-2.c42
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr94579.c11
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr94858-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr98969.c4
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr99269.c16
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr99716-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr99716-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pr99774-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/pragma-2.c57
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/realloc-3.c81
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/realloc-4.c85
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/strchr-1.c26
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/strndup-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/symbolic-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-1.c130
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-CVE-2011-2210-1.c93
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-CVE-2020-13143-1.c38
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-CVE-2020-13143-2.c32
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-CVE-2020-13143.h91
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-alloc-1.c65
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-alloc-2.c27
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-alloc-3.c21
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-alloc-4.c31
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-divisor-1.c26
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-merger.c57
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-ops.c106
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-read-index-1.c131
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-read-offset-1.c128
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-realloc.c21
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-size-1.c41
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-size-access-attr-1.c63
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-write-index-1.c132
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-write-offset-1.c132
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/test-uaccess.h15
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/analyzer-torture.exp2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-array_index_mask_nospec.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-rdmsr-paravirt.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-rdmsr.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-reduced.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/empty-struct-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/pr103685.c33
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/pr104159.c18
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/ubsan-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/uninit-bit-field-ref.c31
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-pattern.c10
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-uninitialized.c10
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-zero.c10
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/uninit-1.c95
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/uninit-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/uninit-CWE-457-examples.c119
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/uninit-alloca.c7
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/uninit-pr94713.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/uninit-pr94714.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/zlib-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/zlib-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/asan/asan.exp2
-rw-r--r--gcc/testsuite/gcc.dg/asan/pr99673.c27
-rw-r--r--gcc/testsuite/gcc.dg/asan/use-after-scope-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-invalid-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/atomic-invalid.c2
-rw-r--r--gcc/testsuite/gcc.dg/atomic/atomic.exp2
-rw-r--r--gcc/testsuite/gcc.dg/attr-aligned.c8
-rw-r--r--gcc/testsuite/gcc.dg/attr-alloc_size-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/attr-alloc_size-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/attr-returns-nonnull.c2
-rw-r--r--gcc/testsuite/gcc.dg/auto-init-uninit-16.c4
-rw-r--r--gcc/testsuite/gcc.dg/auto-init-uninit-34.c8
-rw-r--r--gcc/testsuite/gcc.dg/auto-init-uninit-37.c44
-rw-r--r--gcc/testsuite/gcc.dg/auto-init-uninit-B.c4
-rw-r--r--gcc/testsuite/gcc.dg/autopar/autopar.exp2
-rw-r--r--gcc/testsuite/gcc.dg/bad-pragma-locations.c86
-rw-r--r--gcc/testsuite/gcc.dg/bic-bitmask-13.c24
-rw-r--r--gcc/testsuite/gcc.dg/bic-bitmask-14.c24
-rw-r--r--gcc/testsuite/gcc.dg/bic-bitmask-15.c24
-rw-r--r--gcc/testsuite/gcc.dg/bic-bitmask-16.c24
-rw-r--r--gcc/testsuite/gcc.dg/bic-bitmask-17.c24
-rw-r--r--gcc/testsuite/gcc.dg/bic-bitmask-18.c24
-rw-r--r--gcc/testsuite/gcc.dg/bic-bitmask-19.c24
-rw-r--r--gcc/testsuite/gcc.dg/bic-bitmask-20.c24
-rw-r--r--gcc/testsuite/gcc.dg/bic-bitmask-21.c25
-rw-r--r--gcc/testsuite/gcc.dg/bic-bitmask-22.c24
-rw-r--r--gcc/testsuite/gcc.dg/bic-bitmask-7.c24
-rw-r--r--gcc/testsuite/gcc.dg/bic-bitmask.h43
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-alloc-size.c7
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c514
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-10.c11
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-11.c7
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-12.c5
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-13.c5
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-14.c5
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-15.c5
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-16.c6
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-17.c7
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-18.c8
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-19.c104
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-3.c6
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-4.c6
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-5-main.c32
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-5.c6
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-6.c5
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-7.c5
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-8.c5
-rw-r--r--gcc/testsuite/gcc.dg/builtin-dynamic-object-size-9.c5
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-1.c211
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-16.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-17.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-2.c163
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-3.c208
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-4.c123
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-5.c49
-rw-r--r--gcc/testsuite/gcc.dg/charset/charset.exp2
-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/cpp/assembl2.S2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cpp.exp2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/trad.exp2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c21
-rw-r--r--gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c19
-rw-r--r--gcc/testsuite/gcc.dg/darwin-aligned-globals.c24
-rw-r--r--gcc/testsuite/gcc.dg/darwin-comm-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/darwin-minversion-link.c3
-rw-r--r--gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/debug/btf/btf.exp2
-rw-r--r--gcc/testsuite/gcc.dg/debug/ctf/ctf.exp2
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug.exp2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr103874.c12
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr104337.c15
-rw-r--r--gcc/testsuite/gcc.dg/devnull-dump.c7
-rw-r--r--gcc/testsuite/gcc.dg/dfp/dfp.exp2
-rw-r--r--gcc/testsuite/gcc.dg/dg.exp2
-rw-r--r--gcc/testsuite/gcc.dg/encoding-issues-bytes.cbin0 -> 595 bytes
-rw-r--r--gcc/testsuite/gcc.dg/encoding-issues-unicode.cbin0 -> 613 bytes
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp2
-rw-r--r--gcc/testsuite/gcc.dg/fmax-fmin-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/fold-condneg-1.c59
-rw-r--r--gcc/testsuite/gcc.dg/fold-condneg-2.c11
-rw-r--r--gcc/testsuite/gcc.dg/fold-condnot-1.c84
-rw-r--r--gcc/testsuite/gcc.dg/fold-stringops-1.c23
-rw-r--r--gcc/testsuite/gcc.dg/fold-stringops-2.c63
-rw-r--r--gcc/testsuite/gcc.dg/fold-stringops-3.c18
-rw-r--r--gcc/testsuite/gcc.dg/format/format.exp2
-rw-r--r--gcc/testsuite/gcc.dg/gcov-info-to-gcda.c3
-rw-r--r--gcc/testsuite/gcc.dg/gimplefe-48.c20
-rw-r--r--gcc/testsuite/gcc.dg/goacc-gomp/goacc-gomp.exp2
-rw-r--r--gcc/testsuite/gcc.dg/goacc/goacc.exp2
-rw-r--r--gcc/testsuite/gcc.dg/goacc/loop-processing-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/gomp/gomp.exp2
-rw-r--r--gcc/testsuite/gcc.dg/gomp/target-3.c16
-rw-r--r--gcc/testsuite/gcc.dg/graphite/graphite.exp2
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr99085.c1
-rw-r--r--gcc/testsuite/gcc.dg/guality/example.c1
-rw-r--r--gcc/testsuite/gcc.dg/guality/ipa-sra-1.c45
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54519-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54519-3.c6
-rw-r--r--gcc/testsuite/gcc.dg/hwasan/hwasan.exp2
-rw-r--r--gcc/testsuite/gcc.dg/ifcvt-4.c5
-rw-r--r--gcc/testsuite/gcc.dg/init-compare-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/init-rounding-math-1.c11
-rw-r--r--gcc/testsuite/gcc.dg/ipa/inline-9.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/inline10.c33
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-sra-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-sra-ret-nonull.c40
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa.exp2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/modref-3.c20
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr103107.c17
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr103132.c19
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr103227-1.c29
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr103227-2.c29
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr103227-3.c52
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr103601.c35
-rw-r--r--gcc/testsuite/gcc.dg/loop-invariant-2.c20
-rw-r--r--gcc/testsuite/gcc.dg/loop-unswitch-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/loop-unswitch-2.c5
-rw-r--r--gcc/testsuite/gcc.dg/loop-unswitch-3.c7
-rw-r--r--gcc/testsuite/gcc.dg/loop-unswitch-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/loop-unswitch-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/loop-unswitch-6.c33
-rw-r--r--gcc/testsuite/gcc.dg/lto/lto.exp2
-rw-r--r--gcc/testsuite/gcc.dg/lto/modref-3_0.c2
-rw-r--r--gcc/testsuite/gcc.dg/lto/modref-4_0.c2
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr102059-1_0.c12
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr102059-1_1.c9
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr102059-1_2.c11
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr102059-2_0.c12
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr102059-2_1.c9
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr102059-2_2.c10
-rw-r--r--gcc/testsuite/gcc.dg/lto/semantic-interposition-1_0.c13
-rw-r--r--gcc/testsuite/gcc.dg/lto/semantic-interposition-1_1.c5
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/noncompile.exp2
-rw-r--r--gcc/testsuite/gcc.dg/old-style-asm-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/optimize-bswapsi-7.c37
-rw-r--r--gcc/testsuite/gcc.dg/params/params.exp2
-rw-r--r--gcc/testsuite/gcc.dg/pch/pch.exp2
-rw-r--r--gcc/testsuite/gcc.dg/plugin/plugin.exp2
-rw-r--r--gcc/testsuite/gcc.dg/pr100225.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr100509.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr100520.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr100843.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr101145-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr101145-2.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr101885.c31
-rw-r--r--gcc/testsuite/gcc.dg/pr102009.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr102087_1.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr102140.c23
-rw-r--r--gcc/testsuite/gcc.dg/pr102356.c33
-rw-r--r--gcc/testsuite/gcc.dg/pr102478.c29
-rw-r--r--gcc/testsuite/gcc.dg/pr102648.c21
-rw-r--r--gcc/testsuite/gcc.dg/pr102892-1.c21
-rw-r--r--gcc/testsuite/gcc.dg/pr102892-2.c7
-rw-r--r--gcc/testsuite/gcc.dg/pr102983.c21
-rw-r--r--gcc/testsuite/gcc.dg/pr103003.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr103028.c21
-rw-r--r--gcc/testsuite/gcc.dg/pr103062.c7
-rw-r--r--gcc/testsuite/gcc.dg/pr103075.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr103079.c20
-rw-r--r--gcc/testsuite/gcc.dg/pr103093.c20
-rw-r--r--gcc/testsuite/gcc.dg/pr103120.c33
-rw-r--r--gcc/testsuite/gcc.dg/pr103184-1.c43
-rw-r--r--gcc/testsuite/gcc.dg/pr103184-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr103207.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr103222.c33
-rw-r--r--gcc/testsuite/gcc.dg/pr103248.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr103254.c25
-rw-r--r--gcc/testsuite/gcc.dg/pr103268-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr103268-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr103270.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr103277.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr103359.c21
-rw-r--r--gcc/testsuite/gcc.dg/pr103406.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr103431.c21
-rw-r--r--gcc/testsuite/gcc.dg/pr103440.c24
-rw-r--r--gcc/testsuite/gcc.dg/pr103451.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr103485.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr103587.c7
-rw-r--r--gcc/testsuite/gcc.dg/pr103594.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr103721-2.c28
-rw-r--r--gcc/testsuite/gcc.dg/pr103721.c25
-rw-r--r--gcc/testsuite/gcc.dg/pr103793.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr103808.c23
-rw-r--r--gcc/testsuite/gcc.dg/pr103837.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr103838.c28
-rw-r--r--gcc/testsuite/gcc.dg/pr103860.c31
-rw-r--r--gcc/testsuite/gcc.dg/pr103961.c30
-rw-r--r--gcc/testsuite/gcc.dg/pr104198.c36
-rw-r--r--gcc/testsuite/gcc.dg/pr104263.c25
-rw-r--r--gcc/testsuite/gcc.dg/pr104288.c23
-rw-r--r--gcc/testsuite/gcc.dg/pr104380.c32
-rw-r--r--gcc/testsuite/gcc.dg/pr104389.c26
-rw-r--r--gcc/testsuite/gcc.dg/pr104420-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr104420-2.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr104420-3.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr104420-4.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr104427.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr104459.c38
-rw-r--r--gcc/testsuite/gcc.dg/pr104464.c11
-rw-r--r--gcc/testsuite/gcc.dg/pr25530.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr83072-2.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr83073.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr87052.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr95115.c25
-rw-r--r--gcc/testsuite/gcc.dg/pr96392.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr98721-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr99122-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/pragma-diag-10.c3
-rw-r--r--gcc/testsuite/gcc.dg/rtl/aarch64/big-endian-cse-1.c42
-rw-r--r--gcc/testsuite/gcc.dg/rtl/rtl.exp2
-rw-r--r--gcc/testsuite/gcc.dg/sancov/pr104158-1.c11
-rw-r--r--gcc/testsuite/gcc.dg/sancov/pr104158-2.c11
-rw-r--r--gcc/testsuite/gcc.dg/sancov/pr104158-3.c11
-rw-r--r--gcc/testsuite/gcc.dg/sancov/pr104158-4.c11
-rw-r--r--gcc/testsuite/gcc.dg/sancov/pr104158-5.c11
-rw-r--r--gcc/testsuite/gcc.dg/sancov/pr104158-6.c11
-rw-r--r--gcc/testsuite/gcc.dg/sancov/pr104158-7.c11
-rw-r--r--gcc/testsuite/gcc.dg/sancov/sancov.exp2
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-10.c6
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-3.c6
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-4.c6
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-9.c6
-rw-r--r--gcc/testsuite/gcc.dg/signbit-2.c24
-rw-r--r--gcc/testsuite/gcc.dg/signbit-3.c13
-rw-r--r--gcc/testsuite/gcc.dg/signbit-4.c65
-rw-r--r--gcc/testsuite/gcc.dg/signbit-5.c70
-rw-r--r--gcc/testsuite/gcc.dg/signbit-6.c72
-rw-r--r--gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp2
-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/spellcheck-options-24.c5
-rw-r--r--gcc/testsuite/gcc.dg/sso-14.c1
-rw-r--r--gcc/testsuite/gcc.dg/sso-6.c4
-rw-r--r--gcc/testsuite/gcc.dg/sso/sso.exp2
-rw-r--r--gcc/testsuite/gcc.dg/stack-usage-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/store_merging_18.c2
-rw-r--r--gcc/testsuite/gcc.dg/store_merging_29.c2
-rw-r--r--gcc/testsuite/gcc.dg/struct-by-value-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/superblock.c2
-rw-r--r--gcc/testsuite/gcc.dg/tls/tls.exp2
-rw-r--r--gcc/testsuite/gcc.dg/tm/tm.exp2
-rw-r--r--gcc/testsuite/gcc.dg/torture/20211118-1.c27
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c41
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-1.c74
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-2.c75
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr100499-1.c27
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr100499-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr100499-3.c14
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr100740.c12
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr100786.c9
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr101508.c13
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr101972.c39
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr102131-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr102131-2.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr102131-3.c11
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr102131-4.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr103181.c24
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr103188.c38
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr103204.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr103219.c24
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr103237.c24
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr103458.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr103489.c12
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr103596.c36
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr103615.c13
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr103816.c10
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr103987.c13
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr104279.c12
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr104280.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr104281.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr104402.c8
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr104467.c11
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57147-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57993-2.cpp213
-rw-r--r--gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp2
-rw-r--r--gcc/testsuite/gcc.dg/torture/tls/tls.exp2
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/init-array.c43
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/merge_block.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/bittest.c27
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-13.c131
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-warn-6.c47
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-16.c28
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-22.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-25.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-28.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-29.c179
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/divide-6.c9
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/divide-7.c9
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/evrp-trans2.c8
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/evrp9.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-5.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/inline-13.c27
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ivopts-5.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ivopts-6.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ivopts-7.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ivopts-8.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ivopts-9.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-4.c17
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-10.c20
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-11.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-12.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-13.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-14.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-15.c9
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-6.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-8.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-dse-1.c28
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-dse-2.c31
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-dse-3.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-dse-4.c26
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-dse-5.c42
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/modref-dse-6.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/nonzero-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/nonzero-1a.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/phi-opt-26.c31
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-3.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-4.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr100278.c17
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr100359.c31
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr100453.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr101189.c17
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr101335.c17
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr101941-1.c53
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr102232.c52
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr102880.c27
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr102906.c17
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr102951.c41
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr103218-1.c28
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr103220-1.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr103220-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr103228-1.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr103245-1.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr103257-1.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr103345.c53
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr103514.c33
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr20701.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr21001.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr21294.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr21417.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr21458-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr21559.c7
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr21563.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr23744.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr49039.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr55177-1.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr59597.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr61839_1.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr61839_3.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr68198.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr69270-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr76174.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c10
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr77445.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr89074.c12
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c84
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr96779.c79
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr98737-1.c148
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr98737-2.c123
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr98953.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pta-callused.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-4.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/recip-3.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-11.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-12.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-14.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-16.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2b.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-98.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-18.c19
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-19.c29
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-20.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-21.c35
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-22.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-23.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-backedge.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp02.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp03.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp05.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp06.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp07.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp08.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp09.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp106.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp113.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp116.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp20.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp33.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp92.c7
-rw-r--r--gcc/testsuite/gcc.dg/tsan/tsan.exp2
-rw-r--r--gcc/testsuite/gcc.dg/ubsan/commutative-1.c30
-rw-r--r--gcc/testsuite/gcc.dg/ubsan/pr103456.c21
-rw-r--r--gcc/testsuite/gcc.dg/ubsan/ubsan.exp2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-38.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-39.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-41.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr100250.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr101300.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr101494.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr20644-O0.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr50476.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr89230-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr98578.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr98583.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pred-7_a.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pred-9_b.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-17.c5
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-pr103800.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-byte.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-int.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-short.c13
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-byte.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-int.c13
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-short.c13
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/complex-add-pattern-template.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/complex-add-template.c30
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/complex-operations-run.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/complex.exp2
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-half-float.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-double.c13
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c5
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c5
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c5
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-double.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-float.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-half-float.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-double.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-float.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-half-float.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-double.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-float.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-half-float.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-double.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-float.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-half-float.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/pr102819-1.c20
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/pr102819-2.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/pr102819-3.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/pr102819-4.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/pr102819-5.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/pr102819-6.c18
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/pr102819-7.c18
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/pr102819-8.c18
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/pr102819-9.c21
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/pr103169.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-byte.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-int.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-long.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-short.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-byte.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-int.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-short.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr101145_1.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr101145_2.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr101145_3.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr102832.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr103253.c16
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr103494.c14
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr103517.c13
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr103544.c24
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr103581.c59
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr103744-1.c20
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr103744-2.c31
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr103864.c16
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr104112-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr104112-2.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr104152.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr104445.c16
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr81196-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr99102.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-perm-9.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/license.txt29
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h1436
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s000.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s111.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1111.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1112.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1113.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1115.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1119.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s112.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s113.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s114.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s115.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s116.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1161.c48
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s118.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s119.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s121.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1213.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s122.c48
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1221.c38
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s123.c47
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1232.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s124.c47
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1244.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s125.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1251.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s126.c45
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s127.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1279.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s128.c45
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1281.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s131.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s13110.c51
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s132.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1351.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s141.c45
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1421.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s151.c45
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s152.c46
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s161.c48
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s162.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s171.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s172.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s173.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s174.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s175.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s176.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2101.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2102.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s211.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2111.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s212.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s221.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s222.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2233.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2244.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2251.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2275.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s231.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s232.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s233.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s235.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s241.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s242.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s243.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s244.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s251.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s252.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s253.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s254.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s255.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s256.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s257.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s258.c45
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s261.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s271.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2710.c55
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2711.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2712.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s272.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s273.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s274.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s275.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s276.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s277.c49
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s278.c47
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s279.c51
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s281.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s291.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s292.c45
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s293.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s311.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3110.c52
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3111.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s31111.c54
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3112.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3113.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s312.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s313.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s314.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s315.c50
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s316.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s317.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s318.c54
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s319.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s321.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s322.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s323.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3251.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s331.c45
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c52
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s341.c45
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s342.c45
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s343.c47
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s351.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s352.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s353.c47
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4112.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4113.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4114.c47
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4115.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4116.c49
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4117.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4121.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s421.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s422.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s423.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s424.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s431.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s441.c45
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s442.c57
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s443.c50
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s451.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s452.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s453.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s471.c49
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s491.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-va.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vag.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vas.c42
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vbor.c54
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vdotr.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vif.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpv.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpvpv.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpvts.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpvtv.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vsumr.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vtv.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vtvtv.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-10.c26
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-11.c25
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-12.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-2.c25
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-23.c16
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-3.c25
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-4.c25
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-5.c25
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-6.c25
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-8.c25
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-9.c25
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-fmax-1.c83
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-fmax-2.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-fmax-3.c83
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-fmin-1.c86
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-fmin-2.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-fmin-3.c83
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-gather-1.c60
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-gather-2.c36
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-gather-3.c64
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-gather-4.c48
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-18.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-19.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-20.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect.exp5
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-3.c11
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-4.c95
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-5.c31
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-6.c94
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-7.c44
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-8.c47
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-9.c53
-rw-r--r--gcc/testsuite/gcc.dg/vmx/vmx.exp2
-rw-r--r--gcc/testsuite/gcc.dg/vxworks/vxworks.exp2
-rw-r--r--gcc/testsuite/gcc.dg/warn-strnlen-no-nul.c43
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-3.c6
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak.exp2
-rw-r--r--gcc/testsuite/gcc.dg/wrapped-binop-simplify.c2
-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.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/godump-1.c64
-rw-r--r--gcc/testsuite/gcc.misc-tests/godump.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/help.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/i386-prefetch.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/linkage.exp2
-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.exp4
-rw-r--r--gcc/testsuite/gcc.misc-tests/output.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/outputs.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.src/maintainers.exp26
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/macro-def.h2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aarch64.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/acle.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_asm.c58
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_ld64b-2.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_ld64b-3.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_ld64b.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_ld_st_o0.c30
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_st64b-2.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_st64b.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv-2.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv-3.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv0-2.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv0-3.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv0.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bf16_vldN_lane_2.c10
-rw-r--r--[-rwxr-xr-x]gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-1.c0
-rw-r--r--[-rwxr-xr-x]gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c0
-rw-r--r--[-rwxr-xr-x]gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-3.c0
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-1.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-2.c11
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-3.c11
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-4.c11
-rw-r--r--[-rwxr-xr-x]gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c0
-rw-r--r--[-rwxr-xr-x]gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c0
-rw-r--r--[-rwxr-xr-x]gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-3.c0
-rw-r--r--[-rwxr-xr-x]gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-4.c0
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-1.c11
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-2.c11
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-3.c11
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-4.c11
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-5.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-6.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-7.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-8.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/asm-flag-7.c22
-rw-r--r--gcc/testsuite/gcc.target/aarch64/auto-init-2.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/auto-init-6.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/bic-bitmask-1.c13
-rw-r--r--gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/aarch64-cpunative.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpymem-q-reg_1.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmaxnm_1.c24
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmaxnm_2.c20
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fminnm_1.c24
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fminnm_2.c20
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmla_intrinsic_1.c6
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmls_intrinsic_1.c6
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmul_intrinsic_1.c6
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fp16/fp16.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/masked_epilogue.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mops_1.c57
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mops_2.c57
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mops_3.c85
-rw-r--r--gcc/testsuite/gcc.target/aarch64/neoverse_v1_1.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr100518.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr102376.c3
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr103085.c11
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr103094.c22
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr103149.c14
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr103311.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr103350-1.c48
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr103350-2.c53
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr103523.c8
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr103741.c26
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr104005.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_2.c14
-rw-r--r--gcc/testsuite/gcc.target/aarch64/reg-alloc-2.c47
-rw-r--r--gcc/testsuite/gcc.target/aarch64/reg-alloc-3.c65
-rw-r--r--gcc/testsuite/gcc.target/aarch64/reg-alloc-4.c69
-rw-r--r--gcc/testsuite/gcc.target/aarch64/shrn-combine-10.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/shrn-combine-8.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/shrn-combine-9.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/signbit-1.c20
-rw-r--r--gcc/testsuite/gcc.target/aarch64/signbit-2.c36
-rw-r--r--gcc/testsuite/gcc.target/aarch64/simd/lowering_tbaa.c30
-rw-r--r--gcc/testsuite/gcc.target/aarch64/simd/simd.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-mitigation.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/spellcheck_1.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/spellcheck_2.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/spellcheck_3.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/spellcheck_7.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/stp_1.c29
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/aarch64-sve.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr104092.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/complex_mul_1.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5.c28
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5_run.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_6.c22
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_6_run.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7.c27
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7_run.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_8.c26
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_8_run.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5.c29
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5_run.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_6.c23
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_6_run.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7.c28
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7_run.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_8.c27
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_8_run.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cost_model_13.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/fmaxnm_2.c22
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/fmaxnm_3.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/fminnm_2.c22
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/fminnm_3.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/gather_load_10.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/gather_load_11.c49
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_gather_load_8.c65
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_1.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_2.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_3.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_4.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_5.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_6.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_7.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_8.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_1.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_2.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_3.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_4.c6
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_256.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pr104474-1.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pr104474-2.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pr104474-3.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pred-combine-and.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-1.c5
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-2.c5
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-3.c5
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c5
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/single_5.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/struct_vect_25.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve2/aarch64-sve2.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/torture/aarch64-torture.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vec-init-10.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vec-init-11.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vec-init-12.c65
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vec-init-13.c123
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vec-init-14.c123
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vec-init-15.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vec-init-16.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vec-init-17.c73
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vec-init-6.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vec-init-7.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vec-init-8.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vec-init-9.c267
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-cse-codegen.c97
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vector_structure_intrinsics.c723
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vsqrt-1.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vsqrt-2.c28
-rw-r--r--gcc/testsuite/gcc.target/alpha/alpha.exp2
-rw-r--r--gcc/testsuite/gcc.target/arc/add_n-combine.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/arc.exp2
-rw-r--r--gcc/testsuite/gcc.target/arc/builtin_eh.c3
-rw-r--r--gcc/testsuite/gcc.target/arc/cancel-1.c31
-rw-r--r--gcc/testsuite/gcc.target/arc/mul64-1.c2
-rw-r--r--gcc/testsuite/gcc.target/arc/tls-gd.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/tls-ie.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/tls-ld.c6
-rw-r--r--gcc/testsuite/gcc.target/arc/tmac-4.c29
-rw-r--r--gcc/testsuite/gcc.target/arc/uncached-8.c5
-rw-r--r--gcc/testsuite/gcc.target/arm/aapcs/aapcs.exp2
-rw-r--r--gcc/testsuite/gcc.target/arm/acle/acle.exp2
-rw-r--r--gcc/testsuite/gcc.target/arm/arm.exp2
-rw-r--r--gcc/testsuite/gcc.target/arm/asm-flag-7.c23
-rw-r--r--gcc/testsuite/gcc.target/arm/cmse/cmse.exp2
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vaese-erratum1.c28
-rw-r--r--gcc/testsuite/gcc.target/arm/lto/lto.exp2
-rw-r--r--gcc/testsuite/gcc.target/arm/multilib.exp10
-rw-r--r--gcc/testsuite/gcc.target/arm/mve/general-c/type_redef_1.c67
-rw-r--r--gcc/testsuite/gcc.target/arm/mve/general/double_pragmas_1.c8
-rw-r--r--gcc/testsuite/gcc.target/arm/mve/general/nomve_1.c3
-rw-r--r--gcc/testsuite/gcc.target/arm/mve/mve.exp8
-rw-r--r--gcc/testsuite/gcc.target/arm/pr100775.c9
-rw-r--r--gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp2
-rw-r--r--gcc/testsuite/gcc.target/arm/simd/simd.exp2
-rw-r--r--gcc/testsuite/gcc.target/arm/simd/vdot-2-1.c59
-rw-r--r--gcc/testsuite/gcc.target/arm/simd/vdot-2-2.c60
-rw-r--r--gcc/testsuite/gcc.target/arm/simd/vdot-compile.c26
-rw-r--r--gcc/testsuite/gcc.target/arm/simd/vdot-exec.c24
-rw-r--r--gcc/testsuite/gcc.target/arm/stack-protector-7.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/stack-protector-8.c7
-rw-r--r--gcc/testsuite/gcc.target/avr/avr.exp2
-rw-r--r--gcc/testsuite/gcc.target/avr/mmcu/avr-mmcu.exp2
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/avr-torture.exp2
-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/bpf/bpf.exp2
-rw-r--r--gcc/testsuite/gcc.target/bpf/core-section-1.c2
-rw-r--r--gcc/testsuite/gcc.target/cris/cris.exp2
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/cris-torture.exp2
-rw-r--r--gcc/testsuite/gcc.target/csky/csky.exp2
-rw-r--r--gcc/testsuite/gcc.target/csky/fpuv3/fpuv3.exp2
-rw-r--r--gcc/testsuite/gcc.target/epiphany/epiphany.exp2
-rw-r--r--gcc/testsuite/gcc.target/frv/frv.exp2
-rw-r--r--gcc/testsuite/gcc.target/gcn/gcn.exp2
-rw-r--r--gcc/testsuite/gcc.target/h8300/h8300.exp2
-rw-r--r--gcc/testsuite/gcc.target/hppa/hppa.exp2
-rw-r--r--gcc/testsuite/gcc.target/hppa/shadd-2.c2
-rw-r--r--gcc/testsuite/gcc.target/hppa/shadd-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/amx-check.h23
-rw-r--r--gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/amxtile-3.c34
-rw-r--r--gcc/testsuite/gcc.target/i386/auto-init-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/auto-init-4.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/auto-init-6.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vzeroupper-17.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-dest-false-dep-for-glc.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-i32gatherpd256-4.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-i32gatherq256-4.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-i64gatherpd256-4.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-i64gatherq256-4.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-psraq-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpabsb256-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpabsd256-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpabsw256-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bf16-cvtsbh2ss-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bf16-vcvtpbh2ps-1.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bf16vl-cvtness2sbh-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bf16vl-vcvtpbh2ps-1.c29
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-pr103750-1.c154
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-pr103750-2.c173
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-vpcmpequb-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-vpcmpequw-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-vpcmpub-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bw-vpcmpuw-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512dq-dest-false-dep-for-glc.c73
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-dest-false-dep-for-glc.c103
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-pr103750-1.c426
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-pr103750-2.c478
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpequd-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpequq-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16-1c.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16-dest-false-dep-for-glc.c45
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16-pr103750-1.c58
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16-pr103750-2.c71
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16-recip-1.c43
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16-recip-2.c97
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16-vector-complex-float.c40
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16-vfcmulcph-1a.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16-vfcmulcsh-1a.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16-vfmulcph-1a.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16-vfmulcsh-1a.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16vl-complex-broadcast-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16vl-dest-false-dep-for-glc.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16vl-vfcmulcph-1a.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512fp16vl-vfmulcph-1a.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vl-dest-false-dep-for-glc.c76
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vl-vpcmpequd-1.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vl-vpcmpequq-1.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vl-vpcmpuq-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi-1.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi-2.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi-3.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/cleanup-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/cleanup-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/cond_op_shift_w-1.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/harden-sls-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/harden-sls-2.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/harden-sls-3.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/harden-sls-4.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/harden-sls-5.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/harden-sls-6.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/i386.exp2
-rw-r--r--gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp2
-rw-r--r--gcc/testsuite/gcc.target/i386/ifcvt-reduction-logic-op.c80
-rw-r--r--gcc/testsuite/gcc.target/i386/indirect-thunk-cs-prefix-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/indirect-thunk-cs-prefix-2.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/interrupt-redzone-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/interrupt-redzone-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/m128-check.h8
-rw-r--r--gcc/testsuite/gcc.target/i386/mask-pack-prefer128.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/mask-pack-prefer256.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp2
-rw-r--r--gcc/testsuite/gcc.target/i386/mult-highpart.c167
-rw-r--r--gcc/testsuite/gcc.target/i386/pieces-memcpy-17.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pieces-memcpy-18.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pieces-memcpy-19.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pieces-memcpy-20.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pieces-memcpy-21.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pieces-memset-45.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pieces-memset-46.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pieces-memset-47.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pieces-memset-48.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pieces-memset-49.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr100637-1b.c5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr100637-1w.c5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr100711-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr100711-2.c47
-rw-r--r--gcc/testsuite/gcc.target/i386/pr101180.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr101346.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/pr101796-1.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr101989-3.c40
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102024.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102327-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102464-copysign-1.c80
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102464-fma.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102464-maxmin.c44
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102464-vrndscaleph.c115
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102464.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102543.c35
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-10a.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-10b.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-11.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-12.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-13.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-14.c65
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-1a.c188
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-1b.c107
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-2.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-3a.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-3b.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-4.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-5.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-6.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-7.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-8a.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-8b.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-9a.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102566-9b.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102811-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102811-2.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102811.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr102812.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103020.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103069-1.c35
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103069-2.c71
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103097.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103151.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103194-2.c64
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103194-3.c64
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103194-4.c61
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103194-5.c62
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103194.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103205-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103205.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103275.c83
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103404.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103463-2.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103463.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103611-1.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103611-2.c43
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103753.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103762-1a.c647
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103762-1b.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103762-1c.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103771.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103773-2.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103773.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103774.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103785.c38
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103861-2.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103861-3.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103861-4.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103861.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103894.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103895.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103900.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103905.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103908.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103915.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-1.c98
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-10.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-11.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-12.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-13.c76
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-14.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-15.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-16.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-17.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-18.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-19.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-2.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-20.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-3.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-4.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-5.c85
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-6.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-7.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-8.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr103973-9.c89
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104001.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104059.c22
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104104.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104188.c71
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104307.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104362.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104441-1a.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104441-1b.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104446.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104451.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104453.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104458.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104462.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104469.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104479.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/pr104496.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr32803.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-10a.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-10b.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-11a.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-11b.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-12a.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-12b.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-1a.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-1b.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-2a.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-2b.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-3a.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-3b.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-4a.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-4b.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-5a.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-5b.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-6a.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-6b.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-7a.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-7b.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-8.c44
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-9a.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35513-9b.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr53652-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr64291-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79793-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr79793-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr83782-1.c26
-rw-r--r--gcc/testsuite/gcc.target/i386/pr83782-2.c26
-rw-r--r--gcc/testsuite/gcc.target/i386/pr87007-4.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr87007-5.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr89261.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/pr90773-21.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr90773-23.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/pr92658-sse4-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr92658-sse4.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr94790-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pr94790-2.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/pr95046-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr95740.c26
-rw-r--r--gcc/testsuite/gcc.target/i386/pr98468.c35
-rw-r--r--gcc/testsuite/gcc.target/i386/pr98737-1.c207
-rw-r--r--gcc/testsuite/gcc.target/i386/pr98737-2.c111
-rw-r--r--gcc/testsuite/gcc.target/i386/pr98737-3.c207
-rw-r--r--gcc/testsuite/gcc.target/i386/pr98737-4.c111
-rw-r--r--gcc/testsuite/gcc.target/i386/pr98737-5.c303
-rw-r--r--gcc/testsuite/gcc.target/i386/pr98737-6.c303
-rw-r--r--gcc/testsuite/gcc.target/i386/pr98737-7.c303
-rw-r--r--gcc/testsuite/gcc.target/i386/pr99531.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/shrink_wrap_1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/smuldi3_highpart.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-float16-2.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-psraq-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-v1ti-ashiftrt-1.c167
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-v1ti-ashiftrt-2.c166
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-v1ti-ashiftrt-3.c166
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-v1ti-mov-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-v1ti-rotate.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-v1ti-shift-2.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-v1ti-shift-3.c113
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-v1ti-zext.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/sse4_2-check.h1
-rw-r--r--gcc/testsuite/gcc.target/i386/stack-check-11.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/stack-check-18.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/stack-check-19.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/stackalign/pr88483-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/stackalign/pr88483-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp2
-rw-r--r--gcc/testsuite/gcc.target/i386/sw-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/vnni-auto-vectorize-1.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/vnni-auto-vectorize-2.c72
-rw-r--r--gcc/testsuite/gcc.target/i386/warn-vect-op-2.c4
-rw-r--r--gcc/testsuite/gcc.target/ia64/ia64.exp2
-rw-r--r--gcc/testsuite/gcc.target/m68k/m68k.exp2
-rw-r--r--gcc/testsuite/gcc.target/microblaze/microblaze.exp2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-2.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-3.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-7.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-8.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/frame-header-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/frame-header-2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp2
-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.exp3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-bbit-1.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/unaligned-2.c53
-rw-r--r--gcc/testsuite/gcc.target/mips/unaligned-3.c53
-rw-r--r--gcc/testsuite/gcc.target/msp430/msp430.exp2
-rw-r--r--gcc/testsuite/gcc.target/nds32/nds32.exp2
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-inline-1.c33
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-inline-2.c29
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-inline-3.c33
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-inline-4.c29
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2.exp2
-rw-r--r--gcc/testsuite/gcc.target/nvptx/atomic-exchange-1.c39
-rw-r--r--gcc/testsuite/gcc.target/nvptx/atomic-exchange-2.c33
-rw-r--r--gcc/testsuite/gcc.target/nvptx/atomic-exchange-3.c33
-rw-r--r--gcc/testsuite/gcc.target/nvptx/atomic-exchange-4.c74
-rw-r--r--gcc/testsuite/gcc.target/nvptx/atomic-store-1.c26
-rw-r--r--gcc/testsuite/gcc.target/nvptx/atomic-store-2.c26
-rw-r--r--gcc/testsuite/gcc.target/nvptx/atomic-store-3.c25
-rw-r--r--gcc/testsuite/gcc.target/nvptx/atomic_fetch-1.c98
-rw-r--r--gcc/testsuite/gcc.target/nvptx/atomic_fetch-2.c92
-rw-r--r--gcc/testsuite/gcc.target/nvptx/bool-1.c16
-rw-r--r--gcc/testsuite/gcc.target/nvptx/bool-2.c14
-rw-r--r--gcc/testsuite/gcc.target/nvptx/bool-3.c14
-rw-r--r--gcc/testsuite/gcc.target/nvptx/bool-4.c9
-rw-r--r--gcc/testsuite/gcc.target/nvptx/cnot-1.c94
-rw-r--r--gcc/testsuite/gcc.target/nvptx/exttrunc-1.c20
-rw-r--r--gcc/testsuite/gcc.target/nvptx/exttrunc-2.c17
-rw-r--r--gcc/testsuite/gcc.target/nvptx/exttrunc-3.c17
-rw-r--r--gcc/testsuite/gcc.target/nvptx/exttrunc-4.c17
-rw-r--r--gcc/testsuite/gcc.target/nvptx/exttrunc-5.c17
-rw-r--r--gcc/testsuite/gcc.target/nvptx/exttrunc-6.c17
-rw-r--r--gcc/testsuite/gcc.target/nvptx/float16-1.c53
-rw-r--r--gcc/testsuite/gcc.target/nvptx/float16-2.c20
-rw-r--r--gcc/testsuite/gcc.target/nvptx/float16-3.c11
-rw-r--r--gcc/testsuite/gcc.target/nvptx/float16-4.c11
-rw-r--r--gcc/testsuite/gcc.target/nvptx/float16-5.c14
-rw-r--r--gcc/testsuite/gcc.target/nvptx/float16-6.c38
-rw-r--r--gcc/testsuite/gcc.target/nvptx/isinf.c9
-rw-r--r--gcc/testsuite/gcc.target/nvptx/mul-hi64.c47
-rw-r--r--gcc/testsuite/gcc.target/nvptx/mul-wide64.c13
-rw-r--r--gcc/testsuite/gcc.target/nvptx/neg-selp.c17
-rw-r--r--gcc/testsuite/gcc.target/nvptx/nvptx.exp2
-rw-r--r--gcc/testsuite/gcc.target/nvptx/softstack-2.c11
-rw-r--r--gcc/testsuite/gcc.target/nvptx/stack-atomics-run.c48
-rw-r--r--gcc/testsuite/gcc.target/nvptx/tanh-1.c9
-rw-r--r--gcc/testsuite/gcc.target/nvptx/umul-hi64.c47
-rw-r--r--gcc/testsuite/gcc.target/nvptx/umul-wide64.c13
-rw-r--r--gcc/testsuite/gcc.target/nvptx/uniform-simt-1.c18
-rw-r--r--gcc/testsuite/gcc.target/or1k/or1k.exp2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-5.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-5.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-11.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-8.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-10.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-3.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-4.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-5.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-9.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-3.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-4.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-5.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-6.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtin-feclearexcept-feraiseexcept-1.c76
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtin-feclearexcept-feraiseexcept-2.c91
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtin-fegetround.c36
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-1-be-folded.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-1-le-folded.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-1.c1313
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-4.c34
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-5.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/cmpb-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/cmpb-3.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/cmpb32-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c14
-rw-r--r--gcc/testsuite/gcc.target/powerpc/darn-0.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/darn-1.c5
-rw-r--r--gcc/testsuite/gcc.target/powerpc/darn-2.c5
-rw-r--r--gcc/testsuite/gcc.target/powerpc/darn-3.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-12.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-14.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-17.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-19.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-22.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-24.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-27.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-29.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-32.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-34.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-37.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-39.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-4.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-42.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-44.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-47.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-49.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-52.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-54.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-57.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-59.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-62.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-64.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-67.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-69.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-72.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-74.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-77.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-79.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-9.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/float128-constant.c160
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-insert-float-p9.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-splat-floatdouble.c9
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-splat-longlong.c10
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fold-vec-splat-misc-invalid.c8
-rw-r--r--gcc/testsuite/gcc.target/powerpc/int_128bit-runnable.c6
-rw-r--r--gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c9
-rw-r--r--gcc/testsuite/gcc.target/powerpc/mma-builtin-10-pair.c21
-rw-r--r--gcc/testsuite/gcc.target/powerpc/mma-builtin-10-quad.c23
-rw-r--r--[-rwxr-xr-x]gcc/testsuite/gcc.target/powerpc/mma-double-test.c0
-rw-r--r--[-rwxr-xr-x]gcc/testsuite/gcc.target/powerpc/mma-single-test.c0
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p10_vec_xl_sext.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8-vec-xl-xst.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/powerpc.exp2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-fortran/pr102767.f9021
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr101324.c17
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr101384-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr102059-1.c21
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr102059-2.c21
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr102059-3.c21
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr102239.c13
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr102347.c15
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr102868.c53
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr102976.c14
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr103124.c12
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr103127.c19
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr103515.c30
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr103627-1.c16
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr103627-2.c16
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr103627-3.c20
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr103702.c24
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr104015-1.c28
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr104015-2.c29
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr104239-1.c10
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr104239-2.c10
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr104239-3.c8
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr80315-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr80315-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr80315-3.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr80315-4.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr82015.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr83926.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c9
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr86731-nogimplefold-longlong.c32
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr86731-nogimplefold.c63
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr88100.c12
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr91903.c60
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr94613.c47
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr97142.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pragma-optimize.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pragma_misc9.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pragma_power8.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pragma_power9.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/rop-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/rop-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/rop-3.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/rop-4.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/rop-5.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/sldoi_to_mov.c16
-rw-r--r--gcc/testsuite/gcc.target/powerpc/sse4_1-blendvps.c65
-rw-r--r--gcc/testsuite/gcc.target/powerpc/sse4_1-round3.h81
-rw-r--r--gcc/testsuite/gcc.target/powerpc/sse4_1-roundpd.c143
-rw-r--r--gcc/testsuite/gcc.target/powerpc/sse4_1-roundps.c98
-rw-r--r--gcc/testsuite/gcc.target/powerpc/sse4_1-roundsd.c256
-rw-r--r--gcc/testsuite/gcc.target/powerpc/sse4_1-roundss.c208
-rw-r--r--gcc/testsuite/gcc.target/powerpc/swaps-p8-17.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/test_fpscr_drn_builtin_error.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin.c15
-rw-r--r--gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin_error.c12
-rw-r--r--gcc/testsuite/gcc.target/powerpc/test_mffsl.c5
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-gnb-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-minmax-1.c53
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-minmax-2.c51
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-msumc.c39
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c20
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-splat-constant-df.c60
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-splat-constant-sf.c60
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v16qi.c27
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v2df.c64
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v2di.c50
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v4sf.c67
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v4si.c51
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v8hi.c62
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-10.c6
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec_reve_1.c17
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vec_reve_2.c29
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vect-gather-1.c20
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-all-nez-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-any-eqz-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpnez-7.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-0.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-1.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-3.c15
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-4.c15
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-0.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-1.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-3.c15
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-4.c15
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-13.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-12.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsu/vsu.exp2
-rw-r--r--gcc/testsuite/gcc.target/pru/pru.exp2
-rw-r--r--gcc/testsuite/gcc.target/pru/pru_irq_map.c8
-rw-r--r--gcc/testsuite/gcc.target/riscv/arch-1.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/arch-10.c4
-rw-r--r--gcc/testsuite/gcc.target/riscv/arch-11.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/arch-12.c4
-rw-r--r--gcc/testsuite/gcc.target/riscv/arch-2.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/arch-3.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/arch-4.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/arch-5.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/arch-6.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/arch-7.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/arch-8.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/arch-9.c4
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-1.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-10.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-11.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-12.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-13.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-14.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-15.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-16.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-17.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-19.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-2.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-3.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-4.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-5.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-7.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-8.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/attribute-9.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/interrupt-1.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/interrupt-2.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/interrupt-3.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/interrupt-4.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/interrupt-conflict-mode.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/interrupt-debug.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/interrupt-mmode.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/interrupt-smode.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/interrupt-umode.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/li.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/load-immediate.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/losum-overflow.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/mcpu-6.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/mcpu-7.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr102957.c5
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr103302.c48
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr104140.c11
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr84660.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr93202.c1
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr93304.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr95252.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr95683.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr98777.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr99702.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-1.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-10.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-11.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-12.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-13.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-14.c83
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-15.c91
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-16.c91
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-2.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-3.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-4.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-5.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-6.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-7.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/predef-8.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/promote-type-for-libcall.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/riscv.exp6
-rw-r--r--gcc/testsuite/gcc.target/riscv/save-restore-1.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/save-restore-2.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/save-restore-3.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/save-restore-4.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/save-restore-6.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/save-restore-7.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/save-restore-8.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/save-restore-9.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shift-and-1.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shift-and-2.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shift-shift-1.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shift-shift-2.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shift-shift-3.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shift-shift-4.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shift-shift-5.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shorten-memrefs-1.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shorten-memrefs-2.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shorten-memrefs-3.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shorten-memrefs-4.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shorten-memrefs-5.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shorten-memrefs-6.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shorten-memrefs-7.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/shorten-memrefs-8.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/switch-qi.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/switch-si.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/weak-1.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/zba-adduw.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zba-shNadd-01.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zba-shNadd-02.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zba-shNadd-03.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zba-slliuw.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zba-zextw.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zbb-andn-orn-xnor-01.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zbb-andn-orn-xnor-02.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zbb-li-rotr.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/zbb-min-max.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zbb-rol-ror-01.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zbb-rol-ror-02.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zbb-rol-ror-03.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zbbw.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/zbs-bclr.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zbs-bext.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zbs-binv.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zbs-bset.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zero-extend-1.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/zero-extend-2.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/zero-extend-3.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/zero-extend-4.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/zero-extend-5.c2
-rw-r--r--gcc/testsuite/gcc.target/rl78/rl78.exp2
-rw-r--r--gcc/testsuite/gcc.target/rx/rx.exp2
-rw-r--r--gcc/testsuite/gcc.target/s390/20150826-1.c2
-rw-r--r--gcc/testsuite/gcc.target/s390/20211119.c12
-rw-r--r--gcc/testsuite/gcc.target/s390/ifcvt-two-insns-bool.c39
-rw-r--r--gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c38
-rw-r--r--gcc/testsuite/gcc.target/s390/ifcvt-two-insns-long.c38
-rw-r--r--gcc/testsuite/gcc.target/s390/mul-wide.c9
-rw-r--r--gcc/testsuite/gcc.target/s390/nobp-section-type-conflict.c22
-rw-r--r--gcc/testsuite/gcc.target/s390/pr101260.c63
-rw-r--r--gcc/testsuite/gcc.target/s390/s390.exp2
-rw-r--r--gcc/testsuite/gcc.target/s390/umul-wide.c9
-rw-r--r--gcc/testsuite/gcc.target/s390/zvector/imm-range-error-1.c10
-rw-r--r--gcc/testsuite/gcc.target/sh/sh.exp2
-rw-r--r--gcc/testsuite/gcc.target/sh/torture/sh-torture.exp2
-rw-r--r--gcc/testsuite/gcc.target/sparc/sparc.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/v850/pr104400.c8
-rw-r--r--gcc/testsuite/gcc.target/v850/v850.exp41
-rw-r--r--gcc/testsuite/gcc.target/vax/setmem.c22
-rw-r--r--gcc/testsuite/gcc.target/vax/vax.exp2
-rw-r--r--gcc/testsuite/gcc.target/visium/visium.exp2
-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.exp2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/abi-avx512fp16-xmm.exp2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m256h/abi-avx512fp16-ymm.exp2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m512h/abi-avx512fp16-zmm.exp2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/callabi.exp2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp2
-rw-r--r--gcc/testsuite/gcc.target/xstormy16/xstormy16.exp2
-rw-r--r--gcc/testsuite/gcc.target/xtensa/xtensa.exp2
-rw-r--r--gcc/testsuite/gcc.test-framework/README2
-rw-r--r--gcc/testsuite/gcc.test-framework/gen_directive_tests2
-rw-r--r--gcc/testsuite/gcc.test-framework/test-framework.awk2
-rw-r--r--gcc/testsuite/gcc.test-framework/test-framework.exp2
-rw-r--r--gcc/testsuite/gdc.dg/Wcastresult2.d2
-rw-r--r--gcc/testsuite/gdc.dg/asan/asan.exp2
-rw-r--r--gcc/testsuite/gdc.dg/asm1.d18
-rw-r--r--gcc/testsuite/gdc.dg/asm2.d2
-rw-r--r--gcc/testsuite/gdc.dg/asm3.d10
-rw-r--r--gcc/testsuite/gdc.dg/debug/debug.exp2
-rw-r--r--gcc/testsuite/gdc.dg/debug/dwarf2/dwarf2.exp2
-rw-r--r--gcc/testsuite/gdc.dg/dg.exp2
-rw-r--r--gcc/testsuite/gdc.dg/extern-c++/extern-c++.exp2
-rw-r--r--gcc/testsuite/gdc.dg/gdc282.d6
-rw-r--r--gcc/testsuite/gdc.dg/imports/gdc170.d8
-rw-r--r--gcc/testsuite/gdc.dg/intrinsics.d36
-rw-r--r--gcc/testsuite/gdc.dg/lto/lto.exp2
-rw-r--r--gcc/testsuite/gdc.dg/pr101672.d2
-rw-r--r--gcc/testsuite/gdc.dg/pr90650a.d2
-rw-r--r--gcc/testsuite/gdc.dg/pr90650b.d2
-rw-r--r--gcc/testsuite/gdc.dg/pr94777a.d2
-rw-r--r--gcc/testsuite/gdc.dg/pr94777c.d62
-rw-r--r--gcc/testsuite/gdc.dg/pr95250.d2
-rw-r--r--gcc/testsuite/gdc.dg/pr96156b.d17
-rw-r--r--gcc/testsuite/gdc.dg/pr96157c.d40
-rw-r--r--gcc/testsuite/gdc.dg/pr96869.d26
-rw-r--r--gcc/testsuite/gdc.dg/pr98277.d2
-rw-r--r--gcc/testsuite/gdc.dg/pr98457.d6
-rw-r--r--gcc/testsuite/gdc.dg/simd1.d8
-rw-r--r--gcc/testsuite/gdc.dg/simd2a.d8
-rw-r--r--gcc/testsuite/gdc.dg/simd2b.d8
-rw-r--r--gcc/testsuite/gdc.dg/simd2c.d8
-rw-r--r--gcc/testsuite/gdc.dg/simd2d.d8
-rw-r--r--gcc/testsuite/gdc.dg/simd2e.d8
-rw-r--r--gcc/testsuite/gdc.dg/simd2f.d8
-rw-r--r--gcc/testsuite/gdc.dg/simd2g.d8
-rw-r--r--gcc/testsuite/gdc.dg/simd2h.d8
-rw-r--r--gcc/testsuite/gdc.dg/simd2i.d8
-rw-r--r--gcc/testsuite/gdc.dg/simd2j.d8
-rw-r--r--gcc/testsuite/gdc.dg/simd7951.d1
-rw-r--r--gcc/testsuite/gdc.dg/simd_ctfe.d87
-rw-r--r--gcc/testsuite/gdc.dg/torture/gdc309.d1
-rw-r--r--gcc/testsuite/gdc.dg/torture/pr94424.d16
-rw-r--r--gcc/testsuite/gdc.dg/torture/pr94777b.d135
-rw-r--r--gcc/testsuite/gdc.dg/torture/pr96435.d2
-rw-r--r--gcc/testsuite/gdc.dg/torture/simd17344.d11
-rw-r--r--gcc/testsuite/gdc.dg/torture/simd20052.d17
-rw-r--r--gcc/testsuite/gdc.dg/torture/simd6.d26
-rw-r--r--gcc/testsuite/gdc.dg/torture/simd7.d18
-rw-r--r--gcc/testsuite/gdc.dg/torture/torture.exp2
-rw-r--r--gcc/testsuite/gdc.dg/ubsan/ubsan.exp2
-rw-r--r--gcc/testsuite/gdc.test/compilable/99bottles.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/a3682.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/aliasassign.d41
-rw-r--r--gcc/testsuite/gdc.test/compilable/aliasdecl.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/art4769.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/b1215.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/b12504.d44
-rw-r--r--gcc/testsuite/gdc.test/compilable/b15206.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/b16360.d39
-rw-r--r--gcc/testsuite/gdc.test/compilable/b16697.d27
-rw-r--r--gcc/testsuite/gdc.test/compilable/b16967.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/b17111.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/b17651.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/b18197.d17
-rw-r--r--gcc/testsuite/gdc.test/compilable/b18242.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/b18489.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/b19294.d69
-rw-r--r--gcc/testsuite/gdc.test/compilable/b19432.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/b19442.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/b19775.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/b19829.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/b20045.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/b20067.d23
-rw-r--r--gcc/testsuite/gdc.test/compilable/b20758.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/b20780.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/b20833.d20
-rw-r--r--gcc/testsuite/gdc.test/compilable/b20885.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/b20938.d22
-rw-r--r--gcc/testsuite/gdc.test/compilable/b21285.d27
-rw-r--r--gcc/testsuite/gdc.test/compilable/b33.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/b6227.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/b6395.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/b6400.d37
-rw-r--r--gcc/testsuite/gdc.test/compilable/betterc.d27
-rw-r--r--gcc/testsuite/gdc.test/compilable/bug21196.d31
-rw-r--r--gcc/testsuite/gdc.test/compilable/callconv.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/ccompile.d36
-rw-r--r--gcc/testsuite/gdc.test/compilable/cdcmp.d148
-rw-r--r--gcc/testsuite/gdc.test/compilable/chkformat.d27
-rw-r--r--gcc/testsuite/gdc.test/compilable/commontype.d486
-rw-r--r--gcc/testsuite/gdc.test/compilable/compilable.exp2
-rw-r--r--gcc/testsuite/gdc.test/compilable/compile1.d243
-rw-r--r--gcc/testsuite/gdc.test/compilable/covariant_override.d34
-rw-r--r--gcc/testsuite/gdc.test/compilable/cpp_abi_tag_unused.d21
-rw-r--r--gcc/testsuite/gdc.test/compilable/cppmangle.d1021
-rw-r--r--gcc/testsuite/gdc.test/compilable/cppmangle2.d21
-rw-r--r--gcc/testsuite/gdc.test/compilable/cppmangle3.d32
-rw-r--r--gcc/testsuite/gdc.test/compilable/cppmangle_abitag.d106
-rw-r--r--gcc/testsuite/gdc.test/compilable/ctfe_math.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc1.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc10.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc10236.d22
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc10236b.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc10325.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc10334.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc10366.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc10367.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc10869.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc10870.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc11.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc11479.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc11511.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc11823.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc12.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc12706.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc12745.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc13.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc13270.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc13645.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc14.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc14383.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc14413.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc14778.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc15475.d27
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc17697.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc18361.d27
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc198.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc19814.d23
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc2.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc2273.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc4.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc4162.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc5.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc5446.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc6.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc648.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc6491.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc7.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc7555.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc7656.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc7715.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc7795.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc8.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc8271.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc8739.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9037.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9155.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9305.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9369.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9475.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9497a.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9497b.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9497c.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9497d.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9676a.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9676b.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9727.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9789.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc9903.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_breaks.d30
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_breaks_verbose.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_code.d46
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_code_verbose.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_emphasis.d45
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_emphasis_verbose.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_escapes.d27
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_headings.d40
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_headings_verbose.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_links.d42
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_links_verbose.d17
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_lists.d68
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_lists_verbose.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_quote.d53
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_quote_verbose.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_tables.d42
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_tables_22285.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddoc_markdown_tables_verbose.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddocbackticks.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ddocunittest.d50
-rw-r--r--gcc/testsuite/gdc.test/compilable/debugInference.d55
-rw-r--r--gcc/testsuite/gdc.test/compilable/defa.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/depmsg.d22
-rw-r--r--gcc/testsuite/gdc.test/compilable/depsOutput9948.d12
-rw-r--r--gcc/testsuite/gdc.test/compilable/dip22.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/dip22d.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/disable_new.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_21217.d91
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_AliasDeclaration.d217
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_AliasDeclaration_98.d56
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_AnonDeclaration.d106
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_CPPNamespaceDeclaration.d67
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_ClassDeclaration.d347
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_StructDeclaration.d286
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_TemplateDeclaration.d401
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_UnionDeclaration.d93
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_VarDeclaration.d116
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_cpp98_compat.d142
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_enum.d271
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_enum_cpp98.d244
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_expressions.d127
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_extern_type.d174
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_forwarding.d265
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_functions.d276
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_ignored.d150
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_invalid_identifiers.d170
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_names.d260
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_protection.d218
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_required_symbols.d225
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_special_enum.d90
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_unittest_block.d52
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtoh_verbose.d172
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtorfields.d52
-rw-r--r--gcc/testsuite/gdc.test/compilable/dtorfields_deprecation.d49
-rw-r--r--gcc/testsuite/gdc.test/compilable/emptygenmain.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/extra-files/c6395.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/extra-files/depsOutput9948a.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/extra-files/dtoh_imports.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/extra-files/dtoh_imports2.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/extra-files/emptymain.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/extra-files/header1.d78
-rw-r--r--gcc/testsuite/gdc.test/compilable/extra-files/header17125.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/extra-files/header18365.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/extra-files/header2.d65
-rw-r--r--gcc/testsuite/gdc.test/compilable/fail137.d26
-rw-r--r--gcc/testsuite/gdc.test/compilable/fieldwise.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/filefullpath_18911.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/fix13165.d12
-rw-r--r--gcc/testsuite/gdc.test/compilable/fix17145.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/fix17349.d40
-rw-r--r--gcc/testsuite/gdc.test/compilable/fix20416.d36
-rw-r--r--gcc/testsuite/gdc.test/compilable/fix21647.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/fix21684.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/fix22180.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/forward1.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/future.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/futurexf.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/fwdref21063.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/header18364.d24
-rw-r--r--gcc/testsuite/gdc.test/compilable/header18365.d34
-rw-r--r--gcc/testsuite/gdc.test/compilable/ice11054.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/ice11300.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/ice11925.d38
-rw-r--r--gcc/testsuite/gdc.test/compilable/ice13403.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/ice13819.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/ice1524.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/ice20044.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/ice20415.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/ice6538.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/ice854.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/implicitconv.d33
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/a12511.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/a18911.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/g313.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/imp16088.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/imp21832.d24
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/imp22122.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/impfieldwise.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/pkg11847/mod11847.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/pkg11847/package.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/protectionimp.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test11563std_traits.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test13582.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test16709a.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test16709b.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test16709c.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test16709d.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test17441foo/bar.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test17441foo/package.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test17541_2.d20
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test17541_3.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test18651/algorithm.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test18651/b.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test18651/c.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test18651/datetime.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test18771a.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test18771b.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test18771c.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test18771d.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19187.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19344.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19656a.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19656b.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19656c.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19657b.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19657c.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19657d.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19657e.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19657f.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19657g.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19746a.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19746b.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19746c.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19746d.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19750a.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19750b.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19750c.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test19750d.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test21227/..foo/a.txt1
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test21227/a..b.txt1
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test21227/a.txt1
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test21464a.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/test63a.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/testcontracts.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/testlambda1.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/testlambda2.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/u20958.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/interpret3.d1503
-rw-r--r--gcc/testsuite/gdc.test/compilable/interpret4.d31
-rw-r--r--gcc/testsuite/gdc.test/compilable/isZeroInit.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/isreturnonstack.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue12520.d21
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue15478.d55
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue15795.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue15818.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue18097.d12
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue19925.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue20362.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue20599.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue20704.d29
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue20705.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue20995.d12
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue21203.d210
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue21328.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue21340.d38
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue21378.d33
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue21662.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue21726.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue21880.d23
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue21882.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue21905.d24
-rw-r--r--gcc/testsuite/gdc.test/compilable/issue9884.d25
-rw-r--r--gcc/testsuite/gdc.test/compilable/json.d153
-rw-r--r--gcc/testsuite/gdc.test/compilable/json20742.d69
-rw-r--r--gcc/testsuite/gdc.test/compilable/minimal.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/minimal2.d31
-rw-r--r--gcc/testsuite/gdc.test/compilable/mixin.d38
-rw-r--r--gcc/testsuite/gdc.test/compilable/mixinTemplateMangling.d35
-rw-r--r--gcc/testsuite/gdc.test/compilable/mixintempl.d22
-rw-r--r--gcc/testsuite/gdc.test/compilable/mixintype2.d49
-rw-r--r--gcc/testsuite/gdc.test/compilable/nestedtempl0.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/nestedtempl1.d25
-rw-r--r--gcc/testsuite/gdc.test/compilable/nogc.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/noreturn1.d106
-rw-r--r--gcc/testsuite/gdc.test/compilable/ob1.d149
-rw-r--r--gcc/testsuite/gdc.test/compilable/pr9374.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/pr9383.d25
-rw-r--r--gcc/testsuite/gdc.test/compilable/previewin.d116
-rw-r--r--gcc/testsuite/gdc.test/compilable/protattr.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/protection.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/quadratic.d42
-rw-r--r--gcc/testsuite/gdc.test/compilable/readmodify_structclass.d30
-rw-r--r--gcc/testsuite/gdc.test/compilable/reinterpretctfe.d48
-rw-r--r--gcc/testsuite/gdc.test/compilable/riia_ctor.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/rvalueref.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/scope.d247
-rw-r--r--gcc/testsuite/gdc.test/compilable/scopeinfer.d30
-rw-r--r--gcc/testsuite/gdc.test/compilable/shared.d125
-rw-r--r--gcc/testsuite/gdc.test/compilable/sharedopt.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/shortened_methods.d33
-rw-r--r--gcc/testsuite/gdc.test/compilable/sroa.d55
-rw-r--r--gcc/testsuite/gdc.test/compilable/staticforeach.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/stc_traits.d172
-rw-r--r--gcc/testsuite/gdc.test/compilable/sw_transition_complex.d118
-rw-r--r--gcc/testsuite/gdc.test/compilable/sw_transition_field.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/sw_transition_tls.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/test1.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test10028.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test10312.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test10375.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test10520.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/test10752.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test10981.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/test10993.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/test11169.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test11225a.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test11237.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/test11259.d25
-rw-r--r--gcc/testsuite/gdc.test/compilable/test11371.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test11563.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test11656.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test1170.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test11847.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/test1238.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test12496.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/test12511.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/test12558.d39
-rw-r--r--gcc/testsuite/gdc.test/compilable/test12567c.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/test12567d.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test12807.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/test13226.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test13242.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test13512.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/test13582a.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test13582b.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/test13858.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test13953.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/test14114.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/test14275.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test14528.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test14666.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test14740.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/test14831.d60
-rw-r--r--gcc/testsuite/gdc.test/compilable/test14929.d85
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15019.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15150.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15225.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15292.d20
-rw-r--r--gcc/testsuite/gdc.test/compilable/test1537.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15389_x.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15389_y.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test1547.d20
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15490.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15519_x.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15519_y.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15711.d31
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15780.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15785.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15856.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test15907.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16002.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16013a.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16013b.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16037.d23
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16085.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16088.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16107.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16183.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16214a.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16273.d22
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16460.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16570.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16578a.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16578b.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16621.d23
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16635.d56
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16657.d17
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16685.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16709.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/test16798.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17057.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17143.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17146.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17351.d17
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17373.d32
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17419.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17441.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17512.d26
-rw-r--r--gcc/testsuite/gdc.test/compilable/test1754.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17541.d28
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17548.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17752.d12
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17782.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17793.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17807.d17
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17853.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17870.d26
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17906.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17942.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/test17970.d28
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18000.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18020.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18030.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18099.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18115.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18199.d87
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18251.d23
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18385b.d29
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18430.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18468.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18474.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18572.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18578.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18584.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18645.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18651a.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18670.d12
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18694.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18737.d32
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18771.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18775.d20
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18821.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18905.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18936.d31
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18951a.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18951b.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/test18976.d32
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19014.d12
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19066.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19081.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19097.d23
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19108.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19187.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19203.d27
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19224.d18
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19227.d29
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19315.d20
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19409.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19464.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19482.d68
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19491.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19499.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19519.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19540.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19557.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19609.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19631.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19652.d22
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19656.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19657a.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19713.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19728.d52
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19731.d78
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19746.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19750.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19754.d45
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19804.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19809.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19833.d27
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19840.d21
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19873.d37
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19895.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19936.d17
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19954.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/test19970.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20000.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20021.d22
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20039.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20051.d18
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20065.d12
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20100.d50
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20136.d18
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20138.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20181.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20236.d22
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20296.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20318.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20326.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20367.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20388.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20406.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20410.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20417.d12
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20420.d22
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20488.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20596.d31
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20653.d20
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20656.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20661.d17
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20695.d35
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20710.d24
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20744.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20789.d34
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20795.d35
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20821.d17
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20835.d59
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20842.d33
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20860.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20868.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20906.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20909.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20923.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20958.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test20990.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21050.d24
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21058.d25
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21073.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21227.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21255.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21282.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21299a.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21299b.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21330.d22
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21372.d24
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21398.d31
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21414.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21438.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21464.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21514.d20
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21543.d116
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21591.d46
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21659.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21661.d24
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21668.d7
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21680.d9
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21719.d21
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21743.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21753.d21
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21794.d52
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21802.d38
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21806.d24
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21828.d27
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21830.d25
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21831.d20
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21832.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21850.d35
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21861.d38
-rw-r--r--gcc/testsuite/gdc.test/compilable/test21876.d17
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22122.d53
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22214.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22224.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22226.d15
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22228.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22254.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22292.d155
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22388.d22
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22410.d59
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22420.d88
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22421.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22510.d18
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22593.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/test25.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/test2991.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test3004.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/test313a.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test313c.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test313d.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/test313e.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test313f.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test313g.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/test314.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test318.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/test3775.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test4003.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/test4090.d17
-rw-r--r--gcc/testsuite/gdc.test/compilable/test4375.d5
-rw-r--r--gcc/testsuite/gdc.test/compilable/test50.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test5227.d23
-rw-r--r--gcc/testsuite/gdc.test/compilable/test55.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test59.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test5973.d41
-rw-r--r--gcc/testsuite/gdc.test/compilable/test6013.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test602.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/test61.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test62.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test63.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test6395.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test6541.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/test66.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/test67.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test6777.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/test68.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/test69.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/test6999.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test70.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test71.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test7172.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test72.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test7399.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/test7491.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test7524.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test7754.d23
-rw-r--r--gcc/testsuite/gdc.test/compilable/test8509.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/test8543.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test8696.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/test8922a.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test8922b.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test8922c.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test8922d.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test8922e.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test8922f.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9209.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9274.d26
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9276.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9278a.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9278b.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test930.d22
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9434.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9435.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9436.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9613.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9672.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9692.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9701.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9766.d4
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9818.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/test9919.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/testAliasLookup.d60
-rw-r--r--gcc/testsuite/gdc.test/compilable/testCpCtor.d21
-rw-r--r--gcc/testsuite/gdc.test/compilable/testDIP37a.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/testInference.d54
-rw-r--r--gcc/testsuite/gdc.test/compilable/testVRP.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/testcontracts.d44
-rw-r--r--gcc/testsuite/gdc.test/compilable/testdip1008.d21
-rw-r--r--gcc/testsuite/gdc.test/compilable/testexpression.d26
-rw-r--r--gcc/testsuite/gdc.test/compilable/testfwdref.d44
-rw-r--r--gcc/testsuite/gdc.test/compilable/testheader1.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/testheader12567a.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/testheader12567b.d16
-rw-r--r--gcc/testsuite/gdc.test/compilable/testheader17125.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/testheader1i.d13
-rw-r--r--gcc/testsuite/gdc.test/compilable/testheader2.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/testheader2i.d11
-rw-r--r--gcc/testsuite/gdc.test/compilable/testheader3.d31
-rw-r--r--gcc/testsuite/gdc.test/compilable/testheaderudamodule.d24
-rw-r--r--gcc/testsuite/gdc.test/compilable/testimport12242.d2
-rw-r--r--gcc/testsuite/gdc.test/compilable/testlambdacomp.d216
-rw-r--r--gcc/testsuite/gdc.test/compilable/testparse.d49
-rw-r--r--gcc/testsuite/gdc.test/compilable/testsctreturn.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/testtempl2.d24
-rw-r--r--gcc/testsuite/gdc.test/compilable/traits.d190
-rw-r--r--gcc/testsuite/gdc.test/compilable/traits_getFunctionAttributes.d120
-rw-r--r--gcc/testsuite/gdc.test/compilable/transition_in.d26
-rw-r--r--gcc/testsuite/gdc.test/compilable/typeid_name.d14
-rw-r--r--gcc/testsuite/gdc.test/compilable/uda.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/udamodule1.d3
-rw-r--r--gcc/testsuite/gdc.test/compilable/udamodule2.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/union_initialization.d43
-rw-r--r--gcc/testsuite/gdc.test/compilable/vcg-ast.d25
-rw-r--r--gcc/testsuite/gdc.test/compilable/version.d23
-rw-r--r--gcc/testsuite/gdc.test/compilable/vgc1.d41
-rw-r--r--gcc/testsuite/gdc.test/compilable/vgc2.d34
-rw-r--r--gcc/testsuite/gdc.test/compilable/vgc3.d6
-rw-r--r--gcc/testsuite/gdc.test/compilable/vtemplates.d28
-rw-r--r--gcc/testsuite/gdc.test/compilable/vtemplates_list.d46
-rw-r--r--gcc/testsuite/gdc.test/compilable/warn3882.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/zerosize.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/aacmp10381.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/aliasassign.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/aliasassign1.d34
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/already_defined.d76
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b15069.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b15875.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b15909.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b17918.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b19523.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b19685.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b19691.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b19691e.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b19717a.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b19730.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b20011.d40
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b20780.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b20875.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b3841.d45
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/b6227.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/betterc.d30
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/bug15613.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/bug16165.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/bug18743.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/bug19569.d90
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/bug8891.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/bug9631.d47
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ccast.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/checkimports2.d30
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/checkimports2a.d32
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/checkimports2b.d29
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/checkimports2c.d29
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/circ10280.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/class1.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/class2.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/commaexp.d57
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/constraints_aggr.d45
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/constraints_defs.d56
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/constraints_func1.d93
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/constraints_func2.d108
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/constraints_func3.d60
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/constraints_func4.d97
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/constraints_tmpl.d44
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/covariant_override.d35
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/cpp_abi_tag.d57
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/cpp_abi_tag2.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/cppeh1.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/cppmangle.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/cppmangle2.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ctfe10989.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ctfe10995.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ctfe11467.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ctfe13612.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ctfe14207.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ctfe14465.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/dassert.d43
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ddoc_18083.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/debugCaseDeclaration.d39
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/dep_d1_ops.d191
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/dephexstrings.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/depmsg.d40
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/depmsg15814.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/depmsg15815.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/deprecate1553.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/deprecated6760.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/deprecatedImports.d31
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/deprecatedTemplates.d63
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/deprecateopdot.d30
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/deprecations.d66
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10089.d5
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10099.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10141.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10169.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10319.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10327.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10405.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10415.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10688.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10768.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10783.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10792.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10805.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10862.d68
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10926.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag10984.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag11078.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag11132.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag11425.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag11727.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag11756.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag11769.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag12063.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag12124.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag12280.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag12312.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag12380.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag12480.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag12487.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag12678.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag12777.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag12829.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag13028.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag13215.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag13320.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag13333.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag13528.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag13609b.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag13787.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag13884.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag13942.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag14102.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag14145.d38
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag14163.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag14235.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag14818.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag14875.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag14876.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag15209.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag15411.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag15669.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag15713.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag15974.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag16499.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag16977.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag1730.d57
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag18460.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag18574.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag19022.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag19225.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag20059.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag20518.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag21883.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag2452.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag3013.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag3438.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag3672.d66
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag3672a.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag3869.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag3913.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag4479.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag4528.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag4596.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag5385.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag5450.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag6373.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag6539.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag6677.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag6699.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag6707.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag7050a.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag7050b.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag7050c.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag7420.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag7477.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag7747.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag7998.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8044.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8101.d40
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8101b.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8178.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8318.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8425.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8510.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8559.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8648.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8684.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8697.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8714.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8777.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8787.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8894.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag8928.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9004.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9148.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9191.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9210a.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9247.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9312.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9357.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9358.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9398.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9451.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9620.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9635.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9679.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9831.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9861.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9880.d5
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag9961.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag_class_alloc.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag_cstyle.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag_debug_conditional.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag_err1.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag_funclit.d40
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag_template_alias.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag_template_this.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diagin.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diaginref.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/dip22a.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/dip22b.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/dip22e.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/dip25.d29
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/disable_new.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/dtor_attributes.d190
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/dtorfields_attributes.d43
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/e15876_1.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/e15876_2.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/e15876_3.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/e15876_4.d23
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/e15876_5.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/e15876_6.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/enum9921.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/extra-files/a14446.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail100.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10082.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail101.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10102.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10115.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10254.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10277.d42
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10299.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail104.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10481.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail105.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10528.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10534.d32
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail106.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10630.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10666.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10806.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail109.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10905.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10947.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10964.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10968.d44
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10980.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail110.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11038.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail111.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11125.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11151.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11163.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail113.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11355.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11375.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail114.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11445.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11453b.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11503c.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11503d.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11510.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11532.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11542.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11545.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11552.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11562.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11591b.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail116.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail117.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11714.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11717.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11720.d33
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail11748.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail118.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail120.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail122.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12236.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12255.d36
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail123.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12378.d30
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12390.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail124.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12436.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail125.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail126.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12622.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12636.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail127.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12744.d36
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12749.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12764.d26
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12809.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail129.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12901.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12908.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail12932.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13064.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail131.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13116.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13120.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13187.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail132.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13203.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail133.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13336a.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13336b.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail134.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13424.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13435.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13498.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13574.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail136.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13601.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13701.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13756.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail139.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13902.d70
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail14089.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail142.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail14249.d28
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail143.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail14304.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail144.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail14406.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail14407.d47
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail14416.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail14486.d100
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail145.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail14554.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail14669.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail14965.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail14997.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail15.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail150.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail15068.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail15292.d28
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail153.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail154.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail155.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail15535.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail15550.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail156.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail15616a.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail15616b.d32
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail15626.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail15667.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail15691.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail15755.d29
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail158.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail159.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail160.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail16001.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail161.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail162.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail16206a.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail16206b.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail163.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail16600.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail16689.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail169.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail16997.d59
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail170.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail172.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17275.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17354.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17491.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17492.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17502.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17518.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17570.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail176.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17602.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17612.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17625.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17646.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail177.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17722a.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17722b.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17842.d29
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail179.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17927.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17955.d102
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17969.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail17976.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail180.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18057.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18093.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18228.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18236.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18243.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail183.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18417.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail185.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18620.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail187.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18719.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail188.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18892.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18938.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18970.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18979.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18985.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail18994.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail190.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail1900.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19038.d29
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19076.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19098.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19099.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19103.d36
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19107.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19181.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail192.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19202.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19209.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail193.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19319a.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19319b.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail194.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19441.d49
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19447.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail195.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19609.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19687.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19729.d37
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19744.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19757_m32.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19757_m64.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail198.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19871.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19881.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19890a.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19890b.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19897.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19898a.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19898b.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19911b.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19911c.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19912a.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19912b.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19912c.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19912d.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19912e.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19913.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19914.d5
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19915.d5
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19917.d49
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19919.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19922.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19923.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19931.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail1995.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19955.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19965.d37
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20000.d39
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20033.d54
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20040.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20073.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20084.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20108.d31
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20163.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20164.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20183.d47
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20376.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20448.d23
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20461.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20538.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20547.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20551.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20609.d45
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20616.d26
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20618.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20637.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20638.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20658.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20691.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail207.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20714.d32
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20730a.d39
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20730b.d46
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20771.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20772.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20775.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20779.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail208.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20800.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail209.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20965.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21091a.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21091b.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21092.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail212.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21275.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail213.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail215.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21508.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21508_2.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21547.d34
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail216.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail218.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21830.d34
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21831.d29
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21832.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21849.d36
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21868b.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21885.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21928.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail21928b.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail2195.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22035.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22054.d23
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22075.d30
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22084.d23
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail221.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22118.d36
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22121.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22121/imports/test22121/package.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22138.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22151.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22157.d34
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail222.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail223.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22366.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail224.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail225.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22529.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22570.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail229.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail23.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail231.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail233.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail235.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail236.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail2361.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail237.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail238_m32.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail238_m64.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail24.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail240.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail241.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail243.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail244.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail245.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail2450.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail2456.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail246.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail247.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail248.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail249.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail25.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail250.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail251.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail253.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail256.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail259.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail261.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail262.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail263.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail265.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail267.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail270.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail272.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail273.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail275.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail278.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail2789.d109
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail282.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail284.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail287.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail288.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail291.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail296.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail2962.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail297.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail299.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail3.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail301.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail302.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail303.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail305.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail309.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail310.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail311.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail312.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail313.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail314.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail3144.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail315.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail317.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail318.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail318_b.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail319.d5
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail320.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail324.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail325.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail328.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail329.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail330.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail331.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail332.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail333.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail336.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail337.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail34.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail340.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail341.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail343.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail347.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail349.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail35.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail351.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail354.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail355.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail36.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail3672.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail3703.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail3753.d48
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail37_m32.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail37_m64.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail38.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail3882.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail39.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail3990.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail40.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4082.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail41.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail42.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375a.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375b.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375c.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375d.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375e.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375f.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375g.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375h.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375i.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375j.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375k.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375l.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375m.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375o.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375r.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375s.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375t.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375u.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375v.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375w.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375x.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4375y.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail44.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4421.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4448.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail45.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4517.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4544.d23
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail46.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4611.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4923.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail50.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail51.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail5153.d28
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail52.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail54.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail59.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail61.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail6107.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail62.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail6242.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail63.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail6334.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail6453.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail66.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail6652.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail6795.d37
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail6889.d30
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail73.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail7352.d52
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail74.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail7443.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail75.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail76.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail7848.d43
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail7862.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail79.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail7903.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail8009.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail80_m32.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail80_m64.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail8217.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail8262.d33
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail8373.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail86.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail8631.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail8724.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9063.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9081.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail91.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9199.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail92.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9290.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail93.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9346.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9368.d49
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail94.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9413.d42
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9414a.d42
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9414b.d42
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9414c.d42
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9414d.d42
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail95.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9537.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9562.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail96.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9613.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9665a.d77
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9665b.d26
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail97.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9710.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9766.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9773.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9790.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail98.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9891.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9892.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail9936.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/failCopyCtor.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/failCopyCtor2.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_arrayexp.d30
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_arrayop1.d53
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_arrayop2.d163
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_arrayop3a.d28
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_arrayop3b.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_arrayop3c.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_casting.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_casting2.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_circular.d64
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_circular2.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_compilation.exp2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_contracts3.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_opover.d28
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_pretty_errors.d36
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail_scope.d32
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/failattr.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/faildeleteaa.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/faildottypeinfo.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/failmemalloc.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/failob1.d34
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/failob2.d67
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/failoffset.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fix17349.d36
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fix17635.d23
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fix17751.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fix18575.d41
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fix19018.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fix19059.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fix19246.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fix5212.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fob1.d63
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fob2.d178
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/foreach.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/foreach2.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/gag4269f.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/goto1.d26
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/goto2.d143
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/goto3.d37
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10016.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10076.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10212.d5
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10259.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10341.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10419.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10600.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10616.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10624.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10651.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10713.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10727a.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10727b.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10922.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10938.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice10949.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11086.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11404.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice1144.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11472.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11513a.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11513b.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11518.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11552.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11553.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11755.d30
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11790.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11793.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11822.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11849b.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11850.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11856_0.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11856_1.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11919.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11922.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11925.d45
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice11944.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12040.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12158.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12174.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12235.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12350.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12362.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12534.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12539.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12574.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12727.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12827.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12841.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice12902.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13024.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13027.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13081.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13131.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13220.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13221.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13225.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13311.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13356.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13382.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13385.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13459.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13465a.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13465b.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice1358.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13788.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13816.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13835.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13921.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice13987.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14055.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14096.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14116.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14130.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14146.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14177.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14272.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14424.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14446.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14621.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14642.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14844.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14907.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice14929.d96
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice15092.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice15172.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice15332.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice15441.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice15688.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice15788.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice15816.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice15922.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice16035.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice16657.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice17074.d32
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice17831.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice18469.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice18753.d39
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice18803a.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice18803b.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice19295.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice19755.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice19762.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice19887.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice19950.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice20042.d29
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice20056.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice20057.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice20264.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice20545.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice20709.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice21095.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice22377.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice22516.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice2843.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice4094.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice4983.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice6538.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice7645.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice7782.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice8100.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice8255.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice8309.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice8711.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice8795.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice9273a.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice9273b.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice9284.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice9338.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice9439.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice9494.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice9545.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice9759.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice9806.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ice9865.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/impconv.d40
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imphint.d90
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/a14407.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/a17625.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/a18243.d5
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/b17625.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/b17918a.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/b19762.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/c19762.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/constraints.d73
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/deprecatedImporta.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/deprecatedImportb.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/diag20518a.d0
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/diag20518a/b.d0
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/diag9210stdcomplex.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/fail20164.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/fail20637b.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/fail20638b.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/fail21275a.d34
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/i20057.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/imp17602.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/imp18554.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/imp18979.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/imp19661.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/imp20709.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/imp21832.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/imp22329.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/import21508.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/issue21685.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/test18480a.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/test18480b.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/test18938a/cache.d0
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/test18938a/file.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/test18938b/file.d28
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/test19107a.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/test19107b.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/test20023b.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/test20267.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/imports/test21246.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/issue15103.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/issue20422.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/issue20627.d67
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/issue20704.d39
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/issue21203.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/issue21295.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/issue21378.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/issue21685_main.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/issue21936.d32
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/issue3827.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/lexer1.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/lexer2.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/lexer3.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/lexer4.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/lookup.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/mangle1.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/mangle2.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/misc1.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/misc_parser_err_cov1.d55
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/mixin.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/mixin_gc.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/nestedtempl0.d35
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/nestedtempl1.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/nestedtempl2.d38
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/nestedtempl3.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/no_Throwable.d26
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/no_TypeInfo.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/nogc1.d44
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/nogc2.d35
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/nogc3.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/noreturn.d118
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/noreturn2.d90
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/notype.d31
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/objc_class2.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/objc_class3.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/objc_non_objc_base.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/parse12967a.d32
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/parse12967b.d50
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/parse19277.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/parseStc.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/parseStc2.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/parseStc3.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/parseStc4.d23
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/parseStc5.d31
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/pragmainline.d5
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/pragmas.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/previewin.d42
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/protattr1.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/protattr2.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/protattr3.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/pull12941.d31
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/reserved_version.d212
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/reserved_version_switch.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/retref2.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/retscope.d95
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/retscope2.d51
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/retscope3.d130
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/retscope4.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/retscope5.d26
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/retscope6.d233
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/scope_class.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/scope_type.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/shared.d227
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/skip.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/spell9644.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/staticarrayoverflow.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/staticforeach4.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/switches.d35
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test10.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test1021.d171
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test11006.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test11047.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test11176.d5
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test12228.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test12385.d30
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test12558.d57
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test12822.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test13152.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test13536.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test13537.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test13667.d101
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test13786.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test13867.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test14064.d15
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test14238.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test143.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test14496.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test14538.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15117.d30
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15177.d29
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15191.d42
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15306.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15373.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15399.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15544.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15660.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15672.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15703.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15704.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15785.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15785b.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15897.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15925.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test15989.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test16095.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test16116.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test16193.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test16195.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test16228.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test16284.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test16365.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test16381.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test16523.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test16589.d26
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test16694.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17284.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17380spec.d23
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17422.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17423.d29
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17425.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17450.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17451.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17586.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17868.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17868b.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17892.d32
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17959.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test17977.d20
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18130.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18282.d89
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18385.d31
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18385b.d47
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18480.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18484.d26
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18554.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18597.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18607.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18644.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18708.d64
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18736.d23
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test19097.d56
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test19107.d25
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test19112.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test19176.d26
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test19193.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test19473.d31
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test19646.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test19661.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test19971.d17
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20023.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20096.d28
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20149.d34
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20245.d43
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20267.d31
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20324.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20383.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20515.d18
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20549.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20565.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20569.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20610.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20626.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20696.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20719.d32
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test20998.d120
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21093.d56
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21096.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21198.d24
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21204.d23
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21246.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21259.d52
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21319.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21380.d46
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21518.d38
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21665.d31
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21807.d54
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21912.d54
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test21930.d27
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test22048.d10
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test22227.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test22329.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test22361.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test22574.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test22593.d23
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test314.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test4838.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test4946.d19
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test64.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test8556.d9
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test9150.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test9176.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/testCols.d3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/testInference.d33
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/testOpApply.d161
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test_switch_error.d101
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/testpull1810.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/testscopestatic.d8
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/trait_loc_err.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/traits.d91
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/traits_child.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/traits_initSymbol.d63
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/typeerrors.d31
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/union_initialization.d88
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/vararg2.d23
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/varargsstc.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/verifyhookexist.d45
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/warn13679.d5
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/warn7444.d3
-rw-r--r--gcc/testsuite/gdc.test/runnable/A16.d11
-rw-r--r--gcc/testsuite/gdc.test/runnable/Same.d11
-rw-r--r--gcc/testsuite/gdc.test/runnable/a17.d10
-rw-r--r--gcc/testsuite/gdc.test/runnable/a18.d12
-rw-r--r--gcc/testsuite/gdc.test/runnable/a21.d14
-rw-r--r--gcc/testsuite/gdc.test/runnable/aliasassign.d31
-rw-r--r--gcc/testsuite/gdc.test/runnable/aliasthis.d258
-rw-r--r--gcc/testsuite/gdc.test/runnable/arrayop.d96
-rw-r--r--gcc/testsuite/gdc.test/runnable/auto1.d13
-rw-r--r--gcc/testsuite/gdc.test/runnable/b10562.d93
-rw-r--r--gcc/testsuite/gdc.test/runnable/b16360.d50
-rw-r--r--gcc/testsuite/gdc.test/runnable/b18034.d28
-rw-r--r--gcc/testsuite/gdc.test/runnable/b19294.d163
-rw-r--r--gcc/testsuite/gdc.test/runnable/b19584.d13
-rw-r--r--gcc/testsuite/gdc.test/runnable/b20470.d97
-rw-r--r--gcc/testsuite/gdc.test/runnable/b20890.d48
-rw-r--r--gcc/testsuite/gdc.test/runnable/b26.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/b6400.d69
-rw-r--r--gcc/testsuite/gdc.test/runnable/bench1.d14
-rw-r--r--gcc/testsuite/gdc.test/runnable/betterc.d202
-rw-r--r--gcc/testsuite/gdc.test/runnable/bettercUnittest.d38
-rw-r--r--gcc/testsuite/gdc.test/runnable/bitops.d58
-rw-r--r--gcc/testsuite/gdc.test/runnable/bug11155.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/bug19652.d22
-rw-r--r--gcc/testsuite/gdc.test/runnable/bug7068.d3
-rw-r--r--gcc/testsuite/gdc.test/runnable/builtin.d39
-rw-r--r--gcc/testsuite/gdc.test/runnable/cassert.d17
-rw-r--r--gcc/testsuite/gdc.test/runnable/casting.d53
-rw-r--r--gcc/testsuite/gdc.test/runnable/circular.d25
-rw-r--r--gcc/testsuite/gdc.test/runnable/closure.d12
-rw-r--r--gcc/testsuite/gdc.test/runnable/complex.d1180
-rw-r--r--gcc/testsuite/gdc.test/runnable/constfold.d96
-rw-r--r--gcc/testsuite/gdc.test/runnable/cppdtor.d143
-rw-r--r--gcc/testsuite/gdc.test/runnable/ctorpowtests.d72
-rw-r--r--gcc/testsuite/gdc.test/runnable/declaration.d28
-rw-r--r--gcc/testsuite/gdc.test/runnable/delegate.d45
-rw-r--r--gcc/testsuite/gdc.test/runnable/dhry.d947
-rw-r--r--gcc/testsuite/gdc.test/runnable/eh.d188
-rw-r--r--gcc/testsuite/gdc.test/runnable/entity1.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/evalorder.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/extra-files/lib13742a.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/extra-files/lib13742b.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/extra-files/minimal/object.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/extra-files/moreBettercUnittests.d11
-rw-r--r--gcc/testsuite/gdc.test/runnable/extra-files/test13742.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/extra-files/teststdio.txt6
-rw-r--r--gcc/testsuite/gdc.test/runnable/fix20466.d40
-rw-r--r--gcc/testsuite/gdc.test/runnable/fix22115.d70
-rw-r--r--gcc/testsuite/gdc.test/runnable/fix22372.d38
-rw-r--r--gcc/testsuite/gdc.test/runnable/foreach.d31
-rw-r--r--gcc/testsuite/gdc.test/runnable/foreach2.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/foreach3.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/foreach4.d45
-rw-r--r--gcc/testsuite/gdc.test/runnable/foreach5.d128
-rw-r--r--gcc/testsuite/gdc.test/runnable/funclit.d95
-rw-r--r--gcc/testsuite/gdc.test/runnable/functype.d12
-rw-r--r--gcc/testsuite/gdc.test/runnable/hello.d4
-rw-r--r--gcc/testsuite/gdc.test/runnable/helloUTF8.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/ice15030.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/ice21696.d23
-rw-r--r--gcc/testsuite/gdc.test/runnable/ice21727.d46
-rw-r--r--gcc/testsuite/gdc.test/runnable/ifti.d53
-rw-r--r--gcc/testsuite/gdc.test/runnable/implicit.d35
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/A16a.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/Other.d11
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/a12037.d37
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/a21a.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/another_module_with_tests.d4
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/depsprot_default.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/depsprot_private.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/depsprot_public.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/module_with_tests.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/pubprivtmpla.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/std11file.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/std15017variant.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/template_ovs1.d9
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/template_ovs2.d9
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/template_ovs3.d5
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test11931a.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test11931d.d19
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test13a.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test15777a.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test15777b.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test17181a.d10
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test17181b.d3
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test17181c.d7
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test18868_a.d3
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test18868_fls.d33
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test19655b.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test19655c.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test19655d.d14
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test19655e.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test19655f.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test19655g.d3
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test24a.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test24b.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test24c.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test27a.d13
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test39a.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test40a.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test45a.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test45b.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/test49a.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/imports/testmod2a.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/inclusive_incontracts.d80
-rw-r--r--gcc/testsuite/gdc.test/runnable/inline.d71
-rw-r--r--gcc/testsuite/gdc.test/runnable/inner.d20
-rw-r--r--gcc/testsuite/gdc.test/runnable/interface.d9
-rw-r--r--gcc/testsuite/gdc.test/runnable/interface2.d28
-rw-r--r--gcc/testsuite/gdc.test/runnable/interface3.d10
-rw-r--r--gcc/testsuite/gdc.test/runnable/interpret.d231
-rw-r--r--gcc/testsuite/gdc.test/runnable/interpret2.d16
-rw-r--r--gcc/testsuite/gdc.test/runnable/issue16995.d42
-rw-r--r--gcc/testsuite/gdc.test/runnable/issue8671.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/lazy.d22
-rw-r--r--gcc/testsuite/gdc.test/runnable/lexer.d4
-rw-r--r--gcc/testsuite/gdc.test/runnable/link11069a.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/link11127.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/link12037.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/link12144.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/link13043.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/link13350.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/link13415.d14
-rw-r--r--gcc/testsuite/gdc.test/runnable/link14074a.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/link14074b.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/link14541.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/link14992.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/link15017.d7
-rw-r--r--gcc/testsuite/gdc.test/runnable/link6574.d12
-rw-r--r--gcc/testsuite/gdc.test/runnable/link7745.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/literal.d27
-rw-r--r--gcc/testsuite/gdc.test/runnable/loopunroll.d21
-rw-r--r--gcc/testsuite/gdc.test/runnable/m1.d12
-rw-r--r--gcc/testsuite/gdc.test/runnable/manboy.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/mangle.d48
-rw-r--r--gcc/testsuite/gdc.test/runnable/mars1.d1836
-rw-r--r--gcc/testsuite/gdc.test/runnable/minimal.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/minimal2.d46
-rw-r--r--gcc/testsuite/gdc.test/runnable/mixin1.d98
-rw-r--r--gcc/testsuite/gdc.test/runnable/mixin2.d30
-rw-r--r--gcc/testsuite/gdc.test/runnable/mod1.d10
-rw-r--r--gcc/testsuite/gdc.test/runnable/nan.d42
-rw-r--r--gcc/testsuite/gdc.test/runnable/nested.d121
-rw-r--r--gcc/testsuite/gdc.test/runnable/newdel.d70
-rw-r--r--gcc/testsuite/gdc.test/runnable/nogc.d12
-rw-r--r--gcc/testsuite/gdc.test/runnable/noreturn1.d47
-rw-r--r--gcc/testsuite/gdc.test/runnable/noreturn2.d220
-rw-r--r--gcc/testsuite/gdc.test/runnable/nulltype.d12
-rw-r--r--gcc/testsuite/gdc.test/runnable/opdisp.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/opover.d78
-rw-r--r--gcc/testsuite/gdc.test/runnable/opover2.d137
-rw-r--r--gcc/testsuite/gdc.test/runnable/opover3.d4
-rw-r--r--gcc/testsuite/gdc.test/runnable/overload.d101
-rw-r--r--gcc/testsuite/gdc.test/runnable/previewin.d189
-rw-r--r--gcc/testsuite/gdc.test/runnable/printargs.d4
-rw-r--r--gcc/testsuite/gdc.test/runnable/property.d4
-rw-r--r--gcc/testsuite/gdc.test/runnable/property2.d67
-rw-r--r--gcc/testsuite/gdc.test/runnable/pubprivtmpl.d20
-rw-r--r--gcc/testsuite/gdc.test/runnable/runnable.exp2
-rw-r--r--gcc/testsuite/gdc.test/runnable/s2ir.d19
-rw-r--r--gcc/testsuite/gdc.test/runnable/sctor.d88
-rw-r--r--gcc/testsuite/gdc.test/runnable/sctor2.d20
-rw-r--r--gcc/testsuite/gdc.test/runnable/sdtor.d480
-rw-r--r--gcc/testsuite/gdc.test/runnable/sroa13220.d103
-rw-r--r--gcc/testsuite/gdc.test/runnable/statictor.d23
-rw-r--r--gcc/testsuite/gdc.test/runnable/stress.d194
-rw-r--r--gcc/testsuite/gdc.test/runnable/structlit.d86
-rw-r--r--gcc/testsuite/gdc.test/runnable/template1.d34
-rw-r--r--gcc/testsuite/gdc.test/runnable/template13478.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/template2.d42
-rw-r--r--gcc/testsuite/gdc.test/runnable/template4.d64
-rw-r--r--gcc/testsuite/gdc.test/runnable/template9.d528
-rw-r--r--gcc/testsuite/gdc.test/runnable/test10.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/test10378.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test10619.d38
-rw-r--r--gcc/testsuite/gdc.test/runnable/test10736.d11
-rw-r--r--gcc/testsuite/gdc.test/runnable/test10942.d16
-rw-r--r--gcc/testsuite/gdc.test/runnable/test11.d20
-rw-r--r--gcc/testsuite/gdc.test/runnable/test11447c.d3
-rw-r--r--gcc/testsuite/gdc.test/runnable/test11863.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test11934.d22
-rw-r--r--gcc/testsuite/gdc.test/runnable/test12.d72
-rw-r--r--gcc/testsuite/gdc.test/runnable/test12486.d18
-rw-r--r--gcc/testsuite/gdc.test/runnable/test14874.d76
-rw-r--r--gcc/testsuite/gdc.test/runnable/test15.d136
-rw-r--r--gcc/testsuite/gdc.test/runnable/test15079.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/test15373.d15
-rw-r--r--gcc/testsuite/gdc.test/runnable/test15568.d58
-rw-r--r--gcc/testsuite/gdc.test/runnable/test15862.d39
-rw-r--r--gcc/testsuite/gdc.test/runnable/test16047.d17
-rw-r--r--gcc/testsuite/gdc.test/runnable/test16115.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test16140.d32
-rw-r--r--gcc/testsuite/gdc.test/runnable/test16555.d20
-rw-r--r--gcc/testsuite/gdc.test/runnable/test16579.d57
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17072.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17073.d13
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17181.d12
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17181b.d16
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17246.d50
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17258.d33
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17337.d23
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17338.d34
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17373.d20
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17559.d84
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17684.d17
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17868.d45
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17868b.d52
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17885.d11
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17940.d46
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17943.d9
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17965.d29
-rw-r--r--gcc/testsuite/gdc.test/runnable/test18054.d41
-rw-r--r--gcc/testsuite/gdc.test/runnable/test18296.d24
-rw-r--r--gcc/testsuite/gdc.test/runnable/test18534.d18
-rw-r--r--gcc/testsuite/gdc.test/runnable/test18545.d63
-rw-r--r--gcc/testsuite/gdc.test/runnable/test18746.d16
-rw-r--r--gcc/testsuite/gdc.test/runnable/test18868.d9
-rw-r--r--gcc/testsuite/gdc.test/runnable/test18868_2.d13
-rw-r--r--gcc/testsuite/gdc.test/runnable/test18868_3.d16
-rw-r--r--gcc/testsuite/gdc.test/runnable/test18880.d20
-rw-r--r--gcc/testsuite/gdc.test/runnable/test18916.d22
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19.d18
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19086.d64
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19122.d46
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19185.d22
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19192.d18
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19223.d38
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19251.d20
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19317.d32
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19386.d36
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19393.d37
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19441.d24
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19476.d18
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19639.d22
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19655a.d10
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19672.d21
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19679.d21
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19688.d13
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19729.d61
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19734.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19774.d43
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19782.d23
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19822.d29
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19825.d42
-rw-r--r--gcc/testsuite/gdc.test/runnable/test19891.d13
-rw-r--r--gcc/testsuite/gdc.test/runnable/test20.d109
-rw-r--r--gcc/testsuite/gdc.test/runnable/test20025.d21
-rw-r--r--gcc/testsuite/gdc.test/runnable/test20036.d10
-rw-r--r--gcc/testsuite/gdc.test/runnable/test20130.d44
-rw-r--r--gcc/testsuite/gdc.test/runnable/test20401.d20
-rw-r--r--gcc/testsuite/gdc.test/runnable/test20565.d18
-rw-r--r--gcc/testsuite/gdc.test/runnable/test20649.d15
-rw-r--r--gcc/testsuite/gdc.test/runnable/test20855.d27
-rw-r--r--gcc/testsuite/gdc.test/runnable/test20893.d21
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21039.d27
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21040.d61
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21120.d27
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21357.d35
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21367.d47
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21403.d72
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21424.d12
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21479.d28
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21515.d81
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21586.d31
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21822.d18
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21833.d30
-rw-r--r--gcc/testsuite/gdc.test/runnable/test22.d359
-rw-r--r--gcc/testsuite/gdc.test/runnable/test22205.d17
-rw-r--r--gcc/testsuite/gdc.test/runnable/test22209.d21
-rw-r--r--gcc/testsuite/gdc.test/runnable/test22227.d16
-rw-r--r--gcc/testsuite/gdc.test/runnable/test22278.d24
-rw-r--r--gcc/testsuite/gdc.test/runnable/test23.d177
-rw-r--r--gcc/testsuite/gdc.test/runnable/test24.d4
-rw-r--r--gcc/testsuite/gdc.test/runnable/test27.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/test28.d159
-rw-r--r--gcc/testsuite/gdc.test/runnable/test29.d13
-rw-r--r--gcc/testsuite/gdc.test/runnable/test3.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test30.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test34.d226
-rw-r--r--gcc/testsuite/gdc.test/runnable/test3449.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/test3574a.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test3574b.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test3574c.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test3574d.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test37.d9
-rw-r--r--gcc/testsuite/gdc.test/runnable/test38.d14
-rw-r--r--gcc/testsuite/gdc.test/runnable/test4.d166
-rw-r--r--gcc/testsuite/gdc.test/runnable/test40.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test42.d352
-rw-r--r--gcc/testsuite/gdc.test/runnable/test42a.d9
-rw-r--r--gcc/testsuite/gdc.test/runnable/test435.d14
-rw-r--r--gcc/testsuite/gdc.test/runnable/test45.d16
-rw-r--r--gcc/testsuite/gdc.test/runnable/test48.d14
-rw-r--r--gcc/testsuite/gdc.test/runnable/test49.d14
-rw-r--r--gcc/testsuite/gdc.test/runnable/test5.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/test52.d45
-rw-r--r--gcc/testsuite/gdc.test/runnable/test5305.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/test60.d23
-rw-r--r--gcc/testsuite/gdc.test/runnable/test61.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test6795.d26
-rw-r--r--gcc/testsuite/gdc.test/runnable/test711.d51
-rw-r--r--gcc/testsuite/gdc.test/runnable/test7452.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/test7511.d18
-rw-r--r--gcc/testsuite/gdc.test/runnable/test7932.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/test8.d115
-rw-r--r--gcc/testsuite/gdc.test/runnable/test809.d13
-rw-r--r--gcc/testsuite/gdc.test/runnable/test8544.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/test9259.d3
-rw-r--r--gcc/testsuite/gdc.test/runnable/test9271.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/testCopyCtor.d159
-rw-r--r--gcc/testsuite/gdc.test/runnable/testOpApply.d171
-rw-r--r--gcc/testsuite/gdc.test/runnable/test_dip1006.d38
-rw-r--r--gcc/testsuite/gdc.test/runnable/test_dip1006b.d35
-rw-r--r--gcc/testsuite/gdc.test/runnable/testaa.d91
-rw-r--r--gcc/testsuite/gdc.test/runnable/testaa2.d32
-rw-r--r--gcc/testsuite/gdc.test/runnable/testaa3.d7
-rw-r--r--gcc/testsuite/gdc.test/runnable/testabi.d926
-rw-r--r--gcc/testsuite/gdc.test/runnable/testaliascast.d63
-rw-r--r--gcc/testsuite/gdc.test/runnable/testappend.d16
-rw-r--r--gcc/testsuite/gdc.test/runnable/testarray.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/testassert.d380
-rw-r--r--gcc/testsuite/gdc.test/runnable/testassert_debug.d26
-rw-r--r--gcc/testsuite/gdc.test/runnable/testassign.d73
-rw-r--r--gcc/testsuite/gdc.test/runnable/testbitarray.d17
-rw-r--r--gcc/testsuite/gdc.test/runnable/testbounds.d123
-rw-r--r--gcc/testsuite/gdc.test/runnable/testbtst.d156
-rw-r--r--gcc/testsuite/gdc.test/runnable/testcgelem.d47
-rw-r--r--gcc/testsuite/gdc.test/runnable/testclass.d54
-rw-r--r--gcc/testsuite/gdc.test/runnable/testconst.d150
-rw-r--r--gcc/testsuite/gdc.test/runnable/testcontracts.d198
-rw-r--r--gcc/testsuite/gdc.test/runnable/testdefault_after_variadic.d98
-rw-r--r--gcc/testsuite/gdc.test/runnable/testdstress.d58
-rw-r--r--gcc/testsuite/gdc.test/runnable/testdt.d18
-rw-r--r--gcc/testsuite/gdc.test/runnable/testenum.d26
-rw-r--r--gcc/testsuite/gdc.test/runnable/testfile.d25
-rw-r--r--gcc/testsuite/gdc.test/runnable/testfloat.d239
-rw-r--r--gcc/testsuite/gdc.test/runnable/testformat.d126
-rw-r--r--gcc/testsuite/gdc.test/runnable/testgc2.d22
-rw-r--r--gcc/testsuite/gdc.test/runnable/testgc3.d11
-rw-r--r--gcc/testsuite/gdc.test/runnable/testinvariant.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/testkeyword.d4
-rw-r--r--gcc/testsuite/gdc.test/runnable/testline.d5
-rw-r--r--gcc/testsuite/gdc.test/runnable/testmain.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable/testmainb.d15
-rw-r--r--gcc/testsuite/gdc.test/runnable/testminit.d13
-rw-r--r--gcc/testsuite/gdc.test/runnable/testmmfile.d120
-rw-r--r--gcc/testsuite/gdc.test/runnable/testmod2.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/testpic.d19
-rw-r--r--gcc/testsuite/gdc.test/runnable/testptrref.d29
-rw-r--r--gcc/testsuite/gdc.test/runnable/testptrref_gc.d3
-rw-r--r--gcc/testsuite/gdc.test/runnable/testreturn.d14
-rw-r--r--gcc/testsuite/gdc.test/runnable/testrightthis.d16
-rw-r--r--gcc/testsuite/gdc.test/runnable/testsafe.d30
-rw-r--r--gcc/testsuite/gdc.test/runnable/testscope.d55
-rw-r--r--gcc/testsuite/gdc.test/runnable/testscope2.d8
-rw-r--r--gcc/testsuite/gdc.test/runnable/testsignals.d114
-rw-r--r--gcc/testsuite/gdc.test/runnable/testsocket.d51
-rw-r--r--gcc/testsuite/gdc.test/runnable/teststdio.d34
-rw-r--r--gcc/testsuite/gdc.test/runnable/testswitch.d48
-rw-r--r--gcc/testsuite/gdc.test/runnable/testthread.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/testthread2.d39
-rw-r--r--gcc/testsuite/gdc.test/runnable/testtypeid.d102
-rw-r--r--gcc/testsuite/gdc.test/runnable/traits.d254
-rw-r--r--gcc/testsuite/gdc.test/runnable/traits_child.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/traits_getPointerBitmap.d7
-rw-r--r--gcc/testsuite/gdc.test/runnable/traits_getUnitTests.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/traits_initSymbol.d119
-rw-r--r--gcc/testsuite/gdc.test/runnable/tuple_default_parameters.d64
-rw-r--r--gcc/testsuite/gdc.test/runnable/uda.d76
-rw-r--r--gcc/testsuite/gdc.test/runnable/ufcs.d128
-rw-r--r--gcc/testsuite/gdc.test/runnable/uniformctor.d22
-rw-r--r--gcc/testsuite/gdc.test/runnable/unique_typeinfo_names.d93
-rw-r--r--gcc/testsuite/gdc.test/runnable/variadic.d38
-rw-r--r--gcc/testsuite/gdc.test/runnable/version.d12
-rw-r--r--gcc/testsuite/gdc.test/runnable/warning1.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/wc.d4
-rw-r--r--gcc/testsuite/gdc.test/runnable/wc2.d6
-rw-r--r--gcc/testsuite/gdc.test/runnable/whetstone.d231
-rw-r--r--gcc/testsuite/gdc.test/runnable/xdtor.d26
-rw-r--r--gcc/testsuite/gdc.test/runnable/xpostblit.d59
-rw-r--r--gcc/testsuite/gdc.test/runnable/xtest46.d647
-rw-r--r--gcc/testsuite/gdc.test/runnable/xtest46_gc.d37
-rw-r--r--gcc/testsuite/gdc.test/runnable/xtest47.d67
-rw-r--r--gcc/testsuite/gdc.test/runnable/xtest55.d7
-rw-r--r--gcc/testsuite/gdc.test/runnable/xtestenum.d11
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/abi_tags.d139
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/cpp11.d70
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/cpp_abi_tests.d116
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/cpp_stdlib.d58
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/cppa.d530
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/externmangle.d57
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/externmangle2.d216
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/abi_tags.cpp146
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/c14203.cpp2
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp11.cpp35
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp19179.cpp15
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp22287.cpp337
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp7925.cpp103
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp_abi_tests.cpp103
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp_stdlib.cpp47
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.cpp295
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.h83
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/externmangle.cpp59
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/stdint.cpp8
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/test20652.cpp34
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/test21515.cpp18
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/extra-files/test6716.cpp13
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/runnable_cxx.exp2
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/stdint.d24
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/test14203.d22
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/test19179.d32
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/test20652.d23
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/test21515.d1
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/test22287.d327
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/test6716.d20
-rw-r--r--gcc/testsuite/gdc.test/runnable_cxx/test7925.d151
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_with_mold_4.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_with_source_26.f908
-rw-r--r--gcc/testsuite/gfortran.dg/altreturn_11.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/analyzer/analyzer.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/argument_checking_26.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_54.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_55.f9055
-rw-r--r--gcc/testsuite/gfortran.dg/asan/asan.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/bessel_3.f904
-rw-r--r--gcc/testsuite/gfortran.dg/bound_simplification_7.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/c-interop.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/c407b-2.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/c535b-2.f9056
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/pr103287-1.f909
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/pr103287-2.f909
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/pr103390-1.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/pr103390-2.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/pr103390-3.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/pr103390-4.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/pr103390-5.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/pr103390-6.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/pr103390-7.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/pr103390-8.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/c-interop/pr103390-9.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/c_char_tests_3.f9051
-rw-r--r--gcc/testsuite/gfortran.dg/c_char_tests_3_c.c16
-rw-r--r--gcc/testsuite/gfortran.dg/c_char_tests_4.f9090
-rw-r--r--gcc/testsuite/gfortran.dg/c_char_tests_5.f9049
-rw-r--r--gcc/testsuite/gfortran.dg/co_reduce_2.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/coarray/caf.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_49.f909
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_collectives_14.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_collectives_16.f906
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_collectives_18.f9037
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_collectives_9.f906
-rw-r--r--gcc/testsuite/gfortran.dg/date_and_time_1.f9035
-rw-r--r--gcc/testsuite/gfortran.dg/debug/debug.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/dec_math_5.f90104
-rw-r--r--gcc/testsuite/gfortran.dg/dg.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/diagnostic-format-json-1.F901
-rw-r--r--gcc/testsuite/gfortran.dg/diagnostic-format-json-2.F901
-rw-r--r--gcc/testsuite/gfortran.dg/diagnostic-format-json-3.F901
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_18.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_19.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/do_subscript_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/eoshift_9.f908
-rw-r--r--gcc/testsuite/gfortran.dg/external_implicit_none_3.f0817
-rw-r--r--gcc/testsuite/gfortran.dg/extract_recip_1.f2
-rw-r--r--gcc/testsuite/gfortran.dg/g77/README2
-rw-r--r--gcc/testsuite/gfortran.dg/goacc-gomp/goacc-gomp.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/array-with-dt-1.f905
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/array-with-dt-2.f905
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/array-with-dt-3.f908
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/array-with-dt-4.f905
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/array-with-dt-5.f904
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/classify-kernels-parloops.f9543
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized-parloops.f9547
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized.f955
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/classify-kernels.f955
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/derived-chartypes-1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/derived-chartypes-2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/derived-chartypes-3.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/derived-chartypes-4.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/derived-classtypes-1.f952
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/derived-types-2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/finalize-1.f8
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/goacc.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/host_data-tree.f954
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f9529
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f9568
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/kernels-tree.f954
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/modules.f954
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-kernels.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-parallel.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-routine.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-kernels.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-parallel.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-routine.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/orphan-reductions-1.f90210
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/orphan-reductions-2.f9093
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/orphan-reductions-3.f9089
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/parallel-tree.f9510
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/pr93464.f909
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/privatization-1-compute-loop.f904
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/privatization-1-routine_gang-loop.f904
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/privatization-1-routine_gang.f903
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/uninit-dim-clause.f956
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/uninit-firstprivate-clause.f951
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/uninit-if-clause.f954
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/uninit-use-device-clause.f951
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/wait.f904
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/affinity-clause-1.f906
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/affinity-clause-3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/affinity-clause-5.f904
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/allocate-1.f90137
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/allocate-2.f9045
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/allocate-3.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-10.f9032
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-12.f90364
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-15.f9044
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-16.f9036
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-17.f9041
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-18.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-19.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-2.f9042
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-20.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-21.f9093
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-22.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-24.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-25.f9053
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-26.f9099
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-27.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic-28.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/atomic.f9040
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/clauses-1.f90667
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/collapse1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/defaultmap-4.f9044
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/defaultmap-5.f9030
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/defaultmap-6.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/gomp.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/map-3.f904
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/nowait-2.f90315
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/nowait-3.f90118
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/num-teams-1.f9053
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/num-teams-2.f9037
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/openmp-simd-4.f906
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/order-6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr102431.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr102621.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr103643.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr103695.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr78260-2.f908
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr78260-3.f904
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/requires-8.f902
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/target-has-device-addr-1.f9036
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/target-has-device-addr-2.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/teams-3.f9065
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/teams-4.f9047
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/unexpected-end.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/graphite.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/ieee/ieee.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/ieee/ieee_10.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/ieee/ieee_9.f9090
-rw-r--r--gcc/testsuite/gfortran.dg/ieee/signaling_1.f9092
-rw-r--r--gcc/testsuite/gfortran.dg/ieee/signaling_1_c.c14
-rw-r--r--gcc/testsuite/gfortran.dg/ieee/signaling_2.f9074
-rw-r--r--gcc/testsuite/gfortran.dg/ieee/signaling_2_c.c8
-rw-r--r--gcc/testsuite/gfortran.dg/ieee/signaling_3.f9043
-rw-r--r--gcc/testsuite/gfortran.dg/illegal_boz_arg_2.f906
-rw-r--r--gcc/testsuite/gfortran.dg/illegal_boz_arg_3.f907
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_14.f902
-rw-r--r--gcc/testsuite/gfortran.dg/index_5.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/inline_matmul_17.f902
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_pack_6.f9057
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_short-long.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/iostat_5.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/len_trim.f9033
-rw-r--r--gcc/testsuite/gfortran.dg/lto/lto.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/maskl_1.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/masklr_3.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/maskr_1.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/minmaxloc_15.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/move_alloc_8.f904
-rw-r--r--gcc/testsuite/gfortran.dg/overload_4.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_intent_9.f9033
-rw-r--r--gcc/testsuite/gfortran.dg/pr101329.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/pr101762.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/pr102332.f9069
-rw-r--r--gcc/testsuite/gfortran.dg/pr102520.f906
-rw-r--r--gcc/testsuite/gfortran.dg/pr102715.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/pr102817.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/pr102860.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/pr103258.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/pr103286.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/pr103366.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/pr103505.f909
-rw-r--r--gcc/testsuite/gfortran.dg/pr103588.f908
-rw-r--r--gcc/testsuite/gfortran.dg/pr103606.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/pr103607.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/pr103609.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/pr103691.f909
-rw-r--r--gcc/testsuite/gfortran.dg/pr103692.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/pr103898.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/pr104466.f90116
-rw-r--r--gcc/testsuite/gfortran.dg/pr24823.f4
-rw-r--r--gcc/testsuite/gfortran.dg/pr39937.f2
-rw-r--r--gcc/testsuite/gfortran.dg/pr41011.f4
-rw-r--r--gcc/testsuite/gfortran.dg/pr47614.f1
-rw-r--r--gcc/testsuite/gfortran.dg/pr53787.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr61318.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr67804.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/pr68019.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr68153.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr69419.f909
-rw-r--r--gcc/testsuite/gfortran.dg/pr84784.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/pr91497.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/pr91497_2.f90124
-rw-r--r--gcc/testsuite/gfortran.dg/pr93604.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr98076.f90293
-rw-r--r--gcc/testsuite/gfortran.dg/pr99853.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/prof/prof.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/reshape_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/reshape_9.f9031
-rw-r--r--gcc/testsuite/gfortran.dg/scan_3.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/select_10.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/select_9.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/shape_11.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_char_kind4.f90115
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_check_6.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_simplify_11.f902
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_simplify_13.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_simplify_14.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_simplify_15.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/ubsan/ubsan.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/vect/vect-8.f903
-rw-r--r--gcc/testsuite/gfortran.dg/vect/vect.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/verify_3.f9014
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/compile/compile.exp2
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/execute.exp2
-rw-r--r--gcc/testsuite/gnat.dg/aggr26.adb2
-rw-r--r--gcc/testsuite/gnat.dg/dg.exp2
-rw-r--r--gcc/testsuite/gnat.dg/div_zero.adb24
-rw-r--r--gcc/testsuite/gnat.dg/gcov/gcov.exp2
-rw-r--r--gcc/testsuite/gnat.dg/generic_comp.adb39
-rw-r--r--gcc/testsuite/gnat.dg/lto25.adb14
-rw-r--r--gcc/testsuite/gnat.dg/opt96.adb14
-rw-r--r--gcc/testsuite/gnat.dg/opt96_pkg.adb16
-rw-r--r--gcc/testsuite/gnat.dg/opt96_pkg.ads32
-rw-r--r--gcc/testsuite/gnat.dg/opt97.adb25
-rw-r--r--gcc/testsuite/gnat.dg/specs/specs.exp2
-rw-r--r--gcc/testsuite/gnat.dg/sso/sso.exp2
-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.exp2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue14652.go5
-rw-r--r--gcc/testsuite/jit.dg/all-non-failing-tests.h56
-rw-r--r--gcc/testsuite/jit.dg/jit.exp33
-rw-r--r--gcc/testsuite/jit.dg/test-builtin-types.c43
-rw-r--r--gcc/testsuite/jit.dg/test-error-bad-assignment.c78
-rw-r--r--gcc/testsuite/jit.dg/test-error-ctor-array-wrong-obj.c54
-rw-r--r--gcc/testsuite/jit.dg/test-error-ctor-struct-too-big.c71
-rw-r--r--gcc/testsuite/jit.dg/test-error-ctor-struct-wrong-field-obj.c86
-rw-r--r--gcc/testsuite/jit.dg/test-error-ctor-struct-wrong-type.c76
-rw-r--r--gcc/testsuite/jit.dg/test-error-ctor-struct-wrong-type2.c77
-rw-r--r--gcc/testsuite/jit.dg/test-error-ctor-union-wrong-field-name.c76
-rw-r--r--gcc/testsuite/jit.dg/test-error-global-already-init.c46
-rw-r--r--gcc/testsuite/jit.dg/test-error-global-common-section.c54
-rw-r--r--gcc/testsuite/jit.dg/test-error-global-init-too-small-array.c65
-rw-r--r--gcc/testsuite/jit.dg/test-error-global-lvalue-init.c60
-rw-r--r--gcc/testsuite/jit.dg/test-error-global-nonconst-init.c80
-rw-r--r--gcc/testsuite/jit.dg/test-fuzzer.c8
-rw-r--r--gcc/testsuite/jit.dg/test-global-init-rvalue.c1643
-rw-r--r--gcc/testsuite/jit.dg/test-link-section-assembler.c37
-rw-r--r--gcc/testsuite/jit.dg/test-local-init-rvalue.c707
-rw-r--r--gcc/testsuite/jit.dg/test-pr103562.c62
-rw-r--r--gcc/testsuite/jit.dg/test-reflection.c95
-rw-r--r--gcc/testsuite/jit.dg/test-sum-of-squares.c10
-rw-r--r--gcc/testsuite/jit.dg/test-tls.c64
-rw-r--r--gcc/testsuite/lib/asan-dg.exp2
-rw-r--r--gcc/testsuite/lib/atomic-dg.exp2
-rw-r--r--gcc/testsuite/lib/c-compat.exp2
-rw-r--r--gcc/testsuite/lib/c-torture.exp2
-rw-r--r--gcc/testsuite/lib/clearcap.exp2
-rw-r--r--gcc/testsuite/lib/compat.exp2
-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.exp2
-rw-r--r--gcc/testsuite/lib/file-format.exp2
-rw-r--r--gcc/testsuite/lib/fortran-modules.exp2
-rw-r--r--gcc/testsuite/lib/fortran-torture.exp10
-rw-r--r--gcc/testsuite/lib/g++-dg.exp7
-rw-r--r--gcc/testsuite/lib/g++.exp2
-rw-r--r--gcc/testsuite/lib/gcc-defs.exp6
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp22
-rw-r--r--gcc/testsuite/lib/gcc-gdb-test.exp2
-rw-r--r--gcc/testsuite/lib/gcc-simulate-thread.exp2
-rw-r--r--gcc/testsuite/lib/gcc.exp2
-rw-r--r--gcc/testsuite/lib/gcov.exp14
-rw-r--r--gcc/testsuite/lib/gdc-dg.exp2
-rw-r--r--gcc/testsuite/lib/gdc-utils.exp83
-rw-r--r--gcc/testsuite/lib/gdc.exp2
-rw-r--r--gcc/testsuite/lib/gfortran-dg.exp2
-rw-r--r--gcc/testsuite/lib/gfortran.exp2
-rw-r--r--gcc/testsuite/lib/gnat-dg.exp2
-rw-r--r--gcc/testsuite/lib/gnat.exp2
-rw-r--r--gcc/testsuite/lib/go-dg.exp2
-rw-r--r--gcc/testsuite/lib/go-torture.exp10
-rw-r--r--gcc/testsuite/lib/go.exp2
-rw-r--r--gcc/testsuite/lib/hwasan-dg.exp2
-rw-r--r--gcc/testsuite/lib/lto.exp2
-rw-r--r--gcc/testsuite/lib/mike-g++.exp2
-rw-r--r--gcc/testsuite/lib/mike-gcc.exp2
-rw-r--r--gcc/testsuite/lib/multiline.exp4
-rw-r--r--gcc/testsuite/lib/obj-c++-dg.exp2
-rw-r--r--gcc/testsuite/lib/obj-c++.exp2
-rw-r--r--gcc/testsuite/lib/objc-dg.exp2
-rw-r--r--gcc/testsuite/lib/objc-torture.exp2
-rw-r--r--gcc/testsuite/lib/objc.exp2
-rw-r--r--gcc/testsuite/lib/options.exp2
-rw-r--r--gcc/testsuite/lib/plugin-support.exp2
-rw-r--r--gcc/testsuite/lib/profopt.exp2
-rw-r--r--gcc/testsuite/lib/prune.exp9
-rw-r--r--gcc/testsuite/lib/scanasm.exp2
-rw-r--r--gcc/testsuite/lib/scandump.exp2
-rw-r--r--gcc/testsuite/lib/scanipa.exp2
-rw-r--r--gcc/testsuite/lib/scanlang.exp2
-rw-r--r--gcc/testsuite/lib/scanltranstree.exp2
-rw-r--r--gcc/testsuite/lib/scanoffload.exp2
-rw-r--r--gcc/testsuite/lib/scanoffloadrtl.exp2
-rw-r--r--gcc/testsuite/lib/scanoffloadtree.exp2
-rw-r--r--gcc/testsuite/lib/scanrtl.exp2
-rw-r--r--gcc/testsuite/lib/scantree.exp2
-rw-r--r--gcc/testsuite/lib/scanwpaipa.exp2
-rw-r--r--gcc/testsuite/lib/target-libpath.exp2
-rw-r--r--gcc/testsuite/lib/target-supports-dg.exp2
-rw-r--r--gcc/testsuite/lib/target-supports.exp422
-rw-r--r--gcc/testsuite/lib/target-utils.exp2
-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.exp2
-rw-r--r--gcc/testsuite/lib/ubsan-dg.exp2
-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.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/dg.exp2
-rw-r--r--gcc/testsuite/obj-c++.dg/lto/lto.exp2
-rw-r--r--gcc/testsuite/obj-c++.dg/objc-gc-3.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/plugin/plugin.exp2
-rw-r--r--gcc/testsuite/obj-c++.dg/property/property.exp2
-rw-r--r--gcc/testsuite/obj-c++.dg/strings/strings.exp2
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/strings/strings.exp2
-rw-r--r--gcc/testsuite/objc-obj-c++-shared/TestsuiteObject.m2
-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/gnu-encoding/gnu-encoding.exp2
-rw-r--r--gcc/testsuite/objc.dg/lto/lto.exp2
-rw-r--r--gcc/testsuite/objc.dg/objc-gc-4.m2
-rw-r--r--gcc/testsuite/objc.dg/pch/pch.exp2
-rw-r--r--gcc/testsuite/objc.dg/plugin/plugin.exp2
-rw-r--r--gcc/testsuite/objc.dg/pr103639.m101
-rw-r--r--gcc/testsuite/objc.dg/property/property.exp2
-rw-r--r--gcc/testsuite/objc.dg/special/special.exp2
-rw-r--r--gcc/testsuite/objc.dg/strings/strings.exp2
-rw-r--r--gcc/testsuite/objc.dg/torture/strings/strings.exp2
-rw-r--r--gcc/testsuite/objc/compile/compile.exp2
-rw-r--r--gcc/testsuite/objc/execute/exceptions/exceptions.exp2
-rw-r--r--gcc/testsuite/objc/execute/execute.exp2
5127 files changed, 143332 insertions, 31855 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d16e500..4767cd4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,16839 +1,3035 @@
-2021-10-26 Martin Sebor <msebor@redhat.com>
+2022-02-10 Jakub Jelinek <jakub@redhat.com>
- PR tree-optimization/102238
- PR tree-optimization/102919
- * gcc.dg/tree-ssa/builtin-sprintf-warn-23.c: Remove warnings.
- * gcc.dg/Wrestrict-23.c: New test.
+ PR tree-optimization/104373
+ * g++.dg/warn/Wuninitialized-32.C (operator new[]): Use __SIZE_TYPE__
+ as type of the first argument instead of unsigned long.
-2021-10-26 Martin Sebor <msebor@redhat.com>
+2022-02-10 Tobias Burnus <tobias@codesourcery.com>
- * gcc.dg/Wstringop-overflow-22.c: Correct typos.
- * gcc.dg/Wstringop-overflow-81.c: New test.
+ PR c++/102204
+ * g++.dg/gomp/unmappable-1.C: Remove previously expected dg-message.
-2021-10-26 Martin Sebor <msebor@redhat.com>
+2022-02-10 David Malcolm <dmalcolm@redhat.com>
- PR middle-end/102453
- * gcc.dg/Warray-bounds-90.c: New test.
- * gcc.dg/Wstringop-overflow-77.c: New test.
- * gcc.dg/Wstringop-overflow-78.c: New test.
- * gcc.dg/Wstringop-overflow-79.c: New test.
- * gcc.dg/Wstringop-overflow-80.c: New test.
- * c-c++-common/gomp/atomic-4.c: Avoid an out-of-bounds access.
+ PR analyzer/98797
+ * gcc.dg/analyzer/casts-1.c: Mark xfails as fixed; add further
+ test coverage for casts of string literals.
-2021-10-26 Harald Anlauf <anlauf@gmx.de>
+2022-02-10 Qing Zhao <qing.zhao@oracle.com>
- PR fortran/86551
- * gfortran.dg/pr86551.f90: New test to verify that PR86551 remains
- fixed.
+ PR middle-end/100775
+ * gcc.target/arm/pr100775.c: New test.
-2021-10-26 Harald Anlauf <anlauf@gmx.de>
+2022-02-10 Uroš Bizjak <ubizjak@gmail.com>
- PR fortran/102956
- * gfortran.dg/pdt_32.f03: New test.
+ PR target/104469
+ * gcc.target/i386/pr104469.c: New test.
-2021-10-26 Vladimir N. Makarov <vmakarov@redhat.com>
+2022-02-10 H.J. Lu <hjl.tools@gmail.com>
- PR rtl-optimization/102842
- * g++.target/arm/pr102842.C: New test.
+ PR target/104458
+ * gcc.target/i386/pr104458.c: Replace long with long long.
-2021-10-26 Harald Anlauf <anlauf@gmx.de>
+2022-02-10 David Malcolm <dmalcolm@redhat.com>
- PR fortran/102917
- * gfortran.dg/pdt_4.f03: Adjust testcase.
+ PR analyzer/102052
+ * gcc.dg/analyzer/fields.c (size_t): Use __SIZE_TYPE__ rather than
+ hardcoding long unsigned int.
+ * gcc.dg/analyzer/gzio-3.c (size_t): Likewise.
+ * gcc.dg/analyzer/gzio-3a.c (size_t): Likewise.
+ * gcc.dg/analyzer/pr98969.c (test_1): Use __UINTPTR_TYPE__ rather
+ than long int.
+ (test_2): Likewise.
+ * gcc.dg/analyzer/pr99716-2.c (test_mountpoint): Use "rand" rather
+ than "random".
+ * gcc.dg/analyzer/pr99774-1.c (size_t): Use __SIZE_TYPE__ rather
+ than hardcoding long unsigned int.
+ * gcc.dg/analyzer/strndup-1.c: Add MinGW to targets that don't
+ implement strndup.
+ * gcc.dg/analyzer/zlib-5.c (size_t): Use __SIZE_TYPE__ rather
+ than hardcoding long unsigned int.
-2021-10-26 Harald Anlauf <anlauf@gmx.de>
+2022-02-10 Richard Biener <rguenther@suse.de>
- PR fortran/102816
- * gfortran.dg/pr102816.f90: New test.
+ PR tree-optimization/104373
+ * g++.dg/warn/Wuninitialized-32.C: New testcase.
+ * gcc.dg/uninit-pr20644-O0.c: Remove XFAIL.
-2021-10-26 Paul A. Clarke <pc@us.ibm.com>
+2022-02-10 Richard Biener <rguenther@suse.de>
- * gcc.target/powerpc/pr78102.c: Fix dg directives to require Power8
- vector support. Also, add -DNO_WARN_X86_INTRINSICS.
+ PR middle-end/104467
+ * gcc.dg/torture/pr104467.c: New testcase.
-2021-10-26 Marek Polacek <polacek@redhat.com>
+2022-02-10 Richard Biener <rguenther@suse.de>
- PR c++/102617
- * g++.dg/cpp23/init-stmt1.C: New test.
- * g++.dg/cpp23/init-stmt2.C: New test.
+ PR tree-optimization/104466
+ * gfortran.dg/pr104466.f90: New testcase.
-2021-10-26 Sandra Loosemore <sandra@codesourcery.com>
+2022-02-10 Tom de Vries <tdevries@suse.de>
- PR testsuite/102910
- * gfortran.dg/c-interop/cf-descriptor-5-c.c: Use a static buffer
- instead of alloca.
+ * gcc.target/nvptx/atomic-store-2.c: New test.
-2021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+2022-02-10 Tom de Vries <tdevries@suse.de>
- PR testsuite/102834
- * gcc.target/i386/avx512f-pr96891-3.c: Add -mstv -mno-stackrealign
- to dg-options.
+ * gcc.target/nvptx/atomic-store-1.c: New test.
+ * gcc.target/nvptx/atomic-store-3.c: New test.
+ * gcc.target/nvptx/stack-atomics-run.c: Update.
-2021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+2022-02-10 Tobias Burnus <tobias@codesourcery.com>
- PR testsuite/102835
- * gcc.target/i386/avx512fp16-trunchf.c: Allow for %esp instead of
- %ebp.
+ PR fortran/104329
+ * gfortran.dg/gomp/atomic-28.f90: New test.
-2021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+2022-02-10 Roger Sayle <roger@nextmovesoftware.com>
- PR testsuite/102836
- * gcc.target/i386/pieces-memset-1.c: Add -mno-stackrealign to
- dg-options.
- * gcc.target/i386/pieces-memset-4.c: Likewise.
- * gcc.target/i386/pieces-memset-7.c: Likewise.
- * gcc.target/i386/pieces-memset-8.c: Likewise.
- * gcc.target/i386/pieces-memset-41.c: Likewise.
- * gcc.target/i386/pr90773-1.c: Likewise.
-
-2021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
-
- * gcc.target/i386/pr100704-1.c: Add -fomit-frame-pointer to
- dg-options.
- * gcc.target/i386/pr100704-2.c: Likewise.
-
-2021-10-26 Kewen Lin <linkw@linux.ibm.com>
-
- * gcc.dg/pr102897.c: New test.
-
-2021-10-26 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/102885
- * gfortran.dg/lto/bind-c-char_0.f90: New test.
-
-2021-10-26 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.target/i386/sse2-v1ti-shift.c: New test case.
-
-2021-10-26 Aldy Hernandez <aldyh@redhat.com>
-
- PR testsuite/102857
- * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Add -fdump-tree-vrp2-stats.
- Tweak for aarch64.
-
-2021-10-26 Aldy Hernandez <aldyh@redhat.com>
-
- * gcc.dg/tree-ssa/pr21090.c: Adjust for threading.
- * gcc.dg/tree-ssa/ssa-thread-12.c: Removed.
-
-2021-10-26 Aldy Hernandez <aldyh@redhat.com>
-
- * gcc.dg/graphite/scop-dsyr2k-2.c: Adjust for jump threading changes.
- * gcc.dg/graphite/scop-dsyr2k.c: Same.
- * gcc.dg/graphite/scop-dsyrk-2.c: Same.
- * gcc.dg/graphite/scop-dsyrk.c: Same.
- * gcc.dg/tree-ssa/pr20701.c: Same.
- * gcc.dg/tree-ssa/pr20702.c: Same.
- * gcc.dg/tree-ssa/pr21086.c: Same.
- * gcc.dg/tree-ssa/pr25382.c: Same.
- * gcc.dg/tree-ssa/pr58480.c: Same.
- * gcc.dg/tree-ssa/ssa-vrp-thread-1.c: Same.
- * gcc.dg/tree-ssa/vrp08.c: Same.
- * gcc.dg/tree-ssa/vrp55.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Removed.
- * gcc.dg/tree-ssa/ssa-thread-11.c: Removed.
- * gcc.dg/uninit-pr89230-1.c: xfail.
- * gcc.dg/tree-ssa/ssa-thread-backedge.c: New file.
-
-2021-10-25 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/tree-ssa/vrp98.c: Disable evrp for vrp1 test.
- * gcc.dg/tree-ssa/vrp98-1.c: New. Test for folding in evrp.
-
-2021-10-25 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.target/bfin/ssashift-1.c: New test case.
-
-2021-10-25 Tamar Christina <tamar.christina@arm.com>
-
- PR target/102907
- * gcc.target/aarch64/shrn-combine-1.c: Disable SVE.
- * gcc.target/aarch64/shrn-combine-2.c: Likewise.
- * gcc.target/aarch64/shrn-combine-3.c: Likewise.
- * gcc.target/aarch64/shrn-combine-4.c: Likewise.
- * gcc.target/aarch64/shrn-combine-5.c: Likewise.
- * gcc.target/aarch64/shrn-combine-6.c: Likewise.
- * gcc.target/aarch64/shrn-combine-7.c: Likewise.
-
-2021-10-25 Jim Wilson <jimw@sifive.com>
- Kito Cheng <kito.cheng@sifive.com>
- Jia-Wei Chen <jiawei@iscas.ac.cn>
- Shi-Hua Liao <shihua@iscas.ac.cn>
-
- * gcc.target/riscv/zba-slliuw.c: Apply zbs to this testcase.
- * gcc.target/riscv/zbs-bclr.c: New.
- * gcc.target/riscv/zbs-bext.c: Ditto.
- * gcc.target/riscv/zbs-binv.c: Ditto.
- * gcc.target/riscv/zbs-bset.c: Ditto.
-
-2021-10-25 Jim Wilson <jimw@sifive.com>
-
- * gcc.target/riscv/zbb-li-rotr.c: New.
-
-2021-10-25 Jim Wilson <jimw@sifive.com>
- Kito Cheng <kito.cheng@sifive.com>
- Jia-Wei Chen <jiawei@iscas.ac.cn>
-
- * gcc.target/riscv/zbb-andn-orn-xnor-01.c: New.
- * gcc.target/riscv/zbb-andn-orn-xnor-02.c: Ditto.
- * gcc.target/riscv/zbb-min-max.c: Ditto.
- * gcc.target/riscv/zbb-rol-ror-01.c: Ditto.
- * gcc.target/riscv/zbb-rol-ror-02.c: Ditto.
- * gcc.target/riscv/zbb-rol-ror-03.c: Ditto.
- * gcc.target/riscv/zbbw.c: Ditto.
-
-2021-10-25 Jim Wilson <jimw@sifive.com>
- Kito Cheng <kito.cheng@sifive.com>
- Jia-Wei Chen <jiawei@iscas.ac.cn>
-
- * gcc.target/riscv/zba-adduw.c: New.
- * gcc.target/riscv/zba-shNadd-01.c: Ditto.
- * gcc.target/riscv/zba-shNadd-02.c: Ditto.
- * gcc.target/riscv/zba-shNadd-03.c: Ditto.
- * gcc.target/riscv/zba-slliuw.c: Ditto.
- * gcc.target/riscv/zba-zextw.c: Ditto.
-
-2021-10-25 liuhongt <hongtao.liu@intel.com>
-
- PR target/102464
- * gcc.target/i386/pr102464-sqrtph.c: New test.
- * gcc.target/i386/pr102464-sqrtsh.c: New test.
-
-2021-10-25 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102920
- * gcc.dg/torture/pr102920.c: New testcase.
-
-2021-10-25 konglin1 <lingling.kong@intel.com>
-
- * gcc.target/i386/avx512fp16-complex-fma.c: New test.
-
-2021-10-24 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.target/bfin/20090914-3.c: Tweak test case.
-
-2021-10-23 H.J. Lu <hjl.tools@gmail.com>
-
- PR fortran/9262
- * gfortran.dg/bind-c-intent-out-2.f90: Moved to ...
- * gfortran.dg/ubsan/bind-c-intent-out-2.f90
-
-2021-10-23 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.target/i386/sse2-v1ti-logic.c: New test case.
- * gcc.target/i386/sse2-v1ti-logic-2.c: New test case.
-
-2021-10-23 José Rui Faustino de Sousa <jrfsousa@gmail.com>
- Sandra Loosemore <sandra@codesourcery.com>
-
- PR fortran/95196
- * gfortran.dg/PR95196.f90: New.
-
-2021-10-22 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/associate_3.f03: Replace dg-excess-errors by
- other dg-* to change XFAIL to PASS.
- * gfortran.dg/binding_label_tests_4.f03: Likewise.
- * gfortran.dg/block_4.f08: Likewise.
- * gfortran.dg/charlen_04.f90: Likewise.
- * gfortran.dg/charlen_05.f90: Likewise.
- * gfortran.dg/charlen_06.f90: Likewise.
- * gfortran.dg/charlen_13.f90: Likewise.
- * gfortran.dg/coarray_9.f90: Likewise.
- * gfortran.dg/coarray_collectives_3.f90: Likewise.
- * gfortran.dg/data_invalid.f90: Likewise.
- * gfortran.dg/do_4.f: Likewise.
- * gfortran.dg/dollar_sym_1.f90: Likewise.
- * gfortran.dg/dollar_sym_3.f: Likewise.
- * gfortran.dg/fmt_tab_1.f90: Likewise.
- * gfortran.dg/fmt_tab_2.f90: Likewise.
- * gfortran.dg/forall_16.f90: Likewise.
- * gfortran.dg/g77/970125-0.f: Likewise.
- * gfortran.dg/gomp/unexpected-end.f90: Likewise.
- * gfortran.dg/interface_operator_1.f90: Likewise.
- * gfortran.dg/interface_operator_2.f90: Likewise.
- * gfortran.dg/line_length_4.f90: Likewise.
- * gfortran.dg/line_length_5.f90: Likewise.
- * gfortran.dg/line_length_6.f90: Likewise.
- * gfortran.dg/line_length_8.f90: Likewise.
- * gfortran.dg/line_length_9.f90: Likewise.
- * gfortran.dg/pr65045.f90: Likewise.
- * gfortran.dg/pr69497.f90: Likewise.
- * gfortran.dg/submodule_21.f08: Likewise.
- * gfortran.dg/tab_continuation.f: Likewise.
- * gfortran.dg/typebound_proc_2.f90: Likewise.
- * gfortran.dg/warnings_are_errors_1.f90: Likewise.
-
-2021-10-22 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/92621
- * gfortran.dg/bind-c-intent-out-2.f90: New test.
-
-2021-10-22 José Rui Faustino de Sousa <jrfsousa@gmail.com>
- Sandra Loosemore <sandra@codesourcery.com>
-
- PR fortran/94289
- * gfortran.dg/PR94289.f90: New.
-
-2021-10-22 José Rui Faustino de Sousa <jrfsousa@gmail.com>
- Sandra Loosemore <sandra@codesourcery.com>
-
- PR fortran/100906
- * gfortran.dg/PR100906.f90: New.
- * gfortran.dg/PR100906.c: New.
-
-2021-10-22 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102893
- * gcc.dg/tree-ssa/ssa-dce-9.c: New testcase.
-
-2021-10-22 Richard Biener <rguenther@suse.de>
-
- PR bootstrap/102681
- * gcc.dg/tree-ssa/ssa-fre-97.c: New testcase.
- * gcc.dg/ubsan/pr81981.c: XFAIL one case.
-
-2021-10-21 Uroš Bizjak <ubizjak@gmail.com>
-
- PR testsuite/102840
- * gcc.target/i386/pr22076.c: Adjust to avoid compile time optimization.
-
-2021-10-21 Hongyu Wang <hongyu.wang@intel.com>
-
- * gcc.target/i386/avx512fp16-13.c: Adjust scan-assembler for
- xmm/ymm load/store.
-
-2021-10-21 Martin Liska <mliska@suse.cz>
-
- PR debug/102585
- PR bootstrap/102766
- * gcc.dg/pr102585.c: New test.
-
-2021-10-21 Martin Jambor <mjambor@suse.cz>
-
- PR tree-optimization/102505
- * g++.dg/torture/pr102505.C: New test.
-
-2021-10-21 Jakub Jelinek <jakub@redhat.com>
-
- * gfortran.dg/gomp/strictly-structured-block-1.f90: Use call do_work
- instead of x = x + 1 in places where the latter could be a data race.
- * gfortran.dg/gomp/strictly-structured-block-2.f90: Likewise.
- * gfortran.dg/gomp/strictly-structured-block-3.f90: Likewise.
-
-2021-10-21 Hongyu Wang <hongyu.wang@intel.com>
-
- PR target/102812
- * gcc.target/i386/pr102812.c: New test.
-
-2021-10-21 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/64888
- * c-c++-common/ubsan/pr64888.c: New test.
-
-2021-10-21 Andrew Pinski <apinski@marvell.com>
-
- * gcc.dg/pr36902.c: Move buf to be a non-static variable.
-
-2021-10-21 Richard Biener <rguenther@suse.de>
-
- PR testsuite/102861
- * gcc.dg/vect/bb-slp-16.c: Revert previous change, scan
- the vect dump instead.
-
-2021-10-21 Chung-Lin Tang <cltang@codesourcery.com>
-
- * gfortran.dg/gomp/cancel-1.f90: Adjust testcase.
- * gfortran.dg/gomp/nesting-3.f90: Adjust testcase.
- * gfortran.dg/gomp/strictly-structured-block-1.f90: New test.
- * gfortran.dg/gomp/strictly-structured-block-2.f90: New test.
- * gfortran.dg/gomp/strictly-structured-block-3.f90: New test.
-
-2021-10-21 Sandra Loosemore <sandra@codesourcery.com>
-
- PR fortran/94070
- * gfortran.dg/c-interop/shape-bindc.f90: New test.
- * gfortran.dg/c-interop/shape-poly.f90: New test.
- * gfortran.dg/c-interop/size-bindc.f90: New test.
- * gfortran.dg/c-interop/size-poly.f90: New test.
- * gfortran.dg/c-interop/ubound-bindc.f90: New test.
- * gfortran.dg/c-interop/ubound-poly.f90: New test.
-
-2021-10-20 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.target/aarch64/mvn-cmeq0-1.c: New test.
-
-2021-10-20 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.target/aarch64/narrow_high_combine.c: Update case.
- * gcc.target/aarch64/xtn-combine-1.c: New test.
- * gcc.target/aarch64/xtn-combine-2.c: New test.
- * gcc.target/aarch64/xtn-combine-3.c: New test.
- * gcc.target/aarch64/xtn-combine-4.c: New test.
- * gcc.target/aarch64/xtn-combine-5.c: New test.
- * gcc.target/aarch64/xtn-combine-6.c: New test.
-
-2021-10-20 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.target/aarch64/shl-combine-2.c: New test.
- * gcc.target/aarch64/shl-combine-3.c: New test.
- * gcc.target/aarch64/shl-combine-4.c: New test.
- * gcc.target/aarch64/shl-combine-5.c: New test.
-
-2021-10-20 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.target/aarch64/shrn-combine-10.c: New test.
- * gcc.target/aarch64/shrn-combine-5.c: New test.
- * gcc.target/aarch64/shrn-combine-6.c: New test.
- * gcc.target/aarch64/shrn-combine-7.c: New test.
- * gcc.target/aarch64/shrn-combine-8.c: New test.
- * gcc.target/aarch64/shrn-combine-9.c: New test.
-
-2021-10-20 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.target/aarch64/shrn-combine-1.c: New test.
- * gcc.target/aarch64/shrn-combine-2.c: New test.
- * gcc.target/aarch64/shrn-combine-3.c: New test.
- * gcc.target/aarch64/shrn-combine-4.c: New test.
-
-2021-10-20 Chung-Lin Tang <cltang@codesourcery.com>
-
- * gfortran.dg/gomp/reduction4.f90: Adjust omp target in_reduction' scan
- pattern.
-
-2021-10-20 Martin Liska <mliska@suse.cz>
-
- Revert:
- 2021-10-20 Martin Liska <mliska@suse.cz>
-
- PR target/102374
- * gcc.target/i386/pr102374.c: New test.
-
-2021-10-20 Martin Liska <mliska@suse.cz>
-
- Revert:
- 2021-10-20 Martin Liska <mliska@suse.cz>
-
- PR target/102375
- * gcc.target/aarch64/pr102375.c: New test.
-
-2021-10-20 Wilco Dijkstra <wdijkstr@arm.com>
-
- PR target/100966
- * gcc.target/aarch64/frint.x: Add roundeven tests.
- * gcc.target/aarch64/frint_double.c: Likewise.
- * gcc.target/aarch64/frint_float.c: Likewise.
-
-2021-10-20 Andre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com>
-
- * gcc.target/aarch64/fmla_intrinsic_1.c: prevent over optimization.
- * gcc.target/aarch64/fmls_intrinsic_1.c: Likewise.
- * gcc.target/aarch64/fmul_intrinsic_1.c: Likewise.
- * gcc.target/aarch64/mla_intrinsic_1.c: Likewise.
- * gcc.target/aarch64/mls_intrinsic_1.c: Likewise.
- * gcc.target/aarch64/mul_intrinsic_1.c: Likewise.
- * gcc.target/aarch64/simd/vmul_elem_1.c: Likewise.
- * gcc.target/aarch64/vclz.c: Likewise.
- * gcc.target/aarch64/vneg_s.c: Likewise.
-
-2021-10-20 Andre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com>
-
- * gcc.target/aarch64/merge_trunc1.c: New test.
-
-2021-10-20 Eric Botcazou <ebotcazou@adacore.com>
-
- * gcc.dg/pr102764.c: New test.
-
-2021-10-20 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/102815
- * gfortran.dg/bind-c-contiguous-5.c (do_call, reset_var): Handle
- big andian.
-
-2021-10-20 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/102642
- * g++.dg/tls/pr102642.C: New test.
-
-2021-10-20 Aldy Hernandez <aldyh@redhat.com>
- Richard Biener <rguenther@suse.de>
-
- * gcc.dg/Warray-bounds-87.c: Remove xfail.
- * gcc.dg/analyzer/pr94851-2.c: Remove xfail.
- * gcc.dg/graphite/pr69728.c: Remove xfail.
- * gcc.dg/graphite/scop-dsyr2k.c: Remove xfail.
- * gcc.dg/graphite/scop-dsyrk.c: Remove xfail.
- * gcc.dg/shrink-wrap-loop.c: Remove xfail.
- * gcc.dg/loop-8.c: Adjust for new threading restrictions.
- * gcc.dg/tree-ssa/ifc-20040816-1.c: Same.
- * gcc.dg/tree-ssa/pr21559.c: Same.
- * gcc.dg/tree-ssa/pr59597.c: Same.
- * gcc.dg/tree-ssa/pr71437.c: Same.
- * gcc.dg/tree-ssa/pr77445-2.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same.
- * gcc.dg/vect/bb-slp-16.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-6.c: Remove.
- * gcc.dg/tree-ssa/ssa-dom-thread-18.c: Remove.
- * gcc.dg/tree-ssa/ssa-dom-thread-2a.c: Remove.
- * gcc.dg/tree-ssa/ssa-thread-invalid.c: New test.
-
-2021-10-20 Jeff Law <jeffreyalaw@gmail.com>
-
- * gcc.dg/plugin/gil-1.c: Add dg-require-effective-target marker.
-
-2021-10-20 Hongtao Liu <hongtao.liu@intel.com>
- Kewen Lin <linkw@linux.ibm.com>
-
- PR middle-end/102722
- PR middle-end/102697
- PR middle-end/102462
- PR middle-end/102706
- PR middle-end/102744
- * c-c++-common/Wstringop-overflow-2.c: Adjust testcase with new
- xfail/target selector.
- * gcc.dg/Warray-bounds-51.c: Ditto.
- * gcc.dg/Warray-parameter-3.c: Ditto.
- * gcc.dg/Wstringop-overflow-14.c: Ditto.
- * gcc.dg/Wstringop-overflow-21.c: Ditto.
- * gcc.dg/Wstringop-overflow-68.c: Ditto.
- * gcc.dg/Wstringop-overflow-76.c: Ditto.
- * gcc.dg/Warray-bounds-48.c: Ditto.
- * gcc.dg/Wzero-length-array-bounds-2.c: Ditto.
- * lib/target-supports.exp (check_vect_slp_aligned_store_usage):
- New function.
- (check_effective_target_vect_slp_v2qi_store): Ditto.
- (check_effective_target_vect_slp_v4qi_store): Ditto.
- (check_effective_target_vect_slp_v8qi_store): Ditto.
- (check_effective_target_vect_slp_v16qi_store): Ditto.
- (check_effective_target_vect_slp_v2hi_store): Ditto.
- (check_effective_target_vect_slp_v4hi_store): Ditto.
- (check_effective_target_vect_slp_v2si_store): Ditto.
- (check_effective_target_vect_slp_v4si_store): Ditto.
- * c-c++-common/Wstringop-overflow-2-novec.c: New test.
- * gcc.dg/Warray-bounds-51-novec.c: New test.
- * gcc.dg/Warray-bounds-48-novec.c: New test.
- * gcc.dg/Warray-parameter-3-novec.c: New test.
- * gcc.dg/Wstringop-overflow-14-novec.c: New test.
- * gcc.dg/Wstringop-overflow-21-novec.c: New test.
- * gcc.dg/Wstringop-overflow-76-novec.c: New test.
- * gcc.dg/Wzero-length-array-bounds-2-novec.c: New test.
-
-2021-10-19 Paul A. Clarke <pc@us.ibm.com>
-
- * gcc.target/powerpc/sse4_2-pcmpgtq.c: Tighten dg constraints
- to minimally Power8.
-
-2021-10-19 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/92482
- * gfortran.dg/bind-c-char-descr.f90: Remove xfail; extend a bit.
-
-2021-10-19 Martin Liska <mliska@suse.cz>
-
- PR target/102375
- * gcc.target/aarch64/pr102375.c: New test.
-
-2021-10-19 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102827
- * gcc.dg/pr102827.c: New testcase.
-
-2021-10-19 Xionghu Luo <luoxhu@linux.ibm.com>
-
- * gcc.target/powerpc/builtins-1.c: Update instruction counts.
-
-2021-10-19 Haochen Gui <guihaoc@gcc.gnu.org>
-
- * gcc.target/powerpc/p10_vec_xl_sext.c: New test.
-
-2021-10-19 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
-
- PR target/93183
- * gcc.target/aarch64/sve/pr93183.c: Remove -mcpu=generic+sve from dg-options.
-
-2021-10-19 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/102786
- * g++.dg/cpp2a/constexpr-virtual19.C: New test.
-
-2021-10-19 Martin Liska <mliska@suse.cz>
-
- PR target/102374
- * gcc.target/i386/pr102374.c: New test.
-
-2021-10-19 dianhong xu <dianhong.xu@intel.com>
-
- * gcc.target/i386/avx512fp16-set1-pch-1a.c: New test.
- * gcc.target/i386/avx512fp16-set1-pch-1b.c: New test.
- * gcc.target/i386/avx512fp16vl-set1-pch-1a.c: New test.
- * gcc.target/i386/avx512fp16vl-set1-pch-1b.c: New test.
-
-2021-10-18 Andrew MacLeod <amacleod@redhat.com>
-
- PR tree-optimization/102796
- * g++.dg/pr102796.C: New.
-
-2021-10-18 Kwok Cheung Yeung <kcy@codesourcery.com>
-
- * gfortran.dg/gomp/declare-variant-15.f90 (variant2, base2, test2):
- Add tests.
- * gfortran.dg/gomp/declare-variant-16.f90 (base2, variant2, test2):
- Add tests.
-
-2021-10-18 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/102761
- * gcc.target/i386/pr102761.c: New test.
-
-2021-10-18 Jason Merrill <jason@redhat.com>
-
- * g++.dg/template/crash90.C: Check location of pedwarn.
-
-2021-10-18 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/387-12.c (dg-do compile): Require ia32.
- (dg-options): Remove -m32.
-
-2021-10-18 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.target/i386/387-12.c: Add explicit -m32 option.
-
-2021-10-18 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.target/bfin/ones.c: New test case.
- * gcc.target/bfin/parity.c: New test case.
- * gcc.target/bfin/popcount.c: New test case.
-
-2021-10-18 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102788
- * g++.dg/vect/pr102788.cc: New testcase.
-
-2021-10-18 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.target/bfin/ssabs.c: New test case.
- * gcc.target/bfin/ssneg.c: New test case.
-
-2021-10-18 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
-
- PR target/93183
- * gcc.target/aarch64/sve/cond_unary_4.c: Adjust.
- * gcc.target/aarch64/sve/pr93183.c: New test.
-
-2021-10-18 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/102086
- PR fortran/92189
- PR fortran/92621
- PR fortran/101308
- PR fortran/101309
- PR fortran/101635
- PR fortran/92482
- * gfortran.dg/ISO_Fortran_binding_4.f90: Extend testcase.
- * gfortran.dg/PR100914.f90: Remove xfail.
- * gfortran.dg/PR100915.c: Expect CFI_type_cfunptr.
- * gfortran.dg/PR100915.f90: Handle CFI_type_cfunptr != CFI_type_cptr.
- * gfortran.dg/PR93963.f90: Extend select-rank tests.
- * gfortran.dg/bind-c-intent-out.f90: Change to dg-do run,
- update scan-dump.
- * gfortran.dg/bind_c_array_params_2.f90: Update/extend scan-dump.
- * gfortran.dg/bind_c_char_10.f90: Update scan-dump.
- * gfortran.dg/bind_c_char_8.f90: Remove dg-error "sorry".
- * gfortran.dg/c-interop/allocatable-dummy.f90: Remove xfail.
- * gfortran.dg/c-interop/c1255-1.f90: Likewise.
- * gfortran.dg/c-interop/c407c-1.f90: Update dg-error.
- * gfortran.dg/c-interop/cf-descriptor-5.f90: Remove xfail.
- * gfortran.dg/c-interop/cf-out-descriptor-3.f90: Likewise.
- * gfortran.dg/c-interop/cf-out-descriptor-4.f90: Likewise.
- * gfortran.dg/c-interop/cf-out-descriptor-5.f90: Likewise.
- * gfortran.dg/c-interop/contiguous-2.f90: Likewise.
- * gfortran.dg/c-interop/contiguous-3.f90: Likewise.
- * gfortran.dg/c-interop/deferred-character-1.f90: Likewise.
- * gfortran.dg/c-interop/deferred-character-2.f90: Likewise.
- * gfortran.dg/c-interop/fc-descriptor-3.f90: Likewise.
- * gfortran.dg/c-interop/fc-descriptor-5.f90: Likewise.
- * gfortran.dg/c-interop/fc-descriptor-6.f90: Likewise.
- * gfortran.dg/c-interop/fc-out-descriptor-3.f90: Likewise.
- * gfortran.dg/c-interop/fc-out-descriptor-4.f90: Likewise.
- * gfortran.dg/c-interop/fc-out-descriptor-5.f90: Likewise.
- * gfortran.dg/c-interop/fc-out-descriptor-6.f90: Likewise.
- * gfortran.dg/c-interop/ff-descriptor-5.f90: Likewise.
- * gfortran.dg/c-interop/ff-descriptor-6.f90: Likewise.
- * gfortran.dg/c-interop/fc-descriptor-7.f90: Remove xfail + extend.
- * gfortran.dg/c-interop/fc-descriptor-7-c.c: Update for changes.
- * gfortran.dg/c-interop/shape.f90: Add implicit none.
- * gfortran.dg/c-interop/typecodes-array-char-c.c: Add kind=4 char.
- * gfortran.dg/c-interop/typecodes-array-char.f90: Likewise.
- * gfortran.dg/c-interop/typecodes-array-float128.f90: Remove xfail.
- * gfortran.dg/c-interop/typecodes-scalar-basic.f90: Likewise.
- * gfortran.dg/c-interop/typecodes-scalar-float128.f90: Likewise.
- * gfortran.dg/c-interop/typecodes-scalar-int128.f90: Likewise.
- * gfortran.dg/c-interop/typecodes-scalar-longdouble.f90: Likewise.
- * gfortran.dg/iso_c_binding_char_1.f90: Remove dg-error "sorry".
- * gfortran.dg/pr93792.f90: Turn XFAIL into PASS.
- * gfortran.dg/ISO_Fortran_binding_19.f90: New test.
- * gfortran.dg/assumed_type_12.f90: New test.
- * gfortran.dg/assumed_type_13.c: New test.
- * gfortran.dg/assumed_type_13.f90: New test.
- * gfortran.dg/bind-c-char-descr.f90: New test.
- * gfortran.dg/bind-c-contiguous-1.c: New test.
- * gfortran.dg/bind-c-contiguous-1.f90: New test.
- * gfortran.dg/bind-c-contiguous-2.f90: New test.
- * gfortran.dg/bind-c-contiguous-3.c: New test.
- * gfortran.dg/bind-c-contiguous-3.f90: New test.
- * gfortran.dg/bind-c-contiguous-4.c: New test.
- * gfortran.dg/bind-c-contiguous-4.f90: New test.
- * gfortran.dg/bind-c-contiguous-5.c: New test.
- * gfortran.dg/bind-c-contiguous-5.f90: New test.
-
-2021-10-18 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102798
- * gcc.dg/pr102798.c: New testcase.
-
-2021-10-18 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/102745
- * gfortran.dg/class_72.f90: New.
-
-2021-10-15 Jason Merrill <jason@redhat.com>
-
- PR c++/51851
- PR c++/101402
- PR c++/102033
- PR c++/102034
- PR c++/102039
- PR c++/102044
- * g++.dg/template/fnspec2.C: New test.
- * g++.dg/template/parm-cv1.C: New test.
- * g++.dg/template/parm-cv2.C: New test.
- * g++.dg/template/parm-cv3.C: New test.
-
-2021-10-15 Harald Anlauf <anlauf@gmx.de>
- Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/102685
- * gfortran.dg/derived_constructor_char_1.f90: Fix invalid code.
- * gfortran.dg/pr70931.f90: Likewise.
- * gfortran.dg/transfer_simplify_2.f90: Likewise.
- * gfortran.dg/pr102685.f90: New test.
-
-2021-10-15 Aldy Hernandez <aldyh@redhat.com>
-
- * gcc.dg/tree-ssa/pr102736.c: Make sign explicit.
-
-2021-10-15 Richard Biener <rguenther@suse.de>
-
- * lib/prune.exp: Prune STABS obsoletion message.
-
-2021-10-15 Richard Biener <rguenther@suse.de>
-
- PR c/102763
- * gcc.dg/gimplefe-error-12.c: New testcase.
-
-2021-10-15 Richard Biener <rguenther@suse.de>
-
- PR ipa/102762
- * gcc.dg/torture/pr102762.c: New testcase.
-
-2021-10-15 Hongyu Wang <hongyu.wang@intel.com>
-
- * gcc.target/i386/avx512fp16-builtin_shuffle-1.c: New test.
- * gcc.target/i386/avx512fp16-pr101846.c: Ditto.
- * gcc.target/i386/avx512fp16-pr94680.c: Ditto.
-
-2021-10-15 Hongyu Wang <hongyu.wang@intel.com>
-
- * gcc.target/i386/avx512fp16-v4hf-concat.c: New test.
-
-2021-10-15 Hongyu Wang <hongyu.wang@intel.com>
-
- * gcc.target/i386/avx512fp16-vfcmaddcph-1a.c: Add scan for
- vblendmps.
- * gcc.target/i386/avx512fp16-vfmaddcph-1a.c: Likewise.
- * gcc.target/i386/avx512fp16vl-vfcmaddcph-1a.c: Likewise.
- * gcc.target/i386/avx512fp16vl-vfmaddcph-1a.c: Likewise.
- * gcc.target/i386/avx512fp16-vfmaddcsh-1a.c: Add -mno-avx512vl.
- * gcc.target/i386/avx512fp16-vfcmaddcsh-1a.c: Likewise.
-
-2021-10-15 Jason Merrill <jason@redhat.com>
-
- * g++.dg/ext/vla22.C: Don't expect a narrowing error.
- * g++.dg/cpp0x/constexpr-inst1.C: New test.
-
-2021-10-15 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/pr102738.c: Add target int128.
-
-2021-10-14 Joseph Myers <joseph@codesourcery.com>
-
- * gcc.dg/format/c11-dfp-printf-1.c,
- gcc.dg/format/c11-dfp-scanf-1.c, gcc.dg/format/c2x-dfp-printf-1.c,
- gcc.dg/format/c2x-dfp-scanf-1.c: New tests.
-
-2021-10-14 Raphael Moreira Zinsly <rzinsly@linux.ibm.com>
-
- * gcc.target/powerpc/unwind-backchain.c: New test.
-
-2021-10-14 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/102717
- * gfortran.dg/reshape_shape_2.f90: New test.
-
-2021-10-14 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/102716
- * gfortran.dg/shape_10.f90: New test.
-
-2021-10-14 Andrew MacLeod <amacleod@redhat.com>
-
- PR tree-optimization/102738
- * gcc.dg/pr102738.c: New.
-
-2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
-
- * gfortran.dg/gomp/declare-variant-1.f90: New test.
- * gfortran.dg/gomp/declare-variant-10.f90: New test.
- * gfortran.dg/gomp/declare-variant-11.f90: New test.
- * gfortran.dg/gomp/declare-variant-12.f90: New test.
- * gfortran.dg/gomp/declare-variant-13.f90: New test.
- * gfortran.dg/gomp/declare-variant-14.f90: New test.
- * gfortran.dg/gomp/declare-variant-15.f90: New test.
- * gfortran.dg/gomp/declare-variant-16.f90: New test.
- * gfortran.dg/gomp/declare-variant-17.f90: New test.
- * gfortran.dg/gomp/declare-variant-18.f90: New test.
- * gfortran.dg/gomp/declare-variant-19.f90: New test.
- * gfortran.dg/gomp/declare-variant-2.f90: New test.
- * gfortran.dg/gomp/declare-variant-2a.f90: New test.
- * gfortran.dg/gomp/declare-variant-3.f90: New test.
- * gfortran.dg/gomp/declare-variant-4.f90: New test.
- * gfortran.dg/gomp/declare-variant-5.f90: New test.
- * gfortran.dg/gomp/declare-variant-6.f90: New test.
- * gfortran.dg/gomp/declare-variant-7.f90: New test.
- * gfortran.dg/gomp/declare-variant-8.f90: New test.
- * gfortran.dg/gomp/declare-variant-9.f90: New test.
-
-2021-10-14 Jeff Law <jeffreyalaw@gmail.com>
-
- * gcc.target/mips/msa-insert-split.c: Turn off vectorizer.
-
-2021-10-14 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.target/aarch64/sve/pred-cond-reduc.c: New test.
-
-2021-10-14 Jeff Law <jeffreyalaw@gmail.com>
-
- * gcc.dg/tree-ssa/predcom-3.c: Disable vectorizer.
-
-2021-10-14 Aldy Hernandez <aldyh@redhat.com>
-
- PR tree-optimization/102736
- * gcc.dg/tree-ssa/pr102736.c: New test.
-
-2021-10-14 Hongyu Wang <hongyu.wang@intel.com>
-
- * gcc.target/i386/avx-1.c: Add new mask3 builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/avx512fp16-vfcmaddcsh-1a.c: Add scanning for
- mask/mask3 intrinsic.
- * gcc.target/i386/avx512fp16-vfmaddcsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfcmaddcsh-1c.c: New test for
- -mavx512vl.
- * gcc.target/i386/avx512fp16-vfmaddcsh-1c.c: Ditto.
-
-2021-10-14 liuhongt <hongtao.liu@intel.com>
-
- * g++.dg/warn/Wuninitialized-13.C: Add -fno-tree-vectorize.
-
-2021-10-13 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/102630
- * gcc.target/i386/addr-space-2.c: Add -Wall.
- * gcc.target/i386/addr-space-3.c: New test.
-
-2021-10-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
-
- * gcc.target/arm/mve/mve.exp: Make it test main directory.
- * gcc.target/arm/mve/mve_load_memory_modes.c: New test.
- * gcc.target/arm/mve/mve_store_memory_modes.c: New test.
-
-2021-10-13 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102659
- * gcc.dg/torture/pr69760.c: Adjust the testcase.
- * gcc.target/i386/avx2-vect-mask-store-move1.c: Expect to move
- the conversions to unsigned as well.
-
-2021-10-13 Richard Biener <rguenther@suse.de>
-
- PR ipa/102714
- * gcc.dg/ipa/pr102714.c: New testcase.
-
-2021-10-13 Kewen Lin <linkw@linux.ibm.com>
-
- PR testsuite/102658
- * gcc.target/powerpc/dform-1.c: Adjust as vectorization enabled at O2.
- * gcc.target/powerpc/dform-2.c: Likewise.
- * gcc.target/powerpc/pr80510-2.c: Likewise.
-
-2021-10-12 Joseph Myers <joseph@codesourcery.com>
-
- * gcc.dg/format/c11-printf-1.c, gcc.dg/format/c11-scanf-1.c,
- gcc.dg/format/c2x-printf-1.c, gcc.dg/format/c2x-scanf-1.c,
- gcc.dg/format/ext-9.c, gcc.dg/format/ext-10.c: New tests.
-
-2021-10-12 Bill Schmidt <wschmidt@linux.ibm.com>
-
- PR target/101985
- * gcc.target/powerpc/pr101985-1.c: New.
- * gcc.target/powerpc/pr101985-2.c: New.
-
-2021-10-12 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/85730
- PR target/82524
- * gcc.target/i386/pr85730.c: New test.
-
-2021-10-12 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102696
- * g++.dg/vect/pr102696.cc: New testcase.
-
-2021-10-12 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102572
- * g++.dg/vect/pr102572.cc: New testcase.
-
-2021-10-12 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.target/aarch64/sve/pred-not-gen-1.c: New test.
- * gcc.target/aarch64/sve/pred-not-gen-2.c: New test.
- * gcc.target/aarch64/sve/pred-not-gen-3.c: New test.
- * gcc.target/aarch64/sve/pred-not-gen-4.c: New test.
-
-2021-10-12 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/102541
- * gfortran.dg/assumed_rank_24.f90: New test.
-
-2021-10-12 Jakub Jelinek <jakub@redhat.com>
-
- * gcc.dg/gomp/simd-2.c: Remove option -fvect-cost-model=cheap.
- * gcc.dg/gomp/simd-3.c: Likewise.
-
-2021-10-12 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/pr102483.c: New test.
- * gcc.target/i386/pr102483-2.c: New test.
-
-2021-10-12 Paul A. Clarke <pc@us.ibm.com>
-
- * gcc.target/powerpc/pr78102.c: Fix dg-require-effective-target.
- * gcc.target/powerpc/sse4_1-packusdw.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmaxsb.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmaxsd.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmaxud.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmaxuw.c: Likewise.
- * gcc.target/powerpc/sse4_1-pminsb.c: Likewise.
- * gcc.target/powerpc/sse4_1-pminsd.c: Likewise.
- * gcc.target/powerpc/sse4_1-pminud.c: Likewise.
- * gcc.target/powerpc/sse4_1-pminuw.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmovsxbd.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmovsxbw.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmovsxwd.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmovzxbd.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmovzxbq.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmovzxbw.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmovzxdq.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmovzxwd.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmovzxwq.c: Likewise.
- * gcc.target/powerpc/sse4_1-pmulld.c: Likewise.
- * gcc.target/powerpc/sse4_2-pcmpgtq.c: Likewise.
- * gcc.target/powerpc/sse4_1-phminposuw.c: Use correct
- dg-require-effective-target.
-
-2021-10-12 Paul A. Clarke <pc@us.ibm.com>
-
- * gcc.target/powerpc/pr78102.c: Copy from gcc.target/i386,
- adjust dg directives to suit.
- * gcc.target/powerpc/sse4_1-packusdw.c: Same.
- * gcc.target/powerpc/sse4_1-pcmpeqq.c: Same.
- * gcc.target/powerpc/sse4_1-pmuldq.c: Same.
- * gcc.target/powerpc/sse4_1-pmulld.c: Same.
- * gcc.target/powerpc/sse4_2-pcmpgtq.c: Same.
- * gcc.target/powerpc/sse4_2-check.h: Copy from gcc.target/i386,
- tweak to suit.
-
-2021-10-12 Paul A. Clarke <pc@us.ibm.com>
-
- * gcc.target/powerpc/sse4_1-pmovsxbd.c: Copy from gcc.target/i386,
- adjust dg directives to suit.
- * gcc.target/powerpc/sse4_1-pmovsxbq.c: Same.
- * gcc.target/powerpc/sse4_1-pmovsxbw.c: Same.
- * gcc.target/powerpc/sse4_1-pmovsxdq.c: Same.
- * gcc.target/powerpc/sse4_1-pmovsxwd.c: Same.
- * gcc.target/powerpc/sse4_1-pmovsxwq.c: Same.
- * gcc.target/powerpc/sse4_1-pmovzxbd.c: Same.
- * gcc.target/powerpc/sse4_1-pmovzxbq.c: Same.
- * gcc.target/powerpc/sse4_1-pmovzxbw.c: Same.
- * gcc.target/powerpc/sse4_1-pmovzxdq.c: Same.
- * gcc.target/powerpc/sse4_1-pmovzxwd.c: Same.
- * gcc.target/powerpc/sse4_1-pmovzxwq.c: Same.
-
-2021-10-12 Paul A. Clarke <pc@us.ibm.com>
-
- * gcc.target/powerpc/sse4_1-pmaxsb.c: Copy from gcc.target/i386.
- * gcc.target/powerpc/sse4_1-pmaxsd.c: Same.
- * gcc.target/powerpc/sse4_1-pmaxud.c: Same.
- * gcc.target/powerpc/sse4_1-pmaxuw.c: Same.
- * gcc.target/powerpc/sse4_1-pminsb.c: Same.
- * gcc.target/powerpc/sse4_1-pminsd.c: Same.
- * gcc.target/powerpc/sse4_1-pminud.c: Same.
- * gcc.target/powerpc/sse4_1-pminuw.c: Same.
-
-2021-10-11 Jan Hubicka <hubicka@ucw.cz>
-
- * gcc.dg/torture/ssa-pta-fn-1.c: Fix template; add noipa.
- * gcc.dg/tree-ssa/pta-callused.c: Fix template.
-
-2021-10-11 Patrick Palka <ppalka@redhat.com>
-
- PR c++/102643
- * g++.dg/cpp2a/class-deduction-alias11.C: New test.
-
-2021-10-11 Richard Biener <rguenther@suse.de>
-
- PR middle-end/101480
- * g++.dg/torture/pr10148.C: New testcase.
-
-2021-10-11 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
-
- * gcc.target/s390/rawmemchr-1.c: New test.
-
-2021-10-11 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
-
- * gcc.dg/tree-ssa/ldist-rawmemchr-1.c: New test.
- * gcc.dg/tree-ssa/ldist-rawmemchr-2.c: New test.
- * gcc.dg/tree-ssa/ldist-strlen-1.c: New test.
- * gcc.dg/tree-ssa/ldist-strlen-2.c: New test.
- * gcc.dg/tree-ssa/ldist-strlen-3.c: New test.
-
-2021-10-11 Kito Cheng <kito.cheng@sifive.com>
-
- PR target/100316
- * gcc.c-torture/compile/pr100316.c: New.
-
-2021-10-11 liuhongt <hongtao.liu@intel.com>
-
- PR middle-end/102669
- * gnat.dg/unroll1.adb: Add -fno-tree-vectorize.
-
-2021-10-10 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/99348
- PR fortran/102521
- * gfortran.dg/parameter_array_init_8.f90: New test.
-
-2021-10-10 Andrew Pinski <apinski@marvell.com>
-
- PR tree-optimization/102622
- * gcc.c-torture/execute/bitfld-10.c: New test.
-
-2021-10-09 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/65454
- * gfortran.dg/interface_operator_3.f90: New test.
-
-2021-10-09 Kewen Lin <linkw@linux.ibm.com>
-
- * c-c++-common/Wstringop-overflow-2.c: Add missing comment.
- * gcc.dg/Warray-bounds-51.c: Likewise.
- * gcc.dg/Warray-parameter-3.c: Likewise.
- * gcc.dg/Wstringop-overflow-14.c: Likewise.
- * gcc.dg/Wstringop-overflow-21.c: Likewise.
- * gcc.dg/Wstringop-overflow-76.c: Likewise.
-
-2021-10-09 liuhongt <hongtao.liu@intel.com>
-
- * g++.dg/tree-ssa/pr94403.C: Add -fno-tree-vectorize
- * gcc.dg/optimize-bswapsi-5.c: Ditto.
- * gcc.dg/optimize-bswapsi-6.c: Ditto.
- * gcc.dg/Warray-bounds-51.c: Add additional option
- -mtune=generic for target x86/i?86
- * gcc.dg/Wstringop-overflow-14.c: Ditto.
-
-2021-10-09 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/sections1.c (foo): Don't expect errors on
- multiple statements in between section directive(s). Add testcases
- for invalid no statements in between section directive(s).
- * gcc.dg/gomp/sections-2.c (foo): Don't expect errors on
- multiple statements in between section directive(s).
- * g++.dg/gomp/sections-2.C (foo): Likewise.
- * g++.dg/gomp/attrs-6.C (foo): Add testcases for multiple
- statements in between section directive(s).
- (bar): Add testcases for multiple statements in between scan
- directive.
- * g++.dg/gomp/attrs-7.C (bar): Adjust expected error recovery.
-
-2021-10-09 liuhongt <hongtao.liu@intel.com>
-
- * g++.target/i386/pr102639.C: New test.
-
-2021-10-08 Sandra Loosemore <sandra@codesourcery.com>
-
- PR fortran/54753
- * gfortran.dg/c-interop/c535c-1.f90: Rewrite and expand.
- * gfortran.dg/c-interop/c535c-2.f90: Remove xfails.
- * gfortran.dg/c-interop/c535c-3.f90: Likewise.
- * gfortran.dg/c-interop/c535c-4.f90: Likewise.
- * gfortran.dg/PR94110.f90: Extend to cover class types.
-
-2021-10-08 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR rtl-optimization/102627
- * gcc.target/i386/pr102627.c: New test.
-
-2021-10-08 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.dg/pr102385.c: New test.
-
-2021-10-08 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/102640
- * c-c++-common/gomp/pr102640.c: New test.
-
-2021-10-08 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.target/i386/sse2-mmx-paddsb-2.c: Test for -128 or 128.
- * gcc.target/i386/sse2-mmx-paddusb-2.c: Test for -1 or 255.
- * gcc.target/i386/sse2-mmx-psubsb-2.c: Test for -128 or 128.
-
-2021-10-08 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/pr102464.c: New test.
-
-2021-10-08 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/mmx-reduce-op-1.c: New test.
- * gcc.target/i386/mmx-reduce-op-2.c: New test.
+ PR target/104345
+ * gcc.target/nvptx/neg-selp.c: New test case.
-2021-10-08 liuhongt <hongtao.liu@intel.com>
+2022-02-10 Roger Sayle <roger@nextmovesoftware.com>
- * c-c++-common/Wstringop-overflow-2.c: Adjust testcase.
- * g++.dg/tree-ssa/pr81408.C: Ditto.
- * g++.dg/warn/Wuninitialized-13.C: Ditto.
- * gcc.dg/Warray-bounds-51.c: Ditto.
- * gcc.dg/Warray-parameter-3.c: Ditto.
- * gcc.dg/Wstringop-overflow-14.c: Ditto.
- * gcc.dg/Wstringop-overflow-21.c: Ditto.
- * gcc.dg/Wstringop-overflow-68.c: Ditto.
- * gcc.dg/Wstringop-overflow-76.c: Ditto.
- * gcc.dg/gomp/pr46032-2.c: Ditto.
- * gcc.dg/gomp/pr46032-3.c: Ditto.
- * gcc.dg/gomp/simd-2.c: Ditto.
- * gcc.dg/gomp/simd-3.c: Ditto.
- * gcc.dg/graphite/fuse-1.c: Ditto.
- * gcc.dg/pr67089-6.c: Ditto.
- * gcc.dg/pr82929-2.c: Ditto.
- * gcc.dg/pr82929.c: Ditto.
- * gcc.dg/store_merging_1.c: Ditto.
- * gcc.dg/store_merging_11.c: Ditto.
- * gcc.dg/store_merging_13.c: Ditto.
- * gcc.dg/store_merging_15.c: Ditto.
- * gcc.dg/store_merging_16.c: Ditto.
- * gcc.dg/store_merging_19.c: Ditto.
- * gcc.dg/store_merging_24.c: Ditto.
- * gcc.dg/store_merging_25.c: Ditto.
- * gcc.dg/store_merging_28.c: Ditto.
- * gcc.dg/store_merging_30.c: Ditto.
- * gcc.dg/store_merging_5.c: Ditto.
- * gcc.dg/store_merging_7.c: Ditto.
- * gcc.dg/store_merging_8.c: Ditto.
- * gcc.dg/strlenopt-85.c: Ditto.
- * gcc.dg/tree-ssa/dump-6.c: Ditto.
- * gcc.dg/tree-ssa/pr19210-1.c: Ditto.
- * gcc.dg/tree-ssa/pr47059.c: Ditto.
- * gcc.dg/tree-ssa/pr86017.c: Ditto.
- * gcc.dg/tree-ssa/pr91482.c: Ditto.
- * gcc.dg/tree-ssa/predcom-1.c: Ditto.
- * gcc.dg/tree-ssa/predcom-dse-3.c: Ditto.
- * gcc.dg/tree-ssa/prefetch-3.c: Ditto.
- * gcc.dg/tree-ssa/prefetch-6.c: Ditto.
- * gcc.dg/tree-ssa/prefetch-8.c: Ditto.
- * gcc.dg/tree-ssa/prefetch-9.c: Ditto.
- * gcc.dg/tree-ssa/ssa-dse-18.c: Ditto.
- * gcc.dg/tree-ssa/ssa-dse-19.c: Ditto.
- * gcc.dg/uninit-40.c: Ditto.
- * gcc.dg/unroll-7.c: Ditto.
- * gcc.misc-tests/help.exp: Ditto.
- * gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c: Ditto.
- * gcc.target/i386/pr34012.c: Ditto.
- * gcc.target/i386/pr49781-1.c: Ditto.
- * gcc.target/i386/pr95798-1.c: Ditto.
- * gcc.target/i386/pr95798-2.c: Ditto.
- * gfortran.dg/pr77498.f: Ditto.
-
-2021-10-07 Patrick Palka <ppalka@redhat.com>
-
- PR c++/61355
- * g++.old-deja/g++.pt/nontype5.C: Adjust.
- * g++.dg/template/param6.C: New test.
-
-2021-10-07 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.target/i386/sse2-mmx-paddsb-2.c: New test case.
- * gcc.target/i386/sse2-mmx-paddusb-2.c: New test case.
- * gcc.target/i386/sse2-mmx-psubsb-2.c: New test case.
- * gcc.target/i386/sse2-mmx-psubusb-2.c: New test case.
-
-2021-10-07 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99904
- * g++.dg/cpp2a/concepts-ttp4.C: New test.
-
-2021-10-07 Jonathan Wakely <jwakely@redhat.com>
-
- PR c++/102482
- * g++.dg/warn/Winit-list5.C: New test.
-
-2021-10-07 Jan Hubicka <hubicka@ucw.cz>
-
- * g++.dg/torture/pr102581.C: New test.
-
-2021-10-07 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/102615
- * g++.dg/cpp23/charlit-encoding1.C: New testcase for C++23 P2316R2.
-
-2021-10-07 Richard Biener <rguenther@suse.de>
-
- * gcc.dg/gimplefe-47.c: New testcase.
-
-2021-10-06 Jason Merrill <jason@redhat.com>
-
- * g++.dg/cpp2a/spaceship-synth8a.C: New test.
-
-2021-10-06 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/102612
- * g++.dg/cpp23/feat-cxx2b.C: Expect __cpp_constexpr 202110L rather
- than 201907L.
- * g++.dg/cpp23/constexpr-nonlit1.C: New test.
- * g++.dg/cpp23/constexpr-nonlit2.C: New test.
- * g++.dg/cpp23/constexpr-nonlit3.C: New test.
- * g++.dg/cpp23/constexpr-nonlit4.C: New test.
- * g++.dg/cpp23/constexpr-nonlit5.C: New test.
- * g++.dg/cpp23/constexpr-nonlit6.C: New test.
- * g++.dg/diagnostic/constexpr1.C: Only expect some diagnostics for
- c++20_down.
- * g++.dg/cpp1y/constexpr-label.C: Likewise.
- * g++.dg/cpp1y/constexpr-neg1.C: Likewise.
- * g++.dg/cpp2a/constexpr-try5.C: Likewise. Adjust some expected
- wording.
- * g++.dg/cpp2a/constexpr-dtor3.C: Likewise.
- * g++.dg/cpp2a/consteval3.C: Likewise. Add effective target c++20
- and remove dg-options.
-
-2021-10-06 Jakub Jelinek <jakub@redhat.com>
-
- * gcc.dg/cpp/gnu11-elifdef-1.c: New test.
- * gcc.dg/cpp/gnu11-elifdef-2.c: New test.
- * gcc.dg/cpp/gnu11-elifdef-3.c: New test.
- * gcc.dg/cpp/gnu11-elifdef-4.c: New test.
- * g++.dg/cpp/elifdef-1.C: New test.
- * g++.dg/cpp/elifdef-2.C: New test.
- * g++.dg/cpp/elifdef-3.C: New test.
- * g++.dg/cpp/elifdef-4.C: New test.
- * g++.dg/cpp/elifdef-5.C: New test.
- * g++.dg/cpp/elifdef-6.C: New test.
- * g++.dg/cpp/elifdef-7.C: New test.
-
-2021-10-06 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/attr_deprecated-2.f90: New test.
-
-2021-10-06 Jakub Jelinek <jakub@redhat.com>
- Jason Merrill <jason@redhat.com>
-
- PR c++/98712
- PR c++/102490
- * g++.dg/cpp2a/spaceship-synth8.C (std::strong_ordering): Provide
- more complete definition.
- (std::strong_ordering::less, std::strong_ordering::equal,
- std::strong_ordering::greater): Define.
- * g++.dg/cpp2a/spaceship-synth12.C: New test.
- * g++.dg/cpp2a/spaceship-synth13.C: New test.
- * g++.dg/cpp2a/spaceship-synth14.C: New test.
- * g++.dg/cpp2a/spaceship-eq11.C: New test.
- * g++.dg/cpp2a/spaceship-eq12.C: New test.
- * g++.dg/cpp2a/spaceship-eq13.C: New test.
-
-2021-10-05 qing zhao <qing.zhao@oracle.com>
-
- PR middle-end/102359
- * g++.dg/pr102359_1.C: New test.
- * g++.dg/pr102359_2.C: New test.
-
-2021-10-05 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/102548
- * g++.target/i386/pr102548.C: New test.
-
-2021-10-05 Patrick Palka <ppalka@redhat.com>
-
- PR c++/102547
- * g++.dg/cpp0x/variadic-partial2.C: New test.
- * g++.dg/cpp0x/variadic-partial2a.C: New test.
-
-2021-10-05 Aldy Hernandez <aldyh@redhat.com>
-
- * gcc.dg/tree-ssa/ssa-thread-valid.c: New test.
-
-2021-10-05 Jeff Law <jeffreyalaw@gmail.com>
-
- * gcc.target/s390/pr80725.c: Ensure computed goto is used on
- a pointer type.
-
-2021-10-05 Richard Biener <rguenther@suse.de>
-
- PR c/102605
- * gcc.dg/gimplefe-46.c: New testcase.
-
-2021-10-05 Patrick Palka <ppalka@redhat.com>
-
- PR c++/98930
- * g++.dg/cpp1z/nontype4.C: New test.
- * g++.dg/cpp1z/nontype4a.C: New test.
-
-2021-10-05 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/gomp/pr43711.f90: Add dg-error + dg-prune-output,
- remove dg-excess-errors to change XFAIL to PASS.
-
-2021-10-05 Richard Biener <rguenther@suse.de>
-
- PR middle-end/102587
- PR middle-end/102285
- * gcc.target/aarch64/sve/pr102587-1.c: Add -march=armv8.3-a+sve.
- * gcc.target/aarch64/sve/pr102587-2.c: Likewise.
-
-2021-10-05 Richard Biener <rguenther@suse.de>
-
- * gfortran.dg/predict-2.f90: Adjust to avoid redundant
- inner loop preheader checking code.
-
-2021-10-04 Marek Polacek <polacek@redhat.com>
-
- PR c++/97573
- * c-c++-common/Warray-compare-1.c: New test.
- * c-c++-common/Warray-compare-2.c: New test.
-
-2021-10-04 Richard Biener <rguenther@suse.de>
-
- * gcc.dg/auto-init-hardreg-1.c: New testcase.
-
-2021-10-04 Richard Biener <rguenther@suse.de>
-
- * c-c++-common/pr102285.c: New testcase.
-
-2021-10-04 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102570
- * gcc.dg/tree-ssa/ssa-fre-96.c: New testcase.
- * gcc.dg/tree-ssa/ssa-pre-33.c: Likewise.
-
-2021-10-04 Aldy Hernandez <aldyh@redhat.com>
-
- * g++.dg/Walloca2.C: New test.
-
-2021-10-04 Richard Biener <rguenther@suse.de>
-
- PR middle-end/102587
- * gcc.target/aarch64/sve/pr102587-1.c: New testcase.
- * gcc.target/aarch64/sve/pr102587-2.c: Likewise.
-
-2021-10-04 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/54753
- * gfortran.dg/assumed_rank_23.f90: New file.
-
-2021-10-03 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/101765
- * g++.dg/coroutines/pr101765.C: New test.
-
-2021-10-03 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/99710
- * g++.dg/coroutines/pr99710.C: New test.
-
-2021-10-03 John Eivind Helset <jehelset@gmail.com>
-
- PR c++/100673
- * g++.dg/coroutines/pr100673.C: New test.
-
-2021-10-03 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/101133
- * g++.dg/coroutines/pr101133.C: New test.
-
-2021-10-03 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/99575
- * g++.dg/coroutines/pr99575.C: New test.
-
-2021-10-02 Aldy Hernandez <aldyh@redhat.com>
-
- * gcc.dg/tree-ssa/pr102563.c: New test.
-
-2021-10-02 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.dg/analyzer/torture/asm-x86-linux-rdmsr.c (DECLARE_ARGS):
- Use unsigned long long for x86-64.
-
-2021-10-01 Aldy Hernandez <aldyh@redhat.com>
-
- PR tree-optimization/102546
- * gcc.dg/tree-ssa/pr102546.c: New file.
-
-2021-10-01 Martin Sebor <msebor@redhat.com>
-
- PR c/102103
- * g++.dg/cpp0x/constexpr-array-ptr10.C: Suppress a valid warning.
- * g++.dg/warn/Wreturn-local-addr-6.C: Correct a cast.
- * gcc.dg/Waddress.c: Expect a warning.
- * c-c++-common/Waddress-3.c: New test.
- * c-c++-common/Waddress-4.c: New test.
- * g++.dg/warn/Waddress-5.C: New test.
- * g++.dg/warn/Waddress-6.C: New test.
- * g++.dg/warn/pr101219.C: Expect a warning.
- * gcc.dg/Waddress-3.c: New test.
-
-2021-10-01 H.J. Lu <hjl.tools@gmail.com>
-
- * c-c++-common/tsan/atomic_stack.c: Don't expect print out from
- __tsan_atomic32_fetch_add.
-
-2021-10-01 qingzhe huang <nickhuang99@hotmail.com>
-
- PR c++/101783
- * g++.dg/parse/pr101783.C: New test.
-
-2021-10-01 Jakub Jelinek <jakub@redhat.com>
- Richard Biener <rguenther@suse.de>
-
- PR sanitizer/102515
- * c-c++-common/ubsan/div-by-zero-3.c: Use
- -fsanitize=signed-integer-overflow instead of
- -fsanitize=integer-divide-by-zero.
- * c-c++-common/ubsan/div-by-zero-5.c: Likewise.
- * c-c++-common/ubsan/div-by-zero-4.c: Likewise. Add
- -fsanitize-undefined-trap-on-error.
- * c-c++-common/ubsan/float-div-by-zero-2.c: New test.
- * c-c++-common/ubsan/overflow-div-1.c: New test.
- * c-c++-common/ubsan/overflow-div-2.c: New test.
- * c-c++-common/ubsan/overflow-div-3.c: New test.
-
-2021-10-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/cpymem-size.c: Adjust scan for ilp32.
-
-2021-10-01 Andrew Pinski <apinski@marvell.com>
-
- * gcc.dg/vect/bb-slp-pr97709.c: Fix for computed goto
- pointers.
-
-2021-10-01 Martin Liska <mliska@suse.cz>
-
- * gcc.target/i386/avx512er-vrsqrt28ps-3.c: Disable fast math.
- * gcc.target/i386/avx512er-vrsqrt28ps-5.c: Likewise.
- * gcc.target/i386/attr-optimize.c: New test.
-
-2021-10-01 Jakub Jelinek <jakub@redhat.com>
-
- * gfortran.dg/gomp/order-5.f90: Adjust scan-tree-dump-times regexps.
-
-2021-10-01 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/102496
- * g++.dg/tls/pr102496-1.C: New test.
- * g++.dg/tls/pr102496-2.C: New test.
-
-2021-10-01 Richard Biener <rguenther@suse.de>
-
- PR middle-end/102518
- * gcc.dg/torture/pr102518.c: New testcase.
-
-2021-09-30 David Edelsohn <dje.gcc@gmail.com>
-
- * gfortran.dg/c-interop/cf-descriptor-5-c.c: Include alloca.h.
-
-2021-09-30 Patrick Palka <ppalka@redhat.com>
-
- PR c++/102535
- * g++.dg/ext/is_trivially_constructible7.C: New test.
-
-2021-09-30 Patrick Palka <ppalka@redhat.com>
-
- * g++.dg/ext/is_constructible6.C: New test.
-
-2021-09-30 Patrick Palka <ppalka@redhat.com>
-
- PR c++/95567
- * g++.dg/cpp2a/spaceship-virtual1.C: New test.
-
-2021-09-30 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/102458
- * gfortran.dg/pr102458b.f90: New test.
-
-2021-09-30 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/89954
- * gcc.target/i386/pr89954.c: New test.
-
-2021-09-30 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/71703
- PR fortran/84007
- * gfortran.dg/c-interop/c535b-1.f90: Remove wrong comment.
- * gfortran.dg/unlimited_polymorphic_1.f03: Extend.
- * gfortran.dg/unlimited_polymorphic_32.f90: New test.
-
-2021-09-30 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR d/102476
- * gdc.dg/pr102476.d: New test.
-
-2021-09-30 Martin Liska <mliska@suse.cz>
-
- PR testsuite/102509
- * gcc.c-torture/compile/attr-complex-method.c: Skip if LTO is
- used.
- * gcc.c-torture/compile/attr-complex-method-2.c: Likewise.
-
-2021-09-29 Aldy Hernandez <aldyh@redhat.com>
-
- PR testsuite/102501
- * gcc.dg/tree-ssa/pr66752-3.c: Adjust.
- * gcc.dg/tree-ssa/pr77445-2.c: Adjust.
-
-2021-09-29 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/102520
- * gfortran.dg/pr102520.f90: New test.
-
-2021-09-29 Jeff Law <jeffreyalaw@gmail.com>
-
- * gcc.c-torture/compile/920831-1.c: Fix computed goto types.
- * gcc.c-torture/compile/pr27863.c: Likewise.
-
-2021-09-29 Richard Biener <rguenther@suse.de>
-
- PR testsuite/102517
- * gcc.dg/pr78408-1.c: Make S not power-of-two size.
-
-2021-09-29 Richard Biener <rguenther@suse.de>
-
- * gcc.target/i386/vect-alignment-peeling-1.c: New testcase.
- * gcc.target/i386/vect-alignment-peeling-2.c: Likewise.
-
-2021-09-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
- Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/cpymem-size.c: New test.
-
-2021-09-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
- Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/memset-corner-cases-2.c: New test.
- * gcc.target/aarch64/memset-strict-align-1.c: Adjust.
-
-2021-09-29 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/102504
- * c-c++-common/gomp/scope-4.c: New test.
-
-2021-09-29 Andrew Pinski <apinski@marvell.com>
-
- * gcc.c-torture/compile/920826-1.c: Fix computed goto.
- * gcc.c-torture/compile/pr27863.c: Likewise.
- * gcc.c-torture/compile/pr70190.c: Likewise.
- * gcc.dg/torture/pr89135.c: Likewise.
- * gcc.dg/torture/pr90071.c: Likewise.
- * gcc.dg/vect/bb-slp-pr97709.c: Likewise.
-
-2021-09-29 Richard Biener <rguenther@suse.de>
-
- * gcc.dg/out-of-bounds-1.c: Make memcpied size not power-of-two.
-
-2021-09-28 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99909
- * g++.dg/cpp2a/concepts-ttp3.C: New test.
-
-2021-09-28 Andrew Pinski <apinski@marvell.com>
-
- PR c/32122
- * gcc.dg/comp-goto-5.c: New test.
- * gcc.dg/comp-goto-6.c: New test.
-
-2021-09-28 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/102454
- * g++.dg/coroutines/pr102454.C: New test.
-
-2021-09-28 Ilya Leoshkevich <iii@linux.ibm.com>
-
- * gcc.dg/tree-ssa/reassoc-46.c: New test.
- * gcc.dg/tree-ssa/reassoc-46.h: Common code for new tests.
- * gcc.dg/tree-ssa/reassoc-47.c: New test.
- * gcc.dg/tree-ssa/reassoc-48.c: New test.
- * gcc.dg/tree-ssa/reassoc-49.c: New test.
- * gcc.dg/tree-ssa/reassoc-50.c: New test.
- * gcc.dg/tree-ssa/reassoc-51.c: New test.
+ * gcc.target/nvptx/bool-1.c: Update.
+ * gcc.target/nvptx/bool-2.c: New test case for and.pred.
+ * gcc.target/nvptx/bool-3.c: New test case for or.pred.
+ * gcc.target/nvptx/bool-4.c: New test case for xor.pred.
-2021-09-28 Aldy Hernandez <aldyh@redhat.com>
+2022-02-10 Roger Sayle <roger@nextmovesoftware.com>
- * gcc.dg/auto-init-uninit-1.c: Adjust.
- * gcc.dg/auto-init-uninit-15.c: Same.
- * gcc.dg/guality/example.c: Same.
- * gcc.dg/loop-8.c: Same.
- * gcc.dg/strlenopt-40.c: Same.
- * gcc.dg/tree-ssa/pr18133-2.c: Same.
- * gcc.dg/tree-ssa/pr18134.c: Same.
- * gcc.dg/uninit-1.c: Same.
- * gcc.dg/uninit-pr44547.c: Same.
- * gcc.dg/uninit-pr59970.c: Same.
+ * gcc.target/nvptx/mul-hi64.c: New test case.
+ * gcc.target/nvptx/umul-hi64.c: New test case.
+ * gcc.target/nvptx/mul-wide64.c: New test case.
+ * gcc.target/nvptx/umul-wide64.c: New test case.
+ * gcc.target/nvptx/isinf.c: New test case.
-2021-09-28 Thomas Schwinge <thomas@codesourcery.com>
+2022-02-10 Roger Sayle <roger@nextmovesoftware.com>
- * gfortran.dg/assumed_rank_22_aux.c: Adjust messages printed.
+ * gcc.target/nvptx/bool-1.c: New test case.
-2021-09-28 Jakub Jelinek <jakub@redhat.com>
+2022-02-10 Roger Sayle <roger@nextmovesoftware.com>
- PR target/102498
- * gcc.target/i386/pr102498.c: New test.
+ * gcc.target/nvptx/float16-3.c: New test case for neghf2.
+ * gcc.target/nvptx/float16-4.c: New test case for abshf2.
+ * gcc.target/nvptx/float16-5.c: New test case for fmahf4.
+ * gcc.target/nvptx/float16-6.c: New test case.
-2021-09-28 Richard Biener <rguenther@suse.de>
+2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
- PR tree-optimization/99793
- * gcc.dg/tree-ssa/pr99793.c: New testcase.
+ * c-c++-common/gomp/clauses-1.c: Added has_device_addr to test cases.
+ * g++.dg/gomp/attrs-1.C: Added has_device_addr to test cases.
+ * g++.dg/gomp/attrs-2.C: Added has_device_addr to test cases.
+ * c-c++-common/gomp/target-has-device-addr-1.c: New test.
+ * c-c++-common/gomp/target-has-device-addr-2.c: New test.
+ * c-c++-common/gomp/target-is-device-ptr-1.c: New test.
+ * c-c++-common/gomp/target-is-device-ptr-2.c: New test.
+ * gfortran.dg/gomp/is_device_ptr-3.f90: New test.
+ * gfortran.dg/gomp/target-has-device-addr-1.f90: New test.
+ * gfortran.dg/gomp/target-has-device-addr-2.f90: New test.
-2021-09-28 Richard Biener <rguenther@suse.de>
+2022-02-10 Eugene Rozenfeld <erozen@microsoft.com>
- PR tree-optimization/100112
- * gcc.dg/tree-ssa/ssa-fre-95.c: New testcase.
+ * g++.dg/tree-prof/indir-call-recursive-inlining.C : New test.
-2021-09-28 Jakub Jelinek <jakub@redhat.com>
+2022-02-10 Andrew Pinski <apinski@marvell.com>
- PR middle-end/102492
- * g++.dg/gomp/simd-3.C: New test.
+ PR target/104474
+ * gcc.target/aarch64/sve/pr104474-1.c: New test.
+ * gcc.target/aarch64/sve/pr104474-2.c: New test.
+ * gcc.target/aarch64/sve/pr104474-3.c: New test.
-2021-09-28 Aldy Hernandez <aldyh@redhat.com>
+2022-02-09 David Malcolm <dmalcolm@redhat.com>
- PR tree-optimization/102511
- * gcc.dg/pr102511.c: New test.
- * gcc.dg/tree-ssa/ssa-dom-thread-14.c: Adjust.
+ * gcc.dg/analyzer/uninit-1.c: Add test coverage for shifts,
+ comparisons, +, -, *, /, and __builtin_strlen.
+ * gcc.dg/analyzer/uninit-CWE-457-examples.c: New test.
-2021-09-28 Hongyu Wang <hongyu.wang@intel.com>
+2022-02-09 Harald Anlauf <anlauf@gmx.de>
- PR target/102230
- * gcc.target/i386/avx512fp16-floatvnhf.c: Remove xfail.
- * gcc.target/i386/avx512fp16-trunc-extendvnhf.c: Ditto.
- * gcc.target/i386/avx512fp16-truncvnhf.c: Ditto.
- * gcc.target/i386/avx512fp16-64-32-vecop-1.c: New test.
- * gcc.target/i386/avx512fp16-64-32-vecop-2.c: Ditto.
- * gcc.target/i386/pr102230.c: Ditto.
+ PR fortran/66193
+ * gfortran.dg/array_constructor_55.f90: New test.
-2021-09-28 Richard Biener <rguenther@suse.de>
+2022-02-09 David Edelsohn <dje.gcc@gmail.com>
- * gcc.target/i386/vect-pr97352.c: Pass -mno-avx2 -mno-avx512f.
+ * gcc.dg/Wstringop-overflow-69.c: Add -Wno-psabi.
+ * gcc.dg/loop-unswitch-6.c: Omit -fcompare-debug on AIX.
-2021-09-28 Tobias Burnus <tobias@codesourcery.com>
+2022-02-09 H.J. Lu <hjl.tools@gmail.com>
- PR fortran/102500
- * gfortran.dg/include_15.f90: Add 'dg-prune-output' to prune
- -Wmissing-include-dirs output printed or not depending on
- how the testsuite is run.
+ PR target/104441
+ * gcc.target/i386/pr104441-1a.c: Compile with -march=x86-64.
+ * gcc.target/i386/pr104441-1b.c: Likewise.
-2021-09-28 Richard Biener <rguenther@suse.de>
+2022-02-09 Jakub Jelinek <jakub@redhat.com>
- * gcc.dg/vect/bb-slp-pr65935.c: Prefer 128bit vectorization
- on x86.
+ PR c/104427
+ * gcc.dg/pr104427.c: New test.
-2021-09-28 Aldy Hernandez <aldyh@redhat.com>
+2022-02-09 Uroš Bizjak <ubizjak@gmail.com>
- * gcc.dg/auto-init-uninit-1.c: Add -fthread-jumps.
- * gcc.dg/auto-init-uninit-15.c: Same.
- * gcc.dg/guality/example.c: Same.
- * gcc.dg/loop-8.c: Same.
- * gcc.dg/strlenopt-40.c: Same.
- * gcc.dg/tree-ssa/pr18133-2.c: Same.
- * gcc.dg/tree-ssa/pr18134.c: Same.
- * gcc.dg/uninit-1.c: Same.
- * gcc.dg/uninit-pr44547.c: Same.
- * gcc.dg/uninit-pr59970.c: Same.
+ PR target/104462
+ * gcc.target/i386/pr104462.c: New test.
-2021-09-28 liuhongt <hongtao.liu@intel.com>
+2022-02-09 Uroš Bizjak <ubizjak@gmail.com>
- * gcc.target/i386/vect-rebuild.c: Adjust testcases.
- * gcc.target/i386/avx512f-vect-rebuild.c: New test.
+ PR target/104458
+ * gcc.target/i386/pr104458.c: New test.
-2021-09-28 liuhongt <hongtao.liu@intel.com>
+2022-02-09 Ian Lance Taylor <iant@golang.org>
- * gcc.target/i386/avx512fp16-reduce-op-2.c: New test.
- * gcc.target/i386/avx512fp16-reduce-op-3.c: New test.
+ * gcc.misc-tests/godump-1.c: Adjust for alignment field rename.
-2021-09-27 Patrick Palka <ppalka@redhat.com>
+2022-02-09 Bill Schmidt <wschmidt@linux.ibm.com>
- PR c++/102479
- * g++.dg/cpp1z/class-deduction12.C: Also test alias CTAD in the
- same way.
- * g++.dg/cpp1z/class-deduction99.C: New test.
+ * gcc.target/powerpc/vec-replace-word-runnable.c: Handle expected
+ prototypes for each call to vec_replace_unaligned.
-2021-09-27 Aldy Hernandez <aldyh@redhat.com>
+2022-02-09 Richard Sandiford <richard.sandiford@arm.com>
- * gcc.dg/torture/pr55107.c: Adjust.
- * gcc.dg/tree-ssa/phi_on_compare-1.c: Adjust.
- * gcc.dg/tree-ssa/phi_on_compare-2.c: Adjust.
- * gcc.dg/tree-ssa/phi_on_compare-3.c: Adjust.
- * gcc.dg/tree-ssa/phi_on_compare-4.c: Adjust.
- * gcc.dg/tree-ssa/pr21559.c: Adjust.
- * gcc.dg/tree-ssa/pr59597.c: Adjust.
- * gcc.dg/tree-ssa/pr61839_1.c: Adjust.
- * gcc.dg/tree-ssa/pr61839_3.c: Adjust.
- * gcc.dg/tree-ssa/pr71437.c: Adjust.
- * gcc.dg/tree-ssa/ssa-dom-thread-11.c: Adjust.
- * gcc.dg/tree-ssa/ssa-dom-thread-16.c: Adjust.
- * gcc.dg/tree-ssa/ssa-dom-thread-18.c: Adjust.
- * gcc.dg/tree-ssa/ssa-dom-thread-2a.c: Adjust.
- * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Adjust.
- * gcc.dg/tree-ssa/ssa-thread-14.c: Adjust.
- * gcc.dg/tree-ssa/ssa-vrp-thread-1.c: Adjust.
- * gcc.dg/tree-ssa/vrp106.c: Adjust.
- * gcc.dg/tree-ssa/vrp55.c: Adjust.
+ * gcc.target/aarch64/vec-init-13.c: New test.
+ * gcc.target/aarch64/vec-init-14.c: Likewise.
+ * gcc.target/aarch64/vec-init-15.c: Likewise.
+ * gcc.target/aarch64/vec-init-16.c: Likewise.
+ * gcc.target/aarch64/vec-init-17.c: Likewise.
-2021-09-27 Martin Liska <mliska@suse.cz>
+2022-02-09 Richard Sandiford <richard.sandiford@arm.com>
- * gcc.c-torture/compile/attr-complex-method-2.c: New test.
- * gcc.c-torture/compile/attr-complex-method.c: New test.
+ * gcc.target/aarch64/vec-init-12.c: New test.
-2021-09-27 Tobias Burnus <tobias@codesourcery.com>
+2022-02-09 Richard Sandiford <richard.sandiford@arm.com>
- PR fortran/94070
- * gfortran.dg/c-interop/cf-out-descriptor-6.f90: Remove xfail.
- * gfortran.dg/c-interop/size.f90: Remove xfail.
- * gfortran.dg/intrinsic_size_3.f90: Update scan-tree-dump-times.
- * gfortran.dg/transpose_optimization_2.f90: Likewise.
- * gfortran.dg/size_optional_dim_1.f90: Add scan-tree-dump-not.
- * gfortran.dg/assumed_rank_22.f90: New test.
- * gfortran.dg/assumed_rank_22_aux.c: New test.
-
-2021-09-27 Andrew Pinski <apinski@marvell.com>
-
- PR c/94726
- * gcc.dg/pr94726.c: New test.
-
-2021-09-27 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/97351
- PR tree-optimization/97352
- PR tree-optimization/82426
- * gcc.target/i386/vect-pr82426.c: New testcase.
- * gcc.target/i386/vect-pr97352.c: Likewise.
-
-2021-09-27 liuhongt <hongtao.liu@intel.com>
-
- Revert:
- 2021-09-27 liuhongt <hongtao.liu@intel.com>
-
- PR target/101059
- * gcc.target/i386/sse2-pr101059.c: New test.
- * gcc.target/i386/sse3-pr101059.c: New test.
-
-2021-09-26 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/101334
- * gfortran.dg/associated_assumed_rank.f90: New test.
-
-2021-09-25 Dimitar Dimitrov <dimitar@dinux.eu>
-
- * gcc.target/pru/regio-as-pointer.c: New negative test.
- * gcc.target/pru/regio-as-pointer-2.c: New negative test.
- * gcc.target/pru/regio-decl-2.c: New negative test.
- * gcc.target/pru/regio-decl-3.c: New negative test.
- * gcc.target/pru/regio-decl-4.c: New negative test.
- * gcc.target/pru/regio-decl.c: New negative test.
- * gcc.target/pru/regio-di.c: New negative test.
- * gcc.target/pru/regio-hi.c: New negative test.
- * gcc.target/pru/regio-qi.c: New negative test.
- * gcc.target/pru/regio.c: New test.
- * gcc.target/pru/regio.h: New helper header.
-
-2021-09-24 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/102458
- * gfortran.dg/pr102458.f90: New test.
-
-2021-09-24 Sandra Loosemore <sandra@codesourcery.com>
-
- PR fortran/101333
- * gfortran.dg/c-interop/c407c-1.f90: Remove xfails.
-
-2021-09-24 Patrick Palka <ppalka@redhat.com>
-
- PR c++/98216
- PR c++/91292
- * g++.dg/cpp2a/nontype-float2.C: New test.
-
-2021-09-24 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/55534
- * gfortran.dg/include_9.f90: Add dg-prune-output.
- * gfortran.dg/include_23.f90: New test.
- * gfortran.dg/include_24.f90: New test.
-
-2021-09-24 Aldy Hernandez <aldyh@redhat.com>
-
- * gcc.dg/tree-ssa/20030714-2.c: Adjust.
- * gcc.dg/tree-ssa/pr66752-3.c: Adjust.
- * gcc.dg/tree-ssa/pr77445-2.c: Adjust.
- * gcc.dg/tree-ssa/ssa-dom-thread-18.c: Adjust.
- * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Adjust.
- * gcc.dg/vect/bb-slp-16.c: Adjust.
-
-2021-09-24 Hongyu Wang <hongyu.wang@intel.com>
-
- * gcc.target/i386/cond_op_addsubmuldiv__Float16-1.c: New test.
- * gcc.target/i386/cond_op_addsubmuldiv__Float16-2.c: Ditto.
- * gcc.target/i386/cond_op_fma__Float16-1.c: Ditto.
- * gcc.target/i386/cond_op_fma__Float16-2.c: Ditto.
- * gcc.target/i386/cond_op_maxmin__Float16-1.c: Ditto.
- * gcc.target/i386/cond_op_maxmin__Float16-2.c: Ditto.
-
-2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
-
- PR fortran/101320
- * gfortran.dg/c-interop/c516.f90: Remove xfails. Add more
- tests.
-
-2021-09-23 Michel Morin <mimomorin@gmail.com>
-
- PR c++/77565
- * g++.dg/spellcheck-pr77565.C: New test.
-
-2021-09-23 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/pr102463.c: New.
-
-2021-09-23 Harald Anlauf <anlauf@gmx.de>
- Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/93834
- * gfortran.dg/coarray/coarray_allocated.f90: New test.
-
-2021-09-23 Bill Schmidt <wschmidt@linux.ibm.com>
-
- PR target/102024
- * g++.target/powerpc/pr102024.C: New.
-
-2021-09-23 Hongyu Wang <hongyu.wang@intel.com>
-
- * g++.target/i386/avx512fp16-vcondmn-vec.C: New test.
- * g++.target/i386/avx512fp16-vcondmn-minmax.C: Ditto.
- * gcc.target/i386/avx512fp16-vcondmn-loop-1.c: Ditto.
- * gcc.target/i386/avx512fp16-vcondmn-loop-2.c: Ditto.
- * gcc.target/i386/avx512fp16-vec_cmpmn.c: Ditto.
-
-2021-09-23 Hongyu Wang <hongyu.wang@intel.com>
-
- * gcc.target/i386/avx512fp16-trunc-extendvnhf.c: New test.
-
-2021-09-23 Hongyu Wang <hongyu.wang@intel.com>
-
- * gcc.target/i386/avx512fp16-floatvnhf.c: New test.
-
-2021-09-23 Hongyu Wang <hongyu.wang@intel.com>
-
- * gcc.target/i386/avx512fp16-trunchf.c: New test.
- * gcc.target/i386/avx512fp16-truncvnhf.c: Ditto.
-
-2021-09-23 Hongyu Wang <hongyu.wang@intel.com>
-
- * gcc.target/i386/avx512fp16-builtin-minmax-1.c: New test.
-
-2021-09-23 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-fma-1.c: New test.
- * gcc.target/i386/avx512fp16vl-fma-1.c: New test.
- * gcc.target/i386/avx512fp16vl-fma-vectorize-1.c: New test.
-
-2021-09-23 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-builtin-round-1.c: Add new testcase.
-
-2021-09-23 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/102413
- * g++.dg/gomp/attrs-14.C: New test.
-
-2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
-
- PR fortran/101319
- * gfortran.dg/c-interop/assumed-type-dummy.f90: Remove xfail.
-
-2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
-
- PR fortran/101334
- * gfortran.dg/c-interop/c535b-2.f90: Remove xfails.
- * gfortran.dg/c-interop/c535b-3.f90: Likewise.
-
-2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
-
- * gfortran.dg/assumed_rank_18.f90 (g): Wrap call to h in
- select rank.
- * gfortran.dg/assumed_type_10.f90 (test_array): Likewise for
- call to test_lib.
- * gfortran.dg/assumed_type_11.f90 (test_array): Likewise.
-
-2021-09-22 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/55534
- * gfortran.dg/include_14.f90: Add -J testcase and update dg-output.
- * gfortran.dg/include_15.f90: Likewise.
- * gfortran.dg/include_16.f90: Likewise.
- * gfortran.dg/include_17.f90: Likewise.
- * gfortran.dg/include_18.f90: Likewise.
- * gfortran.dg/include_19.f90: Likewise.
-
-2021-09-22 Roger Sayle <roger@nextmovesoftware.com>
- Richard Biener <rguenther@suse.de>
-
- * gcc.dg/fold-negate-1.c: New test case.
-
-2021-09-22 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/auto-init-2.c: Replace ia32 with { ! lp64 }.
- * gcc.target/i386/auto-init-3.c (dg-options): Add -msse.
- (dg-additional-options): Add -mfpmath=387 for ia32.
- Replace lp64 with { ! ia32 }. Add a space after ia32.
- * gcc.target/i386/auto-init-4.c: Replace lp64 with { ! ia32 }.
- * gcc.target/i386/auto-init-5.c: Likewise.
- * gcc.target/i386/auto-init-padding-3.c: Likewise.
- * gcc.target/i386/auto-init-padding-7.c: Likewise.
- * gcc.target/i386/auto-init-padding-8.c: Likewise.
- * gcc.target/i386/auto-init-padding-9.c: Likewise.
-
-2021-09-22 Patrick Palka <ppalka@redhat.com>
-
- DR 2446
- PR c++/102412
- * g++.dg/cpp2a/concepts-nondep2.C: New test.
- * g++.dg/cpp2a/concepts-nondep3.C: New test.
-
-2021-09-22 Jiufu Guo <guojiufu@linux.ibm.com>
-
- PR tree-optimization/102087
- * gcc.dg/pr102087.c: New test.
-
-2021-09-22 dianhong xu <dianhong.xu@intel.com>
-
- * gcc.target/i386/avx512fp16-14.c: New test.
-
-2021-09-22 dianhong xu <dianhong.xu@intel.com>
-
- * gcc.target/i386/avx512fp16-conjugation-1.c: New test.
- * gcc.target/i386/avx512fp16vl-conjugation-1.c: New test.
-
-2021-09-22 dianhong xu <dianhong.xu@intel.com>
-
- * gcc.target/i386/avx512fp16-reduce-op-1.c: New test.
- * gcc.target/i386/avx512fp16vl-reduce-op-1.c: Ditto.
-
-2021-09-22 dianhong xu <dianhong.xu@intel.com>
-
- * gcc.target/i386/avx512fp16-13.c: New test.
-
-2021-09-22 Andreas Krebbel <krebbel@linux.ibm.com>
-
- * gcc.target/s390/pr102222.c: New test.
-
-2021-09-22 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/102415
- * c-c++-common/gomp/scope-3.c: New test.
-
-2021-09-22 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/allocate-6.c: New test.
- * c-c++-common/gomp/allocate-7.c: New test.
- * g++.dg/gomp/allocate-4.C: New test.
-
-2021-09-22 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512vl-pr95046.c: New test.
-
-2021-09-22 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/pr92658-avx512f.c: Refine testcase.
- * gcc.target/i386/pr92658-avx512vl.c: Adjust scan-assembler,
- only v2di->v2qi truncate is not supported, v4di->v4qi should
- be supported.
-
-2021-09-22 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-builtin-fpcompare-1.c: New test.
- * gcc.target/i386/avx512fp16-builtin-fpcompare-2.c: New test.
-
-2021-09-22 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-builtin-round-1.c: New test.
-
-2021-09-22 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-builtin-sqrt-1.c: New test.
- * gcc.target/i386/avx512fp16vl-builtin-sqrt-1.c: New test.
-
-2021-09-22 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-vfcmaddcsh-1a.c: New test.
- * gcc.target/i386/avx512fp16-vfcmaddcsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfcmulcsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfcmulcsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmaddcsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmaddcsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmulcsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmulcsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-complex-constraints.c: Ditto.
-
-2021-09-22 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-22 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-helper.h
- (init_src): Adjust init value.
- (NET_CMASK): New net mask for complex input.
- * gcc.target/i386/avx512fp16-vfcmaddcph-1a.c: New test.
- * gcc.target/i386/avx512fp16-vfcmaddcph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfcmulcph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfcmulcph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmaddcph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmaddcph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmulcph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmulcph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfcmaddcph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfcmaddcph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfcmulcph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfcmulcph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfmaddcph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfmaddcph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfmulcph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfmulcph-1b.c: Ditto.
-
-2021-09-22 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-22 Barrett Adair <barrettellisadair@gmail.com>
-
- * g++.dg/cpp0x/constexpr-52830.C: Remove unwanted dg-ice.
- * g++.dg/template/canon-type-15.C: New test.
- * g++.dg/template/canon-type-16.C: New test.
- * g++.dg/template/canon-type-17.C: New test.
- * g++.dg/template/canon-type-18.C: New test.
- * g++.dg/template/dependent-name15.C: New regression test.
- * g++.dg/template/dependent-name16.C: New regression test.
-
-2021-09-21 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102421
- * g++.dg/vect/pr102421.cc: New testcase.
-
-2021-09-21 Eric Botcazou <ebotcazou@adacore.com>
-
- * lib/target-supports.exp (no_fsanitize_address): Add missing bits.
- * gcc.dg/uninit-pr93100.c: Skip if no_fsanitize_address.
- * gcc.dg/pr91441.c: Likewise.
- * gcc.dg/pr96260.c: Likewise.
- * gcc.dg/pr96307.c: Likewise.
- * g++.dg/warn/uninit-pr93100.C: Likewise.
- * gnat.dg/asan1.adb: Likewise.
- * gcc.dg/Wstringop-overflow-70.c: Adjust for SPARC.
- * g++.dg/abi/anon4.C: Likewise.
-
-2021-09-21 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/include_6.f90: Change dg-error to
- dg-warning and update pattern.
- * gfortran.dg/include_14.f90: New test.
- * gfortran.dg/include_15.f90: New test.
- * gfortran.dg/include_16.f90: New test.
- * gfortran.dg/include_17.f90: New test.
- * gfortran.dg/include_18.f90: New test.
- * gfortran.dg/include_19.f90: New test.
- * gfortran.dg/include_20.f90: New test.
- * gfortran.dg/include_21.f90: New test.
-
-2021-09-21 wangpc <pc.wang@linux.alibaba.com>
-
- * g++.target/aarch64/sve/static-var-in-template.C: New test.
-
-2021-09-20 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/tree-ssa/evrp-ignore.c: New.
-
-2021-09-20 Matthias Kretz <m.kretz@gsi.de>
-
- * gcc.dg/associative-math-1.c: New test.
- * gcc.dg/associative-math-2.c: New test.
- * gcc.dg/no-signed-zeros-1.c: New test.
- * gcc.dg/no-signed-zeros-2.c: New test.
- * gcc.dg/no-trapping-math-1.c: New test.
- * gcc.dg/no-trapping-math-2.c: New test.
- * gcc.dg/reciprocal-math-1.c: New test.
- * gcc.dg/reciprocal-math-2.c: New test.
- * gcc.dg/rounding-math-1.c: New test.
- * gcc.dg/rounding-math-2.c: New test.
-
-2021-09-20 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/gomp/order-5.f90: New test.
- * gfortran.dg/gomp/order-6.f90: New test.
- * gfortran.dg/gomp/order-7.f90: New test.
- * gfortran.dg/gomp/order-8.f90: New test.
- * gfortran.dg/gomp/order-9.f90: New test.
-
-2021-09-20 Christophe Lyon <christophe.lyon@foss.st.com>
- Torbjörn SVENSSON <torbjorn.svensson@st.com>
-
- * lib/prune.exp (prune_gcc_output): Remove .exe suffix from
- toolchain executables names.
-
-2021-09-20 Thomas Schwinge <thomas@codesourcery.com>
-
- * gcc.dg/plugin/diagnostic-test-string-literals-1.c: Adjust
- expected error diagnostics.
-
-2021-09-20 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/65206
- * gcc.dg/torture/20210916.c: New testcase.
- * gcc.dg/vect/pr65206.c: Likewise.
-
-2021-09-19 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/102403
- * gcc.dg/uninit-pr102403.c: New test.
- * gcc.dg/uninit-pr102403-c2.c: New test.
-
-2021-09-19 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/102243
- * g++.dg/warn/Wplacement-new-size-10.C: New test.
-
-2021-09-19 Jeff Law <jeffreyalaw@gmail.com>
-
- * gfortran.dg/goacc/privatization-1-compute.f90: Make test names
- unique.
- * gfortran.dg/goacc/routine-external-level-of-parallelism-2.f:
- Likewise.
+ * gcc.target/aarch64/vec-init-9.c: New test.
+ * gcc.target/aarch64/vec-init-10.c: Likewise.
+ * gcc.target/aarch64/vec-init-11.c: Likewise.
-2021-09-19 Iain Sandoe <iain@sandoe.co.uk>
-
- * jit.dg/jit.exp (fixed_local_execute): Amend the match and
- exit conditions to cater for more platforms.
-
-2021-09-19 Roger Sayle <roger@nextmovesoftware.com>
-
- PR middle-end/88173
- * c-c++-common/pr57371-4.c: Tweak/correct test case for QNaNs.
- * g++.dg/pr88173-1.C: New test case.
- * g++.dg/pr88173-2.C: New test case.
-
-2021-09-18 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/order-1.c (f2): Add tests for distribute
- with order clause.
- (f3): Remove.
- * c-c++-common/gomp/order-2.c: Don't expect error for distribute
- with order clause.
- * c-c++-common/gomp/order-5.c: New test.
- * c-c++-common/gomp/order-6.c: New test.
- * c-c++-common/gomp/clause-dups-1.c (f1): Add tests for
- duplicated order clause.
- (f9): New function.
- * c-c++-common/gomp/clauses-1.c (baz, bar): Don't mix copyin and
- order(concurrent) clauses on the same composite construct combined
- with distribute, instead split it into two tests, one without
- copyin and one without order(concurrent). Add order(concurrent)
- clauses to {,{,target} teams} distribute.
- * g++.dg/gomp/attrs-1.C (baz, bar): Likewise.
- * g++.dg/gomp/attrs-2.C (baz, bar): Likewise.
-
-2021-09-18 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/default-2.c: New test.
- * c-c++-common/gomp/default-3.c: New test.
- * g++.dg/gomp/default-1.C: New test.
-
-2021-09-18 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-vfmaddXXXsh-1a.c: New test.
- * gcc.target/i386/avx512fp16-vfmaddXXXsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmsubXXXsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmsubXXXsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfnmaddXXXsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfnmaddXXXsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfnmsubXXXsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfnmsubXXXsh-1b.c: Ditto.
-
-2021-09-18 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-18 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/avx512fp16-xorsign-1.c: New test.
-
-2021-09-18 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-neg-1a.c: New test.
- * gcc.target/i386/avx512fp16-neg-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-scalar-bitwise-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-scalar-bitwise-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vector-bitwise-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vector-bitwise-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-neg-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-neg-1b.c: Ditto.
-
-2021-09-18 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-vfmaddXXXph-1a.c: New test.
- * gcc.target/i386/avx512fp16-vfmaddXXXph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmsubXXXph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmsubXXXph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfnmaddXXXph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfnmaddXXXph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfnmsubXXXph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfnmsubXXXph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfmaddXXXph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfmaddXXXph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfmsubXXXph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfmsubXXXph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfnmaddXXXph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfnmaddXXXph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfnmsubXXXph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfnmsubXXXph-1b.c: Ditto.
-
-2021-09-18 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test fot new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-18 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-vfmaddsubXXXph-1a.c: New test.
- * gcc.target/i386/avx512fp16-vfmaddsubXXXph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmsubaddXXXph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfmsubaddXXXph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfmaddsubXXXph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfmaddsubXXXph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfmsubaddXXXph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfmsubaddXXXph-1b.c: Ditto.
-
-2021-09-18 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-18 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-broadcast-1.c: New test.
- * gcc.target/i386/avx512fp16-broadcast-2.c: New test.
-
-2021-09-18 Jason Merrill <jason@redhat.com>
-
- * g++.dg/template/dtor5.C: Adjust expected error.
- * g++.dg/cpp23/lookup2.C: New test.
- * g++.dg/template/dtor11.C: New test.
-
-2021-09-17 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/102366
- * gfortran.dg/pr102366.f90: New test.
-
-2021-09-17 qing zhao <qing.zhao@oracle.com>
-
- * gcc.target/i386/auto-init-1.c: Restrict the testing only for
- -march=x86-64 and -mtune=generic. Add -fno-stack-protector.
- * gcc.target/i386/auto-init-2.c: Restrict the testing only for
- -march=x86-64 and -mtune=generic -msse.
- * gcc.target/i386/auto-init-3.c: Likewise.
- * gcc.target/i386/auto-init-4.c: Likewise.
- * gcc.target/i386/auto-init-5.c: Different pattern match for lp64 and
- ia32.
- * gcc.target/i386/auto-init-6.c: Restrict the testing only for
- -march=x86-64 and -mtune-generic -msse. Add -fno-stack-protector.
- * gcc.target/i386/auto-init-7.c: Likewise.
- * gcc.target/i386/auto-init-8.c: Restrict the testing only for
- -march=x86-64 and -mtune=generic -msse..
- * gcc.target/i386/auto-init-padding-1.c: Likewise.
- * gcc.target/i386/auto-init-padding-10.c: Likewise.
- * gcc.target/i386/auto-init-padding-11.c: Likewise.
- * gcc.target/i386/auto-init-padding-12.c: Likewise.
- * gcc.target/i386/auto-init-padding-2.c: Likewise.
- * gcc.target/i386/auto-init-padding-3.c: Restrict the testing only for
- -march=x86-64. Different pattern match for lp64 and ia32.
- * gcc.target/i386/auto-init-padding-4.c: Restrict the testing only for
- -march=x86-64 and -mtune-generic -msse.
- * gcc.target/i386/auto-init-padding-5.c: Likewise.
- * gcc.target/i386/auto-init-padding-6.c: Likewise.
- * gcc.target/i386/auto-init-padding-7.c: Restrict the testing only for
- -march=x86-64 and -mtune-generic -msse. Add -fno-stack-protector.
- * gcc.target/i386/auto-init-padding-8.c: Likewise.
- * gcc.target/i386/auto-init-padding-9.c: Restrict the testing only for
- -march=x86-64. Different pattern match for lp64 and ia32.
-
-2021-09-17 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/102200
- * gcc.dg/Wstringop-overflow-62.c: Adjust text of an expected note.
- * gcc.dg/Warray-bounds-89.c: New test.
- * gcc.dg/Wstringop-overflow-74.c: New test.
- * gcc.dg/Wstringop-overflow-75.c: New test.
- * gcc.dg/Wstringop-overflow-76.c: New test.
-
-2021-09-17 Sandra Loosemore <sandra@codesourcery.com>
-
- * gfortran.dg/PR100914.c: Do not include quadmath.h. Use
- _Float128 _Complex instead of __complex128.
- * gfortran.dg/PR100914.f90: Add -Wno-pedantic to suppress error
- about use of _Float128.
- * gfortran.dg/c-interop/typecodes-array-float128-c.c: Use
- _Float128 instead of __float128.
- * gfortran.dg/c-interop/typecodes-sanity-c.c: Likewise.
- * gfortran.dg/c-interop/typecodes-scalar-float128-c.c: Likewise.
- * lib/target-supports.exp
- (check_effective_target_fortran_real_c_float128): Update comments.
-
-2021-09-17 Roger Sayle <roger@nextmovesoftware.com>
-
- PR c/102245
- * gcc.dg/Wint-in-bool-context-4.c: New test case.
-
-2021-09-17 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/atomic-18.c: Expect same diagnostics in C++ as in
- C.
- * c-c++-common/gomp/atomic-25.c: Drop c effective target.
- * c-c++-common/gomp/atomic-26.c: Likewise.
- * c-c++-common/gomp/atomic-27.c: Likewise.
- * c-c++-common/gomp/atomic-28.c: Likewise.
- * c-c++-common/gomp/atomic-29.c: Likewise.
- * c-c++-common/gomp/atomic-30.c: Likewise. Adjust expected diagnostics
- for C++ when it differs from C.
- (foo): Change return type from double to void.
- * g++.dg/gomp/atomic-5.C: Adjust expected diagnostics wording.
- * g++.dg/gomp/atomic-20.C: New test.
-
-2021-09-17 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/avx-covert-1.c: New file.
- * gcc.target/i386/avx-fp-covert-1.c: Likewise.
- * gcc.target/i386/avx-int-covert-1.c: Likewise.
- * gcc.target/i386/sse-covert-1.c: Likewise.
- * gcc.target/i386/sse-fp-covert-1.c: Likewise.
- * gcc.target/i386/sse-int-covert-1.c: Likewise.
-
-2021-09-17 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101900
- * gcc.target/i386/pr101900-1.c: New test.
- * gcc.target/i386/pr101900-2.c: Likewise.
- * gcc.target/i386/pr101900-3.c: Likewise.
-
-2021-09-17 Eric Botcazou <ebotcazou@adacore.com>
-
- * gcc.target/sparc/20210917-1.c: New test.
-
-2021-09-17 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-typecast-1.c: New test.
- * gcc.target/i386/avx512fp16-typecast-2.c: Ditto.
- * gcc.target/i386/avx512fp16vl-typecast-1.c: Ditto.
- * gcc.target/i386/avx512fp16vl-typecast-2.c: Ditto.
-
-2021-09-17 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-vcvtsd2sh-1a.c: New test.
- * gcc.target/i386/avx512fp16-vcvtsd2sh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsh2sd-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsh2sd-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsh2ss-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsh2ss-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtss2sh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtss2sh-1b.c: Ditto.
-
-2021-09-17 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-17 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-helper.h (V512): Add DF contents.
- (src3f): New.
- * gcc.target/i386/avx512fp16-vcvtpd2ph-1a.c: New test.
- * gcc.target/i386/avx512fp16-vcvtpd2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2pd-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2pd-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2psx-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2psx-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtps2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtps2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtpd2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtpd2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2pd-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2pd-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2psx-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2psx-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtps2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtps2ph-1b.c: Ditto.
-
-2021-09-17 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-17 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-vcvttsh2si-1a.c: New test.
- * gcc.target/i386/avx512fp16-vcvttsh2si-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttsh2si64-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttsh2si64-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttsh2usi-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttsh2usi-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttsh2usi64-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttsh2usi64-1b.c: Ditto.
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-17 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-vcvttph2dq-1a.c: New test.
- * gcc.target/i386/avx512fp16-vcvttph2dq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttph2qq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttph2qq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttph2udq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttph2udq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttph2uqq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttph2uqq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttph2uw-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttph2uw-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttph2w-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvttph2w-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvttph2dq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvttph2dq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvttph2qq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvttph2qq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvttph2udq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvttph2udq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvttph2uqq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvttph2uqq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvttph2uw-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvttph2uw-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvttph2w-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvttph2w-1b.c: Ditto.
-
-2021-09-17 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-17 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-helper.h (V512): Add int32
- component.
- * gcc.target/i386/avx512fp16-vcvtsh2si-1a.c: New test.
- * gcc.target/i386/avx512fp16-vcvtsh2si-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsh2si64-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsh2si64-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsh2usi-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsh2usi-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsh2usi64-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsh2usi64-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsi2sh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsi2sh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsi2sh64-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtsi2sh64-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtusi2sh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtusi2sh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtusi2sh64-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtusi2sh64-1b.c: Ditto.
-
-2021-09-17 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-16 Patrick Palka <ppalka@redhat.com>
-
- PR c++/98486
- * g++.dg/cpp2a/concepts-var-templ1.C: New test.
- * g++.dg/cpp2a/concepts-var-templ1a.C: New test.
- * g++.dg/cpp2a/concepts-var-templ1b.C: New test.
-
-2021-09-16 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/102287
- * gfortran.dg/intent_out_14.f90: New test.
-
-2021-09-16 Richard Biener <rguenther@suse.de>
-
- PR middle-end/102360
- * g++.dg/pr102360.C: New testcase.
-
-2021-09-16 Richard Earnshaw <rearnsha@arm.com>
-
- * g++.dg/eh/arm-vfp-unwind.C: Support single-precision.
-
-2021-09-16 liuhongt <hongtao.liu@intel.com>
-
- PR middle-end/102080
- * gcc.target/i386/pr102080.c: New test.
-
-2021-09-16 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-vcvtdq2ph-1a.c: New test.
- * gcc.target/i386/avx512fp16-vcvtdq2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtqq2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtqq2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtudq2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtudq2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtuqq2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtuqq2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtuw2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtuw2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtw2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtw2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtdq2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtdq2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtqq2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtqq2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtudq2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtudq2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtuqq2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtuqq2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtuw2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtuw2ph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtw2ph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtw2ph-1b.c: Ditto.
-
-2021-09-16 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-16 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-helper.h (V512): Add QI
- components.
- * gcc.target/i386/avx512fp16-vcvtph2dq-1a.c: New test.
- * gcc.target/i386/avx512fp16-vcvtph2dq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2qq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2qq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2udq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2udq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2uqq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2uqq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2uw-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2uw-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2w-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcvtph2w-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2dq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2dq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2qq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2qq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2udq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2udq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2uqq-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2uqq-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2uw-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2uw-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2w-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcvtph2w-1b.c: Ditto.
+2022-02-09 Richard Sandiford <richard.sandiford@arm.com>
-2021-09-16 liuhongt <hongtao.liu@intel.com>
+ * gcc.target/aarch64/vec-init-8.c: New test.
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
+2022-02-09 Richard Sandiford <richard.sandiford@arm.com>
-2021-09-16 liuhongt <hongtao.liu@intel.com>
+ * gcc.target/aarch64/vec-init-6.c: New file.
+ * gcc.target/aarch64/vec-init-7.c: New file.
- * gcc.target/i386/avx512fp16-vmovsh-1a.c: New test.
- * gcc.target/i386/avx512fp16-vmovsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vmovw-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vmovw-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vmovw-2a.c: Ditto.
- * gcc.target/i386/avx512fp16-vmovw-2b.c: Ditto.
- * gcc.target/i386/avx512fp16-vmovw-3a.c: Ditto.
- * gcc.target/i386/avx512fp16-vmovw-3b.c: Ditto.
- * gcc.target/i386/avx512fp16-vmovw-4a.c: Ditto.
- * gcc.target/i386/avx512fp16-vmovw-4b.c: Ditto.
+2022-02-09 Patrick Palka <ppalka@redhat.com>
-2021-09-15 Patrick Palka <ppalka@redhat.com>
+ PR c++/104432
+ * g++.dg/template/non-dependent19.C: New test.
+ * g++.dg/template/non-dependent19a.C: New test.
+ * g++.dg/template/non-dependent20.C: New test.
- PR c++/101904
- * g++.dg/ext/conv2.C: New test.
- * g++.dg/template/conv17.C: Extend test.
+2022-02-09 Jason Merrill <jason@redhat.com>
-2021-09-15 Jakub Jelinek <jakub@redhat.com>
+ PR c++/103752
+ * g++.dg/modules/explicit-bool-1_b.C: New test.
+ * g++.dg/modules/explicit-bool-1_a.H: New test.
- PR c++/88578
- PR c++/102295
- * g++.dg/ext/flexary39.C: New test.
- * g++.dg/ext/flexary40.C: New test.
+2022-02-09 Richard Biener <rguenther@suse.de>
-2021-09-15 Patrick Palka <ppalka@redhat.com>
+ PR middle-end/104464
+ * gcc.dg/pr104464.c: New testcase.
- PR c++/102050
- * g++.dg/cpp0x/initlist125.C: New test.
- * g++.dg/cpp0x/initlist126.C: New test.
-
-2021-09-15 Alexandre Oliva <oliva@adacore.com>
-
- * gnat.dg/zcur_attr.adb, gnat.dg/zcur_attr.ads: New.
-
-2021-09-15 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/pr102327-1.c: New test.
- * gcc.target/i386/pr102327-2.c: New test.
- * gcc.target/i386/avx512fp16-1c.c: Adjust testcase.
-
-2021-09-15 Hongyu Wang <hongyu.wang@intel.com>
+2022-02-09 Jason Merrill <jason@redhat.com>
- * gcc.target/i386/avx-1.c: Adjust builtin macros.
- * gcc.target/i386/sse-13.c: Likewise.
- * gcc.target/i386/sse-23.c: Likewise.
+ * g++.dg/cpp23/feat-cxx2b.C: Adjust.
+ * g++.dg/cpp2a/feat-cxx2a.C: Adjust.
-2021-09-15 Richard Biener <rguenther@suse.de>
+2022-02-09 Roger Sayle <roger@nextmovesoftware.com>
- PR tree-optimization/102318
- * gcc.dg/vect/pr102318.c: New testcase.
+ PR tree-optimization/104420
+ * gcc.dg/pr104420-1.c: New test case.
+ * gcc.dg/pr104420-2.c: New test case.
+ * gcc.dg/pr104420-3.c: New test case.
+ * gcc.dg/pr104420-4.c: New test case.
+ * gcc.dg/pr96392.c: Remove incorrect test.
-2021-09-15 Hongtao Liu <hongtao.liu@intel.com>
- Peter Cordes <peter@cordes.ca>
+2022-02-09 Jakub Jelinek <jakub@redhat.com>
- PR target/91103
- * gcc.target/i386/pr91103-1.c: Add extract tests.
- * gcc.target/i386/pr91103-2.c: Ditto.
+ PR debug/104407
+ * g++.dg/debug/dwarf2/pr104407.C: New test.
-2021-09-15 Thomas Schwinge <thomas@codesourcery.com>
+2022-02-09 Andrew MacLeod <amacleod@redhat.com>
- * gfortran.dg/goacc/unexpected-end.f90: Add OpenACC 'host_data'
- testing.
+ PR tree-optimization/104288
+ * gcc.dg/pr104288.c: New.
-2021-09-15 Jason Merrill <jason@redhat.com>
+2022-02-09 Richard Biener <rguenther@suse.de>
- PR c++/48396
- * g++.dg/rtti/undeclared1.C: New test.
+ PR tree-optimization/104445
+ PR tree-optimization/102832
+ * gcc.dg/vect/pr104445.c: New testcase.
+ * gcc.dg/vect/pr102832.c: New file.
-2021-09-14 Harald Anlauf <anlauf@gmx.de>
+2022-02-09 H.J. Lu <hjl.tools@gmail.com>
- PR fortran/102311
- * gfortran.dg/entry_25.f90: New test.
+ PR target/35513
+ PR target/100593
+ * g++.target/i386/pr35513-1.C: New file.
+ * g++.target/i386/pr35513-2.C: Likewise.
+ * gcc.target/i386/pr35513-1a.c: Likewise.
+ * gcc.target/i386/pr35513-1b.c: Likewise.
+ * gcc.target/i386/pr35513-2a.c: Likewise.
+ * gcc.target/i386/pr35513-2b.c: Likewise.
+ * gcc.target/i386/pr35513-3a.c: Likewise.
+ * gcc.target/i386/pr35513-3b.c: Likewise.
+ * gcc.target/i386/pr35513-4a.c: Likewise.
+ * gcc.target/i386/pr35513-4b.c: Likewise.
+ * gcc.target/i386/pr35513-5a.c: Likewise.
+ * gcc.target/i386/pr35513-5b.c: Likewise.
+ * gcc.target/i386/pr35513-6a.c: Likewise.
+ * gcc.target/i386/pr35513-6b.c: Likewise.
+ * gcc.target/i386/pr35513-7a.c: Likewise.
+ * gcc.target/i386/pr35513-7b.c: Likewise.
+ * gcc.target/i386/pr35513-8.c: Likewise.
+ * gcc.target/i386/pr35513-9a.c: Likewise.
+ * gcc.target/i386/pr35513-9b.c: Likewise.
+ * gcc.target/i386/pr35513-10a.c: Likewise.
+ * gcc.target/i386/pr35513-10b.c: Likewise.
+ * gcc.target/i386/pr35513-11a.c: Likewise.
+ * gcc.target/i386/pr35513-11b.c: Likewise.
+ * gcc.target/i386/pr35513-12a.c: Likewise.
+ * gcc.target/i386/pr35513-12b.c: Likewise.
-2021-09-14 Peter Bergner <bergner@linux.ibm.com>
+2022-02-09 H.J. Lu <hjl.tools@gmail.com>
- * gcc.target/powerpc/mma-builtin-6.c: Add second call to xxsetacc
- built-in. Update instruction counts.
+ PR target/104441
+ * gcc.target/i386/pr104441-1a.c: New test.
+ * gcc.target/i386/pr104441-1b.c: Likewise.
-2021-09-14 Patrick Palka <ppalka@redhat.com>
+2022-02-09 liuhongt <hongtao.liu@intel.com>
- PR c++/102163
- * g++.dg/cpp0x/constexpr-empty17.C: New test.
+ PR target/104451
+ * gcc.target/i386/pr104451.c: New test.
-2021-09-14 Jakub Jelinek <jakub@redhat.com>
+2022-02-09 Richard Biener <rguenther@suse.de>
- PR c++/102295
- * g++.target/i386/pr102295.C: New test.
+ PR middle-end/104450
+ * g++.dg/torture/pr104450.C: New testcase.
-2021-09-14 Jakub Jelinek <jakub@redhat.com>
+2022-02-09 Richard Biener <rguenther@suse.de>
- PR c++/102305
- * g++.dg/cpp0x/pr102305.C: New test.
+ PR target/104453
+ * gcc.target/i386/pr104453.c: New testcase.
-2021-09-14 Tobias Burnus <tobias@codesourcery.com>
+2022-02-09 Joel Teichroeb <joel@teichroeb.net>
- PR fortran/102313
- * gfortran.dg/goacc/unexpected-end.f90: New test.
- * gfortran.dg/gomp/unexpected-end.f90: New test.
+ PR analyzer/101081
+ * gcc.dg/analyzer/analyzer-verbosity-2a.c: Replace #include of
+ stdio.h with declarations needed by the test.
+ * gcc.dg/analyzer/analyzer-verbosity-3a.c: Likewise.
+ * gcc.dg/analyzer/edges-1.c: Likewise.
+ * gcc.dg/analyzer/file-1.c: Likewise.
+ * gcc.dg/analyzer/file-2.c: Likewise.
+ * gcc.dg/analyzer/file-paths-1.c: Likewise.
+ * gcc.dg/analyzer/file-pr58237.c: Likewise.
+ * gcc.dg/analyzer/pr99716-1.c: Likewise.
-2021-09-14 Martin Liska <mliska@suse.cz>
+2022-02-09 David Malcolm <dmalcolm@redhat.com>
- * g++.dg/gcov/gcov.py: Fix failing pytests as gcov.json.gz
- filename was changed in b777f228b481ae881a7fbb09de367a053740932c.
+ PR analyzer/104452
+ * gcc.dg/analyzer/pr104452.c: New test.
-2021-09-14 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/enum_rep2.adb: New test.
-
-2021-09-14 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/atomic-29.c: Add -march=pentium
- dg-additional-options for ia32. Use sync_long_long effective target
- instead of sync_int_long.
- * lib/target-supports.exp (check_effective_target_sync_long_long): Fix
- a syntax error.
-
-2021-09-14 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-helper.h (V512):
- Add xmm component.
- * gcc.target/i386/avx512fp16-vfpclassph-1a.c: New test.
- * gcc.target/i386/avx512fp16-vfpclassph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vfpclasssh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vfpclasssh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vgetexpph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vgetexpph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vgetexpsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vgetexpsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vgetmantph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vgetmantph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vgetmantsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vgetmantsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfpclassph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vfpclassph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vgetexpph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vgetexpph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vgetmantph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vgetmantph-1b.c: Ditto.
-
-2021-09-14 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-14 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-helper.h (_ROUND_CUR): New macro.
- * gcc.target/i386/avx512fp16-vreduceph-1a.c: New test.
- * gcc.target/i386/avx512fp16-vreduceph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vreducesh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vreducesh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vrndscaleph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vrndscaleph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vrndscalesh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vrndscalesh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vreduceph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vreduceph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vrndscaleph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vrndscaleph-1b.c: Ditto.
-
-2021-09-14 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-14 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-vrcpph-1a.c: New test.
- * gcc.target/i386/avx512fp16-vrcpph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vrcpsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vrcpsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vscalefph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vscalefph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vscalefsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vscalefsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vrcpph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vrcpph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vscalefph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vscalefph-1b.c: Ditto.
-
-2021-09-14 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-14 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-vrsqrtph-1a.c: New test.
- * gcc.target/i386/avx512fp16-vrsqrtph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vrsqrtsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vrsqrtsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vsqrtph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vsqrtph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vsqrtsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vsqrtsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vrsqrtph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vrsqrtph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vsqrtph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vsqrtph-1b.c: Ditto.
-
-2021-09-14 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-13 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/82314
- * gfortran.dg/pr82314.f90: New test.
-
-2021-09-13 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/85130
- * gfortran.dg/substr_6.f90: Revert commit r8-7574, adding again
- test that was erroneously considered as illegal.
-
-2021-09-13 Jason Merrill <jason@redhat.com>
-
- * g++.dg/warn/Winterference.H: New file.
- * g++.dg/warn/Winterference.C: New test.
- * g++.target/aarch64/interference.C: New test.
- * g++.target/arm/interference.C: New test.
- * g++.target/i386/interference.C: New test.
- * g++.dg/warn/Winterference-2.C: New file.
-
-2021-09-13 Martin Liska <mliska@suse.cz>
- H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101696
- * g++.target/i386/mv30.C: New test.
- * gcc.target/i386/mvc16.c: New test.
- * gcc.target/i386/builtin_target.c (CHECK___builtin_cpu_supports):
- New.
-
-2021-09-13 Andrew Pinski <apinski@marvell.com>
-
- PR target/95969
- * gcc.target/aarch64/lane-bound-1.c: New test.
- * gcc.target/aarch64/lane-bound-2.c: New test.
-
-2021-09-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- PR target/102252
- * g++.target/aarch64/sve/pr102252.C: New test.
-
-2021-09-13 Aldy Hernandez <aldyh@redhat.com>
-
- * gcc.dg/tree-ssa/pr21417.c: Adjust for FSM removal.
- * gcc.dg/tree-ssa/pr66752-3.c: Same.
- * gcc.dg/tree-ssa/pr68198.c: Same.
- * gcc.dg/tree-ssa/pr69196-1.c: Same.
- * gcc.dg/tree-ssa/pr70232.c: Same.
- * gcc.dg/tree-ssa/pr77445.c: Same.
- * gcc.dg/tree-ssa/ranger-threader-4.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-18.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-6.c: Same.
- * gcc.dg/tree-ssa/ssa-thread-12.c: Same.
- * gcc.dg/tree-ssa/ssa-thread-13.c: Same.
-
-2021-09-13 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101764
- * g++.dg/cpp1z/constexpr-if35.C: New test.
-
-2021-09-13 Martin Liska <mliska@suse.cz>
-
- PR c++/101331
- * g++.dg/pr101331.C: New test.
-
-2021-09-13 Aldy Hernandez <aldyh@redhat.com>
-
- * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Adjust for aarch64.
-
-2021-09-13 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101935
- * g++.target/i386/pr80566-1.C: Add
- -mtune-ctrl=avx256_store_by_pieces.
- * gcc.target/i386/pr100865-4a.c: Likewise.
- * gcc.target/i386/pr100865-10a.c: Likewise.
- * gcc.target/i386/pr90773-20.c: Likewise.
- * gcc.target/i386/pr90773-21.c: Likewise.
- * gcc.target/i386/pr90773-22.c: Likewise.
- * gcc.target/i386/pr90773-23.c: Likewise.
- * g++.target/i386/pr80566-2.C: Add
- -mtune-ctrl=avx256_move_by_pieces.
- * gcc.target/i386/eh_return-1.c: Likewise.
- * gcc.target/i386/pr90773-26.c: Likewise.
- * gcc.target/i386/pieces-memcpy-12.c: Replace -mtune=haswell
- with -mtune-ctrl=avx256_move_by_pieces.
- * gcc.target/i386/pieces-memcpy-15.c: Likewise.
- * gcc.target/i386/pieces-memset-2.c: Replace -mtune=haswell
- with -mtune-ctrl=avx256_store_by_pieces.
- * gcc.target/i386/pieces-memset-5.c: Likewise.
- * gcc.target/i386/pieces-memset-11.c: Likewise.
- * gcc.target/i386/pieces-memset-14.c: Likewise.
- * gcc.target/i386/pieces-memset-20.c: Likewise.
- * gcc.target/i386/pieces-memset-23.c: Likewise.
- * gcc.target/i386/pieces-memset-29.c: Likewise.
- * gcc.target/i386/pieces-memset-30.c: Likewise.
- * gcc.target/i386/pieces-memset-33.c: Likewise.
- * gcc.target/i386/pieces-memset-34.c: Likewise.
- * gcc.target/i386/pieces-memset-44.c: Likewise.
- * gcc.target/i386/pieces-memset-37.c: Replace -mtune=generic
- with -mtune-ctrl=avx256_store_by_pieces.
-
-2021-09-12 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR d/102185
- * gdc.dg/pr102185.d: New test.
-
-2021-09-11 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/auto-init-1.c: Enable test only on ilp32 or lp64
- targets, expect different long and pointer sizes between ilp32 and
- lp64.
- * c-c++-common/auto-init-2.c: Likewise.
- * c-c++-common/auto-init-3.c: Expect one of the common long double
- sizes (8/12/16 bytes) instead of hardcoding 16 bytes.
- * c-c++-common/auto-init-4.c: Likewise.
- * c-c++-common/auto-init-5.c: Expect one of the common
- _Complex long double sizes (16/24/32 bytes) instead of hardcoding 32
- bytes.
- * c-c++-common/auto-init-6.c: Likewise.
- * c-c++-common/auto-init-padding-1.c: Enable test only on ilp32 or lp64
- targets.
- (struct test_small_hole): Change type of four to unsigned long long
- and add aligned attribute.
-
-2021-09-10 Petter Tomner <tomner@kth.se>
-
- * jit.dg/test-error-array-bounds.c: Array is not unsigned
- * jit.dg/jit.exp: Helper function
- * jit.dg/test-debuginfo.c: New testcase
-
-2021-09-10 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/atomic-17.c (foo): Add tests for atomic read,
- write or update with acq_rel clause and atomic update with acquire clause.
- * c-c++-common/gomp/atomic-18.c (foo): Adjust expected diagnostics
- wording, remove tests moved to atomic-17.c.
- * c-c++-common/gomp/atomic-21.c: Expect only 2 omp atomic release and
- 2 omp atomic acq_rel directives instead of 4 omp atomic release.
- * c-c++-common/gomp/atomic-25.c: New test.
- * c-c++-common/gomp/atomic-26.c: New test.
- * c-c++-common/gomp/atomic-27.c: New test.
- * c-c++-common/gomp/atomic-28.c: New test.
- * c-c++-common/gomp/atomic-29.c: New test.
- * c-c++-common/gomp/atomic-30.c: New test.
- * c-c++-common/goacc-gomp/atomic.c: Expect 1 omp atomic release and
- 1 omp atomic_acq_rel instead of 2 omp atomic release directives.
- * gcc.dg/gomp/atomic-5.c: Adjust expected error diagnostic wording.
- * g++.dg/gomp/atomic-18.C:Expect 4 omp atomic release and
- 1 omp atomic_acq_rel instead of 5 omp atomic release directives.
-
-2021-09-10 Aldy Hernandez <aldyh@redhat.com>
- Michael Matz <matz@suse.de>
-
- * gcc.dg/tree-ssa/ssa-dom-thread-2b.c: Adjust for disabling of
- threading through latches.
- * gcc.dg/tree-ssa/ssa-dom-thread-6.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same.
-
-2021-09-10 David Faust <david.faust@oracle.com>
-
- * gcc.target/bpf/alu-1.c: New test.
- * gcc.target/bpf/jmp-1.c: New test.
-
-2021-09-10 Richard Biener <rguenther@suse.de>
-
- PR middle-end/102273
- * gcc.dg/pr102273.c: New testcase.
-
-2021-09-10 Thomas Schwinge <thomas@codesourcery.com>
-
- * c-c++-common/auto-init-padding-2.c: Fix 'dg-do run' syntax.
- * c-c++-common/auto-init-padding-3.c: Likewise.
-
-2021-09-10 Richard Biener <rguenther@suse.de>
-
- PR middle-end/102269
- * gcc.dg/pr102269.c: New testcase.
-
-2021-09-10 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-helper.h
- (check_results_mask): New check_function.
- * gcc.target/i386/avx512fp16-vcmpph-1a.c: New test.
- * gcc.target/i386/avx512fp16-vcmpph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcmpsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcmpsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcomish-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vcomish-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vcomish-1c.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcmpph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vcmpph-1b.c: Ditto.
-
-2021-09-10 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-10 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-vmaxph-1a.c: New test.
- * gcc.target/i386/avx512fp16-vmaxph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vmaxsh-1.c: Ditto.
- * gcc.target/i386/avx512fp16-vmaxsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vminph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vminph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vminsh-1.c: Ditto.
- * gcc.target/i386/avx512fp16-vminsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vmaxph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vmaxph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vminph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vminph-1b.c: Ditto.
-
-2021-09-10 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-10 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-vaddsh-1a.c: New test.
- * gcc.target/i386/avx512fp16-vaddsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vdivsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vdivsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vmulsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vmulsh-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vsubsh-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vsubsh-1b.c: Ditto.
- * gcc.target/i386/pr54855-11.c: Ditto.
-
-2021-09-10 Liu, Hongtao <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add test for new builtins.
- * gcc.target/i386/sse-13.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-10 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/vect-float16-1.c: New test.
- * gcc.target/i386/vect-float16-10.c: Ditto.
- * gcc.target/i386/vect-float16-11.c: Ditto.
- * gcc.target/i386/vect-float16-12.c: Ditto.
- * gcc.target/i386/vect-float16-2.c: Ditto.
- * gcc.target/i386/vect-float16-3.c: Ditto.
- * gcc.target/i386/vect-float16-4.c: Ditto.
- * gcc.target/i386/vect-float16-5.c: Ditto.
- * gcc.target/i386/vect-float16-6.c: Ditto.
- * gcc.target/i386/vect-float16-7.c: Ditto.
- * gcc.target/i386/vect-float16-8.c: Ditto.
- * gcc.target/i386/vect-float16-9.c: Ditto.
-
-2021-09-10 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512dq-abs-copysign-1.c: Adjust testcase.
- * gcc.target/i386/avx512vl-abs-copysign-1.c: Adjust testcase.
-
-2021-09-09 qing zhao <qing.zhao@oracle.com>
-
- * c-c++-common/auto-init-1.c: New test.
- * c-c++-common/auto-init-10.c: New test.
- * c-c++-common/auto-init-11.c: New test.
- * c-c++-common/auto-init-12.c: New test.
- * c-c++-common/auto-init-13.c: New test.
- * c-c++-common/auto-init-14.c: New test.
- * c-c++-common/auto-init-15.c: New test.
- * c-c++-common/auto-init-16.c: New test.
- * c-c++-common/auto-init-2.c: New test.
- * c-c++-common/auto-init-3.c: New test.
- * c-c++-common/auto-init-4.c: New test.
- * c-c++-common/auto-init-5.c: New test.
- * c-c++-common/auto-init-6.c: New test.
- * c-c++-common/auto-init-7.c: New test.
- * c-c++-common/auto-init-8.c: New test.
- * c-c++-common/auto-init-9.c: New test.
- * c-c++-common/auto-init-esra.c: New test.
- * c-c++-common/auto-init-padding-1.c: New test.
- * c-c++-common/auto-init-padding-2.c: New test.
- * c-c++-common/auto-init-padding-3.c: New test.
- * g++.dg/auto-init-uninit-pred-1_a.C: New test.
- * g++.dg/auto-init-uninit-pred-2_a.C: New test.
- * g++.dg/auto-init-uninit-pred-3_a.C: New test.
- * g++.dg/auto-init-uninit-pred-4.C: New test.
- * gcc.dg/auto-init-sra-1.c: New test.
- * gcc.dg/auto-init-sra-2.c: New test.
- * gcc.dg/auto-init-uninit-1.c: New test.
- * gcc.dg/auto-init-uninit-12.c: New test.
- * gcc.dg/auto-init-uninit-13.c: New test.
- * gcc.dg/auto-init-uninit-14.c: New test.
- * gcc.dg/auto-init-uninit-15.c: New test.
- * gcc.dg/auto-init-uninit-16.c: New test.
- * gcc.dg/auto-init-uninit-17.c: New test.
- * gcc.dg/auto-init-uninit-18.c: New test.
- * gcc.dg/auto-init-uninit-19.c: New test.
- * gcc.dg/auto-init-uninit-2.c: New test.
- * gcc.dg/auto-init-uninit-20.c: New test.
- * gcc.dg/auto-init-uninit-21.c: New test.
- * gcc.dg/auto-init-uninit-22.c: New test.
- * gcc.dg/auto-init-uninit-23.c: New test.
- * gcc.dg/auto-init-uninit-24.c: New test.
- * gcc.dg/auto-init-uninit-25.c: New test.
- * gcc.dg/auto-init-uninit-26.c: New test.
- * gcc.dg/auto-init-uninit-3.c: New test.
- * gcc.dg/auto-init-uninit-34.c: New test.
- * gcc.dg/auto-init-uninit-36.c: New test.
- * gcc.dg/auto-init-uninit-37.c: New test.
- * gcc.dg/auto-init-uninit-4.c: New test.
- * gcc.dg/auto-init-uninit-5.c: New test.
- * gcc.dg/auto-init-uninit-6.c: New test.
- * gcc.dg/auto-init-uninit-8.c: New test.
- * gcc.dg/auto-init-uninit-9.c: New test.
- * gcc.dg/auto-init-uninit-A.c: New test.
- * gcc.dg/auto-init-uninit-B.c: New test.
- * gcc.dg/auto-init-uninit-C.c: New test.
- * gcc.dg/auto-init-uninit-H.c: New test.
- * gcc.dg/auto-init-uninit-I.c: New test.
- * gcc.target/aarch64/auto-init-1.c: New test.
- * gcc.target/aarch64/auto-init-2.c: New test.
- * gcc.target/aarch64/auto-init-3.c: New test.
- * gcc.target/aarch64/auto-init-4.c: New test.
- * gcc.target/aarch64/auto-init-5.c: New test.
- * gcc.target/aarch64/auto-init-6.c: New test.
- * gcc.target/aarch64/auto-init-7.c: New test.
- * gcc.target/aarch64/auto-init-8.c: New test.
- * gcc.target/aarch64/auto-init-padding-1.c: New test.
- * gcc.target/aarch64/auto-init-padding-10.c: New test.
- * gcc.target/aarch64/auto-init-padding-11.c: New test.
- * gcc.target/aarch64/auto-init-padding-12.c: New test.
- * gcc.target/aarch64/auto-init-padding-2.c: New test.
- * gcc.target/aarch64/auto-init-padding-3.c: New test.
- * gcc.target/aarch64/auto-init-padding-4.c: New test.
- * gcc.target/aarch64/auto-init-padding-5.c: New test.
- * gcc.target/aarch64/auto-init-padding-6.c: New test.
- * gcc.target/aarch64/auto-init-padding-7.c: New test.
- * gcc.target/aarch64/auto-init-padding-8.c: New test.
- * gcc.target/aarch64/auto-init-padding-9.c: New test.
- * gcc.target/i386/auto-init-1.c: New test.
- * gcc.target/i386/auto-init-2.c: New test.
- * gcc.target/i386/auto-init-21.c: New test.
- * gcc.target/i386/auto-init-22.c: New test.
- * gcc.target/i386/auto-init-23.c: New test.
- * gcc.target/i386/auto-init-24.c: New test.
- * gcc.target/i386/auto-init-3.c: New test.
- * gcc.target/i386/auto-init-4.c: New test.
- * gcc.target/i386/auto-init-5.c: New test.
- * gcc.target/i386/auto-init-6.c: New test.
- * gcc.target/i386/auto-init-7.c: New test.
- * gcc.target/i386/auto-init-8.c: New test.
- * gcc.target/i386/auto-init-padding-1.c: New test.
- * gcc.target/i386/auto-init-padding-10.c: New test.
- * gcc.target/i386/auto-init-padding-11.c: New test.
- * gcc.target/i386/auto-init-padding-12.c: New test.
- * gcc.target/i386/auto-init-padding-2.c: New test.
- * gcc.target/i386/auto-init-padding-3.c: New test.
- * gcc.target/i386/auto-init-padding-4.c: New test.
- * gcc.target/i386/auto-init-padding-5.c: New test.
- * gcc.target/i386/auto-init-padding-6.c: New test.
- * gcc.target/i386/auto-init-padding-7.c: New test.
- * gcc.target/i386/auto-init-padding-8.c: New test.
- * gcc.target/i386/auto-init-padding-9.c: New test.
-
-2021-09-09 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/98490
- * gfortran.dg/bounds_check_23.f90: New test.
-
-2021-09-09 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/x86_64/abi/avx512fp16/args.h: Replace long with
- long long.
- (XMM_T): Rename _long to _longlong and _ulong to _ulonglong.
- (X87_T): Rename _ulong to _ulonglong.
- * gcc.target/x86_64/abi/avx512fp16/defines.h (TYPE_SIZE_LONG):
- Define to 4 if __ILP32__ is defined.
- (TYPE_SIZE_POINTER): Likewise.
- (TYPE_ALIGN_LONG): Likewise.
- (TYPE_ALIGN_POINTER): Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_3_element_struct_and_unions.c
- (main): Skip test for long if __ILP32__ is defined.
- * gcc.target/x86_64/abi/avx512fp16/test_m64m128_returning.c
- (do_test): Replace _long with _longlong.
- * gcc.target/x86_64/abi/avx512fp16/test_struct_returning.c:
- (check_300): Replace _ulong with _ulonglong.
- * gcc.target/x86_64/abi/avx512fp16/m256h/args.h: Replace long
- with long long.
- (YMM_T): Rename _long to _longlong and _ulong to _ulonglong.
- (X87_T): Rename _ulong to _ulonglong.
- * gcc.target/x86_64/abi/avx512fp16/m512h/args.h: Replace long
- with long long.
- (ZMM_T): Rename _long to _longlong and _ulong to _ulonglong.
- (X87_T): Rename _ulong to _ulonglong.
-
-2021-09-09 Richard Biener <rguenther@suse.de>
-
- * gcc.dg/tree-ssa/ssa-lim-17.c: New testcase.
-
-2021-09-09 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512fp16-helper.h: New header file for
- FP16 runtime test.
- * gcc.target/i386/avx512fp16-vaddph-1a.c: New test.
- * gcc.target/i386/avx512fp16-vaddph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vdivph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vdivph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vmulph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vmulph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-vsubph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-vsubph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vaddph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vaddph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vdivph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vdivph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vmulph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vmulph-1b.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vsubph-1a.c: Ditto.
- * gcc.target/i386/avx512fp16vl-vsubph-1b.c: Ditto.
-
-2021-09-09 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add -mavx512vl and test for new intrinsics.
- * gcc.target/i386/avx-2.c: Add -mavx512vl.
- * gcc.target/i386/avx512fp16-11a.c: New test.
- * gcc.target/i386/avx512fp16-11b.c: Ditto.
- * gcc.target/i386/avx512vlfp16-11a.c: Ditto.
- * gcc.target/i386/avx512vlfp16-11b.c: Ditto.
- * gcc.target/i386/sse-13.c: Add test for new builtins.
- * gcc.target/i386/sse-23.c: Ditto.
- * gcc.target/i386/sse-14.c: Add test for new intrinsics.
- * gcc.target/i386/sse-22.c: Ditto.
-
-2021-09-09 liuhongt <hongtao.liu@intel.com>
-
- PR target/101059
- * gcc.target/i386/sse2-pr101059.c: New test.
- * gcc.target/i386/sse3-pr101059.c: New test.
-
-2021-09-09 liuhongt <hongtao.liu@intel.com>
-
- PR target/91103
- * gcc.target/i386/pr91103-1.c: New test.
- * gcc.target/i386/pr91103-2.c: New test.
-
-2021-09-08 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/102225
- * gcc.dg/analyzer/realloc-1.c (test_10): New.
- * gcc.dg/analyzer/torture/pr102225.c: New test.
-
-2021-09-08 Joseph Myers <joseph@codesourcery.com>
-
- * gcc.dg/array-quals-1.c: Allow .sdata section in more cases.
-
-2021-09-08 Joseph Myers <joseph@codesourcery.com>
-
- * gcc.dg/tree-ssa/pr89430-1.c, gcc.dg/tree-ssa/pr89430-2.c,
- gcc.dg/tree-ssa/pr89430-3.c, gcc.dg/tree-ssa/pr89430-4.c,
- gcc.dg/tree-ssa/pr89430-5.c, gcc.dg/tree-ssa/pr89430-6.c,
- gcc.dg/tree-ssa/pr89430-7-comp-ref.c,
- gcc.dg/tree-ssa/pr89430-8-mem-ref-size.c,
- gcc.dg/tree-ssa/pr99473-1.c: Use -ftree-cselim.
-
-2021-09-08 Jakub Jelinek <jakub@redhat.com>
- liuhongt <hongtao.liu@intel.com>
-
- PR target/89984
- * gcc.target/i386/avx-pr102224.c: Fix up PR number.
- * gcc.dg/pr89984.c: New test.
- * gcc.target/i386/avx-pr89984.c: New test.
-
-2021-09-08 Jakub Jelinek <jakub@redhat.com>
-
- PR target/102224
- * gcc.dg/pr102224.c: New test.
- * gcc.target/i386/avx-pr102224.c: New test.
-
-2021-09-08 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/x86_64/abi/avx512fp16/m512h/abi-avx512fp16-zmm.exp:
- New file.
- * gcc.target/x86_64/abi/avx512fp16/m512h/args.h: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/m512h/asm-support.S: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/m512h/avx512fp16-zmm-check.h:
- Likewise.
- * gcc.target/x86_64/abi/avx512fp16/m512h/test_m512_returning.c:
- Likewise.
- * gcc.target/x86_64/abi/avx512fp16/m512h/test_passing_m512.c:
- Likewise.
- * gcc.target/x86_64/abi/avx512fp16/m512h/test_passing_structs.c:
- Likewise.
- * gcc.target/x86_64/abi/avx512fp16/m512h/test_passing_unions.c:
- Likewise.
- * gcc.target/x86_64/abi/avx512fp16/m512h/test_varargs-m512.c:
- Likewise.
-
-2021-09-08 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/x86_64/abi/avx512fp16/m256h/abi-avx512fp16-ymm.exp:
- New exp file.
- * gcc.target/x86_64/abi/avx512fp16/m256h/args.h: New header.
- * gcc.target/x86_64/abi/avx512fp16/m256h/avx512fp16-ymm-check.h:
- Likewise.
- * gcc.target/x86_64/abi/avx512fp16/m256h/asm-support.S: New.
- * gcc.target/x86_64/abi/avx512fp16/m256h/test_m256_returning.c:
- New test.
- * gcc.target/x86_64/abi/avx512fp16/m256h/test_passing_m256.c: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/m256h/test_passing_structs.c:
- Likewise.
- * gcc.target/x86_64/abi/avx512fp16/m256h/test_passing_unions.c:
- Likewise.
- * gcc.target/x86_64/abi/avx512fp16/m256h/test_varargs-m256.c: Likewise.
-
-2021-09-08 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/x86_64/abi/avx512fp16/abi-avx512fp16-xmm.exp: New exp
- file for abi test.
- * gcc.target/x86_64/abi/avx512fp16/args.h: New header file for abi test.
- * gcc.target/x86_64/abi/avx512fp16/avx512fp16-check.h: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/avx512fp16-xmm-check.h: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/defines.h: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/macros.h: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/asm-support.S: New asm for abi check.
- * gcc.target/x86_64/abi/avx512fp16/test_3_element_struct_and_unions.c:
- New test.
- * gcc.target/x86_64/abi/avx512fp16/test_basic_alignment.c: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_basic_array_size_and_align.c:
- Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_basic_returning.c: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_basic_sizes.c: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_basic_struct_size_and_align.c:
- Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_basic_union_size_and_align.c:
- Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_complex_returning.c: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_m64m128_returning.c: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_passing_floats.c: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_passing_m64m128.c: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_passing_structs.c: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_passing_unions.c: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_struct_returning.c: Likewise.
- * gcc.target/x86_64/abi/avx512fp16/test_varargs-m128.c: Likewise.
-
-2021-09-08 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/avx512fp16-vararg-1.c: New test.
- * gcc.target/i386/avx512fp16-vararg-2.c: Ditto.
- * gcc.target/i386/avx512fp16-vararg-3.c: Ditto.
- * gcc.target/i386/avx512fp16-vararg-4.c: Ditto.
-
-2021-09-08 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/m512-check.h: Add union128h, union256h, union512h.
- * gcc.target/i386/avx512fp16-10a.c: New test.
- * gcc.target/i386/avx512fp16-10b.c: Ditto.
- * gcc.target/i386/avx512fp16-1a.c: Ditto.
- * gcc.target/i386/avx512fp16-1b.c: Ditto.
- * gcc.target/i386/avx512fp16-1c.c: Ditto.
- * gcc.target/i386/avx512fp16-1d.c: Ditto.
- * gcc.target/i386/avx512fp16-1e.c: Ditto.
- * gcc.target/i386/avx512fp16-2a.c: Ditto.
- * gcc.target/i386/avx512fp16-2b.c: Ditto.
- * gcc.target/i386/avx512fp16-2c.c: Ditto.
- * gcc.target/i386/avx512fp16-3a.c: Ditto.
- * gcc.target/i386/avx512fp16-3b.c: Ditto.
- * gcc.target/i386/avx512fp16-3c.c: Ditto.
- * gcc.target/i386/avx512fp16-4.c: Ditto.
- * gcc.target/i386/avx512fp16-5.c: Ditto.
- * gcc.target/i386/avx512fp16-6.c: Ditto.
- * gcc.target/i386/avx512fp16-7.c: Ditto.
- * gcc.target/i386/avx512fp16-8.c: Ditto.
- * gcc.target/i386/avx512fp16-9a.c: Ditto.
- * gcc.target/i386/avx512fp16-9b.c: Ditto.
- * gcc.target/i386/pr54855-13.c: Ditto.
- * gcc.target/i386/avx512fp16-vec_set_var.c: Ditto.
-
-2021-09-08 Guo, Xuepeng <xuepeng.guo@intel.com>
- H.J. Lu <hongjiu.lu@intel.com>
- Liu Hongtao <hongtao.liu@intel.com>
- Wang Hongyu <hongyu.wang@intel.com>
- Xu Dianhong <dianhong.xu@intel.com>
-
- * gcc.target/i386/avx-1.c: Add -mavx512fp16 in dg-options.
- * gcc.target/i386/avx-2.c: Ditto.
- * gcc.target/i386/avx512-check.h: Check cpuid for AVX512FP16.
- * gcc.target/i386/funcspec-56.inc: Add new target attribute check.
- * gcc.target/i386/sse-13.c: Add -mavx512fp16.
- * gcc.target/i386/sse-14.c: Ditto.
- * gcc.target/i386/sse-22.c: Ditto.
- * gcc.target/i386/sse-23.c: Ditto.
- * lib/target-supports.exp: (check_effective_target_avx512fp16): New.
- * g++.target/i386/float16-1.C: New test.
- * g++.target/i386/float16-2.C: Ditto.
- * g++.target/i386/float16-3.C: Ditto.
- * gcc.target/i386/avx512fp16-12a.c: Ditto.
- * gcc.target/i386/avx512fp16-12b.c: Ditto.
- * gcc.target/i386/float16-3a.c: Ditto.
- * gcc.target/i386/float16-3b.c: Ditto.
- * gcc.target/i386/float16-4a.c: Ditto.
- * gcc.target/i386/float16-4b.c: Ditto.
- * gcc.target/i386/pr54855-12.c: Ditto.
- * g++.dg/other/i386-2.C: Ditto.
- * g++.dg/other/i386-3.C: Ditto.
-
-2021-09-08 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/float16-6.c: New test.
- * gcc.target/i386/float16-7.c: New test.
-
-2021-09-07 David Faust <david.faust@oracle.com>
-
- * gcc.target/bpf/core-attr-1.c: New test.
- * gcc.target/bpf/core-attr-2.c: Likewise.
- * gcc.target/bpf/core-attr-3.c: Likewise.
- * gcc.target/bpf/core-attr-4.c: Likewise
- * gcc.target/bpf/core-builtin-1.c: Likewise
- * gcc.target/bpf/core-builtin-2.c: Likewise.
- * gcc.target/bpf/core-builtin-3.c: Likewise.
- * gcc.target/bpf/core-section-1.c: Likewise.
-
-2021-09-07 Hans-Peter Nilsson <hp@axis.com>
-
- * gcc.dg/no_profile_instrument_function-attr-2.c: Fix
- typo in last change.
-
-2021-09-07 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/101327
- * gfortran.dg/pr101327.f90: New test.
-
-2021-09-07 Indu Bhagat <indu.bhagat@oracle.com>
-
- * gcc.target/bpf/core-lto-1.c: New test.
-
-2021-09-07 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/100495
- * g++.dg/cpp2a/constexpr-new21.C: New test.
-
-2021-09-07 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/85819
- * gcc.target/i386/pr85819-1a.c: New test.
- * gcc.target/i386/pr85819-1b.c: Likewise.
- * gcc.target/i386/pr85819-2a.c: Likewise.
- * gcc.target/i386/pr85819-2b.c: Likewise.
- * gcc.target/i386/pr85819-2c.c: Likewise.
- * gcc.target/i386/pr85819-3.c: Likewise.
-
-2021-09-07 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102226
- * g++.dg/vect/pr102226.cc: New testcase.
-
-2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
-
- * c-c++-common/gomp/flush-1.c: Add test case for 'seq_cst'.
- * c-c++-common/gomp/flush-2.c: Add test case for 'seq_cst'.
- * g++.dg/gomp/attrs-1.C: Adapt test to handle all flush clauses.
- * g++.dg/gomp/attrs-2.C: Adapt test to handle all flush clauses.
- * gfortran.dg/gomp/flush-1.f90: Add test case for 'seq_cst'.
- * gfortran.dg/gomp/flush-2.f90: Add test case for 'seq_cst'.
-
-2021-09-07 Martin Liska <mliska@suse.cz>
-
- PR gcov-profile/80223
- * gcc.dg/no_profile_instrument_function-attr-2.c: New test.
-
-2021-09-07 Xionghu Luo <luoxhu@linux.ibm.com>
-
- PR target/97142
- * gcc.target/powerpc/pr97142.c: New test.
-
-2021-09-06 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/89984
- * gcc.target/i386/pr89984-1.c: New test.
- * gcc.target/i386/pr89984-2.c: Likewise.
- * gcc.target/i386/xorsign-avx.c: Likewise.
-
-2021-09-06 liuhongt <hongtao.liu@intel.com>
-
- PR middle-end/102182
- * gcc.target/i386/pr101282.c: New test.
-
-2021-09-06 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/102207
- * gcc.dg/pr102207.c: New test.
-
-2021-09-06 Andrew Pinski <apinski@marvell.com>
-
- PR tree-optimization/63184
- * c-c++-common/pr19807-2.c: Enable for all targets and remove the xfail.
- * c-c++-common/pr19807-3.c: Likewise.
-
-2021-09-03 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101904
- * g++.dg/template/conv17.C: New test.
-
-2021-09-03 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/bind_c_char_6.f90: Update dg-error.
- * gfortran.dg/bind_c_char_7.f90: Likewise.
- * gfortran.dg/bind_c_char_8.f90: Likewise.
- * gfortran.dg/iso_c_binding_char_1.f90: Likewise.
- * gfortran.dg/pr32599.f03: Likewise.
- * gfortran.dg/bind_c_char_9.f90: Comment testcase bits which are
- implementable but not valid F2018.
- * gfortran.dg/bind_c_contiguous.f90: New test.
-
-2021-09-03 liuhongt <hongtao.liu@intel.com>
-
- PR target/102166
- * g++.target/i386/pr102166.C: New test.
-
-2021-09-02 Sandra Loosemore <sandra@codesourcery.com>
- José Rui Faustino de Sousa <jrfsousa@gmail.com>
-
- PR fortran/100911
- PR fortran/100915
- PR fortran/100916
- * gfortran.dg/PR100911.c: New file.
- * gfortran.dg/PR100911.f90: New file.
- * gfortran.dg/PR100914.c: New file.
- * gfortran.dg/PR100914.f90: New file.
- * gfortran.dg/PR100915.c: New file.
- * gfortran.dg/PR100915.f90: New file.
-
-2021-09-02 Sandra Loosemore <sandra@codesourcery.com>
-
- * gfortran.dg/c-interop/allocatable-dummy-c.c: New file.
- * gfortran.dg/c-interop/allocatable-dummy.f90: New file.
- * gfortran.dg/c-interop/allocatable-optional-pointer.f90: New file.
- * gfortran.dg/c-interop/allocate-c.c: New file.
- * gfortran.dg/c-interop/allocate-errors-c.c: New file.
- * gfortran.dg/c-interop/allocate-errors.f90: New file.
- * gfortran.dg/c-interop/allocate.f90: New file.
- * gfortran.dg/c-interop/argument-association-assumed-rank-1.f90:
- New file.
- * gfortran.dg/c-interop/argument-association-assumed-rank-2.f90:
- New file.
- * gfortran.dg/c-interop/argument-association-assumed-rank-3.f90:
- New file.
- * gfortran.dg/c-interop/argument-association-assumed-rank-4.f90:
- New file.
- * gfortran.dg/c-interop/argument-association-assumed-rank-5.f90:
- New file.
- * gfortran.dg/c-interop/argument-association-assumed-rank-6.f90:
- New file.
- * gfortran.dg/c-interop/argument-association-assumed-rank-7.f90:
- New file.
- * gfortran.dg/c-interop/argument-association-assumed-rank-8.f90:
- New file.
- * gfortran.dg/c-interop/assumed-type-dummy.f90: New file.
- * gfortran.dg/c-interop/c-interop.exp: New file.
- * gfortran.dg/c-interop/c1255-1.f90: New file.
- * gfortran.dg/c-interop/c1255-2.f90: New file.
- * gfortran.dg/c-interop/c1255a.f90: New file.
- * gfortran.dg/c-interop/c407a-1.f90: New file.
- * gfortran.dg/c-interop/c407a-2.f90: New file.
- * gfortran.dg/c-interop/c407b-1.f90: New file.
- * gfortran.dg/c-interop/c407b-2.f90: New file.
- * gfortran.dg/c-interop/c407c-1.f90: New file.
- * gfortran.dg/c-interop/c516.f90: New file.
- * gfortran.dg/c-interop/c524a.f90: New file.
- * gfortran.dg/c-interop/c535a-1.f90: New file.
- * gfortran.dg/c-interop/c535a-2.f90: New file.
- * gfortran.dg/c-interop/c535b-1.f90: New file.
- * gfortran.dg/c-interop/c535b-2.f90: New file.
- * gfortran.dg/c-interop/c535b-3.f90: New file.
- * gfortran.dg/c-interop/c535c-1.f90: New file.
- * gfortran.dg/c-interop/c535c-2.f90: New file.
- * gfortran.dg/c-interop/c535c-3.f90: New file.
- * gfortran.dg/c-interop/c535c-4.f90: New file.
- * gfortran.dg/c-interop/cf-descriptor-1-c.c: New file.
- * gfortran.dg/c-interop/cf-descriptor-1.f90: New file.
- * gfortran.dg/c-interop/cf-descriptor-2-c.c: New file.
- * gfortran.dg/c-interop/cf-descriptor-2.f90: New file.
- * gfortran.dg/c-interop/cf-descriptor-3-c.c: New file.
- * gfortran.dg/c-interop/cf-descriptor-3.f90: New file.
- * gfortran.dg/c-interop/cf-descriptor-4-c.c: New file.
- * gfortran.dg/c-interop/cf-descriptor-4.f90: New file.
- * gfortran.dg/c-interop/cf-descriptor-5-c.c: New file.
- * gfortran.dg/c-interop/cf-descriptor-5.f90: New file.
- * gfortran.dg/c-interop/cf-descriptor-6-c.c: New file.
- * gfortran.dg/c-interop/cf-descriptor-6.f90: New file.
- * gfortran.dg/c-interop/cf-descriptor-7-c.c: New file.
- * gfortran.dg/c-interop/cf-descriptor-7.f90: New file.
- * gfortran.dg/c-interop/cf-descriptor-8-c.c: New file.
- * gfortran.dg/c-interop/cf-descriptor-8.f90: New file.
- * gfortran.dg/c-interop/cf-out-descriptor-1-c.c: New file.
- * gfortran.dg/c-interop/cf-out-descriptor-1.f90: New file.
- * gfortran.dg/c-interop/cf-out-descriptor-2-c.c: New file.
- * gfortran.dg/c-interop/cf-out-descriptor-2.f90: New file.
- * gfortran.dg/c-interop/cf-out-descriptor-3-c.c: New file.
- * gfortran.dg/c-interop/cf-out-descriptor-3.f90: New file.
- * gfortran.dg/c-interop/cf-out-descriptor-4-c.c: New file.
- * gfortran.dg/c-interop/cf-out-descriptor-4.f90: New file.
- * gfortran.dg/c-interop/cf-out-descriptor-5-c.c: New file.
- * gfortran.dg/c-interop/cf-out-descriptor-5.f90: New file.
- * gfortran.dg/c-interop/cf-out-descriptor-6-c.c: New file.
- * gfortran.dg/c-interop/cf-out-descriptor-6.f90: New file.
- * gfortran.dg/c-interop/contiguous-1-c.c: New file.
- * gfortran.dg/c-interop/contiguous-1.f90: New file.
- * gfortran.dg/c-interop/contiguous-2-c.c: New file.
- * gfortran.dg/c-interop/contiguous-2.f90: New file.
- * gfortran.dg/c-interop/contiguous-3-c.c: New file.
- * gfortran.dg/c-interop/contiguous-3.f90: New file.
- * gfortran.dg/c-interop/deferred-character-1.f90: New file.
- * gfortran.dg/c-interop/deferred-character-2.f90: New file.
- * gfortran.dg/c-interop/dump-descriptors.c: New file.
- * gfortran.dg/c-interop/dump-descriptors.h: New file.
- * gfortran.dg/c-interop/establish-c.c: New file.
- * gfortran.dg/c-interop/establish-errors-c.c: New file.
- * gfortran.dg/c-interop/establish-errors.f90: New file.
- * gfortran.dg/c-interop/establish.f90: New file.
- * gfortran.dg/c-interop/explicit-interface.f90: New file.
- * gfortran.dg/c-interop/fc-descriptor-1-c.c: New file.
- * gfortran.dg/c-interop/fc-descriptor-1.f90: New file.
- * gfortran.dg/c-interop/fc-descriptor-2-c.c: New file.
- * gfortran.dg/c-interop/fc-descriptor-2.f90: New file.
- * gfortran.dg/c-interop/fc-descriptor-3-c.c: New file.
- * gfortran.dg/c-interop/fc-descriptor-3.f90: New file.
- * gfortran.dg/c-interop/fc-descriptor-4-c.c: New file.
- * gfortran.dg/c-interop/fc-descriptor-4.f90: New file.
- * gfortran.dg/c-interop/fc-descriptor-5-c.c: New file.
- * gfortran.dg/c-interop/fc-descriptor-5.f90: New file.
- * gfortran.dg/c-interop/fc-descriptor-6-c.c: New file.
- * gfortran.dg/c-interop/fc-descriptor-6.f90: New file.
- * gfortran.dg/c-interop/fc-descriptor-7-c.c: New file.
- * gfortran.dg/c-interop/fc-descriptor-7.f90: New file.
- * gfortran.dg/c-interop/fc-descriptor-8-c.c: New file.
- * gfortran.dg/c-interop/fc-descriptor-8.f90: New file.
- * gfortran.dg/c-interop/fc-descriptor-9-c.c: New file.
- * gfortran.dg/c-interop/fc-descriptor-9.f90: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-1-c.c: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-1.f90: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-2-c.c: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-2.f90: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-3-c.c: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-3.f90: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-4-c.c: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-4.f90: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-5-c.c: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-5.f90: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-6-c.c: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-6.f90: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-7-c.c: New file.
- * gfortran.dg/c-interop/fc-out-descriptor-7.f90: New file.
- * gfortran.dg/c-interop/ff-descriptor-1.f90: New file.
- * gfortran.dg/c-interop/ff-descriptor-2.f90: New file.
- * gfortran.dg/c-interop/ff-descriptor-3.f90: New file.
- * gfortran.dg/c-interop/ff-descriptor-4.f90: New file.
- * gfortran.dg/c-interop/ff-descriptor-5.f90: New file.
- * gfortran.dg/c-interop/ff-descriptor-6.f90: New file.
- * gfortran.dg/c-interop/ff-descriptor-7.f90: New file.
- * gfortran.dg/c-interop/note-5-3.f90: New file.
- * gfortran.dg/c-interop/note-5-4-c.c: New file.
- * gfortran.dg/c-interop/note-5-4.f90: New file.
- * gfortran.dg/c-interop/optional-c.c: New file.
- * gfortran.dg/c-interop/optional.f90: New file.
- * gfortran.dg/c-interop/rank-class.f90: New file.
- * gfortran.dg/c-interop/rank.f90: New file.
- * gfortran.dg/c-interop/removed-restrictions-1.f90: New file.
- * gfortran.dg/c-interop/removed-restrictions-2.f90: New file.
- * gfortran.dg/c-interop/removed-restrictions-3.f90: New file.
- * gfortran.dg/c-interop/removed-restrictions-4.f90: New file.
- * gfortran.dg/c-interop/section-1-c.c: New file.
- * gfortran.dg/c-interop/section-1.f90: New file.
- * gfortran.dg/c-interop/section-1p.f90: New file.
- * gfortran.dg/c-interop/section-2-c.c: New file.
- * gfortran.dg/c-interop/section-2.f90: New file.
- * gfortran.dg/c-interop/section-2p.f90: New file.
- * gfortran.dg/c-interop/section-3-c.c: New file.
- * gfortran.dg/c-interop/section-3.f90: New file.
- * gfortran.dg/c-interop/section-3p.f90: New file.
- * gfortran.dg/c-interop/section-4-c.c: New file.
- * gfortran.dg/c-interop/section-4.f90: New file.
- * gfortran.dg/c-interop/section-errors-c.c: New file.
- * gfortran.dg/c-interop/section-errors.f90: New file.
- * gfortran.dg/c-interop/select-c.c: New file.
- * gfortran.dg/c-interop/select-errors-c.c: New file.
- * gfortran.dg/c-interop/select-errors.f90: New file.
- * gfortran.dg/c-interop/select.f90: New file.
- * gfortran.dg/c-interop/setpointer-c.c: New file.
- * gfortran.dg/c-interop/setpointer-errors-c.c: New file.
- * gfortran.dg/c-interop/setpointer-errors.f90: New file.
- * gfortran.dg/c-interop/setpointer.f90: New file.
- * gfortran.dg/c-interop/shape.f90: New file.
- * gfortran.dg/c-interop/size.f90: New file.
- * gfortran.dg/c-interop/tkr.f90: New file.
- * gfortran.dg/c-interop/typecodes-array-basic-c.c: New file.
- * gfortran.dg/c-interop/typecodes-array-basic.f90: New file.
- * gfortran.dg/c-interop/typecodes-array-char-c.c: New file.
- * gfortran.dg/c-interop/typecodes-array-char.f90: New file.
- * gfortran.dg/c-interop/typecodes-array-float128-c.c: New file.
- * gfortran.dg/c-interop/typecodes-array-float128.f90: New file.
- * gfortran.dg/c-interop/typecodes-array-int128-c.c: New file.
- * gfortran.dg/c-interop/typecodes-array-int128.f90: New file.
- * gfortran.dg/c-interop/typecodes-array-longdouble-c.c: New file.
- * gfortran.dg/c-interop/typecodes-array-longdouble.f90: New file.
- * gfortran.dg/c-interop/typecodes-sanity-c.c: New file.
- * gfortran.dg/c-interop/typecodes-sanity.f90: New file.
- * gfortran.dg/c-interop/typecodes-scalar-basic-c.c: New file.
- * gfortran.dg/c-interop/typecodes-scalar-basic.f90: New file.
- * gfortran.dg/c-interop/typecodes-scalar-float128-c.c: New file.
- * gfortran.dg/c-interop/typecodes-scalar-float128.f90: New file.
- * gfortran.dg/c-interop/typecodes-scalar-int128-c.c: New file.
- * gfortran.dg/c-interop/typecodes-scalar-int128.f90: New file.
- * gfortran.dg/c-interop/typecodes-scalar-longdouble-c.c: New file.
- * gfortran.dg/c-interop/typecodes-scalar-longdouble.f90: New file.
- * gfortran.dg/c-interop/ubound.f90: New file.
- * lib/target-supports.exp
- (check_effective_target_fortran_real_c_float128): New function.
-
-2021-09-02 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/17506
- PR testsuite/37182
- * gcc.dg/diagnostic-tree-expr-ranges-2.c: Add expected output.
- * gcc.dg/uninit-15-O0.c: Remove xfail.
- * gcc.dg/uninit-15.c: Same.
-
-2021-09-02 Marcel Vollweiler <marcel@codesourcery.com>
-
- * gfortran.dg/gomp/target-device-ancestor-4.f90: Comment out dg-final to avoid
- UNRESOLVED.
-
-2021-09-02 Richard Biener <rguenther@suse.de>
-
- * gcc.dg/tree-ssa/ssa-lim-16.c: New testcase.
-
-2021-09-02 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/99591
- * gcc.target/i386/pr99591.c: New test.
- * gcc.target/i386/pr97950.c: Match or reject setb or jn?b instructions
- together with seta or jn?a.
-
-2021-09-02 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/sse2-float16-1.c: New test.
- * gcc.target/i386/sse2-float16-2.c: Ditto.
- * gcc.target/i386/sse2-float16-3.c: Ditto.
- * gcc.target/i386/float16-5.c: New test.
-
-2021-09-01 Jeff Law <jlaw@localhost.localdomain>
-
- PR tree-optimization/102152
- * gcc.dg/pr102152.c: New test
-
-2021-09-01 Andrew Pinski <apinski@marvell.com>
-
- PR target/101934
- * gcc.target/aarch64/memset-strict-align-1.c: New test.
-
-2021-09-01 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/100977
- * g++.dg/cpp23/normalize1.C: New test.
- * g++.dg/cpp23/normalize2.C: New test.
- * g++.dg/cpp23/normalize3.C: New test.
- * g++.dg/cpp23/normalize4.C: New test.
- * g++.dg/cpp23/normalize5.C: New test.
- * g++.dg/cpp23/normalize6.C: New test.
- * g++.dg/cpp23/normalize7.C: New test.
- * g++.dg/cpp23/ucnid-1-utf8.C: New test.
- * g++.dg/cpp23/ucnid-2-utf8.C: New test.
- * gcc.dg/cpp/ucnid-4.c: Don't expect
- "not valid at the start of an identifier" errors.
- * gcc.dg/cpp/ucnid-4-utf8.c: Likewise.
- * gcc.dg/cpp/ucnid-5-utf8.c: New test.
-
-2021-09-01 Andrew Pinski <apinski@marvell.com>
-
- PR testsuite/51748
- * gcc.misc-tests/linkage.exp: Add mips*-linux-* support.
-
-2021-09-01 Martin Sebor <msebor@redhat.com>
-
- * gcc.dg/Wstringop-overflow-11.c: Remove xfails.
- * gcc.dg/Wstringop-overflow-12.c: Same.
- * gcc.dg/Wstringop-overflow-43.c: Add xfails.
- * gcc.dg/Wstringop-overflow-73.c: New test.
-
-2021-09-01 Jakub Jelinek <jakub@redhat.com>
-
- PR preprocessor/101488
- * c-c++-common/cpp/va-opt-3.c: Adjust expected output.
- * c-c++-common/cpp/va-opt-7.c: New test.
-
-2021-09-01 Marek Polacek <polacek@redhat.com>
-
- PR c++/101592
- * g++.dg/warn/Wlogical-op-3.C: New test.
-
-2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
-
- * g++.dg/ext/attr-unavailable-1.C: New test.
- * g++.dg/ext/attr-unavailable-2.C: New test.
- * g++.dg/ext/attr-unavailable-3.C: New test.
- * g++.dg/ext/attr-unavailable-4.C: New test.
- * g++.dg/ext/attr-unavailable-5.C: New test.
- * g++.dg/ext/attr-unavailable-6.C: New test.
- * g++.dg/ext/attr-unavailable-7.C: New test.
- * g++.dg/ext/attr-unavailable-8.C: New test.
- * g++.dg/ext/attr-unavailable-9.C: New test.
- * gcc.dg/attr-unavailable-1.c: New test.
- * gcc.dg/attr-unavailable-2.c: New test.
- * gcc.dg/attr-unavailable-3.c: New test.
- * gcc.dg/attr-unavailable-4.c: New test.
- * gcc.dg/attr-unavailable-5.c: New test.
- * gcc.dg/attr-unavailable-6.c: New test.
- * obj-c++.dg/attributes/method-unavailable-1.mm: New test.
- * obj-c++.dg/attributes/method-unavailable-2.mm: New test.
- * obj-c++.dg/attributes/method-unavailable-3.mm: New test.
- * obj-c++.dg/property/at-property-unavailable-1.mm: New test.
- * obj-c++.dg/property/at-property-unavailable-2.mm: New test.
- * obj-c++.dg/property/dotsyntax-unavailable-1.mm: New test.
- * objc.dg/attributes/method-unavailable-1.m: New test.
- * objc.dg/attributes/method-unavailable-2.m: New test.
- * objc.dg/attributes/method-unavailable-3.m: New test.
- * objc.dg/property/at-property-unavailable-1.m: New test.
- * objc.dg/property/at-property-unavailable-2.m: New test.
- * objc.dg/property/dotsyntax-unavailable-1.m: New test.
-
-2021-09-01 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/102124
- * gcc.dg/torture/pr102124.c: New test.
-
-2021-09-01 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/93491
- * gcc.dg/torture/pr93491.c: New testcase.
- * gcc.dg/tree-ssa/pr88087.c: Change to valid PRE opportunity.
-
-2021-09-01 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102139
- * gcc.dg/torture/pr102139.c: New testcase.
-
-2021-09-01 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/102141
- * gcc.dg/pr102141.c: New test.
-
-2021-09-01 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102149
- * gcc.dg/torture/pr102149.c: New testcase.
-
-2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
- Joseph Myers <joseph@codesourcery.com>
-
- PR c/79412
- * gcc.dg/pr79412.c: New test case.
- * gcc.dg/typedef-var-2.c: Update expeted errors.
-
-2021-08-31 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/100950
- * gfortran.dg/pr100950.f90: Extend coverage.
-
-2021-08-31 Patrick Palka <ppalka@redhat.com>
-
- PR c++/12672
- * g++.dg/cpp0x/decltype29.C: Adjust.
- * g++.dg/template/error56.C: Adjust.
- * g++.old-deja/g++.pt/unify6.C: Adjust.
- * g++.dg/template/explicit-args7.C: New test.
-
-2021-08-31 Jason Merrill <jason@redhat.com>
-
- PR c++/92193
- * g++.dg/diagnostic/static_assert4.C: New test.
-
-2021-08-31 Jeff Law <jlaw@localhost.localdomain>
-
- * gcc.target/mips/mips.exp: Add tree-vrp to mips_option_group.
- * gcc.target/mips/data-sym-multi-pool.c: Add -fno-tree-vrp.
-
-2021-08-31 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/101145
- * gcc.dg/vect/pr101145.c: Use dg-additional-options with just -O3
- instead of dg-options with -O3 -fdump-tree-vect-details.
- * gcc.dg/vect/pr101145_1.c: Likewise.
- * gcc.dg/vect/pr101145_2.c: Likewise.
- * gcc.dg/vect/pr101145_3.c: Likewise.
-
-2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
-
- * c-c++-common/gomp/target-device-1.c: New test.
- * c-c++-common/gomp/target-device-2.c: New test.
- * c-c++-common/gomp/target-device-ancestor-1.c: New test.
- * c-c++-common/gomp/target-device-ancestor-2.c: New test.
- * c-c++-common/gomp/target-device-ancestor-3.c: New test.
- * c-c++-common/gomp/target-device-ancestor-4.c: New test.
- * gfortran.dg/gomp/target-device-1.f90: New test.
- * gfortran.dg/gomp/target-device-2.f90: New test.
- * gfortran.dg/gomp/target-device-ancestor-1.f90: New test.
- * gfortran.dg/gomp/target-device-ancestor-2.f90: New test.
- * gfortran.dg/gomp/target-device-ancestor-3.f90: New test.
- * gfortran.dg/gomp/target-device-ancestor-4.f90: New test.
-
-2021-08-31 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102142
- * g++.dg/torture/pr102142.C: New testcase.
-
-2021-08-31 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/102134
- * gcc.c-torture/execute/pr102134.c: New test.
-
-2021-08-31 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
-
- * gcc.target/arm/pr51534.c: Adjust test-case for soft fp targets.
-
-2021-08-31 Andrew Pinski <apinski@marvell.com>
-
- * gcc.dg/ipa/inline-8.c: Mark cmp and move as
- static so they both bind local and available for
- inlinine.
-
-2021-08-31 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512bw-vpcmpeqb-1.c: Adjust testcase.
- * gcc.target/i386/avx512bw-vpcmpeqw-1.c: Ditto.
- * gcc.target/i386/avx512bw-vpcmpgtb-1.c: Ditto.
- * gcc.target/i386/avx512bw-vpcmpgtw-1.c: Ditto.
- * gcc.target/i386/avx512f-vpcmpeqd-1.c: Ditto.
- * gcc.target/i386/avx512f-vpcmpeqq-1.c: Ditto.
- * gcc.target/i386/avx512f-vpcmpgtd-1.c: Ditto.
- * gcc.target/i386/avx512f-vpcmpgtq-1.c: Ditto.
- * gcc.target/i386/avx512vl-vpcmpeqd-1.c: Ditto.
- * gcc.target/i386/avx512vl-vpcmpeqq-1.c: Ditto.
- * gcc.target/i386/avx512vl-vpcmpgtd-1.c: Ditto.
- * gcc.target/i386/avx512vl-vpcmpgtq-1.c: Ditto.
- * gcc.target/i386/bitwise_mask_op-1.c: Ditto.
- * gcc.target/i386/bitwise_mask_op-2.c: Ditto.
-
-2021-08-30 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/99260
- * gcc.dg/analyzer/capacity-2.c: Update for changes to realloc
- analysis.
- * gcc.dg/analyzer/pr99193-1.c: Likewise.
- * gcc.dg/analyzer/pr99193-3.c: Likewise.
- * gcc.dg/analyzer/realloc-1.c: Likewise. Add test coverage for
- realloc of non-heap pointer, realloc from mismatching allocator,
- and realloc on a freed pointer.
- * gcc.dg/analyzer/realloc-2.c: New test.
-
-2021-08-30 Jason Merrill <jason@redhat.com>
-
- PR c++/96286
- * g++.dg/template/access2.C: Split struct A.
-
-2021-08-30 Jason Merrill <jason@redhat.com>
-
- PR c++/101460
- * g++.dg/template/explicit-args6.C: New test.
-
-2021-08-30 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/102113
- * gfortran.dg/goto_9.f90: New test.
-
-2021-08-30 Jason Merrill <jason@redhat.com>
-
- * g++.dg/cpp2a/concepts-lambda14.C: Add expected warnings.
-
-2021-08-30 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/101349
- * gfortran.dg/unlimited_polymorphic_33.f90: New test.
-
-2021-08-30 Pat Haugen <pthaugen@linux.ibm.com>
-
- * gcc.target/powerpc/fusion-p10-stst.c: New test.
- * gcc.target/powerpc/fusion-p10-stst2.c: New test.
-
-2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR d/102094
- * gdc.dg/lto/pr102094_0.d: New test.
-
-2021-08-29 Iain Sandoe <iain@sandoe.co.uk>
-
- * gcc.dg/analyzer/strndup-1.c: Skip for Darwin versions
- without strndup support in libc.
-
-2021-08-28 Jan Hubicka <hubicka@ucw.cz>
-
- * gcc.dg/tree-ssa/modref-9.c: New test.
-
-2021-08-28 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/87737
- * gfortran.dg/entry_24.f90: New test.
-
-2021-08-27 Michael Meissner <meissner@linux.ibm.com>
-
- * gcc.target/powerpc/float128-call.c: Update comments.
-
-2021-08-27 Michael Meissner <meissner@linux.ibm.com>
-
- * gcc.target/powerpc/float128-call.c: Fix test for IEEE 128-bit
- long double and power10.
-
-2021-08-27 Iain Sandoe <iain@sandoe.co.uk>
-
- * lib/target-supports.exp: Exclude cctools assembler based on
- GAS 1.38.
-
-2021-08-27 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/45178
- * gcc.dg/tree-ssa/ssa-dce-3.c: Adjust testcase.
-
-2021-08-27 konglin1 <lingling.kong@intel.com>
-
- PR target/101472
- * gcc.target/i386/avx512f-pr101472.c: New test.
- * gcc.target/i386/avx512vl-pr101472.c: New test.
-
-2021-08-27 Kewen Lin <linkw@linux.ibm.com>
-
- * gcc.target/powerpc/dive-vectorize-1.c: New test.
- * gcc.target/powerpc/dive-vectorize-1.h: New test.
- * gcc.target/powerpc/dive-vectorize-2.c: New test.
- * gcc.target/powerpc/dive-vectorize-2.h: New test.
- * gcc.target/powerpc/dive-vectorize-run-1.c: New test.
- * gcc.target/powerpc/dive-vectorize-run-2.c: New test.
- * gcc.target/powerpc/p10-bifs-vectorize-1.c: New test.
- * gcc.target/powerpc/p10-bifs-vectorize-1.h: New test.
- * gcc.target/powerpc/p10-bifs-vectorize-run-1.c: New test.
-
-2021-08-27 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512f-vshufpd-1.c: Adjust testcase.
- * gcc.target/i386/avx512f-vshufps-1.c: Adjust testcase.
- * gcc.target/i386/pr43147.c: New test.
-
-2021-08-26 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.dg/tree-ssa/ssa-ccp-41.c: New test case.
-
-2021-08-26 Martin Liska <mliska@suse.cz>
- Stefan Kneifel <stefan.kneifel@bluewin.ch>
-
- * gcc.target/i386/mvc5.c: Scan assembly names.
- * gcc.target/i386/mvc7.c: Likewise.
- * gcc.target/i386/pr95778-1.c: Update scanned patterns.
- * gcc.target/i386/pr95778-2.c: Likewise.
-
-2021-08-25 Martin Sebor <msebor@redhat.com>
-
- * gcc.dg/tree-ssa/evrp1.c: Add -details to dump option.
- * gcc.dg/tree-ssa/evrp2.c: Same.
- * gcc.dg/tree-ssa/evrp3.c: Same.
- * gcc.dg/tree-ssa/evrp4.c: Same.
- * gcc.dg/tree-ssa/evrp6.c: Same.
- * gcc.dg/tree-ssa/pr64130.c: Same.
-
-2021-08-25 Michael Meissner <meissner@linux.ibm.com>
-
- PR target/94630
- * gcc.target/powerpc/pr70117.c: Specify that we need the long double
- type to be IBM 128-bit. Remove the code to use __ibm128.
- * c-c++-common/dfp/convert-bfp-11.c: Specify that we need the long
- double type to be IBM 128-bit. Run the test at -O2 optimization.
- * lib/target-supports.exp (add_options_for_long_double_ibm128): New
- function.
- (check_effective_target_long_double_ibm128): New function.
- (add_options_for_long_double_ieee128): New function.
- (check_effective_target_long_double_ieee128): New function.
- (add_options_for_long_double_64bit): New function.
- (check_effective_target_long_double_64bit): New function.
-
-2021-08-25 Andrew Pinski <apinski@marvell.com>
-
- PR c++/66590
- * g++.dg/warn/Wreturn-5.C: New test.
-
-2021-08-25 Jan Hubicka <hubicka@ucw.cz>
-
- * gcc.dg/ipa/modref-1.c: Update testcase.
- * gcc.dg/tree-ssa/modref-4.c: Update testcase.
- * gcc.dg/tree-ssa/modref-8.c: New test.
-
-2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
-
- PR other/93067
- * gcc.dg/diagnostic-input-charset-1.c: New test.
- * gcc.dg/diagnostic-input-utf8-bom.c: New test.
-
-2021-08-25 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/102046
- * gcc.dg/vect/pr102046.c: New testcase.
-
-2021-08-25 Hongyu Wang <hongyu.wang@intel.com>
-
- PR target/101716
- * gcc.target/i386/pr101716.c: New test.
-
-2021-08-25 Jiufu Guo <guojiufu@linux.ibm.com>
-
- PR tree-optimization/101145
- * gcc.dg/vect/pr101145.c: New test.
- * gcc.dg/vect/pr101145.inc: New test.
- * gcc.dg/vect/pr101145_1.c: New test.
- * gcc.dg/vect/pr101145_2.c: New test.
- * gcc.dg/vect/pr101145_3.c: New test.
- * gcc.dg/vect/pr101145inf.c: New test.
- * gcc.dg/vect/pr101145inf.inc: New test.
- * gcc.dg/vect/pr101145inf_1.c: New test.
-
-2021-08-25 konglin1 <lingling.kong@intel.com>
-
- PR target/101471
- * gcc.target/i386/avx512f-pr101471.c: New test.
-
-2021-08-25 Kewen Lin <linkw@linux.ibm.com>
-
- * gcc.target/powerpc/unpack-vectorize-1.c: New test.
- * gcc.target/powerpc/unpack-vectorize-1.h: New test.
- * gcc.target/powerpc/unpack-vectorize-2.c: New test.
- * gcc.target/powerpc/unpack-vectorize-2.h: New test.
- * gcc.target/powerpc/unpack-vectorize-3.c: New test.
- * gcc.target/powerpc/unpack-vectorize-3.h: New test.
- * gcc.target/powerpc/unpack-vectorize-run-1.c: New test.
- * gcc.target/powerpc/unpack-vectorize-run-2.c: New test.
- * gcc.target/powerpc/unpack-vectorize-run-3.c: New test.
- * gcc.target/powerpc/unpack-vectorize.h: New test.
-
-2021-08-25 liuhongt <hongtao.liu@intel.com>
-
- PR target/101989
- * gcc.target/i386/avx2-shiftqihi-constant-1.c: Add -mno-avx512f.
- * gcc.target/i386/sse2-shiftqihi-constant-1.c: Add -mno-avx
-
-2021-08-24 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/98411
- * gfortran.dg/pr98411.f90: Adjust testcase options to restrict to
- F2008, and verify case of implicit SAVE.
-
-2021-08-24 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/101600
- PR middle-end/101977
- * g++.dg/pr100574.C: Prune out valid warning.
- * gcc.dg/pr20126.c: Same.
- * gcc.dg/Wstringop-overread.c: Adjust text of expected warnings.
- Add new instances.
- * gcc.dg/warn-strnlen-no-nul.c: Same.
- * g++.dg/warn/Warray-bounds-26.C: New test.
- * gcc.dg/Warray-bounds-88.c: New test.
-
-2021-08-24 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/predict-1.c: Disable evrp.
- * gcc.dg/tree-ssa/evrp-trans.c: New.
-
-2021-08-24 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/102021
- * gcc.target/i386/pr100865-10b.c: Expect vzeroupper.
- * gcc.target/i386/pr100865-4b.c: Likewise.
- * gcc.target/i386/pr100865-6b.c: Expect vmovdqu and vzeroupper.
- * gcc.target/i386/pr100865-7b.c: Likewise.
- * gcc.target/i386/pr102021.c: New test.
-
-2021-08-24 Richard Earnshaw <rearnsha@arm.com>
-
- PR target/102035
- * gcc.target/arm/cmse/mainline/8_1m/soft/cmse-13a.c: New test.
- * gcc.target/arm/cmse/mainline/8_1m/soft/cmse-7a.c: Likewise.
- * gcc.target/arm/cmse/mainline/8_1m/soft/cmse-8a.c: Likewise.
- * gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-7a.c: Likewise.
- * gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-8a.c: Likewise.
- * gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-13a.c: Likewise.
- * gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-7a.c: Likewise.
- * gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-8a.c: Likewise.
-
-2021-08-24 Richard Earnshaw <rearnsha@arm.com>
-
- * lib/target-supports.exp (check_effective_target_arm_cmse_hw):
- Check the CMSE feature register, rather than relying on the
- SG operation causing an execution fault.
-
-2021-08-24 liuhongt <hongtao.liu@intel.com>
-
- PR target/101989
- * gcc.target/i386/pr101989-broadcast-1.c: New test.
-
-2021-08-24 liuhongt <hongtao.liu@intel.com>
-
- PR target/101989
- * gcc.target/i386/pr101989-1.c: New test.
- * gcc.target/i386/pr101989-2.c: New test.
- * gcc.target/i386/avx512bw-shiftqihi-constant-1.c: Adjust testcase.
-
-2021-08-24 Roger Sayle <roger@nextmovesoftware.com>
- Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/102029
- * gcc.dg/fold-convlshift-3.c: New test case.
-
-2021-08-23 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/switch.c: Remove xfail. Add various tests.
- * gcc.dg/analyzer/torture/switch-2.c: New test.
- * gcc.dg/analyzer/torture/switch-3.c: New test.
- * gcc.dg/analyzer/torture/switch-4.c: New test.
- * gcc.dg/analyzer/torture/switch-5.c: New test.
-
-2021-08-23 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/101875
- * gcc.dg/analyzer/pr101875.c: New test.
-
-2021-08-23 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/101837
- * gcc.dg/analyzer/pr101837.c: New test.
-
-2021-08-23 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/101962
- * gcc.dg/analyzer/data-model-23.c: New test.
- * gcc.dg/analyzer/pr101962.c: New test.
-
-2021-08-23 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/data-model-22.c: New test.
- * gcc.dg/analyzer/uninit-6.c: New test.
- * gcc.dg/analyzer/uninit-6b.c: New test.
-
-2021-08-23 Jan Hubicka <hubicka@ucw.cz>
-
- * gcc.dg/tree-ssa/modref-7.c: New test.
-
-2021-08-23 Richard Biener <rguenther@suse.de>
-
- PR ipa/97565
- * g++.dg/lto/pr97565_0.C: New testcase.
- * g++.dg/lto/pr97565_1.C: Likewise.
-
-2021-08-23 Jan Hubicka <hubicka@ucw.cz>
-
- * g++.dg/tree-ssa/modref-1.C: Fix template.
-
-2021-08-23 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/goacc/asyncwait-1.f95: Update dg-error.
- * gfortran.dg/goacc/default-2.f: Update dg-error.
- * gfortran.dg/goacc/enter-exit-data.f95: Update dg-error.
- * gfortran.dg/goacc/if.f95: Update dg-error.
- * gfortran.dg/goacc/parallel-kernels-clauses.f95: Update dg-error.
- * gfortran.dg/goacc/routine-6.f90: Update dg-error.
- * gfortran.dg/goacc/sie.f95: Update dg-error.
- * gfortran.dg/goacc/update-if_present-2.f90: Update dg-error.
- * gfortran.dg/gomp/cancel-2.f90: Update dg-error.
- * gfortran.dg/gomp/declare-simd-1.f90: Update dg-error.
- * gfortran.dg/gomp/error-3.f90: Update dg-error.
- * gfortran.dg/gomp/loop-2.f90: Update dg-error.
- * gfortran.dg/gomp/masked-2.f90: Update dg-error.
-
-2021-08-23 Ankur Saini <arsenic@sourceware.org>
-
- PR analyzer/102020
- * gcc.dg/analyzer/malloc-callbacks.c : Fix faulty test.
-
-2021-08-23 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.dg/fold-convlshift-1.c: New test case.
- * gcc.dg/fold-convlshift-2.c: New test case.
-
-2021-08-23 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/86723
- * gcc.dg/pr86723.c: New test.
- * gcc.target/i386/pr86723.c: New test.
- * gcc.dg/optimize-bswapdi-1.c: Use -fdump-tree-optimized instead of
- -fdump-tree-bswap and scan for number of __builtin_bswap64 calls.
- * gcc.dg/optimize-bswapdi-2.c: Likewise.
- * gcc.dg/optimize-bswapsi-1.c: Use -fdump-tree-optimized instead of
- -fdump-tree-bswap and scan for number of __builtin_bswap32 calls.
- * gcc.dg/optimize-bswapsi-5.c: Likewise.
- * gcc.dg/optimize-bswapsi-3.c: Likewise. Expect one __builtin_bswap32
- call instead of zero.
-
-2021-08-23 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/79334
- * gcc.dg/torture/pr79334-0.c: New testcase.
- * gcc.dg/torture/pr79334-1.c: Likewise.
-
-2021-08-23 liuhongt <hongtao.liu@intel.com>
-
- PR target/102016
- * gcc.target/i386/pr102016.c: New test.
-
-2021-08-23 Jakub Jelinek <jakub@redhat.com>
-
- PR debug/101905
- * gcc.dg/guality/pr101905.c: New test.
-
-2021-08-23 Christophe Lyon <christophe.lyon@foss.st.com>
-
- PR target/100856
- * gcc.target/arm/acle/pr100856.c: Use arm_v8m_main_cde_multilib
- and arm_v8m_main_cde.
- * lib/target-supports.exp: Add
- check_effective_target_FUNC_multilib for ARM CDE.
-
-2021-08-23 Jan Hubicka <hubicka@ucw.cz>
-
- * g++.dg/tree-ssa/modref-1.C: New test.
-
-2021-08-23 Xi Ruoyao <xry111@mengyan1223.wang>
-
- PR target/101922
- * gcc.target/mips/pr101922.c: New test.
-
-2021-08-23 Jonathan Yong <10walls@gmail.com>
-
- * gcc.c-torture/execute/gcc_tmpnam.h: Fix tmpnam case on Windows
- where it can return a filename with "\" to indicate current
- directory.
- * gcc.c-torture/execute/fprintf-2.c: Use wrapper.
- * gcc.c-torture/execute/printf-2.c: Use wrapper.
- * gcc.c-torture/execute/user-printf.c: Use wrapper.
-
-2021-08-22 Martin Uecker <muecker@gwdg.de>
-
- PR c/98397
- * gcc.dg/c11-qual-1.c: New test.
- * gcc.dg/c2x-qual-1.c: New test.
- * gcc.dg/c2x-qual-2.c: New test.
- * gcc.dg/c2x-qual-3.c: New test.
- * gcc.dg/c2x-qual-4.c: New test.
- * gcc.dg/c2x-qual-5.c: New test.
- * gcc.dg/c2x-qual-6.c: New test.
- * gcc.dg/c2x-qual-7.c: New test.
- * gcc.dg/pointer-array-quals-1.c: Remove unnecessary flag.
- * gcc.dg/pointer-array-quals-2.c: Remove unnecessary flag.
-
-2021-08-22 Jan Hubicka <hubicka@ucw.cz>
- Martin Liska <mliska@suse.cz>
-
- * gcc.dg/lto/pr101949_0.c: New test.
- * gcc.dg/lto/pr101949_1.c: New test.
-
-2021-08-21 Ankur Saini <arsenic@sourceware.org>
-
- PR analyzer/101980
- * gcc.dg/analyzer/function-ptr-2.c : Add issue for double 'free'.
- * gcc.dg/analyzer/malloc-callbacks.c : Fix xfail testcase.
-
-2021-08-20 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/gomp/error-1.f90: New test.
- * gfortran.dg/gomp/error-2.f90: New test.
- * gfortran.dg/gomp/error-3.f90: New test.
-
-2021-08-20 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/error-1.c: New test.
- * c-c++-common/gomp/error-2.c: New test.
- * c-c++-common/gomp/error-3.c: New test.
- * g++.dg/gomp/attrs-1.C (bar): Add error directive test.
- * g++.dg/gomp/attrs-2.C (bar): Add error directive test.
- * g++.dg/gomp/attrs-13.C: New test.
- * g++.dg/gomp/error-1.C: New test.
-
-2021-08-20 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/sink-5.c: New test.
- * c-c++-common/gomp/requires-3.c: Add test for spurious comma
- at the end of pragma line.
-
-2021-08-19 Roger Sayle <roger@nextmovesoftware.com>
-
- * c-c++-common/Wunused-var-16.c: Add an extra check that ~0
- is optimized away.
-
-2021-08-19 Peter Bergner <bergner@linux.ibm.com>
-
- PR target/101849
- * gcc.target/powerpc/pr101849.c: New test.
-
-2021-08-19 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/100950
- * gfortran.dg/pr100950.f90: New test.
-
-2021-08-19 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101803
- * g++.dg/cpp2a/class-deduction-aggr12.C: Fix PR number.
-
-2021-08-19 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/101950
- * gcc.target/i386/pr101950-1.c: New test.
- * gcc.target/i386/pr101950-2.c: New test.
-
-2021-08-19 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/requires-3.c: Add testcase for
- atomic_default_mem_order ( at the end of line without corresponding ).
-
-2021-08-19 Iain Sandoe <iain@sandoe.co.uk>
-
- * jit.dg/test-asm.c: Provide Mach-O fragment.
- * jit.dg/test-asm.cc: Likewise.
-
-2021-08-19 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/nothing-2.c: New test.
-
-2021-08-19 Iain Sandoe <iain@sandoe.co.uk>
-
- * jit.dg/harness.h: Include jit-dejagnu.h.
- * jit.dg/jit.exp: Use -rdynamic conditionally on target
- support, instead of unconditional -Wl,--export-dynamic.
-
-2021-08-19 Thomas Schwinge <thomas@codesourcery.com>
-
- PR testsuite/101969
- * gcc.dg/pr78213.c: Fix up for '--enable-checking=release' etc.
-
-2021-08-19 liuhongt <hongtao.liu@intel.com>
-
- Revert:
- 2021-08-19 liuhongt <hongtao.liu@intel.com>
-
- PR target/99881
- * gcc.target/i386/pr99881.c: New test.
-
-2021-08-18 Tobias Burnus <tobias@codesourcery.com>
-
- PR testsuite/101963
- * gfortran.dg/nothing-1.f90: Moved to ...
- * gfortran.dg/gomp/nothing-1.f90: ... here.
- * gfortran.dg/nothing-2.f90: Moved to ...
- * gfortran.dg/gomp/nothing-2.f90: ... here;
- avoid $ issue in $OMP in dg-error.
-
-2021-08-18 Iain Sandoe <iain@sandoe.co.uk>
- Matt Jacobson <mhjacobson@me.com>
-
- PR objc/101666
- * obj-c++.dg/pr101666-0.mm: New test.
- * obj-c++.dg/pr101666-1.mm: New test.
- * obj-c++.dg/pr101666.inc: New.
- * objc.dg/pr101666-0.m: New test.
- * objc.dg/pr101666-1.m: New test.
- * objc.dg/pr101666.inc: New.
-
-2021-08-18 Ankur Saini <arsenic@sourceware.org>
-
- PR analyzer/97114
- * g++.dg/analyzer/vfunc-2.C: New test.
- * g++.dg/analyzer/vfunc-3.C: New test.
- * g++.dg/analyzer/vfunc-4.C: New test.
- * g++.dg/analyzer/vfunc-5.C: New test.
-
-2021-08-18 Ankur Saini <arsenic@sourceware.org>
-
- PR analyzer/100546
- * gcc.dg/analyzer/function-ptr-4.c: New test.
- * gcc.dg/analyzer/pr100546.c: New test.
-
-2021-08-18 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/nothing-1.f90: New test.
- * gfortran.dg/nothing-2.f90: New test.
-
-2021-08-18 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101344
- PR c++/101803
- * g++.dg/cpp2a/class-deduction-aggr11.C: New test.
- * g++.dg/cpp2a/class-deduction-aggr12.C: New test.
-
-2021-08-18 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101883
- * g++.dg/cpp2a/nontype-class49.C: New test.
-
-2021-08-18 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/nothing-1.c: New test.
- * g++.dg/gomp/attrs-1.C (bar): Add nothing directive test.
- * g++.dg/gomp/attrs-2.C (bar): Likewise.
- * g++.dg/gomp/attrs-9.C: Likewise.
-
-2021-08-18 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/pr63326.c: Don't expect extra "before" errors
- in C++.
- * g++.dg/gomp/attrs-7.C: Don't expect one extra error.
- * g++.dg/gomp/barrier-2.C: Likewise.
- * gcc.dg/gomp/declare-simd-5.c: Likewise.
- * gcc.dg/gomp/barrier-2.c: Likewise.
- * gcc.dg/gomp/declare-variant-2.c: Likewise.
-
-2021-08-18 liuhongt <hongtao.liu@intel.com>
-
- PR target/97147
- * gcc.target/i386/pr54400.c: Adjust testcase.
- * gcc.target/i386/pr94147.c: New test.
-
-2021-08-17 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/101854
- * gcc.dg/attr-alloc_size-5.c: Adjust optimization to -O1.
- * gcc.dg/attr-alloc_size-7.c: Use #pragmas to adjust optimization.
- * gcc.dg/attr-alloc_size-8.c: Adjust optimization to -O1.
- * gcc.dg/Wstringop-overflow-72.c: New test.
-
-2021-08-17 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/101539
- * g++.dg/cpp2a/is-corresponding-member1.C: New test.
- * g++.dg/cpp2a/is-corresponding-member2.C: New test.
- * g++.dg/cpp2a/is-corresponding-member3.C: New test.
- * g++.dg/cpp2a/is-corresponding-member4.C: New test.
- * g++.dg/cpp2a/is-corresponding-member5.C: New test.
- * g++.dg/cpp2a/is-corresponding-member6.C: New test.
- * g++.dg/cpp2a/is-corresponding-member7.C: New test.
- * g++.dg/cpp2a/is-corresponding-member8.C: New test.
- * g++.dg/cpp2a/is-layout-compatible1.C: New test.
- * g++.dg/cpp2a/is-layout-compatible2.C: New test.
- * g++.dg/cpp2a/is-layout-compatible3.C: New test.
-
-2021-08-17 Thomas Schwinge <thomas@codesourcery.com>
-
- * gcc.dg/pr78213.c: Restore testing.
-
-2021-08-17 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.dg/tree-ssa/ssa-ccp-40.c: New test case.
-
-2021-08-17 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.dg/fold-ior-5.c: New test case.
-
-2021-08-17 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/gomp/scan-1.f90:
- * gfortran.dg/gomp/cancel-1.f90: New test.
- * gfortran.dg/gomp/cancel-4.f90: New test.
- * gfortran.dg/gomp/loop-4.f90: New test.
- * gfortran.dg/gomp/nesting-1.f90: New test.
- * gfortran.dg/gomp/nesting-2.f90: New test.
- * gfortran.dg/gomp/nesting-3.f90: New test.
- * gfortran.dg/gomp/nowait-1.f90: New test.
- * gfortran.dg/gomp/reduction-task-1.f90: New test.
- * gfortran.dg/gomp/reduction-task-2.f90: New test.
- * gfortran.dg/gomp/reduction-task-2a.f90: New test.
- * gfortran.dg/gomp/reduction-task-3.f90: New test.
- * gfortran.dg/gomp/scope-1.f90: New test.
- * gfortran.dg/gomp/scope-2.f90: New test.
-
-2021-08-17 Andrew MacLeod <amacleod@redhat.com>
-
- PR tree-optimization/101938
- * gcc.dg/pr101938.c: New test.
-
-2021-08-17 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101868
- * gcc.dg/lto/pr101868_0.c: New testcase.
- * gcc.dg/lto/pr101868_1.c: Likewise.
- * gcc.dg/lto/pr101868_2.c: Likewise.
- * gcc.dg/lto/pr101868_3.c: Likewise.
-
-2021-08-17 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/nesting-2.c (foo): Add scope and masked
- construct tests.
- * c-c++-common/gomp/scan-1.c (f3): Add scope construct test..
- * c-c++-common/gomp/cancel-1.c (f2): Add scope and masked
- construct tests.
- * c-c++-common/gomp/reduction-task-2.c (bar): Add scope construct
- test. Adjust diagnostics for the addition of scope.
- * c-c++-common/gomp/loop-1.c (f5): Add master, masked and scope
- construct tests.
- * c-c++-common/gomp/clause-dups-1.c (f1): Add scope construct test.
- * gcc.dg/gomp/nesting-1.c (f1, f2, f3): Add scope construct tests.
- * c-c++-common/gomp/scope-1.c: New test.
- * c-c++-common/gomp/scope-2.c: New test.
- * g++.dg/gomp/attrs-1.C (bar): Add scope construct tests.
- * g++.dg/gomp/attrs-2.C (bar): Likewise.
- * gfortran.dg/gomp/reduction4.f90: Adjust expected diagnostics.
- * gfortran.dg/gomp/reduction7.f90: Likewise.
-
-2021-08-17 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/cpp/va-opt-5.c: New test.
- * c-c++-common/cpp/va-opt-6.c: New test.
-
-2021-08-17 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101925
- * gcc.dg/sso-16.c: New testcase.
-
-2021-08-17 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/pr82460-2.c: Adjust testcase by adding
- --param=vect-epilogues-nomask=0
-
-2021-08-16 liuhongt <hongtao.liu@intel.com>
-
- PR target/101930
- * gcc.target/i386/pr101930.c: New test.
-
-2021-08-16 Martin Liska <mliska@suse.cz>
-
- PR ipa/100600
- * gcc.dg/ipa/pr100600.c: New test.
-
-2021-08-16 liuhongt <hongtao.liu@intel.com>
-
- PR target/101846
- * gcc.target/i386/pr101846-2.c: New test.
- * gcc.target/i386/pr101846-3.c: New test.
- * gcc.target/i386/pr101846-4.c: New test.
-
-2021-08-16 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/gomp/masked-1.f90: New test.
- * gfortran.dg/gomp/masked-2.f90: New test.
- * gfortran.dg/gomp/masked-3.f90: New test.
- * gfortran.dg/gomp/masked-combined-1.f90: New test.
- * gfortran.dg/gomp/masked-combined-2.f90: New test.
-
-2021-08-15 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/99351
- * gfortran.dg/coarray_sync.f90: New test.
- * gfortran.dg/coarray_3.f90: Adjust error messages.
-
-2021-08-14 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/101791
- * g++.dg/warn/Wmismatched-new-delete-6.C: New test.
- * g++.dg/warn/Wmismatched-new-delete-7.C: New test.
-
-2021-08-14 Jakub Jelinek <jakub@redhat.com>
-
- PR target/101896
- * gcc.target/i386/avx512f-pr101896.c: New test.
-
-2021-08-13 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/101734
- * gcc.dg/uninit-42.c: New test.
-
-2021-08-13 Martin Liska <mliska@suse.cz>
-
- PR ipa/101261
- * gcc.target/i386/pr101261.c: New test.
-
-2021-08-13 Jan Hubicka <hubicka@ucw.cz>
-
- * gcc.dg/tree-ssa/modref-6.c: Update.
-
-2021-08-13 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
-
- * gcc.target/arm/simd/pr98435.c: Add dg-require-effective-target
- arm_softfp_ok.
-
-2021-08-12 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/clauses-1.c (bar): Add tests for combined masked
- constructs with clauses.
- * c-c++-common/gomp/clauses-5.c (foo): Add testcase for filter clause.
- * c-c++-common/gomp/clause-dups-1.c (f1): Likewise.
- * c-c++-common/gomp/masked-1.c: New test.
- * c-c++-common/gomp/masked-2.c: New test.
- * c-c++-common/gomp/masked-combined-1.c: New test.
- * c-c++-common/gomp/masked-combined-2.c: New test.
- * c-c++-common/goacc/uninit-if-clause.c: Remove xfails.
- * g++.dg/gomp/block-11.C: New test.
- * g++.dg/gomp/tpl-masked-1.C: New test.
- * g++.dg/gomp/attrs-1.C (bar): Add tests for masked construct and
- combined masked constructs with clauses in attribute syntax.
- * g++.dg/gomp/attrs-2.C (bar): Likewise.
- * gcc.dg/gomp/nesting-1.c (f1, f2): Add tests for masked construct
- nesting.
- * gfortran.dg/goacc/host_data-tree.f95: Allow also SSA_NAMEs in if
- clause.
- * gfortran.dg/goacc/kernels-tree.f95: Likewise.
-
-2021-08-12 Jakub Jelinek <jakub@redhat.com>
-
- PR preprocessor/101638
- * gcc.dg/cpp/pr101638.c: New test.
-
-2021-08-12 Michael Meissner <meissner@linux.ibm.com>
-
- * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-char.c: Fix
- typo in regular expression.
- * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-double.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-float.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-int.c:
+2022-02-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/96876
+ * g++.dg/cpp1z/aggr-base11.C: New test.
+ * g++.dg/eh/aggregate2.C: New test.
+
+2022-02-08 Robin Dapp <rdapp@linux.ibm.com>
+
+ PR rtl-optimization/104198
+ PR rtl-optimization/104153
+ * gcc.dg/pr104198.c: New test.
+
+2022-02-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/104379
+ * g++.dg/warn/Wshadow-18.C: New test.
+
+2022-02-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/104403
+ * g++.dg/cpp0x/lambda/lambda-104403.C: New test.
+
+2022-02-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/102140
+ * gcc.dg/pr102140.c: New test.
+
+2022-02-08 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ * gcc.target/powerpc/vec-msumc.c: New test.
+
+2022-02-08 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/104425
+ * g++.dg/template/partial-specialization10.C: New test.
+
+2022-02-08 Robin Dapp <rdapp@linux.ibm.com>
+
+ * gcc.target/s390/ifcvt-two-insns-int.c: Fix array size.
+ * gcc.target/s390/ifcvt-two-insns-long.c: Dito.
+
+2022-02-08 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/80951
+ * g++.dg/cpp1z/noexcept-type25.C: New test.
+
+2022-02-08 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/104410
+ * g++.dg/cpp2a/concepts-pr104410.C: New test.
+
+2022-02-08 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/103706
+ * g++.dg/cpp2a/concepts-lambda19.C: New test.
+
+2022-02-08 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/103706
+ * g++.dg/cpp2a/concepts-lambda18.C: New test.
+
+2022-02-08 Maciej W. Rozycki <macro@embecosm.com>
+
+ * gcc.target/riscv/riscv.exp: Use `gcc-dg-runtest' rather than
+ `dg-runtest'. Add `-Og -g' and `-Oz' variants via
+ ADDITIONAL_TORTURE_OPTIONS.
+ * gcc.target/riscv/arch-1.c: Adjust test options accordingly.
+ * gcc.target/riscv/arch-10.c: Likewise.
+ * gcc.target/riscv/arch-11.c: Likewise.
+ * gcc.target/riscv/arch-12.c: Likewise.
+ * gcc.target/riscv/arch-2.c: Likewise.
+ * gcc.target/riscv/arch-3.c: Likewise.
+ * gcc.target/riscv/arch-4.c: Likewise.
+ * gcc.target/riscv/arch-5.c: Likewise.
+ * gcc.target/riscv/arch-6.c: Likewise.
+ * gcc.target/riscv/arch-7.c: Likewise.
+ * gcc.target/riscv/arch-8.c: Likewise.
+ * gcc.target/riscv/arch-9.c: Likewise.
+ * gcc.target/riscv/attribute-1.c: Likewise.
+ * gcc.target/riscv/attribute-10.c: Likewise.
+ * gcc.target/riscv/attribute-11.c: Likewise.
+ * gcc.target/riscv/attribute-12.c: Likewise.
+ * gcc.target/riscv/attribute-13.c: Likewise.
+ * gcc.target/riscv/attribute-14.c: Likewise.
+ * gcc.target/riscv/attribute-15.c: Likewise.
+ * gcc.target/riscv/attribute-16.c: Likewise.
+ * gcc.target/riscv/attribute-17.c: Likewise.
+ * gcc.target/riscv/attribute-2.c: Likewise.
+ * gcc.target/riscv/attribute-3.c: Likewise.
+ * gcc.target/riscv/attribute-4.c: Likewise.
+ * gcc.target/riscv/attribute-5.c: Likewise.
+ * gcc.target/riscv/attribute-7.c: Likewise.
+ * gcc.target/riscv/attribute-8.c: Likewise.
+ * gcc.target/riscv/attribute-9.c: Likewise.
+ * gcc.target/riscv/interrupt-1.c: Likewise.
+ * gcc.target/riscv/interrupt-2.c: Likewise.
+ * gcc.target/riscv/interrupt-3.c: Likewise.
+ * gcc.target/riscv/interrupt-4.c: Likewise.
+ * gcc.target/riscv/interrupt-conflict-mode.c: Likewise.
+ * gcc.target/riscv/interrupt-debug.c: Likewise.
+ * gcc.target/riscv/interrupt-mmode.c: Likewise.
+ * gcc.target/riscv/interrupt-smode.c: Likewise.
+ * gcc.target/riscv/interrupt-umode.c: Likewise.
+ * gcc.target/riscv/li.c: Likewise.
+ * gcc.target/riscv/load-immediate.c: Likewise.
+ * gcc.target/riscv/losum-overflow.c: Likewise.
+ * gcc.target/riscv/mcpu-6.c: Likewise.
+ * gcc.target/riscv/mcpu-7.c: Likewise.
+ * gcc.target/riscv/pr102957.c: Likewise.
+ * gcc.target/riscv/pr103302.c: Likewise.
+ * gcc.target/riscv/pr104140.c: Likewise.
+ * gcc.target/riscv/pr84660.c: Likewise.
+ * gcc.target/riscv/pr93202.c: Likewise.
+ * gcc.target/riscv/pr93304.c: Likewise.
+ * gcc.target/riscv/pr95252.c: Likewise.
+ * gcc.target/riscv/pr95683.c: Likewise.
+ * gcc.target/riscv/pr98777.c: Likewise.
+ * gcc.target/riscv/pr99702.c: Likewise.
+ * gcc.target/riscv/predef-1.c: Likewise.
+ * gcc.target/riscv/predef-10.c: Likewise.
+ * gcc.target/riscv/predef-11.c: Likewise.
+ * gcc.target/riscv/predef-12.c: Likewise.
+ * gcc.target/riscv/predef-13.c: Likewise.
+ * gcc.target/riscv/predef-14.c: Likewise.
+ * gcc.target/riscv/predef-15.c: Likewise.
+ * gcc.target/riscv/predef-16.c: Likewise.
+ * gcc.target/riscv/predef-2.c: Likewise.
+ * gcc.target/riscv/predef-3.c: Likewise.
+ * gcc.target/riscv/predef-4.c: Likewise.
+ * gcc.target/riscv/predef-5.c: Likewise.
+ * gcc.target/riscv/predef-6.c: Likewise.
+ * gcc.target/riscv/predef-7.c: Likewise.
+ * gcc.target/riscv/predef-8.c: Likewise.
+ * gcc.target/riscv/promote-type-for-libcall.c: Likewise.
+ * gcc.target/riscv/save-restore-1.c: Likewise.
+ * gcc.target/riscv/save-restore-2.c: Likewise.
+ * gcc.target/riscv/save-restore-3.c: Likewise.
+ * gcc.target/riscv/save-restore-4.c: Likewise.
+ * gcc.target/riscv/save-restore-6.c: Likewise.
+ * gcc.target/riscv/save-restore-7.c: Likewise.
+ * gcc.target/riscv/save-restore-8.c: Likewise.
+ * gcc.target/riscv/save-restore-9.c: Likewise.
+ * gcc.target/riscv/shift-and-1.c: Likewise.
+ * gcc.target/riscv/shift-and-2.c: Likewise.
+ * gcc.target/riscv/shift-shift-1.c: Likewise.
+ * gcc.target/riscv/shift-shift-2.c: Likewise.
+ * gcc.target/riscv/shift-shift-3.c: Likewise.
+ * gcc.target/riscv/shift-shift-4.c: Likewise.
+ * gcc.target/riscv/shift-shift-5.c: Likewise.
+ * gcc.target/riscv/shorten-memrefs-1.c: Likewise.
+ * gcc.target/riscv/shorten-memrefs-2.c: Likewise.
+ * gcc.target/riscv/shorten-memrefs-3.c: Likewise.
+ * gcc.target/riscv/shorten-memrefs-4.c: Likewise.
+ * gcc.target/riscv/shorten-memrefs-5.c: Likewise.
+ * gcc.target/riscv/shorten-memrefs-6.c: Likewise.
+ * gcc.target/riscv/shorten-memrefs-7.c: Likewise.
+ * gcc.target/riscv/shorten-memrefs-8.c: Likewise.
+ * gcc.target/riscv/switch-qi.c: Likewise.
+ * gcc.target/riscv/switch-si.c: Likewise.
+ * gcc.target/riscv/weak-1.c: Likewise.
+ * gcc.target/riscv/zba-adduw.c: Likewise.
+ * gcc.target/riscv/zba-shNadd-01.c: Likewise.
+ * gcc.target/riscv/zba-shNadd-02.c: Likewise.
+ * gcc.target/riscv/zba-shNadd-03.c: Likewise.
+ * gcc.target/riscv/zba-slliuw.c: Likewise.
+ * gcc.target/riscv/zba-zextw.c: Likewise.
+ * gcc.target/riscv/zbb-andn-orn-xnor-01.c: Likewise.
+ * gcc.target/riscv/zbb-andn-orn-xnor-02.c: Likewise.
+ * gcc.target/riscv/zbb-li-rotr.c: Likewise.
+ * gcc.target/riscv/zbb-min-max.c: Likewise.
+ * gcc.target/riscv/zbb-rol-ror-01.c: Likewise.
+ * gcc.target/riscv/zbb-rol-ror-02.c: Likewise.
+ * gcc.target/riscv/zbb-rol-ror-03.c: Likewise.
+ * gcc.target/riscv/zbbw.c: Likewise.
+ * gcc.target/riscv/zbs-bclr.c: Likewise.
+ * gcc.target/riscv/zbs-bext.c: Likewise.
+ * gcc.target/riscv/zbs-binv.c: Likewise.
+ * gcc.target/riscv/zbs-bset.c: Likewise.
+ * gcc.target/riscv/zero-extend-1.c: Likewise.
+ * gcc.target/riscv/zero-extend-2.c: Likewise.
+ * gcc.target/riscv/zero-extend-3.c: Likewise.
+ * gcc.target/riscv/zero-extend-4.c: Likewise.
+ * gcc.target/riscv/zero-extend-5.c: Likewise.
+
+2022-02-08 Tom de Vries <tdevries@suse.de>
+
+ * gcc.dg/tree-ssa/builtin-sprintf.c: Require c99_runtime for
+ dg-do run.
+
+2022-02-08 Tom de Vries <tdevries@suse.de>
+
+ PR target/104364
+ * gcc.target/nvptx/softstack-2.c: New test.
+ * gcc.target/nvptx/uniform-simt-1.c: New test.
+
+2022-02-08 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr104059.c: New test.
+
+2022-02-07 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/104417
+ * gcc.dg/analyzer/pr104417.c: New test.
+
+2022-02-07 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/103872
+ * gcc.dg/analyzer/memcpy-1.c: Add alternate versions of test cases
+ in which the calls to memcpy are hidden from the optimizer. Add
+ further test cases.
+ * gcc.dg/analyzer/taint-size-1.c: Add test coverage for memcpy
+ with tainted size.
+
+2022-02-07 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/asm-x86-1.c: Use dg-do "compile" rather than
+ "assemble".
+ * gcc.dg/analyzer/asm-x86-lp64-1.c: Likewise.
+ * gcc.dg/analyzer/asm-x86-lp64-2.c: Likewise.
+ * gcc.dg/analyzer/torture/asm-x86-linux-array_index_mask_nospec.c:
Likewise.
- * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-longlong.c:
+ * gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c:
+ Likewise, and restrict to x86_64-pc-linux-gnu.
+ * gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-2.c: Likewise.
+ * gcc.dg/analyzer/torture/asm-x86-linux-cpuid.c: Use dg-do
+ "compile" rather than "assemble".
+ * gcc.dg/analyzer/torture/asm-x86-linux-rdmsr-paravirt.c:
+ Likewise, and restrict to x86_64-pc-linux-gnu.
+ * gcc.dg/analyzer/torture/asm-x86-linux-rdmsr.c: Use dg-do
+ "compile" rather than "assemble".
+ * gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c:
Likewise.
- * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-short.c:
+ * gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-reduced.c:
Likewise.
-2021-08-12 Sergei Trofimovich <siarheit@google.com>
-
- PR c++/101219
- * g++.dg/warn/pr101219.C: New test.
-
-2021-08-12 Martin Uecker <muecker@gwdg.de>
-
- PR c/101838
- * gcc.dg/vla-stexp-2.c: New test.
-
-2021-08-12 Aldy Hernandez <aldyh@redhat.com>
-
- * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Remove call into the legacy
- code and adjust for ranger threader.
-
-2021-08-12 Tobias Burnus <tobias@codesourcery.com>
-
- * c-c++-common/gomp/pr61486-2.c: Duplicate one proc_bind(master)
- testcase and test proc_bind(primary) instead.
- * gfortran.dg/gomp/affinity-1.f90: Likewise.
-
-2021-08-12 Hans-Peter Nilsson <hp@axis.com>
-
- * gfortran.dg/PR82376.f90: Robustify match.
-
-2021-08-12 Jakub Jelinek <jakub@redhat.com>
-
- PR target/101860
- * gcc.target/i386/avx512f-pr101860.c: New test.
-
-2021-08-12 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/gomp/attrs-12.C: New test.
-
-2021-08-12 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/gomp/attrs-11.C: Add new tests.
-
-2021-08-12 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99429
- PR c++/94162
- * g++.dg/cpp2a/spaceship-synth11.C: New test.
- * g++.dg/cpp2a/spaceship-synth-neg6.C: New test.
-
-2021-08-12 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/gomp/attrs-11.C: Adjust expected diagnostics.
-
-2021-08-12 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/lookup/strong-using.C: Add test using [[gnu::strong]]
- as well.
- * g++.dg/lookup/strong-using2.C: Likewise.
- * g++.dg/cpp0x/gen-attrs-58.C: Move alignas(int) before
- using namespace.
- * g++.dg/cpp0x/gen-attrs-59.C: Move alignas(X) before
- using namespace, add tests for alignas before semicolon.
- * g++.dg/cpp0x/gen-attrs-76.C: Remove xfails. Add test for
- C++11 attributes on using directive before semicolon.
-
-2021-08-12 liuhongt <hongtao.liu@intel.com>
-
- PR target/101846
- * gcc.target/i386/pr101846-1.c: New test.
-
-2021-08-12 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101663
- * g++.dg/cpp2a/construct_at.h: New convenience header file that
- defines minimal implementations of std::construct_at/destroy_at,
- split out from ...
- * g++.dg/cpp2a/constexpr-new5.C: ... here.
- * g++.dg/cpp2a/constexpr-new6.C: Use the header.
- * g++.dg/cpp2a/constexpr-new14.C: Likewise.
- * g++.dg/cpp2a/constexpr-new20.C: New test.
-
-2021-08-11 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101725
- DR 2082
- * g++.dg/DRs/dr2082.C: New test.
- * g++.dg/cpp2a/concepts-uneval4.C: New test.
-
-2021-08-11 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/101786
- * g++.dg/cpp2a/constinit16.C: New test.
-
-2021-08-11 Patrick Palka <ppalka@redhat.com>
-
- PR c++/79501
- * g++.dg/cpp1z/class-deduction98.C: New test.
-
-2021-08-11 Patrick Palka <ppalka@redhat.com>
-
- PR c++/89062
- * g++.dg/cpp1z/class-deduction97.C: New test.
-
-2021-08-11 Richard Biener <rguenther@suse.de>
-
- * gcc.dg/lto/pr48622_1.c: Provide non-LTO definition
- of ashift_qi_1.
-
-2021-08-11 Jan Hubicka <jh@suse.cz>
-
- * c-c++-common/modref-dse.c: New test.
-
-2021-08-11 Richard Biener <rguenther@suse.de>
-
- PR middle-end/101858
- * gcc.dg/pr101858.c: New testcase.
-
-2021-08-11 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
-
- PR target/66791
- * gcc.target/arm/pr51534.c: Adjust test.
-
-2021-08-11 liuhongt <hongtao.liu@intel.com>
-
- PR target/98309
- * gcc.target/i386/pr98309-1.c: New test.
- * gcc.target/i386/pr98309-2.c: New test.
-
-2021-08-11 Hans-Peter Nilsson <hp@axis.com>
-
- PR middle-end/101674
- * gcc.dg/uninit-pred-9_b.c: Xfail for cris-*-* too.
-
-2021-08-10 Tobias Burnus <tobias@codesourcery.com>
-
- PR libfortran/101305
- PR fortran/101660
- PR testsuite/101847
- * lib/gfortran.exp (gfortran_init): Remove -I$specpath/libgfortran
- from the string used to set GFORTRAN_UNDER_TEST.
-
-2021-08-10 H.J. Lu <hjl.tools@gmail.com>
-
- PR tree-optimization/101809
- * gcc.target/i386/pr88531-1a.c: Enable for all targets.
-
-2021-08-10 Jakub Jelinek <jakub@redhat.com>
-
- PR target/80355
- * gcc.target/i386/avx512f-pr80355-2.c: New test.
-
-2021-08-10 Jakub Jelinek <jakub@redhat.com>
-
- PR target/80355
- * gcc.target/i386/avx512f-pr80355-1.c: New test.
-
-2021-08-10 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/gomp/attrs-1.C (bar): Add missing semicolon after
- [[omp::directive (threadprivate (t2))]]. Add tests with
- if/while/switch after parallel in attribute syntax.
- (corge): Add missing omp:: before directive.
- * g++.dg/gomp/attrs-2.C (bar): Add missing semicolon after
- [[omp::directive (threadprivate (t2))]].
- * g++.dg/gomp/attrs-10.C: New test.
- * g++.dg/gomp/attrs-11.C: New test.
-
-2021-08-10 Hongyu Wang <hongyu.wang@intel.com>
-
- * gcc.target/i386/amxbf16-dpbf16ps-2.c: Fix typos.
-
-2021-08-10 Richard Biener <rguenther@suse.de>
-
- PR middle-end/101824
- * gcc.dg/tree-ssa/pr101824.c: New testcase.
-
-2021-08-10 Martin Uecker <muecker@gwdg.de>
-
- PR c/29970
- * gcc.dg/vla-stexp-1.c: New test.
-
-2021-08-10 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101804
- * gcc.target/i386/avx2-gather-2.c: Pass -march=skylake instead
- of "-mavx2 -mtune=skylake". Scan vpcmpeqd.
+2022-02-07 Jakub Jelinek <jakub@redhat.com>
-2021-08-10 liuhongt <hongtao.liu@intel.com>
+ PR target/104380
+ * gcc.c-torture/execute/builtins/lib/chk.c (__sprintf_chkieee128,
+ __vsprintf_chkieee128, __snprintf_chkieee128,
+ __vsnprintf_chkieee128): New aliases to non-ieee128 suffixed functions
+ for powerpc -mabi=ieeelongdouble.
- * gcc.target/i386/cond_op_shift_d-1.c: New test.
- * gcc.target/i386/cond_op_shift_d-2.c: New test.
- * gcc.target/i386/cond_op_shift_q-1.c: New test.
- * gcc.target/i386/cond_op_shift_q-2.c: New test.
- * gcc.target/i386/cond_op_shift_ud-1.c: New test.
- * gcc.target/i386/cond_op_shift_ud-2.c: New test.
- * gcc.target/i386/cond_op_shift_uq-1.c: New test.
- * gcc.target/i386/cond_op_shift_uq-2.c: New test.
- * gcc.target/i386/cond_op_shift_uw-1.c: New test.
- * gcc.target/i386/cond_op_shift_uw-2.c: New test.
- * gcc.target/i386/cond_op_shift_w-1.c: New test.
- * gcc.target/i386/cond_op_shift_w-2.c: New test.
+2022-02-07 Tamar Christina <tamar.christina@arm.com>
-2021-08-09 Andrew MacLeod <amacleod@redhat.com>
+ * gcc.target/arm/simd/vdot-2-1.c: Add new tests.
+ * gcc.target/arm/simd/vdot-2-2.c: Likewise and fix output.
- * gcc.dg/pr101741.c: New.
+2022-02-07 Tamar Christina <tamar.christina@arm.com>
-2021-08-09 Martin Jambor <mjambor@suse.cz>
+ * gcc.target/arm/simd/vdot-compile.c: Add new cases.
+ * gcc.target/arm/simd/vdot-exec.c: Likewise.
- PR testsuite/101654
- * gcc.dg/ipa/remref-6.c: Added missing -fdump-ipa-inline option.
+2022-02-07 Andreas Krebbel <krebbel@linux.ibm.com>
-2021-08-09 Uroš Bizjak <ubizjak@gmail.com>
+ PR target/104327
+ * gcc.c-torture/compile/pr104327.c: New test.
- PR target/101812
- * gcc.target/i386/pr101812.c: New test.
+2022-02-07 Richard Biener <rguenther@suse.de>
-2021-08-09 Tejas Belagod <tejas.belagod@arm.com>
+ PR middle-end/104402
+ * gcc.dg/torture/pr104402.c: New testcase.
- * gcc.target/aarch64/vect-shr-reg.c: New testcase.
- * gcc.target/aarch64/vect-shr-reg-run.c: Likewise.
+2022-02-07 Kewen Lin <linkw@linux.ibm.com>
-2021-08-09 Roger Sayle <roger@nextmovesoftware.com>
+ PR target/103627
+ * gcc.target/powerpc/pr103627-3.c: New test.
- * gcc.dg/pr68217.c: Add -fno-tree-ccp option.
- * gcc.dg/tree-ssa/vrp24.c: Add -fno-tree-ccp option.
- * g++.dg/ipa/pure-const-3.C: Add -fno-tree-ccp option.
+2022-02-07 Kewen Lin <linkw@linux.ibm.com>
-2021-08-09 Tobias Burnus <tobias@codesourcery.com>
+ PR target/103627
+ * gcc.target/powerpc/pr103627-1.c: New test.
+ * gcc.target/powerpc/pr103627-2.c: New test.
- PR libfortran/101305
- PR fortran/101660
- * lib/gfortran.exp (gfortran_init): Add -I $specdir/libgfortran to
- GFORTRAN_UNDER_TEST; update it when set by previous gfortran_init call.
- * gfortran.dg/ISO_Fortran_binding_1.c: Use <...> not "..." for
- ISO_Fortran_binding.h's #include.
- * gfortran.dg/ISO_Fortran_binding_10.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_11.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_12.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_15.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_16.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_17.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_18.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_3.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_5.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_6.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_7.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_8.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_9.c: Likewise.
- * gfortran.dg/PR94327.c: Likewise.
- * gfortran.dg/PR94331.c: Likewise.
- * gfortran.dg/bind_c_array_params_3_aux.c: Likewise.
- * gfortran.dg/iso_fortran_binding_uint8_array_driver.c: Likewise.
- * gfortran.dg/pr93524.c: Likewise.
+2022-02-06 Patrick Palka <ppalka@redhat.com>
-2021-08-09 Jonathan Wright <jonathan.wright@arm.com>
+ PR c++/96242
+ * g++.dg/cpp2a/spaceship-synth15.C: New test.
- * gcc.target/aarch64/sve/dup_lane_1.c: Don't split
- scan-assembler tests over multiple lines. Expect 32-bit
- result values in 'w' registers.
- * gcc.target/aarch64/sve/extract_1.c: Likewise.
- * gcc.target/aarch64/sve/extract_2.c: Likewise.
- * gcc.target/aarch64/sve/extract_3.c: Likewise.
- * gcc.target/aarch64/sve/extract_4.c: Likewise.
+2022-02-06 Jakub Jelinek <jakub@redhat.com>
-2021-08-09 Jonathan Wright <jonathan.wright@arm.com>
+ PR c++/89074
+ PR c++/104033
+ * g++.dg/cpp1y/constexpr-89074-3.C: New test.
- * gcc.target/aarch64/vector_structure_intrinsics.c: Restrict
- tests to little-endian targets.
+2022-02-05 Jeff Law <jeffreyalaw@gmail.com>
-2021-08-08 Jeff Law <jlaw@localhost.localdomain>
+ * gcc.target/s390/20150826-1.c: Update expected output.
+ * gcc.target/s390/zvector/imm-range-error-1.c: Likewise.
- * gcc.target/tic6x/rotdi16-scan.c: Pull rotate into its own function.
+2022-02-05 Jakub Jelinek <jakub@redhat.com>
-2021-08-07 H.J. Lu <hjl.tools@gmail.com>
+ PR tree-optimization/104389
+ * gcc.dg/pr104389.c: New test.
- PR tree-optimization/88531
- * gcc.target/i386/pr88531-1a.c: New test.
- * gcc.target/i386/pr88531-1b.c: Likewise.
- * gcc.target/i386/pr88531-1c.c: Likewise.
- * gcc.target/i386/pr88531-2a.c: Likewise.
- * gcc.target/i386/pr88531-2b.c: Likewise.
- * gcc.target/i386/pr88531-2c.c: Likewise.
+2022-02-05 Jason Merrill <jason@redhat.com>
-2021-08-06 Martin Sebor <msebor@redhat.com>
+ PR c++/104300
+ PR c++/92385
+ * g++.dg/cpp0x/initlist-array14.C: New test.
- * c-c++-common/Wsizeof-pointer-memaccess1.c: Also disable
- -Wstringop-overread.
- * c-c++-common/attr-nonstring-3.c: Adjust pattern of expected message.
- * gcc.dg/Warray-bounds-39.c: Add an xfail due to a known bug.
- * gcc.dg/Wstring-compare-3.c: Also disable -Wstringop-overread.
- * gcc.dg/attr-nonstring-2.c: Adjust pattern of expected message.
- * gcc.dg/attr-nonstring-4.c: Same.
- * gcc.dg/Wstringop-overread-6.c: New test.
- * gcc.dg/sso-14.c: Fix typos to avoid buffer overflow.
+2022-02-04 Jakub Jelinek <jakub@redhat.com>
-2021-08-06 Christophe Lyon <christophe.lyon@foss.st.com>
+ PR target/104380
+ * gcc.dg/pr104380.c: New test.
- PR target/101723
- * gcc.target/arm/pr69245.c: Make sure to emit code for fn1, fix
- typo.
+2022-02-04 Eric Botcazou <ebotcazou@adacore.com>
-2021-08-06 Christophe Lyon <christophe.lyon@foss.st.com>
+ PR tree-optimization/104356
+ * gnat.dg/opt97.adb: New test.
- PR target/101723
- * gcc.target/arm/attr-neon3.c: Fix typo.
- * gcc.target/arm/pragma_fpu_attribute_2.c: Fix typo.
+2022-02-04 David Edelsohn <dje.gcc@gmail.com>
-2021-08-06 Uroš Bizjak <ubizjak@gmail.com>
+ * gcc.target/powerpc/builtins-1.c: Limit -mbig.
+ * gcc.target/powerpc/vsu/vec-cntlz-lsbb-0.c: Limit -mbig.
+ * gcc.target/powerpc/vsu/vec-cntlz-lsbb-1.c: Limit -mbig.
+ * gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: Remove target selector.
+ * gcc.target/powerpc/vsu/vec-cntlz-lsbb-3.c: Only powerpc*-linux.
+ * gcc.target/powerpc/vsu/vec-cntlz-lsbb-4.c: Only powerpc*-linux*.
+ * gcc.target/powerpc/vsu/vec-cnttz-lsbb-0.c: Limit -mbig.
+ * gcc.target/powerpc/vsu/vec-cnttz-lsbb-1.c: Limit -mbig.
+ * gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: Remove target selector.
+ * gcc.target/powerpc/vsu/vec-cnttz-lsbb-3.c: Only powerpc*-linux*.
+ * gcc.target/powerpc/vsu/vec-cnttz-lsbb-4.c: Only powerpc*-linux*.
- PR target/101797
- * gcc.target/i386/pr101797.c: New test.
+2022-02-04 Richard Biener <rguenther@suse.de>
+ Bin Cheng <bin.cheng@linux.alibaba.com>
-2021-08-06 Jonathan Wright <jonathan.wright@arm.com>
+ PR tree-optimization/100499
+ * gcc.dg/torture/pr100499-1.c: New testcase.
+ * gcc.dg/torture/pr100499-2.c: Likewise.
+ * gcc.dg/torture/pr100499-3.c: Likewise.
- * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
- tests.
+2022-02-04 Roger Sayle <roger@nextmovesoftware.com>
-2021-08-06 Jonathan Wright <jonathan.wright@arm.com>
+ PR rtl-optimization/101885
+ * gcc.dg/pr101885.c: New test case.
- * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
- tests.
+2022-02-04 Richard Sandiford <richard.sandiford@arm.com>
-2021-08-06 Jonathan Wright <jonathan.wright@arm.com>
+ PR middle-end/104092
+ * gcc.target/aarch64/sve/acle/general/pr104092.c: New test.
- * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
- tests.
+2022-02-04 Richard Biener <rguenther@suse.de>
-2021-08-06 Jonathan Wright <jonathan.wright@arm.com>
+ PR middle-end/90348
+ PR middle-end/104092
+ * gcc.dg/pr87052.c: Adjust.
- * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
- tests.
+2022-02-03 Patrick Palka <ppalka@redhat.com>
-2021-08-06 Martin Liska <mliska@suse.cz>
+ PR c++/104079
+ * g++.dg/cpp0x/noexcept74.C: New test.
+ * g++.dg/cpp0x/noexcept74a.C: New test.
- * gcc.target/powerpc/pragma-optimize.c: New test.
+2022-02-03 David Malcolm <dmalcolm@redhat.com>
-2021-08-06 Richard Biener <rguenther@suse.de>
+ PR analyzer/104369
+ * gcc.dg/analyzer/pr104369-1.c: New test.
+ * gcc.dg/analyzer/pr104369-2.c: New test.
+ * gcc.dg/analyzer/realloc-3.c: New test.
+ * gcc.dg/analyzer/realloc-4.c: New test.
+ * gcc.dg/analyzer/taint-realloc.c: New test.
- * gfortran.dg/vect/vect-8.f90: Simplify aarch64 scanning.
+2022-02-03 David Malcolm <dmalcolm@redhat.com>
-2021-08-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
+ * gcc.dg/analyzer/calloc-1.c: New test.
- * gcc.dg/gcov-info-to-gcda.c: New test.
+2022-02-03 Uroš Bizjak <ubizjak@gmail.com>
-2021-08-05 Jonathan Wakely <jwakely@redhat.com>
+ PR target/104362
+ * gcc.target/i386/pr104362.c: New test.
- * g++.old-deja/g++.other/inline7.C: Cast nodiscard call to void.
+2022-02-03 Martin Sebor <msebor@redhat.com>
-2021-08-05 H.J. Lu <hjl.tools@gmail.com>
+ PR tree-optimization/104119
+ * gcc.dg/tree-ssa/builtin-snprintf-13.c: New test.
+ * gcc.dg/tree-ssa/builtin-sprintf-warn-29.c: New test.
- PR target/99744
- * gcc.target/i386/pr99744-3.c: New test.
- * gcc.target/i386/pr99744-4.c: Likewise.
- * gcc.target/i386/pr99744-5.c: Likewise.
- * gcc.target/i386/pr99744-6.c: Likewise.
- * gcc.target/i386/pr99744-7.c: Likewise.
- * gcc.target/i386/pr99744-8.c: Likewise.
+2022-02-03 Harald Anlauf <anlauf@gmx.de>
-2021-08-05 Richard Earnshaw <rearnsha@arm.com>
+ PR fortran/104311
+ * gfortran.dg/transfer_simplify_15.f90: New test.
- PR target/101723
- * gcc.target/arm/cortex-m55-nofp-flag-hard.c: Update expected output.
- * gcc.target/arm/cortex-m55-nofp-flag-softfp.c: Likewise.
- * gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c: Likewise.
- * gcc.target/arm/mve/intrinsics/mve_fpu1.c: Convert to dg-do assemble.
- Add a non-no-op function body.
- * gcc.target/arm/mve/intrinsics/mve_fpu2.c: Likewise.
- * gcc.target/arm/pr98636.c (dg-options): Add -mfloat-abi=softfp.
- * gcc.target/arm/attr-neon.c: Tighten scan-assembler tests.
- * gcc.target/arm/attr-neon2.c: Use -Ofast, convert test to use
- check-function-bodies.
- * gcc.target/arm/attr-neon3.c: Likewise.
- * gcc.target/arm/pr69245.c: Tighten scan-assembler match, but allow
- multiple instances.
- * gcc.target/arm/pragma_fpu_attribute.c: Likewise.
- * gcc.target/arm/pragma_fpu_attribute_2.c: Likewise.
+2022-02-03 Bill Schmidt <wschmidt@linux.ibm.com>
-2021-08-05 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/vsubX_high_cost.c: New test.
+ PR target/103686
+ * gcc.target/powerpc/builtins-1-be-folded.c: Remove -mfold-gimple
+ option.
+ * gcc.target/powerpc/builtins-1-le-folded.c: Likewise.
+ * gcc.target/powerpc/builtins-1.c: Rewrite to use small functions and
+ restrict to -O2 -mbig for predictability. Adjust instruction counts.
+ * gcc.target/powerpc/builtins-5.c: Remove -mno-fold-gimple option.
+ * gcc.target/powerpc/p8-vec-xl-xst.c: Likewise.
+ * gcc.target/powerpc/pr83926.c: Likewise.
+ * gcc.target/powerpc/pr86731-nogimplefold-longlong.c: Delete.
+ * gcc.target/powerpc/pr86731-nogimplefold.c: Delete.
+ * gcc.target/powerpc/swaps-p8-17.c: Remove -mno-fold-gimple option.
+
+2022-02-03 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR target/95082
+ * gcc.target/powerpc/vsu/vec-cntlz-lsbb-0.c: Restrict to -mbig.
+ * gcc.target/powerpc/vsu/vec-cntlz-lsbb-1.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-cntlz-lsbb-3.c: New.
+ * gcc.target/powerpc/vsu/vec-cntlz-lsbb-4.c: New.
+ * gcc.target/powerpc/vsu/vec-cnttz-lsbb-0.c: Restrict to -mbig.
+ * gcc.target/powerpc/vsu/vec-cnttz-lsbb-1.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-cnttz-lsbb-3.c: New.
+ * gcc.target/powerpc/vsu/vec-cnttz-lsbb-4.c: New.
+
+2022-02-03 Richard Biener <rguenther@suse.de>
+
+ PR debug/104337
+ * gcc.dg/debug/pr104337.c: New testcase.
+
+2022-02-03 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ * gcc.target/powerpc/bfp/scalar-test-data-class-10.c: Adjust error
+ messages.
+ * gcc.target/powerpc/bfp/scalar-test-data-class-2.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-data-class-3.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-data-class-4.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-data-class-5.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-data-class-9.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-test-data-class-4.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-test-data-class-5.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-test-data-class-6.c: Likewise.
+ * gcc.target/powerpc/bfp/vec-test-data-class-7.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-12.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-14.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-17.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-19.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-2.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-22.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-24.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-27.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-29.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-32.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-34.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-37.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-39.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-4.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-42.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-44.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-47.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-49.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-52.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-54.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-57.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-59.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-62.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-64.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-67.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-69.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-7.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-72.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-74.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-77.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-79.c: Likewise.
+ * gcc.target/powerpc/dfp/dtstsfi-9.c: Likewise.
+ * gcc.target/powerpc/pr80315-1.c: Likewise.
+ * gcc.target/powerpc/pr80315-2.c: Likewise.
+ * gcc.target/powerpc/pr80315-3.c: Likewise.
+ * gcc.target/powerpc/pr80315-4.c: Likewise.
+ * gcc.target/powerpc/pr82015.c: Likewise.
+ * gcc.target/powerpc/pr91903.c: Likewise.
+ * gcc.target/powerpc/test_fpscr_rn_builtin_error.c: Likewise.
+ * gcc.target/powerpc/vec-ternarylogic-10.c: Likewise.
+
+2022-02-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR tree-optimization/104356
+ * gnat.dg/div_zero.adb: Add dg-skip-if directive for PowerPC.
+
+2022-02-03 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/struct_vect_25.c: Remove XFAILs.
+
+2022-02-03 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/mask_struct_load_1.c: Use intptr_t
+ iterators instead of int iterators.
+ * gcc.target/aarch64/sve/mask_struct_load_2.c: Likewise.
+ * gcc.target/aarch64/sve/mask_struct_load_3.c: Likewise.
+ * gcc.target/aarch64/sve/mask_struct_load_4.c: Likewise.
+ * gcc.target/aarch64/sve/mask_struct_load_5.c: Likewise.
+ * gcc.target/aarch64/sve/mask_struct_load_6.c: Likewise.
+ * gcc.target/aarch64/sve/mask_struct_load_7.c: Likewise.
+ * gcc.target/aarch64/sve/mask_struct_load_8.c: Likewise.
+ * gcc.target/aarch64/sve/mask_struct_store_1.c: Likewise.
+ * gcc.target/aarch64/sve/mask_struct_store_2.c: Likewise.
+ * gcc.target/aarch64/sve/mask_struct_store_3.c: Likewise.
+ * gcc.target/aarch64/sve/mask_struct_store_4.c: Likewise.
+
+2022-02-03 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/single_5.c: Remove some XFAILs.
+
+2022-02-03 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/vect/tsvc/vect-tsvc-s1115.c: Don't XFAIL for SVE.
+ * gcc.dg/vect/tsvc/vect-tsvc-s114.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1161.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1232.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s124.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1279.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s161.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s253.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s257.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s271.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s2711.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s2712.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s272.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s273.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s274.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s276.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s278.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s279.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s3111.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s4113.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s441.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s443.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-s491.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-vas.c: Likewise.
+ * gcc.dg/vect/tsvc/vect-tsvc-vif.c: Likewise.
+
+2022-02-03 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/guality/ipa-sra-1.c: Update aarch64*-*-* xfails.
+ * gcc.dg/guality/pr54519-1.c: Likewise.
+ * gcc.dg/guality/pr54519-3.c: Likewise.
-2021-08-05 Jonathan Wright <jonathan.wright@arm.com>
+2022-02-03 Jakub Jelinek <jakub@redhat.com>
- * gcc.target/aarch64/vaddX_high_cost.c: New test.
+ PR tree-optimization/104334
+ * g++.dg/opt/pr104334.C: New test.
-2021-08-05 Richard Biener <rguenther@suse.de>
+2022-02-03 Jakub Jelinek <jakub@redhat.com>
- * gcc.dg/vect/bb-slp-pr101756.c: Add -w.
+ PR fortran/104328
+ * gfortran.dg/gomp/atomic-27.f90: New test.
-2021-08-05 Eric Botcazou <ebotcazou@gcc.gnu.org>
+2022-02-03 Jason Merrill <jason@redhat.com>
- * gcc.dg/sso-15.c: New test.
+ PR c++/104302
+ * g++.dg/template/array35.C: New test.
+ * g++.dg/template/array36.C: New test.
-2021-08-05 liuhongt <hongtao.liu@intel.com>
+2022-02-02 Segher Boessenkool <segher@kernel.crashing.org>
- * gcc.target/i386/cond_op_anylogic_d-1.c: New test.
- * gcc.target/i386/cond_op_anylogic_d-2.c: New test.
- * gcc.target/i386/cond_op_anylogic_q-1.c: New test.
- * gcc.target/i386/cond_op_anylogic_q-2.c: New test.
+ * lib/target-supports.exp (check_effective_target_powerpc_altivec_ok):
+ Return 0 if the target is not Power. Restructure and add some comments.
-2021-08-05 liuhongt <hongtao.liu@intel.com>
+2022-02-02 David Malcolm <dmalcolm@redhat.com>
- * gcc.target/i386/cond_op_maxmin_double-1.c: New test.
- * gcc.target/i386/cond_op_maxmin_double-2.c: New test.
- * gcc.target/i386/cond_op_maxmin_float-1.c: New test.
- * gcc.target/i386/cond_op_maxmin_float-2.c: New test.
+ * gcc.dg/analyzer/torture/ubsan-1.c: Add missing return stmts.
+ * gcc.dg/analyzer/uninit-trivial-auto-var-init-pattern.c: Move
+ to...
+ * gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-pattern.c:
+ ...here.
+ * gcc.dg/analyzer/uninit-trivial-auto-var-init-uninitialized.c:
+ Move to...
+ * gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-uninitialized.c:
+ ...here.
+ * gcc.dg/analyzer/uninit-trivial-auto-var-init-zero.c: Move to...
+ * gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-zero.c: ...here.
-2021-08-05 liuhongt <hongtao.liu@intel.com>
+2022-02-02 David Malcolm <dmalcolm@redhat.com>
- * gcc.target/i386/cond_op_maxmin_b-1.c: New test.
- * gcc.target/i386/cond_op_maxmin_b-2.c: New test.
- * gcc.target/i386/cond_op_maxmin_d-1.c: New test.
- * gcc.target/i386/cond_op_maxmin_d-2.c: New test.
- * gcc.target/i386/cond_op_maxmin_q-1.c: New test.
- * gcc.target/i386/cond_op_maxmin_q-2.c: New test.
- * gcc.target/i386/cond_op_maxmin_ub-1.c: New test.
- * gcc.target/i386/cond_op_maxmin_ub-2.c: New test.
- * gcc.target/i386/cond_op_maxmin_ud-1.c: New test.
- * gcc.target/i386/cond_op_maxmin_ud-2.c: New test.
- * gcc.target/i386/cond_op_maxmin_uq-1.c: New test.
- * gcc.target/i386/cond_op_maxmin_uq-2.c: New test.
- * gcc.target/i386/cond_op_maxmin_uw-1.c: New test.
- * gcc.target/i386/cond_op_maxmin_uw-2.c: New test.
- * gcc.target/i386/cond_op_maxmin_w-1.c: New test.
- * gcc.target/i386/cond_op_maxmin_w-2.c: New test.
+ * gcc.dg/analyzer/torture/uninit-bit-field-ref.c: New test.
-2021-08-04 David Malcolm <dmalcolm@redhat.com>
+2022-02-02 David Malcolm <dmalcolm@redhat.com>
- PR analyzer/101570
- * gcc.dg/analyzer/asm-x86-1.c: New test.
- * gcc.dg/analyzer/asm-x86-lp64-1.c: New test.
- * gcc.dg/analyzer/asm-x86-lp64-2.c: New test.
- * gcc.dg/analyzer/pr101570.c: New test.
- * gcc.dg/analyzer/torture/asm-x86-linux-array_index_mask_nospec.c:
- New test.
- * gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c: New
- test.
- * gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-2.c: New
+ PR analyzer/104270
+ * gcc.dg/analyzer/uninit-trivial-auto-var-init-pattern.c: New
test.
- * gcc.dg/analyzer/torture/asm-x86-linux-cpuid.c: New test.
- * gcc.dg/analyzer/torture/asm-x86-linux-rdmsr-paravirt.c: New
- test.
- * gcc.dg/analyzer/torture/asm-x86-linux-rdmsr.c: New test.
- * gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c:
- New test.
- * gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-reduced.c:
+ * gcc.dg/analyzer/uninit-trivial-auto-var-init-uninitialized.c:
New test.
+ * gcc.dg/analyzer/uninit-trivial-auto-var-init-zero.c: New test.
-2021-08-04 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101742
- * gcc.target/i386/pr101742a.c: New test.
- * gcc.target/i386/pr101742b.c: Likewise.
-
-2021-08-04 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101772
- * gcc.target/i386/eh_return-2.c: New test.
-
-2021-08-04 Andreas Krebbel <krebbel@linux.ibm.com>
-
- * gcc.target/s390/vector/perm-vpdi.c: New test.
-
-2021-08-04 Andreas Krebbel <krebbel@linux.ibm.com>
-
- * gcc.target/s390/vector/perm-merge.c: New test.
- * gcc.target/s390/vector/vec-types.h: New test.
-
-2021-08-04 Andreas Krebbel <krebbel@linux.ibm.com>
-
- * gcc.target/s390/zvector/vec-permi.c: Removed.
- * gcc.target/s390/zvector/vec_permi.c: New test.
-
-2021-08-04 Andreas Krebbel <krebbel@linux.ibm.com>
-
- * gcc.target/s390/vector/long-double-asm-in-out-hard-fp-reg.c:
- Instead of vpdi with 0 and 5 vmrlg and vmrhg are used now.
- * gcc.target/s390/vector/long-double-asm-inout-hard-fp-reg.c: Likewise.
- * gcc.target/s390/zvector/vec-types.h: New test.
- * gcc.target/s390/zvector/vec_merge.c: New test.
-
-2021-08-04 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/vmul_high_cost.c: New test.
-
-2021-08-04 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/vmul_element_cost.c: New test.
-
-2021-08-04 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/cost_model_12.c: New test.
-
-2021-08-04 Tamar Christina <tamar.christina@arm.com>
-
- PR tree-optimization/101750
- * g++.dg/vect/pr99149.cc: Name class.
-
-2021-08-04 Richard Biener <rguenther@suse.de>
-
- * gcc.target/i386/vect-gather-1.c: New testcase.
- * gfortran.dg/vect/vect-8.f90: Adjust.
-
-2021-08-04 Roger Sayle <roger@nextmovesoftware.com>
- Marc Glisse <marc.glisse@inria.fr>
-
- * gcc.dg/fold-ior-4.c: New test.
-
-2021-08-04 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101756
- * gcc.dg/vect/bb-slp-pr101756.c: New testcase.
-
-2021-08-04 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/101759
- * g++.dg/gomp/pr101759.C: New test.
- * g++.dg/goacc/pr101759.C: New test.
-
-2021-08-04 Jakub Jelinek <jakub@redhat.com>
-
- * gcc.c-torture/execute/ieee/pr29302-1.x: Undo doubly applied patch.
-
-2021-08-04 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101769
- * g++.dg/tree-ssa/pr101769.C: New testcase.
-
-2021-08-04 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/cond_op_addsubmul_d-2.c: Add
- dg-require-effective-target for avx512.
- * gcc.target/i386/cond_op_addsubmul_q-2.c: Ditto.
- * gcc.target/i386/cond_op_addsubmul_w-2.c: Ditto.
- * gcc.target/i386/cond_op_addsubmuldiv_double-2.c: Ditto.
- * gcc.target/i386/cond_op_addsubmuldiv_float-2.c: Ditto.
- * gcc.target/i386/cond_op_fma_double-2.c: Ditto.
- * gcc.target/i386/cond_op_fma_float-2.c: Ditto.
-
-2021-08-04 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/cond_op_fma_double-1.c: New test.
- * gcc.target/i386/cond_op_fma_double-2.c: New test.
- * gcc.target/i386/cond_op_fma_float-1.c: New test.
- * gcc.target/i386/cond_op_fma_float-2.c: New test.
-
-2021-08-03 Eugene Rozenfeld <erozen@microsoft.com>
-
- * lib/profopt.exp: Pass gdwarf-4 when compiling test to profile; pass -gcov_version=2.
- * lib/target-supports.exp: Remove unnecessary -o perf.data passed to gcc-auto-profile.
-
-2021-08-03 Eugene Rozenfeld <erozen@microsoft.com>
-
- * gcc.dg/tree-prof/indir-call-prof-2.c: Fix dg-final-use-autofdo.
- * lib/profopt.exp: Pass -fearly-inlining when compiling with AutoFDO.
-
-2021-08-03 Eugene Rozenfeld <erozen@microsoft.com>
-
- * g++.dg/tree-prof/indir-call-prof.C: Fix options, increase the number of iterations.
- * g++.dg/tree-prof/morefunc.C: Fix options, increase the number of iterations.
- * g++.dg/tree-prof/reorder.C: Fix options, increase the number of iterations.
- * gcc.dg/tree-prof/indir-call-prof-2.c: Fix options, increase the number of iterations.
- * gcc.dg/tree-prof/indir-call-prof.c: Fix options.
-
-2021-08-03 Martin Sebor <msebor@redhat.com>
-
- PR testsuite/101688
- * g++.dg/warn/Wstringop-overflow-4.C: Disable a test case in ILP32.
-
-2021-08-03 Paul A. Clarke <pc@us.ibm.com>
-
- * gcc.target/powerpc/sse4_1-phminposuw.c: Copy from
- gcc/testsuite/gcc.target/i386, adjust dg directives to suit,
- make more robust.
-
-2021-08-03 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/avx-vzeroupper-14.c: Pass -mno-avx512f to
- disable XMM31.
- * gcc.target/i386/avx-vzeroupper-15.c: Likewise.
- * gcc.target/i386/pr82941-1.c: Updated. Check for vzeroupper.
- * gcc.target/i386/pr82942-1.c: Likewise.
- * gcc.target/i386/pr82990-1.c: Likewise.
- * gcc.target/i386/pr82990-3.c: Likewise.
- * gcc.target/i386/pr82990-5.c: Likewise.
- * gcc.target/i386/pr100865-4b.c: Likewise.
- * gcc.target/i386/pr100865-6b.c: Likewise.
- * gcc.target/i386/pr100865-7b.c: Likewise.
- * gcc.target/i386/pr100865-10b.c: Likewise.
- * gcc.target/i386/pr100865-8b.c: Updated.
- * gcc.target/i386/pr100865-9b.c: Likewise.
- * gcc.target/i386/pr100865-11b.c: Likewise.
- * gcc.target/i386/pr100865-12b.c: Likewise.
-
-2021-08-03 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/cond_op_addsubmul_d-1.c: New test.
- * gcc.target/i386/cond_op_addsubmul_d-2.c: New test.
- * gcc.target/i386/cond_op_addsubmul_q-1.c: New test.
- * gcc.target/i386/cond_op_addsubmul_q-2.c: New test.
- * gcc.target/i386/cond_op_addsubmul_w-1.c: New test.
- * gcc.target/i386/cond_op_addsubmul_w-2.c: New test.
-
-2021-08-03 Jakub Jelinek <jakub@redhat.com>
-
- PR analyzer/101721
- * gcc.dg/analyzer/pr101721.c: New test.
-
-2021-08-03 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/80566
- * g++.target/i386/pr80566-1.C: New test.
- * g++.target/i386/pr80566-2.C: Likewise.
-
-2021-08-03 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/cond_op_addsubmuldiv_double-1.c: New test.
- * gcc.target/i386/cond_op_addsubmuldiv_double-2.c: New test.
- * gcc.target/i386/cond_op_addsubmuldiv_float-1.c: New test.
- * gcc.target/i386/cond_op_addsubmuldiv_float-2.c: New test.
-
-2021-08-02 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/vect8-ret.c: Also pass -mno-sse.
-
-2021-08-02 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/incoming-11.c: Expect no stack realignment.
-
-2021-08-02 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/sw-1.c: Also pass -mno-avx for ia32.
-
-2021-08-02 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/cold-attribute-1.c: Also pass -mno-avx.
-
-2021-08-02 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/pr72839.c: Also pass -mno-avx.
-
-2021-08-02 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/pieces-memcpy-10.c: New test.
- * gcc.target/i386/pieces-memcpy-11.c: Likewise.
- * gcc.target/i386/pieces-memcpy-12.c: Likewise.
- * gcc.target/i386/pieces-memcpy-13.c: Likewise.
- * gcc.target/i386/pieces-memcpy-14.c: Likewise.
- * gcc.target/i386/pieces-memcpy-15.c: Likewise.
- * gcc.target/i386/pieces-memcpy-16.c: Likewise.
- * gcc.target/i386/pieces-memset-1.c: Likewise.
- * gcc.target/i386/pieces-memset-2.c: Likewise.
- * gcc.target/i386/pieces-memset-3.c: Likewise.
- * gcc.target/i386/pieces-memset-4.c: Likewise.
- * gcc.target/i386/pieces-memset-5.c: Likewise.
- * gcc.target/i386/pieces-memset-6.c: Likewise.
- * gcc.target/i386/pieces-memset-7.c: Likewise.
- * gcc.target/i386/pieces-memset-8.c: Likewise.
- * gcc.target/i386/pieces-memset-9.c: Likewise.
- * gcc.target/i386/pieces-memset-10.c: Likewise.
- * gcc.target/i386/pieces-memset-11.c: Likewise.
- * gcc.target/i386/pieces-memset-12.c: Likewise.
- * gcc.target/i386/pieces-memset-13.c: Likewise.
- * gcc.target/i386/pieces-memset-14.c: Likewise.
- * gcc.target/i386/pieces-memset-15.c: Likewise.
- * gcc.target/i386/pieces-memset-16.c: Likewise.
- * gcc.target/i386/pieces-memset-17.c: Likewise.
- * gcc.target/i386/pieces-memset-18.c: Likewise.
- * gcc.target/i386/pieces-memset-19.c: Likewise.
- * gcc.target/i386/pieces-memset-20.c: Likewise.
- * gcc.target/i386/pieces-memset-21.c: Likewise.
- * gcc.target/i386/pieces-memset-22.c: Likewise.
- * gcc.target/i386/pieces-memset-23.c: Likewise.
- * gcc.target/i386/pieces-memset-24.c: Likewise.
- * gcc.target/i386/pieces-memset-25.c: Likewise.
- * gcc.target/i386/pieces-memset-26.c: Likewise.
- * gcc.target/i386/pieces-memset-27.c: Likewise.
- * gcc.target/i386/pieces-memset-28.c: Likewise.
- * gcc.target/i386/pieces-memset-29.c: Likewise.
- * gcc.target/i386/pieces-memset-30.c: Likewise.
- * gcc.target/i386/pieces-memset-31.c: Likewise.
- * gcc.target/i386/pieces-memset-32.c: Likewise.
- * gcc.target/i386/pieces-memset-33.c: Likewise.
- * gcc.target/i386/pieces-memset-34.c: Likewise.
- * gcc.target/i386/pieces-memset-35.c: Likewise.
- * gcc.target/i386/pieces-memset-36.c: Likewise.
- * gcc.target/i386/pieces-memset-37.c: Likewise.
- * gcc.target/i386/pieces-memset-38.c: Likewise.
- * gcc.target/i386/pieces-memset-39.c: Likewise.
- * gcc.target/i386/pieces-memset-40.c: Likewise.
- * gcc.target/i386/pieces-memset-41.c: Likewise.
- * gcc.target/i386/pieces-memset-42.c: Likewise.
- * gcc.target/i386/pieces-memset-43.c: Likewise.
- * gcc.target/i386/pieces-memset-44.c: Likewise.
- * gcc.target/i386/pieces-memcpy-7.c: New file.
- * gcc.target/i386/pieces-memcpy-8.c: New file.
- * gcc.target/i386/pieces-memcpy-9.c: New file.
-
-2021-08-02 H.J. Lu <hjl.tools@gmail.com>
-
- PR middle-end/90773
- * gcc.target/i386/pr90773-20.c: New test.
- * gcc.target/i386/pr90773-21.c: Likewise.
- * gcc.target/i386/pr90773-22.c: Likewise.
- * gcc.target/i386/pr90773-23.c: Likewise.
- * gcc.target/i386/pr90773-26.c: Likewise.
-
-2021-08-02 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/pr90773-1.c: Adjust to expect movq for 32-bit.
- * gcc.target/i386/pr90773-4.c: Also run for 32-bit.
- * gcc.target/i386/pr90773-15.c: Likewise.
- * gcc.target/i386/pr90773-16.c: Likewise.
- * gcc.target/i386/pr90773-17.c: Likewise.
- * gcc.target/i386/pr90773-24.c: Likewise.
- * gcc.target/i386/pr90773-25.c: Likewise.
- * gcc.target/i386/pr100865-1.c: Likewise.
- * gcc.target/i386/pr100865-2.c: Likewise.
- * gcc.target/i386/pr100865-3.c: Likewise.
- * gcc.target/i386/pr90773-14.c: Also run for 32-bit and expect
- XMM movd to store 4 bytes.
- * gcc.target/i386/pr100865-4a.c: Also run for 32-bit and expect
- YMM registers.
- * gcc.target/i386/pr100865-4b.c: Likewise.
- * gcc.target/i386/pr100865-10a.c: Expect YMM registers.
- * gcc.target/i386/pr100865-10b.c: Likewise.
-
-2021-08-02 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/eh_return-1.c: New test.
-
-2021-08-02 H.J. Lu <hjl.tools@gmail.com>
-
- PR middle-end/90773
- * gcc.target/i386/pr90773-5.c: Updated to expect XMM register.
- * gcc.target/i386/pr90773-14.c: Likewise.
- * gcc.target/i386/pr90773-15.c: New test.
- * gcc.target/i386/pr90773-16.c: Likewise.
- * gcc.target/i386/pr90773-17.c: Likewise.
- * gcc.target/i386/pr90773-18.c: Likewise.
- * gcc.target/i386/pr90773-19.c: Likewise.
-
-2021-08-02 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.dg/tree-ssa/phi-opt-25.c: New test case.
-
-2021-08-01 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/78103
- * gcc.target/i386/pr78103-2.c: Also scan incl.
- * gcc.target/i386/pr78103-3.c: Scan leal|addl|incl for x32. Also
- scan incq.
-
-2021-07-31 Jason Merrill <jason@redhat.com>
-
- PR c++/96636
- * g++.dg/ext/anon-struct9.C: New test.
-
-2021-07-31 Roger Sayle <roger@nextmovesoftware.com>
-
- * gcc.target/i386/dec-cmov-2.c: Require -march=core2 with -m32.
-
-2021-07-31 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/gomp/attrs-9.C: New test.
-
-2021-07-31 Jakub Jelinek <jakub@redhat.com>
-
- PR target/78103
- * gcc.target/i386/pr78103-1.c: New test.
- * gcc.target/i386/pr78103-2.c: New test.
- * gcc.target/i386/pr78103-3.c: New test.
-
-2021-07-31 Hans-Peter Nilsson <hp@bitrange.com>
-
- * gcc.dg/tree-ssa/ssa-dse-26.c: Skip on mmix-knuth-mmixware.
-
-2021-07-31 Hans-Peter Nilsson <hp@bitrange.com>
-
- PR middle-end/101674
- * gcc.dg/uninit-pred-9_b.c: Xfail for mmix-*-* too.
-
-2021-07-30 Paul A. Clarke <pc@us.ibm.com>
-
- * gcc.target/powerpc/sse4_1-floorpd.c: New.
- * gcc.target/powerpc/sse4_1-floorps.c: New.
- * gcc.target/powerpc/sse4_1-floorsd.c: New.
- * gcc.target/powerpc/sse4_1-floorss.c: New.
- * gcc.target/powerpc/sse4_1-roundpd-2.c: Copy from
- gcc/testsuite/gcc.target/i386 and adjust dg directives to suit.
-
-2021-07-30 Paul A. Clarke <pc@us.ibm.com>
-
- * gcc.target/powerpc/sse4_1-ceilpd.c: New.
- * gcc.target/powerpc/sse4_1-ceilps.c: New.
- * gcc.target/powerpc/sse4_1-ceilsd.c: New.
- * gcc.target/powerpc/sse4_1-ceilss.c: New.
- * gcc.target/powerpc/sse4_1-round-data.h: New.
- * gcc.target/powerpc/sse4_1-round.h: New.
- * gcc.target/powerpc/sse4_1-round2.h: New.
- * gcc.target/powerpc/sse4_1-roundpd-3.c: Copy from gcc.target/i386
- and adjust dg directives to suit.
- * gcc.target/powerpc/sse4_1-check.h (__VSX_SSE2__): Define.
-
-2021-07-30 Paul A. Clarke <pc@us.ibm.com>
-
- * gcc.target/powerpc/sse4_1-blendpd.c: Copy from gcc.target/i386
- and adjust dg directives to suit.
- * gcc.target/powerpc/sse4_1-blendps-2.c: Likewise.
- * gcc.target/powerpc/sse4_1-blendps.c: Likewise.
- * gcc.target/powerpc/sse4_1-blendvpd.c: Likewise.
-
-2021-07-30 Roger Sayle <roger@nextmovesoftware.com>
- Uroš Bizjak <ubizjak@gmail.com>
-
- * gcc.target/i386/dec-cmov-1.c: New test.
- * gcc.target/i386/dec-cmov-2.c: New test.
-
-2021-07-30 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/tree-ssa/pr61839_2.c: Adjust. Add new const fold test.
-
-2021-07-30 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/tree-ssa/pr61839_2.c: Adjust.
-
-2021-07-30 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/101671
- * gcc.c-torture/compile/pr83510.c: Move test functions...
- * gcc.dg/Warray-bounds-87.c: ...to this file.
-
-2021-07-30 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/pr100865-3.c: Expect vmovdqu8 instead of
- vmovdqu.
- * gcc.target/i386/pr100865-4b.c: Likewise.
-
-2021-07-30 Andrew Pinski <apinski@marvell.com>
-
- PR testsuite/101517
- * g++.dg/warn/Wunused-18.C: New test.
- * gcc.c-torture/compile/20030405-2.c: New test.
- * gcc.c-torture/compile/20040304-2.c: New test.
- * gcc.dg/20030612-2.c: New test.
-
-2021-07-30 Xi Ruoyao <xry111@mengyan1223.wang>
-
- PR target/101132
- * gcc.target/mips/pr101132.c: New test.
-
-2021-07-30 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/101539
- * g++.dg/cpp2a/is-pointer-interconvertible-base-of1.C: New test.
- * g++.dg/cpp2a/is-pointer-interconvertible-with-class1.C: New test.
- * g++.dg/cpp2a/is-pointer-interconvertible-with-class2.C: New test.
- * g++.dg/cpp2a/is-pointer-interconvertible-with-class3.C: New test.
- * g++.dg/cpp2a/is-pointer-interconvertible-with-class4.C: New test.
- * g++.dg/cpp2a/is-pointer-interconvertible-with-class5.C: New test.
- * g++.dg/cpp2a/is-pointer-interconvertible-with-class6.C: New test.
-
-2021-07-30 Jason Merrill <jason@redhat.com>
-
- * g++.dg/ext/anon-struct8.C: New test.
-
-2021-07-30 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/cpp0x/gen-attrs-76.C: New test.
-
-2021-07-30 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101685
- * gcc.target/i386/pr101685.c: New test.
-
-2021-07-30 Aldy Hernandez <aldyh@redhat.com>
-
- * gcc.dg/shrink-wrap-loop.c: Enable early jump threading. Mark as
- XFAIL.
-
-2021-07-30 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/101582
- * g++.dg/cpp0x/gen-attrs-45.C: Expect a warning about ignored
- attributes instead of error.
- * g++.dg/cpp0x/gen-attrs-75.C: New test.
- * g++.dg/modules/pr101582-1.C: New test.
-
-2021-07-30 Xi Ruoyao <xry111@mengyan1223.wang>
-
- PR ipa/101396
- * g++.dg/lto/pr101396_0.C: New test.
- * g++.dg/lto/pr101396_1.C: New test.
-
-2021-07-29 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/101674
- * gcc.dg/uninit-pred-9_b.c: Xfail just the failing assertion and
- correct target.
-
-2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR d/101672
- * gdc.dg/pr100967.d: Update test.
- * gdc.dg/pr101672.d: New test.
-
-2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR d/101664
- * gdc.dg/extern-c++/extern-c++.exp: New.
- * gdc.dg/extern-c++/pr101664.d: New test.
- * gdc.dg/extern-c++/pr101664_1.cc: New test.
-
-2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR d/96435
- * gdc.dg/torture/pr96435.d: New test.
-
-2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR d/101657
- * gdc.dg/pr101657.d: New test.
-
-2021-07-29 Jakub Jelinek <jakub@redhat.com>
-
- PR testsuite/101647
- * g++.dg/pr71389.C: Include <array> instead of <functional>.
- * g++.dg/cpp0x/initlist48.C: Include also <initializer_list>.
-
-2021-07-29 Thomas Schwinge <thomas@codesourcery.com>
- Julian Brown <julian@codesourcery.com>
- Kwok Cheung Yeung <kcy@codesourcery.com>
-
- * c-c++-common/goacc/classify-kernels-unparallelized.c:
- 's%oaccdevlow%oaccloops%g'.
- * c-c++-common/goacc/classify-kernels.c: Likewise.
- * c-c++-common/goacc/classify-parallel.c: Likewise.
- * c-c++-common/goacc/classify-routine-nohost.c: Likewise.
- * c-c++-common/goacc/classify-routine.c: Likewise.
- * c-c++-common/goacc/classify-serial.c: Likewise.
- * c-c++-common/goacc/routine-nohost-1.c: Likewise.
- * g++.dg/goacc/template.C: Likewise.
- * gcc.dg/goacc/loop-processing-1.c: Likewise.
- * gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
- * gfortran.dg/goacc/classify-kernels.f95: Likewise.
- * gfortran.dg/goacc/classify-parallel.f95: Likewise.
- * gfortran.dg/goacc/classify-routine-nohost.f95: Likewise.
- * gfortran.dg/goacc/classify-routine.f95: Likewise.
- * gfortran.dg/goacc/classify-serial.f95: Likewise.
- * gfortran.dg/goacc/routine-multiple-directives-1.f90: Likewise.
-
-2021-07-29 Haochen Gui <guihaoc@gcc.gnu.org>
-
- PR target/100952
- * gcc.target/powerpc/pr56605.c: Change matching
- conditions.
- * gcc.target/powerpc/pr81348.c: Likewise.
-
-2021-07-29 Aldy Hernandez <aldyh@redhat.com>
-
- * g++.dg/debug/dwarf2/deallocator.C: Adjust for threader.
- * gcc.c-torture/compile/pr83510.c: Same.
- * gcc.dg/analyzer/pr94851-2.c: Same.
- * gcc.dg/loop-unswitch-2.c: Same.
- * gcc.dg/old-style-asm-1.c: Same.
- * gcc.dg/pr68317.c: Same.
- * gcc.dg/pr97567-2.c: Same.
- * gcc.dg/predict-9.c: Same.
- * gcc.dg/shrink-wrap-loop.c: Same.
- * gcc.dg/sibcall-1.c: Same.
- * gcc.dg/tree-ssa/builtin-sprintf-3.c: Same.
- * gcc.dg/tree-ssa/pr21001.c: Same.
- * gcc.dg/tree-ssa/pr21294.c: Same.
- * gcc.dg/tree-ssa/pr21417.c: Same.
- * gcc.dg/tree-ssa/pr21458-2.c: Same.
- * gcc.dg/tree-ssa/pr21563.c: Same.
- * gcc.dg/tree-ssa/pr49039.c: Same.
- * gcc.dg/tree-ssa/pr61839_1.c: Same.
- * gcc.dg/tree-ssa/pr61839_3.c: Same.
- * gcc.dg/tree-ssa/pr77445-2.c: Same.
- * gcc.dg/tree-ssa/split-path-4.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-11.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-12.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-14.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-18.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-6.c: Same.
- * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same.
- * gcc.dg/tree-ssa/ssa-fre-48.c: Same.
- * gcc.dg/tree-ssa/ssa-thread-11.c: Same.
- * gcc.dg/tree-ssa/ssa-thread-12.c: Same.
- * gcc.dg/tree-ssa/ssa-thread-14.c: Same.
- * gcc.dg/tree-ssa/vrp02.c: Same.
- * gcc.dg/tree-ssa/vrp03.c: Same.
- * gcc.dg/tree-ssa/vrp05.c: Same.
- * gcc.dg/tree-ssa/vrp06.c: Same.
- * gcc.dg/tree-ssa/vrp07.c: Same.
- * gcc.dg/tree-ssa/vrp09.c: Same.
- * gcc.dg/tree-ssa/vrp19.c: Same.
- * gcc.dg/tree-ssa/vrp20.c: Same.
- * gcc.dg/tree-ssa/vrp33.c: Same.
- * gcc.dg/uninit-pred-9_b.c: Same.
- * gcc.dg/uninit-pr61112.c: Same.
- * gcc.dg/vect/bb-slp-16.c: Same.
- * gcc.target/i386/avx2-vect-aggressive.c: Same.
- * gcc.dg/tree-ssa/ranger-threader-1.c: New test.
- * gcc.dg/tree-ssa/ranger-threader-2.c: New test.
- * gcc.dg/tree-ssa/ranger-threader-3.c: New test.
- * gcc.dg/tree-ssa/ranger-threader-4.c: New test.
- * gcc.dg/tree-ssa/ranger-threader-5.c: New test.
-
-2021-07-29 Richard Biener <rguenther@suse.de>
-
- PR c/101512
- * gcc.dg/torture/pr101512.c: New testcase.
-
-2021-07-29 liuhongt <hongtao.liu@intel.com>
-
- PR target/99881
- * gcc.target/i386/pr91446.c:
- * gcc.target/i386/pr92658-avx512bw-2.c:
- * gcc.target/i386/pr92658-sse4-2.c:
- * gcc.target/i386/pr92658-sse4.c:
- * gcc.target/i386/pr99881.c:
-
-2021-07-29 liuhongt <hongtao.liu@intel.com>
-
- PR target/39821
- * gcc.target/i386/sse2-pr39821.c: New test.
- * gcc.target/i386/sse4-pr39821.c: New test.
-
-2021-07-29 Jiufu Guo <guojiufu@linux.ibm.com>
-
- PR target/61837
- * gcc.target/powerpc/pr61837.c: New test.
-
-2021-07-28 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/101494
- * gcc.dg/uninit-pr101494.c: New test.
-
-2021-07-28 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/101601
- * g++.dg/warn/Warray-bounds-25.C: New test.
- * gcc.dg/Warray-bounds-85.c: New test.
-
-2021-07-28 Michael Meissner <meissner@linux.ibm.com>
-
- PR testsuite/100168
- * gcc.dg/pr56727-2.c: Add support for PC-relative calls.
-
-2021-07-28 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/torture/ubsan-1.c: New test.
-
-2021-07-28 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/101564
- * gfortran.dg/allocate_stat_3.f90: New test.
- * gfortran.dg/allocate_stat.f90: Adjust error messages.
- * gfortran.dg/implicit_11.f90: Likewise.
- * gfortran.dg/inquiry_type_ref_3.f90: Likewise.
-
-2021-07-28 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/101624
- * gfortran.dg/ubsan/ubsan.exp: New file.
- * gfortran.dg/ubsan/pr101624.f90: New test.
-
-2021-07-28 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/101642
- * gcc.c-torture/compile/pr101642.c: New test.
-
-2021-07-28 Ilya Leoshkevich <iii@linux.ibm.com>
-
- * gcc.target/s390/global-array-element-pic2.c: Add -mzarch, add
- an expectation for 31-bit mode.
- * gcc.target/s390/load-imm64-1.c: Use unsigned long long.
- * gcc.target/s390/load-imm64-2.c: Likewise.
- * gcc.target/s390/vector/long-double-vx-macro-off-on.c: Use
- -mzarch.
- * gcc.target/s390/vector/long-double-vx-macro-on-off.c:
- Likewise.
-
-2021-07-28 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101615
- * gcc.dg/vect/bb-slp-pr101615-2.c: New testcase.
-
-2021-07-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+2022-02-02 Tamar Christina <tamar.christina@arm.com>
- * gcc.target/aarch64/smov_1.c: New test.
- * gcc.target/aarch64/sve/clastb_4.c: Adjust clast scan-assembler.
+ PR tree-optimization/102819
+ PR tree-optimization/103169
+ * g++.dg/vect/pr99149.cc: xfail for now.
+ * gcc.dg/vect/complex/pr102819-1.c: New test.
+ * gcc.dg/vect/complex/pr102819-2.c: New test.
+ * gcc.dg/vect/complex/pr102819-3.c: New test.
+ * gcc.dg/vect/complex/pr102819-4.c: New test.
+ * gcc.dg/vect/complex/pr102819-5.c: New test.
+ * gcc.dg/vect/complex/pr102819-6.c: New test.
+ * gcc.dg/vect/complex/pr102819-7.c: New test.
+ * gcc.dg/vect/complex/pr102819-8.c: New test.
+ * gcc.dg/vect/complex/pr102819-9.c: New test.
+ * gcc.dg/vect/complex/pr103169.c: New test.
-2021-07-28 H.J. Lu <hjl.tools@gmail.com>
+2022-02-01 Ilya Leoshkevich <iii@linux.ibm.com>
- PR target/101456
- * gcc.target/i386/pr101456-1.c: New test.
- * gcc.target/i386/pr101456-2.c: Likewise.
+ * gcc.target/s390/nobp-section-type-conflict.c: New test.
-2021-07-28 Richard Biener <rguenther@suse.de>
+2022-02-01 Harald Anlauf <anlauf@gmx.de>
- PR tree-optimization/101615
- * gcc.dg/vect/bb-slp-pr101615-1.c: New testcase.
+ PR fortran/104331
+ * gfortran.dg/eoshift_9.f90: New test.
-2021-07-28 Siddhesh Poyarekar <siddhesh@gotplt.org>
+2022-02-01 Jakub Jelinek <jakub@redhat.com>
- * gcc.dg/analyzer/strdup-1.c (test_4, test_5, test_6): New
- tests.
+ PR preprocessor/104147
+ * c-c++-common/cpp/pr104147.c: New test.
-2021-07-28 Siddhesh Poyarekar <siddhesh@gotplt.org>
+2022-02-01 Jason Merrill <jason@redhat.com>
- * gcc.dg/analyzer/attr-malloc-1.c (compatible_alloc,
- compatible_alloc2): New extern allocator declarations.
- (test_9, test_10): New tests.
+ PR c++/103186
+ * g++.dg/cpp0x/lambda/lambda-defarg10.C: New test.
-2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
+2022-02-01 Tom de Vries <tdevries@suse.de>
- PR d/101640
- * gdc.dg/pr96429.d: Update test.
- * gdc.dg/pr101640.d: New test.
+ * gcc.target/nvptx/stack-atomics-run.c: New test.
-2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
+2022-02-01 Jakub Jelinek <jakub@redhat.com>
- PR d/101490
- * gdc.dg/pr101490.d: New test.
+ PR middle-end/104307
+ * gcc.target/i386/pr104307.c: New test.
-2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
+2022-02-01 Andreas Krebbel <krebbel@linux.ibm.com>
- PR d/101127
- * gdc.dg/pr101127a.d: New test.
- * gdc.dg/pr101127b.d: New test.
+ PR rtl-optimization/101260
+ * gcc.target/s390/pr101260.c: New testcase.
-2021-07-28 Jakub Jelinek <jakub@redhat.com>
+2022-02-01 Xi Ruoyao <xry111@mengyan1223.wang>
- PR target/101611
- * gcc.target/i386/avx2-pr101611-1.c: New test.
- * gcc.target/i386/avx2-pr101611-2.c: New test.
+ * gcc.dg/pr95115.c: New test.
-2021-07-28 Martin Uecker <muecker@gwdg.de>
+2022-02-01 Tom de Vries <tdevries@suse.de>
- * gcc.dg/Wnonnull-4.c: Correct argument numbers in warnings.
+ * gcc.dg/tree-ssa/ldist-strlen-4.c: New test.
-2021-07-28 Sandra Loosemore <sandra@codesourcery.com>
+2022-01-31 Marek Polacek <polacek@redhat.com>
- PR libfortran/101317
- * gfortran.dg/ISO_Fortran_binding_17.f90: Fix typo in error
- message patterns.
+ PR c++/102414
+ PR c++/101874
+ * g++.dg/cpp23/auto-array3.C: New test.
+ * g++.dg/cpp23/auto-array4.C: New test.
-2021-07-28 Sandra Loosemore <sandra@codesourcery.com>
+2022-01-31 Marek Polacek <polacek@redhat.com>
- PR libfortran/101310
- * gfortran.dg/ISO_Fortran_binding_1.c (section_c): Remove
- incorrect assertions.
+ PR c++/102434
+ * g++.dg/cpp0x/initlist128.C: New test.
-2021-07-28 Sandra Loosemore <sandra@codesourcery.com>
+2022-01-31 Patrick Palka <ppalka@redhat.com>
- PR libfortran/101305
- * gfortran.dg/ISO_Fortran_binding_1.c: Adjust include path.
- * gfortran.dg/ISO_Fortran_binding_10.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_11.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_12.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_15.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_16.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_17.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_18.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_3.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_5.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_6.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_7.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_8.c: Likewise.
- * gfortran.dg/ISO_Fortran_binding_9.c: Likewise.
- * gfortran.dg/PR94327.c: Likewise.
- * gfortran.dg/PR94331.c: Likewise.
- * gfortran.dg/bind_c_array_params_3_aux.c: Likewise.
- * gfortran.dg/iso_fortran_binding_uint8_array_driver.c: Likewise.
- * gfortran.dg/pr93524.c: Likewise.
+ PR c++/104294
+ * g++.dg/cpp1z/class-deduction106.C: New test.
-2021-07-28 Kewen Lin <linkw@linux.ibm.com>
+2022-01-31 Patrick Palka <ppalka@redhat.com>
- PR tree-optimization/101596
- * gcc.target/powerpc/pr101596-1.c: New test.
- * gcc.target/powerpc/pr101596-2.c: Likewise.
- * gcc.target/powerpc/pr101596-3.c: Likewise.
+ PR c++/104291
+ * g++.dg/template/partial20.C: New test.
-2021-07-28 liuhongt <hongtao.liu@intel.com>
+2022-01-31 Martin Sebor <msebor@redhat.com>
- PR target/99881
- * gcc.target/i386/pr99881.c: New test.
+ PR middle-end/104232
+ * g++.dg/warn/Wuse-after-free4.C: New test.
+ * gcc.dg/Wuse-after-free-2.c: New test.
+ * gcc.dg/Wuse-after-free-3.c: New test.
-2021-07-27 Martin Sebor <msebor@redhat.com>
+2022-01-31 Jakub Jelinek <jakub@redhat.com>
- PR tree-optimization/101584
- * gcc.dg/uninit-38.c: Remove assertions.
- * gcc.dg/uninit-41.c: New test.
+ PR tree-optimization/103514
+ * gcc.dg/tree-ssa/pr103514.c: Add
+ --param logical-op-non-short-circuit=1 to dg-options.
-2021-07-27 Jonathan Wakely <jwakely@redhat.com>
+2022-01-31 Eric Botcazou <ebotcazou@adacore.com>
- PR testsuite/101646
- * g++.dg/coroutines/pr99047.C: Fix includes.
- * g++.dg/pr71655.C: Likewise.
+ * gnat.dg/div_zero.adb: New test.
-2021-07-27 Martin Sebor <msebor@redhat.com>
+2022-01-29 Jakub Jelinek <jakub@redhat.com>
- PR c/101585
- * gcc.dg/Wvla-parameter-13.c: New test.
+ PR tree-optimization/95424
+ * gcc.dg/tree-ssa/divide-7.c: Fix up regexps in scan-tree-dump{,-not}.
-2021-07-27 Jeff Law <jlaw@localhost.localdomain>
-
- * g++.dg/gcov/gcov-threads-1.C: Fix argument to pthread_join.
-
-2021-07-27 Marek Polacek <polacek@redhat.com>
-
- DR 1512
- PR c++/99701
- * g++.dg/cpp0x/nullptr11.C: Remove invalid tests.
- * g++.dg/cpp0x/nullptr46.C: Add dg-error.
- * g++.dg/cpp2a/spaceship-err7.C: New test.
- * g++.dg/expr/ptr-comp4.C: New test.
-
-2021-07-27 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101573
- * gcc.dg/uninit-pr101573.c: New testcase.
- * gcc.dg/uninit-15-O0.c: Adjust.
- * gcc.dg/uninit-15.c: Likewise.
- * gcc.dg/uninit-23.c: Likewise.
- * c-c++-common/uninit-17.c: Likewise.
-
-2021-07-27 Martin Jambor <mjambor@suse.cz>
-
- * gcc.dg/ipa/remref-3.c: New test.
- * gcc.dg/ipa/remref-4.c: Likewise.
- * gcc.dg/ipa/remref-5.c: Likewise.
- * gcc.dg/ipa/remref-6.c: Likewise.
-
-2021-07-27 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/101586
- * g++.dg/torture/builtin-clear-padding-4.C: New test.
-
-2021-07-27 Michael Meissner <meissner@linux.ibm.com>
-
- PR testsuite/100170
- * gcc.target/powerpc/ppc-eq0-1.c: Adjust insn counts if power10
- code is generated.
- * gcc.target/powerpc/ppc-ne0-1.c: (ne0): Adjust insn counts if
- power10 code is generated.
- (plus_ne0): Move to ppc-ne0-2.c.
- (cmp_plus_ne): Likewise.
- (plus_ne0_cmp): Likewise.
- * gcc.target/powerpc/ppc-ne0-2.c: New file.
-
-2021-07-26 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/sock-1.c: New test.
- * gcc.dg/analyzer/sock-2.c: New test.
-
-2021-07-26 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/pr78888.c: New.
-
-2021-07-26 Roger Sayle <roger@nextmovesoftware.com>
- Marc Glisse <marc.glisse@inria.fr>
-
- * gcc.dg/fold-eqrotate-1.c: New test case.
- * gcc.dg/fold-eqbswap-1.c: New test case.
-
-2021-07-26 José Rui Faustino de Sousa <jrfsousa@gmail.com>
- Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/93308
- PR fortran/93963
- PR fortran/94327
- PR fortran/94331
- PR fortran/97046
- * gfortran.dg/ISO_Fortran_binding_1.f90: Add pointer attribute,
- this test is still erroneous but now it compiles.
- * gfortran.dg/bind_c_array_params_2.f90: Update regex to match
- code changes.
- * gfortran.dg/PR93308.f90: New test.
- * gfortran.dg/PR93963.f90: New test.
- * gfortran.dg/PR94327.c: New test.
- * gfortran.dg/PR94327.f90: New test.
- * gfortran.dg/PR94331.c: New test.
- * gfortran.dg/PR94331.f90: New test.
- * gfortran.dg/PR97046.f90: New test.
-
-2021-07-26 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/gomp/attrs-1.C: Use attribute syntax even for section
- and scan directives.
- * g++.dg/gomp/attrs-2.C: Likewise.
- * g++.dg/gomp/attrs-6.C: New test.
- * g++.dg/gomp/attrs-7.C: New test.
- * g++.dg/gomp/attrs-8.C: New test.
-
-2021-07-23 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/101536
- * gfortran.dg/pr101536.f90: New test.
-
-2021-07-23 Jakub Jelinek <jakub@redhat.com>
-
- PR rtl-optimization/101562
- * gcc.c-torture/compile/pr101562.c: New test.
-
-2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
- tests.
-
-2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
- tests.
-
-2021-07-23 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101504
- * gcc.target/i386/pr101504.c: New test.
-
-2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
- tests.
-
-2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
- tests.
-
-2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
- tests.
-
-2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
- tests.
-
-2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/vector_structure_intrinsics.c: New tests.
-
-2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/vector_structure_intrinsics.c: New test.
-
-2021-07-23 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/attrs-1.c: New test.
- * c-c++-common/gomp/attrs-2.c: New test.
- * c-c++-common/gomp/attrs-3.c: New test.
-
-2021-07-23 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/gomp/attrs-4.C: New test.
- * g++.dg/gomp/attrs-5.C: New test.
-
-2021-07-23 Xi Ruoyao <xry111@mengyan1223.wang>
-
- * gcc.target/mips/mips.exp (mips_option_groups): add
- -finline and -fno-inline.
-
-2021-07-23 Xi Ruoyao <xry111@mengyan1223.wang>
-
- Revert:
- 2021-07-09 Xi Ruoyao <xry111@mengyan1223.wang>
-
- * gcc.target/mips/cfgcleanup-jalr2.c: Remove -fno-inline and add
- __attribute__((noinline)).
- * gcc.target/mips/cfgcleanup-jalr3.c: Likewise.
-
-2021-07-23 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/feasibility-3.c: New test.
-
-2021-07-22 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/65178
- * gcc.dg/uninit-pr65178.c: New test.
-
-2021-07-22 Martin Sebor <msebor@redhat.com>
-
- PR testsuite/101568
- * g++.dg/ipa/pr82352.C
-
-2021-07-22 Andrew Pinski <apinski@marvell.com>
-
- PR tree-optimization/10153
- * gcc.c-torture/compile/pr10153-1.c: New test.
- * gcc.c-torture/compile/pr10153-2.c: New test.
-
-2021-07-22 Andrew MacLeod <amacleod@redhat.com>
-
- * g++.dg/pr101511.C: New.
-
-2021-07-22 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/pr101497.c: New.
-
-2021-07-22 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/pr101496.c: New.
-
-2021-07-22 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/fuse-caller-save-xmm.c: Adjust testcase.
-
-2021-07-22 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/mask-shift.c: New test.
-
-2021-07-21 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/101547
- * gcc.dg/analyzer/pr101547.c: New test.
-
-2021-07-21 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/101522
- * g++.dg/analyzer/pr101522.C: New test.
-
-2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
- Joseph Myers <joseph@codesourcery.com>
- Cesar Philippidis <cesar@codesourcery.com>
-
- * c-c++-common/goacc/classify-routine-nohost.c: New file.
- * c-c++-common/goacc/classify-routine.c: Update.
- * c-c++-common/goacc/routine-2.c: Likewise.
- * c-c++-common/goacc/routine-nohost-1.c: New file.
- * c-c++-common/goacc/routine-nohost-2.c: Likewise.
- * g++.dg/goacc/template.C: Update.
- * gfortran.dg/goacc/classify-routine-nohost.f95: New file.
- * gfortran.dg/goacc/classify-routine.f95: Update.
- * gfortran.dg/goacc/pure-elemental-procedures-2.f90: Likewise.
- * gfortran.dg/goacc/routine-6.f90: Likewise.
- * gfortran.dg/goacc/routine-intrinsic-2.f: Likewise.
- * gfortran.dg/goacc/routine-module-1.f90: Likewise.
- * gfortran.dg/goacc/routine-module-2.f90: Likewise.
- * gfortran.dg/goacc/routine-module-3.f90: Likewise.
- * gfortran.dg/goacc/routine-module-mod-1.f90: Likewise.
- * gfortran.dg/goacc/routine-multiple-directives-1.f90: Likewise.
- * gfortran.dg/goacc/routine-multiple-directives-2.f90: Likewise.
-
-2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
-
- * g++.dg/goacc/template.C: Fix '#pragma atomic update' typo.
-
-2021-07-21 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/explode-2.c: Remove xfail.
- * gcc.dg/analyzer/explode-2a.c: Remove expected leak warning on
- while stmt.
- * gcc.dg/analyzer/phi-2.c: New test.
-
-2021-07-21 Bill Schmidt <wschmidt@linux.ibm.com>
-
- PR target/101531
- * gcc.target/powerpc/pr101129.c: Adjust.
-
-2021-07-21 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101549
- * gcc.target/i386/crc32-6.c: New test.
-
-2021-07-21 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/101514
- * gfortran.dg/pr101514.f90: New test.
-
-2021-07-21 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/101535
- * c-c++-common/gomp/pr101535-1.c: New test.
- * c-c++-common/gomp/pr101535-2.c: New test.
-
-2021-07-21 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/101516
- * g++.dg/gomp/pr101516.C: New test.
-
-2021-07-21 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/iso_c_binding_char_1.f90: Update dg-error.
- * gfortran.dg/pr32599.f03: Use -std=-f2003 + update comment.
- * gfortran.dg/bind_c_char_10.f90: New test.
- * gfortran.dg/bind_c_char_6.f90: New test.
- * gfortran.dg/bind_c_char_7.f90: New test.
- * gfortran.dg/bind_c_char_8.f90: New test.
- * gfortran.dg/bind_c_char_9.f90: New test.
-
-2021-07-21 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.dg/unroll-10.c: New test.
-
-2021-07-21 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.dg/unroll-9.c: New test/
-
-2021-07-20 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/101397
- * gcc.dg/Warray-bounds-80.c: New test.
- * gcc.dg/Warray-bounds-81.c: New test.
- * gcc.dg/Warray-bounds-82.c: New test.
- * gcc.dg/Warray-bounds-83.c: New test.
- * gcc.dg/Warray-bounds-84.c: New test.
- * gcc.dg/Wstringop-overflow-46.c: Adjust expected output.
-
-2021-07-20 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/101300
- * gcc.dg/uninit-pr101300.c: New test.
-
-2021-07-20 Michael Meissner <meissner@linux.ibm.com>
-
- PR testsuite/100167
- * gcc.target/powerpc/fold-vec-div-longlong.c: Fix expected code
- generation on power10.
- * gcc.target/powerpc/fold-vec-mult-longlong.c: Likewise.
-
-2021-07-20 Jakub Jelinek <jakub@redhat.com>
-
- PR target/101384
- * gcc.dg/pr101384.c: New test.
- * gcc.target/powerpc/pr101384-1.c: New test.
- * gcc.target/powerpc/pr101384-2.c: New test.
-
-2021-07-20 Richard Sandiford <richard.sandiford@arm.com>
-
- PR testsuite/101506
- * gcc.target/aarch64/vect-vmaxv.c: Use an asm to hide the
- true initial value of the reduction from the vectorizer.
- * gcc.target/aarch64/vect-vaddv.c: Likewise. Make the vector
- loop operate on exactly LANES (rather than LANES-1) iterations.
- * gcc.target/aarch64/vect-fmaxv-fminv.x: Likewise.
-
-2021-07-20 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/100182
- * gcc.target/i386/pr71245-1.c: Remove.
- * gcc.target/i386/pr71245-2.c: Ditto.
-
-2021-07-20 Kewen Lin <linkw@linux.ibm.com>
-
- * gcc.target/powerpc/mul-vectorize-3.c: New test.
- * gcc.target/powerpc/mul-vectorize-4.c: New test.
-
-2021-07-20 Kewen Lin <linkw@linux.ibm.com>
-
- PR tree-optimization/100696
- * gcc.target/i386/pr100637-3w.c: Adjust for mul_highpart recog.
-
-2021-07-19 Martin Sebor <msebor@redhat.com>
-
- * gcc.target/powerpc/pr93658.c: Suppress valid warnings.
-
-2021-07-19 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/95520
- * g++.dg/coroutines/pr95520.C: New test.
-
-2021-07-19 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/101503
- * gcc.dg/analyzer/pr101503.c: New test.
-
-2021-07-19 Indu Bhagat <indu.bhagat@oracle.com>
-
- * gcc.dg/debug/btf/btf.exp: Do not run BTF testsuite if target does not
- support BTF format. Remove redundant check for AIX.
- * gcc.dg/debug/ctf/ctf.exp: Do not run CTF testsuite if target does not
- support CTF format. Remove redundant check for AIX.
- * lib/gcc-dg.exp: Remove redundant check for AIX.
-
-2021-07-19 Andrew Stubbs <ams@codesourcery.com>
-
- PR target/100208
- * gcc.target/gcn/sram-ecc-1.c: New test.
- * gcc.target/gcn/sram-ecc-2.c: New test.
- * gcc.target/gcn/sram-ecc-3.c: New test.
- * gcc.target/gcn/sram-ecc-4.c: New test.
- * gcc.target/gcn/sram-ecc-5.c: New test.
- * gcc.target/gcn/sram-ecc-6.c: New test.
- * gcc.target/gcn/sram-ecc-7.c: New test.
- * gcc.target/gcn/sram-ecc-8.c: New test.
-
-2021-07-19 Andrew Pinski <apinski@marvell.com>
-
- PR target/101205
- * gcc.target/aarch64/csinv-neg-1.c: New test.
-
-2021-07-19 Marek Polacek <polacek@redhat.com>
-
- DR 2126
- * g++.dg/cpp0x/constexpr-temp2.C: New test.
-
-2021-07-19 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101505
- * gcc.dg/vect/pr101505.c: New testcase.
-
-2021-07-18 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101492
- * gcc.target/i386/pr101492-1.c: New test.
- * gcc.target/i386/pr101492-2.c: Likewise.
- * gcc.target/i386/pr101492-3.c: Likewise.
- * gcc.target/i386/pr101492-4.c: Likewise.
-
-2021-07-18 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/101084
- * gfortran.dg/fmt_nonchar_3.f90: New test.
-
-2021-07-18 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101495
- * gcc.target/i386/avx-vzeroupper-28.c: New test.
-
-2021-07-18 Antoni Boucher <bouanto@zoho.com>
-
- PR target/95498
- * jit.dg/all-non-failing-tests.h: New test.
- * jit.dg/test-cast.c: New test.
-
-2021-07-17 Jan Hubicka <hubicka@ucw.cz>
-
- * gcc.dg/tree-ssa/modref-6.c: New test.
-
-2021-07-17 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/pr96542.c: New.
-
-2021-07-16 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101233
- * g++.dg/cpp2a/class-deduction-alias10.C: New test.
-
-2021-07-16 Patrick Palka <ppalka@redhat.com>
-
- DR 960
- PR c++/99664
- * g++.dg/inherit/covariant23.C: New test.
-
-2021-07-16 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/analyzer-decls.h (__analyzer_dump_state): New.
- * gcc.dg/analyzer/dump-state.c: New test.
-
-2021-07-16 Martin Sebor <msebor@redhat.com>
-
- PR testsuite/101468
- * gcc.dg/Wstringop-overflow-41.c: Adjust to avoid target-specific
- failures.
- * gcc.dg/Wstringop-overflow-42.c: Same.
- * gcc.dg/Wstringop-overflow-68.c: Same.
- * gcc.dg/Wstringop-overflow-70.c: Same.
- * gcc.dg/Wstringop-overflow-71.c: Same.
- * gcc.dg/strlenopt-95.c: Fix typos.
-
-2021-07-16 Tamar Christina <tamar.christina@arm.com>
-
- PR middle-end/101457
- * gcc.dg/vect/vect-reduc-dot-19.c: Use long long.
- * gcc.dg/vect/vect-reduc-dot-20.c: Likewise.
- * gcc.dg/vect/vect-reduc-dot-21.c: Likewise.
- * gcc.dg/vect/vect-reduc-dot-22.c: Likewise.
-
-2021-07-16 Marek Polacek <polacek@redhat.com>
-
- * g++.dg/cpp1y/Wnarrowing2.C: New test.
- * g++.dg/cpp1y/Wnarrowing2.h: New test.
-
-2021-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
-
- * g++.dg/ext/visibility/noPLT.C: Skip on s390x.
- * g++.target/s390/mi-thunk.C: New test.
- * gcc.target/s390/nodatarel-1.c: Move foostatic to the new
- tests.
- * gcc.target/s390/pr80080-4.c: Allow @PLT suffix.
- * gcc.target/s390/risbg-ll-3.c: Likewise.
- * gcc.target/s390/call.h: Common code for the new tests.
- * gcc.target/s390/call-z10-pic-nodatarel.c: New test.
- * gcc.target/s390/call-z10-pic.c: New test.
- * gcc.target/s390/call-z10.c: New test.
- * gcc.target/s390/call-z9-pic-nodatarel.c: New test.
- * gcc.target/s390/call-z9-pic.c: New test.
- * gcc.target/s390/call-z9.c: New test.
- * gcc.target/s390/mfentry-m64-pic.c: New test.
- * gcc.target/s390/tls.h: Common code for the new TLS tests.
- * gcc.target/s390/tls-pic.c: New test.
- * gcc.target/s390/tls.c: New test.
-
-2021-07-16 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/sve/extract_1.c: Split expected results
- by big/little endian targets, restoring the old expected
- result for big endian.
- * gcc.target/aarch64/sve/extract_2.c: Likewise.
- * gcc.target/aarch64/sve/extract_3.c: Likewise.
- * gcc.target/aarch64/sve/extract_4.c: Likewise.
-
-2021-07-15 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/101346
- * gcc.target/i386/pr101346.c: New test.
-
-2021-07-15 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/97027
- * gcc.dg/Wstringop-overflow-15.c: Remove an xfail.
- * gcc.dg/Wstringop-overflow-47.c: Adjust xfails.
- * gcc.dg/torture/pr69170.c: Avoid valid warnings.
- * gcc.dg/torture/pr70025.c: Prune out a false positive.
- * gcc.dg/vect/pr97769.c: Initialize a loop control variable.
- * gcc.target/i386/pr92658-avx512bw-trunc.c: Increase buffer size
- to avoid overflow.
- * gcc.target/i386/pr92658-avx512f.c: Same.
- * gcc.dg/Wstringop-overflow-68.c: New test.
- * gcc.dg/Wstringop-overflow-69.c: New test.
- * gcc.dg/Wstringop-overflow-70.c: New test.
- * gcc.dg/Wstringop-overflow-71.c: New test.
- * gcc.dg/strlenopt-95.c: New test.
-
-2021-07-15 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/95006
- PR analyzer/94713
- PR analyzer/94714
- * g++.dg/analyzer/pr93212.C: Update location of warning.
- * g++.dg/analyzer/pr94011.C: Add
- -Wno-analyzer-use-of-uninitialized-value.
- * g++.dg/analyzer/pr94503.C: Likewise.
- * gcc.dg/analyzer/clobbers-1.c: Convert "f" from a local to a
- param to avoid uninitialized warning.
- * gcc.dg/analyzer/data-model-1.c (test_12): Add test for
- uninitialized value on result of alloca.
- (test_12a): Add expected warning.
- (test_12c): Likewise.
- (test_19): Likewise.
- (test_29b): Likewise.
- (test_29c): Likewise.
- (test_37): Remove xfail.
- (test_37a): Likewise.
- * gcc.dg/analyzer/data-model-20.c: Add warning about leak.
- * gcc.dg/analyzer/explode-2.c: Remove params; add
- -Wno-analyzer-too-complex, -Wno-analyzer-malloc-leak, and xfails.
- Initialize the locals.
- * gcc.dg/analyzer/explode-2a.c: Initialize the locals. Add
- expected leak.
- * gcc.dg/analyzer/fgets-1.c: New test.
- * gcc.dg/analyzer/fread-1.c: New test.
- * gcc.dg/analyzer/malloc-1.c (test_16): Add expected warning.
- (test_40): Likewise.
- * gcc.dg/analyzer/memset-CVE-2017-18549-1.c: Check for
- uninitialized padding.
- * gcc.dg/analyzer/pr93355-localealias-feasibility.c (fread): New
- decl.
- (read_alias_file): Call it.
- * gcc.dg/analyzer/pr94047.c: Add expected warnings.
- * gcc.dg/analyzer/pr94851-2.c: Likewise.
- * gcc.dg/analyzer/pr96841.c: Convert local to a param.
- * gcc.dg/analyzer/pr98628.c: Likewise.
- * gcc.dg/analyzer/pr99042.c: Updated expected location of leak
- diagnostics.
- * gcc.dg/analyzer/symbolic-1.c: Add expected warnings.
- * gcc.dg/analyzer/symbolic-7.c: Likewise.
- * gcc.dg/analyzer/torture/pr93649.c: Add expected warning. Skip
- with -fno-fat-lto-objects.
- * gcc.dg/analyzer/uninit-1.c: New test.
- * gcc.dg/analyzer/uninit-2.c: New test.
- * gcc.dg/analyzer/uninit-3.c: New test.
- * gcc.dg/analyzer/uninit-4.c: New test.
- * gcc.dg/analyzer/uninit-pr94713.c: New test.
- * gcc.dg/analyzer/uninit-pr94714.c: New test.
- * gcc.dg/analyzer/use-after-free-2.c: New test.
- * gcc.dg/analyzer/use-after-free-3.c: New test.
- * gcc.dg/analyzer/zlib-3.c: Add expected warning.
- * gcc.dg/analyzer/zlib-6.c: Convert locals to params to avoid
- uninitialized warnings. Remove xfail.
- * gcc.dg/analyzer/zlib-6a.c: New test, based on the old version
- of the above.
- * gfortran.dg/analyzer/pr97668.f: Add
- -Wno-analyzer-use-of-uninitialized-value and
- -Wno-analyzer-too-complex.
-
-2021-07-15 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/phi-1.c: New test.
-
-2021-07-15 Christophe Lyon <christophe.lyon@foss.st.com>
-
- * lib/target-supports.exp (arm_v8_2a_imm8_neon_ok_nocache):
- Delete.
-
-2021-07-15 Christophe Lyon <christophe.lyon@foss.st.com>
-
- * gcc.target/arm/simd/vusdot-autovec.c: Use arm_v8_2a_i8mm_ok
- effective-target.
-
-2021-07-15 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/101443
- * g++.dg/cpp0x/nullptr46.C: New test.
-
-2021-07-15 Tamar Christina <tamar.christina@arm.com>
-
- PR middle-end/101457
- * gcc.dg/vect/vect-reduc-dot-17.c: Fix signs of scalar code.
- * gcc.dg/vect/vect-reduc-dot-18.c: Likewise.
- * gcc.dg/vect/vect-reduc-dot-22.c: Likewise.
- * gcc.dg/vect/vect-reduc-dot-9.c: Likewise.
-
-2021-07-15 Martin Sebor <msebor@redhat.com>
-
- * gcc.dg/Wvla-parameter-12.c: New test.
-
-2021-07-15 Bill Schmidt <wschmidt@linux.ibm.com>
-
- PR target/101129
- * gcc.target/powerpc/pr101129.c: New.
-
-2021-07-15 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/101437
- * gcc.c-torture/compile/pr101437.c: New test.
-
-2021-07-14 Peter Bergner <bergner@linux.ibm.com>
-
- * gcc.target/powerpc/mma-builtin-9.c: New test.
-
-2021-07-14 Patrick Palka <ppalka@redhat.com>
-
- PR c++/88252
- * g++.dg/cpp1z/class-deduction96.C: New test.
-
-2021-07-14 Jason Merrill <jason@redhat.com>
-
- * g++.dg/torture/pr100382.C: Pass -fno-delete-dead-exceptions.
-
-2021-07-14 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.dg/vect/vect-reduc-dot-11.c: Expect pass.
- * gcc.dg/vect/vect-reduc-dot-15.c: Likewise.
- * gcc.dg/vect/vect-reduc-dot-19.c: Likewise.
- * gcc.dg/vect/vect-reduc-dot-21.c: Likewise.
-
-2021-07-14 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/pr80776-1.c: Remove xfail.
-
-2021-07-14 Marek Polacek <polacek@redhat.com>
-
- PR c++/101371
- * g++.dg/cpp1y/constexpr-101371-2.C: New test.
- * g++.dg/cpp1y/constexpr-101371.C: New test.
-
-2021-07-14 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/100949
- * gfortran.dg/pr100949.f90: New test.
-
-2021-07-14 Tamar Christina <tamar.christina@arm.com>
-
- * lib/target-supports.exp
- (check_effective_target_arm_v8_2a_imm8_neon_ok_nocache,
- check_effective_target_arm_v8_2a_i8mm_neon_hw,
- check_effective_target_vect_usdot_qi): New.
- * gcc.dg/vect/vect-reduc-dot-9.c: New test.
- * gcc.dg/vect/vect-reduc-dot-10.c: New test.
- * gcc.dg/vect/vect-reduc-dot-11.c: New test.
- * gcc.dg/vect/vect-reduc-dot-12.c: New test.
- * gcc.dg/vect/vect-reduc-dot-13.c: New test.
- * gcc.dg/vect/vect-reduc-dot-14.c: New test.
- * gcc.dg/vect/vect-reduc-dot-15.c: New test.
- * gcc.dg/vect/vect-reduc-dot-16.c: New test.
- * gcc.dg/vect/vect-reduc-dot-17.c: New test.
- * gcc.dg/vect/vect-reduc-dot-18.c: New test.
- * gcc.dg/vect/vect-reduc-dot-19.c: New test.
- * gcc.dg/vect/vect-reduc-dot-20.c: New test.
- * gcc.dg/vect/vect-reduc-dot-21.c: New test.
- * gcc.dg/vect/vect-reduc-dot-22.c: New test.
-
-2021-07-14 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.target/arm/simd/vusdot-autovec.c: New test.
-
-2021-07-14 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.target/aarch64/simd/vusdot-autovec.c: New test.
- * gcc.target/aarch64/sve/vusdot-autovec.c: New test.
-
-2021-07-14 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101395
- * gcc.target/i386/pr101395-1.c: New test.
- * gcc.target/i386/pr101395-2.c: Likewise.
- * gcc.target/i386/pr101395-3.c: Likewise.
-
-2021-07-14 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101445
- * gcc.dg/vect/pr101445.c: New testcase.
-
-2021-07-14 Richard Biener <rguenther@suse.de>
-
- * gcc.target/i386/vect-reduc-1.c: New testcase.
-
-2021-07-13 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/extract_zero_extend.c: Remove dump scan
- for RTL pattern match.
- * gcc.target/aarch64/narrow_high_combine.c: Add new tests.
- * gcc.target/aarch64/simd/vmulx_laneq_f64_1.c: Update
- scan-assembler regex to look for a scalar register instead of
- lane 0 of a vector.
- * gcc.target/aarch64/simd/vmulxd_laneq_f64_1.c: Likewise.
- * gcc.target/aarch64/simd/vmulxs_lane_f32_1.c: Likewise.
- * gcc.target/aarch64/simd/vmulxs_laneq_f32_1.c: Likewise.
- * gcc.target/aarch64/simd/vqdmlalh_lane_s16.c: Likewise.
- * gcc.target/aarch64/simd/vqdmlals_lane_s32.c: Likewise.
- * gcc.target/aarch64/simd/vqdmlslh_lane_s16.c: Likewise.
- * gcc.target/aarch64/simd/vqdmlsls_lane_s32.c: Likewise.
- * gcc.target/aarch64/simd/vqdmullh_lane_s16.c: Likewise.
- * gcc.target/aarch64/simd/vqdmullh_laneq_s16.c: Likewise.
- * gcc.target/aarch64/simd/vqdmulls_lane_s32.c: Likewise.
- * gcc.target/aarch64/simd/vqdmulls_laneq_s32.c: Likewise.
- * gcc.target/aarch64/sve/dup_lane_1.c: Likewise.
- * gcc.target/aarch64/sve/extract_1.c: Likewise.
- * gcc.target/aarch64/sve/extract_2.c: Likewise.
- * gcc.target/aarch64/sve/extract_3.c: Likewise.
- * gcc.target/aarch64/sve/extract_4.c: Likewise.
- * gcc.target/aarch64/sve/live_1.c: Update scan-assembler regex
- cases to look for 'b' and 'h' registers instead of 'w'.
- * gcc.target/arm/crypto-vsha1cq_u32.c: Update scan-assembler
- regex to reflect lane 0 vector extractions being simplified
- to scalar register moves.
- * 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/mve/intrinsics/vgetq_lane_f16.c: Extract
- lane 1 as the moves for lane 0 now get optimized away.
- * gcc.target/arm/mve/intrinsics/vgetq_lane_f32.c: Likewise.
- * gcc.target/arm/mve/intrinsics/vgetq_lane_s16.c: Likewise.
- * gcc.target/arm/mve/intrinsics/vgetq_lane_s32.c: Likewise.
- * gcc.target/arm/mve/intrinsics/vgetq_lane_s8.c: Likewise.
- * gcc.target/arm/mve/intrinsics/vgetq_lane_u16.c: Likewise.
- * gcc.target/arm/mve/intrinsics/vgetq_lane_u32.c: Likewise.
- * gcc.target/arm/mve/intrinsics/vgetq_lane_u8.c: Likewise.
-
-2021-07-13 Paul A. Clarke <pc@us.ibm.com>
-
- * gcc.target/powerpc/sse4_1-ptest-1.c: Copy from
- gcc/testsuite/gcc.target/i386.
-
-2021-07-13 Andrew MacLeod <amacleod@redhat.com>
-
- PR tree-optimization/93781
- * gcc.dg/tree-ssa/pr93781-1.c: Check that call is removed.
-
-2021-07-13 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/reduc_9.c: New test.
- * gcc.target/aarch64/sve/reduc_9_run.c: Likewise.
- * gcc.target/aarch64/sve/reduc_10.c: Likewise.
- * gcc.target/aarch64/sve/reduc_10_run.c: Likewise.
- * gcc.target/aarch64/sve/reduc_11.c: Likewise.
- * gcc.target/aarch64/sve/reduc_11_run.c: Likewise.
- * gcc.target/aarch64/sve/reduc_12.c: Likewise.
- * gcc.target/aarch64/sve/reduc_12_run.c: Likewise.
- * gcc.target/aarch64/sve/reduc_13.c: Likewise.
- * gcc.target/aarch64/sve/reduc_13_run.c: Likewise.
- * gcc.target/aarch64/sve/reduc_14.c: Likewise.
- * gcc.target/aarch64/sve/reduc_14_run.c: Likewise.
- * gcc.target/aarch64/sve/reduc_15.c: Likewise.
- * gcc.target/aarch64/sve/reduc_15_run.c: Likewise.
-
-2021-07-13 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/cond_arith_6.c: New test.
-
-2021-07-13 Jakub Jelinek <jakub@redhat.com>
- Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101419
- * gcc.dg/builtin-object-size-10.c: Pass -fdump-tree-early_objsz-details
- instead of -fdump-tree-objsz1-details in dg-options and adjust names
- of dump file in scan-tree-dump.
- * gcc.dg/pr101419.c: New test.
-
-2021-07-13 Richard Biener <rguenther@suse.de>
-
- Revert:
- 2021-07-13 Richard Biener <rguenther@suse.de>
-
- * g++.dg/vect/slp-pr87105.cc: Adjust.
- * gcc.dg/vect/bb-slp-pr54400.c: Likewise.
-
-2021-07-13 Michael Meissner <meissner@linux.ibm.com>
-
- PR testsuite/100166
- * gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a-pr63175.c: Update
- insn counts to account for power10 prefixed loads and stores.
- * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-char.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-double.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-float.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-int.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-longlong.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-short.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-char.c: Likewise.
- * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-double.c: Likewise.
- * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-float.c: Likewise.
- * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-int.c: Likewise.
- * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-longlong.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-short.c: Likewise.
- * gcc.target/powerpc/fold-vec-load-vec_xl-char.c: Likewise.
- * gcc.target/powerpc/fold-vec-load-vec_xl-double.c: Likewise.
- * gcc.target/powerpc/fold-vec-load-vec_xl-float.c: Likewise.
- * gcc.target/powerpc/fold-vec-load-vec_xl-int.c: Likewise.
- * gcc.target/powerpc/fold-vec-load-vec_xl-longlong.c: Likewise.
- * gcc.target/powerpc/fold-vec-load-vec_xl-short.c: Likewise.
- * gcc.target/powerpc/fold-vec-splat-floatdouble.c: Likewise.
- * gcc.target/powerpc/fold-vec-splat-longlong.c: Likewise.
- * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-char.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-double.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-float.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-int.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-longlong.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-short.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-store-vec_vsx_st-char.c: Likewise.
- * gcc.target/powerpc/fold-vec-store-vec_vsx_st-double.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-store-vec_vsx_st-float.c: Likewise.
- * gcc.target/powerpc/fold-vec-store-vec_vsx_st-int.c: Likewise.
- * gcc.target/powerpc/fold-vec-store-vec_vsx_st-longlong.c:
- Likewise.
- * gcc.target/powerpc/fold-vec-store-vec_vsx_st-short.c: Likewise.
- * gcc.target/powerpc/fold-vec-store-vec_xst-char.c: Likewise.
- * gcc.target/powerpc/fold-vec-store-vec_xst-double.c: Likewise.
- * gcc.target/powerpc/fold-vec-store-vec_xst-float.c: Likewise.
- * gcc.target/powerpc/fold-vec-store-vec_xst-int.c: Likewise.
- * gcc.target/powerpc/fold-vec-store-vec_xst-longlong.c: Likewise.
- * gcc.target/powerpc/fold-vec-store-vec_xst-short.c: Likewise.
- * gcc.target/powerpc/lvsl-lvsr.c: Likewise.
- * gcc.target/powerpc/pr86731-fwrapv-longlong.c: Likewise.
-
-2021-07-13 Michael Meissner <meissner@linux.ibm.com>
-
- * gcc.target/powerpc/vec-splati-runnable.c: Run test with -O2
- optimization. Do not check what XXSPLTIDP generates if the value
- is undefined.
-
-2021-07-12 Patrick Palka <ppalka@redhat.com>
-
- PR c++/79501
- PR c++/100983
- * g++.dg/cpp1z/class-deduction92.C: New test.
- * g++.dg/cpp1z/class-deduction93.C: New test.
- * g++.dg/cpp1z/class-deduction94.C: New test.
- * g++.dg/cpp1z/class-deduction95.C: New test.
-
-2021-07-12 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/101424
- * gcc.target/i386/pr101424.c: New test.
-
-2021-07-12 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/tree-ssa/pr101335.c: New.
-
-2021-07-12 Andrew Pinski <apinski@marvell.com>
-
- * gcc.dg/tree-ssa/pr96928-1.c: Update to similar as pr96928.c.
-
-2021-07-12 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101373
- * g++.dg/torture/pr101373.C: New testcase, XFAILed.
- * gnat.dg/opt95.adb: Likewise.
-
-2021-07-12 Richard Biener <rguenther@suse.de>
-
- * g++.dg/vect/slp-pr87105.cc: Adjust.
- * gcc.dg/vect/bb-slp-pr54400.c: Likewise.
-
-2021-07-12 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101394
- * gcc.dg/torture/pr101394.c: New testcase.
-
-2021-07-12 Roger Sayle <roger@nextmovesoftware.com>
- Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/101403
- * gcc.dg/pr101403.c: Avoid (unimportant) uninitialized variable.
-
-2021-07-12 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
-
- PR target/66791
- * gcc.target/arm/armv8_2-fp16-neon-2.c: Adjust.
-
-2021-07-12 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
-
- PR target/98435
- * gcc.target/arm/simd/pr98435.c: New test.
-
-2021-07-12 Roger Sayle <roger@nextmovesoftware.com>
-
- PR tree-optimization/101403
- * gcc.dg/pr101403.c: New test case.
-
-2021-07-10 John David Anglin <danglin@gcc.gnu.org>
-
- * gcc.dg/torture/pr100329.c: Require target lra.
- * gcc.dg/torture/pr100519.c: Likewise.
-
-2021-07-10 Patrick Palka <ppalka@redhat.com>
-
- PR c++/82110
- * g++.dg/cpp0x/pr78765.C: Expect another conversion failure
- diagnostic.
- * g++.dg/template/sfinae14.C: Flip incorrect assertion.
- * g++.dg/cpp2a/concepts-requires27.C: New test.
-
-2021-07-09 Jason Merrill <jason@redhat.com>
-
- PR c++/101098
- * g++.dg/concepts/explicit-spec1.C: New test.
-
-2021-07-09 Roger Sayle <roger@nextmovesoftware.com>
- Uroš Bizjak <ubizjak@gmail.com>
-
- * gcc.target/i386/divmod-9.c: New test case.
-
-2021-07-09 Indu Bhagat <indu.bhagat@oracle.com>
-
- PR testsuite/101269
- * gcc.dg/debug/btf/btf-datasec-1.c: Force -msdata=none with ilp32 for
- powerpc based targets.
-
-2021-07-09 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101181
- * g++.dg/cpp2a/concepts-requires26.C: New test.
- * g++.dg/cpp2a/lambda-uneval16.C: New test.
-
-2021-07-09 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101247
- * g++.dg/cpp2a/concepts-memtmpl4.C: Uncomment the commented out
- example, which we now handle correctly.
- * g++.dg/cpp2a/concepts-memtmpl5.C: New test.
- * g++.dg/cpp2a/concepts-memtmpl5a.C: New test.
-
-2021-07-09 Xi Ruoyao <xry111@mengyan1223.wang>
-
- * gcc.target/mips/cfgcleanup-jalr2.c: Remove -fno-inline and add
- __attribute__((noinline)).
- * gcc.target/mips/cfgcleanup-jalr3.c: Likewise.
-
-2021-07-09 Xi Ruoyao <xry111@mengyan1223.wang>
-
- PR target/100760
- PR target/100761
- PR target/100762
- * gcc.target/mips/pr100760.c: New test.
- * gcc.target/mips/pr100761.c: New test.
- * gcc.target/mips/pr100762.c: New test.
-
-2021-07-09 Kewen Lin <linkw@linux.ibm.com>
-
- * gcc.target/powerpc/mod-vectorize.c: New test.
-
-2021-07-09 Kewen Lin <linkw@linux.ibm.com>
-
- * gcc.target/powerpc/div-vectorize-1.c: New test.
-
-2021-07-09 Kewen Lin <linkw@linux.ibm.com>
-
- * gcc.target/powerpc/mul-vectorize-1.c: New test.
- * gcc.target/powerpc/mul-vectorize-2.c: New test.
-
-2021-07-08 Martin Sebor <msebor@redhat.com>
-
- * gcc.dg/Wstringop-overflow-43.c: Remove an xfail.
-
-2021-07-08 Martin Sebor <msebor@redhat.com>
-
- PR testsuite/100451
- * g++.dg/warn/Warray-bounds-20.C: Adjust expected output for LP32.
-
-2021-07-08 Martin Sebor <msebor@redhat.com>
-
- * g++.dg/warn/Warray-bounds-11.C: Avoid including <new>.
- * g++.dg/warn/Warray-bounds-13.C: Same.
-
-2021-07-08 Marek Polacek <polacek@redhat.com>
-
- PR c++/101087
- * g++.dg/cpp0x/noexcept70.C: New test.
-
-2021-07-08 Martin Jambor <mjambor@suse.cz>
-
- PR ipa/101066
- * gcc.dg/ipa/pr101066.c: New test.
-
-2021-07-08 Martin Sebor <msebor@redhat.com>
-
- PR bootstrap/101374
- * c-c++-common/Warray-bounds-3.c: Xfail assertion.
- * c-c++-common/Warray-bounds-4.c: Same.
-
-2021-07-08 Christophe Lyon <christophe.lyon@foss.st.om>
-
- * gcc.dg/debug/pr57351.c: Require arm_arch_v7a_ok
- effective-target.
-
-2021-07-08 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/acle/general/cntb_1.c: New test.
-
-2021-07-08 Roger Sayle <roger@nextmovesoftware.com>
- Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/40210
- * gcc.dg/builtin-bswap-13.c: New test.
- * gcc.dg/builtin-bswap-14.c: New test.
-
-2021-07-08 Michael Meissner <meissner@linux.ibm.com>
-
- PR target/100809
- * gcc.target/powerpc/p10-vdivq-vmodq.c: New test.
-
-2021-07-07 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/pattern-test-2.c: Update expected results.
- * gcc.dg/plugin/analyzer_gil_plugin.c
- (gil_state_machine::on_condition): Remove.
-
-2021-07-07 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/100137
- PR tree-optimization/99121
- PR tree-optimization/97027
- * c-c++-common/Warray-bounds-3.c: Remove xfail
- * c-c++-common/Warray-bounds-4.c: Add an expected warning.
- * c-c++-common/Warray-bounds-9.c: New test.
- * c-c++-common/Warray-bounds-10.c: New test.
- * g++.dg/asan/asan_test.C: Suppress expected warnings.
- * g++.dg/pr95768.C: Same.
- * g++.dg/warn/Warray-bounds-10.C: Adjust text of expected messages.
- * g++.dg/warn/Warray-bounds-11.C: Same.
- * g++.dg/warn/Warray-bounds-12.C: Same.
- * g++.dg/warn/Warray-bounds-13.C: Same.
- * g++.dg/warn/Warray-bounds-17.C: Same.
- * g++.dg/warn/Warray-bounds-20.C: Same.
- * gcc.dg/Warray-bounds-29.c: Same.
- * gcc.dg/Warray-bounds-30.c: Add xfail.
- * gcc.dg/Warray-bounds-31.c: Adjust text of expected messages.
- * gcc.dg/Warray-bounds-32.c: Same.
- * gcc.dg/Warray-bounds-52.c: Same.
- * gcc.dg/Warray-bounds-53.c: Same.
- * gcc.dg/Warray-bounds-58.c: Remove xfail.
- * gcc.dg/Warray-bounds-63.c: Adjust text of expected messages.
- * gcc.dg/Warray-bounds-66.c: Same.
- * gcc.dg/Warray-bounds-69.c: Same.
- * gcc.dg/Wstringop-overflow-34.c: Same.
- * gcc.dg/Wstringop-overflow-47.c: Same.
- * gcc.dg/Wstringop-overflow-61.c: Same.
- * gcc.dg/Warray-bounds-77.c: New test.
- * gcc.dg/Warray-bounds-78.c: New test.
- * gcc.dg/Warray-bounds-79.c: New test.
-
-2021-07-07 Christophe Lyon <christophe.lyon@foss.st.com>
-
- PR debug/101321
- * gcc.dg/debug/btf/btf-bitfields-3.c: Remove -fno-short-enums.
-
-2021-07-07 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/34195
- * gcc.dg/vect/pr34195.c: New testcase.
-
-2021-07-07 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99728
- * g++.dg/opt/pr99728.C: New testcase.
-
-2021-07-07 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx512f-vect-fmaddsubXXXpd.c: New test.
- * gcc.target/i386/avx512f-vect-fmaddsubXXXps.c: New test.
- * gcc.target/i386/avx512f-vect-fmsubaddXXXpd.c: New test.
- * gcc.target/i386/avx512f-vect-fmsubaddXXXps.c: New test.
-
-2021-07-06 Indu Bhagat <indu.bhagat@oracle.com>
-
- PR debug/101283
- * gcc.dg/debug/btf/btf-bitfields-3.c: Remove the check on btm_type.
-
-2021-07-06 Indu Bhagat <indu.bhagat@oracle.com>
-
- PR debug/101283
- * gcc.dg/debug/ctf/ctf-attr-mode-1.c: Remove the check for ctv_typeidx.
-
-2021-07-06 Martin Sebor <msebor@redhat.com>
-
- PR c++/55881
- * g++.dg/warn/uninit-pr55881.C: New test.
-
-2021-07-06 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/86650
- * gcc.dg/Warray-bounds-76.c: New test.
-
-2021-07-06 Indu Bhagat <indu.bhagat@oracle.com>
-
- PR debug/101283
- * gcc.dg/debug/ctf/ctf-struct-array-2.c: Adjust the value in the testcase.
-
-2021-07-06 Martin Sebor <msebor@redhat.com>
-
- * gcc.dg/format/gcc_diag-10.c: Update expected warnings.
- * gcc.dg/plugin/diagnostic_plugin_test_inlining.c: Remove %G.
-
-2021-07-06 Martin Sebor <msebor@redhat.com>
-
- * gcc.dg/Wobjsize-1.c: Prune expected output.
- * gcc.dg/Warray-bounds-71.c: New test.
- * gcc.dg/Warray-bounds-71.h: New test header.
- * gcc.dg/Warray-bounds-72.c: New test.
- * gcc.dg/Warray-bounds-73.c: New test.
- * gcc.dg/Warray-bounds-74.c: New test.
- * gcc.dg/Warray-bounds-75.c: New test.
- * gcc.dg/Wfree-nonheap-object-4.c: Adjust expected output.
- * gcc.dg/Wfree-nonheap-object-5.c: New test.
- * gcc.dg/Wfree-nonheap-object-6.c: New test.
- * gcc.dg/pragma-diag-10.c: New test.
- * gcc.dg/pragma-diag-9.c: New test.
- * gcc.dg/uninit-suppress_3.c: New test.
- * gcc.dg/pr79214.c: Xfail tests.
- * gcc.dg/tree-ssa/builtin-sprintf-warn-27.c: New test.
- * gcc.dg/format/c90-printf-1.c: Adjust expected output.
-
-2021-07-06 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/97194
- * gcc.target/i386/sse4_1-vec-set-1a.c: New test.
- * gcc.target/i386/sse4_1-vec-set-2a.c: Ditto.
-
-2021-07-06 Richard Biener <rguenther@suse.de>
-
- * gcc.target/i386/vect-fmaddsubXXXpd.c: New testcase.
- * gcc.target/i386/vect-fmaddsubXXXps.c: Likewise.
- * gcc.target/i386/vect-fmsubaddXXXpd.c: Likewise.
- * gcc.target/i386/vect-fmsubaddXXXps.c: Likewise.
-
-2021-07-06 Andrew Pinski <apinski@marvell.com>
-
- PR tree-optimization/101256
- * g++.dg/torture/pr101256.C: New test.
-
-2021-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
-
- PR fortran/100227
- * gfortran.dg/implied_do_io_7.f90: New test.
-
-2021-07-06 Kewen Lin <linkw@linux.ibm.com>
-
- PR rtl-optimization/100328
- * gcc.target/aarch64/sve/acle/asm/div_f16.c: Remove one xfail.
- * gcc.target/aarch64/sve/acle/asm/div_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/div_f64.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/divr_f16.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/divr_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/divr_f64.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/mad_f16.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/mad_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/mad_f64.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/mla_f16.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/mla_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/mla_f64.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/mls_f16.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/mls_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/mls_f64.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/msb_f16.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/msb_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/msb_f64.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/mulx_f16.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/mulx_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/mulx_f64.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/nmad_f16.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/nmad_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/nmad_f64.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/nmla_f16.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/nmla_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/nmla_f64.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/nmls_f16.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/nmls_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/nmls_f64.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/nmsb_f16.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/nmsb_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/nmsb_f64.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/sub_f16.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/sub_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/sub_f64.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/subr_f16.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/subr_f32.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/subr_f64.c: Likewise.
-
-2021-07-06 Indu Bhagat <indu.bhagat@oracle.com>
-
- PR debug/101283
- * gcc.dg/debug/btf/btf-cvr-quals-1.c: Use -gdwarf-4 on Darwin targets.
- * gcc.dg/debug/ctf/ctf-cvr-quals-1.c: Likewise.
-
-2021-07-05 Andrew Pinski <apinski@marvell.com>
-
- PR tree-optimization/101039
- * gcc.dg/tree-ssa/phi-opt-15.c: Update test to expect
- ABSU and still not expect ABS_EXPR.
- * gcc.dg/tree-ssa/phi-opt-23.c: New test.
- * gcc.dg/tree-ssa/phi-opt-24.c: New test.
-
-2021-07-05 Christophe Lyon <christophe.lyon@foss.st.com>
-
- PR debug/101321
- * gcc.dg/debug/btf/btf-bitfields-3.c: Add -fno-short-enums.
-
-2021-07-05 Richard Biener <rguenther@suse.de>
-
- PR testsuite/101299
- * gcc.dg/vect/bb-slp-74.c: Add vect_double requires.
-
-2021-07-05 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/pr92658-avx512vl.c: Refine testcase.
-
-2021-07-03 David Edelsohn <dje.gcc@gmail.com>
-
- * gcc.dg/debug/btf/btf.exp: Skip on AIX.
- * gcc.dg/debug/ctf/ctf.exp: Skip on AIX.
- * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): AIX
- doesn't support CTF.
- (gcc-dg-debug-runtest): Move CTF support within
- target support format test.
-
-2021-07-03 H.J. Lu <hjl.tools@gmail.com>
-
- PR middle-end/101294
- * gcc.dg/pr101294.c: New test.
-
-2021-07-03 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR d/101273
- * gdc.dg/torture/pr101273.d: New test.
-
-2021-07-02 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR d/101282
- * gdc.dg/torture/pr101282.d: New test.
-
-2021-07-02 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/gomp/attrs-1.C: New test.
- * g++.dg/gomp/attrs-2.C: New test.
- * g++.dg/gomp/attrs-3.C: New test.
-
-2021-07-02 Jakub Jelinek <jakub@redhat.com>
-
- PR c/101297
- * c-c++-common/gomp/atomic-24.c: New test.
-
-2021-07-02 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101247
- * g++.dg/cpp2a/concepts-memtmpl4.C: New test.
-
-2021-07-02 Peter Bergner <bergner@linux.ibm.com>
-
- * gcc.target/powerpc/mma-builtin-7.c: New test.
- * gcc.target/powerpc/mma-builtin-8.c: New test.
-
-2021-07-02 Andrew MacLeod <amacleod@redhat.com>
-
- PR tree-optimization/101223
- * gcc.dg/pr101223.c: New.
-
-2021-07-02 David Faust <david.faust@oracle.com>
-
- * gcc.dg/debug/btf/btf-float-1.c: New test.
- * gcc.dg/debug/btf/btf-function-3.c: Use different unrepresentable type.
- * gcc.dg/debug/btf/btf-struct-2.c: Likewise.
- * gcc.dg/debug/btf/btf-variables-2.c: Likewise.
-
-2021-07-02 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
-
- * lib/gcc-defs.exp: Add a comment.
-
-2021-07-02 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101293
- * gcc.dg/tree-ssa/ssa-lim-15.c: New testcase.
-
-2021-07-02 Jakub Jelinek <jakub@redhat.com>
-
- PR target/101286
- * gcc.target/i386/avx2-pr101286.c: New test.
-
-2021-07-02 Hongyu Wang <hongyu.wang@intel.com>
-
- * gcc.target/i386/keylocker-aesdec128kl.c: Update test.
- * gcc.target/i386/keylocker-aesdec256kl.c: Likewise.
- * gcc.target/i386/keylocker-aesdecwide128kl.c: Likewise.
- * gcc.target/i386/keylocker-aesdecwide256kl.c: Likewise.
- * gcc.target/i386/keylocker-aesenc128kl.c: Likewise.
- * gcc.target/i386/keylocker-aesenc256kl.c: Likewise.
- * gcc.target/i386/keylocker-aesencwide128kl.c: Likewise.
- * gcc.target/i386/keylocker-aesencwide256kl.c: Likewise.
-
-2021-07-01 Michael Meissner <meissner@linux.ibm.com>
-
- * gcc.target/powerpc/float128-cmove.c: New test.
- * gcc.target/powerpc/float128-minmax-3.c: New test.
-
-2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
-
- * c-c++-common/dump-ada-spec-14.c: Adjust dg-warning directive.
-
-2021-07-01 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/100865
- * gcc.target/i386/avx512f-broadcast-pr87767-1.c: Expect integer
- broadcast.
- * gcc.target/i386/avx512f-broadcast-pr87767-5.c: Likewise.
- * gcc.target/i386/avx512vl-broadcast-pr87767-1.c: Likewise.
- * gcc.target/i386/avx512vl-broadcast-pr87767-5.c: Likewise.
- * gcc.target/i386/avx512f_cond_move.c: Also pass
- -mprefer-vector-width=512 and expect integer broadcast.
- * gcc.target/i386/pr100865-1.c: New test.
- * gcc.target/i386/pr100865-2.c: Likewise.
- * gcc.target/i386/pr100865-3.c: Likewise.
- * gcc.target/i386/pr100865-4a.c: Likewise.
- * gcc.target/i386/pr100865-4b.c: Likewise.
- * gcc.target/i386/pr100865-5a.c: Likewise.
- * gcc.target/i386/pr100865-5b.c: Likewise.
- * gcc.target/i386/pr100865-6a.c: Likewise.
- * gcc.target/i386/pr100865-6b.c: Likewise.
- * gcc.target/i386/pr100865-6c.c: Likewise.
- * gcc.target/i386/pr100865-7a.c: Likewise.
- * gcc.target/i386/pr100865-7b.c: Likewise.
- * gcc.target/i386/pr100865-7c.c: Likewise.
- * gcc.target/i386/pr100865-8a.c: Likewise.
- * gcc.target/i386/pr100865-8b.c: Likewise.
- * gcc.target/i386/pr100865-8c.c: Likewise.
- * gcc.target/i386/pr100865-9a.c: Likewise.
- * gcc.target/i386/pr100865-9b.c: Likewise.
- * gcc.target/i386/pr100865-9c.c: Likewise.
- * gcc.target/i386/pr100865-10a.c: Likewise.
- * gcc.target/i386/pr100865-10b.c: Likewise.
- * gcc.target/i386/pr100865-11a.c: Likewise.
- * gcc.target/i386/pr100865-11b.c: Likewise.
- * gcc.target/i386/pr100865-11c.c: Likewise.
- * gcc.target/i386/pr100865-12a.c: Likewise.
- * gcc.target/i386/pr100865-12b.c: Likewise.
- * gcc.target/i386/pr100865-12c.c: Likewise.
-
-2021-07-01 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101280
- PR tree-optimization/101173
- * gcc.dg/tree-ssa/loop-interchange-16.c: New testcase.
-
-2021-07-01 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101278
- * gcc.dg/torture/pr101278.c: New testcase.
-
-2021-07-01 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100778
- * gcc.dg/torture/pr100778.c: New testcase.
-
-2021-07-01 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/101044
- * gcc.target/i386/pr101044.c: New test.
-
-2021-07-01 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101178
- * gcc.dg/vect/bb-slp-72.c: New testcase.
- * gcc.dg/vect/bb-slp-73.c: Likewise.
- * gcc.dg/vect/bb-slp-74.c: Likewise.
-
-2021-07-01 Jakub Jelinek <jakub@redhat.com>
-
- PR debug/101266
- * gcc.dg/pr101266.c: New test.
-
-2021-07-01 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101194
- * g++.dg/cpp0x/constexpr-empty16.C: New test.
-
-2021-07-01 Patrick Palka <ppalka@redhat.com>
-
- PR c++/96204
- * g++.dg/template/access41.C: New test.
- * g++.dg/template/access41a.C: New test.
-
-2021-06-30 Indu Bhagat <indu.bhagat@oracle.com>
-
- * gcc.dg/debug/ctf/ctf-skip-types-4.c: Add dg-add-options float64 and
- float64x.
-
-2021-06-30 Michael Meissner <meissner@linux.ibm.com>
-
- * gcc.target/powerpc/float128-minmax.c: Adjust expected code for
- power10.
- * lib/target-supports.exp (check_effective_target_has_arch_pwr10):
- New.
-
-2021-06-30 Patrick Palka <ppalka@redhat.com>
-
- * g++.dg/cpp2a/concepts-access2.C: New test.
-
-2021-06-30 Marek Polacek <polacek@redhat.com>
-
- PR c++/100975
- DR 2397
- * g++.dg/cpp0x/auto24.C: Remove dg-error.
- * g++.dg/cpp0x/auto3.C: Adjust dg-error.
- * g++.dg/cpp0x/auto42.C: Likewise.
- * g++.dg/cpp0x/initlist75.C: Likewise.
- * g++.dg/cpp0x/initlist80.C: Likewise.
- * g++.dg/diagnostic/auto1.C: Remove dg-error.
- * g++.dg/cpp23/auto-array.C: New test.
-
-2021-06-30 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101267
- * gfortran.dg/pr101267.f90: New testcase.
-
-2021-06-30 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/95006
- * gcc.dg/analyzer/clobbers-1.c: New test.
- * gcc.dg/analyzer/clobbers-2.c: New test.
- * gcc.dg/analyzer/data-model-1.c (test_26): Mark xfail as fixed.
- (test_28): Likewise.
- (test_52): Likewise. Add coverage for end of buffer.
- * gcc.dg/analyzer/explode-1.c: Add leak warning.
- * gcc.dg/analyzer/memset-1.c (test_3): Mark xfail as fixed.
- (test_4): Use char. Mark xfail as fixed.
- (test_6b): New.
- (test_7): Mark xfail as fixed. Add coverage for start of buffer.
- (test_8): New.
- (test_9): New.
- * gcc.dg/analyzer/memset-CVE-2017-18549-1.c: New test.
- * gcc.dg/analyzer/symbolic-8.c: New test.
-
-2021-06-30 Christophe Lyon <christophe.lyon@foss.st.com>
-
- * gcc.dg/debug/ctf/ctf-skip-types-2.c: Add dg-add-options float16.
-
-2021-06-30 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101264
- * gfortran.dg/pr101264.f90: New testcase.
-
-2021-06-30 liuhongt <hongtao.liu@intel.com>
-
- PR target/101248
- * gcc.target/i386/pr101248.c: New test.
-
-2021-06-29 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/pr101254.c: New.
-
-2021-06-29 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/95046
- * gcc.target/i386/pr95046-9.c: New test.
-
-2021-06-29 Richard Biener <rguenther@suse.de>
-
- * gcc.dg/vect/pr67790.c: Un-XFAIL.
- * gcc.dg/vect/bb-slp-71.c: New testcase.
-
-2021-06-29 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/101210
- * g++.dg/ubsan/pr101210.C: New test.
-
-2021-06-29 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101242
- * gcc.dg/vect/bb-slp-pr101242.c: New testcase.
- * gcc.dg/vect/pr67790.c: XFAIL scan for zero VEC_PERM_EXPR.
-
-2021-06-28 Martin Sebor <msebor@redhat.com>
-
- * g++.dg/uninit-pr74762.C: New test.
- * g++.dg/warn/uninit-pr74765.C: Same.
-
-2021-06-28 Indu Bhagat <indu.bhagat@oracle.com>
- David Faust <david.faust@oracle.com>
-
- * lib/gcc-dg.exp (gcc-dg-frontend-supports-ctf): New procedure.
- (gcc-dg-debug-runtest): Add -gctf support.
- * gcc.dg/debug/btf/btf-1.c: New test.
- * gcc.dg/debug/btf/btf-2.c: Likewise.
- * gcc.dg/debug/btf/btf-anonymous-struct-1.c: Likewise.
- * gcc.dg/debug/btf/btf-anonymous-union-1.c: Likewise.
- * gcc.dg/debug/btf/btf-array-1.c: Likewise.
- * gcc.dg/debug/btf/btf-bitfields-1.c: Likewise.
- * gcc.dg/debug/btf/btf-bitfields-2.c: Likewise.
- * gcc.dg/debug/btf/btf-bitfields-3.c: Likewise.
- * gcc.dg/debug/btf/btf-cvr-quals-1.c: Likewise.
- * gcc.dg/debug/btf/btf-enum-1.c: Likewise.
- * gcc.dg/debug/btf/btf-forward-1.c: Likewise.
- * gcc.dg/debug/btf/btf-function-1.c: Likewise.
- * gcc.dg/debug/btf/btf-function-2.c: Likewise.
- * gcc.dg/debug/btf/btf-int-1.c: Likewise.
- * gcc.dg/debug/btf/btf-pointers-1.c: Likewise.
- * gcc.dg/debug/btf/btf-struct-1.c: Likewise.
- * gcc.dg/debug/btf/btf-typedef-1.c: Likewise.
- * gcc.dg/debug/btf/btf-union-1.c: Likewise.
- * gcc.dg/debug/btf/btf-variables-1.c: Likewise.
- * gcc.dg/debug/btf/btf.exp: Likewise.
- * gcc.dg/debug/ctf/ctf-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-anonymous-struct-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-anonymous-union-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-array-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-array-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-array-3.c: Likewise.
- * gcc.dg/debug/ctf/ctf-array-4.c: Likewise.
- * gcc.dg/debug/ctf/ctf-attr-mode-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-attr-used-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-bitfields-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-bitfields-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-bitfields-3.c: Likewise.
- * gcc.dg/debug/ctf/ctf-bitfields-4.c: Likewise.
- * gcc.dg/debug/ctf/ctf-complex-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-cvr-quals-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-cvr-quals-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-cvr-quals-3.c: Likewise.
- * gcc.dg/debug/ctf/ctf-cvr-quals-4.c: Likewise.
- * gcc.dg/debug/ctf/ctf-enum-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-enum-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-file-scope-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-float-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-forward-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-forward-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-func-index-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-function-pointers-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-function-pointers-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-function-pointers-3.c: Likewise.
- * gcc.dg/debug/ctf/ctf-functions-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-int-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-objt-index-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-pointers-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-pointers-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-preamble-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-skip-types-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-skip-types-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-skip-types-3.c: Likewise.
- * gcc.dg/debug/ctf/ctf-skip-types-4.c: Likewise.
- * gcc.dg/debug/ctf/ctf-skip-types-5.c: Likewise.
- * gcc.dg/debug/ctf/ctf-skip-types-6.c: Likewise.
- * gcc.dg/debug/ctf/ctf-str-table-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-struct-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-struct-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-struct-array-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-struct-pointer-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-struct-pointer-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-typedef-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-typedef-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-typedef-3.c: Likewise.
- * gcc.dg/debug/ctf/ctf-typedef-struct-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-typedef-struct-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf-typedef-struct-3.c: Likewise.
- * gcc.dg/debug/ctf/ctf-union-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-variables-1.c: Likewise.
- * gcc.dg/debug/ctf/ctf-variables-2.c: Likewise.
- * gcc.dg/debug/ctf/ctf.exp: Likewise.
- * gcc.dg/debug/btf/btf-bitfields-4.c: New file.
- * gcc.dg/debug/btf/btf-datasec-1.c: New file.
- * gcc.dg/debug/btf/btf-function-3.c: New file.
- * gcc.dg/debug/btf/btf-pointers-2.c: New file.
- * gcc.dg/debug/btf/btf-struct-2.c: New file.
- * gcc.dg/debug/btf/btf-variables-2.c: New file.
- * gcc.dg/debug/btf/btf-variables-3.c: New file.
- * gcc.dg/debug/ctf/ctf-debug-1.c: New file.
- * gcc.dg/debug/ctf/ctf-debug-2.c: New file.
- * gcc.dg/debug/ctf/ctf-function-pointers-4.c: New file.
- * gcc.dg/debug/ctf/ctf-skip-types-7.c: New file.
- * gcc.dg/debug/ctf/ctf-skip-types-8.c: New file.
- * gcc.dg/debug/ctf/ctf-struct-array-2.c: New file.
-
-2021-06-28 Indu Bhagat <indu.bhagat@oracle.com>
-
- * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): New procedure.
-
-2021-06-28 Martin Jambor <mjambor@suse.cz>
-
- PR ipa/93385
- * gcc.dg/ipa/pr93385.c: New test.
- * gcc.dg/ipa/ipa-sra-23.c: Likewise.
- * gcc.dg/ipa/ipa-sra-24.c: Likewise.
- * g++.dg/ipa/ipa-sra-4.C: Likewise.
-
-2021-06-28 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101229
- * gcc.dg/torture/pr101229.c: New testcase.
-
-2021-06-28 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101207
- * gcc.dg/vect/bb-slp-pr101207.c: New testcase.
-
-2021-06-28 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101173
- * gcc.dg/torture/pr101173.c: New testcase.
-
-2021-06-28 liuhongt <hongtao.liu@intel.com>
-
- PR target/100648
- * g++.target/i386/avx2-pr54700-2.C: Adjust testcase.
- * g++.target/i386/avx512vl-pr54700-1a.C: New test.
- * g++.target/i386/avx512vl-pr54700-1b.C: New test.
- * g++.target/i386/avx512vl-pr54700-2a.C: New test.
- * g++.target/i386/avx512vl-pr54700-2b.C: New test.
- * gcc.target/i386/avx512vl-pr100648.c: New test.
- * gcc.target/i386/avx512vl-blendv-1.c: New test.
- * gcc.target/i386/avx512vl-blendv-2.c: New test.
-
-2021-06-28 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/funcspec-8.c: Replace
- __builtin_ia32_blendvpd with __builtin_ia32_roundps_az.
- * gcc.target/i386/blendv-1.c: New test.
- * gcc.target/i386/blendv-2.c: New test.
-
-2021-06-27 Andrew Pinski <apinski@marvell.com>
-
- * gcc.dg/torture/pr101230-1.c: New test.
-
-2021-06-26 Patrick Palka <ppalka@redhat.com>
-
- PR c++/96204
- * g++.dg/template/access40.C: New test.
- * g++.dg/template/access40a.C: New test.
-
-2021-06-26 Jason Merrill <jason@redhat.com>
-
- PR c++/101040
- PR c++/97566
- * g++.dg/cpp2a/no_unique_address13.C: New test.
-
-2021-06-26 Marek Polacek <polacek@redhat.com>
-
- PR c++/100752
- * g++.dg/cpp0x/noexcept69.C: New test.
- * g++.dg/parse/saved1.C: Adjust dg-error.
- * g++.dg/template/crash50.C: Likewise.
-
-2021-06-25 David Malcolm <dmalcolm@redhat.com>
-
- * jit.dg/test-vector-rvalues.cc (check_div): Add specialization
- for v4f, to avoid relying on exact floating-point equality.
- * jit.dg/test-vector-types.cc (check_div): Likewise.
-
-2021-06-25 David Malcolm <dmalcolm@redhat.com>
-
- * jit.dg/test-asm.c: Remove i?86-*-* from target specifier.
- * jit.dg/test-asm.cc: Likewise.
-
-2021-06-25 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/101216
- * gcc.dg/Wnonnull-7.c: New test.
-
-2021-06-25 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101202
- * gcc.dg/torture/pr101202.c: New testcase.
-
-2021-06-25 Xi Ruoyao <xry111@mengyan1223.wang>
-
- * g++.dg/no-stack-protector-attr-3.C (dg-final): Adjust for MIPS.
-
-2021-06-25 liuhongt <hongtao.liu@intel.com>
-
- PR target/101185
- * gcc.target/i386/bitwise_mask_op-3.c: Add xfail to
- temporarily avoid regression, eventually xfail should be
- removed.
-
-2021-06-24 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/tree-ssa/evrp30.c: New.
-
-2021-06-24 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/tree-ssa/pr101189.c: New.
-
-2021-06-24 Patrick Palka <ppalka@redhat.com>
-
- PR c++/98832
- * g++.dg/cpp2a/class-deduction-alias9.C: New test.
-
-2021-06-24 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101182
- * g++.dg/cpp2a/concepts-requires25.C: New test.
-
-2021-06-24 Jakub Jelinek <jakub@redhat.com>
-
- PR c/101171
- * gcc.dg/pr101171.c: New test.
-
-2021-06-24 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/89021
- * gcc.dg/vect/vect-nb-iter-ub-3.c (dg-additional-options):
- Add --param vect-epilogues-nomask=0.
- * gcc.target/i386/pr97249-1.c (foo): Add #pragma GCC unroll
- to avoid loop vectorization.
- (foo1): Ditto.
- (foo2): Ditto.
-
-2021-06-24 Richard Biener <rguenther@suse.de>
-
- * gcc.target/i386/vect-addsubv2df.c: New testcase.
- * gcc.target/i386/vect-addsubv4sf.c: Likewise.
- * gcc.target/i386/vect-addsubv4df.c: Likewise.
- * gcc.target/i386/vect-addsubv8sf.c: Likewise.
- * gcc.target/i386/vect-addsub-2.c: Likewise.
- * gcc.target/i386/vect-addsub-3.c: Likewise.
-
-2021-06-24 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/101170
- * gcc.dg/pr101170.c: New test.
-
-2021-06-24 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/101172
- * gcc.dg/pr101172.c: New test.
-
-2021-06-24 Ilya Leoshkevich <iii@linux.ibm.com>
-
- * gcc.target/s390/mnop-mcount-m31-mzarch.c: Adapt to the new
- prologue size.
- * gcc.target/s390/mnop-mcount-m64.c: Likewise.
-
-2021-06-24 Jakub Jelinek <jakub@redhat.com>
-
- * c-c++-common/gomp/target-in-reduction-1.c: New test.
- * c-c++-common/gomp/clauses-1.c: Add in_reduction clauses on
- target or combined target constructs.
-
-2021-06-24 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101105
- * gcc.dg/torture/pr101105.c: New testcase.
-
-2021-06-24 liuhongt <hongtao.liu@intel.com>
-
- PR target/98434
- * gcc.target/i386/pr98434-1.c: New test.
- * gcc.target/i386/pr98434-2.c: New test.
- * gcc.target/i386/avx512vl-pr95488-1.c: Adjust testcase.
-
-2021-06-23 Patrick Palka <ppalka@redhat.com>
-
- PR c++/101174
- * g++.dg/cpp1z/class-deduction-access3.C: New test.
- * g++.dg/cpp1z/class-deduction91.C: New test.
-
-2021-06-23 Aaron Sawdey <acsawdey@linux.ibm.com>
-
- * gcc.target/powerpc/pcrel-opt-inc-di.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-ld-df.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-ld-di.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-ld-hi.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-ld-qi.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-ld-sf.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-ld-si.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-ld-vector.c: Enable -mpcrel-opt to
- test it.
- * gcc.target/powerpc/pcrel-opt-st-df.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-st-di.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-st-hi.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-st-qi.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-st-sf.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-st-si.c: Enable -mpcrel-opt to test it.
- * gcc.target/powerpc/pcrel-opt-st-vector.c: Enable -mpcrel-opt to
- test it.
-
-2021-06-23 Xi Ruoyao <xry111@mengyan@123.wang>
-
- * gcc.c-torture/execute/950704-1.c: Add -fwrapv to avoid
- undefined behavior.
-
-2021-06-23 Patrick Palka <ppalka@redhat.com>
-
- PR c++/86439
- * g++.dg/cpp1z/class-deduction88.C: New test.
- * g++.dg/cpp1z/class-deduction89.C: New test.
- * g++.dg/cpp1z/class-deduction90.C: New test.
-
-2021-06-23 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/101175
- * gcc.target/i386/pr101175.c: New test.
-
-2021-06-23 Andre Vehreschild <vehre@gcc.gnu.org>
-
- PR fortran/100337
- * gfortran.dg/coarray_collectives_17.f90: New test.
-
-2021-06-22 Sandra Loosemore <sandra@codesourcery.com>
- Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/93524
- * gfortran.dg/pr93524.c: New.
- * gfortran.dg/pr93524.f90: New.
-
-2021-06-22 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/101143
- * gcc.dg/analyzer/pr101143.c: New test.
-
-2021-06-22 Richard Biener <rguenther@suse.de>
-
- PR middle-end/101156
- * gcc.dg/pr101156.c: New testcase.
-
-2021-06-22 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/101159
- * gcc.c-torture/compile/pr101159.c: New test.
-
-2021-06-22 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/101160
- * g++.target/i386/empty-class1.C: Require lp64 effective target
- instead of x86_64-*-*.
- * g++.target/i386/empty-class2.C: New test.
-
-2021-06-22 Jakub Jelinek <jakub@redhat.com>
+2022-01-29 Jakub Jelinek <jakub@redhat.com>
Andrew Pinski <apinski@marvell.com>
- PR tree-optimization/101162
- * g++.dg/opt/pr101162.C: New test.
-
-2021-06-22 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101151
- * gcc.dg/torture/pr101151.c: New testcase.
-
-2021-06-22 Kito Cheng <kito.cheng@sifive.com>
-
- * g++.dg/modules/omp-1_a.C: Check pthread is available for
- dg-module-cmi.
- * g++.dg/modules/omp-2_a.C: Ditto.
-
-2021-06-22 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101158
- * gfortran.dg/pr101158.f90: New testcase.
-
-2021-06-22 Jakub Jelinek <jakub@redhat.com>
-
- PR target/11877
- * gcc.target/i386/pr11877-2.c: New test.
-
-2021-06-22 liuhongt <hongtao.liu@intel.com>
-
- PR tree-optimization/97770
- * gcc.target/i386/avx512bitalg-pr97770-1.c: Remove xfail.
- * gcc.target/i386/avx512vpopcntdq-pr97770-1.c: Remove xfail.
-
-2021-06-22 liuhongt <hongtao.liu@intel.com>
-
- PR target/100267
- * gcc.target/i386/avx512bw-pr100267-1.c: New test.
- * gcc.target/i386/avx512bw-pr100267-b-2.c: New test.
- * gcc.target/i386/avx512bw-pr100267-d-2.c: New test.
- * gcc.target/i386/avx512bw-pr100267-q-2.c: New test.
- * gcc.target/i386/avx512bw-pr100267-w-2.c: New test.
- * gcc.target/i386/avx512f-pr100267-1.c: New test.
- * gcc.target/i386/avx512f-pr100267-pd-2.c: New test.
- * gcc.target/i386/avx512f-pr100267-ps-2.c: New test.
- * gcc.target/i386/avx512vl-pr100267-1.c: New test.
- * gcc.target/i386/avx512vl-pr100267-pd-2.c: New test.
- * gcc.target/i386/avx512vl-pr100267-ps-2.c: New test.
- * gcc.target/i386/avx512vlbw-pr100267-1.c: New test.
- * gcc.target/i386/avx512vlbw-pr100267-b-2.c: New test.
- * gcc.target/i386/avx512vlbw-pr100267-d-2.c: New test.
- * gcc.target/i386/avx512vlbw-pr100267-q-2.c: New test.
- * gcc.target/i386/avx512vlbw-pr100267-w-2.c: New test.
-
-2021-06-22 liuhongt <hongtao.liu@intel.com>
-
- PR target/100310
- * gcc.target/i386/pr100310.c: New test.
-
-2021-06-21 Jason Merrill <jason@redhat.com>
-
- PR target/88529
- * g++.target/i386/empty-class1.C: New test.
-
-2021-06-21 Patrick Palka <ppalka@redhat.com>
-
- PR c++/67302
- * g++.dg/opt/nrv21.C: New test.
-
-2021-06-21 Patrick Palka <ppalka@redhat.com>
-
- PR c++/80431
- * g++.dg/cpp0x/nsdmi-virtual1a.C: New test.
-
-2021-06-21 Jakub Jelinek <jakub@redhat.com>
-
- PR inline-asm/100785
- * c-c++-common/pr100785.c: New test.
- * gcc.dg/pr48552-1.c: Don't expect invalid lvalue errors.
- * gcc.dg/pr48552-2.c: Likewise.
-
-2021-06-21 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
-
- PR target/97906
- * gcc.target/arm/simd/pr97906.c: New test.
-
-2021-06-21 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101121
- * gfortran.dg/pr101121.f: New testcase.
-
-2021-06-21 liuhongt <hongtao.liu@intel.com>
+ PR tree-optimization/104279
+ PR tree-optimization/104280
+ PR tree-optimization/104281
+ * gcc.dg/torture/pr104279.c: New test.
+ * gcc.dg/torture/pr104280.c: New test.
+ * gcc.dg/torture/pr104281.c: New test.
- PR target/101142
- * gcc.target/i386/spill_to_mask-1.c: Adjust testcase.
- * gcc.target/i386/spill_to_mask-2.c: Adjust testcase.
- * gcc.target/i386/spill_to_mask-3.c: Adjust testcase.
- * gcc.target/i386/spill_to_mask-4.c: Adjust testcase.
+2022-01-28 Navid Rahimi <navidrahimi@microsoft.com>
-2021-06-21 Roger Sayle <roger@nextmovesoftware.com>
+ * gcc.dg/tree-ssa/pr103514.c: Testcase for this optimization.
- PR target/11877
- * gcc.target/i386/pr11877.c: New test case.
-
-2021-06-18 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
-
- * gcc.target/powerpc/fusion-p10-2logical.c: Update pattern
- match counts.
- * gcc.target/powerpc/fusion-p10-addadd.c: Update pattern match
- counts.
- * gcc.target/powerpc/fusion-p10-ldcmpi.c: Update pattern match
- counts.
- * gcc.target/powerpc/fusion-p10-logadd.c: Update pattern match
- counts.
-
-2021-06-18 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/100283
- PR fortran/101123
- * gfortran.dg/min0_max0_1.f90: New test.
- * gfortran.dg/min0_max0_2.f90: New test.
-
-2021-06-18 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/symbolic-7.c: New test.
-
-2021-06-18 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
-
- PR target/100856
- * gcc.target/arm/acle/pr100856.c: New test.
- * gcc.target/arm/multilib.exp: Add tests for cde options.
-
-2021-06-18 Michael Meissner <meissner@linux.ibm.com>
-
- * gcc.target/powerpc/float128-minmax-2.c: New test.
-
-2021-06-17 Jason Merrill <jason@redhat.com>
+2022-01-28 Patrick Palka <ppalka@redhat.com>
+ Jason Merrill <jason@redhat.com>
- PR c++/101106
- * g++.dg/cpp0x/deleted15.C: New test.
+ PR c++/92752
+ * g++.dg/warn/Wignored-qualifiers2.C: New test.
-2021-06-17 H.J. Lu <hjl.tools@gmail.com>
+2022-01-28 Zhao Wei Liew <zhaoweiliew@gmail.com>
- PR target/100704
- * gcc.target/i386/pr100704-1.c: New test.
- * gcc.target/i386/pr100704-2.c: Likewise.
- * gcc.target/i386/pr100704-3.c: Likewise.
+ PR tree-optimization/95424
+ * gcc.dg/tree-ssa/divide-6.c: New file.
+ * gcc.dg/tree-ssa/divide-7.c: New file.
-2021-06-17 Uroš Bizjak <ubizjak@gmail.com>
+2022-01-28 Jakub Jelinek <jakub@redhat.com>
- PR target/97194
- * gcc.target/i386/sse4_1-vec-set-1.c: New test.
- * gcc.target/i386/sse4_1-vec-set-2.c: ditto.
+ PR tree-optimization/104263
+ * gcc.dg/pr104263.c: New test.
-2021-06-17 Aldy Hernandez <aldyh@redhat.com>
+2022-01-28 Allan McRae <allan@archlinux.org>
- * gcc.dg/pr100790.c: New test.
+ PR testsuite/70230
+ * gcc.dg/asan/use-after-scope-4.c (dg-options): Add
+ -fno-stack-protector.
+ * gcc.dg/stack-usage-1.c: Likewise
+ * gcc.dg/superblock.c: Likewise
+ * gcc.target/i386/avx-vzeroupper-17.c: Likewise
+ * gcc.target/i386/cleanup-1.c: Likewise
+ * gcc.target/i386/cleanup-2.c: Likewise
+ * gcc.target/i386/interrupt-redzone-1.c: Likewise
+ * gcc.target/i386/interrupt-redzone-2.c: Likewise
+ * gcc.target/i386/pr79793-1.c: Likewise
+ * gcc.target/i386/pr79793-2.c: Likewise
+ * gcc.target/i386/shrink_wrap_1.c: Likewise
+ * gcc.target/i386/stack-check-11.c: Likewise
+ * gcc.target/i386/stack-check-18.c: Likewise
+ * gcc.target/i386/stack-check-19.c: Likewise
+ * gcc.target/i386/stackalign/pr88483-1.c: Likewise
+ * gcc.target/i386/stackalign/pr88483-2.c: Likewise
+ * gcc.target/i386/sw-1.c: Likewise
-2021-06-17 Marius Hillenbrand <mhillen@linux.ibm.com>
+2022-01-28 Patrick Palka <ppalka@redhat.com>
- * gcc.target/s390/zvector/vec-doublee.c: New test.
- * gcc.target/s390/zvector/vec-floate.c: New test.
+ PR c++/103341
+ * g++.dg/cpp2a/concepts-class4.C: New test.
+ * g++.dg/cpp2a/concepts-var-templ2.C: New test.
-2021-06-17 Richard Biener <rguenther@suse.de>
+2022-01-28 Richard Biener <rguenther@suse.de>
- PR tree-optimization/54400
- * gcc.dg/vect/bb-slp-pr54400.c: New testcase.
+ PR tree-optimization/104263
+ * gcc.dg/tree-ssa/inline-13.c: New testcase.
-2021-06-16 Jason Merrill <jason@redhat.com>
+2022-01-28 Andre Vehreschild <vehre@gcc.gnu.org>
- PR c++/101078
- PR c++/91706
- * g++.dg/template/access39.C: New test.
+ PR fortran/103790
+ * gfortran.dg/coarray_collectives_18.f90: New test.
-2021-06-16 Harald Anlauf <anlauf@gmx.de>
+2022-01-28 Eric Botcazou <ebotcazou@adacore.com>
- PR fortran/95501
- PR fortran/95502
- * gfortran.dg/pr95502.f90: New test.
+ * gnat.dg/generic_comp.adb: New test.
-2021-06-16 Harald Anlauf <anlauf@gmx.de>
+2022-01-28 Andre Vehreschild <vehre@gcc.gnu.org>
Revert:
- 2021-06-16 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/95501
- PR fortran/95502
- * gfortran.dg/pr95502.f90: New test.
-
-2021-06-16 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/95501
- PR fortran/95502
- * gfortran.dg/pr95502.f90: New test.
-
-2021-06-16 Jason Merrill <jason@redhat.com>
-
- PR c++/100796
- PR preprocessor/96391
- * g++.dg/plugin/location-overflow-test-pr100796.c: New test.
- * g++.dg/plugin/plugin.exp: Run it.
-
-2021-06-16 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/narrow_zero_high_half.c: Add new tests.
-
-2021-06-16 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/narrow_zero_high_half.c: Add new tests.
-
-2021-06-16 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/narrow_zero_high_half.c: Add new tests.
-
-2021-06-16 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/narrow_zero_high_half.c: Add new tests.
-
-2021-06-16 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/narrow_zero_high_half.c: New test.
-
-2021-06-16 Martin Jambor <mjambor@suse.cz>
-
- PR tree-optimization/100453
- * gcc.dg/tree-ssa/pr100453.c: New test.
+ 2022-01-28 Andre Vehreschild <vehre@gcc.gnu.org>
-2021-06-16 Jakub Jelinek <jakub@redhat.com>
+ PR fortran/103790
+ * gfortran.dg/coarray_collectives_18.f90: New test.
- * gcc.dg/guality/pr49888.c (f): Use noipa attribute instead of
- noinline, noclone.
+2022-01-28 Andre Vehreschild <vehre@gcc.gnu.org>
-2021-06-16 Jakub Jelinek <jakub@redhat.com>
+ PR fortran/103790
+ * gfortran.dg/coarray_collectives_18.f90: New test.
- PR middle-end/101062
- * gcc.dg/pr101062.c: New test.
+2022-01-28 Jason Merrill <jason@redhat.com>
-2021-06-16 Richard Biener <rguenther@suse.de>
+ PR c++/100198
+ PR c++/100030
+ PR c++/100282
+ * g++.dg/cpp0x/lambda/lambda-variadic13.C: Accept the sorry
+ as well as the correct error.
+ * g++.dg/cpp0x/lambda/lambda-variadic14.C: Likewise.
+ * g++.dg/cpp0x/lambda/lambda-variadic14a.C: New test.
+ * g++.dg/cpp0x/lambda/lambda-variadic15.C: New test.
+ * g++.dg/cpp0x/lambda/lambda-variadic16.C: New test.
- PR tree-optimization/101088
- * gcc.dg/torture/pr101088.c: New testcase.
+2022-01-27 David Malcolm <dmalcolm@redhat.com>
-2021-06-16 Roger Sayle <roger@nextmovesoftware.com>
-
- PR rtl-optimization/46235
- * gcc.target/i386/bt-5.c: New test.
- * gcc.target/i386/bt-6.c: New test.
- * gcc.target/i386/bt-7.c: New test.
-
-2021-06-16 Arnaud Charlet <charlet@adacore.com>
-
- * gnat.dg/limited4.adb: Disable illegal code.
-
-2021-06-16 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101083
- * gcc.dg/vect/pr97832-4.c: New testcase.
-
-2021-06-15 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/92568
- * gfortran.dg/gomp/pr99928-1.f90: Uncomment 'defaultmap(none)'.
- * gfortran.dg/gomp/pr99928-2.f90: Uncomment 'defaultmap(none)'.
- * gfortran.dg/gomp/pr99928-3.f90: Uncomment 'defaultmap(none)'.
- * gfortran.dg/gomp/pr99928-4.f90: Uncomment 'defaultmap(none)'.
- * gfortran.dg/gomp/pr99928-5.f90: Uncomment 'defaultmap(none)'.
- * gfortran.dg/gomp/pr99928-6.f90: Uncomment 'defaultmap(none)'.
- * gfortran.dg/gomp/pr99928-8.f90: Uncomment 'defaultmap(none)'.
- * gfortran.dg/gomp/defaultmap-1.f90: New test.
- * gfortran.dg/gomp/defaultmap-2.f90: New test.
- * gfortran.dg/gomp/defaultmap-3.f90: New test.
- * gfortran.dg/gomp/defaultmap-4.f90: New test.
- * gfortran.dg/gomp/defaultmap-5.f90: New test.
- * gfortran.dg/gomp/defaultmap-6.f90: New test.
- * gfortran.dg/gomp/defaultmap-7.f90: New test.
-
-2021-06-15 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/analyzer-decls.h (__analyzer_dump_capacity): New decl.
- * gcc.dg/analyzer/capacity-1.c: New test.
- * gcc.dg/analyzer/capacity-2.c: New test.
- * gcc.dg/analyzer/capacity-3.c: New test.
-
-2021-06-15 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/101068
- * gcc.dg/analyzer/explode-2a.c: New test.
-
-2021-06-15 Jakub Jelinek <jakub@redhat.com>
-
- PR target/101046
- * gcc.target/i386/pr101046.c: New test.
-
-2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
-
- * c-c++-common/Wattributes.c: Remove s390-specific check and add
- new tests.
- * gcc.dg/Wattributes-6.c: Likewise.
-
-2021-06-15 Xionghu Luo <luoxhu@linux.ibm.com>
-
- PR target/101020
- * gcc.target/powerpc/float128-call.c: Adjust counts for be and le.
-
-2021-06-14 Martin Sebor <msebor@redhat.com>
-
- PR c++/100876
- * g++.dg/warn/Wmismatched-new-delete-4.C: New test.
- * g++.dg/warn/Wmismatched-new-delete-5.C: New test.
- * g++.dg/warn/Wstringop-overflow-7.C: New test.
- * g++.dg/warn/Wfree-nonheap-object-6.C: New test.
- * g++.dg/analyzer/placement-new.C: Prune out expected warning.
-
-2021-06-14 Peter Bergner <bergner@linux.ibm.com>
-
- PR target/100777
- * gcc.target/powerpc/pr100777.c: New test.
-
-2021-06-14 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/101058
- * gcc.target/i386/pr101058.c: New test.
-
-2021-06-14 Jonathan Wakely <jwakely@redhat.com>
-
- PR c++/101052
- * g++.dg/spellcheck-stdlib.C: Add checks for <cstdlib> names.
- * gcc.dg/spellcheck-stdlib.c: Likewise.
-
-2021-06-14 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/mve-vclz.c: Update expected results.
- * gcc.target/arm/simd/mve-vshl.c: Likewise.
- * gcc.target/arm/simd/mve-vec-pack.c: New test.
- * gcc.target/arm/simd/mve-vec-unpack.c: New test.
-
-2021-06-14 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100934
- * gcc.dg/torture/pr100934.c: New testcase.
-
-2021-06-14 Aaron Sawdey <acsawdey@linux.ibm.com>
-
- * gcc.dg/sms-1.c: Remove scan-rtl-dump-times check.
- * gcc.dg/sms-2.c: Remove scan-rtl-dump-times check.
- * gcc.dg/sms-3.c: Remove scan-rtl-dump-times check.
- * gcc.dg/sms-4.c: Remove scan-rtl-dump-times check.
- * gcc.dg/sms-6.c: Remove scan-rtl-dump-times check.
- * gcc.dg/sms-8.c: Remove scan-rtl-dump-times check.
- * gcc.dg/sms-10.c: Remove scan-rtl-dump-times check.
-
-2021-06-14 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101031
- * gcc.dg/torture/pr101031.c: New testcase.
-
-2021-06-13 Jason Merrill <jason@redhat.com>
-
- * gcc.dg/c2x-attr-maybe_unused-1.c: Expect no warnings.
-
-2021-06-13 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/101023
- * g++.target/i386/pr101023a.C: New test.
- * g++.target/i386/pr101023b.C: Likewise.
-
-2021-06-12 David Edelsohn <dje.gcc@gmail.com>
-
- * g++.dg/ext/builtin-shufflevector-2.C: Ignore psabi warning.
- * gcc.dg/uninit-pr93100.c: Skip on AIX.
- * gcc.target/powerpc/pr100085.c: Require int128 and float128.
-
-2021-06-12 Jason Merrill <jason@redhat.com>
-
- * g++.dg/ext/attrib62.C: No longer warn.
- * g++.dg/diagnostic/maybe_unused1.C: New test.
-
-2021-06-12 Jason Merrill <jason@redhat.com>
-
- PR c++/101029
- * g++.dg/ext/array4.C: New test.
-
-2021-06-11 Carl Love <cel@us.ibm.com>
-
- * gcc.target/powerpc/check-builtin-vec_rlnm-runnable.c
- (dg-require-effective-target): Change target to p9vector_hw.
-
-2021-06-11 Thomas Schwinge <thomas@codesourcery.com>
-
- * gcc.dg/gomp/simd-clones-2.c: Enhance.
-
-2021-06-11 Patrick Palka <ppalka@redhat.com>
-
- DR 1227
- PR c++/96560
- * g++.dg/template/sfinae-dr1227.C: New test.
-
-2021-06-11 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
-
- PR target/101016
- * gcc.target/arm/mve/intrinsics/pr101016.c: New test.
-
-2021-06-11 Roger Sayle <roger@nextmovesoftware.com>
-
- PR tree-optimization/96392
- * gcc.dg/pr96392.c: New test.
-
-2021-06-11 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101025
- * gcc.dg/torture/pr101025.c: New testcase.
-
-2021-06-11 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
-
- PR target/99939
- * gcc.target/arm/cmse/cmse-18.c: Add separate scan-assembler
- directives check for target is v8.1-m.main+mve or not before
- comparing the assembly output.
- * gcc.target/arm/cmse/cmse-20.c: New test.
-
-2021-06-11 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/100974
- * g++.dg/cpp23/consteval-if1.C: New test.
- * g++.dg/cpp23/consteval-if2.C: New test.
- * g++.dg/cpp23/consteval-if3.C: New test.
- * g++.dg/cpp23/consteval-if4.C: New test.
- * g++.dg/cpp23/consteval-if5.C: New test.
- * g++.dg/cpp23/consteval-if6.C: New test.
- * g++.dg/cpp23/consteval-if7.C: New test.
- * g++.dg/cpp23/consteval-if8.C: New test.
- * g++.dg/cpp23/consteval-if9.C: New test.
- * g++.dg/cpp23/consteval-if10.C: New test.
- * g++.dg/cpp23/feat-cxx2b.C: Add __cpp_if_consteval tests.
-
-2021-06-11 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c: Update
- expected number of enodes after the loop.
- * gcc.dg/analyzer/paths-8.c: New test.
-
-2021-06-11 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101028
- * gcc.dg/pr101028.c: New testcase.
-
-2021-06-11 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/101026
- * gfortran.dg/pr101026.f: New testcase.
-
-2021-06-11 Jakub Jelinek <jakub@redhat.com>
-
- PR rtl-optimization/101008
- * gcc.dg/pr101008.c: New test.
-
-2021-06-11 Jakub Jelinek <jakub@redhat.com>
-
- PR target/101007
- * gcc.target/i386/sse-pr101007.c: New test.
-
-2021-06-11 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/101021
- * gcc.target/i386/pr101021-1.c: New test.
- * gcc.target/i386/pr101021-2.c: Ditto.
-
-2021-06-11 Martin Liska <mliska@suse.cz>
-
- PR gcov-profile/100788
- * gcc.dg/pr100788.c: New test.
-
-2021-06-11 Richard Biener <rguenther@suse.de>
-
- PR middle-end/101009
- * gcc.dg/torture/pr101009.c: New testcase.
-
-2021-06-11 Kewen Lin <linkw@linux.ibm.com>
-
- * gcc.target/powerpc/p9-fpcvt-3.c: New test.
-
-2021-06-11 Marek Polacek <polacek@redhat.com>
-
- PR c++/100995
- * g++.dg/cpp2a/is-constant-evaluated9.C: Add dg-warning.
- * g++.dg/cpp2a/is-constant-evaluated12.C: New test.
-
-2021-06-10 Patrick Palka <ppalka@redhat.com>
-
- PR c++/67829
- * g++.dg/template/ttp34.C: New test.
- * g++.dg/template/ttp34a.C: New test.
- * g++.dg/template/ttp34b.C: New test.
-
-2021-06-10 Patrick Palka <ppalka@redhat.com>
-
- PR c++/100946
- * g++.dg/cpp2a/concepts-return-req3.C: New test.
-
-2021-06-10 Peter Bergner <bergner@linux.ibm.com>
-
- * gcc.target/powerpc/mma-builtin-4.c (__builtin_vsx_build_pair): Add
- tests. Update expected counts.
- * gcc.target/powerpc/mma-builtin-5.c (__builtin_mma_build_acc): Add
- tests. Update expected counts.
-
-2021-06-10 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR d/100967
- * gdc.dg/pr100967.d: New test.
-
-2021-06-10 Robin Dapp <rdapp@linux.ibm.com>
-
- * gcc.target/s390/vector/vcond-mixed-double.c: New test.
- * gcc.target/s390/vector/vcond-mixed-float.c: New test.
-
-2021-06-10 Robin Dapp <rdapp@linux.ibm.com>
-
- * gcc.dg/vect/pr56541.c: Fix target selector.
+ * gcc.dg/analyzer/data-model-1.c: Add dg-message directives for
+ expected region creation events.
+ * gcc.dg/analyzer/malloc-1.c: Likewise.
+ * gcc.dg/analyzer/memset-CVE-2017-18549-1.c: Likewise.
+ * gcc.dg/analyzer/pr101547.c: Likewise.
+ * gcc.dg/analyzer/pr101875.c: Likewise.
+ * gcc.dg/analyzer/pr101962.c: Likewise.
+ * gcc.dg/analyzer/pr104224.c: Likewise.
+ * gcc.dg/analyzer/pr94047.c: Likewise.
+ * gcc.dg/analyzer/symbolic-1.c: Likewise.
+ * gcc.dg/analyzer/uninit-1.c: Likewise.
+ * gcc.dg/analyzer/uninit-4.c: Likewise.
+ * gcc.dg/analyzer/uninit-alloca.c: New test.
+ * gcc.dg/analyzer/uninit-pr94713.c: Add dg-message directive for
+ expected region creation event.
+ * gcc.dg/analyzer/uninit-pr94714.c: Likewise.
+ * gcc.dg/analyzer/zlib-3.c: Likewise.
-2021-06-10 Andrew Stubbs <ams@codesourcery.com>
- Thomas Schwinge <thomas@codesourcery.com>
+2022-01-27 Jason Merrill <jason@redhat.com>
- * c-c++-common/goacc-gomp/nesting-fail-1.c: Adjust patterns.
- * c-c++-common/goacc/finalize-1.c: Likewise.
- * c-c++-common/goacc/mdc-1.c: Likewise.
- * c-c++-common/goacc/nesting-fail-1.c: Likewise.
- * c-c++-common/goacc/struct-enter-exit-data-1.c: Likewise.
- * gfortran.dg/goacc/attach-descriptor.f90: Likewise.
- * gfortran.dg/goacc/finalize-1.f: Likewise.
- * gfortran.dg/goacc/mapping-tests-3.f90: Likewise.
+ PR c++/104245
+ PR c++/51344
+ * g++.dg/lto/alignas1_0.C: New test.
-2021-06-10 Thomas Schwinge <thomas@codesourcery.com>
+2022-01-27 Uroš Bizjak <ubizjak@gmail.com>
- * c-c++-common/goacc/mdc-1.c: Fix '#pragma acc acc [...]' typo.
- * c-c++-common/goacc/mdc-2.c: Likewise.
- * g++.dg/goacc/mdc.C: Likewise.
+ * gfortran.dg/ieee/signaling_1.f90 (dg-do):
+ Run only on non-ia32 targets.
+ * gfortran.dg/ieee/signaling_2.f90 (dg-do): Ditto.
+ * gfortran.dg/ieee/signaling_3.f90 (dg-do): Ditto.
-2021-06-10 Jakub Jelinek <jakub@redhat.com>
+2022-01-27 Harald Anlauf <anlauf@gmx.de>
- * g++.dg/cpp2a/feat-cxx2a.C: Uncomment __cpp_consteval test.
- * g++.dg/cpp23/feat-cxx2b.C: Likewise.
+ PR fortran/104128
+ * gfortran.dg/transfer_simplify_14.f90: New test.
-2021-06-10 Jakub Jelinek <jakub@redhat.com>
+2022-01-27 Patrick Palka <ppalka@redhat.com>
- PR debug/100852
- * g++.dg/opt/pr100852.C: New test.
+ PR c++/82632
+ * g++.dg/cpp1z/class-deduction104.C: New test.
+ * g++.dg/cpp1z/class-deduction105.C: New test.
-2021-06-09 Andrew Pinski <apinski@marvell.com>
+2022-01-27 Harald Anlauf <anlauf@gmx.de>
- * g++.dg/torture/pr100925.C: New test.
+ PR fortran/84784
+ * gfortran.dg/pr84784.f90: New test.
-2021-06-09 Carl Love <cel@us.ibm.com>
+2022-01-27 Patrick Palka <ppalka@redhat.com>
- * gcc.target/powerpc/int_128bit-runnable.c (extsd2q): Update expected
- count.
- Add tests for vec_signextq.
- * gcc.target/powerpc/p9-sign_extend-runnable.c: New test case.
+ PR c++/99895
+ * g++.dg/cpp2a/consteval-memfn1.C: New test.
+ * g++.dg/cpp2a/consteval-memfn2.C: New test.
+ * g++.dg/cpp2a/consteval28.C: New test.
-2021-06-09 Carl Love <cel@us.ibm.com>
+2022-01-27 Patrick Palka <ppalka@redhat.com>
- * gcc.target/powerpc/fp128_conversions.c: New file.
- * gcc.target/powerpc/int_128bit-runnable.c(vextsd2q,
- vcmpuq, vcmpsq, vcmpequq, vcmpequq., vcmpgtsq, vcmpgtsq.
- vcmpgtuq, vcmpgtuq.): Update scan-assembler-times.
- (ppc_native_128bit): Remove dg-require-effective-target.
+ PR c++/92944
+ PR c++/103678
+ * g++.dg/cpp2a/concepts-partial-spec10.C: New test.
+ * g++.dg/cpp2a/concepts-partial-spec11.C: New test.
-2021-06-09 Carl Love <cel@us.ibm.com>
+2022-01-27 Marek Polacek <polacek@redhat.com>
- * gcc.target/powerpc/int_128bit-runnable.c: Add shift_right, shift_left
- tests.
+ PR c++/101988
+ * g++.dg/cpp1z/class-deduction-new1.C: New test.
+ * g++.dg/cpp23/auto-array2.C: New test.
-2021-06-09 Carl Love <cel@us.ibm.com>
+2022-01-27 Kewen Lin <linkw@linux.ibm.com>
- * gcc.target/powerpc/int_128bit-runnable.c: Add 128-bit DFP
- conversion tests.
+ PR target/103702
+ * gcc.target/powerpc/pr103702.c: New test.
-2021-06-09 Carl Love <cel@us.ibm.com>
+2022-01-27 Chung-Lin Tang <cltang@codesourcery.com>
- * gcc.target/powerpc/int_128bit-runnable.c: New test file.
+ PR middle-end/103642
+ * c-c++-common/gomp/pr103642.c: New test.
-2021-06-09 Carl Love <cel@us.ibm.com>
+2022-01-27 Andrew Pinski <apinski@marvell.com>
- * gcc.target/powerpc/check-builtin-vec_rlnm-runnable.c:
- New runnable test case.
- * gcc.target/powerpc/vec-rlmi-rlnm.c: Update scan assembler times
- for xxlor instruction.
+ PR target/104201
+ * gcc.target/aarch64/branch-protection-attr.c: Fix quoting for
+ the expected error message on line 5 of leaf.
-2021-06-09 Christophe Lyon <christophe.lyon@linaro.org>
+2022-01-27 Jakub Jelinek <jakub@redhat.com>
- * gcc.target/arm/simd/mve-vclz.c: New test.
+ PR tree-optimization/104196
+ * gcc.c-torture/execute/pr104196.c: New test.
-2021-06-09 Christophe Lyon <christophe.lyon@linaro.org>
+2022-01-26 Jakub Jelinek <jakub@redhat.com>
- * gcc.target/arm/simd/mve-vhadd-1.c: New test.
- * gcc.target/arm/simd/mve-vhadd-2.c: New test.
- * gcc.target/arm/simd/neon-vhadd-1.c: New test.
- * gcc.target/arm/simd/neon-vhadd-2.c: New test.
+ PR target/104239
+ * gcc.target/powerpc/pr104239-3.c: New test.
-2021-06-09 Roger Sayle <roger@nextmovesoftware.com>
+2022-01-26 Jakub Jelinek <jakub@redhat.com>
- * gcc.dg/builtins-70.c: New test.
+ PR target/104239
+ * gcc.target/powerpc/pr104239-1.c: New test.
+ * gcc.target/powerpc/pr104239-2.c: New test.
-2021-06-09 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
+2022-01-26 Jakub Jelinek <jakub@redhat.com>
- * gcc.target/powerpc/fusion-p10-2logical.c: Update fused insn
- counts to test 32 and 64 bit separately.
- * gcc.target/powerpc/fusion-p10-addadd.c: Update fused insn
- counts to test 32 and 64 bit separately.
- * gcc.target/powerpc/fusion-p10-ldcmpi.c: Update fused insn
- counts to test 32 and 64 bit separately.
- * gcc.target/powerpc/fusion-p10-logadd.c: Update fused insn
- counts to test 32 and 64 bit separately.
+ PR c++/104226
+ * g++.dg/cpp0x/constexpr-104226.C: New test.
-2021-06-09 Richard Biener <rguenther@suse.de>
+2022-01-26 Marek Polacek <polacek@redhat.com>
- PR tree-optimization/100981
- * gfortran.dg/vect/pr100981-1.f90: New testcase.
+ PR target/104213
+ * g++.dg/warn/Wuse-after-free2.C: New test.
+ * g++.dg/warn/Wuse-after-free3.C: New test.
-2021-06-09 Richard Biener <rguenther@suse.de>
+2022-01-26 Jason Merrill <jason@redhat.com>
- PR tree-optimization/97832
- * gcc.dg/vect/pr97832-1.c: New testcase.
- * gcc.dg/vect/pr97832-2.c: Likewise.
- * gcc.dg/vect/pr97832-3.c: Likewise.
- * g++.dg/vect/slp-pr98855.cc: XFAIL.
- * gcc.dg/vect/slp-50.c: New file.
+ PR c++/104235
+ * g++.dg/parse/template-keyword2.C: New test.
-2021-06-09 Jakub Jelinek <jakub@redhat.com>
+2022-01-26 Martin Liska <mliska@suse.cz>
- PR fortran/100965
- * gfortran.dg/gomp/pr100965.f90: New test.
+ * gcc.dg/tree-ssa/modref-7.c: Update scanned patterns.
+ * gcc.dg/tree-ssa/modref-8.c: Likewise.
-2021-06-09 Uroš Bizjak <ubizjak@gmail.com>
+2022-01-26 David Malcolm <dmalcolm@redhat.com>
- PR target/100936
- * gcc.target/i386/pr100936.c: New test.
+ PR analyzer/104224
+ * gcc.dg/analyzer/pr104224.c: New test.
-2021-06-09 Xionghu Luo <luoxhu@linux.ibm.com>
+2022-01-26 Jakub Jelinek <jakub@redhat.com>
- * gcc.target/powerpc/float128-call.c: Adjust.
- * gcc.target/powerpc/pr100085.c: New test.
+ PR target/104188
+ * gcc.target/i386/pr104188.c: Add dg-require-effective-target
+ sse2_runtime. Add -msse2 to dg-options.
-2021-06-09 Jason Merrill <jason@redhat.com>
+2022-01-26 Jason Merrill <jason@redhat.com>
- PR c++/100879
- * g++.dg/diagnostic/enum3.C: New test.
+ PR c++/103057
+ * g++.dg/cpp0x/alias-decl-void1.C: New test.
-2021-06-08 Marek Polacek <polacek@redhat.com>
+2022-01-25 Harald Anlauf <anlauf@gmx.de>
- PR c++/100065
- * g++.dg/cpp2a/explicit18.C: New test.
+ PR fortran/104227
+ * gfortran.dg/transfer_check_6.f90: New test.
-2021-06-08 Andrew Pinski <apinski@marvell.com>
+2022-01-25 Harald Anlauf <anlauf@gmx.de>
- * gcc.dg/tree-ssa/pr96928-1.c: Fix testcase for now that ~
- happens on the outside of the bit_xor.
+ PR fortran/104212
+ * gfortran.dg/argument_checking_26.f90: New test.
-2021-06-08 Jason Merrill <jason@redhat.com>
+2022-01-25 Patrick Palka <ppalka@redhat.com>
- * g++.dg/cpp0x/pr60209-neg.C: Update diagnostic.
- * g++.dg/diagnostic/string-literal-concat.C: Likewise.
- * g++.dg/ext/utf-badconcat.C: Likewise.
- * g++.dg/ext/utf-badconcat2.C: Likewise.
+ PR c++/101532
+ PR c++/104225
+ * g++.dg/cpp0x/nsdmi-template21.C: New test.
+ * g++.dg/cpp0x/nsdmi-template21a.C: New test.
-2021-06-08 Jason Merrill <jason@redhat.com>
+2022-01-25 Jason Merrill <jason@redhat.com>
- * g++.dg/cpp23/mixed-concat1.C: New test.
+ PR c++/59950
+ * g++.dg/init/assign2.C: New test.
-2021-06-08 Jason Merrill <jason@redhat.com>
+2022-01-25 Richard Biener <rguenther@suse.de>
- * g++.dg/cpp23/whitespace-splice1.C: New test.
+ PR tree-optimization/104214
+ * gcc.dg/vect/pr81196-2.c: New variant testcase only
+ requiring vect_int.
-2021-06-08 Jason Merrill <jason@redhat.com>
+2022-01-25 Francois-Xavier Coudert <fxcoudert@gmail.com>
- * g++.dg/cpp23/narrowing-bool1.C: New test.
+ * gfortran.dg/ieee/signaling_3.f90: Skip test on 32-bit x86/x86_64.
-2021-06-08 David Malcolm <dmalcolm@redhat.com>
+2022-01-25 Francois-Xavier Coudert <fxcoudert@gmail.com>
- PR analyzer/99212
- * gcc.dg/analyzer/bitfields-1.c: New test.
- * gcc.dg/analyzer/data-model-1.c (struct sbits): Make bitfields
- explicitly signed.
- (test_44): Update test values assigned to the bits to ones that
- fit in the range of the bitfield type. Remove xfails.
- (test_45): Remove xfails.
+ * gfortran.dg/ieee/signaling_1.f90: Fix test.
-2021-06-08 Jason Merrill <jason@redhat.com>
+2022-01-24 Marek Polacek <polacek@redhat.com>
- PR c++/100963
- * g++.dg/cpp0x/initlist124.C: New test.
+ PR preprocessor/104030
+ * c-c++-common/Wbidi-chars-10.c: Turn on UCN checking.
+ * c-c++-common/Wbidi-chars-11.c: Likewise.
+ * c-c++-common/Wbidi-chars-14.c: Likewise.
+ * c-c++-common/Wbidi-chars-16.c: Likewise.
+ * c-c++-common/Wbidi-chars-17.c: Likewise.
+ * c-c++-common/Wbidi-chars-4.c: Likewise.
+ * c-c++-common/Wbidi-chars-5.c: Likewise.
+ * c-c++-common/Wbidi-chars-6.c: Likewise.
+ * c-c++-common/Wbidi-chars-7.c: Likewise.
+ * c-c++-common/Wbidi-chars-8.c: Likewise.
+ * c-c++-common/Wbidi-chars-9.c: Likewise.
+ * c-c++-common/Wbidi-chars-ranges.c: Likewise.
+ * c-c++-common/Wbidi-chars-18.c: New test.
+ * c-c++-common/Wbidi-chars-19.c: New test.
+ * c-c++-common/Wbidi-chars-20.c: New test.
+ * c-c++-common/Wbidi-chars-21.c: New test.
+ * c-c++-common/Wbidi-chars-22.c: New test.
+ * c-c++-common/Wbidi-chars-23.c: New test.
-2021-06-08 Richard Biener <rguenther@suse.de>
+2022-01-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
- PR tree-optimization/100923
- * gcc.dg/torture/pr100923.c: New testcase.
+ * gfortran.dg/ieee/signaling_1.f90: Do not require issignaling.
+ * gfortran.dg/ieee/signaling_2.f90: Add comment.
+ * gfortran.dg/ieee/signaling_3.f90: New test.
-2021-06-08 Jakub Jelinek <jakub@redhat.com>
+2022-01-24 Raoni Fassina Firmino <raoni@linux.ibm.com>
- PR c++/100957
- * g++.dg/gomp/doacross-2.C: New test.
+ PR target/94193
+ * gcc.target/powerpc/builtin-feclearexcept-feraiseexcept-1.c: New test.
+ * gcc.target/powerpc/builtin-feclearexcept-feraiseexcept-2.c: New test.
+ * gcc.target/powerpc/builtin-fegetround.c: New test.
-2021-06-08 H.J. Lu <hjl.tools@gmail.com>
+2022-01-24 Patrick Palka <ppalka@redhat.com>
- PR middle-end/100951
- * gcc.target/i386/pr100951.c: New test.
+ PR c++/104173
+ * g++.dg/cpp0x/ref-qual21.C: New test.
-2021-06-08 Jakub Jelinek <jakub@redhat.com>
+2022-01-24 Richard Biener <rguenther@suse.de>
+ Jiufu Guo <guojiufu@linux.ibm.com>
- PR target/100887
- PR testsuite/100943
- * gcc.dg/pr100887.c: Add -Wno-psabi -w to dg-options.
+ PR tree-optimization/100740
+ PR tree-optimization/101508
+ PR tree-optimization/101972
+ PR tree-optimization/102131
+ * gcc.dg/torture/pr100740.c: New testcase.
+ * gcc.dg/torture/pr101508.c: Likewise.
+ * gcc.dg/torture/pr101972.c: Likewise.
+ * gcc.dg/torture/pr102131-1.c: Likewise.
+ * gcc.dg/torture/pr102131-2.c: Likewise.
+ * gcc.dg/torture/pr102131-3.c: Likewise.
+ * gcc.dg/torture/pr102131-4.c: Likewise.
-2021-06-08 Tobias Burnus <tobias@codesourcery.com>
+2022-01-24 Jakub Jelinek <jakub@redhat.com>
- PR middle-end/99928
- * gfortran.dg/gomp/openmp-simd-6.f90: Update scan-tree-dump.
- * gfortran.dg/gomp/scan-5.f90: Likewise.
- * gfortran.dg/gomp/loop-1.f90: Likewise; remove xfail.
- * gfortran.dg/gomp/pr99928-1.f90: Remove xfail.
- * gfortran.dg/gomp/pr99928-2.f90: Likewise.
- * gfortran.dg/gomp/pr99928-3.f90: Likewise.
- * gfortran.dg/gomp/pr99928-8.f90: Likewise.
+ PR sanitizer/104158
+ * gcc.dg/sancov/pr104158-7.c: Adjust for repeating of arguments
+ being allowed.
-2021-06-08 Martin Liska <mliska@suse.cz>
+2022-01-24 Jakub Jelinek <jakub@redhat.com>
- * gcc.dg/format/strfmon-1.c: Fix typo.
- * gfortran.dg/char4-subscript.f90: Likewise.
+ PR sanitizer/104158
+ * gcc.dg/spellcheck-options-24.c: New test.
+ * gcc.dg/sancov/pr104158-1.c: New test.
+ * gcc.dg/sancov/pr104158-2.c: New test.
+ * gcc.dg/sancov/pr104158-3.c: New test.
+ * gcc.dg/sancov/pr104158-4.c: New test.
+ * gcc.dg/sancov/pr104158-5.c: New test.
+ * gcc.dg/sancov/pr104158-6.c: New test.
+ * gcc.dg/sancov/pr104158-7.c: New test.
-2021-06-08 Kewen Lin <linkw@linux.ibm.com>
+2022-01-24 Kito Cheng <kito.cheng@sifive.com>
- PR tree-optimization/100794
- * gcc.dg/tree-ssa/pr100794.c: New test.
+ * gcc.target/riscv/attribute-19.c: Add -misa-spec=2.2
-2021-06-08 Jason Merrill <jason@redhat.com>
+2022-01-24 Jiufu Guo <guojiufu@linux.ibm.com>
- PR c++/91706
- * g++.dg/template/lookup17.C: New test.
+ PR tree-optimization/102087
+ * gcc.dg/pr102087_1.c: New test.
-2021-06-08 Jason Merrill <jason@redhat.com>
+2022-01-24 LiaoShihua <shihua@iscas.ac.cn>
- PR c++/100102
- * g++.dg/cpp0x/alias-decl-73.C: New test.
+ * gcc.target/riscv/arch-9.c: Update the check info.
+ * gcc.target/riscv/arch-10.c: Ditto.
+ * gcc.target/riscv/arch-12.c: Ditto.
-2021-06-07 Uroš Bizjak <ubizjak@gmail.com>
+2022-01-24 David Edelsohn <dje.gcc@gmail.com>
- PR target/100637
- * gcc.target/i386/pr100637-5b.c: New test.
- * gcc.target/i386/pr100637-5w.c: Ditto.
+ * gcc.dg/analyzer/torture/pr104159.c: Ignore psabi warning.
-2021-06-07 H.J. Lu <hjl.tools@gmail.com>
+2022-01-24 H.J. Lu <hjl.tools@gmail.com>
- PR target/82735
- * gcc.target/i386/pr82735-3.c: Don't compile for x32.
- * gcc.target/i386/pr82735-4.c: Likewise.
- * gcc.target/i386/pr82735-5.c: Likewise.
+ PR target/104188
+ * gcc.target/i386/pr104188.c: New test.
-2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
+2022-01-23 Will Wray <wjwray@gmail.com>
- * gcc.dg/sso-14.c: Adjust.
+ PR c++/55227
+ * g++.dg/cpp2a/desig21.C: New test.
-2021-06-07 Patrick Palka <ppalka@redhat.com>
+2022-01-23 Andrew Pinski <apinski@marvell.com>
- PR c++/100918
- * g++.dg/template/access38.C: New test.
+ PR target/64821
+ * gcc.target/aarch64/vsqrt-1.c: New test.
+ * gcc.target/aarch64/vsqrt-2.c: New test.
-2021-06-07 H.J. Lu <hjl.tools@gmail.com>
+2022-01-23 Jason Merrill <jason@redhat.com>
- PR target/100885
- * g++.target/i386/pr100885.C (_mm_set_epi64): Cast __m64 to long
- long.
+ PR c++/104182
+ * g++.dg/cpp0x/initlist127.C: New test.
-2021-06-07 Jakub Jelinek <jakub@redhat.com>
+2022-01-23 Jason Merrill <jason@redhat.com>
- PR target/100887
- * gcc.dg/pr100887.c: New test.
+ PR c++/101072
+ * g++.dg/cpp0x/constexpr-empty14a.C: New test.
-2021-06-07 Jakub Jelinek <jakub@redhat.com>
+2022-01-22 David Malcolm <dmalcolm@redhat.com>
- PR middle-end/100898
- * g++.dg/ext/va-arg-pack-3.C: New test.
+ PR analyzer/104150
+ * gcc.dg/analyzer/pr104089.c: Add "dg-add-options float16"
+ and "dg-require-effective-target float16" directives.
-2021-06-07 liuhongt <hongtao.liu@intel.com>
+2022-01-22 David Malcolm <dmalcolm@redhat.com>
- PR target/100885
- * g++.target/i386/pr100885.C: New test.
+ PR analyzer/104159
+ * gcc.dg/analyzer/torture/pr104159.c: New test.
-2021-06-07 liuhongt <hongtao.liu@intel.com>
+2022-01-22 Harald Anlauf <anlauf@gmx.de>
- PR target/82735
- * gcc.target/i386/pr82735-1.c: New test.
- * gcc.target/i386/pr82735-2.c: New test.
- * gcc.target/i386/pr82735-3.c: New test.
- * gcc.target/i386/pr82735-4.c: New test.
- * gcc.target/i386/pr82735-5.c: New test.
+ PR fortran/104127
+ * gfortran.dg/transfer_simplify_11.f90: Fix logic.
+ * gfortran.dg/transfer_simplify_13.f90: New test.
-2021-06-06 Jakub Jelinek <jakub@redhat.com>
+2022-01-22 Michael Meissner <meissner@the-meissners.org>
- * gcc.dg/gomp/scan-1.c: New test.
+ PR testsuite/103763
+ * gcc.target/powerpc/fold-vec-splat-floatdouble.c: Fix insn regex
+ on power10.
-2021-06-06 Jakub Jelinek <jakub@redhat.com>
+2022-01-21 Jakub Jelinek <jakub@redhat.com>
- PR c/100902
- * c-c++-common/gomp/pr100902-1.c: New test.
+ PR c++/104148
+ * c-c++-common/Wformat-pr104148.c: New test.
-2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
+2022-01-21 Jason Merrill <jason@redhat.com>
- * gcc.dg/sso-14.c: New test.
+ * g++.dg/template/explicit-args6.C: Add expected message.
-2021-06-05 José Rui Faustino de Sousa <jrfsousa@gmail.com>
+2022-01-21 Jason Merrill <jason@redhat.com>
- PR fortran/100120
- PR fortran/100816
- PR fortran/100818
- PR fortran/100819
- PR fortran/100821
- * gfortran.dg/PR100120.f90: New test.
- * gfortran.dg/character_workout_1.f90: New test.
- * gfortran.dg/character_workout_4.f90: New test.
+ PR c++/104084
+ PR c++/20040
+ * g++.dg/init/new50.C: New test.
-2021-06-04 Tobias Burnus <tobias@codesourcery.com>
+2022-01-21 Bill Schmidt <wschmidt@linux.ibm.com>
- PR middle-end/100905
- * gfortran.dg/gomp/loop-3.f90: New test.
+ * gcc.target/powerpc/builtins-4.c: Add two test variants. Adjust
+ assembler counts.
-2021-06-04 Iain Buclaw <ibuclaw@gdcproject.org>
+2022-01-21 Roger Sayle <roger@nextmovesoftware.com>
- PR d/100882
- * gdc.dg/pr100882a.d: New test.
- * gdc.dg/pr100882b.d: New test.
- * gdc.dg/pr100882c.d: New test.
- * gdc.dg/torture/pr100882.d: New test.
+ PR middle-end/104140
+ * gcc.target/riscv/pr104140.c: New test case.
-2021-06-04 Patrick Palka <ppalka@redhat.com>
+2022-01-21 Vladimir N. Makarov <vmakarov@redhat.com>
- PR c++/100893
- * g++.dg/template/param4.C: New test.
- * g++.dg/template/param5.C: New test.
- * g++.dg/cpp1z/nontype-auto19.C: New test.
- * g++.dg/cpp2a/concepts-decltype.C: Don't expect that the
- deduced type of a decltype(auto) NTTP has top-level cv-quals.
+ PR target/103676
+ * g++.target/arm/pr103676.C: New.
-2021-06-04 Patrick Palka <ppalka@redhat.com>
+2022-01-21 Marek Polacek <polacek@redhat.com>
- PR c++/100102
- * g++.dg/cpp0x/alias-decl-72.C: New test.
- * g++.dg/cpp0x/alias-decl-72a.C: New test.
+ PR c++/101715
+ * g++.dg/cpp0x/noexcept72.C: New test.
+ * g++.dg/cpp0x/noexcept73.C: New test.
-2021-06-04 Harald Anlauf <anlauf@gmx.de>
+2022-01-21 Jason Merrill <jason@redhat.com>
- PR fortran/99839
- * gfortran.dg/inline_matmul_25.f90: New test.
+ PR c++/104139
+ PR c++/103681
+ * g++.dg/abi/no_unique_address2.C: Adjust to detect this on x86-64.
-2021-06-04 Martin Sebor <msebor@redhat.com>
+2022-01-21 Richard Biener <rguenther@suse.de>
- PR c/100783
- * gcc.dg/nonnull-6.c: New test.
+ PR sanitizer/99673
+ * gcc.dg/asan/pr99673.c: New testcase.
-2021-06-04 Martin Sebor <msebor@redhat.com>
+2022-01-21 Ard Biesheuvel <ardb@kernel.org>
- PR middle-end/100732
- * gcc.dg/tree-ssa/builtin-snprintf-11.c: New test.
- * gcc.dg/tree-ssa/builtin-snprintf-12.c: New test.
- * gcc.dg/tree-ssa/builtin-sprintf-28.c: New test.
- * gcc.dg/tree-ssa/builtin-sprintf-29.c: New test.
- * gcc.dg/uninit-pr100732.c: New test.
+ * gcc.target/arm/stack-protector-7.c: New test.
+ * gcc.target/arm/stack-protector-8.c: New test.
-2021-06-04 Martin Sebor <msebor@redhat.com>
+2022-01-21 Richard Earnshaw <rearnsha@arm.com>
- * gcc.dg/Wvla-parameter-10.c: New test.
- * gcc.dg/Wvla-parameter-11.c: New test.
+ * gcc.target/aarch64/spellcheck_1.c: Adjust tests for new output.
+ * gcc.target/aarch64/spellcheck_2.c: Likewise.
+ * gcc.target/aarch64/spellcheck_3.c: Likewise.
+ * gcc.target/aarch64/spellcheck_7.c: Likewise.
-2021-06-04 Tobias Burnus <tobias@codesourcery.com>
+2022-01-21 Richard Biener <rguenther@suse.de>
- * gfortran.dg/goacc/omp-fixed.f: Re-add test item changed in previous
- commit in addition - add more dg-errors and '... end ...' due to changed
- parsing.
- * gfortran.dg/goacc/omp.f95: Likewise.
- * gfortran.dg/goacc-gomp/mixed-1.f: New test.
+ PR tree-optimization/104156
+ * gcc.dg/loop-unswitch-6.c: New testcase.
-2021-06-04 Uroš Bizjak <ubizjak@gmail.com>
+2022-01-21 Richard Biener <rguenther@suse.de>
- PR target/100637
- * gcc.dg/vect/slp-perm-9.c (dg-final): Adjust dumps for vect32 targets.
+ PR tree-optimization/104152
+ * gcc.dg/vect/pr104152.c: New testcase.
-2021-06-04 Tobias Burnus <tobias@codesourcery.com>
+2022-01-21 Aldy Hernandez <aldyh@redhat.com>
- * gfortran.dg/gomp/pr99928-5.f90: Really use the
- proper iteration variable.
+ * gcc.dg/pr103721-2.c: New test.
+ * gcc.dg/pr103721.c: New test.
-2021-06-04 Tobias Burnus <tobias@codesourcery.com>
+2022-01-21 Jakub Jelinek <jakub@redhat.com>
- * gfortran.dg/gomp/pr99928-1.f90: Add 'implicit none'.
- * gfortran.dg/gomp/pr99928-11.f90: Likewise.
- * gfortran.dg/gomp/pr99928-4.f90: Likewise.
- * gfortran.dg/gomp/pr99928-6.f90: Likewise.
- * gfortran.dg/gomp/pr99928-8.f90: Likewise.
- * gfortran.dg/gomp/pr99928-2.f90: Likewise. Add missing decl.
- * gfortran.dg/gomp/pr99928-5.f90: Add implicit none;
- fix loop-variable and remove xfail.
+ PR rtl-optimization/102478
+ * gcc.dg/pr102478.c: New test.
-2021-06-04 Tobias Burnus <tobias@codesourcery.com>
+2022-01-21 Jeff Law <jeffreyalaw@gmail.com>
- PR middle-end/99928
- * gfortran.dg/gomp/loop-2.f90: Update for typo fix.
+ * gcc.target/mips/fix-r4000-2.c: Update expected output.
+ * gcc.target/mips/fix-r4000-3.c: Update expected output. Add
+ -fexpensive-optimizations for consistency in output.
+ * gcc.target/mips/fix-r4000-7.c: Update expected output.
+ * gcc.target/mips/fix-r4000-8.c: Update expected output.
-2021-06-04 Tobias Burnus <tobias@codesourcery.com>
+2022-01-20 David Malcolm <dmalcolm@redhat.com>
- PR middle-end/99928
- * gfortran.dg/gomp/pr99928-3.f90: Add 'default(none)', following
- C/C++ version of the patch.
- * gfortran.dg/gomp/loop-1.f90: New test.
- * gfortran.dg/gomp/loop-2.f90: New test.
- * gfortran.dg/gomp/pr99928-1.f90: New test; based on C/C++ test.
- * gfortran.dg/gomp/pr99928-11.f90: Likewise.
- * gfortran.dg/gomp/pr99928-2.f90: Likewise.
- * gfortran.dg/gomp/pr99928-4.f90: Likewise.
- * gfortran.dg/gomp/pr99928-5.f90: Likewise.
- * gfortran.dg/gomp/pr99928-6.f90: Likewise.
- * gfortran.dg/gomp/pr99928-8.f90: Likewise.
- * gfortran.dg/goacc/omp.f95: Use 'acc kernels loops' instead
- of 'acc loops' to hide unrelated bug for now.
- * gfortran.dg/goacc/omp-fixed.f: Likewise
+ PR analyzer/94362
+ * gcc.dg/analyzer/pr94362-1.c: New test.
+ * gcc.dg/analyzer/pr94362-2.c: New test.
-2021-06-04 Jakub Jelinek <jakub@redhat.com>
+2022-01-20 David Malcolm <dmalcolm@redhat.com>
- PR target/100887
- * gcc.target/i386/pr100887.c: New test.
+ PR analyzer/103685
+ * gcc.dg/analyzer/torture/pr103685.c: New test.
-2021-06-04 Jakub Jelinek <jakub@redhat.com>
+2022-01-20 Sandra Loosemore <sandra@codesourcery.com>
- PR c++/100872
- * g++.dg/gomp/declare-simd-8.C: New test.
+ PR fortran/103695
+ PR fortran/102621
+ * gfortran.dg/gomp/affinity-clause-3.f90: Adjust pattern.
+ * gfortran.dg/gomp/pr102621.f90: New.
+ * gfortran.dg/gomp/pr103695.f90: New.
-2021-06-04 Haochen Gui <guihaoc@gcc.gnu.org>
+2022-01-20 Jason Merrill <jason@redhat.com>
- * gcc.target/powerpc/not-promote-mode.c: New.
+ PR c++/101405
+ * g++.dg/cpp2a/desig20.C: New test.
-2021-06-03 Uroš Bizjak <ubizjak@gmail.com>
+2022-01-20 Marek Polacek <polacek@redhat.com>
- PR target/100637
- * gcc.target/i386/vperm-v2hi.c: New test.
- * gcc.target/i386/vperm-v4qi.c: Ditto.
+ PR c++/102338
+ * g++.dg/cpp1y/noexcept2.C: New test.
-2021-06-03 Aldy Hernandez <aldyh@redhat.com>
+2022-01-20 Patrick Palka <ppalka@redhat.com>
- * gcc.dg/pr80776-1.c: XFAIL and document the reason why.
+ PR c++/103631
+ * g++.dg/cpp2a/nontype-class51.C: New test.
-2021-06-03 Patrick Palka <ppalka@redhat.com>
+2022-01-20 Richard Biener <rguenther@suse.de>
- PR c++/100592
- * g++.dg/cpp0x/alias-decl-71.C: New test.
+ PR middle-end/100786
+ * gcc.dg/torture/pr100786.c: New testcase.
-2021-06-03 Patrick Palka <ppalka@redhat.com>
+2022-01-20 Richard Earnshaw <rearnsha@arm.com>
- PR c++/100862
- * g++.dg/cpp2a/using-enum-9.C: New test.
+ PR target/102517
+ * gcc.target/aarch64/cpymem-q-reg_1.c: Allow ld1 and st1 for the
+ memcpy expansion.
-2021-06-03 Andre Vieira <andre.simoesdiasvieira@arm.com>
+2022-01-20 Patrick Palka <ppalka@redhat.com>
- * gcc.target/aarch64/sve/part_vect_single_iter_epilog.c: New test.
+ PR c++/91911
+ PR c++/103672
+ * g++.dg/cpp1z/class-deduction101.C: New test.
+ * g++.dg/cpp1z/class-deduction101a.C: New test.
+ * g++.dg/cpp1z/class-deduction101b.C: New test.
+ * g++.dg/cpp1z/class-deduction102.C: New test.
+ * g++.dg/cpp1z/class-deduction102a.C: New test.
+ * g++.dg/cpp1z/class-deduction102b.C: New test.
+ * g++.dg/cpp1z/class-deduction103.C: New test.
-2021-06-03 Christophe Lyon <christophe.lyon@linaro.org>
+2022-01-20 Patrick Palka <ppalka@redhat.com>
- * gcc.target/arm/simd/mve-vabs.c: New test.
+ * g++.dg/other/pr88187.C: Adjust expected C++17 diagnostic.
-2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
+2022-01-20 Richard Earnshaw <rearnsha@arm.com>
- * gnat.dg/bit_packed_array6.adb: New test.
- * gnat.dg/bit_packed_array6_pkg.ads: New helper.
+ * gcc.target/arm/crypto-vaese-erratum1.c: New test.
-2021-06-03 Martin Liska <mliska@suse.cz>
+2022-01-20 Jakub Jelinek <jakub@redhat.com>
- * gcc.dg/spellcheck-options-23.c: New test.
+ PR debug/103874
+ * gcc.dg/debug/dwarf2/pr103874.c: New test.
-2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
+2022-01-20 Jakub Jelinek <jakub@redhat.com>
- * gnat.dg/inline22.adb: New test.
+ * g++.dg/opt/pr47639.C: Add -Wno-psabi to dg-options.
-2021-06-03 Tamar Christina <tamar.christina@arm.com>
+2022-01-20 liuhongt <hongtao.liu@intel.com>
- * gcc.target/aarch64/cpunative/info_16: Update implementer.
- * gcc.target/aarch64/cpunative/info_17: Likewise
+ * gcc.target/i386/mask-pack-prefer128.c: New test.
+ * gcc.target/i386/mask-pack-prefer256.c: New test.
+ * gcc.target/i386/pr103771.c: New test.
-2021-06-03 Jakub Jelinek <jakub@redhat.com>
+2022-01-20 Jason Merrill <jason@redhat.com>
- PR c++/100859
- * g++.dg/gomp/depend-iterator-3.C: New test.
- * g++.dg/gomp/this-1.C: Don't expect any diagnostics for
- this as base expression of depend array section, expect a different
- error wording for this as depend locator and add testcases
- for affinity clauses.
+ PR c++/102300
+ * g++.dg/parse/no-typename1.C: Remove expected error.
+ * g++.dg/template/nested7.C: New test.
-2021-06-02 Jason Merrill <jason@redhat.com>
+2022-01-20 David Edelsohn <dje.gcc@gmail.com>
- PR c++/100838
- * g++.dg/init/no-elide2.C: New test.
+ * gcc.target/powerpc/sldoi_to_mov.c: Require VSX.
-2021-06-02 Ilya Leoshkevich <iii@linux.ibm.com>
+2022-01-19 Robin Dapp <rdapp@linux.ibm.com>
- * gcc.target/s390/ashr.c: New test.
+ * gcc.dg/ifcvt-4.c: Remove s390-specific check.
+ * gcc.target/s390/ifcvt-two-insns-bool.c: New test.
+ * gcc.target/s390/ifcvt-two-insns-int.c: New test.
+ * gcc.target/s390/ifcvt-two-insns-long.c: New test.
-2021-06-02 Tobias Burnus <tobias@codesourcery.com>
+2022-01-19 Jakub Jelinek <jakub@redhat.com>
- PR middle-end/99928
- * gfortran.dg/gomp/taskloop-2.f90: New.
+ PR middle-end/102860
+ * gfortran.dg/pr102860.f90: New test.
-2021-06-02 Jakub Jelinek <jakub@redhat.com>
+2022-01-19 Jakub Jelinek <jakub@redhat.com>
- * g++.dg/ext/builtin-shufflevector-1.C: Add -Wno-psabi -w to
- dg-options.
+ PR c/104115
+ * gcc.dg/tree-ssa/evrp-trans2.c: New test.
-2021-06-01 Patrick Palka <ppalka@redhat.com>
+2022-01-19 Richard Biener <rguenther@suse.de>
- PR c++/65816
- * g++.dg/cpp0x/constexpr-delegating3.C: New test.
- * g++.dg/cpp0x/dc10.C: New test.
- * g++.dg/cpp0x/initlist-base4.C: New test.
- * g++.dg/cpp2a/constexpr-init22.C: New test.
+ PR tree-optimization/104112
+ * gcc.dg/vect/pr104112-1.c: New testcase.
+ * gcc.dg/vect/pr104112-2.c: New testcase.
-2021-06-01 Andrew Pinski <apinski@marvell.com>
+2022-01-19 Martin Liska <mliska@suse.cz>
- PR tree-optimization/95481
- * gcc.dg/tree-ssa/tailcall-10.c: New test.
- * gcc.dg/tree-ssa/tailcall-11.c: New test.
- * gcc.dg/tree-ssa/tailcall-12.c: New test.
- * gcc.dg/tree-ssa/tailcall-13.c: New test.
- * gcc.dg/tree-ssa/tailrecursion-8.c: New test.
+ * g++.dg/ext/boolcomplex-1.c: Moved to...
+ * g++.dg/ext/boolcomplex-1.C: ...here.
+ * g++.dg/opt/pr47639.c: Moved to...
+ * g++.dg/opt/pr47639.C: ...here.
+ * g++.dg/pr83979.c: Moved to...
+ * g++.dg/pr83979.C: ...here.
+ * g++.dg/tm/asm-1.c: Moved to...
+ * g++.dg/tm/asm-1.C: ...here.
+ * g++.dg/vect/pr71483.c: Moved to...
+ * g++.dg/vect/pr71483.cc: ...here.
-2021-06-01 Bill Schmidt <wschmidt@linux.ibm.com>
+2022-01-19 Jakub Jelinek <jakub@redhat.com>
- PR testsuite/100750
- * gcc.target/powerpc/rop-5.c: Require ELFv2 ABI.
+ PR c++/89074
+ * gcc.dg/tree-ssa/pr89074.c: New test.
-2021-06-01 Jason Merrill <jason@redhat.com>
+2022-01-19 Richard Biener <rguenther@suse.de>
- PR c++/91859
- * g++.dg/cpp2a/destroying-delete5.C: New test.
+ PR testsuite/102833
+ * gcc.dg/vect/bb-slp-17.c: Require vect64.
-2021-06-01 Jason Merrill <jason@redhat.com>
+2022-01-19 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
- PR c++/94492
- * g++.dg/cpp0x/depr-copy4.C: New test.
+ PR testsuite/104021
+ * gcc.dg/vect/tsvc/tsvc.h: Do not include malloc.h on dragonfly
+ and use posix_memalign ().
-2021-06-01 Aldy Hernandez <aldyh@redhat.com>
+2022-01-19 Rimvydas Jasinskas <rimvydas.jas@gmail.com>
- * gcc.dg/Wstringop-overflow-55.c: Adjust for global ranges changes.
- * gcc.dg/pr80776-1.c: Same.
+ PR testsuite/104022
+ * g++.dg/gcov/pr16855.C: xfail the count lines for DTORs on dragonfly.
+ * g++.dg/gcov/pr16855-priority.C: Ditto. Adjust source layout so that
+ dejagnu xfail expressions work.
-2021-06-01 Tobias Burnus <tobias@codesourcery.com>
+2022-01-19 Martin Liska <mliska@suse.cz>
- PR middle-end/99928
- * gfortran.dg/gomp/reduction5.f90: Remove dg-error; the issue is
- now diagnosed with less error output.
- * gfortran.dg/gomp/scan-1.f90: Likewise.
- * gfortran.dg/gomp/pr99928-3.f90: New test.
- * gfortran.dg/gomp/taskloop-1.f90: New test.
+ PR testsuite/104109
+ * lib/gcov.exp: Fix pytest detection unsupported message.
-2021-06-01 liuhongt <hongtao.liu@intel.com>
+2022-01-19 Kewen Lin <linkw@linux.ibm.com>
- PR tree-optimization/98365
- * gcc.target/i386/pr98365.c: New test.
+ PR tree-optimization/104015
+ * gcc.dg/vect/slp-perm-9.c: Adjust.
+ * gcc.target/powerpc/pr104015-1.c: New test.
+ * gcc.target/powerpc/pr104015-2.c: New test.
-2021-06-01 Andrew MacLeod <amacleod@redhat.com>
+2022-01-19 Jakub Jelinek <jakub@redhat.com>
- PR tree-optimization/100781
- * gcc.dg/pr100781.c: New.
+ PR target/104104
+ * gcc.target/i386/pr104104.c: New test.
-2021-06-01 Andrew MacLeod <amacleod@redhat.com>
+2022-01-19 Martin Sebor <msebor@redhat.com>
- PR tree-optimization/100774
- * g++.dg/pr100774.C: New.
+ PR middle-end/104076
+ * g++.dg/warn/Wdangling-pointer-3.C: New test.
-2021-05-31 Tobias Burnus <tobias@codesourcery.com>
+2022-01-19 Martin Sebor <msebor@redhat.com>
- * gfortran.dg/gomp/depend-iterator-1.f90: Use dg-do compile.
- * gfortran.dg/gomp/depend-iterator-2.f90: Use dg-do compile.
+ PR middle-end/104103
+ * gcc.dg/torture/pr57147-2.c: Prune out expected warning.
-2021-05-31 Richard Biener <rguenther@suse.de>
+2022-01-19 Martin Sebor <msebor@redhat.com>
- PR c++/88601
- * c-c++-common/builtin-shufflevector-2.c: New testcase.
- * c-c++-common/torture/builtin-shufflevector-1.c: Likewise.
- * g++.dg/ext/builtin-shufflevector-1.C: Likewise.
- * g++.dg/ext/builtin-shufflevector-2.C: Likewise.
+ PR middle-end/104069
+ * gcc.dg/Wuse-after-free.c: New test.
-2021-05-31 Peter Bergner <bergner@linux.ibm.com>
+2022-01-18 Jakub Jelinek <jakub@redhat.com>
- PR target/99842
- * g++.target/powerpc/pr99842.C: New.
+ PR c++/104055
+ * g++.dg/cpp2a/consteval27.C: New test.
-2021-05-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
+2022-01-18 Jason Merrill <jason@redhat.com>
- * gcc.dg/plugin/diagnostic_plugin_show_trees.c (plugin_init): Fix caret_max_with.
- * gcc.dg/plugin/diagnostic_plugin_test_inlining.c
- (plugin_init): Likewise.
- * gcc.dg/plugin/diagnostic_plugin_test_paths.c (plugin_init): Likewise.
- * gcc.dg/plugin/diagnostic_plugin_test_string_literals.c
- (plugin_init): Likewise.
- * gcc.dg/plugin/diagnostic_plugin_test_tree_expression_range.c
- (plugin_init): Likewise.
+ * lib/g++-dg.exp: Change 2a to 20.
-2021-05-29 Jakub Jelinek <jakub@redhat.com>
+2022-01-18 Jason Merrill <jason@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
- PR middle-end/99928
- * c-c++-common/gomp/pr99928-1.c: Add default(none) to constructs
- combined with parallel, teams or taskloop and defaultmap(none)
- to constructs combined with target.
- * c-c++-common/gomp/pr99928-2.c: Likewise.
- * c-c++-common/gomp/pr99928-3.c: Likewise.
- * c-c++-common/gomp/pr99928-4.c: Likewise.
- * c-c++-common/gomp/pr99928-5.c: Likewise.
- * c-c++-common/gomp/pr99928-6.c: Likewise.
- * c-c++-common/gomp/pr99928-7.c: Likewise.
- * c-c++-common/gomp/pr99928-8.c: Likewise.
- * c-c++-common/gomp/pr99928-9.c: Likewise.
- * c-c++-common/gomp/pr99928-10.c: Likewise.
- * c-c++-common/gomp/pr99928-13.c: Likewise.
- * c-c++-common/gomp/pr99928-14.c: Likewise.
+ PR c++/104025
+ * g++.dg/warn/pr104025.C: New test.
-2021-05-29 Aldy Hernandez <aldyh@redhat.com>
+2022-01-18 David Faust <david.faust@oracle.com>
- * gcc.dg/Wstringop-overflow-55.c:
- * gcc.dg/pr80776-1.c:
+ * gcc.target/bpf/core-section-1.c: Adjust expected record size
+ occurrences.
-2021-05-28 Richard Biener <rguenther@suse.de>
+2022-01-18 David Malcolm <dmalcolm@redhat.com>
- PR tree-optimization/100778
- * gcc.dg/vect/bb-slp-pr100778-1.c: New testcase.
+ PR analyzer/104089
+ * gcc.dg/analyzer/pr104089.c: New test.
-2021-05-28 Jason Merrill <jason@redhat.com>
+2022-01-18 David Malcolm <dmalcolm@redhat.com>
- PR c++/100797
- PR c++/95719
- * g++.dg/inherit/virtual15.C: New test.
- * g++.dg/inherit/virtual15a.C: New file.
+ PR analyzer/104062
+ * gcc.dg/analyzer/pr104062.c: New test.
-2021-05-28 Richard Biener <rguenther@suse.de>
+2022-01-18 Patrick Palka <ppalka@redhat.com>
- PR ipa/100791
- * gcc.dg/pr100791.c: New testcase.
+ PR c++/104074
+ * g++.dg/cpp1z/nontype-auto20.C: New test.
-2021-05-28 Richard Biener <rguenther@suse.de>
+2022-01-18 Harald Anlauf <anlauf@gmx.de>
- PR c/100803
- * gcc.dg/gimplefe-error-11.c: New testcase.
+ PR fortran/103692
+ * gfortran.dg/pr102520.f90: Adjust error messages.
+ * gfortran.dg/pr103692.f90: New test.
-2021-05-28 Jakub Jelinek <jakub@redhat.com>
+2022-01-18 Jason Merrill <jason@redhat.com>
- PR middle-end/99928
- * c-c++-common/gomp/pr99928-8.c: Remove all xfails.
- * c-c++-common/gomp/pr99928-9.c: Likewise.
- * c-c++-common/gomp/pr99928-10.c: Likewise.
- * c-c++-common/gomp/pr99928-16.c: New test.
+ PR c++/104007
+ * g++.dg/eh/new2.C: New test.
-2021-05-28 Tobias Burnus <tobias@codesourcery.com>
+2022-01-18 Martin Liska <mliska@suse.cz>
- * c-c++-common/gomp/affinity-1.c: New test.
- * c-c++-common/gomp/affinity-2.c: New test.
- * c-c++-common/gomp/affinity-3.c: New test.
- * c-c++-common/gomp/affinity-4.c: New test.
- * c-c++-common/gomp/affinity-5.c: New test.
- * c-c++-common/gomp/affinity-6.c: New test.
- * c-c++-common/gomp/affinity-7.c: New test.
- * gfortran.dg/gomp/affinity-clause-1.f90: New test.
- * gfortran.dg/gomp/affinity-clause-2.f90: New test.
- * gfortran.dg/gomp/affinity-clause-3.f90: New test.
- * gfortran.dg/gomp/affinity-clause-4.f90: New test.
- * gfortran.dg/gomp/affinity-clause-5.f90: New test.
- * gfortran.dg/gomp/affinity-clause-6.f90: New test.
- * gfortran.dg/gomp/depend-iterator-1.f90: New test.
- * gfortran.dg/gomp/depend-iterator-2.f90: New test.
- * gfortran.dg/gomp/depend-iterator-3.f90: New test.
- * gfortran.dg/gomp/taskwait.f90: New test.
-
-2021-05-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
- Richard Biener <rguenther@suse.de>
+ * gcc.target/powerpc/bfp/scalar-extract-exp-5.c: Update scanned
+ pattern.
+ * gcc.target/powerpc/bfp/scalar-extract-sig-5.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-insert-exp-11.c: Likewise.
- * gcc.dg/tree-ssa/popcount4ll.c: Remove lp64 condition.
- Adjust scanning pattern for !lp64.
- * gcc.dg/tree-ssa/popcount5ll.c: Likewise.
- * gcc.dg/tree-ssa/popcount4l.c: Adjust scanning pattern
- for ! int32plus.
+2022-01-18 Richard Biener <rguenther@suse.de>
-2021-05-28 Kewen Lin <linkw@linux.ibm.com>
+ PR ipa/103989
+ * g++.dg/opt/pr103989.C: New testcase.
- PR tree-optimization/99398
- * gcc.target/powerpc/vec-perm-ctor-run.c: New test.
- * gcc.target/powerpc/vec-perm-ctor.c: New test.
- * gcc.target/powerpc/vec-perm-ctor.h: New test.
+2022-01-18 Richard Biener <rguenther@suse.de>
-2021-05-27 Matthias Kretz <kretz@kde.org>
+ PR tree-optimization/103987
+ * gcc.dg/torture/pr103987.c: New testcase.
- PR c++/100716
- * g++.dg/diagnostic/pr100716.C: New test.
- * g++.dg/diagnostic/pr100716-1.C: Same test with
- -fno-pretty-templates.
+2022-01-18 Richard Sandiford <richard.sandiford@arm.com>
-2021-05-27 Patrick Palka <ppalka@redhat.com>
+ PR target/104005
+ * gcc.target/aarch64/pr104005.c: New test.
- PR c++/99893
- * g++.dg/cpp0x/static_assert17.C: New test.
+2022-01-18 Andrew Pinski <apinski@marvell.com>
-2021-05-27 Jason Merrill <jason@redhat.com>
+ PR tree-optimization/101941
+ * gcc.c-torture/compile/pr101941-1.c: New test.
+ * gcc.dg/tree-ssa/pr101941-1.c: New test.
- PR c++/86355
- * g++.dg/cpp0x/alias-decl-variadic2.C: New test.
+2022-01-18 Martin Liska <mliska@suse.cz>
-2021-05-27 Patrick Palka <ppalka@redhat.com>
+ * gcc.src/maintainers.exp: Use
+ check_effective_target_python3_module for checking of unicode
+ module.
+ * lib/target-supports.exp: Add
+ check_effective_target_python3_module.
+
+2022-01-18 Martin Liska <mliska@suse.cz>
+
+ * gcc.misc-tests/options.exp: Include renamed file.
+
+2022-01-18 Martin Liska <mliska@suse.cz>
+
+ * gcc.src/maintainers.exp: Use the new
+ check_effective_target_recent_python3.
+ * lib/target-supports.exp: Check for Python3 version >= 3.6.
+
+2022-01-18 liuhongt <hongtao.liu@intel.com>
+
+ PR target/103973
+ * g++.target/i386/pr103973-1.C: Change scan-assembler from
+ "\tucomisd" to "\t\[v\]?ucomisd".
+ * g++.target/i386/pr103973-11.C: Ditto.
+ * g++.target/i386/pr103973-13.C: Ditto.
+ * g++.target/i386/pr103973-15.C: Ditto.
+ * g++.target/i386/pr103973-3.C: Ditto.
+ * g++.target/i386/pr103973-5.C: Ditto.
+ * g++.target/i386/pr103973-7.C: Ditto.
+ * g++.target/i386/pr103973-9.C: Ditto.
+ * gcc.target/i386/pr103973-1.c: Ditto.
+ * gcc.target/i386/pr103973-11.c: Ditto.
+ * gcc.target/i386/pr103973-13.c: Ditto.
+ * gcc.target/i386/pr103973-15.c: Ditto.
+ * gcc.target/i386/pr103973-3.c: Ditto.
+ * gcc.target/i386/pr103973-5.c: Ditto.
+ * gcc.target/i386/pr103973-7.c: Ditto.
+ * gcc.target/i386/pr103973-9.c: Ditto.
+
+2022-01-17 qing zhao <qing.zhao@oracle.com>
+
+ * gcc.dg/auto-init-uninit-16.c (testfunc): Delete xfail to reflect
+ the fact that address taken variable can be warned.
+ * gcc.dg/auto-init-uninit-34.c (warn_scalar_1): Likewise.
+ (warn_scalar_2): Likewise.
+ * gcc.dg/auto-init-uninit-37.c (T1): Likewise.
+ (T2): Likewise.
+ * gcc.dg/auto-init-uninit-B.c (baz): Likewise.
+
+2022-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/104031
+ * g++.dg/cpp1y/pr104031.C: New test.
+
+2022-01-17 Jason Merrill <jason@redhat.com>
+
+ * c-c++-common/cpp/line-2.c: Only expect includes once.
+ * c-c++-common/cpp/line-3.c: Likewise.
+
+2022-01-17 Andrew Stubbs <ams@codesourcery.com>
+
+ * gfortran.dg/gomp/requires-8.f90: Reinstate dynamic allocators
+ requirement.
+
+2022-01-17 Hafiz Abid Qadeer <abidh@codesourcery.com>
+
+ * gfortran.dg/gomp/allocate-2.f90: Change 0 to 0_1.
+
+2022-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/103973
+ * gcc.target/i386/pr103973-1.c: New test.
+ * gcc.target/i386/pr103973-2.c: New test.
+ * gcc.target/i386/pr103973-3.c: New test.
+ * gcc.target/i386/pr103973-4.c: New test.
+ * gcc.target/i386/pr103973-5.c: New test.
+ * gcc.target/i386/pr103973-6.c: New test.
+ * gcc.target/i386/pr103973-7.c: New test.
+ * gcc.target/i386/pr103973-8.c: New test.
+ * gcc.target/i386/pr103973-9.c: New test.
+ * gcc.target/i386/pr103973-10.c: New test.
+ * gcc.target/i386/pr103973-11.c: New test.
+ * gcc.target/i386/pr103973-12.c: New test.
+ * gcc.target/i386/pr103973-13.c: New test.
+ * gcc.target/i386/pr103973-14.c: New test.
+ * gcc.target/i386/pr103973-15.c: New test.
+ * gcc.target/i386/pr103973-16.c: New test.
+ * gcc.target/i386/pr103973-17.c: New test.
+ * gcc.target/i386/pr103973-18.c: New test.
+ * gcc.target/i386/pr103973-19.c: New test.
+ * gcc.target/i386/pr103973-20.c: New test.
+ * g++.target/i386/pr103973-1.C: New test.
+ * g++.target/i386/pr103973-2.C: New test.
+ * g++.target/i386/pr103973-3.C: New test.
+ * g++.target/i386/pr103973-4.C: New test.
+ * g++.target/i386/pr103973-5.C: New test.
+ * g++.target/i386/pr103973-6.C: New test.
+ * g++.target/i386/pr103973-7.C: New test.
+ * g++.target/i386/pr103973-8.C: New test.
+ * g++.target/i386/pr103973-9.C: New test.
+ * g++.target/i386/pr103973-10.C: New test.
+ * g++.target/i386/pr103973-11.C: New test.
+ * g++.target/i386/pr103973-12.C: New test.
+ * g++.target/i386/pr103973-13.C: New test.
+ * g++.target/i386/pr103973-14.C: New test.
+ * g++.target/i386/pr103973-15.C: New test.
+ * g++.target/i386/pr103973-16.C: New test.
+ * g++.target/i386/pr103973-17.C: New test.
+ * g++.target/i386/pr103973-18.C: New test.
+ * g++.target/i386/pr103973-19.C: New test.
+ * g++.target/i386/pr103973-20.C: New test.
+
+2022-01-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * gfortran.dg/ieee/signaling_3.f90: Remove file.
+
+2022-01-17 Martin Liska <mliska@suse.cz>
+
+ * g++.dg/uninit-pred-loop-1_b.C: Fix invalid warnings.
+ * g++.dg/uninit-pred-loop-1_c.C: Likewise.
+
+2022-01-17 Martin Liska <mliska@suse.cz>
+
+ * g++.dg/uninit-pred-loop-1_a.cc: Moved to...
+ * g++.dg/uninit-pred-loop-1_a.C: ...here.
+ * g++.dg/uninit-pred-loop-1_b.cc: Moved to...
+ * g++.dg/uninit-pred-loop-1_b.C: ...here.
+ * g++.dg/uninit-pred-loop-1_c.cc: Moved to...
+ * g++.dg/uninit-pred-loop-1_c.C: ...here.
+ * g++.dg/uninit-pred-loop_1.cc: Moved to...
+ * g++.dg/uninit-pred-loop_1.C: ...here.
+
+2022-01-17 Martin Liska <mliska@suse.cz>
+
+ * lib/gcov.exp: Use check_effective_target_pytest3.
+ * lib/target-supports.exp: Add check_effective_target_pytest3.
+
+2022-01-17 Martin Liska <mliska@suse.cz>
+
+ * gcc.src/maintainers.exp: Start using check-MAINTAINERS.py.
+ * lib/target-supports.exp: Add check_effective_target_python3.
+
+2022-01-17 Martin Liska <mliska@suse.cz>
+
+ PR testsuite/104035
+ * g++.dg/torture/pr57993-2.C: Fix warnings.
+
+2022-01-17 Haochen Gui <guihaoc@gcc.gnu.org>
+
+ PR target/103124
+ * gcc.target/powerpc/pr103124.c: New testcase.
+
+2022-01-16 Francois-Xavier Coudert <fxcoudert@gmail.com>
+
+ * gfortran.dg/ieee/signaling_1.f90: xfail on x87.
+ * gfortran.dg/ieee/signaling_2.f90: xfail on x87.
+ * gfortran.dg/ieee/signaling_3.f90: New file.
+
+2022-01-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/82207
+ * gfortran.dg/ieee/ieee_10.f90: Do not create signaling NaNs.
+ * gfortran.dg/ieee/signaling_2.f90: New test.
+ * gfortran.dg/ieee/signaling_2_c.c: New file.
+
+2022-01-16 Jonathan Wakely <jwakely@redhat.com>
+
+ PR testsuite/104037
+ * g++.old-deja/g++.robertl/eb43.C: Ad -Wno-deprecated.
+
+2022-01-16 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/103789
+ PR fortran/87711
+ PR fortran/97896
+ * gfortran.dg/index_5.f90: Enrich test with usages of INDEX with
+ a non-keyword KIND argument.
+ * gfortran.dg/len_trim.f90: Same for LEN_TRIM.
+ * gfortran.dg/maskl_1.f90: Same for MASKL.
+ * gfortran.dg/maskr_1.f90: Same for MASKR.
+ * gfortran.dg/scan_3.f90: Same for SCAN.
+ * gfortran.dg/verify_3.f90: Same for VERIFY.
- DR 1315
- PR c++/67593
- PR c++/96555
- * g++.dg/template/partial16.C: New test.
- * g++.dg/template/partial17.C: New test.
- * g++.dg/template/partial18.C: New test.
- * g++.dg/template/partial19.C: New test.
- * g++.dg/cpp0x/pr68724.C: Adjust expected diagnostic for
- ill-formed partial specialization.
- * g++.dg/cpp0x/variadic38.C: Likewise.
- * g++.dg/cpp1z/pr81016.C: Likewise.
- * g++.dg/template/partial5.C: Likewise.
- * g++.old-deja/g++.pt/spec21.C: Likewise.
+2022-01-16 wwwhhhyyy <hongyu.wang@intel.com>
-2021-05-27 Harald Anlauf <anlauf@gmx.de>
+ * gcc.target/i386/avx2-dest-false-dep-for-glc.c: New test.
+ * gcc.target/i386/avx512dq-dest-false-dep-for-glc.c: Ditto.
+ * gcc.target/i386/avx512f-dest-false-dep-for-glc.c: Ditto.
+ * gcc.target/i386/avx512fp16-dest-false-dep-for-glc.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-dest-false-dep-for-glc.c: Ditto.
+ * gcc.target/i386/avx512vl-dest-false-dep-for-glc.c: Ditto.
- PR fortran/100602
- * gfortran.dg/pointer_check_14.f90: New test.
+2022-01-15 Martin Sebor <msebor@redhat.com>
-2021-05-27 Harald Anlauf <anlauf@gmx.de>
+ PR c/63272
+ * g++.dg/warn/Wfree-nonheap-object-6.C: Disable valid warnings.
+ * g++.dg/warn/ref-temp1.C: Prune expected warning.
+ * gcc.dg/uninit-pr50476.c: Expect a new warning.
+ * c-c++-common/Wdangling-pointer-2.c: New test.
+ * c-c++-common/Wdangling-pointer-3.c: New test.
+ * c-c++-common/Wdangling-pointer-4.c: New test.
+ * c-c++-common/Wdangling-pointer-5.c: New test.
+ * c-c++-common/Wdangling-pointer-6.c: New test.
+ * c-c++-common/Wdangling-pointer.c: New test.
+ * g++.dg/warn/Wdangling-pointer-2.C: New test.
+ * g++.dg/warn/Wdangling-pointer.C: New test.
+ * gcc.dg/Wdangling-pointer-2.c: New test.
+ * gcc.dg/Wdangling-pointer.c: New test.
- PR fortran/100656
- * gfortran.dg/bounds_check_22.f90: New test.
+2022-01-15 Martin Sebor <msebor@redhat.com>
-2021-05-27 Aldy Hernandez <aldyh@redhat.com>
+ PR tree-optimization/80532
+ * gcc.dg/Wmismatched-dealloc-2.c: Avoid -Wuse-after-free.
+ * gcc.dg/Wmismatched-dealloc-3.c: Same.
+ * gcc.dg/analyzer/file-1.c: Prune expected warning.
+ * gcc.dg/analyzer/file-2.c: Same.
+ * gcc.dg/attr-alloc_size-6.c: Disable -Wuse-after-free.
+ * gcc.dg/attr-alloc_size-7.c: Same.
+ * c-c++-common/Wuse-after-free-2.c: New test.
+ * c-c++-common/Wuse-after-free-3.c: New test.
+ * c-c++-common/Wuse-after-free-4.c: New test.
+ * c-c++-common/Wuse-after-free-5.c: New test.
+ * c-c++-common/Wuse-after-free-6.c: New test.
+ * c-c++-common/Wuse-after-free-7.c: New test.
+ * c-c++-common/Wuse-after-free.c: New test.
+ * g++.dg/warn/Wmismatched-dealloc-3.C: New test.
+ * g++.dg/warn/Wuse-after-free.C: New test.
- * gcc.dg/Wstringop-overflow-55.c: Pass -fno-ipa-icf.
+2022-01-15 Harald Anlauf <anlauf@gmx.de>
-2021-05-27 Uroš Bizjak <ubizjak@gmail.com>
+ PR fortran/83079
+ * gfortran.dg/transfer_char_kind4.f90: New test.
- PR target/100637
- * gcc.target/i386/pr100637-3b.c (avgu): New test.
- * gcc.target/i386/pr100637-3w.c (avgu): Ditto.
+2022-01-14 David Malcolm <dmalcolm@redhat.com>
-2021-05-26 Patrick Palka <ppalka@redhat.com>
+ * gcc.dg/analyzer/taint-merger.c: New test.
- PR c++/100502
- * g++.dg/template/access37.C: New test.
- * g++.dg/template/access37a.C: New test.
+2022-01-14 David Malcolm <dmalcolm@redhat.com>
-2021-05-26 Aldy Hernandez <aldyh@redhat.com>
+ PR analyzer/104029
+ * gcc.dg/analyzer/pr104029.c: New test.
+ * gcc.dg/analyzer/taint-ops.c: New test.
- * gcc.dg/Wstringop-overflow-55.c: Adapt for range query changes.
- * gcc.dg/pr80776-1.c: Same.
+2022-01-14 Harald Anlauf <anlauf@gmx.de>
-2021-05-26 Uroš Bizjak <ubizjak@gmail.com>
+ PR fortran/99256
+ * gfortran.dg/altreturn_11.f90: New test.
- * lib/target-supports.exp (check_effective_target_vect32): New.
- (available_vector_sizes): Append 32 for x86 targets.
- * gcc.dg/vect/pr71264.c (dg-final): Xfail scan dump for vect32 targets.
- * gcc.dg/vect/slp-28.c (dg-final): Adjust dumps for vect32 targets.
- * gcc.dg/vect/slp-3.c (dg-final): Ditto.
- * gcc.target/i386/pr100637-3b.c: New test.
- * gcc.target/i386/pr100637-3w.c: Ditto.
- * gcc.target/i386/pr100637-4b.c: Ditto.
- * gcc.target/i386/pr100637-4w.c: Ditto.
+2022-01-14 Eric Botcazou <ebotcazou@adacore.com>
-2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
+ * gnat.dg/lto25.adb: New test.
+ * gnat.dg/opt96.adb: Likewise.
+ * gnat.dg/opt96_pkg.ads, gnat.dg/opt96_pkg.adb: New helper.
- * gcc.dg/sso-13.c: New test.
+2022-01-14 Harald Anlauf <anlauf@gmx.de>
-2021-05-26 Christophe Lyon <christophe.lyon@linaro.org>
+ PR fortran/103782
+ * gfortran.dg/overload_4.f90: New test.
- * gcc.target/arm/simd/mve-vaddv-1.c: New test.
+2022-01-14 Martin Sebor <msebor@redhat.com>
-2021-05-26 Patrick Palka <ppalka@redhat.com>
+ PR middle-end/101475
+ * gcc.dg/Wstringop-overflow-15.c: Remove xfails.
+ * gcc.dg/Wstringop-overflow-68.c: Adjust, remove xfails.
+ * gcc.dg/Wstringop-overflow-88.c: New test.
- PR c++/100368
- * g++.dg/cpp1z/elide6.C: New test.
+2022-01-14 Martin Sebor <msebor@redhat.com>
-2021-05-26 Patrick Palka <ppalka@redhat.com>
+ * gcc.dg/tree-ssa/builtin-sprintf-warn-28.c: New test.
- PR c++/97420
- * g++.dg/cpp0x/noexcept68.C: New test.
+2022-01-14 Martin Liska <mliska@suse.cz>
-2021-05-26 Geng Qi <gengqi@linux.alibaba.com>
+ * c-c++-common/Walloca-larger-than.c: Fix typo.
- * gcc.target/csky/fldrd_fstrd.c: New.
- * gcc.target/csky/fpuv3/fldr64_fstr64.c: New.
+2022-01-14 Martin Liska <mliska@suse.cz>
-2021-05-26 Geng Qi <gengqi@linux.alibaba.com>
+ * g++.dg/cpp0x/pr56868.cpp: Moved to...
+ * g++.dg/cpp0x/pr56868.C: ...here.
+ * gcc.dg/torture/pr57993-2.cpp: Moved to...
+ * g++.dg/torture/pr57993-2.C: ...here.
- * gcc.target/csky/ldbs.c: New.
+2022-01-14 Martin Liska <mliska@suse.cz>
-2021-05-26 Andrew Pinski <apinski@marvell.com>
+ * c-c++-common/Walloca-larger-than.C: Moved to...
+ * c-c++-common/Walloca-larger-than.c: ...here.
- * gcc.dg/tree-ssa/pr96928.c: Update test for slightly different IR.
- * gcc.dg/tree-ssa/pr96928-1.c: New testcase.
+2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
-2021-05-25 Jakub Jelinek <jakub@redhat.com>
+ PR c++/103705
+ * c-c++-common/gomp/pr103705.c: New test.
- PR c++/100666
- * g++.dg/cpp1z/nodiscard8.C: New test.
- * g++.dg/cpp1z/nodiscard9.C: New test.
+2022-01-14 Martin Liska <mliska@suse.cz>
-2021-05-25 Martin Liska <mliska@suse.cz>
-
- * gcc.dg/sancov/attribute.c: New test.
+ * g++.dg/vect/pr99149.cc: Remove executable mode.
+ * g++.dg/vect/pr99220.cc: Likewise.
+ * g++.target/i386/avx512vl-pr100738-1.C: Likewise.
+ * g++.target/i386/pr100738-1.C: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/bfdot-1.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/bfdot-3.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vdot-3-3.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vdot-3-4.c: Likewise.
+ * gcc.target/i386/pr101796-1.c: Likewise.
+ * gcc.target/i386/pr94790-1.c: Likewise.
+ * gcc.target/i386/pr94790-2.c: Likewise.
+ * gcc.target/powerpc/mma-double-test.c: Likewise.
+ * gcc.target/powerpc/mma-single-test.c: Likewise.
+ * gdc.test/fail_compilation/constraints_aggr.d: Likewise.
+ * gdc.test/fail_compilation/constraints_defs.d: Likewise.
+ * gdc.test/fail_compilation/constraints_func1.d: Likewise.
+ * gdc.test/fail_compilation/constraints_func2.d: Likewise.
+ * gdc.test/fail_compilation/constraints_func3.d: Likewise.
+ * gdc.test/fail_compilation/constraints_func4.d: Likewise.
+ * gdc.test/fail_compilation/constraints_tmpl.d: Likewise.
+ * gdc.test/fail_compilation/imports/constraints.d: Likewise.
-2021-05-25 Cooper Qu <cooper.qu@linux.alibaba.com>
+2022-01-14 Jakub Jelinek <jakub@redhat.com>
- * gcc.target/csky/fpuv3/fpuv3.exp : Amend copyright.
+ PR c++/103991
+ * g++.dg/warn/Wreturn-type-13.C: New test.
-2021-05-25 Jakub Jelinek <jakub@redhat.com>
+2022-01-14 Jakub Jelinek <jakub@redhat.com>
- PR middle-end/99928
- * c-c++-common/gomp/pr99928-8.c: Remove xfails from omp teams r21 and
- r28 checks.
- * c-c++-common/gomp/pr99928-9.c: Likewise.
- * c-c++-common/gomp/pr99928-10.c: Likewise.
+ PR c++/89074
+ * g++.dg/cpp1y/constexpr-89074-1.C: New test.
-2021-05-25 Geng Qi <gengqi@linux.alibaba.com>
+2022-01-14 Jakub Jelinek <jakub@redhat.com>
- * gcc.target/csky/fpuv3/fpuv3.exp: New.
- * gcc.target/csky/fpuv3/fpv3_div.c: New.
- * gcc.target/csky/fpuv3/fpv3_fadd.c: New.
- * gcc.target/csky/fpuv3/fpv3_fdtos.c: New.
- * gcc.target/csky/fpuv3/fpv3_fftoi_rm.c: New.
- * gcc.target/csky/fpuv3/fpv3_fftoi_rz.c: New.
- * gcc.target/csky/fpuv3/fpv3_fhtos.c: New.
- * gcc.target/csky/fpuv3/fpv3_fitof.c: New.
- * gcc.target/csky/fpuv3/fpv3_fmov.c: New.
- * gcc.target/csky/fpuv3/fpv3_fmovi.c: New.
- * gcc.target/csky/fpuv3/fpv3_fmula.c: New.
- * gcc.target/csky/fpuv3/fpv3_fmuls.c: New.
- * gcc.target/csky/fpuv3/fpv3_fneg.c: New.
- * gcc.target/csky/fpuv3/fpv3_fnmula.c: New.
- * gcc.target/csky/fpuv3/fpv3_fnmuls.c: New.
- * gcc.target/csky/fpuv3/fpv3_fstod.c: New.
- * gcc.target/csky/fpuv3/fpv3_fstoh.c: New.
- * gcc.target/csky/fpuv3/fpv3_fsub.c: New.
- * gcc.target/csky/fpuv3/fpv3_fxtof.c: New.
- * gcc.target/csky/fpuv3/fpv3_h.c: New.
- * gcc.target/csky/fpuv3/fpv3_hs.c: New.
- * gcc.target/csky/fpuv3/fpv3_hsz.c: New.
- * gcc.target/csky/fpuv3/fpv3_hz.c: New.
- * gcc.target/csky/fpuv3/fpv3_ls.c: New.
- * gcc.target/csky/fpuv3/fpv3_lsz.c: New.
- * gcc.target/csky/fpuv3/fpv3_lt.c: New.
- * gcc.target/csky/fpuv3/fpv3_ltz.c: New.
- * gcc.target/csky/fpuv3/fpv3_max.c: New.
- * gcc.target/csky/fpuv3/fpv3_min.c: New.
- * gcc.target/csky/fpuv3/fpv3_mul.c: New.
- * gcc.target/csky/fpuv3/fpv3_mula.c: New.
- * gcc.target/csky/fpuv3/fpv3_muls.c: New.
- * gcc.target/csky/fpuv3/fpv3_ne.c: New.
- * gcc.target/csky/fpuv3/fpv3_nez.c: New.
- * gcc.target/csky/fpuv3/fpv3_recip.c: New.
- * gcc.target/csky/fpuv3/fpv3_sqrt.c: New.
- * gcc.target/csky/fpuv3/fpv3_unordered.c: New.
+ PR target/98737
+ * gcc.dg/tree-ssa/pr98737-1.c: New test.
+ * gcc.dg/tree-ssa/pr98737-2.c: New test.
-2021-05-24 Aaron Sawdey <acsawdey@linux.ibm.com>
+2022-01-14 Claudiu Zissulescu <claziss@synopsys.com>
- * gcc.target/powerpc/fusion-p10-logadd.c: New file.
+ * gcc.target/arc/cancel-1.c: New file.
-2021-05-24 Tobias Burnus <tobias@codesourcery.com>
+2022-01-14 Siddhesh Poyarekar <siddhesh@gotplt.org>
- PR fortran/86470
- * gfortran.dg/gomp/class-firstprivate-1.f90: New test.
- * gfortran.dg/gomp/class-firstprivate-2.f90: New test.
- * gfortran.dg/gomp/class-firstprivate-3.f90: New test.
- * gfortran.dg/gomp/class-firstprivate-4.f90: New test.
+ PR tree-optimization/104009
+ * gcc.dg/builtin-object-size-1.c (test10): New test.
+ * gcc.dg/builtin-object-size-3.c (test10): Likewise.
+ (test9): Expect zero size for negative offsets.
+ * gcc.dg/builtin-object-size-4.c (test8): Likewise.
+ * gcc.dg/builtin-object-size-5.c (test7): Drop test for
+ __builtin_object_size.
-2021-05-24 Christophe Lyon <christophe.lyon@linaro.org>
+2022-01-14 liuhongt <hongtao.liu@intel.com>
- * gcc.target/arm/simd/mve-vld4.c: New test, derived from
- slp-perm-3.c
+ * gcc.target/i386/pr104001.c: New test.
-2021-05-24 Christophe Lyon <christophe.lyon@linaro.org>
+2022-01-14 David Malcolm <dmalcolm@redhat.com>
- * gcc.target/arm/simd/mve-vld2.c: New test, derived from
- slp-perm-2.c
+ * gcc.dg/analyzer/attr-tainted_args-1.c: New test.
+ * gcc.dg/analyzer/attr-tainted_args-misuses.c: New test.
+ * gcc.dg/analyzer/taint-CVE-2011-2210-1.c: New test.
+ * gcc.dg/analyzer/taint-CVE-2020-13143-1.c: New test.
+ * gcc.dg/analyzer/taint-CVE-2020-13143-2.c: New test.
+ * gcc.dg/analyzer/taint-CVE-2020-13143.h: New test.
+ * gcc.dg/analyzer/taint-alloc-3.c: New test.
+ * gcc.dg/analyzer/taint-alloc-4.c: New test.
+ * gcc.dg/analyzer/test-uaccess.h: New test.
-2021-05-24 liuhongt <hongtao.liu@intel.com>
+2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
+ Jason Merrill <jason@redhat.com>
- PR target/100660
- * gcc.target/i386/pr100660.c: New test.
+ PR c++/70417
+ * g++.dg/cpp0x/variadic-mem_fn2.C: Catch warning about missing
+ template keyword.
+ * g++.dg/template/dependent-name17.C: New test.
+ * g++.dg/template/dependent-name18.C: New test.
-2021-05-24 Andrew Pinski <apinski@marvell.com>
+2022-01-13 Uroš Bizjak <ubizjak@gmail.com>
- * gcc.dg/tree-ssa/phi-opt-10.c: Use "\[0-9\]*" instead of '.'
- when matching ssa name version.
- * gcc.dg/tree-ssa/phi-opt-7.c: Likewise.
+ PR target/103861
+ * gcc.target/i386/pr103861.c (shl,ashr,lshr): New tests.
-2021-05-23 Uroš Bizjak <ubizjak@gmail.com>
+2022-01-13 Hafiz Abid Qadeer <abidh@codesourcery.com>
- PR target/100722
- * gcc.target/i386/pr100722.c: New test.
+ * gfortran.dg/gomp/allocate-1.f90: New test.
+ * gfortran.dg/gomp/allocate-2.f90: New test.
+ * gfortran.dg/gomp/allocate-3.f90: New test.
+ * gfortran.dg/gomp/collapse1.f90: Update error message.
+ * gfortran.dg/gomp/openmp-simd-4.f90: Likewise.
+ * gfortran.dg/gomp/clauses-1.f90: Uncomment allocate clause.
-2021-05-23 Harald Anlauf <anlauf@gmx.de>
+2022-01-13 Andrew MacLeod <amacleod@redhat.com>
- PR fortran/100551
- * gfortran.dg/pr100551.f90: New test.
+ PR tree-optimization/83072
+ PR tree-optimization/83073
+ PR tree-optimization/97909
+ * gcc.dg/pr83072-2.c: New.
+ * gcc.dg/pr83073.c: New.
-2021-05-23 Andrew Pinski <apinski@marvell.com>
+2022-01-13 Andrew MacLeod <amacleod@redhat.com>
- * gcc.dg/gimplefe-45.c: New test.
+ PR tree-optimization/96707
+ * g++.dg/pr96707.C: New.
-2021-05-21 Aaron Sawdey <acsawdey@linux.ibm.com>
+2022-01-13 Harald Anlauf <anlauf@gmx.de>
- * gcc.target/powerpc/fusion-p10-addadd.c: New file.
+ PR fortran/67804
+ * gfortran.dg/pr93604.f90: Adjust to changed diagnostics.
+ * gfortran.dg/pr67804.f90: New test.
-2021-05-21 Aaron Sawdey <acsawdey@linux.ibm.com>
+2022-01-13 Uroš Bizjak <ubizjak@gmail.com>
- * gcc.target/powerpc/fusion-p10-ldcmpi.c: New file.
- * gcc.target/powerpc/fusion-p10-2logical.c: New file.
+ PR target/104003
+ * g++.target/i386/pr103861-1-sse4.C: New test.
+ * g++.target/i386/pr103861-1-xop.C: Ditto.
-2021-05-21 Jakub Jelinek <jakub@redhat.com>
+2022-01-13 Paul A. Clarke <pc@us.ibm.com>
- PR middle-end/99928
- * c-c++-common/gomp/pr99928-3.c: Remove all xfails.
- * c-c++-common/gomp/pr99928-15.c: New test.
+ * gcc.target/powerpc/sse4_1-round3.h: New.
+ * gcc.target/powerpc/sse4_1-roundpd.c: New.
+ * gcc.target/powerpc/sse4_1-roundps.c: New.
+ * gcc.target/powerpc/sse4_1-roundsd.c: New.
+ * gcc.target/powerpc/sse4_1-roundss.c: New.
-2021-05-21 Jakub Jelinek <jakub@redhat.com>
+2022-01-13 Richard Biener <rguenther@suse.de>
- PR middle-end/99928
- * c-c++-common/gomp/pr99928-6.c: Remove all xfails.
- * c-c++-common/gomp/pr99928-13.c: New test.
- * c-c++-common/gomp/pr99928-14.c: New test.
+ PR c/104002
+ * c-c++-common/builtin-shufflevector-3.c: Move ...
+ * c-c++-common/torture/builtin-shufflevector-3.c: ... here.
-2021-05-21 Thomas Schwinge <thomas@codesourcery.com>
+2022-01-13 Thomas Schwinge <thomas@codesourcery.com>
- PR middle-end/90115
- * c-c++-common/goacc/privatization-1-compute-loop.c: Update.
- * c-c++-common/goacc/privatization-1-compute.c: Likewise.
- * c-c++-common/goacc/privatization-1-routine_gang-loop.c:
- Likewise.
- * c-c++-common/goacc/privatization-1-routine_gang.c: Likewise.
+ * c-c++-common/goacc/routine-6.c: Merge into...
+ * c-c++-common/goacc/routine-5.c: ... this, and document current
+ C/C++ difference.
-2021-05-21 Thomas Schwinge <thomas@codesourcery.com>
+2022-01-13 Thomas Schwinge <thomas@codesourcery.com>
- PR middle-end/90115
- * c-c++-common/goacc/privatization-1-compute-loop.c: New file.
- * c-c++-common/goacc/privatization-1-compute.c: Likewise.
- * c-c++-common/goacc/privatization-1-routine_gang-loop.c:
- Likewise.
- * c-c++-common/goacc/privatization-1-routine_gang.c: Likewise.
+ * c-c++-common/goacc/builtin-goacc-parlevel-id-size.c: Document
+ current '-Wuninitialized' diagnostics.
+ * c-c++-common/goacc/mdc-1.c: Likewise.
+ * c-c++-common/goacc/nested-reductions-1-kernels.c: Likewise.
+ * c-c++-common/goacc/nested-reductions-1-parallel.c: Likewise.
+ * c-c++-common/goacc/nested-reductions-1-routine.c: Likewise.
+ * c-c++-common/goacc/nested-reductions-2-kernels.c: Likewise.
+ * c-c++-common/goacc/nested-reductions-2-parallel.c: Likewise.
+ * c-c++-common/goacc/nested-reductions-2-routine.c: Likewise.
+ * c-c++-common/goacc/uninit-dim-clause.c: Likewise.
+ * c-c++-common/goacc/uninit-firstprivate-clause.c: Likewise.
+ * c-c++-common/goacc/uninit-if-clause.c: Likewise.
+ * gfortran.dg/goacc/array-with-dt-1.f90: Likewise.
+ * gfortran.dg/goacc/array-with-dt-2.f90: Likewise.
+ * gfortran.dg/goacc/array-with-dt-3.f90: Likewise.
+ * gfortran.dg/goacc/array-with-dt-4.f90: Likewise.
+ * gfortran.dg/goacc/array-with-dt-5.f90: Likewise.
+ * gfortran.dg/goacc/derived-chartypes-1.f90: Likewise.
+ * gfortran.dg/goacc/derived-chartypes-2.f90: Likewise.
+ * gfortran.dg/goacc/derived-chartypes-3.f90: Likewise.
+ * gfortran.dg/goacc/derived-chartypes-4.f90: Likewise.
+ * gfortran.dg/goacc/derived-classtypes-1.f95: Likewise.
+ * gfortran.dg/goacc/derived-types-2.f90: Likewise.
+ * gfortran.dg/goacc/host_data-tree.f95: Likewise.
+ * gfortran.dg/goacc/kernels-tree.f95: Likewise.
+ * gfortran.dg/goacc/modules.f95: Likewise.
+ * gfortran.dg/goacc/nested-reductions-1-kernels.f90: Likewise.
+ * gfortran.dg/goacc/nested-reductions-1-parallel.f90: Likewise.
+ * gfortran.dg/goacc/nested-reductions-1-routine.f90: Likewise.
+ * gfortran.dg/goacc/nested-reductions-2-kernels.f90: Likewise.
+ * gfortran.dg/goacc/nested-reductions-2-parallel.f90: Likewise.
+ * gfortran.dg/goacc/nested-reductions-2-routine.f90: Likewise.
+ * gfortran.dg/goacc/parallel-tree.f95: Likewise.
+ * gfortran.dg/goacc/pr93464.f90: Likewise.
* gfortran.dg/goacc/privatization-1-compute-loop.f90: Likewise.
* gfortran.dg/goacc/privatization-1-compute.f90: Likewise.
* gfortran.dg/goacc/privatization-1-routine_gang-loop.f90:
Likewise.
* gfortran.dg/goacc/privatization-1-routine_gang.f90: Likewise.
- * c-c++-common/goacc-gomp/nesting-1.c: Update.
- * c-c++-common/goacc/private-reduction-1.c: Likewise.
- * gfortran.dg/goacc/private-3.f95: Likewise.
-
-2021-05-21 Thomas Schwinge <thomas@codesourcery.com>
-
- * lib/target-supports.exp (check_effective_target___OPTIMIZE__):
- New proc.
- * gcc.c-torture/compile/ssa-unused-1.c: New file.
-
-2021-05-21 Richard Biener <rguenther@suse.de>
- H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/pr90773-24.c: New test.
- * gcc.target/i386/pr90773-25.c: Likewise.
-
-2021-05-21 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/100637
- * g++.target/i386/pr100637-1b.C: New test.
- * g++.target/i386/pr100637-1w.C: Ditto.
- * gcc.target/i386/pr100637-2b.c: Ditto.
- * gcc.target/i386/pr100637-2w.c: Ditto.
-
-2021-05-21 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/derived_type7.adb, gnat.dg/derived_type7.ads: New test.
-
-2021-05-20 Jason Merrill <jason@redhat.com>
-
- * g++.dg/cpp2a/desig19.C: New test.
-
-2021-05-20 Jason Merrill <jason@redhat.com>
-
- PR c++/100489
- * g++.dg/cpp2a/desig18.C: New test.
-
-2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
-
- * gcc.dg/pch/valid-1.c: Adjust diagnostic message in testcase.
- * lib/dg-pch.exp: Adjust diagnostic message.
-
-2021-05-20 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/100684
- * g++.dg/warn/Wnonnull13.C: New test.
- * g++.dg/warn/Wnonnull14.C: New test.
- * g++.dg/warn/Wnonnull15.C: New test.
-
-2021-05-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
-
- * g++.dg/modules/omp-1_c.C: Fix testcase.
-
-2021-05-20 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/100701
- * gcc.target/i386/pr100701.c: New test.
-
-2021-05-20 Marcel Vollweiler <marcel@codesourcery.com>
-
- * gfortran.dg/gomp/map-6.f90: New test.
- * gfortran.dg/gomp/map-7.f90: New test.
- * gfortran.dg/gomp/map-8.f90: New test.
-
-2021-05-20 Eric Botcazou <ebotcazou@adacore.com>
-
- PR testsuite/96488
- * gnat.dg/unchecked_convert5.adb: Do not run on PowerPC64 LE.
- * gnat.dg/unchecked_convert6.adb: Likewise.
-
-2021-05-20 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/100637
- * gcc.target/i386/pr100637-1w.c (shl, ashr, lshr): New tests.
-
-2021-05-20 Christophe Lyon <christophe.lyon@linaro.org>
- Torbjörn Svensson <torbjorn.svensson@st.com>
-
- PR c/42579
- * c-c++-common/spellcheck-reserved.c: Add tests for __FILE_NAME__.
- * c-c++-common/cpp/file-name-1.c: New test.
-
-2021-05-20 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/96983
- * gfortran.dg/pr96711.f90: Use 2**digit(x) instead of a hard-coded value;
- add comments regarding what the code does.
-
-2021-05-20 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/99928
- * c-c++-common/gomp/pr99928-4.c: Remove all xfails.
- * c-c++-common/gomp/pr99928-5.c: Likewise.
-
-2021-05-20 Jakub Jelinek <jakub@redhat.com>
-
- PR preprocessor/100646
- * gcc.dg/cpp/pr100646-1.c: New test.
- * gcc.dg/cpp/pr100646-2.c: New test.
-
-2021-05-20 Jason Merrill <jason@redhat.com>
-
- PR c++/100634
- * g++.dg/cpp2a/nontype-complex1.C: New test.
-
-2021-05-20 Jason Merrill <jason@redhat.com>
-
- PR c++/100659
- * g++.dg/parse/access13.C: New test.
-
-2021-05-19 Martin Sebor <msebor@redhat.com>
-
- PR c/100619
- * gcc.dg/pr100619.c: New test.
-
-2021-05-19 Jason Merrill <jason@redhat.com>
-
- PR c++/100367
- PR c++/96299
- * g++.dg/cpp2a/spaceship-fallback1.C: New test.
-
-2021-05-19 Jason Merrill <jason@redhat.com>
-
- * g++.dg/cpp1z/class-deduction-access1.C: New test.
- * g++.dg/cpp1z/class-deduction-access2.C: New test.
-
-2021-05-19 Marek Polacek <polacek@redhat.com>
-
- PR c++/100596
- * g++.dg/cpp0x/friend7.C: Turn a few dg-warnings into dg-errors.
- Remove dg-errors for GNU attributes.
- * g++.dg/ext/attrib63.C: Remove dg-error.
- * g++.dg/cpp0x/friend8.C: New test.
-
-2021-05-19 Kito Cheng <kito.cheng@sifive.com>
-
- * g++.dg/modules/omp-1_a.C: Check pthread is available.
- * g++.dg/modules/omp-1_b.C: Ditto.
- * g++.dg/modules/omp-1_c.C: Ditto.
- * g++.dg/modules/omp-2_a.C: Ditto.
- * g++.dg/modules/omp-2_b.C: Ditto.
-
-2021-05-19 Alex Coplan <alex.coplan@arm.com>
-
- PR target/100333
- * gcc.target/arm/cmse/pr100333.c: New test.
-
-2021-05-19 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/99977
- * gcc.target/arm/pr99977.c: Require arm_arch_v8m_base.
-
-2021-05-19 Geng Qi <gengqi@linux.alibaba.com>
-
- * gcc.target/riscv/arch-12.c: New.
- * gcc.target/riscv/attribute-19.c: New.
-
-2021-05-19 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/narrow_high_combine.c: New test.
-
-2021-05-19 Richard Biener <rguenther@suse.de>
-
- PR middle-end/100672
- * gcc.dg/torture/pr100672.c: New testcase.
-
-2021-05-19 Martin Liska <mliska@suse.cz>
-
- PR testsuite/100658
- * gcc.dg/local1.c: Fix typos.
- * gcc.dg/ucnid-5-utf8.c: Likewise.
- * gcc.dg/ucnid-5.c: Likewise.
-
-2021-05-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
-
- * gcc.target/aarch64/sve/logical_unpacked_and_2.c: Change
- scan-assembly-times to scan-assembly not for superfluous uxtb.
- * gcc.target/aarch64/sve/logical_unpacked_and_3.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_and_4.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_and_6.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_and_7.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_eor_2.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_eor_3.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_eor_4.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_eor_6.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_eor_7.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_orr_2.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_orr_3.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_orr_4.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_orr_6.c: Likewise.
- * gcc.target/aarch64/sve/logical_unpacked_orr_7.c: Likewise.
- * gcc.target/aarch64/sve/ld1_extend.c: New test.
-
-2021-05-19 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/100576
- * gcc.c-torture/compile/pr100576.c: New test.
-
-2021-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
-
- * gcc.dg/tree-ssa/ssa-sink-3.c: Fix test case.
-
-2021-05-19 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/99928
- * c-c++-common/gomp/pr99928-2.c: Remove all xfails.
- * c-c++-common/gomp/pr99928-12.c: New test.
-
-2021-05-19 Xionghu Luo <luoxhu@linux.ibm.com>
-
- * gcc.dg/tree-ssa/ssa-sink-1.c: Adjust.
- * gcc.dg/tree-ssa/ssa-sink-2.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-3.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-4.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-5.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-6.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-7.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-8.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-9.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-10.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-13.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-14.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-16.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-17.c: Ditto.
- * gcc.dg/tree-ssa/ssa-sink-18.c: New.
-
-2021-05-19 Jason Merrill <jason@redhat.com>
-
- PR c++/100261
- * g++.dg/dfp/mangle-6.C: New test.
-
-2021-05-19 Jason Merrill <jason@redhat.com>
-
- PR c++/100372
- * g++.dg/cpp0x/alias-decl-ttp1.C: New test.
-
-2021-05-18 Bill Schmidt <wschmidt@linux.ibm.com>
-
- * gcc.target/powerpc/ppc64-abi-warn-1.c: Remove.
- * gcc.target/powerpc/ppc64-abi-warn-2.c: Remove.
- * gcc.target/powerpc/ppc64-abi-warn-3.c: Remove.
-
-2021-05-18 Jason Merrill <jason@redhat.com>
-
- PR c++/100205
- PR c++/99314
- * g++.dg/cpp0x/decltype-nonstatic1.C: New test.
-
-2021-05-18 Jason Merrill <jason@redhat.com>
-
- * g++.dg/cpp0x/implicit-delete1.C: New test.
-
-2021-05-18 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/100615
- * gcc.dg/analyzer/pr100615.c: New test.
-
-2021-05-18 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/100637
- * gcc.target/i386/pr100637-1b.c: New test.
- * gcc.target/i386/pr100637-1w.c: Ditto.
- * gcc.target/i386/pr92658-avx2-2.c: Do not XFAIL scan for pmovsxbq.
- * gcc.target/i386/pr92658-avx2.c: Do not XFAIL scan for pmovzxbq.
- * gcc.target/i386/pr92658-avx512vl.c: Do not XFAIL scan for vpmovdb.
- * gcc.target/i386/pr92658-sse4-2.c: Do not XFAIL scan for
- pmovsxbd and pmovsxwq.
- * gcc.target/i386/pr92658-sse4.c: Do not XFAIL scan for
- pmovzxbd and pmovzxwq.
-
-2021-05-18 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/100642
- * gfortran.dg/goacc-gomp/depobj.f90: New test.
-
-2021-05-18 Thomas Schwinge <thomas@codesourcery.com>
-
- * lib/gcc-dg.exp: Implement 'dg-note'.
- * lib/prune.exp: Likewise.
- * gcc.dg/vect/nodump-vect-opt-info-2.c: Use 'dg-note', and
- 'dg-prune-output "note: ".
- * gfortran.dg/goacc/routine-external-level-of-parallelism-2.f: Use
- 'dg-note', match up additional notes, one class of them with
- XFAILed 'dg-bogus'.
- * lib/lto.exp: Implement 'dg-lto-note'.
- * g++.dg/lto/odr-1_0.C: Use 'dg-lto-note', match up additional
- notes.
- * g++.dg/lto/odr-1_1.C: Likewise.
- * g++.dg/lto/odr-2_1.C: Likewise.
-
-2021-05-18 Jakub Jelinek <jakub@redhat.com>
-
- PR rtl-optimization/100590
- * gcc.dg/pr100590.c: New test.
-
-2021-05-18 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/100580
- * g++.dg/other/pr100580.C: New test.
-
-2021-05-18 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/94589
- * g++.dg/opt/pr94589-2.C: Adjust scan-tree-dump count from 14 to 12.
-
-2021-05-18 Richard Biener <rguenther@suse.de>
-
- * gcc.target/i386/pr100582.c: Adjust for AVX512.
-
-2021-05-18 Richard Biener <rguenther@suse.de>
-
- PR c/100522
- * gcc.dg/gimplefe-error-10.c: New testcase.
-
-2021-05-18 Richard Biener <rguenther@suse.de>
-
- PR c/100547
- * gcc.dg/pr100547.c: New testcase.
- * gcc.dg/attr-vector_size.c: Adjust.
-
-2021-05-18 Andreas Krebbel <krebbel@linux.ibm.com>
-
- * gcc.target/s390/zvector/vec-_Bool.c: New test.
-
-2021-05-18 Andreas Krebbel <krebbel@linux.ibm.com>
-
- PR c++/100281
- * g++.target/s390/pr100281-1.C: New test.
- * g++.target/s390/pr100281-2.C: New test.
-
-2021-05-17 Andrew MacLeod <amacleod@redhat.com>
-
- PR tree-optimization/100512
- * gcc.dg/pr100512.c: New.
-
-2021-05-17 Jonathan Wakely <jwakely@redhat.com>
-
- * g++.dg/conversion/pr100635.C: New test.
-
-2021-05-17 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/98411
- * gfortran.dg/pr98411.f90: New test.
-
-2021-05-17 Aldy Hernandez <aldyh@redhat.com>
-
- * gcc.dg/pr100349.c: New test.
-
-2021-05-17 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.target/aarch64/cpunative/info_16: New test.
- * gcc.target/aarch64/cpunative/info_17: New test.
- * gcc.target/aarch64/cpunative/native_cpu_16.c: New test.
- * gcc.target/aarch64/cpunative/native_cpu_17.c: New test.
-
-2021-05-17 Richard Biener <rguenther@suse.de>
-
- PR c/100625
- * gcc.dg/gimplefe-error-9.c: New testcase.
-
-2021-05-17 Richard Biener <rguenther@suse.de>
-
- PR middle-end/100582
- * gcc.target/i386/pr100582.c: New testcase.
-
-2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/mve-compare-3.c: New test with GCC vectors.
- * gcc.target/arm/simd/mve-vcmp-f16.c: New test for
- auto-vectorization.
- * gcc.target/arm/armv8_2-fp16-arith-1.c: Adjust since we now
- vectorize float16_t vectors.
-
-2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/mve-compare-1.c: New test with GCC vectors.
- * gcc.target/arm/simd/mve-compare-2.c: New test with GCC vectors.
- * gcc.target/arm/simd/mve-compare-scalar-1.c: New test with GCC
- vectors.
- * gcc.target/arm/simd/mve-vcmp-f32.c: New test for
- auto-vectorization.
- * gcc.target/arm/simd/mve-vcmp.c: New test for auto-vectorization.
-
-2021-05-17 liuhongt <hongtao.liu@intel.com>
-
- PR target/100549
- * gcc.target/i386/pr100549.c: New test.
-
-2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/mve-vadd-scalar-1.c: New.
-
-2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/mve-vadd-1.c: New.
-
-2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/mve-vsub_1.c: Factorize and add __fp16 test.
-
-2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/mve-vshr.c: Add more scan-assembler-times.
-
-2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/acle/saturation.c: Use arm_sat_ok effective
- target.
- * lib/target-supports.exp
- (check_effective_target_arm_qbit_ok_nocache): Rename into...
- (check_effective_target_arm_sat_ok_nocache): ... this. Check
- __ARM_FEATURE_SAT and use armv6.
-
-2021-05-17 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/100633
- * gfortran.dg/gomp/workshare-59.f90: New test.
-
-2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR debug/100515
- * gcc.dg/debug/dwarf2/pr100515.c: Require openmp effective-target.
-
-2021-05-16 David Edelsohn <dje.gcc@gmail.com>
-
- * g++.dg/ext/attrib63.C: Add -Wno-psabi option.
-
-2021-05-16 David Edelsohn <dje.gcc@gmail.com>
-
- * g++.dg/warn/uninit-pr93100.C: Require fsantize support.
-
-2021-05-16 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/unsigned-float.c: Remove arm_fp_ok, adjust
- dg-options.
-
-2021-05-15 Bill Schmidt <wschmidt@linux.ibm.com>
-
- * gcc.target/powerpc/rop-1.c: New.
- * gcc.target/powerpc/rop-2.c: New.
- * gcc.target/powerpc/rop-3.c: New.
- * gcc.target/powerpc/rop-4.c: New.
- * gcc.target/powerpc/rop-5.c: New.
-
-2021-05-15 Martin Jambor <mjambor@suse.cz>
-
- Revert:
- 2021-05-15 Martin Jambor <mjambor@suse.cz>
-
- PR tree-optimization/100453
- * gcc.dg/tree-ssa/pr100453.c: New test.
-
-2021-05-15 Jakub Jelinek <jakub@redhat.com>
-
- PR rtl-optimization/100342
- * gcc.target/i386/pr100342.c: New test.
-
-2021-05-14 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/gomp/parallel-master-1.f90: New test.
- * gfortran.dg/gomp/parallel-master-2.f90: New test.
-
-2021-05-14 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/gomp/implicit-save.f90: New test.
-
-2021-05-14 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/95226
- * g++.dg/cpp1y/pr95226.C: New test.
-
-2021-05-14 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/94616
- * g++.dg/cpp0x/pr94616.C: New test.
-
-2021-05-14 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/90019
- * g++.dg/cpp0x/sfinae68.C: New test.
-
-2021-05-14 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/cpp1y/pr88872.C: New test.
-
-2021-05-14 Michael de Lang <kingoipo@gmail.com>
-
- * g++.dg/tsan/pthread_cond_clockwait.C: New test.
-
-2021-05-14 Marek Polacek <polacek@redhat.com>
- Jason Merrill <jason@redhat.com>
-
- PR c++/99032
- * g++.dg/cpp0x/friend7.C: New test.
- * g++.dg/cpp0x/gen-attrs-4.C: Add dg-error.
- * g++.dg/cpp0x/gen-attrs-39-1.C: Likewise.
- * g++.dg/cpp0x/gen-attrs-74.C: New test.
- * g++.dg/ext/attrib63.C: New test.
-
-2021-05-13 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/93100
- PR middle-end/98583
- * g++.dg/warn/uninit-pr93100.C: New test.
- * gcc.dg/uninit-pr93100.c: New test.
- * gcc.dg/uninit-pr98583.c: New test.
-
-2021-05-13 Martin Jambor <mjambor@suse.cz>
-
- PR tree-optimization/100453
- * gcc.dg/tree-ssa/pr100453.c: New test.
-
-2021-05-13 Martin Sebor <msebor@redhat.com>
-
- * g++.dg/pr100574.C: Use size_t as operator new argument type.
-
-2021-05-13 Martin Liska <mliska@suse.cz>
-
- PR middle-end/100504
- * gcc.target/i386/pr100504.c: New test.
-
-2021-05-13 Martin Sebor <msebor@redhat.com>
-
- PR c/100550
- * gcc.dg/Wvla-parameter-9.c: New test.
-
-2021-05-13 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/99928
- * c-c++-common/gomp/pr99928-1.c: New test.
- * c-c++-common/gomp/pr99928-2.c: New test.
- * c-c++-common/gomp/pr99928-3.c: New test.
- * c-c++-common/gomp/pr99928-4.c: New test.
- * c-c++-common/gomp/pr99928-5.c: New test.
- * c-c++-common/gomp/pr99928-6.c: New test.
- * c-c++-common/gomp/pr99928-7.c: New test.
- * c-c++-common/gomp/pr99928-8.c: New test.
- * c-c++-common/gomp/pr99928-9.c: New test.
- * c-c++-common/gomp/pr99928-10.c: New test.
- * c-c++-common/gomp/pr99928-11.c: New test.
-
-2021-05-13 Richard Earnshaw <rearnsha@arm.com>
-
- PR target/100563
- * gcc.dg/pr100563.c (dg-options): Add -wno-pointer-to-int-cast.
-
-2021-05-13 Richard Earnshaw <rearnsha@arm.com>
-
- * gcc.dg/pr100563.c: New test.
-
-2021-05-13 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/98856
- * gcc.target/i386/sse2-psraq-1.c: New test.
- * gcc.target/i386/sse4_2-psraq-1.c: New test.
- * gcc.target/i386/avx-psraq-1.c: New test.
- * gcc.target/i386/avx2-psraq-1.c: New test.
- * gcc.target/i386/avx-pr82370.c: Adjust expected number of vpsrad
- instructions.
- * gcc.target/i386/avx2-pr82370.c: Likewise.
- * gcc.target/i386/avx512f-pr82370.c: Likewise.
- * gcc.target/i386/avx512bw-pr82370.c: Likewise.
- * gcc.dg/torture/vshuf-4.inc: Add two further permutations.
- * gcc.dg/torture/vshuf-8.inc: Likewise.
-
-2021-05-13 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/100581
- * g++.target/i386/pr100581.C: New test.
-
-2021-05-13 Eric Botcazou <ebotcazou@adacore.com>
-
- PR testsuite/100569
- * gnat.dg/lto21.adb: Prune new LTO warning.
-
-2021-05-13 Martin Liska <mliska@suse.cz>
-
- PR testsuite/100569
- * gcc.dg/atomic/c11-atomic-exec-2.c: Prune new LTO warning.
- * gcc.dg/torture/pr94947-1.c: Likewise.
-
-2021-05-13 liuhongt <hongtao.liu@intel.com>
-
- * gcc.target/i386/avx-pr94680.c: Fix typo in testcase.
-
-2021-05-13 liuhongt <hongtao.liu@intel.com>
-
- PR target/94680
- * gcc.target/i386/avx-pr94680.c: New test.
- * gcc.target/i386/avx512f-pr94680.c: New test.
- * gcc.target/i386/sse2-pr94680.c: New test.
-
-2021-05-12 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/100571
- * gcc.dg/Wstringop-overflow-67.c: New test.
-
-2021-05-12 Aldy Hernandez <aldyh@redhat.com>
-
- PR c/100521
- * gcc.dg/pr100521.c: New file.
-
-2021-05-12 Marek Polacek <polacek@redhat.com>
-
- * g++.dg/warn/Wint-in-bool-context-2.C: New test.
-
-2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
-
- * c-c++-common/gomp/map-6.c: New test.
- * c-c++-common/gomp/map-7.c: New test.
-
-2021-05-12 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100566
- * gcc.dg/torture/pr100566.c: New testcase.
-
-2021-05-12 Jakub Jelinek <jakub@redhat.com>
-
- PR preprocessor/100392
- * gcc.dg/cpp/pr100392.c: New test.
- * gcc.dg/cpp/pr100392.h: New file.
-
-2021-05-12 Martin Liska <mliska@suse.cz>
-
- * lib/lto.exp: When running tests without jobserver, one can see
- the following warning for tests that use 1to1 partitioning.
-
-2021-05-12 liuhongt <hongtao.liu@intel.com>
-
- PR target/99908
- * gcc.target/i386/avx2-pr99908.c: New test.
- * gcc.target/i386/sse4_1-pr99908.c: New test.
-
-2021-05-12 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100519
- * gcc.dg/torture/pr100519.c: New testcase.
-
-2021-05-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
-
- PR debug/100515
- * gcc.dg/debug/dwarf2/pr100515.c: New testcase.
-
-2021-05-12 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/100508
- * gcc.dg/gomp/pr100508.c: New test.
-
-2021-05-12 Jakub Jelinek <jakub@redhat.com>
- Marc Glisse <marc.glisse@inria.fr>
-
- PR tree-optimization/94589
- * gcc.dg/tree-ssa/pr94589-1.c: New test.
-
-2021-05-12 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/98218
- * g++.target/i386/pr98218-1.C: Ditto.
- * gcc.target/i386/pr98218-4.c: New test.
- * gcc.target/i386/pr98218-1.c: Correct PR number.
- * gcc.target/i386/pr98218-1a.c: Ditto.
- * gcc.target/i386/pr98218-2.c: Ditto.
- * gcc.target/i386/pr98218-2a.c: Ditto.
- * gcc.target/i386/pr98218-3.c: Ditto.
- * gcc.target/i386/pr98218-3a.c: Ditto.
-
-2021-05-11 Joseph Myers <joseph@codesourcery.com>
-
- * gcc.dg/cpp/c11-elifdef-1.c, gcc.dg/cpp/c2x-elifdef-1.c,
- gcc.dg/cpp/c2x-elifdef-2.c: New tests.
-
-2021-05-11 Joseph Myers <joseph@codesourcery.com>
-
- * g++.dg/cpp1y/digit-sep-paste.C, gcc.dg/c2x-digit-separators-3.c:
- New tests.
-
-2021-05-11 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
-
- * gcc.dg/guality/pr43077-1.c: Align types of output and input
- operands by lifting immediates to type long.
-
-2021-05-11 Joseph Myers <joseph@codesourcery.com>
-
- * gcc.dg/c11-digit-separators-1.c,
- gcc.dg/c2x-digit-separators-1.c, gcc.dg/c2x-digit-separators-2.c:
- New tests.
-
-2021-05-11 Jason Merrill <jason@redhat.com>
-
- PR c++/100517
- * g++.dg/ext/vector41.C: New test.
-
-2021-05-11 Martin Liska <mliska@suse.cz>
-
- * gfortran.dg/goacc/pr78027.f90: Remove -Wno-hsa option.
- * brig.dg/README: Removed.
- * brig.dg/dg.exp: Removed.
- * brig.dg/test/gimple/alloca.hsail: Removed.
- * brig.dg/test/gimple/atomics.hsail: Removed.
- * brig.dg/test/gimple/branches.hsail: Removed.
- * brig.dg/test/gimple/fbarrier.hsail: Removed.
- * brig.dg/test/gimple/function_calls.hsail: Removed.
- * brig.dg/test/gimple/internal-casts.hsail: Removed.
- * brig.dg/test/gimple/kernarg.hsail: Removed.
- * brig.dg/test/gimple/mem.hsail: Removed.
- * brig.dg/test/gimple/mulhi.hsail: Removed.
- * brig.dg/test/gimple/packed.hsail: Removed.
- * brig.dg/test/gimple/priv-array-offset-access.hsail: Removed.
- * brig.dg/test/gimple/smoke_test.hsail: Removed.
- * brig.dg/test/gimple/variables.hsail: Removed.
- * brig.dg/test/gimple/vector.hsail: Removed.
- * lib/brig-dg.exp: Removed.
- * lib/brig.exp: Removed.
-
-2021-05-11 Alex Coplan <alex.coplan@arm.com>
-
- PR target/99725
- * gcc.target/arm/cmse/pr99725.c: New test.
-
-2021-05-11 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/fmul_lane_1.c: New test.
-
-2021-05-11 Richard Biener <rguenther@suse.de>
-
- PR middle-end/100509
- * gcc.dg/pr100509.c: New testcase.
-
-2021-05-11 Robin Dapp <rdapp@linux.ibm.com>
-
- * gcc.target/s390/risbg-ll-3.c: Change match pattern.
-
-2021-05-11 Patrick Palka <ppalka@redhat.com>
-
- PR c++/51577
- * g++.dg/lookup/operator-3.C: New test.
-
-2021-05-11 Patrick Palka <ppalka@redhat.com>
-
- PR c++/100138
- * g++.dg/cpp2a/concepts-ctad4.C: New test.
-
-2021-05-10 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/specs/opt5.ads: New test.
- * gnat.dg/specs/opt5_pkg.ads: New helper.
-
-2021-05-10 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/100425
- PR middle-end/100510
- * c-c++-common/Walloca-larger-than.C: New test.
- * gcc.dg/Walloca-larger-than-4.c: New test.
- * gcc.dg/Wvla-larger-than-5.c: New test.
- * gcc.dg/pr79972.c: Remove unexpected warning directive.
-
-2021-05-10 Pat Haugen <pthaugen@linux.ibm.com>
-
- * gcc.target/powerpc/fold-vec-insert-float-p9.c: Adjust counts.
- * gcc.target/powerpc/vec-rlmi-rlnm.c: Likewise.
-
-2021-05-10 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/mve-vmul-scalar-1.c: New.
-
-2021-05-10 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/mve-vsub-scalar-1.c: New test.
-
-2021-05-10 H.J. Lu <hjl.tools@gmail.com>
-
- PR tree-optimization/42587
- * gcc.dg/optimize-bswapsi-6.c: New test.
-
-2021-05-10 Richard Biener <rguenther@suse.de>
-
- PR testsuite/100452
- * g++.dg/vect/slp-pr99971.cc: Align data.
-
-2021-05-10 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100492
- * gcc.dg/torture/pr100492.c: New testcase.
-
-2021-05-10 Richard Biener <rguenther@suse.de>
-
- PR middle-end/100464
- PR c++/100468
- * gcc.dg/pr100464.c: New testcase.
- * g++.dg/tree-ssa/array-temp1.C: Adjust.
-
-2021-05-10 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100434
- * gcc.dg/tree-ssa/ssa-dse-43.c: New testcase.
-
-2021-05-10 Alex Coplan <alex.coplan@arm.com>
-
- PR target/99960
- * gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_s64.c:
- Update now that we're (correctly) using full 128-bit vector
- loads/stores.
- * gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_u64.c:
- Likewise.
- * gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_z_s64.c:
- Likewise.
- * gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_z_u64.c:
- Likewise.
- * gcc.target/arm/mve/intrinsics/vuninitializedq_int.c: Likewise.
- * gcc.target/arm/mve/intrinsics/vuninitializedq_int1.c:
- Likewise.
-
-2021-05-08 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/46991
- * gfortran.dg/class_dummy_7.f90: Correct PR number.
-
-2021-05-08 Eric Botcazou <ebotcazou@adacore.com>
-
- * gcc.dg/sso-9.c: Delete.
-
-2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/debug18.adb: New test.
-
-2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
-
- * gcc.dg/sso-12.c: New test.
-
-2021-05-07 Jason Merrill <jason@redhat.com>
-
- * g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C:
- Adjust diagnostic.
-
-2021-05-07 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR tree-optimization/79333
- * gcc.dg/tree-ssa/ssa-fre-94.c: Require c99_runtime.
-
-2021-05-07 Jakub Jelinek <jakub@redhat.com>
-
- PR c/100450
- * c-c++-common/gomp/pr100450.c: New test.
-
-2021-05-07 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/100445
- * gcc.target/i386/pr100445-1.c: New test.
-
-2021-05-07 Jakub Jelinek <jakub@redhat.com>
-
- PR target/100445
- * gcc.target/i386/pr100445.c: New test.
-
-2021-05-06 Joseph Myers <joseph@codesourcery.com>
-
- PR c++/83873
- PR preprocessor/97604
- * g++.dg/cpp1y/digit-sep-neg-2.C,
- g++.dg/cpp1y/digit-sep-pp-number.C: New tests.
- * g++.dg/cpp1y/digit-sep-line-neg.C, g++.dg/cpp1y/digit-sep-neg.C:
- Adjust expected messages.
-
-2021-05-06 Martin Jambor <mjambor@suse.cz>
-
- * gcc.dg/ipa/ipa-sra-1.c (main): Revert change done by
- 05193687dde, make the argv again pointer to an array.
-
-2021-05-06 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/opt93.adb: Compile only for LP64 targets.
-
-2021-05-06 Robin Dapp <rdapp@linux.ibm.com>
-
- * lib/target-supports.exp: Add s390 checks for vect conversions.
-
-2021-05-06 Robin Dapp <rdapp@linux.ibm.com>
-
- * gcc.dg/vect/pr56541.c: Add vect_floatint_cvt.
-
-2021-05-06 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/46991
- PR fortran/99819
- * gfortran.dg/class_dummy_6.f90: New test.
- * gfortran.dg/class_dummy_7.f90: New test.
-
-2021-05-06 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR testsuite/100355
- * gcc.c-torture/execute/ieee/cdivchkld.x: New.
-
-2021-05-06 Marius Hillenbrand <mhillen@linux.ibm.com>
-
- * gcc.target/s390/zvector/imm-range-error-1.c: Fix test for
- __builtin_s390_vpdi.
- * gcc.target/s390/zvector/vec-permi.c: New test for builtin
- vec_permi.
-
-2021-05-06 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/94589
- * gcc.dg/pr94589-1.c: New test.
- * gcc.dg/pr94589-2.c: New test.
- * gcc.dg/pr94589-3.c: New test.
- * gcc.dg/pr94589-4.c: New test.
- * g++.dg/opt/pr94589-1.C: New test.
- * g++.dg/opt/pr94589-2.C: New test.
- * g++.dg/opt/pr94589-3.C: New test.
- * g++.dg/opt/pr94589-4.C: New test.
-
-2021-05-06 Richard Biener <rguenther@suse.de>
-
- PR ipa/100373
- * gcc.dg/pr100373.c: New testcase.
-
-2021-05-05 Eric Botcazou <ebotcazou@adacore.com>
-
- * gcc.c-torture/execute/20210505-1.c: New test.
-
-2021-05-05 Ivan Sorokin <vanyacpp@gmail.com>
-
- PR target/91400
- * gcc.target/i386/pr91400-1.c: New test.
- * gcc.target/i386/pr91400-2.c: Likewise.
-
-2021-05-05 Martin Sebor <msebor@redhat.com>
-
- * gcc.dg/tree-ssa/builtin-sprintf-warn-26.c: New test.
-
-2021-05-05 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/100274
- * gfortran.dg/argument_checking_25.f90: New test.
-
-2021-05-05 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/98218
- * gcc.target/i386/pr98218-1.c: New test.
- * gcc.target/i386/pr98218-1a.c: Ditto.
- * gcc.target/i386/pr98218-2.c: Ditto.
- * gcc.target/i386/pr98218-2a.c: Ditto.
- * gcc.target/i386/pr98218-3.c: Ditto.
- * gcc.target/i386/pr98218-3a.c: Ditto.
- * gcc.dg/vect/vect-bool-cmp.c (dg-final):
- Scan vect tree dump for "LOOP VECTORIZED", not VECTORIZED.
-
-2021-05-05 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/debug17.adb: Minor tweak.
-
-2021-05-05 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/debug8.adb: Minor tweak.
- * gnat.dg/debug11.adb: Likewise.
- * gnat.dg/debug16.adb: Likewise.
- * gnat.dg/debug17.adb: New test.
- * gnat.dg/specs/debug1.ads: Minor tweak.
-
-2021-05-05 Robin Dapp <rdapp@linux.ibm.com>
-
- * gcc.dg/vect/slp-21.c: Add s390.
-
-2021-05-05 Tobias Burnus <tobias@codesourcery.com>
-
- PR testsuite/100422
- * g++.dg/gomp/clause-3.C: Use 'reduction(&:..)' instead of '...(&&:..)'.
-
-2021-05-05 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/79333
- * gcc.dg/tree-ssa/ssa-fre-94.c: New testcase.
- * gcc.dg/graphite/fuse-1.c: Adjust.
- * gcc.dg/pr43864-4.c: Likewise.
-
-2021-05-05 Richard Biener <rguenther@suse.de>
-
- PR middle-end/100394
- * g++.dg/torture/pr100382.C: New testcase.
-
-2021-05-04 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/100307
- * g++.dg/warn/Wplacement-new-size-9.C: New test.
- * gcc.dg/tree-ssa/builtin-sprintf-warn-26.c: New test.
-
-2021-05-04 Martin Sebor <msebor@redhat.com>
-
- * gcc.dg/Wvla-parameter-3.c: Use unique strings in directive names.
-
-2021-05-04 Martin Sebor <msebor@redhat.com>
-
- * gcc.dg/Wvla-parameter-2.c: Use unique strings in directive names.
-
-2021-05-04 Robin Dapp <rdapp@linux.ibm.com>
-
- * gcc.target/s390/oscbreak-1.c: Compile with -O1
- -fschedule-insns
-
-2021-05-04 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100414
- * gcc.dg/pr100414.c: New testcase.
-
-2021-05-04 Tobias Burnus <tobias@codesourcery.com>
-
- * gcc.dg/gomp/clause-1.c: Use 'reduction(&:..)' instead of '...(&&:..)'.
-
-2021-05-04 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/opt94.adb: New file.
- * gnat.dg/opt94_pkg.adb: New file.
- * gnat.dg/opt94_pkg.ads: New file.
-
-2021-05-04 Richard Biener <rguenther@suse.de>
-
- * gcc.dg/tree-ssa/ssa-dse-26.c: Skip on !lp64 targets,
- simplify dump scanning down to one case.
-
-2021-05-04 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100329
- * gcc.dg/torture/pr100329.c: New testcase.
-
-2021-05-04 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100398
- * gcc.dg/torture/pr100398.c: New testcase.
+ * gfortran.dg/goacc/uninit-dim-clause.f95: Likewise.
+ * gfortran.dg/goacc/uninit-firstprivate-clause.f95: Likewise.
+ * gfortran.dg/goacc/uninit-if-clause.f95: Likewise.
+ * gfortran.dg/goacc/uninit-use-device-clause.f95: Likewise.
+ * gfortran.dg/goacc/wait.f90: Likewise.
-2021-05-03 Christophe Lyon <christophe.lyon@linaro.org>
+2022-01-13 Thomas Schwinge <thomas@codesourcery.com>
- * gcc.target/aarch64/advsimd-intrinsics/vmla_float_not_fused.c:
- Fix dg directives order.
- * gcc.target/aarch64/advsimd-intrinsics/vmls_float_not_fused.c:
+ PR middle-end/100280
+ * c-c++-common/goacc/kernels-decompose-pr100280-1.c: New.
+ * c-c++-common/goacc/classify-kernels-parloops.c: Likewise.
+ * c-c++-common/goacc/classify-kernels-unparallelized-parloops.c:
Likewise.
-
-2021-05-03 Jeff Law <jlaw@tachyum.com>
-
- * gcc.dg/tree-ssa/ssa-dse-26.c: Fix expected output for nds32le
- and m32r.
-
-2021-05-03 Patrick Palka <ppalka@redhat.com>
-
- PR c++/100362
- * g++.dg/cpp1y/lambda-generic-100362.C: New test.
-
-2021-05-03 Patrick Palka <ppalka@redhat.com>
-
- PR c++/68942
- PR c++/100344
- * g++.dg/template/call8.C: New test.
- * g++.dg/template/koenig12a.C: New test.
-
-2021-05-03 Jeff Law <jlaw@tachyum.com>
-
- * gcc.dg/tree-ssa/ssa-dse-26.c: Fix expected output for bfin and lm32.
-
-2021-05-03 Marek Polacek <polacek@redhat.com>
-
- PR c++/100055
- * g++.dg/concepts/diagnostic18.C: New test.
-
-2021-05-03 Marek Polacek <polacek@redhat.com>
-
- DR 1312
- * g++.dg/cpp0x/constexpr-cast2.C: Remove XFAILs.
-
-2021-05-03 Jeff Law <jlaw@tachyum.com>
-
- * gcc.dg/tree-ssa/ssa-dse-26.c: Fix xstormy selector.
-
-2021-05-03 Jeff Law <jlaw@tachyum.com>
-
- * gcc.dg/tree-ssa/ssa-dse-26.c: Update expected output for rx too.
-
-2021-05-03 Jeff Law <jlaw@tachyum.com>
-
- * gcc.dg/tree-ssa/ssa-dse-26.c: Update expected output for or1k too.
-
-2021-05-03 Jeff Law <jlaw@tachyum.com>
-
- * gcc.dg/tree-ssa/ssa-dse-26.c: Update expected output for
- cr16 and xstormy16 targets.
-
-2021-05-03 Richard Biener <rguenther@suse.de>
-
- * gcc.dg/tree-ssa/ssa-dse-42.c: New testcase.
- * gcc.dg/pr81192.c: Disable DSE.
-
-2021-05-03 Richard Biener <rguenther@suse.de>
-
- * gcc.dg/tree-ssa/ssa-dse-41.c: New testcase.
-
-2021-05-03 Ilya Leoshkevich <iii@linux.ibm.com>
-
- PR target/100217
- * gcc.target/s390/vector/long-double-asm-in-out-hard-fp-reg.c: New test.
- * gcc.target/s390/vector/long-double-asm-inout-hard-fp-reg.c: New test.
-
-2021-05-02 David Edelsohn <dje.gcc@gmail.com>
-
- * g++.dg/ext/visibility/fvisibility-inlines-hidden-4.C: Expect [BS]
- mapping class on AIX.
- * gcc.c-torture/compile/pr61159.c: XFAIL on AIX.
- * gcc.c-torture/execute/alias-2.c: Same.
- * gcc.dg/alias-7.c: Same.
-
-2021-04-30 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/advsimd-intrinsics/vmla_float_not_fused.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vmls_float_not_fused.c:
- New test.
-
-2021-04-30 Richard Biener <rguenther@suse.de>
-
- PR c++/98032
- * g++.dg/pr98032.C: New testcase.
-
-2021-04-30 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/96513
- * gcc.dg/torture/pr96513.c: New testcase.
-
-2021-04-30 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/98060
- * gcc.target/i386/pr98060.c: New test.
-
-2021-04-30 Roman Zhuykov <zhroma@ispras.ru>
-
- PR rtl-optimization/100225
- PR rtl-optimization/84878
- * gcc.dg/pr100225.c: New test.
-
-2021-04-29 Joseph Myers <joseph@codesourcery.com>
-
- PR preprocessor/82359
- * g++.dg/cpp1y/digit-sep-line.C,
- g++.dg/cpp1y/digit-sep-line-neg.C: New tests.
-
-2021-04-29 Jason Merrill <jason@redhat.com>
-
- * g++.dg/lookup/using-decl1.C: New test.
-
-2021-04-29 Jason Merrill <jason@redhat.com>
-
- PR c++/97974
- * g++.old-deja/g++.law/union4.C: Add expected diagnostic.
-
-2021-04-29 Patrick Palka <ppalka@redhat.com>
-
- PR c++/68942
- * g++.dg/template/koenig12.C: New test.
-
-2021-04-29 Marek Polacek <polacek@redhat.com>
-
- PR c++/94102
- * g++.dg/cpp1z/class-deduction87.C: New test.
-
-2021-04-29 Richard Sandiford <richard.sandiford@arm.com>
-
- PR rtl-optimization/100303
- * g++.dg/torture/pr100303.C: New file.
-
-2021-04-29 H.J. Lu <hjl.tools@gmail.com>
-
- PR middle-end/90773
- * g++.dg/pr90773-1.h: New test.
- * g++.dg/pr90773-1a.C: Likewise.
- * g++.dg/pr90773-1b.C: Likewise.
- * g++.dg/pr90773-1c.C: Likewise.
- * g++.dg/pr90773-1d.C: Likewise.
- * gcc.target/i386/pr90773-1.c: Likewise.
- * gcc.target/i386/pr90773-2.c: Likewise.
- * gcc.target/i386/pr90773-3.c: Likewise.
- * gcc.target/i386/pr90773-4.c: Likewise.
- * gcc.target/i386/pr90773-5.c: Likewise.
- * gcc.target/i386/pr90773-6.c: Likewise.
- * gcc.target/i386/pr90773-7.c: Likewise.
- * gcc.target/i386/pr90773-8.c: Likewise.
- * gcc.target/i386/pr90773-9.c: Likewise.
- * gcc.target/i386/pr90773-10.c: Likewise.
- * gcc.target/i386/pr90773-11.c: Likewise.
- * gcc.target/i386/pr90773-12.c: Likewise.
- * gcc.target/i386/pr90773-13.c: Likewise.
- * gcc.target/i386/pr90773-14.c: Likewise.
-
-2021-04-29 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100253
- * g++.dg/pr100253.C: New testcase.
-
-2021-04-29 Jakub Jelinek <jakub@redhat.com>
-
- PR target/100305
- * gcc.c-torture/compile/pr100305.c: Remove dg-options. Add PR line.
-
-2021-04-29 Jakub Jelinek <jakub@redhat.com>
-
- PR target/100302
- * gcc.target/aarch64/sve/pr100302.c: New test.
-
-2021-04-29 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/100319
- * c-c++-common/gomp/task-detach-3.c: New test.
-
-2021-04-29 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99912
- * gcc.dg/pr95580.c: Disable DSE.
- * gcc.dg/Wrestrict-8.c: Place a use after each memcpy.
- * c-c++-common/ubsan/overflow-negate-3.c: Make asms volatile
- to prevent them from being removed.
- * c-c++-common/ubsan/overflow-sub-4.c: Likewise.
-
-2021-04-29 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/100250
- * gcc.dg/uninit-pr100250.c: New test.
-
-2021-04-29 Joseph Myers <joseph@codesourcery.com>
-
- * gcc.dg/c11-unproto-1.c, gcc.dg/c11-unproto-2.c,
- gcc.dg/c2x-unproto-1.c, gcc.dg/c2x-unproto-2.c: New tests.
-
-2021-04-28 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/gomp/map-5.f90: New test.
-
-2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
-
- * gcc.c-torture/execute/ieee/cdivchkd.c: New test.
- * gcc.c-torture/execute/ieee/cdivchkf.c: Likewise.
- * gcc.c-torture/execute/ieee/cdivchkld.c: Likewise.
-
-2021-04-28 Alexandre Oliva <oliva@adacore.com>
-
- * gcc.target/i386/pr89676.c: Add -fomit-frame-pointer.
-
-2021-04-28 Alexandre Oliva <oliva@adacore.com>
-
- * gcc.dg/debug/dwarf2/inline5.c: Adjust pattern to avoid
- mismatch when asm comments start with "/ ".
-
-2021-04-28 Richard Sandiford <richard.sandiford@arm.com>
-
- PR target/100305
- * gcc.c-torture/compile/pr100305.c: New test.
-
-2021-04-28 José Rui Faustino de Sousa <jrfsousa@gmail.com>
-
- PR fortran/82376
- * gfortran.dg/PR82376.f90: New test.
-
-2021-04-28 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100292
- * gcc.dg/pr100292.c: New testcase.
-
-2021-04-28 Richard Wai <richard@annexi-strayline.com>
-
- * gnat.dg/containers2.adb: New test.
-
-2021-04-28 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/opt93.ads, gnat.dg/opt93.adb: New test.
-
-2021-04-27 Jason Merrill <jason@redhat.com>
-
- PR c++/92145
- * g++.dg/cpp0x/depr-copy3.C: New test.
-
-2021-04-27 Patrick Palka <ppalka@redhat.com>
-
- PR c++/88580
- * g++.dg/cpp0x/variadic182.C: New test.
-
-2021-04-27 Richard Sandiford <richard.sandiford@arm.com>
-
- PR middle-end/100284
- * gcc.target/aarch64/sve/pr81003.c: New test.
-
-2021-04-27 Martin Sebor <msebor@redhat.com>
-
- PR testsuite/100272
- * g++.dg/ext/flexary13.C: Remove malformed directives.
-
-2021-04-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
-
- PR target/100106
- * gcc.c-torture/compile/pr100106.c: New testcase.
-
-2021-04-27 Alex Coplan <alex.coplan@arm.com>
-
- PR target/99977
- * gcc.target/arm/pr99977.c: New test.
-
-2021-04-27 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/100239
- * gcc.dg/pr100239.c: New test.
-
-2021-04-27 Jakub Jelinek <jakub@redhat.com>
-
- PR rtl-optimization/100254
- * g++.dg/opt/pr100254.C: New test.
-
-2021-04-27 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99912
- * gcc.dg/tree-ssa/ldist-33.c: Disable PRE and LIM.
- * gcc.dg/tree-ssa/pr96789.c: Adjust dump file scanned.
- * gcc.dg/tree-ssa/ssa-dse-28.c: Likewise.
- * gcc.dg/tree-ssa/ssa-dse-29.c: Likewise.
-
-2021-04-27 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/95527
- * gcc.dg/tree-ssa/pr95527-2.c: New test.
-
-2021-04-27 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/96696
- * gcc.target/i386/pr96696.c: New test.
-
-2021-04-27 Richard Sandiford <richard.sandiford@arm.com>
-
- PR target/100270
- * gcc.target/aarch64/sve/acle/general-c/pr100270_1.c: New test.
- * gcc.target/aarch64/sve/acle/general-c/sizeless-2.c: Change
- expected error message when subtracting pointers to different
- vector types. Expect warnings when mixing them elsewhere.
- * gcc.target/aarch64/sve/acle/general/attributes_7.c: Remove
- XFAILs. Tweak error messages for some cases.
-
-2021-04-27 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/simd/ssra.c: Use +nosve
- * gcc.target/aarch64/simd/usra.c: Likewise.
-
-2021-04-27 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100051
- * gcc.dg/tree-ssa/ssa-fre-92.c: New testcase.
-
-2021-04-27 Richard Biener <rguenther@suse.de>
-
- PR testsuite/100272
- * gcc.dg/tree-ssa/predcom-1.c: Re-enable PRE and fix
- malformed dg directive.
-
-2021-04-27 Richard Biener <rguenther@suse.de>
-
- PR testsuite/100272
- * g++.dg/diagnostic/ptrtomem1.C: Fix dg directives.
- * g++.dg/ipa/pr45572-2.C: Likewise.
- * g++.dg/template/spec26.C: Likewise.
- * gcc.dg/pr20126.c: Likewise.
- * gcc.dg/tree-ssa/pr20739.c: Likewise.
-
-2021-04-27 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100278
- * gcc.dg/tree-ssa/pr100278.c: New testcase.
-
-2021-04-27 Jakub Jelinek <jakub@redhat.com>
-
- PR target/99405
- * gcc.target/i386/pr99405.c: New test.
-
-2021-04-27 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99776
- * gcc.dg/tree-ssa/ssa-fre-91.c: New testcase.
-
-2021-04-26 Patrick Palka <ppalka@redhat.com>
-
- PR c++/100209
- * g++.dg/cpp1y/constexpr-base1.C: New test.
- * g++.dg/cpp1y/constexpr-ptrsub1.C: New test.
-
-2021-04-26 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/goacc/classify-serial.f95:
- Use [Ww]arning in dg-bogus as FE diagnostic and default
- diagnostic differ and the result depends on ENABLE_OFFLOAD.
- * gfortran.dg/goacc/kernels-decompose-2.f95: Likewise.
- * gfortran.dg/goacc/routine-module-mod-1.f90: Likewise.
-
-2021-04-26 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/goacc/classify-serial.f95:
- Correct spelling in dg-bogus to match -Wopenacc-parallelism.
- * gfortran.dg/goacc/kernels-decompose-2.f95: Likewise.
- * gfortran.dg/goacc/routine-module-mod-1.f90: Likewise.
-
-2021-04-26 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99956
- * gfortran.dg/pr99956.f: New testcase.
-
-2021-04-26 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/cmse/bitfield-1.c: Remove dg-do.
- * gcc.target/arm/cmse/bitfield-2.c: Likewise.
- * gcc.target/arm/cmse/bitfield-3.c: Likewise.
- * gcc.target/arm/cmse/cmse-16.c: Likewise.
- * gcc.target/arm/cmse/struct-1.c: Likewise.
- * gcc.target/arm/cmse/cmse.exp: Set dg-do-what-default depending
- on arm_cmse_hw.
- * lib/target-supports.exp (check_effective_target_arm_cmse_hw):
- New.
-
-2021-04-26 Eric Botcazou <ebotcazou@adacore.com>
-
- * gcc.dg/pr84877.c: XFAIL on SPARC as well.
-
-2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
- Tom de Vries <vries@codesourcery.com>
- Julian Brown <julian@codesourcery.com>
- Kwok Cheung Yeung <kcy@codesourcery.com>
-
- * c-c++-common/goacc/diag-parallelism-1.c: New.
- * c-c++-common/goacc/acc-icf.c: Specify '-Wopenacc-parallelism',
- and match diagnostics, as appropriate.
- * c-c++-common/goacc/classify-kernels-unparallelized.c: Likewise.
+ * c-c++-common/goacc/classify-kernels-unparallelized.c: Test
+ '--param openacc-kernels=decompose'.
* c-c++-common/goacc/classify-kernels.c: Likewise.
- * c-c++-common/goacc/classify-parallel.c: Likewise.
- * c-c++-common/goacc/classify-routine.c: Likewise.
- * c-c++-common/goacc/classify-serial.c: Likewise.
- * c-c++-common/goacc/kernels-decompose-1.c: Likewise.
- * c-c++-common/goacc/kernels-decompose-2.c: Likewise.
- * c-c++-common/goacc/parallel-dims-1.c: Likewise.
- * c-c++-common/goacc/parallel-reduction.c: Likewise.
- * c-c++-common/goacc/pr70688.c: Likewise.
- * c-c++-common/goacc/routine-1.c: Likewise.
- * c-c++-common/goacc/routine-level-of-parallelism-2.c: Likewise.
- * c-c++-common/goacc/uninit-dim-clause.c: Likewise.
- * gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
- * gfortran.dg/goacc/classify-kernels.f95: Likewise.
- * gfortran.dg/goacc/classify-parallel.f95: Likewise.
- * gfortran.dg/goacc/classify-routine.f95: Likewise.
- * gfortran.dg/goacc/classify-serial.f95: Likewise.
- * gfortran.dg/goacc/kernels-decompose-1.f95: Likewise.
- * gfortran.dg/goacc/kernels-decompose-2.f95: Likewise.
- * gfortran.dg/goacc/parallel-tree.f95: Likewise.
- * gfortran.dg/goacc/routine-4.f90: Likewise.
- * gfortran.dg/goacc/routine-level-of-parallelism-1.f90: Likewise.
- * gfortran.dg/goacc/routine-module-mod-1.f90: Likewise.
- * gfortran.dg/goacc/routine-multiple-directives-1.f90: Likewise.
- * gfortran.dg/goacc/uninit-dim-clause.f95: Likewise.
-
-2021-04-26 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99473
- * gcc.dg/tree-ssa/pr99473-1.c: New testcase.
-
-2021-04-25 liuhongt <hongtao.liu@intel.com>
-
- PR target/98911
- * gcc.target/i386/pr98911.c: New test.
- * gcc.target/i386/funcspec-8.c: Replace __builtin_ia32_pcmpgtq
- with __builtin_ia32_pcmpistrm128 since it has been folded.
-
-2021-04-24 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/100244
- * g++.dg/analyzer/pr100244.C: New test.
-
-2021-04-24 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/100154
- * gfortran.dg/pr100154.f90: New test.
-
-2021-04-24 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/100218
- * gfortran.dg/ptr-func-4.f90: New test.
-
-2021-04-24 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.dg/guality/example.c: Update aarch64*-*-* xfails.
- * gcc.dg/guality/guality.c: Likewise.
- * gcc.dg/guality/inline-params.c: Likewise.
- * gcc.dg/guality/loop-1.c: Likewise.
- * gcc.dg/guality/pr36728-1.c: Likewise.
- * gcc.dg/guality/pr36728-2.c: Likewise.
- * gcc.dg/guality/pr36728-3.c: Likewise.
- * gcc.dg/guality/pr41447-1.c: Likewise.
- * gcc.dg/guality/pr54200.c: Likewise.
- * gcc.dg/guality/pr54519-1.c: Likewise.
- * gcc.dg/guality/pr54519-2.c: Likewise.
- * gcc.dg/guality/pr54519-3.c: Likewise.
- * gcc.dg/guality/pr54519-4.c: Likewise.
- * gcc.dg/guality/pr54519-5.c: Likewise.
- * gcc.dg/guality/pr54519-6.c: Likewise.
- * gcc.dg/guality/pr54693-2.c: Likewise.
- * gcc.dg/guality/pr56154-1.c: Likewise.
- * gcc.dg/guality/pr59776.c: Likewise.
- * gcc.dg/guality/pr68860-1.c: Likewise.
- * gcc.dg/guality/pr68860-2.c: Likewise.
- * gcc.dg/guality/pr90074.c: Likewise.
- * gcc.dg/guality/pr90716.c: Likewise.
- * gcc.dg/guality/sra-1.c: Likewise.
-
-2021-04-24 Richard Sandiford <richard.sandiford@arm.com>
-
- * lib/target-supports-dg.exp (selector_expression): Handle any-opts
- and no-opts.
- * gcc.dg/guality/pr41353-1.c: Exclude -O0 from xfail.
- * gcc.dg/guality/pr59776.c: Likewise.
- * gcc.dg/guality/pr54970.c: Likewise -O0 and -Og.
-
-2021-04-24 Patrick Palka <ppalka@redhat.com>
-
- PR c++/89565
- PR c++/93383
- PR c++/95291
- PR c++/99200
- PR c++/99683
- * g++.dg/cpp2a/nontype-class39.C: Remove dg-ice directive.
- * g++.dg/cpp2a/nontype-class45.C: New test.
- * g++.dg/cpp2a/nontype-class46.C: New test.
- * g++.dg/cpp2a/nontype-class47.C: New test.
- * g++.dg/cpp2a/nontype-class48.C: New test.
-
-2021-04-24 Patrick Palka <ppalka@redhat.com>
-
- PR c++/87709
- * g++.dg/cpp1z/class-deduction86.C: New test.
-
-2021-04-23 Michael Meissner <meissner@linux.ibm.com>
-
- PR target/98952
- * gcc.target/powerpc/pr98952.c: New test.
-
-2021-04-23 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/100041
- * gcc.target/i386/pr79514.c (dg-error):
- Expect error for 64bit targets.
-
-2021-04-23 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/100182
- * gcc.target/i386/pr100182.c: New test.
- * gcc.target/i386/pr71245-1.c (dg-final): Xfail scan-assembler-not.
- * gcc.target/i386/pr71245-2.c (dg-final): Ditto.
-
-2021-04-23 Patrick Palka <ppalka@redhat.com>
-
- PR c++/98767
- * g++.dg/concepts/diagnostic17.C: New test.
-
-2021-04-23 Patrick Palka <ppalka@redhat.com>
-
- DR 2374
- * g++.dg/cpp1z/direct-enum-init2.C: New test.
-
-2021-04-23 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99971
- * g++.dg/vect/slp-pr99971.cc: New testcase.
-
-2021-04-23 liuhongt <hongtao.liu@intel.com>
-
- PR target/100093
- * gcc.target/i386/pr100093.c: New test.
-
-2021-04-22 Patrick Palka <ppalka@redhat.com>
-
- PR c++/94508
- * g++.dg/cpp2a/concepts-uneval3.C: New test.
-
-2021-04-22 Patrick Palka <ppalka@redhat.com>
-
- PR c++/77435
- * g++.dg/template/partial-specialization9.C: New test.
-
-2021-04-22 Marek Polacek <polacek@redhat.com>
-
- PR c++/100161
- * g++.dg/warn/Wtype-limits6.C: New test.
-
-2021-04-22 Patrick Palka <ppalka@redhat.com>
-
- PR c++/84689
- * g++.dg/cpp0x/sfinae67.C: New test.
-
-2021-04-22 Patrick Palka <ppalka@redhat.com>
-
- PR c++/16617
- * g++.dg/template/access36.C: New test.
-
-2021-04-22 Tobias Burnus <tobias@codesourcery.com>
-
- * substr_9.f90: Move to ...
- * gfortran.dg/substr_9.f90: ... here.
- * substr_10.f90: Move to ...
- * gfortran.dg/substr_10.f90: ... here.
-
-2021-04-22 Martin Liska <mliska@suse.cz>
-
- PR testsuite/100159
- PR testsuite/100192
- * g++.dg/template/nontype29.C: Fix typos and missing comments.
- * gcc.dg/Warray-bounds-64.c: Likewise.
- * gcc.dg/Warray-parameter.c: Likewise.
- * gcc.dg/Wstring-compare.c: Likewise.
- * gcc.dg/format/gcc_diag-11.c: Likewise.
- * gfortran.dg/array_constructor_3.f90: Likewise.
- * gfortran.dg/matmul_bounds_9.f90: Likewise.
- * gfortran.dg/pr78033.f90: Likewise.
- * gfortran.dg/pr96325.f90: Likewise.
-
-2021-04-22 Uroš Bizjak <ubizjak@gmail.com>
-
- PR target/100119
- * gcc.target/i386/pr100119.c: New test.
-
-2021-04-22 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/99988
- * gcc.target/aarch64/pr99988.c: Skip if not lp64 target.
-
-2021-04-22 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/set_vm_limit.c (set_vm_limit): Call getrlimit, use
- obtained hard limit, and only call setrlimit if new softlimit is lower.
-
-2021-04-22 Richard Biener <rguenther@suse.de>
-
- PR testsuite/100176
- * objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c: Add
- missing return.
-
-2021-04-21 David Edelsohn <dje.gcc@gmail.com>
-
- * gfortran.dg/bind_c_array_params_2.f90: Look for AIX-specific call
- pattern.
-
-2021-04-21 Marek Polacek <polacek@redhat.com>
-
- PR c++/96380
- * g++.dg/cpp0x/enum_base4.C: New test.
- * g++.dg/cpp0x/enum_base5.C: New test.
-
-2021-04-21 Alex Coplan <alex.coplan@arm.com>
-
- PR target/99988
- * gcc.target/aarch64/pr99988.c: New test.
-
-2021-04-21 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/cpp1z/constexpr-lambda26.C: Add dg-additional-options
- -fchecking.
- * g++.dg/cpp1y/auto-fn61.C: Likewise.
- * g++.dg/cpp2a/nontype-class39.C: Likewise.
- * g++.dg/cpp0x/constexpr-52830.C: Likewise.
- * g++.dg/cpp0x/vt-88982.C: Likewise.
- * c-c++-common/goacc/kernels-decompose-ice-1.c: Add -fchecking to
- dg-additional-options.
+ * c-c++-common/goacc/kernels-decompose-2.c: Update.
+ * c-c++-common/goacc/kernels-decompose-ice-1.c: Remove.
* c-c++-common/goacc/kernels-decompose-ice-2.c: Likewise.
+ * gfortran.dg/goacc/classify-kernels-parloops.f95: New.
+ * gfortran.dg/goacc/classify-kernels-unparallelized-parloops.f95:
+ Likewise.
+ * gfortran.dg/goacc/classify-kernels-unparallelized.f95: Test
+ '--param openacc-kernels=decompose'.
+ * gfortran.dg/goacc/classify-kernels.f95: Likewise.
-2021-04-21 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/monitor-2.c: New test.
-
-2021-04-21 Richard Biener <rguenther@suse.de>
-
- PR testsuite/100176
- * g++.dg/compat/struct-layout-1_generate.c: Add missing return.
- * gcc.dg/compat/struct-layout-1_generate.c: Likewise.
-
-2021-04-21 Jakub Jelinek <jakub@redhat.com>
-
- PR rtl-optimization/100148
- * g++.dg/opt/pr100148.C: New test.
-
-2021-04-21 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/gomp/depobj-1.f90: New test.
- * gfortran.dg/gomp/depobj-2.f90: New test.
-
-2021-04-21 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
-
- * gcc.dg/vect/pr71264.c: Xfail on IBM Z due to V4QImode support.
-
-2021-04-21 Richard Sandiford <richard.sandiford@arm.com>
-
- PR middle-end/100130
- * c-c++-common/attr-retain-10.c: New test.
- * c-c++-common/attr-retain-11.c: Likewise.
-
-2021-04-21 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
-
- * gcc.dg/vect/bb-slp-39.c: Change number of times the pattern
- must match for target IBM Z only.
-
-2021-04-20 Jason Merrill <jason@redhat.com>
-
- PR c++/100109
- * g++.dg/cpp0x/lambda/lambda-variadic14.C: New test.
-
-2021-04-20 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
-
- * gcc.target/s390/zero-scratch-regs-1.c: Force test to run for
- z/Architecture only.
-
-2021-04-20 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/100110
- * gfortran.dg/pdt_31.f03: New test.
- * gfortran.dg/pdt_26.f03: Reduce 'builtin_malloc' count from 9
- to 8.
-
-2021-04-19 Marek Polacek <polacek@redhat.com>
-
- PR c++/97536
- * g++.dg/concepts/diagnostic16.C: New test.
-
-2021-04-19 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR d/98457
- * gdc.dg/pr98457.d: New test.
-
-2021-04-19 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/100075
- * gcc.target/aarch64/pr100075.c: Add aarch64_little_endian
- effective target.
-
-2021-04-19 Richard Biener <rguenther@suse.de>
-
- PR preprocessor/100142
- * gcc.dg/pr100142.c: New testcase.
- * g++.dg/diagnostic/pr72803.C: Revert last change.
-
-2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
+2022-01-13 Thomas Schwinge <thomas@codesourcery.com>
- * c-c++-common/goacc/if-clause-2.c: '-fopenacc-kernels=[...]' ->
- '--param=openacc-kernels=[...]'.
- * c-c++-common/goacc/kernels-decompose-1.c: Likewise.
+ * c-c++-common/goacc/kernels-decompose-1.c: Enhance.
* c-c++-common/goacc/kernels-decompose-2.c: Likewise.
* c-c++-common/goacc/kernels-decompose-ice-1.c: Likewise.
* c-c++-common/goacc/kernels-decompose-ice-2.c: Likewise.
* gfortran.dg/goacc/kernels-decompose-1.f95: Likewise.
* gfortran.dg/goacc/kernels-decompose-2.f95: Likewise.
- * gfortran.dg/goacc/kernels-tree.f95: Likewise.
-
-2021-04-19 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/opt92.adb: New test.
-
-2021-04-17 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
-
- * c-c++-common/zero-scratch-regs-8.c: Enable on s390*.
- * c-c++-common/zero-scratch-regs-9.c: Likewise.
- * c-c++-common/zero-scratch-regs-10.c: Likewise.
- * c-c++-common/zero-scratch-regs-11.c: Likewise.
- * gcc.target/s390/zero-scratch-regs-1.c: New test.
-
-2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
-
- PR fortran/100094
- * gfortran.dg/PR100094.f90: New test.
-
-2021-04-16 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/96770
- * gcc.target/arm/pure-code/pr96770.c: Fix scan-assembler-times
- with movt/movw.
-
-2021-04-16 Jakub Jelinek <jakub@redhat.com>
-
- PR target/91710
- * gcc.target/aarch64/pr91710.c: New test.
-
-2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
-
- PR fortran/100018
- * gfortran.dg/PR10018.f90: New test.
-
-2021-04-16 Tamar Christina <tamar.christina@arm.com>
-
- PR target/100048
- * gcc.target/aarch64/sve/pr100048.c: New test.
-
-2021-04-16 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/100111
- * g++.dg/cpp0x/constexpr-100111.C: New test.
-
-2021-04-16 Marek Polacek <polacek@redhat.com>
-
- PR c++/99803
- * g++.dg/cpp2a/typename14.C: Don't expect particular error
- messages.
- * g++.dg/cpp2a/typename19.C: New test.
-
-2021-04-16 Robin Dapp <rdapp@linux.ibm.com>
-
- * gcc.dg/gimplefe-40.c: Moved to...
- * gcc.dg/vect/gimplefe-40.c: ...here.
- * gcc.dg/gimplefe-41.c: Moved to...
- * gcc.dg/vect/gimplefe-41.c: ...here.
-
-2021-04-16 Harald Anlauf <anlauf@gmx.de>
- Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/63797
- * gfortran.dg/pr63797.f90: New test.
-
-2021-04-16 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
-
- * gcc.dg/tree-ssa/pr83403-1.c: Revert
- max-completely-peeled-insns to the default value on IBM Z.
- * gcc.dg/tree-ssa/pr83403-2.c: Likewise.
-
-2021-04-16 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99700
- * g++.dg/cpp2a/constexpr-init21.C: New test.
-
-2021-04-16 Jakub Jelinek <jakub@redhat.com>
-
- PR target/100075
- * gcc.target/aarch64/pr100075.c: New test.
-
-2021-04-16 Richard Sandiford <richard.sandiford@arm.com>
-
- PR rtl-optimization/99596
- * gcc.target/arm/pr99596.c: New test.
-
-2021-04-16 Richard Earnshaw <rearnsha@arm.com>
-
- PR target/100067
- * g++.target/arm/arm.exp (dg_runtest_extra_prunes): Update prune
- template.
- * gcc.target/arm/arm.exp (dg_runtest_extra_prunes): Likewise.
- * g++.target/arm/mve.exp (dg_runtest_extra_prunes): Likewise. Fix
- missing quotes around switch names.
- * gcc.target/arm/mve/mve.exp: (dg_runtest_extra_prunes): Likewise.
-
-2021-04-16 Jakub Jelinek <jakub@redhat.com>
-
- PR target/99767
- * gcc.target/aarch64/pr99767.c: New test.
-
-2021-04-16 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99850
- * g++.dg/cpp23/lambda-specifiers2.C: New test.
-
-2021-04-16 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99833
- * g++.dg/cpp1z/pr99833.C: New test.
- * g++.dg/cpp2a/pr99833.C: New test.
-
-2021-04-16 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
-
- * gcc.dg/unroll-and-jam.c: Revert max-completely-peel-times to
- the default value on IBM Z.
-
-2021-04-16 Jason Merrill <jason@redhat.com>
-
- PR c++/100079
- * g++.dg/abi/mangle71.C: Fix expected mangling.
- * g++.dg/abi/mangle77.C: New test.
- * g++.dg/cpp2a/nontype-class-union1.C: Likewise.
- * g++.dg/cpp2a/nontype-class-equiv1.C: Removed.
- * g++.dg/cpp2a/nontype-class44.C: New test.
-
-2021-04-15 Martin Sebor <msebor@redhat.com>
-
- PR c/99420
- PR c/99972
- * gcc.dg/Warray-parameter-9.c: New test.
- * gcc.dg/Wnonnull-6.c: New test.
- * gcc.dg/Wreturn-type3.c: New test.
- * gcc.dg/Wunused-result.c: New test.
- * gcc.dg/attr-noreturn.c: New test.
- * gcc.dg/attr-returns-nonnull.c: New test.
-
-2021-04-15 Hans-Peter Nilsson <hp@axis.com>
-
- PR middle-end/84877
- * gcc.dg/pr84877.c: Xfail for cris-*-*.
-
-2021-04-15 Jason Merrill <jason@redhat.com>
-
- PR c++/80456
- * g++.dg/cpp0x/constexpr-volatile3.C: New test.
-
-2021-04-15 Martin Sebor <msebor@redhat.com>
-
- * gcc.dg/uninit-pr89230-1.c: New test.
- * gcc.dg/uninit-pr89230-2.c: Same.
-
-2021-04-15 Jason Merrill <jason@redhat.com>
-
- PR c++/100101
- * g++.dg/cpp0x/noexcept67.C: New test.
-
-2021-04-15 Jason Merrill <jason@redhat.com>
-
- PR c++/100091
- * g++.dg/cpp2a/lambda-uneval15.C: New test.
-
-2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
-
- * g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp: Add
- -mtune=generic to the SVE flags.
- * g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp: Likewise.
- * gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp: Likewise.
- * gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp: Likewise.
-
-2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
-
- * lib/gcc-defs.exp (aarch64-arch-dg-options): New procedure.
- (aarch64-with-arch-dg-options): Likewise.
- * g++.target/aarch64/sve/aarch64-sve.exp: Run the tests inside
- aarch64-with-arch-dg-options. Move the default architecture
- flags to the final dg-runtest argument.
- * gcc.target/aarch64/sve/aarch64-sve.exp: Likewise. Dispense with
- DEFAULT_CFLAGS.
- * gcc.target/aarch64/sve2/aarch64-sve2.exp: Likewise.
-
-2021-04-15 Jakub Jelinek <jakub@redhat.com>
-
- PR testsuite/100073
- * gcc.dg/pr86058.c: Enable also on i?86-*-*.
-
-2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
-
- PR c++/98852
- * g++.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp: New file.
- * g++.target/aarch64/advsimd-intrinsics/pr98852.C: New file.
-
-2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
-
- PR c/98852
- * gcc.target/aarch64/advsimd-intrinsics/pr98852.c: New test.
-
-2021-04-15 Jakub Jelinek <jakub@redhat.com>
-
- PR target/100056
- * gcc.target/aarch64/pr100056.c: New test.
-
-2021-04-15 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
-
- * gcc.dg/pr93210.c: Adapt regex in order to also support a
- RESULT_DECL as an operand for a RETURN_EXPR.
-
-2021-04-14 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/pr99929_1.c: New file.
- * gcc.target/aarch64/sve/pr99929_2.c: Likewise.
-
-2021-04-14 Jason Merrill <jason@redhat.com>
-
- PR c++/100078
- * g++.dg/template/dependent-tmpl2.C: New test.
-
-2021-04-14 Jason Merrill <jason@redhat.com>
-
- PR c++/93314
- * g++.dg/parse/uneval1.C: New test.
-
-2021-04-14 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR rtl-optimization/100066
- * gcc.target/i386/pr100066.c: New.
-
-2021-04-14 Martin Sebor <msebor@redhat.com>
-
- * gcc.dg/pr86058.c: Limit to just x86_64.
-
-2021-04-14 Richard Sandiford <richard.sandiford@arm.com>
-
- PR target/99246
- * gcc.target/aarch64/sve/acle/general/pr99246.c: New test.
-
-2021-04-14 Andreas Krebbel <krebbel@linux.ibm.com>
-
- * gcc.target/s390/zvector/imm-range-error-1.c: New test.
- * gcc.target/s390/zvector/vec_msum_u128-1.c: New test.
-
-2021-04-14 Patrick Palka <ppalka@redhat.com>
-
- PR c++/83476
- PR c++/99885
- * g++.dg/cpp1z/class-deduction85.C: New test.
- * g++.dg/template/ref11.C: New test.
-
-2021-04-14 Jason Merrill <jason@redhat.com>
-
- PR c++/99478
- * g++.dg/cpp2a/lambda-uneval14.C: New test.
-
-2021-04-14 Jason Merrill <jason@redhat.com>
-
- PR c++/90674
- * g++.dg/debug/defaulted1.C: New test.
-
-2021-04-14 Jason Merrill <jason@redhat.com>
-
- PR c++/88742
- * g++.dg/debug/cleanup1.C: New test.
- * c-c++-common/Wimplicit-fallthrough-6.c: Adjust diagnostic line.
- * c-c++-common/Wimplicit-fallthrough-7.c: Likewise.
- * g++.dg/cpp2a/constexpr-dtor3.C: Likewise.
- * g++.dg/ext/constexpr-attr-cleanup1.C: Likewise.
- * g++.dg/tm/inherit2.C: Likewise.
- * g++.dg/tm/unsafe1.C: Likewise.
- * g++.dg/warn/Wimplicit-fallthrough-1.C: Likewise.
- * g++.dg/gcov/gcov-2.C: Adjust coverage counts.
-
-2021-04-13 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/82800
- * g++.dg/warn/uninit-pr82800.C: New test.
-
-2021-04-13 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/86058
- * gcc.dg/pr86058.c: New test.
-
-2021-04-13 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99008
- * g++.old-deja/g++.ns/crash3.C: Adjust expected diagnostic.
- * g++.old-deja/g++.ns/template7.C: Likewise.
- * g++.old-deja/g++.pt/crash8.C: Likewise.
-
-2021-04-13 Jason Merrill <jason@redhat.com>
-
- PR c++/100032
- * g++.dg/cpp0x/alias-decl-equiv1.C: New test.
-
-2021-04-13 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/97121
- * g++.dg/cpp2a/spaceship-err6.C: New test.
-
-2021-04-13 Jason Merrill <jason@redhat.com>
-
- PR c++/100054
- * g++.dg/cpp1y/lambda-generic-local-class1.C: New test.
-
-2021-04-13 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99008
- * g++.dg/parse/template2.C: Adjust expected diagnostic.
- * g++.dg/template/error8.C: Likewise.
- * g++.dg/cpp1z/class-deduction84.C: New test.
-
-2021-04-13 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/100053
- * gcc.dg/torture/pr100053.c: New testcase.
- * gcc.dg/tree-ssa/ssa-fre-93.c: Likewise.
-
-2021-04-13 Jason Merrill <jason@redhat.com>
-
- PR c++/91933
- * g++.dg/cpp0x/constexpr-base7.C: New test.
-
-2021-04-13 Nathan Sidwell <nathan@acm.org>
-
- PR preprocessor/99446
- * g++.dg/diagnostic/pr72803.C: Adjust expected column.
-
-2021-04-13 Jakub Jelinek <jakub@redhat.com>
-
- PR target/100028
- * gcc.target/aarch64/pr100028.c: New test.
-
-2021-04-13 Patrick Palka <ppalka@redhat.com>
-
- PR c++/97134
- * g++.dg/cpp2a/nontype-class43.C: New test.
-
-2021-04-13 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99961
- PR c++/99994
- * g++.dg/cpp2a/concepts-uneval1.C: New test.
- * g++.dg/cpp2a/concepts-uneval2.C: New test.
-
-2021-04-13 Hans-Peter Nilsson <hp@axis.com>
-
- PR analyzer/99212
- * gcc.dg/analyzer/data-model-1.c (test_45): Inverse xfail at
- line 971 for cris-*-*.
-
-2021-04-13 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/98599
- * gcc.dg/analyzer/pr98599-a.c: New test.
- * gcc.dg/analyzer/pr98599-b.c: New test.
-
-2021-04-12 Jakub Jelinek <jakub@redhat.com>
-
- PR rtl-optimization/99905
- * gcc.target/i386/pr99905.c: New test.
-
-2021-04-12 Jakub Jelinek <jakub@redhat.com>
-
- PR debug/99830
- * gcc.dg/pr99830.c: New test.
-
-2021-04-12 Jason Merrill <jason@redhat.com>
-
- PR c++/93085
- * g++.dg/template/dependent-tmpl1.C: New test.
-
-2021-04-12 Martin Liska <mliska@suse.cz>
-
- PR sanitizer/99877
- * g++.dg/asan/pr99877.C: New test.
-
-2021-04-12 Cui,Lili <lili.cui@intel.com>
-
- * gcc.target/i386/funcspec-56.inc: Handle new march.
- * g++.target/i386/mv16.C: Handle new march
-
-2021-04-11 Hafiz Abid Qadeer <abidh@codesourcery.com>
-
- PR middle-end/98088
- * c-c++-common/goacc/collapse-2.c: New.
-
-2021-04-11 Jason Merrill <jason@redhat.com>
-
- PR c++/97974
- * g++.dg/lookup/pr84962.C: Adjust diagnostic.
- * g++.dg/other/anon-union5.C: New test.
-
-2021-04-10 Jason Merrill <jason@redhat.com>
-
- PR c++/98800
- * g++.dg/gomp/this-1.C: Adjust diagnostic.
- * g++.dg/cpp0x/constexpr-this1.C: New test.
-
-2021-04-10 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/100011
- * gcc.dg/analyzer/pr100011.c: New test.
-
-2021-04-10 Jakub Jelinek <jakub@redhat.com>
-
- PR c/99990
- * gcc.dg/pr99990.c: New test.
-
-2021-04-10 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/99744
- * gcc.target/i386/pr99744-2.c: New test.
-
-2021-04-10 Jakub Jelinek <jakub@redhat.com>
-
- PR lto/99849
- * gcc.dg/lto/pr99849_0.c: New test.
-
-2021-04-10 Jakub Jelinek <jakub@redhat.com>
-
- PR rtl-optimization/98601
- * gcc.dg/torture/pr98601.c: New test.
-
-2021-04-10 Jason Merrill <jason@redhat.com>
-
- PR c++/99180
- PR c++/93295
- PR c++/93867
- PR c++/95486
- * g++.dg/cpp2a/class-deduction-alias5.C: New test.
- * g++.dg/cpp2a/class-deduction-alias6.C: New test.
- * g++.dg/cpp2a/class-deduction-alias7.C: New test.
- * g++.dg/cpp2a/class-deduction-alias8.C: New test.
-
-2021-04-10 Jason Merrill <jason@redhat.com>
-
- PR c++/100006
- * g++.dg/cpp0x/lambda/lambda-variadic13.C: New test.
-
-2021-04-09 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/55288
- * g++.dg/warn/uninit-pr55288.C: New test.
-
-2021-04-09 Patrick Palka <ppalka@redhat.com>
-
- PR c++/90215
- * g++.dg/cpp1z/fold-lambda4.C: New test.
-
-2021-04-09 Marek Polacek <polacek@redhat.com>
-
- PR c++/99806
- * g++.dg/concepts/abbrev10.C: New test.
- * g++.dg/concepts/abbrev11.C: New test.
-
-2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/pr70398.c: Require a target that can link
- static executables.
-
-2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
-
- * g++.target/aarch64/bfloat_cpp_typecheck.C: Remove XFAILs.
-
-2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
-
- * gfortran.dg/vect/vect-8.f90: Expect 24 loops to be vectorized
- with SVE.
-
-2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
-
- * g++.dg/tree-ssa/pr83518.C: XFAIL for vect_variable_length.
- * gcc.dg/pr96573.c: Likewise.
- * gcc.dg/tree-ssa/pr84512.c: Likewise.
- * gcc.dg/vect/bb-slp-43.c: Likewise.
- * gcc.dg/vect/slp-reduc-11.c: Likewise.
-
-2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.dg/vect/pr65947-7.c: Add a noipa attribute. Expect the
- loop to vectorized if vect_fold_extract_last.
-
-2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/mem-shift-canonical.c: Use an asm instead
- of relying on vectorisation.
-
-2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
-
- PR target/87763
- * gcc.target/aarch64/insv_1.c: XFAIL two scan tests.
-
-2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
-
- PR libfortran/78314
- * gfortran.dg/ieee/ieee_6.f90: Skip for arm* and aarch64*.
- * gfortran.dg/ieee/ieee_8.f90: Likewise.
-
-2021-04-09 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/99817
- * gfortran.dg/coarray/dummy_2.f90: New test.
-
-2021-04-08 David Edelsohn <dje.gcc@gmail.com>
-
- * g++.dg/gomp/tls-5.C: Expect tbss failure on AIX.
-
-2021-04-08 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99874
- * g++.dg/cpp2a/concepts-lambda16.C: New test.
- * g++.dg/cpp2a/concepts-lambda17.C: New test.
-
-2021-04-08 Patrick Palka <ppalka@redhat.com>
-
- PR c++/97679
- * g++.dg/cpp2a/concepts-ctad3.C: New test.
-
-2021-04-08 Richard Sandiford <richard.sandiford@arm.com>
-
- * lib/scanasm.exp (scan-lto-assembler): Update expected name
- of dump file.
-
-2021-04-08 Richard Sandiford <richard.sandiford@arm.com>
-
- * lib/target-supports.exp
- (check_effective_target_stdint_types_mbig_endian): New proc.
- * gcc.target/aarch64/advsimd-intrinsics/bf16_get-be.c: Require
- stdint_types_mbig_endian.
- * gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c: Likewise.
-
-2021-04-08 Jason Merrill <jason@redhat.com>
-
- PR c++/91849
- * g++.dg/conversion/pr66211.C: Adjust diagnostic.
- * g++.dg/conversion/ref7.C: New test.
-
-2021-04-08 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99859
- * g++.dg/cpp1y/constexpr-99859-1.C: New test.
- * g++.dg/cpp1y/constexpr-99859-2.C: New test.
- * g++.dg/cpp2a/constexpr-new18.C: New test.
- * g++.dg/cpp2a/constexpr-new19.C: New test.
-
-2021-04-08 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.dg/vect/pr99102.c: Add -fdump-tree-vect-details.
-
-2021-04-08 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/acle/general-c/func_redef_1.c: Remove
- "was here" from error message.
- * gcc.target/aarch64/sve/acle/general-c/func_redef_2.c: Likewise.
- * gcc.target/aarch64/sve/acle/general-c/func_redef_3.c: Likewise.
- * gcc.target/aarch64/sve/acle/general-c/func_redef_6.c: Likewise.
- * gcc.target/aarch64/sve/acle/general-c/type_redef_1.c: Likewise.
- * gcc.target/aarch64/sve/acle/general-c/type_redef_2.c: Likewise.
- * gcc.target/aarch64/sve/acle/general-c/type_redef_3.c: Likewise.
- * gcc.target/aarch64/sve/acle/general-c/type_redef_4.c: Likewise.
- * gcc.target/aarch64/sve/acle/general-c/type_redef_5.c: Likewise.
- * gcc.target/aarch64/sve/acle/general-c/type_redef_6.c: Likewise.
- * gcc.target/aarch64/sve/acle/general-c/type_redef_8.c: Likewise.
- * gcc.target/aarch64/sve/acle/general-c/type_redef_9.c: Likewise.
- * gcc.target/aarch64/sve/acle/general-c/type_redef_10.c: Likewise.
- * gcc.target/aarch64/sve/acle/general-c/type_redef_13.c: Likewise.
-
-2021-04-08 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/asimd-mull-elem.c: Add +nosve.
- * gcc.target/aarch64/pr98772.c: Likewise.
- * gcc.target/aarch64/simd/vect_su_add_sub.c: Likewise.
-
-2021-04-08 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/mul_2.c: Adjust negative constants to avoid
- conversion to shifts and adds.
-
-2021-04-08 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/99042
- PR analyzer/99774
- * gcc.dg/analyzer/pr99042.c: New test.
- * gcc.dg/analyzer/pr99774-1.c: New test.
- * gcc.dg/analyzer/pr99774-2.c: New test.
-
-2021-04-08 Iain Buclaw <ibuclaw@gdcproject.org>
-
- * gdc.dg/gdc108.d: Update test.
- * gdc.dg/gdc142.d: Likewise.
- * gdc.dg/pr90136a.d: Likewise.
- * gdc.dg/pr90136b.d: Likewise.
- * gdc.dg/pr90136c.d: Likewise.
- * gdc.dg/pr95173.d: Likewise.
- * gdc.dg/attr_allocsize1.d: New test.
- * gdc.dg/attr_allocsize2.d: New test.
- * gdc.dg/attr_alwaysinline1.d: New test.
- * gdc.dg/attr_cold1.d: New test.
- * gdc.dg/attr_exclusions1.d: New test.
- * gdc.dg/attr_exclusions2.d: New test.
- * gdc.dg/attr_flatten1.d: New test.
- * gdc.dg/attr_module.d: New test.
- * gdc.dg/attr_noclone1.d: New test.
- * gdc.dg/attr_noicf1.d: New test.
- * gdc.dg/attr_noinline1.d: New test.
- * gdc.dg/attr_noipa1.d: New test.
- * gdc.dg/attr_noplt1.d: New test.
- * gdc.dg/attr_optimize1.d: New test.
- * gdc.dg/attr_optimize2.d: New test.
- * gdc.dg/attr_optimize3.d: New test.
- * gdc.dg/attr_optimize4.d: New test.
- * gdc.dg/attr_restrict1.d: New test.
- * gdc.dg/attr_section1.d: New test.
- * gdc.dg/attr_symver1.d: New test.
- * gdc.dg/attr_target1.d: New test.
- * gdc.dg/attr_targetclones1.d: New test.
- * gdc.dg/attr_used1.d: New test.
- * gdc.dg/attr_used2.d: New test.
- * gdc.dg/attr_weak1.d: New test.
- * gdc.dg/imports/attributes.d: New test.
-
-2021-04-08 Jason Merrill <jason@redhat.com>
-
- PR c++/94529
- * g++.dg/template/mem-spec2.C: New test.
-
-2021-04-08 Marek Polacek <polacek@redhat.com>
-
- PR c++/99844
- * g++.dg/cpp2a/explicit16.C: Use c++20.
- * g++.dg/cpp0x/noexcept66.C: New test.
- * g++.dg/cpp2a/explicit17.C: New test.
-
-2021-04-08 Alex Coplan <alex.coplan@arm.com>
-
- PR target/99647
- * gcc.c-torture/compile/pr99647.c: New test.
-
-2021-04-07 Jason Merrill <jason@redhat.com>
-
- PR c++/41723
- * g++.dg/template/friend71.C: New test.
-
-2021-04-07 Jason Merrill <jason@redhat.com>
-
- PR c++/52625
- * g++.dg/template/friend70.C: New test.
-
-2021-04-07 Jason Merrill <jason@redhat.com>
-
- PR c++/92918
- * g++.dg/lookup/using66.C: New test.
-
-2021-04-07 Richard Sandiford <richard.sandiford@arm.com>
-
- * lib/gcc.exp (gcc_target_compile): Add -dumpbase ""
- when building an executable with testglue.
-
-2021-04-07 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/pr88834.c: Expect the vectorizer to use SLP.
- * gcc.target/aarch64/sve/pr88834_ld3.c: New test.
-
-2021-04-07 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.dg/vect/slp-21.c: Only expect 2 of the loops to use SLP
- if IFN_STORE_LANES is available.
- * gcc.dg/vect/vect-complex-5.c: Expect no loops to use SLP if
- IFN_STORE_LANES is available.
- * gcc.target/aarch64/pr99873_1.c: New test.
- * gcc.target/aarch64/pr99873_2.c: Likewise.
- * gcc.target/aarch64/pr99873_3.c: Likewise.
- * gcc.target/aarch64/sve/pr99873_1.c: Likewise.
- * gcc.target/aarch64/sve/pr99873_2.c: Likewise.
- * gcc.target/aarch64/sve/pr99873_3.c: Likewise.
-
-2021-04-07 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99954
- * gcc.dg/torture/pr99954.c: New testcase.
-
-2021-04-07 Richard Biener <rguenther@suse.de>
-
- PR testsuite/99955
- * gcc.c-torture/execute/pr92618.c: Move may_alias attributes
- last.
-
-2021-04-07 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99947
- * gcc.dg/torture/pr99947.c: New testcase.
-
-2021-04-07 Bin Cheng <bin.cheng@linux.alibaba.com>
-
- PR tree-optimization/98736
- * gcc.c-torture/execute/pr98736.c: New test.
-
-2021-04-07 Marek Polacek <polacek@redhat.com>
-
- PR c++/52202
- * g++.dg/cpp0x/rv-life.C: New test.
-
-2021-04-06 Jason Merrill <jason@redhat.com>
-
- PR c++/96673
- * g++.dg/cpp1y/nsdmi-aggr13.C: New test.
-
-2021-04-06 Jason Merrill <jason@redhat.com>
-
- PR c++/99901
- * g++.dg/cpp1z/inline-var9.C: New test.
-
-2021-04-06 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR target/99781
- * g++.target/aarch64/sve/pr99781.C: New.
-
-2021-04-06 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/memcpy-strategy-9.c: New test.
- * gcc.target/i386/memcpy-strategy-10.c: Likewise.
- * gcc.target/i386/memcpy-strategy-11.c: Likewise.
- * gcc.target/i386/memset-strategy-7.c: Likewise.
- * gcc.target/i386/memset-strategy-8.c: Likewise.
- * gcc.target/i386/memset-strategy-9.c: Likewise.
-
-2021-04-06 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99880
- * gcc.dg/torture/pr99880.c: New testcase.
-
-2021-04-06 Nathan Sidwell <nathan@acm.org>
-
- * g++.dg/modules/builtin-3_a.C: Remove dump scans.
- * g++.dg/modules/builtin-3_b.C: Remove dump scans.
-2021-04-06 Jakub Jelinek <jakub@redhat.com>
+2022-01-13 Haochen Jiang <haochen.jiang@intel.com>
- PR tree-optimization/96573
- * gcc.dg/pr96573.c: Instead of __builtin_bswap accept also
- VEC_PERM_EXPR with bswapping permutation.
+ PR target/94790
+ * gcc.target/i386/pr94790-1.c: New test.
+ * gcc.target/i386/pr94790-2.c: Ditto.
-2021-04-06 Richard Biener <rguenther@suse.de>
+2022-01-13 Xionghu Luo <luoxhu@linux.ibm.com>
- PR tree-optimization/99924
- * gfortran.dg/vect/pr99924.f90: New testcase.
+ * gcc.target/powerpc/sldoi_to_mov.c: New test.
-2021-04-06 Jakub Jelinek <jakub@redhat.com>
+2022-01-12 Uroš Bizjak <ubizjak@gmail.com>
- PR c++/97900
- * g++.dg/ext/vector40.C: Add -Wno-psabi -w to dg-options.
+ PR target/103941
+ * gcc.target/i386/pr103861-3.c (dg-options): Add -fno-vect-cost-model.
-2021-04-06 Jason Merrill <jason@redhat.com>
+2022-01-12 Uroš Bizjak <ubizjak@gmail.com>
- PR c++/91241
- * g++.dg/abi/lambda-defarg1.C: New test.
+ PR target/103935
+ * g++.dg/vect/slp-pr98855.cc: Compile only for x86 targets.
-2021-04-06 Patrick Palka <ppalka@redhat.com>
+2022-01-12 Uroš Bizjak <ubizjak@gmail.com>
- PR c++/99899
- * g++.dg/cpp2a/concepts-placeholder7.C: New test.
- * g++.dg/cpp2a/concepts-placeholder8.C: New test.
-
-2021-04-05 Jason Merrill <jason@redhat.com>
-
- PR c++/96311
- * g++.dg/cpp1y/lambda-generic-Wunused.C: New test.
-
-2021-04-05 Jason Merrill <jason@redhat.com>
-
- * g++.dg/cpp0x/rv-cast6.C: Expect reinterpret_cast error.
- * g++.dg/cpp0x/reinterpret_cast2.C: Adjust message.
- * g++.old-deja/g++.jason/rvalue3.C: Likewise.
-
-2021-04-05 Jason Merrill <jason@redhat.com>
-
- PR c++/95317
- * g++.dg/cpp1y/lambda-generic-enum1.C: New test.
-
-2021-04-05 Jason Merrill <jason@redhat.com>
-
- PR c++/95870
- * g++.dg/cpp0x/lambda/lambda-nsdmi10.C: New test.
-
-2021-04-05 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/99906
- * gcc.dg/analyzer/pr99906.c: New test.
-
-2021-04-05 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/99886
- * gcc.dg/analyzer/pr99886.c: New test.
-
-2021-04-05 Jason Merrill <jason@redhat.com>
-
- PR c++/99066
- * g++.dg/cpp0x/extern_template-6.C: New test.
-
-2021-04-05 Jason Merrill <jason@redhat.com>
-
- PR c++/99201
- * g++.dg/cpp1z/constexpr-if-lambda4.C: New test.
-
-2021-04-05 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR d/99914
- * gdc.dg/pr99914.d: New test.
-
-2021-04-05 Sandra Loosemore <sandra@codesourcery.com>
-
- * gcc.dg/ipa/propmalloc-4.c: Add -fdelete-null-pointer-checks.
- * gcc.dg/tree-ssa/evrp11.c: Likewise.
-
-2021-04-04 Jason Merrill <jason@redhat.com>
-
- PR c++/99643
- * g++.dg/cpp0x/initlist-new5.C: New test.
-
-2021-04-03 Alexandre Oliva <oliva@adacore.com>
-
- * g++.dg/pr94314-3.C: Zero-initialize main loop counter.
-
-2021-04-03 Alexandre Oliva <oliva@adacore.com>
-
- * gcc.dg/ipa/ipa-sra-19.c: Extend -Wno-psabi to ppc-vx7r2.
-
-2021-04-03 Marek Polacek <polacek@redhat.com>
-
- PR c++/91416
- * g++.dg/other/gc7.C: New test.
-
-2021-04-03 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/99818
- * gfortran.dg/coarray_48.f90: New test.
-
-2021-04-03 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/99882
- * gcc.dg/pr99882.c: New test.
-
-2021-04-03 Jakub Jelinek <jakub@redhat.com>
-
- PR rtl-optimization/99863
- * gcc.target/i386/pr99863.c: New test.
-
-2021-04-03 Jakub Jelinek <jakub@redhat.com>
-
- PR testsuite/98125
- * g++.dg/pr93195a.C: Skip on powerpc*-*-* 64-bit.
-
-2021-04-03 Jason Merrill <jason@redhat.com>
-
- PR c++/91217
- * g++.dg/opt/nrv20.C: New test.
-
-2021-04-03 Jason Merrill <jason@redhat.com>
-
- PR c++/90664
- * g++.dg/cpp1z/noexcept-type24.C: New test.
-
-2021-04-03 Jason Merrill <jason@redhat.com>
-
- PR c++/97900
- * g++.dg/ext/vector40.C: New test.
-
-2021-04-02 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99869
- * g++.dg/cpp2a/concepts-placeholder6.C: New test.
-
-2021-04-02 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99586
- * g++.dg/cpp2a/nontype-class42.C: New test.
-
-2021-04-02 Jason Merrill <jason@redhat.com>
-
- PR c++/97938
- * g++.dg/cpp2a/lambda-pack-init6.C: New test.
-
-2021-04-02 Nathan Sidwell <nathan@acm.org>
-
- * g++.dg/modules/pr99283-6_d.H: New.
- * g++.dg/modules/pr99283-7-swap.h: New.
- * g++.dg/modules/pr99283-7-traits.h: New.
- * g++.dg/modules/pr99283-7_a.H: New.
- * g++.dg/modules/pr99283-7_b.H: New.
- * g++.dg/modules/pr99283-7_c.C: New.
- * g++.dg/modules/pr99283-7_d.H: New.
-
-2021-04-02 Eric Botcazou <ebotcazou@adacore.com>
-
- * go.test/test/fixedbugs/issue6036.go: Skip on sparc.
- * go.test/test/fixedbugs/issue22200b.go: Likewise.
-
-2021-04-02 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/99726
- * gcc.target/i386/pr99726.c: Remove -m32 from dg-options. Move
- -floop-nest-optimize to dg-additional-options guarded on fgraphite
- effective target.
-
-2021-04-01 Marek Polacek <polacek@redhat.com>
-
- PR c++/99831
- * g++.dg/other/gc6.C: New test.
-
-2021-04-01 Jason Merrill <jason@redhat.com>
-
- PR c++/99583
- * g++.dg/cpp0x/lambda/lambda-variadic12.C: New test.
-
-2021-04-01 Jason Merrill <jason@redhat.com>
-
- PR c++/98481
- * g++.dg/abi/abi-tag24a.C: New test.
- * g++.dg/abi/macro0.C: Adjust expected value.
-
-2021-04-01 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99283
- * g++.dg/modules/pr99283-6.h: New.
- * g++.dg/modules/pr99283-6_a.H: New.
- * g++.dg/modules/pr99283-6_b.H: New.
- * g++.dg/modules/pr99283-6_c.C: New.
- * g++.dg/modules/hdr-init-1_c.C: Adjust scan.
- * g++.dg/modules/indirect-3_c.C: Adjust scan.
- * g++.dg/modules/indirect-4_c.C: Adjust scan.
- * g++.dg/modules/lambda-3_b.C: Adjust scan.
- * g++.dg/modules/late-ret-3_c.C: Adjust scan.
- * g++.dg/modules/pr99425-1_b.H: Adjust scan.
- * g++.dg/modules/pr99425-1_c.C: Adjust scan.
-
-2021-04-01 Jan Hubicka <hubicka@ucw.cz>
-
- PR ipa/98265
- * gcc.dg/tree-ssa/pr98265.C: New test.
-
-2021-04-01 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/96573
- * gcc.dg/pr96573.c: New test.
-
-2021-04-01 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99856
- * gcc.dg/vect/pr99856.c: New testcase.
-
-2021-04-01 Martin Jambor <mjambor@suse.cz>
-
- PR tree-optimization/97009
- * gcc.dg/tree-ssa/pr97009.c: New test.
-
-2021-04-01 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/99840
- * gfortran.dg/transpose_5.f90: New test.
-
-2021-03-31 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/99771
- * gcc.dg/analyzer/data-model-10.c: Update expected output.
- * gcc.dg/analyzer/malloc-ipa-13.c: Likewise.
- * gcc.dg/analyzer/malloc-ipa-13a.c: New test.
- * gcc.dg/analyzer/pr99771-1.c: New test.
-
-2021-03-31 Richard Sandiford <richard.sandiford@arm.com>
-
- PR tree-optimization/98268
- * gcc.target/aarch64/sve/pr98268-1.c: New test.
- * gcc.target/aarch64/sve/pr98268-2.c: Likewise.
-
-2021-03-31 Richard Sandiford <richard.sandiford@arm.com>
-
- PR tree-optimization/99726
- * gcc.target/i386/pr99726.c: New test.
-
-2021-03-31 Richard Sandiford <richard.sandiford@arm.com>
-
- PR rtl-optimization/97141
- PR rtl-optimization/98726
- * gcc.c-torture/compile/pr97141.c: New test.
- * gcc.c-torture/compile/pr98726.c: Likewise.
- * gcc.target/aarch64/sve/pr97141.c: Likewise.
- * gcc.target/aarch64/sve/pr98726.c: Likewise.
-
-2021-03-31 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/65182
- * gcc.dg/uninit-pr65182.c: New test.
-
-2021-03-31 Jason Merrill <jason@redhat.com>
-
- PR c++/99445
- * g++.dg/cpp0x/alias-decl-variadic1.C: New test.
-
-2021-03-31 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/96974
- * g++.target/aarch64/sve/pr96974.C: Expect SLP diagnostic only
- under lp64.
-
-2021-03-31 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/99786
- * gcc.target/arm/pr99786.c: New test.
-
-2021-03-31 H.J. Lu <hjl.tools@gmail.com>
-
- * gcc.target/i386/memcpy-strategy-5.c: New test.
- * gcc.target/i386/memcpy-strategy-6.c: Likewise.
- * gcc.target/i386/memcpy-strategy-7.c: Likewise.
- * gcc.target/i386/memcpy-strategy-8.c: Likewise.
- * gcc.target/i386/memset-strategy-3.c: Likewise.
- * gcc.target/i386/memset-strategy-4.c: Likewise.
- * gcc.target/i386/memset-strategy-5.c: Likewise.
- * gcc.target/i386/memset-strategy-6.c: Likewise.
-
-2021-03-31 Richard Sandiford <richard.sandiford@arm.com>
-
- PR target/98119
- * gcc.target/aarch64/sve/pr98119.c: New test.
-
-2021-03-31 Jakub Jelinek <jakub@redhat.com>
- Richard Sandiford <richard.sandiford@arm.com>
-
- PR target/99813
- * g++.target/aarch64/sve/pr99813.C: New test.
-
-2021-03-31 Jakub Jelinek <jakub@redhat.com>
-
- PR testsuite/97680
- * c-c++-common/zero-scratch-regs-6.c: Skip on ia64.
- * c-c++-common/zero-scratch-regs-7.c: Likewise.
- * c-c++-common/zero-scratch-regs-8.c: Change from dg-skip-if of
- selected unsupported triplets to all targets but selected triplets
- of supported targets.
- * c-c++-common/zero-scratch-regs-9.c: Likewise.
- * c-c++-common/zero-scratch-regs-10.c: Likewise.
- * c-c++-common/zero-scratch-regs-11.c: Likewise.
-
-2021-03-31 Patrick Palka <ppalka@redhat.com>
-
- PR c++/88115
- * g++.dg/cpp0x/alignof7.C: Adjust expected mangling.
-
-2021-03-31 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99815
- * g++.dg/cpp2a/concepts-placeholder5.C: New test.
-
-2021-03-30 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/symbolic-1.c: Fix typo.
-
-2021-03-30 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99283
- * g++.dg/modules/pr99283-5.h: New.
- * g++.dg/modules/pr99283-5_a.H: New.
- * g++.dg/modules/pr99283-5_b.H: New.
- * g++.dg/modules/pr99283-5_c.C: New.
-
-2021-03-30 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99790
- * g++.dg/cpp1z/pr99790.C: New test.
-
-2021-03-30 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- PR target/99822
- * gcc.c-torture/compile/pr99822.c: New test.
-
-2021-03-30 Xionghu Luo <luoxhu@linux.ibm.com>
-
- PR target/99718
- PR target/99718
- * gcc.target/powerpc/fold-vec-insert-char-p8.c: Update
- instruction counts.
- * gcc.target/powerpc/fold-vec-insert-char-p9.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-double.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-float-p8.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-float-p9.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-int-p8.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-int-p9.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-longlong.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-short-p8.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-short-p9.c: Likewise.
- * gcc.target/powerpc/pr79251.p8.c: Likewise.
- * gcc.target/powerpc/pr79251.p9.c: Likewise.
- * gcc.target/powerpc/vsx-builtin-7.c: Likewise.
- * gcc.target/powerpc/pr79251-run.p7.c: New test.
- * gcc.target/powerpc/pr79251.p7.c: New test.
-
-2021-03-30 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/99744
- * gcc.target/i386/pr99744-1.c: New test.
-
-2021-03-30 Tamar Christina <tamar.christina@arm.com>
-
- PR tree-optimization/99825
- * gfortran.dg/vect/pr99825.f90: New test.
-
-2021-03-30 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- PR target/99808
- * gcc.target/aarch64/pr99808.c: Use ULL constant suffix.
-
-2021-03-30 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99824
- * gcc.dg/torture/pr99824.c: New testcase.
-
-2021-03-30 Richard Sandiford <richard.sandiford@arm.com>
-
- PR target/98136
- * g++.dg/pr98136.C: New test.
-
-2021-03-30 Mihailo Stojanovic <mihailo.stojanovic@typhoon-hil.com>
-
- * gcc.target/aarch64/fcvt_nosimd.c: New test.
-
-2021-03-29 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/61869
- * gcc.dg/uninit-pr61869.c: New test.
-
-2021-03-29 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/61677
- * gcc.dg/uninit-pr61677.c: New test.
-
-2021-03-29 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/61112
- * gcc.dg/uninit-pr61112.c: New test.
-
-2021-03-29 Jan Hubicka <jh@suse.cz>
-
- PR ipa/99751
- * gcc.c-torture/compile/pr99751.c: Rename from ...
- * gcc.c-torture/execute/pr99751.c: ... to this.
-
-2021-03-29 Jan Hubicka <hubicka@ucw.cz>
-
- * gcc.c-torture/compile/pr99751.c: New test.
-
-2021-03-29 Jakub Jelinek <jakub@redhat.com>
-
- PR fortran/93660
- * gfortran.dg/gomp/declare-simd-coarray-lib.f90: Expect a mixed size
- declare simd warning on aarch64.
-
-2021-03-29 Alex Coplan <alex.coplan@arm.com>
-
- PR target/99216
- * g++.target/aarch64/sve/pr99216.C: New test.
-
-2021-03-29 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99807
- * gfortran.dg/vect/pr99807.f90: New testcase.
-
-2021-03-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- PR target/99808
- * gcc.target/aarch64/pr99808.c: New test.
-
-2021-03-29 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/99777
- * g++.dg/torture/pr99777.C: New test.
-
-2021-03-28 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/96770
- * gcc.target/arm/pure-code/pr96770.c: Improve scan-assembler-times.
-
-2021-03-28 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/99602
- * gfortran.dg/pr99602.f90: New test.
- * gfortran.dg/pr99602a.f90: New test.
- * gfortran.dg/pr99602b.f90: New test.
- * gfortran.dg/pr99602c.f90: New test.
- * gfortran.dg/pr99602d.f90: New test.
-
-2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
-
- * lib/gdc-utils.exp (gdc-copy-extra): Rename to...
- (gdc-copy-file): ... this. Use file copy instead of open/close.
- (gdc-convert-test): Save translated dejagnu test to gdc.test
- directory, only write dejagnu directives to the test file.
- (gdc-do-test): Don't create gdc.test symlink.
-
-2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
-
- * gdc.dg/gdc270a.d: Removed.
- * gdc.dg/gdc270b.d: Removed.
-
-2021-03-26 David Edelsohn <dje.gcc@gmail.com>
-
- * gcc.target/powerpc/pr99557.c: New.
-
-2021-03-26 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/59970
- * gcc.dg/uninit-pr59970.c: New test.
-
-2021-03-26 Marek Polacek <polacek@redhat.com>
-
- PR c++/98352
- * g++.dg/cpp0x/inh-ctor37.C: Remove dg-error.
- * g++.dg/cpp0x/nsdmi17.C: New test.
-
-2021-03-26 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99283
- * g++.dg/modules/pr99283-2_a.H: New.
- * g++.dg/modules/pr99283-2_b.H: New.
- * g++.dg/modules/pr99283-2_c.H: New.
- * g++.dg/modules/pr99283-3_a.H: New.
- * g++.dg/modules/pr99283-3_b.H: New.
- * g++.dg/modules/pr99283-4.H: New.
- * g++.dg/modules/tpl-alias-1_a.H: Adjust scans.
- * g++.dg/modules/tpl-alias-1_b.C: Adjust scans.
-
-2021-03-26 Vladimir Makarov <vmakarov@redhat.com>
-
- PR target/99766
- * g++.target/aarch64/sve/pr99766.C: New.
-
-2021-03-26 Iain Buclaw <ibuclaw@gdcproject.org>
-
- PR ipa/99466
- * gcc.dg/tls/pr99466-1.c: New test.
- * gcc.dg/tls/pr99466-2.c: New test.
-
-2021-03-26 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99705
- * g++.dg/cpp0x/new5.C: New test.
-
-2021-03-26 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/99651
- * gfortran.dg/null_11.f90: New test.
-
-2021-03-25 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/55060
- * gcc.dg/uninit-pr55060.c: New.
-
-2021-03-25 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/48483
- * g++.dg/warn/uninit-pr48483.C: New test.
-
-2021-03-25 Martin Sebor <msebor@redhat.com>
-
- * gcc.dg/uninit-pr44547.c: New.
-
-2021-03-25 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99672
- * g++.dg/concepts/diagnostic2.C: Adjust expected caret line.
- * g++.dg/cpp1y/builtin_location.C (f4, n6): Move #line directives
- to match locus changes.
- * g++.dg/cpp2a/srcloc1.C: Adjust expected column numbers.
- * g++.dg/cpp2a/srcloc2.C: Likewise.
- * g++.dg/cpp2a/srcloc15.C: Likewise.
- * g++.dg/cpp2a/srcloc16.C: Likewise.
- * g++.dg/cpp2a/srcloc19.C: New test.
- * g++.dg/modules/adhoc-1_b.C: Adjust expected column numbers
- and caret line.
- * g++.dg/modules/macloc-1_c.C: Adjust expected column numbers.
- * g++.dg/modules/macloc-1_d.C: Likewise.
- * g++.dg/plugin/diagnostic-test-expressions-1.C: Adjust expected
- caret line.
-
-2021-03-25 Marek Polacek <polacek@redhat.com>
-
- PR c++/94751
- * g++.dg/cpp0x/inh-ctor37.C: New test.
-
-2021-03-25 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99745
- * g++.dg/cpp0x/variadic181.C: New test.
-
-2021-03-25 Marek Polacek <polacek@redhat.com>
-
- PR c++/99331
- * g++.dg/warn/Wconversion5.C: New test.
-
-2021-03-25 Stam Markianos-Wright <stam.markianos-wright@arm.com>
-
- PR tree-optimization/96974
- * g++.target/aarch64/sve/pr96974.C: New test.
-
-2021-03-25 H.J. Lu <hjl.tools@gmail.com>
-
- Revert:
- 2021-03-25 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/98209
- PR target/99744
- * gcc.target/i386/pr98209.c: New test.
- * gcc.target/i386/pr99744-1.c: Likewise.
- * gcc.target/i386/pr99744-2.c: Likewise.
-
-2021-03-25 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99565
- * g++.dg/warn/Wduplicated-branches6.C: New test.
- * g++.dg/warn/Wduplicated-branches7.C: New test.
-
-2021-03-25 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/98209
- PR target/99744
- * gcc.target/i386/pr98209.c: New test.
- * gcc.target/i386/pr99744-1.c: Likewise.
- * gcc.target/i386/pr99744-2.c: Likewise.
-
-2021-03-25 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99746
- * gfortran.dg/vect/pr99746.f90: New testcase.
-
-2021-03-25 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/93695
- PR analyzer/99044
- PR analyzer/99716
- * gcc.dg/analyzer/attr-malloc-CVE-2019-19078-usb-leak.c: Remove
- xfail.
- * gcc.dg/analyzer/pr93695-1.c: New test.
- * gcc.dg/analyzer/pr99044-1.c: New test.
- * gcc.dg/analyzer/pr99044-2.c: New test.
- * gcc.dg/analyzer/pr99716-1.c: New test.
- * gcc.dg/analyzer/pr99716-2.c: New test.
- * gcc.dg/analyzer/pr99716-3.c: New test.
-
-2021-03-24 Martin Liska <mliska@suse.cz>
-
- PR target/99753
- * gcc.target/i386/pr99753.c: New test.
-
-2021-03-24 Martin Jambor <mjambor@suse.cz>
-
- PR ipa/99122
- * gcc.dg/pr99122-3.c: Remove -fno-ipa-cp from options.
-
-2021-03-24 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/99727
- * gcc.target/arm/pr99727.c: New test.
-
-2021-03-24 Jakub Jelinek <jakub@redhat.com>
-
- PR target/99724
- * gcc.target/arm/pr99724.c: New test.
-
-2021-03-24 Alexandre Oliva <oliva@adacore.com>
-
- * lib/target-supports.exp (check_effective_target_sysconf): New.
- * gcc.target/i386/pr95443-1.c: Require it.
- * gcc.target/i386/pr95443-2.c: Likewise.
- * gcc.target/i386/sse2-mmx-maskmovq.c: Likewise.
- * gcc.target/i386/strncmp-1.c: Likewise.
-
-2021-03-24 Alexandre Oliva <oliva@adacore.com>
-
- * gcc.target/i386/pr97313.c: Require effective target feature pie.
- * g++.target/i386/pr94185.C: Likewise.
-
-2021-03-24 Alexandre Oliva <oliva@adacore.com>
-
- * gcc.target/i386/funcspec-2.c: Tighten regexps to avoid false
- positives with -mcmodel=large.
- * gcc.target/i386/funcspec-3.c: Likewise.
-
-2021-03-24 Alexandre Oliva <oliva@adacore.com>
-
- * gcc.target/i386/pr94467-3.c: New.
-
-2021-03-24 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/99369
- * gfortran.dg/longnames.f90: New test.
-
-2021-03-23 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99283
- * g++.dg/modules/pr99283-1_a.H: New.
- * g++.dg/modules/pr99283-1_b.H: New.
-
-2021-03-23 Ilya Leoshkevich <iii@linux.ibm.com>
-
- * gcc.target/s390/vector/long-double-asm-abi.c: New test.
-
-2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
-
- * lib/target-supports.exp
- (check_effective_target_arm_dsp_ok_nocache)
- (check_effective_target_arm_dsp_ok, add_options_for_arm_dsp): New.
- * gcc.target/arm/acle/dsp_arith.c: Use arm_dsp_ok effective target
- and add arm_dsp options.
-
-2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
-
- * lib/target-supports.exp
- (check_effective_target_arm_v8_1m_mve_fp_ok_nocache): Fix
- -mfloat-abi= options order.
- (check_effective_target_arm_v8_1m_mve_ok_nocache): Likewise
- * gcc.target/arm/mve/intrinsics/mve_vector_float2.c: Add
- arm_hard_ok effective target and -mfloat-abi=hard additional
- option.
- * gcc.target/arm/mve/intrinsics/mve_vector_int.c: Likewise.
- * gcc.target/arm/mve/intrinsics/mve_vector_uint.c: Likewise.
- * gcc.target/arm/mve/intrinsics/mve_vector_uint1.c: Likewise.
- * gcc.target/arm/mve/intrinsics/mve_vector_uint2.c: Likewise.
- * gcc.target/arm/mve/intrinsics/vgetq_lane_s64.c: Likewise.
- * gcc.target/arm/mve/intrinsics/vgetq_lane_u64.c: Likewise.
- * gcc.target/arm/mve/intrinsics/vsetq_lane_s64.c: Likewise.
- * gcc.target/arm/mve/intrinsics/vsetq_lane_u64.c: Likewise.
- * gcc.target/arm/armv8_1m-fp16-move-1.c: Add -mfloat-abi=hard
- additional option.
- * gcc.target/arm/armv8_1m-fp32-move-1.c: Likewise.
- * gcc.target/arm/armv8_1m-fp64-move-1.c: Likewise.
-
-2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
-
- * lib/target-supports.exp
- (check_effective_target_arm_v8_2a_i8mm_ok_nocache): Fix
- -mfloat-abi= options order.
- (check_effective_target_arm_v8_2a_bf16_neon_ok_nocache): Likewise.
- * gcc.target/arm/bfloat16_scalar_1_1.c: Add arm_hard_ok effective
- target and -mfloat-abi=hard additional option.
- * gcc.target/arm/bfloat16_simd_1_1.c: Likewise.
- * gcc.target/arm/simd/bf16_ma_1.c: Likewise.
- * gcc.target/arm/simd/bf16_mmla_1.c: Likewise.
- * gcc.target/arm/simd/vdot-2-1.c: Likewise.
- * gcc.target/arm/simd/vdot-2-2.c: Likewise.
-
-2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/armv8_2-fp16-scalar-2.c: Add arm_hard_ok.
-
-2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/bfloat16_simd_1_2.c: Add arm_softfp_ok.
- * gcc.target/arm/bfloat16_simd_2_2.c: Likewise.
- * gcc.target/arm/bfloat16_simd_3_2.c: Likewise.
- * gcc.target/arm/pr51968.c: Likewise.
- * gcc.target/arm/bfloat16_simd_2_1.c: arm_hard_ok.
- * gcc.target/arm/bfloat16_simd_3_1.c: Likewise.
- * gcc.target/arm/simd/bf16_vldn_1.c: Likewise.
- * gcc.target/arm/simd/bf16_vstn_1.c: Likewise.
-
-2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/armv8_1m-shift-imm-1.c: Remove -mfloat=abi option.
- * gcc.target/arm/armv8_1m-shift-reg-1.c: Likewise.
- * gcc.target/arm/bf16_dup.c: Likewise.
- * gcc.target/arm/bf16_reinterpret.c: Likewise.
- * gcc.target/arm/pr51534.c: Remove -mfloat=abi option.
-
-2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/vmmla_1.c: Add arm_v8_2a_i8mm options.
-
-2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/bfloat16_scalar_typecheck.c: Add
- arm_v8_2a_fp16_neon and arm_v8_2a_bf16_neon.
- * gcc.target/arm/bfloat16_vector_typecheck_1.c: Likewise.
- * gcc.target/arm/bfloat16_vector_typecheck_2.c: Likewise.
-
-2021-03-23 Marek Polacek <polacek@redhat.com>
-
- PR c++/99318
- * g++.dg/cpp0x/attributes-namespace6.C: New test.
- * g++.dg/cpp0x/gen-attrs-73.C: New test.
-
-2021-03-23 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/93660
- * gfortran.dg/gomp/declare-simd-coarray-lib.f90: New test.
-
-2021-03-23 Richard Sandiford <richard.sandiford@arm.com>
-
- PR target/99540
- * gcc.dg/vect/pr99540.c: New test.
-
-2021-03-23 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99239
- * g++.dg/modules/pr99239_a.H: New.
- * g++.dg/modules/pr99239_b.H: New.
-
-2021-03-23 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99721
- * gfortran.dg/vect/pr99721.f90: New testcase.
-
-2021-03-23 Marcus Comstedt <marcus@mc.pp.se>
-
- * gcc.target/riscv/shift-shift-5.c (sub): Change
- order of struct fields depending on byteorder.
-
-2021-03-23 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99650
- * g++.dg/cpp1z/decomp55.C: New test.
-
-2021-03-23 Aldy Hernandez <aldyh@redhat.com>
-
- PR tree-optimization/99296
- * gcc.dg/pr99296.c: New file.
-
-2021-03-22 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99480
- * g++.dg/modules/pr99480_a.H: New.
- * g++.dg/modules/pr99480_b.H: New.
-
-2021-03-22 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR target/99581
- * gcc.target/powerpc/pr99581.c: New.
-
-2021-03-22 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99425
- * g++.dg/modules/pr99425-1.h: New.
- * g++.dg/modules/pr99425-1_a.H: New.
- * g++.dg/modules/pr99425-1_b.H: New.
- * g++.dg/modules/pr99425-1_c.C: New.
- * g++.dg/modules/pr99425-2_a.X: New.
- * g++.dg/modules/pr99425-2_b.X: New.
- * g++.dg/template/pr99425.C: New.
-
-2021-03-22 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99694
- * gcc.dg/torture/pr99694.c: New testcase.
-
-2021-03-22 Kito Cheng <kito.cheng@sifive.com>
-
- PR target/99702
- * gcc.target/riscv/pr99702.c: New.
-
-2021-03-22 Xionghu Luo <luoxhu@linux.ibm.com>
-
- PR target/98914
- * gcc.target/powerpc/pr98914.c: New test.
-
-2021-03-20 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/99679
- * g++.target/i386/pr99679-1.C: New test.
- * g++.target/i386/pr99679-2.C: Likewise.
-
-2021-03-20 Jakub Jelinek <jakub@redhat.com>
-
- PR debug/99230
- * gcc.dg/pr99230.c: New test.
-
-2021-03-19 Jakub Jelinek <jakub@redhat.com>
-
- PR c/99588
- * gcc.dg/Wunused-var-5.c: New test.
- * gcc.dg/Wunused-var-6.c: New test.
-
-2021-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
-
- * gfortran.dg/inline_matmul_6.f90: Adjust count for
- _gfortran_matmul.
-
-2021-03-19 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR target/99663
- * gcc.target/s390/pr99663.c: New.
-
-2021-03-19 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99456
- * g++.dg/opt/pr99456.C: New test.
- * g++.dg/ext/vla22.C: Expect a -Wnarrowing warning for c++11 and
- later.
-
-2021-03-19 Tamar Christina <tamar.christina@arm.com>
-
- PR tree-optimization/99656
- * gfortran.dg/vect/pr99656.f90: New test.
-
-2021-03-19 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/99652
- * gcc.dg/torture/pr99652-1.c: New test.
- * gcc.dg/torture/pr99652-2.c: Likewise.
- * gcc.target/i386/pr57655.c: Adjusted.
- * gcc.target/i386/pr59794-6.c: Likewise.
- * gcc.target/i386/pr70738-1.c: Likewise.
- * gcc.target/i386/pr96744-1.c: Likewise.
-
-2021-03-19 Jakub Jelinek <jakub@redhat.com>
- Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/99593
- * g++.target/arm/pr99593.C: New test.
-
-2021-03-19 Eric Botcazou <ebotcazou@adacore.com>
-
- * g++.dg/lto/pr89335_0.C: Require the linker plugin.
-
-2021-03-19 Marek Polacek <polacek@redhat.com>
-
- PR c++/99500
- * g++.dg/cpp2a/concepts-err3.C: New test.
-
-2021-03-18 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/99502
- * g++.dg/warn/Warray-bounds-22.C: New test.
- * g++.dg/warn/Warray-bounds-23.C: New test.
- * g++.dg/warn/Warray-bounds-24.C: New test.
-
-2021-03-18 Jakub Jelinek <jakub@redhat.com>
-
- PR testsuite/99636
- * gcc.dg/strlenopt-80.c: For powerpc*-*-*, only enable for lp64.
-
-2021-03-18 Jakub Jelinek <jakub@redhat.com>
-
- PR testsuite/99626
- * gcc.dg/strlenopt-73.c: Ifdef out test_copy_cond_unequal_length_i64
- on targets other than x86, aarch64, s390 and 64-bit powerpc. Use
- test_copy_cond_unequal_length_i128 for __x86_64__ with int128 support
- rather than __i386__.
-
-2021-03-18 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR testsuite/97680
- * c-c++-common/zero-scratch-regs-10.c: Skip on arm
-
-2021-03-18 Iain Sandoe <iain@sandoe.co.uk>
-
- PR objc++/49070
- * obj-c++.dg/pr49070.mm: New test.
- * objc.dg/unnamed-parms.m: New test.
-
-2021-03-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * g++.target/aarch64/sve/aarch64-sve.exp: Add -moverride=tune=none to
- sve_flags.
- * g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp: Likewise.
- * g++.target/aarch64/sve/acle/aarch64-sve-acle.exp: Likewise.
- * gcc.target/aarch64/sve/aarch64-sve.exp: Likewise.
- * gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp: Likewise.
- * gcc.target/aarch64/sve/acle/aarch64-sve-acle.exp: Likewise.
-
-2021-03-18 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/98099
- * gcc.dg/pr98099.c: Don't compile the test on pdp endian.
- For big endian use -fsso-struct=little-endian dg-options.
-
-2021-03-17 Marek Polacek <polacek@redhat.com>
-
- PR c++/97973
- * g++.dg/conversion/real-to-int1.C: New test.
-
-2021-03-17 Anthony Sharp <anthonysharp15@gmail.com>
- Jason Merrill <jason@redhat.com>
-
- * g++.dg/cpp1z/using9.C: New using decl test.
-
-2021-03-17 Iain Sandoe <iain@sandoe.co.uk>
-
- * c-c++-common/asan/strncpy-overflow-1.c: Add _FORTIFY_SOURCE=0 and
- -gdwarf-3 to the command line options. Adjust the expected line
- numbers for the revised options header.
+ PR target/100637
+ PR target/103861
+ * g++.target/i386/pr100637-1b.C (dg-options):
+ Use -msse2 instead of -msse4.1.
+ * g++.target/i386/pr100637-1w.C (dg-options): Ditto.
+ * g++.target/i386/pr103861-1.C (dg-options): Ditto.
+ * gcc.target/i386/pr100637-4b.c (dg-options): Ditto.
+ * gcc.target/i386/pr103861-4.c (dg-options): Ditto.
+ * gcc.target/i386/pr100637-1b.c: Remove scan-assembler
+ directives for logic instructions.
+ * gcc.target/i386/pr100637-1w.c: Ditto.
+ * gcc.target/i386/warn-vect-op-2.c:
+ Update dg-warning for vector logic operation.
-2021-03-17 Iain Sandoe <iain@sandoe.co.uk>
+2022-01-12 Michael Meissner <meissner@the-meissners.org>
- * c-c++-common/asan/memcmp-1.c: Add _FORTIFY_SOURCE=0 and
- -gdwarf-3 to the command line options. Provide Darwin-
- specific match lines for the expected output.
+ PR testsuite/102935
+ * gcc.target/powerpc/pr101384-1.c: Update insn regexp for power9
+ and power10.
-2021-03-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+2022-01-12 Andrew MacLeod <amacleod@redhat.com>
- * gcc.target/aarch64/acle/rng_2.c: New test.
+ PR tree-optimization/83541
+ * g++.dg/pr83541.C: New.
-2021-03-17 H.J. Lu <hjl.tools@gmail.com>
+2022-01-12 David Malcolm <dmalcolm@redhat.com>
- PR target/99504
- * gcc.target/i386/pr99530-1.c: New test.
- * gcc.target/i386/pr99530-2.c: Likewise.
- * gcc.target/i386/pr99530-3.c: Likewise.
- * gcc.target/i386/pr99530-4.c: Likewise.
- * gcc.target/i386/pr99530-5.c: Likewise.
- * gcc.target/i386/pr99530-6.c: Likewise.
+ PR analyzer/103940
+ * gcc.dg/analyzer/taint-size-access-attr-1.c: New test.
-2021-03-16 Christophe Lyon <christophe.lyon@linaro.org>
+2022-01-12 Tom de Vries <tdevries@suse.de>
- PR target/99542
- * gcc.dg/declare-simd.c (fn2): Expect a warning only under lp64.
+ * gcc.target/nvptx/atomic-exchange-1.c: New test.
+ * gcc.target/nvptx/atomic-exchange-2.c: New test.
+ * gcc.target/nvptx/atomic-exchange-3.c: New test.
+ * gcc.target/nvptx/atomic-exchange-4.c: New test.
-2021-03-16 Jason Merrill <jason@redhat.com>
+2022-01-12 Tom de Vries <tdevries@suse.de>
- * g++.dg/cpp2a/nontype-float1.C: New test.
+ * gcc.target/nvptx/atomic_fetch-1.c: Rewrite.
+ * gcc.target/nvptx/atomic_fetch-2.c: Rewrite.
-2021-03-16 Segher Boessenkool <segher@kernel.crashing.org>
+2022-01-12 Francois-Xavier Coudert <fxcoudert@gmail.com>
- PR target/98092
- PR target/98092
- * gcc.target/powerpc/pr98092.c: New.
+ * gfortran.dg/ieee/signaling_1.f90: Fix comment.
-2021-03-16 Jakub Jelinek <jakub@redhat.com>
+2022-01-12 Francois-Xavier Coudert <fxcoudert@gmail.com>
- PR target/99600
- * gcc.target/i386/pr99600.c: New test.
+ * gfortran.dg/ieee/signaling_1.f90: Adjust flags.
-2021-03-16 Martin Liska <mliska@suse.cz>
+2022-01-12 Jakub Jelinek <jakub@redhat.com>
Jason Merrill <jason@redhat.com>
- PR c++/99108
- * g++.target/i386/pr99108.C: New test.
-
-2021-03-16 Martin Liska <mliska@suse.cz>
-
- PR target/99592
- * gcc.target/arm/pr99592.c: New test.
-
-2021-03-16 Ilya Leoshkevich <iii@linux.ibm.com>
-
- * gcc.target/s390/vector/long-double-asm-fprvrmem.c: New test.
-
-2021-03-16 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99496
- * g++.dg/modules/pr99496_a.H: New.
- * g++.dg/modules/pr99496_b.C: New.
-
-2021-03-16 Jakub Jelinek <jakub@redhat.com>
-
- PR target/99563
- * gcc.target/i386/avx-pr99563.c: New test.
-
-2021-03-16 Jakub Jelinek <jakub@redhat.com>
-
- PR target/99542
- * gcc.dg/gomp/pr99542.c: New test.
- * gcc.dg/gomp/pr59669-2.c (bar): Don't expect a warning on aarch64.
- * gcc.dg/gomp/simd-clones-2.c (setArray): Likewise.
- * g++.dg/vect/simd-clone-7.cc (bar): Likewise.
- * g++.dg/gomp/declare-simd-1.C (f37): Expect a different warning
- on aarch64.
- * gcc.dg/declare-simd.c (fn2): Expect a new warning on aarch64.
-
-2021-03-15 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99601
- * g++.dg/modules/builtin-3_a.C: Fix target selector syntax errors.
- * g++.dg/modules/builtin-3_b.C: Likewise.
-
-2021-03-15 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99601
- * g++.dg/modules/builtin-3_a.C: Fix lp64 x86 detection.
- * g++.dg/modules/builtin-3_b.C: Fix lp64 x86 detection.
-
-2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/99047
- * g++.dg/coroutines/pr99047.C: New test.
-
-2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/98704
- * g++.dg/coroutines/torture/pr98704.C: New test.
-
-2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/98480
- * g++.dg/coroutines/pr98480.C: New test.
- * g++.dg/coroutines/torture/co-await-24-for-init.C: New test.
- * g++.dg/coroutines/torture/co-await-25-for-condition.C: New test.
- * g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C: New test.
-
-2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/96749
- * g++.dg/coroutines/pr96749-1.C: New test.
- * g++.dg/coroutines/pr96749-2.C: New test.
-
-2021-03-15 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/98834
- * g++.dg/opt/pr98834.C: New testcase.
-
-2021-03-15 Thomas Koenig <tkoenig@gcc.gnu.org>
-
- PR fortran/99345
- * gfortran.dg/do_check_16.f90: New test.
- * gfortran.dg/do_check_17.f90: New test.
-
-2021-03-15 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/99545
- * gfortran.dg/pr99545.f90: New test.
-
-2021-03-15 David Edelsohn <dje.gcc@gmail.com>
-
- * gcc.target/powerpc/pr99492.c: Fix typo.
-
-2021-03-14 Harald Anlauf <anlauf@gmx.de>
- Paul Thomas <pault@gcc.gnu.org>
-
- * gfortran.dg/pr99112.f90: New test.
-
-2021-03-13 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/99489
- * gcc.dg/Wstringop-truncation-9.c: New test.
-
-2021-03-13 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/99125
- * gfortran.dg/alloc_deferred_comp_1.f90: New test.
-
-2021-03-13 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/99544
- * gcc.dg/gomp/pr99544.c: New test.
-
-2021-03-12 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99238
- * g++.dg/modules/pr99238.h: New.
- * g++.dg/modules/pr99238_a.H: New.
- * g++.dg/modules/pr99238_b.H: New.
-
-2021-03-12 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/99514
- * gfortran.dg/gomp/threadprivate-1.f90: New test.
-
-2021-03-12 Jakub Jelinek <jakub@redhat.com>
-
- PR target/99321
- * gcc.target/i386/avx512vl-pr99321-2.c: New test.
-
-2021-03-12 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99507
- * g++.dg/cpp2a/consteval19.C: New test.
-
-2021-03-11 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/96374
- * gcc.dg/analyzer/dot-output.c: Add -fdump-analyzer-feasibility
- to options.
- * gcc.dg/analyzer/feasibility-1.c (test_6): Remove xfail.
- (test_7): New.
- * gcc.dg/analyzer/pr93355-localealias-feasibility-2.c: Remove xfail.
- * gcc.dg/analyzer/pr93355-localealias-feasibility-3.c: Remove xfails.
- * gcc.dg/analyzer/pr93355-localealias-feasibility.c: Remove
- -fno-analyzer-feasibility from options.
- * gcc.dg/analyzer/pr93355-localealias.c: Likewise.
- * gcc.dg/analyzer/unknown-fns-4.c: Remove xfail.
-
-2021-03-11 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99248
- * g++.dg/modules/pr99248.h: New.
- * g++.dg/modules/pr99248_a.H: New.
- * g++.dg/modules/pr99248_b.H: New.
-
-2021-03-11 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99528
- * g++.dg/modules/pr99528.h: New.
- * g++.dg/modules/pr99528_a.H: New.
- * g++.dg/modules/pr99528_b.H: New.
- * g++.dg/modules/pr99528_c.C: New.
-
-2021-03-11 Richard Biener <rguenther@suse.de>
-
- PR testsuite/98245
- * gcc.dg/vect/bb-slp-46.c: Scan for the scalar compute
- instead of verifying the total number of adds.
-
-2021-03-11 Richard Biener <rguenther@suse.de>
-
- PR testsuite/97494
- * gcc.dg/vect/pr97428.c: XFAIL on !vect_hw_misalign.
-
-2021-03-11 Richard Biener <rguenther@suse.de>
-
- PR testsuite/97494
- * gcc.dg/vect/vect-complex-5.c: XFAIL on !vect_hw_misalign.
-
-2021-03-11 Richard Biener <rguenther@suse.de>
-
- PR testsuite/97494
- * gcc.dg/vect/slp-21.c: Adjust for powerpc64*-*-*.
-
-2021-03-11 Jakub Jelinek <jakub@redhat.com>
-
- PR ipa/99517
- * gcc.target/i386/avx2-pr99517-1.c: New test.
- * gcc.target/i386/avx2-pr99517-2.c: New test.
-
-2021-03-10 David Edelsohn <dje.gcc@gmail.com>
-
- PR target/99492
- * gcc.target/powerpc/pr99492.c: New testcase.
-
-2021-03-10 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/99205
- * gfortran.dg/data_char_4.f90: New test.
- * gfortran.dg/data_char_5.f90: New test.
-
-2021-03-10 Segher Boessenkool <segher@kernel.crashing.org>
-
- * gcc.target/powerpc/pr98959.c: Add int128 and lp64 selectors.
-
-2021-03-10 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99423
- * g++.dg/modules/pr99423_a.H: New.
- * g++.dg/modules/pr99423_b.H: New.
-
-2021-03-10 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/99305
- PR testsuite/99498
- * g++.dg/opt/pr99305.C: Don't expect cast to unsigned char on
- unsigned_char effective targets.
-
-2021-03-10 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99508
- * g++.dg/ext/pr99508.C: New.
-
-2021-03-10 John David Anglin <danglin@gcc.gnu.org>
-
- PR testsuite/99292
- * lib/target-supports.exp (check_effective_target_lra): New.
- * gcc.c-torture/compile/asmgoto-2.c: Use LRA target selector.
- * gcc.c-torture/compile/asmgoto-5.c: Likewise.
- * gcc.c-torture/compile/pr98096.c: Likewise.
- * gcc.dg/pr97954.c: Likewise.
-
-2021-03-10 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/pr94047.c: Remove "-Wno-analyzer-too-complex".
- * gcc.dg/analyzer/zlib-2.c: Likewise.
-
-2021-03-10 Joel Hutton <joel.hutton@arm.com>
-
- * gcc.dg/vect/pr99102.c: Fix target selector.
-
-2021-03-10 Joel Hutton <joel.hutton@arm.com>
-
- PR target/99102
- * gcc.dg/vect/pr99102.c: New test.
-
-2021-03-10 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/specs/lto25.ads: New test.
-
-2021-03-09 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/99305
- * g++.dg/opt/pr99305.C: New test.
-
-2021-03-09 Segher Boessenkool <segher@kernel.crashing.org>
-
- * lib/target-supports.exp (check_effective_target_powerpc_sqrt): New.
- (check_effective_target_sqrt_insn): Use it.
-
-2021-03-09 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR target/99454
- * gcc.target/i386/pr99454.c: New.
-
-2021-03-09 Eric Botcazou <ebotcazou@adacore.com>
-
- * gcc.dg/array-quals-1.c: Pass -fno-pie if supported.
- * gcc.dg/loop-9.c: Likewise.
- * gfortran.dg/pr95690.f90: Replace *-*-solaris* with sparc*-*-*.
- * gnat.dg/opt39.adb: Pass --param option for Aarch64 too.
-
-2021-03-09 Jakub Jelinek <jakub@redhat.com>
-
- PR sanitizer/98920
- * c-c++-common/asan/pr98920.c: Only include regex.h if the header
- exists. If REG_STARTEND macro isn't defined, just return 0 from main
- instead of the actual test.
-
-2021-03-09 Martin Liska <mliska@suse.cz>
-
- PR target/99464
- * gcc.target/i386/pr99464.c: New test.
-
-2021-03-09 Joel Brobecker <brobecker@adacore.com>
-
- * gcc.target/powerpc/undef-bool-2.c: Add
- dg-require-effective-target powerpc_vsx_ok directive.
- * g++.dg/ext/undef-bool-1.C: Add dg-require-effective-target
- powerpc_vsx_ok directive.
-
-2021-03-08 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/49278
- * gfortran.dg/parameter_data.f90: New test.
-
-2021-03-08 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/98266
- * g++.dg/warn/Warray-bounds-15.C: New test.
- * g++.dg/warn/Warray-bounds-18.C: New test.
- * g++.dg/warn/Warray-bounds-19.C: New test.
- * g++.dg/warn/Warray-bounds-20.C: New test.
- * g++.dg/warn/Warray-bounds-21.C: New test.
-
-2021-03-08 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/97631
- * c-c++-common/Wstringop-overflow.c: Remove unexpected warnings.
- Add an xfail.
- * c-c++-common/Wstringop-truncation.c: Add expected warnings.
- * gcc.dg/Wstringop-overflow-10.c: Also enable -Wstringop-truncation.
- * gcc.dg/Wstringop-overflow-66.c: New test.
- * gcc.dg/tree-ssa/strncpy-2.c: Adjust expected warning.
-
-2021-03-08 Marek Polacek <polacek@redhat.com>
-
- PR c++/96268
- * g++.dg/cpp2a/nontype-class41.C: New test.
-
-2021-03-08 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99436
- * g++.dg/modules/modules.exp (MOD_STD_LIST): Add 2b.
-
-2021-03-08 Nathan Sidwell <nathan@acm.org>
-
- * g++.dg/modules/pr99468.H: New.
-
-2021-03-08 Peter Bergner <bergner@linux.ibm.com>
-
- PR target/98959
- * gcc.target/powerpc/pr98959.c: New test.
-
-2021-03-08 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99285
- * g++.dg/modules/pr99285_a.H: New.
- * g++.dg/modules/pr99285_b.H: New.
-
-2021-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- PR target/99437
- * gcc.target/aarch64/simd/pr99437.c: New test.
-
-2021-03-08 Martin Liska <mliska@suse.cz>
-
- PR sanitizer/98920
- * c-c++-common/asan/pr98920.c: New test.
-
-2021-03-08 Martin Liska <mliska@suse.cz>
-
- PR target/99463
- * gcc.target/i386/pr99463-2.c: New test.
- * gcc.target/i386/pr99463.c: New test.
-
-2021-03-08 Ilya Leoshkevich <iii@linux.ibm.com>
-
- * gcc.target/s390/vector/long-double-asm-commutative.c: New
- test.
- * gcc.target/s390/vector/long-double-asm-earlyclobber.c: New
- test.
- * gcc.target/s390/vector/long-double-asm-in-out.c: New test.
- * gcc.target/s390/vector/long-double-asm-inout.c: New test.
- * gcc.target/s390/vector/long-double-asm-matching.c: New test.
- * gcc.target/s390/vector/long-double-asm-regmem.c: New test.
- * gcc.target/s390/vector/long-double-volatile-from-i64.c: New
- test.
-
-2021-03-08 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/97927
- * gfortran.dg/module_variable_3.f90: New test.
-
-2021-03-07 Jakub Jelinek <jakub@redhat.com>
-
- PR target/99321
- * lib/target-supports.exp
- (check_effective_target_assembler_march_noavx512bw): New effective
- target.
- * gcc.target/i386/avx512vl-pr99321-1.c: New test.
-
-2021-03-06 Patrick Palka <ppalka@redhat.com>
- Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99287
- * g++.dg/cpp2a/constexpr-99287.C: New test.
-
-2021-03-06 Patrick Palka <ppalka@redhat.com>
- Jakub Jelinek <jakub@redhat.com>
-
- PR c++/96330
- * g++.dg/cpp1y/var-templ68.C: New test.
- * g++.dg/cpp1y/var-templ68a.C: New test.
-
-2021-03-06 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99365
- * g++.dg/cpp2a/concepts-partial-spec9.C: New test.
- * g++.dg/cpp2a/concepts-placeholder4.C: New test.
-
-2021-03-06 Hans-Peter Nilsson <hp@axis.com>
-
- * gcc.target/cris/pr93372-1.c: Adjust expected assembler result
- to allow an eliminated stack-frame.
-
-2021-03-05 Marek Polacek <polacek@redhat.com>
-
- PR c++/99374
- * g++.dg/cpp1z/noexcept-type23.C: New test.
-
-2021-03-05 Marek Polacek <polacek@redhat.com>
-
- PR c++/99120
- * g++.dg/warn/Wshadow-17.C: New test.
-
-2021-03-05 Jason Merrill <jason@redhat.com>
-
- PR c/99363
- * gcc.dg/attr-flatten-1.c: Adjust.
-
-2021-03-05 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/99322
- * c-c++-common/gomp/pr99322.c: New test.
-
-2021-03-05 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99245
- * g++.dg/modules/pr99245_a.H: New.
- * g++.dg/modules/pr99245_b.H: New.
-
-2021-03-05 Harald Anlauf <anlauf@gmx.de>
-
- PR libfortran/99218
- * gfortran.dg/matmul_21.f90: New test.
-
-2021-03-05 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99377
- * g++.dg/modules/pr99377_a.H: New.
- * g++.dg/modules/pr99377_b.C: New.
- * g++.dg/modules/pr99377_c.C: New.
-
-2021-03-05 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/98118
- * g++.dg/coroutines/pr98118.C: New test.
-
-2021-03-05 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/95616
- * g++.dg/coroutines/pr95616-0-no-exceptions.C: New test.
- * g++.dg/coroutines/pr95616-0.C: New test.
- * g++.dg/coroutines/pr95616-1-no-exceptions.C: New test.
- * g++.dg/coroutines/pr95616-1.C: New test.
- * g++.dg/coroutines/pr95616-2.C: New test.
- * g++.dg/coroutines/pr95616-3-no-exceptions.C: New test.
- * g++.dg/coroutines/pr95616-3.C: New test.
- * g++.dg/coroutines/pr95616-4.C: New test.
- * g++.dg/coroutines/pr95616-5.C: New test.
- * g++.dg/coroutines/pr95616-6.C: New test.
-
-2021-03-05 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/95615
- * g++.dg/coroutines/torture/pr95615-01.C: New test.
- * g++.dg/coroutines/torture/pr95615-02.C: New test.
- * g++.dg/coroutines/torture/pr95615-03.C: New test.
- * g++.dg/coroutines/torture/pr95615-04.C: New test.
- * g++.dg/coroutines/torture/pr95615-05.C: New test.
- * g++.dg/coroutines/torture/pr95615.inc: New file.
-
-2021-03-05 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR target/99378
- * gcc.target/i386/pr99123-2.c: New.
-
-2021-03-05 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99389
- * g++.dg/modules/pr99389_a.H: New.
- * g++.dg/modules/pr99389_b.C: New.
- * g++.dg/modules/pr99389_c.C: New.
-
-2021-03-05 Tobias Burnus <tobias@codesourcery.com>
-
- PR c/99137
- * c-c++-common/goacc/asyncwait-1.c: Update dg-error; add
- additional test.
-
-2021-03-05 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/real4-10-real8-10.f90: Add check for real literals
- with '_kind' number.
- * gfortran.dg/real4-10-real8-16.f90: Likewise.
- * gfortran.dg/real4-10-real8-4.f90: Likewise.
- * gfortran.dg/real4-10.f90: Likewise.
- * gfortran.dg/real4-16-real8-10.f90: Likewise.
- * gfortran.dg/real4-16-real8-16.f90: Likewise.
- * gfortran.dg/real4-16-real8-4.f90: Likewise.
- * gfortran.dg/real4-16.f90: Likewise.
- * gfortran.dg/real4-8-real8-10.f90: Likewise.
- * gfortran.dg/real4-8-real8-16.f90: Likewise.
- * gfortran.dg/real4-8-real8-4.f90: Likewise.
- * gfortran.dg/real4-8.f90: Likewise.
- * gfortran.dg/real8-10.f90: Likewise.
- * gfortran.dg/real8-16.f90: Likewise.
- * gfortran.dg/real8-4.f90: Likewise.
-
-2021-03-05 Hans-Peter Nilsson <hp@axis.com>
-
- PR debug/66668
- * gcc.dg/debug/dwarf2/stacked-qualified-types-3.c: xfail for cris-*-*
-
-2021-03-04 Iain Sandoe <iain@sandoe.co.uk>
-
- * lib/prune.exp: Prune useless output caused by a linker bug.
-
-2021-03-04 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/93235
- * gcc.target/aarch64/pr93235.c: New test.
-
-2021-03-04 Martin Liska <mliska@suse.cz>
-
- PR gcov-profile/99105
- * gcc.dg/tree-prof/indir-call-prof-malloc.c: Use profile
- correction as the wrapped malloc is called one more time
- from libgcov.
- * gcc.dg/tree-prof/pr97461.c: Likewise.
-
-2021-03-04 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/88146
- PR c++/99362
- * g++.dg/cpp2a/nodiscard-constructor.c: Renamed to ...
- * g++.dg/cpp2a/nodiscard-constructor1.C: ... this. Remove
- -ftrack-macro-expansion=0 from dg-options. Don't use (?n) in
- dg-warning regexps, instead replace .* with \[^\n\r]*.
- * g++.dg/cpp2a/nodiscard-constructor2.C: New test.
- * g++.dg/cpp2a/nodiscard-reason-only-one.C: Remove
- -ftrack-macro-expansion=0 from dg-options.
- * g++.dg/cpp2a/nodiscard-reason-nonstring.C: Likewise.
- * g++.dg/cpp2a/nodiscard-once.C: Likewise.
-
-2021-03-04 Jakub Jelinek <jakub@redhat.com>
-
- PR c/99325
- * gcc.dg/cpp/line11.c: New test.
- * gcc.dg/cpp/line12.c: New test.
-
-2021-03-04 Alex Coplan <alex.coplan@arm.com>
-
- PR target/99381
- * gcc.target/aarch64/pr99381.c: New test.
-
-2021-03-04 Ilya Leoshkevich <iii@linux.ibm.com>
-
- * gcc.target/s390/mul-signed-overflow-1.c: Compile on old
- machines.
- * gcc.target/s390/mul-signed-overflow-2.c: Likewise.
-
-2021-03-04 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99170
- * g++.dg/modules/pr99170-1_a.H: New.
- * g++.dg/modules/pr99170-1_b.C: New.
- * g++.dg/modules/pr99170-2.h: New.
- * g++.dg/modules/pr99170-2_a.C: New.
- * g++.dg/modules/pr99170-2_b.C: New.
- * g++.dg/modules/pr99170-3_a.H: New.
- * g++.dg/modules/pr99170-3_b.C: New.
- * g++.dg/modules/inst-2_b.C: Adjust scan.
- * g++.dg/modules/inst-4_a.C: Adjust scan.
- * g++.dg/modules/inst-4_b.C: Adjust scan.
- * g++.dg/modules/member-def-1_b.C: Adjust scan.
- * g++.dg/modules/member-def-1_c.C: Adjust scan.
- * g++.dg/modules/tpl-spec-1_a.C: Adjust scan.
- * g++.dg/modules/tpl-spec-1_b.C: Adjust scan.
- * g++.dg/modules/tpl-spec-2_b.C: Adjust scan.
- * g++.dg/modules/tpl-spec-2_c.C: Adjust scan.
- * g++.dg/modules/tpl-spec-2_d.C: Adjust scan.
- * g++.dg/modules/tpl-spec-3_a.C: Adjust scan.
- * g++.dg/modules/tpl-spec-3_b.C: Adjust scan.
- * g++.dg/modules/tpl-spec-4_a.C: Adjust scan.
- * g++.dg/modules/tpl-spec-4_b.C: Adjust scan.
- * g++.dg/modules/tpl-spec-5_a.C: Adjust scan.
- * g++.dg/modules/tpl-spec-5_b.C: Adjust scan.
-
-2021-03-04 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/99355
- * gfortran.dg/real4-10-real8-10.f90: New test.
- * gfortran.dg/real4-10-real8-16.f90: New test.
- * gfortran.dg/real4-10-real8-4.f90: New test.
- * gfortran.dg/real4-10.f90: New test.
- * gfortran.dg/real4-16-real8-10.f90: New test.
- * gfortran.dg/real4-16-real8-16.f90: New test.
- * gfortran.dg/real4-16-real8-4.f90: New test.
- * gfortran.dg/real4-16.f90: New test.
- * gfortran.dg/real4-8-real8-10.f90: New test.
- * gfortran.dg/real4-8-real8-16.f90: New test.
- * gfortran.dg/real4-8-real8-4.f90: New test.
- * gfortran.dg/real4-8.f90: New test.
- * gfortran.dg/real8-10.f90: New test.
- * gfortran.dg/real8-16.f90: New test.
- * gfortran.dg/real8-4.f90: New test.
-
-2021-03-04 Hans-Peter Nilsson <hp@axis.com>
-
- * gcc.misc-tests/outputs.exp: Enumerate tests.
-
-2021-03-04 Hans-Peter Nilsson <hp@axis.com>
-
- * gcc.misc-tests/outputs.exp: Append discriminating
- suffixes to tests with duplicate names.
- (outest): Assert that each running test has a unique
- name.
-
-2021-03-04 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/96963
- PR middle-end/94655
- * gcc.dg/Wstringop-overflow-47.c: Xfail tests.
- * gcc.dg/Wstringop-overflow-65.c: New test.
- * gcc.dg/Warray-bounds-69.c: Same.
-
-2021-03-03 Marek Polacek <polacek@redhat.com>
-
- PR c++/96474
- * g++.dg/cpp1z/class-deduction83.C: New test.
-
-2021-03-03 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/advsimd-intrinsics/vcvt_fXX_fXX.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vcvtx.c:
- New test.
-
-2021-03-03 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/advsimd-intrinsics/vmovn_high.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vqmovn_high.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vqmovun_high.c:
- New test.
-
-2021-03-03 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/advsimd-intrinsics/vrshrn_high_n.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vshrn_high_n.c:
- New test.
-
-2021-03-03 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/advsimd-intrinsics/vXXXhn_high.inc:
- New test template.
- * gcc.target/aarch64/advsimd-intrinsics/vaddhn_high.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vraddhn_high.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vrsubhn_high.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vsubhn_high.c:
- New test.
-
-2021-03-03 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/82959
- * g++.dg/cpp1z/eval-order10.C: New test.
-
-2021-03-03 Marek Polacek <polacek@redhat.com>
-
- PR c++/97034
- PR c++/99009
- * g++.dg/cpp1z/class-deduction81.C: New test.
- * g++.dg/cpp1z/class-deduction82.C: New test.
- * g++.dg/cpp2a/class-deduction-aggr8.C: New test.
- * g++.dg/cpp2a/class-deduction-aggr9.C: New test.
- * g++.dg/cpp2a/class-deduction-aggr10.C: New test.
+ PR c++/103480
+ * g++.dg/warn/Wuseless-cast2.C: New test.
-2021-03-03 Jason Merrill <jason@redhat.com>
+2022-01-12 Jakub Jelinek <jakub@redhat.com>
- PR c++/95675
- * g++.dg/cpp0x/decltype-call5.C: New test.
- * g++.dg/cpp0x/decltype-call6.C: New test.
-
-2021-03-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
-
- * gcc.target/i386/pr95798-1.c: Add -fomit-frame-pointer to
+ PR middle-end/101530
+ * c-c++-common/builtin-shufflevector-3.c: Add -Wno-psabi to
dg-options.
- * gcc.target/i386/pr95798-2.c: Likewise.
-
-2021-03-03 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99344
- * g++.dg/modules/namespace-2_a.C
- * g++.dg/modules/pr99344_a.C
- * g++.dg/modules/pr99344_b.C
-
-2021-03-03 Jakub Jelinek <jakub@redhat.com>
-
- PR target/99321
- * gcc.target/i386/pr99321.c: New test.
-
-2021-03-03 Jakub Jelinek <jakub@redhat.com>
-
- PR c/99324
- * gcc.c-torture/compile/pr99324.c: New test.
-
-2021-03-03 Jakub Jelinek <jakub@redhat.com>
-
- PR target/99085
- * gcc.dg/graphite/pr99085.c: New test.
-
-2021-03-03 Jason Merrill <jason@redhat.com>
-
- PR c++/96078
- * g++.dg/ext/attr-flatten1.C: New test.
-
-2021-03-02 Hans-Peter Nilsson <hp@axis.com>
-
- * gcc.misc-tests/outputs.exp: Skip @file -save-temps
- tests if target test-framework has -L or -I options.
-
-2021-03-02 David Malcolm <dmalcolm@redhat.com>
-
- PR c/99323
- * gcc.dg/pr99323-1.c: New test.
- * gcc.dg/pr99323-2.c: New test.
-
-2021-03-02 Martin Sebor <msebor@redhat.com>
-
- PR c++/99251
- * g++.dg/warn/Wnonnull9.C: Expect no warnings.
- * g++.dg/warn/Wnonnull12.C: New test.
-
-2021-03-02 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/limited5.adb: New test.
-
-2021-03-02 Patrick Palka <ppalka@redhat.com>
-
- PR c++/96443
- PR c++/96960
- * g++.dg/concepts/abbrev9.C: New test.
- * g++.dg/cpp2a/concepts-lambda15.C: New test.
- * g++.dg/cpp2a/concepts-placeholder3.C: New test.
- * g++.dg/cpp2a/concepts-return-req2.C: New test.
- * g++.dg/cpp2a/concepts-ts1.C: Add dg-bogus directive to the
- call to f15 that we expect to accept.
-
-2021-03-02 Patrick Palka <ppalka@redhat.com>
-
- * g++.dg/cpp1z/auto1.C: New test.
-
-2021-03-02 Andreas Krebbel <krebbel@linux.ibm.com>
-
- * gcc.target/s390/zvector/vec-nnpa-fp16-convert.c: New test.
- * gcc.target/s390/zvector/vec-nnpa-fp32-convert-1.c: New test.
- * gcc.target/s390/zvector/vec_convert_from_fp16.c: New test.
- * gcc.target/s390/zvector/vec_convert_to_fp16.c: New test.
- * gcc.target/s390/zvector/vec_extend_to_fp32_hi.c: New test.
- * gcc.target/s390/zvector/vec_extend_to_fp32_lo.c: New test.
- * gcc.target/s390/zvector/vec_round_from_fp32.c: New test.
-
-2021-03-02 Andreas Krebbel <krebbel@linux.ibm.com>
-
- * lib/target-supports.exp: Add check for nnpa facility.
-
-2021-03-02 Andreas Krebbel <krebbel@linux.ibm.com>
-
- * gcc.target/s390/mul-signed-overflow-1.c: Run only on z14.
- * gcc.target/s390/mul-signed-overflow-2.c: Run only on z14.
-
-2021-03-01 Martin Liska <mliska@suse.cz>
-
- PR target/99313
- * gcc.target/s390/target-attribute/pr99313.c: New test.
-
-2021-03-01 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99294
- * g++.dg/modules/pr99294.h: New.
- * g++.dg/modules/pr99294_a.C: New.
- * g++.dg/modules/pr99294_b.C: New.
-
-2021-03-01 Eric Botcazou <ebotcazou@adacore.com>
-
- * g++.dg/eh/seh-xmm-unwind.C: New test.
-
-2021-02-28 Iain Sandoe <iain@sandoe.co.uk>
-
- * g++.dg/coroutines/pr94879-folly-1.C: Make final suspend
- expression components noexcept.
- * g++.dg/coroutines/pr94883-folly-2.C: Likewise.
- * g++.dg/coroutines/pr95345.C: Likewise.
-
-2021-02-28 Jason Merrill <jason@redhat.com>
-
- * g++.dg/ext/attr-lambda3.C: Add missing ;
-
-2021-02-27 Jason Merrill <jason@redhat.com>
-
- PR c++/90333
- * g++.dg/ext/attr-lambda3.C: New test.
-
-2021-02-26 Alexandre Oliva <oliva@gnu.org>
-
- * gcc.target/powerpc/pr67789.c: Revert fpic target requirement
- duplication.
- * gcc.target/powerpc/pr83629.c: Likewise.
- * gcc.target/powerpc/pr84112.c: Likewise.
-
-2021-02-26 Olivier Hainque <hainque@adacore.com>
-
- * gcc.target/powerpc/compress-float-ppc-pic.c: Add
- dg-require-effective-target fpic.
- * gcc.target/powerpc/ppc-eabi.c: Likewise.
- * gcc.target/powerpc/pr26350.c: Likewise.
- * gcc.target/powerpc/pr67789.c: Likewise.
- * gcc.target/powerpc/pr79439-1.c: Likewise.
- * gcc.target/powerpc/pr79439-2.c: Likewise.
- * gcc.target/powerpc/pr79439-3.c: Likewise.
- * gcc.target/powerpc/pr83629.c: Likewise.
- * gcc.target/powerpc/pr84112.c: Likewise.
-
-2021-02-26 Richard Biener <rguenther@suse.de>
-
- PR middle-end/99281
- * g++.dg/pr99218.C: New testcase.
-
-2021-02-26 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/cpp23/lambda-specifiers1.C: New test.
-
-2021-02-26 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/95451
- * g++.dg/cpp1y/lambda-generic-95451.C: New test.
-
-2021-02-26 Jason Merrill <jason@redhat.com>
-
- PR c++/98810
- * g++.dg/cpp2a/nontype-class-defarg1.C: New test.
-
-2021-02-26 Aaron Sawdey <acsawdey@linux.ibm.com>
-
- * gcc.target/powerpc/pcrel-opt-inc-di.c: New test.
- * gcc.target/powerpc/pcrel-opt-ld-df.c: New test.
- * gcc.target/powerpc/pcrel-opt-ld-di.c: New test.
- * gcc.target/powerpc/pcrel-opt-ld-hi.c: New test.
- * gcc.target/powerpc/pcrel-opt-ld-qi.c: New test.
- * gcc.target/powerpc/pcrel-opt-ld-sf.c: New test.
- * gcc.target/powerpc/pcrel-opt-ld-si.c: New test.
- * gcc.target/powerpc/pcrel-opt-ld-vector.c: New test.
- * gcc.target/powerpc/pcrel-opt-st-df.c: New test.
- * gcc.target/powerpc/pcrel-opt-st-di.c: New test.
- * gcc.target/powerpc/pcrel-opt-st-hi.c: New test.
- * gcc.target/powerpc/pcrel-opt-st-qi.c: New test.
- * gcc.target/powerpc/pcrel-opt-st-sf.c: New test.
- * gcc.target/powerpc/pcrel-opt-st-si.c: New test.
- * gcc.target/powerpc/pcrel-opt-st-vector.c: New test.
-
-2021-02-26 Patrick Palka <ppalka@redhat.com>
-
- PR c++/98990
- * g++.dg/concepts/abbrev8.C: New test.
-
-2021-02-25 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99213
- PR c++/94521
- * g++.dg/diagnostic/local1.C: New test.
-
-2021-02-25 Patrick Palka <ppalka@redhat.com>
-
- PR c++/99103
- * g++.dg/cpp1z/class-deduction79.C: New test.
- * g++.dg/cpp1z/class-deduction80.C: New test.
-
-2021-02-25 Marek Polacek <polacek@redhat.com>
-
- DR 1312
- PR c++/99176
- * g++.dg/cpp0x/constexpr-nullptr-2.C: Adjust dg-error.
- * g++.dg/cpp0x/constexpr-cast2.C: New test.
- * g++.dg/cpp0x/constexpr-cast3.C: New test.
-
-2021-02-25 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/97587
- * g++.dg/coroutines/coro1-refs-and-ctors.h: Add a CTOR with two
- reference parms, to distinguish the rvalue ref. variant.
- * g++.dg/coroutines/pr97587.C: New test.
-
-2021-02-25 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/95822
- * g++.dg/coroutines/pr95822.C: New test.
-
-2021-02-25 Richard Earnshaw <rearnsha@arm.com>
-
- * gcc.target/arm/cmse/cmse-18.c: New test.
-
-2021-02-25 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99166
- * g++.dg/modules/pr99166_a.X: Adjust.
- * g++.dg/modules/pr99166_b.C: Adjust.
- * g++.dg/modules/pr99166_c.C: Adjust.
- * g++.dg/modules/pr99166_d.C: Adjust.
-
-2021-02-25 Hans-Peter Nilsson <hp@axis.com>
-
- * gfortran.dg/pr95690.f90: CRIS error appears on line 5.
-
-2021-02-25 Tamar Christina <tamar.christina@arm.com>
-
- * g++.dg/vect/simd-complex-num-null-node.cc: New test.
-
-2021-02-25 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR testsuite/99233
- * gcc.target/powerpc/pr96264.c: Run it only for powerpc64le.
-
-2021-02-25 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR middle-end/97172
- * gcc.dg/pr97172-2.c: Add dg-require-effective-target shared.
-
-2021-02-25 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99253
- * gcc.dg/vect/pr99253.c: New testcase.
-
-2021-02-25 Jakub Jelinek <jakub@redhat.com>
-
- PR target/95798
- * gcc.target/i386/pr95798-1.c: New test.
- * gcc.target/i386/pr95798-2.c: New test.
-
-2021-02-25 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/80635
- * g++.dg/warn/pr80635-1.C: New test.
- * g++.dg/warn/pr80635-2.C: New test.
-
-2021-02-25 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/99193
- * gcc.dg/analyzer/pr99193-1.c: New test.
- * gcc.dg/analyzer/pr99193-2.c: New test.
- * gcc.dg/analyzer/pr99193-3.c: New test.
- * gcc.dg/analyzer/realloc-1.c: New test.
-
-2021-02-24 Nathan Sidwell <nathan@acm.org>
-
- PR c++/98718
- * g++.dg/modules/pr98718_a.C: New.
- * g++.dg/modules/pr98718_b.C: New.
-
-2021-02-24 Iain Sandoe <iain@sandoe.co.uk>
-
- * g++.dg/coroutines/co-await-void_type.C: Mark promise
- final_suspend call as noexcept.
- * g++.dg/coroutines/co-return-syntax-08-bad-return.C: Likewise.
- * g++.dg/coroutines/co-return-syntax-10-movable.C: Likewise.
- * g++.dg/coroutines/co-return-warning-1.C: Likewise.
- * g++.dg/coroutines/co-yield-syntax-08-needs-expr.C: Likewise.
- * g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C: Likewise.
- * g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C: Likewise.
- * g++.dg/coroutines/coro-missing-gro.C: Likewise.
- * g++.dg/coroutines/coro-missing-promise-yield.C: Likewise.
- * g++.dg/coroutines/coro-missing-ret-value.C: Likewise.
- * g++.dg/coroutines/coro-missing-ret-void.C: Likewise.
- * g++.dg/coroutines/coro-missing-ueh.h: Likewise.
- * g++.dg/coroutines/coro1-allocators.h: Likewise.
- * g++.dg/coroutines/coro1-refs-and-ctors.h: Likewise.
- * g++.dg/coroutines/coro1-ret-int-yield-int.h: Likewise.
- * g++.dg/coroutines/pr94682-preview-this.C: Likewise.
- * g++.dg/coroutines/pr94752.C: Likewise.
- * g++.dg/coroutines/pr94760-mismatched-traits-and-promise-prev.C: Likewise.
- * g++.dg/coroutines/pr94879-folly-1.C: Likewise.
- * g++.dg/coroutines/pr94883-folly-2.C: Likewise.
- * g++.dg/coroutines/pr95050.C: Likewise.
- * g++.dg/coroutines/pr95345.C: Likewise.
- * g++.dg/coroutines/pr95440.C: Likewise.
- * g++.dg/coroutines/pr95591.C: Likewise.
- * g++.dg/coroutines/pr95711.C: Likewise.
- * g++.dg/coroutines/pr95813.C: Likewise.
- * g++.dg/coroutines/symmetric-transfer-00-basic.C: Likewise.
- * g++.dg/coroutines/torture/co-await-07-tmpl.C: Likewise.
- * g++.dg/coroutines/torture/co-await-17-capture-comp-ref.C: Likewise.
- * g++.dg/coroutines/torture/co-ret-00-void-return-is-ready.C: Likewise.
- * g++.dg/coroutines/torture/co-ret-01-void-return-is-suspend.C: Likewise.
- * g++.dg/coroutines/torture/co-ret-03-different-GRO-type.C: Likewise.
- * g++.dg/coroutines/torture/co-ret-04-GRO-nontriv.C: Likewise.
- * g++.dg/coroutines/torture/co-ret-06-template-promise-val-1.C: Likewise.
- * g++.dg/coroutines/torture/co-ret-08-template-cast-ret.C: Likewise.
- * g++.dg/coroutines/torture/co-ret-09-bool-await-susp.C: Likewise.
- * g++.dg/coroutines/torture/co-ret-15-default-return_void.C: Likewise.
- * g++.dg/coroutines/torture/co-ret-17-void-ret-coro.C: Likewise.
- * g++.dg/coroutines/torture/co-yield-00-triv.C: Likewise.
- * g++.dg/coroutines/torture/co-yield-03-tmpl.C: Likewise.
- * g++.dg/coroutines/torture/co-yield-04-complex-local-state.C: Likewise.
- * g++.dg/coroutines/torture/exceptions-test-0.C: Likewise.
- * g++.dg/coroutines/torture/exceptions-test-01-n4849-a.C: Likewise.
- * g++.dg/coroutines/torture/func-params-04.C: Likewise.
- * g++.dg/coroutines/torture/local-var-06-structured-binding.C: Likewise.
- * g++.dg/coroutines/torture/mid-suspend-destruction-0.C: Likewise.
-
-2021-02-24 Jakub Jelinek <jakub@redhat.com>
-
- PR fortran/99226
- * c-c++-common/gomp/pr99226.c: New test.
- * gfortran.dg/gomp/pr99226.f90: New test.
-
-2021-02-24 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR inline-asm/99123
- * gcc.target/i386/pr99123.c: New.
-
-2021-02-24 Hans-Peter Nilsson <hp@axis.com>
-
- * gcc.dg/stack-usage-1.c: Adjust for CRIS.
-
-2021-02-24 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99072
- * g++.dg/modules/pr99072.H: New.
-
-2021-02-24 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/98342
- * gfortran.dg/assumed_rank_21.f90 : New test.
-
-2021-02-24 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/97172
- * gcc.dg/pr97172-2.c: New test.
-
-2021-02-24 Tamar Christina <tamar.christina@arm.com>
-
- PR tree-optimization/99220
- * g++.dg/vect/pr99220.cc: New test.
-
-2021-02-24 Tamar Christina <tamar.christina@arm.com>
-
- PR tree-optimization/99149
- * g++.dg/vect/pr99149.cc: Disabled on BE.
-
-2021-02-24 Iain Sandoe <iain@sandoe.co.uk>
-
- PR c++/96251
- * g++.dg/coroutines/pr96251.C: New test.
-
-2021-02-24 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/99225
- * gcc.c-torture/compile/pr99225.c: New test.
-
-2021-02-24 Tamar Christina <tamar.christina@arm.com>
-
- PR tree-optimization/99149
- * g++.dg/vect/pr99149.cc: New test.
-
-2021-02-24 Richard Biener <rguenther@suse.de>
-
- PR c/99224
- * gcc.dg/pr99224.c: New testcase.
-
-2021-02-23 Peter Bergner <bergner@linux.ibm.com>
-
- * gcc.target/powerpc/mma-builtin-4.c: Add tests for
- __builtin_vsx_assemble_pair and __builtin_vsx_disassemble_pair.
- Add __has_builtin tests for built-ins.
- Update expected instruction counts.
-
-2021-02-23 Martin Sebor <msebor@redhat.com>
-
- PR c++/99074
- * g++.dg/warn/Wnonnull11.C: New test.
-
-2021-02-23 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/99124
- * gfortran.dg/class_defined_operator_2.f03 : New test.
- * gfortran.dg/elemental_result_2.f90 : New test.
- * gfortran.dg/class_assign_4.f90: Correct the non-conforming
- elemental function with an allocatable result with an operator
- interface with array dummies and result.
-
-2021-02-23 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/99206
- * gfortran.dg/reshape_zerosize_4.f90: New test.
-
-2021-02-23 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99208
- * g++.dg/modules/pr99208_a.C: New.
- * g++.dg/modules/pr99208_b.C: New.
-
-2021-02-23 Martin Liska <mliska@suse.cz>
-
- PR sanitizer/99168
- * c-c++-common/asan/pr99168.c: New test.
-
-2021-02-23 Patrick Palka <ppalka@redhat.com>
-
- PR c++/95468
- * g++.dg/template/non-dependent15.C: New test.
-
-2021-02-23 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/99204
- * gfortran.dg/pr99204.f90: New test.
-
-2021-02-23 Kewen Lin <linkw@linux.ibm.com>
-
- * gcc.target/powerpc/vec-init-10.c: New test.
-
-2021-02-23 Hans-Peter Nilsson <hp@axis.com>
-
- * g++.dg/warn/Wplacement-new-size-1.C,
- g++.dg/warn/Wplacement-new-size-2.C,
- g++.dg/warn/Wplacement-new-size-6.C: Adjust for
- default_packed targets.
-
-2021-02-22 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/99196
- * gcc.dg/analyzer/error-1.c: New test.
- * gcc.dg/analyzer/error-2.c: New test.
- * gcc.dg/analyzer/error-3.c: New test.
-
-2021-02-22 H.J. Lu <hjl.tools@gmail.com>
-
- PR testsuite/99173
- * c-c++-common/attr-retain-5.c: Require R_flag_in_section.
- * c-c++-common/attr-retain-6.c: Likewise.
- * c-c++-common/attr-retain-7.c: Likewise.
- * c-c++-common/attr-retain-8.c: Likewise.
- * c-c++-common/attr-retain-9.c: Likewise.
-
-2021-02-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/sve/cse_sve_vl_constants_1.c: New test.
-
-2021-02-22 Hans-Peter Nilsson <hp@axis.com>
-
- * g++.dg/warn/Warray-bounds-10.C, g++.dg/warn/Warray-bounds-11.C,
- g++.dg/warn/Warray-bounds-12.C, g++.dg/warn/Warray-bounds-13.C:
- Handle __INT32_TYPE__ being "long int".
-
-2021-02-22 Hans-Peter Nilsson <hp@axis.com>
-
- * gcc.target/cris/biap.c: Add a Y+=X*2 to the Y+=X*4.
-
-2021-02-22 Hans-Peter Nilsson <hp@axis.com>
-
- * gcc.target/cris/biap-mul.c: New test.
-
-2021-02-22 Hans-Peter Nilsson <hp@axis.com>
-
- * gcc.target/cris/torture/sync-reload-mul-1.c: New test.
-
-2021-02-22 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99174
- * g++.dg/modules/pr99174-1_a.C: New.
- * g++.dg/modules/pr99174-1_b.C: New.
- * g++.dg/modules/pr99174-1_c.C: New.
- * g++.dg/modules/pr99174.H: New.
-
-2021-02-22 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99153
- * g++.dg/modules/pr99153_a.H: New.
- * g++.dg/modules/pr99153_b.H: New.
-
-2021-02-22 Andre Vieira <andre.simoesdiasvieira@arm.com>
-
- PR rtl-optimization/98791
- * gcc.target/aarch64/sve/pr98791.c: New test.
-
-2021-02-22 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/99165
- * g++.dg/pr99165.C: New testcase.
-
-2021-02-21 Harald Anlauf <anlauf@gmx.de>
-
- * gfortran.dg/intent_optimize_3.f90: New test.
-
-2021-02-20 David Edelsohn <dje.gcc@gmail.com>
-
- * c-c++-common/attr-retain-5.c: Skip on AIX.
- * c-c++-common/attr-retain-6.c: Same.
- * c-c++-common/attr-retain-7.c: Same.
- * c-c++-common/attr-retain-8.c: Same.
- * c-c++-common/attr-retain-9.c: Same.
-
-2021-02-20 Ilya Leoshkevich <iii@linux.ibm.com>
-
- PR target/99134
- * gcc.target/s390/vector/long-double-from-decimal128.c: New test.
- * gcc.target/s390/vector/long-double-from-decimal32.c: New test.
- * gcc.target/s390/vector/long-double-from-decimal64.c: New test.
- * gcc.target/s390/vector/long-double-to-decimal128.c: New test.
- * gcc.target/s390/vector/long-double-to-decimal32.c: New test.
- * gcc.target/s390/vector/long-double-to-decimal64.c: New test.
-
-2021-02-19 Nathan Sidwell <nathan@acm.org>
-
- PR c++/98741
- * g++.dg/modules/pr98741_a.H: New.
- * g++.dg/modules/pr98741_b.H: New.
- * g++.dg/modules/pr98741_c.C: New.
- * g++.dg/modules/pr98741_d.C: New.
-
-2021-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
-
- PR fortran/98686
- * gfortran.dg/namelist_4.f90: Modify.
- * gfortran.dg/namelist_98.f90: New test.
-
-2021-02-19 Martin Sebor <msebor@redhat.com>
-
- PR c/97172
- * gcc.dg/pr97172.c: Add test cases.
-
-2021-02-19 Nathan Sidwell <nathan@acm.org>
-
- * g++.dg/modules/pr99166_a.X: New.
- * g++.dg/modules/pr99166_b.C: New.
- * g++.dg/modules/pr99166_c.C: New.
- * g++.dg/modules/pr99166_d.C: New.
-
-2021-02-19 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/99010
- * gfortran.dg/coarray/array_temporary-1.f90: New test.
-
-2021-02-19 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/99146
- * gfortran.dg/dtio_36.f90: New test.
-
-2021-02-19 Richard Biener <rguenther@suse.de>
-
- PR middle-end/99122
- * gcc.dg/pr99122-3.c: New testcase.
-
-2021-02-19 Jakub Jelinek <jakub@redhat.com>
-
- PR target/98998
- * gcc.target/arm/pure-code/pr98998.c: New test.
-
-2021-02-19 Jakub Jelinek <jakub@redhat.com>
-
- PR ipa/99034
- * g++.dg/opt/pr99034.C: New test.
-
-2021-02-19 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/99027
- * gfortran.dg/ubound_1.f90: New test.
-
-2021-02-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
-
- PR target/98657
- * gcc.target/aarch64/sve/pr98657.c: New test.
-
-2021-02-19 Jason Merrill <jason@redhat.com>
-
- * g++.dg/cpp0x/decltype64.C: Change argument to const&.
-
-2021-02-19 David Malcolm <dmalcolm@redhat.com>
-
- PR jit/99126
- * jit.dg/test-trap.c: New test.
-
-2021-02-19 Jason Merrill <jason@redhat.com>
-
- PR c++/96926
- * g++.dg/cpp0x/overload4.C: New test.
-
-2021-02-18 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR rtl-optimization/96264
- * gcc.target/powerpc/pr96264.c: New.
-
-2021-02-18 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/99113
- * c-c++-common/attr-retain-1.c: New test.
- * c-c++-common/attr-retain-2.c: Likewise.
- * c-c++-common/attr-retain-3.c: Likewise.
- * c-c++-common/attr-retain-4.c: Likewise.
- * c-c++-common/attr-retain-5.c: Likewise.
- * c-c++-common/attr-retain-6.c: Likewise.
- * c-c++-common/attr-retain-7.c: Likewise.
- * c-c++-common/attr-retain-8.c: Likewise.
- * c-c++-common/attr-retain-9.c: Likewise.
- * c-c++-common/pr99113.c: Likewise.
- * gcc.c-torture/compile/attr-retain-1.c: Likewise.
- * gcc.c-torture/compile/attr-retain-2.c: Likewise.
- * c-c++-common/attr-used.c: Don't expect SHF_GNU_RETAIN section.
- * c-c++-common/attr-used-2.c: Likewise.
- * c-c++-common/attr-used-3.c: Likewise.
- * c-c++-common/attr-used-4.c: Likewise.
- * c-c++-common/attr-used-9.c: Likewise.
- * gcc.c-torture/compile/attr-used-retain-1.c: Likewise.
- * gcc.c-torture/compile/attr-used-retain-2.c: Likewise.
- * c-c++-common/attr-used-5.c: Don't expect warning for the used
- attribute nor SHF_GNU_RETAIN section.
- * c-c++-common/attr-used-6.c: Likewise.
- * c-c++-common/attr-used-7.c: Likewise.
- * c-c++-common/attr-used-8.c: Likewise.
-
-2021-02-18 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99023
- * g++.dg/modules/modules.exp: Bail on cross-testing. Add support
- for .X files.
- * g++.dg/modules/pr99023_a.X: New.
- * g++.dg/modules/pr99023_b.X: New.
-
-2021-02-18 Jakub Jelinek <jakub@redhat.com>
-
- PR c/99136
- * gcc.dg/pr99136.c: New test.
-
-2021-02-18 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99023
- * g++.dg/modules/modules.exp: Remove dg-module-headers support
- * g++.dg/modules/alias-2_a.H: Delete.
- * g++.dg/modules/sys/alias-2_a.H: Delete.
-
-2021-02-18 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99150
- * g++.dg/modules/pr99023_a.H: Delete.
- * g++.dg/modules/pr99023_b.H: Delete.
-
-2021-02-18 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99132
- * g++.dg/cpp2a/constexpr-virtual18.C: New test.
-
-2021-02-18 Richard Biener <rguenther@suse.de>
-
- PR middle-end/99122
- * gcc.dg/pr99122-1.c: New testcase.
- * gcc.dg/pr99122-2.c: Likewise.
-
-2021-02-18 Hans-Peter Nilsson <hp@axis.com>
-
- PR tree-optimization/99142
- * gcc.dg/tree-ssa/pr99142.c: New test.
-
-2021-02-18 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/99109
- * g++.dg/warn/Warray-bounds-17.C: New test.
-
-2021-02-18 Jakub Jelinek <jakub@redhat.com>
-
- PR target/99104
- * gcc.dg/pr99104.c: New test.
-
-2021-02-17 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/94596
- * gcc.dg/analyzer/pr94596.c: New test.
-
-2021-02-17 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99023
- * g++.dg/modules/pr99023_a.H: New.
- * g++.dg/modules/pr99023_b.H: New.
-
-2021-02-17 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/98969
- * g++.dg/analyzer/pr99064.C: Convert dg-bogus to dg-warning.
- * gcc.dg/analyzer/pr96841.c: Add -Wno-analyzer-too-complex to
- options. Remove false leak directive.
- * gcc.dg/analyzer/pr98969.c (test_1): Remove xfail from leak
- false positive.
- (test_3): New.
-
-2021-02-17 Julian Brown <julian@codesourcery.com>
-
- * gfortran.dg/goacc/array-with-dt-2.f90: Remove expected errors.
- * gfortran.dg/goacc/array-with-dt-6.f90: New test.
- * gfortran.dg/goacc/mapping-tests-2.f90: Update expected error.
- * gfortran.dg/goacc/ref_inquiry.f90: Update expected errors.
- * gfortran.dg/gomp/ref_inquiry.f90: Likewise.
-
-2021-02-17 Julian Brown <julian@codesourcery.com>
- * gfortran.dg/goacc/array-with-dt-1.f90: New test.
- * gfortran.dg/goacc/array-with-dt-3.f90: Likewise.
- * gfortran.dg/goacc/array-with-dt-4.f90: Likewise.
- * gfortran.dg/goacc/array-with-dt-5.f90: Likewise.
- * gfortran.dg/goacc/derived-chartypes-1.f90: Re-enable test.
- * gfortran.dg/goacc/derived-chartypes-2.f90: Likewise.
- * gfortran.dg/goacc/derived-classtypes-1.f95: Uncomment
- previously-broken directives.
-
-2021-02-17 Jakub Jelinek <jakub@redhat.com>
-
- PR sanitizer/99106
- * g++.dg/ubsan/pr99106.C: New test.
-
-2021-02-17 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99116
- * g++.dg/lookup/pr99116-1.C: New.
- * g++.dg/lookup/pr99116-2.C: New.
-
-2021-02-17 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99071
- * g++.dg/modules/pr99071_a.H: New.
- * g++.dg/modules/pr99071_b.H: New.
-
-2021-02-17 Patrick Palka <ppalka@redhat.com>
-
- PR debug/96997
- PR c++/94034
- * g++.dg/cpp1y/constexpr-nsdmi7b.C: Adjust expected location of
- "call to non-'constexpr' function" error message.
-
-2021-02-16 Nathan Sidwell <nathan@acm.org>
-
- * g++.dg/modules/pr99050_a.H: New.
- * g++.dg/modules/pr99050_b.C: New.
-
-2021-02-16 Marek Polacek <polacek@redhat.com>
-
- PR c++/99062
- * gcc.dg/attr-assume_aligned-4.c: Adjust dg-warning.
- * g++.dg/ext/attr-assume-aligned.C: New test.
-
-2021-02-16 YunQiang Su <yunqiang.su@cipunited.com>
-
- * gcc.target/mips/compact-branches-5.c: Force -fno-PIC.
- * gcc.target/mips/compact-branches-6.c: Force -fno-PIC.
-
-2021-02-16 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/goacc/ref_inquiry.f90: New test.
- * gfortran.dg/gomp/ref_inquiry.f90: New test.
-
-2021-02-16 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR inline-asm/98096
- * gcc.c-torture/compile/pr98096.c: New.
-
-2021-02-16 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/99111
- * gfortran.dg/fmt_nonchar_1.f90: New test.
- * gfortran.dg/fmt_nonchar_2.f90: New test.
-
-2021-02-16 Jakub Jelinek <jakub@redhat.com>
-
- PR target/99100
- * gcc.target/i386/pr99100.c: New test.
-
-2021-02-16 Hans-Peter Nilsson <hp@axis.com>
-
- * gcc.misc-tests/outputs.exp (outest): Fix typo "is_target".
-
-2021-02-15 Peter Bergner <bergner@linux.ibm.com>
-
- PR rtl-optimization/98872
- * gcc.target/powerpc/pr98872.c: New test.
-
-2021-02-15 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/99079
- * gcc.dg/fold-modpow2-2.c: New test.
- * gcc.c-torture/execute/pr99079.c: New test.
-
-2021-02-13 Jakub Jelinek <jakub@redhat.com>
-
- PR rtl-optimization/98439
- * gcc.target/i386/pr98439.c: New test.
-
-2021-02-13 Jakub Jelinek <jakub@redhat.com>
-
- PR target/96166
- * gcc.target/i386/pr96166.c: New test.
-
-2021-02-12 Jakub Jelinek <jakub@redhat.com>
-
- * gcc.dg/rtl/aarch64/multi-subreg-1.c: Add dg-do compile directive
- and restrict the test to aarch64-*-* target only.
-
-2021-02-12 Nathan Sidwell <nathan@acm.org>
-
- * g++.dg/modules/pr99039_a.C: New.
- * g++.dg/modules/pr99039_b.C: New.
-
-2021-02-12 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99040
- * g++.dg/modules/pr99040_a.C: New.
- * g++.dg/modules/pr99040_b.C: New.
- * g++.dg/modules/pr99040_c.C: New.
- * g++.dg/modules/pr99040_d.C: New.
-
-2021-02-12 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99039
- PR c++/99040
- * g++.dg/lookup/pr99039.C: New.
-
-2021-02-12 Steve Kargl <sgk@troutmask.apl.washington.edu>
-
- PR libfortran/95647
- * gfortran.dg/ieee/ieee_12.f90: New test.
-
-2021-02-12 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.dg/rtl/aarch64/multi-subreg-1.c: New test.
-
-2021-02-12 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/98931
- * gcc.target/arm/pr98931.c: Add -mthumb
-
-2021-02-12 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/99043
- * gfortran.dg/assumed_rank_20.f90: New test.
-
-2021-02-12 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/97742
- * g++.dg/cpp2a/concepts-requires24.C: New test.
-
-2021-02-12 Jason Merrill <jason@redhat.com>
-
- PR c++/97246
- * g++.dg/cpp2a/lambda-generic-variadic21.C: New test.
-
-2021-02-12 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/98969
- * g++.dg/analyzer/pr99064.C: New test.
- * gcc.dg/analyzer/pr98969.c: New test.
-
-2021-02-11 Marek Polacek <polacek@redhat.com>
-
- PR c++/95888
- * g++.dg/template/deduce10.C: New test.
- * g++.dg/template/deduce9.C: New test.
-
-2021-02-11 Peter Bergner <bergner@linux.ibm.com>
-
- PR target/99041
- * g++.target/powerpc/pr99041.C: New test.
-
-2021-02-11 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99033
- * g++.dg/ext/flexary38.C: New test.
-
-2021-02-11 Marek Polacek <polacek@redhat.com>
-
- PR c++/99063
- * g++.dg/cpp0x/variadic-crash6.C: New test.
-
-2021-02-11 Patrick Palka <ppalka@redhat.com>
-
- PR c++/97582
- * g++.dg/cpp0x/lambda/lambda-template17.C: New test.
-
-2021-02-11 Andrea Corallo <andrea.corallo@arm.com>
-
- PR target/98931
- * gcc.target/arm/pr98931.c: New testcase.
-
-2021-02-11 Joel Hutton <joel.hutton@arm.com>
-
- PR tree-optimization/98772
- * gcc.target/aarch64/pr98772.c: New test.
-
-2021-02-11 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/98897
- * gfortran.dg/typebound_call_32.f90: New test.
-
-2021-02-11 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/99060
- * gfortran.dg/pr99060.f90: New test.
-
-2021-02-11 Alexandre Oliva <oliva@adacore.com>
-
- * gcc.target/arm/simd/vmmla_1.c: Pass -mfpu=auto.
-
-2021-02-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
-
- PR libfortran/98825
- * gfortran.dg/dollar_edit_descriptor_4.f: New test.
-
-2021-02-10 Martin Sebor <msebor@redhat.com>
-
- PR tree-optimization/92879
- * g++.dg/warn/Warray-bounds-16.C: New test.
-
-2021-02-10 David Malcolm <dmalcolm@redhat.com>
-
- PR preprocessor/96391
- * g++.dg/plugin/location-overflow-test-pr96391.c: New test.
- * g++.dg/plugin/plugin.exp (plugin_test_list): Add it,
- using the location_overflow_plugin.c from gcc.dg/plugin.
-
-2021-02-10 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/99035
- * g++.dg/ext/weak6.C: New test.
-
-2021-02-10 Jakub Jelinek <jakub@redhat.com>
-
- PR target/99025
- * gcc.target/i386/pr99025.c: New test.
-
-2021-02-10 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/98988
- PR c++/99031
- * g++.dg/cpp2a/constexpr-new16.C: New test.
- * g++.dg/cpp2a/constexpr-new17.C: New test.
-
-2021-02-10 Nathan Sidwell <nathan@acm.org>
-
- PR c++/99030
- * g++.dg/lookup/pr99030.C: New.
-
-2021-02-10 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/99007
- * g++.dg/gomp/pr99007.C: New test.
- * gcc.dg/gomp/pr99007-1.c: New test.
- * gcc.dg/gomp/pr99007-2.c: New test.
- * gcc.dg/gomp/pr99007-3.c: New test.
-
-2021-02-10 Julian Brown <julian@codesourcery.com>
-
- PR fortran/98979
- * gfortran.dg/goacc/array-with-dt-2.f90: Add expected errors.
- * gfortran.dg/goacc/derived-chartypes-1.f90: Skip ICEing test.
- * gfortran.dg/goacc/derived-chartypes-2.f90: Likewise.
-
-2021-02-09 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/98575
- * gcc.dg/analyzer/file-1.c (test_5): New.
- * gcc.dg/analyzer/file-3.c: New test.
-
-2021-02-09 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/98575
- * gcc.dg/analyzer/explode-1.c: Remove expected leak warning.
- * gcc.dg/analyzer/pr94851-2.c: New test.
- * gcc.dg/analyzer/pr98575-1.c: New test.
-
-2021-02-09 Andre Vieira <andre.simoesdiasvieira@arm.com>
-
- * gcc.target/aarch64/asimd-mul-to-shl-sub.c: New test.
-
-2021-02-09 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/advsimd-intrinsics/vpXXXq.inc:
- New test template.
- * gcc.target/aarch64/advsimd-intrinsics/vpaddq.c: New test.
-
-2021-02-09 Nathan Sidwell <nathan@acm.org>
-
- PR c++/98944
- * g++.dg/modules/pr98944_a.C: New.
- * g++.dg/modules/pr98944_b.C: New.
- * g++.dg/modules/pr98944_c.C: New.
- * g++.dg/modules/pr98944_d.C: New.
-
-2021-02-09 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/98465
- * g++.dg/warn/Wstringop-overread-1.C: New test.
-
-2021-02-09 Jason Merrill <jason@redhat.com>
-
- PR c++/96905
- * g++.dg/cpp2a/consteval-expinst1.C: New test.
-
-2021-02-09 Jason Merrill <jason@redhat.com>
-
- PR c++/98326
- * g++.dg/cpp1y/lambda-generic-empty1.C: New test.
-
-2021-02-09 Jason Merrill <jason@redhat.com>
-
- PR c++/98994
- * g++.dg/cpp2a/no_unique_address12.C: New test.
-
-2021-02-08 Nathan Sidwell <nathan@acm.org>
-
- * g++.dg/modules/pr98531-2.h: New.
- * g++.dg/modules/pr98531-2_a.H: New.
- * g++.dg/modules/pr98531-2_b.C: New.
- * g++.dg/modules/pr98531-3.h: New.
- * g++.dg/modules/pr98531-3_a.H: New.
- * g++.dg/modules/pr98531-3_b.C: New.
-
-2021-02-08 Nathan Sidwell <nathan@acm.org>
-
- PR c++/98531
- * g++.dg/modules/pr98531-1.h: New.
- * g++.dg/modules/pr98531-1_a.H: New.
- * g++.dg/modules/pr98531-1_b.C: New.
- * g++.dg/abi/pr98531-1.C: New.
- * g++.dg/abi/pr98531-2.C: New.
- * g++.dg/abi/pr98531-3.C: New.
- * g++.dg/abi/pr98531-4.C: New.
+2022-01-12 Richard Biener <rguenther@suse.de>
-2021-02-08 Andre Vieira <andre.simoesdiasvieira@arm.com>
+ PR tree-optimization/76174
+ * gcc.dg/tree-ssa/pr76174.c: New testcase.
- PR middle-end/98974
- * gfortran.dg/pr98974.F90: New test.
+2022-01-11 qing zhao <qing.zhao@oracle.com>
-2021-02-08 Richard Biener <rguenther@suse.de>
-
- PR lto/96591
- * g++.dg/lto/pr96591_0.C: New testcase.
-
-2021-02-05 Marek Polacek <polacek@redhat.com>
-
- PR c++/98947
- * g++.dg/cpp2a/volatile5.C: New test.
-
-2021-02-05 Marek Polacek <polacek@redhat.com>
-
- PR c++/96462
- * g++.dg/cpp2a/using-enum-8.C: New test.
-
-2021-02-05 Nathan Sidwell <nathan@acm.org>
-
- PR driver/98943
- * c-c++-common/pr98943.c: New.
-
-2021-02-05 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/98855
- * g++.dg/vect/slp-pr98855.cc: New testcase.
-
-2021-02-05 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/97878
- * g++.dg/cpp1z/decomp54.C: New test.
-
-2021-02-05 liuhongt <hongtao.liu@intel.com>
-
- PR target/98537
- * g++.target/i386/avx512bw-pr98537-1.C: New test.
- * g++.target/i386/avx512vl-pr98537-1.C: New test.
- * g++.target/i386/avx512vl-pr98537-2.C: New test.
- * gcc.target/i386/avx512vl-pr88547-1.c: Adjust testcase,
- integer mask comparison should not be generated.
- * gcc.target/i386/avx512vl-pr92686-vpcmp-1.c: Remove.
- * gcc.target/i386/avx512vl-pr92686-vpcmp-2.c: Ditto.
- * gcc.target/i386/avx512vl-pr92686-vpcmp-intelasm-1.c: Ditto.
-
-2021-02-04 Julian Brown <julian@codesourcery.com>
-
- * gfortran.dg/goacc/derived-chartypes-1.f90: New test.
- * gfortran.dg/goacc/derived-chartypes-2.f90: Likewise.
- * gfortran.dg/goacc/derived-chartypes-3.f90: Likewise.
- * gfortran.dg/goacc/derived-chartypes-4.f90: Likewise.
-
-2021-02-04 Julian Brown <julian@codesourcery.com>
-
- * gfortran.dg/goacc/array-with-dt-2.f90: New test.
-
-2021-02-04 Julian Brown <julian@codesourcery.com>
-
- * gfortran.dg/goacc/derived-classtypes-1.f95: New test.
-
-2021-02-04 Jakub Jelinek <jakub@redhat.com>
-
- PR testsuite/98325
- * lib/scanasm.exp (dg-scan-symbol-section): For powerpc*-*-* targets if
- $section is .opd, look at .L.$symbol_name's section.
- (parse_section_section_of_symbols): Handle .previous directive.
- * gcc.dg/array-quals-1.c: Allow .sdata section.
-
-2021-02-04 Iain Buclaw <ibuclaw@gdcproject.org>
-
- * gdc.dg/intrinsics.d: Update test.
-
-2021-02-04 Martin Sebor <msebor@redhat.com>
-
- PR c/97882
- * gcc.dg/decl-8.c: Adjust text of expected diagnostic.
- * gcc.dg/label-decl-4.c: Same.
- * gcc.dg/mismatch-decl-1.c: Same.
- * gcc.dg/old-style-then-proto-1.c: Same.
- * gcc.dg/parm-mismatch-1.c: Same.
- * gcc.dg/pr35445.c: Same.
- * gcc.dg/redecl-11.c: Same.
- * gcc.dg/redecl-12.c: Same.
- * gcc.dg/redecl-13.c: Same.
- * gcc.dg/redecl-15.c: Same.
- * gcc.dg/tls/thr-init-1.c: Same.
- * objc.dg/id-1.m: Same.
- * objc.dg/tls/diag-3.m: Same.
- * gcc.dg/pr97882.c: New test.
- * gcc.dg/qual-return-7.c: New test.
- * gcc.dg/qual-return-8.c: New test.
-
-2021-02-04 Jason Merrill <jason@redhat.com>
-
- PR c++/98717
- * g++.dg/cpp2a/concepts-variadic3.C: New test.
-
-2021-02-04 David Malcolm <dmalcolm@redhat.com>
-
- PR c/97932
- * gcc.dg/pr97932.c: New test.
-
-2021-02-04 emsr <3dw4rd@verizon.net>
-
- * g++.dg/cpp23/feat-cxx2b.C: __cpp_size_t_suffix == 202011.
-
-2021-02-04 Jakub Jelinek <jakub@redhat.com>
-
- * g++.dg/warn/Wsize_t-literals.C: Expect make_signed_t<size_t> instead
- of make_signed<size_t>::type in the diagnostics.
-
-2021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com>
-
- PR c++/90926
- * g++.dg/cpp1y/nsdmi-aggr12.C: New test.
-
-2021-02-04 Tobias Burnus <tobias@codesourcery.com>
-
- * gfortran.dg/goacc/substring.f90: New test.
- * gfortran.dg/gomp/substring.f90: New test.
-
-2021-02-04 Martin Liska <mliska@suse.cz>
-
- * gcc.target/i386/prefer-vector-width-attr.c: New test.
-
-2021-02-04 Jason Merrill <jason@redhat.com>
-
- PR c++/98802
- * g++.dg/cpp1z/class-deduction78.C: New test.
-
-2021-02-04 Jason Merrill <jason@redhat.com>
-
- PR c++/95192
- * g++.dg/cpp0x/pr84630.C: Call b().
- * g++.dg/cpp2a/lambda-uneval13.C: New test.
- * g++.dg/ext/attr-expr1.C: New test.
-
-2021-02-03 Jakub Jelinek <jakub@redhat.com>
-
- PR preprocessor/98882
- * gcc.dg/cpp/pr98882.c: New test.
-
-2021-02-03 Jason Merrill <jason@redhat.com>
-
- * g++.dg/cpp0x/alias-decl-dr1558.C: Pass --param
- hash-table-verification-limit=10000.
-
-2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
-
- * g++.dg/cpp0x/udlit-shadow-neg.C: Test for 'z' and 'zu' shadowing.
- * g++.dg/cpp23/feat-cxx2b.C: New test.
- * g++.dg/cpp23/size_t-literals.C: New test.
- * g++.dg/warn/Wsize_t-literals.C: New test.
-
-2021-02-03 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/97804
- * g++.dg/cpp2a/no_unique_address11.C: New test.
-
-2021-02-03 Marek Polacek <polacek@redhat.com>
-
- PR c++/98899
- * g++.dg/cpp0x/noexcept65.C: New test.
-
-2021-02-03 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/98913
- * gfortran.dg/coarray/array_temporary.f90: New test.
-
-2021-02-03 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/97487
- * gcc.dg/pr97487-1.c: New test.
- * gcc.dg/pr97487-2.c: New test.
-
-2021-02-03 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/97971
- * gcc.target/i386/pr97971.c: New test.
-
-2021-02-03 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/98287
- * gcc.dg/pr98287.c: New test.
-
-2021-02-03 Tamar Christina <tamar.christina@arm.com>
-
- PR tree-optimization/98928
- * gcc.target/i386/pr98928.c: New test.
-
-2021-02-02 Martin Liska <mliska@suse.cz>
-
- PR target/97510
- * gcc.target/i386/pr97510.c: New test.
-
-2021-02-02 Jason Merrill <jason@redhat.com>
-
- PR c++/98929
- * g++.dg/cpp1z/class-deduction-decltype1.C: New test.
-
-2021-02-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/narrow_high-intrinsics.c: Adjust sqxtun2 scan.
-
-2021-02-02 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/91862
- * gfortran.dg/pr91862.f90: New test.
-
-2021-02-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/arg-type-diagnostics-1.c: Return result from foo.
-
-2021-02-02 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/98848
- * gcc.dg/vect/pr98848.c: New test.
- * gcc.dg/vect/pr92205.c: Remove xfail.
-
-2021-02-02 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/97960
- * g++.dg/torture/pr97960.C: New test.
-
-2021-02-02 Kito Cheng <kito.cheng@sifive.com>
-
- PR target/98743
- * g++.dg/opt/pr98743.C: New.
-
-2021-02-02 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/mve-vorn.c: Add vorn tests.
-
-2021-02-02 Alexandre Oliva <oliva@adacore.com>
-
- * gcc.dg/asan/nested-1.c: New.
-
-2021-02-02 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/93355
- PR analyzer/96374
- * gcc.dg/analyzer/conditionals-3.c: Add "__analyzer_"
- prefix to support subroutines where necessary.
- * gcc.dg/analyzer/data-model-1.c: Likewise.
- * gcc.dg/analyzer/feasibility-1.c (called_by_test_6a): New.
- (test_6a): New.
- * gcc.dg/analyzer/params.c: Add "__analyzer_" prefix to support
- subroutines where necessary.
- * gcc.dg/analyzer/pr96651-2.c: Likewise.
- * gcc.dg/analyzer/signal-4b.c: Likewise.
- * gcc.dg/analyzer/single-field.c: Likewise.
- * gcc.dg/analyzer/torture/conditionals-2.c: Likewise.
-
-2021-02-02 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/93355
- PR analyzer/96374
- * gcc.dg/analyzer/pr93355-localealias-feasibility-2.c: New test.
- * gcc.dg/analyzer/pr93355-localealias-feasibility-3.c: New test.
-
-2021-02-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/narrow_high-intrinsics.c: Adjust rshrn2
- assembly scan.
-
-2021-02-01 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/98918
- * gcc.dg/analyzer/pr98918.c: New test.
-
-2021-02-01 Sergei Trofimovich <siarheit@google.com>
-
- PR tree-optimization/98499
- * g++.dg/pr98499.C: new test.
-
-2021-02-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/simd/vmovl_high_1.c: New test.
-
-2021-02-01 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/97172
- * gcc.dg/pr97172.c: New test.
-
-2021-02-01 Martin Sebor <msebor@redhat.com>
-
- PR c++/98835
- * g++.dg/Wclass-memaccess-6.C: New test.
-
-2021-02-01 Patrick Palka <ppalka@redhat.com>
-
- PR c++/98295
- * g++.dg/cpp0x/constexpr-98295.C: New test.
-
-2021-02-01 Marek Polacek <polacek@redhat.com>
-
- PR c++/98355
- * g++.dg/ext/builtin-has-attribute2.C: New test.
-
-2021-02-01 Jason Merrill <jason@redhat.com>
-
- PR c++/98570
- * g++.dg/cpp0x/alias-decl-targ1.C: New test.
-
-2021-02-01 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/advsimd-intrinsics/vmlXl_high.inc:
- New test template.
- * gcc.target/aarch64/advsimd-intrinsics/vmlXl_high_lane.inc:
- New test template.
- * gcc.target/aarch64/advsimd-intrinsics/vmlXl_high_laneq.inc:
- New test template.
- * gcc.target/aarch64/advsimd-intrinsics/vmlXl_high_n.inc:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vmlal_high.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vmlal_high_lane.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vmlal_high_laneq.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vmlal_high_n.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vmlsl_high.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vmlsl_high_lane.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vmlsl_high_laneq.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vmlsl_high_n.c:
- New test.
-
-2021-02-01 Jonathan Wright <jonathan.wright@arm.com>
-
- * gcc.target/aarch64/advsimd-intrinsics/vmull_high.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vmull_high_lane.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vmull_high_laneq.c:
- New test.
- * gcc.target/aarch64/advsimd-intrinsics/vmull_high_n.c:
- New test.
-
-2021-02-01 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.target/aarch64/advsimd-intrinsics/smlal-smlsl-mull-optimized.c: New test.
-
-2021-02-01 Patrick Palka <ppalka@redhat.com>
-
- PR c++/84494
- * g++.dg/cpp1y/constexpr-84494.C: New test.
-
-2021-02-01 Xing GUO <higuoxing@gmail.com>
-
- * gcc.target/riscv/attribute-18.c: Add -mriscv-attribute option.
-
-2021-02-01 Xionghu Luo <luoxhu@linux.ibm.com>
-
- * gcc.target/powerpc/pr79251.p8.c: Update store count regex.
- * gcc.target/powerpc/pr79251.p9.c: Likewise.
-
-2021-01-31 Iain Sandoe <iain@sandoe.co.uk>
-
- * c-c++-common/attr-used-5.c: Skip for Darwin.
- * c-c++-common/attr-used-6.c: Likewise.
- * c-c++-common/attr-used-7.c: Likewise.
- * c-c++-common/attr-used-8.c: Likewise.
- * c-c++-common/attr-used-9.c: Likewise.
-
-2021-01-30 David Edelsohn <dje.gcc@gmail.com>
-
- * gcc.target/powerpc/pr79251.p8.c: Update ilp32 store counts.
- * gcc.target/powerpc/pr79251.p9.c: Same.
-
-2021-01-30 Jakub Jelinek <jakub@redhat.com>
-
- * gcc.target/i386/20051216-1.c: New test.
-
-2021-01-30 Jakub Jelinek <jakub@redhat.com>
-
- PR testsuite/98243
- * gcc.dg/gomp/simd-2.c: Add -msse2 on x86. Restrict
- scan-tree-dump-times to x86 and aarch64 targets.
- * gcc.dg/gomp/simd-3.c: Likewise.
-
-2021-01-29 Michael Meissner <meissner@linux.ibm.com>
-
- PR testsuite/98870
- * gcc.target/powerpc/ppc-fortran/ieee128-math.f90: Fix the
- expected result.
-
-2021-01-29 Will Schmidt <will_schmidt@vnet.ibm.com>
-
- * gcc.target/powerpc/pr91903.c: Fix dg-require stanza.
-
-2021-01-29 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR target/97701
- * gcc.target/aarch64/pr97701.c: Modify.
-
-2021-01-29 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/combined-conditionals-1.c: New test.
-
-2021-01-29 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR target/97701
- * gcc.target/aarch64/pr97701.c: New.
-
-2021-01-29 Will Schmidt <will_schmidt@vnet.ibm.com>
-
- * gcc.target/powerpc/pr91903.c: New test.
- * gcc.target/powerpc/builtins-1.fold.h: Update.
- * gcc.target/powerpc/builtins-2.c: Update.
-
-2021-01-29 Nathan Sidwell <nathan@acm.org>
-
- PR c++/98843
- * g++.dg/modules/pr98843_a.C: New.
- * g++.dg/modules/pr98843_b.H: New.
- * g++.dg/modules/pr98843_c.C: New.
-
-2021-01-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/simd/vaddlv_1.c: New test.
-
-2021-01-29 Bin Cheng <bin.cheng@linux.alibaba.com>
- Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/97627
- * g++.dg/pr97627.C: New testcase.
-
-2021-01-29 Jakub Jelinek <jakub@redhat.com>
-
- PR target/98849
- * gcc.c-torture/compile/pr98849.c: New test.
-
-2021-01-29 Jakub Jelinek <jakub@redhat.com>
-
- PR debug/98331
- * gcc.dg/pr98331.c: New test.
-
-2021-01-29 Xionghu Luo <luoxhu@linux.ibm.com>
-
- * gcc.target/powerpc/pr79251.p8.c: Move TEST_VEC_INSERT_ALL
- to ...
- * gcc.target/powerpc/pr79251.h: ...this.
- * gcc.target/powerpc/pr79251.p9.c: Likewise.
- * gcc.target/powerpc/pr79251-run.c: Move run_test to pr79251.h.
- Rename to...
- * gcc.target/powerpc/pr79251-run.p8.c: ...this.
- * gcc.target/powerpc/pr79251-run.p9.c: New test.
-
-2021-01-29 Marek Polacek <polacek@redhat.com>
-
- PR c++/96137
- * g++.dg/parse/error63.C: New test.
-
-2021-01-28 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/98841
- * g++.dg/warn/effc5.C: New test.
-
-2021-01-28 Marek Polacek <polacek@redhat.com>
-
- PR c++/94775
- * g++.dg/cpp0x/alignas19.C: New test.
- * g++.dg/warn/Warray-bounds15.C: New test.
-
-2021-01-28 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/98730
- * gcc.target/arm/simd/vceqzq_p64.c: Update expected result.
-
-2021-01-28 David Edelsohn <dje.gcc@gmail.com>
-
- * gfortran.dg/ISO_Fortran_binding_18.c: Include
- ../../../libgfortran/ISO_Fortran_binding.h rather than
- ISO_Fortran_binding.h.
-
-2021-01-28 Michael Meissner <meissner@linux.ibm.com>
-
- * gcc.target/powerpc/float128-longdouble-math.c: New test.
- * gcc.target/powerpc/float128-longdouble-stdio.c: New test.
- * gcc.target/powerpc/float128-math.c: Adjust test for new name
- being generated. Add support for running test on power10. Add
- support for running if long double defaults to 64-bits.
-
-2021-01-28 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/33661
- PR c++/98847
- * g++.target/i386/pr98847.C: New test.
-
-2021-01-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/narrow_high-intrinsics.c: Fix shrn2 scan.
-
-2021-01-28 Nathan Sidwell <nathan@acm.org>
-
- PR c++/98770
- * g++.dg/modules/pr98770_a.C: New.
- * g++.dg/modules/pr98770_b.C: New.
-
-2021-01-28 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/86470
- * gfortran.dg/gomp/pr86470.f90: New test.
-
-2021-01-28 Xionghu Luo <luoxhu@linux.ibm.com>
-
- PR target/98827
- * gcc.target/powerpc/fold-vec-insert-char-p8.c: Adjust ilp32.
- * gcc.target/powerpc/fold-vec-insert-char-p9.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-double.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-float-p8.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-float-p9.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-int-p8.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-int-p9.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-longlong.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-short-p8.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-short-p9.c: Likewise.
- * gcc.target/powerpc/pr79251.p8.c: Likewise.
- * gcc.target/powerpc/pr79251.p9.c: Likewise.
- * gcc.target/powerpc/vsx-builtin-7.c: Likewise.
- * gcc.target/powerpc/pr79251-run.c: Build and run with vsx
- option.
-
-2021-01-28 Xing GUO <higuoxing@gmail.com>
-
- * gcc.target/riscv/attribute-18.c: New test.
-
-2021-01-27 Harris Snyder <hsnyder@structura.bio>
-
- * gfortran.dg/ISO_Fortran_binding_18.c: New test.
- * gfortran.dg/ISO_Fortran_binding_18.f90: New test.
-
-2021-01-27 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR rtl-optimization/97684
- * gcc.target/i386/pr97684.c: New.
-
-2021-01-27 Jason Merrill <jason@redhat.com>
-
- PR c++/97874
- * g++.dg/lookup/using4.C: No error in C++20.
- * g++.dg/cpp0x/decltype37.C: Adjust message.
- * g++.dg/template/crash75.C: Adjust message.
- * g++.dg/template/crash76.C: Adjust message.
- * g++.dg/cpp0x/inh-ctor36.C: New test.
- * g++.dg/cpp1z/inh-ctor39.C: New test.
- * g++.dg/cpp2a/using-enum-7.C: New test.
-
-2021-01-27 Jakub Jelinek <jakub@redhat.com>
-
- PR target/98853
- * gcc.c-torture/execute/pr98853-1.c: New test.
- * gcc.c-torture/execute/pr98853-2.c: New test.
-
-2021-01-27 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/98854
- * gcc.dg/vect/bb-slp-pr98854.c: New testcase.
-
-2021-01-27 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/93924
- PR fortran/93925
- * gfortran.dg/proc_ptr_52.f90 : New test.
-
-2021-01-27 liuhongt <hongtao.liu@intel.com>
-
- PR target/98833
- * gcc.target/i386/pr98833.c: New test.
-
-2021-01-27 Jakub Jelinek <jakub@redhat.com>
-
- * gcc.target/i386/m128-check.h (CHECK_EXP): Remove
- optimize ("no-strict-aliasing") attribute.
- * gcc.target/i386/sse-andnps-1.c (TEST): Copy e into float[4]
- array to avoid violating TBAA.
- * gcc.target/i386/sse2-andpd-1.c (TEST): Copy e.d into double[2]
- array to avoid violating TBAA.
- * gcc.target/i386/sse-andps-1.c (TEST): Copy e.f into float[4]
- array to avoid violating TBAA.
- * gcc.target/i386/sse2-andnpd-1.c (TEST): Copy e into double[2]
- array to avoid violating TBAA.
-
-2021-01-27 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/98472
- * gfortran.dg/elemental_function_5.f90 : New test.
-
-2021-01-27 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/97260
- * gcc.dg/tree-ssa/pr97260.c: New test.
-
-2021-01-26 Paul Fee <paul.f.fee@gmail.com>
-
- * lib/target-supports.exp (check_effective_target_c++2a):
- Check for C++2a or C++23.
- (check_effective_target_c++20_down): New.
- (check_effective_target_c++23_only): New.
- (check_effective_target_c++23): New.
- * g++.dg/cpp23/cplusplus.C: New.
-
-2021-01-26 Jason Merrill <jason@redhat.com>
-
- PR c++/97474
- * g++.dg/torture/pr97474.C: New test.
-
-2021-01-26 Jason Merrill <jason@redhat.com>
-
- PR c++/97566
- * g++.dg/cpp2a/no_unique_address10.C: New test.
- * g++.dg/cpp2a/no_unique_address9.C: New test.
-
-2021-01-26 Jakub Jelinek <jakub@redhat.com>
-
- * gcc.target/powerpc/m128-check.h (CHECK_EXP): Remove
- optimize ("no-strict-aliasing") attribute.
- * gcc.target/powerpc/sse-andnps-1.c (TEST): Copy e into float[4]
- array to avoid violating TBAA.
- * gcc.target/powerpc/sse2-andpd-1.c (TEST): Copy e.d into double[2]
- array to avoid violating TBAA.
- * gcc.target/powerpc/sse-andps-1.c (TEST): Copy e.f into float[4]
- array to avoid violating TBAA.
- * gcc.target/powerpc/sse2-andnpd-1.c (TEST): Copy e into double[2]
- array to avoid violating TBAA.
-
-2021-01-26 Jakub Jelinek <jakub@redhat.com>
-
- PR target/98681
- * gcc.c-torture/execute/pr98681.c: New test.
-
-2021-01-26 Thomas Koenig <tkoenig@gcc.gnu.org>
-
- PR fortran/67539
- * gfortran.dg/elemental_assignment_1.f90: New test.
-
-2021-01-26 Tobias Burnus <tobias@codesourcery.com>
-
- * g++.dg/modules/modules.exp: Remove unused CXX_MODULE_PATH;
- add previously missing space in '$ident link'.
-
-2021-01-26 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/98807
- * gcc.dg/pr98807.c: Add -Wno-psabi -w to dg-options.
-
-2021-01-26 Alexandre Oliva <oliva@adacore.com>
-
- * gnat.dg/asan1.adb: New test.
- * gnat.dg/asan1_pkg.ads: New additional source.
-
-2021-01-25 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/70070
- * gfortran.dg/pr70070.f90: New test.
-
-2021-01-25 Martin Sebor <msebor@redhat.com>
-
- PR c++/98646
- * g++.dg/warn/Wnonnull5.C: Adjust text of an expected warning.
- * g++.dg/warn/Wnonnull10.C: New test.
- * g++.dg/warn/Wnonnull9.C: New test.
-
-2021-01-25 Thomas Koenig <tkoenig@gcc.gnu.org>
-
- * gfortran.dg/associate_57.f90: New test.
-
-2021-01-25 Thomas Koenig <tkoenig@gcc.gnu.org>
-
- PR fortran/96843
- * gfortran.dg/interface_assignment_7.f90: New test.
-
-2021-01-25 Jason Merrill <jason@redhat.com>
-
- PR c++/98463
- * g++.dg/cpp2a/no_unique_address8.C: New test.
-
-2021-01-25 Richard Biener <rguenther@suse.de>
-
- PR middle-end/98807
- * gcc.dg/pr98807.c: New testcase.
-
-2021-01-25 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/thunk2.adb, gnat.dg/thunk2.ads: New test.
- * gnat.dg/thunk2_pkg.ads: New helper.
-
-2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
-
- PR fortran/98517
- * gfortran.dg/charlen_18.f90 : New test.
-
-2021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
-
- * g++.dg/lookup/scoped1.C: Modified testcase to run successfully
- with changes.
- * g++.dg/tc1/dr142.C: Same as above.
- * g++.dg/tc1/dr52.C: Same as above.
- * g++.old-deja/g++.brendan/visibility6.C: Same as above.
- * g++.old-deja/g++.brendan/visibility8.C: Same as above.
- * g++.old-deja/g++.jason/access8.C: Same as above.
- * g++.old-deja/g++.law/access4.C: Same as above.
- * g++.old-deja/g++.law/visibility12.C: Same as above.
- * g++.old-deja/g++.law/visibility4.C: Same as above.
- * g++.old-deja/g++.law/visibility8.C: Same as above.
- * g++.old-deja/g++.other/access4.C: Same as above.
-
-2021-01-23 Patrick Palka <ppalka@redhat.com>
-
- PR c++/88548
- PR c++/97399
- * g++.dg/cpp0x/this2.C: New test.
- * g++.dg/template/pr97399.C: New test.
-
-2021-01-23 David Edelsohn <dje.gcc@gmail.com>
-
- * gcc.target/powerpc/fold-vec-insert-char-p9.c: Adjust ilp32.
- * gcc.target/powerpc/fold-vec-insert-float-p9.c: Same.
- * gcc.target/powerpc/fold-vec-insert-int-p9.c: Same.
- * gcc.target/powerpc/fold-vec-insert-longlong.c: Same.
- * gcc.target/powerpc/fold-vec-insert-short-p9.c: Same.
- * gcc.target/powerpc/pr79251.p9.c: Same.
-
-2021-01-22 Marek Polacek <polacek@redhat.com>
-
- PR c++/96623
- * g++.dg/cpp0x/noexcept64.C: New test.
-
-2021-01-22 David Edelsohn <dje.gcc@gmail.com>
-
- * g++.dg/eh/spbp.C: Remove skip on AIX.
-
-2021-01-22 Jakub Jelinek <jakub@redhat.com>
-
- * gcc.target/powerpc/m128-check.h (CHECK_EXP, CHECK_FP_EXP): Fix a
- typo, UINON_TYPE to UNION_TYPE.
-
-2021-01-22 Jakub Jelinek <jakub@redhat.com>
-
- * gcc.target/i386/m128-check.h (CHECK_EXP, CHECK_FP_EXP): Fix a typo,
- UINON_TYPE to UNION_TYPE.
- * gcc.target/i386/m256-check.h (CHECK_FP_EXP): Likewise.
- * gcc.target/i386/m512-check.h (CHECK_ROUGH_EXP): Likewise.
-
-2021-01-22 Jakub Jelinek <jakub@redhat.com>
-
- * gcc.target/powerpc/m128-check.h (check_##UINON_TYPE): Add
- optimize ("no-strict-aliasing") attribute.
-
-2021-01-22 Jason Merrill <jason@redhat.com>
-
- PR c++/98744
- * g++.dg/init/elide7.C: New test.
-
-2021-01-22 Jakub Jelinek <jakub@redhat.com>
-
- PR sanitizer/95693
- * g++.dg/ubsan/pr95693.C: New test.
-
-2021-01-22 Marek Polacek <polacek@redhat.com>
-
- PR c++/98545
- * g++.dg/abi/mangle76.C: New test.
-
-2021-01-22 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/98565
- * gfortran.dg/associated_target_7.f90 : New test.
-
-2021-01-22 Martin Jambor <mjambor@suse.cz>
-
- PR tree-optimization/47059
- * gcc.dg/tree-ssa/pr47059.c: New test.
-
-2021-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- PR tree-optimization/98766
- * gcc.dg/pr98766.c: New test.
-
-2021-01-22 Nathan Sidwell <nathan@acm.org>
-
- PR testsuite/98795
- * g++.dg/modules/modules.exp (module_cmi_p): Avoid
- embedded absolute paths.
- (module_do_it): Append $std to test name.
-
-2021-01-22 Richard Biener <rguenther@suse.de>
-
- PR middle-end/98793
- * gcc.dg/pr98793.c: New testcase.
-
-2021-01-22 Xionghu Luo <luoxhu@linux.ibm.com>
-
- * gcc.target/powerpc/pr79251.p8.c: New test.
- * gcc.target/powerpc/fold-vec-insert-char-p8.c: Adjust
- instruction counts.
- * gcc.target/powerpc/fold-vec-insert-char-p9.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-double.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-float-p8.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-float-p9.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-int-p8.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-int-p9.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-longlong.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-short-p8.c: Likewise.
- * gcc.target/powerpc/fold-vec-insert-short-p9.c: Likewise.
- * gcc.target/powerpc/vsx-builtin-7.c: Likewise.
-
-2021-01-22 Xionghu Luo <luoxhu@linux.ibm.com>
-
- * gcc.target/powerpc/pr79251.p9.c: New test.
- * gcc.target/powerpc/pr79251-run.c: New test.
- * gcc.target/powerpc/pr79251.h: New header.
-
-2021-01-22 Richard Biener <rguenther@suse.de>
-
- PR middle-end/98773
- * gcc.dg/torture/pr98773.c: New testcase.
-
-2021-01-22 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/90248
- * gcc.dg/tree-ssa/copy-sign-1.c: Don't expect any copysign
- builtins.
- * gcc.dg/pr90248.c: New test.
-
-2021-01-22 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/98255
- * gcc.dg/pr98255.c: New test.
-
-2021-01-22 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/98786
- * gcc.dg/torture/pr98786.c: New testcase.
-
-2021-01-22 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
-
- PR target/98636
- * gcc.target/arm/pr98636.c: New test.
-
-2021-01-22 liuhongt <hongtao.liu@intel.com>
-
- PR target/96891
- PR target/98348
- * gcc.target/i386/avx512bw-pr96891-1.c: New test.
- * gcc.target/i386/avx512f-pr96891-1.c: New test.
- * gcc.target/i386/avx512f-pr96891-2.c: New test.
- * gcc.target/i386/avx512f-pr96891-3.c: New test.
- * g++.target/i386/avx512f-pr96891-1.C: New test.
- * gcc.target/i386/bitwise_mask_op-3.c: Adjust testcase.
-
-2021-01-22 Marek Polacek <polacek@redhat.com>
-
- PR c++/97966
- * g++.dg/cpp0x/noexcept63.C: New test.
-
-2021-01-21 David Edelsohn <dje.gcc@gmail.com>
-
- * g++.dg/cpp2a/lambda-uneval1.C: Ignore preceding "l" and
- intervening period.
- * g++.dg/cpp2a/lambda-uneval5.C: Ignore preceding "l" and
- explicitly check for intervening space, tab or period.
-
-2021-01-21 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR rtl-optimization/98777
- * gcc.target/riscv/pr98777.c: New.
-
-2021-01-21 Patrick Palka <ppalka@redhat.com>
-
- PR c++/71879
- * g++.dg/cpp0x/decltype-71879.C: New test.
-
-2021-01-21 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/98672
- * g++.dg/cpp1y/constexpr-98672.C: New test.
-
-2021-01-21 Andrea Corallo <andrea.corallo@arm.com>
-
- PR target/96372
- * lib/target-supports.exp
- (check_effective_target_arm_thumb2_no_arm_v8_1_lob): Define proc.
- * gcc.target/arm/ivopts.c: Use target
- 'arm_thumb2_no_arm_v8_1_lob'.
-
-2021-01-21 Nathan Sidwell <nathan@acm.org>
-
- PR c++/98530
- * g++.dg/modules/stat-mem-1.h: New.
- * g++.dg/modules/stat-mem-1_a.H: New.
- * g++.dg/modules/stat-mem-1_b.C: New.
-
-2021-01-21 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/96320
- * gfortran.dg/module_procedure_5.f90 : New test.
- * gfortran.dg/module_procedure_6.f90 : New test.
-
-2021-01-21 Richard Biener <rguenther@suse.de>
-
- PR testsuite/97299
- * gcc.dg/vect/slp-reduc-3.c: Amend target selectors.
-
-2021-01-21 Richard Biener <rguenther@suse.de>
-
- PR testsuite/98241
- * gcc.dg/pr78973.c: Remove ilp32 XFAIL.
-
-2021-01-21 Richard Biener <rguenther@suse.de>
-
- * gcc.dg/Walloca-2.c: Un-XFAIL.
-
-2021-01-21 liuhongt <hongtao.liu@intel.com>
-
- PR rtl-optimization/98694
- * gcc.target/i386/pr98694.c: New test.
-
-2021-01-20 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/torture/ftrapv-2.c: Make overflow instruction unremovable.
-
-2021-01-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/vdup_lane_2.c: Scan for fmov rather than
- dup.
-
-2021-01-20 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR rtl-optimization/98722
- * g++.target/s390/pr98722.C: New.
-
-2021-01-20 Eugene Rozenfeld <erozen@microsoft.com>
-
- PR tree-optimization/96674
- * gcc.dg/pr96674.c: New tests.
-
-2021-01-20 Patrick Palka <ppalka@redhat.com>
-
- PR c++/95434
- * g++.dg/cpp2a/lambda-generic9.C: New test.
-
-2021-01-20 Patrick Palka <ppalka@redhat.com>
-
- PR c++/82613
- * g++.dg/parse/access12.C: New test.
- * g++.dg/template/access35.C: New test.
-
-2021-01-20 Richard Sandiford <richard.sandiford@arm.com>
-
- PR tree-optimization/98535
- * gcc.target/aarch64/sve/pr98535.c: New file.
-
-2021-01-20 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/98763
- * gfortran.dg/gomp/task-detach-1.f90: Use integer(1) to avoid
- missing diagnostic issues with c_intptr_t == default integer kind.
-
-2021-01-20 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/98721
- * gcc.dg/pr98721-1.c: New test.
- * gcc.dg/pr98721-2.c: New test.
-
-2021-01-20 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/98758
- * gcc.dg/torture/pr98758.c: New testcase.
-
-2021-01-20 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/98742
- * c-c++-common/gomp/task-detach-2.c: New test.
-
-2021-01-20 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/98757
- PR fortran/98476
- * gfortran.dg/gomp/is_device_ptr-2.f90: Fix dg-error.
-
-2021-01-19 David Edelsohn <dje.gcc@gmail.com>
-
- * gcc.dg/cpp/ucs.c: Expect Invalid warning for 2byte wchar.
- * gcc.dg/debug/dwarf2/inline6.c: Remove skip AIX.
- * gcc.dg/debug/dwarf2/lang-c11.c: Remove skip AIX.
- * gcc.dg/debug/dwarf2/pr41445-7.c: Remove skip AIX.
- * gcc.dg/debug/dwarf2/pr41445-8.c: Remove skip AIX.
- * gcc.dg/tree-ssa/builtin-sprintf-warn-20.c: Require 4byte wchar.
-
-2021-01-19 Marek Polacek <polacek@redhat.com>
-
- PR c++/98659
- * g++.dg/template/deduce8.C: New test.
-
-2021-01-19 Marek Polacek <polacek@redhat.com>
-
- PR c++/98687
- * g++.dg/lookup/using64.C: New test.
- * g++.dg/lookup/using65.C: New test.
-
-2021-01-19 Martin Sebor <msebor@redhat.com>
-
- PR middle-end/98664
- * gcc.dg/Wvla-larger-than-4.c: Adjust expected output.
- * gcc.dg/plugin/diagnostic-test-inlining-3.c: Same.
- * g++.dg/warn/Wfree-nonheap-object-5.C: New test.
- * gcc.dg/Wfree-nonheap-object-4.c: New test.
-
-2021-01-19 Patrick Palka <ppalka@redhat.com>
-
- PR c++/41437
- PR c++/58993
- * g++.dg/opt/pr87974.C: Adjust.
- * g++.dg/template/access34.C: New test.
- * g++.dg/template/friend68.C: New test.
- * g++.dg/template/friend69.C: New test.
-
-2021-01-19 Marek Polacek <polacek@redhat.com>
-
- PR c++/98333
- * g++.dg/cpp0x/noexcept62.C: New test.
-
-2021-01-19 Will Schmidt <will_schmidt@vnet.ibm.com>
-
- * gcc.target/powerpc/pr88233.c: Update dg- stanzas.
-
-2021-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h
- (CHECK_CUMULATIVE_SAT): Delete.
- (CHECK_CUMULATIVE_SAT_NAMED): Likewise. Deleted related
- variables.
- * gcc.target/aarch64/advsimd-intrinsics/binary_sat_op.inc:
- Remove uses of the above.
- * gcc.target/aarch64/advsimd-intrinsics/unary_sat_op.inc:
- Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqabs.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqadd.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmlXl.inc: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmlXl_lane.inc:
- Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmlXl_n.inc: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmlal.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmlal_lane.c:
- Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmlal_n.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmlsl.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmlsl_lane.c:
- Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmlsl_n.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmulh.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmulh_lane.c:
- Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmulh_n.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmull.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmull_lane.c:
- Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqdmull_n.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqmovn.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqmovun.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqneg.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqrdmlXh.inc: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqrdmlXh_lane.inc:
- Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqrdmlah.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqrdmlah_lane.c:
+ * c-c++-common/auto-init-1.c: Adjust testcase to reflect the 3rd
+ argument change of function .DEFERRED_INIT.
+ * c-c++-common/auto-init-10.c: Likewise.
+ * c-c++-common/auto-init-11.c: Likewise.
+ * c-c++-common/auto-init-12.c: Likewise.
+ * c-c++-common/auto-init-13.c: Likewise.
+ * c-c++-common/auto-init-14.c: Likewise.
+ * c-c++-common/auto-init-15.c: Likewise.
+ * c-c++-common/auto-init-16.c: Likewise.
+ * c-c++-common/auto-init-2.c: Likewise.
+ * c-c++-common/auto-init-3.c: Likewise.
+ * c-c++-common/auto-init-4.c: Likewise.
+ * c-c++-common/auto-init-5.c: Likewise.
+ * c-c++-common/auto-init-6.c: Likewise.
+ * c-c++-common/auto-init-7.c: Likewise.
+ * c-c++-common/auto-init-8.c: Likewise.
+ * c-c++-common/auto-init-9.c: Likewise.
+ * c-c++-common/auto-init-esra.c: Likewise.
+ * c-c++-common/auto-init-padding-1.c: Likewise.
+ * gcc.target/aarch64/auto-init-2.c: Likewise.
+
+2022-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.dg/pr47614.f: Don't use -mcpu=power4 for
+ powerpc64le*-*-linux*.
+
+2022-01-11 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/103861
+ * g++.target/i386/pr100637-1b.C (dg-options):
+ Use -msse4 instead of -msse2.
+ * g++.target/i386/pr100637-1w.C (dg-options): Ditto.
+ * g++.target/i386/pr103861-1.C: New test.
+ * gcc.target/i386/pr100637-4b.c (dg-options):
+ Use -msse4 instead of -msse2.
+ * gcc.target/i386/pr103861-4.c: New test.
+
+2022-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/101597
+ * g++.dg/opt/pr101597.C: New test.
+
+2022-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/101537
+ PR c/103881
+ * c-c++-common/pr101537.c: New test.
+ * c-c++-common/pr103881.c: New test.
+
+2022-01-11 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/103831
+ * g++.dg/cpp2a/concepts-class3.C: New test.
+ * g++.dg/template/non-dependent18.C: New test.
+
+2022-01-11 Siddhesh Poyarekar <siddhesh@gotplt.org>
+
+ PR middle-end/70090
+ * gcc.dg/builtin-dynamic-object-size-0.c: Add new tests.
+ * gcc.dg/builtin-object-size-1.c (test1)
+ [__builtin_object_size]: Adjust expected output for dynamic
+ object sizes.
+ * gcc.dg/builtin-object-size-2.c (test1)
+ [__builtin_object_size]: Likewise.
+ * gcc.dg/builtin-object-size-3.c (test1)
+ [__builtin_object_size]: Likewise.
+ * gcc.dg/builtin-object-size-4.c (test1)
+ [__builtin_object_size]: Likewise.
+
+2022-01-11 Siddhesh Poyarekar <siddhesh@gotplt.org>
+
+ PR middle-end/70090
+ * gcc.dg/builtin-dynamic-object-size-0.c: Add new tests.
+ * gcc.dg/builtin-object-size-1.c (test1)
+ [__builtin_object_size]: Alter expected result for dynamic
+ object size.
+ * gcc.dg/builtin-object-size-2.c (test1)
+ [__builtin_object_size]: Likewise.
+ * gcc.dg/builtin-object-size-3.c (test1)
+ [__builtin_object_size]: Likewise.
+ * gcc.dg/builtin-object-size-4.c (test1)
+ [__builtin_object_size]: Likewise.
+
+2022-01-11 Siddhesh Poyarekar <siddhesh@gotplt.org>
+
+ PR middle-end/70090
+ * gcc.dg/builtin-dynamic-object-size-0.c (test_parmsz_simple,
+ test_parmsz_scaled, test_parmsz_unknown): New functions.
+ (main): Call them. Add new arguments argc and argv.
+
+2022-01-11 Siddhesh Poyarekar <siddhesh@gotplt.org>
+
+ PR middle-end/70090
+ * gcc.dg/builtin-dynamic-object-size-0.c: New tests.
+ * gcc.dg/builtin-dynamic-object-size-10.c: Add comment.
+ * gcc.dg/builtin-dynamic-object-size-5-main.c: New file.
+ * gcc.dg/builtin-dynamic-object-size-5.c: Use it and change test
+ to dg-do run.
+ * gcc.dg/builtin-object-size-5.c [!N]: Define N.
+ (test1, test2, test3, test4) [__builtin_object_size]: Expect
+ exact result for __builtin_dynamic_object_size.
+ * gcc.dg/builtin-object-size-1.c [__builtin_object_size]: Expect
+ exact size expressions for __builtin_dynamic_object_size.
+ * gcc.dg/builtin-object-size-2.c [__builtin_object_size]:
Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqrdmlsh.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqrdmlsh_lane.c:
+ * gcc.dg/builtin-object-size-3.c [__builtin_object_size]:
Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqrdmulh.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqrdmulh_lane.c:
+ * gcc.dg/builtin-object-size-4.c [__builtin_object_size]:
Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqrdmulh_n.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqrshl.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqrshrn_n.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqrshrun_n.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqshl.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqshl_n.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqshlu_n.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqshrn_n.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqshrun_n.c: Likewise.
- * gcc.target/aarch64/advsimd-intrinsics/vqsub.c: Likewise.
-
-2021-01-19 Jeff Law <law@redhat.com>
-
- * gcc.dg/debug/dwarf2/dwarf-float.c: Force dwarf-4 generation
- and update expected output.
-
-2021-01-19 Richard Biener <rguenther@suse.de>
-
- PR ipa/98330
- * g++.dg/pr98330.C: New testcase.
- * gcc.dg/pr98330.c: Likewise.
-
-2021-01-19 Richard Biener <rguenther@suse.de>
-
- PR ipa/97673
- * gfortran.dg/pr97673.f90: New testcase.
-
-2021-01-19 Tobias Burnus <tobias@codesourcery.com>
-
- PR fortran/98476
- * gfortran.dg/gomp/map-3.f90: Update expected scan-dump-tree.
- * gfortran.dg/gomp/is_device_ptr-2.f90: New test.
- * gfortran.dg/gomp/use_device_ptr-1.f90: New test.
-
-2021-01-19 Martin Jambor <mjambor@suse.cz>
-
- PR ipa/98690
- * g++.dg/ipa/pr98690.C: New test.
-
-2021-01-18 Jeff Law <law@redhat.com>
-
- * gcc.dg/debug/dwarf2/pr41445-7.c: Fix expected output.
-
-2021-01-18 Patrick Palka <ppalka@redhat.com>
-
- * g++.dg/cpp1z/class-deduction77.C: New test.
-
-2021-01-18 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/98727
- * gcc.c-torture/execute/pr98727.c: New test.
-
-2021-01-18 John David Anglin <danglin@gcc.gnu.org>
-
- PR testsuite/97987
- * gcc.c-torture/compile/asmgoto-2.c: Skip on hppa.
- * gcc.c-torture/compile/asmgoto-5.c: Likewise.
-
-2021-01-18 John David Anglin <danglin@gcc.gnu.org>
-
- * g++.dg/no-stack-protector-attr-3.C: Don't compile on hppa*-*-*.
- * g++.dg/no-stack-protector-attr.C: Likewise.
-
-2021-01-18 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/analyzer/attr-malloc-1.c: New test.
- * gcc.dg/analyzer/attr-malloc-2.c: New test.
- * gcc.dg/analyzer/attr-malloc-4.c: New test.
- * gcc.dg/analyzer/attr-malloc-5.c: New test.
- * gcc.dg/analyzer/attr-malloc-6.c: New test.
- * gcc.dg/analyzer/attr-malloc-CVE-2019-19078-usb-leak.c: New test.
- * gcc.dg/analyzer/attr-malloc-misuses.c: New test.
-
-2021-01-18 Richard Biener <rguenther@suse.de>
-
- PR testsuite/97494
- * gcc.dg/vect/slp-11b.c: Adjust.
-
-2021-01-18 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/71233
- * gcc.target/arm/simd/vceqz_p64.c: Use arm_crypto options.
- * gcc.target/arm/simd/vceqzq_p64.c: Likewise.
-
-2021-01-18 Richard Biener <rguenther@suse.de>
-
- PR testsuite/97299
- * gcc.dg/vect/slp-reduc-3.c: Guard VEC_PERM_EXPR scan.
-
-2021-01-18 David Edelsohn <dje.gcc@gmail.com>
-
- * gcc.target/powerpc/fold-vec-extract-char.p7.c: Adjust addi count.
- * gcc.target/powerpc/fold-vec-extract-double.p7.c: Same.
- * gcc.target/powerpc/fold-vec-extract-float.p7.c: Same.
- * gcc.target/powerpc/fold-vec-extract-float.p8.c: Same.
- * gcc.target/powerpc/fold-vec-extract-int.p7.c: Same.
- * gcc.target/powerpc/fold-vec-extract-int.p8.c: Same.
- * gcc.target/powerpc/fold-vec-extract-short.p7.c: Same.
- * gcc.target/powerpc/fold-vec-extract-short.p8.c: Same.
- * gcc.target/powerpc/sse-andnps-1.c: Restrict to LE.
- * gcc.target/powerpc/sse-movhps-1.c: Restrict to LE.
- * gcc.target/powerpc/sse-movlps-1.c: Restrict to LE.
- * gcc.target/powerpc/sse2-andnpd-1.c: Restrict to LE.
-
-2021-01-17 David Edelsohn <dje.gcc@gmail.com>
-
- * g++.dg/debug/dwarf2/inline-ns-2.C: Skip on AIX.
- * g++.dg/debug/dwarf2/inline-var-2.C: Skip on AIX.
- * g++.dg/debug/dwarf2/inline-var-3.C: Skip on AIX.
- * g++.dg/debug/dwarf2/lang-cpp11.C: Skip on AIX.
- * g++.dg/debug/dwarf2/lang-cpp14.C: Skip on AIX.
- * g++.dg/debug/dwarf2/lang-cpp17.C: Skip on AIX.
- * g++.dg/debug/dwarf2/lang-cpp20.C: Skip on AIX.
- * gcc.dg/debug/dwarf2/inline6.c: Skip on AIX.
- * gcc.dg/debug/dwarf2/lang-c11.c: Skip on AIX.
- * gcc.dg/debug/dwarf2/pr41445-7.c: Skip on AIX.
- * gcc.dg/debug/dwarf2/pr41445-8.c: Skip on AIX.
-
-2021-01-17 Martin Jambor <mjambor@suse.cz>
-
- PR ipa/98222
- * gcc.dg/ipa/pr98222.c: New test.
-
-2021-01-16 Jakub Jelinek <jakub@redhat.com>
-
- * gfortran.dg/iso_fortran_binding_uint8_array_driver.c: Include
- ../../../libgfortran/ISO_Fortran_binding.h rather than
- ISO_Fortran_binding.h.
-
-2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
-
- * c-c++-common/gomp/task-detach-1.c: New.
- * g++.dg/gomp/task-detach-1.C: New.
- * gcc.dg/gomp/task-detach-1.c: New.
- * gfortran.dg/gomp/task-detach-1.f90: New.
-
-2021-01-16 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/96669
- * gcc.dg/tree-ssa/pr96669-1.c: Adjust regexp.
- * gcc.dg/tree-ssa/pr96669-2.c: New test.
-
-2021-01-16 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/96271
- * gcc.target/i386/pr96271.c: New test.
-
-2021-01-15 Carl Love <cel@us.ibm.com>
-
- * gcc.target/powerpc/builtins-1-p10-runnable.c: New test file.
-
-2021-01-15 Harris Snyder <hsnyder@structura.bio>
-
- * gfortran.dg/iso_fortran_binding_uint8_array.f90: New test.
- * gfortran.dg/iso_fortran_binding_uint8_array_driver.c: New test.
-
-2021-01-15 Nathan Sidwell <nathan@acm.org>
-
- PR c++/98538
- * g++.dg/template/pr98538.C: New.
-
-2021-01-15 Nathan Sidwell <nathan@acm.org>
-
- PR preprocessor/95253
- * g++.dg/modules/dep-1_a.C: Adjust expected output.
- * g++.dg/modules/dep-1_b.C: Likewise.
- * g++.dg/modules/dep-2.C: Likewise.
-
-2021-01-15 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/96669
- * gcc.dg/tree-ssa/pr96669-1.c: New test.
-
-2021-01-15 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/96681
- * gcc.dg/tree-ssa/pr96681.c: New test.
-
-2021-01-15 Jason Merrill <jason@redhat.com>
-
- PR c++/98642
- * g++.dg/cpp1z/elide5.C: New test.
-
-2021-01-15 Jason Merrill <jason@redhat.com>
-
- * g++.dg/cpp1z/elide4.C: New test.
-
-2021-01-15 Jason Merrill <jason@redhat.com>
-
- PR c++/63707
- * g++.dg/cpp0x/initlist-array13.C: New test.
-
-2021-01-15 Alexandre Oliva <oliva@adacore.com>
-
- * gcc.dg/analyzer/alloca-leak.c: Drop alloca.h, use builtin.
- * gcc.dg/analyzer/data-model-1.c: Likewise.
- * gcc.dg/analyzer/malloc-1.c: Likewise.
- * gcc.dg/analyzer/malloc-paths-8.c: Likewise.
-
-2021-01-15 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/96671
- * gcc.dg/tree-ssa/pr96671-1.c: New test.
- * gcc.dg/tree-ssa/pr96671-2.c: New test.
-
-2021-01-15 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/98597
- * gcc.dg/uninit-38.c: Expect a space in between type name and asterisk.
- Expect for now a (char *) cast for VLAs.
- * gcc.dg/uninit-40.c: New test.
-
-2021-01-15 Nathan Sidwell <nathan@acm.org>
-
- PR c++/98591
- * g++.dg/modules/pr98591.H: New file.
-
-2021-01-15 Richard Sandiford <richard.sandiford@arm.com>
-
- PR target/88836
- * gcc.target/aarch64/sve/acle/general/ldff1_8.c: New test.
- * gcc.target/aarch64/sve/ptest_1.c: Likewise.
-
-2021-01-15 Marius Hillenbrand <mhillen@linux.ibm.com>
-
- * gcc.target/s390/s390.exp: Call lib atomic-dg.exp to link
- libatomic into testcases in gcc.target/s390/md.
- * gcc.target/s390/md/atomic_exchange-1.c: Remove no unnecessary
- -latomic.
-
-2021-01-15 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/71233
- * gcc.target/aarch64/advsimd-intrinsics/p64_p128.c: Add tests for
- vceqz_p64, vceqq_p64 and vceqzq_p64.
- * gcc.target/arm/simd/vceqz_p64.c: New test.
- * gcc.target/arm/simd/vceqzq_p64.c: New test.
-
-2021-01-15 Christophe Lyon <christophe.lyon@linaro.org>
-
- Revert:
- 2021-01-15 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/71233
- * gcc.target/aarch64/advsimd-intrinsics/p64_p128.c: Add tests for
- vceqz_p64, vceqq_p64 and vceqzq_p64.
-
-2021-01-15 Martin Liska <mliska@suse.cz>
-
- * lib/gcov.exp: Use 'env python3' for execution of pytests.
- Check that pytest accepts all needed options first.
- Improve formatting of PASS/FAIL lines.
-
-2021-01-15 Richard Biener <rguenther@suse.de>
-
- PR testsuite/96147
- * gcc.dg/vect/bb-slp-32.c: Align p.
-
-2021-01-15 Richard Biener <rguenther@suse.de>
-
- PR testsuite/96147
- * gcc.dg/vect/bb-slp-9.c: Scan for a vector load transform.
-
-2021-01-15 Richard Biener <rguenther@suse.de>
-
- PR testsuite/96147
- * gcc.dg/vect/slp-45.c: Key scanning on
- vect_hw_misalign.
-
-2021-01-15 Richard Biener <rguenther@suse.de>
-
- PR testsuite/96147
- * gcc.dg/vect/slp-43.c: Remove ! vect_hw_misalign scan.
-
-2021-01-15 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/71233
- * gcc.target/aarch64/advsimd-intrinsics/p64_p128.c: Add tests for
- vceqz_p64, vceqq_p64 and vceqzq_p64.
-
-2021-01-15 Richard Biener <rguenther@suse.de>
-
- PR testsuite/96098
- * gcc.dg/vect/bb-slp-pr68892.c: Remove.
-
-2021-01-15 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/mve-vshr.c: Add tests for vshr.
-
-2021-01-15 Christophe Lyon <christophe.lyon@linaro.org>
-
- * gcc.target/arm/simd/mve-vshl.c: Add tests for vshl.
-
-2021-01-15 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/98685
- * gcc.dg/vect/bb-slp-pr98685.c: New testcase.
-
-2021-01-15 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.dg/vect/complex/complex-mla-template.c: Fix sed.
- * gcc.dg/vect/complex/complex-mls-template.c: Likewise.
-
-2021-01-14 David Malcolm <dmalcolm@redhat.com>
-
- * gcc.dg/plugin/diagnostic-test-show-locus-GCC_EXTRA_DIAGNOSTIC_OUTPUT-fixits-v1.c:
- New file.
- * gcc.dg/plugin/diagnostic-test-show-locus-GCC_EXTRA_DIAGNOSTIC_OUTPUT-fixits-v2.c:
- New file.
- * gcc.dg/plugin/plugin.exp (plugin_test_list): Add them.
-
-2021-01-14 Tamar Christina <tamar.christina@arm.com>
-
- * gcc.dg/vect/complex/complex-mla-template.c: New test.
- * gcc.dg/vect/complex/complex-mls-template.c: New test.
- * gcc.dg/vect/complex/complex-mul-template.c: New test.
- * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c: New test.
- * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c: New test.
- * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c: New test.
- * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c: New test.
- * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c: New test.
- * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c: New test.
- * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c: New test.
- * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c: New test.
- * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c: New test.
- * gcc.dg/vect/complex/fast-math-complex-mla-double.c: New test.
- * gcc.dg/vect/complex/fast-math-complex-mla-float.c: New test.
- * gcc.dg/vect/complex/fast-math-complex-mla-half-float.c: New test.
- * gcc.dg/vect/complex/fast-math-complex-mls-double.c: New test.
- * gcc.dg/vect/complex/fast-math-complex-mls-float.c: New test.
- * gcc.dg/vect/complex/fast-math-complex-mls-half-float.c: New test.
- * gcc.dg/vect/complex/fast-math-complex-mul-double.c: New test.
- * gcc.dg/vect/complex/fast-math-complex-mul-float.c: New test.
- * gcc.dg/vect/complex/fast-math-complex-mul-half-float.c: New test.
-
-2021-01-14 Marek Polacek <polacek@redhat.com>
-
- * g++.dg/template/pr98372.C: Only run in C++14 and up.
-
-2021-01-14 Harald Anlauf <anlauf@gmx.de>
-
- * substr_10.f90: New test.
- * substr_9.f90: New test.
-2021-01-14 Alexandre Oliva <oliva@adacore.com>
-
- * gcc.dg/analyzer/sigsetjmp-5.c: Use sigjmp_buf.
- * gcc.dg/analyzer/sigsetjmp-6.c: Likewise.
-
-2021-01-14 Alexandre Oliva <oliva@adacore.com>
-
- * gcc.dg/analyzer/sensitive-1.c: Declare getpass.
-
-2021-01-14 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/98661
- * gfortran.dg/pr98661.f90: New test.
-
-2021-01-14 Harald Anlauf <anlauf@gmx.de>
-
- Revert:
- 2021-01-14 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/98661
- * gfortran.dg/pr98661.f90: New test.
-
-2021-01-14 Harald Anlauf <anlauf@gmx.de>
-
- PR fortran/98661
- * gfortran.dg/pr98661.f90: New test.
-
-2021-01-14 Martin Liska <mliska@suse.cz>
-
- * g++.dg/gcov/gcov-17.C: New test.
- * g++.dg/gcov/test-gcov-17.py: New test.
-
-2021-01-14 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/98667
- * gcc.target/i386/pr98667-1.c: New file.
- * gcc.target/i386/pr98667-2.c: Likewise.
- * gcc.target/i386/pr98667-3.c: Likewise.
-
-2021-01-14 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/98674
- * gcc.dg/vect/pr98674.c: New testcase.
-
-2021-01-14 H.J. Lu <hjl.tools@gmail.com>
-
- PR target/98676
- * gcc.target/i386/pr95021-1.c: Add -mpreferred-stack-boundary=4
- -mno-stackrealign.
- * gcc.target/i386/pr95021-3.c: Likewise.
-
-2021-01-14 Nathan Sidwell <nathan@acm.org>
-
- PR c++/98372
- * g++.dg/cpp0x/constexpr-52830.C: Restore dg-ice
- * g++.dg/template/pr98372.C: New.
-
-2021-01-14 Jakub Jelinek <jakub@redhat.com>
-
- PR target/98670
- * gcc.target/i386/pr98670.c: New test.
-
-2021-01-14 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/96688
- * gcc.dg/tree-ssa/pr96688.c: New test.
- * gcc.dg/tree-ssa/reassoc-37.c: Adjust scan-tree-dump regex.
- * gcc.target/i386/pr66821.c: Likewise.
-
-2021-01-14 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/cost_model_11.c: New test.
- * gcc.target/aarch64/sve/mask_struct_load_5.c: Use
- -fno-vect-cost-model.
-
-2021-01-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/narrow_high-intrinsics.c: Update uqxtn2 and
- sqxtn2 scan-assembler-times.
-
-2021-01-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * gcc.target/aarch64/narrow_high-intrinsics.c: Adjust
- scan-assembler-times for xtn2.
-
-2021-01-13 Marek Polacek <polacek@redhat.com>
-
- PR c++/98231
- * g++.dg/lookup/using63.C: New test.
-
-2021-01-13 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/96691
- * gcc.dg/tree-ssa/pr96691.c: New test.
-
-2021-01-13 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/92645
- * gcc.target/i386/pr92645-7.c: New testcase.
- * gcc.dg/tree-ssa/ssa-fre-54.c: Adjust.
- * gcc.dg/pr69047.c: Likewise.
-
-2021-01-13 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/mls_2.c: New test.
- * g++.target/aarch64/sve/cond_mls_1.C: Likewise.
- * g++.target/aarch64/sve/cond_mls_2.C: Likewise.
- * g++.target/aarch64/sve/cond_mls_3.C: Likewise.
- * g++.target/aarch64/sve/cond_mls_4.C: Likewise.
- * g++.target/aarch64/sve/cond_mls_5.C: Likewise.
-
-2021-01-13 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/mla_2.c: New test.
- * g++.target/aarch64/sve/cond_mla_1.C: Likewise.
- * g++.target/aarch64/sve/cond_mla_2.C: Likewise.
- * g++.target/aarch64/sve/cond_mla_3.C: Likewise.
- * g++.target/aarch64/sve/cond_mla_4.C: Likewise.
- * g++.target/aarch64/sve/cond_mla_5.C: Likewise.
-
-2021-01-13 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/92645
- * gcc.target/i386/pr92645-6.c: New testcase.
-
-2021-01-13 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/sel_1.c: Require aarch64_variant_pcs.
- * gcc.target/aarch64/sve/sel_2.c: Likewise.
- * gcc.target/aarch64/sve/sel_3.c: Likewise.
-
-2021-01-13 Jakub Jelinek <jakub@redhat.com>
-
- PR target/95905
- * gcc.target/i386/pr95905-2.c: Use scan-assembler-times instead of
- scan-assembler. Add tests with zero vector as first __builtin_shuffle
- operand.
- * gcc.target/i386/pr95905-3.c: New test.
- * gcc.target/i386/pr95905-4.c: New test.
-
-2021-01-13 Martin Liska <mliska@suse.cz>
-
- PR tree-optimization/98455
- * gcc.dg/tree-ssa/pr98455.c: New test.
-
-2021-01-13 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/98640
- * gcc.dg/torture/pr98640.c: New testcase.
-
-2021-01-13 Jakub Jelinek <jakub@redhat.com>
-
- PR target/96938
- * gcc.target/i386/pr96938.c: New test.
-
-2021-01-13 Jakub Jelinek <jakub@redhat.com>
-
- PR target/95905
- * gcc.target/i386/pr95905-1.c: New test.
- * gcc.target/i386/pr95905-2.c: New test.
-
-2021-01-13 Julian Brown <julian@codesourcery.com>
-
- * gcc.target/gcn/fpdiv.c: New test.
-
-2021-01-12 Martin Sebor <msebor@redhat.com>
-
- PR c/98597
- PR c/98592
- * g++.dg/warn/Wuninitialized-13.C: New test.
- gcc.dg/uninit-39.c: New test.
- #
- * gcc.dg/uninit-39.c: New file.
-
-2021-01-12 Christophe Lyon <christophe.lyon@linaro.org>
-
- PR target/97875
- * gcc.target/arm/simd/mve-vneg.c: Update test.
-
-2021-01-12 Vladimir N. Makarov <vmakarov@redhat.com>
-
- PR target/97969
- * gcc.target/arm/pr97969.c: New.
-
-2021-01-12 Patrick Palka <ppalka@redhat.com>
-
- PR c++/98611
- * g++.dg/cpp2a/concepts-ctad1.C: New test.
- * g++.dg/cpp2a/concepts-ctad2.C: New test.
-
-2021-01-12 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/98550
- * g++.dg/opt/pr98550.C: New testcase.
-
-2021-01-12 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/98629
- * gcc.c-torture/compile/pr98629.c: New test.
-
-2021-01-12 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/95731
- * gcc.dg/tree-ssa/pr95731.c: New test.
- * gcc.c-torture/execute/pr95731.c: New test.
-
-2021-01-12 Marek Polacek <polacek@redhat.com>
-
- PR c++/98620
- * g++.dg/warn/Wmissing-field-initializers-2.C: New test.
-
-2021-01-12 David Malcolm <dmalcolm@redhat.com>
-
- PR analyzer/98628
- * gcc.dg/analyzer/pr98628.c: New test.
-
-2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/asrdiv_4.c: New test.
- * gcc.target/aarch64/sve/cond_asrd_1.c: Likewise.
- * gcc.target/aarch64/sve/cond_asrd_1_run.c: Likewise.
- * gcc.target/aarch64/sve/cond_asrd_2.c: Likewise.
- * gcc.target/aarch64/sve/cond_asrd_2_run.c: Likewise.
- * gcc.target/aarch64/sve/cond_asrd_3.c: Likewise.
- * gcc.target/aarch64/sve/cond_asrd_3_run.c: Likewise.
-
-2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
-
- * g++.target/aarch64/sve/cond_bic_1.C: New test.
- * g++.target/aarch64/sve/cond_bic_2.C: Likewise.
- * g++.target/aarch64/sve/cond_bic_3.C: Likewise.
- * g++.target/aarch64/sve/cond_bic_4.C: Likewise.
-
-2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/mul_highpart_3.c: New test.
-
-2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
-
- * g++.target/aarch64/sve/abd_1.C: New test.
- * g++.target/aarch64/sve/cond_abd_1.C: Likewise.
- * g++.target/aarch64/sve/cond_abd_2.C: Likewise.
- * g++.target/aarch64/sve/cond_abd_3.C: Likewise.
- * g++.target/aarch64/sve/cond_abd_4.C: Likewise.
-
-2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/adr_6.c: New test.
-
-2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
-
- * g++.target/aarch64/sve/cond_arith_1.C: New test.
- * g++.target/aarch64/sve/cond_arith_2.C: Likewise.
- * g++.target/aarch64/sve/cond_arith_3.C: Likewise.
- * g++.target/aarch64/sve/cond_arith_4.C: Likewise.
- * g++.target/aarch64/sve/cond_shift_1.C: New test.
- * g++.target/aarch64/sve/cond_shift_2.C: Likewise.
- * g++.target/aarch64/sve/cond_shift_3.C: Likewise.
- * g++.target/aarch64/sve/cond_shift_4.C: Likewise.
-
-2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
-
- PR testsuite/98602
- * g++.target/aarch64/sve/max_1.C: New test.
- * g++.target/aarch64/sve/min_1.C: Likewise.
- * gcc.target/aarch64/sve/mul_2.c: Likewise.
-
-2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
-
- * gcc.target/aarch64/sve/shift_2.c: New test.
-
-2021-01-11 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/98481
- * g++.dg/abi/abi-tag24.C: New test.
-
-2021-01-11 Richard Biener <rguenther@suse.de>
-
- PR tree-optimization/91403
- * gcc.dg/vect/pr91403.c: New testcase.
-
-2021-01-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
-
- PR testsuite/98225
- * gcc.misc-tests/outputs.exp: Unset MAKEFLAGS.
- Expect .ld1_args only when GNU LD is used.
- Add an exception for *.gcc_args files.
-
-2021-01-11 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/95867
- * gcc.dg/tree-ssa/pr95867.c: New test.
-
-2021-01-11 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/95852
- * gcc.target/i386/pr95852-3.c: New test.
- * gcc.target/i386/pr95852-4.c: New test.
-
-2021-01-11 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/95852
- * gcc.target/i386/pr95852-1.c: New test.
- * gcc.target/i386/pr95852-2.c: New test.
-
-2021-01-11 Martin Liska <mliska@suse.cz>
-
- PR gcov-profile/98273
- * lib/gcov.exp: Add run-gcov-pytest function which runs pytest.
- * g++.dg/gcov/pr98273.C: New test.
- * g++.dg/gcov/gcov.py: New test.
- * g++.dg/gcov/test-pr98273.py: New test.
-
-2021-01-09 Maciej W. Rozycki <macro@linux-mips.org>
-
- * gcc.target/vax/cmpelim-eq-notsi.c: Use subtraction from a
- constant then rather than addition.
- * gcc.target/vax/cmpelim-le-notsi.c: Likewise.
- * gcc.target/vax/cmpelim-lt-notsi.c: Likewise.
-
-2021-01-09 Jakub Jelinek <jakub@redhat.com>
-
- PR c++/98556
- * c-c++-common/pr98556.c: New test.
-
-2021-01-09 Jakub Jelinek <jakub@redhat.com>
-
- PR rtl-optimization/98603
- * gcc.target/i386/pr98603.c: New test.
- * gcc.target/aarch64/pr98603.c: New test.
-
-2021-01-09 Alexandre Oliva <oliva@gnu.org>
+2022-01-11 Siddhesh Poyarekar <siddhesh@gotplt.org>
+ Jakub Jelinek <jakub@redhat.com>
- PR debug/97714
- * gcc.dg/debug/pr97714.c: New.
+ PR tree-optimization/103961
+ * gcc.dg/pr103961.c: New test case.
-2021-01-08 H.J. Lu <hjl.tools@gmail.com>
+2022-01-11 David Malcolm <dmalcolm@redhat.com>
- PR target/98482
- * gcc.target/i386/pr98482-1.c: Require lp64.
- * gcc.target/i386/pr98482-2.c: Likewise.
+ PR analyzer/102692
+ * gcc.dg/analyzer/pr102692.c: New test.
-2021-01-08 Ilya Leoshkevich <iii@linux.ibm.com>
+2022-01-11 Roger Sayle <roger@nextmovesoftware.com>
+ Richard Biener <rguenther@suse.de>
- * gcc.target/s390/vector/long-double-vx-macro-off-on.c: New test.
- * gcc.target/s390/vector/long-double-vx-macro-on-off.c: New test.
+ * gcc.target/i386/mult-highpart.c: New test case.
-2021-01-08 Patrick Palka <ppalka@redhat.com>
+2022-01-11 Xionghu Luo <luoxhu@linux.ibm.com>
- PR c++/98551
- * g++.dg/cpp0x/constexpr-pmf2.C: New test.
+ PR target/102239
+ * gcc.target/powerpc/pr102239.c: New test.
-2021-01-08 Patrick Palka <ppalka@redhat.com>
+2022-01-11 Xionghu Luo <luoxhu@linux.ibm.com>
- PR c++/98515
- * g++.dg/template/access32.C: New test.
- * g++.dg/template/access33.C: New test.
+ PR testsuite/103820
+ * gcc.dg/tree-ssa/recip-3.c: Adjust.
-2021-01-08 H.J. Lu <hjl.tools@gmail.com>
+2022-01-11 Haochen Jiang <haochen.jiang@intel.com>
- PR target/98482
- * gcc.target/i386/pr98482-2.c: Updated.
+ PR target/53652
+ * gcc.target/i386/pr53652-1.c: New test.
-2021-01-08 Richard Biener <rguenther@suse.de>
+2022-01-10 Uroš Bizjak <ubizjak@gmail.com>
- PR tree-optimization/98544
- * gcc.dg/vect/bb-slp-pr98544.c: New testcase.
+ PR target/103861
+ * gcc.target/i386/pr103861-2.c: New test.
-2021-01-08 H.J. Lu <hjl.tools@gmail.com>
+2022-01-10 Patrick Palka <ppalka@redhat.com>
- PR target/98482
- * gcc.target/i386/pr98482-1.c: New test.
- * gcc.target/i386/pr98482-1.c: Likewise.
- * gcc.target/i386/pr98482-2.c: New file.
+ PR c++/103879
+ * g++.dg/cpp1y/constexpr-base2.C: New test.
+ * g++.dg/cpp1y/constexpr-base2a.C: New test.
-2021-01-08 Jakub Jelinek <jakub@redhat.com>
+2022-01-10 Patrick Palka <ppalka@redhat.com>
- PR target/98585
- * gcc.target/i386/pr98585.c: New test.
+ PR c++/103783
+ * g++.dg/cpp2a/concepts-memfun2.C: New test.
-2021-01-08 Richard Sandiford <richard.sandiford@arm.com>
+2022-01-10 Jakub Jelinek <jakub@redhat.com>
- * gcc.target/aarch64/sve/cnot_2.c: New test.
- * gcc.target/aarch64/sve/cond_cnot_4.c: Likewise.
- * gcc.target/aarch64/sve/cond_cnot_4_run.c: Likewise.
- * gcc.target/aarch64/sve/cond_cnot_5.c: Likewise.
- * gcc.target/aarch64/sve/cond_cnot_5_run.c: Likewise.
- * gcc.target/aarch64/sve/cond_cnot_6.c: Likewise.
- * gcc.target/aarch64/sve/cond_cnot_6_run.c: Likewise.
+ PR c++/103912
+ * g++.dg/cpp2a/consteval26.C: New test.
-2021-01-08 Richard Sandiford <richard.sandiford@arm.com>
+2022-01-10 Paul A. Clarke <pc@us.ibm.com>
- * gcc.target/aarch64/sve/cond_uxt_5.c: New test.
- * gcc.target/aarch64/sve/cond_uxt_5_run.c: Likewise.
- * gcc.target/aarch64/sve/cond_uxt_6.c: Likewise.
- * gcc.target/aarch64/sve/cond_uxt_6_run.c: Likewise.
- * gcc.target/aarch64/sve/cond_uxt_7.c: Likewise.
- * gcc.target/aarch64/sve/cond_uxt_7_run.c: Likewise.
- * gcc.target/aarch64/sve/cond_uxt_8.c: Likewise.
- * gcc.target/aarch64/sve/cond_uxt_8_run.c: Likewise.
+ * gcc.target/powerpc/sse4_1-blendvps.c: Copy from gcc.target/i386,
+ adjust dg directives to suit.
-2021-01-08 Tamar Christina <tamar.christina@arm.com>
+2022-01-10 Andre Vieira <andre.simoesdiasvieira@arm.com>
- * lib/target-supports.exp
- (check_effective_target_aarch64_asm_sve2_ok): New.
- * g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp: Use it.
- * gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp: Likewise.
+ * gcc.target/aarch64/masked_epilogue.c: New test.
-2021-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+2022-01-10 Paul Thomas <pault@gcc.gnu.org>
- * gcc.target/aarch64/usaba_1.c: New test.
+ PR fortran/103366
+ * gfortran.dg/pr103366.f90: New test.
-2021-01-08 Paul Thomas <pault@gcc.gnu.org>
+2022-01-10 Jakub Jelinek <jakub@redhat.com>
- PR fortran/93794
- * gfortran.dg/deferred_character_35.f90 : New test.
+ PR target/102024
+ * gcc.target/i386/pr102024.c: New test.
+ * g++.target/i386/pr102024.C: New test.
-2021-01-08 Paul Thomas <pault@gcc.gnu.org>
+2022-01-10 Richard Sandiford <richard.sandiford@arm.com>
- PR fortran/98458
- * gfortran.dg/implied_do_3.f90 : New test.
+ * gcc.target/aarch64/reg-alloc-4.c: New test.
-2021-01-08 Kito Cheng <kito.cheng@sifive.com>
+2022-01-10 Richard Sandiford <richard.sandiford@arm.com>
- * gcc.dg/array-quals-1.c: Allow srodata.
+ * gcc.target/aarch64/reg-alloc-3.c: New test.
-2021-01-08 Kito Cheng <kito.cheng@sifive.com>
+2022-01-10 Richard Sandiford <richard.sandiford@arm.com>
- * gcc.target/riscv/predef-10.c: New.
- * gcc.target/riscv/predef-11.c: New.
- * gcc.target/riscv/predef-12.c: New.
- * gcc.target/riscv/predef-13.c: New.
+ * gcc.target/aarch64/reg-alloc-2.c: New test.
-2021-01-07 Jakub Jelinek <jakub@redhat.com>
+2022-01-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
- PR c++/98329
- * g++.dg/cpp2a/bit-cast10.C: New test.
+ PR fortran/82207
+ * gfortran.dg/ieee/signaling_1.f90: New test.
+ * gfortran.dg/ieee/signaling_1_c.c: New file.
-2021-01-07 Martin Sebor <msebor@redhat.com>
+2022-01-10 Richard Biener <rguenther@suse.de>
- PR middle-end/98578
- * gcc.dg/plugin/gil-1.c: Adjust expected output.
- * gcc.dg/uninit-pr98578.c: New test.
+ PR middle-end/101530
+ * c-c++-common/builtin-shufflevector-3.c: New testcase.
-2021-01-07 Marek Polacek <polacek@redhat.com>
+2022-01-10 Richard Biener <rguenther@suse.de>
- PR c++/98441
- * g++.dg/cpp0x/auto55.C: New test.
+ PR tree-optimization/100359
+ * gcc.dg/tree-ssa/pr100359.c: New testcase.
-2021-01-07 David Malcolm <dmalcolm@redhat.com>
+2022-01-09 Harald Anlauf <anlauf@gmx.de>
- PR analyzer/98580
- * gcc.dg/analyzer/pr98580-a.c: New test.
- * gcc.dg/analyzer/pr98580-b.c: New test.
+ PR fortran/103777
+ * gfortran.dg/masklr_3.f90: New test.
-2021-01-07 Paul Thomas <pault@gcc.gnu.org>
+2022-01-09 Harald Anlauf <anlauf@gmx.de>
- PR fortran/93701
- * gfortran.dg/associate_54.f90: New test.
- * gfortran.dg/associate_55.f90: New test.
- * gfortran.dg/associate_56.f90: New test.
+ PR fortran/101762
+ * gfortran.dg/pr101762.f90: New test.
-2021-01-07 Jakub Jelinek <jakub@redhat.com>
+2022-01-09 Mikael Morin <mikael@gcc.gnu.org>
- PR target/98567
- * gcc.target/i386/pr98567-1.c: New test.
- * gcc.target/i386/pr98567-2.c: New test.
+ PR fortran/103789
+ * gfortran.dg/maskl_1.f90: New test.
+ * gfortran.dg/maskr_1.f90: New test.
+ * gfortran.dg/scan_3.f90: New test.
+ * gfortran.dg/verify_3.f90: New test.
-2021-01-07 Richard Sandiford <richard.sandiford@arm.com>
+2022-01-09 Sandra Loosemore <sandra@codesourcery.com>
- * gcc.target/aarch64/sve/cond_unary_5.c: New test.
- * gcc.target/aarch64/sve/cond_unary_5_run.c: Likewise.
- * gcc.target/aarch64/sve/cond_unary_6.c: Likewise.
- * gcc.target/aarch64/sve/cond_unary_6_run.c: Likewise.
- * gcc.target/aarch64/sve/cond_unary_7.c: Likewise.
- * gcc.target/aarch64/sve/cond_unary_7_run.c: Likewise.
- * gcc.target/aarch64/sve/cond_unary_8.c: Likewise.
- * gcc.target/aarch64/sve/cond_unary_8_run.c: Likewise.
+ * g++.dg/cpp0x/constexpr-compare1.C: Add explicit
+ -fdelete-null-pointer-checks option.
+ * g++.dg/cpp0x/constexpr-compare2.C: Likewise.
+ * g++.dg/cpp0x/constexpr-typeid2.C: Likewise.
+ * g++.dg/cpp1y/constexpr-94716.C: Likewise.
+ * g++.dg/cpp1z/constexpr-compare1.C: Likewise.
+ * g++.dg/cpp1z/constexpr-if36.C: Likewise.
+ * gcc.dg/init-compare-1.c: Likewise.
-2021-01-07 Richard Sandiford <richard.sandiford@arm.com>
+2022-01-08 Roger Sayle <roger@nextmovesoftware.com>
- PR tree-optimization/98560
- * gcc.dg/vect/pr98560-2.c: New test.
+ * gcc.target/i386/sse2-v1ti-mov-1.c: New test case.
+ * gcc.target/i386/sse2-v1ti-zext.c: New test case.
-2021-01-07 Richard Sandiford <richard.sandiford@arm.com>
+2022-01-08 Jakub Jelinek <jakub@redhat.com>
- PR tree-optimization/98560
- * gcc.dg/vect/pr98560-1.c: New test.
+ PR c++/89074
+ * g++.dg/cpp1y/constexpr-89074-2.C: New test.
+ * g++.dg/cpp1z/constexpr-89074-1.C: New test.
-2021-01-07 Jakub Jelinek <jakub@redhat.com>
+2022-01-08 Jason Merrill <jason@redhat.com>
- PR tree-optimization/98568
- * g++.dg/torture/pr98568.C: New test.
+ PR c++/103946
+ * g++.dg/cpp0x/nsdmi-array1.C: New test.
-2021-01-07 Hongyu Wang <hongyu.wang@intel.com>
+2022-01-08 Jason Merrill <jason@redhat.com>
- * gcc.target/i386/pr92658-avx512bw.c: Add
- -mprefer-vector-width=512 to avoid impact of different default
- mtune which gcc is built with.
- * gcc.target/i386/pr92658-avx512bw-2.c: Ditto.
+ PR c++/100588
+ * g++.dg/cpp2a/destroying-delete5.C: Expect warning.
+ * g++.dg/cpp2a/destroying-delete6.C: New test.
-2021-01-07 David Malcolm <dmalcolm@redhat.com>
+2022-01-08 David Malcolm <dmalcolm@redhat.com>
- PR analyzer/97074
- * gcc.dg/analyzer/pr97074.c: New test.
+ * gcc.dg/analyzer/analyzer-decls.h (__analyzer_dump_escaped): New
+ decl.
+ * gcc.dg/analyzer/escaping-1.c: New test.
-2021-01-07 David Malcolm <dmalcolm@redhat.com>
+2022-01-07 Jason Merrill <jason@redhat.com>
- PR analyzer/98564
- * gcc.dg/analyzer/pr98564.c: New test.
+ PR c++/20040
+ * g++.dg/init/delete4.C: New test.
-2021-01-06 Vladimir N. Makarov <vmakarov@redhat.com>
+2022-01-07 Andrew Pinski <apinski@marvell.com>
- PR rtl-optimization/97978
- * gcc.target/i386/pr97978.c: New.
+ PR target/102941
+ * gcc.target/aarch64/asm-flag-7.c: New test.
+ * gcc.target/arm/asm-flag-7.c: New test.
-2021-01-06 Martin Sebor <msebor@redhat.com>
+2022-01-07 Piotr Trojanek <trojanek@adacore.com>
- PR c++/95768
- * g++.dg/pr95768.C: New test.
- * g++.dg/warn/Wuninitialized-12.C: New test.
- * gcc.dg/uninit-38.c: New test.
+ * gnat.dg/aggr26.adb: Update expected error message.
-2021-01-06 Martin Sebor <msebor@redhat.com>
+2022-01-07 liuhongt <hongtao.liu@intel.com>
- PR c++/98305
- * g++.dg/warn/Wmismatched-new-delete-3.C: New test.
+ * g++.target/i386/pr103750-fwprop-1.C: New test.
-2021-01-06 Iain Sandoe <iain@sandoe.co.uk>
+2022-01-07 Roger Sayle <roger@nextmovesoftware.com>
- PR c++/96504
- * g++.dg/coroutines/torture/pr95519-05-gro.C: Use suspend_always
- as the final suspend point so that we can check that the state
- machine has reached the expected point.
+ * gcc.target/nvptx/cnot-1.c: New test case.
-2021-01-06 Marek Polacek <polacek@redhat.com>
+2022-01-07 Haochen Gui <guihaoc@gcc.gnu.org>
- PR testsuite/98566
- * g++.dg/warn/Wmismatched-dealloc.C: Use target c++14 in
- dg-error.
+ * gcc.target/powerpc/mffscrni_p9.c: New testcase for mffscrni.
+ * gcc.target/powerpc/test_fpscr_rn_builtin.c: Test mffscrn and mffscrni
+ separately.
-2021-01-06 Alexandre Oliva <oliva@adacore.com>
+2022-01-07 Jason Merrill <jason@redhat.com>
- * g++.dg/opt/store-merging-2.C: Add the required alignment.
+ PR c++/103936
+ PR c++/65591
+ * g++.dg/init/aggr15.C: New test.
-2021-01-06 Richard Biener <rguenther@suse.de>
+2022-01-07 liuhongt <hongtao.liu@intel.com>
- PR tree-optimization/95582
- * gcc.dg/pr95582.c: New testcase.
+ * gcc.target/i386/pr103774.c: New test.
+ * gcc.target/i386/avx512bw-vpcmpequb-1.c: Adjust scan assembler
+ from vpcmpub to (?:vpcmpub|vpcmpeqb).
+ * gcc.target/i386/avx512bw-vpcmpequw-1.c: Ditto.
+ * gcc.target/i386/avx512bw-vpcmpub-1.c: Ditto.
+ * gcc.target/i386/avx512bw-vpcmpuw-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpequd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpequq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpud-1.c: Ditto.
+ * gcc.target/i386/avx512vl-vpcmpequd-1.c: Ditto.
+ * gcc.target/i386/avx512vl-vpcmpequq-1.c: Ditto.
+ * gcc.target/i386/avx512vl-vpcmpuq-1.c: Ditto.
-2021-01-06 Richard Biener <rguenther@suse.de>
+2022-01-07 liuhongt <hongtao.liu@intel.com>
- PR tree-optimization/98513
- * gcc.dg/tree-ssa/pr98513.c: New testcase.
+ * gcc.target/i386/pr103753.c: New test.
-2021-01-06 David Malcolm <dmalcolm@redhat.com>
+2022-01-07 Sandra Loosemore <sandra@codesourcery.com>
- PR analyzer/97072
- * gcc.dg/analyzer/pr97072.c: New test.
+ PR fortran/103898
+ * gfortran.dg/pr103898.f90: New test.
-2021-01-06 David Malcolm <dmalcolm@redhat.com>
+2022-01-07 Jason Merrill <jason@redhat.com>
- PR analyzer/98073
- * gcc.dg/analyzer/pr98073.c: New test.
+ PR c++/103711
+ * g++.dg/eh/delegating1.C: New test.
-2021-01-06 David Malcolm <dmalcolm@redhat.com>
+2022-01-07 Jason Merrill <jason@redhat.com>
- PR analyzer/98223
- * gcc.dg/analyzer/pr94851-1.c: Remove xfail.
+ PR c++/61611
+ * g++.dg/eh/ctor-fntry1.C: New test.
-2021-01-05 Ilya Leoshkevich <iii@linux.ibm.com>
+2022-01-07 Jason Merrill <jason@redhat.com>
- * gcc.target/s390/s390.exp: Replace %% with %.
+ PR c++/33799
+ PR c++/102191
+ * g++.dg/eh/return1.C: Add temporary in try block case.
+ * g++.dg/cpp2a/constexpr-dtor11.C: New test.
-2021-01-05 Steve Kargl <sgk@troutmask.apl.washington.edu>
+2022-01-07 Jason Merrill <jason@redhat.com>
- * gfortran.dg/dec_math.f90: xfail on i?86-*-freebsd*
+ PR c++/53868
+ * g++.dg/eh/ref-temp1.C: New test.
+ * g++.dg/eh/ref-temp2.C: New test.
-2021-01-05 H.J. Lu <hjl.tools@gmail.com>
+2022-01-07 Jason Merrill <jason@redhat.com>
- PR target/98495
- * gcc.target/i386/sse2-mmx-pextrw.c (compute_correct_result): Use
- unsigned short to compute pextrw result.
+ PR c++/66451
+ * g++.dg/eh/array3.C: New test.
+ * g++.dg/eh/array1.C: Mark destructor as throw().
+ * g++.dg/ipa/devirt-40.C: Likewise.
+ * g++.dg/warn/pr83054.C: Likewise.
+ * g++.dg/eh/delete1.C: Shorten array to one element.
-2021-01-05 Patrick Palka <ppalka@redhat.com>
+2022-01-07 Jason Merrill <jason@redhat.com>
- * g++.dg/template/partial5.C: Adjust directives to expect the
- same errors across all dialects.
- * g++.dg/cpp1z/nontype-auto17.C: New test.
- * g++.dg/cpp1z/nontype-auto18.C: New test.
- * g++.dg/template/ttp33.C: New test.
+ * g++.dg/tree-ssa/aggregate1.C: New test.
-2021-01-05 Jakub Jelinek <jakub@redhat.com>
+2022-01-07 Jason Merrill <jason@redhat.com>
- PR tree-optimization/94802
- * gcc.target/i386/pr94802.c: New test.
- * gcc.dg/Wstrict-overflow-25.c: Remove xfail.
+ PR c++/66139
+ PR c++/52320
+ * g++.dg/cpp0x/initlist116.C: New test.
+ * g++.dg/cpp0x/initlist117.C: New test.
+ * g++.dg/cpp0x/lambda/lambda-eh.C: New test.
+ * g++.dg/eh/aggregate1.C: New test.
-2021-01-05 Richard Biener <rguenther@suse.de>
+2022-01-07 Jason Merrill <jason@redhat.com>
- PR tree-optimization/98516
- * gcc.dg/vect/bb-slp-pr98516-1.c: New testcase.
- * gcc.dg/vect/bb-slp-pr98516-2.c: Likewise.
+ PR c++/94041
+ * g++.dg/init/array12.C:
+ * g++.dg/init/aggr7-eh2.C: New test.
+ * g++.dg/init/aggr7-eh3.C: New test.
-2021-01-05 Jakub Jelinek <jakub@redhat.com>
+2022-01-07 Jason Merrill <jason@redhat.com>
- PR c++/98469
- * g++.dg/cpp2a/bit-cast8.C: New test.
- * g++.dg/cpp2a/bit-cast9.C: New test.
+ PR c++/94041
+ * g++.dg/init/aggr7-eh.C: New test.
+ * g++.dg/cpp0x/initlist122.C: Also test aggregate variable.
-2021-01-05 Marek Polacek <polacek@redhat.com>
+2022-01-07 Jason Merrill <jason@redhat.com>
- PR c++/82099
- * g++.dg/cpp1z/class-deduction76.C: Remove dg-ice.
- * g++.dg/cpp0x/noexcept61.C: New test.
+ PR c++/92385
+ * g++.dg/init/array61.C: New test.
-2021-01-05 Jakub Jelinek <jakub@redhat.com>
+2022-01-07 Jason Merrill <jason@redhat.com>
- PR tree-optimization/96928
- * gcc.dg/tree-ssa/pr96928.c: New test.
- * gcc.target/i386/ifcvt-onecmpl-abs-1.c: Remove -fdump-rtl-ce1,
- instead of scanning rtl dump for ifcvt message check assembly
- for xor instruction.
+ * g++.old-deja/g++.martin/new1.C: Don't expect preeval.
+ * g++.dg/tree-ssa/stabilize1.C: Removed.
-2021-01-05 Jakub Jelinek <jakub@redhat.com>
+2022-01-06 David Malcolm <dmalcolm@redhat.com>
- PR tree-optimization/96930
- * g++.dg/tree-ssa/pr96930.C: New test.
+ PR analyzer/103546
+ * gcc.dg/analyzer/aliasing-3.c: New test.
-2021-01-05 Jakub Jelinek <jakub@redhat.com>
+2022-01-06 Steve Kargl <kargl@gcc.gnu.org>
+ Sandra Loosemore <sandra@codesourcery.com>
- PR tree-optimization/96239
- * gcc.dg/tree-ssa/pr96239.c: New test.
+ PR fortran/103287
+ * gfortran.dg/c-interop/pr103287-1.f90: new.
+ * gfortran.dg/c-interop/pr103287-2.f90: new.
-2021-01-05 Uroš Bizjak <ubizjak@gmail.com>
+2022-01-06 H.J. Lu <hjl.tools@gmail.com>
- PR target/98522
- * gcc.target/i386/pr98522.c: New test.
+ PR target/103925
+ * gcc.target/i386/harden-sls-6.c: New test.
-2021-01-05 Nathan Sidwell <nathan@acm.org>
+2022-01-06 Uroš Bizjak <ubizjak@gmail.com>
- * g++.dg/modules/mod-decl-1.C: Adjust.
- * g++.dg/modules/p0713-2.C: Adjust.
- * g++.dg/modules/p0713-3.C: Adjust.
+ * gcc.target/i386/pr102811-2.c (dg-final):
+ Update scan-assembler-times directives.
+ * gcc.target/i386/sse2-float16-2.c (dg-final):
+ Update scan-assembler directives.
-2021-01-05 H.J. Lu <hjl.tools@gmail.com>
+2022-01-06 Kito Cheng <kito.cheng@sifive.com>
- PR target/98495
- * gcc.target/i386/pr98495-1.c: New test.
- * gcc.target/i386/pr98495-2.c: New test.
- * gcc.target/i386/pr98495-3.c: New test.
- * gcc.target/i386/pr98495-4.c: New test.
- * gcc.target/i386/pr98495-5.c: New test.
+ * gcc.target/riscv/predef-14.c: New.
+ * gcc.target/riscv/predef-15.c: Ditto.
+ * gcc.target/riscv/predef-16.c: Ditto.
-2021-01-05 liuhongt <hongtao.liu@intel.com>
+2022-01-06 Patrick Palka <ppalka@redhat.com>
- * gcc.target/i386/sse2-pr98461-2.c: New test.
+ PR c++/69681
+ * g++.dg/cpp0x/constexpr-compare2.C: New test.
-2021-01-05 Richard Sandiford <richard.sandiford@arm.com>
+2022-01-06 Jakub Jelinek <jakub@redhat.com>
- PR rtl-optimization/97144
- * gcc.c-torture/compile/pr97144.c: New test.
- * gcc.target/aarch64/sve/pr97144.c: Likewise.
+ PR rtl-optimization/103908
+ * gcc.target/i386/pr103908.c: New test.
-2021-01-05 Richard Sandiford <richard.sandiford@arm.com>
+2022-01-06 Marek Polacek <polacek@redhat.com>
- PR rtl-optimization/98403
- * g++.dg/opt/pr98403.C: New test.
+ PR c++/103758
+ * gcc.dg/sso-6.c: Update dg-warning.
-2021-01-05 Jakub Jelinek <jakub@redhat.com>
+2022-01-05 Uroš Bizjak <ubizjak@gmail.com>
- PR rtl-optimization/98334
- * gcc.target/i386/pr98334.c: New test.
+ PR target/103861
+ * gcc.target/i386/pr103861-3.c: New test.
+ * g++.dg/vect/slp-pr98855.cc (dg-final): Check that
+ no vectorization using SLP was performed.
-2021-01-05 Jerome Lambourg <lambourg@adacore.com>
+2022-01-05 Uroš Bizjak <ubizjak@gmail.com>
- * g++.dg/cpp1y/constexpr-66093.C: Fix bounds issue.
+ PR target/103915
+ * gcc.target/i386/pr103915.c: New test.
-2021-01-05 David Malcolm <dmalcolm@redhat.com>
+2022-01-05 Uroš Bizjak <ubizjak@gmail.com>
- PR analyzer/98293
- * gcc.dg/analyzer/pr98293.c: New test.
+ PR target/103905
+ * gcc.target/i386/pr103905.c: New test.
-2021-01-04 Martin Uecker <muecker@gwdg.de>
+2022-01-05 Sandra Loosemore <sandra@codesourcery.com>
- PR c/98029
- * gcc.dg/pr98029.c: New test.
+ PR fortran/103258
+ * gfortran.dg/pr103258.f90: New.
-2021-01-04 Nathan Sidwell <nathan@acm.org>
+2022-01-05 Nathan Sidwell <nathan@acm.org>
- * g++.dg/modules/binding-1_a.H: New.
- * g++.dg/modules/binding-1_b.H: New.
- * g++.dg/modules/binding-1_c.C: New.
- * g++.dg/modules/binding-2.H: New.
- * g++.dg/modules/builtin-3_a.C: New.
- * g++.dg/modules/global-2_a.C: New.
- * g++.dg/modules/global-2_b.C: New.
- * g++.dg/modules/global-3_a.C: New.
- * g++.dg/modules/global-3_b.C: New.
- * g++.dg/modules/hello-1_a.C: New.
- * g++.dg/modules/hello-1_b.C: New.
- * g++.dg/modules/iostream-1_a.H: New.
- * g++.dg/modules/iostream-1_b.C: New.
- * g++.dg/modules/part-5_a.C: New.
- * g++.dg/modules/part-5_b.C: New.
- * g++.dg/modules/part-5_c.C: New.
- * g++.dg/modules/stdio-1_a.H: New.
- * g++.dg/modules/stdio-1_b.C: New.
- * g++.dg/modules/string-1_a.H: New.
- * g++.dg/modules/string-1_b.C: New.
- * g++.dg/modules/string-view1.C: New.
- * g++.dg/modules/string-view2.C: New.
- * g++.dg/modules/tinfo-1.C: New.
- * g++.dg/modules/tinfo-2_a.H: New.
- * g++.dg/modules/tinfo-2_b.C: New.
- * g++.dg/modules/tname-spec-1_a.H: New.
- * g++.dg/modules/tname-spec-1_b.C: New.
- * g++.dg/modules/xtreme-header-1.h: New.
- * g++.dg/modules/xtreme-header-1_a.H: New.
- * g++.dg/modules/xtreme-header-1_b.C: New.
- * g++.dg/modules/xtreme-header-1_c.C: New.
- * g++.dg/modules/xtreme-header-2.h: New.
- * g++.dg/modules/xtreme-header-2_a.H: New.
- * g++.dg/modules/xtreme-header-2_b.C: New.
- * g++.dg/modules/xtreme-header-2_c.C: New.
- * g++.dg/modules/xtreme-header-3.h: New.
- * g++.dg/modules/xtreme-header-3_a.H: New.
- * g++.dg/modules/xtreme-header-3_b.C: New.
- * g++.dg/modules/xtreme-header-3_c.C: New.
- * g++.dg/modules/xtreme-header-4.h: New.
- * g++.dg/modules/xtreme-header-4_a.H: New.
- * g++.dg/modules/xtreme-header-4_b.C: New.
- * g++.dg/modules/xtreme-header-4_c.C: New.
- * g++.dg/modules/xtreme-header-5.h: New.
- * g++.dg/modules/xtreme-header-5_a.H: New.
- * g++.dg/modules/xtreme-header-5_b.C: New.
- * g++.dg/modules/xtreme-header-5_c.C: New.
- * g++.dg/modules/xtreme-header-6.h: New.
- * g++.dg/modules/xtreme-header-6_a.H: New.
- * g++.dg/modules/xtreme-header-6_b.C: New.
- * g++.dg/modules/xtreme-header-6_c.C: New.
- * g++.dg/modules/xtreme-header.h: New.
- * g++.dg/modules/xtreme-header_a.H: New.
- * g++.dg/modules/xtreme-header_b.C: New.
- * g++.dg/modules/xtreme-tr1.h: New.
- * g++.dg/modules/xtreme-tr1_a.H: New.
- * g++.dg/modules/xtreme-tr1_b.C: New.
+ * g++.dg/template/attr-used.C: New.
-2021-01-04 Richard Sandiford <richard.sandiford@arm.com>
+2022-01-05 Nathan Sidwell <nathan@acm.org>
- PR tree-optimization/95401
- * g++.dg/vect/pr95401.cc: New test.
- * g++.dg/vect/pr95401a.cc: Likewise.
+ * g++.dg/diagnostic/recur-align.C: New.
-2021-01-04 Richard Biener <rguenther@suse.de>
+2022-01-05 Richard Biener <rguenther@suse.de>
- PR tree-optimization/98308
- * gcc.dg/vect/pr98308.c: New testcase.
+ PR tree-optimization/103816
+ * gcc.dg/torture/pr103816.c: New testcase.
-2021-01-04 Jakub Jelinek <jakub@redhat.com>
+2022-01-05 Jakub Jelinek <jakub@redhat.com>
- PR tree-optimization/95771
- * gcc.target/i386/pr95771.c: New test.
+ PR fortran/103691
+ * gfortran.dg/pr103691.f90: New test.
-2021-01-04 Richard Biener <rguenther@suse.de>
+2022-01-05 Jakub Jelinek <jakub@redhat.com>
- PR tree-optimization/98464
- * g++.dg/opt/pr98464.C: New testcase.
+ PR target/103895
+ * gcc.target/i386/pr103895.c: Add -msse2 to dg-options.
-2021-01-04 Richard Biener <rguenther@suse.de>
+2022-01-05 Kewen Lin <linkw@linux.ibm.com>
- PR tree-optimization/98282
- * g++.dg/opt/pr98282.C: New testcase.
+ PR ipa/102059
+ * gcc.dg/lto/pr102059-1_0.c: New test.
+ * gcc.dg/lto/pr102059-1_1.c: New test.
+ * gcc.dg/lto/pr102059-1_2.c: New test.
+ * gcc.dg/lto/pr102059-2_0.c: New test.
+ * gcc.dg/lto/pr102059-2_1.c: New test.
+ * gcc.dg/lto/pr102059-2_2.c: New test.
+ * gcc.target/powerpc/pr102059-1.c: New test.
+ * gcc.target/powerpc/pr102059-2.c: New test.
+ * gcc.target/powerpc/pr102059-3.c: New test.
-2021-01-04 Richard Sandiford <richard.sandiford@arm.com>
+2022-01-04 Martin Sebor <msebor@redhat.com>
- PR target/89057
- * gcc.target/aarch64/pr89057.c: New test.
+ PR middle-end/99612
+ * c-c++-common/pr83059.c: Adjust text of expected diagnostics.
+ * gcc.dg/atomic-invalid-2.c: Same.
+ * gcc.dg/atomic-invalid.c: Same.
+ * c-c++-common/Winvalid-memory-model.c: New test.
+ * g++.dg/warn/Winvalid-memory-model-2.C: New test.
+ * g++.dg/warn/Winvalid-memory-model.C: New test.
-2021-01-04 Richard Sandiford <richard.sandiford@arm.com>
+2022-01-04 Uroš Bizjak <ubizjak@gmail.com>
- * gcc.target/aarch64/sve/acle/asm/prfb.c: Test for a MUL VL range of
- [-32, 31].
- * gcc.target/aarch64/sve/acle/asm/prfh.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/prfw.c: Likewise.
- * gcc.target/aarch64/sve/acle/asm/prfd.c: Likewise.
+ PR target/103861
+ * gcc.target/i386/warn-vect-op-2.c: Adjust warnings.
+ * gcc.target/i386/pr103900.c: New test.
-2021-01-04 Martin Liska <mliska@suse.cz>
+2022-01-04 Richard Biener <rguenther@suse.de>
- * README: Convert to utf8 from iso8859.
+ PR tree-optimization/103800
+ * gcc.dg/vect/bb-slp-pr103800.c: New testcase.
-2021-01-04 Martin Liska <mliska@suse.cz>
+2022-01-04 Richard Biener <rguenther@suse.de>
- * gcc.target/avr/avr.exp: Run dos2unix on the file.
+ PR tree-optimization/103864
+ PR tree-optimization/103544
+ * gcc.dg/vect/pr103864.c: New testcase.
-2021-01-04 Richard Biener <rguenther@suse.de>
+2022-01-04 Chung-Lin Tang <cltang@codesourcery.com>
- PR tree-optimization/98291
- * gcc.dg/vect/slp-reduc-11.c: New testcase.
- * gcc.dg/vect/vect-reduc-in-order-4.c: Adjust.
+ * gfortran.dg/gomp/pr103643.f90: New test.
-2021-01-04 Jakub Jelinek <jakub@redhat.com>
+2022-01-04 liuhongt <hongtao.liu@intel.com>
- PR tree-optimization/96782
- * gcc.dg/tree-ssa/pr96782.c: New test.
+ * gcc.target/i386/pr103895.c: New test.
-2021-01-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
+2022-01-04 Andrew Pinski <apinski@marvell.com>
- * gcc.misc-tests/outputs.exp: Adjust testcase.
+ PR c++/90782
+ * g++.dg/cpp1z/class-deduction100.C: New test.
-2021-01-01 Jakub Jelinek <jakub@redhat.com>
+2022-01-03 Marek Polacek <polacek@redhat.com>
- * ChangeLog-2020: Rotate ChangeLog. New file.
+ PR c++/103758
+ * g++.dg/cpp0x/constexpr-condition.C: Adjust dg-error.
-2021-01-01 Joel Brobecker <brobecker@adacore.com>
+2022-01-03 Uroš Bizjak <ubizjak@gmail.com>
- * lib/target-supports.exp
- (check_effective_target_arm_fp16_alternative_ok_nocache):
- Return zero for *-*-vxworks7r* targets.
- * gcc.target/arm/aapcs/vfp22.c: Require arm_fp16_alternative_ok.
- * gcc.target/arm/aapcs/vfp23.c: Likewise.
- * gcc.target/arm/aapcs/vfp24.c: Likewise.
- * gcc.target/arm/aapcs/vfp25.c: Likewise.
+ PR target/103894
+ * gcc.target/i386/pr103894.c: New test.
-2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+2022-01-03 Sandra Loosemore <sandra@codesourcery.com>
- * g++.dg/init/new26.C: Fix overriding of the delete operator
- for c++14 profile.
+ PR fortran/103390
+ * gfortran.dg/c-interop/pr103390-1.f90: New.
+ * gfortran.dg/c-interop/pr103390-2.f90: New.
+ * gfortran.dg/c-interop/pr103390-3.f90: New.
+ * gfortran.dg/c-interop/pr103390-4.f90: New.
+ * gfortran.dg/c-interop/pr103390-6.f90: New.
+ * gfortran.dg/c-interop/pr103390-7.f90: New.
+ * gfortran.dg/c-interop/pr103390-8.f90: New.
+ * gfortran.dg/c-interop/pr103390-9.f90: New.
+ * gfortran.dg/c-interop/pr103390-5.f90: New file.
-2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+2022-01-03 Jakub Jelinek <jakub@redhat.com>
- * g++.dg/tls/pr79288.C: Skip on vxworks_kernel (TLS model
- not supported).
+ PR target/98737
+ * gcc.target/i386/pr98737-1.c: New test.
+ * gcc.target/i386/pr98737-2.c: New test.
+ * gcc.target/i386/pr98737-3.c: New test.
+ * gcc.target/i386/pr98737-4.c: New test.
+ * gcc.target/i386/pr98737-5.c: New test.
+ * gcc.target/i386/pr98737-6.c: New test.
+ * gcc.target/i386/pr98737-7.c: New test.
-2021-01-01 Joel Brobecker <brobecker@adacore.com>
+2022-01-03 Richard Biener <rguenther@suse.de>
- * gcc.target/arm/memset-inline-2.c: Add -mno-long-calls to
- the test's dg-options.
- * gcc.target/arm/pr78255-2.c: Likewise.
+ PR middle-end/103851
+ * g++.dg/gomp/pr103851.C: New testcase.
-2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+2022-01-03 Jakub Jelinek <jakub@redhat.com>
- * g++.old-deja/g++.mike/p658.C: Also undefine OK on VxWorks RTP.
+ PR c++/94716
+ * gcc.dg/init-compare-1.c: New test.
+ * g++.dg/cpp0x/constexpr-compare1.C: New test.
+ * g++.dg/cpp1y/constexpr-94716.C: New test.
+ * g++.dg/cpp1z/constexpr-compare1.C: New test.
-2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+2022-01-03 Martin Liska <mliska@suse.cz>
- * g++.dg/opt/20050511-1.C: Work around UINT32 in vxworks rtp
- headers too.
+ * gcc.target/i386/avx2-i32gatherpd256-4.c: Fix ASAN errors.
+ * gcc.target/i386/avx2-i32gatherq256-4.c: Likewise.
+ * gcc.target/i386/avx2-i64gatherpd256-4.c: Likewise.
+ * gcc.target/i386/avx2-i64gatherq256-4.c: Likewise.
+ * gcc.target/i386/avx2-vpabsb256-2.c: Likewise.
+ * gcc.target/i386/avx2-vpabsd256-2.c: Likewise.
+ * gcc.target/i386/avx2-vpabsw256-2.c: Likewise.
+ * gcc.target/i386/avx256-unaligned-load-7.c: Likewise.
+ * gcc.target/i386/avx256-unaligned-store-7.c: Likewise.
+ * gcc.target/i386/pr64291-1.c: Likewise.
-2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+2022-01-03 Martin Liska <mliska@suse.cz>
- * g++.old-deja/g++.pt/const2.C: Skip on vxworks kernel.
+ * gcc.dg/vect/vect-simd-18.c: Fix ASAN error.
+ * gcc.dg/vect/vect-simd-19.c: Likewise.
-2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+2022-01-03 Jakub Jelinek <jakub@redhat.com>
- * g++.dg/warn/miss-format-1.C: Remove vxworks-specific test
- directives.
+ PR c++/103600
+ * g++.dg/cpp0x/constexpr-typeid2.C: New test.
-2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+2022-01-03 Richard Biener <rguenther@suse.de>
- * g++.dg/tree-ssa/copyprop.C: Undefine ERROR if defined.
+ PR tree-optimization/66502
+ * gcc.dg/tree-ssa/ssa-fre-98.c: New testcase.
-2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+2022-01-03 Richard Biener <rguenther@suse.de>
- * g++.dg/other/anon5.C: Skip on vxworks kernel.
+ PR tree-optimization/103615
+ * gcc.dg/torture/pr103615.c: New testcase.
-2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+2022-01-02 Uroš Bizjak <ubizjak@gmail.com>
- * gcc.dg/vxworks/initpri1.c: Tigthen VxWorks version check.
- * gcc.dg/vxworks/initpri2.c: Likewise.
+ PR target/103861
+ * gcc.dg/store_merging_18.c (dg-options): Add -fno-tree-vectorize.
+ * gcc.dg/store_merging_29.c (dg-options): Ditto.
+ * gcc.target/i386/pr103861.c: New test.
+ * gcc.target/i386/pr92658-avx512vl.c (dg-final):
+ Remove vpmovqb scan-assembler xfail.
+ * gcc.target/i386/pr92658-sse4.c (dg-final):
+ Remove pmovzxbq scan-assembler xfail.
+ * gcc.target/i386/pr92658-sse4-2.c (dg-final):
+ Remove pmovsxbq scan-assembler xfail.
+ * gcc.target/i386/warn-vect-op-2.c (dg-warning): Adjust warnings.
-2021-01-01 Joel Brobecker <brobecker@adacore.com>
+2022-01-02 John David Anglin <danglin@gcc.gnu.org>
- * gcc.dg/intmax_t-1.c: Do not expect an error on *-*-vxworks7r*
- targets.
+ * gcc.target/hppa/shadd-2.c: Adjust count to 3.
+ * gcc.target/hppa/shadd-3.c: Likewise.
-2021-01-01 Olivier Hainque <hainque@adacore.com>
+2022-01-02 John David Anglin <danglin@gcc.gnu.org>
- * gcc.dg/pthread-init-1.c: Fix the VxWorks xfail filters.
- * gcc.dg/pthread-init-2.c: Ditto.
+ * gcc.dg/guality/example.c: Skip on hppa*-*-linux*.
-2021-01-01 Olivier Hainque <hainque@adacore.com>
+2022-01-02 Jason Merrill <jason@redhat.com>
- * lib/target-supports.exp (check_weak_available,
- check_fork_available, check_effective_target_lto,
- check_effective_target_mempcpy): Add vxworks filters.
+ * g++.dg/eh/array2.C: New test.
-2021-01-01 Alexandre Oliva <oliva@adacore.com>
+2022-01-02 Jason Merrill <jason@redhat.com>
- * gcc.target/arm/mve/intrinsics/mve_libcall1.c: Pass an
- explicit -mno-long-calls.
- * gcc.target/arm/mve/intrinsics/mve_libcall2.c: Likewise.
+ * g++.dg/eh/cleanup6.C: New test.
-2021-01-01 Alexandre Oliva <oliva@adacore.com>
+2022-01-01 Andrew Pinski <apinski@marvell.com>
- * g++.target/arm/no_unique_address_1.C: Add -mno-long-calls.
- * g++.target/arm/no_unique_address_2.C: Likewise.
+ PR rtl-optimization/100241
+ PR rtl-optimization/99787
+ * gcc.c-torture/compile/pr100241-1.c: New test.
+ * gcc.c-torture/compile/pr99787-1.c: New test.
-2021-01-01 Alexandre Oliva <oliva@adacore.com>
+2022-01-01 Jakub Jelinek <jakub@redhat.com>
- * gcc.target/arm/headmerge-1.c: Add -mno-long-calls.
- * gcc.target/arm/headmerge-2.c: Likewise.
+ * gcc.misc-tests/godump-1.c: Adjust for renaming of last
+ field from _align suffix to _ suffix.
-2021-01-01 Alexandre Oliva <oliva@adacore.com>
+2022-01-01 Jakub Jelinek <jakub@redhat.com>
+ Iain Sandoe <iain@sandoe.co.uk>
- * gcc.target/arm/fp16-aapcs-2.c: Use -mno-long-calls.
+ PR objc/103639
+ * objc.dg/pr103639.m: New test.
-Copyright (C) 2021 Free Software Foundation, Inc.
+Copyright (C) 2022 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-2021 b/gcc/testsuite/ChangeLog-2021
new file mode 100644
index 0000000..21b8841
--- /dev/null
+++ b/gcc/testsuite/ChangeLog-2021
@@ -0,0 +1,20646 @@
+2021-12-31 Francois-Xavier Coudert <fxcoudert@gmail.com>
+
+ PR fortran/89639
+ * gfortran.dg/ieee/ieee_9.f90: Adjust test for targets without
+ REAL128.
+
+2021-12-31 Uroš Bizjak <ubizjak@gmail.com>
+
+ * lib/target-supports.exp (check_vect_slp_store_usage):
+ Handle TEST_V2QI_2.
+ (check_effective_target_vect_slp_v2qi_store_unalign): New procedure.
+ * c-c++-common/Wstringop-overflow-2.c: XFAIL specific tests for
+ vect_slp_v2qi_store_unalign targets.
+ * g++.dg/warn/Wstringop-overflow-3.C: Ditto.
+ * gcc.dg/Wstringop-overflow-28.c: Ditto.
+ * gcc.dg/Wstringop-overflow-68.c: Ditto.
+ * gcc.dg/Wstringop-overflow-75.c: Ditto.
+ * gcc.dg/Wstringop-overflow-76.c: Ditto.
+
+2021-12-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/103756
+ * g++.dg/opt/pr103756.C: New test.
+
+2021-12-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/89971
+ * c-c++-common/cpp/va-opt-9.c: New test.
+
+2021-12-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/103808
+ * gcc.dg/pr103808.c: New test.
+
+2021-12-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/103012
+ PR c++/103012
+ * g++.dg/cpp/pr103012.C: New test.
+ * g++.target/i386/pr103012.C: New test.
+
+2021-12-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/103860
+ * gcc.dg/pr103860.c: New test.
+
+2021-12-30 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ * gcc.dg/loop-invariant-2.c: New.
+
+2021-12-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/103742
+ * g++.dg/opt/pr103742.C: New test.
+
+2021-12-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR testsuite/47334
+ PR testsuite/103823
+ * lib/prune.exp: Prune some warnings related to LTO and
+ visibility.
+
+2021-12-29 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102332
+ * gfortran.dg/pr102332.f90: New test.
+
+2021-12-29 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ PR tree-optimization/103793
+ * gcc.dg/pr103793.c: New test.
+
+2021-12-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/103828
+ * gfortran.dg/c_char_tests_3.f90: New file.
+ * gfortran.dg/c_char_tests_3_c.c: New file.
+ * gfortran.dg/c_char_tests_4.f90: New file.
+ * gfortran.dg/c_char_tests_5.f90: New file.
+
+2021-12-28 Jason Merrill <jason@redhat.com>
+
+ PR c++/99968
+ * g++.dg/ext/is_enum2.C: New test.
+
+2021-12-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/103813
+ * gcc.c-torture/compile/pr103813.c: New test.
+
+2021-12-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/103837
+ * gcc.dg/pr103837.c: New test.
+
+2021-12-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/103838
+ * gcc.dg/pr103838.c: New test.
+
+2021-12-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/103842
+ * g++.dg/opt/pr103842.C: New test.
+
+2021-12-28 Haochen Jiang <haochen.jiang@intel.com>
+
+ * gcc.target/i386/amx-check.h (check_float_tile_register):
+ New check function for float to prevent precision loss.
+ * gcc.target/i386/amxbf16-dpbf16ps-2.c: Correct the type convert
+ and byte offset. Use the new check function.
+
+2021-12-27 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101239
+ * g++.dg/template/sfinae32a.C: New test.
+
+2021-12-27 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/103700
+ * g++.dg/template/sfinae32.C: New test.
+
+2021-12-27 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/pr103762-1a.c: New test.
+ * gcc.target/i386/pr103762-1b.c: Likewise.
+ * gcc.target/i386/pr103762-1c.c: Likewise.
+
+2021-12-27 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/95046
+ * gfortran.dg/extract_recip_1.f: Adjust testcase.
+
+2021-12-27 LiaoShihua <shihua@iscas.ac.cn>
+
+ * gcc.target/riscv/pr103302.c: skip if -march=rv32*
+
+2021-12-26 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/103785
+ * gcc.target/i386/pr103785.c: New test.
+
+2021-12-26 Francois-Xavier Coudert <fxcoudert@gmail.com>
+
+ PR libfortran/98076
+ * gfortran.dg/pr98076.f90: New test.
+
+2021-12-24 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/95046
+ PR target/103797
+ * gcc.target/i386/pr95046-1.c (test_div): Add.
+ (dg-options): Add -mno-recip.
+
+2021-12-24 Iain Sandoe <iain@sandoe.co.uk>
+
+ * gcc.dg/darwin-aligned-globals.c: New test.
+ * gcc.dg/darwin-comm-1.c: New test.
+ * gcc.dg/attr-aligned.c: Amend for new alignment values on
+ Darwin.
+ * gcc.target/i386/pr89261.c: Likewise.
+
+2021-12-23 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/smuldi3_highpart.c: Replace long with long long.
+
+2021-12-23 Roger Sayle <roger@nextmovesoftware.com>
+ Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/103773
+ * gcc.target/i386/pr103773-2.c: New test case.
+ * gcc.target/i386/pr103773.c: New test case.
+
+2021-12-23 konglin1 <lingling.kong@intel.com>
+
+ * gcc.target/i386/avx512bf16-cvtsbh2ss-1.c: New test.
+ * gcc.target/i386/avx512bf16-vcvtpbh2ps-1.c: Ditto.
+ * gcc.target/i386/avx512bf16vl-cvtness2sbh-1.c: Ditto.
+ * gcc.target/i386/avx512bf16vl-vcvtpbh2ps-1.c: Ditto.
+
+2021-12-23 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512bw-pr103750-1.c: New test.
+ * gcc.target/i386/avx512bw-pr103750-2.c: New test.
+ * gcc.target/i386/avx512f-pr103750-1.c: New test.
+ * gcc.target/i386/avx512f-pr103750-2.c: New test.
+ * gcc.target/i386/avx512fp16-pr103750-1.c: New test.
+ * gcc.target/i386/avx512fp16-pr103750-2.c: New test.
+
+2021-12-22 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103778
+ * gfortran.dg/illegal_boz_arg_3.f90: New test.
+
+2021-12-22 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103776
+ * gfortran.dg/select_10.f90: New test.
+
+2021-12-22 Murray Steele <murray.steele@arm.com>
+
+ * gcc.target/arm/mve/mve.exp: Add new subdirectories.
+ * gcc.target/arm/mve/general-c/type_redef_1.c: New test.
+ * gcc.target/arm/mve/general/double_pragmas_1.c: New test.
+ * gcc.target/arm/mve/general/nomve_1.c: New test.
+
+2021-12-21 Jiang Haochen <haochen.jiang@intel.com>
+
+ * gcc.target/i386/bmi-1.c: Add test for new intrinsic.
+ * gcc.target/i386/bmi-2.c: Ditto.
+ * gcc.target/i386/bmi-3.c: Ditto.
+
+2021-12-21 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ * gcc.dg/tree-ssa/recip-3.c: Adjust.
+ * gcc.dg/tree-ssa/ssa-lim-19.c: New test.
+ * gcc.dg/tree-ssa/ssa-lim-20.c: New test.
+ * gcc.dg/tree-ssa/ssa-lim-21.c: New test.
+ * gcc.dg/tree-ssa/ssa-lim-22.c: New test.
+ * gcc.dg/tree-ssa/ssa-lim-23.c: New test.
+
+2021-12-21 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ PR middle-end/103270
+ * gcc.dg/pr103270.c: New test.
+
+2021-12-20 Patrick Palka <ppalka@redhat.com>
+
+ * g++.dg/lookup/memfn1.C: New test.
+ * g++.dg/template/non-dependent16b.C: New test.
+
+2021-12-20 Olivier Hainque <hainque@adacore.com>
+
+ * gcc.dg/vect/vect-simd-20.c: Fix size of p[]
+ to accommodate the number of strides performed
+ by foo() for s == 78.
+
+2021-12-20 Roger Sayle <roger@nextmovesoftware.com>
+ Uroš Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/smuldi3_highpart.c: New test case.
+
+2021-12-20 Patrick Palka <ppalka@redhat.com>
+
+ * g++.dg/cpp0x/error2.C: Make the call to foo type-dependent in
+ order to avoid latent pretty-printing issue for FUNCTION_DECL
+ inside MODOP_EXPR.
+ * g++.dg/cpp0x/fntmp-equiv1.C: Make the calls to d, d2 and d3
+ within the function signatures dependent.
+ * g++.dg/template/non-dependent16.C: New test.
+ * g++.dg/template/non-dependent16a.C: New test.
+ * g++.dg/template/non-dependent17.C: New test.
+
+2021-12-20 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/103669
+ * g++.dg/torture/pr103669.C: New test.
+
+2021-12-20 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr98468.c: New test.
+
+2021-12-19 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.dg/uninit-pr89230-1.c: Change the dg-bogus messages
+ around and xfail both of them.
+
+2021-12-19 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/94376
+ * g++.dg/cpp0x/lambda/lambda-nested9a.C: New test.
+
+2021-12-19 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/103714
+ * g++.dg/cpp2a/concepts-uneval5.C: New test.
+
+2021-12-19 Francois-Xavier Coudert <fxcoudert@gmail.com>
+
+ * gcc.dg/pr100509.c: Needs alias.
+ * gcc.dg/pragma-diag-10.c: Needs alias.
+
+2021-12-18 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103412
+ * gfortran.dg/illegal_boz_arg_2.f90: New test.
+
+2021-12-18 Roger Sayle <roger@nextmovesoftware.com>
+ Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/103611
+ * gcc.target/i386/pr103611-2.c: New test case.
+
+2021-12-18 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR target/32803
+ * gcc.target/i386/pr32803.c: New test case.
+
+2021-12-18 François-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * gcc.dg/darwin-minversion-link.c: Test darwin21.
+ * obj-c++.dg/cxx-ivars-3.mm: Homogeneize darwin versions.
+ * obj-c++.dg/objc-gc-3.mm: Homogeneize darwin versions.
+ * objc.dg/objc-gc-4.m: Homogeneize darwin versions.
+
+2021-12-17 Marek Polacek <polacek@redhat.com>
+
+ PR c/103649
+ * c-c++-common/Wno-attributes-6.c: New test.
+
+2021-12-17 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/fold-vec-insert-float-p9.c
+
+2021-12-17 Olivier Hainque <hainque@adacore.com>
+
+ * gcc.target/powerpc/pr97142.c: Add -mdejagnu-cpu=power7
+ to the dg-options.
+
+2021-12-17 Marek Polacek <polacek@redhat.com>
+
+ PR c++/103749
+ * g++.dg/template/redecl4.C: Adjust dg-error.
+ * g++.dg/diagnostic/redeclaration-2.C: New test.
+
+2021-12-17 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/103624
+ * gcc.target/powerpc/darn-0.c: Remove target clause.
+ * gcc.target/powerpc/darn-1.c: Remove target clause. Remove lp64
+ requirement. Change return type to long.
+ * gcc.target/powerpc/darn-2.c: Ditto.
+ * gcc.target/powerpc/darn-3.c: Remove target clause.
+
+2021-12-17 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/100127
+ * g++.dg/coroutines/pr100127.C: New test.
+
+2021-12-17 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/100772
+ * g++.dg/coroutines/pr100772-a.C: New test.
+ * g++.dg/coroutines/pr100772-b.C: New test.
+
+2021-12-17 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/96517
+ * g++.dg/coroutines/pr96517.C: New test.
+
+2021-12-17 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/pragma-optimize.c: Require ifunc support.
+
+2021-12-17 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/103744
+ * gcc.dg/vect/pr103744-1.c: New test.
+ * gcc.dg/vect/pr103744-2.c: Likewise.
+
+2021-12-17 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/103741
+ * gcc.target/aarch64/pr103741.c: New test.
+
+2021-12-17 Haochen Jiang <haochen.jiang@intel.com>
+
+ PR target/100738
+ * g++.target/i386/avx512vl-pr100738-1.C: New test.
+
+2021-12-17 Siddhesh Poyarekar <siddhesh@gotplt.org>
+
+ * g++.dg/ext/builtin-dynamic-object-size1.C: New test.
+ * g++.dg/ext/builtin-dynamic-object-size2.C: Likewise.
+ * gcc.dg/builtin-dynamic-alloc-size.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-1.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-10.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-11.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-12.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-13.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-14.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-15.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-16.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-17.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-18.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-19.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-2.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-3.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-4.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-5.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-6.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-7.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-8.c: Likewise.
+ * gcc.dg/builtin-dynamic-object-size-9.c: Likewise.
+ * gcc.dg/builtin-object-size-16.c: Adjust to allow inclusion
+ from builtin-dynamic-object-size-16.c.
+ * gcc.dg/builtin-object-size-17.c: Likewise.
+
+2021-12-17 Siddhesh Poyarekar <siddhesh@gotplt.org>
+
+ * gcc.dg/builtin-object-size-1.c (test9): New test.
+ (main): Call it.
+ * gcc.dg/builtin-object-size-2.c (test8): New test.
+ (main): Call it.
+ * gcc.dg/builtin-object-size-3.c (test9): New test.
+ (main): Call it.
+ * gcc.dg/builtin-object-size-4.c (test8): New test.
+ (main): Call it.
+ * gcc.dg/builtin-object-size-5.c (test5, test6, test7): New
+ tests.
+
+2021-12-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/103681
+ * g++.dg/abi/macro0.C: Update value.
+ * g++.dg/abi/no_unique_address6.C: New test.
+ * g++.dg/abi/nsdmi-aggr1.C: New test.
+ * g++.dg/abi/nsdmi-aggr1a.C: New test.
+
+2021-12-16 Sandra Loosemore <sandra@codesourcery.com>
+
+ * gcc.dg/20021029-1.c: Build with -G0 for nios2.
+
+2021-12-16 Marek Polacek <polacek@redhat.com>
+
+ PR c++/99980
+ * g++.dg/cpp0x/noexcept71.C: New test.
+
+2021-12-16 Martin Sebor <msebor@redhat.com>
+
+ PR c++/103703
+ * g++.dg/warn/Wmismatched-tags-9.C: New test.
+
+2021-12-16 Martin Sebor <msebor@redhat.com>
+
+ PR testsuite/103751
+ * gcc.dg/Warray-bounds-48.c: Fix member alignment.
+
+2021-12-16 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/51577
+ PR c++/83035
+ PR c++/100465
+ * g++.dg/lookup/operator-3.C: Split out operator overload
+ declarations into ...
+ * g++.dg/lookup/operator-3-ops.h: ... here.
+ * g++.dg/lookup/operator-3a.C: New test.
+ * g++.dg/lookup/operator-4.C: New test.
+ * g++.dg/lookup/operator-4a.C: New test.
+ * g++.dg/lookup/operator-5.C: New test.
+ * g++.dg/lookup/operator-5a.C: New test.
+ * g++.dg/lookup/operator-6.C: New test.
+ * g++.dg/lookup/operator-7.C: New test.
+ * g++.dg/lookup/operator-8.C: New test.
+
+2021-12-16 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/103571
+ * gcc.target/i386/pr102812.c (dg-final): Do not scan for movdqa.
+
+2021-12-16 Martin Liska <mliska@suse.cz>
+
+ PR c++/103696
+ * g++.target/i386/pr103696.C: New test.
+
+2021-12-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * gfortran.dg/iostat_5.f90: New file.
+
+2021-12-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * gfortran.dg/date_and_time_1.f90: New file.
+
+2021-12-15 Marek Polacek <polacek@redhat.com>
+
+ PR c++/102229
+ * g++.dg/cpp1y/decltype-auto5.C: New test.
+
+2021-12-15 Thomas Schwinge <thomas@codesourcery.com>
+
+ * lib/fortran-torture.exp (fortran-torture-compile)
+ (fortran-torture-execute): Be more informative for ICEs.
+ * lib/gcc-defs.exp (${tool}_check_compile): Likewise.
+ * lib/gcc-dg.exp (gcc-dg-test-1): Likewise.
+ * lib/go-torture.exp (go-torture-compile, go-torture-execute):
+ Likewise.
+
+2021-12-15 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/78969
+ * gcc.dg/tree-ssa/builtin-snprintf-warn-6.c: New test.
+
+2021-12-15 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/nvptx/float16-2.c: New test case.
+ * gcc.target/nvptx/tanh-1.c: New test case.
+
+2021-12-15 Richard Sandiford <richard.sandiford@arm.com>
+ Tamar Christina <tamar.christina@arm.com>
+
+ PR target/103094
+ * gcc.target/aarch64/pr103094.c: New test.
+
+2021-12-15 Tamar Christina <tamar.christina@arm.com>
+
+ PR rtl-optimization/103350
+ * gcc.target/aarch64/pr103350-1.c: New test.
+ * gcc.target/aarch64/pr103350-2.c: New test.
+
+2021-12-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/103408
+ * g++.dg/cpp23/auto-fncast11.C: Fix expected diagnostic wording.
+
+2021-12-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/103704
+ * g++.dg/gomp/pr103704.C: New test.
+
+2021-12-15 Haochen Jiang <haochen.jiang@intel.com>
+
+ PR target/101796
+ * gcc.target/i386/pr101796-1.c: New test.
+
+2021-12-15 Michael Meissner <meissner@the-meissners.org>
+
+ * gcc.target/powerpc/vec-splat-constant-df.c: New test.
+ * gcc.target/powerpc/vec-splat-constant-sf.c: New test.
+
+2021-12-15 Michael Meissner <meissner@the-meissners.org>
+
+ * gcc.target/powerpc/pr86731-fwrapv-longlong.c: Update insn
+ regex for power10.
+ * gcc.target/powerpc/vec-splat-constant-v2df.c: New test.
+ * gcc.target/powerpc/vec-splat-constant-v2di.c: New test.
+
+2021-12-15 Michael Meissner <meissner@linux.ibm.com>
+
+ * gcc.target/powerpc/vec-splat-constant-v16qi.c: New test.
+ * gcc.target/powerpc/vec-splat-constant-v4sf.c: New test.
+ * gcc.target/powerpc/vec-splat-constant-v4si.c: New test.
+ * gcc.target/powerpc/vec-splat-constant-v8hi.c: New test.
+ * gcc.target/powerpc/vec-splati-runnable.c: Update insn count.
+
+2021-12-15 Michael Meissner <meissner@the-meissners.org>
+
+ * gcc.target/powerpc/float128-constant.c: New test.
+
+2021-12-15 Alexandre Oliva <oliva@adacore.com>
+
+ PR target/100518
+ * gcc.target/aarch64/pr100518.c: New.
+
+2021-12-15 Alexandre Oliva <oliva@adacore.com>
+
+ PR middle-end/100843
+ * gcc.dg/pr100843.c: New.
+
+2021-12-14 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.c-torture/compile/pr103682.c: New test.
+
+2021-12-14 Peter Bergner <bergner@linux.ibm.com>
+
+ PR target/103548
+ * gcc.target/powerpc/mma-builtin-10-pair.c: New test.
+ * gcc.target/powerpc/mma-builtin-10-quad.c: New test.
+
+2021-12-14 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103717
+ * gfortran.dg/do_check_19.f90: New test.
+
+2021-12-14 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103718
+ PR fortran/103719
+ * gfortran.dg/do_check_18.f90: New test.
+
+2021-12-14 Petter Tomner <tomner@kth.se>
+
+ * jit.dg/all-non-failing-tests.h: Added two tests
+ * jit.dg/test-error-ctor-array-wrong-obj.c: New
+ * jit.dg/test-error-ctor-struct-too-big.c: New
+ * jit.dg/test-error-ctor-struct-wrong-field-obj.c: New
+ * jit.dg/test-error-ctor-struct-wrong-type.c: New
+ * jit.dg/test-error-ctor-struct-wrong-type2.c
+ * jit.dg/test-error-ctor-union-wrong-field-name.c: New
+ * jit.dg/test-error-global-already-init.c: New
+ * jit.dg/test-error-global-common-section.c: New
+ * jit.dg/test-error-global-init-too-small-array.c: New
+ * jit.dg/test-error-global-lvalue-init.c: New
+ * jit.dg/test-error-global-nonconst-init.c: New
+ * jit.dg/test-global-init-rvalue.c: New
+ * jit.dg/test-local-init-rvalue.c: New
+
+2021-12-14 Harald Anlauf <anlauf@gmx.de>
+
+ PR libfortran/103634
+ * gfortran.dg/intrinsic_pack_6.f90: New test.
+
+2021-12-14 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/analyzer/data-model-1.c: Disable ipa-modref.
+ * gcc.dg/uninit-38.c: Likewise.
+ * gcc.dg/uninit-pr98578.c: Liewise.
+
+2021-12-14 Manfred Schwarb <manfred99@gmx.ch>
+
+ PR fortran/91497
+ * gfortran.dg/pr91497.f90: Adjust test to use
+ dg-require-effective-target directive.
+ * gfortran.dg/pr91497_2.f90: New test to cover all targets.
+ Cover MAX1 and MIN1 intrinsics.
+
+2021-12-14 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR target/99531
+ * gcc.target/i386/pr99531.c: Do not scan for ia32.
+
+2021-12-14 Przemyslaw Wirkus <przemyslaw.wirkus@arm.com>
+
+ * gcc.target/aarch64/acle/ls64_asm.c: New test.
+ * gcc.target/aarch64/acle/ls64_ld64b.c: New test.
+ * gcc.target/aarch64/acle/ls64_ld64b-2.c: New test.
+ * gcc.target/aarch64/acle/ls64_ld64b-3.c: New test.
+ * gcc.target/aarch64/acle/ls64_st64b.c: New test.
+ * gcc.target/aarch64/acle/ls64_ld_st_o0.c: New test.
+ * gcc.target/aarch64/acle/ls64_st64b-2.c: New test.
+ * gcc.target/aarch64/acle/ls64_st64bv.c: New test.
+ * gcc.target/aarch64/acle/ls64_st64bv-2.c: New test.
+ * gcc.target/aarch64/acle/ls64_st64bv-3.c: New test.
+ * gcc.target/aarch64/acle/ls64_st64bv0.c: New test.
+ * gcc.target/aarch64/acle/ls64_st64bv0-2.c: New test.
+ * gcc.target/aarch64/acle/ls64_st64bv0-3.c: New test.
+ * gcc.target/aarch64/pragma_cpp_predefs_2.c: Add checks
+ for __ARM_FEATURE_LS64.
+
+2021-12-14 Martin Liska <mliska@suse.cz>
+
+ * gcc.target/i386/avx2-psraq-1.c: Use ARRAY_SIZE.
+ * gcc.target/i386/m128-check.h: Move it to the top-level
+ context.
+ * gcc.target/i386/sse2-psraq-1.c: Use ARRAY_SIZE.
+ * gcc.target/i386/sse4_2-check.h: Include the header with
+ ARRAY_SIZE definition.
+
+2021-12-14 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/103408
+ * g++.dg/concepts/diagnostic18.C: Expect a "constraints on a
+ non-templated function" error.
+ * g++.dg/cpp23/auto-fncast11.C: New test.
+
+2021-12-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/103587
+ * gcc.dg/pr103587.c: New test.
+
+2021-12-14 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR fortran/103576
+ PR testsuite/103697
+ * gfortran.dg/goacc/privatization-1-compute-loop.f90: Adjust.
+ * gfortran.dg/goacc/privatization-1-compute.f90: Likewise.
+ * gfortran.dg/goacc/privatization-1-routine_gang-loop.f90:
+ Likewise.
+ * gfortran.dg/goacc/privatization-1-routine_gang.f90: Likewise.
+
+2021-12-13 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR target/99531
+ * gcc.target/i386/pr99531.c: New test.
+
+2021-12-13 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/i386/pr103611-1.c: New test case.
+
+2021-12-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/mops_3.c: New test.
+
+2021-12-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/mops_2.c: New test.
+
+2021-12-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/mops_1.c: New test.
+
+2021-12-13 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/atomic-25.f90: Remove sorry, fix + add checks.
+ * gfortran.dg/gomp/atomic-26.f90: Likewise.
+ * gfortran.dg/gomp/atomic-21.f90: New test.
+
+2021-12-13 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/103513
+ * gcc.c-torture/compile/pr103513.c: New test.
+
+2021-12-13 Kewen Lin <linkw@linux.ibm.com>
+
+ PR target/103515
+ * gcc.target/powerpc/pr103515.c: New test.
+
+2021-12-12 Antoni Boucher <bouanto@zoho.com>
+
+ PR target/100688
+ * jit.dg/all-non-failing-tests.h: Mention new test
+ link-section-assembler.
+ * jit.dg/test-link-section-assembler.c: New test.
+ * jit.dg/jit.exp: New helper function to test that the
+ assembly contains a pattern.
+
+2021-12-12 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/nvptx/float16-1.c: New test case.
+
+2021-12-12 Antoni Boucher <bouanto@zoho.com>
+
+ PR target/95415
+ * jit.dg/all-non-failing-tests.h: Add test-tls.c.
+ * jit.dg/test-tls.c: New test.
+
+2021-12-11 Antoni Boucher <bouanto@zoho.com>
+
+ PR target/96066
+ PR target/96067
+ * jit.dg/all-non-failing-tests.h: Add test-builtin-types.c.
+ * jit.dg/test-builtin-types.c
+ * jit.dg/test-error-bad-assignment.c
+ * jit.dg/test-fuzzer.c: Add fuzzing for type qualifiers.
+
+2021-12-11 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103606
+ * gfortran.dg/pr103606.f90: New test.
+
+2021-12-11 Jason Merrill <jason@redhat.com>
+
+ PR c++/103534
+ * g++.dg/warn/Wstringop-overflow-8.C: New test.
+
+2021-12-10 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/103562
+ * jit.dg/all-non-failing-tests.h: Add comment about...
+ * jit.dg/test-pr103562.c: New test.
+
+2021-12-10 Marek Polacek <polacek@redhat.com>
+
+ * g++.dg/cpp23/auto-fncast10.C: New test.
+
+2021-12-10 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103418
+ * gfortran.dg/move_alloc_8.f90: Adjust error messages.
+ * gfortran.dg/pointer_intent_9.f90: New test.
+
+2021-12-10 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR ipa/103601
+ * gcc.dg/ipa/pr103601.c: New test case.
+
+2021-12-10 Joel Hutton <joel.hutton@arm.com>
+
+ * gcc.target/aarch64/pr103523.c: New test.
+
+2021-12-09 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/103215
+ * gcc.dg/Wstringop-overflow-58.c: Adjust and xfail expected warnings.
+ * gcc.dg/Wstringop-overflow-59.c: Same.
+ * gcc.dg/warn-strnlen-no-nul.c: Same.
+ * gcc.dg/Warray-bounds-91.c: New test.
+ * gcc.dg/Warray-bounds-92.c: New test.
+ * gcc.dg/Wstringop-overflow-85.c: New test.
+ * gcc.dg/Wstringop-overflow-87.c: New test.
+
+2021-12-09 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/101751
+ * gcc.dg/Wstringop-overflow-86.c: New test.
+
+2021-12-09 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/103143
+ * gcc.dg/Wstringop-overflow-83.c: New test.
+
+2021-12-09 Marek Polacek <polacek@redhat.com>
+
+ PR c++/103401
+ * g++.dg/cpp1y/lambda-generic-85713-2.C: Add dg-error.
+ * g++.dg/cpp1y/pr60054.C: Adjust dg-error.
+ * g++.dg/cpp1y/pr60332.C: Likewise.
+ * g++.dg/cpp2a/concepts-pr84979-2.C: Likewise.
+ * g++.dg/cpp2a/concepts-pr84979-3.C: Likewise.
+ * g++.dg/cpp2a/concepts-pr84979.C: Likewise.
+ * g++.dg/cpp23/auto-fncast7.C: New test.
+ * g++.dg/cpp23/auto-fncast8.C: New test.
+ * g++.dg/cpp23/auto-fncast9.C: New test.
+
+2021-12-09 Alexandre Oliva <oliva@adacore.com>
+
+ PR target/103097
+ * gcc.target/i386/pr103097.c: New.
+
+2021-12-09 Alexandre Oliva <oliva@adacore.com>
+
+ PR target/103302
+ * gcc.target/riscv/pr103302.c: New.
+
+2021-12-09 Alexandre Oliva <oliva@adacore.com>
+
+ PR tree-optimization/103024
+ PR middle-end/103530
+ * g++.dg/pr103024.C: New.
+ * g++.dg/pr103530.C: New.
+
+2021-12-08 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103609
+ * gfortran.dg/pr103609.f90: New test.
+
+2021-12-08 Dimitar Dimitrov <dimitar@dinux.eu>
+
+ * gcc.target/pru/pru_irq_map.c: New test.
+
+2021-12-08 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103610
+ * gfortran.dg/shape_11.f90: New test.
+
+2021-12-08 Martin Liska <mliska@suse.cz>
+
+ * gcc.dg/loop-unswitch-1.c: Adjust test-case based on
+ dump_printf_loc.
+ * gcc.dg/loop-unswitch-2.c: Likewise.
+ * gcc.dg/loop-unswitch-3.c: Likewise.
+ * gcc.dg/loop-unswitch-4.c: Likewise.
+ * gcc.dg/loop-unswitch-5.c: Likewise.
+
+2021-12-08 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.dg/sibcall-1.c, gcc.dg/sibcall-10.c,
+ gcc.dg/sibcall-2.c, gcc.dg/sibcall-3.c,
+ gcc.dg/sibcall-4.c, gcc.dg/sibcall-9.c: Replace
+ attribute "noinline" with "noipa".
+
+2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
+
+ * c-c++-common/goacc/deep-copy-arrayofstruct.c: Adjust testcase.
+ * c-c++-common/gomp/target-enter-data-1.c: New testcase.
+ * c-c++-common/gomp/target-implicit-map-2.c: New testcase.
+
+2021-12-08 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/nvptx/exttrunc-2.c: New test case.
+ * gcc.target/nvptx/exttrunc-3.c: New test case.
+ * gcc.target/nvptx/exttrunc-4.c: New test case.
+ * gcc.target/nvptx/exttrunc-5.c: New test case.
+ * gcc.target/nvptx/exttrunc-6.c: New test case.
+
+2021-12-08 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/nvptx/exttrunc-1.c: New test case.
+
+2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
+
+ PR middle-end/92120
+ * gcc.dg/gomp/target-3.c: New testcase.
+ * g++.dg/gomp/target-3.C: New testcase.
+ * g++.dg/gomp/target-lambda-1.C: New testcase.
+ * g++.dg/gomp/target-lambda-2.C: New testcase.
+ * g++.dg/gomp/target-this-1.C: New testcase.
+ * g++.dg/gomp/target-this-2.C: New testcase.
+ * g++.dg/gomp/target-this-3.C: New testcase.
+ * g++.dg/gomp/target-this-4.C: New testcase.
+ * g++.dg/gomp/target-this-5.C: New testcase.
+ * g++.dg/gomp/this-2.C: Adjust testcase.
+
+2021-12-08 Haochen Jiang <haochen.jiang@intel.com>
+
+ PR target/100738
+ * g++.target/i386/pr100738-1.C: New test.
+
+2021-12-08 Alexandre Oliva <oliva@adacore.com>
+
+ PR middle-end/103149
+ * gcc.target/aarch64/pr103149.c: New.
+
+2021-12-07 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103607
+ * gfortran.dg/pr103607.f90: New test.
+
+2021-12-07 Marek Polacek <polacek@redhat.com>
+
+ * g++.dg/cpp0x/decltype-bitfield1.C: Change a type to unsigned
+ long long. Only run on longlong64 targets.
+
+2021-12-07 Peter Bergner <bergner@linux.ibm.com>
+
+ PR testsuite/103556
+ PR testsuite/103586
+ * lib/target-supports.exp (check_effective_target_rop_ok): Remove '\n'.
+
+2021-12-07 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103588
+ * gfortran.dg/pr103588.f90: New test.
+
+2021-12-07 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103591
+ * gfortran.dg/select_9.f90: New test.
+
+2021-12-07 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95009
+ * g++.dg/cpp0x/decltype-bitfield1.C: New test.
+ * g++.dg/cpp0x/decltype-bitfield2.C: New test.
+
+2021-12-07 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/103594
+ * gcc.dg/pr103594.c: New test.
+
+2021-12-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/103596
+ * gcc.dg/torture/pr103596.c: New testcase.
+
+2021-12-07 YunQiang Su <yunqiang.su@cipunited.com>
+
+ * gcc.target/mips/mips.exp: add unaligned-access
+ * gcc.target/mips/unaligned-2.c: New test.
+ * gcc.target/mips/unaligned-3.c: New test.
+
+2021-12-07 Eugene Rozenfeld <erozen@microsoft.com>
+
+ * gcc.dg/tree-prof/init-array.c: New test for unrolling inner loops.
+
+2021-12-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/103581
+ * gcc.dg/vect/pr103581.c: New testcase.
+
+2021-12-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/103544
+ * gcc.dg/vect/pr103544.c: New testcase.
+
+2021-12-06 Tamar Christina <tamar.christina@arm.com>
+
+ PR rtl-optimization/103404
+ * gcc.target/i386/pr103404.c: New test.
+
+2021-12-06 Hongtao Liu <Hongtao.liu@intel.com>
+ Uroš Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/pr95740.c: New test.
+
+2021-12-04 Marek Polacek <polacek@redhat.com>
+
+ PR c++/93614
+ * g++.dg/template/lookup18.C: New test.
+
+2021-12-04 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/atomic-2.f90: Move now supported code to ...
+ * gfortran.dg/gomp/atomic.f90: here.
+ * gfortran.dg/gomp/atomic-10.f90: New test.
+ * gfortran.dg/gomp/atomic-12.f90: New test.
+ * gfortran.dg/gomp/atomic-15.f90: New test.
+ * gfortran.dg/gomp/atomic-16.f90: New test.
+ * gfortran.dg/gomp/atomic-17.f90: New test.
+ * gfortran.dg/gomp/atomic-18.f90: New test.
+ * gfortran.dg/gomp/atomic-19.f90: New test.
+ * gfortran.dg/gomp/atomic-20.f90: New test.
+ * gfortran.dg/gomp/atomic-22.f90: New test.
+ * gfortran.dg/gomp/atomic-24.f90: New test.
+ * gfortran.dg/gomp/atomic-25.f90: New test.
+ * gfortran.dg/gomp/atomic-26.f90: New test.
+
+2021-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/cpp2a/bit-cast11.C: New test.
+ * g++.dg/cpp2a/bit-cast12.C: New test.
+ * g++.dg/cpp2a/bit-cast13.C: New test.
+ * g++.dg/cpp2a/bit-cast14.C: New test.
+
+2021-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/102432
+ * c-c++-common/gomp/pr102432.c: New test.
+ * c-c++-common/goacc/pr102432.c: New test.
+
+2021-12-04 Alexandre Oliva <oliva@adacore.com>
+
+ PR rtl-optimization/103028
+ * gcc.dg/pr103028.c: New.
+
+2021-12-04 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/vec_reve_1.c: Require VSX.
+
+2021-12-03 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/diagnostic/scope1.C: New test.
+
+2021-12-03 Martin Liska <mliska@suse.cz>
+
+ PR target/101324
+ * gcc.target/powerpc/pr101324.c: New test.
+
+2021-12-03 Peter Bergner <bergner@linux.ibm.com>
+
+ * lib/target-supports.exp (check_effective_target_rop_ok): New function.
+ * gcc.target/powerpc/rop-1.c: Use it.
+ * gcc.target/powerpc/rop-2.c: Likewise.
+ * gcc.target/powerpc/rop-3.c: Likewise.
+ * gcc.target/powerpc/rop-4.c: Likewise.
+ * gcc.target/powerpc/rop-5.c: Likewise.
+
+2021-12-03 Harald Anlauf <anlauf@gmx.de>
+ Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/103505
+ * gfortran.dg/pr103505.f90: New test.
+
+2021-12-03 Marek Polacek <polacek@redhat.com>
+
+ PR c++/103403
+ * g++.dg/cpp1y/decltype-auto2.C: New test.
+ * g++.dg/cpp1y/decltype-auto3.C: New test.
+ * g++.dg/cpp1y/decltype-auto4.C: New test.
+ * g++.dg/cpp1z/decomp-decltype1.C: New test.
+
+2021-12-03 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/103269
+ * gcc.target/i386/pieces-memcpy-17.c: New test.
+ * gcc.target/i386/pieces-memcpy-18.c: Likewise.
+ * gcc.target/i386/pieces-memcpy-19.c: Likewise.
+ * gcc.target/i386/pieces-memcpy-20.c: Likewise.
+ * gcc.target/i386/pieces-memcpy-21.c: Likewise.
+ * gcc.target/i386/pieces-memset-45.c: Likewise.
+ * gcc.target/i386/pieces-memset-46.c: Likewise.
+ * gcc.target/i386/pieces-memset-47.c: Likewise.
+ * gcc.target/i386/pieces-memset-48.c: Likewise.
+ * gcc.target/i386/pieces-memset-49.c: Likewise.
+
+2021-12-03 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/83782
+ * gcc.target/i386/pr83782-1.c: Also scan leal x32.
+ * gcc.target/i386/pr83782-2.c: Likewise.
+
+2021-12-03 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/sve/pred-combine-and.c: New test.
+
+2021-12-03 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/51469
+ PR target/83782
+ * gcc.target/i386/pr83782-1.c: New test.
+ * gcc.target/i386/pr83782-2.c: Likewise.
+
+2021-12-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/103456
+ * gcc.dg/ubsan/pr103456.c: Add -ffat-lto-objects to dg-options.
+
+2021-12-03 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/allocate_with_source_26.f90: Adjust testcase.
+ * gfortran.dg/allocate_with_mold_4.f90: New testcase.
+
+2021-12-03 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR testsuite/102735
+ * lib/gcc-dg.exp (process-message): Make sure that we get unique
+ test names.
+
+2021-12-03 Andrew Pinski <apinski@marvell.com>
+
+ PR c++/71792
+ * g++.dg/torture/pr71792.C: New test.
+
+2021-12-02 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/103526
+ * gcc.dg/analyzer/pr103526.c: New test.
+
+2021-12-02 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust expected error
+ message.
+ * gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-neg-2.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-neg-3.c: Likewise.
+ * gcc.target/powerpc/bfp/scalar-test-neg-5.c: Likewise.
+ * gcc.target/powerpc/byte-in-set-2.c: Likewise.
+ * gcc.target/powerpc/cmpb-2.c: Likewise.
+ * gcc.target/powerpc/cmpb-3.c: Likewise.
+ * gcc.target/powerpc/cmpb32-2.c: Likewise.
+ * gcc.target/powerpc/crypto-builtin-2.c: Likewise.
+ * gcc.target/powerpc/fold-vec-splat-floatdouble.c: Remove invalid
+ test and adjust xxpermdi count.
+ * gcc.target/powerpc/fold-vec-splat-longlong.c: Remove invalid
+ tests and adjust instruction counts.
+ * gcc.target/powerpc/fold-vec-splat-misc-invalid.c: Adjust expected
+ error messages.
+ * gcc.target/powerpc/int_128bit-runnable.c: Adjust instruction counts.
+ * gcc.target/powerpc/pr80315-1.c: Adjust expected error message.
+ * gcc.target/powerpc/pr80315-2.c: Likewise.
+ * gcc.target/powerpc/pr80315-3.c: Likewise.
+ * gcc.target/powerpc/pr80315-4.c: Likewise.
+ * gcc.target/powerpc/pr88100.c: Likewise.
+ * gcc.target/powerpc/pragma_misc9.c: Likewise.
+ * gcc.target/powerpc/pragma_power8.c: Undef _RS6000_VECDEFINES_H.
+ * gcc.target/powerpc/pragma_power9.c: Likewise.
+ * gcc.target/powerpc/test_fpscr_drn_builtin_error.c: Adjust expected
+ error messages.
+ * gcc.target/powerpc/test_fpscr_rn_builtin_error.c: Likewise.
+ * gcc.target/powerpc/vec-gnb-2.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-all-nez-7.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-any-eqz-7.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-cmpnez-7.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-xl-len-13.c: Likewise.
+ * gcc.target/powerpc/vsu/vec-xst-len-12.c: Likewise.
+
+2021-12-02 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/shrn-1.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/shrn-2.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/shrn-3.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/shrn-4.c: New test.
+
+2021-12-02 Tamar Christina <tamar.christina@arm.com>
+
+ PR testsuite/103479
+ * gcc.dg/bic-bitmask-18.c: Update regexpr to expect = 0;.
+
+2021-12-02 Marek Polacek <polacek@redhat.com>
+
+ PR c++/94490
+ * g++.dg/ext/integer-pack5.C: New test.
+
+2021-12-02 Marek Polacek <polacek@redhat.com>
+
+ PR c++/103408
+ * g++.dg/cpp23/concepts-err1.C: New test.
+
+2021-12-02 Chung-Lin Tang <cltang@codesourcery.com>
+
+ PR fortran/90030
+ * gfortran.dg/goacc/finalize-1.f: Adjust scan test.
+ * gfortran.dg/gomp/affinity-clause-1.f90: Likewise.
+ * gfortran.dg/gomp/affinity-clause-5.f90: Likewise.
+ * gfortran.dg/gomp/defaultmap-4.f90: Likewise.
+ * gfortran.dg/gomp/defaultmap-5.f90: Likewise.
+ * gfortran.dg/gomp/defaultmap-6.f90: Likewise.
+ * gfortran.dg/gomp/map-3.f90: Likewise.
+ * gfortran.dg/gomp/pr78260-2.f90: Likewise.
+ * gfortran.dg/gomp/pr78260-3.f90: Likewise.
+
+2021-12-01 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/102471
+ * gcc.dg/analyzer/leak-3.c: New test.
+
+2021-12-01 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/102881
+ * gcc.target/i386/pr102811-1.c: New test.
+ * gcc.target/i386/avx512fp16-1c.c (dg-final): Update
+ scan-assembler-times scan strings for ia32 targets.
+ * gcc.target/i386/pr102327-1.c (dg-final): Ditto.
+ * gcc.target/i386/pr102811.c: Rename from ...
+ * gcc.target/i386/avx512vl-vcvtps2ph-pr102811.c: ... this.
+
+2021-12-01 Roger Sayle <roger@nextmovesoftware.com>
+ Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/fold-condneg-1.c: New test case.
+ * gcc.dg/fold-condneg-2.c: New test case.
+ * gcc.dg/fold-condnot-1.c: New test case.
+ * gcc.dg/pr101145-1.c: New test case.
+ * gcc.dg/pr101145-2.c: New test case.
+
+2021-12-01 Peter Bergner <bergner@linux.ibm.com>
+
+ PR middle-end/103127
+ * gcc.target/powerpc/pr103127.c: New test.
+
+2021-12-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/103310
+ * g++.dg/cpp0x/constexpr-fp-except1.C: New test.
+ * g++.dg/cpp1z/constexpr-if36.C: New test.
+ * gcc.dg/tree-ssa/nonzero-1.c: Now well-formed.
+ * gcc.dg/tree-ssa/nonzero-1a.c: New test.
+
+2021-12-01 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/103517
+ * gcc.dg/vect/pr103517.c: New test.
+
+2021-12-01 Alex Coplan <alex.coplan@arm.com>
+
+ * gcc.target/aarch64/aapcs64/macro-def.h (PTR): Fix typo in
+ comment.
+
+2021-12-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/100977
+ * g++.dg/cpp/ucnid-1.C: Adjust expected diagnostics.
+ * g++.dg/cpp/ucnid-1-utf8.C: Likewise.
+
+2021-12-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/102356
+ * gcc.dg/pr102356.c: New test.
+
+2021-12-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/103415
+ * c-c++-common/cpp/va-opt-8.c: New test.
+ * c-c++-common/Wimplicit-fallthrough-38.c: New test.
+
+2021-12-01 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.dg/bic-bitmask-10.c: Moved to gcc.dg/vect/vect-bic-bitmask-10.c.
+ * gcc.dg/bic-bitmask-11.c: Moved to gcc.dg/vect/vect-bic-bitmask-11.c.
+ * gcc.dg/bic-bitmask-12.c: Moved to gcc.dg/vect/vect-bic-bitmask-12.c.
+ * gcc.dg/bic-bitmask-3.c: Moved to gcc.dg/vect/vect-bic-bitmask-3.c.
+ * gcc.dg/bic-bitmask-23.c: Moved to gcc.dg/vect/vect-bic-bitmask-23.c.
+ * gcc.dg/bic-bitmask-2.c: Moved to gcc.dg/vect/vect-bic-bitmask-2.c.
+ * gcc.dg/bic-bitmask-4.c: Moved to gcc.dg/vect/vect-bic-bitmask-4.c.
+ * gcc.dg/bic-bitmask-5.c: Moved to gcc.dg/vect/vect-bic-bitmask-5.c.
+ * gcc.dg/bic-bitmask-6.c: Moved to gcc.dg/vect/vect-bic-bitmask-6.c.
+ * gcc.dg/bic-bitmask-8.c: Moved to gcc.dg/vect/vect-bic-bitmask-8.c.
+ * gcc.dg/bic-bitmask-9.c: Moved to gcc.dg/vect/vect-bic-bitmask-9.c.
+ * gcc.dg/vect/vect-bic-bitmask-10.c: New file.
+ * gcc.dg/vect/vect-bic-bitmask-11.c: New file.
+ * gcc.dg/vect/vect-bic-bitmask-12.c: New file.
+ * gcc.dg/vect/vect-bic-bitmask-2.c: New file.
+ * gcc.dg/vect/vect-bic-bitmask-23.c: New file.
+ * gcc.dg/vect/vect-bic-bitmask-3.c: New file.
+ * gcc.dg/vect/vect-bic-bitmask-4.c: New file.
+ * gcc.dg/vect/vect-bic-bitmask-5.c: New file.
+ * gcc.dg/vect/vect-bic-bitmask-6.c: New file.
+ * gcc.dg/vect/vect-bic-bitmask-8.c: New file.
+ * gcc.dg/vect/vect-bic-bitmask-9.c: New file.
+
+2021-12-01 Siddhesh Poyarekar <siddhesh@gotplt.org>
+ Martin Liška <mliska@suse.cz>
+
+ PR tree-optimization/103456
+ * gcc.dg/ubsan/pr103456.c: New test.
+
+2021-11-30 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr103463.c: New test.
+ * gcc.target/i386/pr103463-2.c: New test.
+
+2021-11-30 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/94579
+ * gcc.dg/analyzer/pr94579.c: New test.
+
+2021-11-30 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/99269
+ * gcc.dg/analyzer/pr99269.c: New test.
+
+2021-11-30 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/100524
+ * gcc.dg/analyzer/pragma-2.c: New test.
+
+2021-11-30 Harald Anlauf <anlauf@gmx.de>
+
+ * gfortran.dg/array_constructor_54.f90: New test.
+
+2021-11-30 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103473
+ * gfortran.dg/minmaxloc_15.f90: New test.
+
+2021-11-30 Harald Anlauf <anlauf@gmx.de>
+ Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/101565
+ * gfortran.dg/coarray_49.f90: New test.
+
+2021-11-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/103494
+ * gcc.dg/vect/pr103494.c: New test.
+ * g++.dg/vect/pr103494.cc: Likewise.
+
+2021-11-30 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * gdc.dg/Wcastresult2.d: Update test.
+ * gdc.dg/asm1.d: Likewise.
+ * gdc.dg/asm2.d: Likewise.
+ * gdc.dg/asm3.d: Likewise.
+ * gdc.dg/gdc282.d: Likewise.
+ * gdc.dg/imports/gdc170.d: Likewise.
+ * gdc.dg/intrinsics.d: Likewise.
+ * gdc.dg/pr101672.d: Likewise.
+ * gdc.dg/pr90650a.d: Likewise.
+ * gdc.dg/pr90650b.d: Likewise.
+ * gdc.dg/pr94777a.d: Likewise.
+ * gdc.dg/pr95250.d: Likewise.
+ * gdc.dg/pr96869.d: Likewise.
+ * gdc.dg/pr98277.d: Likewise.
+ * gdc.dg/pr98457.d: Likewise.
+ * gdc.dg/simd1.d: Likewise.
+ * gdc.dg/simd2a.d: Likewise.
+ * gdc.dg/simd2b.d: Likewise.
+ * gdc.dg/simd2c.d: Likewise.
+ * gdc.dg/simd2d.d: Likewise.
+ * gdc.dg/simd2e.d: Likewise.
+ * gdc.dg/simd2f.d: Likewise.
+ * gdc.dg/simd2g.d: Likewise.
+ * gdc.dg/simd2h.d: Likewise.
+ * gdc.dg/simd2i.d: Likewise.
+ * gdc.dg/simd2j.d: Likewise.
+ * gdc.dg/simd7951.d: Likewise.
+ * gdc.dg/torture/gdc309.d: Likewise.
+ * gdc.dg/torture/pr94424.d: Likewise.
+ * gdc.dg/torture/pr94777b.d: Likewise.
+ * lib/gdc-utils.exp (gdc-convert-args): Handle new compiler options.
+ (gdc-convert-test): Handle CXXFLAGS, EXTRA_OBJC_SOURCES, and ARG_SETS
+ test directives.
+ (gdc-do-test): Only import modules in the test run directory.
+ * gdc.dg/pr94777c.d: New test.
+ * gdc.dg/pr96156b.d: New test.
+ * gdc.dg/pr96157c.d: New test.
+ * gdc.dg/simd_ctfe.d: New test.
+ * gdc.dg/torture/simd17344.d: New test.
+ * gdc.dg/torture/simd20052.d: New test.
+ * gdc.dg/torture/simd6.d: New test.
+ * gdc.dg/torture/simd7.d: New test.
+
+2021-11-30 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr103440.c: New.
+
+2021-11-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/103489
+ * gcc.dg/torture/pr103489.c: New testcase.
+
+2021-11-30 Martin Liska <mliska@suse.cz>
+
+ PR tree-optimization/103278
+ * gcc.dg/tree-ssa/if-to-switch-5.c: Make the test acceptable by
+ targets with no jump-tables.
+
+2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-c++-common/goacc/nested-reductions-1-routine.c: Adjust.
+ * c-c++-common/goacc/nested-reductions-2-routine.c: Adjust.
+ * c-c++-common/goacc/orphan-reductions-2.c: Adjust.
+ * gfortran.dg/goacc/nested-reductions-1-routine.f90: Adjust.
+ * gfortran.dg/goacc/nested-reductions-2-routine.f90: Adjust.
+ * gfortran.dg/goacc/orphan-reductions-1.f90: Adjust.
+ * gfortran.dg/goacc/orphan-reductions-2.f90: Adjust.
+
+2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gfortran.dg/goacc/orphan-reductions-1.f90: Adjust.
+
+2021-11-30 Frederik Harwath <frederik@codesourcery.com>
+ Thomas Schwinge <thomas@codesourcery.com>
+
+ * gfortran.dg/goacc/orphan-reductions-3.f90: New test
+ verifying that the "gang reduction on an orphan loop" error message
+ is not emitted for non-orphaned loops.
+ * c-c++-common/goacc/orphan-reductions-3.c: Likewise for C and C++.
+
+2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
+ Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-c++-common/goacc/nested-reductions-1-routine.c: Adjust.
+ * c-c++-common/goacc/nested-reductions-2-routine.c: Likewise.
+ * gcc.dg/goacc/loop-processing-1.c: Likewise.
+ * gfortran.dg/goacc/nested-reductions-1-routine.f90: Likewise.
+ * gfortran.dg/goacc/nested-reductions-2-routine.f90: Likewise.
+ * c-c++-common/goacc/orphan-reductions-1.c: New test.
+ * c-c++-common/goacc/orphan-reductions-2.c: New test.
+ * gfortran.dg/goacc/orphan-reductions-1.f90: New test.
+ * gfortran.dg/goacc/orphan-reductions-2.f90: New test.
+
+2021-11-30 Kwok Cheung Yeung <kcy@codesourcery.com>
+ Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-c++-common/goacc/routine-4.c (seq, vector, worker, gang):
+ Remove loop reductions.
+ * c-c++-common/goacc/routine-4-extern.c (seq, vector, worker, gang):
+ Likewise.
+
+2021-11-30 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR testsuite/103477
+ * gcc.dg/tree-ssa/pr103345.c: Correct xor test for big-endian.
+
+2021-11-30 Aldy Hernandez <aldyh@redhat.com>
+
+ PR tree-optimization/103451
+ * gcc.dg/pr103451.c: New test.
+
+2021-11-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/vect/vect-gather-3.c: New test.
+ * gcc.dg/vect/vect-gather-4.c: Likewise.
+ * gcc.target/aarch64/sve/mask_gather_load_8.c: Likewise.
+
+2021-11-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/vect/pr99102.c: Add -fno-vect-cost-model.
+ Revert:
+ 2020-09-09 Richard Biener [rguenther@suse.de]
+ * gcc.target/i386/pr87007-4.c: Adjust.
+ * gcc.target/i386/pr87007-5.c: Likewise.
+
+2021-11-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_vect_gather_load_ifn): New target test.
+ * gcc.dg/vect/vect-gather-1.c: New test.
+ * gcc.dg/vect/vect-gather-2.c: Likewise.
+ * gcc.target/aarch64/sve/gather_load_11.c: Likewise.
+
+2021-11-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/cost_model_13.c: New test.
+
+2021-11-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gfortran.dg/vect/vect-8.f90: Bump number of vectorized loops
+ to 25 for SVE.
+ * gcc.target/aarch64/sve/gather_load_10.c: New test.
+
+2021-11-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/add-mul-overflow-1.c: New test.
+
+2021-11-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/ubsan/commutative-1.c: New test.
+
+2021-11-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/complex_mul_1.c: New test.
+
+2021-11-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/fmax-fmin-1.c: New test.
+
+2021-11-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/vect/vect-fmax-1.c: New test.
+ * gcc.dg/vect/vect-fmax-2.c: Likewise.
+ * gcc.dg/vect/vect-fmax-3.c: Likewise.
+ * gcc.dg/vect/vect-fmin-1.c: New test.
+ * gcc.dg/vect/vect-fmin-2.c: Likewise.
+ * gcc.dg/vect/vect-fmin-3.c: Likewise.
+ * gcc.target/aarch64/fmaxnm_1.c: Likewise.
+ * gcc.target/aarch64/fmaxnm_2.c: Likewise.
+ * gcc.target/aarch64/fminnm_1.c: Likewise.
+ * gcc.target/aarch64/fminnm_2.c: Likewise.
+ * gcc.target/aarch64/sve/fmaxnm_2.c: Likewise.
+ * gcc.target/aarch64/sve/fmaxnm_3.c: Likewise.
+ * gcc.target/aarch64/sve/fminnm_2.c: Likewise.
+ * gcc.target/aarch64/sve/fminnm_3.c: Likewise.
+
+2021-11-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/100977
+ * c-c++-common/cpp/ucnid-2011-1-utf8.c: Expect errors in C++.
+ * c-c++-common/cpp/ucnid-2011-1.c: Likewise.
+ * g++.dg/cpp/ucnid-4-utf8.C: Add missing space to dg-options.
+ * g++.dg/cpp23/normalize3.C: Enable for c++11 rather than just c++23.
+ * g++.dg/cpp23/normalize4.C: Likewise.
+ * g++.dg/cpp23/normalize5.C: Likewise.
+ * g++.dg/cpp23/normalize7.C: Expect errors rather than just warnings
+ for c++11 and up rather than just c++23.
+ * g++.dg/cpp23/ucnid-2-utf8.C: Expect errors even for c++11 .. c++20.
+
+2021-11-30 Roger Sayle <roger@nextmovesoftware.com>
+ Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100711
+ * gcc.target/i386/pr100711-1.c: New test case.
+ * gcc.target/i386/pr100711-2.c: New test case.
+
+2021-11-30 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/103485
+ * gcc.dg/pr103485.c: New testcase.
+
+2021-11-30 Kewen Lin <linkw@linux.ibm.com>
+
+ PR target/102347
+ * gcc.target/powerpc/pr102347.c: New test.
+
+2021-11-29 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/103217
+ * gcc.dg/analyzer/pr103217-2.c: New test.
+ * gcc.dg/analyzer/pr103217-3.c: New test.
+ * gcc.dg/analyzer/pr103217-4.c: New test.
+ * gcc.dg/analyzer/pr103217-5.c: New test.
+
+2021-11-29 Martin Sebor <msebor@redhat.com>
+
+ PR testsuite/103469
+ * c-c++-common/attr-retain-5.c: Prune out valid warning.
+ * c-c++-common/attr-retain-6.c: Same.
+ * c-c++-common/attr-retain-9.c: Same.
+
+2021-11-29 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100493
+ * g++.dg/cpp1z/lambda-this1.C: Adjust expected diagnostics.
+ * g++.dg/cpp1z/lambda-this8.C: New test.
+ * g++.dg/cpp2a/lambda-this3.C: Compile with -pedantic in C++17
+ to continue to diagnose redundant 'this' captures.
+
+2021-11-29 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/i386/sse2-v1ti-rotate.c: New test case.
+
+2021-11-29 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr102811-2.c: New test.
+ * gcc.target/i386/avx512vl-vcvtps2ph-pr102811.c: Add new
+ scan-assembler-times.
+
+2021-11-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/103458
+ * gcc.dg/torture/pr103458.c: New testcase.
+
+2021-11-29 Kewen Lin <linkw@linux.ibm.com>
+
+ * gcc.target/powerpc/vect-gather-1.c: New test.
+
+2021-11-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/103431
+ * gcc.dg/pr103431.c: New test.
+
+2021-11-27 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.dg/tree-ssa/ivopts-8.c: Fix new test case for -m32.
+ * gcc.dg/tree-ssa/ivopts-9.c: Likewise.
+
+2021-11-26 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103411
+ * gfortran.dg/pr68153.f90: Adjust test to improved check.
+ * gfortran.dg/reshape_7.f90: Likewise.
+ * gfortran.dg/reshape_9.f90: New test.
+
+2021-11-26 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.dg/wrapped-binop-simplify.c: Update expected test result.
+ * gcc.dg/tree-ssa/ivopts-5.c: New test case.
+ * gcc.dg/tree-ssa/ivopts-6.c: New test case.
+ * gcc.dg/tree-ssa/ivopts-7.c: New test case.
+ * gcc.dg/tree-ssa/ivopts-8.c: New test case.
+ * gcc.dg/tree-ssa/ivopts-9.c: New test case.
+
+2021-11-26 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/ipa/inline-9.c: Update template.c
+
+2021-11-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102753
+ * g++.dg/cpp2a/consteval20.C: Add some extra tests.
+ * g++.dg/cpp2a/consteval23.C: Likewise.
+ * g++.dg/cpp2a/consteval25.C: New test.
+ * g++.dg/cpp2a/srcloc20.C: New test.
+
+2021-11-26 konglin1 <lingling.kong@intel.com>
+
+ PR target/102811
+ * gcc.target/i386/pr90773-21.c: Allow pextrw instead of movw.
+ * gcc.target/i386/pr90773-23.c: Ditto.
+ * gcc.target/i386/avx512vl-vcvtps2ph-pr102811.c: New test.
+
+2021-11-25 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/ipa/inline10.c: New test.
+
+2021-11-25 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR middle-end/103406
+ * gcc.dg/pr103406.c: New test case.
+
+2021-11-25 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/103227
+ * gcc.dg/ipa/pr103227-1.c: New test.
+ * gcc.dg/ipa/pr103227-3.c: Likewise.
+ * gcc.dg/ipa/pr103227-2.c: Likewise.
+ * gfortran.dg/pr53787.f90: Disable IPA-SRA.
+
+2021-11-25 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/102648
+ * gcc.dg/pr102648.c: New.
+
+2021-11-25 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/103359
+ * gcc.dg/pr103359.c: New.
+
+2021-11-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/103417
+ * gcc.c-torture/execute/pr103417.c: New test.
+
+2021-11-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/103376
+ * gcc.dg/optimize-bswapsi-7.c: New test.
+
+2021-11-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102611
+ * g++.dg/cpp2a/comma1.C: Expect different diagnostics for C++23.
+ * g++.dg/cpp2a/comma3.C: Likewise.
+ * g++.dg/cpp2a/comma4.C: Expect diagnostics for C++23.
+ * g++.dg/cpp2a/comma5.C: Expect different diagnostics for C++23.
+ * g++.dg/cpp23/feat-cxx2b.C: Test __cpp_multidimensional_subscript
+ predefined macro.
+ * g++.dg/cpp23/subscript1.C: New test.
+ * g++.dg/cpp23/subscript2.C: New test.
+ * g++.dg/cpp23/subscript3.C: New test.
+ * g++.dg/cpp23/subscript4.C: New test.
+ * g++.dg/cpp23/subscript5.C: New test.
+ * g++.dg/cpp23/subscript6.C: New test.
+
+2021-11-25 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/pr103194-5.c: Include <stdint.h>.
+ Replace long with int64_t.
+
+2021-11-24 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.c-torture/execute/pr103405.c: New test.
+
+2021-11-24 Richard Biener <rguenther@suse.de>
+ Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/103168
+ * g++.dg/tree-ssa/pr103168.C: New testcase.
+
+2021-11-24 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR middle-end/103244
+ * c-c++-common/goacc/combined-reduction.c: Revert/expect previous
+ OpenACC behavior.
+ * c-c++-common/goacc/firstprivate-mappings-1.c: Likewise.
+ * c-c++-common/goacc/mdc-1.c: Likewise.
+ * g++.dg/goacc/firstprivate-mappings-1.C: Likewise.
+
+2021-11-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/103365
+ * c-c++-common/Wno-attributes-1.c: Require effective target
+ c || c++11 and drop dg-additional-options.
+ * c-c++-common/Wno-attributes-2.c: Likewise.
+ * c-c++-common/Wno-attributes-4.c: New test.
+ * c-c++-common/Wno-attributes-5.c: New test.
+
+2021-11-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/103376
+ * gcc.c-torture/execute/pr103376.c: New test.
+
+2021-11-24 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.dg/bic-bitmask-10.c: New test.
+ * gcc.dg/bic-bitmask-11.c: New test.
+ * gcc.dg/bic-bitmask-12.c: New test.
+ * gcc.dg/bic-bitmask-13.c: New test.
+ * gcc.dg/bic-bitmask-14.c: New test.
+ * gcc.dg/bic-bitmask-15.c: New test.
+ * gcc.dg/bic-bitmask-16.c: New test.
+ * gcc.dg/bic-bitmask-17.c: New test.
+ * gcc.dg/bic-bitmask-18.c: New test.
+ * gcc.dg/bic-bitmask-19.c: New test.
+ * gcc.dg/bic-bitmask-2.c: New test.
+ * gcc.dg/bic-bitmask-20.c: New test.
+ * gcc.dg/bic-bitmask-21.c: New test.
+ * gcc.dg/bic-bitmask-22.c: New test.
+ * gcc.dg/bic-bitmask-23.c: New test.
+ * gcc.dg/bic-bitmask-3.c: New test.
+ * gcc.dg/bic-bitmask-4.c: New test.
+ * gcc.dg/bic-bitmask-5.c: New test.
+ * gcc.dg/bic-bitmask-6.c: New test.
+ * gcc.dg/bic-bitmask-7.c: New test.
+ * gcc.dg/bic-bitmask-8.c: New test.
+ * gcc.dg/bic-bitmask-9.c: New test.
+ * gcc.dg/bic-bitmask.h: New test.
+ * gcc.target/aarch64/bic-bitmask-1.c: New test.
+
+2021-11-24 Marek Polacek <polacek@redhat.com>
+
+ PR c++/103347
+ * g++.dg/cpp0x/nsdmi-warn1.C: New test.
+ * g++.dg/cpp0x/nsdmi-warn1.h: New file.
+
+2021-11-24 Hongtao Liu <hongtao.liu@intel.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/pr103194-2.c: New test.
+ * gcc.target/i386/pr103194-3.c: New test.
+ * gcc.target/i386/pr103194-4.c: New test.
+ * gcc.target/i386/pr103194-5.c: New test.
+ * gcc.target/i386/pr103194.c: New test.
+
+2021-11-23 Martin Sebor <msebor@redhat.com>
+
+ PR c++/96507
+ * g++.dg/warn/Waddress-8.C: New test.
+
+2021-11-23 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/88232
+ * c-c++-common/attr-used-5.c: Suppress valid warning.
+ * c-c++-common/attr-used-6.c: Same.
+ * c-c++-common/attr-used-9.c: Same.
+ * g++.dg/warn/Winfinite-recursion-2.C: New test.
+ * g++.dg/warn/Winfinite-recursion-3.C: New test.
+ * g++.dg/warn/Winfinite-recursion.C: New test.
+ * gcc.dg/Winfinite-recursion-2.c: New test.
+ * gcc.dg/Winfinite-recursion.c: New test.
+
+2021-11-23 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103392
+ * gfortran.dg/bound_simplification_7.f90: New test.
+
+2021-11-23 Marek Polacek <polacek@redhat.com>
+
+ PR c++/19808
+ * g++.dg/warn/Wuninitialized-28.C: Make a class nonempty.
+ * g++.dg/warn/Wuninitialized-29.C: Likewise.
+ * g++.dg/warn/Wuninitialized-31.C: New test.
+
+2021-11-23 Marek Polacek <polacek@redhat.com>
+
+ * g++.dg/warn/Waddress-5.C: Make sf static.
+
+2021-11-23 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ * gcc.target/powerpc/test_mffsl.c: Change effective target to
+ a run-time check. Fix a typo in a debug print statement.
+
+2021-11-23 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/87711
+ PR fortran/87851
+ * gfortran.dg/len_trim.f90: New test.
+
+2021-11-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/103361
+ * g++.dg/torture/pr103361.C: New testcase.
+
+2021-11-23 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/tree-ssa/modref-dse-4.c: Update template.
+ * gcc.dg/tree-ssa/modref-dse-5.c: Update template.
+
+2021-11-23 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/102216
+ * g++.dg/tree-ssa/pr102216-1.C: New test.
+ * g++.dg/tree-ssa/pr102216-2.C: New test.
+
+2021-11-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/102431
+ * c-c++-common/gomp/pr102431.c: New test.
+ * g++.dg/gomp/pr102431.C: New test.
+ * gfortran.dg/gomp/pr102431.f90: New test.
+
+2021-11-23 Haochen Gui <guihaoc@gcc.gnu.org>
+
+ PR target/100868
+ * gcc.target/powerpc/vec_reve_1.c: New test.
+ * gcc.target/powerpc/vec_reve_2.c: Likewise.
+
+2021-11-23 Navid Rahimi <navidrahimi@microsoft.com>
+
+ PR tree-optimization/102232
+ * gcc.dg/tree-ssa/pr102232.c: Testcase for this optimization.
+
+2021-11-23 Navid Rahimi <navidrahimi@microsoft.com>
+
+ PR tree-optimization/96779
+ * gcc.dg/tree-ssa/pr96779.c: Testcase for this optimization.
+ * gcc.dg/tree-ssa/pr96779-disabled.c: Testcase for this optimization
+ when -fwrapv passed.
+
+2021-11-22 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/template/crash106.C: Adjust.
+ * g++.dg/diagnostic/ptrtomem3.C: New test.
+
+2021-11-22 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/pr65327.C: Adjust location.
+ * g++.dg/cpp23/constexpr-nonlit4.C: Likewise.
+ * g++.dg/cpp23/constexpr-nonlit5.C: Likewise.
+ * g++.dg/cpp2a/constexpr-init1.C: Likewise.
+
+2021-11-22 Jakub Jelinek <jakub@redhat.com>
+ Tobias Burnus <tobias@codesourcery.com>
+
+ PR preprocessor/103165
+ * c-c++-common/gomp/pragma-3.c: New test.
+ * c-c++-common/gomp/pragma-4.c: New test.
+ * c-c++-common/gomp/pragma-5.c: New test.
+
+2021-11-22 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR tree-optimization/98953
+ PR tree-optimization/103345
+ * gcc.dg/tree-ssa/pr98953.c: New test case.
+ * gcc.dg/tree-ssa/pr103345.c: New test case.
+
+2021-11-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/101731
+ * c-c++-common/goacc/routine-6.c: New test.
+
+2021-11-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/103351
+ * g++.dg/torture/pr103351.C: New testcase.
+
+2021-11-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/103349
+ * g++.dg/gomp/masked-1.C: New test.
+
+2021-11-22 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr103275.c: New test.
+
+2021-11-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/101180
+ * gcc.target/i386/pr101180.c: New test.
+
+2021-11-21 Harald Anlauf <anlauf@gmx.de>
+ Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/99061
+ * gfortran.dg/dec_math_5.f90: New test.
+
+2021-11-21 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/103227
+ * gcc.dg/tree-ssa/modref-15.c: New test.
+
+2021-11-21 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/103264
+ * gcc.dg/tree-prof/merge_block.c: Add -fno-ipa-modref
+
+2021-11-21 Roger Sayle <roger@nextmovesoftware.com>
+ Robin Dapp <rdapp@linux.ibm.com>
+
+ PR target/102117
+ * gcc.target/s390/mul-wide.c: New test case.
+ * gcc.target/s390/umul-wide.c: New test case.
+
+2021-11-20 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/103052
+ * gcc.c-torture/execute/pr103052.c: New test.
+
+2021-11-20 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/103220
+ * gcc.dg/tree-ssa/pr103220-1.c: New test.
+ * gcc.dg/tree-ssa/pr103220-2.c: New test.
+ * gcc.dg/pr25530.c: Update test to check for
+ 4294967294 in the case -2 is not matched.
+
+2021-11-20 Alexandre Oliva <oliva@adacore.com>
+
+ PR tree-optimization/102988
+ * g++.dg/pr102988.C: New.
+
+2021-11-20 Antoni Boucher <bouanto@zoho.com>
+
+ PR target/96889
+ * jit.dg/all-non-failing-tests.h: Add test-reflection.c.
+ * jit.dg/test-reflection.c: New test.
+
+2021-11-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/101180
+ * g++.target/i386/pr101180.C: New test.
+
+2021-11-19 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/103217
+ * gcc.dg/analyzer/explode-1.c: Update for improvement to location
+ of leak warning.
+ * gcc.dg/analyzer/pr103217.c: New test.
+ * gcc.dg/analyzer/pr94858-1.c: Add -Wno-analyzer-too-complex.
+
+2021-11-19 Marek Polacek <polacek@redhat.com>
+
+ * g++.dg/cpp0x/lambda/lambda-nested9.C: Adjust dg-error.
+
+2021-11-19 Iain Sandoe <iain@sandoe.co.uk>
+
+ * gcc.dg/torture/fp-int-convert-timode-3.c: Remove XFAIL.
+ * gcc.dg/torture/fp-int-convert-timode-4.c: Likewise.
+
+2021-11-19 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/tree-ssa/modref-dse-6.c: New test.
+
+2021-11-19 Martin Sebor <msebor@redhat.com>
+
+ PR c++/33925
+ PR c/102867
+ * g++.dg/warn/Walways-true-2.C: Adjust to avoid a valid warning.
+ * c-c++-common/Waddress-5.c: New test.
+ * c-c++-common/Waddress-6.c: New test.
+ * g++.dg/warn/Waddress-7.C: New test.
+ * gcc.dg/Walways-true-2.c: Adjust to avoid a valid warning.
+ * gcc.dg/weak/weak-3.c: Expect a warning.
+
+2021-11-19 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr103254.c: New.
+
+2021-11-19 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * gcc.target/s390/20211119.c: New test.
+
+2021-11-19 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/103311
+ PR target/103330
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c: Fix it.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c: Likewise.
+ * lib/target-supports.exp
+ (check_effective_target_vect_complex_add_double): Add Adv. SIMD.
+
+2021-11-19 Giuliano Belinassi <gbelinassi@suse.de>
+
+ * gcc.dg/devnull-dump.c: New.
+
+2021-11-19 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/94376
+ * g++.dg/cpp0x/lambda/lambda-nested9.C: New test.
+
+2021-11-19 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/103314
+ * gcc.c-torture/compile/pr103314-1.c: New test.
+
+2021-11-19 Richard Biener <rguenther@suse.de>
+
+ PR c++/103326
+ * g++.dg/pr103326.C: New testcase.
+
+2021-11-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/70796
+ * g++.dg/cpp1z/eval-order11.C: New test.
+
+2021-11-19 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/103248
+ * gcc.dg/pr103248.c: New testcase.
+
+2021-11-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102436
+ * gcc.dg/torture/20211118-1.c: New testcase.
+ * gcc.dg/tree-ssa/ssa-lim-18.c: Likewise.
+
+2021-11-19 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/103317
+ * gcc.c-torture/compile/pr103317-1.c: New test.
+
+2021-11-19 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/103257
+ * gcc.dg/tree-ssa/vrp116.c: Check optimized instead of vrp1.
+ * gcc.dg/tree-ssa/pr103257-1.c: New test.
+
+2021-11-19 Marek Polacek <polacek@redhat.com>
+
+ PR c++/19808
+ PR c++/96121
+ * g++.dg/warn/Wuninitialized-14.C: New test.
+ * g++.dg/warn/Wuninitialized-15.C: New test.
+ * g++.dg/warn/Wuninitialized-16.C: New test.
+ * g++.dg/warn/Wuninitialized-17.C: New test.
+ * g++.dg/warn/Wuninitialized-18.C: New test.
+ * g++.dg/warn/Wuninitialized-19.C: New test.
+ * g++.dg/warn/Wuninitialized-20.C: New test.
+ * g++.dg/warn/Wuninitialized-21.C: New test.
+ * g++.dg/warn/Wuninitialized-22.C: New test.
+ * g++.dg/warn/Wuninitialized-23.C: New test.
+ * g++.dg/warn/Wuninitialized-24.C: New test.
+ * g++.dg/warn/Wuninitialized-25.C: New test.
+ * g++.dg/warn/Wuninitialized-26.C: New test.
+ * g++.dg/warn/Wuninitialized-27.C: New test.
+ * g++.dg/warn/Wuninitialized-28.C: New test.
+ * g++.dg/warn/Wuninitialized-29.C: New test.
+ * g++.dg/warn/Wuninitialized-30.C: New test.
+
+2021-11-19 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr102543.c: New test.
+
+2021-11-19 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/103198
+ * g++.dg/cpp2a/concepts-this1.C: New test.
+
+2021-11-18 Marek Polacek <polacek@redhat.com>
+
+ PR c++/103049
+ * g++.dg/cpp0x/auto25.C: Adjust dg-error.
+ * g++.dg/cpp0x/auto9.C: Likewise.
+ * g++.dg/cpp2a/concepts-pr84979-2.C: Likewise.
+ * g++.dg/cpp2a/concepts-pr84979-3.C: Likewise.
+ * g++.dg/cpp23/auto-fncast1.C: New test.
+ * g++.dg/cpp23/auto-fncast2.C: New test.
+ * g++.dg/cpp23/auto-fncast3.C: New test.
+ * g++.dg/cpp23/auto-fncast4.C: New test.
+ * g++.dg/cpp23/auto-fncast5.C: New test.
+ * g++.dg/cpp23/auto-fncast6.C: New test.
+
+2021-11-18 Harald Anlauf <anlauf@gmx.de>
+ Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/101329
+ * gfortran.dg/pr101329.f90: New test.
+
+2021-11-18 Patrick Palka <ppalka@redhat.com>
+
+ * g++.dg/cpp2a/fn-template25.C: New test.
+
+2021-11-18 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/lto/semantic-interposition-1_0.c: New test.
+ * gcc.dg/lto/semantic-interposition-1_1.c: New test.
+
+2021-11-18 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/103266
+ * g++.dg/torture/pr103266.C: New test.
+
+2021-11-18 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/103311
+ * gcc.target/aarch64/pr103311.c: New test.
+
+2021-11-18 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/102952
+ * gcc.target/i386/indirect-thunk-cs-prefix-1.c: New test.
+ * gcc.target/i386/indirect-thunk-cs-prefix-2.c: Likewise.
+
+2021-11-18 Jeff Law <jeffreyalaw@gmail.com>
+
+ * gcc.target/mips/octeon-bbit-1.c (f3): Add noipa attribute.
+
+2021-11-18 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99911
+ * g++.dg/cpp2a/fn-template24.C: New test.
+
+2021-11-18 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/102670
+ * g++.dg/cpp2a/concepts-recursive-sat1.C: Adjust to use ADL
+ proper.
+ * g++.dg/cpp2a/fn-template23.C: New test.
+
+2021-11-18 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/103253
+ * gcc.dg/vect/pr103253.c: New test.
+
+2021-11-18 Matthias Kretz <m.kretz@gsi.de>
+
+ * c-c++-common/builtin-assoc-barrier-1.c: New test.
+
+2021-11-18 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/103278
+ * gcc.dg/tree-ssa/if-to-switch-3.c: Supply
+ --param case-values-threshold=4.
+
+2021-11-18 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/103277
+ * gcc.dg/pr103277.c: New testcase.
+
+2021-11-18 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/pr103069-2.c: Adjust.
+
+2021-11-18 konglin1 <lingling.kong@intel.com>
+
+ * gcc.target/i386/avx512fp16-vfcmulcph-1a.c: Add new test for alias.
+ * gcc.target/i386/avx512fp16-vfcmulcsh-1a.c: Likewise.
+ * gcc.target/i386/avx512fp16-vfmulcph-1a.c: Likewise.
+ * gcc.target/i386/avx512fp16-vfmulcsh-1a.c: Likewise.
+ * gcc.target/i386/avx512fp16vl-vfcmulcph-1a.c: Likewise.
+ * gcc.target/i386/avx512fp16vl-vfmulcph-1a.c: Likewise.
+
+2021-11-17 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/103228
+ PR tree-optimization/55177
+ * gcc.dg/tree-ssa/pr103228-1.c: New test.
+ * gcc.dg/tree-ssa/pr55177-1.c: New test.
+
+2021-11-17 David Malcolm <dmalcolm@redhat.com>
+
+ PR preprocessor/103026
+ * c-c++-common/Wbidi-chars-ranges.c: New test.
+
+2021-11-17 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/102759
+ * gcc.dg/Warray-parameter-10.c: New test.
+ * gcc.dg/Wstringop-overflow-82.c: New test.
+
+2021-11-17 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/102952
+ * gcc.target/i386/harden-sls-1.c: New test.
+ * gcc.target/i386/harden-sls-2.c: Likewise.
+ * gcc.target/i386/harden-sls-3.c: Likewise.
+ * gcc.target/i386/harden-sls-4.c: Likewise.
+ * gcc.target/i386/harden-sls-5.c: Likewise.
+
+2021-11-17 Martin Sebor <msebor@redhat.com>
+
+ PR c/101702
+ * gcc.dg/Warray-parameter-11.c: New test.
+
+2021-11-17 Jeff Law <jeffreyalaw@gmail.com>
+
+ * gcc.target/mips/frame-header-1.c (bar): Add noipa attribute.
+ * gcc.target/mips/frame-header-2.c (bar): Likewise.
+
+2021-11-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/103130
+ * c-c++-common/cpp/dir-only-9.c: New test.
+
+2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
+
+ PR c/91038
+ PR c/29970
+ * gcc.dg/vla-stexp-3.c: New test.
+ * gcc.dg/vla-stexp-4.c: New test.
+ * gcc.dg/vla-stexp-5.c: New test.
+ * gcc.dg/vla-stexp-6.c: New test.
+ * gcc.dg/vla-stexp-7.c: New test.
+ * gcc.dg/vla-stexp-8.c: New test.
+ * gcc.dg/vla-stexp-9.c: New test.
+
+2021-11-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/103255
+ * gcc.c-torture/execute/pr103255.c: New test.
+
+2021-11-17 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/cond_fmaxnm_5.c: New test.
+ * gcc.target/aarch64/sve/cond_fmaxnm_5_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fmaxnm_6.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fmaxnm_6_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fmaxnm_7.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fmaxnm_7_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fmaxnm_8.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fmaxnm_8_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fminnm_5.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fminnm_5_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fminnm_6.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fminnm_6_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fminnm_7.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fminnm_7_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fminnm_8.c: Likewise.
+ * gcc.target/aarch64/sve/cond_fminnm_8_run.c: Likewise.
+
+2021-11-17 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/103288
+ * gcc.c-torture/compile/pr103288-1.c: New test.
+
+2021-11-17 Marek Polacek <polacek@redhat.com>
+
+ PR preprocessor/103026
+ * c-c++-common/Wbidi-chars-1.c: New test.
+ * c-c++-common/Wbidi-chars-2.c: New test.
+ * c-c++-common/Wbidi-chars-3.c: New test.
+ * c-c++-common/Wbidi-chars-4.c: New test.
+ * c-c++-common/Wbidi-chars-5.c: New test.
+ * c-c++-common/Wbidi-chars-6.c: New test.
+ * c-c++-common/Wbidi-chars-7.c: New test.
+ * c-c++-common/Wbidi-chars-8.c: New test.
+ * c-c++-common/Wbidi-chars-9.c: New test.
+ * c-c++-common/Wbidi-chars-10.c: New test.
+ * c-c++-common/Wbidi-chars-11.c: New test.
+ * c-c++-common/Wbidi-chars-12.c: New test.
+ * c-c++-common/Wbidi-chars-13.c: New test.
+ * c-c++-common/Wbidi-chars-14.c: New test.
+ * c-c++-common/Wbidi-chars-15.c: New test.
+ * c-c++-common/Wbidi-chars-16.c: New test.
+ * c-c++-common/Wbidi-chars-17.c: New test.
+
+2021-11-17 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/102695
+ * gcc.dg/analyzer/pr102695.c: New test.
+ * gcc.dg/analyzer/strchr-1.c: New test.
+
+2021-11-17 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/102779
+ * gcc.dg/analyzer/capacity-1.c: Add dg-require-effective-target
+ alloca. Use __builtin_alloca rather than alloca.
+ * gcc.dg/analyzer/capacity-3.c: Likewise.
+
+2021-11-16 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/modref-dse-4.c: New test.
+
+2021-11-16 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/103286
+ * gfortran.dg/pr103286.f90: New test.
+
+2021-11-16 Peter Bergner <bergner@linux.ibm.com>
+
+ PR target/102976
+ * gcc.target/powerpc/pr102976.c: New test.
+
+2021-11-16 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/102960
+ * gcc.dg/Wstringop-overflow-84.c: New test.
+
+2021-11-16 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/shrn-combine-10.c: Use shrn.
+
+2021-11-16 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.dg/signbit-2.c: CHeck vect or scalar.
+
+2021-11-16 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/102662
+ * g++.dg/analyzer/pr102662.C: New test.
+
+2021-11-16 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/103218
+ * gcc.dg/tree-ssa/pr103218-1.c: New test.
+
+2021-11-16 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * gcc.target/arc/tmac-4.c: New test.
+
+2021-11-16 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102880
+ * gcc.dg/tree-ssa/pr102880.c: New testcase.
+ * gcc.dg/tree-ssa/pr69270-3.c: Robustify.
+ * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Change the number of
+ expected threadings.
+
+2021-11-16 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102880
+ * gcc.dg/tree-ssa/phi-opt-26.c: New testcase.
+
+2021-11-16 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * gcc.target/arc/add_n-combine.c: Update test patterns.
+ * gcc.target/arc/builtin_eh.c: Update test for linux platforms.
+ * gcc.target/arc/mul64-1.c: Disable this test while running on
+ linux.
+ * gcc.target/arc/tls-gd.c: Update matching patterns.
+ * gcc.target/arc/tls-ie.c: Likewise.
+ * gcc.target/arc/tls-ld.c: Likewise.
+ * gcc.target/arc/uncached-8.c: Likewise.
+
+2021-11-16 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.dg/ipa/ipa-sra-ret-nonull.c: New test.
+
+2021-11-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/103208
+ * c-c++-common/gomp/loop-11.c: New test.
+
+2021-11-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/102009
+ * gcc.dg/pr102009.c: New test.
+
+2021-11-16 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/modref-dse-5.c: New test.
+
+2021-11-16 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/103245
+ * gcc.dg/tree-ssa/pr103245-1.c: New test.
+
+2021-11-16 H.J. Lu <hjl.tools@gmail.com>
+
+ PR middle-end/103268
+ * gcc.dg/pr103268-1.c: New test.
+ * gcc.dg/pr103268-2.c: Likewise.
+
+2021-11-15 Jason Merrill <jason@redhat.com>
+
+ * lib/g++-dg.exp: Handle "impcx".
+ * lib/target-supports.exp
+ (check_effective_target_implicit_constexpr): New.
+ * g++.dg/abi/abi-tag16.C:
+ * g++.dg/abi/abi-tag18a.C:
+ * g++.dg/abi/guard4.C:
+ * g++.dg/abi/lambda-defarg1.C:
+ * g++.dg/abi/mangle26.C:
+ * g++.dg/cpp0x/constexpr-diag3.C:
+ * g++.dg/cpp0x/constexpr-ex1.C:
+ * g++.dg/cpp0x/constexpr-ice5.C:
+ * g++.dg/cpp0x/constexpr-incomplete2.C:
+ * g++.dg/cpp0x/constexpr-memfn1.C:
+ * g++.dg/cpp0x/constexpr-neg3.C:
+ * g++.dg/cpp0x/constexpr-specialization.C:
+ * g++.dg/cpp0x/inh-ctor19.C:
+ * g++.dg/cpp0x/inh-ctor30.C:
+ * g++.dg/cpp0x/lambda/lambda-mangle3.C:
+ * g++.dg/cpp0x/lambda/lambda-mangle5.C:
+ * g++.dg/cpp1y/auto-fn12.C:
+ * g++.dg/cpp1y/constexpr-loop5.C:
+ * g++.dg/cpp1z/constexpr-lambda7.C:
+ * g++.dg/cpp2a/constexpr-dtor3.C:
+ * g++.dg/cpp2a/constexpr-new13.C:
+ * g++.dg/cpp2a/constinit11.C:
+ * g++.dg/cpp2a/constinit12.C:
+ * g++.dg/cpp2a/constinit14.C:
+ * g++.dg/cpp2a/constinit15.C:
+ * g++.dg/cpp2a/spaceship-constexpr1.C:
+ * g++.dg/cpp2a/spaceship-eq3.C:
+ * g++.dg/cpp2a/udlit-class-nttp-neg2.C:
+ * g++.dg/debug/dwarf2/auto1.C:
+ * g++.dg/debug/dwarf2/cdtor-1.C:
+ * g++.dg/debug/dwarf2/lambda1.C:
+ * g++.dg/debug/dwarf2/pr54508.C:
+ * g++.dg/debug/dwarf2/pubnames-2.C:
+ * g++.dg/debug/dwarf2/pubnames-3.C:
+ * g++.dg/ext/is_literal_type3.C:
+ * g++.dg/ext/visibility/template7.C:
+ * g++.dg/gcov/gcov-12.C:
+ * g++.dg/gcov/gcov-2.C:
+ * g++.dg/ipa/devirt-35.C:
+ * g++.dg/ipa/devirt-36.C:
+ * g++.dg/ipa/devirt-37.C:
+ * g++.dg/ipa/devirt-44.C:
+ * g++.dg/ipa/imm-devirt-1.C:
+ * g++.dg/lookup/builtin5.C:
+ * g++.dg/lto/inline-crossmodule-1_0.C:
+ * g++.dg/modules/enum-1_a.C:
+ * g++.dg/modules/fn-inline-1_c.C:
+ * g++.dg/modules/pmf-1_b.C:
+ * g++.dg/modules/used-1_c.C:
+ * g++.dg/tls/thread_local11.C:
+ * g++.dg/tls/thread_local11a.C:
+ * g++.dg/tm/pr46653.C:
+ * g++.dg/ubsan/pr70035.C:
+ * g++.old-deja/g++.other/delete6.C:
+ * g++.dg/modules/pmf-1_a.H:
+ Adjust for implicit constexpr.
+
+2021-11-15 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/ext/flexary37.C: Remove expected error.
+
+2021-11-15 Siddhesh Poyarekar <siddhesh@gotplt.org>
+
+ * gcc.dg/fold-stringops-2.c: Define size_t.
+ (safe1): Adjust.
+ (safe4): New test.
+ * gcc.dg/fold-stringops-3.c: New test.
+
+2021-11-15 Siddhesh Poyarekar <siddhesh@gotplt.org>
+
+ * gcc.dg/Wobjsize-1.c: Make warning change line agnostic.
+ * gcc.dg/fold-stringops-2.c: New test.
+
+2021-11-15 Siddhesh Poyarekar <siddhesh@gotplt.org>
+
+ * gcc.dg/fold-stringops-1.c: New test.
+
+2021-11-15 H.J. Lu <hjl.tools@gmail.com>
+
+ PR middle-end/103184
+ * gcc.dg/pr103184-1.c: New test.
+ * gcc.dg/pr103184-2.c: Likewise.
+
+2021-11-15 Iain Sandoe <iain@sandoe.co.uk>
+
+ * gcc.dg/vect/tsvc/tsvc.h: Use malloc for Darwin 9 and
+ earlier.
+
+2021-11-15 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/pr103207.c: New test.
+
+2021-11-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/100469
+ * g++.dg/opt/pr100469.C: New test.
+
+2021-11-15 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/103205
+ * gcc.target/i386/pr103205-2.c: New test.
+
+2021-11-15 Aldy Hernandez <aldyh@redhat.com>
+
+ * g++.dg/tree-ssa/pr31146-2.C: Add -fno-thread-jumps.
+
+2021-11-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/103237
+ * gcc.dg/torture/pr103237.c: New testcase.
+
+2021-11-15 Hongyu Wang <hongyu.wang@intel.com>
+
+ PR target/103069
+ * gcc.target/i386/pr103069-1.c: New test.
+ * gcc.target/i386/pr103069-2.c: Ditto.
+
+2021-11-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/103219
+ * gcc.dg/torture/pr103219.c: New testcase.
+
+2021-11-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.target/i386/pr101346.c: Require dfp support.
+
+2021-11-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/103205
+ * gcc.target/i386/pr103205.c: New test.
+
+2021-11-15 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/lambda/lambda-switch.C: Adjust expected location.
+
+2021-11-15 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp1y/constexpr-89285-2.C: Expect error.
+ * g++.dg/cpp1y/constexpr-89285.C: Adjust error.
+
+2021-11-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/70690
+ * g++.dg/init/array41a.C: New test.
+
+2021-11-15 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp2a/constexpr-virtual20.C: New test.
+
+2021-11-15 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.dg/uninit-pred-9_b.c: Correct last adjustment, for CRIS.
+
+2021-11-15 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.dg/tree-ssa/pr100278.c: Move to ...
+ * gcc.c-torture/compile/pr100278.c: Here.
+ Remove dg-do and dg-options.
+ * gcc.dg/tree-ssa/pr101189.c: Move to ...
+ * gcc.c-torture/compile/pr101189.c: Here.
+ Remove dg-do and dg-options.
+ * gcc.dg/tree-ssa/pr100453.c: Move to ...
+ * gcc.c-torture/execute/pr100453.c: Here.
+ Remove dg-do and dg-options.
+ * gcc.dg/tree-ssa/pr101335.c: Move to ...
+ * gcc.c-torture/execute/pr101335.c: Here
+ Remove dg-do and dg-options.
+
+2021-11-14 Maciej W. Rozycki <macro@embecosm.com>
+
+ * gcc.target/vax/setmem.c: New test.
+
+2021-11-14 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/tree-ssa/modref-dse-3.c: New test.
+
+2021-11-14 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/pr103229.c: Removed.
+
+2021-11-14 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/pr103229.c: New test.
+
+2021-11-14 Martin Liska <mliska@suse.cz>
+
+ * c-c++-common/tsan/free_race.c: Remove unnecessary -ldl.
+ * c-c++-common/tsan/free_race2.c: Likewise.
+
+2021-11-14 Jan Hubicka <hubicka@ucw.cz>
+
+ * c-c++-common/asan/null-deref-1.c: Update template.
+ * c-c++-common/tsan/free_race.c: Update template.
+ * c-c++-common/tsan/free_race2.c: Update template.
+ * gcc.dg/ipa/ipa-sra-4.c: Update template.
+
+2021-11-13 Jan Hubicka <hubicka@ucw.cz>
+
+ * g++.dg/cpp1z/inh-ctor23.C: Fix template
+ * g++.dg/ipa/ipa-icf-4.C: Fix template
+ * gcc.dg/tree-ssa/modref-dse-1.c: New test.
+ * gcc.dg/tree-ssa/modref-dse-2.c: New test.
+
+2021-11-13 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/pr93382.c: Tweak expected wording.
+ * gcc.dg/analyzer/taint-alloc-1.c: New test.
+ * gcc.dg/analyzer/taint-alloc-2.c: New test.
+ * gcc.dg/analyzer/taint-divisor-1.c: New test.
+ * gcc.dg/analyzer/taint-1.c: Rename to...
+ * gcc.dg/analyzer/taint-read-index-1.c: ...this. Tweak expected
+ wording. Mark some events as xfail.
+ * gcc.dg/analyzer/taint-read-offset-1.c: New test.
+ * gcc.dg/analyzer/taint-size-1.c: New test.
+ * gcc.dg/analyzer/taint-write-index-1.c: New test.
+ * gcc.dg/analyzer/taint-write-offset-1.c: New test.
+
+2021-11-13 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/pr103222.c: New test.
+
+2021-11-12 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/103209
+ * gcc.dg/tree-ssa/pta-callused.c: Update template.
+ * gcc.c-torture/execute/pr103209.c: New test.
+
+2021-11-12 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/stp_1.c: New test.
+
+2021-11-12 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/unexpected-end.f90: Update dg-error.
+ * gfortran.dg/gomp/clauses-1.f90: New test.
+ * gfortran.dg/gomp/nowait-2.f90: New test.
+ * gfortran.dg/gomp/nowait-3.f90: New test.
+
+2021-11-12 Martin Liska <mliska@suse.cz>
+
+ PR testsuite/103051
+ * gcc.dg/vect/tsvc/vect-tsvc-s112.c: Skip test for old Power
+ CPUs.
+
+2021-11-12 Chung-Lin Tang <cltang@codesourcery.com>
+
+ * c-c++-common/gomp/target-implicit-map-1.c: New test.
+ * c-c++-common/goacc/combined-reduction.c: Adjust scan test pattern.
+ * c-c++-common/goacc/firstprivate-mappings-1.c: Likewise.
+ * c-c++-common/goacc/mdc-1.c: Likewise.
+ * g++.dg/goacc/firstprivate-mappings-1.C: Likewise.
+
+2021-11-12 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/97896
+ * gfortran.dg/index_5.f90: New.
+
+2021-11-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/103204
+ * gcc.dg/torture/pr103204.c: New testcase.
+
+2021-11-11 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ * gcc.target/powerpc/test_mffsl.c: Require Power9.
+
+2021-11-11 Jan Hubicka <hubicka@ucw.cz>
+
+ * gfortran.dg/inline_matmul_17.f90: Fix template
+
+2021-11-11 Jan Hubicka <hubicka@ucw.cz>
+
+ * c-c++-common/tm/inline-asm.c: Disable pure-const.
+ * g++.dg/ipa/modref-1.C: Update template.
+ * gcc.dg/tree-ssa/modref-11.c: Disable pure-const.
+ * gcc.dg/tree-ssa/modref-14.c: New test.
+ * gcc.dg/tree-ssa/modref-8.c: Do not optimize sibling calls.
+ * gfortran.dg/do_subscript_3.f90: Add -O0.
+
+2021-11-11 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/num-teams-1.f90: New file.
+ * gfortran.dg/gomp/num-teams-2.f90: New file.
+
+2021-11-11 Sandra Loosemore <sandra@codesourcery.com>
+
+ * g++.dg/warn/Wmismatched-new-delete-5.C: Add
+ -fdelete-null-pointer-checks.
+ * gcc.dg/attr-returns-nonnull.c: Likewise.
+ * gcc.dg/debug/btf/btf-datasec-1.c: Add -G0 option for nios2.
+ * gcc.dg/ifcvt-4.c: Skip on nios2.
+ * gcc.dg/struct-by-value-1.c: Add -G0 option for nios2.
+
+2021-11-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/103188
+ * gcc.dg/torture/pr103188.c: New testcase.
+
+2021-11-11 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/103181
+ * gcc.dg/torture/pr103181.c: New testcase.
+
+2021-11-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/101378
+ * g++.dg/debug/dwarf2/pr101378.C: New test.
+
+2021-11-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR target/102376
+ * gcc.target/aarch64/pr102376.c: New test.
+
+2021-11-11 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/clauses-1.c (bar): Supply lower-bound expression
+ to half of the num_teams clauses.
+ * c-c++-common/gomp/num-teams-1.c: New test.
+ * c-c++-common/gomp/num-teams-2.c: New test.
+ * g++.dg/gomp/attrs-1.C (bar): Supply lower-bound expression
+ to half of the num_teams clauses.
+ * g++.dg/gomp/attrs-2.C (bar): Likewise.
+ * g++.dg/gomp/num-teams-1.C: New test.
+ * g++.dg/gomp/num-teams-2.C: New test.
+
+2021-11-11 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr103151.c: New test.
+
+2021-11-10 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/tree-ssa/pr102906.c: New test.
+
+2021-11-10 Andrew Pinski <apinski@marvell.com>
+
+ PR target/103170
+ * gcc.c-torture/compile/vector-dup-1.c: New test.
+
+2021-11-10 H.J. Lu <hjl.tools@gmail.com>
+
+ PR tree-optimization/102892
+ * gcc.dg/pr102892-1.c: New file.
+ * gcc.dg/pr102892-2.c: Likewise.
+
+2021-11-10 Martin Sebor <msebor@redhat.com>
+
+ PR testsuite/103161
+ * gcc.dg/tree-ssa/builtin-sprintf-warn-16.c: Avoid relying on
+ argument evaluation order. Cast width and precision to signed
+ to avoid undefined behavior.
+
+2021-11-10 qing zhao <qing.zhao@oracle.com>
+
+ * gcc.target/i386/auto-init-6.c: _Complex long double is initialized
+ to zero now with -ftrivial-auto-var-init=pattern.
+
+2021-11-10 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/sve/pred-not-gen-1.c: Update testcase.
+ * gcc.target/aarch64/sve/pred-not-gen-2.c: Update testcase.
+ * gcc.target/aarch64/sve/pred-not-gen-3.c: Update testcase.
+ * gcc.target/aarch64/sve/pred-not-gen-4.c: Update testcase.
+
+2021-11-10 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/shrn-combine-8.c: Update.
+ * gcc.target/aarch64/shrn-combine-9.c: Update.
+
+2021-11-10 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/tree-ssa/modref-13.c: Fix typo.
+
+2021-11-10 Marek Polacek <polacek@redhat.com>
+
+ PR c++/101940
+ * c-c++-common/Wno-attributes-1.c: New test.
+ * c-c++-common/Wno-attributes-2.c: New test.
+ * c-c++-common/Wno-attributes-3.c: New test.
+
+2021-11-10 Jan Hubicka <jh@suse.cz>
+
+ * g++.dg/ipa/modref-1.C: Update template.
+ * gcc.dg/ipa/modref-3.c: Update template.
+ * gcc.dg/lto/modref-3_0.c: Update template.
+ * gcc.dg/lto/modref-4_0.c: Update template.
+ * gcc.dg/tree-ssa/modref-10.c: Update template.
+ * gcc.dg/tree-ssa/modref-11.c: Update template.
+ * gcc.dg/tree-ssa/modref-5.c: Update template.
+ * gcc.dg/tree-ssa/modref-6.c: Update template.
+ * gcc.dg/tree-ssa/modref-13.c: New test.
+
+2021-11-10 Tamar Christina <tamar.christina@arm.com>
+
+ PR testsuite/103042
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c: Use
+ vect_long_long instead of vect_long.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c:
+ Likewise.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-long.c: Likewise.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c:
+ Likewise.
+
+2021-11-10 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.dg/signbit-2.c: Turn off masks.
+ * gcc.dg/signbit-5.c: Likewise.
+
+2021-11-10 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/102690
+ * g++.dg/warn/Warray-bounds-16.C: XFAIL diagnostic part
+ and optimization.
+
+2021-11-10 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ * gcc.target/aarch64/simd/lowering_tbaa.c: New test.
+
+2021-11-10 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ * gcc.target/aarch64/fmla_intrinsic_1.c: Fix big-endian testism.
+ * gcc.target/aarch64/fmls_intrinsic_1.c: Likewise.
+ * gcc.target/aarch64/fmul_intrinsic_1.c: Likewise.
+
+2021-11-10 H.J. Lu <hongjiu.lu@intel.com>
+ Hongtao Liu <hongtao.liu@intel.com>
+
+ PR middle-end/102566
+ * g++.target/i386/pr102566-1.C: New test.
+ * g++.target/i386/pr102566-2.C: Likewise.
+ * g++.target/i386/pr102566-3.C: Likewise.
+ * g++.target/i386/pr102566-4.C: Likewise.
+ * g++.target/i386/pr102566-5a.C: Likewise.
+ * g++.target/i386/pr102566-5b.C: Likewise.
+ * g++.target/i386/pr102566-6a.C: Likewise.
+ * g++.target/i386/pr102566-6b.C: Likewise.
+ * gcc.target/i386/pr102566-1a.c: Likewise.
+ * gcc.target/i386/pr102566-1b.c: Likewise.
+ * gcc.target/i386/pr102566-2.c: Likewise.
+ * gcc.target/i386/pr102566-3a.c: Likewise.
+ * gcc.target/i386/pr102566-3b.c: Likewise.
+ * gcc.target/i386/pr102566-4.c: Likewise.
+ * gcc.target/i386/pr102566-5.c: Likewise.
+ * gcc.target/i386/pr102566-6.c: Likewise.
+ * gcc.target/i386/pr102566-7.c: Likewise.
+ * gcc.target/i386/pr102566-8a.c: Likewise.
+ * gcc.target/i386/pr102566-8b.c: Likewise.
+ * gcc.target/i386/pr102566-9a.c: Likewise.
+ * gcc.target/i386/pr102566-9b.c: Likewise.
+ * gcc.target/i386/pr102566-10a.c: Likewise.
+ * gcc.target/i386/pr102566-10b.c: Likewise.
+ * gcc.target/i386/pr102566-11.c: Likewise.
+ * gcc.target/i386/pr102566-12.c: Likewise.
+ * gcc.target/i386/pr102566-13.c: New test.
+ * gcc.target/i386/pr102566-14.c: New test.
+
+2021-11-10 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/ifcvt-reduction-logic-op.c: New test.
+
+2021-11-10 konglin1 <lingling.kong@intel.com>
+
+ * gcc.target/i386/avx512fp16-vector-complex-float.c: New test.
+
+2021-11-10 konglin1 <lingling.kong@intel.com>
+
+ * gcc.target/i386/avx512fp16vl-complex-broadcast-1.c: New test.
+
+2021-11-10 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr102464-maxmin.c: New test.
+
+2021-11-10 Andrew Pinski <apinski@marvell.com>
+
+ PR target/101529
+ * c-c++-common/torture/builtin-convertvector-2.c: New test.
+ * c-c++-common/torture/builtin-shufflevector-2.c: New test.
+
+2021-11-10 Sandra Loosemore <sandra@codesourcery.com>
+
+ * gcc.target/nios2/custom-fp-inline-1.c: New.
+ * gcc.target/nios2/custom-fp-inline-2.c: New.
+ * gcc.target/nios2/custom-fp-inline-3.c: New.
+ * gcc.target/nios2/custom-fp-inline-4.c: New.
+
+2021-11-09 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/bad-pragma-locations.c: New test.
+
+2021-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ * gcc.target/powerpc/p10_vec_xl_sext.c: Fix long long case.
+
+2021-11-09 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/10352
+ * gcc.c-torture/execute/pr10352-1.c: New test.
+
+2021-11-09 Marek Polacek <polacek@redhat.com>
+
+ * g++.dg/init/bitfield6.C: New test.
+
+2021-11-09 Kito Cheng <kito.cheng@sifive.com>
+
+ * gcc.target/riscv/pr102957.c: New.
+
+2021-11-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/103114
+ * g++.dg/ext/complex10.C: New test.
+
+2021-11-09 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/98394
+ PR c++/85846
+ * g++.dg/cpp2a/concepts-pr98394.C: New test.
+ * g++.dg/cpp2a/concepts-pr85846.C: New test.
+
+2021-11-09 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100652
+ * g++.dg/cpp1y/var-templ69.C: New test.
+
+2021-11-09 Przemyslaw Wirkus <przemyslaw.wirkus@arm.com>
+
+ * gcc.target/arm/multilib.exp: Update test with armv9-a entries.
+ * lib/target-supports.exp (v9a): Add new armflag.
+ (__ARM_ARCH_9A__): Add new armdef.
+
+2021-11-09 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/103132
+ * gcc.dg/ipa/pr103132.c: New test.
+
+2021-11-09 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/tree-ssa/builtin-sprintf-warn-22.c: XFAIL.
+
+2021-11-09 Jeff Law <jeffreyalaw@gmail.com>
+
+ * gcc.dg/tree-ssa/bittest.c: New test
+
+2021-11-08 Andrew MacLeod <amacleod@redhat.com>
+
+ * g++.dg/pr103122.C: New.
+
+2021-11-08 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/103099
+ PR ipa/103107
+ * g++.dg/ipa/pr103099.C: New test.
+ * gcc.dg/ipa/pr103107.c: Likewise.
+
+2021-11-08 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/pr103120.c: New test.
+
+2021-11-08 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/100520
+ * gcc.dg/pr100520.c: New test.
+
+2021-11-08 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/neoverse_v1_1.c: New test.
+
+2021-11-08 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/tree-ssa/modref-12.c: New test.
+
+2021-11-08 Haochen Gui <guihaoc@gcc.gnu.org>
+
+ * gcc.target/powerpc/vec-minmax-1.c: New test.
+ * gcc.target/powerpc/vec-minmax-2.c: Likewise.
+
+2021-11-08 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr102464-fma.c: New test.
+
+2021-11-07 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ * gfortran.dg/co_reduce_2.f90: New test.
+ * gfortran.dg/coarray_collectives_14.f90: Change OPERATOR
+ to OPERATION.
+ * gfortran.dg/coarray_collectives_16.f90: Likewise.
+ * gfortran.dg/coarray_collectives_9.f90: Likewise.
+ Co-authored by: Steve Kargl <steve@gcc.gnu.org>
+
+2021-11-07 Sandra Loosemore <sandra@codesourcery.com>
+
+ * gfortran.dg/bessel_3.f90: Expect additional diagnostics from
+ multiple bad arguments in the call.
+ * gfortran.dg/pr24823.f: Likewise.
+ * gfortran.dg/pr39937.f: Likewise.
+ * gfortran.dg/pr41011.f: Likewise.
+ * gfortran.dg/pr61318.f90: Likewise.
+ * gfortran.dg/c-interop/c407b-2.f90: Remove xfails.
+ * gfortran.dg/c-interop/c535b-2.f90: Likewise.
+
+2021-11-06 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102715
+ * gfortran.dg/pr68019.f90: Adjust error message.
+ * gfortran.dg/pr102715.f90: New test.
+
+2021-11-06 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.dg/vect/tsvc/tsvc.h (init): Use posix_memalign on AIX.
+
+2021-11-05 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102817
+ * gfortran.dg/pr102817.f90: New test.
+
+2021-11-05 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/103073
+ * g++.dg/torture/pr103073.C: New test.
+ * gcc.dg/tree-ssa/modref-11.c: New test.
+
+2021-11-05 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/69419
+ * gfortran.dg/pr69419.f90: New test.
+
+2021-11-05 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
+
+ PR fortran/100972
+ * gfortran.dg/implicit_14.f90: Adjust error.
+ * gfortran.dg/external_implicit_none_3.f08: New test.
+
+2021-11-05 Iain Sandoe <iain@sandoe.co.uk>
+
+ * gcc.dg/vect/tsvc/tsvc.h: Do not try to include malloc.h
+ on Darwin also use posix_memalign ().
+
+2021-11-05 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr103093.c: New.
+
+2021-11-05 Wilco Dijkstra <wdijkstr@arm.com>
+
+ PR target/103085
+ PR target/103085
+ * gcc.target/aarch64/pr103085.c: New test
+
+2021-11-05 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/102945
+ * gcc.dg/gcov-info-to-gcda.c: Filter supported targets.
+
+2021-11-05 Martin Liska <mliska@suse.cz>
+
+ PR debug/102955
+ * g++.dg/pr102955.C: New test.
+
+2021-11-04 Jonathan Wakely <jwakely@redhat.com>
+
+ * g++.dg/cpp0x/lambda/lambda-eh2.C: Add dg-warning for new
+ deprecation warnings.
+ * g++.dg/cpp0x/noexcept06.C: Likewise.
+ * g++.dg/cpp0x/noexcept07.C: Likewise.
+ * g++.dg/eh/forced3.C: Likewise.
+ * g++.dg/eh/unexpected1.C: Likewise.
+ * g++.old-deja/g++.eh/spec1.C: Likewise.
+ * g++.old-deja/g++.eh/spec2.C: Likewise.
+ * g++.old-deja/g++.eh/spec3.C: Likewise.
+ * g++.old-deja/g++.eh/spec4.C: Likewise.
+ * g++.old-deja/g++.mike/eh33.C: Likewise.
+ * g++.old-deja/g++.mike/eh34.C: Likewise.
+ * g++.old-deja/g++.mike/eh50.C: Likewise.
+ * g++.old-deja/g++.mike/eh51.C: Likewise.
+
+2021-11-04 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/vshl-opt-1.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vshl-opt-2.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vshl-opt-3.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vshl-opt-4.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vshl-opt-5.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vshl-opt-6.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vshl-opt-7.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vshl-opt-8.c: New test.
+ * gcc.target/aarch64/signbit-2.c: New test.
+
+2021-11-04 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.dg/signbit-2.c: New test.
+ * gcc.dg/signbit-3.c: New test.
+ * gcc.dg/signbit-4.c: New test.
+ * gcc.dg/signbit-5.c: New test.
+ * gcc.dg/signbit-6.c: New test.
+ * gcc.target/aarch64/signbit-1.c: New test.
+
+2021-11-04 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/103079
+ * gcc.dg/pr103079.c: New.
+
+2021-11-04 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/93385
+ * gcc.dg/guality/ipa-sra-1.c: New test.
+
+2021-11-04 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: New code
+ generation tests.
+
+2021-11-04 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/bf16_vldN_lane_2.c:
+ Relax incorrect register number requirement.
+ * gcc.target/aarch64/sve/pcs/struct_3_256.c: Accept
+ equivalent codegen with fmov.
+
+2021-11-04 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/amxtile-3.c: Check leal/addl for x32.
+
+2021-11-04 Tamar Christina <tamar.christina@arm.com>
+
+ PR testsuite/103042
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-int.c: Update guards.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c: Likewise.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-short.c: Likewise.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-int.c:
+ Likewise.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c:
+ Likewise.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-short.c:
+ Likewise.
+ * gcc.dg/vect/complex/complex-add-pattern-template.c: Likewise.
+ * gcc.dg/vect/complex/complex-add-template.c: Likewise.
+ * gcc.dg/vect/complex/complex-operations-run.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-half-float.c:
+ Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-double.c:
+ Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c:
+ Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c:
+ Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c:
+ Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c:
+ Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c:
+ Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-add-double.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-add-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-add-half-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c:
+ Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-mla-double.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-mla-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-mla-half-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-mls-double.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-mls-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-mls-half-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-mul-double.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-mul-float.c: Likewise.
+ * gcc.dg/vect/complex/fast-math-complex-mul-half-float.c: Likewise.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-byte.c: Likewise.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-int.c: Likewise.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-long.c: Likewise.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-short.c: Likewise.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-byte.c:
+ Likewise.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-int.c:
+ Likewise.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c:
+ Likewise.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-short.c:
+ Likewise.
+
+2021-11-04 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/103075
+ * gcc.dg/pr103075.c: New testcase.
+
+2021-11-04 Aldy Hernandez <aldyh@redhat.com>
+
+ PR tree-optimization/103062
+ * gcc.dg/pr103062.c: New test.
+
+2021-11-04 Jiufu Guo <guojiufu@linux.ibm.com>
+
+ * gcc.dg/vect/pr101145_1.c: Update case.
+ * gcc.dg/vect/pr101145_2.c: Update case.
+ * gcc.dg/vect/pr101145_3.c: Update case.
+
+2021-11-04 Martin Liska <mliska@suse.cz>
+
+ * g++.dg/asan/asan_test.C: Disable one warning.
+
+2021-11-04 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/rtl/aarch64/big-endian-cse-1.c: New test.
+
+2021-11-04 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr101989-3.c: New test.
+
+2021-11-04 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr102464-copysign-1.c: New test.
+
+2021-11-04 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/vnni-auto-vectorize-1.c: New test.
+ * gcc.target/i386/vnni-auto-vectorize-2.c: Ditto.
+
+2021-11-04 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/amxtile-3.c: New test.
+
+2021-11-04 Marek Polacek <polacek@redhat.com>
+
+ * g++.dg/opt/pr102970.C: Only run in C++14 and up.
+
+2021-11-03 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/103031
+ * gcc.dg/init-rounding-math-1.c: New test.
+
+2021-11-03 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/tree-ssa/pr23744.c: Tweak output checks.
+ * gcc.dg/tree-ssa/vrp07.c: Ditto.
+ * gcc.dg/tree-ssa/vrp08.c: Ditto.
+ * gcc.dg/tree-ssa/vrp09.c: Ditto.
+ * gcc.dg/tree-ssa/vrp20.c: Ditto.
+ * gcc.dg/tree-ssa/vrp92.c: Ditto.
+ * jit.dg/test-sum-of-squares.c: Ditto.
+
+2021-11-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102970
+ * g++.dg/opt/pr102970.C: New testcase.
+
+2021-11-03 Jan Hubicka <hubicka@ucw.cz>
+
+ * g++.dg/torture/pr103040.C: New test.
+
+2021-11-02 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/ipa/modref-3.c: New test.
+
+2021-11-02 Jan Hubicka <hubicka@ucw.cz>
+
+ * g++.dg/ipa/modref-1.C: Update template.
+ * gcc.dg/tree-ssa/modref-10.c: New test.
+
+2021-11-02 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * gcc.dg/tree-ssa/ldist-rawmemchr-1.c: For IBM Z set arch to z13
+ and use z/Architecture since the tests require vector extensions.
+ * gcc.dg/tree-ssa/ldist-rawmemchr-2.c: Likewise.
+ * gcc.dg/tree-ssa/ldist-strlen-1.c: Likewise.
+ * gcc.dg/tree-ssa/ldist-strlen-3.c: Likewise.
+
+2021-11-02 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/103007
+ * g++.dg/pr103007.C: New test.
+
+2021-11-02 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/103038
+ * g++.dg/pr103038.C: New testcase.
+
+2021-11-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/103020
+ * gcc.target/i386/pr103020.c: New test.
+
+2021-11-02 Martin Liska <mliska@suse.cz>
+
+ * gcc.dg/vect/vect.exp: Include also tsvc sub-directory.
+ * gcc.dg/vect/tsvc/license.txt: New test.
+ * gcc.dg/vect/tsvc/tsvc.h: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s000.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s111.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1111.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1112.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1113.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1115.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1119.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s112.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s113.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s114.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s115.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s116.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1161.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s118.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s119.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s121.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1213.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s122.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1221.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s123.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1232.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s124.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1244.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s125.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1251.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s126.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s127.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1279.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s128.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1281.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s131.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s13110.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s132.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1351.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s141.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s1421.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s151.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s152.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s161.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s162.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s171.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s172.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s173.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s174.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s175.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s176.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s2101.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s2102.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s211.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s2111.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s212.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s221.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s222.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s2233.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s2244.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s2251.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s2275.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s231.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s232.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s233.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s235.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s241.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s242.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s243.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s244.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s251.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s252.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s253.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s254.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s255.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s256.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s257.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s258.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s261.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s271.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s2710.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s2711.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s2712.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s272.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s273.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s274.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s275.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s276.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s277.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s278.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s279.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s281.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s291.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s292.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s293.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s311.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s3110.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s3111.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s31111.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s3112.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s3113.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s312.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s313.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s314.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s315.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s316.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s317.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s318.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s319.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s321.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s322.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s323.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s3251.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s331.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s332.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s341.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s342.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s343.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s351.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s352.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s353.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s4112.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s4113.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s4114.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s4115.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s4116.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s4117.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s4121.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s421.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s422.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s423.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s424.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s431.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s441.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s442.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s443.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s451.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s452.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s453.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s471.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s481.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s482.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-s491.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-va.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-vag.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-vas.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-vbor.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-vdotr.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-vif.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-vpv.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-vpvpv.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-vpvts.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-vpvtv.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-vsumr.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-vtv.c: New test.
+ * gcc.dg/vect/tsvc/vect-tsvc-vtvtv.c: New test.
+
+2021-11-02 liuhongt <hongtao.liu@intel.com>
+
+ PR testsuite/102944
+ * c-c++-common/Wstringop-overflow-2.c: Adjust target/xfail
+ selector.
+ * gcc.dg/Warray-bounds-48.c: Ditto.
+ * gcc.dg/Warray-bounds-51.c: Ditto.
+ * gcc.dg/Warray-parameter-3.c: Ditto.
+ * gcc.dg/Wstringop-overflow-14.c: Ditto.
+ * gcc.dg/Wstringop-overflow-21.c: Ditto.
+ * gcc.dg/Wstringop-overflow-68.c: Ditto
+ * gcc.dg/Wstringop-overflow-76.c: Ditto
+ * gcc.dg/Wzero-length-array-bounds-2.c: Ditto.
+ * lib/target-supports.exp (vect_slp_v4qi_store_unalign): New
+ efficient target.
+ (vect_slp_v4qi_store_unalign_1): Ditto.
+ (struct_4char_block_move): Ditto.
+ (struct_8char_block_move): Ditto.
+ (stryct_16char_block_move): Ditto.
+ (vect_slp_v2hi_store_align): Ditto.
+ (vect_slp_v2qi_store): Rename to ..
+ (vect_slp_v2qi_store_align): .. this.
+ (vect_slp_v4qi_store): Rename to ..
+ (vect_slp_v4qi_store_align): .. This.
+ (vect_slp_v8qi_store): Rename to ..
+ (vect_slp_v8qi_store_unalign_1): .. This.
+ (vect_slp_v16qi_store): Rename to ..
+ (vect_slp_v16qi_store_unalign_1): .. This.
+ (vect_slp_v2hi_store): Rename to ..
+ (vect_slp_v2hi_store_unalign): .. This.
+ (vect_slp_v4hi_store): Rename to ..
+ (vect_slp_v4hi_store_unalign): This.
+ (vect_slp_v2si_store): Rename to ..
+ (vect_slp_v2si_store_align): .. This.
+ (vect_slp_v4si_store): Rename to ..
+ (vect_slp_v4si_store_unalign): Ditto.
+ (check_vect_slp_aligned_store_usage): Rename to ..
+ (check_vect_slp_store_usage): .. this and adjust code to make
+ it an exact pattern match of corresponding testcase.
+
+2021-11-02 Roger Sayle <roger@nextmovesoftware.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR target/102986
+ * gcc.target/i386/sse2-v1ti-ashiftrt-1.c: New test case.
+ * gcc.target/i386/sse2-v1ti-ashiftrt-2.c: New test case.
+ * gcc.target/i386/sse2-v1ti-ashiftrt-3.c: New test case.
+ * gcc.target/i386/sse2-v1ti-shift-2.c: New test case.
+ * gcc.target/i386/sse2-v1ti-shift-3.c: New test case.
+
+2021-11-02 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/gomp/loop-8.C: New test.
+
+2021-11-01 Martin Liska <mliska@suse.cz>
+
+ * g++.dg/ipa/modref-1.C: Fix test-suite pattern scanning.
+
+2021-11-01 qing zhao <qing.zhao@oracle.com>
+
+ * c-c++-common/pr102281.c: New test.
+ * gcc.target/i386/auto-init-2.c: Adjust testing case.
+ * gcc.target/i386/auto-init-4.c: Likewise.
+ * gcc.target/i386/auto-init-6.c: Likewise.
+ * gcc.target/aarch64/auto-init-6.c: Likewise.
+
+2021-11-01 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/vect-cse-codegen.c: New test.
+
+2021-11-01 Tamar Christina <tamar.christina@arm.com>
+
+ PR testsuite/103000
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c:
+ Force unroll.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c: likewise
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c:
+ Likewise
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c:
+ Likewise.
+
+2021-11-01 David Malcolm <dmalcolm@redhat.com>
+
+ * c-c++-common/diagnostic-format-json-1.c: Add regexp to consume
+ "escape-source" attribute.
+ * c-c++-common/diagnostic-format-json-2.c: Likewise.
+ * c-c++-common/diagnostic-format-json-3.c: Likewise.
+ * c-c++-common/diagnostic-format-json-4.c: Likewise, twice.
+ * c-c++-common/diagnostic-format-json-5.c: Likewise.
+ * gcc.dg/cpp/warn-normalized-4-bytes.c: New test.
+ * gcc.dg/cpp/warn-normalized-4-unicode.c: New test.
+ * gcc.dg/encoding-issues-bytes.c: New test.
+ * gcc.dg/encoding-issues-unicode.c: New test.
+ * gfortran.dg/diagnostic-format-json-1.F90: Add regexp to consume
+ "escape-source" attribute.
+ * gfortran.dg/diagnostic-format-json-2.F90: Likewise.
+ * gfortran.dg/diagnostic-format-json-3.F90: Likewise.
+
+2021-11-01 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr103003.c: New.
+
+2021-10-31 Jan Hubicka <hubicka@ucw.cz>
+
+ * g++.dg/ipa/modref-1.C: New test.
+
+2021-10-31 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/102959
+ * gdc.dg/torture/pr96435.d: Adjust for BigEndian.
+
+2021-10-30 Tobias Burnus <tobias@codesourcery.com>
+
+ PR middle-end/102972
+ * c-c++-common/gomp/target-device-ancestor-3.c: Add non-API
+ routine test.
+ * gfortran.dg/gomp/order-6.f90: Add missing bind(C).
+ * c-c++-common/gomp/teams-3.c: New test.
+ * gfortran.dg/gomp/teams-3.f90: New test.
+ * gfortran.dg/gomp/teams-4.f90: New test.
+
+2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
+
+ * gfortran.dg/intrinsic_short-long.f90: New test.
+
+2021-10-30 Steve Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/99853
+ * gfortran.dg/pr99853.f90: New test.
+
+2021-10-30 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/loop-10.c: New test.
+
+2021-10-29 Tamar Christina <tamar.christina@arm.com>
+
+ * g++.dg/vect/pr99149.cc: Update case.
+
+2021-10-29 Tobias Burnus <tobias@codesourcery.com>
+
+ * c-c++-common/gomp/pragma-1.c: New test.
+ * c-c++-common/gomp/pragma-2.c: New test.
+
+2021-10-29 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/loop-unswitch-2.c: Adjust for threading changes.
+ * gcc.dg/old-style-asm-1.c: Same.
+ * gcc.dg/tree-ssa/phi_on_compare-1.c: Same.
+ * gcc.dg/tree-ssa/phi_on_compare-2.c: Same.
+ * gcc.dg/tree-ssa/phi_on_compare-3.c: Same.
+ * gcc.dg/tree-ssa/phi_on_compare-4.c: Same.
+ * gcc.dg/tree-ssa/pr20701.c: Same.
+ * gcc.dg/tree-ssa/pr21001.c: Same.
+ * gcc.dg/tree-ssa/pr21294.c: Same.
+ * gcc.dg/tree-ssa/pr21417.c: Same.
+ * gcc.dg/tree-ssa/pr21559.c: Same.
+ * gcc.dg/tree-ssa/pr21563.c: Same.
+ * gcc.dg/tree-ssa/pr49039.c: Same.
+ * gcc.dg/tree-ssa/pr59597.c: Same.
+ * gcc.dg/tree-ssa/pr61839_1.c: Same.
+ * gcc.dg/tree-ssa/pr61839_3.c: Same.
+ * gcc.dg/tree-ssa/pr66752-3.c: Same.
+ * gcc.dg/tree-ssa/pr68198.c: Same.
+ * gcc.dg/tree-ssa/pr77445-2.c: Same.
+ * gcc.dg/tree-ssa/pr77445.c: Same.
+ * gcc.dg/tree-ssa/ranger-threader-1.c: Same.
+ * gcc.dg/tree-ssa/ranger-threader-2.c: Same.
+ * gcc.dg/tree-ssa/ranger-threader-4.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-1.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-11.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-12.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-14.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-16.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-2b.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same.
+ * gcc.dg/tree-ssa/ssa-thread-14.c: Same.
+ * gcc.dg/tree-ssa/ssa-thread-backedge.c: Same.
+ * gcc.dg/tree-ssa/ssa-vrp-thread-1.c: Same.
+ * gcc.dg/tree-ssa/vrp02.c: Same.
+ * gcc.dg/tree-ssa/vrp03.c: Same.
+ * gcc.dg/tree-ssa/vrp05.c: Same.
+ * gcc.dg/tree-ssa/vrp06.c: Same.
+ * gcc.dg/tree-ssa/vrp07.c: Same.
+ * gcc.dg/tree-ssa/vrp08.c: Same.
+ * gcc.dg/tree-ssa/vrp09.c: Same.
+ * gcc.dg/tree-ssa/vrp33.c: Same.
+ * gcc.dg/uninit-pred-9_b.c: Same.
+ * gcc.dg/uninit-pred-7_a.c: xfail.
+
+2021-10-29 Jeff Law <jeffreyalaw@gmail.com>
+
+ * lib/multiline.exp (_build_multiline_regex): Use a better
+ regexp than .* to match up to EOL.
+
+2021-10-29 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr102983.c: New.
+
+2021-10-29 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/102977
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-int.c: Updated.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c: Updated.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-short.c: Updated.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-int.c:
+ Updated.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c:
+ Updated.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-short.c:
+ Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c:
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c: Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-half-float.c:
+ Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-double.c:
+ Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c:
+ Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c:
+ Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c:
+ Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c: Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c:
+ Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c:
+ Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c: Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c:
+ Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c: Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c: Updated.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c:
+ Updated.
+ * gcc.dg/vect/complex/fast-math-complex-add-double.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-add-float.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-add-half-float.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c:
+ Updated.
+ * gcc.dg/vect/complex/fast-math-complex-mla-double.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-mla-float.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-mla-half-float.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-mls-double.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-mls-float.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-mls-half-float.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-mul-double.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-mul-float.c: Updated.
+ * gcc.dg/vect/complex/fast-math-complex-mul-half-float.c: Updated.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-byte.c: Updated.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-int.c: Updated.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-long.c: Updated.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-short.c: Updated.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-byte.c:
+ Updated.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-int.c:
+ Updated.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c:
+ Updated.
+ * gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-short.c:
+ Updated.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-byte.c: Removed.
+ * gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-byte.c:
+ Removed.
+
+2021-10-29 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/Wstringop-overflow-62.c: Adjust expected diagnostics.
+
+2021-10-29 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/torture/fp-uint64-convert-double-1.c: Add
+ -fexcess-precision=standard.
+
+2021-10-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102820
+ * g++.dg/cpp0x/dr2351.C: New test.
+
+2021-10-29 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ PR target/102868
+ * gcc.target/powerpc/pr102868.c: New test.
+
+2021-10-29 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr102464-vrndscaleph.c: New test.
+
+2021-10-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/102951
+ * gcc.dg/tree-ssa/pr102951.c: New test.
+ * gcc.dg/Wstringop-overflow-62.c: Adjust expected diagnostics.
+
+2021-10-28 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/ifcvt-4.c: Adjust.
+
+2021-10-28 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/tree-ssa/evrp9.c: Adjust message scanned for.
+ * gcc.dg/tree-ssa/pr21458-2.c: Ditto.
+
+2021-10-28 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/102933
+ * g++.dg/cpp2a/nontype-class50.C: New test.
+ * g++.dg/cpp2a/nontype-class50a.C: New test.
+
+2021-10-28 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/102780
+ * g++.dg/cpp1z/fold13.C: New test.
+
+2021-10-28 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/84407
+ * gcc.dg/torture/fp-uint64-convert-double-1.c: New testcase.
+ * gcc.dg/torture/fp-uint64-convert-double-2.c: Likewise.
+
+2021-10-28 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/tree-ssa/vrp106.c: Adjust for threading.
+ * gcc.dg/tree-ssa/vrp113.c: Same.
+
+2021-10-28 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57245
+ * gcc.dg/torture/fp-double-convert-float-1.c: New testcase.
+
+2021-10-28 Kewen Lin <linkw@linux.ibm.com>
+
+ PR target/102767
+ * gcc.target/powerpc/ppc-fortran/pr102767.f90: New file.
+
+2021-10-28 Alexandre Oliva <oliva@adacore.com>
+
+ * c-c++-common/torture/harden-comp.c: New.
+ * c-c++-common/torture/harden-cond.c: New.
+
+2021-10-28 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ * gcc.target/powerpc/builtins-1.c: Adjust.
+
+2021-10-28 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ PR target/94613
+ * gcc.target/powerpc/pr94613.c: New test.
+
+2021-10-28 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/avx512fp16-recip-1.c: New test.
+ * gcc.target/i386/avx512fp16-recip-2.c: Ditto.
+ * gcc.target/i386/pr102464.c: Add -fno-trapping-math.
+
+2021-10-27 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/Warray-bounds-90.c: Fix a typo.
+
+2021-10-27 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/PR93963.f90: Extend testcase by scan-tree-dump test.
+
+2021-10-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/102897
+ * gcc.dg/pr102897.c: Add -Wno-psabi to dg-options.
+
+2021-10-27 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/loop-8.c: New test.
+ * c-c++-common/gomp/loop-9.c: New test.
+
+2021-10-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102854
+ * g++.dg/gomp/loop-3.C: Don't expect some errors.
+ * g++.dg/gomp/loop-7.C: New test.
+
+2021-10-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102753
+ * g++.dg/cpp2a/consteval7.C: Expect diagnostics on quux.
+ * g++.dg/cpp2a/consteval24.C: New test.
+ * g++.dg/cpp23/consteval-if12.C: New test.
+
+2021-10-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102753
+ * g++.dg/cpp2a/consteval13.C: Don't expect errors.
+ * g++.dg/cpp2a/consteval20.C: New test.
+ * g++.dg/cpp2a/consteval21.C: New test.
+ * g++.dg/cpp2a/consteval22.C: New test.
+ * g++.dg/cpp2a/consteval23.C: New test.
+ * g++.dg/cpp23/consteval-if11.C: New test.
+
+2021-10-26 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/102238
+ PR tree-optimization/102919
+ * gcc.dg/tree-ssa/builtin-sprintf-warn-23.c: Remove warnings.
+ * gcc.dg/Wrestrict-23.c: New test.
+
+2021-10-26 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/Wstringop-overflow-22.c: Correct typos.
+ * gcc.dg/Wstringop-overflow-81.c: New test.
+
+2021-10-26 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/102453
+ * gcc.dg/Warray-bounds-90.c: New test.
+ * gcc.dg/Wstringop-overflow-77.c: New test.
+ * gcc.dg/Wstringop-overflow-78.c: New test.
+ * gcc.dg/Wstringop-overflow-79.c: New test.
+ * gcc.dg/Wstringop-overflow-80.c: New test.
+ * c-c++-common/gomp/atomic-4.c: Avoid an out-of-bounds access.
+
+2021-10-26 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/86551
+ * gfortran.dg/pr86551.f90: New test to verify that PR86551 remains
+ fixed.
+
+2021-10-26 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102956
+ * gfortran.dg/pdt_32.f03: New test.
+
+2021-10-26 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/102842
+ * g++.target/arm/pr102842.C: New test.
+
+2021-10-26 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102917
+ * gfortran.dg/pdt_4.f03: Adjust testcase.
+
+2021-10-26 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102816
+ * gfortran.dg/pr102816.f90: New test.
+
+2021-10-26 Paul A. Clarke <pc@us.ibm.com>
+
+ * gcc.target/powerpc/pr78102.c: Fix dg directives to require Power8
+ vector support. Also, add -DNO_WARN_X86_INTRINSICS.
+
+2021-10-26 Marek Polacek <polacek@redhat.com>
+
+ PR c++/102617
+ * g++.dg/cpp23/init-stmt1.C: New test.
+ * g++.dg/cpp23/init-stmt2.C: New test.
+
+2021-10-26 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR testsuite/102910
+ * gfortran.dg/c-interop/cf-descriptor-5-c.c: Use a static buffer
+ instead of alloca.
+
+2021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR testsuite/102834
+ * gcc.target/i386/avx512f-pr96891-3.c: Add -mstv -mno-stackrealign
+ to dg-options.
+
+2021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR testsuite/102835
+ * gcc.target/i386/avx512fp16-trunchf.c: Allow for %esp instead of
+ %ebp.
+
+2021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR testsuite/102836
+ * gcc.target/i386/pieces-memset-1.c: Add -mno-stackrealign to
+ dg-options.
+ * gcc.target/i386/pieces-memset-4.c: Likewise.
+ * gcc.target/i386/pieces-memset-7.c: Likewise.
+ * gcc.target/i386/pieces-memset-8.c: Likewise.
+ * gcc.target/i386/pieces-memset-41.c: Likewise.
+ * gcc.target/i386/pr90773-1.c: Likewise.
+
+2021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.target/i386/pr100704-1.c: Add -fomit-frame-pointer to
+ dg-options.
+ * gcc.target/i386/pr100704-2.c: Likewise.
+
+2021-10-26 Kewen Lin <linkw@linux.ibm.com>
+
+ * gcc.dg/pr102897.c: New test.
+
+2021-10-26 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/102885
+ * gfortran.dg/lto/bind-c-char_0.f90: New test.
+
+2021-10-26 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/i386/sse2-v1ti-shift.c: New test case.
+
+2021-10-26 Aldy Hernandez <aldyh@redhat.com>
+
+ PR testsuite/102857
+ * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Add -fdump-tree-vrp2-stats.
+ Tweak for aarch64.
+
+2021-10-26 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/tree-ssa/pr21090.c: Adjust for threading.
+ * gcc.dg/tree-ssa/ssa-thread-12.c: Removed.
+
+2021-10-26 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/graphite/scop-dsyr2k-2.c: Adjust for jump threading changes.
+ * gcc.dg/graphite/scop-dsyr2k.c: Same.
+ * gcc.dg/graphite/scop-dsyrk-2.c: Same.
+ * gcc.dg/graphite/scop-dsyrk.c: Same.
+ * gcc.dg/tree-ssa/pr20701.c: Same.
+ * gcc.dg/tree-ssa/pr20702.c: Same.
+ * gcc.dg/tree-ssa/pr21086.c: Same.
+ * gcc.dg/tree-ssa/pr25382.c: Same.
+ * gcc.dg/tree-ssa/pr58480.c: Same.
+ * gcc.dg/tree-ssa/ssa-vrp-thread-1.c: Same.
+ * gcc.dg/tree-ssa/vrp08.c: Same.
+ * gcc.dg/tree-ssa/vrp55.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Removed.
+ * gcc.dg/tree-ssa/ssa-thread-11.c: Removed.
+ * gcc.dg/uninit-pr89230-1.c: xfail.
+ * gcc.dg/tree-ssa/ssa-thread-backedge.c: New file.
+
+2021-10-25 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/tree-ssa/vrp98.c: Disable evrp for vrp1 test.
+ * gcc.dg/tree-ssa/vrp98-1.c: New. Test for folding in evrp.
+
+2021-10-25 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/bfin/ssashift-1.c: New test case.
+
+2021-10-25 Tamar Christina <tamar.christina@arm.com>
+
+ PR target/102907
+ * gcc.target/aarch64/shrn-combine-1.c: Disable SVE.
+ * gcc.target/aarch64/shrn-combine-2.c: Likewise.
+ * gcc.target/aarch64/shrn-combine-3.c: Likewise.
+ * gcc.target/aarch64/shrn-combine-4.c: Likewise.
+ * gcc.target/aarch64/shrn-combine-5.c: Likewise.
+ * gcc.target/aarch64/shrn-combine-6.c: Likewise.
+ * gcc.target/aarch64/shrn-combine-7.c: Likewise.
+
+2021-10-25 Jim Wilson <jimw@sifive.com>
+ Kito Cheng <kito.cheng@sifive.com>
+ Jia-Wei Chen <jiawei@iscas.ac.cn>
+ Shi-Hua Liao <shihua@iscas.ac.cn>
+
+ * gcc.target/riscv/zba-slliuw.c: Apply zbs to this testcase.
+ * gcc.target/riscv/zbs-bclr.c: New.
+ * gcc.target/riscv/zbs-bext.c: Ditto.
+ * gcc.target/riscv/zbs-binv.c: Ditto.
+ * gcc.target/riscv/zbs-bset.c: Ditto.
+
+2021-10-25 Jim Wilson <jimw@sifive.com>
+
+ * gcc.target/riscv/zbb-li-rotr.c: New.
+
+2021-10-25 Jim Wilson <jimw@sifive.com>
+ Kito Cheng <kito.cheng@sifive.com>
+ Jia-Wei Chen <jiawei@iscas.ac.cn>
+
+ * gcc.target/riscv/zbb-andn-orn-xnor-01.c: New.
+ * gcc.target/riscv/zbb-andn-orn-xnor-02.c: Ditto.
+ * gcc.target/riscv/zbb-min-max.c: Ditto.
+ * gcc.target/riscv/zbb-rol-ror-01.c: Ditto.
+ * gcc.target/riscv/zbb-rol-ror-02.c: Ditto.
+ * gcc.target/riscv/zbb-rol-ror-03.c: Ditto.
+ * gcc.target/riscv/zbbw.c: Ditto.
+
+2021-10-25 Jim Wilson <jimw@sifive.com>
+ Kito Cheng <kito.cheng@sifive.com>
+ Jia-Wei Chen <jiawei@iscas.ac.cn>
+
+ * gcc.target/riscv/zba-adduw.c: New.
+ * gcc.target/riscv/zba-shNadd-01.c: Ditto.
+ * gcc.target/riscv/zba-shNadd-02.c: Ditto.
+ * gcc.target/riscv/zba-shNadd-03.c: Ditto.
+ * gcc.target/riscv/zba-slliuw.c: Ditto.
+ * gcc.target/riscv/zba-zextw.c: Ditto.
+
+2021-10-25 liuhongt <hongtao.liu@intel.com>
+
+ PR target/102464
+ * gcc.target/i386/pr102464-sqrtph.c: New test.
+ * gcc.target/i386/pr102464-sqrtsh.c: New test.
+
+2021-10-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102920
+ * gcc.dg/torture/pr102920.c: New testcase.
+
+2021-10-25 konglin1 <lingling.kong@intel.com>
+
+ * gcc.target/i386/avx512fp16-complex-fma.c: New test.
+
+2021-10-24 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/bfin/20090914-3.c: Tweak test case.
+
+2021-10-23 H.J. Lu <hjl.tools@gmail.com>
+
+ PR fortran/9262
+ * gfortran.dg/bind-c-intent-out-2.f90: Moved to ...
+ * gfortran.dg/ubsan/bind-c-intent-out-2.f90
+
+2021-10-23 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/i386/sse2-v1ti-logic.c: New test case.
+ * gcc.target/i386/sse2-v1ti-logic-2.c: New test case.
+
+2021-10-23 José Rui Faustino de Sousa <jrfsousa@gmail.com>
+ Sandra Loosemore <sandra@codesourcery.com>
+
+ PR fortran/95196
+ * gfortran.dg/PR95196.f90: New.
+
+2021-10-22 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/associate_3.f03: Replace dg-excess-errors by
+ other dg-* to change XFAIL to PASS.
+ * gfortran.dg/binding_label_tests_4.f03: Likewise.
+ * gfortran.dg/block_4.f08: Likewise.
+ * gfortran.dg/charlen_04.f90: Likewise.
+ * gfortran.dg/charlen_05.f90: Likewise.
+ * gfortran.dg/charlen_06.f90: Likewise.
+ * gfortran.dg/charlen_13.f90: Likewise.
+ * gfortran.dg/coarray_9.f90: Likewise.
+ * gfortran.dg/coarray_collectives_3.f90: Likewise.
+ * gfortran.dg/data_invalid.f90: Likewise.
+ * gfortran.dg/do_4.f: Likewise.
+ * gfortran.dg/dollar_sym_1.f90: Likewise.
+ * gfortran.dg/dollar_sym_3.f: Likewise.
+ * gfortran.dg/fmt_tab_1.f90: Likewise.
+ * gfortran.dg/fmt_tab_2.f90: Likewise.
+ * gfortran.dg/forall_16.f90: Likewise.
+ * gfortran.dg/g77/970125-0.f: Likewise.
+ * gfortran.dg/gomp/unexpected-end.f90: Likewise.
+ * gfortran.dg/interface_operator_1.f90: Likewise.
+ * gfortran.dg/interface_operator_2.f90: Likewise.
+ * gfortran.dg/line_length_4.f90: Likewise.
+ * gfortran.dg/line_length_5.f90: Likewise.
+ * gfortran.dg/line_length_6.f90: Likewise.
+ * gfortran.dg/line_length_8.f90: Likewise.
+ * gfortran.dg/line_length_9.f90: Likewise.
+ * gfortran.dg/pr65045.f90: Likewise.
+ * gfortran.dg/pr69497.f90: Likewise.
+ * gfortran.dg/submodule_21.f08: Likewise.
+ * gfortran.dg/tab_continuation.f: Likewise.
+ * gfortran.dg/typebound_proc_2.f90: Likewise.
+ * gfortran.dg/warnings_are_errors_1.f90: Likewise.
+
+2021-10-22 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/92621
+ * gfortran.dg/bind-c-intent-out-2.f90: New test.
+
+2021-10-22 José Rui Faustino de Sousa <jrfsousa@gmail.com>
+ Sandra Loosemore <sandra@codesourcery.com>
+
+ PR fortran/94289
+ * gfortran.dg/PR94289.f90: New.
+
+2021-10-22 José Rui Faustino de Sousa <jrfsousa@gmail.com>
+ Sandra Loosemore <sandra@codesourcery.com>
+
+ PR fortran/100906
+ * gfortran.dg/PR100906.f90: New.
+ * gfortran.dg/PR100906.c: New.
+
+2021-10-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102893
+ * gcc.dg/tree-ssa/ssa-dce-9.c: New testcase.
+
+2021-10-22 Richard Biener <rguenther@suse.de>
+
+ PR bootstrap/102681
+ * gcc.dg/tree-ssa/ssa-fre-97.c: New testcase.
+ * gcc.dg/ubsan/pr81981.c: XFAIL one case.
+
+2021-10-21 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR testsuite/102840
+ * gcc.target/i386/pr22076.c: Adjust to avoid compile time optimization.
+
+2021-10-21 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/avx512fp16-13.c: Adjust scan-assembler for
+ xmm/ymm load/store.
+
+2021-10-21 Martin Liska <mliska@suse.cz>
+
+ PR debug/102585
+ PR bootstrap/102766
+ * gcc.dg/pr102585.c: New test.
+
+2021-10-21 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/102505
+ * g++.dg/torture/pr102505.C: New test.
+
+2021-10-21 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.dg/gomp/strictly-structured-block-1.f90: Use call do_work
+ instead of x = x + 1 in places where the latter could be a data race.
+ * gfortran.dg/gomp/strictly-structured-block-2.f90: Likewise.
+ * gfortran.dg/gomp/strictly-structured-block-3.f90: Likewise.
+
+2021-10-21 Hongyu Wang <hongyu.wang@intel.com>
+
+ PR target/102812
+ * gcc.target/i386/pr102812.c: New test.
+
+2021-10-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/64888
+ * c-c++-common/ubsan/pr64888.c: New test.
+
+2021-10-21 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.dg/pr36902.c: Move buf to be a non-static variable.
+
+2021-10-21 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/102861
+ * gcc.dg/vect/bb-slp-16.c: Revert previous change, scan
+ the vect dump instead.
+
+2021-10-21 Chung-Lin Tang <cltang@codesourcery.com>
+
+ * gfortran.dg/gomp/cancel-1.f90: Adjust testcase.
+ * gfortran.dg/gomp/nesting-3.f90: Adjust testcase.
+ * gfortran.dg/gomp/strictly-structured-block-1.f90: New test.
+ * gfortran.dg/gomp/strictly-structured-block-2.f90: New test.
+ * gfortran.dg/gomp/strictly-structured-block-3.f90: New test.
+
+2021-10-21 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR fortran/94070
+ * gfortran.dg/c-interop/shape-bindc.f90: New test.
+ * gfortran.dg/c-interop/shape-poly.f90: New test.
+ * gfortran.dg/c-interop/size-bindc.f90: New test.
+ * gfortran.dg/c-interop/size-poly.f90: New test.
+ * gfortran.dg/c-interop/ubound-bindc.f90: New test.
+ * gfortran.dg/c-interop/ubound-poly.f90: New test.
+
+2021-10-20 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/mvn-cmeq0-1.c: New test.
+
+2021-10-20 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/narrow_high_combine.c: Update case.
+ * gcc.target/aarch64/xtn-combine-1.c: New test.
+ * gcc.target/aarch64/xtn-combine-2.c: New test.
+ * gcc.target/aarch64/xtn-combine-3.c: New test.
+ * gcc.target/aarch64/xtn-combine-4.c: New test.
+ * gcc.target/aarch64/xtn-combine-5.c: New test.
+ * gcc.target/aarch64/xtn-combine-6.c: New test.
+
+2021-10-20 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/shl-combine-2.c: New test.
+ * gcc.target/aarch64/shl-combine-3.c: New test.
+ * gcc.target/aarch64/shl-combine-4.c: New test.
+ * gcc.target/aarch64/shl-combine-5.c: New test.
+
+2021-10-20 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/shrn-combine-10.c: New test.
+ * gcc.target/aarch64/shrn-combine-5.c: New test.
+ * gcc.target/aarch64/shrn-combine-6.c: New test.
+ * gcc.target/aarch64/shrn-combine-7.c: New test.
+ * gcc.target/aarch64/shrn-combine-8.c: New test.
+ * gcc.target/aarch64/shrn-combine-9.c: New test.
+
+2021-10-20 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/shrn-combine-1.c: New test.
+ * gcc.target/aarch64/shrn-combine-2.c: New test.
+ * gcc.target/aarch64/shrn-combine-3.c: New test.
+ * gcc.target/aarch64/shrn-combine-4.c: New test.
+
+2021-10-20 Chung-Lin Tang <cltang@codesourcery.com>
+
+ * gfortran.dg/gomp/reduction4.f90: Adjust omp target in_reduction' scan
+ pattern.
+
+2021-10-20 Martin Liska <mliska@suse.cz>
+
+ Revert:
+ 2021-10-20 Martin Liska <mliska@suse.cz>
+
+ PR target/102374
+ * gcc.target/i386/pr102374.c: New test.
+
+2021-10-20 Martin Liska <mliska@suse.cz>
+
+ Revert:
+ 2021-10-20 Martin Liska <mliska@suse.cz>
+
+ PR target/102375
+ * gcc.target/aarch64/pr102375.c: New test.
+
+2021-10-20 Wilco Dijkstra <wdijkstr@arm.com>
+
+ PR target/100966
+ * gcc.target/aarch64/frint.x: Add roundeven tests.
+ * gcc.target/aarch64/frint_double.c: Likewise.
+ * gcc.target/aarch64/frint_float.c: Likewise.
+
+2021-10-20 Andre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com>
+
+ * gcc.target/aarch64/fmla_intrinsic_1.c: prevent over optimization.
+ * gcc.target/aarch64/fmls_intrinsic_1.c: Likewise.
+ * gcc.target/aarch64/fmul_intrinsic_1.c: Likewise.
+ * gcc.target/aarch64/mla_intrinsic_1.c: Likewise.
+ * gcc.target/aarch64/mls_intrinsic_1.c: Likewise.
+ * gcc.target/aarch64/mul_intrinsic_1.c: Likewise.
+ * gcc.target/aarch64/simd/vmul_elem_1.c: Likewise.
+ * gcc.target/aarch64/vclz.c: Likewise.
+ * gcc.target/aarch64/vneg_s.c: Likewise.
+
+2021-10-20 Andre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com>
+
+ * gcc.target/aarch64/merge_trunc1.c: New test.
+
+2021-10-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr102764.c: New test.
+
+2021-10-20 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/102815
+ * gfortran.dg/bind-c-contiguous-5.c (do_call, reset_var): Handle
+ big andian.
+
+2021-10-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102642
+ * g++.dg/tls/pr102642.C: New test.
+
+2021-10-20 Aldy Hernandez <aldyh@redhat.com>
+ Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/Warray-bounds-87.c: Remove xfail.
+ * gcc.dg/analyzer/pr94851-2.c: Remove xfail.
+ * gcc.dg/graphite/pr69728.c: Remove xfail.
+ * gcc.dg/graphite/scop-dsyr2k.c: Remove xfail.
+ * gcc.dg/graphite/scop-dsyrk.c: Remove xfail.
+ * gcc.dg/shrink-wrap-loop.c: Remove xfail.
+ * gcc.dg/loop-8.c: Adjust for new threading restrictions.
+ * gcc.dg/tree-ssa/ifc-20040816-1.c: Same.
+ * gcc.dg/tree-ssa/pr21559.c: Same.
+ * gcc.dg/tree-ssa/pr59597.c: Same.
+ * gcc.dg/tree-ssa/pr71437.c: Same.
+ * gcc.dg/tree-ssa/pr77445-2.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same.
+ * gcc.dg/vect/bb-slp-16.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-6.c: Remove.
+ * gcc.dg/tree-ssa/ssa-dom-thread-18.c: Remove.
+ * gcc.dg/tree-ssa/ssa-dom-thread-2a.c: Remove.
+ * gcc.dg/tree-ssa/ssa-thread-invalid.c: New test.
+
+2021-10-20 Jeff Law <jeffreyalaw@gmail.com>
+
+ * gcc.dg/plugin/gil-1.c: Add dg-require-effective-target marker.
+
+2021-10-20 Hongtao Liu <hongtao.liu@intel.com>
+ Kewen Lin <linkw@linux.ibm.com>
+
+ PR middle-end/102722
+ PR middle-end/102697
+ PR middle-end/102462
+ PR middle-end/102706
+ PR middle-end/102744
+ * c-c++-common/Wstringop-overflow-2.c: Adjust testcase with new
+ xfail/target selector.
+ * gcc.dg/Warray-bounds-51.c: Ditto.
+ * gcc.dg/Warray-parameter-3.c: Ditto.
+ * gcc.dg/Wstringop-overflow-14.c: Ditto.
+ * gcc.dg/Wstringop-overflow-21.c: Ditto.
+ * gcc.dg/Wstringop-overflow-68.c: Ditto.
+ * gcc.dg/Wstringop-overflow-76.c: Ditto.
+ * gcc.dg/Warray-bounds-48.c: Ditto.
+ * gcc.dg/Wzero-length-array-bounds-2.c: Ditto.
+ * lib/target-supports.exp (check_vect_slp_aligned_store_usage):
+ New function.
+ (check_effective_target_vect_slp_v2qi_store): Ditto.
+ (check_effective_target_vect_slp_v4qi_store): Ditto.
+ (check_effective_target_vect_slp_v8qi_store): Ditto.
+ (check_effective_target_vect_slp_v16qi_store): Ditto.
+ (check_effective_target_vect_slp_v2hi_store): Ditto.
+ (check_effective_target_vect_slp_v4hi_store): Ditto.
+ (check_effective_target_vect_slp_v2si_store): Ditto.
+ (check_effective_target_vect_slp_v4si_store): Ditto.
+ * c-c++-common/Wstringop-overflow-2-novec.c: New test.
+ * gcc.dg/Warray-bounds-51-novec.c: New test.
+ * gcc.dg/Warray-bounds-48-novec.c: New test.
+ * gcc.dg/Warray-parameter-3-novec.c: New test.
+ * gcc.dg/Wstringop-overflow-14-novec.c: New test.
+ * gcc.dg/Wstringop-overflow-21-novec.c: New test.
+ * gcc.dg/Wstringop-overflow-76-novec.c: New test.
+ * gcc.dg/Wzero-length-array-bounds-2-novec.c: New test.
+
+2021-10-19 Paul A. Clarke <pc@us.ibm.com>
+
+ * gcc.target/powerpc/sse4_2-pcmpgtq.c: Tighten dg constraints
+ to minimally Power8.
+
+2021-10-19 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/92482
+ * gfortran.dg/bind-c-char-descr.f90: Remove xfail; extend a bit.
+
+2021-10-19 Martin Liska <mliska@suse.cz>
+
+ PR target/102375
+ * gcc.target/aarch64/pr102375.c: New test.
+
+2021-10-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102827
+ * gcc.dg/pr102827.c: New testcase.
+
+2021-10-19 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ * gcc.target/powerpc/builtins-1.c: Update instruction counts.
+
+2021-10-19 Haochen Gui <guihaoc@gcc.gnu.org>
+
+ * gcc.target/powerpc/p10_vec_xl_sext.c: New test.
+
+2021-10-19 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR target/93183
+ * gcc.target/aarch64/sve/pr93183.c: Remove -mcpu=generic+sve from dg-options.
+
+2021-10-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102786
+ * g++.dg/cpp2a/constexpr-virtual19.C: New test.
+
+2021-10-19 Martin Liska <mliska@suse.cz>
+
+ PR target/102374
+ * gcc.target/i386/pr102374.c: New test.
+
+2021-10-19 dianhong xu <dianhong.xu@intel.com>
+
+ * gcc.target/i386/avx512fp16-set1-pch-1a.c: New test.
+ * gcc.target/i386/avx512fp16-set1-pch-1b.c: New test.
+ * gcc.target/i386/avx512fp16vl-set1-pch-1a.c: New test.
+ * gcc.target/i386/avx512fp16vl-set1-pch-1b.c: New test.
+
+2021-10-18 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/102796
+ * g++.dg/pr102796.C: New.
+
+2021-10-18 Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ * gfortran.dg/gomp/declare-variant-15.f90 (variant2, base2, test2):
+ Add tests.
+ * gfortran.dg/gomp/declare-variant-16.f90 (base2, variant2, test2):
+ Add tests.
+
+2021-10-18 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/102761
+ * gcc.target/i386/pr102761.c: New test.
+
+2021-10-18 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/template/crash90.C: Check location of pedwarn.
+
+2021-10-18 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/387-12.c (dg-do compile): Require ia32.
+ (dg-options): Remove -m32.
+
+2021-10-18 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/i386/387-12.c: Add explicit -m32 option.
+
+2021-10-18 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/bfin/ones.c: New test case.
+ * gcc.target/bfin/parity.c: New test case.
+ * gcc.target/bfin/popcount.c: New test case.
+
+2021-10-18 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102788
+ * g++.dg/vect/pr102788.cc: New testcase.
+
+2021-10-18 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/bfin/ssabs.c: New test case.
+ * gcc.target/bfin/ssneg.c: New test case.
+
+2021-10-18 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR target/93183
+ * gcc.target/aarch64/sve/cond_unary_4.c: Adjust.
+ * gcc.target/aarch64/sve/pr93183.c: New test.
+
+2021-10-18 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/102086
+ PR fortran/92189
+ PR fortran/92621
+ PR fortran/101308
+ PR fortran/101309
+ PR fortran/101635
+ PR fortran/92482
+ * gfortran.dg/ISO_Fortran_binding_4.f90: Extend testcase.
+ * gfortran.dg/PR100914.f90: Remove xfail.
+ * gfortran.dg/PR100915.c: Expect CFI_type_cfunptr.
+ * gfortran.dg/PR100915.f90: Handle CFI_type_cfunptr != CFI_type_cptr.
+ * gfortran.dg/PR93963.f90: Extend select-rank tests.
+ * gfortran.dg/bind-c-intent-out.f90: Change to dg-do run,
+ update scan-dump.
+ * gfortran.dg/bind_c_array_params_2.f90: Update/extend scan-dump.
+ * gfortran.dg/bind_c_char_10.f90: Update scan-dump.
+ * gfortran.dg/bind_c_char_8.f90: Remove dg-error "sorry".
+ * gfortran.dg/c-interop/allocatable-dummy.f90: Remove xfail.
+ * gfortran.dg/c-interop/c1255-1.f90: Likewise.
+ * gfortran.dg/c-interop/c407c-1.f90: Update dg-error.
+ * gfortran.dg/c-interop/cf-descriptor-5.f90: Remove xfail.
+ * gfortran.dg/c-interop/cf-out-descriptor-3.f90: Likewise.
+ * gfortran.dg/c-interop/cf-out-descriptor-4.f90: Likewise.
+ * gfortran.dg/c-interop/cf-out-descriptor-5.f90: Likewise.
+ * gfortran.dg/c-interop/contiguous-2.f90: Likewise.
+ * gfortran.dg/c-interop/contiguous-3.f90: Likewise.
+ * gfortran.dg/c-interop/deferred-character-1.f90: Likewise.
+ * gfortran.dg/c-interop/deferred-character-2.f90: Likewise.
+ * gfortran.dg/c-interop/fc-descriptor-3.f90: Likewise.
+ * gfortran.dg/c-interop/fc-descriptor-5.f90: Likewise.
+ * gfortran.dg/c-interop/fc-descriptor-6.f90: Likewise.
+ * gfortran.dg/c-interop/fc-out-descriptor-3.f90: Likewise.
+ * gfortran.dg/c-interop/fc-out-descriptor-4.f90: Likewise.
+ * gfortran.dg/c-interop/fc-out-descriptor-5.f90: Likewise.
+ * gfortran.dg/c-interop/fc-out-descriptor-6.f90: Likewise.
+ * gfortran.dg/c-interop/ff-descriptor-5.f90: Likewise.
+ * gfortran.dg/c-interop/ff-descriptor-6.f90: Likewise.
+ * gfortran.dg/c-interop/fc-descriptor-7.f90: Remove xfail + extend.
+ * gfortran.dg/c-interop/fc-descriptor-7-c.c: Update for changes.
+ * gfortran.dg/c-interop/shape.f90: Add implicit none.
+ * gfortran.dg/c-interop/typecodes-array-char-c.c: Add kind=4 char.
+ * gfortran.dg/c-interop/typecodes-array-char.f90: Likewise.
+ * gfortran.dg/c-interop/typecodes-array-float128.f90: Remove xfail.
+ * gfortran.dg/c-interop/typecodes-scalar-basic.f90: Likewise.
+ * gfortran.dg/c-interop/typecodes-scalar-float128.f90: Likewise.
+ * gfortran.dg/c-interop/typecodes-scalar-int128.f90: Likewise.
+ * gfortran.dg/c-interop/typecodes-scalar-longdouble.f90: Likewise.
+ * gfortran.dg/iso_c_binding_char_1.f90: Remove dg-error "sorry".
+ * gfortran.dg/pr93792.f90: Turn XFAIL into PASS.
+ * gfortran.dg/ISO_Fortran_binding_19.f90: New test.
+ * gfortran.dg/assumed_type_12.f90: New test.
+ * gfortran.dg/assumed_type_13.c: New test.
+ * gfortran.dg/assumed_type_13.f90: New test.
+ * gfortran.dg/bind-c-char-descr.f90: New test.
+ * gfortran.dg/bind-c-contiguous-1.c: New test.
+ * gfortran.dg/bind-c-contiguous-1.f90: New test.
+ * gfortran.dg/bind-c-contiguous-2.f90: New test.
+ * gfortran.dg/bind-c-contiguous-3.c: New test.
+ * gfortran.dg/bind-c-contiguous-3.f90: New test.
+ * gfortran.dg/bind-c-contiguous-4.c: New test.
+ * gfortran.dg/bind-c-contiguous-4.f90: New test.
+ * gfortran.dg/bind-c-contiguous-5.c: New test.
+ * gfortran.dg/bind-c-contiguous-5.f90: New test.
+
+2021-10-18 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102798
+ * gcc.dg/pr102798.c: New testcase.
+
+2021-10-18 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/102745
+ * gfortran.dg/class_72.f90: New.
+
+2021-10-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/51851
+ PR c++/101402
+ PR c++/102033
+ PR c++/102034
+ PR c++/102039
+ PR c++/102044
+ * g++.dg/template/fnspec2.C: New test.
+ * g++.dg/template/parm-cv1.C: New test.
+ * g++.dg/template/parm-cv2.C: New test.
+ * g++.dg/template/parm-cv3.C: New test.
+
+2021-10-15 Harald Anlauf <anlauf@gmx.de>
+ Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/102685
+ * gfortran.dg/derived_constructor_char_1.f90: Fix invalid code.
+ * gfortran.dg/pr70931.f90: Likewise.
+ * gfortran.dg/transfer_simplify_2.f90: Likewise.
+ * gfortran.dg/pr102685.f90: New test.
+
+2021-10-15 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/tree-ssa/pr102736.c: Make sign explicit.
+
+2021-10-15 Richard Biener <rguenther@suse.de>
+
+ * lib/prune.exp: Prune STABS obsoletion message.
+
+2021-10-15 Richard Biener <rguenther@suse.de>
+
+ PR c/102763
+ * gcc.dg/gimplefe-error-12.c: New testcase.
+
+2021-10-15 Richard Biener <rguenther@suse.de>
+
+ PR ipa/102762
+ * gcc.dg/torture/pr102762.c: New testcase.
+
+2021-10-15 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/avx512fp16-builtin_shuffle-1.c: New test.
+ * gcc.target/i386/avx512fp16-pr101846.c: Ditto.
+ * gcc.target/i386/avx512fp16-pr94680.c: Ditto.
+
+2021-10-15 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/avx512fp16-v4hf-concat.c: New test.
+
+2021-10-15 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/avx512fp16-vfcmaddcph-1a.c: Add scan for
+ vblendmps.
+ * gcc.target/i386/avx512fp16-vfmaddcph-1a.c: Likewise.
+ * gcc.target/i386/avx512fp16vl-vfcmaddcph-1a.c: Likewise.
+ * gcc.target/i386/avx512fp16vl-vfmaddcph-1a.c: Likewise.
+ * gcc.target/i386/avx512fp16-vfmaddcsh-1a.c: Add -mno-avx512vl.
+ * gcc.target/i386/avx512fp16-vfcmaddcsh-1a.c: Likewise.
+
+2021-10-15 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/ext/vla22.C: Don't expect a narrowing error.
+ * g++.dg/cpp0x/constexpr-inst1.C: New test.
+
+2021-10-15 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr102738.c: Add target int128.
+
+2021-10-14 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/format/c11-dfp-printf-1.c,
+ gcc.dg/format/c11-dfp-scanf-1.c, gcc.dg/format/c2x-dfp-printf-1.c,
+ gcc.dg/format/c2x-dfp-scanf-1.c: New tests.
+
+2021-10-14 Raphael Moreira Zinsly <rzinsly@linux.ibm.com>
+
+ * gcc.target/powerpc/unwind-backchain.c: New test.
+
+2021-10-14 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102717
+ * gfortran.dg/reshape_shape_2.f90: New test.
+
+2021-10-14 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102716
+ * gfortran.dg/shape_10.f90: New test.
+
+2021-10-14 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/102738
+ * gcc.dg/pr102738.c: New.
+
+2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ * gfortran.dg/gomp/declare-variant-1.f90: New test.
+ * gfortran.dg/gomp/declare-variant-10.f90: New test.
+ * gfortran.dg/gomp/declare-variant-11.f90: New test.
+ * gfortran.dg/gomp/declare-variant-12.f90: New test.
+ * gfortran.dg/gomp/declare-variant-13.f90: New test.
+ * gfortran.dg/gomp/declare-variant-14.f90: New test.
+ * gfortran.dg/gomp/declare-variant-15.f90: New test.
+ * gfortran.dg/gomp/declare-variant-16.f90: New test.
+ * gfortran.dg/gomp/declare-variant-17.f90: New test.
+ * gfortran.dg/gomp/declare-variant-18.f90: New test.
+ * gfortran.dg/gomp/declare-variant-19.f90: New test.
+ * gfortran.dg/gomp/declare-variant-2.f90: New test.
+ * gfortran.dg/gomp/declare-variant-2a.f90: New test.
+ * gfortran.dg/gomp/declare-variant-3.f90: New test.
+ * gfortran.dg/gomp/declare-variant-4.f90: New test.
+ * gfortran.dg/gomp/declare-variant-5.f90: New test.
+ * gfortran.dg/gomp/declare-variant-6.f90: New test.
+ * gfortran.dg/gomp/declare-variant-7.f90: New test.
+ * gfortran.dg/gomp/declare-variant-8.f90: New test.
+ * gfortran.dg/gomp/declare-variant-9.f90: New test.
+
+2021-10-14 Jeff Law <jeffreyalaw@gmail.com>
+
+ * gcc.target/mips/msa-insert-split.c: Turn off vectorizer.
+
+2021-10-14 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/sve/pred-cond-reduc.c: New test.
+
+2021-10-14 Jeff Law <jeffreyalaw@gmail.com>
+
+ * gcc.dg/tree-ssa/predcom-3.c: Disable vectorizer.
+
+2021-10-14 Aldy Hernandez <aldyh@redhat.com>
+
+ PR tree-optimization/102736
+ * gcc.dg/tree-ssa/pr102736.c: New test.
+
+2021-10-14 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add new mask3 builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfcmaddcsh-1a.c: Add scanning for
+ mask/mask3 intrinsic.
+ * gcc.target/i386/avx512fp16-vfmaddcsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfcmaddcsh-1c.c: New test for
+ -mavx512vl.
+ * gcc.target/i386/avx512fp16-vfmaddcsh-1c.c: Ditto.
+
+2021-10-14 liuhongt <hongtao.liu@intel.com>
+
+ * g++.dg/warn/Wuninitialized-13.C: Add -fno-tree-vectorize.
+
+2021-10-13 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/102630
+ * gcc.target/i386/addr-space-2.c: Add -Wall.
+ * gcc.target/i386/addr-space-3.c: New test.
+
+2021-10-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ * gcc.target/arm/mve/mve.exp: Make it test main directory.
+ * gcc.target/arm/mve/mve_load_memory_modes.c: New test.
+ * gcc.target/arm/mve/mve_store_memory_modes.c: New test.
+
+2021-10-13 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102659
+ * gcc.dg/torture/pr69760.c: Adjust the testcase.
+ * gcc.target/i386/avx2-vect-mask-store-move1.c: Expect to move
+ the conversions to unsigned as well.
+
+2021-10-13 Richard Biener <rguenther@suse.de>
+
+ PR ipa/102714
+ * gcc.dg/ipa/pr102714.c: New testcase.
+
+2021-10-13 Kewen Lin <linkw@linux.ibm.com>
+
+ PR testsuite/102658
+ * gcc.target/powerpc/dform-1.c: Adjust as vectorization enabled at O2.
+ * gcc.target/powerpc/dform-2.c: Likewise.
+ * gcc.target/powerpc/pr80510-2.c: Likewise.
+
+2021-10-12 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/format/c11-printf-1.c, gcc.dg/format/c11-scanf-1.c,
+ gcc.dg/format/c2x-printf-1.c, gcc.dg/format/c2x-scanf-1.c,
+ gcc.dg/format/ext-9.c, gcc.dg/format/ext-10.c: New tests.
+
+2021-10-12 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR target/101985
+ * gcc.target/powerpc/pr101985-1.c: New.
+ * gcc.target/powerpc/pr101985-2.c: New.
+
+2021-10-12 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/85730
+ PR target/82524
+ * gcc.target/i386/pr85730.c: New test.
+
+2021-10-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102696
+ * g++.dg/vect/pr102696.cc: New testcase.
+
+2021-10-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102572
+ * g++.dg/vect/pr102572.cc: New testcase.
+
+2021-10-12 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/sve/pred-not-gen-1.c: New test.
+ * gcc.target/aarch64/sve/pred-not-gen-2.c: New test.
+ * gcc.target/aarch64/sve/pred-not-gen-3.c: New test.
+ * gcc.target/aarch64/sve/pred-not-gen-4.c: New test.
+
+2021-10-12 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/102541
+ * gfortran.dg/assumed_rank_24.f90: New test.
+
+2021-10-12 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/gomp/simd-2.c: Remove option -fvect-cost-model=cheap.
+ * gcc.dg/gomp/simd-3.c: Likewise.
+
+2021-10-12 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr102483.c: New test.
+ * gcc.target/i386/pr102483-2.c: New test.
+
+2021-10-12 Paul A. Clarke <pc@us.ibm.com>
+
+ * gcc.target/powerpc/pr78102.c: Fix dg-require-effective-target.
+ * gcc.target/powerpc/sse4_1-packusdw.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmaxsb.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmaxsd.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmaxud.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmaxuw.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pminsb.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pminsd.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pminud.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pminuw.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmovsxbd.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmovsxbw.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmovsxwd.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmovzxbd.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmovzxbq.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmovzxbw.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmovzxdq.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmovzxwd.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmovzxwq.c: Likewise.
+ * gcc.target/powerpc/sse4_1-pmulld.c: Likewise.
+ * gcc.target/powerpc/sse4_2-pcmpgtq.c: Likewise.
+ * gcc.target/powerpc/sse4_1-phminposuw.c: Use correct
+ dg-require-effective-target.
+
+2021-10-12 Paul A. Clarke <pc@us.ibm.com>
+
+ * gcc.target/powerpc/pr78102.c: Copy from gcc.target/i386,
+ adjust dg directives to suit.
+ * gcc.target/powerpc/sse4_1-packusdw.c: Same.
+ * gcc.target/powerpc/sse4_1-pcmpeqq.c: Same.
+ * gcc.target/powerpc/sse4_1-pmuldq.c: Same.
+ * gcc.target/powerpc/sse4_1-pmulld.c: Same.
+ * gcc.target/powerpc/sse4_2-pcmpgtq.c: Same.
+ * gcc.target/powerpc/sse4_2-check.h: Copy from gcc.target/i386,
+ tweak to suit.
+
+2021-10-12 Paul A. Clarke <pc@us.ibm.com>
+
+ * gcc.target/powerpc/sse4_1-pmovsxbd.c: Copy from gcc.target/i386,
+ adjust dg directives to suit.
+ * gcc.target/powerpc/sse4_1-pmovsxbq.c: Same.
+ * gcc.target/powerpc/sse4_1-pmovsxbw.c: Same.
+ * gcc.target/powerpc/sse4_1-pmovsxdq.c: Same.
+ * gcc.target/powerpc/sse4_1-pmovsxwd.c: Same.
+ * gcc.target/powerpc/sse4_1-pmovsxwq.c: Same.
+ * gcc.target/powerpc/sse4_1-pmovzxbd.c: Same.
+ * gcc.target/powerpc/sse4_1-pmovzxbq.c: Same.
+ * gcc.target/powerpc/sse4_1-pmovzxbw.c: Same.
+ * gcc.target/powerpc/sse4_1-pmovzxdq.c: Same.
+ * gcc.target/powerpc/sse4_1-pmovzxwd.c: Same.
+ * gcc.target/powerpc/sse4_1-pmovzxwq.c: Same.
+
+2021-10-12 Paul A. Clarke <pc@us.ibm.com>
+
+ * gcc.target/powerpc/sse4_1-pmaxsb.c: Copy from gcc.target/i386.
+ * gcc.target/powerpc/sse4_1-pmaxsd.c: Same.
+ * gcc.target/powerpc/sse4_1-pmaxud.c: Same.
+ * gcc.target/powerpc/sse4_1-pmaxuw.c: Same.
+ * gcc.target/powerpc/sse4_1-pminsb.c: Same.
+ * gcc.target/powerpc/sse4_1-pminsd.c: Same.
+ * gcc.target/powerpc/sse4_1-pminud.c: Same.
+ * gcc.target/powerpc/sse4_1-pminuw.c: Same.
+
+2021-10-11 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/torture/ssa-pta-fn-1.c: Fix template; add noipa.
+ * gcc.dg/tree-ssa/pta-callused.c: Fix template.
+
+2021-10-11 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/102643
+ * g++.dg/cpp2a/class-deduction-alias11.C: New test.
+
+2021-10-11 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/101480
+ * g++.dg/torture/pr10148.C: New testcase.
+
+2021-10-11 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * gcc.target/s390/rawmemchr-1.c: New test.
+
+2021-10-11 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * gcc.dg/tree-ssa/ldist-rawmemchr-1.c: New test.
+ * gcc.dg/tree-ssa/ldist-rawmemchr-2.c: New test.
+ * gcc.dg/tree-ssa/ldist-strlen-1.c: New test.
+ * gcc.dg/tree-ssa/ldist-strlen-2.c: New test.
+ * gcc.dg/tree-ssa/ldist-strlen-3.c: New test.
+
+2021-10-11 Kito Cheng <kito.cheng@sifive.com>
+
+ PR target/100316
+ * gcc.c-torture/compile/pr100316.c: New.
+
+2021-10-11 liuhongt <hongtao.liu@intel.com>
+
+ PR middle-end/102669
+ * gnat.dg/unroll1.adb: Add -fno-tree-vectorize.
+
+2021-10-10 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/99348
+ PR fortran/102521
+ * gfortran.dg/parameter_array_init_8.f90: New test.
+
+2021-10-10 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/102622
+ * gcc.c-torture/execute/bitfld-10.c: New test.
+
+2021-10-09 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/65454
+ * gfortran.dg/interface_operator_3.f90: New test.
+
+2021-10-09 Kewen Lin <linkw@linux.ibm.com>
+
+ * c-c++-common/Wstringop-overflow-2.c: Add missing comment.
+ * gcc.dg/Warray-bounds-51.c: Likewise.
+ * gcc.dg/Warray-parameter-3.c: Likewise.
+ * gcc.dg/Wstringop-overflow-14.c: Likewise.
+ * gcc.dg/Wstringop-overflow-21.c: Likewise.
+ * gcc.dg/Wstringop-overflow-76.c: Likewise.
+
+2021-10-09 liuhongt <hongtao.liu@intel.com>
+
+ * g++.dg/tree-ssa/pr94403.C: Add -fno-tree-vectorize
+ * gcc.dg/optimize-bswapsi-5.c: Ditto.
+ * gcc.dg/optimize-bswapsi-6.c: Ditto.
+ * gcc.dg/Warray-bounds-51.c: Add additional option
+ -mtune=generic for target x86/i?86
+ * gcc.dg/Wstringop-overflow-14.c: Ditto.
+
+2021-10-09 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/sections1.c (foo): Don't expect errors on
+ multiple statements in between section directive(s). Add testcases
+ for invalid no statements in between section directive(s).
+ * gcc.dg/gomp/sections-2.c (foo): Don't expect errors on
+ multiple statements in between section directive(s).
+ * g++.dg/gomp/sections-2.C (foo): Likewise.
+ * g++.dg/gomp/attrs-6.C (foo): Add testcases for multiple
+ statements in between section directive(s).
+ (bar): Add testcases for multiple statements in between scan
+ directive.
+ * g++.dg/gomp/attrs-7.C (bar): Adjust expected error recovery.
+
+2021-10-09 liuhongt <hongtao.liu@intel.com>
+
+ * g++.target/i386/pr102639.C: New test.
+
+2021-10-08 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR fortran/54753
+ * gfortran.dg/c-interop/c535c-1.f90: Rewrite and expand.
+ * gfortran.dg/c-interop/c535c-2.f90: Remove xfails.
+ * gfortran.dg/c-interop/c535c-3.f90: Likewise.
+ * gfortran.dg/c-interop/c535c-4.f90: Likewise.
+ * gfortran.dg/PR94110.f90: Extend to cover class types.
+
+2021-10-08 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/102627
+ * gcc.target/i386/pr102627.c: New test.
+
+2021-10-08 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/pr102385.c: New test.
+
+2021-10-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102640
+ * c-c++-common/gomp/pr102640.c: New test.
+
+2021-10-08 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/i386/sse2-mmx-paddsb-2.c: Test for -128 or 128.
+ * gcc.target/i386/sse2-mmx-paddusb-2.c: Test for -1 or 255.
+ * gcc.target/i386/sse2-mmx-psubsb-2.c: Test for -128 or 128.
+
+2021-10-08 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr102464.c: New test.
+
+2021-10-08 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/mmx-reduce-op-1.c: New test.
+ * gcc.target/i386/mmx-reduce-op-2.c: New test.
+
+2021-10-08 liuhongt <hongtao.liu@intel.com>
+
+ * c-c++-common/Wstringop-overflow-2.c: Adjust testcase.
+ * g++.dg/tree-ssa/pr81408.C: Ditto.
+ * g++.dg/warn/Wuninitialized-13.C: Ditto.
+ * gcc.dg/Warray-bounds-51.c: Ditto.
+ * gcc.dg/Warray-parameter-3.c: Ditto.
+ * gcc.dg/Wstringop-overflow-14.c: Ditto.
+ * gcc.dg/Wstringop-overflow-21.c: Ditto.
+ * gcc.dg/Wstringop-overflow-68.c: Ditto.
+ * gcc.dg/Wstringop-overflow-76.c: Ditto.
+ * gcc.dg/gomp/pr46032-2.c: Ditto.
+ * gcc.dg/gomp/pr46032-3.c: Ditto.
+ * gcc.dg/gomp/simd-2.c: Ditto.
+ * gcc.dg/gomp/simd-3.c: Ditto.
+ * gcc.dg/graphite/fuse-1.c: Ditto.
+ * gcc.dg/pr67089-6.c: Ditto.
+ * gcc.dg/pr82929-2.c: Ditto.
+ * gcc.dg/pr82929.c: Ditto.
+ * gcc.dg/store_merging_1.c: Ditto.
+ * gcc.dg/store_merging_11.c: Ditto.
+ * gcc.dg/store_merging_13.c: Ditto.
+ * gcc.dg/store_merging_15.c: Ditto.
+ * gcc.dg/store_merging_16.c: Ditto.
+ * gcc.dg/store_merging_19.c: Ditto.
+ * gcc.dg/store_merging_24.c: Ditto.
+ * gcc.dg/store_merging_25.c: Ditto.
+ * gcc.dg/store_merging_28.c: Ditto.
+ * gcc.dg/store_merging_30.c: Ditto.
+ * gcc.dg/store_merging_5.c: Ditto.
+ * gcc.dg/store_merging_7.c: Ditto.
+ * gcc.dg/store_merging_8.c: Ditto.
+ * gcc.dg/strlenopt-85.c: Ditto.
+ * gcc.dg/tree-ssa/dump-6.c: Ditto.
+ * gcc.dg/tree-ssa/pr19210-1.c: Ditto.
+ * gcc.dg/tree-ssa/pr47059.c: Ditto.
+ * gcc.dg/tree-ssa/pr86017.c: Ditto.
+ * gcc.dg/tree-ssa/pr91482.c: Ditto.
+ * gcc.dg/tree-ssa/predcom-1.c: Ditto.
+ * gcc.dg/tree-ssa/predcom-dse-3.c: Ditto.
+ * gcc.dg/tree-ssa/prefetch-3.c: Ditto.
+ * gcc.dg/tree-ssa/prefetch-6.c: Ditto.
+ * gcc.dg/tree-ssa/prefetch-8.c: Ditto.
+ * gcc.dg/tree-ssa/prefetch-9.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-dse-18.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-dse-19.c: Ditto.
+ * gcc.dg/uninit-40.c: Ditto.
+ * gcc.dg/unroll-7.c: Ditto.
+ * gcc.misc-tests/help.exp: Ditto.
+ * gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c: Ditto.
+ * gcc.target/i386/pr34012.c: Ditto.
+ * gcc.target/i386/pr49781-1.c: Ditto.
+ * gcc.target/i386/pr95798-1.c: Ditto.
+ * gcc.target/i386/pr95798-2.c: Ditto.
+ * gfortran.dg/pr77498.f: Ditto.
+
+2021-10-07 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/61355
+ * g++.old-deja/g++.pt/nontype5.C: Adjust.
+ * g++.dg/template/param6.C: New test.
+
+2021-10-07 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/i386/sse2-mmx-paddsb-2.c: New test case.
+ * gcc.target/i386/sse2-mmx-paddusb-2.c: New test case.
+ * gcc.target/i386/sse2-mmx-psubsb-2.c: New test case.
+ * gcc.target/i386/sse2-mmx-psubusb-2.c: New test case.
+
+2021-10-07 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99904
+ * g++.dg/cpp2a/concepts-ttp4.C: New test.
+
+2021-10-07 Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/102482
+ * g++.dg/warn/Winit-list5.C: New test.
+
+2021-10-07 Jan Hubicka <hubicka@ucw.cz>
+
+ * g++.dg/torture/pr102581.C: New test.
+
+2021-10-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102615
+ * g++.dg/cpp23/charlit-encoding1.C: New testcase for C++23 P2316R2.
+
+2021-10-07 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/gimplefe-47.c: New testcase.
+
+2021-10-06 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp2a/spaceship-synth8a.C: New test.
+
+2021-10-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102612
+ * g++.dg/cpp23/feat-cxx2b.C: Expect __cpp_constexpr 202110L rather
+ than 201907L.
+ * g++.dg/cpp23/constexpr-nonlit1.C: New test.
+ * g++.dg/cpp23/constexpr-nonlit2.C: New test.
+ * g++.dg/cpp23/constexpr-nonlit3.C: New test.
+ * g++.dg/cpp23/constexpr-nonlit4.C: New test.
+ * g++.dg/cpp23/constexpr-nonlit5.C: New test.
+ * g++.dg/cpp23/constexpr-nonlit6.C: New test.
+ * g++.dg/diagnostic/constexpr1.C: Only expect some diagnostics for
+ c++20_down.
+ * g++.dg/cpp1y/constexpr-label.C: Likewise.
+ * g++.dg/cpp1y/constexpr-neg1.C: Likewise.
+ * g++.dg/cpp2a/constexpr-try5.C: Likewise. Adjust some expected
+ wording.
+ * g++.dg/cpp2a/constexpr-dtor3.C: Likewise.
+ * g++.dg/cpp2a/consteval3.C: Likewise. Add effective target c++20
+ and remove dg-options.
+
+2021-10-06 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/cpp/gnu11-elifdef-1.c: New test.
+ * gcc.dg/cpp/gnu11-elifdef-2.c: New test.
+ * gcc.dg/cpp/gnu11-elifdef-3.c: New test.
+ * gcc.dg/cpp/gnu11-elifdef-4.c: New test.
+ * g++.dg/cpp/elifdef-1.C: New test.
+ * g++.dg/cpp/elifdef-2.C: New test.
+ * g++.dg/cpp/elifdef-3.C: New test.
+ * g++.dg/cpp/elifdef-4.C: New test.
+ * g++.dg/cpp/elifdef-5.C: New test.
+ * g++.dg/cpp/elifdef-6.C: New test.
+ * g++.dg/cpp/elifdef-7.C: New test.
+
+2021-10-06 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/attr_deprecated-2.f90: New test.
+
+2021-10-06 Jakub Jelinek <jakub@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/98712
+ PR c++/102490
+ * g++.dg/cpp2a/spaceship-synth8.C (std::strong_ordering): Provide
+ more complete definition.
+ (std::strong_ordering::less, std::strong_ordering::equal,
+ std::strong_ordering::greater): Define.
+ * g++.dg/cpp2a/spaceship-synth12.C: New test.
+ * g++.dg/cpp2a/spaceship-synth13.C: New test.
+ * g++.dg/cpp2a/spaceship-synth14.C: New test.
+ * g++.dg/cpp2a/spaceship-eq11.C: New test.
+ * g++.dg/cpp2a/spaceship-eq12.C: New test.
+ * g++.dg/cpp2a/spaceship-eq13.C: New test.
+
+2021-10-05 qing zhao <qing.zhao@oracle.com>
+
+ PR middle-end/102359
+ * g++.dg/pr102359_1.C: New test.
+ * g++.dg/pr102359_2.C: New test.
+
+2021-10-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102548
+ * g++.target/i386/pr102548.C: New test.
+
+2021-10-05 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/102547
+ * g++.dg/cpp0x/variadic-partial2.C: New test.
+ * g++.dg/cpp0x/variadic-partial2a.C: New test.
+
+2021-10-05 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/tree-ssa/ssa-thread-valid.c: New test.
+
+2021-10-05 Jeff Law <jeffreyalaw@gmail.com>
+
+ * gcc.target/s390/pr80725.c: Ensure computed goto is used on
+ a pointer type.
+
+2021-10-05 Richard Biener <rguenther@suse.de>
+
+ PR c/102605
+ * gcc.dg/gimplefe-46.c: New testcase.
+
+2021-10-05 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/98930
+ * g++.dg/cpp1z/nontype4.C: New test.
+ * g++.dg/cpp1z/nontype4a.C: New test.
+
+2021-10-05 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/pr43711.f90: Add dg-error + dg-prune-output,
+ remove dg-excess-errors to change XFAIL to PASS.
+
+2021-10-05 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/102587
+ PR middle-end/102285
+ * gcc.target/aarch64/sve/pr102587-1.c: Add -march=armv8.3-a+sve.
+ * gcc.target/aarch64/sve/pr102587-2.c: Likewise.
+
+2021-10-05 Richard Biener <rguenther@suse.de>
+
+ * gfortran.dg/predict-2.f90: Adjust to avoid redundant
+ inner loop preheader checking code.
+
+2021-10-04 Marek Polacek <polacek@redhat.com>
+
+ PR c++/97573
+ * c-c++-common/Warray-compare-1.c: New test.
+ * c-c++-common/Warray-compare-2.c: New test.
+
+2021-10-04 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/auto-init-hardreg-1.c: New testcase.
+
+2021-10-04 Richard Biener <rguenther@suse.de>
+
+ * c-c++-common/pr102285.c: New testcase.
+
+2021-10-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102570
+ * gcc.dg/tree-ssa/ssa-fre-96.c: New testcase.
+ * gcc.dg/tree-ssa/ssa-pre-33.c: Likewise.
+
+2021-10-04 Aldy Hernandez <aldyh@redhat.com>
+
+ * g++.dg/Walloca2.C: New test.
+
+2021-10-04 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/102587
+ * gcc.target/aarch64/sve/pr102587-1.c: New testcase.
+ * gcc.target/aarch64/sve/pr102587-2.c: Likewise.
+
+2021-10-04 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/54753
+ * gfortran.dg/assumed_rank_23.f90: New file.
+
+2021-10-03 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/101765
+ * g++.dg/coroutines/pr101765.C: New test.
+
+2021-10-03 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/99710
+ * g++.dg/coroutines/pr99710.C: New test.
+
+2021-10-03 John Eivind Helset <jehelset@gmail.com>
+
+ PR c++/100673
+ * g++.dg/coroutines/pr100673.C: New test.
+
+2021-10-03 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/101133
+ * g++.dg/coroutines/pr101133.C: New test.
+
+2021-10-03 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/99575
+ * g++.dg/coroutines/pr99575.C: New test.
+
+2021-10-02 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/tree-ssa/pr102563.c: New test.
+
+2021-10-02 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.dg/analyzer/torture/asm-x86-linux-rdmsr.c (DECLARE_ARGS):
+ Use unsigned long long for x86-64.
+
+2021-10-01 Aldy Hernandez <aldyh@redhat.com>
+
+ PR tree-optimization/102546
+ * gcc.dg/tree-ssa/pr102546.c: New file.
+
+2021-10-01 Martin Sebor <msebor@redhat.com>
+
+ PR c/102103
+ * g++.dg/cpp0x/constexpr-array-ptr10.C: Suppress a valid warning.
+ * g++.dg/warn/Wreturn-local-addr-6.C: Correct a cast.
+ * gcc.dg/Waddress.c: Expect a warning.
+ * c-c++-common/Waddress-3.c: New test.
+ * c-c++-common/Waddress-4.c: New test.
+ * g++.dg/warn/Waddress-5.C: New test.
+ * g++.dg/warn/Waddress-6.C: New test.
+ * g++.dg/warn/pr101219.C: Expect a warning.
+ * gcc.dg/Waddress-3.c: New test.
+
+2021-10-01 H.J. Lu <hjl.tools@gmail.com>
+
+ * c-c++-common/tsan/atomic_stack.c: Don't expect print out from
+ __tsan_atomic32_fetch_add.
+
+2021-10-01 qingzhe huang <nickhuang99@hotmail.com>
+
+ PR c++/101783
+ * g++.dg/parse/pr101783.C: New test.
+
+2021-10-01 Jakub Jelinek <jakub@redhat.com>
+ Richard Biener <rguenther@suse.de>
+
+ PR sanitizer/102515
+ * c-c++-common/ubsan/div-by-zero-3.c: Use
+ -fsanitize=signed-integer-overflow instead of
+ -fsanitize=integer-divide-by-zero.
+ * c-c++-common/ubsan/div-by-zero-5.c: Likewise.
+ * c-c++-common/ubsan/div-by-zero-4.c: Likewise. Add
+ -fsanitize-undefined-trap-on-error.
+ * c-c++-common/ubsan/float-div-by-zero-2.c: New test.
+ * c-c++-common/ubsan/overflow-div-1.c: New test.
+ * c-c++-common/ubsan/overflow-div-2.c: New test.
+ * c-c++-common/ubsan/overflow-div-3.c: New test.
+
+2021-10-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/cpymem-size.c: Adjust scan for ilp32.
+
+2021-10-01 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.dg/vect/bb-slp-pr97709.c: Fix for computed goto
+ pointers.
+
+2021-10-01 Martin Liska <mliska@suse.cz>
+
+ * gcc.target/i386/avx512er-vrsqrt28ps-3.c: Disable fast math.
+ * gcc.target/i386/avx512er-vrsqrt28ps-5.c: Likewise.
+ * gcc.target/i386/attr-optimize.c: New test.
+
+2021-10-01 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.dg/gomp/order-5.f90: Adjust scan-tree-dump-times regexps.
+
+2021-10-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102496
+ * g++.dg/tls/pr102496-1.C: New test.
+ * g++.dg/tls/pr102496-2.C: New test.
+
+2021-10-01 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/102518
+ * gcc.dg/torture/pr102518.c: New testcase.
+
+2021-09-30 David Edelsohn <dje.gcc@gmail.com>
+
+ * gfortran.dg/c-interop/cf-descriptor-5-c.c: Include alloca.h.
+
+2021-09-30 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/102535
+ * g++.dg/ext/is_trivially_constructible7.C: New test.
+
+2021-09-30 Patrick Palka <ppalka@redhat.com>
+
+ * g++.dg/ext/is_constructible6.C: New test.
+
+2021-09-30 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/95567
+ * g++.dg/cpp2a/spaceship-virtual1.C: New test.
+
+2021-09-30 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102458
+ * gfortran.dg/pr102458b.f90: New test.
+
+2021-09-30 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/89954
+ * gcc.target/i386/pr89954.c: New test.
+
+2021-09-30 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/71703
+ PR fortran/84007
+ * gfortran.dg/c-interop/c535b-1.f90: Remove wrong comment.
+ * gfortran.dg/unlimited_polymorphic_1.f03: Extend.
+ * gfortran.dg/unlimited_polymorphic_32.f90: New test.
+
+2021-09-30 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/102476
+ * gdc.dg/pr102476.d: New test.
+
+2021-09-30 Martin Liska <mliska@suse.cz>
+
+ PR testsuite/102509
+ * gcc.c-torture/compile/attr-complex-method.c: Skip if LTO is
+ used.
+ * gcc.c-torture/compile/attr-complex-method-2.c: Likewise.
+
+2021-09-29 Aldy Hernandez <aldyh@redhat.com>
+
+ PR testsuite/102501
+ * gcc.dg/tree-ssa/pr66752-3.c: Adjust.
+ * gcc.dg/tree-ssa/pr77445-2.c: Adjust.
+
+2021-09-29 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102520
+ * gfortran.dg/pr102520.f90: New test.
+
+2021-09-29 Jeff Law <jeffreyalaw@gmail.com>
+
+ * gcc.c-torture/compile/920831-1.c: Fix computed goto types.
+ * gcc.c-torture/compile/pr27863.c: Likewise.
+
+2021-09-29 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/102517
+ * gcc.dg/pr78408-1.c: Make S not power-of-two size.
+
+2021-09-29 Richard Biener <rguenther@suse.de>
+
+ * gcc.target/i386/vect-alignment-peeling-1.c: New testcase.
+ * gcc.target/i386/vect-alignment-peeling-2.c: Likewise.
+
+2021-09-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+ Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/cpymem-size.c: New test.
+
+2021-09-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+ Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/memset-corner-cases-2.c: New test.
+ * gcc.target/aarch64/memset-strict-align-1.c: Adjust.
+
+2021-09-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/102504
+ * c-c++-common/gomp/scope-4.c: New test.
+
+2021-09-29 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.c-torture/compile/920826-1.c: Fix computed goto.
+ * gcc.c-torture/compile/pr27863.c: Likewise.
+ * gcc.c-torture/compile/pr70190.c: Likewise.
+ * gcc.dg/torture/pr89135.c: Likewise.
+ * gcc.dg/torture/pr90071.c: Likewise.
+ * gcc.dg/vect/bb-slp-pr97709.c: Likewise.
+
+2021-09-29 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/out-of-bounds-1.c: Make memcpied size not power-of-two.
+
+2021-09-28 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99909
+ * g++.dg/cpp2a/concepts-ttp3.C: New test.
+
+2021-09-28 Andrew Pinski <apinski@marvell.com>
+
+ PR c/32122
+ * gcc.dg/comp-goto-5.c: New test.
+ * gcc.dg/comp-goto-6.c: New test.
+
+2021-09-28 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/102454
+ * g++.dg/coroutines/pr102454.C: New test.
+
+2021-09-28 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * gcc.dg/tree-ssa/reassoc-46.c: New test.
+ * gcc.dg/tree-ssa/reassoc-46.h: Common code for new tests.
+ * gcc.dg/tree-ssa/reassoc-47.c: New test.
+ * gcc.dg/tree-ssa/reassoc-48.c: New test.
+ * gcc.dg/tree-ssa/reassoc-49.c: New test.
+ * gcc.dg/tree-ssa/reassoc-50.c: New test.
+ * gcc.dg/tree-ssa/reassoc-51.c: New test.
+
+2021-09-28 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/auto-init-uninit-1.c: Adjust.
+ * gcc.dg/auto-init-uninit-15.c: Same.
+ * gcc.dg/guality/example.c: Same.
+ * gcc.dg/loop-8.c: Same.
+ * gcc.dg/strlenopt-40.c: Same.
+ * gcc.dg/tree-ssa/pr18133-2.c: Same.
+ * gcc.dg/tree-ssa/pr18134.c: Same.
+ * gcc.dg/uninit-1.c: Same.
+ * gcc.dg/uninit-pr44547.c: Same.
+ * gcc.dg/uninit-pr59970.c: Same.
+
+2021-09-28 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gfortran.dg/assumed_rank_22_aux.c: Adjust messages printed.
+
+2021-09-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/102498
+ * gcc.target/i386/pr102498.c: New test.
+
+2021-09-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99793
+ * gcc.dg/tree-ssa/pr99793.c: New testcase.
+
+2021-09-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100112
+ * gcc.dg/tree-ssa/ssa-fre-95.c: New testcase.
+
+2021-09-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/102492
+ * g++.dg/gomp/simd-3.C: New test.
+
+2021-09-28 Aldy Hernandez <aldyh@redhat.com>
+
+ PR tree-optimization/102511
+ * gcc.dg/pr102511.c: New test.
+ * gcc.dg/tree-ssa/ssa-dom-thread-14.c: Adjust.
+
+2021-09-28 Hongyu Wang <hongyu.wang@intel.com>
+
+ PR target/102230
+ * gcc.target/i386/avx512fp16-floatvnhf.c: Remove xfail.
+ * gcc.target/i386/avx512fp16-trunc-extendvnhf.c: Ditto.
+ * gcc.target/i386/avx512fp16-truncvnhf.c: Ditto.
+ * gcc.target/i386/avx512fp16-64-32-vecop-1.c: New test.
+ * gcc.target/i386/avx512fp16-64-32-vecop-2.c: Ditto.
+ * gcc.target/i386/pr102230.c: Ditto.
+
+2021-09-28 Richard Biener <rguenther@suse.de>
+
+ * gcc.target/i386/vect-pr97352.c: Pass -mno-avx2 -mno-avx512f.
+
+2021-09-28 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/102500
+ * gfortran.dg/include_15.f90: Add 'dg-prune-output' to prune
+ -Wmissing-include-dirs output printed or not depending on
+ how the testsuite is run.
+
+2021-09-28 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/vect/bb-slp-pr65935.c: Prefer 128bit vectorization
+ on x86.
+
+2021-09-28 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/auto-init-uninit-1.c: Add -fthread-jumps.
+ * gcc.dg/auto-init-uninit-15.c: Same.
+ * gcc.dg/guality/example.c: Same.
+ * gcc.dg/loop-8.c: Same.
+ * gcc.dg/strlenopt-40.c: Same.
+ * gcc.dg/tree-ssa/pr18133-2.c: Same.
+ * gcc.dg/tree-ssa/pr18134.c: Same.
+ * gcc.dg/uninit-1.c: Same.
+ * gcc.dg/uninit-pr44547.c: Same.
+ * gcc.dg/uninit-pr59970.c: Same.
+
+2021-09-28 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/vect-rebuild.c: Adjust testcases.
+ * gcc.target/i386/avx512f-vect-rebuild.c: New test.
+
+2021-09-28 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-reduce-op-2.c: New test.
+ * gcc.target/i386/avx512fp16-reduce-op-3.c: New test.
+
+2021-09-27 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/102479
+ * g++.dg/cpp1z/class-deduction12.C: Also test alias CTAD in the
+ same way.
+ * g++.dg/cpp1z/class-deduction99.C: New test.
+
+2021-09-27 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/torture/pr55107.c: Adjust.
+ * gcc.dg/tree-ssa/phi_on_compare-1.c: Adjust.
+ * gcc.dg/tree-ssa/phi_on_compare-2.c: Adjust.
+ * gcc.dg/tree-ssa/phi_on_compare-3.c: Adjust.
+ * gcc.dg/tree-ssa/phi_on_compare-4.c: Adjust.
+ * gcc.dg/tree-ssa/pr21559.c: Adjust.
+ * gcc.dg/tree-ssa/pr59597.c: Adjust.
+ * gcc.dg/tree-ssa/pr61839_1.c: Adjust.
+ * gcc.dg/tree-ssa/pr61839_3.c: Adjust.
+ * gcc.dg/tree-ssa/pr71437.c: Adjust.
+ * gcc.dg/tree-ssa/ssa-dom-thread-11.c: Adjust.
+ * gcc.dg/tree-ssa/ssa-dom-thread-16.c: Adjust.
+ * gcc.dg/tree-ssa/ssa-dom-thread-18.c: Adjust.
+ * gcc.dg/tree-ssa/ssa-dom-thread-2a.c: Adjust.
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Adjust.
+ * gcc.dg/tree-ssa/ssa-thread-14.c: Adjust.
+ * gcc.dg/tree-ssa/ssa-vrp-thread-1.c: Adjust.
+ * gcc.dg/tree-ssa/vrp106.c: Adjust.
+ * gcc.dg/tree-ssa/vrp55.c: Adjust.
+
+2021-09-27 Martin Liska <mliska@suse.cz>
+
+ * gcc.c-torture/compile/attr-complex-method-2.c: New test.
+ * gcc.c-torture/compile/attr-complex-method.c: New test.
+
+2021-09-27 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/94070
+ * gfortran.dg/c-interop/cf-out-descriptor-6.f90: Remove xfail.
+ * gfortran.dg/c-interop/size.f90: Remove xfail.
+ * gfortran.dg/intrinsic_size_3.f90: Update scan-tree-dump-times.
+ * gfortran.dg/transpose_optimization_2.f90: Likewise.
+ * gfortran.dg/size_optional_dim_1.f90: Add scan-tree-dump-not.
+ * gfortran.dg/assumed_rank_22.f90: New test.
+ * gfortran.dg/assumed_rank_22_aux.c: New test.
+
+2021-09-27 Andrew Pinski <apinski@marvell.com>
+
+ PR c/94726
+ * gcc.dg/pr94726.c: New test.
+
+2021-09-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/97351
+ PR tree-optimization/97352
+ PR tree-optimization/82426
+ * gcc.target/i386/vect-pr82426.c: New testcase.
+ * gcc.target/i386/vect-pr97352.c: Likewise.
+
+2021-09-27 liuhongt <hongtao.liu@intel.com>
+
+ Revert:
+ 2021-09-27 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101059
+ * gcc.target/i386/sse2-pr101059.c: New test.
+ * gcc.target/i386/sse3-pr101059.c: New test.
+
+2021-09-26 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/101334
+ * gfortran.dg/associated_assumed_rank.f90: New test.
+
+2021-09-25 Dimitar Dimitrov <dimitar@dinux.eu>
+
+ * gcc.target/pru/regio-as-pointer.c: New negative test.
+ * gcc.target/pru/regio-as-pointer-2.c: New negative test.
+ * gcc.target/pru/regio-decl-2.c: New negative test.
+ * gcc.target/pru/regio-decl-3.c: New negative test.
+ * gcc.target/pru/regio-decl-4.c: New negative test.
+ * gcc.target/pru/regio-decl.c: New negative test.
+ * gcc.target/pru/regio-di.c: New negative test.
+ * gcc.target/pru/regio-hi.c: New negative test.
+ * gcc.target/pru/regio-qi.c: New negative test.
+ * gcc.target/pru/regio.c: New test.
+ * gcc.target/pru/regio.h: New helper header.
+
+2021-09-24 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102458
+ * gfortran.dg/pr102458.f90: New test.
+
+2021-09-24 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR fortran/101333
+ * gfortran.dg/c-interop/c407c-1.f90: Remove xfails.
+
+2021-09-24 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/98216
+ PR c++/91292
+ * g++.dg/cpp2a/nontype-float2.C: New test.
+
+2021-09-24 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/55534
+ * gfortran.dg/include_9.f90: Add dg-prune-output.
+ * gfortran.dg/include_23.f90: New test.
+ * gfortran.dg/include_24.f90: New test.
+
+2021-09-24 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/tree-ssa/20030714-2.c: Adjust.
+ * gcc.dg/tree-ssa/pr66752-3.c: Adjust.
+ * gcc.dg/tree-ssa/pr77445-2.c: Adjust.
+ * gcc.dg/tree-ssa/ssa-dom-thread-18.c: Adjust.
+ * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Adjust.
+ * gcc.dg/vect/bb-slp-16.c: Adjust.
+
+2021-09-24 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/cond_op_addsubmuldiv__Float16-1.c: New test.
+ * gcc.target/i386/cond_op_addsubmuldiv__Float16-2.c: Ditto.
+ * gcc.target/i386/cond_op_fma__Float16-1.c: Ditto.
+ * gcc.target/i386/cond_op_fma__Float16-2.c: Ditto.
+ * gcc.target/i386/cond_op_maxmin__Float16-1.c: Ditto.
+ * gcc.target/i386/cond_op_maxmin__Float16-2.c: Ditto.
+
+2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR fortran/101320
+ * gfortran.dg/c-interop/c516.f90: Remove xfails. Add more
+ tests.
+
+2021-09-23 Michel Morin <mimomorin@gmail.com>
+
+ PR c++/77565
+ * g++.dg/spellcheck-pr77565.C: New test.
+
+2021-09-23 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr102463.c: New.
+
+2021-09-23 Harald Anlauf <anlauf@gmx.de>
+ Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/93834
+ * gfortran.dg/coarray/coarray_allocated.f90: New test.
+
+2021-09-23 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR target/102024
+ * g++.target/powerpc/pr102024.C: New.
+
+2021-09-23 Hongyu Wang <hongyu.wang@intel.com>
+
+ * g++.target/i386/avx512fp16-vcondmn-vec.C: New test.
+ * g++.target/i386/avx512fp16-vcondmn-minmax.C: Ditto.
+ * gcc.target/i386/avx512fp16-vcondmn-loop-1.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcondmn-loop-2.c: Ditto.
+ * gcc.target/i386/avx512fp16-vec_cmpmn.c: Ditto.
+
+2021-09-23 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/avx512fp16-trunc-extendvnhf.c: New test.
+
+2021-09-23 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/avx512fp16-floatvnhf.c: New test.
+
+2021-09-23 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/avx512fp16-trunchf.c: New test.
+ * gcc.target/i386/avx512fp16-truncvnhf.c: Ditto.
+
+2021-09-23 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/avx512fp16-builtin-minmax-1.c: New test.
+
+2021-09-23 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-fma-1.c: New test.
+ * gcc.target/i386/avx512fp16vl-fma-1.c: New test.
+ * gcc.target/i386/avx512fp16vl-fma-vectorize-1.c: New test.
+
+2021-09-23 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-builtin-round-1.c: Add new testcase.
+
+2021-09-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102413
+ * g++.dg/gomp/attrs-14.C: New test.
+
+2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR fortran/101319
+ * gfortran.dg/c-interop/assumed-type-dummy.f90: Remove xfail.
+
+2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR fortran/101334
+ * gfortran.dg/c-interop/c535b-2.f90: Remove xfails.
+ * gfortran.dg/c-interop/c535b-3.f90: Likewise.
+
+2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
+
+ * gfortran.dg/assumed_rank_18.f90 (g): Wrap call to h in
+ select rank.
+ * gfortran.dg/assumed_type_10.f90 (test_array): Likewise for
+ call to test_lib.
+ * gfortran.dg/assumed_type_11.f90 (test_array): Likewise.
+
+2021-09-22 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/55534
+ * gfortran.dg/include_14.f90: Add -J testcase and update dg-output.
+ * gfortran.dg/include_15.f90: Likewise.
+ * gfortran.dg/include_16.f90: Likewise.
+ * gfortran.dg/include_17.f90: Likewise.
+ * gfortran.dg/include_18.f90: Likewise.
+ * gfortran.dg/include_19.f90: Likewise.
+
+2021-09-22 Roger Sayle <roger@nextmovesoftware.com>
+ Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/fold-negate-1.c: New test case.
+
+2021-09-22 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/auto-init-2.c: Replace ia32 with { ! lp64 }.
+ * gcc.target/i386/auto-init-3.c (dg-options): Add -msse.
+ (dg-additional-options): Add -mfpmath=387 for ia32.
+ Replace lp64 with { ! ia32 }. Add a space after ia32.
+ * gcc.target/i386/auto-init-4.c: Replace lp64 with { ! ia32 }.
+ * gcc.target/i386/auto-init-5.c: Likewise.
+ * gcc.target/i386/auto-init-padding-3.c: Likewise.
+ * gcc.target/i386/auto-init-padding-7.c: Likewise.
+ * gcc.target/i386/auto-init-padding-8.c: Likewise.
+ * gcc.target/i386/auto-init-padding-9.c: Likewise.
+
+2021-09-22 Patrick Palka <ppalka@redhat.com>
+
+ DR 2446
+ PR c++/102412
+ * g++.dg/cpp2a/concepts-nondep2.C: New test.
+ * g++.dg/cpp2a/concepts-nondep3.C: New test.
+
+2021-09-22 Jiufu Guo <guojiufu@linux.ibm.com>
+
+ PR tree-optimization/102087
+ * gcc.dg/pr102087.c: New test.
+
+2021-09-22 dianhong xu <dianhong.xu@intel.com>
+
+ * gcc.target/i386/avx512fp16-14.c: New test.
+
+2021-09-22 dianhong xu <dianhong.xu@intel.com>
+
+ * gcc.target/i386/avx512fp16-conjugation-1.c: New test.
+ * gcc.target/i386/avx512fp16vl-conjugation-1.c: New test.
+
+2021-09-22 dianhong xu <dianhong.xu@intel.com>
+
+ * gcc.target/i386/avx512fp16-reduce-op-1.c: New test.
+ * gcc.target/i386/avx512fp16vl-reduce-op-1.c: Ditto.
+
+2021-09-22 dianhong xu <dianhong.xu@intel.com>
+
+ * gcc.target/i386/avx512fp16-13.c: New test.
+
+2021-09-22 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * gcc.target/s390/pr102222.c: New test.
+
+2021-09-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/102415
+ * c-c++-common/gomp/scope-3.c: New test.
+
+2021-09-22 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/allocate-6.c: New test.
+ * c-c++-common/gomp/allocate-7.c: New test.
+ * g++.dg/gomp/allocate-4.C: New test.
+
+2021-09-22 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512vl-pr95046.c: New test.
+
+2021-09-22 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr92658-avx512f.c: Refine testcase.
+ * gcc.target/i386/pr92658-avx512vl.c: Adjust scan-assembler,
+ only v2di->v2qi truncate is not supported, v4di->v4qi should
+ be supported.
+
+2021-09-22 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-builtin-fpcompare-1.c: New test.
+ * gcc.target/i386/avx512fp16-builtin-fpcompare-2.c: New test.
+
+2021-09-22 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-builtin-round-1.c: New test.
+
+2021-09-22 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-builtin-sqrt-1.c: New test.
+ * gcc.target/i386/avx512fp16vl-builtin-sqrt-1.c: New test.
+
+2021-09-22 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vfcmaddcsh-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vfcmaddcsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfcmulcsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfcmulcsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmaddcsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmaddcsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmulcsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmulcsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-complex-constraints.c: Ditto.
+
+2021-09-22 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-22 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-helper.h
+ (init_src): Adjust init value.
+ (NET_CMASK): New net mask for complex input.
+ * gcc.target/i386/avx512fp16-vfcmaddcph-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vfcmaddcph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfcmulcph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfcmulcph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmaddcph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmaddcph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmulcph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmulcph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfcmaddcph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfcmaddcph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfcmulcph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfcmulcph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfmaddcph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfmaddcph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfmulcph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfmulcph-1b.c: Ditto.
+
+2021-09-22 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-22 Barrett Adair <barrettellisadair@gmail.com>
+
+ * g++.dg/cpp0x/constexpr-52830.C: Remove unwanted dg-ice.
+ * g++.dg/template/canon-type-15.C: New test.
+ * g++.dg/template/canon-type-16.C: New test.
+ * g++.dg/template/canon-type-17.C: New test.
+ * g++.dg/template/canon-type-18.C: New test.
+ * g++.dg/template/dependent-name15.C: New regression test.
+ * g++.dg/template/dependent-name16.C: New regression test.
+
+2021-09-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102421
+ * g++.dg/vect/pr102421.cc: New testcase.
+
+2021-09-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * lib/target-supports.exp (no_fsanitize_address): Add missing bits.
+ * gcc.dg/uninit-pr93100.c: Skip if no_fsanitize_address.
+ * gcc.dg/pr91441.c: Likewise.
+ * gcc.dg/pr96260.c: Likewise.
+ * gcc.dg/pr96307.c: Likewise.
+ * g++.dg/warn/uninit-pr93100.C: Likewise.
+ * gnat.dg/asan1.adb: Likewise.
+ * gcc.dg/Wstringop-overflow-70.c: Adjust for SPARC.
+ * g++.dg/abi/anon4.C: Likewise.
+
+2021-09-21 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/include_6.f90: Change dg-error to
+ dg-warning and update pattern.
+ * gfortran.dg/include_14.f90: New test.
+ * gfortran.dg/include_15.f90: New test.
+ * gfortran.dg/include_16.f90: New test.
+ * gfortran.dg/include_17.f90: New test.
+ * gfortran.dg/include_18.f90: New test.
+ * gfortran.dg/include_19.f90: New test.
+ * gfortran.dg/include_20.f90: New test.
+ * gfortran.dg/include_21.f90: New test.
+
+2021-09-21 wangpc <pc.wang@linux.alibaba.com>
+
+ * g++.target/aarch64/sve/static-var-in-template.C: New test.
+
+2021-09-20 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/tree-ssa/evrp-ignore.c: New.
+
+2021-09-20 Matthias Kretz <m.kretz@gsi.de>
+
+ * gcc.dg/associative-math-1.c: New test.
+ * gcc.dg/associative-math-2.c: New test.
+ * gcc.dg/no-signed-zeros-1.c: New test.
+ * gcc.dg/no-signed-zeros-2.c: New test.
+ * gcc.dg/no-trapping-math-1.c: New test.
+ * gcc.dg/no-trapping-math-2.c: New test.
+ * gcc.dg/reciprocal-math-1.c: New test.
+ * gcc.dg/reciprocal-math-2.c: New test.
+ * gcc.dg/rounding-math-1.c: New test.
+ * gcc.dg/rounding-math-2.c: New test.
+
+2021-09-20 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/order-5.f90: New test.
+ * gfortran.dg/gomp/order-6.f90: New test.
+ * gfortran.dg/gomp/order-7.f90: New test.
+ * gfortran.dg/gomp/order-8.f90: New test.
+ * gfortran.dg/gomp/order-9.f90: New test.
+
+2021-09-20 Christophe Lyon <christophe.lyon@foss.st.com>
+ Torbjörn SVENSSON <torbjorn.svensson@st.com>
+
+ * lib/prune.exp (prune_gcc_output): Remove .exe suffix from
+ toolchain executables names.
+
+2021-09-20 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gcc.dg/plugin/diagnostic-test-string-literals-1.c: Adjust
+ expected error diagnostics.
+
+2021-09-20 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/65206
+ * gcc.dg/torture/20210916.c: New testcase.
+ * gcc.dg/vect/pr65206.c: Likewise.
+
+2021-09-19 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/102403
+ * gcc.dg/uninit-pr102403.c: New test.
+ * gcc.dg/uninit-pr102403-c2.c: New test.
+
+2021-09-19 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/102243
+ * g++.dg/warn/Wplacement-new-size-10.C: New test.
+
+2021-09-19 Jeff Law <jeffreyalaw@gmail.com>
+
+ * gfortran.dg/goacc/privatization-1-compute.f90: Make test names
+ unique.
+ * gfortran.dg/goacc/routine-external-level-of-parallelism-2.f:
+ Likewise.
+
+2021-09-19 Iain Sandoe <iain@sandoe.co.uk>
+
+ * jit.dg/jit.exp (fixed_local_execute): Amend the match and
+ exit conditions to cater for more platforms.
+
+2021-09-19 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR middle-end/88173
+ * c-c++-common/pr57371-4.c: Tweak/correct test case for QNaNs.
+ * g++.dg/pr88173-1.C: New test case.
+ * g++.dg/pr88173-2.C: New test case.
+
+2021-09-18 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/order-1.c (f2): Add tests for distribute
+ with order clause.
+ (f3): Remove.
+ * c-c++-common/gomp/order-2.c: Don't expect error for distribute
+ with order clause.
+ * c-c++-common/gomp/order-5.c: New test.
+ * c-c++-common/gomp/order-6.c: New test.
+ * c-c++-common/gomp/clause-dups-1.c (f1): Add tests for
+ duplicated order clause.
+ (f9): New function.
+ * c-c++-common/gomp/clauses-1.c (baz, bar): Don't mix copyin and
+ order(concurrent) clauses on the same composite construct combined
+ with distribute, instead split it into two tests, one without
+ copyin and one without order(concurrent). Add order(concurrent)
+ clauses to {,{,target} teams} distribute.
+ * g++.dg/gomp/attrs-1.C (baz, bar): Likewise.
+ * g++.dg/gomp/attrs-2.C (baz, bar): Likewise.
+
+2021-09-18 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/default-2.c: New test.
+ * c-c++-common/gomp/default-3.c: New test.
+ * g++.dg/gomp/default-1.C: New test.
+
+2021-09-18 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vfmaddXXXsh-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vfmaddXXXsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmsubXXXsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmsubXXXsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfnmaddXXXsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfnmaddXXXsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfnmsubXXXsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfnmsubXXXsh-1b.c: Ditto.
+
+2021-09-18 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-18 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/avx512fp16-xorsign-1.c: New test.
+
+2021-09-18 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-neg-1a.c: New test.
+ * gcc.target/i386/avx512fp16-neg-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-scalar-bitwise-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-scalar-bitwise-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vector-bitwise-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vector-bitwise-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-neg-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-neg-1b.c: Ditto.
+
+2021-09-18 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vfmaddXXXph-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vfmaddXXXph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmsubXXXph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmsubXXXph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfnmaddXXXph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfnmaddXXXph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfnmsubXXXph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfnmsubXXXph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfmaddXXXph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfmaddXXXph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfmsubXXXph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfmsubXXXph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfnmaddXXXph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfnmaddXXXph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfnmsubXXXph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfnmsubXXXph-1b.c: Ditto.
+
+2021-09-18 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test fot new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-18 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vfmaddsubXXXph-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vfmaddsubXXXph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmsubaddXXXph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfmsubaddXXXph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfmaddsubXXXph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfmaddsubXXXph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfmsubaddXXXph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfmsubaddXXXph-1b.c: Ditto.
+
+2021-09-18 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-18 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-broadcast-1.c: New test.
+ * gcc.target/i386/avx512fp16-broadcast-2.c: New test.
+
+2021-09-18 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/template/dtor5.C: Adjust expected error.
+ * g++.dg/cpp23/lookup2.C: New test.
+ * g++.dg/template/dtor11.C: New test.
+
+2021-09-17 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102366
+ * gfortran.dg/pr102366.f90: New test.
+
+2021-09-17 qing zhao <qing.zhao@oracle.com>
+
+ * gcc.target/i386/auto-init-1.c: Restrict the testing only for
+ -march=x86-64 and -mtune=generic. Add -fno-stack-protector.
+ * gcc.target/i386/auto-init-2.c: Restrict the testing only for
+ -march=x86-64 and -mtune=generic -msse.
+ * gcc.target/i386/auto-init-3.c: Likewise.
+ * gcc.target/i386/auto-init-4.c: Likewise.
+ * gcc.target/i386/auto-init-5.c: Different pattern match for lp64 and
+ ia32.
+ * gcc.target/i386/auto-init-6.c: Restrict the testing only for
+ -march=x86-64 and -mtune-generic -msse. Add -fno-stack-protector.
+ * gcc.target/i386/auto-init-7.c: Likewise.
+ * gcc.target/i386/auto-init-8.c: Restrict the testing only for
+ -march=x86-64 and -mtune=generic -msse..
+ * gcc.target/i386/auto-init-padding-1.c: Likewise.
+ * gcc.target/i386/auto-init-padding-10.c: Likewise.
+ * gcc.target/i386/auto-init-padding-11.c: Likewise.
+ * gcc.target/i386/auto-init-padding-12.c: Likewise.
+ * gcc.target/i386/auto-init-padding-2.c: Likewise.
+ * gcc.target/i386/auto-init-padding-3.c: Restrict the testing only for
+ -march=x86-64. Different pattern match for lp64 and ia32.
+ * gcc.target/i386/auto-init-padding-4.c: Restrict the testing only for
+ -march=x86-64 and -mtune-generic -msse.
+ * gcc.target/i386/auto-init-padding-5.c: Likewise.
+ * gcc.target/i386/auto-init-padding-6.c: Likewise.
+ * gcc.target/i386/auto-init-padding-7.c: Restrict the testing only for
+ -march=x86-64 and -mtune-generic -msse. Add -fno-stack-protector.
+ * gcc.target/i386/auto-init-padding-8.c: Likewise.
+ * gcc.target/i386/auto-init-padding-9.c: Restrict the testing only for
+ -march=x86-64. Different pattern match for lp64 and ia32.
+
+2021-09-17 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/102200
+ * gcc.dg/Wstringop-overflow-62.c: Adjust text of an expected note.
+ * gcc.dg/Warray-bounds-89.c: New test.
+ * gcc.dg/Wstringop-overflow-74.c: New test.
+ * gcc.dg/Wstringop-overflow-75.c: New test.
+ * gcc.dg/Wstringop-overflow-76.c: New test.
+
+2021-09-17 Sandra Loosemore <sandra@codesourcery.com>
+
+ * gfortran.dg/PR100914.c: Do not include quadmath.h. Use
+ _Float128 _Complex instead of __complex128.
+ * gfortran.dg/PR100914.f90: Add -Wno-pedantic to suppress error
+ about use of _Float128.
+ * gfortran.dg/c-interop/typecodes-array-float128-c.c: Use
+ _Float128 instead of __float128.
+ * gfortran.dg/c-interop/typecodes-sanity-c.c: Likewise.
+ * gfortran.dg/c-interop/typecodes-scalar-float128-c.c: Likewise.
+ * lib/target-supports.exp
+ (check_effective_target_fortran_real_c_float128): Update comments.
+
+2021-09-17 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR c/102245
+ * gcc.dg/Wint-in-bool-context-4.c: New test case.
+
+2021-09-17 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/atomic-18.c: Expect same diagnostics in C++ as in
+ C.
+ * c-c++-common/gomp/atomic-25.c: Drop c effective target.
+ * c-c++-common/gomp/atomic-26.c: Likewise.
+ * c-c++-common/gomp/atomic-27.c: Likewise.
+ * c-c++-common/gomp/atomic-28.c: Likewise.
+ * c-c++-common/gomp/atomic-29.c: Likewise.
+ * c-c++-common/gomp/atomic-30.c: Likewise. Adjust expected diagnostics
+ for C++ when it differs from C.
+ (foo): Change return type from double to void.
+ * g++.dg/gomp/atomic-5.C: Adjust expected diagnostics wording.
+ * g++.dg/gomp/atomic-20.C: New test.
+
+2021-09-17 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/avx-covert-1.c: New file.
+ * gcc.target/i386/avx-fp-covert-1.c: Likewise.
+ * gcc.target/i386/avx-int-covert-1.c: Likewise.
+ * gcc.target/i386/sse-covert-1.c: Likewise.
+ * gcc.target/i386/sse-fp-covert-1.c: Likewise.
+ * gcc.target/i386/sse-int-covert-1.c: Likewise.
+
+2021-09-17 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101900
+ * gcc.target/i386/pr101900-1.c: New test.
+ * gcc.target/i386/pr101900-2.c: Likewise.
+ * gcc.target/i386/pr101900-3.c: Likewise.
+
+2021-09-17 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.target/sparc/20210917-1.c: New test.
+
+2021-09-17 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-typecast-1.c: New test.
+ * gcc.target/i386/avx512fp16-typecast-2.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-typecast-1.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-typecast-2.c: Ditto.
+
+2021-09-17 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vcvtsd2sh-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vcvtsd2sh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsh2sd-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsh2sd-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsh2ss-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsh2ss-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtss2sh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtss2sh-1b.c: Ditto.
+
+2021-09-17 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-17 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-helper.h (V512): Add DF contents.
+ (src3f): New.
+ * gcc.target/i386/avx512fp16-vcvtpd2ph-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vcvtpd2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2pd-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2pd-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2psx-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2psx-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtps2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtps2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtpd2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtpd2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2pd-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2pd-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2psx-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2psx-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtps2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtps2ph-1b.c: Ditto.
+
+2021-09-17 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-17 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vcvttsh2si-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vcvttsh2si-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttsh2si64-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttsh2si64-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttsh2usi-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttsh2usi-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttsh2usi64-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttsh2usi64-1b.c: Ditto.
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-17 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vcvttph2dq-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vcvttph2dq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttph2qq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttph2qq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttph2udq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttph2udq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttph2uqq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttph2uqq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttph2uw-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttph2uw-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttph2w-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvttph2w-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvttph2dq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvttph2dq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvttph2qq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvttph2qq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvttph2udq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvttph2udq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvttph2uqq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvttph2uqq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvttph2uw-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvttph2uw-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvttph2w-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvttph2w-1b.c: Ditto.
+
+2021-09-17 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-17 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-helper.h (V512): Add int32
+ component.
+ * gcc.target/i386/avx512fp16-vcvtsh2si-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vcvtsh2si-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsh2si64-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsh2si64-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsh2usi-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsh2usi-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsh2usi64-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsh2usi64-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsi2sh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsi2sh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsi2sh64-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtsi2sh64-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtusi2sh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtusi2sh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtusi2sh64-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtusi2sh64-1b.c: Ditto.
+
+2021-09-17 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-16 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/98486
+ * g++.dg/cpp2a/concepts-var-templ1.C: New test.
+ * g++.dg/cpp2a/concepts-var-templ1a.C: New test.
+ * g++.dg/cpp2a/concepts-var-templ1b.C: New test.
+
+2021-09-16 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102287
+ * gfortran.dg/intent_out_14.f90: New test.
+
+2021-09-16 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/102360
+ * g++.dg/pr102360.C: New testcase.
+
+2021-09-16 Richard Earnshaw <rearnsha@arm.com>
+
+ * g++.dg/eh/arm-vfp-unwind.C: Support single-precision.
+
+2021-09-16 liuhongt <hongtao.liu@intel.com>
+
+ PR middle-end/102080
+ * gcc.target/i386/pr102080.c: New test.
+
+2021-09-16 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vcvtdq2ph-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vcvtdq2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtqq2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtqq2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtudq2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtudq2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtuqq2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtuqq2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtuw2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtuw2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtw2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtw2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtdq2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtdq2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtqq2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtqq2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtudq2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtudq2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtuqq2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtuqq2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtuw2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtuw2ph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtw2ph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtw2ph-1b.c: Ditto.
+
+2021-09-16 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-16 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-helper.h (V512): Add QI
+ components.
+ * gcc.target/i386/avx512fp16-vcvtph2dq-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vcvtph2dq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2qq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2qq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2udq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2udq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2uqq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2uqq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2uw-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2uw-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2w-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcvtph2w-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2dq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2dq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2qq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2qq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2udq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2udq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2uqq-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2uqq-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2uw-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2uw-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2w-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcvtph2w-1b.c: Ditto.
+
+2021-09-16 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-16 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vmovsh-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vmovsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmovw-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmovw-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmovw-2a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmovw-2b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmovw-3a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmovw-3b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmovw-4a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmovw-4b.c: Ditto.
+
+2021-09-15 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101904
+ * g++.dg/ext/conv2.C: New test.
+ * g++.dg/template/conv17.C: Extend test.
+
+2021-09-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/88578
+ PR c++/102295
+ * g++.dg/ext/flexary39.C: New test.
+ * g++.dg/ext/flexary40.C: New test.
+
+2021-09-15 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/102050
+ * g++.dg/cpp0x/initlist125.C: New test.
+ * g++.dg/cpp0x/initlist126.C: New test.
+
+2021-09-15 Alexandre Oliva <oliva@adacore.com>
+
+ * gnat.dg/zcur_attr.adb, gnat.dg/zcur_attr.ads: New.
+
+2021-09-15 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr102327-1.c: New test.
+ * gcc.target/i386/pr102327-2.c: New test.
+ * gcc.target/i386/avx512fp16-1c.c: Adjust testcase.
+
+2021-09-15 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/avx-1.c: Adjust builtin macros.
+ * gcc.target/i386/sse-13.c: Likewise.
+ * gcc.target/i386/sse-23.c: Likewise.
+
+2021-09-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102318
+ * gcc.dg/vect/pr102318.c: New testcase.
+
+2021-09-15 Hongtao Liu <hongtao.liu@intel.com>
+ Peter Cordes <peter@cordes.ca>
+
+ PR target/91103
+ * gcc.target/i386/pr91103-1.c: Add extract tests.
+ * gcc.target/i386/pr91103-2.c: Ditto.
+
+2021-09-15 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gfortran.dg/goacc/unexpected-end.f90: Add OpenACC 'host_data'
+ testing.
+
+2021-09-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/48396
+ * g++.dg/rtti/undeclared1.C: New test.
+
+2021-09-14 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102311
+ * gfortran.dg/entry_25.f90: New test.
+
+2021-09-14 Peter Bergner <bergner@linux.ibm.com>
+
+ * gcc.target/powerpc/mma-builtin-6.c: Add second call to xxsetacc
+ built-in. Update instruction counts.
+
+2021-09-14 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/102163
+ * g++.dg/cpp0x/constexpr-empty17.C: New test.
+
+2021-09-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102295
+ * g++.target/i386/pr102295.C: New test.
+
+2021-09-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/102305
+ * g++.dg/cpp0x/pr102305.C: New test.
+
+2021-09-14 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/102313
+ * gfortran.dg/goacc/unexpected-end.f90: New test.
+ * gfortran.dg/gomp/unexpected-end.f90: New test.
+
+2021-09-14 Martin Liska <mliska@suse.cz>
+
+ * g++.dg/gcov/gcov.py: Fix failing pytests as gcov.json.gz
+ filename was changed in b777f228b481ae881a7fbb09de367a053740932c.
+
+2021-09-14 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/enum_rep2.adb: New test.
+
+2021-09-14 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/atomic-29.c: Add -march=pentium
+ dg-additional-options for ia32. Use sync_long_long effective target
+ instead of sync_int_long.
+ * lib/target-supports.exp (check_effective_target_sync_long_long): Fix
+ a syntax error.
+
+2021-09-14 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-helper.h (V512):
+ Add xmm component.
+ * gcc.target/i386/avx512fp16-vfpclassph-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vfpclassph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfpclasssh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vfpclasssh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vgetexpph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vgetexpph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vgetexpsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vgetexpsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vgetmantph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vgetmantph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vgetmantsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vgetmantsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfpclassph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vfpclassph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vgetexpph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vgetexpph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vgetmantph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vgetmantph-1b.c: Ditto.
+
+2021-09-14 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-14 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-helper.h (_ROUND_CUR): New macro.
+ * gcc.target/i386/avx512fp16-vreduceph-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vreduceph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vreducesh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vreducesh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vrndscaleph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vrndscaleph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vrndscalesh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vrndscalesh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vreduceph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vreduceph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vrndscaleph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vrndscaleph-1b.c: Ditto.
+
+2021-09-14 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-14 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vrcpph-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vrcpph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vrcpsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vrcpsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vscalefph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vscalefph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vscalefsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vscalefsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vrcpph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vrcpph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vscalefph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vscalefph-1b.c: Ditto.
+
+2021-09-14 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-14 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vrsqrtph-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vrsqrtph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vrsqrtsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vrsqrtsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vsqrtph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vsqrtph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vsqrtsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vsqrtsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vrsqrtph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vrsqrtph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vsqrtph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vsqrtph-1b.c: Ditto.
+
+2021-09-14 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-13 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/82314
+ * gfortran.dg/pr82314.f90: New test.
+
+2021-09-13 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/85130
+ * gfortran.dg/substr_6.f90: Revert commit r8-7574, adding again
+ test that was erroneously considered as illegal.
+
+2021-09-13 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/warn/Winterference.H: New file.
+ * g++.dg/warn/Winterference.C: New test.
+ * g++.target/aarch64/interference.C: New test.
+ * g++.target/arm/interference.C: New test.
+ * g++.target/i386/interference.C: New test.
+ * g++.dg/warn/Winterference-2.C: New file.
+
+2021-09-13 Martin Liska <mliska@suse.cz>
+ H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101696
+ * g++.target/i386/mv30.C: New test.
+ * gcc.target/i386/mvc16.c: New test.
+ * gcc.target/i386/builtin_target.c (CHECK___builtin_cpu_supports):
+ New.
+
+2021-09-13 Andrew Pinski <apinski@marvell.com>
+
+ PR target/95969
+ * gcc.target/aarch64/lane-bound-1.c: New test.
+ * gcc.target/aarch64/lane-bound-2.c: New test.
+
+2021-09-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/102252
+ * g++.target/aarch64/sve/pr102252.C: New test.
+
+2021-09-13 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/tree-ssa/pr21417.c: Adjust for FSM removal.
+ * gcc.dg/tree-ssa/pr66752-3.c: Same.
+ * gcc.dg/tree-ssa/pr68198.c: Same.
+ * gcc.dg/tree-ssa/pr69196-1.c: Same.
+ * gcc.dg/tree-ssa/pr70232.c: Same.
+ * gcc.dg/tree-ssa/pr77445.c: Same.
+ * gcc.dg/tree-ssa/ranger-threader-4.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-18.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-6.c: Same.
+ * gcc.dg/tree-ssa/ssa-thread-12.c: Same.
+ * gcc.dg/tree-ssa/ssa-thread-13.c: Same.
+
+2021-09-13 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101764
+ * g++.dg/cpp1z/constexpr-if35.C: New test.
+
+2021-09-13 Martin Liska <mliska@suse.cz>
+
+ PR c++/101331
+ * g++.dg/pr101331.C: New test.
+
+2021-09-13 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Adjust for aarch64.
+
+2021-09-13 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101935
+ * g++.target/i386/pr80566-1.C: Add
+ -mtune-ctrl=avx256_store_by_pieces.
+ * gcc.target/i386/pr100865-4a.c: Likewise.
+ * gcc.target/i386/pr100865-10a.c: Likewise.
+ * gcc.target/i386/pr90773-20.c: Likewise.
+ * gcc.target/i386/pr90773-21.c: Likewise.
+ * gcc.target/i386/pr90773-22.c: Likewise.
+ * gcc.target/i386/pr90773-23.c: Likewise.
+ * g++.target/i386/pr80566-2.C: Add
+ -mtune-ctrl=avx256_move_by_pieces.
+ * gcc.target/i386/eh_return-1.c: Likewise.
+ * gcc.target/i386/pr90773-26.c: Likewise.
+ * gcc.target/i386/pieces-memcpy-12.c: Replace -mtune=haswell
+ with -mtune-ctrl=avx256_move_by_pieces.
+ * gcc.target/i386/pieces-memcpy-15.c: Likewise.
+ * gcc.target/i386/pieces-memset-2.c: Replace -mtune=haswell
+ with -mtune-ctrl=avx256_store_by_pieces.
+ * gcc.target/i386/pieces-memset-5.c: Likewise.
+ * gcc.target/i386/pieces-memset-11.c: Likewise.
+ * gcc.target/i386/pieces-memset-14.c: Likewise.
+ * gcc.target/i386/pieces-memset-20.c: Likewise.
+ * gcc.target/i386/pieces-memset-23.c: Likewise.
+ * gcc.target/i386/pieces-memset-29.c: Likewise.
+ * gcc.target/i386/pieces-memset-30.c: Likewise.
+ * gcc.target/i386/pieces-memset-33.c: Likewise.
+ * gcc.target/i386/pieces-memset-34.c: Likewise.
+ * gcc.target/i386/pieces-memset-44.c: Likewise.
+ * gcc.target/i386/pieces-memset-37.c: Replace -mtune=generic
+ with -mtune-ctrl=avx256_store_by_pieces.
+
+2021-09-12 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/102185
+ * gdc.dg/pr102185.d: New test.
+
+2021-09-11 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/auto-init-1.c: Enable test only on ilp32 or lp64
+ targets, expect different long and pointer sizes between ilp32 and
+ lp64.
+ * c-c++-common/auto-init-2.c: Likewise.
+ * c-c++-common/auto-init-3.c: Expect one of the common long double
+ sizes (8/12/16 bytes) instead of hardcoding 16 bytes.
+ * c-c++-common/auto-init-4.c: Likewise.
+ * c-c++-common/auto-init-5.c: Expect one of the common
+ _Complex long double sizes (16/24/32 bytes) instead of hardcoding 32
+ bytes.
+ * c-c++-common/auto-init-6.c: Likewise.
+ * c-c++-common/auto-init-padding-1.c: Enable test only on ilp32 or lp64
+ targets.
+ (struct test_small_hole): Change type of four to unsigned long long
+ and add aligned attribute.
+
+2021-09-10 Petter Tomner <tomner@kth.se>
+
+ * jit.dg/test-error-array-bounds.c: Array is not unsigned
+ * jit.dg/jit.exp: Helper function
+ * jit.dg/test-debuginfo.c: New testcase
+
+2021-09-10 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/atomic-17.c (foo): Add tests for atomic read,
+ write or update with acq_rel clause and atomic update with acquire clause.
+ * c-c++-common/gomp/atomic-18.c (foo): Adjust expected diagnostics
+ wording, remove tests moved to atomic-17.c.
+ * c-c++-common/gomp/atomic-21.c: Expect only 2 omp atomic release and
+ 2 omp atomic acq_rel directives instead of 4 omp atomic release.
+ * c-c++-common/gomp/atomic-25.c: New test.
+ * c-c++-common/gomp/atomic-26.c: New test.
+ * c-c++-common/gomp/atomic-27.c: New test.
+ * c-c++-common/gomp/atomic-28.c: New test.
+ * c-c++-common/gomp/atomic-29.c: New test.
+ * c-c++-common/gomp/atomic-30.c: New test.
+ * c-c++-common/goacc-gomp/atomic.c: Expect 1 omp atomic release and
+ 1 omp atomic_acq_rel instead of 2 omp atomic release directives.
+ * gcc.dg/gomp/atomic-5.c: Adjust expected error diagnostic wording.
+ * g++.dg/gomp/atomic-18.C:Expect 4 omp atomic release and
+ 1 omp atomic_acq_rel instead of 5 omp atomic release directives.
+
+2021-09-10 Aldy Hernandez <aldyh@redhat.com>
+ Michael Matz <matz@suse.de>
+
+ * gcc.dg/tree-ssa/ssa-dom-thread-2b.c: Adjust for disabling of
+ threading through latches.
+ * gcc.dg/tree-ssa/ssa-dom-thread-6.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same.
+
+2021-09-10 David Faust <david.faust@oracle.com>
+
+ * gcc.target/bpf/alu-1.c: New test.
+ * gcc.target/bpf/jmp-1.c: New test.
+
+2021-09-10 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/102273
+ * gcc.dg/pr102273.c: New testcase.
+
+2021-09-10 Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-c++-common/auto-init-padding-2.c: Fix 'dg-do run' syntax.
+ * c-c++-common/auto-init-padding-3.c: Likewise.
+
+2021-09-10 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/102269
+ * gcc.dg/pr102269.c: New testcase.
+
+2021-09-10 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-helper.h
+ (check_results_mask): New check_function.
+ * gcc.target/i386/avx512fp16-vcmpph-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vcmpph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcmpsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcmpsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcomish-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcomish-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vcomish-1c.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcmpph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vcmpph-1b.c: Ditto.
+
+2021-09-10 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-10 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vmaxph-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vmaxph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmaxsh-1.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmaxsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vminph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vminph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vminsh-1.c: Ditto.
+ * gcc.target/i386/avx512fp16-vminsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vmaxph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vmaxph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vminph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vminph-1b.c: Ditto.
+
+2021-09-10 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-10 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-vaddsh-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vaddsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vdivsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vdivsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmulsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmulsh-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vsubsh-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vsubsh-1b.c: Ditto.
+ * gcc.target/i386/pr54855-11.c: Ditto.
+
+2021-09-10 Liu, Hongtao <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add test for new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-10 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/vect-float16-1.c: New test.
+ * gcc.target/i386/vect-float16-10.c: Ditto.
+ * gcc.target/i386/vect-float16-11.c: Ditto.
+ * gcc.target/i386/vect-float16-12.c: Ditto.
+ * gcc.target/i386/vect-float16-2.c: Ditto.
+ * gcc.target/i386/vect-float16-3.c: Ditto.
+ * gcc.target/i386/vect-float16-4.c: Ditto.
+ * gcc.target/i386/vect-float16-5.c: Ditto.
+ * gcc.target/i386/vect-float16-6.c: Ditto.
+ * gcc.target/i386/vect-float16-7.c: Ditto.
+ * gcc.target/i386/vect-float16-8.c: Ditto.
+ * gcc.target/i386/vect-float16-9.c: Ditto.
+
+2021-09-10 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512dq-abs-copysign-1.c: Adjust testcase.
+ * gcc.target/i386/avx512vl-abs-copysign-1.c: Adjust testcase.
+
+2021-09-09 qing zhao <qing.zhao@oracle.com>
+
+ * c-c++-common/auto-init-1.c: New test.
+ * c-c++-common/auto-init-10.c: New test.
+ * c-c++-common/auto-init-11.c: New test.
+ * c-c++-common/auto-init-12.c: New test.
+ * c-c++-common/auto-init-13.c: New test.
+ * c-c++-common/auto-init-14.c: New test.
+ * c-c++-common/auto-init-15.c: New test.
+ * c-c++-common/auto-init-16.c: New test.
+ * c-c++-common/auto-init-2.c: New test.
+ * c-c++-common/auto-init-3.c: New test.
+ * c-c++-common/auto-init-4.c: New test.
+ * c-c++-common/auto-init-5.c: New test.
+ * c-c++-common/auto-init-6.c: New test.
+ * c-c++-common/auto-init-7.c: New test.
+ * c-c++-common/auto-init-8.c: New test.
+ * c-c++-common/auto-init-9.c: New test.
+ * c-c++-common/auto-init-esra.c: New test.
+ * c-c++-common/auto-init-padding-1.c: New test.
+ * c-c++-common/auto-init-padding-2.c: New test.
+ * c-c++-common/auto-init-padding-3.c: New test.
+ * g++.dg/auto-init-uninit-pred-1_a.C: New test.
+ * g++.dg/auto-init-uninit-pred-2_a.C: New test.
+ * g++.dg/auto-init-uninit-pred-3_a.C: New test.
+ * g++.dg/auto-init-uninit-pred-4.C: New test.
+ * gcc.dg/auto-init-sra-1.c: New test.
+ * gcc.dg/auto-init-sra-2.c: New test.
+ * gcc.dg/auto-init-uninit-1.c: New test.
+ * gcc.dg/auto-init-uninit-12.c: New test.
+ * gcc.dg/auto-init-uninit-13.c: New test.
+ * gcc.dg/auto-init-uninit-14.c: New test.
+ * gcc.dg/auto-init-uninit-15.c: New test.
+ * gcc.dg/auto-init-uninit-16.c: New test.
+ * gcc.dg/auto-init-uninit-17.c: New test.
+ * gcc.dg/auto-init-uninit-18.c: New test.
+ * gcc.dg/auto-init-uninit-19.c: New test.
+ * gcc.dg/auto-init-uninit-2.c: New test.
+ * gcc.dg/auto-init-uninit-20.c: New test.
+ * gcc.dg/auto-init-uninit-21.c: New test.
+ * gcc.dg/auto-init-uninit-22.c: New test.
+ * gcc.dg/auto-init-uninit-23.c: New test.
+ * gcc.dg/auto-init-uninit-24.c: New test.
+ * gcc.dg/auto-init-uninit-25.c: New test.
+ * gcc.dg/auto-init-uninit-26.c: New test.
+ * gcc.dg/auto-init-uninit-3.c: New test.
+ * gcc.dg/auto-init-uninit-34.c: New test.
+ * gcc.dg/auto-init-uninit-36.c: New test.
+ * gcc.dg/auto-init-uninit-37.c: New test.
+ * gcc.dg/auto-init-uninit-4.c: New test.
+ * gcc.dg/auto-init-uninit-5.c: New test.
+ * gcc.dg/auto-init-uninit-6.c: New test.
+ * gcc.dg/auto-init-uninit-8.c: New test.
+ * gcc.dg/auto-init-uninit-9.c: New test.
+ * gcc.dg/auto-init-uninit-A.c: New test.
+ * gcc.dg/auto-init-uninit-B.c: New test.
+ * gcc.dg/auto-init-uninit-C.c: New test.
+ * gcc.dg/auto-init-uninit-H.c: New test.
+ * gcc.dg/auto-init-uninit-I.c: New test.
+ * gcc.target/aarch64/auto-init-1.c: New test.
+ * gcc.target/aarch64/auto-init-2.c: New test.
+ * gcc.target/aarch64/auto-init-3.c: New test.
+ * gcc.target/aarch64/auto-init-4.c: New test.
+ * gcc.target/aarch64/auto-init-5.c: New test.
+ * gcc.target/aarch64/auto-init-6.c: New test.
+ * gcc.target/aarch64/auto-init-7.c: New test.
+ * gcc.target/aarch64/auto-init-8.c: New test.
+ * gcc.target/aarch64/auto-init-padding-1.c: New test.
+ * gcc.target/aarch64/auto-init-padding-10.c: New test.
+ * gcc.target/aarch64/auto-init-padding-11.c: New test.
+ * gcc.target/aarch64/auto-init-padding-12.c: New test.
+ * gcc.target/aarch64/auto-init-padding-2.c: New test.
+ * gcc.target/aarch64/auto-init-padding-3.c: New test.
+ * gcc.target/aarch64/auto-init-padding-4.c: New test.
+ * gcc.target/aarch64/auto-init-padding-5.c: New test.
+ * gcc.target/aarch64/auto-init-padding-6.c: New test.
+ * gcc.target/aarch64/auto-init-padding-7.c: New test.
+ * gcc.target/aarch64/auto-init-padding-8.c: New test.
+ * gcc.target/aarch64/auto-init-padding-9.c: New test.
+ * gcc.target/i386/auto-init-1.c: New test.
+ * gcc.target/i386/auto-init-2.c: New test.
+ * gcc.target/i386/auto-init-21.c: New test.
+ * gcc.target/i386/auto-init-22.c: New test.
+ * gcc.target/i386/auto-init-23.c: New test.
+ * gcc.target/i386/auto-init-24.c: New test.
+ * gcc.target/i386/auto-init-3.c: New test.
+ * gcc.target/i386/auto-init-4.c: New test.
+ * gcc.target/i386/auto-init-5.c: New test.
+ * gcc.target/i386/auto-init-6.c: New test.
+ * gcc.target/i386/auto-init-7.c: New test.
+ * gcc.target/i386/auto-init-8.c: New test.
+ * gcc.target/i386/auto-init-padding-1.c: New test.
+ * gcc.target/i386/auto-init-padding-10.c: New test.
+ * gcc.target/i386/auto-init-padding-11.c: New test.
+ * gcc.target/i386/auto-init-padding-12.c: New test.
+ * gcc.target/i386/auto-init-padding-2.c: New test.
+ * gcc.target/i386/auto-init-padding-3.c: New test.
+ * gcc.target/i386/auto-init-padding-4.c: New test.
+ * gcc.target/i386/auto-init-padding-5.c: New test.
+ * gcc.target/i386/auto-init-padding-6.c: New test.
+ * gcc.target/i386/auto-init-padding-7.c: New test.
+ * gcc.target/i386/auto-init-padding-8.c: New test.
+ * gcc.target/i386/auto-init-padding-9.c: New test.
+
+2021-09-09 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/98490
+ * gfortran.dg/bounds_check_23.f90: New test.
+
+2021-09-09 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/x86_64/abi/avx512fp16/args.h: Replace long with
+ long long.
+ (XMM_T): Rename _long to _longlong and _ulong to _ulonglong.
+ (X87_T): Rename _ulong to _ulonglong.
+ * gcc.target/x86_64/abi/avx512fp16/defines.h (TYPE_SIZE_LONG):
+ Define to 4 if __ILP32__ is defined.
+ (TYPE_SIZE_POINTER): Likewise.
+ (TYPE_ALIGN_LONG): Likewise.
+ (TYPE_ALIGN_POINTER): Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_3_element_struct_and_unions.c
+ (main): Skip test for long if __ILP32__ is defined.
+ * gcc.target/x86_64/abi/avx512fp16/test_m64m128_returning.c
+ (do_test): Replace _long with _longlong.
+ * gcc.target/x86_64/abi/avx512fp16/test_struct_returning.c:
+ (check_300): Replace _ulong with _ulonglong.
+ * gcc.target/x86_64/abi/avx512fp16/m256h/args.h: Replace long
+ with long long.
+ (YMM_T): Rename _long to _longlong and _ulong to _ulonglong.
+ (X87_T): Rename _ulong to _ulonglong.
+ * gcc.target/x86_64/abi/avx512fp16/m512h/args.h: Replace long
+ with long long.
+ (ZMM_T): Rename _long to _longlong and _ulong to _ulonglong.
+ (X87_T): Rename _ulong to _ulonglong.
+
+2021-09-09 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ssa-lim-17.c: New testcase.
+
+2021-09-09 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512fp16-helper.h: New header file for
+ FP16 runtime test.
+ * gcc.target/i386/avx512fp16-vaddph-1a.c: New test.
+ * gcc.target/i386/avx512fp16-vaddph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vdivph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vdivph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmulph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vmulph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-vsubph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-vsubph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vaddph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vaddph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vdivph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vdivph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vmulph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vmulph-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vsubph-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16vl-vsubph-1b.c: Ditto.
+
+2021-09-09 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add -mavx512vl and test for new intrinsics.
+ * gcc.target/i386/avx-2.c: Add -mavx512vl.
+ * gcc.target/i386/avx512fp16-11a.c: New test.
+ * gcc.target/i386/avx512fp16-11b.c: Ditto.
+ * gcc.target/i386/avx512vlfp16-11a.c: Ditto.
+ * gcc.target/i386/avx512vlfp16-11b.c: Ditto.
+ * gcc.target/i386/sse-13.c: Add test for new builtins.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add test for new intrinsics.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2021-09-09 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101059
+ * gcc.target/i386/sse2-pr101059.c: New test.
+ * gcc.target/i386/sse3-pr101059.c: New test.
+
+2021-09-09 liuhongt <hongtao.liu@intel.com>
+
+ PR target/91103
+ * gcc.target/i386/pr91103-1.c: New test.
+ * gcc.target/i386/pr91103-2.c: New test.
+
+2021-09-08 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/102225
+ * gcc.dg/analyzer/realloc-1.c (test_10): New.
+ * gcc.dg/analyzer/torture/pr102225.c: New test.
+
+2021-09-08 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/array-quals-1.c: Allow .sdata section in more cases.
+
+2021-09-08 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/tree-ssa/pr89430-1.c, gcc.dg/tree-ssa/pr89430-2.c,
+ gcc.dg/tree-ssa/pr89430-3.c, gcc.dg/tree-ssa/pr89430-4.c,
+ gcc.dg/tree-ssa/pr89430-5.c, gcc.dg/tree-ssa/pr89430-6.c,
+ gcc.dg/tree-ssa/pr89430-7-comp-ref.c,
+ gcc.dg/tree-ssa/pr89430-8-mem-ref-size.c,
+ gcc.dg/tree-ssa/pr99473-1.c: Use -ftree-cselim.
+
+2021-09-08 Jakub Jelinek <jakub@redhat.com>
+ liuhongt <hongtao.liu@intel.com>
+
+ PR target/89984
+ * gcc.target/i386/avx-pr102224.c: Fix up PR number.
+ * gcc.dg/pr89984.c: New test.
+ * gcc.target/i386/avx-pr89984.c: New test.
+
+2021-09-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/102224
+ * gcc.dg/pr102224.c: New test.
+ * gcc.target/i386/avx-pr102224.c: New test.
+
+2021-09-08 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/x86_64/abi/avx512fp16/m512h/abi-avx512fp16-zmm.exp:
+ New file.
+ * gcc.target/x86_64/abi/avx512fp16/m512h/args.h: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/m512h/asm-support.S: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/m512h/avx512fp16-zmm-check.h:
+ Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/m512h/test_m512_returning.c:
+ Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/m512h/test_passing_m512.c:
+ Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/m512h/test_passing_structs.c:
+ Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/m512h/test_passing_unions.c:
+ Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/m512h/test_varargs-m512.c:
+ Likewise.
+
+2021-09-08 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/x86_64/abi/avx512fp16/m256h/abi-avx512fp16-ymm.exp:
+ New exp file.
+ * gcc.target/x86_64/abi/avx512fp16/m256h/args.h: New header.
+ * gcc.target/x86_64/abi/avx512fp16/m256h/avx512fp16-ymm-check.h:
+ Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/m256h/asm-support.S: New.
+ * gcc.target/x86_64/abi/avx512fp16/m256h/test_m256_returning.c:
+ New test.
+ * gcc.target/x86_64/abi/avx512fp16/m256h/test_passing_m256.c: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/m256h/test_passing_structs.c:
+ Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/m256h/test_passing_unions.c:
+ Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/m256h/test_varargs-m256.c: Likewise.
+
+2021-09-08 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/x86_64/abi/avx512fp16/abi-avx512fp16-xmm.exp: New exp
+ file for abi test.
+ * gcc.target/x86_64/abi/avx512fp16/args.h: New header file for abi test.
+ * gcc.target/x86_64/abi/avx512fp16/avx512fp16-check.h: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/avx512fp16-xmm-check.h: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/defines.h: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/macros.h: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/asm-support.S: New asm for abi check.
+ * gcc.target/x86_64/abi/avx512fp16/test_3_element_struct_and_unions.c:
+ New test.
+ * gcc.target/x86_64/abi/avx512fp16/test_basic_alignment.c: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_basic_array_size_and_align.c:
+ Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_basic_returning.c: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_basic_sizes.c: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_basic_struct_size_and_align.c:
+ Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_basic_union_size_and_align.c:
+ Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_complex_returning.c: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_m64m128_returning.c: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_passing_floats.c: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_passing_m64m128.c: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_passing_structs.c: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_passing_unions.c: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_struct_returning.c: Likewise.
+ * gcc.target/x86_64/abi/avx512fp16/test_varargs-m128.c: Likewise.
+
+2021-09-08 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/avx512fp16-vararg-1.c: New test.
+ * gcc.target/i386/avx512fp16-vararg-2.c: Ditto.
+ * gcc.target/i386/avx512fp16-vararg-3.c: Ditto.
+ * gcc.target/i386/avx512fp16-vararg-4.c: Ditto.
+
+2021-09-08 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/m512-check.h: Add union128h, union256h, union512h.
+ * gcc.target/i386/avx512fp16-10a.c: New test.
+ * gcc.target/i386/avx512fp16-10b.c: Ditto.
+ * gcc.target/i386/avx512fp16-1a.c: Ditto.
+ * gcc.target/i386/avx512fp16-1b.c: Ditto.
+ * gcc.target/i386/avx512fp16-1c.c: Ditto.
+ * gcc.target/i386/avx512fp16-1d.c: Ditto.
+ * gcc.target/i386/avx512fp16-1e.c: Ditto.
+ * gcc.target/i386/avx512fp16-2a.c: Ditto.
+ * gcc.target/i386/avx512fp16-2b.c: Ditto.
+ * gcc.target/i386/avx512fp16-2c.c: Ditto.
+ * gcc.target/i386/avx512fp16-3a.c: Ditto.
+ * gcc.target/i386/avx512fp16-3b.c: Ditto.
+ * gcc.target/i386/avx512fp16-3c.c: Ditto.
+ * gcc.target/i386/avx512fp16-4.c: Ditto.
+ * gcc.target/i386/avx512fp16-5.c: Ditto.
+ * gcc.target/i386/avx512fp16-6.c: Ditto.
+ * gcc.target/i386/avx512fp16-7.c: Ditto.
+ * gcc.target/i386/avx512fp16-8.c: Ditto.
+ * gcc.target/i386/avx512fp16-9a.c: Ditto.
+ * gcc.target/i386/avx512fp16-9b.c: Ditto.
+ * gcc.target/i386/pr54855-13.c: Ditto.
+ * gcc.target/i386/avx512fp16-vec_set_var.c: Ditto.
+
+2021-09-08 Guo, Xuepeng <xuepeng.guo@intel.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+ Liu Hongtao <hongtao.liu@intel.com>
+ Wang Hongyu <hongyu.wang@intel.com>
+ Xu Dianhong <dianhong.xu@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add -mavx512fp16 in dg-options.
+ * gcc.target/i386/avx-2.c: Ditto.
+ * gcc.target/i386/avx512-check.h: Check cpuid for AVX512FP16.
+ * gcc.target/i386/funcspec-56.inc: Add new target attribute check.
+ * gcc.target/i386/sse-13.c: Add -mavx512fp16.
+ * gcc.target/i386/sse-14.c: Ditto.
+ * gcc.target/i386/sse-22.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * lib/target-supports.exp: (check_effective_target_avx512fp16): New.
+ * g++.target/i386/float16-1.C: New test.
+ * g++.target/i386/float16-2.C: Ditto.
+ * g++.target/i386/float16-3.C: Ditto.
+ * gcc.target/i386/avx512fp16-12a.c: Ditto.
+ * gcc.target/i386/avx512fp16-12b.c: Ditto.
+ * gcc.target/i386/float16-3a.c: Ditto.
+ * gcc.target/i386/float16-3b.c: Ditto.
+ * gcc.target/i386/float16-4a.c: Ditto.
+ * gcc.target/i386/float16-4b.c: Ditto.
+ * gcc.target/i386/pr54855-12.c: Ditto.
+ * g++.dg/other/i386-2.C: Ditto.
+ * g++.dg/other/i386-3.C: Ditto.
+
+2021-09-08 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/float16-6.c: New test.
+ * gcc.target/i386/float16-7.c: New test.
+
+2021-09-07 David Faust <david.faust@oracle.com>
+
+ * gcc.target/bpf/core-attr-1.c: New test.
+ * gcc.target/bpf/core-attr-2.c: Likewise.
+ * gcc.target/bpf/core-attr-3.c: Likewise.
+ * gcc.target/bpf/core-attr-4.c: Likewise
+ * gcc.target/bpf/core-builtin-1.c: Likewise
+ * gcc.target/bpf/core-builtin-2.c: Likewise.
+ * gcc.target/bpf/core-builtin-3.c: Likewise.
+ * gcc.target/bpf/core-section-1.c: Likewise.
+
+2021-09-07 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.dg/no_profile_instrument_function-attr-2.c: Fix
+ typo in last change.
+
+2021-09-07 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/101327
+ * gfortran.dg/pr101327.f90: New test.
+
+2021-09-07 Indu Bhagat <indu.bhagat@oracle.com>
+
+ * gcc.target/bpf/core-lto-1.c: New test.
+
+2021-09-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/100495
+ * g++.dg/cpp2a/constexpr-new21.C: New test.
+
+2021-09-07 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/85819
+ * gcc.target/i386/pr85819-1a.c: New test.
+ * gcc.target/i386/pr85819-1b.c: Likewise.
+ * gcc.target/i386/pr85819-2a.c: Likewise.
+ * gcc.target/i386/pr85819-2b.c: Likewise.
+ * gcc.target/i386/pr85819-2c.c: Likewise.
+ * gcc.target/i386/pr85819-3.c: Likewise.
+
+2021-09-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102226
+ * g++.dg/vect/pr102226.cc: New testcase.
+
+2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
+
+ * c-c++-common/gomp/flush-1.c: Add test case for 'seq_cst'.
+ * c-c++-common/gomp/flush-2.c: Add test case for 'seq_cst'.
+ * g++.dg/gomp/attrs-1.C: Adapt test to handle all flush clauses.
+ * g++.dg/gomp/attrs-2.C: Adapt test to handle all flush clauses.
+ * gfortran.dg/gomp/flush-1.f90: Add test case for 'seq_cst'.
+ * gfortran.dg/gomp/flush-2.f90: Add test case for 'seq_cst'.
+
+2021-09-07 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/80223
+ * gcc.dg/no_profile_instrument_function-attr-2.c: New test.
+
+2021-09-07 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ PR target/97142
+ * gcc.target/powerpc/pr97142.c: New test.
+
+2021-09-06 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/89984
+ * gcc.target/i386/pr89984-1.c: New test.
+ * gcc.target/i386/pr89984-2.c: Likewise.
+ * gcc.target/i386/xorsign-avx.c: Likewise.
+
+2021-09-06 liuhongt <hongtao.liu@intel.com>
+
+ PR middle-end/102182
+ * gcc.target/i386/pr101282.c: New test.
+
+2021-09-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/102207
+ * gcc.dg/pr102207.c: New test.
+
+2021-09-06 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/63184
+ * c-c++-common/pr19807-2.c: Enable for all targets and remove the xfail.
+ * c-c++-common/pr19807-3.c: Likewise.
+
+2021-09-03 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101904
+ * g++.dg/template/conv17.C: New test.
+
+2021-09-03 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/bind_c_char_6.f90: Update dg-error.
+ * gfortran.dg/bind_c_char_7.f90: Likewise.
+ * gfortran.dg/bind_c_char_8.f90: Likewise.
+ * gfortran.dg/iso_c_binding_char_1.f90: Likewise.
+ * gfortran.dg/pr32599.f03: Likewise.
+ * gfortran.dg/bind_c_char_9.f90: Comment testcase bits which are
+ implementable but not valid F2018.
+ * gfortran.dg/bind_c_contiguous.f90: New test.
+
+2021-09-03 liuhongt <hongtao.liu@intel.com>
+
+ PR target/102166
+ * g++.target/i386/pr102166.C: New test.
+
+2021-09-02 Sandra Loosemore <sandra@codesourcery.com>
+ José Rui Faustino de Sousa <jrfsousa@gmail.com>
+
+ PR fortran/100911
+ PR fortran/100915
+ PR fortran/100916
+ * gfortran.dg/PR100911.c: New file.
+ * gfortran.dg/PR100911.f90: New file.
+ * gfortran.dg/PR100914.c: New file.
+ * gfortran.dg/PR100914.f90: New file.
+ * gfortran.dg/PR100915.c: New file.
+ * gfortran.dg/PR100915.f90: New file.
+
+2021-09-02 Sandra Loosemore <sandra@codesourcery.com>
+
+ * gfortran.dg/c-interop/allocatable-dummy-c.c: New file.
+ * gfortran.dg/c-interop/allocatable-dummy.f90: New file.
+ * gfortran.dg/c-interop/allocatable-optional-pointer.f90: New file.
+ * gfortran.dg/c-interop/allocate-c.c: New file.
+ * gfortran.dg/c-interop/allocate-errors-c.c: New file.
+ * gfortran.dg/c-interop/allocate-errors.f90: New file.
+ * gfortran.dg/c-interop/allocate.f90: New file.
+ * gfortran.dg/c-interop/argument-association-assumed-rank-1.f90:
+ New file.
+ * gfortran.dg/c-interop/argument-association-assumed-rank-2.f90:
+ New file.
+ * gfortran.dg/c-interop/argument-association-assumed-rank-3.f90:
+ New file.
+ * gfortran.dg/c-interop/argument-association-assumed-rank-4.f90:
+ New file.
+ * gfortran.dg/c-interop/argument-association-assumed-rank-5.f90:
+ New file.
+ * gfortran.dg/c-interop/argument-association-assumed-rank-6.f90:
+ New file.
+ * gfortran.dg/c-interop/argument-association-assumed-rank-7.f90:
+ New file.
+ * gfortran.dg/c-interop/argument-association-assumed-rank-8.f90:
+ New file.
+ * gfortran.dg/c-interop/assumed-type-dummy.f90: New file.
+ * gfortran.dg/c-interop/c-interop.exp: New file.
+ * gfortran.dg/c-interop/c1255-1.f90: New file.
+ * gfortran.dg/c-interop/c1255-2.f90: New file.
+ * gfortran.dg/c-interop/c1255a.f90: New file.
+ * gfortran.dg/c-interop/c407a-1.f90: New file.
+ * gfortran.dg/c-interop/c407a-2.f90: New file.
+ * gfortran.dg/c-interop/c407b-1.f90: New file.
+ * gfortran.dg/c-interop/c407b-2.f90: New file.
+ * gfortran.dg/c-interop/c407c-1.f90: New file.
+ * gfortran.dg/c-interop/c516.f90: New file.
+ * gfortran.dg/c-interop/c524a.f90: New file.
+ * gfortran.dg/c-interop/c535a-1.f90: New file.
+ * gfortran.dg/c-interop/c535a-2.f90: New file.
+ * gfortran.dg/c-interop/c535b-1.f90: New file.
+ * gfortran.dg/c-interop/c535b-2.f90: New file.
+ * gfortran.dg/c-interop/c535b-3.f90: New file.
+ * gfortran.dg/c-interop/c535c-1.f90: New file.
+ * gfortran.dg/c-interop/c535c-2.f90: New file.
+ * gfortran.dg/c-interop/c535c-3.f90: New file.
+ * gfortran.dg/c-interop/c535c-4.f90: New file.
+ * gfortran.dg/c-interop/cf-descriptor-1-c.c: New file.
+ * gfortran.dg/c-interop/cf-descriptor-1.f90: New file.
+ * gfortran.dg/c-interop/cf-descriptor-2-c.c: New file.
+ * gfortran.dg/c-interop/cf-descriptor-2.f90: New file.
+ * gfortran.dg/c-interop/cf-descriptor-3-c.c: New file.
+ * gfortran.dg/c-interop/cf-descriptor-3.f90: New file.
+ * gfortran.dg/c-interop/cf-descriptor-4-c.c: New file.
+ * gfortran.dg/c-interop/cf-descriptor-4.f90: New file.
+ * gfortran.dg/c-interop/cf-descriptor-5-c.c: New file.
+ * gfortran.dg/c-interop/cf-descriptor-5.f90: New file.
+ * gfortran.dg/c-interop/cf-descriptor-6-c.c: New file.
+ * gfortran.dg/c-interop/cf-descriptor-6.f90: New file.
+ * gfortran.dg/c-interop/cf-descriptor-7-c.c: New file.
+ * gfortran.dg/c-interop/cf-descriptor-7.f90: New file.
+ * gfortran.dg/c-interop/cf-descriptor-8-c.c: New file.
+ * gfortran.dg/c-interop/cf-descriptor-8.f90: New file.
+ * gfortran.dg/c-interop/cf-out-descriptor-1-c.c: New file.
+ * gfortran.dg/c-interop/cf-out-descriptor-1.f90: New file.
+ * gfortran.dg/c-interop/cf-out-descriptor-2-c.c: New file.
+ * gfortran.dg/c-interop/cf-out-descriptor-2.f90: New file.
+ * gfortran.dg/c-interop/cf-out-descriptor-3-c.c: New file.
+ * gfortran.dg/c-interop/cf-out-descriptor-3.f90: New file.
+ * gfortran.dg/c-interop/cf-out-descriptor-4-c.c: New file.
+ * gfortran.dg/c-interop/cf-out-descriptor-4.f90: New file.
+ * gfortran.dg/c-interop/cf-out-descriptor-5-c.c: New file.
+ * gfortran.dg/c-interop/cf-out-descriptor-5.f90: New file.
+ * gfortran.dg/c-interop/cf-out-descriptor-6-c.c: New file.
+ * gfortran.dg/c-interop/cf-out-descriptor-6.f90: New file.
+ * gfortran.dg/c-interop/contiguous-1-c.c: New file.
+ * gfortran.dg/c-interop/contiguous-1.f90: New file.
+ * gfortran.dg/c-interop/contiguous-2-c.c: New file.
+ * gfortran.dg/c-interop/contiguous-2.f90: New file.
+ * gfortran.dg/c-interop/contiguous-3-c.c: New file.
+ * gfortran.dg/c-interop/contiguous-3.f90: New file.
+ * gfortran.dg/c-interop/deferred-character-1.f90: New file.
+ * gfortran.dg/c-interop/deferred-character-2.f90: New file.
+ * gfortran.dg/c-interop/dump-descriptors.c: New file.
+ * gfortran.dg/c-interop/dump-descriptors.h: New file.
+ * gfortran.dg/c-interop/establish-c.c: New file.
+ * gfortran.dg/c-interop/establish-errors-c.c: New file.
+ * gfortran.dg/c-interop/establish-errors.f90: New file.
+ * gfortran.dg/c-interop/establish.f90: New file.
+ * gfortran.dg/c-interop/explicit-interface.f90: New file.
+ * gfortran.dg/c-interop/fc-descriptor-1-c.c: New file.
+ * gfortran.dg/c-interop/fc-descriptor-1.f90: New file.
+ * gfortran.dg/c-interop/fc-descriptor-2-c.c: New file.
+ * gfortran.dg/c-interop/fc-descriptor-2.f90: New file.
+ * gfortran.dg/c-interop/fc-descriptor-3-c.c: New file.
+ * gfortran.dg/c-interop/fc-descriptor-3.f90: New file.
+ * gfortran.dg/c-interop/fc-descriptor-4-c.c: New file.
+ * gfortran.dg/c-interop/fc-descriptor-4.f90: New file.
+ * gfortran.dg/c-interop/fc-descriptor-5-c.c: New file.
+ * gfortran.dg/c-interop/fc-descriptor-5.f90: New file.
+ * gfortran.dg/c-interop/fc-descriptor-6-c.c: New file.
+ * gfortran.dg/c-interop/fc-descriptor-6.f90: New file.
+ * gfortran.dg/c-interop/fc-descriptor-7-c.c: New file.
+ * gfortran.dg/c-interop/fc-descriptor-7.f90: New file.
+ * gfortran.dg/c-interop/fc-descriptor-8-c.c: New file.
+ * gfortran.dg/c-interop/fc-descriptor-8.f90: New file.
+ * gfortran.dg/c-interop/fc-descriptor-9-c.c: New file.
+ * gfortran.dg/c-interop/fc-descriptor-9.f90: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-1-c.c: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-1.f90: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-2-c.c: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-2.f90: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-3-c.c: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-3.f90: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-4-c.c: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-4.f90: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-5-c.c: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-5.f90: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-6-c.c: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-6.f90: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-7-c.c: New file.
+ * gfortran.dg/c-interop/fc-out-descriptor-7.f90: New file.
+ * gfortran.dg/c-interop/ff-descriptor-1.f90: New file.
+ * gfortran.dg/c-interop/ff-descriptor-2.f90: New file.
+ * gfortran.dg/c-interop/ff-descriptor-3.f90: New file.
+ * gfortran.dg/c-interop/ff-descriptor-4.f90: New file.
+ * gfortran.dg/c-interop/ff-descriptor-5.f90: New file.
+ * gfortran.dg/c-interop/ff-descriptor-6.f90: New file.
+ * gfortran.dg/c-interop/ff-descriptor-7.f90: New file.
+ * gfortran.dg/c-interop/note-5-3.f90: New file.
+ * gfortran.dg/c-interop/note-5-4-c.c: New file.
+ * gfortran.dg/c-interop/note-5-4.f90: New file.
+ * gfortran.dg/c-interop/optional-c.c: New file.
+ * gfortran.dg/c-interop/optional.f90: New file.
+ * gfortran.dg/c-interop/rank-class.f90: New file.
+ * gfortran.dg/c-interop/rank.f90: New file.
+ * gfortran.dg/c-interop/removed-restrictions-1.f90: New file.
+ * gfortran.dg/c-interop/removed-restrictions-2.f90: New file.
+ * gfortran.dg/c-interop/removed-restrictions-3.f90: New file.
+ * gfortran.dg/c-interop/removed-restrictions-4.f90: New file.
+ * gfortran.dg/c-interop/section-1-c.c: New file.
+ * gfortran.dg/c-interop/section-1.f90: New file.
+ * gfortran.dg/c-interop/section-1p.f90: New file.
+ * gfortran.dg/c-interop/section-2-c.c: New file.
+ * gfortran.dg/c-interop/section-2.f90: New file.
+ * gfortran.dg/c-interop/section-2p.f90: New file.
+ * gfortran.dg/c-interop/section-3-c.c: New file.
+ * gfortran.dg/c-interop/section-3.f90: New file.
+ * gfortran.dg/c-interop/section-3p.f90: New file.
+ * gfortran.dg/c-interop/section-4-c.c: New file.
+ * gfortran.dg/c-interop/section-4.f90: New file.
+ * gfortran.dg/c-interop/section-errors-c.c: New file.
+ * gfortran.dg/c-interop/section-errors.f90: New file.
+ * gfortran.dg/c-interop/select-c.c: New file.
+ * gfortran.dg/c-interop/select-errors-c.c: New file.
+ * gfortran.dg/c-interop/select-errors.f90: New file.
+ * gfortran.dg/c-interop/select.f90: New file.
+ * gfortran.dg/c-interop/setpointer-c.c: New file.
+ * gfortran.dg/c-interop/setpointer-errors-c.c: New file.
+ * gfortran.dg/c-interop/setpointer-errors.f90: New file.
+ * gfortran.dg/c-interop/setpointer.f90: New file.
+ * gfortran.dg/c-interop/shape.f90: New file.
+ * gfortran.dg/c-interop/size.f90: New file.
+ * gfortran.dg/c-interop/tkr.f90: New file.
+ * gfortran.dg/c-interop/typecodes-array-basic-c.c: New file.
+ * gfortran.dg/c-interop/typecodes-array-basic.f90: New file.
+ * gfortran.dg/c-interop/typecodes-array-char-c.c: New file.
+ * gfortran.dg/c-interop/typecodes-array-char.f90: New file.
+ * gfortran.dg/c-interop/typecodes-array-float128-c.c: New file.
+ * gfortran.dg/c-interop/typecodes-array-float128.f90: New file.
+ * gfortran.dg/c-interop/typecodes-array-int128-c.c: New file.
+ * gfortran.dg/c-interop/typecodes-array-int128.f90: New file.
+ * gfortran.dg/c-interop/typecodes-array-longdouble-c.c: New file.
+ * gfortran.dg/c-interop/typecodes-array-longdouble.f90: New file.
+ * gfortran.dg/c-interop/typecodes-sanity-c.c: New file.
+ * gfortran.dg/c-interop/typecodes-sanity.f90: New file.
+ * gfortran.dg/c-interop/typecodes-scalar-basic-c.c: New file.
+ * gfortran.dg/c-interop/typecodes-scalar-basic.f90: New file.
+ * gfortran.dg/c-interop/typecodes-scalar-float128-c.c: New file.
+ * gfortran.dg/c-interop/typecodes-scalar-float128.f90: New file.
+ * gfortran.dg/c-interop/typecodes-scalar-int128-c.c: New file.
+ * gfortran.dg/c-interop/typecodes-scalar-int128.f90: New file.
+ * gfortran.dg/c-interop/typecodes-scalar-longdouble-c.c: New file.
+ * gfortran.dg/c-interop/typecodes-scalar-longdouble.f90: New file.
+ * gfortran.dg/c-interop/ubound.f90: New file.
+ * lib/target-supports.exp
+ (check_effective_target_fortran_real_c_float128): New function.
+
+2021-09-02 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/17506
+ PR testsuite/37182
+ * gcc.dg/diagnostic-tree-expr-ranges-2.c: Add expected output.
+ * gcc.dg/uninit-15-O0.c: Remove xfail.
+ * gcc.dg/uninit-15.c: Same.
+
+2021-09-02 Marcel Vollweiler <marcel@codesourcery.com>
+
+ * gfortran.dg/gomp/target-device-ancestor-4.f90: Comment out dg-final to avoid
+ UNRESOLVED.
+
+2021-09-02 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ssa-lim-16.c: New testcase.
+
+2021-09-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/99591
+ * gcc.target/i386/pr99591.c: New test.
+ * gcc.target/i386/pr97950.c: Match or reject setb or jn?b instructions
+ together with seta or jn?a.
+
+2021-09-02 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/sse2-float16-1.c: New test.
+ * gcc.target/i386/sse2-float16-2.c: Ditto.
+ * gcc.target/i386/sse2-float16-3.c: Ditto.
+ * gcc.target/i386/float16-5.c: New test.
+
+2021-09-01 Jeff Law <jlaw@localhost.localdomain>
+
+ PR tree-optimization/102152
+ * gcc.dg/pr102152.c: New test
+
+2021-09-01 Andrew Pinski <apinski@marvell.com>
+
+ PR target/101934
+ * gcc.target/aarch64/memset-strict-align-1.c: New test.
+
+2021-09-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/100977
+ * g++.dg/cpp23/normalize1.C: New test.
+ * g++.dg/cpp23/normalize2.C: New test.
+ * g++.dg/cpp23/normalize3.C: New test.
+ * g++.dg/cpp23/normalize4.C: New test.
+ * g++.dg/cpp23/normalize5.C: New test.
+ * g++.dg/cpp23/normalize6.C: New test.
+ * g++.dg/cpp23/normalize7.C: New test.
+ * g++.dg/cpp23/ucnid-1-utf8.C: New test.
+ * g++.dg/cpp23/ucnid-2-utf8.C: New test.
+ * gcc.dg/cpp/ucnid-4.c: Don't expect
+ "not valid at the start of an identifier" errors.
+ * gcc.dg/cpp/ucnid-4-utf8.c: Likewise.
+ * gcc.dg/cpp/ucnid-5-utf8.c: New test.
+
+2021-09-01 Andrew Pinski <apinski@marvell.com>
+
+ PR testsuite/51748
+ * gcc.misc-tests/linkage.exp: Add mips*-linux-* support.
+
+2021-09-01 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/Wstringop-overflow-11.c: Remove xfails.
+ * gcc.dg/Wstringop-overflow-12.c: Same.
+ * gcc.dg/Wstringop-overflow-43.c: Add xfails.
+ * gcc.dg/Wstringop-overflow-73.c: New test.
+
+2021-09-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/101488
+ * c-c++-common/cpp/va-opt-3.c: Adjust expected output.
+ * c-c++-common/cpp/va-opt-7.c: New test.
+
+2021-09-01 Marek Polacek <polacek@redhat.com>
+
+ PR c++/101592
+ * g++.dg/warn/Wlogical-op-3.C: New test.
+
+2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
+
+ * g++.dg/ext/attr-unavailable-1.C: New test.
+ * g++.dg/ext/attr-unavailable-2.C: New test.
+ * g++.dg/ext/attr-unavailable-3.C: New test.
+ * g++.dg/ext/attr-unavailable-4.C: New test.
+ * g++.dg/ext/attr-unavailable-5.C: New test.
+ * g++.dg/ext/attr-unavailable-6.C: New test.
+ * g++.dg/ext/attr-unavailable-7.C: New test.
+ * g++.dg/ext/attr-unavailable-8.C: New test.
+ * g++.dg/ext/attr-unavailable-9.C: New test.
+ * gcc.dg/attr-unavailable-1.c: New test.
+ * gcc.dg/attr-unavailable-2.c: New test.
+ * gcc.dg/attr-unavailable-3.c: New test.
+ * gcc.dg/attr-unavailable-4.c: New test.
+ * gcc.dg/attr-unavailable-5.c: New test.
+ * gcc.dg/attr-unavailable-6.c: New test.
+ * obj-c++.dg/attributes/method-unavailable-1.mm: New test.
+ * obj-c++.dg/attributes/method-unavailable-2.mm: New test.
+ * obj-c++.dg/attributes/method-unavailable-3.mm: New test.
+ * obj-c++.dg/property/at-property-unavailable-1.mm: New test.
+ * obj-c++.dg/property/at-property-unavailable-2.mm: New test.
+ * obj-c++.dg/property/dotsyntax-unavailable-1.mm: New test.
+ * objc.dg/attributes/method-unavailable-1.m: New test.
+ * objc.dg/attributes/method-unavailable-2.m: New test.
+ * objc.dg/attributes/method-unavailable-3.m: New test.
+ * objc.dg/property/at-property-unavailable-1.m: New test.
+ * objc.dg/property/at-property-unavailable-2.m: New test.
+ * objc.dg/property/dotsyntax-unavailable-1.m: New test.
+
+2021-09-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/102124
+ * gcc.dg/torture/pr102124.c: New test.
+
+2021-09-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/93491
+ * gcc.dg/torture/pr93491.c: New testcase.
+ * gcc.dg/tree-ssa/pr88087.c: Change to valid PRE opportunity.
+
+2021-09-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102139
+ * gcc.dg/torture/pr102139.c: New testcase.
+
+2021-09-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/102141
+ * gcc.dg/pr102141.c: New test.
+
+2021-09-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102149
+ * gcc.dg/torture/pr102149.c: New testcase.
+
+2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ PR c/79412
+ * gcc.dg/pr79412.c: New test case.
+ * gcc.dg/typedef-var-2.c: Update expeted errors.
+
+2021-08-31 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/100950
+ * gfortran.dg/pr100950.f90: Extend coverage.
+
+2021-08-31 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/12672
+ * g++.dg/cpp0x/decltype29.C: Adjust.
+ * g++.dg/template/error56.C: Adjust.
+ * g++.old-deja/g++.pt/unify6.C: Adjust.
+ * g++.dg/template/explicit-args7.C: New test.
+
+2021-08-31 Jason Merrill <jason@redhat.com>
+
+ PR c++/92193
+ * g++.dg/diagnostic/static_assert4.C: New test.
+
+2021-08-31 Jeff Law <jlaw@localhost.localdomain>
+
+ * gcc.target/mips/mips.exp: Add tree-vrp to mips_option_group.
+ * gcc.target/mips/data-sym-multi-pool.c: Add -fno-tree-vrp.
+
+2021-08-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/101145
+ * gcc.dg/vect/pr101145.c: Use dg-additional-options with just -O3
+ instead of dg-options with -O3 -fdump-tree-vect-details.
+ * gcc.dg/vect/pr101145_1.c: Likewise.
+ * gcc.dg/vect/pr101145_2.c: Likewise.
+ * gcc.dg/vect/pr101145_3.c: Likewise.
+
+2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
+
+ * c-c++-common/gomp/target-device-1.c: New test.
+ * c-c++-common/gomp/target-device-2.c: New test.
+ * c-c++-common/gomp/target-device-ancestor-1.c: New test.
+ * c-c++-common/gomp/target-device-ancestor-2.c: New test.
+ * c-c++-common/gomp/target-device-ancestor-3.c: New test.
+ * c-c++-common/gomp/target-device-ancestor-4.c: New test.
+ * gfortran.dg/gomp/target-device-1.f90: New test.
+ * gfortran.dg/gomp/target-device-2.f90: New test.
+ * gfortran.dg/gomp/target-device-ancestor-1.f90: New test.
+ * gfortran.dg/gomp/target-device-ancestor-2.f90: New test.
+ * gfortran.dg/gomp/target-device-ancestor-3.f90: New test.
+ * gfortran.dg/gomp/target-device-ancestor-4.f90: New test.
+
+2021-08-31 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102142
+ * g++.dg/torture/pr102142.C: New testcase.
+
+2021-08-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/102134
+ * gcc.c-torture/execute/pr102134.c: New test.
+
+2021-08-31 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
+
+ * gcc.target/arm/pr51534.c: Adjust test-case for soft fp targets.
+
+2021-08-31 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.dg/ipa/inline-8.c: Mark cmp and move as
+ static so they both bind local and available for
+ inlinine.
+
+2021-08-31 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512bw-vpcmpeqb-1.c: Adjust testcase.
+ * gcc.target/i386/avx512bw-vpcmpeqw-1.c: Ditto.
+ * gcc.target/i386/avx512bw-vpcmpgtb-1.c: Ditto.
+ * gcc.target/i386/avx512bw-vpcmpgtw-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpeqd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpeqq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgtd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgtq-1.c: Ditto.
+ * gcc.target/i386/avx512vl-vpcmpeqd-1.c: Ditto.
+ * gcc.target/i386/avx512vl-vpcmpeqq-1.c: Ditto.
+ * gcc.target/i386/avx512vl-vpcmpgtd-1.c: Ditto.
+ * gcc.target/i386/avx512vl-vpcmpgtq-1.c: Ditto.
+ * gcc.target/i386/bitwise_mask_op-1.c: Ditto.
+ * gcc.target/i386/bitwise_mask_op-2.c: Ditto.
+
+2021-08-30 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/99260
+ * gcc.dg/analyzer/capacity-2.c: Update for changes to realloc
+ analysis.
+ * gcc.dg/analyzer/pr99193-1.c: Likewise.
+ * gcc.dg/analyzer/pr99193-3.c: Likewise.
+ * gcc.dg/analyzer/realloc-1.c: Likewise. Add test coverage for
+ realloc of non-heap pointer, realloc from mismatching allocator,
+ and realloc on a freed pointer.
+ * gcc.dg/analyzer/realloc-2.c: New test.
+
+2021-08-30 Jason Merrill <jason@redhat.com>
+
+ PR c++/96286
+ * g++.dg/template/access2.C: Split struct A.
+
+2021-08-30 Jason Merrill <jason@redhat.com>
+
+ PR c++/101460
+ * g++.dg/template/explicit-args6.C: New test.
+
+2021-08-30 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/102113
+ * gfortran.dg/goto_9.f90: New test.
+
+2021-08-30 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp2a/concepts-lambda14.C: Add expected warnings.
+
+2021-08-30 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/101349
+ * gfortran.dg/unlimited_polymorphic_33.f90: New test.
+
+2021-08-30 Pat Haugen <pthaugen@linux.ibm.com>
+
+ * gcc.target/powerpc/fusion-p10-stst.c: New test.
+ * gcc.target/powerpc/fusion-p10-stst2.c: New test.
+
+2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/102094
+ * gdc.dg/lto/pr102094_0.d: New test.
+
+2021-08-29 Iain Sandoe <iain@sandoe.co.uk>
+
+ * gcc.dg/analyzer/strndup-1.c: Skip for Darwin versions
+ without strndup support in libc.
+
+2021-08-28 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/tree-ssa/modref-9.c: New test.
+
+2021-08-28 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/87737
+ * gfortran.dg/entry_24.f90: New test.
+
+2021-08-27 Michael Meissner <meissner@linux.ibm.com>
+
+ * gcc.target/powerpc/float128-call.c: Update comments.
+
+2021-08-27 Michael Meissner <meissner@linux.ibm.com>
+
+ * gcc.target/powerpc/float128-call.c: Fix test for IEEE 128-bit
+ long double and power10.
+
+2021-08-27 Iain Sandoe <iain@sandoe.co.uk>
+
+ * lib/target-supports.exp: Exclude cctools assembler based on
+ GAS 1.38.
+
+2021-08-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/45178
+ * gcc.dg/tree-ssa/ssa-dce-3.c: Adjust testcase.
+
+2021-08-27 konglin1 <lingling.kong@intel.com>
+
+ PR target/101472
+ * gcc.target/i386/avx512f-pr101472.c: New test.
+ * gcc.target/i386/avx512vl-pr101472.c: New test.
+
+2021-08-27 Kewen Lin <linkw@linux.ibm.com>
+
+ * gcc.target/powerpc/dive-vectorize-1.c: New test.
+ * gcc.target/powerpc/dive-vectorize-1.h: New test.
+ * gcc.target/powerpc/dive-vectorize-2.c: New test.
+ * gcc.target/powerpc/dive-vectorize-2.h: New test.
+ * gcc.target/powerpc/dive-vectorize-run-1.c: New test.
+ * gcc.target/powerpc/dive-vectorize-run-2.c: New test.
+ * gcc.target/powerpc/p10-bifs-vectorize-1.c: New test.
+ * gcc.target/powerpc/p10-bifs-vectorize-1.h: New test.
+ * gcc.target/powerpc/p10-bifs-vectorize-run-1.c: New test.
+
+2021-08-27 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512f-vshufpd-1.c: Adjust testcase.
+ * gcc.target/i386/avx512f-vshufps-1.c: Adjust testcase.
+ * gcc.target/i386/pr43147.c: New test.
+
+2021-08-26 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.dg/tree-ssa/ssa-ccp-41.c: New test case.
+
+2021-08-26 Martin Liska <mliska@suse.cz>
+ Stefan Kneifel <stefan.kneifel@bluewin.ch>
+
+ * gcc.target/i386/mvc5.c: Scan assembly names.
+ * gcc.target/i386/mvc7.c: Likewise.
+ * gcc.target/i386/pr95778-1.c: Update scanned patterns.
+ * gcc.target/i386/pr95778-2.c: Likewise.
+
+2021-08-25 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/tree-ssa/evrp1.c: Add -details to dump option.
+ * gcc.dg/tree-ssa/evrp2.c: Same.
+ * gcc.dg/tree-ssa/evrp3.c: Same.
+ * gcc.dg/tree-ssa/evrp4.c: Same.
+ * gcc.dg/tree-ssa/evrp6.c: Same.
+ * gcc.dg/tree-ssa/pr64130.c: Same.
+
+2021-08-25 Michael Meissner <meissner@linux.ibm.com>
+
+ PR target/94630
+ * gcc.target/powerpc/pr70117.c: Specify that we need the long double
+ type to be IBM 128-bit. Remove the code to use __ibm128.
+ * c-c++-common/dfp/convert-bfp-11.c: Specify that we need the long
+ double type to be IBM 128-bit. Run the test at -O2 optimization.
+ * lib/target-supports.exp (add_options_for_long_double_ibm128): New
+ function.
+ (check_effective_target_long_double_ibm128): New function.
+ (add_options_for_long_double_ieee128): New function.
+ (check_effective_target_long_double_ieee128): New function.
+ (add_options_for_long_double_64bit): New function.
+ (check_effective_target_long_double_64bit): New function.
+
+2021-08-25 Andrew Pinski <apinski@marvell.com>
+
+ PR c++/66590
+ * g++.dg/warn/Wreturn-5.C: New test.
+
+2021-08-25 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/ipa/modref-1.c: Update testcase.
+ * gcc.dg/tree-ssa/modref-4.c: Update testcase.
+ * gcc.dg/tree-ssa/modref-8.c: New test.
+
+2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
+
+ PR other/93067
+ * gcc.dg/diagnostic-input-charset-1.c: New test.
+ * gcc.dg/diagnostic-input-utf8-bom.c: New test.
+
+2021-08-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/102046
+ * gcc.dg/vect/pr102046.c: New testcase.
+
+2021-08-25 Hongyu Wang <hongyu.wang@intel.com>
+
+ PR target/101716
+ * gcc.target/i386/pr101716.c: New test.
+
+2021-08-25 Jiufu Guo <guojiufu@linux.ibm.com>
+
+ PR tree-optimization/101145
+ * gcc.dg/vect/pr101145.c: New test.
+ * gcc.dg/vect/pr101145.inc: New test.
+ * gcc.dg/vect/pr101145_1.c: New test.
+ * gcc.dg/vect/pr101145_2.c: New test.
+ * gcc.dg/vect/pr101145_3.c: New test.
+ * gcc.dg/vect/pr101145inf.c: New test.
+ * gcc.dg/vect/pr101145inf.inc: New test.
+ * gcc.dg/vect/pr101145inf_1.c: New test.
+
+2021-08-25 konglin1 <lingling.kong@intel.com>
+
+ PR target/101471
+ * gcc.target/i386/avx512f-pr101471.c: New test.
+
+2021-08-25 Kewen Lin <linkw@linux.ibm.com>
+
+ * gcc.target/powerpc/unpack-vectorize-1.c: New test.
+ * gcc.target/powerpc/unpack-vectorize-1.h: New test.
+ * gcc.target/powerpc/unpack-vectorize-2.c: New test.
+ * gcc.target/powerpc/unpack-vectorize-2.h: New test.
+ * gcc.target/powerpc/unpack-vectorize-3.c: New test.
+ * gcc.target/powerpc/unpack-vectorize-3.h: New test.
+ * gcc.target/powerpc/unpack-vectorize-run-1.c: New test.
+ * gcc.target/powerpc/unpack-vectorize-run-2.c: New test.
+ * gcc.target/powerpc/unpack-vectorize-run-3.c: New test.
+ * gcc.target/powerpc/unpack-vectorize.h: New test.
+
+2021-08-25 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101989
+ * gcc.target/i386/avx2-shiftqihi-constant-1.c: Add -mno-avx512f.
+ * gcc.target/i386/sse2-shiftqihi-constant-1.c: Add -mno-avx
+
+2021-08-24 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/98411
+ * gfortran.dg/pr98411.f90: Adjust testcase options to restrict to
+ F2008, and verify case of implicit SAVE.
+
+2021-08-24 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/101600
+ PR middle-end/101977
+ * g++.dg/pr100574.C: Prune out valid warning.
+ * gcc.dg/pr20126.c: Same.
+ * gcc.dg/Wstringop-overread.c: Adjust text of expected warnings.
+ Add new instances.
+ * gcc.dg/warn-strnlen-no-nul.c: Same.
+ * g++.dg/warn/Warray-bounds-26.C: New test.
+ * gcc.dg/Warray-bounds-88.c: New test.
+
+2021-08-24 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/predict-1.c: Disable evrp.
+ * gcc.dg/tree-ssa/evrp-trans.c: New.
+
+2021-08-24 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/102021
+ * gcc.target/i386/pr100865-10b.c: Expect vzeroupper.
+ * gcc.target/i386/pr100865-4b.c: Likewise.
+ * gcc.target/i386/pr100865-6b.c: Expect vmovdqu and vzeroupper.
+ * gcc.target/i386/pr100865-7b.c: Likewise.
+ * gcc.target/i386/pr102021.c: New test.
+
+2021-08-24 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/102035
+ * gcc.target/arm/cmse/mainline/8_1m/soft/cmse-13a.c: New test.
+ * gcc.target/arm/cmse/mainline/8_1m/soft/cmse-7a.c: Likewise.
+ * gcc.target/arm/cmse/mainline/8_1m/soft/cmse-8a.c: Likewise.
+ * gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-7a.c: Likewise.
+ * gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-8a.c: Likewise.
+ * gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-13a.c: Likewise.
+ * gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-7a.c: Likewise.
+ * gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-8a.c: Likewise.
+
+2021-08-24 Richard Earnshaw <rearnsha@arm.com>
+
+ * lib/target-supports.exp (check_effective_target_arm_cmse_hw):
+ Check the CMSE feature register, rather than relying on the
+ SG operation causing an execution fault.
+
+2021-08-24 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101989
+ * gcc.target/i386/pr101989-broadcast-1.c: New test.
+
+2021-08-24 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101989
+ * gcc.target/i386/pr101989-1.c: New test.
+ * gcc.target/i386/pr101989-2.c: New test.
+ * gcc.target/i386/avx512bw-shiftqihi-constant-1.c: Adjust testcase.
+
+2021-08-24 Roger Sayle <roger@nextmovesoftware.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/102029
+ * gcc.dg/fold-convlshift-3.c: New test case.
+
+2021-08-23 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/switch.c: Remove xfail. Add various tests.
+ * gcc.dg/analyzer/torture/switch-2.c: New test.
+ * gcc.dg/analyzer/torture/switch-3.c: New test.
+ * gcc.dg/analyzer/torture/switch-4.c: New test.
+ * gcc.dg/analyzer/torture/switch-5.c: New test.
+
+2021-08-23 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/101875
+ * gcc.dg/analyzer/pr101875.c: New test.
+
+2021-08-23 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/101837
+ * gcc.dg/analyzer/pr101837.c: New test.
+
+2021-08-23 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/101962
+ * gcc.dg/analyzer/data-model-23.c: New test.
+ * gcc.dg/analyzer/pr101962.c: New test.
+
+2021-08-23 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/data-model-22.c: New test.
+ * gcc.dg/analyzer/uninit-6.c: New test.
+ * gcc.dg/analyzer/uninit-6b.c: New test.
+
+2021-08-23 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/tree-ssa/modref-7.c: New test.
+
+2021-08-23 Richard Biener <rguenther@suse.de>
+
+ PR ipa/97565
+ * g++.dg/lto/pr97565_0.C: New testcase.
+ * g++.dg/lto/pr97565_1.C: Likewise.
+
+2021-08-23 Jan Hubicka <hubicka@ucw.cz>
+
+ * g++.dg/tree-ssa/modref-1.C: Fix template.
+
+2021-08-23 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/goacc/asyncwait-1.f95: Update dg-error.
+ * gfortran.dg/goacc/default-2.f: Update dg-error.
+ * gfortran.dg/goacc/enter-exit-data.f95: Update dg-error.
+ * gfortran.dg/goacc/if.f95: Update dg-error.
+ * gfortran.dg/goacc/parallel-kernels-clauses.f95: Update dg-error.
+ * gfortran.dg/goacc/routine-6.f90: Update dg-error.
+ * gfortran.dg/goacc/sie.f95: Update dg-error.
+ * gfortran.dg/goacc/update-if_present-2.f90: Update dg-error.
+ * gfortran.dg/gomp/cancel-2.f90: Update dg-error.
+ * gfortran.dg/gomp/declare-simd-1.f90: Update dg-error.
+ * gfortran.dg/gomp/error-3.f90: Update dg-error.
+ * gfortran.dg/gomp/loop-2.f90: Update dg-error.
+ * gfortran.dg/gomp/masked-2.f90: Update dg-error.
+
+2021-08-23 Ankur Saini <arsenic@sourceware.org>
+
+ PR analyzer/102020
+ * gcc.dg/analyzer/malloc-callbacks.c : Fix faulty test.
+
+2021-08-23 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.dg/fold-convlshift-1.c: New test case.
+ * gcc.dg/fold-convlshift-2.c: New test case.
+
+2021-08-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/86723
+ * gcc.dg/pr86723.c: New test.
+ * gcc.target/i386/pr86723.c: New test.
+ * gcc.dg/optimize-bswapdi-1.c: Use -fdump-tree-optimized instead of
+ -fdump-tree-bswap and scan for number of __builtin_bswap64 calls.
+ * gcc.dg/optimize-bswapdi-2.c: Likewise.
+ * gcc.dg/optimize-bswapsi-1.c: Use -fdump-tree-optimized instead of
+ -fdump-tree-bswap and scan for number of __builtin_bswap32 calls.
+ * gcc.dg/optimize-bswapsi-5.c: Likewise.
+ * gcc.dg/optimize-bswapsi-3.c: Likewise. Expect one __builtin_bswap32
+ call instead of zero.
+
+2021-08-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79334
+ * gcc.dg/torture/pr79334-0.c: New testcase.
+ * gcc.dg/torture/pr79334-1.c: Likewise.
+
+2021-08-23 liuhongt <hongtao.liu@intel.com>
+
+ PR target/102016
+ * gcc.target/i386/pr102016.c: New test.
+
+2021-08-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/101905
+ * gcc.dg/guality/pr101905.c: New test.
+
+2021-08-23 Christophe Lyon <christophe.lyon@foss.st.com>
+
+ PR target/100856
+ * gcc.target/arm/acle/pr100856.c: Use arm_v8m_main_cde_multilib
+ and arm_v8m_main_cde.
+ * lib/target-supports.exp: Add
+ check_effective_target_FUNC_multilib for ARM CDE.
+
+2021-08-23 Jan Hubicka <hubicka@ucw.cz>
+
+ * g++.dg/tree-ssa/modref-1.C: New test.
+
+2021-08-23 Xi Ruoyao <xry111@mengyan1223.wang>
+
+ PR target/101922
+ * gcc.target/mips/pr101922.c: New test.
+
+2021-08-23 Jonathan Yong <10walls@gmail.com>
+
+ * gcc.c-torture/execute/gcc_tmpnam.h: Fix tmpnam case on Windows
+ where it can return a filename with "\" to indicate current
+ directory.
+ * gcc.c-torture/execute/fprintf-2.c: Use wrapper.
+ * gcc.c-torture/execute/printf-2.c: Use wrapper.
+ * gcc.c-torture/execute/user-printf.c: Use wrapper.
+
+2021-08-22 Martin Uecker <muecker@gwdg.de>
+
+ PR c/98397
+ * gcc.dg/c11-qual-1.c: New test.
+ * gcc.dg/c2x-qual-1.c: New test.
+ * gcc.dg/c2x-qual-2.c: New test.
+ * gcc.dg/c2x-qual-3.c: New test.
+ * gcc.dg/c2x-qual-4.c: New test.
+ * gcc.dg/c2x-qual-5.c: New test.
+ * gcc.dg/c2x-qual-6.c: New test.
+ * gcc.dg/c2x-qual-7.c: New test.
+ * gcc.dg/pointer-array-quals-1.c: Remove unnecessary flag.
+ * gcc.dg/pointer-array-quals-2.c: Remove unnecessary flag.
+
+2021-08-22 Jan Hubicka <hubicka@ucw.cz>
+ Martin Liska <mliska@suse.cz>
+
+ * gcc.dg/lto/pr101949_0.c: New test.
+ * gcc.dg/lto/pr101949_1.c: New test.
+
+2021-08-21 Ankur Saini <arsenic@sourceware.org>
+
+ PR analyzer/101980
+ * gcc.dg/analyzer/function-ptr-2.c : Add issue for double 'free'.
+ * gcc.dg/analyzer/malloc-callbacks.c : Fix xfail testcase.
+
+2021-08-20 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/error-1.f90: New test.
+ * gfortran.dg/gomp/error-2.f90: New test.
+ * gfortran.dg/gomp/error-3.f90: New test.
+
+2021-08-20 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/error-1.c: New test.
+ * c-c++-common/gomp/error-2.c: New test.
+ * c-c++-common/gomp/error-3.c: New test.
+ * g++.dg/gomp/attrs-1.C (bar): Add error directive test.
+ * g++.dg/gomp/attrs-2.C (bar): Add error directive test.
+ * g++.dg/gomp/attrs-13.C: New test.
+ * g++.dg/gomp/error-1.C: New test.
+
+2021-08-20 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/sink-5.c: New test.
+ * c-c++-common/gomp/requires-3.c: Add test for spurious comma
+ at the end of pragma line.
+
+2021-08-19 Roger Sayle <roger@nextmovesoftware.com>
+
+ * c-c++-common/Wunused-var-16.c: Add an extra check that ~0
+ is optimized away.
+
+2021-08-19 Peter Bergner <bergner@linux.ibm.com>
+
+ PR target/101849
+ * gcc.target/powerpc/pr101849.c: New test.
+
+2021-08-19 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/100950
+ * gfortran.dg/pr100950.f90: New test.
+
+2021-08-19 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101803
+ * g++.dg/cpp2a/class-deduction-aggr12.C: Fix PR number.
+
+2021-08-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/101950
+ * gcc.target/i386/pr101950-1.c: New test.
+ * gcc.target/i386/pr101950-2.c: New test.
+
+2021-08-19 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/requires-3.c: Add testcase for
+ atomic_default_mem_order ( at the end of line without corresponding ).
+
+2021-08-19 Iain Sandoe <iain@sandoe.co.uk>
+
+ * jit.dg/test-asm.c: Provide Mach-O fragment.
+ * jit.dg/test-asm.cc: Likewise.
+
+2021-08-19 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/nothing-2.c: New test.
+
+2021-08-19 Iain Sandoe <iain@sandoe.co.uk>
+
+ * jit.dg/harness.h: Include jit-dejagnu.h.
+ * jit.dg/jit.exp: Use -rdynamic conditionally on target
+ support, instead of unconditional -Wl,--export-dynamic.
+
+2021-08-19 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR testsuite/101969
+ * gcc.dg/pr78213.c: Fix up for '--enable-checking=release' etc.
+
+2021-08-19 liuhongt <hongtao.liu@intel.com>
+
+ Revert:
+ 2021-08-19 liuhongt <hongtao.liu@intel.com>
+
+ PR target/99881
+ * gcc.target/i386/pr99881.c: New test.
+
+2021-08-18 Tobias Burnus <tobias@codesourcery.com>
+
+ PR testsuite/101963
+ * gfortran.dg/nothing-1.f90: Moved to ...
+ * gfortran.dg/gomp/nothing-1.f90: ... here.
+ * gfortran.dg/nothing-2.f90: Moved to ...
+ * gfortran.dg/gomp/nothing-2.f90: ... here;
+ avoid $ issue in $OMP in dg-error.
+
+2021-08-18 Iain Sandoe <iain@sandoe.co.uk>
+ Matt Jacobson <mhjacobson@me.com>
+
+ PR objc/101666
+ * obj-c++.dg/pr101666-0.mm: New test.
+ * obj-c++.dg/pr101666-1.mm: New test.
+ * obj-c++.dg/pr101666.inc: New.
+ * objc.dg/pr101666-0.m: New test.
+ * objc.dg/pr101666-1.m: New test.
+ * objc.dg/pr101666.inc: New.
+
+2021-08-18 Ankur Saini <arsenic@sourceware.org>
+
+ PR analyzer/97114
+ * g++.dg/analyzer/vfunc-2.C: New test.
+ * g++.dg/analyzer/vfunc-3.C: New test.
+ * g++.dg/analyzer/vfunc-4.C: New test.
+ * g++.dg/analyzer/vfunc-5.C: New test.
+
+2021-08-18 Ankur Saini <arsenic@sourceware.org>
+
+ PR analyzer/100546
+ * gcc.dg/analyzer/function-ptr-4.c: New test.
+ * gcc.dg/analyzer/pr100546.c: New test.
+
+2021-08-18 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/nothing-1.f90: New test.
+ * gfortran.dg/nothing-2.f90: New test.
+
+2021-08-18 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101344
+ PR c++/101803
+ * g++.dg/cpp2a/class-deduction-aggr11.C: New test.
+ * g++.dg/cpp2a/class-deduction-aggr12.C: New test.
+
+2021-08-18 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101883
+ * g++.dg/cpp2a/nontype-class49.C: New test.
+
+2021-08-18 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/nothing-1.c: New test.
+ * g++.dg/gomp/attrs-1.C (bar): Add nothing directive test.
+ * g++.dg/gomp/attrs-2.C (bar): Likewise.
+ * g++.dg/gomp/attrs-9.C: Likewise.
+
+2021-08-18 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/pr63326.c: Don't expect extra "before" errors
+ in C++.
+ * g++.dg/gomp/attrs-7.C: Don't expect one extra error.
+ * g++.dg/gomp/barrier-2.C: Likewise.
+ * gcc.dg/gomp/declare-simd-5.c: Likewise.
+ * gcc.dg/gomp/barrier-2.c: Likewise.
+ * gcc.dg/gomp/declare-variant-2.c: Likewise.
+
+2021-08-18 liuhongt <hongtao.liu@intel.com>
+
+ PR target/97147
+ * gcc.target/i386/pr54400.c: Adjust testcase.
+ * gcc.target/i386/pr94147.c: New test.
+
+2021-08-17 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/101854
+ * gcc.dg/attr-alloc_size-5.c: Adjust optimization to -O1.
+ * gcc.dg/attr-alloc_size-7.c: Use #pragmas to adjust optimization.
+ * gcc.dg/attr-alloc_size-8.c: Adjust optimization to -O1.
+ * gcc.dg/Wstringop-overflow-72.c: New test.
+
+2021-08-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/101539
+ * g++.dg/cpp2a/is-corresponding-member1.C: New test.
+ * g++.dg/cpp2a/is-corresponding-member2.C: New test.
+ * g++.dg/cpp2a/is-corresponding-member3.C: New test.
+ * g++.dg/cpp2a/is-corresponding-member4.C: New test.
+ * g++.dg/cpp2a/is-corresponding-member5.C: New test.
+ * g++.dg/cpp2a/is-corresponding-member6.C: New test.
+ * g++.dg/cpp2a/is-corresponding-member7.C: New test.
+ * g++.dg/cpp2a/is-corresponding-member8.C: New test.
+ * g++.dg/cpp2a/is-layout-compatible1.C: New test.
+ * g++.dg/cpp2a/is-layout-compatible2.C: New test.
+ * g++.dg/cpp2a/is-layout-compatible3.C: New test.
+
+2021-08-17 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gcc.dg/pr78213.c: Restore testing.
+
+2021-08-17 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.dg/tree-ssa/ssa-ccp-40.c: New test case.
+
+2021-08-17 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.dg/fold-ior-5.c: New test case.
+
+2021-08-17 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/scan-1.f90:
+ * gfortran.dg/gomp/cancel-1.f90: New test.
+ * gfortran.dg/gomp/cancel-4.f90: New test.
+ * gfortran.dg/gomp/loop-4.f90: New test.
+ * gfortran.dg/gomp/nesting-1.f90: New test.
+ * gfortran.dg/gomp/nesting-2.f90: New test.
+ * gfortran.dg/gomp/nesting-3.f90: New test.
+ * gfortran.dg/gomp/nowait-1.f90: New test.
+ * gfortran.dg/gomp/reduction-task-1.f90: New test.
+ * gfortran.dg/gomp/reduction-task-2.f90: New test.
+ * gfortran.dg/gomp/reduction-task-2a.f90: New test.
+ * gfortran.dg/gomp/reduction-task-3.f90: New test.
+ * gfortran.dg/gomp/scope-1.f90: New test.
+ * gfortran.dg/gomp/scope-2.f90: New test.
+
+2021-08-17 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/101938
+ * gcc.dg/pr101938.c: New test.
+
+2021-08-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101868
+ * gcc.dg/lto/pr101868_0.c: New testcase.
+ * gcc.dg/lto/pr101868_1.c: Likewise.
+ * gcc.dg/lto/pr101868_2.c: Likewise.
+ * gcc.dg/lto/pr101868_3.c: Likewise.
+
+2021-08-17 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/nesting-2.c (foo): Add scope and masked
+ construct tests.
+ * c-c++-common/gomp/scan-1.c (f3): Add scope construct test..
+ * c-c++-common/gomp/cancel-1.c (f2): Add scope and masked
+ construct tests.
+ * c-c++-common/gomp/reduction-task-2.c (bar): Add scope construct
+ test. Adjust diagnostics for the addition of scope.
+ * c-c++-common/gomp/loop-1.c (f5): Add master, masked and scope
+ construct tests.
+ * c-c++-common/gomp/clause-dups-1.c (f1): Add scope construct test.
+ * gcc.dg/gomp/nesting-1.c (f1, f2, f3): Add scope construct tests.
+ * c-c++-common/gomp/scope-1.c: New test.
+ * c-c++-common/gomp/scope-2.c: New test.
+ * g++.dg/gomp/attrs-1.C (bar): Add scope construct tests.
+ * g++.dg/gomp/attrs-2.C (bar): Likewise.
+ * gfortran.dg/gomp/reduction4.f90: Adjust expected diagnostics.
+ * gfortran.dg/gomp/reduction7.f90: Likewise.
+
+2021-08-17 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/cpp/va-opt-5.c: New test.
+ * c-c++-common/cpp/va-opt-6.c: New test.
+
+2021-08-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101925
+ * gcc.dg/sso-16.c: New testcase.
+
+2021-08-17 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr82460-2.c: Adjust testcase by adding
+ --param=vect-epilogues-nomask=0
+
+2021-08-16 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101930
+ * gcc.target/i386/pr101930.c: New test.
+
+2021-08-16 Martin Liska <mliska@suse.cz>
+
+ PR ipa/100600
+ * gcc.dg/ipa/pr100600.c: New test.
+
+2021-08-16 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101846
+ * gcc.target/i386/pr101846-2.c: New test.
+ * gcc.target/i386/pr101846-3.c: New test.
+ * gcc.target/i386/pr101846-4.c: New test.
+
+2021-08-16 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/masked-1.f90: New test.
+ * gfortran.dg/gomp/masked-2.f90: New test.
+ * gfortran.dg/gomp/masked-3.f90: New test.
+ * gfortran.dg/gomp/masked-combined-1.f90: New test.
+ * gfortran.dg/gomp/masked-combined-2.f90: New test.
+
+2021-08-15 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/99351
+ * gfortran.dg/coarray_sync.f90: New test.
+ * gfortran.dg/coarray_3.f90: Adjust error messages.
+
+2021-08-14 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/101791
+ * g++.dg/warn/Wmismatched-new-delete-6.C: New test.
+ * g++.dg/warn/Wmismatched-new-delete-7.C: New test.
+
+2021-08-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/101896
+ * gcc.target/i386/avx512f-pr101896.c: New test.
+
+2021-08-13 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/101734
+ * gcc.dg/uninit-42.c: New test.
+
+2021-08-13 Martin Liska <mliska@suse.cz>
+
+ PR ipa/101261
+ * gcc.target/i386/pr101261.c: New test.
+
+2021-08-13 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/tree-ssa/modref-6.c: Update.
+
+2021-08-13 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
+
+ * gcc.target/arm/simd/pr98435.c: Add dg-require-effective-target
+ arm_softfp_ok.
+
+2021-08-12 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/clauses-1.c (bar): Add tests for combined masked
+ constructs with clauses.
+ * c-c++-common/gomp/clauses-5.c (foo): Add testcase for filter clause.
+ * c-c++-common/gomp/clause-dups-1.c (f1): Likewise.
+ * c-c++-common/gomp/masked-1.c: New test.
+ * c-c++-common/gomp/masked-2.c: New test.
+ * c-c++-common/gomp/masked-combined-1.c: New test.
+ * c-c++-common/gomp/masked-combined-2.c: New test.
+ * c-c++-common/goacc/uninit-if-clause.c: Remove xfails.
+ * g++.dg/gomp/block-11.C: New test.
+ * g++.dg/gomp/tpl-masked-1.C: New test.
+ * g++.dg/gomp/attrs-1.C (bar): Add tests for masked construct and
+ combined masked constructs with clauses in attribute syntax.
+ * g++.dg/gomp/attrs-2.C (bar): Likewise.
+ * gcc.dg/gomp/nesting-1.c (f1, f2): Add tests for masked construct
+ nesting.
+ * gfortran.dg/goacc/host_data-tree.f95: Allow also SSA_NAMEs in if
+ clause.
+ * gfortran.dg/goacc/kernels-tree.f95: Likewise.
+
+2021-08-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/101638
+ * gcc.dg/cpp/pr101638.c: New test.
+
+2021-08-12 Michael Meissner <meissner@linux.ibm.com>
+
+ * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-char.c: Fix
+ typo in regular expression.
+ * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-double.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-float.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-int.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-longlong.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-short.c:
+ Likewise.
+
+2021-08-12 Sergei Trofimovich <siarheit@google.com>
+
+ PR c++/101219
+ * g++.dg/warn/pr101219.C: New test.
+
+2021-08-12 Martin Uecker <muecker@gwdg.de>
+
+ PR c/101838
+ * gcc.dg/vla-stexp-2.c: New test.
+
+2021-08-12 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Remove call into the legacy
+ code and adjust for ranger threader.
+
+2021-08-12 Tobias Burnus <tobias@codesourcery.com>
+
+ * c-c++-common/gomp/pr61486-2.c: Duplicate one proc_bind(master)
+ testcase and test proc_bind(primary) instead.
+ * gfortran.dg/gomp/affinity-1.f90: Likewise.
+
+2021-08-12 Hans-Peter Nilsson <hp@axis.com>
+
+ * gfortran.dg/PR82376.f90: Robustify match.
+
+2021-08-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/101860
+ * gcc.target/i386/avx512f-pr101860.c: New test.
+
+2021-08-12 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/gomp/attrs-12.C: New test.
+
+2021-08-12 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/gomp/attrs-11.C: Add new tests.
+
+2021-08-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99429
+ PR c++/94162
+ * g++.dg/cpp2a/spaceship-synth11.C: New test.
+ * g++.dg/cpp2a/spaceship-synth-neg6.C: New test.
+
+2021-08-12 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/gomp/attrs-11.C: Adjust expected diagnostics.
+
+2021-08-12 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/lookup/strong-using.C: Add test using [[gnu::strong]]
+ as well.
+ * g++.dg/lookup/strong-using2.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-58.C: Move alignas(int) before
+ using namespace.
+ * g++.dg/cpp0x/gen-attrs-59.C: Move alignas(X) before
+ using namespace, add tests for alignas before semicolon.
+ * g++.dg/cpp0x/gen-attrs-76.C: Remove xfails. Add test for
+ C++11 attributes on using directive before semicolon.
+
+2021-08-12 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101846
+ * gcc.target/i386/pr101846-1.c: New test.
+
+2021-08-12 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101663
+ * g++.dg/cpp2a/construct_at.h: New convenience header file that
+ defines minimal implementations of std::construct_at/destroy_at,
+ split out from ...
+ * g++.dg/cpp2a/constexpr-new5.C: ... here.
+ * g++.dg/cpp2a/constexpr-new6.C: Use the header.
+ * g++.dg/cpp2a/constexpr-new14.C: Likewise.
+ * g++.dg/cpp2a/constexpr-new20.C: New test.
+
+2021-08-11 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101725
+ DR 2082
+ * g++.dg/DRs/dr2082.C: New test.
+ * g++.dg/cpp2a/concepts-uneval4.C: New test.
+
+2021-08-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/101786
+ * g++.dg/cpp2a/constinit16.C: New test.
+
+2021-08-11 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/79501
+ * g++.dg/cpp1z/class-deduction98.C: New test.
+
+2021-08-11 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/89062
+ * g++.dg/cpp1z/class-deduction97.C: New test.
+
+2021-08-11 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/lto/pr48622_1.c: Provide non-LTO definition
+ of ashift_qi_1.
+
+2021-08-11 Jan Hubicka <jh@suse.cz>
+
+ * c-c++-common/modref-dse.c: New test.
+
+2021-08-11 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/101858
+ * gcc.dg/pr101858.c: New testcase.
+
+2021-08-11 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR target/66791
+ * gcc.target/arm/pr51534.c: Adjust test.
+
+2021-08-11 liuhongt <hongtao.liu@intel.com>
+
+ PR target/98309
+ * gcc.target/i386/pr98309-1.c: New test.
+ * gcc.target/i386/pr98309-2.c: New test.
+
+2021-08-11 Hans-Peter Nilsson <hp@axis.com>
+
+ PR middle-end/101674
+ * gcc.dg/uninit-pred-9_b.c: Xfail for cris-*-* too.
+
+2021-08-10 Tobias Burnus <tobias@codesourcery.com>
+
+ PR libfortran/101305
+ PR fortran/101660
+ PR testsuite/101847
+ * lib/gfortran.exp (gfortran_init): Remove -I$specpath/libgfortran
+ from the string used to set GFORTRAN_UNDER_TEST.
+
+2021-08-10 H.J. Lu <hjl.tools@gmail.com>
+
+ PR tree-optimization/101809
+ * gcc.target/i386/pr88531-1a.c: Enable for all targets.
+
+2021-08-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/80355
+ * gcc.target/i386/avx512f-pr80355-2.c: New test.
+
+2021-08-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/80355
+ * gcc.target/i386/avx512f-pr80355-1.c: New test.
+
+2021-08-10 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/gomp/attrs-1.C (bar): Add missing semicolon after
+ [[omp::directive (threadprivate (t2))]]. Add tests with
+ if/while/switch after parallel in attribute syntax.
+ (corge): Add missing omp:: before directive.
+ * g++.dg/gomp/attrs-2.C (bar): Add missing semicolon after
+ [[omp::directive (threadprivate (t2))]].
+ * g++.dg/gomp/attrs-10.C: New test.
+ * g++.dg/gomp/attrs-11.C: New test.
+
+2021-08-10 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/amxbf16-dpbf16ps-2.c: Fix typos.
+
+2021-08-10 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/101824
+ * gcc.dg/tree-ssa/pr101824.c: New testcase.
+
+2021-08-10 Martin Uecker <muecker@gwdg.de>
+
+ PR c/29970
+ * gcc.dg/vla-stexp-1.c: New test.
+
+2021-08-10 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101804
+ * gcc.target/i386/avx2-gather-2.c: Pass -march=skylake instead
+ of "-mavx2 -mtune=skylake". Scan vpcmpeqd.
+
+2021-08-10 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/cond_op_shift_d-1.c: New test.
+ * gcc.target/i386/cond_op_shift_d-2.c: New test.
+ * gcc.target/i386/cond_op_shift_q-1.c: New test.
+ * gcc.target/i386/cond_op_shift_q-2.c: New test.
+ * gcc.target/i386/cond_op_shift_ud-1.c: New test.
+ * gcc.target/i386/cond_op_shift_ud-2.c: New test.
+ * gcc.target/i386/cond_op_shift_uq-1.c: New test.
+ * gcc.target/i386/cond_op_shift_uq-2.c: New test.
+ * gcc.target/i386/cond_op_shift_uw-1.c: New test.
+ * gcc.target/i386/cond_op_shift_uw-2.c: New test.
+ * gcc.target/i386/cond_op_shift_w-1.c: New test.
+ * gcc.target/i386/cond_op_shift_w-2.c: New test.
+
+2021-08-09 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr101741.c: New.
+
+2021-08-09 Martin Jambor <mjambor@suse.cz>
+
+ PR testsuite/101654
+ * gcc.dg/ipa/remref-6.c: Added missing -fdump-ipa-inline option.
+
+2021-08-09 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/101812
+ * gcc.target/i386/pr101812.c: New test.
+
+2021-08-09 Tejas Belagod <tejas.belagod@arm.com>
+
+ * gcc.target/aarch64/vect-shr-reg.c: New testcase.
+ * gcc.target/aarch64/vect-shr-reg-run.c: Likewise.
+
+2021-08-09 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.dg/pr68217.c: Add -fno-tree-ccp option.
+ * gcc.dg/tree-ssa/vrp24.c: Add -fno-tree-ccp option.
+ * g++.dg/ipa/pure-const-3.C: Add -fno-tree-ccp option.
+
+2021-08-09 Tobias Burnus <tobias@codesourcery.com>
+
+ PR libfortran/101305
+ PR fortran/101660
+ * lib/gfortran.exp (gfortran_init): Add -I $specdir/libgfortran to
+ GFORTRAN_UNDER_TEST; update it when set by previous gfortran_init call.
+ * gfortran.dg/ISO_Fortran_binding_1.c: Use <...> not "..." for
+ ISO_Fortran_binding.h's #include.
+ * gfortran.dg/ISO_Fortran_binding_10.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_11.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_12.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_15.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_16.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_17.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_18.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_3.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_5.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_6.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_7.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_8.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_9.c: Likewise.
+ * gfortran.dg/PR94327.c: Likewise.
+ * gfortran.dg/PR94331.c: Likewise.
+ * gfortran.dg/bind_c_array_params_3_aux.c: Likewise.
+ * gfortran.dg/iso_fortran_binding_uint8_array_driver.c: Likewise.
+ * gfortran.dg/pr93524.c: Likewise.
+
+2021-08-09 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/sve/dup_lane_1.c: Don't split
+ scan-assembler tests over multiple lines. Expect 32-bit
+ result values in 'w' registers.
+ * gcc.target/aarch64/sve/extract_1.c: Likewise.
+ * gcc.target/aarch64/sve/extract_2.c: Likewise.
+ * gcc.target/aarch64/sve/extract_3.c: Likewise.
+ * gcc.target/aarch64/sve/extract_4.c: Likewise.
+
+2021-08-09 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: Restrict
+ tests to little-endian targets.
+
+2021-08-08 Jeff Law <jlaw@localhost.localdomain>
+
+ * gcc.target/tic6x/rotdi16-scan.c: Pull rotate into its own function.
+
+2021-08-07 H.J. Lu <hjl.tools@gmail.com>
+
+ PR tree-optimization/88531
+ * gcc.target/i386/pr88531-1a.c: New test.
+ * gcc.target/i386/pr88531-1b.c: Likewise.
+ * gcc.target/i386/pr88531-1c.c: Likewise.
+ * gcc.target/i386/pr88531-2a.c: Likewise.
+ * gcc.target/i386/pr88531-2b.c: Likewise.
+ * gcc.target/i386/pr88531-2c.c: Likewise.
+
+2021-08-06 Martin Sebor <msebor@redhat.com>
+
+ * c-c++-common/Wsizeof-pointer-memaccess1.c: Also disable
+ -Wstringop-overread.
+ * c-c++-common/attr-nonstring-3.c: Adjust pattern of expected message.
+ * gcc.dg/Warray-bounds-39.c: Add an xfail due to a known bug.
+ * gcc.dg/Wstring-compare-3.c: Also disable -Wstringop-overread.
+ * gcc.dg/attr-nonstring-2.c: Adjust pattern of expected message.
+ * gcc.dg/attr-nonstring-4.c: Same.
+ * gcc.dg/Wstringop-overread-6.c: New test.
+ * gcc.dg/sso-14.c: Fix typos to avoid buffer overflow.
+
+2021-08-06 Christophe Lyon <christophe.lyon@foss.st.com>
+
+ PR target/101723
+ * gcc.target/arm/pr69245.c: Make sure to emit code for fn1, fix
+ typo.
+
+2021-08-06 Christophe Lyon <christophe.lyon@foss.st.com>
+
+ PR target/101723
+ * gcc.target/arm/attr-neon3.c: Fix typo.
+ * gcc.target/arm/pragma_fpu_attribute_2.c: Fix typo.
+
+2021-08-06 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/101797
+ * gcc.target/i386/pr101797.c: New test.
+
+2021-08-06 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
+ tests.
+
+2021-08-06 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
+ tests.
+
+2021-08-06 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
+ tests.
+
+2021-08-06 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
+ tests.
+
+2021-08-06 Martin Liska <mliska@suse.cz>
+
+ * gcc.target/powerpc/pragma-optimize.c: New test.
+
+2021-08-06 Richard Biener <rguenther@suse.de>
+
+ * gfortran.dg/vect/vect-8.f90: Simplify aarch64 scanning.
+
+2021-08-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * gcc.dg/gcov-info-to-gcda.c: New test.
+
+2021-08-05 Jonathan Wakely <jwakely@redhat.com>
+
+ * g++.old-deja/g++.other/inline7.C: Cast nodiscard call to void.
+
+2021-08-05 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/99744
+ * gcc.target/i386/pr99744-3.c: New test.
+ * gcc.target/i386/pr99744-4.c: Likewise.
+ * gcc.target/i386/pr99744-5.c: Likewise.
+ * gcc.target/i386/pr99744-6.c: Likewise.
+ * gcc.target/i386/pr99744-7.c: Likewise.
+ * gcc.target/i386/pr99744-8.c: Likewise.
+
+2021-08-05 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/101723
+ * gcc.target/arm/cortex-m55-nofp-flag-hard.c: Update expected output.
+ * gcc.target/arm/cortex-m55-nofp-flag-softfp.c: Likewise.
+ * gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/mve_fpu1.c: Convert to dg-do assemble.
+ Add a non-no-op function body.
+ * gcc.target/arm/mve/intrinsics/mve_fpu2.c: Likewise.
+ * gcc.target/arm/pr98636.c (dg-options): Add -mfloat-abi=softfp.
+ * gcc.target/arm/attr-neon.c: Tighten scan-assembler tests.
+ * gcc.target/arm/attr-neon2.c: Use -Ofast, convert test to use
+ check-function-bodies.
+ * gcc.target/arm/attr-neon3.c: Likewise.
+ * gcc.target/arm/pr69245.c: Tighten scan-assembler match, but allow
+ multiple instances.
+ * gcc.target/arm/pragma_fpu_attribute.c: Likewise.
+ * gcc.target/arm/pragma_fpu_attribute_2.c: Likewise.
+
+2021-08-05 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vsubX_high_cost.c: New test.
+
+2021-08-05 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vaddX_high_cost.c: New test.
+
+2021-08-05 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/vect/bb-slp-pr101756.c: Add -w.
+
+2021-08-05 Eric Botcazou <ebotcazou@gcc.gnu.org>
+
+ * gcc.dg/sso-15.c: New test.
+
+2021-08-05 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/cond_op_anylogic_d-1.c: New test.
+ * gcc.target/i386/cond_op_anylogic_d-2.c: New test.
+ * gcc.target/i386/cond_op_anylogic_q-1.c: New test.
+ * gcc.target/i386/cond_op_anylogic_q-2.c: New test.
+
+2021-08-05 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/cond_op_maxmin_double-1.c: New test.
+ * gcc.target/i386/cond_op_maxmin_double-2.c: New test.
+ * gcc.target/i386/cond_op_maxmin_float-1.c: New test.
+ * gcc.target/i386/cond_op_maxmin_float-2.c: New test.
+
+2021-08-05 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/cond_op_maxmin_b-1.c: New test.
+ * gcc.target/i386/cond_op_maxmin_b-2.c: New test.
+ * gcc.target/i386/cond_op_maxmin_d-1.c: New test.
+ * gcc.target/i386/cond_op_maxmin_d-2.c: New test.
+ * gcc.target/i386/cond_op_maxmin_q-1.c: New test.
+ * gcc.target/i386/cond_op_maxmin_q-2.c: New test.
+ * gcc.target/i386/cond_op_maxmin_ub-1.c: New test.
+ * gcc.target/i386/cond_op_maxmin_ub-2.c: New test.
+ * gcc.target/i386/cond_op_maxmin_ud-1.c: New test.
+ * gcc.target/i386/cond_op_maxmin_ud-2.c: New test.
+ * gcc.target/i386/cond_op_maxmin_uq-1.c: New test.
+ * gcc.target/i386/cond_op_maxmin_uq-2.c: New test.
+ * gcc.target/i386/cond_op_maxmin_uw-1.c: New test.
+ * gcc.target/i386/cond_op_maxmin_uw-2.c: New test.
+ * gcc.target/i386/cond_op_maxmin_w-1.c: New test.
+ * gcc.target/i386/cond_op_maxmin_w-2.c: New test.
+
+2021-08-04 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/101570
+ * gcc.dg/analyzer/asm-x86-1.c: New test.
+ * gcc.dg/analyzer/asm-x86-lp64-1.c: New test.
+ * gcc.dg/analyzer/asm-x86-lp64-2.c: New test.
+ * gcc.dg/analyzer/pr101570.c: New test.
+ * gcc.dg/analyzer/torture/asm-x86-linux-array_index_mask_nospec.c:
+ New test.
+ * gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c: New
+ test.
+ * gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-2.c: New
+ test.
+ * gcc.dg/analyzer/torture/asm-x86-linux-cpuid.c: New test.
+ * gcc.dg/analyzer/torture/asm-x86-linux-rdmsr-paravirt.c: New
+ test.
+ * gcc.dg/analyzer/torture/asm-x86-linux-rdmsr.c: New test.
+ * gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c:
+ New test.
+ * gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-reduced.c:
+ New test.
+
+2021-08-04 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101742
+ * gcc.target/i386/pr101742a.c: New test.
+ * gcc.target/i386/pr101742b.c: Likewise.
+
+2021-08-04 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101772
+ * gcc.target/i386/eh_return-2.c: New test.
+
+2021-08-04 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * gcc.target/s390/vector/perm-vpdi.c: New test.
+
+2021-08-04 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * gcc.target/s390/vector/perm-merge.c: New test.
+ * gcc.target/s390/vector/vec-types.h: New test.
+
+2021-08-04 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * gcc.target/s390/zvector/vec-permi.c: Removed.
+ * gcc.target/s390/zvector/vec_permi.c: New test.
+
+2021-08-04 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * gcc.target/s390/vector/long-double-asm-in-out-hard-fp-reg.c:
+ Instead of vpdi with 0 and 5 vmrlg and vmrhg are used now.
+ * gcc.target/s390/vector/long-double-asm-inout-hard-fp-reg.c: Likewise.
+ * gcc.target/s390/zvector/vec-types.h: New test.
+ * gcc.target/s390/zvector/vec_merge.c: New test.
+
+2021-08-04 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vmul_high_cost.c: New test.
+
+2021-08-04 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vmul_element_cost.c: New test.
+
+2021-08-04 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/cost_model_12.c: New test.
+
+2021-08-04 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/101750
+ * g++.dg/vect/pr99149.cc: Name class.
+
+2021-08-04 Richard Biener <rguenther@suse.de>
+
+ * gcc.target/i386/vect-gather-1.c: New testcase.
+ * gfortran.dg/vect/vect-8.f90: Adjust.
+
+2021-08-04 Roger Sayle <roger@nextmovesoftware.com>
+ Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/fold-ior-4.c: New test.
+
+2021-08-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101756
+ * gcc.dg/vect/bb-slp-pr101756.c: New testcase.
+
+2021-08-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/101759
+ * g++.dg/gomp/pr101759.C: New test.
+ * g++.dg/goacc/pr101759.C: New test.
+
+2021-08-04 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.c-torture/execute/ieee/pr29302-1.x: Undo doubly applied patch.
+
+2021-08-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101769
+ * g++.dg/tree-ssa/pr101769.C: New testcase.
+
+2021-08-04 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/cond_op_addsubmul_d-2.c: Add
+ dg-require-effective-target for avx512.
+ * gcc.target/i386/cond_op_addsubmul_q-2.c: Ditto.
+ * gcc.target/i386/cond_op_addsubmul_w-2.c: Ditto.
+ * gcc.target/i386/cond_op_addsubmuldiv_double-2.c: Ditto.
+ * gcc.target/i386/cond_op_addsubmuldiv_float-2.c: Ditto.
+ * gcc.target/i386/cond_op_fma_double-2.c: Ditto.
+ * gcc.target/i386/cond_op_fma_float-2.c: Ditto.
+
+2021-08-04 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/cond_op_fma_double-1.c: New test.
+ * gcc.target/i386/cond_op_fma_double-2.c: New test.
+ * gcc.target/i386/cond_op_fma_float-1.c: New test.
+ * gcc.target/i386/cond_op_fma_float-2.c: New test.
+
+2021-08-03 Eugene Rozenfeld <erozen@microsoft.com>
+
+ * lib/profopt.exp: Pass gdwarf-4 when compiling test to profile; pass -gcov_version=2.
+ * lib/target-supports.exp: Remove unnecessary -o perf.data passed to gcc-auto-profile.
+
+2021-08-03 Eugene Rozenfeld <erozen@microsoft.com>
+
+ * gcc.dg/tree-prof/indir-call-prof-2.c: Fix dg-final-use-autofdo.
+ * lib/profopt.exp: Pass -fearly-inlining when compiling with AutoFDO.
+
+2021-08-03 Eugene Rozenfeld <erozen@microsoft.com>
+
+ * g++.dg/tree-prof/indir-call-prof.C: Fix options, increase the number of iterations.
+ * g++.dg/tree-prof/morefunc.C: Fix options, increase the number of iterations.
+ * g++.dg/tree-prof/reorder.C: Fix options, increase the number of iterations.
+ * gcc.dg/tree-prof/indir-call-prof-2.c: Fix options, increase the number of iterations.
+ * gcc.dg/tree-prof/indir-call-prof.c: Fix options.
+
+2021-08-03 Martin Sebor <msebor@redhat.com>
+
+ PR testsuite/101688
+ * g++.dg/warn/Wstringop-overflow-4.C: Disable a test case in ILP32.
+
+2021-08-03 Paul A. Clarke <pc@us.ibm.com>
+
+ * gcc.target/powerpc/sse4_1-phminposuw.c: Copy from
+ gcc/testsuite/gcc.target/i386, adjust dg directives to suit,
+ make more robust.
+
+2021-08-03 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/avx-vzeroupper-14.c: Pass -mno-avx512f to
+ disable XMM31.
+ * gcc.target/i386/avx-vzeroupper-15.c: Likewise.
+ * gcc.target/i386/pr82941-1.c: Updated. Check for vzeroupper.
+ * gcc.target/i386/pr82942-1.c: Likewise.
+ * gcc.target/i386/pr82990-1.c: Likewise.
+ * gcc.target/i386/pr82990-3.c: Likewise.
+ * gcc.target/i386/pr82990-5.c: Likewise.
+ * gcc.target/i386/pr100865-4b.c: Likewise.
+ * gcc.target/i386/pr100865-6b.c: Likewise.
+ * gcc.target/i386/pr100865-7b.c: Likewise.
+ * gcc.target/i386/pr100865-10b.c: Likewise.
+ * gcc.target/i386/pr100865-8b.c: Updated.
+ * gcc.target/i386/pr100865-9b.c: Likewise.
+ * gcc.target/i386/pr100865-11b.c: Likewise.
+ * gcc.target/i386/pr100865-12b.c: Likewise.
+
+2021-08-03 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/cond_op_addsubmul_d-1.c: New test.
+ * gcc.target/i386/cond_op_addsubmul_d-2.c: New test.
+ * gcc.target/i386/cond_op_addsubmul_q-1.c: New test.
+ * gcc.target/i386/cond_op_addsubmul_q-2.c: New test.
+ * gcc.target/i386/cond_op_addsubmul_w-1.c: New test.
+ * gcc.target/i386/cond_op_addsubmul_w-2.c: New test.
+
+2021-08-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR analyzer/101721
+ * gcc.dg/analyzer/pr101721.c: New test.
+
+2021-08-03 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/80566
+ * g++.target/i386/pr80566-1.C: New test.
+ * g++.target/i386/pr80566-2.C: Likewise.
+
+2021-08-03 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/cond_op_addsubmuldiv_double-1.c: New test.
+ * gcc.target/i386/cond_op_addsubmuldiv_double-2.c: New test.
+ * gcc.target/i386/cond_op_addsubmuldiv_float-1.c: New test.
+ * gcc.target/i386/cond_op_addsubmuldiv_float-2.c: New test.
+
+2021-08-02 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/vect8-ret.c: Also pass -mno-sse.
+
+2021-08-02 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/incoming-11.c: Expect no stack realignment.
+
+2021-08-02 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/sw-1.c: Also pass -mno-avx for ia32.
+
+2021-08-02 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/cold-attribute-1.c: Also pass -mno-avx.
+
+2021-08-02 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/pr72839.c: Also pass -mno-avx.
+
+2021-08-02 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/pieces-memcpy-10.c: New test.
+ * gcc.target/i386/pieces-memcpy-11.c: Likewise.
+ * gcc.target/i386/pieces-memcpy-12.c: Likewise.
+ * gcc.target/i386/pieces-memcpy-13.c: Likewise.
+ * gcc.target/i386/pieces-memcpy-14.c: Likewise.
+ * gcc.target/i386/pieces-memcpy-15.c: Likewise.
+ * gcc.target/i386/pieces-memcpy-16.c: Likewise.
+ * gcc.target/i386/pieces-memset-1.c: Likewise.
+ * gcc.target/i386/pieces-memset-2.c: Likewise.
+ * gcc.target/i386/pieces-memset-3.c: Likewise.
+ * gcc.target/i386/pieces-memset-4.c: Likewise.
+ * gcc.target/i386/pieces-memset-5.c: Likewise.
+ * gcc.target/i386/pieces-memset-6.c: Likewise.
+ * gcc.target/i386/pieces-memset-7.c: Likewise.
+ * gcc.target/i386/pieces-memset-8.c: Likewise.
+ * gcc.target/i386/pieces-memset-9.c: Likewise.
+ * gcc.target/i386/pieces-memset-10.c: Likewise.
+ * gcc.target/i386/pieces-memset-11.c: Likewise.
+ * gcc.target/i386/pieces-memset-12.c: Likewise.
+ * gcc.target/i386/pieces-memset-13.c: Likewise.
+ * gcc.target/i386/pieces-memset-14.c: Likewise.
+ * gcc.target/i386/pieces-memset-15.c: Likewise.
+ * gcc.target/i386/pieces-memset-16.c: Likewise.
+ * gcc.target/i386/pieces-memset-17.c: Likewise.
+ * gcc.target/i386/pieces-memset-18.c: Likewise.
+ * gcc.target/i386/pieces-memset-19.c: Likewise.
+ * gcc.target/i386/pieces-memset-20.c: Likewise.
+ * gcc.target/i386/pieces-memset-21.c: Likewise.
+ * gcc.target/i386/pieces-memset-22.c: Likewise.
+ * gcc.target/i386/pieces-memset-23.c: Likewise.
+ * gcc.target/i386/pieces-memset-24.c: Likewise.
+ * gcc.target/i386/pieces-memset-25.c: Likewise.
+ * gcc.target/i386/pieces-memset-26.c: Likewise.
+ * gcc.target/i386/pieces-memset-27.c: Likewise.
+ * gcc.target/i386/pieces-memset-28.c: Likewise.
+ * gcc.target/i386/pieces-memset-29.c: Likewise.
+ * gcc.target/i386/pieces-memset-30.c: Likewise.
+ * gcc.target/i386/pieces-memset-31.c: Likewise.
+ * gcc.target/i386/pieces-memset-32.c: Likewise.
+ * gcc.target/i386/pieces-memset-33.c: Likewise.
+ * gcc.target/i386/pieces-memset-34.c: Likewise.
+ * gcc.target/i386/pieces-memset-35.c: Likewise.
+ * gcc.target/i386/pieces-memset-36.c: Likewise.
+ * gcc.target/i386/pieces-memset-37.c: Likewise.
+ * gcc.target/i386/pieces-memset-38.c: Likewise.
+ * gcc.target/i386/pieces-memset-39.c: Likewise.
+ * gcc.target/i386/pieces-memset-40.c: Likewise.
+ * gcc.target/i386/pieces-memset-41.c: Likewise.
+ * gcc.target/i386/pieces-memset-42.c: Likewise.
+ * gcc.target/i386/pieces-memset-43.c: Likewise.
+ * gcc.target/i386/pieces-memset-44.c: Likewise.
+ * gcc.target/i386/pieces-memcpy-7.c: New file.
+ * gcc.target/i386/pieces-memcpy-8.c: New file.
+ * gcc.target/i386/pieces-memcpy-9.c: New file.
+
+2021-08-02 H.J. Lu <hjl.tools@gmail.com>
+
+ PR middle-end/90773
+ * gcc.target/i386/pr90773-20.c: New test.
+ * gcc.target/i386/pr90773-21.c: Likewise.
+ * gcc.target/i386/pr90773-22.c: Likewise.
+ * gcc.target/i386/pr90773-23.c: Likewise.
+ * gcc.target/i386/pr90773-26.c: Likewise.
+
+2021-08-02 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/pr90773-1.c: Adjust to expect movq for 32-bit.
+ * gcc.target/i386/pr90773-4.c: Also run for 32-bit.
+ * gcc.target/i386/pr90773-15.c: Likewise.
+ * gcc.target/i386/pr90773-16.c: Likewise.
+ * gcc.target/i386/pr90773-17.c: Likewise.
+ * gcc.target/i386/pr90773-24.c: Likewise.
+ * gcc.target/i386/pr90773-25.c: Likewise.
+ * gcc.target/i386/pr100865-1.c: Likewise.
+ * gcc.target/i386/pr100865-2.c: Likewise.
+ * gcc.target/i386/pr100865-3.c: Likewise.
+ * gcc.target/i386/pr90773-14.c: Also run for 32-bit and expect
+ XMM movd to store 4 bytes.
+ * gcc.target/i386/pr100865-4a.c: Also run for 32-bit and expect
+ YMM registers.
+ * gcc.target/i386/pr100865-4b.c: Likewise.
+ * gcc.target/i386/pr100865-10a.c: Expect YMM registers.
+ * gcc.target/i386/pr100865-10b.c: Likewise.
+
+2021-08-02 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/eh_return-1.c: New test.
+
+2021-08-02 H.J. Lu <hjl.tools@gmail.com>
+
+ PR middle-end/90773
+ * gcc.target/i386/pr90773-5.c: Updated to expect XMM register.
+ * gcc.target/i386/pr90773-14.c: Likewise.
+ * gcc.target/i386/pr90773-15.c: New test.
+ * gcc.target/i386/pr90773-16.c: Likewise.
+ * gcc.target/i386/pr90773-17.c: Likewise.
+ * gcc.target/i386/pr90773-18.c: Likewise.
+ * gcc.target/i386/pr90773-19.c: Likewise.
+
+2021-08-02 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.dg/tree-ssa/phi-opt-25.c: New test case.
+
+2021-08-01 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/78103
+ * gcc.target/i386/pr78103-2.c: Also scan incl.
+ * gcc.target/i386/pr78103-3.c: Scan leal|addl|incl for x32. Also
+ scan incq.
+
+2021-07-31 Jason Merrill <jason@redhat.com>
+
+ PR c++/96636
+ * g++.dg/ext/anon-struct9.C: New test.
+
+2021-07-31 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.target/i386/dec-cmov-2.c: Require -march=core2 with -m32.
+
+2021-07-31 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/gomp/attrs-9.C: New test.
+
+2021-07-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/78103
+ * gcc.target/i386/pr78103-1.c: New test.
+ * gcc.target/i386/pr78103-2.c: New test.
+ * gcc.target/i386/pr78103-3.c: New test.
+
+2021-07-31 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * gcc.dg/tree-ssa/ssa-dse-26.c: Skip on mmix-knuth-mmixware.
+
+2021-07-31 Hans-Peter Nilsson <hp@bitrange.com>
+
+ PR middle-end/101674
+ * gcc.dg/uninit-pred-9_b.c: Xfail for mmix-*-* too.
+
+2021-07-30 Paul A. Clarke <pc@us.ibm.com>
+
+ * gcc.target/powerpc/sse4_1-floorpd.c: New.
+ * gcc.target/powerpc/sse4_1-floorps.c: New.
+ * gcc.target/powerpc/sse4_1-floorsd.c: New.
+ * gcc.target/powerpc/sse4_1-floorss.c: New.
+ * gcc.target/powerpc/sse4_1-roundpd-2.c: Copy from
+ gcc/testsuite/gcc.target/i386 and adjust dg directives to suit.
+
+2021-07-30 Paul A. Clarke <pc@us.ibm.com>
+
+ * gcc.target/powerpc/sse4_1-ceilpd.c: New.
+ * gcc.target/powerpc/sse4_1-ceilps.c: New.
+ * gcc.target/powerpc/sse4_1-ceilsd.c: New.
+ * gcc.target/powerpc/sse4_1-ceilss.c: New.
+ * gcc.target/powerpc/sse4_1-round-data.h: New.
+ * gcc.target/powerpc/sse4_1-round.h: New.
+ * gcc.target/powerpc/sse4_1-round2.h: New.
+ * gcc.target/powerpc/sse4_1-roundpd-3.c: Copy from gcc.target/i386
+ and adjust dg directives to suit.
+ * gcc.target/powerpc/sse4_1-check.h (__VSX_SSE2__): Define.
+
+2021-07-30 Paul A. Clarke <pc@us.ibm.com>
+
+ * gcc.target/powerpc/sse4_1-blendpd.c: Copy from gcc.target/i386
+ and adjust dg directives to suit.
+ * gcc.target/powerpc/sse4_1-blendps-2.c: Likewise.
+ * gcc.target/powerpc/sse4_1-blendps.c: Likewise.
+ * gcc.target/powerpc/sse4_1-blendvpd.c: Likewise.
+
+2021-07-30 Roger Sayle <roger@nextmovesoftware.com>
+ Uroš Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/dec-cmov-1.c: New test.
+ * gcc.target/i386/dec-cmov-2.c: New test.
+
+2021-07-30 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/tree-ssa/pr61839_2.c: Adjust. Add new const fold test.
+
+2021-07-30 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/tree-ssa/pr61839_2.c: Adjust.
+
+2021-07-30 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/101671
+ * gcc.c-torture/compile/pr83510.c: Move test functions...
+ * gcc.dg/Warray-bounds-87.c: ...to this file.
+
+2021-07-30 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/pr100865-3.c: Expect vmovdqu8 instead of
+ vmovdqu.
+ * gcc.target/i386/pr100865-4b.c: Likewise.
+
+2021-07-30 Andrew Pinski <apinski@marvell.com>
+
+ PR testsuite/101517
+ * g++.dg/warn/Wunused-18.C: New test.
+ * gcc.c-torture/compile/20030405-2.c: New test.
+ * gcc.c-torture/compile/20040304-2.c: New test.
+ * gcc.dg/20030612-2.c: New test.
+
+2021-07-30 Xi Ruoyao <xry111@mengyan1223.wang>
+
+ PR target/101132
+ * gcc.target/mips/pr101132.c: New test.
+
+2021-07-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/101539
+ * g++.dg/cpp2a/is-pointer-interconvertible-base-of1.C: New test.
+ * g++.dg/cpp2a/is-pointer-interconvertible-with-class1.C: New test.
+ * g++.dg/cpp2a/is-pointer-interconvertible-with-class2.C: New test.
+ * g++.dg/cpp2a/is-pointer-interconvertible-with-class3.C: New test.
+ * g++.dg/cpp2a/is-pointer-interconvertible-with-class4.C: New test.
+ * g++.dg/cpp2a/is-pointer-interconvertible-with-class5.C: New test.
+ * g++.dg/cpp2a/is-pointer-interconvertible-with-class6.C: New test.
+
+2021-07-30 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/ext/anon-struct8.C: New test.
+
+2021-07-30 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/cpp0x/gen-attrs-76.C: New test.
+
+2021-07-30 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101685
+ * gcc.target/i386/pr101685.c: New test.
+
+2021-07-30 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/shrink-wrap-loop.c: Enable early jump threading. Mark as
+ XFAIL.
+
+2021-07-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/101582
+ * g++.dg/cpp0x/gen-attrs-45.C: Expect a warning about ignored
+ attributes instead of error.
+ * g++.dg/cpp0x/gen-attrs-75.C: New test.
+ * g++.dg/modules/pr101582-1.C: New test.
+
+2021-07-30 Xi Ruoyao <xry111@mengyan1223.wang>
+
+ PR ipa/101396
+ * g++.dg/lto/pr101396_0.C: New test.
+ * g++.dg/lto/pr101396_1.C: New test.
+
+2021-07-29 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/101674
+ * gcc.dg/uninit-pred-9_b.c: Xfail just the failing assertion and
+ correct target.
+
+2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/101672
+ * gdc.dg/pr100967.d: Update test.
+ * gdc.dg/pr101672.d: New test.
+
+2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/101664
+ * gdc.dg/extern-c++/extern-c++.exp: New.
+ * gdc.dg/extern-c++/pr101664.d: New test.
+ * gdc.dg/extern-c++/pr101664_1.cc: New test.
+
+2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/96435
+ * gdc.dg/torture/pr96435.d: New test.
+
+2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/101657
+ * gdc.dg/pr101657.d: New test.
+
+2021-07-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/101647
+ * g++.dg/pr71389.C: Include <array> instead of <functional>.
+ * g++.dg/cpp0x/initlist48.C: Include also <initializer_list>.
+
+2021-07-29 Thomas Schwinge <thomas@codesourcery.com>
+ Julian Brown <julian@codesourcery.com>
+ Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ * c-c++-common/goacc/classify-kernels-unparallelized.c:
+ 's%oaccdevlow%oaccloops%g'.
+ * c-c++-common/goacc/classify-kernels.c: Likewise.
+ * c-c++-common/goacc/classify-parallel.c: Likewise.
+ * c-c++-common/goacc/classify-routine-nohost.c: Likewise.
+ * c-c++-common/goacc/classify-routine.c: Likewise.
+ * c-c++-common/goacc/classify-serial.c: Likewise.
+ * c-c++-common/goacc/routine-nohost-1.c: Likewise.
+ * g++.dg/goacc/template.C: Likewise.
+ * gcc.dg/goacc/loop-processing-1.c: Likewise.
+ * gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
+ * gfortran.dg/goacc/classify-kernels.f95: Likewise.
+ * gfortran.dg/goacc/classify-parallel.f95: Likewise.
+ * gfortran.dg/goacc/classify-routine-nohost.f95: Likewise.
+ * gfortran.dg/goacc/classify-routine.f95: Likewise.
+ * gfortran.dg/goacc/classify-serial.f95: Likewise.
+ * gfortran.dg/goacc/routine-multiple-directives-1.f90: Likewise.
+
+2021-07-29 Haochen Gui <guihaoc@gcc.gnu.org>
+
+ PR target/100952
+ * gcc.target/powerpc/pr56605.c: Change matching
+ conditions.
+ * gcc.target/powerpc/pr81348.c: Likewise.
+
+2021-07-29 Aldy Hernandez <aldyh@redhat.com>
+
+ * g++.dg/debug/dwarf2/deallocator.C: Adjust for threader.
+ * gcc.c-torture/compile/pr83510.c: Same.
+ * gcc.dg/analyzer/pr94851-2.c: Same.
+ * gcc.dg/loop-unswitch-2.c: Same.
+ * gcc.dg/old-style-asm-1.c: Same.
+ * gcc.dg/pr68317.c: Same.
+ * gcc.dg/pr97567-2.c: Same.
+ * gcc.dg/predict-9.c: Same.
+ * gcc.dg/shrink-wrap-loop.c: Same.
+ * gcc.dg/sibcall-1.c: Same.
+ * gcc.dg/tree-ssa/builtin-sprintf-3.c: Same.
+ * gcc.dg/tree-ssa/pr21001.c: Same.
+ * gcc.dg/tree-ssa/pr21294.c: Same.
+ * gcc.dg/tree-ssa/pr21417.c: Same.
+ * gcc.dg/tree-ssa/pr21458-2.c: Same.
+ * gcc.dg/tree-ssa/pr21563.c: Same.
+ * gcc.dg/tree-ssa/pr49039.c: Same.
+ * gcc.dg/tree-ssa/pr61839_1.c: Same.
+ * gcc.dg/tree-ssa/pr61839_3.c: Same.
+ * gcc.dg/tree-ssa/pr77445-2.c: Same.
+ * gcc.dg/tree-ssa/split-path-4.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-11.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-12.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-14.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-18.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-6.c: Same.
+ * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same.
+ * gcc.dg/tree-ssa/ssa-fre-48.c: Same.
+ * gcc.dg/tree-ssa/ssa-thread-11.c: Same.
+ * gcc.dg/tree-ssa/ssa-thread-12.c: Same.
+ * gcc.dg/tree-ssa/ssa-thread-14.c: Same.
+ * gcc.dg/tree-ssa/vrp02.c: Same.
+ * gcc.dg/tree-ssa/vrp03.c: Same.
+ * gcc.dg/tree-ssa/vrp05.c: Same.
+ * gcc.dg/tree-ssa/vrp06.c: Same.
+ * gcc.dg/tree-ssa/vrp07.c: Same.
+ * gcc.dg/tree-ssa/vrp09.c: Same.
+ * gcc.dg/tree-ssa/vrp19.c: Same.
+ * gcc.dg/tree-ssa/vrp20.c: Same.
+ * gcc.dg/tree-ssa/vrp33.c: Same.
+ * gcc.dg/uninit-pred-9_b.c: Same.
+ * gcc.dg/uninit-pr61112.c: Same.
+ * gcc.dg/vect/bb-slp-16.c: Same.
+ * gcc.target/i386/avx2-vect-aggressive.c: Same.
+ * gcc.dg/tree-ssa/ranger-threader-1.c: New test.
+ * gcc.dg/tree-ssa/ranger-threader-2.c: New test.
+ * gcc.dg/tree-ssa/ranger-threader-3.c: New test.
+ * gcc.dg/tree-ssa/ranger-threader-4.c: New test.
+ * gcc.dg/tree-ssa/ranger-threader-5.c: New test.
+
+2021-07-29 Richard Biener <rguenther@suse.de>
+
+ PR c/101512
+ * gcc.dg/torture/pr101512.c: New testcase.
+
+2021-07-29 liuhongt <hongtao.liu@intel.com>
+
+ PR target/99881
+ * gcc.target/i386/pr91446.c:
+ * gcc.target/i386/pr92658-avx512bw-2.c:
+ * gcc.target/i386/pr92658-sse4-2.c:
+ * gcc.target/i386/pr92658-sse4.c:
+ * gcc.target/i386/pr99881.c:
+
+2021-07-29 liuhongt <hongtao.liu@intel.com>
+
+ PR target/39821
+ * gcc.target/i386/sse2-pr39821.c: New test.
+ * gcc.target/i386/sse4-pr39821.c: New test.
+
+2021-07-29 Jiufu Guo <guojiufu@linux.ibm.com>
+
+ PR target/61837
+ * gcc.target/powerpc/pr61837.c: New test.
+
+2021-07-28 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/101494
+ * gcc.dg/uninit-pr101494.c: New test.
+
+2021-07-28 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/101601
+ * g++.dg/warn/Warray-bounds-25.C: New test.
+ * gcc.dg/Warray-bounds-85.c: New test.
+
+2021-07-28 Michael Meissner <meissner@linux.ibm.com>
+
+ PR testsuite/100168
+ * gcc.dg/pr56727-2.c: Add support for PC-relative calls.
+
+2021-07-28 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/torture/ubsan-1.c: New test.
+
+2021-07-28 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/101564
+ * gfortran.dg/allocate_stat_3.f90: New test.
+ * gfortran.dg/allocate_stat.f90: Adjust error messages.
+ * gfortran.dg/implicit_11.f90: Likewise.
+ * gfortran.dg/inquiry_type_ref_3.f90: Likewise.
+
+2021-07-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/101624
+ * gfortran.dg/ubsan/ubsan.exp: New file.
+ * gfortran.dg/ubsan/pr101624.f90: New test.
+
+2021-07-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/101642
+ * gcc.c-torture/compile/pr101642.c: New test.
+
+2021-07-28 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * gcc.target/s390/global-array-element-pic2.c: Add -mzarch, add
+ an expectation for 31-bit mode.
+ * gcc.target/s390/load-imm64-1.c: Use unsigned long long.
+ * gcc.target/s390/load-imm64-2.c: Likewise.
+ * gcc.target/s390/vector/long-double-vx-macro-off-on.c: Use
+ -mzarch.
+ * gcc.target/s390/vector/long-double-vx-macro-on-off.c:
+ Likewise.
+
+2021-07-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101615
+ * gcc.dg/vect/bb-slp-pr101615-2.c: New testcase.
+
+2021-07-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/smov_1.c: New test.
+ * gcc.target/aarch64/sve/clastb_4.c: Adjust clast scan-assembler.
+
+2021-07-28 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101456
+ * gcc.target/i386/pr101456-1.c: New test.
+ * gcc.target/i386/pr101456-2.c: Likewise.
+
+2021-07-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101615
+ * gcc.dg/vect/bb-slp-pr101615-1.c: New testcase.
+
+2021-07-28 Siddhesh Poyarekar <siddhesh@gotplt.org>
+
+ * gcc.dg/analyzer/strdup-1.c (test_4, test_5, test_6): New
+ tests.
+
+2021-07-28 Siddhesh Poyarekar <siddhesh@gotplt.org>
+
+ * gcc.dg/analyzer/attr-malloc-1.c (compatible_alloc,
+ compatible_alloc2): New extern allocator declarations.
+ (test_9, test_10): New tests.
+
+2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/101640
+ * gdc.dg/pr96429.d: Update test.
+ * gdc.dg/pr101640.d: New test.
+
+2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/101490
+ * gdc.dg/pr101490.d: New test.
+
+2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/101127
+ * gdc.dg/pr101127a.d: New test.
+ * gdc.dg/pr101127b.d: New test.
+
+2021-07-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/101611
+ * gcc.target/i386/avx2-pr101611-1.c: New test.
+ * gcc.target/i386/avx2-pr101611-2.c: New test.
+
+2021-07-28 Martin Uecker <muecker@gwdg.de>
+
+ * gcc.dg/Wnonnull-4.c: Correct argument numbers in warnings.
+
+2021-07-28 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR libfortran/101317
+ * gfortran.dg/ISO_Fortran_binding_17.f90: Fix typo in error
+ message patterns.
+
+2021-07-28 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR libfortran/101310
+ * gfortran.dg/ISO_Fortran_binding_1.c (section_c): Remove
+ incorrect assertions.
+
+2021-07-28 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR libfortran/101305
+ * gfortran.dg/ISO_Fortran_binding_1.c: Adjust include path.
+ * gfortran.dg/ISO_Fortran_binding_10.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_11.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_12.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_15.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_16.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_17.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_18.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_3.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_5.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_6.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_7.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_8.c: Likewise.
+ * gfortran.dg/ISO_Fortran_binding_9.c: Likewise.
+ * gfortran.dg/PR94327.c: Likewise.
+ * gfortran.dg/PR94331.c: Likewise.
+ * gfortran.dg/bind_c_array_params_3_aux.c: Likewise.
+ * gfortran.dg/iso_fortran_binding_uint8_array_driver.c: Likewise.
+ * gfortran.dg/pr93524.c: Likewise.
+
+2021-07-28 Kewen Lin <linkw@linux.ibm.com>
+
+ PR tree-optimization/101596
+ * gcc.target/powerpc/pr101596-1.c: New test.
+ * gcc.target/powerpc/pr101596-2.c: Likewise.
+ * gcc.target/powerpc/pr101596-3.c: Likewise.
+
+2021-07-28 liuhongt <hongtao.liu@intel.com>
+
+ PR target/99881
+ * gcc.target/i386/pr99881.c: New test.
+
+2021-07-27 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/101584
+ * gcc.dg/uninit-38.c: Remove assertions.
+ * gcc.dg/uninit-41.c: New test.
+
+2021-07-27 Jonathan Wakely <jwakely@redhat.com>
+
+ PR testsuite/101646
+ * g++.dg/coroutines/pr99047.C: Fix includes.
+ * g++.dg/pr71655.C: Likewise.
+
+2021-07-27 Martin Sebor <msebor@redhat.com>
+
+ PR c/101585
+ * gcc.dg/Wvla-parameter-13.c: New test.
+
+2021-07-27 Jeff Law <jlaw@localhost.localdomain>
+
+ * g++.dg/gcov/gcov-threads-1.C: Fix argument to pthread_join.
+
+2021-07-27 Marek Polacek <polacek@redhat.com>
+
+ DR 1512
+ PR c++/99701
+ * g++.dg/cpp0x/nullptr11.C: Remove invalid tests.
+ * g++.dg/cpp0x/nullptr46.C: Add dg-error.
+ * g++.dg/cpp2a/spaceship-err7.C: New test.
+ * g++.dg/expr/ptr-comp4.C: New test.
+
+2021-07-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101573
+ * gcc.dg/uninit-pr101573.c: New testcase.
+ * gcc.dg/uninit-15-O0.c: Adjust.
+ * gcc.dg/uninit-15.c: Likewise.
+ * gcc.dg/uninit-23.c: Likewise.
+ * c-c++-common/uninit-17.c: Likewise.
+
+2021-07-27 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.dg/ipa/remref-3.c: New test.
+ * gcc.dg/ipa/remref-4.c: Likewise.
+ * gcc.dg/ipa/remref-5.c: Likewise.
+ * gcc.dg/ipa/remref-6.c: Likewise.
+
+2021-07-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/101586
+ * g++.dg/torture/builtin-clear-padding-4.C: New test.
+
+2021-07-27 Michael Meissner <meissner@linux.ibm.com>
+
+ PR testsuite/100170
+ * gcc.target/powerpc/ppc-eq0-1.c: Adjust insn counts if power10
+ code is generated.
+ * gcc.target/powerpc/ppc-ne0-1.c: (ne0): Adjust insn counts if
+ power10 code is generated.
+ (plus_ne0): Move to ppc-ne0-2.c.
+ (cmp_plus_ne): Likewise.
+ (plus_ne0_cmp): Likewise.
+ * gcc.target/powerpc/ppc-ne0-2.c: New file.
+
+2021-07-26 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/sock-1.c: New test.
+ * gcc.dg/analyzer/sock-2.c: New test.
+
+2021-07-26 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr78888.c: New.
+
+2021-07-26 Roger Sayle <roger@nextmovesoftware.com>
+ Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/fold-eqrotate-1.c: New test case.
+ * gcc.dg/fold-eqbswap-1.c: New test case.
+
+2021-07-26 José Rui Faustino de Sousa <jrfsousa@gmail.com>
+ Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/93308
+ PR fortran/93963
+ PR fortran/94327
+ PR fortran/94331
+ PR fortran/97046
+ * gfortran.dg/ISO_Fortran_binding_1.f90: Add pointer attribute,
+ this test is still erroneous but now it compiles.
+ * gfortran.dg/bind_c_array_params_2.f90: Update regex to match
+ code changes.
+ * gfortran.dg/PR93308.f90: New test.
+ * gfortran.dg/PR93963.f90: New test.
+ * gfortran.dg/PR94327.c: New test.
+ * gfortran.dg/PR94327.f90: New test.
+ * gfortran.dg/PR94331.c: New test.
+ * gfortran.dg/PR94331.f90: New test.
+ * gfortran.dg/PR97046.f90: New test.
+
+2021-07-26 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/gomp/attrs-1.C: Use attribute syntax even for section
+ and scan directives.
+ * g++.dg/gomp/attrs-2.C: Likewise.
+ * g++.dg/gomp/attrs-6.C: New test.
+ * g++.dg/gomp/attrs-7.C: New test.
+ * g++.dg/gomp/attrs-8.C: New test.
+
+2021-07-23 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/101536
+ * gfortran.dg/pr101536.f90: New test.
+
+2021-07-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/101562
+ * gcc.c-torture/compile/pr101562.c: New test.
+
+2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
+ tests.
+
+2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
+ tests.
+
+2021-07-23 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101504
+ * gcc.target/i386/pr101504.c: New test.
+
+2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
+ tests.
+
+2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
+ tests.
+
+2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
+ tests.
+
+2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: Add new
+ tests.
+
+2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: New tests.
+
+2021-07-23 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/vector_structure_intrinsics.c: New test.
+
+2021-07-23 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/attrs-1.c: New test.
+ * c-c++-common/gomp/attrs-2.c: New test.
+ * c-c++-common/gomp/attrs-3.c: New test.
+
+2021-07-23 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/gomp/attrs-4.C: New test.
+ * g++.dg/gomp/attrs-5.C: New test.
+
+2021-07-23 Xi Ruoyao <xry111@mengyan1223.wang>
+
+ * gcc.target/mips/mips.exp (mips_option_groups): add
+ -finline and -fno-inline.
+
+2021-07-23 Xi Ruoyao <xry111@mengyan1223.wang>
+
+ Revert:
+ 2021-07-09 Xi Ruoyao <xry111@mengyan1223.wang>
+
+ * gcc.target/mips/cfgcleanup-jalr2.c: Remove -fno-inline and add
+ __attribute__((noinline)).
+ * gcc.target/mips/cfgcleanup-jalr3.c: Likewise.
+
+2021-07-23 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/feasibility-3.c: New test.
+
+2021-07-22 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/65178
+ * gcc.dg/uninit-pr65178.c: New test.
+
+2021-07-22 Martin Sebor <msebor@redhat.com>
+
+ PR testsuite/101568
+ * g++.dg/ipa/pr82352.C
+
+2021-07-22 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/10153
+ * gcc.c-torture/compile/pr10153-1.c: New test.
+ * gcc.c-torture/compile/pr10153-2.c: New test.
+
+2021-07-22 Andrew MacLeod <amacleod@redhat.com>
+
+ * g++.dg/pr101511.C: New.
+
+2021-07-22 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr101497.c: New.
+
+2021-07-22 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr101496.c: New.
+
+2021-07-22 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/fuse-caller-save-xmm.c: Adjust testcase.
+
+2021-07-22 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/mask-shift.c: New test.
+
+2021-07-21 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/101547
+ * gcc.dg/analyzer/pr101547.c: New test.
+
+2021-07-21 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/101522
+ * g++.dg/analyzer/pr101522.C: New test.
+
+2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+ Cesar Philippidis <cesar@codesourcery.com>
+
+ * c-c++-common/goacc/classify-routine-nohost.c: New file.
+ * c-c++-common/goacc/classify-routine.c: Update.
+ * c-c++-common/goacc/routine-2.c: Likewise.
+ * c-c++-common/goacc/routine-nohost-1.c: New file.
+ * c-c++-common/goacc/routine-nohost-2.c: Likewise.
+ * g++.dg/goacc/template.C: Update.
+ * gfortran.dg/goacc/classify-routine-nohost.f95: New file.
+ * gfortran.dg/goacc/classify-routine.f95: Update.
+ * gfortran.dg/goacc/pure-elemental-procedures-2.f90: Likewise.
+ * gfortran.dg/goacc/routine-6.f90: Likewise.
+ * gfortran.dg/goacc/routine-intrinsic-2.f: Likewise.
+ * gfortran.dg/goacc/routine-module-1.f90: Likewise.
+ * gfortran.dg/goacc/routine-module-2.f90: Likewise.
+ * gfortran.dg/goacc/routine-module-3.f90: Likewise.
+ * gfortran.dg/goacc/routine-module-mod-1.f90: Likewise.
+ * gfortran.dg/goacc/routine-multiple-directives-1.f90: Likewise.
+ * gfortran.dg/goacc/routine-multiple-directives-2.f90: Likewise.
+
+2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
+
+ * g++.dg/goacc/template.C: Fix '#pragma atomic update' typo.
+
+2021-07-21 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/explode-2.c: Remove xfail.
+ * gcc.dg/analyzer/explode-2a.c: Remove expected leak warning on
+ while stmt.
+ * gcc.dg/analyzer/phi-2.c: New test.
+
+2021-07-21 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR target/101531
+ * gcc.target/powerpc/pr101129.c: Adjust.
+
+2021-07-21 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101549
+ * gcc.target/i386/crc32-6.c: New test.
+
+2021-07-21 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/101514
+ * gfortran.dg/pr101514.f90: New test.
+
+2021-07-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/101535
+ * c-c++-common/gomp/pr101535-1.c: New test.
+ * c-c++-common/gomp/pr101535-2.c: New test.
+
+2021-07-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/101516
+ * g++.dg/gomp/pr101516.C: New test.
+
+2021-07-21 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/iso_c_binding_char_1.f90: Update dg-error.
+ * gfortran.dg/pr32599.f03: Use -std=-f2003 + update comment.
+ * gfortran.dg/bind_c_char_10.f90: New test.
+ * gfortran.dg/bind_c_char_6.f90: New test.
+ * gfortran.dg/bind_c_char_7.f90: New test.
+ * gfortran.dg/bind_c_char_8.f90: New test.
+ * gfortran.dg/bind_c_char_9.f90: New test.
+
+2021-07-21 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/unroll-10.c: New test.
+
+2021-07-21 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/unroll-9.c: New test/
+
+2021-07-20 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/101397
+ * gcc.dg/Warray-bounds-80.c: New test.
+ * gcc.dg/Warray-bounds-81.c: New test.
+ * gcc.dg/Warray-bounds-82.c: New test.
+ * gcc.dg/Warray-bounds-83.c: New test.
+ * gcc.dg/Warray-bounds-84.c: New test.
+ * gcc.dg/Wstringop-overflow-46.c: Adjust expected output.
+
+2021-07-20 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/101300
+ * gcc.dg/uninit-pr101300.c: New test.
+
+2021-07-20 Michael Meissner <meissner@linux.ibm.com>
+
+ PR testsuite/100167
+ * gcc.target/powerpc/fold-vec-div-longlong.c: Fix expected code
+ generation on power10.
+ * gcc.target/powerpc/fold-vec-mult-longlong.c: Likewise.
+
+2021-07-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/101384
+ * gcc.dg/pr101384.c: New test.
+ * gcc.target/powerpc/pr101384-1.c: New test.
+ * gcc.target/powerpc/pr101384-2.c: New test.
+
+2021-07-20 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR testsuite/101506
+ * gcc.target/aarch64/vect-vmaxv.c: Use an asm to hide the
+ true initial value of the reduction from the vectorizer.
+ * gcc.target/aarch64/vect-vaddv.c: Likewise. Make the vector
+ loop operate on exactly LANES (rather than LANES-1) iterations.
+ * gcc.target/aarch64/vect-fmaxv-fminv.x: Likewise.
+
+2021-07-20 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100182
+ * gcc.target/i386/pr71245-1.c: Remove.
+ * gcc.target/i386/pr71245-2.c: Ditto.
+
+2021-07-20 Kewen Lin <linkw@linux.ibm.com>
+
+ * gcc.target/powerpc/mul-vectorize-3.c: New test.
+ * gcc.target/powerpc/mul-vectorize-4.c: New test.
+
+2021-07-20 Kewen Lin <linkw@linux.ibm.com>
+
+ PR tree-optimization/100696
+ * gcc.target/i386/pr100637-3w.c: Adjust for mul_highpart recog.
+
+2021-07-19 Martin Sebor <msebor@redhat.com>
+
+ * gcc.target/powerpc/pr93658.c: Suppress valid warnings.
+
+2021-07-19 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95520
+ * g++.dg/coroutines/pr95520.C: New test.
+
+2021-07-19 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/101503
+ * gcc.dg/analyzer/pr101503.c: New test.
+
+2021-07-19 Indu Bhagat <indu.bhagat@oracle.com>
+
+ * gcc.dg/debug/btf/btf.exp: Do not run BTF testsuite if target does not
+ support BTF format. Remove redundant check for AIX.
+ * gcc.dg/debug/ctf/ctf.exp: Do not run CTF testsuite if target does not
+ support CTF format. Remove redundant check for AIX.
+ * lib/gcc-dg.exp: Remove redundant check for AIX.
+
+2021-07-19 Andrew Stubbs <ams@codesourcery.com>
+
+ PR target/100208
+ * gcc.target/gcn/sram-ecc-1.c: New test.
+ * gcc.target/gcn/sram-ecc-2.c: New test.
+ * gcc.target/gcn/sram-ecc-3.c: New test.
+ * gcc.target/gcn/sram-ecc-4.c: New test.
+ * gcc.target/gcn/sram-ecc-5.c: New test.
+ * gcc.target/gcn/sram-ecc-6.c: New test.
+ * gcc.target/gcn/sram-ecc-7.c: New test.
+ * gcc.target/gcn/sram-ecc-8.c: New test.
+
+2021-07-19 Andrew Pinski <apinski@marvell.com>
+
+ PR target/101205
+ * gcc.target/aarch64/csinv-neg-1.c: New test.
+
+2021-07-19 Marek Polacek <polacek@redhat.com>
+
+ DR 2126
+ * g++.dg/cpp0x/constexpr-temp2.C: New test.
+
+2021-07-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101505
+ * gcc.dg/vect/pr101505.c: New testcase.
+
+2021-07-18 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101492
+ * gcc.target/i386/pr101492-1.c: New test.
+ * gcc.target/i386/pr101492-2.c: Likewise.
+ * gcc.target/i386/pr101492-3.c: Likewise.
+ * gcc.target/i386/pr101492-4.c: Likewise.
+
+2021-07-18 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/101084
+ * gfortran.dg/fmt_nonchar_3.f90: New test.
+
+2021-07-18 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101495
+ * gcc.target/i386/avx-vzeroupper-28.c: New test.
+
+2021-07-18 Antoni Boucher <bouanto@zoho.com>
+
+ PR target/95498
+ * jit.dg/all-non-failing-tests.h: New test.
+ * jit.dg/test-cast.c: New test.
+
+2021-07-17 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.dg/tree-ssa/modref-6.c: New test.
+
+2021-07-17 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr96542.c: New.
+
+2021-07-16 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101233
+ * g++.dg/cpp2a/class-deduction-alias10.C: New test.
+
+2021-07-16 Patrick Palka <ppalka@redhat.com>
+
+ DR 960
+ PR c++/99664
+ * g++.dg/inherit/covariant23.C: New test.
+
+2021-07-16 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/analyzer-decls.h (__analyzer_dump_state): New.
+ * gcc.dg/analyzer/dump-state.c: New test.
+
+2021-07-16 Martin Sebor <msebor@redhat.com>
+
+ PR testsuite/101468
+ * gcc.dg/Wstringop-overflow-41.c: Adjust to avoid target-specific
+ failures.
+ * gcc.dg/Wstringop-overflow-42.c: Same.
+ * gcc.dg/Wstringop-overflow-68.c: Same.
+ * gcc.dg/Wstringop-overflow-70.c: Same.
+ * gcc.dg/Wstringop-overflow-71.c: Same.
+ * gcc.dg/strlenopt-95.c: Fix typos.
+
+2021-07-16 Tamar Christina <tamar.christina@arm.com>
+
+ PR middle-end/101457
+ * gcc.dg/vect/vect-reduc-dot-19.c: Use long long.
+ * gcc.dg/vect/vect-reduc-dot-20.c: Likewise.
+ * gcc.dg/vect/vect-reduc-dot-21.c: Likewise.
+ * gcc.dg/vect/vect-reduc-dot-22.c: Likewise.
+
+2021-07-16 Marek Polacek <polacek@redhat.com>
+
+ * g++.dg/cpp1y/Wnarrowing2.C: New test.
+ * g++.dg/cpp1y/Wnarrowing2.h: New test.
+
+2021-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * g++.dg/ext/visibility/noPLT.C: Skip on s390x.
+ * g++.target/s390/mi-thunk.C: New test.
+ * gcc.target/s390/nodatarel-1.c: Move foostatic to the new
+ tests.
+ * gcc.target/s390/pr80080-4.c: Allow @PLT suffix.
+ * gcc.target/s390/risbg-ll-3.c: Likewise.
+ * gcc.target/s390/call.h: Common code for the new tests.
+ * gcc.target/s390/call-z10-pic-nodatarel.c: New test.
+ * gcc.target/s390/call-z10-pic.c: New test.
+ * gcc.target/s390/call-z10.c: New test.
+ * gcc.target/s390/call-z9-pic-nodatarel.c: New test.
+ * gcc.target/s390/call-z9-pic.c: New test.
+ * gcc.target/s390/call-z9.c: New test.
+ * gcc.target/s390/mfentry-m64-pic.c: New test.
+ * gcc.target/s390/tls.h: Common code for the new TLS tests.
+ * gcc.target/s390/tls-pic.c: New test.
+ * gcc.target/s390/tls.c: New test.
+
+2021-07-16 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/sve/extract_1.c: Split expected results
+ by big/little endian targets, restoring the old expected
+ result for big endian.
+ * gcc.target/aarch64/sve/extract_2.c: Likewise.
+ * gcc.target/aarch64/sve/extract_3.c: Likewise.
+ * gcc.target/aarch64/sve/extract_4.c: Likewise.
+
+2021-07-15 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/101346
+ * gcc.target/i386/pr101346.c: New test.
+
+2021-07-15 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/97027
+ * gcc.dg/Wstringop-overflow-15.c: Remove an xfail.
+ * gcc.dg/Wstringop-overflow-47.c: Adjust xfails.
+ * gcc.dg/torture/pr69170.c: Avoid valid warnings.
+ * gcc.dg/torture/pr70025.c: Prune out a false positive.
+ * gcc.dg/vect/pr97769.c: Initialize a loop control variable.
+ * gcc.target/i386/pr92658-avx512bw-trunc.c: Increase buffer size
+ to avoid overflow.
+ * gcc.target/i386/pr92658-avx512f.c: Same.
+ * gcc.dg/Wstringop-overflow-68.c: New test.
+ * gcc.dg/Wstringop-overflow-69.c: New test.
+ * gcc.dg/Wstringop-overflow-70.c: New test.
+ * gcc.dg/Wstringop-overflow-71.c: New test.
+ * gcc.dg/strlenopt-95.c: New test.
+
+2021-07-15 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/95006
+ PR analyzer/94713
+ PR analyzer/94714
+ * g++.dg/analyzer/pr93212.C: Update location of warning.
+ * g++.dg/analyzer/pr94011.C: Add
+ -Wno-analyzer-use-of-uninitialized-value.
+ * g++.dg/analyzer/pr94503.C: Likewise.
+ * gcc.dg/analyzer/clobbers-1.c: Convert "f" from a local to a
+ param to avoid uninitialized warning.
+ * gcc.dg/analyzer/data-model-1.c (test_12): Add test for
+ uninitialized value on result of alloca.
+ (test_12a): Add expected warning.
+ (test_12c): Likewise.
+ (test_19): Likewise.
+ (test_29b): Likewise.
+ (test_29c): Likewise.
+ (test_37): Remove xfail.
+ (test_37a): Likewise.
+ * gcc.dg/analyzer/data-model-20.c: Add warning about leak.
+ * gcc.dg/analyzer/explode-2.c: Remove params; add
+ -Wno-analyzer-too-complex, -Wno-analyzer-malloc-leak, and xfails.
+ Initialize the locals.
+ * gcc.dg/analyzer/explode-2a.c: Initialize the locals. Add
+ expected leak.
+ * gcc.dg/analyzer/fgets-1.c: New test.
+ * gcc.dg/analyzer/fread-1.c: New test.
+ * gcc.dg/analyzer/malloc-1.c (test_16): Add expected warning.
+ (test_40): Likewise.
+ * gcc.dg/analyzer/memset-CVE-2017-18549-1.c: Check for
+ uninitialized padding.
+ * gcc.dg/analyzer/pr93355-localealias-feasibility.c (fread): New
+ decl.
+ (read_alias_file): Call it.
+ * gcc.dg/analyzer/pr94047.c: Add expected warnings.
+ * gcc.dg/analyzer/pr94851-2.c: Likewise.
+ * gcc.dg/analyzer/pr96841.c: Convert local to a param.
+ * gcc.dg/analyzer/pr98628.c: Likewise.
+ * gcc.dg/analyzer/pr99042.c: Updated expected location of leak
+ diagnostics.
+ * gcc.dg/analyzer/symbolic-1.c: Add expected warnings.
+ * gcc.dg/analyzer/symbolic-7.c: Likewise.
+ * gcc.dg/analyzer/torture/pr93649.c: Add expected warning. Skip
+ with -fno-fat-lto-objects.
+ * gcc.dg/analyzer/uninit-1.c: New test.
+ * gcc.dg/analyzer/uninit-2.c: New test.
+ * gcc.dg/analyzer/uninit-3.c: New test.
+ * gcc.dg/analyzer/uninit-4.c: New test.
+ * gcc.dg/analyzer/uninit-pr94713.c: New test.
+ * gcc.dg/analyzer/uninit-pr94714.c: New test.
+ * gcc.dg/analyzer/use-after-free-2.c: New test.
+ * gcc.dg/analyzer/use-after-free-3.c: New test.
+ * gcc.dg/analyzer/zlib-3.c: Add expected warning.
+ * gcc.dg/analyzer/zlib-6.c: Convert locals to params to avoid
+ uninitialized warnings. Remove xfail.
+ * gcc.dg/analyzer/zlib-6a.c: New test, based on the old version
+ of the above.
+ * gfortran.dg/analyzer/pr97668.f: Add
+ -Wno-analyzer-use-of-uninitialized-value and
+ -Wno-analyzer-too-complex.
+
+2021-07-15 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/phi-1.c: New test.
+
+2021-07-15 Christophe Lyon <christophe.lyon@foss.st.com>
+
+ * lib/target-supports.exp (arm_v8_2a_imm8_neon_ok_nocache):
+ Delete.
+
+2021-07-15 Christophe Lyon <christophe.lyon@foss.st.com>
+
+ * gcc.target/arm/simd/vusdot-autovec.c: Use arm_v8_2a_i8mm_ok
+ effective-target.
+
+2021-07-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/101443
+ * g++.dg/cpp0x/nullptr46.C: New test.
+
+2021-07-15 Tamar Christina <tamar.christina@arm.com>
+
+ PR middle-end/101457
+ * gcc.dg/vect/vect-reduc-dot-17.c: Fix signs of scalar code.
+ * gcc.dg/vect/vect-reduc-dot-18.c: Likewise.
+ * gcc.dg/vect/vect-reduc-dot-22.c: Likewise.
+ * gcc.dg/vect/vect-reduc-dot-9.c: Likewise.
+
+2021-07-15 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/Wvla-parameter-12.c: New test.
+
+2021-07-15 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR target/101129
+ * gcc.target/powerpc/pr101129.c: New.
+
+2021-07-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/101437
+ * gcc.c-torture/compile/pr101437.c: New test.
+
+2021-07-14 Peter Bergner <bergner@linux.ibm.com>
+
+ * gcc.target/powerpc/mma-builtin-9.c: New test.
+
+2021-07-14 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/88252
+ * g++.dg/cpp1z/class-deduction96.C: New test.
+
+2021-07-14 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/torture/pr100382.C: Pass -fno-delete-dead-exceptions.
+
+2021-07-14 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.dg/vect/vect-reduc-dot-11.c: Expect pass.
+ * gcc.dg/vect/vect-reduc-dot-15.c: Likewise.
+ * gcc.dg/vect/vect-reduc-dot-19.c: Likewise.
+ * gcc.dg/vect/vect-reduc-dot-21.c: Likewise.
+
+2021-07-14 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr80776-1.c: Remove xfail.
+
+2021-07-14 Marek Polacek <polacek@redhat.com>
+
+ PR c++/101371
+ * g++.dg/cpp1y/constexpr-101371-2.C: New test.
+ * g++.dg/cpp1y/constexpr-101371.C: New test.
+
+2021-07-14 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/100949
+ * gfortran.dg/pr100949.f90: New test.
+
+2021-07-14 Tamar Christina <tamar.christina@arm.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_arm_v8_2a_imm8_neon_ok_nocache,
+ check_effective_target_arm_v8_2a_i8mm_neon_hw,
+ check_effective_target_vect_usdot_qi): New.
+ * gcc.dg/vect/vect-reduc-dot-9.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-10.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-11.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-12.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-13.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-14.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-15.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-16.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-17.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-18.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-19.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-20.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-21.c: New test.
+ * gcc.dg/vect/vect-reduc-dot-22.c: New test.
+
+2021-07-14 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/arm/simd/vusdot-autovec.c: New test.
+
+2021-07-14 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/simd/vusdot-autovec.c: New test.
+ * gcc.target/aarch64/sve/vusdot-autovec.c: New test.
+
+2021-07-14 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101395
+ * gcc.target/i386/pr101395-1.c: New test.
+ * gcc.target/i386/pr101395-2.c: Likewise.
+ * gcc.target/i386/pr101395-3.c: Likewise.
+
+2021-07-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101445
+ * gcc.dg/vect/pr101445.c: New testcase.
+
+2021-07-14 Richard Biener <rguenther@suse.de>
+
+ * gcc.target/i386/vect-reduc-1.c: New testcase.
+
+2021-07-13 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/extract_zero_extend.c: Remove dump scan
+ for RTL pattern match.
+ * gcc.target/aarch64/narrow_high_combine.c: Add new tests.
+ * gcc.target/aarch64/simd/vmulx_laneq_f64_1.c: Update
+ scan-assembler regex to look for a scalar register instead of
+ lane 0 of a vector.
+ * gcc.target/aarch64/simd/vmulxd_laneq_f64_1.c: Likewise.
+ * gcc.target/aarch64/simd/vmulxs_lane_f32_1.c: Likewise.
+ * gcc.target/aarch64/simd/vmulxs_laneq_f32_1.c: Likewise.
+ * gcc.target/aarch64/simd/vqdmlalh_lane_s16.c: Likewise.
+ * gcc.target/aarch64/simd/vqdmlals_lane_s32.c: Likewise.
+ * gcc.target/aarch64/simd/vqdmlslh_lane_s16.c: Likewise.
+ * gcc.target/aarch64/simd/vqdmlsls_lane_s32.c: Likewise.
+ * gcc.target/aarch64/simd/vqdmullh_lane_s16.c: Likewise.
+ * gcc.target/aarch64/simd/vqdmullh_laneq_s16.c: Likewise.
+ * gcc.target/aarch64/simd/vqdmulls_lane_s32.c: Likewise.
+ * gcc.target/aarch64/simd/vqdmulls_laneq_s32.c: Likewise.
+ * gcc.target/aarch64/sve/dup_lane_1.c: Likewise.
+ * gcc.target/aarch64/sve/extract_1.c: Likewise.
+ * gcc.target/aarch64/sve/extract_2.c: Likewise.
+ * gcc.target/aarch64/sve/extract_3.c: Likewise.
+ * gcc.target/aarch64/sve/extract_4.c: Likewise.
+ * gcc.target/aarch64/sve/live_1.c: Update scan-assembler regex
+ cases to look for 'b' and 'h' registers instead of 'w'.
+ * gcc.target/arm/crypto-vsha1cq_u32.c: Update scan-assembler
+ regex to reflect lane 0 vector extractions being simplified
+ to scalar register moves.
+ * 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/mve/intrinsics/vgetq_lane_f16.c: Extract
+ lane 1 as the moves for lane 0 now get optimized away.
+ * gcc.target/arm/mve/intrinsics/vgetq_lane_f32.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/vgetq_lane_s16.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/vgetq_lane_s32.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/vgetq_lane_s8.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/vgetq_lane_u16.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/vgetq_lane_u32.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/vgetq_lane_u8.c: Likewise.
+
+2021-07-13 Paul A. Clarke <pc@us.ibm.com>
+
+ * gcc.target/powerpc/sse4_1-ptest-1.c: Copy from
+ gcc/testsuite/gcc.target/i386.
+
+2021-07-13 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/93781
+ * gcc.dg/tree-ssa/pr93781-1.c: Check that call is removed.
+
+2021-07-13 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/reduc_9.c: New test.
+ * gcc.target/aarch64/sve/reduc_9_run.c: Likewise.
+ * gcc.target/aarch64/sve/reduc_10.c: Likewise.
+ * gcc.target/aarch64/sve/reduc_10_run.c: Likewise.
+ * gcc.target/aarch64/sve/reduc_11.c: Likewise.
+ * gcc.target/aarch64/sve/reduc_11_run.c: Likewise.
+ * gcc.target/aarch64/sve/reduc_12.c: Likewise.
+ * gcc.target/aarch64/sve/reduc_12_run.c: Likewise.
+ * gcc.target/aarch64/sve/reduc_13.c: Likewise.
+ * gcc.target/aarch64/sve/reduc_13_run.c: Likewise.
+ * gcc.target/aarch64/sve/reduc_14.c: Likewise.
+ * gcc.target/aarch64/sve/reduc_14_run.c: Likewise.
+ * gcc.target/aarch64/sve/reduc_15.c: Likewise.
+ * gcc.target/aarch64/sve/reduc_15_run.c: Likewise.
+
+2021-07-13 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/cond_arith_6.c: New test.
+
+2021-07-13 Jakub Jelinek <jakub@redhat.com>
+ Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101419
+ * gcc.dg/builtin-object-size-10.c: Pass -fdump-tree-early_objsz-details
+ instead of -fdump-tree-objsz1-details in dg-options and adjust names
+ of dump file in scan-tree-dump.
+ * gcc.dg/pr101419.c: New test.
+
+2021-07-13 Richard Biener <rguenther@suse.de>
+
+ Revert:
+ 2021-07-13 Richard Biener <rguenther@suse.de>
+
+ * g++.dg/vect/slp-pr87105.cc: Adjust.
+ * gcc.dg/vect/bb-slp-pr54400.c: Likewise.
+
+2021-07-13 Michael Meissner <meissner@linux.ibm.com>
+
+ PR testsuite/100166
+ * gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a-pr63175.c: Update
+ insn counts to account for power10 prefixed loads and stores.
+ * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-char.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-double.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-float.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-int.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-longlong.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-short.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-char.c: Likewise.
+ * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-double.c: Likewise.
+ * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-float.c: Likewise.
+ * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-int.c: Likewise.
+ * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-longlong.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-short.c: Likewise.
+ * gcc.target/powerpc/fold-vec-load-vec_xl-char.c: Likewise.
+ * gcc.target/powerpc/fold-vec-load-vec_xl-double.c: Likewise.
+ * gcc.target/powerpc/fold-vec-load-vec_xl-float.c: Likewise.
+ * gcc.target/powerpc/fold-vec-load-vec_xl-int.c: Likewise.
+ * gcc.target/powerpc/fold-vec-load-vec_xl-longlong.c: Likewise.
+ * gcc.target/powerpc/fold-vec-load-vec_xl-short.c: Likewise.
+ * gcc.target/powerpc/fold-vec-splat-floatdouble.c: Likewise.
+ * gcc.target/powerpc/fold-vec-splat-longlong.c: Likewise.
+ * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-char.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-double.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-float.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-int.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-longlong.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-short.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-store-vec_vsx_st-char.c: Likewise.
+ * gcc.target/powerpc/fold-vec-store-vec_vsx_st-double.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-store-vec_vsx_st-float.c: Likewise.
+ * gcc.target/powerpc/fold-vec-store-vec_vsx_st-int.c: Likewise.
+ * gcc.target/powerpc/fold-vec-store-vec_vsx_st-longlong.c:
+ Likewise.
+ * gcc.target/powerpc/fold-vec-store-vec_vsx_st-short.c: Likewise.
+ * gcc.target/powerpc/fold-vec-store-vec_xst-char.c: Likewise.
+ * gcc.target/powerpc/fold-vec-store-vec_xst-double.c: Likewise.
+ * gcc.target/powerpc/fold-vec-store-vec_xst-float.c: Likewise.
+ * gcc.target/powerpc/fold-vec-store-vec_xst-int.c: Likewise.
+ * gcc.target/powerpc/fold-vec-store-vec_xst-longlong.c: Likewise.
+ * gcc.target/powerpc/fold-vec-store-vec_xst-short.c: Likewise.
+ * gcc.target/powerpc/lvsl-lvsr.c: Likewise.
+ * gcc.target/powerpc/pr86731-fwrapv-longlong.c: Likewise.
+
+2021-07-13 Michael Meissner <meissner@linux.ibm.com>
+
+ * gcc.target/powerpc/vec-splati-runnable.c: Run test with -O2
+ optimization. Do not check what XXSPLTIDP generates if the value
+ is undefined.
+
+2021-07-12 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/79501
+ PR c++/100983
+ * g++.dg/cpp1z/class-deduction92.C: New test.
+ * g++.dg/cpp1z/class-deduction93.C: New test.
+ * g++.dg/cpp1z/class-deduction94.C: New test.
+ * g++.dg/cpp1z/class-deduction95.C: New test.
+
+2021-07-12 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/101424
+ * gcc.target/i386/pr101424.c: New test.
+
+2021-07-12 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/tree-ssa/pr101335.c: New.
+
+2021-07-12 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.dg/tree-ssa/pr96928-1.c: Update to similar as pr96928.c.
+
+2021-07-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101373
+ * g++.dg/torture/pr101373.C: New testcase, XFAILed.
+ * gnat.dg/opt95.adb: Likewise.
+
+2021-07-12 Richard Biener <rguenther@suse.de>
+
+ * g++.dg/vect/slp-pr87105.cc: Adjust.
+ * gcc.dg/vect/bb-slp-pr54400.c: Likewise.
+
+2021-07-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101394
+ * gcc.dg/torture/pr101394.c: New testcase.
+
+2021-07-12 Roger Sayle <roger@nextmovesoftware.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/101403
+ * gcc.dg/pr101403.c: Avoid (unimportant) uninitialized variable.
+
+2021-07-12 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR target/66791
+ * gcc.target/arm/armv8_2-fp16-neon-2.c: Adjust.
+
+2021-07-12 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR target/98435
+ * gcc.target/arm/simd/pr98435.c: New test.
+
+2021-07-12 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR tree-optimization/101403
+ * gcc.dg/pr101403.c: New test case.
+
+2021-07-10 John David Anglin <danglin@gcc.gnu.org>
+
+ * gcc.dg/torture/pr100329.c: Require target lra.
+ * gcc.dg/torture/pr100519.c: Likewise.
+
+2021-07-10 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/82110
+ * g++.dg/cpp0x/pr78765.C: Expect another conversion failure
+ diagnostic.
+ * g++.dg/template/sfinae14.C: Flip incorrect assertion.
+ * g++.dg/cpp2a/concepts-requires27.C: New test.
+
+2021-07-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/101098
+ * g++.dg/concepts/explicit-spec1.C: New test.
+
+2021-07-09 Roger Sayle <roger@nextmovesoftware.com>
+ Uroš Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/divmod-9.c: New test case.
+
+2021-07-09 Indu Bhagat <indu.bhagat@oracle.com>
+
+ PR testsuite/101269
+ * gcc.dg/debug/btf/btf-datasec-1.c: Force -msdata=none with ilp32 for
+ powerpc based targets.
+
+2021-07-09 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101181
+ * g++.dg/cpp2a/concepts-requires26.C: New test.
+ * g++.dg/cpp2a/lambda-uneval16.C: New test.
+
+2021-07-09 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101247
+ * g++.dg/cpp2a/concepts-memtmpl4.C: Uncomment the commented out
+ example, which we now handle correctly.
+ * g++.dg/cpp2a/concepts-memtmpl5.C: New test.
+ * g++.dg/cpp2a/concepts-memtmpl5a.C: New test.
+
+2021-07-09 Xi Ruoyao <xry111@mengyan1223.wang>
+
+ * gcc.target/mips/cfgcleanup-jalr2.c: Remove -fno-inline and add
+ __attribute__((noinline)).
+ * gcc.target/mips/cfgcleanup-jalr3.c: Likewise.
+
+2021-07-09 Xi Ruoyao <xry111@mengyan1223.wang>
+
+ PR target/100760
+ PR target/100761
+ PR target/100762
+ * gcc.target/mips/pr100760.c: New test.
+ * gcc.target/mips/pr100761.c: New test.
+ * gcc.target/mips/pr100762.c: New test.
+
+2021-07-09 Kewen Lin <linkw@linux.ibm.com>
+
+ * gcc.target/powerpc/mod-vectorize.c: New test.
+
+2021-07-09 Kewen Lin <linkw@linux.ibm.com>
+
+ * gcc.target/powerpc/div-vectorize-1.c: New test.
+
+2021-07-09 Kewen Lin <linkw@linux.ibm.com>
+
+ * gcc.target/powerpc/mul-vectorize-1.c: New test.
+ * gcc.target/powerpc/mul-vectorize-2.c: New test.
+
+2021-07-08 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/Wstringop-overflow-43.c: Remove an xfail.
+
+2021-07-08 Martin Sebor <msebor@redhat.com>
+
+ PR testsuite/100451
+ * g++.dg/warn/Warray-bounds-20.C: Adjust expected output for LP32.
+
+2021-07-08 Martin Sebor <msebor@redhat.com>
+
+ * g++.dg/warn/Warray-bounds-11.C: Avoid including <new>.
+ * g++.dg/warn/Warray-bounds-13.C: Same.
+
+2021-07-08 Marek Polacek <polacek@redhat.com>
+
+ PR c++/101087
+ * g++.dg/cpp0x/noexcept70.C: New test.
+
+2021-07-08 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/101066
+ * gcc.dg/ipa/pr101066.c: New test.
+
+2021-07-08 Martin Sebor <msebor@redhat.com>
+
+ PR bootstrap/101374
+ * c-c++-common/Warray-bounds-3.c: Xfail assertion.
+ * c-c++-common/Warray-bounds-4.c: Same.
+
+2021-07-08 Christophe Lyon <christophe.lyon@foss.st.om>
+
+ * gcc.dg/debug/pr57351.c: Require arm_arch_v7a_ok
+ effective-target.
+
+2021-07-08 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/acle/general/cntb_1.c: New test.
+
+2021-07-08 Roger Sayle <roger@nextmovesoftware.com>
+ Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/40210
+ * gcc.dg/builtin-bswap-13.c: New test.
+ * gcc.dg/builtin-bswap-14.c: New test.
+
+2021-07-08 Michael Meissner <meissner@linux.ibm.com>
+
+ PR target/100809
+ * gcc.target/powerpc/p10-vdivq-vmodq.c: New test.
+
+2021-07-07 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/pattern-test-2.c: Update expected results.
+ * gcc.dg/plugin/analyzer_gil_plugin.c
+ (gil_state_machine::on_condition): Remove.
+
+2021-07-07 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/100137
+ PR tree-optimization/99121
+ PR tree-optimization/97027
+ * c-c++-common/Warray-bounds-3.c: Remove xfail
+ * c-c++-common/Warray-bounds-4.c: Add an expected warning.
+ * c-c++-common/Warray-bounds-9.c: New test.
+ * c-c++-common/Warray-bounds-10.c: New test.
+ * g++.dg/asan/asan_test.C: Suppress expected warnings.
+ * g++.dg/pr95768.C: Same.
+ * g++.dg/warn/Warray-bounds-10.C: Adjust text of expected messages.
+ * g++.dg/warn/Warray-bounds-11.C: Same.
+ * g++.dg/warn/Warray-bounds-12.C: Same.
+ * g++.dg/warn/Warray-bounds-13.C: Same.
+ * g++.dg/warn/Warray-bounds-17.C: Same.
+ * g++.dg/warn/Warray-bounds-20.C: Same.
+ * gcc.dg/Warray-bounds-29.c: Same.
+ * gcc.dg/Warray-bounds-30.c: Add xfail.
+ * gcc.dg/Warray-bounds-31.c: Adjust text of expected messages.
+ * gcc.dg/Warray-bounds-32.c: Same.
+ * gcc.dg/Warray-bounds-52.c: Same.
+ * gcc.dg/Warray-bounds-53.c: Same.
+ * gcc.dg/Warray-bounds-58.c: Remove xfail.
+ * gcc.dg/Warray-bounds-63.c: Adjust text of expected messages.
+ * gcc.dg/Warray-bounds-66.c: Same.
+ * gcc.dg/Warray-bounds-69.c: Same.
+ * gcc.dg/Wstringop-overflow-34.c: Same.
+ * gcc.dg/Wstringop-overflow-47.c: Same.
+ * gcc.dg/Wstringop-overflow-61.c: Same.
+ * gcc.dg/Warray-bounds-77.c: New test.
+ * gcc.dg/Warray-bounds-78.c: New test.
+ * gcc.dg/Warray-bounds-79.c: New test.
+
+2021-07-07 Christophe Lyon <christophe.lyon@foss.st.com>
+
+ PR debug/101321
+ * gcc.dg/debug/btf/btf-bitfields-3.c: Remove -fno-short-enums.
+
+2021-07-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/34195
+ * gcc.dg/vect/pr34195.c: New testcase.
+
+2021-07-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99728
+ * g++.dg/opt/pr99728.C: New testcase.
+
+2021-07-07 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx512f-vect-fmaddsubXXXpd.c: New test.
+ * gcc.target/i386/avx512f-vect-fmaddsubXXXps.c: New test.
+ * gcc.target/i386/avx512f-vect-fmsubaddXXXpd.c: New test.
+ * gcc.target/i386/avx512f-vect-fmsubaddXXXps.c: New test.
+
+2021-07-06 Indu Bhagat <indu.bhagat@oracle.com>
+
+ PR debug/101283
+ * gcc.dg/debug/btf/btf-bitfields-3.c: Remove the check on btm_type.
+
+2021-07-06 Indu Bhagat <indu.bhagat@oracle.com>
+
+ PR debug/101283
+ * gcc.dg/debug/ctf/ctf-attr-mode-1.c: Remove the check for ctv_typeidx.
+
+2021-07-06 Martin Sebor <msebor@redhat.com>
+
+ PR c++/55881
+ * g++.dg/warn/uninit-pr55881.C: New test.
+
+2021-07-06 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/86650
+ * gcc.dg/Warray-bounds-76.c: New test.
+
+2021-07-06 Indu Bhagat <indu.bhagat@oracle.com>
+
+ PR debug/101283
+ * gcc.dg/debug/ctf/ctf-struct-array-2.c: Adjust the value in the testcase.
+
+2021-07-06 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/format/gcc_diag-10.c: Update expected warnings.
+ * gcc.dg/plugin/diagnostic_plugin_test_inlining.c: Remove %G.
+
+2021-07-06 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/Wobjsize-1.c: Prune expected output.
+ * gcc.dg/Warray-bounds-71.c: New test.
+ * gcc.dg/Warray-bounds-71.h: New test header.
+ * gcc.dg/Warray-bounds-72.c: New test.
+ * gcc.dg/Warray-bounds-73.c: New test.
+ * gcc.dg/Warray-bounds-74.c: New test.
+ * gcc.dg/Warray-bounds-75.c: New test.
+ * gcc.dg/Wfree-nonheap-object-4.c: Adjust expected output.
+ * gcc.dg/Wfree-nonheap-object-5.c: New test.
+ * gcc.dg/Wfree-nonheap-object-6.c: New test.
+ * gcc.dg/pragma-diag-10.c: New test.
+ * gcc.dg/pragma-diag-9.c: New test.
+ * gcc.dg/uninit-suppress_3.c: New test.
+ * gcc.dg/pr79214.c: Xfail tests.
+ * gcc.dg/tree-ssa/builtin-sprintf-warn-27.c: New test.
+ * gcc.dg/format/c90-printf-1.c: Adjust expected output.
+
+2021-07-06 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/97194
+ * gcc.target/i386/sse4_1-vec-set-1a.c: New test.
+ * gcc.target/i386/sse4_1-vec-set-2a.c: Ditto.
+
+2021-07-06 Richard Biener <rguenther@suse.de>
+
+ * gcc.target/i386/vect-fmaddsubXXXpd.c: New testcase.
+ * gcc.target/i386/vect-fmaddsubXXXps.c: Likewise.
+ * gcc.target/i386/vect-fmsubaddXXXpd.c: Likewise.
+ * gcc.target/i386/vect-fmsubaddXXXps.c: Likewise.
+
+2021-07-06 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/101256
+ * g++.dg/torture/pr101256.C: New test.
+
+2021-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/100227
+ * gfortran.dg/implied_do_io_7.f90: New test.
+
+2021-07-06 Kewen Lin <linkw@linux.ibm.com>
+
+ PR rtl-optimization/100328
+ * gcc.target/aarch64/sve/acle/asm/div_f16.c: Remove one xfail.
+ * gcc.target/aarch64/sve/acle/asm/div_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/div_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/divr_f16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/divr_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/divr_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/mad_f16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/mad_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/mad_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/mla_f16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/mla_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/mla_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/mls_f16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/mls_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/mls_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/msb_f16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/msb_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/msb_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/mulx_f16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/mulx_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/mulx_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/nmad_f16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/nmad_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/nmad_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/nmla_f16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/nmla_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/nmla_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/nmls_f16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/nmls_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/nmls_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/nmsb_f16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/nmsb_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/nmsb_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/sub_f16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/sub_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/sub_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/subr_f16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/subr_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/subr_f64.c: Likewise.
+
+2021-07-06 Indu Bhagat <indu.bhagat@oracle.com>
+
+ PR debug/101283
+ * gcc.dg/debug/btf/btf-cvr-quals-1.c: Use -gdwarf-4 on Darwin targets.
+ * gcc.dg/debug/ctf/ctf-cvr-quals-1.c: Likewise.
+
+2021-07-05 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/101039
+ * gcc.dg/tree-ssa/phi-opt-15.c: Update test to expect
+ ABSU and still not expect ABS_EXPR.
+ * gcc.dg/tree-ssa/phi-opt-23.c: New test.
+ * gcc.dg/tree-ssa/phi-opt-24.c: New test.
+
+2021-07-05 Christophe Lyon <christophe.lyon@foss.st.com>
+
+ PR debug/101321
+ * gcc.dg/debug/btf/btf-bitfields-3.c: Add -fno-short-enums.
+
+2021-07-05 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/101299
+ * gcc.dg/vect/bb-slp-74.c: Add vect_double requires.
+
+2021-07-05 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr92658-avx512vl.c: Refine testcase.
+
+2021-07-03 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.dg/debug/btf/btf.exp: Skip on AIX.
+ * gcc.dg/debug/ctf/ctf.exp: Skip on AIX.
+ * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): AIX
+ doesn't support CTF.
+ (gcc-dg-debug-runtest): Move CTF support within
+ target support format test.
+
+2021-07-03 H.J. Lu <hjl.tools@gmail.com>
+
+ PR middle-end/101294
+ * gcc.dg/pr101294.c: New test.
+
+2021-07-03 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/101273
+ * gdc.dg/torture/pr101273.d: New test.
+
+2021-07-02 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/101282
+ * gdc.dg/torture/pr101282.d: New test.
+
+2021-07-02 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/gomp/attrs-1.C: New test.
+ * g++.dg/gomp/attrs-2.C: New test.
+ * g++.dg/gomp/attrs-3.C: New test.
+
+2021-07-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/101297
+ * c-c++-common/gomp/atomic-24.c: New test.
+
+2021-07-02 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101247
+ * g++.dg/cpp2a/concepts-memtmpl4.C: New test.
+
+2021-07-02 Peter Bergner <bergner@linux.ibm.com>
+
+ * gcc.target/powerpc/mma-builtin-7.c: New test.
+ * gcc.target/powerpc/mma-builtin-8.c: New test.
+
+2021-07-02 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/101223
+ * gcc.dg/pr101223.c: New.
+
+2021-07-02 David Faust <david.faust@oracle.com>
+
+ * gcc.dg/debug/btf/btf-float-1.c: New test.
+ * gcc.dg/debug/btf/btf-function-3.c: Use different unrepresentable type.
+ * gcc.dg/debug/btf/btf-struct-2.c: Likewise.
+ * gcc.dg/debug/btf/btf-variables-2.c: Likewise.
+
+2021-07-02 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
+
+ * lib/gcc-defs.exp: Add a comment.
+
+2021-07-02 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101293
+ * gcc.dg/tree-ssa/ssa-lim-15.c: New testcase.
+
+2021-07-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/101286
+ * gcc.target/i386/avx2-pr101286.c: New test.
+
+2021-07-02 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/keylocker-aesdec128kl.c: Update test.
+ * gcc.target/i386/keylocker-aesdec256kl.c: Likewise.
+ * gcc.target/i386/keylocker-aesdecwide128kl.c: Likewise.
+ * gcc.target/i386/keylocker-aesdecwide256kl.c: Likewise.
+ * gcc.target/i386/keylocker-aesenc128kl.c: Likewise.
+ * gcc.target/i386/keylocker-aesenc256kl.c: Likewise.
+ * gcc.target/i386/keylocker-aesencwide128kl.c: Likewise.
+ * gcc.target/i386/keylocker-aesencwide256kl.c: Likewise.
+
+2021-07-01 Michael Meissner <meissner@linux.ibm.com>
+
+ * gcc.target/powerpc/float128-cmove.c: New test.
+ * gcc.target/powerpc/float128-minmax-3.c: New test.
+
+2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
+
+ * c-c++-common/dump-ada-spec-14.c: Adjust dg-warning directive.
+
+2021-07-01 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/100865
+ * gcc.target/i386/avx512f-broadcast-pr87767-1.c: Expect integer
+ broadcast.
+ * gcc.target/i386/avx512f-broadcast-pr87767-5.c: Likewise.
+ * gcc.target/i386/avx512vl-broadcast-pr87767-1.c: Likewise.
+ * gcc.target/i386/avx512vl-broadcast-pr87767-5.c: Likewise.
+ * gcc.target/i386/avx512f_cond_move.c: Also pass
+ -mprefer-vector-width=512 and expect integer broadcast.
+ * gcc.target/i386/pr100865-1.c: New test.
+ * gcc.target/i386/pr100865-2.c: Likewise.
+ * gcc.target/i386/pr100865-3.c: Likewise.
+ * gcc.target/i386/pr100865-4a.c: Likewise.
+ * gcc.target/i386/pr100865-4b.c: Likewise.
+ * gcc.target/i386/pr100865-5a.c: Likewise.
+ * gcc.target/i386/pr100865-5b.c: Likewise.
+ * gcc.target/i386/pr100865-6a.c: Likewise.
+ * gcc.target/i386/pr100865-6b.c: Likewise.
+ * gcc.target/i386/pr100865-6c.c: Likewise.
+ * gcc.target/i386/pr100865-7a.c: Likewise.
+ * gcc.target/i386/pr100865-7b.c: Likewise.
+ * gcc.target/i386/pr100865-7c.c: Likewise.
+ * gcc.target/i386/pr100865-8a.c: Likewise.
+ * gcc.target/i386/pr100865-8b.c: Likewise.
+ * gcc.target/i386/pr100865-8c.c: Likewise.
+ * gcc.target/i386/pr100865-9a.c: Likewise.
+ * gcc.target/i386/pr100865-9b.c: Likewise.
+ * gcc.target/i386/pr100865-9c.c: Likewise.
+ * gcc.target/i386/pr100865-10a.c: Likewise.
+ * gcc.target/i386/pr100865-10b.c: Likewise.
+ * gcc.target/i386/pr100865-11a.c: Likewise.
+ * gcc.target/i386/pr100865-11b.c: Likewise.
+ * gcc.target/i386/pr100865-11c.c: Likewise.
+ * gcc.target/i386/pr100865-12a.c: Likewise.
+ * gcc.target/i386/pr100865-12b.c: Likewise.
+ * gcc.target/i386/pr100865-12c.c: Likewise.
+
+2021-07-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101280
+ PR tree-optimization/101173
+ * gcc.dg/tree-ssa/loop-interchange-16.c: New testcase.
+
+2021-07-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101278
+ * gcc.dg/torture/pr101278.c: New testcase.
+
+2021-07-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100778
+ * gcc.dg/torture/pr100778.c: New testcase.
+
+2021-07-01 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/101044
+ * gcc.target/i386/pr101044.c: New test.
+
+2021-07-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101178
+ * gcc.dg/vect/bb-slp-72.c: New testcase.
+ * gcc.dg/vect/bb-slp-73.c: Likewise.
+ * gcc.dg/vect/bb-slp-74.c: Likewise.
+
+2021-07-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/101266
+ * gcc.dg/pr101266.c: New test.
+
+2021-07-01 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101194
+ * g++.dg/cpp0x/constexpr-empty16.C: New test.
+
+2021-07-01 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/96204
+ * g++.dg/template/access41.C: New test.
+ * g++.dg/template/access41a.C: New test.
+
+2021-06-30 Indu Bhagat <indu.bhagat@oracle.com>
+
+ * gcc.dg/debug/ctf/ctf-skip-types-4.c: Add dg-add-options float64 and
+ float64x.
+
+2021-06-30 Michael Meissner <meissner@linux.ibm.com>
+
+ * gcc.target/powerpc/float128-minmax.c: Adjust expected code for
+ power10.
+ * lib/target-supports.exp (check_effective_target_has_arch_pwr10):
+ New.
+
+2021-06-30 Patrick Palka <ppalka@redhat.com>
+
+ * g++.dg/cpp2a/concepts-access2.C: New test.
+
+2021-06-30 Marek Polacek <polacek@redhat.com>
+
+ PR c++/100975
+ DR 2397
+ * g++.dg/cpp0x/auto24.C: Remove dg-error.
+ * g++.dg/cpp0x/auto3.C: Adjust dg-error.
+ * g++.dg/cpp0x/auto42.C: Likewise.
+ * g++.dg/cpp0x/initlist75.C: Likewise.
+ * g++.dg/cpp0x/initlist80.C: Likewise.
+ * g++.dg/diagnostic/auto1.C: Remove dg-error.
+ * g++.dg/cpp23/auto-array.C: New test.
+
+2021-06-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101267
+ * gfortran.dg/pr101267.f90: New testcase.
+
+2021-06-30 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/95006
+ * gcc.dg/analyzer/clobbers-1.c: New test.
+ * gcc.dg/analyzer/clobbers-2.c: New test.
+ * gcc.dg/analyzer/data-model-1.c (test_26): Mark xfail as fixed.
+ (test_28): Likewise.
+ (test_52): Likewise. Add coverage for end of buffer.
+ * gcc.dg/analyzer/explode-1.c: Add leak warning.
+ * gcc.dg/analyzer/memset-1.c (test_3): Mark xfail as fixed.
+ (test_4): Use char. Mark xfail as fixed.
+ (test_6b): New.
+ (test_7): Mark xfail as fixed. Add coverage for start of buffer.
+ (test_8): New.
+ (test_9): New.
+ * gcc.dg/analyzer/memset-CVE-2017-18549-1.c: New test.
+ * gcc.dg/analyzer/symbolic-8.c: New test.
+
+2021-06-30 Christophe Lyon <christophe.lyon@foss.st.com>
+
+ * gcc.dg/debug/ctf/ctf-skip-types-2.c: Add dg-add-options float16.
+
+2021-06-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101264
+ * gfortran.dg/pr101264.f90: New testcase.
+
+2021-06-30 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101248
+ * gcc.target/i386/pr101248.c: New test.
+
+2021-06-29 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr101254.c: New.
+
+2021-06-29 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/95046
+ * gcc.target/i386/pr95046-9.c: New test.
+
+2021-06-29 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/vect/pr67790.c: Un-XFAIL.
+ * gcc.dg/vect/bb-slp-71.c: New testcase.
+
+2021-06-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/101210
+ * g++.dg/ubsan/pr101210.C: New test.
+
+2021-06-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101242
+ * gcc.dg/vect/bb-slp-pr101242.c: New testcase.
+ * gcc.dg/vect/pr67790.c: XFAIL scan for zero VEC_PERM_EXPR.
+
+2021-06-28 Martin Sebor <msebor@redhat.com>
+
+ * g++.dg/uninit-pr74762.C: New test.
+ * g++.dg/warn/uninit-pr74765.C: Same.
+
+2021-06-28 Indu Bhagat <indu.bhagat@oracle.com>
+ David Faust <david.faust@oracle.com>
+
+ * lib/gcc-dg.exp (gcc-dg-frontend-supports-ctf): New procedure.
+ (gcc-dg-debug-runtest): Add -gctf support.
+ * gcc.dg/debug/btf/btf-1.c: New test.
+ * gcc.dg/debug/btf/btf-2.c: Likewise.
+ * gcc.dg/debug/btf/btf-anonymous-struct-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-anonymous-union-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-array-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-bitfields-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-bitfields-2.c: Likewise.
+ * gcc.dg/debug/btf/btf-bitfields-3.c: Likewise.
+ * gcc.dg/debug/btf/btf-cvr-quals-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-enum-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-forward-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-function-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-function-2.c: Likewise.
+ * gcc.dg/debug/btf/btf-int-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-pointers-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-struct-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-typedef-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-union-1.c: Likewise.
+ * gcc.dg/debug/btf/btf-variables-1.c: Likewise.
+ * gcc.dg/debug/btf/btf.exp: Likewise.
+ * gcc.dg/debug/ctf/ctf-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-anonymous-struct-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-anonymous-union-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-array-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-array-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-array-3.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-array-4.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-attr-mode-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-attr-used-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-bitfields-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-bitfields-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-bitfields-3.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-bitfields-4.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-complex-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-cvr-quals-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-cvr-quals-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-cvr-quals-3.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-cvr-quals-4.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-enum-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-enum-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-file-scope-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-float-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-forward-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-forward-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-func-index-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-function-pointers-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-function-pointers-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-function-pointers-3.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-functions-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-int-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-objt-index-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-pointers-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-pointers-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-preamble-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-skip-types-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-skip-types-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-skip-types-3.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-skip-types-4.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-skip-types-5.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-skip-types-6.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-str-table-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-struct-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-struct-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-struct-array-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-struct-pointer-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-struct-pointer-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-typedef-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-typedef-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-typedef-3.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-typedef-struct-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-typedef-struct-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-typedef-struct-3.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-union-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-variables-1.c: Likewise.
+ * gcc.dg/debug/ctf/ctf-variables-2.c: Likewise.
+ * gcc.dg/debug/ctf/ctf.exp: Likewise.
+ * gcc.dg/debug/btf/btf-bitfields-4.c: New file.
+ * gcc.dg/debug/btf/btf-datasec-1.c: New file.
+ * gcc.dg/debug/btf/btf-function-3.c: New file.
+ * gcc.dg/debug/btf/btf-pointers-2.c: New file.
+ * gcc.dg/debug/btf/btf-struct-2.c: New file.
+ * gcc.dg/debug/btf/btf-variables-2.c: New file.
+ * gcc.dg/debug/btf/btf-variables-3.c: New file.
+ * gcc.dg/debug/ctf/ctf-debug-1.c: New file.
+ * gcc.dg/debug/ctf/ctf-debug-2.c: New file.
+ * gcc.dg/debug/ctf/ctf-function-pointers-4.c: New file.
+ * gcc.dg/debug/ctf/ctf-skip-types-7.c: New file.
+ * gcc.dg/debug/ctf/ctf-skip-types-8.c: New file.
+ * gcc.dg/debug/ctf/ctf-struct-array-2.c: New file.
+
+2021-06-28 Indu Bhagat <indu.bhagat@oracle.com>
+
+ * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): New procedure.
+
+2021-06-28 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/93385
+ * gcc.dg/ipa/pr93385.c: New test.
+ * gcc.dg/ipa/ipa-sra-23.c: Likewise.
+ * gcc.dg/ipa/ipa-sra-24.c: Likewise.
+ * g++.dg/ipa/ipa-sra-4.C: Likewise.
+
+2021-06-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101229
+ * gcc.dg/torture/pr101229.c: New testcase.
+
+2021-06-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101207
+ * gcc.dg/vect/bb-slp-pr101207.c: New testcase.
+
+2021-06-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101173
+ * gcc.dg/torture/pr101173.c: New testcase.
+
+2021-06-28 liuhongt <hongtao.liu@intel.com>
+
+ PR target/100648
+ * g++.target/i386/avx2-pr54700-2.C: Adjust testcase.
+ * g++.target/i386/avx512vl-pr54700-1a.C: New test.
+ * g++.target/i386/avx512vl-pr54700-1b.C: New test.
+ * g++.target/i386/avx512vl-pr54700-2a.C: New test.
+ * g++.target/i386/avx512vl-pr54700-2b.C: New test.
+ * gcc.target/i386/avx512vl-pr100648.c: New test.
+ * gcc.target/i386/avx512vl-blendv-1.c: New test.
+ * gcc.target/i386/avx512vl-blendv-2.c: New test.
+
+2021-06-28 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/funcspec-8.c: Replace
+ __builtin_ia32_blendvpd with __builtin_ia32_roundps_az.
+ * gcc.target/i386/blendv-1.c: New test.
+ * gcc.target/i386/blendv-2.c: New test.
+
+2021-06-27 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.dg/torture/pr101230-1.c: New test.
+
+2021-06-26 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/96204
+ * g++.dg/template/access40.C: New test.
+ * g++.dg/template/access40a.C: New test.
+
+2021-06-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/101040
+ PR c++/97566
+ * g++.dg/cpp2a/no_unique_address13.C: New test.
+
+2021-06-26 Marek Polacek <polacek@redhat.com>
+
+ PR c++/100752
+ * g++.dg/cpp0x/noexcept69.C: New test.
+ * g++.dg/parse/saved1.C: Adjust dg-error.
+ * g++.dg/template/crash50.C: Likewise.
+
+2021-06-25 David Malcolm <dmalcolm@redhat.com>
+
+ * jit.dg/test-vector-rvalues.cc (check_div): Add specialization
+ for v4f, to avoid relying on exact floating-point equality.
+ * jit.dg/test-vector-types.cc (check_div): Likewise.
+
+2021-06-25 David Malcolm <dmalcolm@redhat.com>
+
+ * jit.dg/test-asm.c: Remove i?86-*-* from target specifier.
+ * jit.dg/test-asm.cc: Likewise.
+
+2021-06-25 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/101216
+ * gcc.dg/Wnonnull-7.c: New test.
+
+2021-06-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101202
+ * gcc.dg/torture/pr101202.c: New testcase.
+
+2021-06-25 Xi Ruoyao <xry111@mengyan1223.wang>
+
+ * g++.dg/no-stack-protector-attr-3.C (dg-final): Adjust for MIPS.
+
+2021-06-25 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101185
+ * gcc.target/i386/bitwise_mask_op-3.c: Add xfail to
+ temporarily avoid regression, eventually xfail should be
+ removed.
+
+2021-06-24 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/tree-ssa/evrp30.c: New.
+
+2021-06-24 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/tree-ssa/pr101189.c: New.
+
+2021-06-24 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/98832
+ * g++.dg/cpp2a/class-deduction-alias9.C: New test.
+
+2021-06-24 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101182
+ * g++.dg/cpp2a/concepts-requires25.C: New test.
+
+2021-06-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/101171
+ * gcc.dg/pr101171.c: New test.
+
+2021-06-24 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/89021
+ * gcc.dg/vect/vect-nb-iter-ub-3.c (dg-additional-options):
+ Add --param vect-epilogues-nomask=0.
+ * gcc.target/i386/pr97249-1.c (foo): Add #pragma GCC unroll
+ to avoid loop vectorization.
+ (foo1): Ditto.
+ (foo2): Ditto.
+
+2021-06-24 Richard Biener <rguenther@suse.de>
+
+ * gcc.target/i386/vect-addsubv2df.c: New testcase.
+ * gcc.target/i386/vect-addsubv4sf.c: Likewise.
+ * gcc.target/i386/vect-addsubv4df.c: Likewise.
+ * gcc.target/i386/vect-addsubv8sf.c: Likewise.
+ * gcc.target/i386/vect-addsub-2.c: Likewise.
+ * gcc.target/i386/vect-addsub-3.c: Likewise.
+
+2021-06-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/101170
+ * gcc.dg/pr101170.c: New test.
+
+2021-06-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/101172
+ * gcc.dg/pr101172.c: New test.
+
+2021-06-24 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * gcc.target/s390/mnop-mcount-m31-mzarch.c: Adapt to the new
+ prologue size.
+ * gcc.target/s390/mnop-mcount-m64.c: Likewise.
+
+2021-06-24 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/target-in-reduction-1.c: New test.
+ * c-c++-common/gomp/clauses-1.c: Add in_reduction clauses on
+ target or combined target constructs.
+
+2021-06-24 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101105
+ * gcc.dg/torture/pr101105.c: New testcase.
+
+2021-06-24 liuhongt <hongtao.liu@intel.com>
+
+ PR target/98434
+ * gcc.target/i386/pr98434-1.c: New test.
+ * gcc.target/i386/pr98434-2.c: New test.
+ * gcc.target/i386/avx512vl-pr95488-1.c: Adjust testcase.
+
+2021-06-23 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/101174
+ * g++.dg/cpp1z/class-deduction-access3.C: New test.
+ * g++.dg/cpp1z/class-deduction91.C: New test.
+
+2021-06-23 Aaron Sawdey <acsawdey@linux.ibm.com>
+
+ * gcc.target/powerpc/pcrel-opt-inc-di.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-ld-df.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-ld-di.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-ld-hi.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-ld-qi.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-ld-sf.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-ld-si.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-ld-vector.c: Enable -mpcrel-opt to
+ test it.
+ * gcc.target/powerpc/pcrel-opt-st-df.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-st-di.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-st-hi.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-st-qi.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-st-sf.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-st-si.c: Enable -mpcrel-opt to test it.
+ * gcc.target/powerpc/pcrel-opt-st-vector.c: Enable -mpcrel-opt to
+ test it.
+
+2021-06-23 Xi Ruoyao <xry111@mengyan@123.wang>
+
+ * gcc.c-torture/execute/950704-1.c: Add -fwrapv to avoid
+ undefined behavior.
+
+2021-06-23 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/86439
+ * g++.dg/cpp1z/class-deduction88.C: New test.
+ * g++.dg/cpp1z/class-deduction89.C: New test.
+ * g++.dg/cpp1z/class-deduction90.C: New test.
+
+2021-06-23 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/101175
+ * gcc.target/i386/pr101175.c: New test.
+
+2021-06-23 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ PR fortran/100337
+ * gfortran.dg/coarray_collectives_17.f90: New test.
+
+2021-06-22 Sandra Loosemore <sandra@codesourcery.com>
+ Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/93524
+ * gfortran.dg/pr93524.c: New.
+ * gfortran.dg/pr93524.f90: New.
+
+2021-06-22 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/101143
+ * gcc.dg/analyzer/pr101143.c: New test.
+
+2021-06-22 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/101156
+ * gcc.dg/pr101156.c: New testcase.
+
+2021-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/101159
+ * gcc.c-torture/compile/pr101159.c: New test.
+
+2021-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/101160
+ * g++.target/i386/empty-class1.C: Require lp64 effective target
+ instead of x86_64-*-*.
+ * g++.target/i386/empty-class2.C: New test.
+
+2021-06-22 Jakub Jelinek <jakub@redhat.com>
+ Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/101162
+ * g++.dg/opt/pr101162.C: New test.
+
+2021-06-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101151
+ * gcc.dg/torture/pr101151.c: New testcase.
+
+2021-06-22 Kito Cheng <kito.cheng@sifive.com>
+
+ * g++.dg/modules/omp-1_a.C: Check pthread is available for
+ dg-module-cmi.
+ * g++.dg/modules/omp-2_a.C: Ditto.
+
+2021-06-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101158
+ * gfortran.dg/pr101158.f90: New testcase.
+
+2021-06-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/11877
+ * gcc.target/i386/pr11877-2.c: New test.
+
+2021-06-22 liuhongt <hongtao.liu@intel.com>
+
+ PR tree-optimization/97770
+ * gcc.target/i386/avx512bitalg-pr97770-1.c: Remove xfail.
+ * gcc.target/i386/avx512vpopcntdq-pr97770-1.c: Remove xfail.
+
+2021-06-22 liuhongt <hongtao.liu@intel.com>
+
+ PR target/100267
+ * gcc.target/i386/avx512bw-pr100267-1.c: New test.
+ * gcc.target/i386/avx512bw-pr100267-b-2.c: New test.
+ * gcc.target/i386/avx512bw-pr100267-d-2.c: New test.
+ * gcc.target/i386/avx512bw-pr100267-q-2.c: New test.
+ * gcc.target/i386/avx512bw-pr100267-w-2.c: New test.
+ * gcc.target/i386/avx512f-pr100267-1.c: New test.
+ * gcc.target/i386/avx512f-pr100267-pd-2.c: New test.
+ * gcc.target/i386/avx512f-pr100267-ps-2.c: New test.
+ * gcc.target/i386/avx512vl-pr100267-1.c: New test.
+ * gcc.target/i386/avx512vl-pr100267-pd-2.c: New test.
+ * gcc.target/i386/avx512vl-pr100267-ps-2.c: New test.
+ * gcc.target/i386/avx512vlbw-pr100267-1.c: New test.
+ * gcc.target/i386/avx512vlbw-pr100267-b-2.c: New test.
+ * gcc.target/i386/avx512vlbw-pr100267-d-2.c: New test.
+ * gcc.target/i386/avx512vlbw-pr100267-q-2.c: New test.
+ * gcc.target/i386/avx512vlbw-pr100267-w-2.c: New test.
+
+2021-06-22 liuhongt <hongtao.liu@intel.com>
+
+ PR target/100310
+ * gcc.target/i386/pr100310.c: New test.
+
+2021-06-21 Jason Merrill <jason@redhat.com>
+
+ PR target/88529
+ * g++.target/i386/empty-class1.C: New test.
+
+2021-06-21 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/67302
+ * g++.dg/opt/nrv21.C: New test.
+
+2021-06-21 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/80431
+ * g++.dg/cpp0x/nsdmi-virtual1a.C: New test.
+
+2021-06-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/100785
+ * c-c++-common/pr100785.c: New test.
+ * gcc.dg/pr48552-1.c: Don't expect invalid lvalue errors.
+ * gcc.dg/pr48552-2.c: Likewise.
+
+2021-06-21 prathamesh.kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR target/97906
+ * gcc.target/arm/simd/pr97906.c: New test.
+
+2021-06-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101121
+ * gfortran.dg/pr101121.f: New testcase.
+
+2021-06-21 liuhongt <hongtao.liu@intel.com>
+
+ PR target/101142
+ * gcc.target/i386/spill_to_mask-1.c: Adjust testcase.
+ * gcc.target/i386/spill_to_mask-2.c: Adjust testcase.
+ * gcc.target/i386/spill_to_mask-3.c: Adjust testcase.
+ * gcc.target/i386/spill_to_mask-4.c: Adjust testcase.
+
+2021-06-21 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR target/11877
+ * gcc.target/i386/pr11877.c: New test case.
+
+2021-06-18 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/fusion-p10-2logical.c: Update pattern
+ match counts.
+ * gcc.target/powerpc/fusion-p10-addadd.c: Update pattern match
+ counts.
+ * gcc.target/powerpc/fusion-p10-ldcmpi.c: Update pattern match
+ counts.
+ * gcc.target/powerpc/fusion-p10-logadd.c: Update pattern match
+ counts.
+
+2021-06-18 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/100283
+ PR fortran/101123
+ * gfortran.dg/min0_max0_1.f90: New test.
+ * gfortran.dg/min0_max0_2.f90: New test.
+
+2021-06-18 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/symbolic-7.c: New test.
+
+2021-06-18 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
+
+ PR target/100856
+ * gcc.target/arm/acle/pr100856.c: New test.
+ * gcc.target/arm/multilib.exp: Add tests for cde options.
+
+2021-06-18 Michael Meissner <meissner@linux.ibm.com>
+
+ * gcc.target/powerpc/float128-minmax-2.c: New test.
+
+2021-06-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/101106
+ * g++.dg/cpp0x/deleted15.C: New test.
+
+2021-06-17 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/100704
+ * gcc.target/i386/pr100704-1.c: New test.
+ * gcc.target/i386/pr100704-2.c: Likewise.
+ * gcc.target/i386/pr100704-3.c: Likewise.
+
+2021-06-17 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/97194
+ * gcc.target/i386/sse4_1-vec-set-1.c: New test.
+ * gcc.target/i386/sse4_1-vec-set-2.c: ditto.
+
+2021-06-17 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/pr100790.c: New test.
+
+2021-06-17 Marius Hillenbrand <mhillen@linux.ibm.com>
+
+ * gcc.target/s390/zvector/vec-doublee.c: New test.
+ * gcc.target/s390/zvector/vec-floate.c: New test.
+
+2021-06-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54400
+ * gcc.dg/vect/bb-slp-pr54400.c: New testcase.
+
+2021-06-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/101078
+ PR c++/91706
+ * g++.dg/template/access39.C: New test.
+
+2021-06-16 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/95501
+ PR fortran/95502
+ * gfortran.dg/pr95502.f90: New test.
+
+2021-06-16 Harald Anlauf <anlauf@gmx.de>
+
+ Revert:
+ 2021-06-16 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/95501
+ PR fortran/95502
+ * gfortran.dg/pr95502.f90: New test.
+
+2021-06-16 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/95501
+ PR fortran/95502
+ * gfortran.dg/pr95502.f90: New test.
+
+2021-06-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/100796
+ PR preprocessor/96391
+ * g++.dg/plugin/location-overflow-test-pr100796.c: New test.
+ * g++.dg/plugin/plugin.exp: Run it.
+
+2021-06-16 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/narrow_zero_high_half.c: Add new tests.
+
+2021-06-16 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/narrow_zero_high_half.c: Add new tests.
+
+2021-06-16 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/narrow_zero_high_half.c: Add new tests.
+
+2021-06-16 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/narrow_zero_high_half.c: Add new tests.
+
+2021-06-16 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/narrow_zero_high_half.c: New test.
+
+2021-06-16 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/100453
+ * gcc.dg/tree-ssa/pr100453.c: New test.
+
+2021-06-16 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/guality/pr49888.c (f): Use noipa attribute instead of
+ noinline, noclone.
+
+2021-06-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/101062
+ * gcc.dg/pr101062.c: New test.
+
+2021-06-16 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101088
+ * gcc.dg/torture/pr101088.c: New testcase.
+
+2021-06-16 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR rtl-optimization/46235
+ * gcc.target/i386/bt-5.c: New test.
+ * gcc.target/i386/bt-6.c: New test.
+ * gcc.target/i386/bt-7.c: New test.
+
+2021-06-16 Arnaud Charlet <charlet@adacore.com>
+
+ * gnat.dg/limited4.adb: Disable illegal code.
+
+2021-06-16 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101083
+ * gcc.dg/vect/pr97832-4.c: New testcase.
+
+2021-06-15 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/92568
+ * gfortran.dg/gomp/pr99928-1.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/pr99928-2.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/pr99928-3.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/pr99928-4.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/pr99928-5.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/pr99928-6.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/pr99928-8.f90: Uncomment 'defaultmap(none)'.
+ * gfortran.dg/gomp/defaultmap-1.f90: New test.
+ * gfortran.dg/gomp/defaultmap-2.f90: New test.
+ * gfortran.dg/gomp/defaultmap-3.f90: New test.
+ * gfortran.dg/gomp/defaultmap-4.f90: New test.
+ * gfortran.dg/gomp/defaultmap-5.f90: New test.
+ * gfortran.dg/gomp/defaultmap-6.f90: New test.
+ * gfortran.dg/gomp/defaultmap-7.f90: New test.
+
+2021-06-15 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/analyzer-decls.h (__analyzer_dump_capacity): New decl.
+ * gcc.dg/analyzer/capacity-1.c: New test.
+ * gcc.dg/analyzer/capacity-2.c: New test.
+ * gcc.dg/analyzer/capacity-3.c: New test.
+
+2021-06-15 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/101068
+ * gcc.dg/analyzer/explode-2a.c: New test.
+
+2021-06-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/101046
+ * gcc.target/i386/pr101046.c: New test.
+
+2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
+
+ * c-c++-common/Wattributes.c: Remove s390-specific check and add
+ new tests.
+ * gcc.dg/Wattributes-6.c: Likewise.
+
+2021-06-15 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ PR target/101020
+ * gcc.target/powerpc/float128-call.c: Adjust counts for be and le.
+
+2021-06-14 Martin Sebor <msebor@redhat.com>
+
+ PR c++/100876
+ * g++.dg/warn/Wmismatched-new-delete-4.C: New test.
+ * g++.dg/warn/Wmismatched-new-delete-5.C: New test.
+ * g++.dg/warn/Wstringop-overflow-7.C: New test.
+ * g++.dg/warn/Wfree-nonheap-object-6.C: New test.
+ * g++.dg/analyzer/placement-new.C: Prune out expected warning.
+
+2021-06-14 Peter Bergner <bergner@linux.ibm.com>
+
+ PR target/100777
+ * gcc.target/powerpc/pr100777.c: New test.
+
+2021-06-14 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/101058
+ * gcc.target/i386/pr101058.c: New test.
+
+2021-06-14 Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/101052
+ * g++.dg/spellcheck-stdlib.C: Add checks for <cstdlib> names.
+ * gcc.dg/spellcheck-stdlib.c: Likewise.
+
+2021-06-14 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vclz.c: Update expected results.
+ * gcc.target/arm/simd/mve-vshl.c: Likewise.
+ * gcc.target/arm/simd/mve-vec-pack.c: New test.
+ * gcc.target/arm/simd/mve-vec-unpack.c: New test.
+
+2021-06-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100934
+ * gcc.dg/torture/pr100934.c: New testcase.
+
+2021-06-14 Aaron Sawdey <acsawdey@linux.ibm.com>
+
+ * gcc.dg/sms-1.c: Remove scan-rtl-dump-times check.
+ * gcc.dg/sms-2.c: Remove scan-rtl-dump-times check.
+ * gcc.dg/sms-3.c: Remove scan-rtl-dump-times check.
+ * gcc.dg/sms-4.c: Remove scan-rtl-dump-times check.
+ * gcc.dg/sms-6.c: Remove scan-rtl-dump-times check.
+ * gcc.dg/sms-8.c: Remove scan-rtl-dump-times check.
+ * gcc.dg/sms-10.c: Remove scan-rtl-dump-times check.
+
+2021-06-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101031
+ * gcc.dg/torture/pr101031.c: New testcase.
+
+2021-06-13 Jason Merrill <jason@redhat.com>
+
+ * gcc.dg/c2x-attr-maybe_unused-1.c: Expect no warnings.
+
+2021-06-13 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/101023
+ * g++.target/i386/pr101023a.C: New test.
+ * g++.target/i386/pr101023b.C: Likewise.
+
+2021-06-12 David Edelsohn <dje.gcc@gmail.com>
+
+ * g++.dg/ext/builtin-shufflevector-2.C: Ignore psabi warning.
+ * gcc.dg/uninit-pr93100.c: Skip on AIX.
+ * gcc.target/powerpc/pr100085.c: Require int128 and float128.
+
+2021-06-12 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/ext/attrib62.C: No longer warn.
+ * g++.dg/diagnostic/maybe_unused1.C: New test.
+
+2021-06-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/101029
+ * g++.dg/ext/array4.C: New test.
+
+2021-06-11 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/check-builtin-vec_rlnm-runnable.c
+ (dg-require-effective-target): Change target to p9vector_hw.
+
+2021-06-11 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gcc.dg/gomp/simd-clones-2.c: Enhance.
+
+2021-06-11 Patrick Palka <ppalka@redhat.com>
+
+ DR 1227
+ PR c++/96560
+ * g++.dg/template/sfinae-dr1227.C: New test.
+
+2021-06-11 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
+
+ PR target/101016
+ * gcc.target/arm/mve/intrinsics/pr101016.c: New test.
+
+2021-06-11 Roger Sayle <roger@nextmovesoftware.com>
+
+ PR tree-optimization/96392
+ * gcc.dg/pr96392.c: New test.
+
+2021-06-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101025
+ * gcc.dg/torture/pr101025.c: New testcase.
+
+2021-06-11 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
+
+ PR target/99939
+ * gcc.target/arm/cmse/cmse-18.c: Add separate scan-assembler
+ directives check for target is v8.1-m.main+mve or not before
+ comparing the assembly output.
+ * gcc.target/arm/cmse/cmse-20.c: New test.
+
+2021-06-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/100974
+ * g++.dg/cpp23/consteval-if1.C: New test.
+ * g++.dg/cpp23/consteval-if2.C: New test.
+ * g++.dg/cpp23/consteval-if3.C: New test.
+ * g++.dg/cpp23/consteval-if4.C: New test.
+ * g++.dg/cpp23/consteval-if5.C: New test.
+ * g++.dg/cpp23/consteval-if6.C: New test.
+ * g++.dg/cpp23/consteval-if7.C: New test.
+ * g++.dg/cpp23/consteval-if8.C: New test.
+ * g++.dg/cpp23/consteval-if9.C: New test.
+ * g++.dg/cpp23/consteval-if10.C: New test.
+ * g++.dg/cpp23/feat-cxx2b.C: Add __cpp_if_consteval tests.
+
+2021-06-11 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c: Update
+ expected number of enodes after the loop.
+ * gcc.dg/analyzer/paths-8.c: New test.
+
+2021-06-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101028
+ * gcc.dg/pr101028.c: New testcase.
+
+2021-06-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/101026
+ * gfortran.dg/pr101026.f: New testcase.
+
+2021-06-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/101008
+ * gcc.dg/pr101008.c: New test.
+
+2021-06-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/101007
+ * gcc.target/i386/sse-pr101007.c: New test.
+
+2021-06-11 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/101021
+ * gcc.target/i386/pr101021-1.c: New test.
+ * gcc.target/i386/pr101021-2.c: Ditto.
+
+2021-06-11 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/100788
+ * gcc.dg/pr100788.c: New test.
+
+2021-06-11 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/101009
+ * gcc.dg/torture/pr101009.c: New testcase.
+
+2021-06-11 Kewen Lin <linkw@linux.ibm.com>
+
+ * gcc.target/powerpc/p9-fpcvt-3.c: New test.
+
+2021-06-11 Marek Polacek <polacek@redhat.com>
+
+ PR c++/100995
+ * g++.dg/cpp2a/is-constant-evaluated9.C: Add dg-warning.
+ * g++.dg/cpp2a/is-constant-evaluated12.C: New test.
+
+2021-06-10 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/67829
+ * g++.dg/template/ttp34.C: New test.
+ * g++.dg/template/ttp34a.C: New test.
+ * g++.dg/template/ttp34b.C: New test.
+
+2021-06-10 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100946
+ * g++.dg/cpp2a/concepts-return-req3.C: New test.
+
+2021-06-10 Peter Bergner <bergner@linux.ibm.com>
+
+ * gcc.target/powerpc/mma-builtin-4.c (__builtin_vsx_build_pair): Add
+ tests. Update expected counts.
+ * gcc.target/powerpc/mma-builtin-5.c (__builtin_mma_build_acc): Add
+ tests. Update expected counts.
+
+2021-06-10 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/100967
+ * gdc.dg/pr100967.d: New test.
+
+2021-06-10 Robin Dapp <rdapp@linux.ibm.com>
+
+ * gcc.target/s390/vector/vcond-mixed-double.c: New test.
+ * gcc.target/s390/vector/vcond-mixed-float.c: New test.
+
+2021-06-10 Robin Dapp <rdapp@linux.ibm.com>
+
+ * gcc.dg/vect/pr56541.c: Fix target selector.
+
+2021-06-10 Andrew Stubbs <ams@codesourcery.com>
+ Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-c++-common/goacc-gomp/nesting-fail-1.c: Adjust patterns.
+ * c-c++-common/goacc/finalize-1.c: Likewise.
+ * c-c++-common/goacc/mdc-1.c: Likewise.
+ * c-c++-common/goacc/nesting-fail-1.c: Likewise.
+ * c-c++-common/goacc/struct-enter-exit-data-1.c: Likewise.
+ * gfortran.dg/goacc/attach-descriptor.f90: Likewise.
+ * gfortran.dg/goacc/finalize-1.f: Likewise.
+ * gfortran.dg/goacc/mapping-tests-3.f90: Likewise.
+
+2021-06-10 Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-c++-common/goacc/mdc-1.c: Fix '#pragma acc acc [...]' typo.
+ * c-c++-common/goacc/mdc-2.c: Likewise.
+ * g++.dg/goacc/mdc.C: Likewise.
+
+2021-06-10 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/cpp2a/feat-cxx2a.C: Uncomment __cpp_consteval test.
+ * g++.dg/cpp23/feat-cxx2b.C: Likewise.
+
+2021-06-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/100852
+ * g++.dg/opt/pr100852.C: New test.
+
+2021-06-09 Andrew Pinski <apinski@marvell.com>
+
+ * g++.dg/torture/pr100925.C: New test.
+
+2021-06-09 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/int_128bit-runnable.c (extsd2q): Update expected
+ count.
+ Add tests for vec_signextq.
+ * gcc.target/powerpc/p9-sign_extend-runnable.c: New test case.
+
+2021-06-09 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/fp128_conversions.c: New file.
+ * gcc.target/powerpc/int_128bit-runnable.c(vextsd2q,
+ vcmpuq, vcmpsq, vcmpequq, vcmpequq., vcmpgtsq, vcmpgtsq.
+ vcmpgtuq, vcmpgtuq.): Update scan-assembler-times.
+ (ppc_native_128bit): Remove dg-require-effective-target.
+
+2021-06-09 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/int_128bit-runnable.c: Add shift_right, shift_left
+ tests.
+
+2021-06-09 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/int_128bit-runnable.c: Add 128-bit DFP
+ conversion tests.
+
+2021-06-09 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/int_128bit-runnable.c: New test file.
+
+2021-06-09 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/check-builtin-vec_rlnm-runnable.c:
+ New runnable test case.
+ * gcc.target/powerpc/vec-rlmi-rlnm.c: Update scan assembler times
+ for xxlor instruction.
+
+2021-06-09 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vclz.c: New test.
+
+2021-06-09 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vhadd-1.c: New test.
+ * gcc.target/arm/simd/mve-vhadd-2.c: New test.
+ * gcc.target/arm/simd/neon-vhadd-1.c: New test.
+ * gcc.target/arm/simd/neon-vhadd-2.c: New test.
+
+2021-06-09 Roger Sayle <roger@nextmovesoftware.com>
+
+ * gcc.dg/builtins-70.c: New test.
+
+2021-06-09 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/fusion-p10-2logical.c: Update fused insn
+ counts to test 32 and 64 bit separately.
+ * gcc.target/powerpc/fusion-p10-addadd.c: Update fused insn
+ counts to test 32 and 64 bit separately.
+ * gcc.target/powerpc/fusion-p10-ldcmpi.c: Update fused insn
+ counts to test 32 and 64 bit separately.
+ * gcc.target/powerpc/fusion-p10-logadd.c: Update fused insn
+ counts to test 32 and 64 bit separately.
+
+2021-06-09 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100981
+ * gfortran.dg/vect/pr100981-1.f90: New testcase.
+
+2021-06-09 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/97832
+ * gcc.dg/vect/pr97832-1.c: New testcase.
+ * gcc.dg/vect/pr97832-2.c: Likewise.
+ * gcc.dg/vect/pr97832-3.c: Likewise.
+ * g++.dg/vect/slp-pr98855.cc: XFAIL.
+ * gcc.dg/vect/slp-50.c: New file.
+
+2021-06-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/100965
+ * gfortran.dg/gomp/pr100965.f90: New test.
+
+2021-06-09 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100936
+ * gcc.target/i386/pr100936.c: New test.
+
+2021-06-09 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ * gcc.target/powerpc/float128-call.c: Adjust.
+ * gcc.target/powerpc/pr100085.c: New test.
+
+2021-06-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/100879
+ * g++.dg/diagnostic/enum3.C: New test.
+
+2021-06-08 Marek Polacek <polacek@redhat.com>
+
+ PR c++/100065
+ * g++.dg/cpp2a/explicit18.C: New test.
+
+2021-06-08 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.dg/tree-ssa/pr96928-1.c: Fix testcase for now that ~
+ happens on the outside of the bit_xor.
+
+2021-06-08 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/pr60209-neg.C: Update diagnostic.
+ * g++.dg/diagnostic/string-literal-concat.C: Likewise.
+ * g++.dg/ext/utf-badconcat.C: Likewise.
+ * g++.dg/ext/utf-badconcat2.C: Likewise.
+
+2021-06-08 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp23/mixed-concat1.C: New test.
+
+2021-06-08 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp23/whitespace-splice1.C: New test.
+
+2021-06-08 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp23/narrowing-bool1.C: New test.
+
+2021-06-08 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/99212
+ * gcc.dg/analyzer/bitfields-1.c: New test.
+ * gcc.dg/analyzer/data-model-1.c (struct sbits): Make bitfields
+ explicitly signed.
+ (test_44): Update test values assigned to the bits to ones that
+ fit in the range of the bitfield type. Remove xfails.
+ (test_45): Remove xfails.
+
+2021-06-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/100963
+ * g++.dg/cpp0x/initlist124.C: New test.
+
+2021-06-08 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100923
+ * gcc.dg/torture/pr100923.c: New testcase.
+
+2021-06-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/100957
+ * g++.dg/gomp/doacross-2.C: New test.
+
+2021-06-08 H.J. Lu <hjl.tools@gmail.com>
+
+ PR middle-end/100951
+ * gcc.target/i386/pr100951.c: New test.
+
+2021-06-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/100887
+ PR testsuite/100943
+ * gcc.dg/pr100887.c: Add -Wno-psabi -w to dg-options.
+
+2021-06-08 Tobias Burnus <tobias@codesourcery.com>
+
+ PR middle-end/99928
+ * gfortran.dg/gomp/openmp-simd-6.f90: Update scan-tree-dump.
+ * gfortran.dg/gomp/scan-5.f90: Likewise.
+ * gfortran.dg/gomp/loop-1.f90: Likewise; remove xfail.
+ * gfortran.dg/gomp/pr99928-1.f90: Remove xfail.
+ * gfortran.dg/gomp/pr99928-2.f90: Likewise.
+ * gfortran.dg/gomp/pr99928-3.f90: Likewise.
+ * gfortran.dg/gomp/pr99928-8.f90: Likewise.
+
+2021-06-08 Martin Liska <mliska@suse.cz>
+
+ * gcc.dg/format/strfmon-1.c: Fix typo.
+ * gfortran.dg/char4-subscript.f90: Likewise.
+
+2021-06-08 Kewen Lin <linkw@linux.ibm.com>
+
+ PR tree-optimization/100794
+ * gcc.dg/tree-ssa/pr100794.c: New test.
+
+2021-06-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/91706
+ * g++.dg/template/lookup17.C: New test.
+
+2021-06-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/100102
+ * g++.dg/cpp0x/alias-decl-73.C: New test.
+
+2021-06-07 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100637
+ * gcc.target/i386/pr100637-5b.c: New test.
+ * gcc.target/i386/pr100637-5w.c: Ditto.
+
+2021-06-07 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/82735
+ * gcc.target/i386/pr82735-3.c: Don't compile for x32.
+ * gcc.target/i386/pr82735-4.c: Likewise.
+ * gcc.target/i386/pr82735-5.c: Likewise.
+
+2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/sso-14.c: Adjust.
+
+2021-06-07 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100918
+ * g++.dg/template/access38.C: New test.
+
+2021-06-07 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/100885
+ * g++.target/i386/pr100885.C (_mm_set_epi64): Cast __m64 to long
+ long.
+
+2021-06-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/100887
+ * gcc.dg/pr100887.c: New test.
+
+2021-06-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/100898
+ * g++.dg/ext/va-arg-pack-3.C: New test.
+
+2021-06-07 liuhongt <hongtao.liu@intel.com>
+
+ PR target/100885
+ * g++.target/i386/pr100885.C: New test.
+
+2021-06-07 liuhongt <hongtao.liu@intel.com>
+
+ PR target/82735
+ * gcc.target/i386/pr82735-1.c: New test.
+ * gcc.target/i386/pr82735-2.c: New test.
+ * gcc.target/i386/pr82735-3.c: New test.
+ * gcc.target/i386/pr82735-4.c: New test.
+ * gcc.target/i386/pr82735-5.c: New test.
+
+2021-06-06 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/gomp/scan-1.c: New test.
+
+2021-06-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/100902
+ * c-c++-common/gomp/pr100902-1.c: New test.
+
+2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/sso-14.c: New test.
+
+2021-06-05 José Rui Faustino de Sousa <jrfsousa@gmail.com>
+
+ PR fortran/100120
+ PR fortran/100816
+ PR fortran/100818
+ PR fortran/100819
+ PR fortran/100821
+ * gfortran.dg/PR100120.f90: New test.
+ * gfortran.dg/character_workout_1.f90: New test.
+ * gfortran.dg/character_workout_4.f90: New test.
+
+2021-06-04 Tobias Burnus <tobias@codesourcery.com>
+
+ PR middle-end/100905
+ * gfortran.dg/gomp/loop-3.f90: New test.
+
+2021-06-04 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/100882
+ * gdc.dg/pr100882a.d: New test.
+ * gdc.dg/pr100882b.d: New test.
+ * gdc.dg/pr100882c.d: New test.
+ * gdc.dg/torture/pr100882.d: New test.
+
+2021-06-04 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100893
+ * g++.dg/template/param4.C: New test.
+ * g++.dg/template/param5.C: New test.
+ * g++.dg/cpp1z/nontype-auto19.C: New test.
+ * g++.dg/cpp2a/concepts-decltype.C: Don't expect that the
+ deduced type of a decltype(auto) NTTP has top-level cv-quals.
+
+2021-06-04 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100102
+ * g++.dg/cpp0x/alias-decl-72.C: New test.
+ * g++.dg/cpp0x/alias-decl-72a.C: New test.
+
+2021-06-04 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/99839
+ * gfortran.dg/inline_matmul_25.f90: New test.
+
+2021-06-04 Martin Sebor <msebor@redhat.com>
+
+ PR c/100783
+ * gcc.dg/nonnull-6.c: New test.
+
+2021-06-04 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/100732
+ * gcc.dg/tree-ssa/builtin-snprintf-11.c: New test.
+ * gcc.dg/tree-ssa/builtin-snprintf-12.c: New test.
+ * gcc.dg/tree-ssa/builtin-sprintf-28.c: New test.
+ * gcc.dg/tree-ssa/builtin-sprintf-29.c: New test.
+ * gcc.dg/uninit-pr100732.c: New test.
+
+2021-06-04 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/Wvla-parameter-10.c: New test.
+ * gcc.dg/Wvla-parameter-11.c: New test.
+
+2021-06-04 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/goacc/omp-fixed.f: Re-add test item changed in previous
+ commit in addition - add more dg-errors and '... end ...' due to changed
+ parsing.
+ * gfortran.dg/goacc/omp.f95: Likewise.
+ * gfortran.dg/goacc-gomp/mixed-1.f: New test.
+
+2021-06-04 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100637
+ * gcc.dg/vect/slp-perm-9.c (dg-final): Adjust dumps for vect32 targets.
+
+2021-06-04 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/pr99928-5.f90: Really use the
+ proper iteration variable.
+
+2021-06-04 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/pr99928-1.f90: Add 'implicit none'.
+ * gfortran.dg/gomp/pr99928-11.f90: Likewise.
+ * gfortran.dg/gomp/pr99928-4.f90: Likewise.
+ * gfortran.dg/gomp/pr99928-6.f90: Likewise.
+ * gfortran.dg/gomp/pr99928-8.f90: Likewise.
+ * gfortran.dg/gomp/pr99928-2.f90: Likewise. Add missing decl.
+ * gfortran.dg/gomp/pr99928-5.f90: Add implicit none;
+ fix loop-variable and remove xfail.
+
+2021-06-04 Tobias Burnus <tobias@codesourcery.com>
+
+ PR middle-end/99928
+ * gfortran.dg/gomp/loop-2.f90: Update for typo fix.
+
+2021-06-04 Tobias Burnus <tobias@codesourcery.com>
+
+ PR middle-end/99928
+ * gfortran.dg/gomp/pr99928-3.f90: Add 'default(none)', following
+ C/C++ version of the patch.
+ * gfortran.dg/gomp/loop-1.f90: New test.
+ * gfortran.dg/gomp/loop-2.f90: New test.
+ * gfortran.dg/gomp/pr99928-1.f90: New test; based on C/C++ test.
+ * gfortran.dg/gomp/pr99928-11.f90: Likewise.
+ * gfortran.dg/gomp/pr99928-2.f90: Likewise.
+ * gfortran.dg/gomp/pr99928-4.f90: Likewise.
+ * gfortran.dg/gomp/pr99928-5.f90: Likewise.
+ * gfortran.dg/gomp/pr99928-6.f90: Likewise.
+ * gfortran.dg/gomp/pr99928-8.f90: Likewise.
+ * gfortran.dg/goacc/omp.f95: Use 'acc kernels loops' instead
+ of 'acc loops' to hide unrelated bug for now.
+ * gfortran.dg/goacc/omp-fixed.f: Likewise
+
+2021-06-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/100887
+ * gcc.target/i386/pr100887.c: New test.
+
+2021-06-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/100872
+ * g++.dg/gomp/declare-simd-8.C: New test.
+
+2021-06-04 Haochen Gui <guihaoc@gcc.gnu.org>
+
+ * gcc.target/powerpc/not-promote-mode.c: New.
+
+2021-06-03 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100637
+ * gcc.target/i386/vperm-v2hi.c: New test.
+ * gcc.target/i386/vperm-v4qi.c: Ditto.
+
+2021-06-03 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/pr80776-1.c: XFAIL and document the reason why.
+
+2021-06-03 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100592
+ * g++.dg/cpp0x/alias-decl-71.C: New test.
+
+2021-06-03 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100862
+ * g++.dg/cpp2a/using-enum-9.C: New test.
+
+2021-06-03 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ * gcc.target/aarch64/sve/part_vect_single_iter_epilog.c: New test.
+
+2021-06-03 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vabs.c: New test.
+
+2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/bit_packed_array6.adb: New test.
+ * gnat.dg/bit_packed_array6_pkg.ads: New helper.
+
+2021-06-03 Martin Liska <mliska@suse.cz>
+
+ * gcc.dg/spellcheck-options-23.c: New test.
+
+2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/inline22.adb: New test.
+
+2021-06-03 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/cpunative/info_16: Update implementer.
+ * gcc.target/aarch64/cpunative/info_17: Likewise
+
+2021-06-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/100859
+ * g++.dg/gomp/depend-iterator-3.C: New test.
+ * g++.dg/gomp/this-1.C: Don't expect any diagnostics for
+ this as base expression of depend array section, expect a different
+ error wording for this as depend locator and add testcases
+ for affinity clauses.
+
+2021-06-02 Jason Merrill <jason@redhat.com>
+
+ PR c++/100838
+ * g++.dg/init/no-elide2.C: New test.
+
+2021-06-02 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * gcc.target/s390/ashr.c: New test.
+
+2021-06-02 Tobias Burnus <tobias@codesourcery.com>
+
+ PR middle-end/99928
+ * gfortran.dg/gomp/taskloop-2.f90: New.
+
+2021-06-02 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/ext/builtin-shufflevector-1.C: Add -Wno-psabi -w to
+ dg-options.
+
+2021-06-01 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/65816
+ * g++.dg/cpp0x/constexpr-delegating3.C: New test.
+ * g++.dg/cpp0x/dc10.C: New test.
+ * g++.dg/cpp0x/initlist-base4.C: New test.
+ * g++.dg/cpp2a/constexpr-init22.C: New test.
+
+2021-06-01 Andrew Pinski <apinski@marvell.com>
+
+ PR tree-optimization/95481
+ * gcc.dg/tree-ssa/tailcall-10.c: New test.
+ * gcc.dg/tree-ssa/tailcall-11.c: New test.
+ * gcc.dg/tree-ssa/tailcall-12.c: New test.
+ * gcc.dg/tree-ssa/tailcall-13.c: New test.
+ * gcc.dg/tree-ssa/tailrecursion-8.c: New test.
+
+2021-06-01 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR testsuite/100750
+ * gcc.target/powerpc/rop-5.c: Require ELFv2 ABI.
+
+2021-06-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/91859
+ * g++.dg/cpp2a/destroying-delete5.C: New test.
+
+2021-06-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/94492
+ * g++.dg/cpp0x/depr-copy4.C: New test.
+
+2021-06-01 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/Wstringop-overflow-55.c: Adjust for global ranges changes.
+ * gcc.dg/pr80776-1.c: Same.
+
+2021-06-01 Tobias Burnus <tobias@codesourcery.com>
+
+ PR middle-end/99928
+ * gfortran.dg/gomp/reduction5.f90: Remove dg-error; the issue is
+ now diagnosed with less error output.
+ * gfortran.dg/gomp/scan-1.f90: Likewise.
+ * gfortran.dg/gomp/pr99928-3.f90: New test.
+ * gfortran.dg/gomp/taskloop-1.f90: New test.
+
+2021-06-01 liuhongt <hongtao.liu@intel.com>
+
+ PR tree-optimization/98365
+ * gcc.target/i386/pr98365.c: New test.
+
+2021-06-01 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/100781
+ * gcc.dg/pr100781.c: New.
+
+2021-06-01 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/100774
+ * g++.dg/pr100774.C: New.
+
+2021-05-31 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/depend-iterator-1.f90: Use dg-do compile.
+ * gfortran.dg/gomp/depend-iterator-2.f90: Use dg-do compile.
+
+2021-05-31 Richard Biener <rguenther@suse.de>
+
+ PR c++/88601
+ * c-c++-common/builtin-shufflevector-2.c: New testcase.
+ * c-c++-common/torture/builtin-shufflevector-1.c: Likewise.
+ * g++.dg/ext/builtin-shufflevector-1.C: Likewise.
+ * g++.dg/ext/builtin-shufflevector-2.C: Likewise.
+
+2021-05-31 Peter Bergner <bergner@linux.ibm.com>
+
+ PR target/99842
+ * g++.target/powerpc/pr99842.C: New.
+
+2021-05-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * gcc.dg/plugin/diagnostic_plugin_show_trees.c (plugin_init): Fix caret_max_with.
+ * gcc.dg/plugin/diagnostic_plugin_test_inlining.c
+ (plugin_init): Likewise.
+ * gcc.dg/plugin/diagnostic_plugin_test_paths.c (plugin_init): Likewise.
+ * gcc.dg/plugin/diagnostic_plugin_test_string_literals.c
+ (plugin_init): Likewise.
+ * gcc.dg/plugin/diagnostic_plugin_test_tree_expression_range.c
+ (plugin_init): Likewise.
+
+2021-05-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/99928
+ * c-c++-common/gomp/pr99928-1.c: Add default(none) to constructs
+ combined with parallel, teams or taskloop and defaultmap(none)
+ to constructs combined with target.
+ * c-c++-common/gomp/pr99928-2.c: Likewise.
+ * c-c++-common/gomp/pr99928-3.c: Likewise.
+ * c-c++-common/gomp/pr99928-4.c: Likewise.
+ * c-c++-common/gomp/pr99928-5.c: Likewise.
+ * c-c++-common/gomp/pr99928-6.c: Likewise.
+ * c-c++-common/gomp/pr99928-7.c: Likewise.
+ * c-c++-common/gomp/pr99928-8.c: Likewise.
+ * c-c++-common/gomp/pr99928-9.c: Likewise.
+ * c-c++-common/gomp/pr99928-10.c: Likewise.
+ * c-c++-common/gomp/pr99928-13.c: Likewise.
+ * c-c++-common/gomp/pr99928-14.c: Likewise.
+
+2021-05-29 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/Wstringop-overflow-55.c:
+ * gcc.dg/pr80776-1.c:
+
+2021-05-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100778
+ * gcc.dg/vect/bb-slp-pr100778-1.c: New testcase.
+
+2021-05-28 Jason Merrill <jason@redhat.com>
+
+ PR c++/100797
+ PR c++/95719
+ * g++.dg/inherit/virtual15.C: New test.
+ * g++.dg/inherit/virtual15a.C: New file.
+
+2021-05-28 Richard Biener <rguenther@suse.de>
+
+ PR ipa/100791
+ * gcc.dg/pr100791.c: New testcase.
+
+2021-05-28 Richard Biener <rguenther@suse.de>
+
+ PR c/100803
+ * gcc.dg/gimplefe-error-11.c: New testcase.
+
+2021-05-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/99928
+ * c-c++-common/gomp/pr99928-8.c: Remove all xfails.
+ * c-c++-common/gomp/pr99928-9.c: Likewise.
+ * c-c++-common/gomp/pr99928-10.c: Likewise.
+ * c-c++-common/gomp/pr99928-16.c: New test.
+
+2021-05-28 Tobias Burnus <tobias@codesourcery.com>
+
+ * c-c++-common/gomp/affinity-1.c: New test.
+ * c-c++-common/gomp/affinity-2.c: New test.
+ * c-c++-common/gomp/affinity-3.c: New test.
+ * c-c++-common/gomp/affinity-4.c: New test.
+ * c-c++-common/gomp/affinity-5.c: New test.
+ * c-c++-common/gomp/affinity-6.c: New test.
+ * c-c++-common/gomp/affinity-7.c: New test.
+ * gfortran.dg/gomp/affinity-clause-1.f90: New test.
+ * gfortran.dg/gomp/affinity-clause-2.f90: New test.
+ * gfortran.dg/gomp/affinity-clause-3.f90: New test.
+ * gfortran.dg/gomp/affinity-clause-4.f90: New test.
+ * gfortran.dg/gomp/affinity-clause-5.f90: New test.
+ * gfortran.dg/gomp/affinity-clause-6.f90: New test.
+ * gfortran.dg/gomp/depend-iterator-1.f90: New test.
+ * gfortran.dg/gomp/depend-iterator-2.f90: New test.
+ * gfortran.dg/gomp/depend-iterator-3.f90: New test.
+ * gfortran.dg/gomp/taskwait.f90: New test.
+
+2021-05-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
+ Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/popcount4ll.c: Remove lp64 condition.
+ Adjust scanning pattern for !lp64.
+ * gcc.dg/tree-ssa/popcount5ll.c: Likewise.
+ * gcc.dg/tree-ssa/popcount4l.c: Adjust scanning pattern
+ for ! int32plus.
+
+2021-05-28 Kewen Lin <linkw@linux.ibm.com>
+
+ PR tree-optimization/99398
+ * gcc.target/powerpc/vec-perm-ctor-run.c: New test.
+ * gcc.target/powerpc/vec-perm-ctor.c: New test.
+ * gcc.target/powerpc/vec-perm-ctor.h: New test.
+
+2021-05-27 Matthias Kretz <kretz@kde.org>
+
+ PR c++/100716
+ * g++.dg/diagnostic/pr100716.C: New test.
+ * g++.dg/diagnostic/pr100716-1.C: Same test with
+ -fno-pretty-templates.
+
+2021-05-27 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99893
+ * g++.dg/cpp0x/static_assert17.C: New test.
+
+2021-05-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/86355
+ * g++.dg/cpp0x/alias-decl-variadic2.C: New test.
+
+2021-05-27 Patrick Palka <ppalka@redhat.com>
+
+ DR 1315
+ PR c++/67593
+ PR c++/96555
+ * g++.dg/template/partial16.C: New test.
+ * g++.dg/template/partial17.C: New test.
+ * g++.dg/template/partial18.C: New test.
+ * g++.dg/template/partial19.C: New test.
+ * g++.dg/cpp0x/pr68724.C: Adjust expected diagnostic for
+ ill-formed partial specialization.
+ * g++.dg/cpp0x/variadic38.C: Likewise.
+ * g++.dg/cpp1z/pr81016.C: Likewise.
+ * g++.dg/template/partial5.C: Likewise.
+ * g++.old-deja/g++.pt/spec21.C: Likewise.
+
+2021-05-27 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/100602
+ * gfortran.dg/pointer_check_14.f90: New test.
+
+2021-05-27 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/100656
+ * gfortran.dg/bounds_check_22.f90: New test.
+
+2021-05-27 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/Wstringop-overflow-55.c: Pass -fno-ipa-icf.
+
+2021-05-27 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100637
+ * gcc.target/i386/pr100637-3b.c (avgu): New test.
+ * gcc.target/i386/pr100637-3w.c (avgu): Ditto.
+
+2021-05-26 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100502
+ * g++.dg/template/access37.C: New test.
+ * g++.dg/template/access37a.C: New test.
+
+2021-05-26 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/Wstringop-overflow-55.c: Adapt for range query changes.
+ * gcc.dg/pr80776-1.c: Same.
+
+2021-05-26 Uroš Bizjak <ubizjak@gmail.com>
+
+ * lib/target-supports.exp (check_effective_target_vect32): New.
+ (available_vector_sizes): Append 32 for x86 targets.
+ * gcc.dg/vect/pr71264.c (dg-final): Xfail scan dump for vect32 targets.
+ * gcc.dg/vect/slp-28.c (dg-final): Adjust dumps for vect32 targets.
+ * gcc.dg/vect/slp-3.c (dg-final): Ditto.
+ * gcc.target/i386/pr100637-3b.c: New test.
+ * gcc.target/i386/pr100637-3w.c: Ditto.
+ * gcc.target/i386/pr100637-4b.c: Ditto.
+ * gcc.target/i386/pr100637-4w.c: Ditto.
+
+2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/sso-13.c: New test.
+
+2021-05-26 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vaddv-1.c: New test.
+
+2021-05-26 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100368
+ * g++.dg/cpp1z/elide6.C: New test.
+
+2021-05-26 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/97420
+ * g++.dg/cpp0x/noexcept68.C: New test.
+
+2021-05-26 Geng Qi <gengqi@linux.alibaba.com>
+
+ * gcc.target/csky/fldrd_fstrd.c: New.
+ * gcc.target/csky/fpuv3/fldr64_fstr64.c: New.
+
+2021-05-26 Geng Qi <gengqi@linux.alibaba.com>
+
+ * gcc.target/csky/ldbs.c: New.
+
+2021-05-26 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.dg/tree-ssa/pr96928.c: Update test for slightly different IR.
+ * gcc.dg/tree-ssa/pr96928-1.c: New testcase.
+
+2021-05-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/100666
+ * g++.dg/cpp1z/nodiscard8.C: New test.
+ * g++.dg/cpp1z/nodiscard9.C: New test.
+
+2021-05-25 Martin Liska <mliska@suse.cz>
+
+ * gcc.dg/sancov/attribute.c: New test.
+
+2021-05-25 Cooper Qu <cooper.qu@linux.alibaba.com>
+
+ * gcc.target/csky/fpuv3/fpuv3.exp : Amend copyright.
+
+2021-05-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/99928
+ * c-c++-common/gomp/pr99928-8.c: Remove xfails from omp teams r21 and
+ r28 checks.
+ * c-c++-common/gomp/pr99928-9.c: Likewise.
+ * c-c++-common/gomp/pr99928-10.c: Likewise.
+
+2021-05-25 Geng Qi <gengqi@linux.alibaba.com>
+
+ * gcc.target/csky/fpuv3/fpuv3.exp: New.
+ * gcc.target/csky/fpuv3/fpv3_div.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fadd.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fdtos.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fftoi_rm.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fftoi_rz.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fhtos.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fitof.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fmov.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fmovi.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fmula.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fmuls.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fneg.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fnmula.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fnmuls.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fstod.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fstoh.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fsub.c: New.
+ * gcc.target/csky/fpuv3/fpv3_fxtof.c: New.
+ * gcc.target/csky/fpuv3/fpv3_h.c: New.
+ * gcc.target/csky/fpuv3/fpv3_hs.c: New.
+ * gcc.target/csky/fpuv3/fpv3_hsz.c: New.
+ * gcc.target/csky/fpuv3/fpv3_hz.c: New.
+ * gcc.target/csky/fpuv3/fpv3_ls.c: New.
+ * gcc.target/csky/fpuv3/fpv3_lsz.c: New.
+ * gcc.target/csky/fpuv3/fpv3_lt.c: New.
+ * gcc.target/csky/fpuv3/fpv3_ltz.c: New.
+ * gcc.target/csky/fpuv3/fpv3_max.c: New.
+ * gcc.target/csky/fpuv3/fpv3_min.c: New.
+ * gcc.target/csky/fpuv3/fpv3_mul.c: New.
+ * gcc.target/csky/fpuv3/fpv3_mula.c: New.
+ * gcc.target/csky/fpuv3/fpv3_muls.c: New.
+ * gcc.target/csky/fpuv3/fpv3_ne.c: New.
+ * gcc.target/csky/fpuv3/fpv3_nez.c: New.
+ * gcc.target/csky/fpuv3/fpv3_recip.c: New.
+ * gcc.target/csky/fpuv3/fpv3_sqrt.c: New.
+ * gcc.target/csky/fpuv3/fpv3_unordered.c: New.
+
+2021-05-24 Aaron Sawdey <acsawdey@linux.ibm.com>
+
+ * gcc.target/powerpc/fusion-p10-logadd.c: New file.
+
+2021-05-24 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/86470
+ * gfortran.dg/gomp/class-firstprivate-1.f90: New test.
+ * gfortran.dg/gomp/class-firstprivate-2.f90: New test.
+ * gfortran.dg/gomp/class-firstprivate-3.f90: New test.
+ * gfortran.dg/gomp/class-firstprivate-4.f90: New test.
+
+2021-05-24 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vld4.c: New test, derived from
+ slp-perm-3.c
+
+2021-05-24 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vld2.c: New test, derived from
+ slp-perm-2.c
+
+2021-05-24 liuhongt <hongtao.liu@intel.com>
+
+ PR target/100660
+ * gcc.target/i386/pr100660.c: New test.
+
+2021-05-24 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.dg/tree-ssa/phi-opt-10.c: Use "\[0-9\]*" instead of '.'
+ when matching ssa name version.
+ * gcc.dg/tree-ssa/phi-opt-7.c: Likewise.
+
+2021-05-23 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100722
+ * gcc.target/i386/pr100722.c: New test.
+
+2021-05-23 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/100551
+ * gfortran.dg/pr100551.f90: New test.
+
+2021-05-23 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.dg/gimplefe-45.c: New test.
+
+2021-05-21 Aaron Sawdey <acsawdey@linux.ibm.com>
+
+ * gcc.target/powerpc/fusion-p10-addadd.c: New file.
+
+2021-05-21 Aaron Sawdey <acsawdey@linux.ibm.com>
+
+ * gcc.target/powerpc/fusion-p10-ldcmpi.c: New file.
+ * gcc.target/powerpc/fusion-p10-2logical.c: New file.
+
+2021-05-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/99928
+ * c-c++-common/gomp/pr99928-3.c: Remove all xfails.
+ * c-c++-common/gomp/pr99928-15.c: New test.
+
+2021-05-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/99928
+ * c-c++-common/gomp/pr99928-6.c: Remove all xfails.
+ * c-c++-common/gomp/pr99928-13.c: New test.
+ * c-c++-common/gomp/pr99928-14.c: New test.
+
+2021-05-21 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR middle-end/90115
+ * c-c++-common/goacc/privatization-1-compute-loop.c: Update.
+ * c-c++-common/goacc/privatization-1-compute.c: Likewise.
+ * c-c++-common/goacc/privatization-1-routine_gang-loop.c:
+ Likewise.
+ * c-c++-common/goacc/privatization-1-routine_gang.c: Likewise.
+
+2021-05-21 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR middle-end/90115
+ * c-c++-common/goacc/privatization-1-compute-loop.c: New file.
+ * c-c++-common/goacc/privatization-1-compute.c: Likewise.
+ * c-c++-common/goacc/privatization-1-routine_gang-loop.c:
+ Likewise.
+ * c-c++-common/goacc/privatization-1-routine_gang.c: Likewise.
+ * gfortran.dg/goacc/privatization-1-compute-loop.f90: Likewise.
+ * gfortran.dg/goacc/privatization-1-compute.f90: Likewise.
+ * gfortran.dg/goacc/privatization-1-routine_gang-loop.f90:
+ Likewise.
+ * gfortran.dg/goacc/privatization-1-routine_gang.f90: Likewise.
+ * c-c++-common/goacc-gomp/nesting-1.c: Update.
+ * c-c++-common/goacc/private-reduction-1.c: Likewise.
+ * gfortran.dg/goacc/private-3.f95: Likewise.
+
+2021-05-21 Thomas Schwinge <thomas@codesourcery.com>
+
+ * lib/target-supports.exp (check_effective_target___OPTIMIZE__):
+ New proc.
+ * gcc.c-torture/compile/ssa-unused-1.c: New file.
+
+2021-05-21 Richard Biener <rguenther@suse.de>
+ H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/pr90773-24.c: New test.
+ * gcc.target/i386/pr90773-25.c: Likewise.
+
+2021-05-21 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100637
+ * g++.target/i386/pr100637-1b.C: New test.
+ * g++.target/i386/pr100637-1w.C: Ditto.
+ * gcc.target/i386/pr100637-2b.c: Ditto.
+ * gcc.target/i386/pr100637-2w.c: Ditto.
+
+2021-05-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/derived_type7.adb, gnat.dg/derived_type7.ads: New test.
+
+2021-05-20 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp2a/desig19.C: New test.
+
+2021-05-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/100489
+ * g++.dg/cpp2a/desig18.C: New test.
+
+2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
+
+ * gcc.dg/pch/valid-1.c: Adjust diagnostic message in testcase.
+ * lib/dg-pch.exp: Adjust diagnostic message.
+
+2021-05-20 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/100684
+ * g++.dg/warn/Wnonnull13.C: New test.
+ * g++.dg/warn/Wnonnull14.C: New test.
+ * g++.dg/warn/Wnonnull15.C: New test.
+
+2021-05-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * g++.dg/modules/omp-1_c.C: Fix testcase.
+
+2021-05-20 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100701
+ * gcc.target/i386/pr100701.c: New test.
+
+2021-05-20 Marcel Vollweiler <marcel@codesourcery.com>
+
+ * gfortran.dg/gomp/map-6.f90: New test.
+ * gfortran.dg/gomp/map-7.f90: New test.
+ * gfortran.dg/gomp/map-8.f90: New test.
+
+2021-05-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR testsuite/96488
+ * gnat.dg/unchecked_convert5.adb: Do not run on PowerPC64 LE.
+ * gnat.dg/unchecked_convert6.adb: Likewise.
+
+2021-05-20 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100637
+ * gcc.target/i386/pr100637-1w.c (shl, ashr, lshr): New tests.
+
+2021-05-20 Christophe Lyon <christophe.lyon@linaro.org>
+ Torbjörn Svensson <torbjorn.svensson@st.com>
+
+ PR c/42579
+ * c-c++-common/spellcheck-reserved.c: Add tests for __FILE_NAME__.
+ * c-c++-common/cpp/file-name-1.c: New test.
+
+2021-05-20 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/96983
+ * gfortran.dg/pr96711.f90: Use 2**digit(x) instead of a hard-coded value;
+ add comments regarding what the code does.
+
+2021-05-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/99928
+ * c-c++-common/gomp/pr99928-4.c: Remove all xfails.
+ * c-c++-common/gomp/pr99928-5.c: Likewise.
+
+2021-05-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/100646
+ * gcc.dg/cpp/pr100646-1.c: New test.
+ * gcc.dg/cpp/pr100646-2.c: New test.
+
+2021-05-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/100634
+ * g++.dg/cpp2a/nontype-complex1.C: New test.
+
+2021-05-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/100659
+ * g++.dg/parse/access13.C: New test.
+
+2021-05-19 Martin Sebor <msebor@redhat.com>
+
+ PR c/100619
+ * gcc.dg/pr100619.c: New test.
+
+2021-05-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/100367
+ PR c++/96299
+ * g++.dg/cpp2a/spaceship-fallback1.C: New test.
+
+2021-05-19 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp1z/class-deduction-access1.C: New test.
+ * g++.dg/cpp1z/class-deduction-access2.C: New test.
+
+2021-05-19 Marek Polacek <polacek@redhat.com>
+
+ PR c++/100596
+ * g++.dg/cpp0x/friend7.C: Turn a few dg-warnings into dg-errors.
+ Remove dg-errors for GNU attributes.
+ * g++.dg/ext/attrib63.C: Remove dg-error.
+ * g++.dg/cpp0x/friend8.C: New test.
+
+2021-05-19 Kito Cheng <kito.cheng@sifive.com>
+
+ * g++.dg/modules/omp-1_a.C: Check pthread is available.
+ * g++.dg/modules/omp-1_b.C: Ditto.
+ * g++.dg/modules/omp-1_c.C: Ditto.
+ * g++.dg/modules/omp-2_a.C: Ditto.
+ * g++.dg/modules/omp-2_b.C: Ditto.
+
+2021-05-19 Alex Coplan <alex.coplan@arm.com>
+
+ PR target/100333
+ * gcc.target/arm/cmse/pr100333.c: New test.
+
+2021-05-19 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/99977
+ * gcc.target/arm/pr99977.c: Require arm_arch_v8m_base.
+
+2021-05-19 Geng Qi <gengqi@linux.alibaba.com>
+
+ * gcc.target/riscv/arch-12.c: New.
+ * gcc.target/riscv/attribute-19.c: New.
+
+2021-05-19 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/narrow_high_combine.c: New test.
+
+2021-05-19 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/100672
+ * gcc.dg/torture/pr100672.c: New testcase.
+
+2021-05-19 Martin Liska <mliska@suse.cz>
+
+ PR testsuite/100658
+ * gcc.dg/local1.c: Fix typos.
+ * gcc.dg/ucnid-5-utf8.c: Likewise.
+ * gcc.dg/ucnid-5.c: Likewise.
+
+2021-05-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ * gcc.target/aarch64/sve/logical_unpacked_and_2.c: Change
+ scan-assembly-times to scan-assembly not for superfluous uxtb.
+ * gcc.target/aarch64/sve/logical_unpacked_and_3.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_and_4.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_and_6.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_and_7.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_eor_2.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_eor_3.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_eor_4.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_eor_6.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_eor_7.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_orr_2.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_orr_3.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_orr_4.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_orr_6.c: Likewise.
+ * gcc.target/aarch64/sve/logical_unpacked_orr_7.c: Likewise.
+ * gcc.target/aarch64/sve/ld1_extend.c: New test.
+
+2021-05-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/100576
+ * gcc.c-torture/compile/pr100576.c: New test.
+
+2021-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * gcc.dg/tree-ssa/ssa-sink-3.c: Fix test case.
+
+2021-05-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/99928
+ * c-c++-common/gomp/pr99928-2.c: Remove all xfails.
+ * c-c++-common/gomp/pr99928-12.c: New test.
+
+2021-05-19 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ * gcc.dg/tree-ssa/ssa-sink-1.c: Adjust.
+ * gcc.dg/tree-ssa/ssa-sink-2.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-3.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-4.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-5.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-6.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-7.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-8.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-9.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-10.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-13.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-14.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-16.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-17.c: Ditto.
+ * gcc.dg/tree-ssa/ssa-sink-18.c: New.
+
+2021-05-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/100261
+ * g++.dg/dfp/mangle-6.C: New test.
+
+2021-05-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/100372
+ * g++.dg/cpp0x/alias-decl-ttp1.C: New test.
+
+2021-05-18 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ * gcc.target/powerpc/ppc64-abi-warn-1.c: Remove.
+ * gcc.target/powerpc/ppc64-abi-warn-2.c: Remove.
+ * gcc.target/powerpc/ppc64-abi-warn-3.c: Remove.
+
+2021-05-18 Jason Merrill <jason@redhat.com>
+
+ PR c++/100205
+ PR c++/99314
+ * g++.dg/cpp0x/decltype-nonstatic1.C: New test.
+
+2021-05-18 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/implicit-delete1.C: New test.
+
+2021-05-18 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/100615
+ * gcc.dg/analyzer/pr100615.c: New test.
+
+2021-05-18 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100637
+ * gcc.target/i386/pr100637-1b.c: New test.
+ * gcc.target/i386/pr100637-1w.c: Ditto.
+ * gcc.target/i386/pr92658-avx2-2.c: Do not XFAIL scan for pmovsxbq.
+ * gcc.target/i386/pr92658-avx2.c: Do not XFAIL scan for pmovzxbq.
+ * gcc.target/i386/pr92658-avx512vl.c: Do not XFAIL scan for vpmovdb.
+ * gcc.target/i386/pr92658-sse4-2.c: Do not XFAIL scan for
+ pmovsxbd and pmovsxwq.
+ * gcc.target/i386/pr92658-sse4.c: Do not XFAIL scan for
+ pmovzxbd and pmovzxwq.
+
+2021-05-18 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/100642
+ * gfortran.dg/goacc-gomp/depobj.f90: New test.
+
+2021-05-18 Thomas Schwinge <thomas@codesourcery.com>
+
+ * lib/gcc-dg.exp: Implement 'dg-note'.
+ * lib/prune.exp: Likewise.
+ * gcc.dg/vect/nodump-vect-opt-info-2.c: Use 'dg-note', and
+ 'dg-prune-output "note: ".
+ * gfortran.dg/goacc/routine-external-level-of-parallelism-2.f: Use
+ 'dg-note', match up additional notes, one class of them with
+ XFAILed 'dg-bogus'.
+ * lib/lto.exp: Implement 'dg-lto-note'.
+ * g++.dg/lto/odr-1_0.C: Use 'dg-lto-note', match up additional
+ notes.
+ * g++.dg/lto/odr-1_1.C: Likewise.
+ * g++.dg/lto/odr-2_1.C: Likewise.
+
+2021-05-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/100590
+ * gcc.dg/pr100590.c: New test.
+
+2021-05-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/100580
+ * g++.dg/other/pr100580.C: New test.
+
+2021-05-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/94589
+ * g++.dg/opt/pr94589-2.C: Adjust scan-tree-dump count from 14 to 12.
+
+2021-05-18 Richard Biener <rguenther@suse.de>
+
+ * gcc.target/i386/pr100582.c: Adjust for AVX512.
+
+2021-05-18 Richard Biener <rguenther@suse.de>
+
+ PR c/100522
+ * gcc.dg/gimplefe-error-10.c: New testcase.
+
+2021-05-18 Richard Biener <rguenther@suse.de>
+
+ PR c/100547
+ * gcc.dg/pr100547.c: New testcase.
+ * gcc.dg/attr-vector_size.c: Adjust.
+
+2021-05-18 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * gcc.target/s390/zvector/vec-_Bool.c: New test.
+
+2021-05-18 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ PR c++/100281
+ * g++.target/s390/pr100281-1.C: New test.
+ * g++.target/s390/pr100281-2.C: New test.
+
+2021-05-17 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/100512
+ * gcc.dg/pr100512.c: New.
+
+2021-05-17 Jonathan Wakely <jwakely@redhat.com>
+
+ * g++.dg/conversion/pr100635.C: New test.
+
+2021-05-17 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/98411
+ * gfortran.dg/pr98411.f90: New test.
+
+2021-05-17 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/pr100349.c: New test.
+
+2021-05-17 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/cpunative/info_16: New test.
+ * gcc.target/aarch64/cpunative/info_17: New test.
+ * gcc.target/aarch64/cpunative/native_cpu_16.c: New test.
+ * gcc.target/aarch64/cpunative/native_cpu_17.c: New test.
+
+2021-05-17 Richard Biener <rguenther@suse.de>
+
+ PR c/100625
+ * gcc.dg/gimplefe-error-9.c: New testcase.
+
+2021-05-17 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/100582
+ * gcc.target/i386/pr100582.c: New testcase.
+
+2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-compare-3.c: New test with GCC vectors.
+ * gcc.target/arm/simd/mve-vcmp-f16.c: New test for
+ auto-vectorization.
+ * gcc.target/arm/armv8_2-fp16-arith-1.c: Adjust since we now
+ vectorize float16_t vectors.
+
+2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-compare-1.c: New test with GCC vectors.
+ * gcc.target/arm/simd/mve-compare-2.c: New test with GCC vectors.
+ * gcc.target/arm/simd/mve-compare-scalar-1.c: New test with GCC
+ vectors.
+ * gcc.target/arm/simd/mve-vcmp-f32.c: New test for
+ auto-vectorization.
+ * gcc.target/arm/simd/mve-vcmp.c: New test for auto-vectorization.
+
+2021-05-17 liuhongt <hongtao.liu@intel.com>
+
+ PR target/100549
+ * gcc.target/i386/pr100549.c: New test.
+
+2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vadd-scalar-1.c: New.
+
+2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vadd-1.c: New.
+
+2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vsub_1.c: Factorize and add __fp16 test.
+
+2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vshr.c: Add more scan-assembler-times.
+
+2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/acle/saturation.c: Use arm_sat_ok effective
+ target.
+ * lib/target-supports.exp
+ (check_effective_target_arm_qbit_ok_nocache): Rename into...
+ (check_effective_target_arm_sat_ok_nocache): ... this. Check
+ __ARM_FEATURE_SAT and use armv6.
+
+2021-05-17 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/100633
+ * gfortran.dg/gomp/workshare-59.f90: New test.
+
+2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR debug/100515
+ * gcc.dg/debug/dwarf2/pr100515.c: Require openmp effective-target.
+
+2021-05-16 David Edelsohn <dje.gcc@gmail.com>
+
+ * g++.dg/ext/attrib63.C: Add -Wno-psabi option.
+
+2021-05-16 David Edelsohn <dje.gcc@gmail.com>
+
+ * g++.dg/warn/uninit-pr93100.C: Require fsantize support.
+
+2021-05-16 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/unsigned-float.c: Remove arm_fp_ok, adjust
+ dg-options.
+
+2021-05-15 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ * gcc.target/powerpc/rop-1.c: New.
+ * gcc.target/powerpc/rop-2.c: New.
+ * gcc.target/powerpc/rop-3.c: New.
+ * gcc.target/powerpc/rop-4.c: New.
+ * gcc.target/powerpc/rop-5.c: New.
+
+2021-05-15 Martin Jambor <mjambor@suse.cz>
+
+ Revert:
+ 2021-05-15 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/100453
+ * gcc.dg/tree-ssa/pr100453.c: New test.
+
+2021-05-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/100342
+ * gcc.target/i386/pr100342.c: New test.
+
+2021-05-14 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/parallel-master-1.f90: New test.
+ * gfortran.dg/gomp/parallel-master-2.f90: New test.
+
+2021-05-14 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/implicit-save.f90: New test.
+
+2021-05-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/95226
+ * g++.dg/cpp1y/pr95226.C: New test.
+
+2021-05-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/94616
+ * g++.dg/cpp0x/pr94616.C: New test.
+
+2021-05-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/90019
+ * g++.dg/cpp0x/sfinae68.C: New test.
+
+2021-05-14 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/cpp1y/pr88872.C: New test.
+
+2021-05-14 Michael de Lang <kingoipo@gmail.com>
+
+ * g++.dg/tsan/pthread_cond_clockwait.C: New test.
+
+2021-05-14 Marek Polacek <polacek@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/99032
+ * g++.dg/cpp0x/friend7.C: New test.
+ * g++.dg/cpp0x/gen-attrs-4.C: Add dg-error.
+ * g++.dg/cpp0x/gen-attrs-39-1.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-74.C: New test.
+ * g++.dg/ext/attrib63.C: New test.
+
+2021-05-13 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/93100
+ PR middle-end/98583
+ * g++.dg/warn/uninit-pr93100.C: New test.
+ * gcc.dg/uninit-pr93100.c: New test.
+ * gcc.dg/uninit-pr98583.c: New test.
+
+2021-05-13 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/100453
+ * gcc.dg/tree-ssa/pr100453.c: New test.
+
+2021-05-13 Martin Sebor <msebor@redhat.com>
+
+ * g++.dg/pr100574.C: Use size_t as operator new argument type.
+
+2021-05-13 Martin Liska <mliska@suse.cz>
+
+ PR middle-end/100504
+ * gcc.target/i386/pr100504.c: New test.
+
+2021-05-13 Martin Sebor <msebor@redhat.com>
+
+ PR c/100550
+ * gcc.dg/Wvla-parameter-9.c: New test.
+
+2021-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/99928
+ * c-c++-common/gomp/pr99928-1.c: New test.
+ * c-c++-common/gomp/pr99928-2.c: New test.
+ * c-c++-common/gomp/pr99928-3.c: New test.
+ * c-c++-common/gomp/pr99928-4.c: New test.
+ * c-c++-common/gomp/pr99928-5.c: New test.
+ * c-c++-common/gomp/pr99928-6.c: New test.
+ * c-c++-common/gomp/pr99928-7.c: New test.
+ * c-c++-common/gomp/pr99928-8.c: New test.
+ * c-c++-common/gomp/pr99928-9.c: New test.
+ * c-c++-common/gomp/pr99928-10.c: New test.
+ * c-c++-common/gomp/pr99928-11.c: New test.
+
+2021-05-13 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/100563
+ * gcc.dg/pr100563.c (dg-options): Add -wno-pointer-to-int-cast.
+
+2021-05-13 Richard Earnshaw <rearnsha@arm.com>
+
+ * gcc.dg/pr100563.c: New test.
+
+2021-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/98856
+ * gcc.target/i386/sse2-psraq-1.c: New test.
+ * gcc.target/i386/sse4_2-psraq-1.c: New test.
+ * gcc.target/i386/avx-psraq-1.c: New test.
+ * gcc.target/i386/avx2-psraq-1.c: New test.
+ * gcc.target/i386/avx-pr82370.c: Adjust expected number of vpsrad
+ instructions.
+ * gcc.target/i386/avx2-pr82370.c: Likewise.
+ * gcc.target/i386/avx512f-pr82370.c: Likewise.
+ * gcc.target/i386/avx512bw-pr82370.c: Likewise.
+ * gcc.dg/torture/vshuf-4.inc: Add two further permutations.
+ * gcc.dg/torture/vshuf-8.inc: Likewise.
+
+2021-05-13 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100581
+ * g++.target/i386/pr100581.C: New test.
+
+2021-05-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR testsuite/100569
+ * gnat.dg/lto21.adb: Prune new LTO warning.
+
+2021-05-13 Martin Liska <mliska@suse.cz>
+
+ PR testsuite/100569
+ * gcc.dg/atomic/c11-atomic-exec-2.c: Prune new LTO warning.
+ * gcc.dg/torture/pr94947-1.c: Likewise.
+
+2021-05-13 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/avx-pr94680.c: Fix typo in testcase.
+
+2021-05-13 liuhongt <hongtao.liu@intel.com>
+
+ PR target/94680
+ * gcc.target/i386/avx-pr94680.c: New test.
+ * gcc.target/i386/avx512f-pr94680.c: New test.
+ * gcc.target/i386/sse2-pr94680.c: New test.
+
+2021-05-12 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/100571
+ * gcc.dg/Wstringop-overflow-67.c: New test.
+
+2021-05-12 Aldy Hernandez <aldyh@redhat.com>
+
+ PR c/100521
+ * gcc.dg/pr100521.c: New file.
+
+2021-05-12 Marek Polacek <polacek@redhat.com>
+
+ * g++.dg/warn/Wint-in-bool-context-2.C: New test.
+
+2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
+
+ * c-c++-common/gomp/map-6.c: New test.
+ * c-c++-common/gomp/map-7.c: New test.
+
+2021-05-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100566
+ * gcc.dg/torture/pr100566.c: New testcase.
+
+2021-05-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/100392
+ * gcc.dg/cpp/pr100392.c: New test.
+ * gcc.dg/cpp/pr100392.h: New file.
+
+2021-05-12 Martin Liska <mliska@suse.cz>
+
+ * lib/lto.exp: When running tests without jobserver, one can see
+ the following warning for tests that use 1to1 partitioning.
+
+2021-05-12 liuhongt <hongtao.liu@intel.com>
+
+ PR target/99908
+ * gcc.target/i386/avx2-pr99908.c: New test.
+ * gcc.target/i386/sse4_1-pr99908.c: New test.
+
+2021-05-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100519
+ * gcc.dg/torture/pr100519.c: New testcase.
+
+2021-05-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR debug/100515
+ * gcc.dg/debug/dwarf2/pr100515.c: New testcase.
+
+2021-05-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/100508
+ * gcc.dg/gomp/pr100508.c: New test.
+
+2021-05-12 Jakub Jelinek <jakub@redhat.com>
+ Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/94589
+ * gcc.dg/tree-ssa/pr94589-1.c: New test.
+
+2021-05-12 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/98218
+ * g++.target/i386/pr98218-1.C: Ditto.
+ * gcc.target/i386/pr98218-4.c: New test.
+ * gcc.target/i386/pr98218-1.c: Correct PR number.
+ * gcc.target/i386/pr98218-1a.c: Ditto.
+ * gcc.target/i386/pr98218-2.c: Ditto.
+ * gcc.target/i386/pr98218-2a.c: Ditto.
+ * gcc.target/i386/pr98218-3.c: Ditto.
+ * gcc.target/i386/pr98218-3a.c: Ditto.
+
+2021-05-11 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/cpp/c11-elifdef-1.c, gcc.dg/cpp/c2x-elifdef-1.c,
+ gcc.dg/cpp/c2x-elifdef-2.c: New tests.
+
+2021-05-11 Joseph Myers <joseph@codesourcery.com>
+
+ * g++.dg/cpp1y/digit-sep-paste.C, gcc.dg/c2x-digit-separators-3.c:
+ New tests.
+
+2021-05-11 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * gcc.dg/guality/pr43077-1.c: Align types of output and input
+ operands by lifting immediates to type long.
+
+2021-05-11 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/c11-digit-separators-1.c,
+ gcc.dg/c2x-digit-separators-1.c, gcc.dg/c2x-digit-separators-2.c:
+ New tests.
+
+2021-05-11 Jason Merrill <jason@redhat.com>
+
+ PR c++/100517
+ * g++.dg/ext/vector41.C: New test.
+
+2021-05-11 Martin Liska <mliska@suse.cz>
+
+ * gfortran.dg/goacc/pr78027.f90: Remove -Wno-hsa option.
+ * brig.dg/README: Removed.
+ * brig.dg/dg.exp: Removed.
+ * brig.dg/test/gimple/alloca.hsail: Removed.
+ * brig.dg/test/gimple/atomics.hsail: Removed.
+ * brig.dg/test/gimple/branches.hsail: Removed.
+ * brig.dg/test/gimple/fbarrier.hsail: Removed.
+ * brig.dg/test/gimple/function_calls.hsail: Removed.
+ * brig.dg/test/gimple/internal-casts.hsail: Removed.
+ * brig.dg/test/gimple/kernarg.hsail: Removed.
+ * brig.dg/test/gimple/mem.hsail: Removed.
+ * brig.dg/test/gimple/mulhi.hsail: Removed.
+ * brig.dg/test/gimple/packed.hsail: Removed.
+ * brig.dg/test/gimple/priv-array-offset-access.hsail: Removed.
+ * brig.dg/test/gimple/smoke_test.hsail: Removed.
+ * brig.dg/test/gimple/variables.hsail: Removed.
+ * brig.dg/test/gimple/vector.hsail: Removed.
+ * lib/brig-dg.exp: Removed.
+ * lib/brig.exp: Removed.
+
+2021-05-11 Alex Coplan <alex.coplan@arm.com>
+
+ PR target/99725
+ * gcc.target/arm/cmse/pr99725.c: New test.
+
+2021-05-11 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/fmul_lane_1.c: New test.
+
+2021-05-11 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/100509
+ * gcc.dg/pr100509.c: New testcase.
+
+2021-05-11 Robin Dapp <rdapp@linux.ibm.com>
+
+ * gcc.target/s390/risbg-ll-3.c: Change match pattern.
+
+2021-05-11 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/51577
+ * g++.dg/lookup/operator-3.C: New test.
+
+2021-05-11 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100138
+ * g++.dg/cpp2a/concepts-ctad4.C: New test.
+
+2021-05-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/opt5.ads: New test.
+ * gnat.dg/specs/opt5_pkg.ads: New helper.
+
+2021-05-10 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/100425
+ PR middle-end/100510
+ * c-c++-common/Walloca-larger-than.C: New test.
+ * gcc.dg/Walloca-larger-than-4.c: New test.
+ * gcc.dg/Wvla-larger-than-5.c: New test.
+ * gcc.dg/pr79972.c: Remove unexpected warning directive.
+
+2021-05-10 Pat Haugen <pthaugen@linux.ibm.com>
+
+ * gcc.target/powerpc/fold-vec-insert-float-p9.c: Adjust counts.
+ * gcc.target/powerpc/vec-rlmi-rlnm.c: Likewise.
+
+2021-05-10 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vmul-scalar-1.c: New.
+
+2021-05-10 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vsub-scalar-1.c: New test.
+
+2021-05-10 H.J. Lu <hjl.tools@gmail.com>
+
+ PR tree-optimization/42587
+ * gcc.dg/optimize-bswapsi-6.c: New test.
+
+2021-05-10 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/100452
+ * g++.dg/vect/slp-pr99971.cc: Align data.
+
+2021-05-10 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100492
+ * gcc.dg/torture/pr100492.c: New testcase.
+
+2021-05-10 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/100464
+ PR c++/100468
+ * gcc.dg/pr100464.c: New testcase.
+ * g++.dg/tree-ssa/array-temp1.C: Adjust.
+
+2021-05-10 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100434
+ * gcc.dg/tree-ssa/ssa-dse-43.c: New testcase.
+
+2021-05-10 Alex Coplan <alex.coplan@arm.com>
+
+ PR target/99960
+ * gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_s64.c:
+ Update now that we're (correctly) using full 128-bit vector
+ loads/stores.
+ * gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_u64.c:
+ Likewise.
+ * gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_z_s64.c:
+ Likewise.
+ * gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_z_u64.c:
+ Likewise.
+ * gcc.target/arm/mve/intrinsics/vuninitializedq_int.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/vuninitializedq_int1.c:
+ Likewise.
+
+2021-05-08 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/46991
+ * gfortran.dg/class_dummy_7.f90: Correct PR number.
+
+2021-05-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/sso-9.c: Delete.
+
+2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/debug18.adb: New test.
+
+2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/sso-12.c: New test.
+
+2021-05-07 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C:
+ Adjust diagnostic.
+
+2021-05-07 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR tree-optimization/79333
+ * gcc.dg/tree-ssa/ssa-fre-94.c: Require c99_runtime.
+
+2021-05-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/100450
+ * c-c++-common/gomp/pr100450.c: New test.
+
+2021-05-07 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100445
+ * gcc.target/i386/pr100445-1.c: New test.
+
+2021-05-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/100445
+ * gcc.target/i386/pr100445.c: New test.
+
+2021-05-06 Joseph Myers <joseph@codesourcery.com>
+
+ PR c++/83873
+ PR preprocessor/97604
+ * g++.dg/cpp1y/digit-sep-neg-2.C,
+ g++.dg/cpp1y/digit-sep-pp-number.C: New tests.
+ * g++.dg/cpp1y/digit-sep-line-neg.C, g++.dg/cpp1y/digit-sep-neg.C:
+ Adjust expected messages.
+
+2021-05-06 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.dg/ipa/ipa-sra-1.c (main): Revert change done by
+ 05193687dde, make the argv again pointer to an array.
+
+2021-05-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt93.adb: Compile only for LP64 targets.
+
+2021-05-06 Robin Dapp <rdapp@linux.ibm.com>
+
+ * lib/target-supports.exp: Add s390 checks for vect conversions.
+
+2021-05-06 Robin Dapp <rdapp@linux.ibm.com>
+
+ * gcc.dg/vect/pr56541.c: Add vect_floatint_cvt.
+
+2021-05-06 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/46991
+ PR fortran/99819
+ * gfortran.dg/class_dummy_6.f90: New test.
+ * gfortran.dg/class_dummy_7.f90: New test.
+
+2021-05-06 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR testsuite/100355
+ * gcc.c-torture/execute/ieee/cdivchkld.x: New.
+
+2021-05-06 Marius Hillenbrand <mhillen@linux.ibm.com>
+
+ * gcc.target/s390/zvector/imm-range-error-1.c: Fix test for
+ __builtin_s390_vpdi.
+ * gcc.target/s390/zvector/vec-permi.c: New test for builtin
+ vec_permi.
+
+2021-05-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/94589
+ * gcc.dg/pr94589-1.c: New test.
+ * gcc.dg/pr94589-2.c: New test.
+ * gcc.dg/pr94589-3.c: New test.
+ * gcc.dg/pr94589-4.c: New test.
+ * g++.dg/opt/pr94589-1.C: New test.
+ * g++.dg/opt/pr94589-2.C: New test.
+ * g++.dg/opt/pr94589-3.C: New test.
+ * g++.dg/opt/pr94589-4.C: New test.
+
+2021-05-06 Richard Biener <rguenther@suse.de>
+
+ PR ipa/100373
+ * gcc.dg/pr100373.c: New testcase.
+
+2021-05-05 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/execute/20210505-1.c: New test.
+
+2021-05-05 Ivan Sorokin <vanyacpp@gmail.com>
+
+ PR target/91400
+ * gcc.target/i386/pr91400-1.c: New test.
+ * gcc.target/i386/pr91400-2.c: Likewise.
+
+2021-05-05 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/tree-ssa/builtin-sprintf-warn-26.c: New test.
+
+2021-05-05 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/100274
+ * gfortran.dg/argument_checking_25.f90: New test.
+
+2021-05-05 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/98218
+ * gcc.target/i386/pr98218-1.c: New test.
+ * gcc.target/i386/pr98218-1a.c: Ditto.
+ * gcc.target/i386/pr98218-2.c: Ditto.
+ * gcc.target/i386/pr98218-2a.c: Ditto.
+ * gcc.target/i386/pr98218-3.c: Ditto.
+ * gcc.target/i386/pr98218-3a.c: Ditto.
+ * gcc.dg/vect/vect-bool-cmp.c (dg-final):
+ Scan vect tree dump for "LOOP VECTORIZED", not VECTORIZED.
+
+2021-05-05 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/debug17.adb: Minor tweak.
+
+2021-05-05 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/debug8.adb: Minor tweak.
+ * gnat.dg/debug11.adb: Likewise.
+ * gnat.dg/debug16.adb: Likewise.
+ * gnat.dg/debug17.adb: New test.
+ * gnat.dg/specs/debug1.ads: Minor tweak.
+
+2021-05-05 Robin Dapp <rdapp@linux.ibm.com>
+
+ * gcc.dg/vect/slp-21.c: Add s390.
+
+2021-05-05 Tobias Burnus <tobias@codesourcery.com>
+
+ PR testsuite/100422
+ * g++.dg/gomp/clause-3.C: Use 'reduction(&:..)' instead of '...(&&:..)'.
+
+2021-05-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79333
+ * gcc.dg/tree-ssa/ssa-fre-94.c: New testcase.
+ * gcc.dg/graphite/fuse-1.c: Adjust.
+ * gcc.dg/pr43864-4.c: Likewise.
+
+2021-05-05 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/100394
+ * g++.dg/torture/pr100382.C: New testcase.
+
+2021-05-04 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/100307
+ * g++.dg/warn/Wplacement-new-size-9.C: New test.
+ * gcc.dg/tree-ssa/builtin-sprintf-warn-26.c: New test.
+
+2021-05-04 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/Wvla-parameter-3.c: Use unique strings in directive names.
+
+2021-05-04 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/Wvla-parameter-2.c: Use unique strings in directive names.
+
+2021-05-04 Robin Dapp <rdapp@linux.ibm.com>
+
+ * gcc.target/s390/oscbreak-1.c: Compile with -O1
+ -fschedule-insns
+
+2021-05-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100414
+ * gcc.dg/pr100414.c: New testcase.
+
+2021-05-04 Tobias Burnus <tobias@codesourcery.com>
+
+ * gcc.dg/gomp/clause-1.c: Use 'reduction(&:..)' instead of '...(&&:..)'.
+
+2021-05-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt94.adb: New file.
+ * gnat.dg/opt94_pkg.adb: New file.
+ * gnat.dg/opt94_pkg.ads: New file.
+
+2021-05-04 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ssa-dse-26.c: Skip on !lp64 targets,
+ simplify dump scanning down to one case.
+
+2021-05-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100329
+ * gcc.dg/torture/pr100329.c: New testcase.
+
+2021-05-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100398
+ * gcc.dg/torture/pr100398.c: New testcase.
+
+2021-05-03 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/aarch64/advsimd-intrinsics/vmla_float_not_fused.c:
+ Fix dg directives order.
+ * gcc.target/aarch64/advsimd-intrinsics/vmls_float_not_fused.c:
+ Likewise.
+
+2021-05-03 Jeff Law <jlaw@tachyum.com>
+
+ * gcc.dg/tree-ssa/ssa-dse-26.c: Fix expected output for nds32le
+ and m32r.
+
+2021-05-03 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100362
+ * g++.dg/cpp1y/lambda-generic-100362.C: New test.
+
+2021-05-03 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/68942
+ PR c++/100344
+ * g++.dg/template/call8.C: New test.
+ * g++.dg/template/koenig12a.C: New test.
+
+2021-05-03 Jeff Law <jlaw@tachyum.com>
+
+ * gcc.dg/tree-ssa/ssa-dse-26.c: Fix expected output for bfin and lm32.
+
+2021-05-03 Marek Polacek <polacek@redhat.com>
+
+ PR c++/100055
+ * g++.dg/concepts/diagnostic18.C: New test.
+
+2021-05-03 Marek Polacek <polacek@redhat.com>
+
+ DR 1312
+ * g++.dg/cpp0x/constexpr-cast2.C: Remove XFAILs.
+
+2021-05-03 Jeff Law <jlaw@tachyum.com>
+
+ * gcc.dg/tree-ssa/ssa-dse-26.c: Fix xstormy selector.
+
+2021-05-03 Jeff Law <jlaw@tachyum.com>
+
+ * gcc.dg/tree-ssa/ssa-dse-26.c: Update expected output for rx too.
+
+2021-05-03 Jeff Law <jlaw@tachyum.com>
+
+ * gcc.dg/tree-ssa/ssa-dse-26.c: Update expected output for or1k too.
+
+2021-05-03 Jeff Law <jlaw@tachyum.com>
+
+ * gcc.dg/tree-ssa/ssa-dse-26.c: Update expected output for
+ cr16 and xstormy16 targets.
+
+2021-05-03 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ssa-dse-42.c: New testcase.
+ * gcc.dg/pr81192.c: Disable DSE.
+
+2021-05-03 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ssa-dse-41.c: New testcase.
+
+2021-05-03 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ PR target/100217
+ * gcc.target/s390/vector/long-double-asm-in-out-hard-fp-reg.c: New test.
+ * gcc.target/s390/vector/long-double-asm-inout-hard-fp-reg.c: New test.
+
+2021-05-02 David Edelsohn <dje.gcc@gmail.com>
+
+ * g++.dg/ext/visibility/fvisibility-inlines-hidden-4.C: Expect [BS]
+ mapping class on AIX.
+ * gcc.c-torture/compile/pr61159.c: XFAIL on AIX.
+ * gcc.c-torture/execute/alias-2.c: Same.
+ * gcc.dg/alias-7.c: Same.
+
+2021-04-30 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/vmla_float_not_fused.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vmls_float_not_fused.c:
+ New test.
+
+2021-04-30 Richard Biener <rguenther@suse.de>
+
+ PR c++/98032
+ * g++.dg/pr98032.C: New testcase.
+
+2021-04-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/96513
+ * gcc.dg/torture/pr96513.c: New testcase.
+
+2021-04-30 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/98060
+ * gcc.target/i386/pr98060.c: New test.
+
+2021-04-30 Roman Zhuykov <zhroma@ispras.ru>
+
+ PR rtl-optimization/100225
+ PR rtl-optimization/84878
+ * gcc.dg/pr100225.c: New test.
+
+2021-04-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR preprocessor/82359
+ * g++.dg/cpp1y/digit-sep-line.C,
+ g++.dg/cpp1y/digit-sep-line-neg.C: New tests.
+
+2021-04-29 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/lookup/using-decl1.C: New test.
+
+2021-04-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/97974
+ * g++.old-deja/g++.law/union4.C: Add expected diagnostic.
+
+2021-04-29 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/68942
+ * g++.dg/template/koenig12.C: New test.
+
+2021-04-29 Marek Polacek <polacek@redhat.com>
+
+ PR c++/94102
+ * g++.dg/cpp1z/class-deduction87.C: New test.
+
+2021-04-29 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR rtl-optimization/100303
+ * g++.dg/torture/pr100303.C: New file.
+
+2021-04-29 H.J. Lu <hjl.tools@gmail.com>
+
+ PR middle-end/90773
+ * g++.dg/pr90773-1.h: New test.
+ * g++.dg/pr90773-1a.C: Likewise.
+ * g++.dg/pr90773-1b.C: Likewise.
+ * g++.dg/pr90773-1c.C: Likewise.
+ * g++.dg/pr90773-1d.C: Likewise.
+ * gcc.target/i386/pr90773-1.c: Likewise.
+ * gcc.target/i386/pr90773-2.c: Likewise.
+ * gcc.target/i386/pr90773-3.c: Likewise.
+ * gcc.target/i386/pr90773-4.c: Likewise.
+ * gcc.target/i386/pr90773-5.c: Likewise.
+ * gcc.target/i386/pr90773-6.c: Likewise.
+ * gcc.target/i386/pr90773-7.c: Likewise.
+ * gcc.target/i386/pr90773-8.c: Likewise.
+ * gcc.target/i386/pr90773-9.c: Likewise.
+ * gcc.target/i386/pr90773-10.c: Likewise.
+ * gcc.target/i386/pr90773-11.c: Likewise.
+ * gcc.target/i386/pr90773-12.c: Likewise.
+ * gcc.target/i386/pr90773-13.c: Likewise.
+ * gcc.target/i386/pr90773-14.c: Likewise.
+
+2021-04-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100253
+ * g++.dg/pr100253.C: New testcase.
+
+2021-04-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/100305
+ * gcc.c-torture/compile/pr100305.c: Remove dg-options. Add PR line.
+
+2021-04-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/100302
+ * gcc.target/aarch64/sve/pr100302.c: New test.
+
+2021-04-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/100319
+ * c-c++-common/gomp/task-detach-3.c: New test.
+
+2021-04-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99912
+ * gcc.dg/pr95580.c: Disable DSE.
+ * gcc.dg/Wrestrict-8.c: Place a use after each memcpy.
+ * c-c++-common/ubsan/overflow-negate-3.c: Make asms volatile
+ to prevent them from being removed.
+ * c-c++-common/ubsan/overflow-sub-4.c: Likewise.
+
+2021-04-29 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/100250
+ * gcc.dg/uninit-pr100250.c: New test.
+
+2021-04-29 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/c11-unproto-1.c, gcc.dg/c11-unproto-2.c,
+ gcc.dg/c2x-unproto-1.c, gcc.dg/c2x-unproto-2.c: New tests.
+
+2021-04-28 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/map-5.f90: New test.
+
+2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
+
+ * gcc.c-torture/execute/ieee/cdivchkd.c: New test.
+ * gcc.c-torture/execute/ieee/cdivchkf.c: Likewise.
+ * gcc.c-torture/execute/ieee/cdivchkld.c: Likewise.
+
+2021-04-28 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.target/i386/pr89676.c: Add -fomit-frame-pointer.
+
+2021-04-28 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.dg/debug/dwarf2/inline5.c: Adjust pattern to avoid
+ mismatch when asm comments start with "/ ".
+
+2021-04-28 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR target/100305
+ * gcc.c-torture/compile/pr100305.c: New test.
+
+2021-04-28 José Rui Faustino de Sousa <jrfsousa@gmail.com>
+
+ PR fortran/82376
+ * gfortran.dg/PR82376.f90: New test.
+
+2021-04-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100292
+ * gcc.dg/pr100292.c: New testcase.
+
+2021-04-28 Richard Wai <richard@annexi-strayline.com>
+
+ * gnat.dg/containers2.adb: New test.
+
+2021-04-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt93.ads, gnat.dg/opt93.adb: New test.
+
+2021-04-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/92145
+ * g++.dg/cpp0x/depr-copy3.C: New test.
+
+2021-04-27 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/88580
+ * g++.dg/cpp0x/variadic182.C: New test.
+
+2021-04-27 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR middle-end/100284
+ * gcc.target/aarch64/sve/pr81003.c: New test.
+
+2021-04-27 Martin Sebor <msebor@redhat.com>
+
+ PR testsuite/100272
+ * g++.dg/ext/flexary13.C: Remove malformed directives.
+
+2021-04-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR target/100106
+ * gcc.c-torture/compile/pr100106.c: New testcase.
+
+2021-04-27 Alex Coplan <alex.coplan@arm.com>
+
+ PR target/99977
+ * gcc.target/arm/pr99977.c: New test.
+
+2021-04-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/100239
+ * gcc.dg/pr100239.c: New test.
+
+2021-04-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/100254
+ * g++.dg/opt/pr100254.C: New test.
+
+2021-04-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99912
+ * gcc.dg/tree-ssa/ldist-33.c: Disable PRE and LIM.
+ * gcc.dg/tree-ssa/pr96789.c: Adjust dump file scanned.
+ * gcc.dg/tree-ssa/ssa-dse-28.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-dse-29.c: Likewise.
+
+2021-04-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/95527
+ * gcc.dg/tree-ssa/pr95527-2.c: New test.
+
+2021-04-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96696
+ * gcc.target/i386/pr96696.c: New test.
+
+2021-04-27 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR target/100270
+ * gcc.target/aarch64/sve/acle/general-c/pr100270_1.c: New test.
+ * gcc.target/aarch64/sve/acle/general-c/sizeless-2.c: Change
+ expected error message when subtracting pointers to different
+ vector types. Expect warnings when mixing them elsewhere.
+ * gcc.target/aarch64/sve/acle/general/attributes_7.c: Remove
+ XFAILs. Tweak error messages for some cases.
+
+2021-04-27 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/simd/ssra.c: Use +nosve
+ * gcc.target/aarch64/simd/usra.c: Likewise.
+
+2021-04-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100051
+ * gcc.dg/tree-ssa/ssa-fre-92.c: New testcase.
+
+2021-04-27 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/100272
+ * gcc.dg/tree-ssa/predcom-1.c: Re-enable PRE and fix
+ malformed dg directive.
+
+2021-04-27 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/100272
+ * g++.dg/diagnostic/ptrtomem1.C: Fix dg directives.
+ * g++.dg/ipa/pr45572-2.C: Likewise.
+ * g++.dg/template/spec26.C: Likewise.
+ * gcc.dg/pr20126.c: Likewise.
+ * gcc.dg/tree-ssa/pr20739.c: Likewise.
+
+2021-04-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100278
+ * gcc.dg/tree-ssa/pr100278.c: New testcase.
+
+2021-04-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99405
+ * gcc.target/i386/pr99405.c: New test.
+
+2021-04-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99776
+ * gcc.dg/tree-ssa/ssa-fre-91.c: New testcase.
+
+2021-04-26 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/100209
+ * g++.dg/cpp1y/constexpr-base1.C: New test.
+ * g++.dg/cpp1y/constexpr-ptrsub1.C: New test.
+
+2021-04-26 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/goacc/classify-serial.f95:
+ Use [Ww]arning in dg-bogus as FE diagnostic and default
+ diagnostic differ and the result depends on ENABLE_OFFLOAD.
+ * gfortran.dg/goacc/kernels-decompose-2.f95: Likewise.
+ * gfortran.dg/goacc/routine-module-mod-1.f90: Likewise.
+
+2021-04-26 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/goacc/classify-serial.f95:
+ Correct spelling in dg-bogus to match -Wopenacc-parallelism.
+ * gfortran.dg/goacc/kernels-decompose-2.f95: Likewise.
+ * gfortran.dg/goacc/routine-module-mod-1.f90: Likewise.
+
+2021-04-26 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99956
+ * gfortran.dg/pr99956.f: New testcase.
+
+2021-04-26 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/cmse/bitfield-1.c: Remove dg-do.
+ * gcc.target/arm/cmse/bitfield-2.c: Likewise.
+ * gcc.target/arm/cmse/bitfield-3.c: Likewise.
+ * gcc.target/arm/cmse/cmse-16.c: Likewise.
+ * gcc.target/arm/cmse/struct-1.c: Likewise.
+ * gcc.target/arm/cmse/cmse.exp: Set dg-do-what-default depending
+ on arm_cmse_hw.
+ * lib/target-supports.exp (check_effective_target_arm_cmse_hw):
+ New.
+
+2021-04-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr84877.c: XFAIL on SPARC as well.
+
+2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Tom de Vries <vries@codesourcery.com>
+ Julian Brown <julian@codesourcery.com>
+ Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ * c-c++-common/goacc/diag-parallelism-1.c: New.
+ * c-c++-common/goacc/acc-icf.c: Specify '-Wopenacc-parallelism',
+ and match diagnostics, as appropriate.
+ * c-c++-common/goacc/classify-kernels-unparallelized.c: Likewise.
+ * c-c++-common/goacc/classify-kernels.c: Likewise.
+ * c-c++-common/goacc/classify-parallel.c: Likewise.
+ * c-c++-common/goacc/classify-routine.c: Likewise.
+ * c-c++-common/goacc/classify-serial.c: Likewise.
+ * c-c++-common/goacc/kernels-decompose-1.c: Likewise.
+ * c-c++-common/goacc/kernels-decompose-2.c: Likewise.
+ * c-c++-common/goacc/parallel-dims-1.c: Likewise.
+ * c-c++-common/goacc/parallel-reduction.c: Likewise.
+ * c-c++-common/goacc/pr70688.c: Likewise.
+ * c-c++-common/goacc/routine-1.c: Likewise.
+ * c-c++-common/goacc/routine-level-of-parallelism-2.c: Likewise.
+ * c-c++-common/goacc/uninit-dim-clause.c: Likewise.
+ * gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
+ * gfortran.dg/goacc/classify-kernels.f95: Likewise.
+ * gfortran.dg/goacc/classify-parallel.f95: Likewise.
+ * gfortran.dg/goacc/classify-routine.f95: Likewise.
+ * gfortran.dg/goacc/classify-serial.f95: Likewise.
+ * gfortran.dg/goacc/kernels-decompose-1.f95: Likewise.
+ * gfortran.dg/goacc/kernels-decompose-2.f95: Likewise.
+ * gfortran.dg/goacc/parallel-tree.f95: Likewise.
+ * gfortran.dg/goacc/routine-4.f90: Likewise.
+ * gfortran.dg/goacc/routine-level-of-parallelism-1.f90: Likewise.
+ * gfortran.dg/goacc/routine-module-mod-1.f90: Likewise.
+ * gfortran.dg/goacc/routine-multiple-directives-1.f90: Likewise.
+ * gfortran.dg/goacc/uninit-dim-clause.f95: Likewise.
+
+2021-04-26 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99473
+ * gcc.dg/tree-ssa/pr99473-1.c: New testcase.
+
+2021-04-25 liuhongt <hongtao.liu@intel.com>
+
+ PR target/98911
+ * gcc.target/i386/pr98911.c: New test.
+ * gcc.target/i386/funcspec-8.c: Replace __builtin_ia32_pcmpgtq
+ with __builtin_ia32_pcmpistrm128 since it has been folded.
+
+2021-04-24 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/100244
+ * g++.dg/analyzer/pr100244.C: New test.
+
+2021-04-24 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/100154
+ * gfortran.dg/pr100154.f90: New test.
+
+2021-04-24 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/100218
+ * gfortran.dg/ptr-func-4.f90: New test.
+
+2021-04-24 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/guality/example.c: Update aarch64*-*-* xfails.
+ * gcc.dg/guality/guality.c: Likewise.
+ * gcc.dg/guality/inline-params.c: Likewise.
+ * gcc.dg/guality/loop-1.c: Likewise.
+ * gcc.dg/guality/pr36728-1.c: Likewise.
+ * gcc.dg/guality/pr36728-2.c: Likewise.
+ * gcc.dg/guality/pr36728-3.c: Likewise.
+ * gcc.dg/guality/pr41447-1.c: Likewise.
+ * gcc.dg/guality/pr54200.c: Likewise.
+ * gcc.dg/guality/pr54519-1.c: Likewise.
+ * gcc.dg/guality/pr54519-2.c: Likewise.
+ * gcc.dg/guality/pr54519-3.c: Likewise.
+ * gcc.dg/guality/pr54519-4.c: Likewise.
+ * gcc.dg/guality/pr54519-5.c: Likewise.
+ * gcc.dg/guality/pr54519-6.c: Likewise.
+ * gcc.dg/guality/pr54693-2.c: Likewise.
+ * gcc.dg/guality/pr56154-1.c: Likewise.
+ * gcc.dg/guality/pr59776.c: Likewise.
+ * gcc.dg/guality/pr68860-1.c: Likewise.
+ * gcc.dg/guality/pr68860-2.c: Likewise.
+ * gcc.dg/guality/pr90074.c: Likewise.
+ * gcc.dg/guality/pr90716.c: Likewise.
+ * gcc.dg/guality/sra-1.c: Likewise.
+
+2021-04-24 Richard Sandiford <richard.sandiford@arm.com>
+
+ * lib/target-supports-dg.exp (selector_expression): Handle any-opts
+ and no-opts.
+ * gcc.dg/guality/pr41353-1.c: Exclude -O0 from xfail.
+ * gcc.dg/guality/pr59776.c: Likewise.
+ * gcc.dg/guality/pr54970.c: Likewise -O0 and -Og.
+
+2021-04-24 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/89565
+ PR c++/93383
+ PR c++/95291
+ PR c++/99200
+ PR c++/99683
+ * g++.dg/cpp2a/nontype-class39.C: Remove dg-ice directive.
+ * g++.dg/cpp2a/nontype-class45.C: New test.
+ * g++.dg/cpp2a/nontype-class46.C: New test.
+ * g++.dg/cpp2a/nontype-class47.C: New test.
+ * g++.dg/cpp2a/nontype-class48.C: New test.
+
+2021-04-24 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/87709
+ * g++.dg/cpp1z/class-deduction86.C: New test.
+
+2021-04-23 Michael Meissner <meissner@linux.ibm.com>
+
+ PR target/98952
+ * gcc.target/powerpc/pr98952.c: New test.
+
+2021-04-23 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100041
+ * gcc.target/i386/pr79514.c (dg-error):
+ Expect error for 64bit targets.
+
+2021-04-23 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100182
+ * gcc.target/i386/pr100182.c: New test.
+ * gcc.target/i386/pr71245-1.c (dg-final): Xfail scan-assembler-not.
+ * gcc.target/i386/pr71245-2.c (dg-final): Ditto.
+
+2021-04-23 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/98767
+ * g++.dg/concepts/diagnostic17.C: New test.
+
+2021-04-23 Patrick Palka <ppalka@redhat.com>
+
+ DR 2374
+ * g++.dg/cpp1z/direct-enum-init2.C: New test.
+
+2021-04-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99971
+ * g++.dg/vect/slp-pr99971.cc: New testcase.
+
+2021-04-23 liuhongt <hongtao.liu@intel.com>
+
+ PR target/100093
+ * gcc.target/i386/pr100093.c: New test.
+
+2021-04-22 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/94508
+ * g++.dg/cpp2a/concepts-uneval3.C: New test.
+
+2021-04-22 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/77435
+ * g++.dg/template/partial-specialization9.C: New test.
+
+2021-04-22 Marek Polacek <polacek@redhat.com>
+
+ PR c++/100161
+ * g++.dg/warn/Wtype-limits6.C: New test.
+
+2021-04-22 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/84689
+ * g++.dg/cpp0x/sfinae67.C: New test.
+
+2021-04-22 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/16617
+ * g++.dg/template/access36.C: New test.
+
+2021-04-22 Tobias Burnus <tobias@codesourcery.com>
+
+ * substr_9.f90: Move to ...
+ * gfortran.dg/substr_9.f90: ... here.
+ * substr_10.f90: Move to ...
+ * gfortran.dg/substr_10.f90: ... here.
+
+2021-04-22 Martin Liska <mliska@suse.cz>
+
+ PR testsuite/100159
+ PR testsuite/100192
+ * g++.dg/template/nontype29.C: Fix typos and missing comments.
+ * gcc.dg/Warray-bounds-64.c: Likewise.
+ * gcc.dg/Warray-parameter.c: Likewise.
+ * gcc.dg/Wstring-compare.c: Likewise.
+ * gcc.dg/format/gcc_diag-11.c: Likewise.
+ * gfortran.dg/array_constructor_3.f90: Likewise.
+ * gfortran.dg/matmul_bounds_9.f90: Likewise.
+ * gfortran.dg/pr78033.f90: Likewise.
+ * gfortran.dg/pr96325.f90: Likewise.
+
+2021-04-22 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/100119
+ * gcc.target/i386/pr100119.c: New test.
+
+2021-04-22 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/99988
+ * gcc.target/aarch64/pr99988.c: Skip if not lp64 target.
+
+2021-04-22 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/set_vm_limit.c (set_vm_limit): Call getrlimit, use
+ obtained hard limit, and only call setrlimit if new softlimit is lower.
+
+2021-04-22 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/100176
+ * objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c: Add
+ missing return.
+
+2021-04-21 David Edelsohn <dje.gcc@gmail.com>
+
+ * gfortran.dg/bind_c_array_params_2.f90: Look for AIX-specific call
+ pattern.
+
+2021-04-21 Marek Polacek <polacek@redhat.com>
+
+ PR c++/96380
+ * g++.dg/cpp0x/enum_base4.C: New test.
+ * g++.dg/cpp0x/enum_base5.C: New test.
+
+2021-04-21 Alex Coplan <alex.coplan@arm.com>
+
+ PR target/99988
+ * gcc.target/aarch64/pr99988.c: New test.
+
+2021-04-21 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/cpp1z/constexpr-lambda26.C: Add dg-additional-options
+ -fchecking.
+ * g++.dg/cpp1y/auto-fn61.C: Likewise.
+ * g++.dg/cpp2a/nontype-class39.C: Likewise.
+ * g++.dg/cpp0x/constexpr-52830.C: Likewise.
+ * g++.dg/cpp0x/vt-88982.C: Likewise.
+ * c-c++-common/goacc/kernels-decompose-ice-1.c: Add -fchecking to
+ dg-additional-options.
+ * c-c++-common/goacc/kernels-decompose-ice-2.c: Likewise.
+
+2021-04-21 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/monitor-2.c: New test.
+
+2021-04-21 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/100176
+ * g++.dg/compat/struct-layout-1_generate.c: Add missing return.
+ * gcc.dg/compat/struct-layout-1_generate.c: Likewise.
+
+2021-04-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/100148
+ * g++.dg/opt/pr100148.C: New test.
+
+2021-04-21 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/depobj-1.f90: New test.
+ * gfortran.dg/gomp/depobj-2.f90: New test.
+
+2021-04-21 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * gcc.dg/vect/pr71264.c: Xfail on IBM Z due to V4QImode support.
+
+2021-04-21 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR middle-end/100130
+ * c-c++-common/attr-retain-10.c: New test.
+ * c-c++-common/attr-retain-11.c: Likewise.
+
+2021-04-21 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * gcc.dg/vect/bb-slp-39.c: Change number of times the pattern
+ must match for target IBM Z only.
+
+2021-04-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/100109
+ * g++.dg/cpp0x/lambda/lambda-variadic14.C: New test.
+
+2021-04-20 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * gcc.target/s390/zero-scratch-regs-1.c: Force test to run for
+ z/Architecture only.
+
+2021-04-20 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/100110
+ * gfortran.dg/pdt_31.f03: New test.
+ * gfortran.dg/pdt_26.f03: Reduce 'builtin_malloc' count from 9
+ to 8.
+
+2021-04-19 Marek Polacek <polacek@redhat.com>
+
+ PR c++/97536
+ * g++.dg/concepts/diagnostic16.C: New test.
+
+2021-04-19 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/98457
+ * gdc.dg/pr98457.d: New test.
+
+2021-04-19 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/100075
+ * gcc.target/aarch64/pr100075.c: Add aarch64_little_endian
+ effective target.
+
+2021-04-19 Richard Biener <rguenther@suse.de>
+
+ PR preprocessor/100142
+ * gcc.dg/pr100142.c: New testcase.
+ * g++.dg/diagnostic/pr72803.C: Revert last change.
+
+2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-c++-common/goacc/if-clause-2.c: '-fopenacc-kernels=[...]' ->
+ '--param=openacc-kernels=[...]'.
+ * c-c++-common/goacc/kernels-decompose-1.c: Likewise.
+ * c-c++-common/goacc/kernels-decompose-2.c: Likewise.
+ * c-c++-common/goacc/kernels-decompose-ice-1.c: Likewise.
+ * c-c++-common/goacc/kernels-decompose-ice-2.c: Likewise.
+ * gfortran.dg/goacc/kernels-decompose-1.f95: Likewise.
+ * gfortran.dg/goacc/kernels-decompose-2.f95: Likewise.
+ * gfortran.dg/goacc/kernels-tree.f95: Likewise.
+
+2021-04-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt92.adb: New test.
+
+2021-04-17 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * c-c++-common/zero-scratch-regs-8.c: Enable on s390*.
+ * c-c++-common/zero-scratch-regs-9.c: Likewise.
+ * c-c++-common/zero-scratch-regs-10.c: Likewise.
+ * c-c++-common/zero-scratch-regs-11.c: Likewise.
+ * gcc.target/s390/zero-scratch-regs-1.c: New test.
+
+2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
+
+ PR fortran/100094
+ * gfortran.dg/PR100094.f90: New test.
+
+2021-04-16 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/96770
+ * gcc.target/arm/pure-code/pr96770.c: Fix scan-assembler-times
+ with movt/movw.
+
+2021-04-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/91710
+ * gcc.target/aarch64/pr91710.c: New test.
+
+2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
+
+ PR fortran/100018
+ * gfortran.dg/PR10018.f90: New test.
+
+2021-04-16 Tamar Christina <tamar.christina@arm.com>
+
+ PR target/100048
+ * gcc.target/aarch64/sve/pr100048.c: New test.
+
+2021-04-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/100111
+ * g++.dg/cpp0x/constexpr-100111.C: New test.
+
+2021-04-16 Marek Polacek <polacek@redhat.com>
+
+ PR c++/99803
+ * g++.dg/cpp2a/typename14.C: Don't expect particular error
+ messages.
+ * g++.dg/cpp2a/typename19.C: New test.
+
+2021-04-16 Robin Dapp <rdapp@linux.ibm.com>
+
+ * gcc.dg/gimplefe-40.c: Moved to...
+ * gcc.dg/vect/gimplefe-40.c: ...here.
+ * gcc.dg/gimplefe-41.c: Moved to...
+ * gcc.dg/vect/gimplefe-41.c: ...here.
+
+2021-04-16 Harald Anlauf <anlauf@gmx.de>
+ Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/63797
+ * gfortran.dg/pr63797.f90: New test.
+
+2021-04-16 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * gcc.dg/tree-ssa/pr83403-1.c: Revert
+ max-completely-peeled-insns to the default value on IBM Z.
+ * gcc.dg/tree-ssa/pr83403-2.c: Likewise.
+
+2021-04-16 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99700
+ * g++.dg/cpp2a/constexpr-init21.C: New test.
+
+2021-04-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/100075
+ * gcc.target/aarch64/pr100075.c: New test.
+
+2021-04-16 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR rtl-optimization/99596
+ * gcc.target/arm/pr99596.c: New test.
+
+2021-04-16 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/100067
+ * g++.target/arm/arm.exp (dg_runtest_extra_prunes): Update prune
+ template.
+ * gcc.target/arm/arm.exp (dg_runtest_extra_prunes): Likewise.
+ * g++.target/arm/mve.exp (dg_runtest_extra_prunes): Likewise. Fix
+ missing quotes around switch names.
+ * gcc.target/arm/mve/mve.exp: (dg_runtest_extra_prunes): Likewise.
+
+2021-04-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99767
+ * gcc.target/aarch64/pr99767.c: New test.
+
+2021-04-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99850
+ * g++.dg/cpp23/lambda-specifiers2.C: New test.
+
+2021-04-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99833
+ * g++.dg/cpp1z/pr99833.C: New test.
+ * g++.dg/cpp2a/pr99833.C: New test.
+
+2021-04-16 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * gcc.dg/unroll-and-jam.c: Revert max-completely-peel-times to
+ the default value on IBM Z.
+
+2021-04-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/100079
+ * g++.dg/abi/mangle71.C: Fix expected mangling.
+ * g++.dg/abi/mangle77.C: New test.
+ * g++.dg/cpp2a/nontype-class-union1.C: Likewise.
+ * g++.dg/cpp2a/nontype-class-equiv1.C: Removed.
+ * g++.dg/cpp2a/nontype-class44.C: New test.
+
+2021-04-15 Martin Sebor <msebor@redhat.com>
+
+ PR c/99420
+ PR c/99972
+ * gcc.dg/Warray-parameter-9.c: New test.
+ * gcc.dg/Wnonnull-6.c: New test.
+ * gcc.dg/Wreturn-type3.c: New test.
+ * gcc.dg/Wunused-result.c: New test.
+ * gcc.dg/attr-noreturn.c: New test.
+ * gcc.dg/attr-returns-nonnull.c: New test.
+
+2021-04-15 Hans-Peter Nilsson <hp@axis.com>
+
+ PR middle-end/84877
+ * gcc.dg/pr84877.c: Xfail for cris-*-*.
+
+2021-04-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/80456
+ * g++.dg/cpp0x/constexpr-volatile3.C: New test.
+
+2021-04-15 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/uninit-pr89230-1.c: New test.
+ * gcc.dg/uninit-pr89230-2.c: Same.
+
+2021-04-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/100101
+ * g++.dg/cpp0x/noexcept67.C: New test.
+
+2021-04-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/100091
+ * g++.dg/cpp2a/lambda-uneval15.C: New test.
+
+2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
+
+ * g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp: Add
+ -mtune=generic to the SVE flags.
+ * g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp: Likewise.
+ * gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp: Likewise.
+ * gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp: Likewise.
+
+2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
+
+ * lib/gcc-defs.exp (aarch64-arch-dg-options): New procedure.
+ (aarch64-with-arch-dg-options): Likewise.
+ * g++.target/aarch64/sve/aarch64-sve.exp: Run the tests inside
+ aarch64-with-arch-dg-options. Move the default architecture
+ flags to the final dg-runtest argument.
+ * gcc.target/aarch64/sve/aarch64-sve.exp: Likewise. Dispense with
+ DEFAULT_CFLAGS.
+ * gcc.target/aarch64/sve2/aarch64-sve2.exp: Likewise.
+
+2021-04-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/100073
+ * gcc.dg/pr86058.c: Enable also on i?86-*-*.
+
+2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR c++/98852
+ * g++.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp: New file.
+ * g++.target/aarch64/advsimd-intrinsics/pr98852.C: New file.
+
+2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR c/98852
+ * gcc.target/aarch64/advsimd-intrinsics/pr98852.c: New test.
+
+2021-04-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/100056
+ * gcc.target/aarch64/pr100056.c: New test.
+
+2021-04-15 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * gcc.dg/pr93210.c: Adapt regex in order to also support a
+ RESULT_DECL as an operand for a RETURN_EXPR.
+
+2021-04-14 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/pr99929_1.c: New file.
+ * gcc.target/aarch64/sve/pr99929_2.c: Likewise.
+
+2021-04-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/100078
+ * g++.dg/template/dependent-tmpl2.C: New test.
+
+2021-04-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/93314
+ * g++.dg/parse/uneval1.C: New test.
+
+2021-04-14 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/100066
+ * gcc.target/i386/pr100066.c: New.
+
+2021-04-14 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/pr86058.c: Limit to just x86_64.
+
+2021-04-14 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR target/99246
+ * gcc.target/aarch64/sve/acle/general/pr99246.c: New test.
+
+2021-04-14 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * gcc.target/s390/zvector/imm-range-error-1.c: New test.
+ * gcc.target/s390/zvector/vec_msum_u128-1.c: New test.
+
+2021-04-14 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/83476
+ PR c++/99885
+ * g++.dg/cpp1z/class-deduction85.C: New test.
+ * g++.dg/template/ref11.C: New test.
+
+2021-04-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/99478
+ * g++.dg/cpp2a/lambda-uneval14.C: New test.
+
+2021-04-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/90674
+ * g++.dg/debug/defaulted1.C: New test.
+
+2021-04-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/88742
+ * g++.dg/debug/cleanup1.C: New test.
+ * c-c++-common/Wimplicit-fallthrough-6.c: Adjust diagnostic line.
+ * c-c++-common/Wimplicit-fallthrough-7.c: Likewise.
+ * g++.dg/cpp2a/constexpr-dtor3.C: Likewise.
+ * g++.dg/ext/constexpr-attr-cleanup1.C: Likewise.
+ * g++.dg/tm/inherit2.C: Likewise.
+ * g++.dg/tm/unsafe1.C: Likewise.
+ * g++.dg/warn/Wimplicit-fallthrough-1.C: Likewise.
+ * g++.dg/gcov/gcov-2.C: Adjust coverage counts.
+
+2021-04-13 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/82800
+ * g++.dg/warn/uninit-pr82800.C: New test.
+
+2021-04-13 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/86058
+ * gcc.dg/pr86058.c: New test.
+
+2021-04-13 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99008
+ * g++.old-deja/g++.ns/crash3.C: Adjust expected diagnostic.
+ * g++.old-deja/g++.ns/template7.C: Likewise.
+ * g++.old-deja/g++.pt/crash8.C: Likewise.
+
+2021-04-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/100032
+ * g++.dg/cpp0x/alias-decl-equiv1.C: New test.
+
+2021-04-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/97121
+ * g++.dg/cpp2a/spaceship-err6.C: New test.
+
+2021-04-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/100054
+ * g++.dg/cpp1y/lambda-generic-local-class1.C: New test.
+
+2021-04-13 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99008
+ * g++.dg/parse/template2.C: Adjust expected diagnostic.
+ * g++.dg/template/error8.C: Likewise.
+ * g++.dg/cpp1z/class-deduction84.C: New test.
+
+2021-04-13 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/100053
+ * gcc.dg/torture/pr100053.c: New testcase.
+ * gcc.dg/tree-ssa/ssa-fre-93.c: Likewise.
+
+2021-04-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/91933
+ * g++.dg/cpp0x/constexpr-base7.C: New test.
+
+2021-04-13 Nathan Sidwell <nathan@acm.org>
+
+ PR preprocessor/99446
+ * g++.dg/diagnostic/pr72803.C: Adjust expected column.
+
+2021-04-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/100028
+ * gcc.target/aarch64/pr100028.c: New test.
+
+2021-04-13 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/97134
+ * g++.dg/cpp2a/nontype-class43.C: New test.
+
+2021-04-13 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99961
+ PR c++/99994
+ * g++.dg/cpp2a/concepts-uneval1.C: New test.
+ * g++.dg/cpp2a/concepts-uneval2.C: New test.
+
+2021-04-13 Hans-Peter Nilsson <hp@axis.com>
+
+ PR analyzer/99212
+ * gcc.dg/analyzer/data-model-1.c (test_45): Inverse xfail at
+ line 971 for cris-*-*.
+
+2021-04-13 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/98599
+ * gcc.dg/analyzer/pr98599-a.c: New test.
+ * gcc.dg/analyzer/pr98599-b.c: New test.
+
+2021-04-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/99905
+ * gcc.target/i386/pr99905.c: New test.
+
+2021-04-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/99830
+ * gcc.dg/pr99830.c: New test.
+
+2021-04-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/93085
+ * g++.dg/template/dependent-tmpl1.C: New test.
+
+2021-04-12 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/99877
+ * g++.dg/asan/pr99877.C: New test.
+
+2021-04-12 Cui,Lili <lili.cui@intel.com>
+
+ * gcc.target/i386/funcspec-56.inc: Handle new march.
+ * g++.target/i386/mv16.C: Handle new march
+
+2021-04-11 Hafiz Abid Qadeer <abidh@codesourcery.com>
+
+ PR middle-end/98088
+ * c-c++-common/goacc/collapse-2.c: New.
+
+2021-04-11 Jason Merrill <jason@redhat.com>
+
+ PR c++/97974
+ * g++.dg/lookup/pr84962.C: Adjust diagnostic.
+ * g++.dg/other/anon-union5.C: New test.
+
+2021-04-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/98800
+ * g++.dg/gomp/this-1.C: Adjust diagnostic.
+ * g++.dg/cpp0x/constexpr-this1.C: New test.
+
+2021-04-10 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/100011
+ * gcc.dg/analyzer/pr100011.c: New test.
+
+2021-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/99990
+ * gcc.dg/pr99990.c: New test.
+
+2021-04-10 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/99744
+ * gcc.target/i386/pr99744-2.c: New test.
+
+2021-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR lto/99849
+ * gcc.dg/lto/pr99849_0.c: New test.
+
+2021-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/98601
+ * gcc.dg/torture/pr98601.c: New test.
+
+2021-04-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/99180
+ PR c++/93295
+ PR c++/93867
+ PR c++/95486
+ * g++.dg/cpp2a/class-deduction-alias5.C: New test.
+ * g++.dg/cpp2a/class-deduction-alias6.C: New test.
+ * g++.dg/cpp2a/class-deduction-alias7.C: New test.
+ * g++.dg/cpp2a/class-deduction-alias8.C: New test.
+
+2021-04-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/100006
+ * g++.dg/cpp0x/lambda/lambda-variadic13.C: New test.
+
+2021-04-09 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/55288
+ * g++.dg/warn/uninit-pr55288.C: New test.
+
+2021-04-09 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/90215
+ * g++.dg/cpp1z/fold-lambda4.C: New test.
+
+2021-04-09 Marek Polacek <polacek@redhat.com>
+
+ PR c++/99806
+ * g++.dg/concepts/abbrev10.C: New test.
+ * g++.dg/concepts/abbrev11.C: New test.
+
+2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/pr70398.c: Require a target that can link
+ static executables.
+
+2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
+
+ * g++.target/aarch64/bfloat_cpp_typecheck.C: Remove XFAILs.
+
+2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gfortran.dg/vect/vect-8.f90: Expect 24 loops to be vectorized
+ with SVE.
+
+2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
+
+ * g++.dg/tree-ssa/pr83518.C: XFAIL for vect_variable_length.
+ * gcc.dg/pr96573.c: Likewise.
+ * gcc.dg/tree-ssa/pr84512.c: Likewise.
+ * gcc.dg/vect/bb-slp-43.c: Likewise.
+ * gcc.dg/vect/slp-reduc-11.c: Likewise.
+
+2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/vect/pr65947-7.c: Add a noipa attribute. Expect the
+ loop to vectorized if vect_fold_extract_last.
+
+2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/mem-shift-canonical.c: Use an asm instead
+ of relying on vectorisation.
+
+2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR target/87763
+ * gcc.target/aarch64/insv_1.c: XFAIL two scan tests.
+
+2021-04-09 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR libfortran/78314
+ * gfortran.dg/ieee/ieee_6.f90: Skip for arm* and aarch64*.
+ * gfortran.dg/ieee/ieee_8.f90: Likewise.
+
+2021-04-09 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/99817
+ * gfortran.dg/coarray/dummy_2.f90: New test.
+
+2021-04-08 David Edelsohn <dje.gcc@gmail.com>
+
+ * g++.dg/gomp/tls-5.C: Expect tbss failure on AIX.
+
+2021-04-08 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99874
+ * g++.dg/cpp2a/concepts-lambda16.C: New test.
+ * g++.dg/cpp2a/concepts-lambda17.C: New test.
+
+2021-04-08 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/97679
+ * g++.dg/cpp2a/concepts-ctad3.C: New test.
+
+2021-04-08 Richard Sandiford <richard.sandiford@arm.com>
+
+ * lib/scanasm.exp (scan-lto-assembler): Update expected name
+ of dump file.
+
+2021-04-08 Richard Sandiford <richard.sandiford@arm.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_stdint_types_mbig_endian): New proc.
+ * gcc.target/aarch64/advsimd-intrinsics/bf16_get-be.c: Require
+ stdint_types_mbig_endian.
+ * gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c: Likewise.
+
+2021-04-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/91849
+ * g++.dg/conversion/pr66211.C: Adjust diagnostic.
+ * g++.dg/conversion/ref7.C: New test.
+
+2021-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99859
+ * g++.dg/cpp1y/constexpr-99859-1.C: New test.
+ * g++.dg/cpp1y/constexpr-99859-2.C: New test.
+ * g++.dg/cpp2a/constexpr-new18.C: New test.
+ * g++.dg/cpp2a/constexpr-new19.C: New test.
+
+2021-04-08 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/vect/pr99102.c: Add -fdump-tree-vect-details.
+
+2021-04-08 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/acle/general-c/func_redef_1.c: Remove
+ "was here" from error message.
+ * gcc.target/aarch64/sve/acle/general-c/func_redef_2.c: Likewise.
+ * gcc.target/aarch64/sve/acle/general-c/func_redef_3.c: Likewise.
+ * gcc.target/aarch64/sve/acle/general-c/func_redef_6.c: Likewise.
+ * gcc.target/aarch64/sve/acle/general-c/type_redef_1.c: Likewise.
+ * gcc.target/aarch64/sve/acle/general-c/type_redef_2.c: Likewise.
+ * gcc.target/aarch64/sve/acle/general-c/type_redef_3.c: Likewise.
+ * gcc.target/aarch64/sve/acle/general-c/type_redef_4.c: Likewise.
+ * gcc.target/aarch64/sve/acle/general-c/type_redef_5.c: Likewise.
+ * gcc.target/aarch64/sve/acle/general-c/type_redef_6.c: Likewise.
+ * gcc.target/aarch64/sve/acle/general-c/type_redef_8.c: Likewise.
+ * gcc.target/aarch64/sve/acle/general-c/type_redef_9.c: Likewise.
+ * gcc.target/aarch64/sve/acle/general-c/type_redef_10.c: Likewise.
+ * gcc.target/aarch64/sve/acle/general-c/type_redef_13.c: Likewise.
+
+2021-04-08 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/asimd-mull-elem.c: Add +nosve.
+ * gcc.target/aarch64/pr98772.c: Likewise.
+ * gcc.target/aarch64/simd/vect_su_add_sub.c: Likewise.
+
+2021-04-08 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/mul_2.c: Adjust negative constants to avoid
+ conversion to shifts and adds.
+
+2021-04-08 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/99042
+ PR analyzer/99774
+ * gcc.dg/analyzer/pr99042.c: New test.
+ * gcc.dg/analyzer/pr99774-1.c: New test.
+ * gcc.dg/analyzer/pr99774-2.c: New test.
+
+2021-04-08 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * gdc.dg/gdc108.d: Update test.
+ * gdc.dg/gdc142.d: Likewise.
+ * gdc.dg/pr90136a.d: Likewise.
+ * gdc.dg/pr90136b.d: Likewise.
+ * gdc.dg/pr90136c.d: Likewise.
+ * gdc.dg/pr95173.d: Likewise.
+ * gdc.dg/attr_allocsize1.d: New test.
+ * gdc.dg/attr_allocsize2.d: New test.
+ * gdc.dg/attr_alwaysinline1.d: New test.
+ * gdc.dg/attr_cold1.d: New test.
+ * gdc.dg/attr_exclusions1.d: New test.
+ * gdc.dg/attr_exclusions2.d: New test.
+ * gdc.dg/attr_flatten1.d: New test.
+ * gdc.dg/attr_module.d: New test.
+ * gdc.dg/attr_noclone1.d: New test.
+ * gdc.dg/attr_noicf1.d: New test.
+ * gdc.dg/attr_noinline1.d: New test.
+ * gdc.dg/attr_noipa1.d: New test.
+ * gdc.dg/attr_noplt1.d: New test.
+ * gdc.dg/attr_optimize1.d: New test.
+ * gdc.dg/attr_optimize2.d: New test.
+ * gdc.dg/attr_optimize3.d: New test.
+ * gdc.dg/attr_optimize4.d: New test.
+ * gdc.dg/attr_restrict1.d: New test.
+ * gdc.dg/attr_section1.d: New test.
+ * gdc.dg/attr_symver1.d: New test.
+ * gdc.dg/attr_target1.d: New test.
+ * gdc.dg/attr_targetclones1.d: New test.
+ * gdc.dg/attr_used1.d: New test.
+ * gdc.dg/attr_used2.d: New test.
+ * gdc.dg/attr_weak1.d: New test.
+ * gdc.dg/imports/attributes.d: New test.
+
+2021-04-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/94529
+ * g++.dg/template/mem-spec2.C: New test.
+
+2021-04-08 Marek Polacek <polacek@redhat.com>
+
+ PR c++/99844
+ * g++.dg/cpp2a/explicit16.C: Use c++20.
+ * g++.dg/cpp0x/noexcept66.C: New test.
+ * g++.dg/cpp2a/explicit17.C: New test.
+
+2021-04-08 Alex Coplan <alex.coplan@arm.com>
+
+ PR target/99647
+ * gcc.c-torture/compile/pr99647.c: New test.
+
+2021-04-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/41723
+ * g++.dg/template/friend71.C: New test.
+
+2021-04-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/52625
+ * g++.dg/template/friend70.C: New test.
+
+2021-04-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/92918
+ * g++.dg/lookup/using66.C: New test.
+
+2021-04-07 Richard Sandiford <richard.sandiford@arm.com>
+
+ * lib/gcc.exp (gcc_target_compile): Add -dumpbase ""
+ when building an executable with testglue.
+
+2021-04-07 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/pr88834.c: Expect the vectorizer to use SLP.
+ * gcc.target/aarch64/sve/pr88834_ld3.c: New test.
+
+2021-04-07 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/vect/slp-21.c: Only expect 2 of the loops to use SLP
+ if IFN_STORE_LANES is available.
+ * gcc.dg/vect/vect-complex-5.c: Expect no loops to use SLP if
+ IFN_STORE_LANES is available.
+ * gcc.target/aarch64/pr99873_1.c: New test.
+ * gcc.target/aarch64/pr99873_2.c: Likewise.
+ * gcc.target/aarch64/pr99873_3.c: Likewise.
+ * gcc.target/aarch64/sve/pr99873_1.c: Likewise.
+ * gcc.target/aarch64/sve/pr99873_2.c: Likewise.
+ * gcc.target/aarch64/sve/pr99873_3.c: Likewise.
+
+2021-04-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99954
+ * gcc.dg/torture/pr99954.c: New testcase.
+
+2021-04-07 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/99955
+ * gcc.c-torture/execute/pr92618.c: Move may_alias attributes
+ last.
+
+2021-04-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99947
+ * gcc.dg/torture/pr99947.c: New testcase.
+
+2021-04-07 Bin Cheng <bin.cheng@linux.alibaba.com>
+
+ PR tree-optimization/98736
+ * gcc.c-torture/execute/pr98736.c: New test.
+
+2021-04-07 Marek Polacek <polacek@redhat.com>
+
+ PR c++/52202
+ * g++.dg/cpp0x/rv-life.C: New test.
+
+2021-04-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/96673
+ * g++.dg/cpp1y/nsdmi-aggr13.C: New test.
+
+2021-04-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/99901
+ * g++.dg/cpp1z/inline-var9.C: New test.
+
+2021-04-06 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR target/99781
+ * g++.target/aarch64/sve/pr99781.C: New.
+
+2021-04-06 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/memcpy-strategy-9.c: New test.
+ * gcc.target/i386/memcpy-strategy-10.c: Likewise.
+ * gcc.target/i386/memcpy-strategy-11.c: Likewise.
+ * gcc.target/i386/memset-strategy-7.c: Likewise.
+ * gcc.target/i386/memset-strategy-8.c: Likewise.
+ * gcc.target/i386/memset-strategy-9.c: Likewise.
+
+2021-04-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99880
+ * gcc.dg/torture/pr99880.c: New testcase.
+
+2021-04-06 Nathan Sidwell <nathan@acm.org>
+
+ * g++.dg/modules/builtin-3_a.C: Remove dump scans.
+ * g++.dg/modules/builtin-3_b.C: Remove dump scans.
+
+2021-04-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96573
+ * gcc.dg/pr96573.c: Instead of __builtin_bswap accept also
+ VEC_PERM_EXPR with bswapping permutation.
+
+2021-04-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99924
+ * gfortran.dg/vect/pr99924.f90: New testcase.
+
+2021-04-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/97900
+ * g++.dg/ext/vector40.C: Add -Wno-psabi -w to dg-options.
+
+2021-04-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/91241
+ * g++.dg/abi/lambda-defarg1.C: New test.
+
+2021-04-06 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99899
+ * g++.dg/cpp2a/concepts-placeholder7.C: New test.
+ * g++.dg/cpp2a/concepts-placeholder8.C: New test.
+
+2021-04-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/96311
+ * g++.dg/cpp1y/lambda-generic-Wunused.C: New test.
+
+2021-04-05 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/rv-cast6.C: Expect reinterpret_cast error.
+ * g++.dg/cpp0x/reinterpret_cast2.C: Adjust message.
+ * g++.old-deja/g++.jason/rvalue3.C: Likewise.
+
+2021-04-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/95317
+ * g++.dg/cpp1y/lambda-generic-enum1.C: New test.
+
+2021-04-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/95870
+ * g++.dg/cpp0x/lambda/lambda-nsdmi10.C: New test.
+
+2021-04-05 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/99906
+ * gcc.dg/analyzer/pr99906.c: New test.
+
+2021-04-05 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/99886
+ * gcc.dg/analyzer/pr99886.c: New test.
+
+2021-04-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/99066
+ * g++.dg/cpp0x/extern_template-6.C: New test.
+
+2021-04-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/99201
+ * g++.dg/cpp1z/constexpr-if-lambda4.C: New test.
+
+2021-04-05 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/99914
+ * gdc.dg/pr99914.d: New test.
+
+2021-04-05 Sandra Loosemore <sandra@codesourcery.com>
+
+ * gcc.dg/ipa/propmalloc-4.c: Add -fdelete-null-pointer-checks.
+ * gcc.dg/tree-ssa/evrp11.c: Likewise.
+
+2021-04-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/99643
+ * g++.dg/cpp0x/initlist-new5.C: New test.
+
+2021-04-03 Alexandre Oliva <oliva@adacore.com>
+
+ * g++.dg/pr94314-3.C: Zero-initialize main loop counter.
+
+2021-04-03 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.dg/ipa/ipa-sra-19.c: Extend -Wno-psabi to ppc-vx7r2.
+
+2021-04-03 Marek Polacek <polacek@redhat.com>
+
+ PR c++/91416
+ * g++.dg/other/gc7.C: New test.
+
+2021-04-03 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/99818
+ * gfortran.dg/coarray_48.f90: New test.
+
+2021-04-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/99882
+ * gcc.dg/pr99882.c: New test.
+
+2021-04-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/99863
+ * gcc.target/i386/pr99863.c: New test.
+
+2021-04-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/98125
+ * g++.dg/pr93195a.C: Skip on powerpc*-*-* 64-bit.
+
+2021-04-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/91217
+ * g++.dg/opt/nrv20.C: New test.
+
+2021-04-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/90664
+ * g++.dg/cpp1z/noexcept-type24.C: New test.
+
+2021-04-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/97900
+ * g++.dg/ext/vector40.C: New test.
+
+2021-04-02 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99869
+ * g++.dg/cpp2a/concepts-placeholder6.C: New test.
+
+2021-04-02 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99586
+ * g++.dg/cpp2a/nontype-class42.C: New test.
+
+2021-04-02 Jason Merrill <jason@redhat.com>
+
+ PR c++/97938
+ * g++.dg/cpp2a/lambda-pack-init6.C: New test.
+
+2021-04-02 Nathan Sidwell <nathan@acm.org>
+
+ * g++.dg/modules/pr99283-6_d.H: New.
+ * g++.dg/modules/pr99283-7-swap.h: New.
+ * g++.dg/modules/pr99283-7-traits.h: New.
+ * g++.dg/modules/pr99283-7_a.H: New.
+ * g++.dg/modules/pr99283-7_b.H: New.
+ * g++.dg/modules/pr99283-7_c.C: New.
+ * g++.dg/modules/pr99283-7_d.H: New.
+
+2021-04-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ * go.test/test/fixedbugs/issue6036.go: Skip on sparc.
+ * go.test/test/fixedbugs/issue22200b.go: Likewise.
+
+2021-04-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/99726
+ * gcc.target/i386/pr99726.c: Remove -m32 from dg-options. Move
+ -floop-nest-optimize to dg-additional-options guarded on fgraphite
+ effective target.
+
+2021-04-01 Marek Polacek <polacek@redhat.com>
+
+ PR c++/99831
+ * g++.dg/other/gc6.C: New test.
+
+2021-04-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/99583
+ * g++.dg/cpp0x/lambda/lambda-variadic12.C: New test.
+
+2021-04-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/98481
+ * g++.dg/abi/abi-tag24a.C: New test.
+ * g++.dg/abi/macro0.C: Adjust expected value.
+
+2021-04-01 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99283
+ * g++.dg/modules/pr99283-6.h: New.
+ * g++.dg/modules/pr99283-6_a.H: New.
+ * g++.dg/modules/pr99283-6_b.H: New.
+ * g++.dg/modules/pr99283-6_c.C: New.
+ * g++.dg/modules/hdr-init-1_c.C: Adjust scan.
+ * g++.dg/modules/indirect-3_c.C: Adjust scan.
+ * g++.dg/modules/indirect-4_c.C: Adjust scan.
+ * g++.dg/modules/lambda-3_b.C: Adjust scan.
+ * g++.dg/modules/late-ret-3_c.C: Adjust scan.
+ * g++.dg/modules/pr99425-1_b.H: Adjust scan.
+ * g++.dg/modules/pr99425-1_c.C: Adjust scan.
+
+2021-04-01 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/98265
+ * gcc.dg/tree-ssa/pr98265.C: New test.
+
+2021-04-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96573
+ * gcc.dg/pr96573.c: New test.
+
+2021-04-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99856
+ * gcc.dg/vect/pr99856.c: New testcase.
+
+2021-04-01 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/97009
+ * gcc.dg/tree-ssa/pr97009.c: New test.
+
+2021-04-01 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/99840
+ * gfortran.dg/transpose_5.f90: New test.
+
+2021-03-31 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/99771
+ * gcc.dg/analyzer/data-model-10.c: Update expected output.
+ * gcc.dg/analyzer/malloc-ipa-13.c: Likewise.
+ * gcc.dg/analyzer/malloc-ipa-13a.c: New test.
+ * gcc.dg/analyzer/pr99771-1.c: New test.
+
+2021-03-31 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/98268
+ * gcc.target/aarch64/sve/pr98268-1.c: New test.
+ * gcc.target/aarch64/sve/pr98268-2.c: Likewise.
+
+2021-03-31 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/99726
+ * gcc.target/i386/pr99726.c: New test.
+
+2021-03-31 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR rtl-optimization/97141
+ PR rtl-optimization/98726
+ * gcc.c-torture/compile/pr97141.c: New test.
+ * gcc.c-torture/compile/pr98726.c: Likewise.
+ * gcc.target/aarch64/sve/pr97141.c: Likewise.
+ * gcc.target/aarch64/sve/pr98726.c: Likewise.
+
+2021-03-31 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/65182
+ * gcc.dg/uninit-pr65182.c: New test.
+
+2021-03-31 Jason Merrill <jason@redhat.com>
+
+ PR c++/99445
+ * g++.dg/cpp0x/alias-decl-variadic1.C: New test.
+
+2021-03-31 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/96974
+ * g++.target/aarch64/sve/pr96974.C: Expect SLP diagnostic only
+ under lp64.
+
+2021-03-31 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/99786
+ * gcc.target/arm/pr99786.c: New test.
+
+2021-03-31 H.J. Lu <hjl.tools@gmail.com>
+
+ * gcc.target/i386/memcpy-strategy-5.c: New test.
+ * gcc.target/i386/memcpy-strategy-6.c: Likewise.
+ * gcc.target/i386/memcpy-strategy-7.c: Likewise.
+ * gcc.target/i386/memcpy-strategy-8.c: Likewise.
+ * gcc.target/i386/memset-strategy-3.c: Likewise.
+ * gcc.target/i386/memset-strategy-4.c: Likewise.
+ * gcc.target/i386/memset-strategy-5.c: Likewise.
+ * gcc.target/i386/memset-strategy-6.c: Likewise.
+
+2021-03-31 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR target/98119
+ * gcc.target/aarch64/sve/pr98119.c: New test.
+
+2021-03-31 Jakub Jelinek <jakub@redhat.com>
+ Richard Sandiford <richard.sandiford@arm.com>
+
+ PR target/99813
+ * g++.target/aarch64/sve/pr99813.C: New test.
+
+2021-03-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/97680
+ * c-c++-common/zero-scratch-regs-6.c: Skip on ia64.
+ * c-c++-common/zero-scratch-regs-7.c: Likewise.
+ * c-c++-common/zero-scratch-regs-8.c: Change from dg-skip-if of
+ selected unsupported triplets to all targets but selected triplets
+ of supported targets.
+ * c-c++-common/zero-scratch-regs-9.c: Likewise.
+ * c-c++-common/zero-scratch-regs-10.c: Likewise.
+ * c-c++-common/zero-scratch-regs-11.c: Likewise.
+
+2021-03-31 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/88115
+ * g++.dg/cpp0x/alignof7.C: Adjust expected mangling.
+
+2021-03-31 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99815
+ * g++.dg/cpp2a/concepts-placeholder5.C: New test.
+
+2021-03-30 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/symbolic-1.c: Fix typo.
+
+2021-03-30 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99283
+ * g++.dg/modules/pr99283-5.h: New.
+ * g++.dg/modules/pr99283-5_a.H: New.
+ * g++.dg/modules/pr99283-5_b.H: New.
+ * g++.dg/modules/pr99283-5_c.C: New.
+
+2021-03-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99790
+ * g++.dg/cpp1z/pr99790.C: New test.
+
+2021-03-30 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/99822
+ * gcc.c-torture/compile/pr99822.c: New test.
+
+2021-03-30 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ PR target/99718
+ PR target/99718
+ * gcc.target/powerpc/fold-vec-insert-char-p8.c: Update
+ instruction counts.
+ * gcc.target/powerpc/fold-vec-insert-char-p9.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-double.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-float-p8.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-float-p9.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-int-p8.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-int-p9.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-longlong.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-short-p8.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-short-p9.c: Likewise.
+ * gcc.target/powerpc/pr79251.p8.c: Likewise.
+ * gcc.target/powerpc/pr79251.p9.c: Likewise.
+ * gcc.target/powerpc/vsx-builtin-7.c: Likewise.
+ * gcc.target/powerpc/pr79251-run.p7.c: New test.
+ * gcc.target/powerpc/pr79251.p7.c: New test.
+
+2021-03-30 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/99744
+ * gcc.target/i386/pr99744-1.c: New test.
+
+2021-03-30 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/99825
+ * gfortran.dg/vect/pr99825.f90: New test.
+
+2021-03-30 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/99808
+ * gcc.target/aarch64/pr99808.c: Use ULL constant suffix.
+
+2021-03-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99824
+ * gcc.dg/torture/pr99824.c: New testcase.
+
+2021-03-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR target/98136
+ * g++.dg/pr98136.C: New test.
+
+2021-03-30 Mihailo Stojanovic <mihailo.stojanovic@typhoon-hil.com>
+
+ * gcc.target/aarch64/fcvt_nosimd.c: New test.
+
+2021-03-29 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/61869
+ * gcc.dg/uninit-pr61869.c: New test.
+
+2021-03-29 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/61677
+ * gcc.dg/uninit-pr61677.c: New test.
+
+2021-03-29 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/61112
+ * gcc.dg/uninit-pr61112.c: New test.
+
+2021-03-29 Jan Hubicka <jh@suse.cz>
+
+ PR ipa/99751
+ * gcc.c-torture/compile/pr99751.c: Rename from ...
+ * gcc.c-torture/execute/pr99751.c: ... to this.
+
+2021-03-29 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.c-torture/compile/pr99751.c: New test.
+
+2021-03-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/93660
+ * gfortran.dg/gomp/declare-simd-coarray-lib.f90: Expect a mixed size
+ declare simd warning on aarch64.
+
+2021-03-29 Alex Coplan <alex.coplan@arm.com>
+
+ PR target/99216
+ * g++.target/aarch64/sve/pr99216.C: New test.
+
+2021-03-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99807
+ * gfortran.dg/vect/pr99807.f90: New testcase.
+
+2021-03-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/99808
+ * gcc.target/aarch64/pr99808.c: New test.
+
+2021-03-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/99777
+ * g++.dg/torture/pr99777.C: New test.
+
+2021-03-28 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/96770
+ * gcc.target/arm/pure-code/pr96770.c: Improve scan-assembler-times.
+
+2021-03-28 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/99602
+ * gfortran.dg/pr99602.f90: New test.
+ * gfortran.dg/pr99602a.f90: New test.
+ * gfortran.dg/pr99602b.f90: New test.
+ * gfortran.dg/pr99602c.f90: New test.
+ * gfortran.dg/pr99602d.f90: New test.
+
+2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * lib/gdc-utils.exp (gdc-copy-extra): Rename to...
+ (gdc-copy-file): ... this. Use file copy instead of open/close.
+ (gdc-convert-test): Save translated dejagnu test to gdc.test
+ directory, only write dejagnu directives to the test file.
+ (gdc-do-test): Don't create gdc.test symlink.
+
+2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * gdc.dg/gdc270a.d: Removed.
+ * gdc.dg/gdc270b.d: Removed.
+
+2021-03-26 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/pr99557.c: New.
+
+2021-03-26 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/59970
+ * gcc.dg/uninit-pr59970.c: New test.
+
+2021-03-26 Marek Polacek <polacek@redhat.com>
+
+ PR c++/98352
+ * g++.dg/cpp0x/inh-ctor37.C: Remove dg-error.
+ * g++.dg/cpp0x/nsdmi17.C: New test.
+
+2021-03-26 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99283
+ * g++.dg/modules/pr99283-2_a.H: New.
+ * g++.dg/modules/pr99283-2_b.H: New.
+ * g++.dg/modules/pr99283-2_c.H: New.
+ * g++.dg/modules/pr99283-3_a.H: New.
+ * g++.dg/modules/pr99283-3_b.H: New.
+ * g++.dg/modules/pr99283-4.H: New.
+ * g++.dg/modules/tpl-alias-1_a.H: Adjust scans.
+ * g++.dg/modules/tpl-alias-1_b.C: Adjust scans.
+
+2021-03-26 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/99766
+ * g++.target/aarch64/sve/pr99766.C: New.
+
+2021-03-26 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR ipa/99466
+ * gcc.dg/tls/pr99466-1.c: New test.
+ * gcc.dg/tls/pr99466-2.c: New test.
+
+2021-03-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99705
+ * g++.dg/cpp0x/new5.C: New test.
+
+2021-03-26 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/99651
+ * gfortran.dg/null_11.f90: New test.
+
+2021-03-25 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/55060
+ * gcc.dg/uninit-pr55060.c: New.
+
+2021-03-25 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/48483
+ * g++.dg/warn/uninit-pr48483.C: New test.
+
+2021-03-25 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/uninit-pr44547.c: New.
+
+2021-03-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99672
+ * g++.dg/concepts/diagnostic2.C: Adjust expected caret line.
+ * g++.dg/cpp1y/builtin_location.C (f4, n6): Move #line directives
+ to match locus changes.
+ * g++.dg/cpp2a/srcloc1.C: Adjust expected column numbers.
+ * g++.dg/cpp2a/srcloc2.C: Likewise.
+ * g++.dg/cpp2a/srcloc15.C: Likewise.
+ * g++.dg/cpp2a/srcloc16.C: Likewise.
+ * g++.dg/cpp2a/srcloc19.C: New test.
+ * g++.dg/modules/adhoc-1_b.C: Adjust expected column numbers
+ and caret line.
+ * g++.dg/modules/macloc-1_c.C: Adjust expected column numbers.
+ * g++.dg/modules/macloc-1_d.C: Likewise.
+ * g++.dg/plugin/diagnostic-test-expressions-1.C: Adjust expected
+ caret line.
+
+2021-03-25 Marek Polacek <polacek@redhat.com>
+
+ PR c++/94751
+ * g++.dg/cpp0x/inh-ctor37.C: New test.
+
+2021-03-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99745
+ * g++.dg/cpp0x/variadic181.C: New test.
+
+2021-03-25 Marek Polacek <polacek@redhat.com>
+
+ PR c++/99331
+ * g++.dg/warn/Wconversion5.C: New test.
+
+2021-03-25 Stam Markianos-Wright <stam.markianos-wright@arm.com>
+
+ PR tree-optimization/96974
+ * g++.target/aarch64/sve/pr96974.C: New test.
+
+2021-03-25 H.J. Lu <hjl.tools@gmail.com>
+
+ Revert:
+ 2021-03-25 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/98209
+ PR target/99744
+ * gcc.target/i386/pr98209.c: New test.
+ * gcc.target/i386/pr99744-1.c: Likewise.
+ * gcc.target/i386/pr99744-2.c: Likewise.
+
+2021-03-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99565
+ * g++.dg/warn/Wduplicated-branches6.C: New test.
+ * g++.dg/warn/Wduplicated-branches7.C: New test.
+
+2021-03-25 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/98209
+ PR target/99744
+ * gcc.target/i386/pr98209.c: New test.
+ * gcc.target/i386/pr99744-1.c: Likewise.
+ * gcc.target/i386/pr99744-2.c: Likewise.
+
+2021-03-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99746
+ * gfortran.dg/vect/pr99746.f90: New testcase.
+
+2021-03-25 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/93695
+ PR analyzer/99044
+ PR analyzer/99716
+ * gcc.dg/analyzer/attr-malloc-CVE-2019-19078-usb-leak.c: Remove
+ xfail.
+ * gcc.dg/analyzer/pr93695-1.c: New test.
+ * gcc.dg/analyzer/pr99044-1.c: New test.
+ * gcc.dg/analyzer/pr99044-2.c: New test.
+ * gcc.dg/analyzer/pr99716-1.c: New test.
+ * gcc.dg/analyzer/pr99716-2.c: New test.
+ * gcc.dg/analyzer/pr99716-3.c: New test.
+
+2021-03-24 Martin Liska <mliska@suse.cz>
+
+ PR target/99753
+ * gcc.target/i386/pr99753.c: New test.
+
+2021-03-24 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/99122
+ * gcc.dg/pr99122-3.c: Remove -fno-ipa-cp from options.
+
+2021-03-24 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/99727
+ * gcc.target/arm/pr99727.c: New test.
+
+2021-03-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99724
+ * gcc.target/arm/pr99724.c: New test.
+
+2021-03-24 Alexandre Oliva <oliva@adacore.com>
+
+ * lib/target-supports.exp (check_effective_target_sysconf): New.
+ * gcc.target/i386/pr95443-1.c: Require it.
+ * gcc.target/i386/pr95443-2.c: Likewise.
+ * gcc.target/i386/sse2-mmx-maskmovq.c: Likewise.
+ * gcc.target/i386/strncmp-1.c: Likewise.
+
+2021-03-24 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.target/i386/pr97313.c: Require effective target feature pie.
+ * g++.target/i386/pr94185.C: Likewise.
+
+2021-03-24 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.target/i386/funcspec-2.c: Tighten regexps to avoid false
+ positives with -mcmodel=large.
+ * gcc.target/i386/funcspec-3.c: Likewise.
+
+2021-03-24 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.target/i386/pr94467-3.c: New.
+
+2021-03-24 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/99369
+ * gfortran.dg/longnames.f90: New test.
+
+2021-03-23 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99283
+ * g++.dg/modules/pr99283-1_a.H: New.
+ * g++.dg/modules/pr99283-1_b.H: New.
+
+2021-03-23 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * gcc.target/s390/vector/long-double-asm-abi.c: New test.
+
+2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * lib/target-supports.exp
+ (check_effective_target_arm_dsp_ok_nocache)
+ (check_effective_target_arm_dsp_ok, add_options_for_arm_dsp): New.
+ * gcc.target/arm/acle/dsp_arith.c: Use arm_dsp_ok effective target
+ and add arm_dsp options.
+
+2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * lib/target-supports.exp
+ (check_effective_target_arm_v8_1m_mve_fp_ok_nocache): Fix
+ -mfloat-abi= options order.
+ (check_effective_target_arm_v8_1m_mve_ok_nocache): Likewise
+ * gcc.target/arm/mve/intrinsics/mve_vector_float2.c: Add
+ arm_hard_ok effective target and -mfloat-abi=hard additional
+ option.
+ * gcc.target/arm/mve/intrinsics/mve_vector_int.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/mve_vector_uint.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/mve_vector_uint1.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/mve_vector_uint2.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/vgetq_lane_s64.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/vgetq_lane_u64.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/vsetq_lane_s64.c: Likewise.
+ * gcc.target/arm/mve/intrinsics/vsetq_lane_u64.c: Likewise.
+ * gcc.target/arm/armv8_1m-fp16-move-1.c: Add -mfloat-abi=hard
+ additional option.
+ * gcc.target/arm/armv8_1m-fp32-move-1.c: Likewise.
+ * gcc.target/arm/armv8_1m-fp64-move-1.c: Likewise.
+
+2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * lib/target-supports.exp
+ (check_effective_target_arm_v8_2a_i8mm_ok_nocache): Fix
+ -mfloat-abi= options order.
+ (check_effective_target_arm_v8_2a_bf16_neon_ok_nocache): Likewise.
+ * gcc.target/arm/bfloat16_scalar_1_1.c: Add arm_hard_ok effective
+ target and -mfloat-abi=hard additional option.
+ * gcc.target/arm/bfloat16_simd_1_1.c: Likewise.
+ * gcc.target/arm/simd/bf16_ma_1.c: Likewise.
+ * gcc.target/arm/simd/bf16_mmla_1.c: Likewise.
+ * gcc.target/arm/simd/vdot-2-1.c: Likewise.
+ * gcc.target/arm/simd/vdot-2-2.c: Likewise.
+
+2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/armv8_2-fp16-scalar-2.c: Add arm_hard_ok.
+
+2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/bfloat16_simd_1_2.c: Add arm_softfp_ok.
+ * gcc.target/arm/bfloat16_simd_2_2.c: Likewise.
+ * gcc.target/arm/bfloat16_simd_3_2.c: Likewise.
+ * gcc.target/arm/pr51968.c: Likewise.
+ * gcc.target/arm/bfloat16_simd_2_1.c: arm_hard_ok.
+ * gcc.target/arm/bfloat16_simd_3_1.c: Likewise.
+ * gcc.target/arm/simd/bf16_vldn_1.c: Likewise.
+ * gcc.target/arm/simd/bf16_vstn_1.c: Likewise.
+
+2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/armv8_1m-shift-imm-1.c: Remove -mfloat=abi option.
+ * gcc.target/arm/armv8_1m-shift-reg-1.c: Likewise.
+ * gcc.target/arm/bf16_dup.c: Likewise.
+ * gcc.target/arm/bf16_reinterpret.c: Likewise.
+ * gcc.target/arm/pr51534.c: Remove -mfloat=abi option.
+
+2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/vmmla_1.c: Add arm_v8_2a_i8mm options.
+
+2021-03-23 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/bfloat16_scalar_typecheck.c: Add
+ arm_v8_2a_fp16_neon and arm_v8_2a_bf16_neon.
+ * gcc.target/arm/bfloat16_vector_typecheck_1.c: Likewise.
+ * gcc.target/arm/bfloat16_vector_typecheck_2.c: Likewise.
+
+2021-03-23 Marek Polacek <polacek@redhat.com>
+
+ PR c++/99318
+ * g++.dg/cpp0x/attributes-namespace6.C: New test.
+ * g++.dg/cpp0x/gen-attrs-73.C: New test.
+
+2021-03-23 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/93660
+ * gfortran.dg/gomp/declare-simd-coarray-lib.f90: New test.
+
+2021-03-23 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR target/99540
+ * gcc.dg/vect/pr99540.c: New test.
+
+2021-03-23 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99239
+ * g++.dg/modules/pr99239_a.H: New.
+ * g++.dg/modules/pr99239_b.H: New.
+
+2021-03-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99721
+ * gfortran.dg/vect/pr99721.f90: New testcase.
+
+2021-03-23 Marcus Comstedt <marcus@mc.pp.se>
+
+ * gcc.target/riscv/shift-shift-5.c (sub): Change
+ order of struct fields depending on byteorder.
+
+2021-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99650
+ * g++.dg/cpp1z/decomp55.C: New test.
+
+2021-03-23 Aldy Hernandez <aldyh@redhat.com>
+
+ PR tree-optimization/99296
+ * gcc.dg/pr99296.c: New file.
+
+2021-03-22 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99480
+ * g++.dg/modules/pr99480_a.H: New.
+ * g++.dg/modules/pr99480_b.H: New.
+
+2021-03-22 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR target/99581
+ * gcc.target/powerpc/pr99581.c: New.
+
+2021-03-22 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99425
+ * g++.dg/modules/pr99425-1.h: New.
+ * g++.dg/modules/pr99425-1_a.H: New.
+ * g++.dg/modules/pr99425-1_b.H: New.
+ * g++.dg/modules/pr99425-1_c.C: New.
+ * g++.dg/modules/pr99425-2_a.X: New.
+ * g++.dg/modules/pr99425-2_b.X: New.
+ * g++.dg/template/pr99425.C: New.
+
+2021-03-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99694
+ * gcc.dg/torture/pr99694.c: New testcase.
+
+2021-03-22 Kito Cheng <kito.cheng@sifive.com>
+
+ PR target/99702
+ * gcc.target/riscv/pr99702.c: New.
+
+2021-03-22 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ PR target/98914
+ * gcc.target/powerpc/pr98914.c: New test.
+
+2021-03-20 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/99679
+ * g++.target/i386/pr99679-1.C: New test.
+ * g++.target/i386/pr99679-2.C: Likewise.
+
+2021-03-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/99230
+ * gcc.dg/pr99230.c: New test.
+
+2021-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/99588
+ * gcc.dg/Wunused-var-5.c: New test.
+ * gcc.dg/Wunused-var-6.c: New test.
+
+2021-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ * gfortran.dg/inline_matmul_6.f90: Adjust count for
+ _gfortran_matmul.
+
+2021-03-19 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR target/99663
+ * gcc.target/s390/pr99663.c: New.
+
+2021-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99456
+ * g++.dg/opt/pr99456.C: New test.
+ * g++.dg/ext/vla22.C: Expect a -Wnarrowing warning for c++11 and
+ later.
+
+2021-03-19 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/99656
+ * gfortran.dg/vect/pr99656.f90: New test.
+
+2021-03-19 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/99652
+ * gcc.dg/torture/pr99652-1.c: New test.
+ * gcc.dg/torture/pr99652-2.c: Likewise.
+ * gcc.target/i386/pr57655.c: Adjusted.
+ * gcc.target/i386/pr59794-6.c: Likewise.
+ * gcc.target/i386/pr70738-1.c: Likewise.
+ * gcc.target/i386/pr96744-1.c: Likewise.
+
+2021-03-19 Jakub Jelinek <jakub@redhat.com>
+ Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/99593
+ * g++.target/arm/pr99593.C: New test.
+
+2021-03-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * g++.dg/lto/pr89335_0.C: Require the linker plugin.
+
+2021-03-19 Marek Polacek <polacek@redhat.com>
+
+ PR c++/99500
+ * g++.dg/cpp2a/concepts-err3.C: New test.
+
+2021-03-18 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/99502
+ * g++.dg/warn/Warray-bounds-22.C: New test.
+ * g++.dg/warn/Warray-bounds-23.C: New test.
+ * g++.dg/warn/Warray-bounds-24.C: New test.
+
+2021-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/99636
+ * gcc.dg/strlenopt-80.c: For powerpc*-*-*, only enable for lp64.
+
+2021-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/99626
+ * gcc.dg/strlenopt-73.c: Ifdef out test_copy_cond_unequal_length_i64
+ on targets other than x86, aarch64, s390 and 64-bit powerpc. Use
+ test_copy_cond_unequal_length_i128 for __x86_64__ with int128 support
+ rather than __i386__.
+
+2021-03-18 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR testsuite/97680
+ * c-c++-common/zero-scratch-regs-10.c: Skip on arm
+
+2021-03-18 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR objc++/49070
+ * obj-c++.dg/pr49070.mm: New test.
+ * objc.dg/unnamed-parms.m: New test.
+
+2021-03-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * g++.target/aarch64/sve/aarch64-sve.exp: Add -moverride=tune=none to
+ sve_flags.
+ * g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp: Likewise.
+ * g++.target/aarch64/sve/acle/aarch64-sve-acle.exp: Likewise.
+ * gcc.target/aarch64/sve/aarch64-sve.exp: Likewise.
+ * gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp: Likewise.
+ * gcc.target/aarch64/sve/acle/aarch64-sve-acle.exp: Likewise.
+
+2021-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/98099
+ * gcc.dg/pr98099.c: Don't compile the test on pdp endian.
+ For big endian use -fsso-struct=little-endian dg-options.
+
+2021-03-17 Marek Polacek <polacek@redhat.com>
+
+ PR c++/97973
+ * g++.dg/conversion/real-to-int1.C: New test.
+
+2021-03-17 Anthony Sharp <anthonysharp15@gmail.com>
+ Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp1z/using9.C: New using decl test.
+
+2021-03-17 Iain Sandoe <iain@sandoe.co.uk>
+
+ * c-c++-common/asan/strncpy-overflow-1.c: Add _FORTIFY_SOURCE=0 and
+ -gdwarf-3 to the command line options. Adjust the expected line
+ numbers for the revised options header.
+
+2021-03-17 Iain Sandoe <iain@sandoe.co.uk>
+
+ * c-c++-common/asan/memcmp-1.c: Add _FORTIFY_SOURCE=0 and
+ -gdwarf-3 to the command line options. Provide Darwin-
+ specific match lines for the expected output.
+
+2021-03-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/acle/rng_2.c: New test.
+
+2021-03-17 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/99504
+ * gcc.target/i386/pr99530-1.c: New test.
+ * gcc.target/i386/pr99530-2.c: Likewise.
+ * gcc.target/i386/pr99530-3.c: Likewise.
+ * gcc.target/i386/pr99530-4.c: Likewise.
+ * gcc.target/i386/pr99530-5.c: Likewise.
+ * gcc.target/i386/pr99530-6.c: Likewise.
+
+2021-03-16 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/99542
+ * gcc.dg/declare-simd.c (fn2): Expect a warning only under lp64.
+
+2021-03-16 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp2a/nontype-float1.C: New test.
+
+2021-03-16 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/98092
+ PR target/98092
+ * gcc.target/powerpc/pr98092.c: New.
+
+2021-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99600
+ * gcc.target/i386/pr99600.c: New test.
+
+2021-03-16 Martin Liska <mliska@suse.cz>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/99108
+ * g++.target/i386/pr99108.C: New test.
+
+2021-03-16 Martin Liska <mliska@suse.cz>
+
+ PR target/99592
+ * gcc.target/arm/pr99592.c: New test.
+
+2021-03-16 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * gcc.target/s390/vector/long-double-asm-fprvrmem.c: New test.
+
+2021-03-16 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99496
+ * g++.dg/modules/pr99496_a.H: New.
+ * g++.dg/modules/pr99496_b.C: New.
+
+2021-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99563
+ * gcc.target/i386/avx-pr99563.c: New test.
+
+2021-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99542
+ * gcc.dg/gomp/pr99542.c: New test.
+ * gcc.dg/gomp/pr59669-2.c (bar): Don't expect a warning on aarch64.
+ * gcc.dg/gomp/simd-clones-2.c (setArray): Likewise.
+ * g++.dg/vect/simd-clone-7.cc (bar): Likewise.
+ * g++.dg/gomp/declare-simd-1.C (f37): Expect a different warning
+ on aarch64.
+ * gcc.dg/declare-simd.c (fn2): Expect a new warning on aarch64.
+
+2021-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99601
+ * g++.dg/modules/builtin-3_a.C: Fix target selector syntax errors.
+ * g++.dg/modules/builtin-3_b.C: Likewise.
+
+2021-03-15 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99601
+ * g++.dg/modules/builtin-3_a.C: Fix lp64 x86 detection.
+ * g++.dg/modules/builtin-3_b.C: Fix lp64 x86 detection.
+
+2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/99047
+ * g++.dg/coroutines/pr99047.C: New test.
+
+2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/98704
+ * g++.dg/coroutines/torture/pr98704.C: New test.
+
+2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/98480
+ * g++.dg/coroutines/pr98480.C: New test.
+ * g++.dg/coroutines/torture/co-await-24-for-init.C: New test.
+ * g++.dg/coroutines/torture/co-await-25-for-condition.C: New test.
+ * g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C: New test.
+
+2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/96749
+ * g++.dg/coroutines/pr96749-1.C: New test.
+ * g++.dg/coroutines/pr96749-2.C: New test.
+
+2021-03-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98834
+ * g++.dg/opt/pr98834.C: New testcase.
+
+2021-03-15 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/99345
+ * gfortran.dg/do_check_16.f90: New test.
+ * gfortran.dg/do_check_17.f90: New test.
+
+2021-03-15 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/99545
+ * gfortran.dg/pr99545.f90: New test.
+
+2021-03-15 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/pr99492.c: Fix typo.
+
+2021-03-14 Harald Anlauf <anlauf@gmx.de>
+ Paul Thomas <pault@gcc.gnu.org>
+
+ * gfortran.dg/pr99112.f90: New test.
+
+2021-03-13 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/99489
+ * gcc.dg/Wstringop-truncation-9.c: New test.
+
+2021-03-13 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/99125
+ * gfortran.dg/alloc_deferred_comp_1.f90: New test.
+
+2021-03-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/99544
+ * gcc.dg/gomp/pr99544.c: New test.
+
+2021-03-12 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99238
+ * g++.dg/modules/pr99238.h: New.
+ * g++.dg/modules/pr99238_a.H: New.
+ * g++.dg/modules/pr99238_b.H: New.
+
+2021-03-12 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/99514
+ * gfortran.dg/gomp/threadprivate-1.f90: New test.
+
+2021-03-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99321
+ * gcc.target/i386/avx512vl-pr99321-2.c: New test.
+
+2021-03-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99507
+ * g++.dg/cpp2a/consteval19.C: New test.
+
+2021-03-11 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/96374
+ * gcc.dg/analyzer/dot-output.c: Add -fdump-analyzer-feasibility
+ to options.
+ * gcc.dg/analyzer/feasibility-1.c (test_6): Remove xfail.
+ (test_7): New.
+ * gcc.dg/analyzer/pr93355-localealias-feasibility-2.c: Remove xfail.
+ * gcc.dg/analyzer/pr93355-localealias-feasibility-3.c: Remove xfails.
+ * gcc.dg/analyzer/pr93355-localealias-feasibility.c: Remove
+ -fno-analyzer-feasibility from options.
+ * gcc.dg/analyzer/pr93355-localealias.c: Likewise.
+ * gcc.dg/analyzer/unknown-fns-4.c: Remove xfail.
+
+2021-03-11 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99248
+ * g++.dg/modules/pr99248.h: New.
+ * g++.dg/modules/pr99248_a.H: New.
+ * g++.dg/modules/pr99248_b.H: New.
+
+2021-03-11 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99528
+ * g++.dg/modules/pr99528.h: New.
+ * g++.dg/modules/pr99528_a.H: New.
+ * g++.dg/modules/pr99528_b.H: New.
+ * g++.dg/modules/pr99528_c.C: New.
+
+2021-03-11 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/98245
+ * gcc.dg/vect/bb-slp-46.c: Scan for the scalar compute
+ instead of verifying the total number of adds.
+
+2021-03-11 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/97494
+ * gcc.dg/vect/pr97428.c: XFAIL on !vect_hw_misalign.
+
+2021-03-11 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/97494
+ * gcc.dg/vect/vect-complex-5.c: XFAIL on !vect_hw_misalign.
+
+2021-03-11 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/97494
+ * gcc.dg/vect/slp-21.c: Adjust for powerpc64*-*-*.
+
+2021-03-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/99517
+ * gcc.target/i386/avx2-pr99517-1.c: New test.
+ * gcc.target/i386/avx2-pr99517-2.c: New test.
+
+2021-03-10 David Edelsohn <dje.gcc@gmail.com>
+
+ PR target/99492
+ * gcc.target/powerpc/pr99492.c: New testcase.
+
+2021-03-10 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/99205
+ * gfortran.dg/data_char_4.f90: New test.
+ * gfortran.dg/data_char_5.f90: New test.
+
+2021-03-10 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * gcc.target/powerpc/pr98959.c: Add int128 and lp64 selectors.
+
+2021-03-10 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99423
+ * g++.dg/modules/pr99423_a.H: New.
+ * g++.dg/modules/pr99423_b.H: New.
+
+2021-03-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/99305
+ PR testsuite/99498
+ * g++.dg/opt/pr99305.C: Don't expect cast to unsigned char on
+ unsigned_char effective targets.
+
+2021-03-10 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99508
+ * g++.dg/ext/pr99508.C: New.
+
+2021-03-10 John David Anglin <danglin@gcc.gnu.org>
+
+ PR testsuite/99292
+ * lib/target-supports.exp (check_effective_target_lra): New.
+ * gcc.c-torture/compile/asmgoto-2.c: Use LRA target selector.
+ * gcc.c-torture/compile/asmgoto-5.c: Likewise.
+ * gcc.c-torture/compile/pr98096.c: Likewise.
+ * gcc.dg/pr97954.c: Likewise.
+
+2021-03-10 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/pr94047.c: Remove "-Wno-analyzer-too-complex".
+ * gcc.dg/analyzer/zlib-2.c: Likewise.
+
+2021-03-10 Joel Hutton <joel.hutton@arm.com>
+
+ * gcc.dg/vect/pr99102.c: Fix target selector.
+
+2021-03-10 Joel Hutton <joel.hutton@arm.com>
+
+ PR target/99102
+ * gcc.dg/vect/pr99102.c: New test.
+
+2021-03-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/lto25.ads: New test.
+
+2021-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/99305
+ * g++.dg/opt/pr99305.C: New test.
+
+2021-03-09 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * lib/target-supports.exp (check_effective_target_powerpc_sqrt): New.
+ (check_effective_target_sqrt_insn): Use it.
+
+2021-03-09 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR target/99454
+ * gcc.target/i386/pr99454.c: New.
+
+2021-03-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/array-quals-1.c: Pass -fno-pie if supported.
+ * gcc.dg/loop-9.c: Likewise.
+ * gfortran.dg/pr95690.f90: Replace *-*-solaris* with sparc*-*-*.
+ * gnat.dg/opt39.adb: Pass --param option for Aarch64 too.
+
+2021-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/98920
+ * c-c++-common/asan/pr98920.c: Only include regex.h if the header
+ exists. If REG_STARTEND macro isn't defined, just return 0 from main
+ instead of the actual test.
+
+2021-03-09 Martin Liska <mliska@suse.cz>
+
+ PR target/99464
+ * gcc.target/i386/pr99464.c: New test.
+
+2021-03-09 Joel Brobecker <brobecker@adacore.com>
+
+ * gcc.target/powerpc/undef-bool-2.c: Add
+ dg-require-effective-target powerpc_vsx_ok directive.
+ * g++.dg/ext/undef-bool-1.C: Add dg-require-effective-target
+ powerpc_vsx_ok directive.
+
+2021-03-08 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/49278
+ * gfortran.dg/parameter_data.f90: New test.
+
+2021-03-08 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/98266
+ * g++.dg/warn/Warray-bounds-15.C: New test.
+ * g++.dg/warn/Warray-bounds-18.C: New test.
+ * g++.dg/warn/Warray-bounds-19.C: New test.
+ * g++.dg/warn/Warray-bounds-20.C: New test.
+ * g++.dg/warn/Warray-bounds-21.C: New test.
+
+2021-03-08 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/97631
+ * c-c++-common/Wstringop-overflow.c: Remove unexpected warnings.
+ Add an xfail.
+ * c-c++-common/Wstringop-truncation.c: Add expected warnings.
+ * gcc.dg/Wstringop-overflow-10.c: Also enable -Wstringop-truncation.
+ * gcc.dg/Wstringop-overflow-66.c: New test.
+ * gcc.dg/tree-ssa/strncpy-2.c: Adjust expected warning.
+
+2021-03-08 Marek Polacek <polacek@redhat.com>
+
+ PR c++/96268
+ * g++.dg/cpp2a/nontype-class41.C: New test.
+
+2021-03-08 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99436
+ * g++.dg/modules/modules.exp (MOD_STD_LIST): Add 2b.
+
+2021-03-08 Nathan Sidwell <nathan@acm.org>
+
+ * g++.dg/modules/pr99468.H: New.
+
+2021-03-08 Peter Bergner <bergner@linux.ibm.com>
+
+ PR target/98959
+ * gcc.target/powerpc/pr98959.c: New test.
+
+2021-03-08 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99285
+ * g++.dg/modules/pr99285_a.H: New.
+ * g++.dg/modules/pr99285_b.H: New.
+
+2021-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/99437
+ * gcc.target/aarch64/simd/pr99437.c: New test.
+
+2021-03-08 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/98920
+ * c-c++-common/asan/pr98920.c: New test.
+
+2021-03-08 Martin Liska <mliska@suse.cz>
+
+ PR target/99463
+ * gcc.target/i386/pr99463-2.c: New test.
+ * gcc.target/i386/pr99463.c: New test.
+
+2021-03-08 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * gcc.target/s390/vector/long-double-asm-commutative.c: New
+ test.
+ * gcc.target/s390/vector/long-double-asm-earlyclobber.c: New
+ test.
+ * gcc.target/s390/vector/long-double-asm-in-out.c: New test.
+ * gcc.target/s390/vector/long-double-asm-inout.c: New test.
+ * gcc.target/s390/vector/long-double-asm-matching.c: New test.
+ * gcc.target/s390/vector/long-double-asm-regmem.c: New test.
+ * gcc.target/s390/vector/long-double-volatile-from-i64.c: New
+ test.
+
+2021-03-08 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/97927
+ * gfortran.dg/module_variable_3.f90: New test.
+
+2021-03-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99321
+ * lib/target-supports.exp
+ (check_effective_target_assembler_march_noavx512bw): New effective
+ target.
+ * gcc.target/i386/avx512vl-pr99321-1.c: New test.
+
+2021-03-06 Patrick Palka <ppalka@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99287
+ * g++.dg/cpp2a/constexpr-99287.C: New test.
+
+2021-03-06 Patrick Palka <ppalka@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/96330
+ * g++.dg/cpp1y/var-templ68.C: New test.
+ * g++.dg/cpp1y/var-templ68a.C: New test.
+
+2021-03-06 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99365
+ * g++.dg/cpp2a/concepts-partial-spec9.C: New test.
+ * g++.dg/cpp2a/concepts-placeholder4.C: New test.
+
+2021-03-06 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.target/cris/pr93372-1.c: Adjust expected assembler result
+ to allow an eliminated stack-frame.
+
+2021-03-05 Marek Polacek <polacek@redhat.com>
+
+ PR c++/99374
+ * g++.dg/cpp1z/noexcept-type23.C: New test.
+
+2021-03-05 Marek Polacek <polacek@redhat.com>
+
+ PR c++/99120
+ * g++.dg/warn/Wshadow-17.C: New test.
+
+2021-03-05 Jason Merrill <jason@redhat.com>
+
+ PR c/99363
+ * gcc.dg/attr-flatten-1.c: Adjust.
+
+2021-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/99322
+ * c-c++-common/gomp/pr99322.c: New test.
+
+2021-03-05 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99245
+ * g++.dg/modules/pr99245_a.H: New.
+ * g++.dg/modules/pr99245_b.H: New.
+
+2021-03-05 Harald Anlauf <anlauf@gmx.de>
+
+ PR libfortran/99218
+ * gfortran.dg/matmul_21.f90: New test.
+
+2021-03-05 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99377
+ * g++.dg/modules/pr99377_a.H: New.
+ * g++.dg/modules/pr99377_b.C: New.
+ * g++.dg/modules/pr99377_c.C: New.
+
+2021-03-05 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/98118
+ * g++.dg/coroutines/pr98118.C: New test.
+
+2021-03-05 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95616
+ * g++.dg/coroutines/pr95616-0-no-exceptions.C: New test.
+ * g++.dg/coroutines/pr95616-0.C: New test.
+ * g++.dg/coroutines/pr95616-1-no-exceptions.C: New test.
+ * g++.dg/coroutines/pr95616-1.C: New test.
+ * g++.dg/coroutines/pr95616-2.C: New test.
+ * g++.dg/coroutines/pr95616-3-no-exceptions.C: New test.
+ * g++.dg/coroutines/pr95616-3.C: New test.
+ * g++.dg/coroutines/pr95616-4.C: New test.
+ * g++.dg/coroutines/pr95616-5.C: New test.
+ * g++.dg/coroutines/pr95616-6.C: New test.
+
+2021-03-05 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95615
+ * g++.dg/coroutines/torture/pr95615-01.C: New test.
+ * g++.dg/coroutines/torture/pr95615-02.C: New test.
+ * g++.dg/coroutines/torture/pr95615-03.C: New test.
+ * g++.dg/coroutines/torture/pr95615-04.C: New test.
+ * g++.dg/coroutines/torture/pr95615-05.C: New test.
+ * g++.dg/coroutines/torture/pr95615.inc: New file.
+
+2021-03-05 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR target/99378
+ * gcc.target/i386/pr99123-2.c: New.
+
+2021-03-05 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99389
+ * g++.dg/modules/pr99389_a.H: New.
+ * g++.dg/modules/pr99389_b.C: New.
+ * g++.dg/modules/pr99389_c.C: New.
+
+2021-03-05 Tobias Burnus <tobias@codesourcery.com>
+
+ PR c/99137
+ * c-c++-common/goacc/asyncwait-1.c: Update dg-error; add
+ additional test.
+
+2021-03-05 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/real4-10-real8-10.f90: Add check for real literals
+ with '_kind' number.
+ * gfortran.dg/real4-10-real8-16.f90: Likewise.
+ * gfortran.dg/real4-10-real8-4.f90: Likewise.
+ * gfortran.dg/real4-10.f90: Likewise.
+ * gfortran.dg/real4-16-real8-10.f90: Likewise.
+ * gfortran.dg/real4-16-real8-16.f90: Likewise.
+ * gfortran.dg/real4-16-real8-4.f90: Likewise.
+ * gfortran.dg/real4-16.f90: Likewise.
+ * gfortran.dg/real4-8-real8-10.f90: Likewise.
+ * gfortran.dg/real4-8-real8-16.f90: Likewise.
+ * gfortran.dg/real4-8-real8-4.f90: Likewise.
+ * gfortran.dg/real4-8.f90: Likewise.
+ * gfortran.dg/real8-10.f90: Likewise.
+ * gfortran.dg/real8-16.f90: Likewise.
+ * gfortran.dg/real8-4.f90: Likewise.
+
+2021-03-05 Hans-Peter Nilsson <hp@axis.com>
+
+ PR debug/66668
+ * gcc.dg/debug/dwarf2/stacked-qualified-types-3.c: xfail for cris-*-*
+
+2021-03-04 Iain Sandoe <iain@sandoe.co.uk>
+
+ * lib/prune.exp: Prune useless output caused by a linker bug.
+
+2021-03-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/93235
+ * gcc.target/aarch64/pr93235.c: New test.
+
+2021-03-04 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/99105
+ * gcc.dg/tree-prof/indir-call-prof-malloc.c: Use profile
+ correction as the wrapped malloc is called one more time
+ from libgcov.
+ * gcc.dg/tree-prof/pr97461.c: Likewise.
+
+2021-03-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/88146
+ PR c++/99362
+ * g++.dg/cpp2a/nodiscard-constructor.c: Renamed to ...
+ * g++.dg/cpp2a/nodiscard-constructor1.C: ... this. Remove
+ -ftrack-macro-expansion=0 from dg-options. Don't use (?n) in
+ dg-warning regexps, instead replace .* with \[^\n\r]*.
+ * g++.dg/cpp2a/nodiscard-constructor2.C: New test.
+ * g++.dg/cpp2a/nodiscard-reason-only-one.C: Remove
+ -ftrack-macro-expansion=0 from dg-options.
+ * g++.dg/cpp2a/nodiscard-reason-nonstring.C: Likewise.
+ * g++.dg/cpp2a/nodiscard-once.C: Likewise.
+
+2021-03-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/99325
+ * gcc.dg/cpp/line11.c: New test.
+ * gcc.dg/cpp/line12.c: New test.
+
+2021-03-04 Alex Coplan <alex.coplan@arm.com>
+
+ PR target/99381
+ * gcc.target/aarch64/pr99381.c: New test.
+
+2021-03-04 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * gcc.target/s390/mul-signed-overflow-1.c: Compile on old
+ machines.
+ * gcc.target/s390/mul-signed-overflow-2.c: Likewise.
+
+2021-03-04 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99170
+ * g++.dg/modules/pr99170-1_a.H: New.
+ * g++.dg/modules/pr99170-1_b.C: New.
+ * g++.dg/modules/pr99170-2.h: New.
+ * g++.dg/modules/pr99170-2_a.C: New.
+ * g++.dg/modules/pr99170-2_b.C: New.
+ * g++.dg/modules/pr99170-3_a.H: New.
+ * g++.dg/modules/pr99170-3_b.C: New.
+ * g++.dg/modules/inst-2_b.C: Adjust scan.
+ * g++.dg/modules/inst-4_a.C: Adjust scan.
+ * g++.dg/modules/inst-4_b.C: Adjust scan.
+ * g++.dg/modules/member-def-1_b.C: Adjust scan.
+ * g++.dg/modules/member-def-1_c.C: Adjust scan.
+ * g++.dg/modules/tpl-spec-1_a.C: Adjust scan.
+ * g++.dg/modules/tpl-spec-1_b.C: Adjust scan.
+ * g++.dg/modules/tpl-spec-2_b.C: Adjust scan.
+ * g++.dg/modules/tpl-spec-2_c.C: Adjust scan.
+ * g++.dg/modules/tpl-spec-2_d.C: Adjust scan.
+ * g++.dg/modules/tpl-spec-3_a.C: Adjust scan.
+ * g++.dg/modules/tpl-spec-3_b.C: Adjust scan.
+ * g++.dg/modules/tpl-spec-4_a.C: Adjust scan.
+ * g++.dg/modules/tpl-spec-4_b.C: Adjust scan.
+ * g++.dg/modules/tpl-spec-5_a.C: Adjust scan.
+ * g++.dg/modules/tpl-spec-5_b.C: Adjust scan.
+
+2021-03-04 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/99355
+ * gfortran.dg/real4-10-real8-10.f90: New test.
+ * gfortran.dg/real4-10-real8-16.f90: New test.
+ * gfortran.dg/real4-10-real8-4.f90: New test.
+ * gfortran.dg/real4-10.f90: New test.
+ * gfortran.dg/real4-16-real8-10.f90: New test.
+ * gfortran.dg/real4-16-real8-16.f90: New test.
+ * gfortran.dg/real4-16-real8-4.f90: New test.
+ * gfortran.dg/real4-16.f90: New test.
+ * gfortran.dg/real4-8-real8-10.f90: New test.
+ * gfortran.dg/real4-8-real8-16.f90: New test.
+ * gfortran.dg/real4-8-real8-4.f90: New test.
+ * gfortran.dg/real4-8.f90: New test.
+ * gfortran.dg/real8-10.f90: New test.
+ * gfortran.dg/real8-16.f90: New test.
+ * gfortran.dg/real8-4.f90: New test.
+
+2021-03-04 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.misc-tests/outputs.exp: Enumerate tests.
+
+2021-03-04 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.misc-tests/outputs.exp: Append discriminating
+ suffixes to tests with duplicate names.
+ (outest): Assert that each running test has a unique
+ name.
+
+2021-03-04 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/96963
+ PR middle-end/94655
+ * gcc.dg/Wstringop-overflow-47.c: Xfail tests.
+ * gcc.dg/Wstringop-overflow-65.c: New test.
+ * gcc.dg/Warray-bounds-69.c: Same.
+
+2021-03-03 Marek Polacek <polacek@redhat.com>
+
+ PR c++/96474
+ * g++.dg/cpp1z/class-deduction83.C: New test.
+
+2021-03-03 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/vcvt_fXX_fXX.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vcvtx.c:
+ New test.
+
+2021-03-03 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/vmovn_high.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vqmovn_high.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vqmovun_high.c:
+ New test.
+
+2021-03-03 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/vrshrn_high_n.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vshrn_high_n.c:
+ New test.
+
+2021-03-03 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/vXXXhn_high.inc:
+ New test template.
+ * gcc.target/aarch64/advsimd-intrinsics/vaddhn_high.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vraddhn_high.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vrsubhn_high.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vsubhn_high.c:
+ New test.
+
+2021-03-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/82959
+ * g++.dg/cpp1z/eval-order10.C: New test.
+
+2021-03-03 Marek Polacek <polacek@redhat.com>
+
+ PR c++/97034
+ PR c++/99009
+ * g++.dg/cpp1z/class-deduction81.C: New test.
+ * g++.dg/cpp1z/class-deduction82.C: New test.
+ * g++.dg/cpp2a/class-deduction-aggr8.C: New test.
+ * g++.dg/cpp2a/class-deduction-aggr9.C: New test.
+ * g++.dg/cpp2a/class-deduction-aggr10.C: New test.
+
+2021-03-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/95675
+ * g++.dg/cpp0x/decltype-call5.C: New test.
+ * g++.dg/cpp0x/decltype-call6.C: New test.
+
+2021-03-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.target/i386/pr95798-1.c: Add -fomit-frame-pointer to
+ dg-options.
+ * gcc.target/i386/pr95798-2.c: Likewise.
+
+2021-03-03 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99344
+ * g++.dg/modules/namespace-2_a.C
+ * g++.dg/modules/pr99344_a.C
+ * g++.dg/modules/pr99344_b.C
+
+2021-03-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99321
+ * gcc.target/i386/pr99321.c: New test.
+
+2021-03-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/99324
+ * gcc.c-torture/compile/pr99324.c: New test.
+
+2021-03-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99085
+ * gcc.dg/graphite/pr99085.c: New test.
+
+2021-03-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/96078
+ * g++.dg/ext/attr-flatten1.C: New test.
+
+2021-03-02 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.misc-tests/outputs.exp: Skip @file -save-temps
+ tests if target test-framework has -L or -I options.
+
+2021-03-02 David Malcolm <dmalcolm@redhat.com>
+
+ PR c/99323
+ * gcc.dg/pr99323-1.c: New test.
+ * gcc.dg/pr99323-2.c: New test.
+
+2021-03-02 Martin Sebor <msebor@redhat.com>
+
+ PR c++/99251
+ * g++.dg/warn/Wnonnull9.C: Expect no warnings.
+ * g++.dg/warn/Wnonnull12.C: New test.
+
+2021-03-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/limited5.adb: New test.
+
+2021-03-02 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/96443
+ PR c++/96960
+ * g++.dg/concepts/abbrev9.C: New test.
+ * g++.dg/cpp2a/concepts-lambda15.C: New test.
+ * g++.dg/cpp2a/concepts-placeholder3.C: New test.
+ * g++.dg/cpp2a/concepts-return-req2.C: New test.
+ * g++.dg/cpp2a/concepts-ts1.C: Add dg-bogus directive to the
+ call to f15 that we expect to accept.
+
+2021-03-02 Patrick Palka <ppalka@redhat.com>
+
+ * g++.dg/cpp1z/auto1.C: New test.
+
+2021-03-02 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * gcc.target/s390/zvector/vec-nnpa-fp16-convert.c: New test.
+ * gcc.target/s390/zvector/vec-nnpa-fp32-convert-1.c: New test.
+ * gcc.target/s390/zvector/vec_convert_from_fp16.c: New test.
+ * gcc.target/s390/zvector/vec_convert_to_fp16.c: New test.
+ * gcc.target/s390/zvector/vec_extend_to_fp32_hi.c: New test.
+ * gcc.target/s390/zvector/vec_extend_to_fp32_lo.c: New test.
+ * gcc.target/s390/zvector/vec_round_from_fp32.c: New test.
+
+2021-03-02 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * lib/target-supports.exp: Add check for nnpa facility.
+
+2021-03-02 Andreas Krebbel <krebbel@linux.ibm.com>
+
+ * gcc.target/s390/mul-signed-overflow-1.c: Run only on z14.
+ * gcc.target/s390/mul-signed-overflow-2.c: Run only on z14.
+
+2021-03-01 Martin Liska <mliska@suse.cz>
+
+ PR target/99313
+ * gcc.target/s390/target-attribute/pr99313.c: New test.
+
+2021-03-01 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99294
+ * g++.dg/modules/pr99294.h: New.
+ * g++.dg/modules/pr99294_a.C: New.
+ * g++.dg/modules/pr99294_b.C: New.
+
+2021-03-01 Eric Botcazou <ebotcazou@adacore.com>
+
+ * g++.dg/eh/seh-xmm-unwind.C: New test.
+
+2021-02-28 Iain Sandoe <iain@sandoe.co.uk>
+
+ * g++.dg/coroutines/pr94879-folly-1.C: Make final suspend
+ expression components noexcept.
+ * g++.dg/coroutines/pr94883-folly-2.C: Likewise.
+ * g++.dg/coroutines/pr95345.C: Likewise.
+
+2021-02-28 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/ext/attr-lambda3.C: Add missing ;
+
+2021-02-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/90333
+ * g++.dg/ext/attr-lambda3.C: New test.
+
+2021-02-26 Alexandre Oliva <oliva@gnu.org>
+
+ * gcc.target/powerpc/pr67789.c: Revert fpic target requirement
+ duplication.
+ * gcc.target/powerpc/pr83629.c: Likewise.
+ * gcc.target/powerpc/pr84112.c: Likewise.
+
+2021-02-26 Olivier Hainque <hainque@adacore.com>
+
+ * gcc.target/powerpc/compress-float-ppc-pic.c: Add
+ dg-require-effective-target fpic.
+ * gcc.target/powerpc/ppc-eabi.c: Likewise.
+ * gcc.target/powerpc/pr26350.c: Likewise.
+ * gcc.target/powerpc/pr67789.c: Likewise.
+ * gcc.target/powerpc/pr79439-1.c: Likewise.
+ * gcc.target/powerpc/pr79439-2.c: Likewise.
+ * gcc.target/powerpc/pr79439-3.c: Likewise.
+ * gcc.target/powerpc/pr83629.c: Likewise.
+ * gcc.target/powerpc/pr84112.c: Likewise.
+
+2021-02-26 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/99281
+ * g++.dg/pr99218.C: New testcase.
+
+2021-02-26 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/cpp23/lambda-specifiers1.C: New test.
+
+2021-02-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/95451
+ * g++.dg/cpp1y/lambda-generic-95451.C: New test.
+
+2021-02-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/98810
+ * g++.dg/cpp2a/nontype-class-defarg1.C: New test.
+
+2021-02-26 Aaron Sawdey <acsawdey@linux.ibm.com>
+
+ * gcc.target/powerpc/pcrel-opt-inc-di.c: New test.
+ * gcc.target/powerpc/pcrel-opt-ld-df.c: New test.
+ * gcc.target/powerpc/pcrel-opt-ld-di.c: New test.
+ * gcc.target/powerpc/pcrel-opt-ld-hi.c: New test.
+ * gcc.target/powerpc/pcrel-opt-ld-qi.c: New test.
+ * gcc.target/powerpc/pcrel-opt-ld-sf.c: New test.
+ * gcc.target/powerpc/pcrel-opt-ld-si.c: New test.
+ * gcc.target/powerpc/pcrel-opt-ld-vector.c: New test.
+ * gcc.target/powerpc/pcrel-opt-st-df.c: New test.
+ * gcc.target/powerpc/pcrel-opt-st-di.c: New test.
+ * gcc.target/powerpc/pcrel-opt-st-hi.c: New test.
+ * gcc.target/powerpc/pcrel-opt-st-qi.c: New test.
+ * gcc.target/powerpc/pcrel-opt-st-sf.c: New test.
+ * gcc.target/powerpc/pcrel-opt-st-si.c: New test.
+ * gcc.target/powerpc/pcrel-opt-st-vector.c: New test.
+
+2021-02-26 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/98990
+ * g++.dg/concepts/abbrev8.C: New test.
+
+2021-02-25 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99213
+ PR c++/94521
+ * g++.dg/diagnostic/local1.C: New test.
+
+2021-02-25 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/99103
+ * g++.dg/cpp1z/class-deduction79.C: New test.
+ * g++.dg/cpp1z/class-deduction80.C: New test.
+
+2021-02-25 Marek Polacek <polacek@redhat.com>
+
+ DR 1312
+ PR c++/99176
+ * g++.dg/cpp0x/constexpr-nullptr-2.C: Adjust dg-error.
+ * g++.dg/cpp0x/constexpr-cast2.C: New test.
+ * g++.dg/cpp0x/constexpr-cast3.C: New test.
+
+2021-02-25 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/97587
+ * g++.dg/coroutines/coro1-refs-and-ctors.h: Add a CTOR with two
+ reference parms, to distinguish the rvalue ref. variant.
+ * g++.dg/coroutines/pr97587.C: New test.
+
+2021-02-25 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95822
+ * g++.dg/coroutines/pr95822.C: New test.
+
+2021-02-25 Richard Earnshaw <rearnsha@arm.com>
+
+ * gcc.target/arm/cmse/cmse-18.c: New test.
+
+2021-02-25 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99166
+ * g++.dg/modules/pr99166_a.X: Adjust.
+ * g++.dg/modules/pr99166_b.C: Adjust.
+ * g++.dg/modules/pr99166_c.C: Adjust.
+ * g++.dg/modules/pr99166_d.C: Adjust.
+
+2021-02-25 Hans-Peter Nilsson <hp@axis.com>
+
+ * gfortran.dg/pr95690.f90: CRIS error appears on line 5.
+
+2021-02-25 Tamar Christina <tamar.christina@arm.com>
+
+ * g++.dg/vect/simd-complex-num-null-node.cc: New test.
+
+2021-02-25 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR testsuite/99233
+ * gcc.target/powerpc/pr96264.c: Run it only for powerpc64le.
+
+2021-02-25 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR middle-end/97172
+ * gcc.dg/pr97172-2.c: Add dg-require-effective-target shared.
+
+2021-02-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99253
+ * gcc.dg/vect/pr99253.c: New testcase.
+
+2021-02-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/95798
+ * gcc.target/i386/pr95798-1.c: New test.
+ * gcc.target/i386/pr95798-2.c: New test.
+
+2021-02-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/80635
+ * g++.dg/warn/pr80635-1.C: New test.
+ * g++.dg/warn/pr80635-2.C: New test.
+
+2021-02-25 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/99193
+ * gcc.dg/analyzer/pr99193-1.c: New test.
+ * gcc.dg/analyzer/pr99193-2.c: New test.
+ * gcc.dg/analyzer/pr99193-3.c: New test.
+ * gcc.dg/analyzer/realloc-1.c: New test.
+
+2021-02-24 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/98718
+ * g++.dg/modules/pr98718_a.C: New.
+ * g++.dg/modules/pr98718_b.C: New.
+
+2021-02-24 Iain Sandoe <iain@sandoe.co.uk>
+
+ * g++.dg/coroutines/co-await-void_type.C: Mark promise
+ final_suspend call as noexcept.
+ * g++.dg/coroutines/co-return-syntax-08-bad-return.C: Likewise.
+ * g++.dg/coroutines/co-return-syntax-10-movable.C: Likewise.
+ * g++.dg/coroutines/co-return-warning-1.C: Likewise.
+ * g++.dg/coroutines/co-yield-syntax-08-needs-expr.C: Likewise.
+ * g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C: Likewise.
+ * g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C: Likewise.
+ * g++.dg/coroutines/coro-missing-gro.C: Likewise.
+ * g++.dg/coroutines/coro-missing-promise-yield.C: Likewise.
+ * g++.dg/coroutines/coro-missing-ret-value.C: Likewise.
+ * g++.dg/coroutines/coro-missing-ret-void.C: Likewise.
+ * g++.dg/coroutines/coro-missing-ueh.h: Likewise.
+ * g++.dg/coroutines/coro1-allocators.h: Likewise.
+ * g++.dg/coroutines/coro1-refs-and-ctors.h: Likewise.
+ * g++.dg/coroutines/coro1-ret-int-yield-int.h: Likewise.
+ * g++.dg/coroutines/pr94682-preview-this.C: Likewise.
+ * g++.dg/coroutines/pr94752.C: Likewise.
+ * g++.dg/coroutines/pr94760-mismatched-traits-and-promise-prev.C: Likewise.
+ * g++.dg/coroutines/pr94879-folly-1.C: Likewise.
+ * g++.dg/coroutines/pr94883-folly-2.C: Likewise.
+ * g++.dg/coroutines/pr95050.C: Likewise.
+ * g++.dg/coroutines/pr95345.C: Likewise.
+ * g++.dg/coroutines/pr95440.C: Likewise.
+ * g++.dg/coroutines/pr95591.C: Likewise.
+ * g++.dg/coroutines/pr95711.C: Likewise.
+ * g++.dg/coroutines/pr95813.C: Likewise.
+ * g++.dg/coroutines/symmetric-transfer-00-basic.C: Likewise.
+ * g++.dg/coroutines/torture/co-await-07-tmpl.C: Likewise.
+ * g++.dg/coroutines/torture/co-await-17-capture-comp-ref.C: Likewise.
+ * g++.dg/coroutines/torture/co-ret-00-void-return-is-ready.C: Likewise.
+ * g++.dg/coroutines/torture/co-ret-01-void-return-is-suspend.C: Likewise.
+ * g++.dg/coroutines/torture/co-ret-03-different-GRO-type.C: Likewise.
+ * g++.dg/coroutines/torture/co-ret-04-GRO-nontriv.C: Likewise.
+ * g++.dg/coroutines/torture/co-ret-06-template-promise-val-1.C: Likewise.
+ * g++.dg/coroutines/torture/co-ret-08-template-cast-ret.C: Likewise.
+ * g++.dg/coroutines/torture/co-ret-09-bool-await-susp.C: Likewise.
+ * g++.dg/coroutines/torture/co-ret-15-default-return_void.C: Likewise.
+ * g++.dg/coroutines/torture/co-ret-17-void-ret-coro.C: Likewise.
+ * g++.dg/coroutines/torture/co-yield-00-triv.C: Likewise.
+ * g++.dg/coroutines/torture/co-yield-03-tmpl.C: Likewise.
+ * g++.dg/coroutines/torture/co-yield-04-complex-local-state.C: Likewise.
+ * g++.dg/coroutines/torture/exceptions-test-0.C: Likewise.
+ * g++.dg/coroutines/torture/exceptions-test-01-n4849-a.C: Likewise.
+ * g++.dg/coroutines/torture/func-params-04.C: Likewise.
+ * g++.dg/coroutines/torture/local-var-06-structured-binding.C: Likewise.
+ * g++.dg/coroutines/torture/mid-suspend-destruction-0.C: Likewise.
+
+2021-02-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/99226
+ * c-c++-common/gomp/pr99226.c: New test.
+ * gfortran.dg/gomp/pr99226.f90: New test.
+
+2021-02-24 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR inline-asm/99123
+ * gcc.target/i386/pr99123.c: New.
+
+2021-02-24 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.dg/stack-usage-1.c: Adjust for CRIS.
+
+2021-02-24 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99072
+ * g++.dg/modules/pr99072.H: New.
+
+2021-02-24 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/98342
+ * gfortran.dg/assumed_rank_21.f90 : New test.
+
+2021-02-24 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/97172
+ * gcc.dg/pr97172-2.c: New test.
+
+2021-02-24 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/99220
+ * g++.dg/vect/pr99220.cc: New test.
+
+2021-02-24 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/99149
+ * g++.dg/vect/pr99149.cc: Disabled on BE.
+
+2021-02-24 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/96251
+ * g++.dg/coroutines/pr96251.C: New test.
+
+2021-02-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/99225
+ * gcc.c-torture/compile/pr99225.c: New test.
+
+2021-02-24 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/99149
+ * g++.dg/vect/pr99149.cc: New test.
+
+2021-02-24 Richard Biener <rguenther@suse.de>
+
+ PR c/99224
+ * gcc.dg/pr99224.c: New testcase.
+
+2021-02-23 Peter Bergner <bergner@linux.ibm.com>
+
+ * gcc.target/powerpc/mma-builtin-4.c: Add tests for
+ __builtin_vsx_assemble_pair and __builtin_vsx_disassemble_pair.
+ Add __has_builtin tests for built-ins.
+ Update expected instruction counts.
+
+2021-02-23 Martin Sebor <msebor@redhat.com>
+
+ PR c++/99074
+ * g++.dg/warn/Wnonnull11.C: New test.
+
+2021-02-23 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/99124
+ * gfortran.dg/class_defined_operator_2.f03 : New test.
+ * gfortran.dg/elemental_result_2.f90 : New test.
+ * gfortran.dg/class_assign_4.f90: Correct the non-conforming
+ elemental function with an allocatable result with an operator
+ interface with array dummies and result.
+
+2021-02-23 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/99206
+ * gfortran.dg/reshape_zerosize_4.f90: New test.
+
+2021-02-23 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99208
+ * g++.dg/modules/pr99208_a.C: New.
+ * g++.dg/modules/pr99208_b.C: New.
+
+2021-02-23 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/99168
+ * c-c++-common/asan/pr99168.c: New test.
+
+2021-02-23 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/95468
+ * g++.dg/template/non-dependent15.C: New test.
+
+2021-02-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/99204
+ * gfortran.dg/pr99204.f90: New test.
+
+2021-02-23 Kewen Lin <linkw@linux.ibm.com>
+
+ * gcc.target/powerpc/vec-init-10.c: New test.
+
+2021-02-23 Hans-Peter Nilsson <hp@axis.com>
+
+ * g++.dg/warn/Wplacement-new-size-1.C,
+ g++.dg/warn/Wplacement-new-size-2.C,
+ g++.dg/warn/Wplacement-new-size-6.C: Adjust for
+ default_packed targets.
+
+2021-02-22 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/99196
+ * gcc.dg/analyzer/error-1.c: New test.
+ * gcc.dg/analyzer/error-2.c: New test.
+ * gcc.dg/analyzer/error-3.c: New test.
+
+2021-02-22 H.J. Lu <hjl.tools@gmail.com>
+
+ PR testsuite/99173
+ * c-c++-common/attr-retain-5.c: Require R_flag_in_section.
+ * c-c++-common/attr-retain-6.c: Likewise.
+ * c-c++-common/attr-retain-7.c: Likewise.
+ * c-c++-common/attr-retain-8.c: Likewise.
+ * c-c++-common/attr-retain-9.c: Likewise.
+
+2021-02-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/sve/cse_sve_vl_constants_1.c: New test.
+
+2021-02-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * g++.dg/warn/Warray-bounds-10.C, g++.dg/warn/Warray-bounds-11.C,
+ g++.dg/warn/Warray-bounds-12.C, g++.dg/warn/Warray-bounds-13.C:
+ Handle __INT32_TYPE__ being "long int".
+
+2021-02-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.target/cris/biap.c: Add a Y+=X*2 to the Y+=X*4.
+
+2021-02-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.target/cris/biap-mul.c: New test.
+
+2021-02-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.target/cris/torture/sync-reload-mul-1.c: New test.
+
+2021-02-22 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99174
+ * g++.dg/modules/pr99174-1_a.C: New.
+ * g++.dg/modules/pr99174-1_b.C: New.
+ * g++.dg/modules/pr99174-1_c.C: New.
+ * g++.dg/modules/pr99174.H: New.
+
+2021-02-22 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99153
+ * g++.dg/modules/pr99153_a.H: New.
+ * g++.dg/modules/pr99153_b.H: New.
+
+2021-02-22 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ PR rtl-optimization/98791
+ * gcc.target/aarch64/sve/pr98791.c: New test.
+
+2021-02-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/99165
+ * g++.dg/pr99165.C: New testcase.
+
+2021-02-21 Harald Anlauf <anlauf@gmx.de>
+
+ * gfortran.dg/intent_optimize_3.f90: New test.
+
+2021-02-20 David Edelsohn <dje.gcc@gmail.com>
+
+ * c-c++-common/attr-retain-5.c: Skip on AIX.
+ * c-c++-common/attr-retain-6.c: Same.
+ * c-c++-common/attr-retain-7.c: Same.
+ * c-c++-common/attr-retain-8.c: Same.
+ * c-c++-common/attr-retain-9.c: Same.
+
+2021-02-20 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ PR target/99134
+ * gcc.target/s390/vector/long-double-from-decimal128.c: New test.
+ * gcc.target/s390/vector/long-double-from-decimal32.c: New test.
+ * gcc.target/s390/vector/long-double-from-decimal64.c: New test.
+ * gcc.target/s390/vector/long-double-to-decimal128.c: New test.
+ * gcc.target/s390/vector/long-double-to-decimal32.c: New test.
+ * gcc.target/s390/vector/long-double-to-decimal64.c: New test.
+
+2021-02-19 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/98741
+ * g++.dg/modules/pr98741_a.H: New.
+ * g++.dg/modules/pr98741_b.H: New.
+ * g++.dg/modules/pr98741_c.C: New.
+ * g++.dg/modules/pr98741_d.C: New.
+
+2021-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/98686
+ * gfortran.dg/namelist_4.f90: Modify.
+ * gfortran.dg/namelist_98.f90: New test.
+
+2021-02-19 Martin Sebor <msebor@redhat.com>
+
+ PR c/97172
+ * gcc.dg/pr97172.c: Add test cases.
+
+2021-02-19 Nathan Sidwell <nathan@acm.org>
+
+ * g++.dg/modules/pr99166_a.X: New.
+ * g++.dg/modules/pr99166_b.C: New.
+ * g++.dg/modules/pr99166_c.C: New.
+ * g++.dg/modules/pr99166_d.C: New.
+
+2021-02-19 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/99010
+ * gfortran.dg/coarray/array_temporary-1.f90: New test.
+
+2021-02-19 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/99146
+ * gfortran.dg/dtio_36.f90: New test.
+
+2021-02-19 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/99122
+ * gcc.dg/pr99122-3.c: New testcase.
+
+2021-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/98998
+ * gcc.target/arm/pure-code/pr98998.c: New test.
+
+2021-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/99034
+ * g++.dg/opt/pr99034.C: New test.
+
+2021-02-19 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/99027
+ * gfortran.dg/ubound_1.f90: New test.
+
+2021-02-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ PR target/98657
+ * gcc.target/aarch64/sve/pr98657.c: New test.
+
+2021-02-19 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/decltype64.C: Change argument to const&.
+
+2021-02-19 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/99126
+ * jit.dg/test-trap.c: New test.
+
+2021-02-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/96926
+ * g++.dg/cpp0x/overload4.C: New test.
+
+2021-02-18 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/96264
+ * gcc.target/powerpc/pr96264.c: New.
+
+2021-02-18 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/99113
+ * c-c++-common/attr-retain-1.c: New test.
+ * c-c++-common/attr-retain-2.c: Likewise.
+ * c-c++-common/attr-retain-3.c: Likewise.
+ * c-c++-common/attr-retain-4.c: Likewise.
+ * c-c++-common/attr-retain-5.c: Likewise.
+ * c-c++-common/attr-retain-6.c: Likewise.
+ * c-c++-common/attr-retain-7.c: Likewise.
+ * c-c++-common/attr-retain-8.c: Likewise.
+ * c-c++-common/attr-retain-9.c: Likewise.
+ * c-c++-common/pr99113.c: Likewise.
+ * gcc.c-torture/compile/attr-retain-1.c: Likewise.
+ * gcc.c-torture/compile/attr-retain-2.c: Likewise.
+ * c-c++-common/attr-used.c: Don't expect SHF_GNU_RETAIN section.
+ * c-c++-common/attr-used-2.c: Likewise.
+ * c-c++-common/attr-used-3.c: Likewise.
+ * c-c++-common/attr-used-4.c: Likewise.
+ * c-c++-common/attr-used-9.c: Likewise.
+ * gcc.c-torture/compile/attr-used-retain-1.c: Likewise.
+ * gcc.c-torture/compile/attr-used-retain-2.c: Likewise.
+ * c-c++-common/attr-used-5.c: Don't expect warning for the used
+ attribute nor SHF_GNU_RETAIN section.
+ * c-c++-common/attr-used-6.c: Likewise.
+ * c-c++-common/attr-used-7.c: Likewise.
+ * c-c++-common/attr-used-8.c: Likewise.
+
+2021-02-18 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99023
+ * g++.dg/modules/modules.exp: Bail on cross-testing. Add support
+ for .X files.
+ * g++.dg/modules/pr99023_a.X: New.
+ * g++.dg/modules/pr99023_b.X: New.
+
+2021-02-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/99136
+ * gcc.dg/pr99136.c: New test.
+
+2021-02-18 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99023
+ * g++.dg/modules/modules.exp: Remove dg-module-headers support
+ * g++.dg/modules/alias-2_a.H: Delete.
+ * g++.dg/modules/sys/alias-2_a.H: Delete.
+
+2021-02-18 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99150
+ * g++.dg/modules/pr99023_a.H: Delete.
+ * g++.dg/modules/pr99023_b.H: Delete.
+
+2021-02-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99132
+ * g++.dg/cpp2a/constexpr-virtual18.C: New test.
+
+2021-02-18 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/99122
+ * gcc.dg/pr99122-1.c: New testcase.
+ * gcc.dg/pr99122-2.c: Likewise.
+
+2021-02-18 Hans-Peter Nilsson <hp@axis.com>
+
+ PR tree-optimization/99142
+ * gcc.dg/tree-ssa/pr99142.c: New test.
+
+2021-02-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/99109
+ * g++.dg/warn/Warray-bounds-17.C: New test.
+
+2021-02-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99104
+ * gcc.dg/pr99104.c: New test.
+
+2021-02-17 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/94596
+ * gcc.dg/analyzer/pr94596.c: New test.
+
+2021-02-17 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99023
+ * g++.dg/modules/pr99023_a.H: New.
+ * g++.dg/modules/pr99023_b.H: New.
+
+2021-02-17 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/98969
+ * g++.dg/analyzer/pr99064.C: Convert dg-bogus to dg-warning.
+ * gcc.dg/analyzer/pr96841.c: Add -Wno-analyzer-too-complex to
+ options. Remove false leak directive.
+ * gcc.dg/analyzer/pr98969.c (test_1): Remove xfail from leak
+ false positive.
+ (test_3): New.
+
+2021-02-17 Julian Brown <julian@codesourcery.com>
+
+ * gfortran.dg/goacc/array-with-dt-2.f90: Remove expected errors.
+ * gfortran.dg/goacc/array-with-dt-6.f90: New test.
+ * gfortran.dg/goacc/mapping-tests-2.f90: Update expected error.
+ * gfortran.dg/goacc/ref_inquiry.f90: Update expected errors.
+ * gfortran.dg/gomp/ref_inquiry.f90: Likewise.
+
+2021-02-17 Julian Brown <julian@codesourcery.com>
+
+ * gfortran.dg/goacc/array-with-dt-1.f90: New test.
+ * gfortran.dg/goacc/array-with-dt-3.f90: Likewise.
+ * gfortran.dg/goacc/array-with-dt-4.f90: Likewise.
+ * gfortran.dg/goacc/array-with-dt-5.f90: Likewise.
+ * gfortran.dg/goacc/derived-chartypes-1.f90: Re-enable test.
+ * gfortran.dg/goacc/derived-chartypes-2.f90: Likewise.
+ * gfortran.dg/goacc/derived-classtypes-1.f95: Uncomment
+ previously-broken directives.
+
+2021-02-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/99106
+ * g++.dg/ubsan/pr99106.C: New test.
+
+2021-02-17 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99116
+ * g++.dg/lookup/pr99116-1.C: New.
+ * g++.dg/lookup/pr99116-2.C: New.
+
+2021-02-17 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99071
+ * g++.dg/modules/pr99071_a.H: New.
+ * g++.dg/modules/pr99071_b.H: New.
+
+2021-02-17 Patrick Palka <ppalka@redhat.com>
+
+ PR debug/96997
+ PR c++/94034
+ * g++.dg/cpp1y/constexpr-nsdmi7b.C: Adjust expected location of
+ "call to non-'constexpr' function" error message.
+
+2021-02-16 Nathan Sidwell <nathan@acm.org>
+
+ * g++.dg/modules/pr99050_a.H: New.
+ * g++.dg/modules/pr99050_b.C: New.
+
+2021-02-16 Marek Polacek <polacek@redhat.com>
+
+ PR c++/99062
+ * gcc.dg/attr-assume_aligned-4.c: Adjust dg-warning.
+ * g++.dg/ext/attr-assume-aligned.C: New test.
+
+2021-02-16 YunQiang Su <yunqiang.su@cipunited.com>
+
+ * gcc.target/mips/compact-branches-5.c: Force -fno-PIC.
+ * gcc.target/mips/compact-branches-6.c: Force -fno-PIC.
+
+2021-02-16 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/goacc/ref_inquiry.f90: New test.
+ * gfortran.dg/gomp/ref_inquiry.f90: New test.
+
+2021-02-16 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR inline-asm/98096
+ * gcc.c-torture/compile/pr98096.c: New.
+
+2021-02-16 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/99111
+ * gfortran.dg/fmt_nonchar_1.f90: New test.
+ * gfortran.dg/fmt_nonchar_2.f90: New test.
+
+2021-02-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99100
+ * gcc.target/i386/pr99100.c: New test.
+
+2021-02-16 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.misc-tests/outputs.exp (outest): Fix typo "is_target".
+
+2021-02-15 Peter Bergner <bergner@linux.ibm.com>
+
+ PR rtl-optimization/98872
+ * gcc.target/powerpc/pr98872.c: New test.
+
+2021-02-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/99079
+ * gcc.dg/fold-modpow2-2.c: New test.
+ * gcc.c-torture/execute/pr99079.c: New test.
+
+2021-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/98439
+ * gcc.target/i386/pr98439.c: New test.
+
+2021-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/96166
+ * gcc.target/i386/pr96166.c: New test.
+
+2021-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/rtl/aarch64/multi-subreg-1.c: Add dg-do compile directive
+ and restrict the test to aarch64-*-* target only.
+
+2021-02-12 Nathan Sidwell <nathan@acm.org>
+
+ * g++.dg/modules/pr99039_a.C: New.
+ * g++.dg/modules/pr99039_b.C: New.
+
+2021-02-12 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99040
+ * g++.dg/modules/pr99040_a.C: New.
+ * g++.dg/modules/pr99040_b.C: New.
+ * g++.dg/modules/pr99040_c.C: New.
+ * g++.dg/modules/pr99040_d.C: New.
+
+2021-02-12 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99039
+ PR c++/99040
+ * g++.dg/lookup/pr99039.C: New.
+
+2021-02-12 Steve Kargl <sgk@troutmask.apl.washington.edu>
+
+ PR libfortran/95647
+ * gfortran.dg/ieee/ieee_12.f90: New test.
+
+2021-02-12 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/rtl/aarch64/multi-subreg-1.c: New test.
+
+2021-02-12 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/98931
+ * gcc.target/arm/pr98931.c: Add -mthumb
+
+2021-02-12 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/99043
+ * gfortran.dg/assumed_rank_20.f90: New test.
+
+2021-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/97742
+ * g++.dg/cpp2a/concepts-requires24.C: New test.
+
+2021-02-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/97246
+ * g++.dg/cpp2a/lambda-generic-variadic21.C: New test.
+
+2021-02-12 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/98969
+ * g++.dg/analyzer/pr99064.C: New test.
+ * gcc.dg/analyzer/pr98969.c: New test.
+
+2021-02-11 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95888
+ * g++.dg/template/deduce10.C: New test.
+ * g++.dg/template/deduce9.C: New test.
+
+2021-02-11 Peter Bergner <bergner@linux.ibm.com>
+
+ PR target/99041
+ * g++.target/powerpc/pr99041.C: New test.
+
+2021-02-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99033
+ * g++.dg/ext/flexary38.C: New test.
+
+2021-02-11 Marek Polacek <polacek@redhat.com>
+
+ PR c++/99063
+ * g++.dg/cpp0x/variadic-crash6.C: New test.
+
+2021-02-11 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/97582
+ * g++.dg/cpp0x/lambda/lambda-template17.C: New test.
+
+2021-02-11 Andrea Corallo <andrea.corallo@arm.com>
+
+ PR target/98931
+ * gcc.target/arm/pr98931.c: New testcase.
+
+2021-02-11 Joel Hutton <joel.hutton@arm.com>
+
+ PR tree-optimization/98772
+ * gcc.target/aarch64/pr98772.c: New test.
+
+2021-02-11 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/98897
+ * gfortran.dg/typebound_call_32.f90: New test.
+
+2021-02-11 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/99060
+ * gfortran.dg/pr99060.f90: New test.
+
+2021-02-11 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.target/arm/simd/vmmla_1.c: Pass -mfpu=auto.
+
+2021-02-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/98825
+ * gfortran.dg/dollar_edit_descriptor_4.f: New test.
+
+2021-02-10 Martin Sebor <msebor@redhat.com>
+
+ PR tree-optimization/92879
+ * g++.dg/warn/Warray-bounds-16.C: New test.
+
+2021-02-10 David Malcolm <dmalcolm@redhat.com>
+
+ PR preprocessor/96391
+ * g++.dg/plugin/location-overflow-test-pr96391.c: New test.
+ * g++.dg/plugin/plugin.exp (plugin_test_list): Add it,
+ using the location_overflow_plugin.c from gcc.dg/plugin.
+
+2021-02-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/99035
+ * g++.dg/ext/weak6.C: New test.
+
+2021-02-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/99025
+ * gcc.target/i386/pr99025.c: New test.
+
+2021-02-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/98988
+ PR c++/99031
+ * g++.dg/cpp2a/constexpr-new16.C: New test.
+ * g++.dg/cpp2a/constexpr-new17.C: New test.
+
+2021-02-10 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/99030
+ * g++.dg/lookup/pr99030.C: New.
+
+2021-02-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/99007
+ * g++.dg/gomp/pr99007.C: New test.
+ * gcc.dg/gomp/pr99007-1.c: New test.
+ * gcc.dg/gomp/pr99007-2.c: New test.
+ * gcc.dg/gomp/pr99007-3.c: New test.
+
+2021-02-10 Julian Brown <julian@codesourcery.com>
+
+ PR fortran/98979
+ * gfortran.dg/goacc/array-with-dt-2.f90: Add expected errors.
+ * gfortran.dg/goacc/derived-chartypes-1.f90: Skip ICEing test.
+ * gfortran.dg/goacc/derived-chartypes-2.f90: Likewise.
+
+2021-02-09 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/98575
+ * gcc.dg/analyzer/file-1.c (test_5): New.
+ * gcc.dg/analyzer/file-3.c: New test.
+
+2021-02-09 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/98575
+ * gcc.dg/analyzer/explode-1.c: Remove expected leak warning.
+ * gcc.dg/analyzer/pr94851-2.c: New test.
+ * gcc.dg/analyzer/pr98575-1.c: New test.
+
+2021-02-09 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ * gcc.target/aarch64/asimd-mul-to-shl-sub.c: New test.
+
+2021-02-09 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/vpXXXq.inc:
+ New test template.
+ * gcc.target/aarch64/advsimd-intrinsics/vpaddq.c: New test.
+
+2021-02-09 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/98944
+ * g++.dg/modules/pr98944_a.C: New.
+ * g++.dg/modules/pr98944_b.C: New.
+ * g++.dg/modules/pr98944_c.C: New.
+ * g++.dg/modules/pr98944_d.C: New.
+
+2021-02-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/98465
+ * g++.dg/warn/Wstringop-overread-1.C: New test.
+
+2021-02-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/96905
+ * g++.dg/cpp2a/consteval-expinst1.C: New test.
+
+2021-02-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/98326
+ * g++.dg/cpp1y/lambda-generic-empty1.C: New test.
+
+2021-02-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/98994
+ * g++.dg/cpp2a/no_unique_address12.C: New test.
+
+2021-02-08 Nathan Sidwell <nathan@acm.org>
+
+ * g++.dg/modules/pr98531-2.h: New.
+ * g++.dg/modules/pr98531-2_a.H: New.
+ * g++.dg/modules/pr98531-2_b.C: New.
+ * g++.dg/modules/pr98531-3.h: New.
+ * g++.dg/modules/pr98531-3_a.H: New.
+ * g++.dg/modules/pr98531-3_b.C: New.
+
+2021-02-08 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/98531
+ * g++.dg/modules/pr98531-1.h: New.
+ * g++.dg/modules/pr98531-1_a.H: New.
+ * g++.dg/modules/pr98531-1_b.C: New.
+ * g++.dg/abi/pr98531-1.C: New.
+ * g++.dg/abi/pr98531-2.C: New.
+ * g++.dg/abi/pr98531-3.C: New.
+ * g++.dg/abi/pr98531-4.C: New.
+
+2021-02-08 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ PR middle-end/98974
+ * gfortran.dg/pr98974.F90: New test.
+
+2021-02-08 Richard Biener <rguenther@suse.de>
+
+ PR lto/96591
+ * g++.dg/lto/pr96591_0.C: New testcase.
+
+2021-02-05 Marek Polacek <polacek@redhat.com>
+
+ PR c++/98947
+ * g++.dg/cpp2a/volatile5.C: New test.
+
+2021-02-05 Marek Polacek <polacek@redhat.com>
+
+ PR c++/96462
+ * g++.dg/cpp2a/using-enum-8.C: New test.
+
+2021-02-05 Nathan Sidwell <nathan@acm.org>
+
+ PR driver/98943
+ * c-c++-common/pr98943.c: New.
+
+2021-02-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98855
+ * g++.dg/vect/slp-pr98855.cc: New testcase.
+
+2021-02-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/97878
+ * g++.dg/cpp1z/decomp54.C: New test.
+
+2021-02-05 liuhongt <hongtao.liu@intel.com>
+
+ PR target/98537
+ * g++.target/i386/avx512bw-pr98537-1.C: New test.
+ * g++.target/i386/avx512vl-pr98537-1.C: New test.
+ * g++.target/i386/avx512vl-pr98537-2.C: New test.
+ * gcc.target/i386/avx512vl-pr88547-1.c: Adjust testcase,
+ integer mask comparison should not be generated.
+ * gcc.target/i386/avx512vl-pr92686-vpcmp-1.c: Remove.
+ * gcc.target/i386/avx512vl-pr92686-vpcmp-2.c: Ditto.
+ * gcc.target/i386/avx512vl-pr92686-vpcmp-intelasm-1.c: Ditto.
+
+2021-02-04 Julian Brown <julian@codesourcery.com>
+
+ * gfortran.dg/goacc/derived-chartypes-1.f90: New test.
+ * gfortran.dg/goacc/derived-chartypes-2.f90: Likewise.
+ * gfortran.dg/goacc/derived-chartypes-3.f90: Likewise.
+ * gfortran.dg/goacc/derived-chartypes-4.f90: Likewise.
+
+2021-02-04 Julian Brown <julian@codesourcery.com>
+
+ * gfortran.dg/goacc/array-with-dt-2.f90: New test.
+
+2021-02-04 Julian Brown <julian@codesourcery.com>
+
+ * gfortran.dg/goacc/derived-classtypes-1.f95: New test.
+
+2021-02-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/98325
+ * lib/scanasm.exp (dg-scan-symbol-section): For powerpc*-*-* targets if
+ $section is .opd, look at .L.$symbol_name's section.
+ (parse_section_section_of_symbols): Handle .previous directive.
+ * gcc.dg/array-quals-1.c: Allow .sdata section.
+
+2021-02-04 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * gdc.dg/intrinsics.d: Update test.
+
+2021-02-04 Martin Sebor <msebor@redhat.com>
+
+ PR c/97882
+ * gcc.dg/decl-8.c: Adjust text of expected diagnostic.
+ * gcc.dg/label-decl-4.c: Same.
+ * gcc.dg/mismatch-decl-1.c: Same.
+ * gcc.dg/old-style-then-proto-1.c: Same.
+ * gcc.dg/parm-mismatch-1.c: Same.
+ * gcc.dg/pr35445.c: Same.
+ * gcc.dg/redecl-11.c: Same.
+ * gcc.dg/redecl-12.c: Same.
+ * gcc.dg/redecl-13.c: Same.
+ * gcc.dg/redecl-15.c: Same.
+ * gcc.dg/tls/thr-init-1.c: Same.
+ * objc.dg/id-1.m: Same.
+ * objc.dg/tls/diag-3.m: Same.
+ * gcc.dg/pr97882.c: New test.
+ * gcc.dg/qual-return-7.c: New test.
+ * gcc.dg/qual-return-8.c: New test.
+
+2021-02-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/98717
+ * g++.dg/cpp2a/concepts-variadic3.C: New test.
+
+2021-02-04 David Malcolm <dmalcolm@redhat.com>
+
+ PR c/97932
+ * gcc.dg/pr97932.c: New test.
+
+2021-02-04 emsr <3dw4rd@verizon.net>
+
+ * g++.dg/cpp23/feat-cxx2b.C: __cpp_size_t_suffix == 202011.
+
+2021-02-04 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/warn/Wsize_t-literals.C: Expect make_signed_t<size_t> instead
+ of make_signed<size_t>::type in the diagnostics.
+
+2021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com>
+
+ PR c++/90926
+ * g++.dg/cpp1y/nsdmi-aggr12.C: New test.
+
+2021-02-04 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/goacc/substring.f90: New test.
+ * gfortran.dg/gomp/substring.f90: New test.
+
+2021-02-04 Martin Liska <mliska@suse.cz>
+
+ * gcc.target/i386/prefer-vector-width-attr.c: New test.
+
+2021-02-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/98802
+ * g++.dg/cpp1z/class-deduction78.C: New test.
+
+2021-02-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/95192
+ * g++.dg/cpp0x/pr84630.C: Call b().
+ * g++.dg/cpp2a/lambda-uneval13.C: New test.
+ * g++.dg/ext/attr-expr1.C: New test.
+
+2021-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/98882
+ * gcc.dg/cpp/pr98882.c: New test.
+
+2021-02-03 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/alias-decl-dr1558.C: Pass --param
+ hash-table-verification-limit=10000.
+
+2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
+
+ * g++.dg/cpp0x/udlit-shadow-neg.C: Test for 'z' and 'zu' shadowing.
+ * g++.dg/cpp23/feat-cxx2b.C: New test.
+ * g++.dg/cpp23/size_t-literals.C: New test.
+ * g++.dg/warn/Wsize_t-literals.C: New test.
+
+2021-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/97804
+ * g++.dg/cpp2a/no_unique_address11.C: New test.
+
+2021-02-03 Marek Polacek <polacek@redhat.com>
+
+ PR c++/98899
+ * g++.dg/cpp0x/noexcept65.C: New test.
+
+2021-02-03 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/98913
+ * gfortran.dg/coarray/array_temporary.f90: New test.
+
+2021-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/97487
+ * gcc.dg/pr97487-1.c: New test.
+ * gcc.dg/pr97487-2.c: New test.
+
+2021-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/97971
+ * gcc.target/i386/pr97971.c: New test.
+
+2021-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/98287
+ * gcc.dg/pr98287.c: New test.
+
+2021-02-03 Tamar Christina <tamar.christina@arm.com>
+
+ PR tree-optimization/98928
+ * gcc.target/i386/pr98928.c: New test.
+
+2021-02-02 Martin Liska <mliska@suse.cz>
+
+ PR target/97510
+ * gcc.target/i386/pr97510.c: New test.
+
+2021-02-02 Jason Merrill <jason@redhat.com>
+
+ PR c++/98929
+ * g++.dg/cpp1z/class-deduction-decltype1.C: New test.
+
+2021-02-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/narrow_high-intrinsics.c: Adjust sqxtun2 scan.
+
+2021-02-02 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/91862
+ * gfortran.dg/pr91862.f90: New test.
+
+2021-02-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/arg-type-diagnostics-1.c: Return result from foo.
+
+2021-02-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/98848
+ * gcc.dg/vect/pr98848.c: New test.
+ * gcc.dg/vect/pr92205.c: Remove xfail.
+
+2021-02-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/97960
+ * g++.dg/torture/pr97960.C: New test.
+
+2021-02-02 Kito Cheng <kito.cheng@sifive.com>
+
+ PR target/98743
+ * g++.dg/opt/pr98743.C: New.
+
+2021-02-02 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vorn.c: Add vorn tests.
+
+2021-02-02 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.dg/asan/nested-1.c: New.
+
+2021-02-02 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/93355
+ PR analyzer/96374
+ * gcc.dg/analyzer/conditionals-3.c: Add "__analyzer_"
+ prefix to support subroutines where necessary.
+ * gcc.dg/analyzer/data-model-1.c: Likewise.
+ * gcc.dg/analyzer/feasibility-1.c (called_by_test_6a): New.
+ (test_6a): New.
+ * gcc.dg/analyzer/params.c: Add "__analyzer_" prefix to support
+ subroutines where necessary.
+ * gcc.dg/analyzer/pr96651-2.c: Likewise.
+ * gcc.dg/analyzer/signal-4b.c: Likewise.
+ * gcc.dg/analyzer/single-field.c: Likewise.
+ * gcc.dg/analyzer/torture/conditionals-2.c: Likewise.
+
+2021-02-02 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/93355
+ PR analyzer/96374
+ * gcc.dg/analyzer/pr93355-localealias-feasibility-2.c: New test.
+ * gcc.dg/analyzer/pr93355-localealias-feasibility-3.c: New test.
+
+2021-02-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/narrow_high-intrinsics.c: Adjust rshrn2
+ assembly scan.
+
+2021-02-01 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/98918
+ * gcc.dg/analyzer/pr98918.c: New test.
+
+2021-02-01 Sergei Trofimovich <siarheit@google.com>
+
+ PR tree-optimization/98499
+ * g++.dg/pr98499.C: new test.
+
+2021-02-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/simd/vmovl_high_1.c: New test.
+
+2021-02-01 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/97172
+ * gcc.dg/pr97172.c: New test.
+
+2021-02-01 Martin Sebor <msebor@redhat.com>
+
+ PR c++/98835
+ * g++.dg/Wclass-memaccess-6.C: New test.
+
+2021-02-01 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/98295
+ * g++.dg/cpp0x/constexpr-98295.C: New test.
+
+2021-02-01 Marek Polacek <polacek@redhat.com>
+
+ PR c++/98355
+ * g++.dg/ext/builtin-has-attribute2.C: New test.
+
+2021-02-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/98570
+ * g++.dg/cpp0x/alias-decl-targ1.C: New test.
+
+2021-02-01 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/vmlXl_high.inc:
+ New test template.
+ * gcc.target/aarch64/advsimd-intrinsics/vmlXl_high_lane.inc:
+ New test template.
+ * gcc.target/aarch64/advsimd-intrinsics/vmlXl_high_laneq.inc:
+ New test template.
+ * gcc.target/aarch64/advsimd-intrinsics/vmlXl_high_n.inc:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vmlal_high.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vmlal_high_lane.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vmlal_high_laneq.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vmlal_high_n.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vmlsl_high.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vmlsl_high_lane.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vmlsl_high_laneq.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vmlsl_high_n.c:
+ New test.
+
+2021-02-01 Jonathan Wright <jonathan.wright@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/vmull_high.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vmull_high_lane.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vmull_high_laneq.c:
+ New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vmull_high_n.c:
+ New test.
+
+2021-02-01 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/smlal-smlsl-mull-optimized.c: New test.
+
+2021-02-01 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/84494
+ * g++.dg/cpp1y/constexpr-84494.C: New test.
+
+2021-02-01 Xing GUO <higuoxing@gmail.com>
+
+ * gcc.target/riscv/attribute-18.c: Add -mriscv-attribute option.
+
+2021-02-01 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ * gcc.target/powerpc/pr79251.p8.c: Update store count regex.
+ * gcc.target/powerpc/pr79251.p9.c: Likewise.
+
+2021-01-31 Iain Sandoe <iain@sandoe.co.uk>
+
+ * c-c++-common/attr-used-5.c: Skip for Darwin.
+ * c-c++-common/attr-used-6.c: Likewise.
+ * c-c++-common/attr-used-7.c: Likewise.
+ * c-c++-common/attr-used-8.c: Likewise.
+ * c-c++-common/attr-used-9.c: Likewise.
+
+2021-01-30 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/pr79251.p8.c: Update ilp32 store counts.
+ * gcc.target/powerpc/pr79251.p9.c: Same.
+
+2021-01-30 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/i386/20051216-1.c: New test.
+
+2021-01-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/98243
+ * gcc.dg/gomp/simd-2.c: Add -msse2 on x86. Restrict
+ scan-tree-dump-times to x86 and aarch64 targets.
+ * gcc.dg/gomp/simd-3.c: Likewise.
+
+2021-01-29 Michael Meissner <meissner@linux.ibm.com>
+
+ PR testsuite/98870
+ * gcc.target/powerpc/ppc-fortran/ieee128-math.f90: Fix the
+ expected result.
+
+2021-01-29 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * gcc.target/powerpc/pr91903.c: Fix dg-require stanza.
+
+2021-01-29 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR target/97701
+ * gcc.target/aarch64/pr97701.c: Modify.
+
+2021-01-29 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/combined-conditionals-1.c: New test.
+
+2021-01-29 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR target/97701
+ * gcc.target/aarch64/pr97701.c: New.
+
+2021-01-29 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * gcc.target/powerpc/pr91903.c: New test.
+ * gcc.target/powerpc/builtins-1.fold.h: Update.
+ * gcc.target/powerpc/builtins-2.c: Update.
+
+2021-01-29 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/98843
+ * g++.dg/modules/pr98843_a.C: New.
+ * g++.dg/modules/pr98843_b.H: New.
+ * g++.dg/modules/pr98843_c.C: New.
+
+2021-01-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/simd/vaddlv_1.c: New test.
+
+2021-01-29 Bin Cheng <bin.cheng@linux.alibaba.com>
+ Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/97627
+ * g++.dg/pr97627.C: New testcase.
+
+2021-01-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/98849
+ * gcc.c-torture/compile/pr98849.c: New test.
+
+2021-01-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/98331
+ * gcc.dg/pr98331.c: New test.
+
+2021-01-29 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ * gcc.target/powerpc/pr79251.p8.c: Move TEST_VEC_INSERT_ALL
+ to ...
+ * gcc.target/powerpc/pr79251.h: ...this.
+ * gcc.target/powerpc/pr79251.p9.c: Likewise.
+ * gcc.target/powerpc/pr79251-run.c: Move run_test to pr79251.h.
+ Rename to...
+ * gcc.target/powerpc/pr79251-run.p8.c: ...this.
+ * gcc.target/powerpc/pr79251-run.p9.c: New test.
+
+2021-01-29 Marek Polacek <polacek@redhat.com>
+
+ PR c++/96137
+ * g++.dg/parse/error63.C: New test.
+
+2021-01-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/98841
+ * g++.dg/warn/effc5.C: New test.
+
+2021-01-28 Marek Polacek <polacek@redhat.com>
+
+ PR c++/94775
+ * g++.dg/cpp0x/alignas19.C: New test.
+ * g++.dg/warn/Warray-bounds15.C: New test.
+
+2021-01-28 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/98730
+ * gcc.target/arm/simd/vceqzq_p64.c: Update expected result.
+
+2021-01-28 David Edelsohn <dje.gcc@gmail.com>
+
+ * gfortran.dg/ISO_Fortran_binding_18.c: Include
+ ../../../libgfortran/ISO_Fortran_binding.h rather than
+ ISO_Fortran_binding.h.
+
+2021-01-28 Michael Meissner <meissner@linux.ibm.com>
+
+ * gcc.target/powerpc/float128-longdouble-math.c: New test.
+ * gcc.target/powerpc/float128-longdouble-stdio.c: New test.
+ * gcc.target/powerpc/float128-math.c: Adjust test for new name
+ being generated. Add support for running test on power10. Add
+ support for running if long double defaults to 64-bits.
+
+2021-01-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/33661
+ PR c++/98847
+ * g++.target/i386/pr98847.C: New test.
+
+2021-01-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/narrow_high-intrinsics.c: Fix shrn2 scan.
+
+2021-01-28 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/98770
+ * g++.dg/modules/pr98770_a.C: New.
+ * g++.dg/modules/pr98770_b.C: New.
+
+2021-01-28 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/86470
+ * gfortran.dg/gomp/pr86470.f90: New test.
+
+2021-01-28 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ PR target/98827
+ * gcc.target/powerpc/fold-vec-insert-char-p8.c: Adjust ilp32.
+ * gcc.target/powerpc/fold-vec-insert-char-p9.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-double.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-float-p8.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-float-p9.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-int-p8.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-int-p9.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-longlong.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-short-p8.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-short-p9.c: Likewise.
+ * gcc.target/powerpc/pr79251.p8.c: Likewise.
+ * gcc.target/powerpc/pr79251.p9.c: Likewise.
+ * gcc.target/powerpc/vsx-builtin-7.c: Likewise.
+ * gcc.target/powerpc/pr79251-run.c: Build and run with vsx
+ option.
+
+2021-01-28 Xing GUO <higuoxing@gmail.com>
+
+ * gcc.target/riscv/attribute-18.c: New test.
+
+2021-01-27 Harris Snyder <hsnyder@structura.bio>
+
+ * gfortran.dg/ISO_Fortran_binding_18.c: New test.
+ * gfortran.dg/ISO_Fortran_binding_18.f90: New test.
+
+2021-01-27 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/97684
+ * gcc.target/i386/pr97684.c: New.
+
+2021-01-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/97874
+ * g++.dg/lookup/using4.C: No error in C++20.
+ * g++.dg/cpp0x/decltype37.C: Adjust message.
+ * g++.dg/template/crash75.C: Adjust message.
+ * g++.dg/template/crash76.C: Adjust message.
+ * g++.dg/cpp0x/inh-ctor36.C: New test.
+ * g++.dg/cpp1z/inh-ctor39.C: New test.
+ * g++.dg/cpp2a/using-enum-7.C: New test.
+
+2021-01-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/98853
+ * gcc.c-torture/execute/pr98853-1.c: New test.
+ * gcc.c-torture/execute/pr98853-2.c: New test.
+
+2021-01-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98854
+ * gcc.dg/vect/bb-slp-pr98854.c: New testcase.
+
+2021-01-27 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/93924
+ PR fortran/93925
+ * gfortran.dg/proc_ptr_52.f90 : New test.
+
+2021-01-27 liuhongt <hongtao.liu@intel.com>
+
+ PR target/98833
+ * gcc.target/i386/pr98833.c: New test.
+
+2021-01-27 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/i386/m128-check.h (CHECK_EXP): Remove
+ optimize ("no-strict-aliasing") attribute.
+ * gcc.target/i386/sse-andnps-1.c (TEST): Copy e into float[4]
+ array to avoid violating TBAA.
+ * gcc.target/i386/sse2-andpd-1.c (TEST): Copy e.d into double[2]
+ array to avoid violating TBAA.
+ * gcc.target/i386/sse-andps-1.c (TEST): Copy e.f into float[4]
+ array to avoid violating TBAA.
+ * gcc.target/i386/sse2-andnpd-1.c (TEST): Copy e into double[2]
+ array to avoid violating TBAA.
+
+2021-01-27 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/98472
+ * gfortran.dg/elemental_function_5.f90 : New test.
+
+2021-01-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/97260
+ * gcc.dg/tree-ssa/pr97260.c: New test.
+
+2021-01-26 Paul Fee <paul.f.fee@gmail.com>
+
+ * lib/target-supports.exp (check_effective_target_c++2a):
+ Check for C++2a or C++23.
+ (check_effective_target_c++20_down): New.
+ (check_effective_target_c++23_only): New.
+ (check_effective_target_c++23): New.
+ * g++.dg/cpp23/cplusplus.C: New.
+
+2021-01-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/97474
+ * g++.dg/torture/pr97474.C: New test.
+
+2021-01-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/97566
+ * g++.dg/cpp2a/no_unique_address10.C: New test.
+ * g++.dg/cpp2a/no_unique_address9.C: New test.
+
+2021-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/powerpc/m128-check.h (CHECK_EXP): Remove
+ optimize ("no-strict-aliasing") attribute.
+ * gcc.target/powerpc/sse-andnps-1.c (TEST): Copy e into float[4]
+ array to avoid violating TBAA.
+ * gcc.target/powerpc/sse2-andpd-1.c (TEST): Copy e.d into double[2]
+ array to avoid violating TBAA.
+ * gcc.target/powerpc/sse-andps-1.c (TEST): Copy e.f into float[4]
+ array to avoid violating TBAA.
+ * gcc.target/powerpc/sse2-andnpd-1.c (TEST): Copy e into double[2]
+ array to avoid violating TBAA.
+
+2021-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/98681
+ * gcc.c-torture/execute/pr98681.c: New test.
+
+2021-01-26 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/67539
+ * gfortran.dg/elemental_assignment_1.f90: New test.
+
+2021-01-26 Tobias Burnus <tobias@codesourcery.com>
+
+ * g++.dg/modules/modules.exp: Remove unused CXX_MODULE_PATH;
+ add previously missing space in '$ident link'.
+
+2021-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/98807
+ * gcc.dg/pr98807.c: Add -Wno-psabi -w to dg-options.
+
+2021-01-26 Alexandre Oliva <oliva@adacore.com>
+
+ * gnat.dg/asan1.adb: New test.
+ * gnat.dg/asan1_pkg.ads: New additional source.
+
+2021-01-25 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/70070
+ * gfortran.dg/pr70070.f90: New test.
+
+2021-01-25 Martin Sebor <msebor@redhat.com>
+
+ PR c++/98646
+ * g++.dg/warn/Wnonnull5.C: Adjust text of an expected warning.
+ * g++.dg/warn/Wnonnull10.C: New test.
+ * g++.dg/warn/Wnonnull9.C: New test.
+
+2021-01-25 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ * gfortran.dg/associate_57.f90: New test.
+
+2021-01-25 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/96843
+ * gfortran.dg/interface_assignment_7.f90: New test.
+
+2021-01-25 Jason Merrill <jason@redhat.com>
+
+ PR c++/98463
+ * g++.dg/cpp2a/no_unique_address8.C: New test.
+
+2021-01-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/98807
+ * gcc.dg/pr98807.c: New testcase.
+
+2021-01-25 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/thunk2.adb, gnat.dg/thunk2.ads: New test.
+ * gnat.dg/thunk2_pkg.ads: New helper.
+
+2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/98517
+ * gfortran.dg/charlen_18.f90 : New test.
+
+2021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
+
+ * g++.dg/lookup/scoped1.C: Modified testcase to run successfully
+ with changes.
+ * g++.dg/tc1/dr142.C: Same as above.
+ * g++.dg/tc1/dr52.C: Same as above.
+ * g++.old-deja/g++.brendan/visibility6.C: Same as above.
+ * g++.old-deja/g++.brendan/visibility8.C: Same as above.
+ * g++.old-deja/g++.jason/access8.C: Same as above.
+ * g++.old-deja/g++.law/access4.C: Same as above.
+ * g++.old-deja/g++.law/visibility12.C: Same as above.
+ * g++.old-deja/g++.law/visibility4.C: Same as above.
+ * g++.old-deja/g++.law/visibility8.C: Same as above.
+ * g++.old-deja/g++.other/access4.C: Same as above.
+
+2021-01-23 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/88548
+ PR c++/97399
+ * g++.dg/cpp0x/this2.C: New test.
+ * g++.dg/template/pr97399.C: New test.
+
+2021-01-23 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/fold-vec-insert-char-p9.c: Adjust ilp32.
+ * gcc.target/powerpc/fold-vec-insert-float-p9.c: Same.
+ * gcc.target/powerpc/fold-vec-insert-int-p9.c: Same.
+ * gcc.target/powerpc/fold-vec-insert-longlong.c: Same.
+ * gcc.target/powerpc/fold-vec-insert-short-p9.c: Same.
+ * gcc.target/powerpc/pr79251.p9.c: Same.
+
+2021-01-22 Marek Polacek <polacek@redhat.com>
+
+ PR c++/96623
+ * g++.dg/cpp0x/noexcept64.C: New test.
+
+2021-01-22 David Edelsohn <dje.gcc@gmail.com>
+
+ * g++.dg/eh/spbp.C: Remove skip on AIX.
+
+2021-01-22 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/powerpc/m128-check.h (CHECK_EXP, CHECK_FP_EXP): Fix a
+ typo, UINON_TYPE to UNION_TYPE.
+
+2021-01-22 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/i386/m128-check.h (CHECK_EXP, CHECK_FP_EXP): Fix a typo,
+ UINON_TYPE to UNION_TYPE.
+ * gcc.target/i386/m256-check.h (CHECK_FP_EXP): Likewise.
+ * gcc.target/i386/m512-check.h (CHECK_ROUGH_EXP): Likewise.
+
+2021-01-22 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/powerpc/m128-check.h (check_##UINON_TYPE): Add
+ optimize ("no-strict-aliasing") attribute.
+
+2021-01-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/98744
+ * g++.dg/init/elide7.C: New test.
+
+2021-01-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/95693
+ * g++.dg/ubsan/pr95693.C: New test.
+
+2021-01-22 Marek Polacek <polacek@redhat.com>
+
+ PR c++/98545
+ * g++.dg/abi/mangle76.C: New test.
+
+2021-01-22 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/98565
+ * gfortran.dg/associated_target_7.f90 : New test.
+
+2021-01-22 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/47059
+ * gcc.dg/tree-ssa/pr47059.c: New test.
+
+2021-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR tree-optimization/98766
+ * gcc.dg/pr98766.c: New test.
+
+2021-01-22 Nathan Sidwell <nathan@acm.org>
+
+ PR testsuite/98795
+ * g++.dg/modules/modules.exp (module_cmi_p): Avoid
+ embedded absolute paths.
+ (module_do_it): Append $std to test name.
+
+2021-01-22 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/98793
+ * gcc.dg/pr98793.c: New testcase.
+
+2021-01-22 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ * gcc.target/powerpc/pr79251.p8.c: New test.
+ * gcc.target/powerpc/fold-vec-insert-char-p8.c: Adjust
+ instruction counts.
+ * gcc.target/powerpc/fold-vec-insert-char-p9.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-double.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-float-p8.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-float-p9.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-int-p8.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-int-p9.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-longlong.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-short-p8.c: Likewise.
+ * gcc.target/powerpc/fold-vec-insert-short-p9.c: Likewise.
+ * gcc.target/powerpc/vsx-builtin-7.c: Likewise.
+
+2021-01-22 Xionghu Luo <luoxhu@linux.ibm.com>
+
+ * gcc.target/powerpc/pr79251.p9.c: New test.
+ * gcc.target/powerpc/pr79251-run.c: New test.
+ * gcc.target/powerpc/pr79251.h: New header.
+
+2021-01-22 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/98773
+ * gcc.dg/torture/pr98773.c: New testcase.
+
+2021-01-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/90248
+ * gcc.dg/tree-ssa/copy-sign-1.c: Don't expect any copysign
+ builtins.
+ * gcc.dg/pr90248.c: New test.
+
+2021-01-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/98255
+ * gcc.dg/pr98255.c: New test.
+
+2021-01-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98786
+ * gcc.dg/torture/pr98786.c: New testcase.
+
+2021-01-22 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
+
+ PR target/98636
+ * gcc.target/arm/pr98636.c: New test.
+
+2021-01-22 liuhongt <hongtao.liu@intel.com>
+
+ PR target/96891
+ PR target/98348
+ * gcc.target/i386/avx512bw-pr96891-1.c: New test.
+ * gcc.target/i386/avx512f-pr96891-1.c: New test.
+ * gcc.target/i386/avx512f-pr96891-2.c: New test.
+ * gcc.target/i386/avx512f-pr96891-3.c: New test.
+ * g++.target/i386/avx512f-pr96891-1.C: New test.
+ * gcc.target/i386/bitwise_mask_op-3.c: Adjust testcase.
+
+2021-01-22 Marek Polacek <polacek@redhat.com>
+
+ PR c++/97966
+ * g++.dg/cpp0x/noexcept63.C: New test.
+
+2021-01-21 David Edelsohn <dje.gcc@gmail.com>
+
+ * g++.dg/cpp2a/lambda-uneval1.C: Ignore preceding "l" and
+ intervening period.
+ * g++.dg/cpp2a/lambda-uneval5.C: Ignore preceding "l" and
+ explicitly check for intervening space, tab or period.
+
+2021-01-21 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/98777
+ * gcc.target/riscv/pr98777.c: New.
+
+2021-01-21 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/71879
+ * g++.dg/cpp0x/decltype-71879.C: New test.
+
+2021-01-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/98672
+ * g++.dg/cpp1y/constexpr-98672.C: New test.
+
+2021-01-21 Andrea Corallo <andrea.corallo@arm.com>
+
+ PR target/96372
+ * lib/target-supports.exp
+ (check_effective_target_arm_thumb2_no_arm_v8_1_lob): Define proc.
+ * gcc.target/arm/ivopts.c: Use target
+ 'arm_thumb2_no_arm_v8_1_lob'.
+
+2021-01-21 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/98530
+ * g++.dg/modules/stat-mem-1.h: New.
+ * g++.dg/modules/stat-mem-1_a.H: New.
+ * g++.dg/modules/stat-mem-1_b.C: New.
+
+2021-01-21 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/96320
+ * gfortran.dg/module_procedure_5.f90 : New test.
+ * gfortran.dg/module_procedure_6.f90 : New test.
+
+2021-01-21 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/97299
+ * gcc.dg/vect/slp-reduc-3.c: Amend target selectors.
+
+2021-01-21 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/98241
+ * gcc.dg/pr78973.c: Remove ilp32 XFAIL.
+
+2021-01-21 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/Walloca-2.c: Un-XFAIL.
+
+2021-01-21 liuhongt <hongtao.liu@intel.com>
+
+ PR rtl-optimization/98694
+ * gcc.target/i386/pr98694.c: New test.
+
+2021-01-20 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/torture/ftrapv-2.c: Make overflow instruction unremovable.
+
+2021-01-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/vdup_lane_2.c: Scan for fmov rather than
+ dup.
+
+2021-01-20 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/98722
+ * g++.target/s390/pr98722.C: New.
+
+2021-01-20 Eugene Rozenfeld <erozen@microsoft.com>
+
+ PR tree-optimization/96674
+ * gcc.dg/pr96674.c: New tests.
+
+2021-01-20 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/95434
+ * g++.dg/cpp2a/lambda-generic9.C: New test.
+
+2021-01-20 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/82613
+ * g++.dg/parse/access12.C: New test.
+ * g++.dg/template/access35.C: New test.
+
+2021-01-20 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/98535
+ * gcc.target/aarch64/sve/pr98535.c: New file.
+
+2021-01-20 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/98763
+ * gfortran.dg/gomp/task-detach-1.f90: Use integer(1) to avoid
+ missing diagnostic issues with c_intptr_t == default integer kind.
+
+2021-01-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/98721
+ * gcc.dg/pr98721-1.c: New test.
+ * gcc.dg/pr98721-2.c: New test.
+
+2021-01-20 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98758
+ * gcc.dg/torture/pr98758.c: New testcase.
+
+2021-01-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/98742
+ * c-c++-common/gomp/task-detach-2.c: New test.
+
+2021-01-20 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/98757
+ PR fortran/98476
+ * gfortran.dg/gomp/is_device_ptr-2.f90: Fix dg-error.
+
+2021-01-19 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.dg/cpp/ucs.c: Expect Invalid warning for 2byte wchar.
+ * gcc.dg/debug/dwarf2/inline6.c: Remove skip AIX.
+ * gcc.dg/debug/dwarf2/lang-c11.c: Remove skip AIX.
+ * gcc.dg/debug/dwarf2/pr41445-7.c: Remove skip AIX.
+ * gcc.dg/debug/dwarf2/pr41445-8.c: Remove skip AIX.
+ * gcc.dg/tree-ssa/builtin-sprintf-warn-20.c: Require 4byte wchar.
+
+2021-01-19 Marek Polacek <polacek@redhat.com>
+
+ PR c++/98659
+ * g++.dg/template/deduce8.C: New test.
+
+2021-01-19 Marek Polacek <polacek@redhat.com>
+
+ PR c++/98687
+ * g++.dg/lookup/using64.C: New test.
+ * g++.dg/lookup/using65.C: New test.
+
+2021-01-19 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/98664
+ * gcc.dg/Wvla-larger-than-4.c: Adjust expected output.
+ * gcc.dg/plugin/diagnostic-test-inlining-3.c: Same.
+ * g++.dg/warn/Wfree-nonheap-object-5.C: New test.
+ * gcc.dg/Wfree-nonheap-object-4.c: New test.
+
+2021-01-19 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/41437
+ PR c++/58993
+ * g++.dg/opt/pr87974.C: Adjust.
+ * g++.dg/template/access34.C: New test.
+ * g++.dg/template/friend68.C: New test.
+ * g++.dg/template/friend69.C: New test.
+
+2021-01-19 Marek Polacek <polacek@redhat.com>
+
+ PR c++/98333
+ * g++.dg/cpp0x/noexcept62.C: New test.
+
+2021-01-19 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * gcc.target/powerpc/pr88233.c: Update dg- stanzas.
+
+2021-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h
+ (CHECK_CUMULATIVE_SAT): Delete.
+ (CHECK_CUMULATIVE_SAT_NAMED): Likewise. Deleted related
+ variables.
+ * gcc.target/aarch64/advsimd-intrinsics/binary_sat_op.inc:
+ Remove uses of the above.
+ * gcc.target/aarch64/advsimd-intrinsics/unary_sat_op.inc:
+ Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqabs.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqadd.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmlXl.inc: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmlXl_lane.inc:
+ Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmlXl_n.inc: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmlal.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmlal_lane.c:
+ Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmlal_n.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmlsl.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmlsl_lane.c:
+ Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmlsl_n.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmulh.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmulh_lane.c:
+ Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmulh_n.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmull.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmull_lane.c:
+ Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqdmull_n.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqmovn.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqmovun.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqneg.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqrdmlXh.inc: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqrdmlXh_lane.inc:
+ Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqrdmlah.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqrdmlah_lane.c:
+ Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqrdmlsh.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqrdmlsh_lane.c:
+ Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqrdmulh.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqrdmulh_lane.c:
+ Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqrdmulh_n.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqrshl.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqrshrn_n.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqrshrun_n.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqshl.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqshl_n.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqshlu_n.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqshrn_n.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqshrun_n.c: Likewise.
+ * gcc.target/aarch64/advsimd-intrinsics/vqsub.c: Likewise.
+
+2021-01-19 Jeff Law <law@redhat.com>
+
+ * gcc.dg/debug/dwarf2/dwarf-float.c: Force dwarf-4 generation
+ and update expected output.
+
+2021-01-19 Richard Biener <rguenther@suse.de>
+
+ PR ipa/98330
+ * g++.dg/pr98330.C: New testcase.
+ * gcc.dg/pr98330.c: Likewise.
+
+2021-01-19 Richard Biener <rguenther@suse.de>
+
+ PR ipa/97673
+ * gfortran.dg/pr97673.f90: New testcase.
+
+2021-01-19 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/98476
+ * gfortran.dg/gomp/map-3.f90: Update expected scan-dump-tree.
+ * gfortran.dg/gomp/is_device_ptr-2.f90: New test.
+ * gfortran.dg/gomp/use_device_ptr-1.f90: New test.
+
+2021-01-19 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/98690
+ * g++.dg/ipa/pr98690.C: New test.
+
+2021-01-18 Jeff Law <law@redhat.com>
+
+ * gcc.dg/debug/dwarf2/pr41445-7.c: Fix expected output.
+
+2021-01-18 Patrick Palka <ppalka@redhat.com>
+
+ * g++.dg/cpp1z/class-deduction77.C: New test.
+
+2021-01-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/98727
+ * gcc.c-torture/execute/pr98727.c: New test.
+
+2021-01-18 John David Anglin <danglin@gcc.gnu.org>
+
+ PR testsuite/97987
+ * gcc.c-torture/compile/asmgoto-2.c: Skip on hppa.
+ * gcc.c-torture/compile/asmgoto-5.c: Likewise.
+
+2021-01-18 John David Anglin <danglin@gcc.gnu.org>
+
+ * g++.dg/no-stack-protector-attr-3.C: Don't compile on hppa*-*-*.
+ * g++.dg/no-stack-protector-attr.C: Likewise.
+
+2021-01-18 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/attr-malloc-1.c: New test.
+ * gcc.dg/analyzer/attr-malloc-2.c: New test.
+ * gcc.dg/analyzer/attr-malloc-4.c: New test.
+ * gcc.dg/analyzer/attr-malloc-5.c: New test.
+ * gcc.dg/analyzer/attr-malloc-6.c: New test.
+ * gcc.dg/analyzer/attr-malloc-CVE-2019-19078-usb-leak.c: New test.
+ * gcc.dg/analyzer/attr-malloc-misuses.c: New test.
+
+2021-01-18 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/97494
+ * gcc.dg/vect/slp-11b.c: Adjust.
+
+2021-01-18 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/71233
+ * gcc.target/arm/simd/vceqz_p64.c: Use arm_crypto options.
+ * gcc.target/arm/simd/vceqzq_p64.c: Likewise.
+
+2021-01-18 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/97299
+ * gcc.dg/vect/slp-reduc-3.c: Guard VEC_PERM_EXPR scan.
+
+2021-01-18 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/fold-vec-extract-char.p7.c: Adjust addi count.
+ * gcc.target/powerpc/fold-vec-extract-double.p7.c: Same.
+ * gcc.target/powerpc/fold-vec-extract-float.p7.c: Same.
+ * gcc.target/powerpc/fold-vec-extract-float.p8.c: Same.
+ * gcc.target/powerpc/fold-vec-extract-int.p7.c: Same.
+ * gcc.target/powerpc/fold-vec-extract-int.p8.c: Same.
+ * gcc.target/powerpc/fold-vec-extract-short.p7.c: Same.
+ * gcc.target/powerpc/fold-vec-extract-short.p8.c: Same.
+ * gcc.target/powerpc/sse-andnps-1.c: Restrict to LE.
+ * gcc.target/powerpc/sse-movhps-1.c: Restrict to LE.
+ * gcc.target/powerpc/sse-movlps-1.c: Restrict to LE.
+ * gcc.target/powerpc/sse2-andnpd-1.c: Restrict to LE.
+
+2021-01-17 David Edelsohn <dje.gcc@gmail.com>
+
+ * g++.dg/debug/dwarf2/inline-ns-2.C: Skip on AIX.
+ * g++.dg/debug/dwarf2/inline-var-2.C: Skip on AIX.
+ * g++.dg/debug/dwarf2/inline-var-3.C: Skip on AIX.
+ * g++.dg/debug/dwarf2/lang-cpp11.C: Skip on AIX.
+ * g++.dg/debug/dwarf2/lang-cpp14.C: Skip on AIX.
+ * g++.dg/debug/dwarf2/lang-cpp17.C: Skip on AIX.
+ * g++.dg/debug/dwarf2/lang-cpp20.C: Skip on AIX.
+ * gcc.dg/debug/dwarf2/inline6.c: Skip on AIX.
+ * gcc.dg/debug/dwarf2/lang-c11.c: Skip on AIX.
+ * gcc.dg/debug/dwarf2/pr41445-7.c: Skip on AIX.
+ * gcc.dg/debug/dwarf2/pr41445-8.c: Skip on AIX.
+
+2021-01-17 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/98222
+ * gcc.dg/ipa/pr98222.c: New test.
+
+2021-01-16 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.dg/iso_fortran_binding_uint8_array_driver.c: Include
+ ../../../libgfortran/ISO_Fortran_binding.h rather than
+ ISO_Fortran_binding.h.
+
+2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ * c-c++-common/gomp/task-detach-1.c: New.
+ * g++.dg/gomp/task-detach-1.C: New.
+ * gcc.dg/gomp/task-detach-1.c: New.
+ * gfortran.dg/gomp/task-detach-1.f90: New.
+
+2021-01-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96669
+ * gcc.dg/tree-ssa/pr96669-1.c: Adjust regexp.
+ * gcc.dg/tree-ssa/pr96669-2.c: New test.
+
+2021-01-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96271
+ * gcc.target/i386/pr96271.c: New test.
+
+2021-01-15 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/builtins-1-p10-runnable.c: New test file.
+
+2021-01-15 Harris Snyder <hsnyder@structura.bio>
+
+ * gfortran.dg/iso_fortran_binding_uint8_array.f90: New test.
+ * gfortran.dg/iso_fortran_binding_uint8_array_driver.c: New test.
+
+2021-01-15 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/98538
+ * g++.dg/template/pr98538.C: New.
+
+2021-01-15 Nathan Sidwell <nathan@acm.org>
+
+ PR preprocessor/95253
+ * g++.dg/modules/dep-1_a.C: Adjust expected output.
+ * g++.dg/modules/dep-1_b.C: Likewise.
+ * g++.dg/modules/dep-2.C: Likewise.
+
+2021-01-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96669
+ * gcc.dg/tree-ssa/pr96669-1.c: New test.
+
+2021-01-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96681
+ * gcc.dg/tree-ssa/pr96681.c: New test.
+
+2021-01-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/98642
+ * g++.dg/cpp1z/elide5.C: New test.
+
+2021-01-15 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp1z/elide4.C: New test.
+
+2021-01-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/63707
+ * g++.dg/cpp0x/initlist-array13.C: New test.
+
+2021-01-15 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.dg/analyzer/alloca-leak.c: Drop alloca.h, use builtin.
+ * gcc.dg/analyzer/data-model-1.c: Likewise.
+ * gcc.dg/analyzer/malloc-1.c: Likewise.
+ * gcc.dg/analyzer/malloc-paths-8.c: Likewise.
+
+2021-01-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96671
+ * gcc.dg/tree-ssa/pr96671-1.c: New test.
+ * gcc.dg/tree-ssa/pr96671-2.c: New test.
+
+2021-01-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/98597
+ * gcc.dg/uninit-38.c: Expect a space in between type name and asterisk.
+ Expect for now a (char *) cast for VLAs.
+ * gcc.dg/uninit-40.c: New test.
+
+2021-01-15 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/98591
+ * g++.dg/modules/pr98591.H: New file.
+
+2021-01-15 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR target/88836
+ * gcc.target/aarch64/sve/acle/general/ldff1_8.c: New test.
+ * gcc.target/aarch64/sve/ptest_1.c: Likewise.
+
+2021-01-15 Marius Hillenbrand <mhillen@linux.ibm.com>
+
+ * gcc.target/s390/s390.exp: Call lib atomic-dg.exp to link
+ libatomic into testcases in gcc.target/s390/md.
+ * gcc.target/s390/md/atomic_exchange-1.c: Remove no unnecessary
+ -latomic.
+
+2021-01-15 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/71233
+ * gcc.target/aarch64/advsimd-intrinsics/p64_p128.c: Add tests for
+ vceqz_p64, vceqq_p64 and vceqzq_p64.
+ * gcc.target/arm/simd/vceqz_p64.c: New test.
+ * gcc.target/arm/simd/vceqzq_p64.c: New test.
+
+2021-01-15 Christophe Lyon <christophe.lyon@linaro.org>
+
+ Revert:
+ 2021-01-15 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/71233
+ * gcc.target/aarch64/advsimd-intrinsics/p64_p128.c: Add tests for
+ vceqz_p64, vceqq_p64 and vceqzq_p64.
+
+2021-01-15 Martin Liska <mliska@suse.cz>
+
+ * lib/gcov.exp: Use 'env python3' for execution of pytests.
+ Check that pytest accepts all needed options first.
+ Improve formatting of PASS/FAIL lines.
+
+2021-01-15 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/96147
+ * gcc.dg/vect/bb-slp-32.c: Align p.
+
+2021-01-15 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/96147
+ * gcc.dg/vect/bb-slp-9.c: Scan for a vector load transform.
+
+2021-01-15 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/96147
+ * gcc.dg/vect/slp-45.c: Key scanning on
+ vect_hw_misalign.
+
+2021-01-15 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/96147
+ * gcc.dg/vect/slp-43.c: Remove ! vect_hw_misalign scan.
+
+2021-01-15 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/71233
+ * gcc.target/aarch64/advsimd-intrinsics/p64_p128.c: Add tests for
+ vceqz_p64, vceqq_p64 and vceqzq_p64.
+
+2021-01-15 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/96098
+ * gcc.dg/vect/bb-slp-pr68892.c: Remove.
+
+2021-01-15 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vshr.c: Add tests for vshr.
+
+2021-01-15 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/simd/mve-vshl.c: Add tests for vshl.
+
+2021-01-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98685
+ * gcc.dg/vect/bb-slp-pr98685.c: New testcase.
+
+2021-01-15 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.dg/vect/complex/complex-mla-template.c: Fix sed.
+ * gcc.dg/vect/complex/complex-mls-template.c: Likewise.
+
+2021-01-14 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/plugin/diagnostic-test-show-locus-GCC_EXTRA_DIAGNOSTIC_OUTPUT-fixits-v1.c:
+ New file.
+ * gcc.dg/plugin/diagnostic-test-show-locus-GCC_EXTRA_DIAGNOSTIC_OUTPUT-fixits-v2.c:
+ New file.
+ * gcc.dg/plugin/plugin.exp (plugin_test_list): Add them.
+
+2021-01-14 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.dg/vect/complex/complex-mla-template.c: New test.
+ * gcc.dg/vect/complex/complex-mls-template.c: New test.
+ * gcc.dg/vect/complex/complex-mul-template.c: New test.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c: New test.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c: New test.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c: New test.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c: New test.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c: New test.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c: New test.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c: New test.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c: New test.
+ * gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c: New test.
+ * gcc.dg/vect/complex/fast-math-complex-mla-double.c: New test.
+ * gcc.dg/vect/complex/fast-math-complex-mla-float.c: New test.
+ * gcc.dg/vect/complex/fast-math-complex-mla-half-float.c: New test.
+ * gcc.dg/vect/complex/fast-math-complex-mls-double.c: New test.
+ * gcc.dg/vect/complex/fast-math-complex-mls-float.c: New test.
+ * gcc.dg/vect/complex/fast-math-complex-mls-half-float.c: New test.
+ * gcc.dg/vect/complex/fast-math-complex-mul-double.c: New test.
+ * gcc.dg/vect/complex/fast-math-complex-mul-float.c: New test.
+ * gcc.dg/vect/complex/fast-math-complex-mul-half-float.c: New test.
+
+2021-01-14 Marek Polacek <polacek@redhat.com>
+
+ * g++.dg/template/pr98372.C: Only run in C++14 and up.
+
+2021-01-14 Harald Anlauf <anlauf@gmx.de>
+
+ * substr_10.f90: New test.
+ * substr_9.f90: New test.
+
+2021-01-14 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.dg/analyzer/sigsetjmp-5.c: Use sigjmp_buf.
+ * gcc.dg/analyzer/sigsetjmp-6.c: Likewise.
+
+2021-01-14 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.dg/analyzer/sensitive-1.c: Declare getpass.
+
+2021-01-14 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/98661
+ * gfortran.dg/pr98661.f90: New test.
+
+2021-01-14 Harald Anlauf <anlauf@gmx.de>
+
+ Revert:
+ 2021-01-14 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/98661
+ * gfortran.dg/pr98661.f90: New test.
+
+2021-01-14 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/98661
+ * gfortran.dg/pr98661.f90: New test.
+
+2021-01-14 Martin Liska <mliska@suse.cz>
+
+ * g++.dg/gcov/gcov-17.C: New test.
+ * g++.dg/gcov/test-gcov-17.py: New test.
+
+2021-01-14 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/98667
+ * gcc.target/i386/pr98667-1.c: New file.
+ * gcc.target/i386/pr98667-2.c: Likewise.
+ * gcc.target/i386/pr98667-3.c: Likewise.
+
+2021-01-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98674
+ * gcc.dg/vect/pr98674.c: New testcase.
+
+2021-01-14 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/98676
+ * gcc.target/i386/pr95021-1.c: Add -mpreferred-stack-boundary=4
+ -mno-stackrealign.
+ * gcc.target/i386/pr95021-3.c: Likewise.
+
+2021-01-14 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/98372
+ * g++.dg/cpp0x/constexpr-52830.C: Restore dg-ice
+ * g++.dg/template/pr98372.C: New.
+
+2021-01-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/98670
+ * gcc.target/i386/pr98670.c: New test.
+
+2021-01-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96688
+ * gcc.dg/tree-ssa/pr96688.c: New test.
+ * gcc.dg/tree-ssa/reassoc-37.c: Adjust scan-tree-dump regex.
+ * gcc.target/i386/pr66821.c: Likewise.
+
+2021-01-14 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/cost_model_11.c: New test.
+ * gcc.target/aarch64/sve/mask_struct_load_5.c: Use
+ -fno-vect-cost-model.
+
+2021-01-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/narrow_high-intrinsics.c: Update uqxtn2 and
+ sqxtn2 scan-assembler-times.
+
+2021-01-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/narrow_high-intrinsics.c: Adjust
+ scan-assembler-times for xtn2.
+
+2021-01-13 Marek Polacek <polacek@redhat.com>
+
+ PR c++/98231
+ * g++.dg/lookup/using63.C: New test.
+
+2021-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96691
+ * gcc.dg/tree-ssa/pr96691.c: New test.
+
+2021-01-13 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/92645
+ * gcc.target/i386/pr92645-7.c: New testcase.
+ * gcc.dg/tree-ssa/ssa-fre-54.c: Adjust.
+ * gcc.dg/pr69047.c: Likewise.
+
+2021-01-13 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/mls_2.c: New test.
+ * g++.target/aarch64/sve/cond_mls_1.C: Likewise.
+ * g++.target/aarch64/sve/cond_mls_2.C: Likewise.
+ * g++.target/aarch64/sve/cond_mls_3.C: Likewise.
+ * g++.target/aarch64/sve/cond_mls_4.C: Likewise.
+ * g++.target/aarch64/sve/cond_mls_5.C: Likewise.
+
+2021-01-13 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/mla_2.c: New test.
+ * g++.target/aarch64/sve/cond_mla_1.C: Likewise.
+ * g++.target/aarch64/sve/cond_mla_2.C: Likewise.
+ * g++.target/aarch64/sve/cond_mla_3.C: Likewise.
+ * g++.target/aarch64/sve/cond_mla_4.C: Likewise.
+ * g++.target/aarch64/sve/cond_mla_5.C: Likewise.
+
+2021-01-13 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/92645
+ * gcc.target/i386/pr92645-6.c: New testcase.
+
+2021-01-13 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/sel_1.c: Require aarch64_variant_pcs.
+ * gcc.target/aarch64/sve/sel_2.c: Likewise.
+ * gcc.target/aarch64/sve/sel_3.c: Likewise.
+
+2021-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/95905
+ * gcc.target/i386/pr95905-2.c: Use scan-assembler-times instead of
+ scan-assembler. Add tests with zero vector as first __builtin_shuffle
+ operand.
+ * gcc.target/i386/pr95905-3.c: New test.
+ * gcc.target/i386/pr95905-4.c: New test.
+
+2021-01-13 Martin Liska <mliska@suse.cz>
+
+ PR tree-optimization/98455
+ * gcc.dg/tree-ssa/pr98455.c: New test.
+
+2021-01-13 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98640
+ * gcc.dg/torture/pr98640.c: New testcase.
+
+2021-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/96938
+ * gcc.target/i386/pr96938.c: New test.
+
+2021-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/95905
+ * gcc.target/i386/pr95905-1.c: New test.
+ * gcc.target/i386/pr95905-2.c: New test.
+
+2021-01-13 Julian Brown <julian@codesourcery.com>
+
+ * gcc.target/gcn/fpdiv.c: New test.
+
+2021-01-12 Martin Sebor <msebor@redhat.com>
+
+ PR c/98597
+ PR c/98592
+ * g++.dg/warn/Wuninitialized-13.C: New test.
+ gcc.dg/uninit-39.c: New test.
+ #
+ * gcc.dg/uninit-39.c: New file.
+
+2021-01-12 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/97875
+ * gcc.target/arm/simd/mve-vneg.c: Update test.
+
+2021-01-12 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR target/97969
+ * gcc.target/arm/pr97969.c: New.
+
+2021-01-12 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/98611
+ * g++.dg/cpp2a/concepts-ctad1.C: New test.
+ * g++.dg/cpp2a/concepts-ctad2.C: New test.
+
+2021-01-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98550
+ * g++.dg/opt/pr98550.C: New testcase.
+
+2021-01-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/98629
+ * gcc.c-torture/compile/pr98629.c: New test.
+
+2021-01-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/95731
+ * gcc.dg/tree-ssa/pr95731.c: New test.
+ * gcc.c-torture/execute/pr95731.c: New test.
+
+2021-01-12 Marek Polacek <polacek@redhat.com>
+
+ PR c++/98620
+ * g++.dg/warn/Wmissing-field-initializers-2.C: New test.
+
+2021-01-12 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/98628
+ * gcc.dg/analyzer/pr98628.c: New test.
+
+2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/asrdiv_4.c: New test.
+ * gcc.target/aarch64/sve/cond_asrd_1.c: Likewise.
+ * gcc.target/aarch64/sve/cond_asrd_1_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_asrd_2.c: Likewise.
+ * gcc.target/aarch64/sve/cond_asrd_2_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_asrd_3.c: Likewise.
+ * gcc.target/aarch64/sve/cond_asrd_3_run.c: Likewise.
+
+2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
+
+ * g++.target/aarch64/sve/cond_bic_1.C: New test.
+ * g++.target/aarch64/sve/cond_bic_2.C: Likewise.
+ * g++.target/aarch64/sve/cond_bic_3.C: Likewise.
+ * g++.target/aarch64/sve/cond_bic_4.C: Likewise.
+
+2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/mul_highpart_3.c: New test.
+
+2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
+
+ * g++.target/aarch64/sve/abd_1.C: New test.
+ * g++.target/aarch64/sve/cond_abd_1.C: Likewise.
+ * g++.target/aarch64/sve/cond_abd_2.C: Likewise.
+ * g++.target/aarch64/sve/cond_abd_3.C: Likewise.
+ * g++.target/aarch64/sve/cond_abd_4.C: Likewise.
+
+2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/adr_6.c: New test.
+
+2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
+
+ * g++.target/aarch64/sve/cond_arith_1.C: New test.
+ * g++.target/aarch64/sve/cond_arith_2.C: Likewise.
+ * g++.target/aarch64/sve/cond_arith_3.C: Likewise.
+ * g++.target/aarch64/sve/cond_arith_4.C: Likewise.
+ * g++.target/aarch64/sve/cond_shift_1.C: New test.
+ * g++.target/aarch64/sve/cond_shift_2.C: Likewise.
+ * g++.target/aarch64/sve/cond_shift_3.C: Likewise.
+ * g++.target/aarch64/sve/cond_shift_4.C: Likewise.
+
+2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR testsuite/98602
+ * g++.target/aarch64/sve/max_1.C: New test.
+ * g++.target/aarch64/sve/min_1.C: Likewise.
+ * gcc.target/aarch64/sve/mul_2.c: Likewise.
+
+2021-01-11 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/shift_2.c: New test.
+
+2021-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/98481
+ * g++.dg/abi/abi-tag24.C: New test.
+
+2021-01-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91403
+ * gcc.dg/vect/pr91403.c: New testcase.
+
+2021-01-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR testsuite/98225
+ * gcc.misc-tests/outputs.exp: Unset MAKEFLAGS.
+ Expect .ld1_args only when GNU LD is used.
+ Add an exception for *.gcc_args files.
+
+2021-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/95867
+ * gcc.dg/tree-ssa/pr95867.c: New test.
+
+2021-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/95852
+ * gcc.target/i386/pr95852-3.c: New test.
+ * gcc.target/i386/pr95852-4.c: New test.
+
+2021-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/95852
+ * gcc.target/i386/pr95852-1.c: New test.
+ * gcc.target/i386/pr95852-2.c: New test.
+
+2021-01-11 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/98273
+ * lib/gcov.exp: Add run-gcov-pytest function which runs pytest.
+ * g++.dg/gcov/pr98273.C: New test.
+ * g++.dg/gcov/gcov.py: New test.
+ * g++.dg/gcov/test-pr98273.py: New test.
+
+2021-01-09 Maciej W. Rozycki <macro@linux-mips.org>
+
+ * gcc.target/vax/cmpelim-eq-notsi.c: Use subtraction from a
+ constant then rather than addition.
+ * gcc.target/vax/cmpelim-le-notsi.c: Likewise.
+ * gcc.target/vax/cmpelim-lt-notsi.c: Likewise.
+
+2021-01-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/98556
+ * c-c++-common/pr98556.c: New test.
+
+2021-01-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/98603
+ * gcc.target/i386/pr98603.c: New test.
+ * gcc.target/aarch64/pr98603.c: New test.
+
+2021-01-09 Alexandre Oliva <oliva@gnu.org>
+
+ PR debug/97714
+ * gcc.dg/debug/pr97714.c: New.
+
+2021-01-08 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/98482
+ * gcc.target/i386/pr98482-1.c: Require lp64.
+ * gcc.target/i386/pr98482-2.c: Likewise.
+
+2021-01-08 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * gcc.target/s390/vector/long-double-vx-macro-off-on.c: New test.
+ * gcc.target/s390/vector/long-double-vx-macro-on-off.c: New test.
+
+2021-01-08 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/98551
+ * g++.dg/cpp0x/constexpr-pmf2.C: New test.
+
+2021-01-08 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/98515
+ * g++.dg/template/access32.C: New test.
+ * g++.dg/template/access33.C: New test.
+
+2021-01-08 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/98482
+ * gcc.target/i386/pr98482-2.c: Updated.
+
+2021-01-08 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98544
+ * gcc.dg/vect/bb-slp-pr98544.c: New testcase.
+
+2021-01-08 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/98482
+ * gcc.target/i386/pr98482-1.c: New test.
+ * gcc.target/i386/pr98482-1.c: Likewise.
+ * gcc.target/i386/pr98482-2.c: New file.
+
+2021-01-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/98585
+ * gcc.target/i386/pr98585.c: New test.
+
+2021-01-08 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/cnot_2.c: New test.
+ * gcc.target/aarch64/sve/cond_cnot_4.c: Likewise.
+ * gcc.target/aarch64/sve/cond_cnot_4_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_cnot_5.c: Likewise.
+ * gcc.target/aarch64/sve/cond_cnot_5_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_cnot_6.c: Likewise.
+ * gcc.target/aarch64/sve/cond_cnot_6_run.c: Likewise.
+
+2021-01-08 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/cond_uxt_5.c: New test.
+ * gcc.target/aarch64/sve/cond_uxt_5_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_uxt_6.c: Likewise.
+ * gcc.target/aarch64/sve/cond_uxt_6_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_uxt_7.c: Likewise.
+ * gcc.target/aarch64/sve/cond_uxt_7_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_uxt_8.c: Likewise.
+ * gcc.target/aarch64/sve/cond_uxt_8_run.c: Likewise.
+
+2021-01-08 Tamar Christina <tamar.christina@arm.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_aarch64_asm_sve2_ok): New.
+ * g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp: Use it.
+ * gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp: Likewise.
+
+2021-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/usaba_1.c: New test.
+
+2021-01-08 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/93794
+ * gfortran.dg/deferred_character_35.f90 : New test.
+
+2021-01-08 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/98458
+ * gfortran.dg/implied_do_3.f90 : New test.
+
+2021-01-08 Kito Cheng <kito.cheng@sifive.com>
+
+ * gcc.dg/array-quals-1.c: Allow srodata.
+
+2021-01-08 Kito Cheng <kito.cheng@sifive.com>
+
+ * gcc.target/riscv/predef-10.c: New.
+ * gcc.target/riscv/predef-11.c: New.
+ * gcc.target/riscv/predef-12.c: New.
+ * gcc.target/riscv/predef-13.c: New.
+
+2021-01-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/98329
+ * g++.dg/cpp2a/bit-cast10.C: New test.
+
+2021-01-07 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/98578
+ * gcc.dg/plugin/gil-1.c: Adjust expected output.
+ * gcc.dg/uninit-pr98578.c: New test.
+
+2021-01-07 Marek Polacek <polacek@redhat.com>
+
+ PR c++/98441
+ * g++.dg/cpp0x/auto55.C: New test.
+
+2021-01-07 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/98580
+ * gcc.dg/analyzer/pr98580-a.c: New test.
+ * gcc.dg/analyzer/pr98580-b.c: New test.
+
+2021-01-07 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/93701
+ * gfortran.dg/associate_54.f90: New test.
+ * gfortran.dg/associate_55.f90: New test.
+ * gfortran.dg/associate_56.f90: New test.
+
+2021-01-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/98567
+ * gcc.target/i386/pr98567-1.c: New test.
+ * gcc.target/i386/pr98567-2.c: New test.
+
+2021-01-07 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/cond_unary_5.c: New test.
+ * gcc.target/aarch64/sve/cond_unary_5_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_unary_6.c: Likewise.
+ * gcc.target/aarch64/sve/cond_unary_6_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_unary_7.c: Likewise.
+ * gcc.target/aarch64/sve/cond_unary_7_run.c: Likewise.
+ * gcc.target/aarch64/sve/cond_unary_8.c: Likewise.
+ * gcc.target/aarch64/sve/cond_unary_8_run.c: Likewise.
+
+2021-01-07 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/98560
+ * gcc.dg/vect/pr98560-2.c: New test.
+
+2021-01-07 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/98560
+ * gcc.dg/vect/pr98560-1.c: New test.
+
+2021-01-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/98568
+ * g++.dg/torture/pr98568.C: New test.
+
+2021-01-07 Hongyu Wang <hongyu.wang@intel.com>
+
+ * gcc.target/i386/pr92658-avx512bw.c: Add
+ -mprefer-vector-width=512 to avoid impact of different default
+ mtune which gcc is built with.
+ * gcc.target/i386/pr92658-avx512bw-2.c: Ditto.
+
+2021-01-07 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/97074
+ * gcc.dg/analyzer/pr97074.c: New test.
+
+2021-01-07 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/98564
+ * gcc.dg/analyzer/pr98564.c: New test.
+
+2021-01-06 Vladimir N. Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/97978
+ * gcc.target/i386/pr97978.c: New.
+
+2021-01-06 Martin Sebor <msebor@redhat.com>
+
+ PR c++/95768
+ * g++.dg/pr95768.C: New test.
+ * g++.dg/warn/Wuninitialized-12.C: New test.
+ * gcc.dg/uninit-38.c: New test.
+
+2021-01-06 Martin Sebor <msebor@redhat.com>
+
+ PR c++/98305
+ * g++.dg/warn/Wmismatched-new-delete-3.C: New test.
+
+2021-01-06 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/96504
+ * g++.dg/coroutines/torture/pr95519-05-gro.C: Use suspend_always
+ as the final suspend point so that we can check that the state
+ machine has reached the expected point.
+
+2021-01-06 Marek Polacek <polacek@redhat.com>
+
+ PR testsuite/98566
+ * g++.dg/warn/Wmismatched-dealloc.C: Use target c++14 in
+ dg-error.
+
+2021-01-06 Alexandre Oliva <oliva@adacore.com>
+
+ * g++.dg/opt/store-merging-2.C: Add the required alignment.
+
+2021-01-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/95582
+ * gcc.dg/pr95582.c: New testcase.
+
+2021-01-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98513
+ * gcc.dg/tree-ssa/pr98513.c: New testcase.
+
+2021-01-06 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/97072
+ * gcc.dg/analyzer/pr97072.c: New test.
+
+2021-01-06 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/98073
+ * gcc.dg/analyzer/pr98073.c: New test.
+
+2021-01-06 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/98223
+ * gcc.dg/analyzer/pr94851-1.c: Remove xfail.
+
+2021-01-05 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * gcc.target/s390/s390.exp: Replace %% with %.
+
+2021-01-05 Steve Kargl <sgk@troutmask.apl.washington.edu>
+
+ * gfortran.dg/dec_math.f90: xfail on i?86-*-freebsd*
+
+2021-01-05 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/98495
+ * gcc.target/i386/sse2-mmx-pextrw.c (compute_correct_result): Use
+ unsigned short to compute pextrw result.
+
+2021-01-05 Patrick Palka <ppalka@redhat.com>
+
+ * g++.dg/template/partial5.C: Adjust directives to expect the
+ same errors across all dialects.
+ * g++.dg/cpp1z/nontype-auto17.C: New test.
+ * g++.dg/cpp1z/nontype-auto18.C: New test.
+ * g++.dg/template/ttp33.C: New test.
+
+2021-01-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/94802
+ * gcc.target/i386/pr94802.c: New test.
+ * gcc.dg/Wstrict-overflow-25.c: Remove xfail.
+
+2021-01-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98516
+ * gcc.dg/vect/bb-slp-pr98516-1.c: New testcase.
+ * gcc.dg/vect/bb-slp-pr98516-2.c: Likewise.
+
+2021-01-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/98469
+ * g++.dg/cpp2a/bit-cast8.C: New test.
+ * g++.dg/cpp2a/bit-cast9.C: New test.
+
+2021-01-05 Marek Polacek <polacek@redhat.com>
+
+ PR c++/82099
+ * g++.dg/cpp1z/class-deduction76.C: Remove dg-ice.
+ * g++.dg/cpp0x/noexcept61.C: New test.
+
+2021-01-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96928
+ * gcc.dg/tree-ssa/pr96928.c: New test.
+ * gcc.target/i386/ifcvt-onecmpl-abs-1.c: Remove -fdump-rtl-ce1,
+ instead of scanning rtl dump for ifcvt message check assembly
+ for xor instruction.
+
+2021-01-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96930
+ * g++.dg/tree-ssa/pr96930.C: New test.
+
+2021-01-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96239
+ * gcc.dg/tree-ssa/pr96239.c: New test.
+
+2021-01-05 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/98522
+ * gcc.target/i386/pr98522.c: New test.
+
+2021-01-05 Nathan Sidwell <nathan@acm.org>
+
+ * g++.dg/modules/mod-decl-1.C: Adjust.
+ * g++.dg/modules/p0713-2.C: Adjust.
+ * g++.dg/modules/p0713-3.C: Adjust.
+
+2021-01-05 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/98495
+ * gcc.target/i386/pr98495-1.c: New test.
+ * gcc.target/i386/pr98495-2.c: New test.
+ * gcc.target/i386/pr98495-3.c: New test.
+ * gcc.target/i386/pr98495-4.c: New test.
+ * gcc.target/i386/pr98495-5.c: New test.
+
+2021-01-05 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/sse2-pr98461-2.c: New test.
+
+2021-01-05 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR rtl-optimization/97144
+ * gcc.c-torture/compile/pr97144.c: New test.
+ * gcc.target/aarch64/sve/pr97144.c: Likewise.
+
+2021-01-05 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR rtl-optimization/98403
+ * g++.dg/opt/pr98403.C: New test.
+
+2021-01-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/98334
+ * gcc.target/i386/pr98334.c: New test.
+
+2021-01-05 Jerome Lambourg <lambourg@adacore.com>
+
+ * g++.dg/cpp1y/constexpr-66093.C: Fix bounds issue.
+
+2021-01-05 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/98293
+ * gcc.dg/analyzer/pr98293.c: New test.
+
+2021-01-04 Martin Uecker <muecker@gwdg.de>
+
+ PR c/98029
+ * gcc.dg/pr98029.c: New test.
+
+2021-01-04 Nathan Sidwell <nathan@acm.org>
+
+ * g++.dg/modules/binding-1_a.H: New.
+ * g++.dg/modules/binding-1_b.H: New.
+ * g++.dg/modules/binding-1_c.C: New.
+ * g++.dg/modules/binding-2.H: New.
+ * g++.dg/modules/builtin-3_a.C: New.
+ * g++.dg/modules/global-2_a.C: New.
+ * g++.dg/modules/global-2_b.C: New.
+ * g++.dg/modules/global-3_a.C: New.
+ * g++.dg/modules/global-3_b.C: New.
+ * g++.dg/modules/hello-1_a.C: New.
+ * g++.dg/modules/hello-1_b.C: New.
+ * g++.dg/modules/iostream-1_a.H: New.
+ * g++.dg/modules/iostream-1_b.C: New.
+ * g++.dg/modules/part-5_a.C: New.
+ * g++.dg/modules/part-5_b.C: New.
+ * g++.dg/modules/part-5_c.C: New.
+ * g++.dg/modules/stdio-1_a.H: New.
+ * g++.dg/modules/stdio-1_b.C: New.
+ * g++.dg/modules/string-1_a.H: New.
+ * g++.dg/modules/string-1_b.C: New.
+ * g++.dg/modules/string-view1.C: New.
+ * g++.dg/modules/string-view2.C: New.
+ * g++.dg/modules/tinfo-1.C: New.
+ * g++.dg/modules/tinfo-2_a.H: New.
+ * g++.dg/modules/tinfo-2_b.C: New.
+ * g++.dg/modules/tname-spec-1_a.H: New.
+ * g++.dg/modules/tname-spec-1_b.C: New.
+ * g++.dg/modules/xtreme-header-1.h: New.
+ * g++.dg/modules/xtreme-header-1_a.H: New.
+ * g++.dg/modules/xtreme-header-1_b.C: New.
+ * g++.dg/modules/xtreme-header-1_c.C: New.
+ * g++.dg/modules/xtreme-header-2.h: New.
+ * g++.dg/modules/xtreme-header-2_a.H: New.
+ * g++.dg/modules/xtreme-header-2_b.C: New.
+ * g++.dg/modules/xtreme-header-2_c.C: New.
+ * g++.dg/modules/xtreme-header-3.h: New.
+ * g++.dg/modules/xtreme-header-3_a.H: New.
+ * g++.dg/modules/xtreme-header-3_b.C: New.
+ * g++.dg/modules/xtreme-header-3_c.C: New.
+ * g++.dg/modules/xtreme-header-4.h: New.
+ * g++.dg/modules/xtreme-header-4_a.H: New.
+ * g++.dg/modules/xtreme-header-4_b.C: New.
+ * g++.dg/modules/xtreme-header-4_c.C: New.
+ * g++.dg/modules/xtreme-header-5.h: New.
+ * g++.dg/modules/xtreme-header-5_a.H: New.
+ * g++.dg/modules/xtreme-header-5_b.C: New.
+ * g++.dg/modules/xtreme-header-5_c.C: New.
+ * g++.dg/modules/xtreme-header-6.h: New.
+ * g++.dg/modules/xtreme-header-6_a.H: New.
+ * g++.dg/modules/xtreme-header-6_b.C: New.
+ * g++.dg/modules/xtreme-header-6_c.C: New.
+ * g++.dg/modules/xtreme-header.h: New.
+ * g++.dg/modules/xtreme-header_a.H: New.
+ * g++.dg/modules/xtreme-header_b.C: New.
+ * g++.dg/modules/xtreme-tr1.h: New.
+ * g++.dg/modules/xtreme-tr1_a.H: New.
+ * g++.dg/modules/xtreme-tr1_b.C: New.
+
+2021-01-04 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/95401
+ * g++.dg/vect/pr95401.cc: New test.
+ * g++.dg/vect/pr95401a.cc: Likewise.
+
+2021-01-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98308
+ * gcc.dg/vect/pr98308.c: New testcase.
+
+2021-01-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/95771
+ * gcc.target/i386/pr95771.c: New test.
+
+2021-01-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98464
+ * g++.dg/opt/pr98464.C: New testcase.
+
+2021-01-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98282
+ * g++.dg/opt/pr98282.C: New testcase.
+
+2021-01-04 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR target/89057
+ * gcc.target/aarch64/pr89057.c: New test.
+
+2021-01-04 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/acle/asm/prfb.c: Test for a MUL VL range of
+ [-32, 31].
+ * gcc.target/aarch64/sve/acle/asm/prfh.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/prfw.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/prfd.c: Likewise.
+
+2021-01-04 Martin Liska <mliska@suse.cz>
+
+ * README: Convert to utf8 from iso8859.
+
+2021-01-04 Martin Liska <mliska@suse.cz>
+
+ * gcc.target/avr/avr.exp: Run dos2unix on the file.
+
+2021-01-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/98291
+ * gcc.dg/vect/slp-reduc-11.c: New testcase.
+ * gcc.dg/vect/vect-reduc-in-order-4.c: Adjust.
+
+2021-01-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/96782
+ * gcc.dg/tree-ssa/pr96782.c: New test.
+
+2021-01-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * gcc.misc-tests/outputs.exp: Adjust testcase.
+
+2021-01-01 Jakub Jelinek <jakub@redhat.com>
+
+ * ChangeLog-2020: Rotate ChangeLog. New file.
+
+2021-01-01 Joel Brobecker <brobecker@adacore.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_arm_fp16_alternative_ok_nocache):
+ Return zero for *-*-vxworks7r* targets.
+ * gcc.target/arm/aapcs/vfp22.c: Require arm_fp16_alternative_ok.
+ * gcc.target/arm/aapcs/vfp23.c: Likewise.
+ * gcc.target/arm/aapcs/vfp24.c: Likewise.
+ * gcc.target/arm/aapcs/vfp25.c: Likewise.
+
+2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+
+ * g++.dg/init/new26.C: Fix overriding of the delete operator
+ for c++14 profile.
+
+2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+
+ * g++.dg/tls/pr79288.C: Skip on vxworks_kernel (TLS model
+ not supported).
+
+2021-01-01 Joel Brobecker <brobecker@adacore.com>
+
+ * gcc.target/arm/memset-inline-2.c: Add -mno-long-calls to
+ the test's dg-options.
+ * gcc.target/arm/pr78255-2.c: Likewise.
+
+2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+
+ * g++.old-deja/g++.mike/p658.C: Also undefine OK on VxWorks RTP.
+
+2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+
+ * g++.dg/opt/20050511-1.C: Work around UINT32 in vxworks rtp
+ headers too.
+
+2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+
+ * g++.old-deja/g++.pt/const2.C: Skip on vxworks kernel.
+
+2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+
+ * g++.dg/warn/miss-format-1.C: Remove vxworks-specific test
+ directives.
+
+2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+
+ * g++.dg/tree-ssa/copyprop.C: Undefine ERROR if defined.
+
+2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+
+ * g++.dg/other/anon5.C: Skip on vxworks kernel.
+
+2021-01-01 Jerome Lambourg <lambourg@adacore.com>
+
+ * gcc.dg/vxworks/initpri1.c: Tigthen VxWorks version check.
+ * gcc.dg/vxworks/initpri2.c: Likewise.
+
+2021-01-01 Joel Brobecker <brobecker@adacore.com>
+
+ * gcc.dg/intmax_t-1.c: Do not expect an error on *-*-vxworks7r*
+ targets.
+
+2021-01-01 Olivier Hainque <hainque@adacore.com>
+
+ * gcc.dg/pthread-init-1.c: Fix the VxWorks xfail filters.
+ * gcc.dg/pthread-init-2.c: Ditto.
+
+2021-01-01 Olivier Hainque <hainque@adacore.com>
+
+ * lib/target-supports.exp (check_weak_available,
+ check_fork_available, check_effective_target_lto,
+ check_effective_target_mempcpy): Add vxworks filters.
+
+2021-01-01 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.target/arm/mve/intrinsics/mve_libcall1.c: Pass an
+ explicit -mno-long-calls.
+ * gcc.target/arm/mve/intrinsics/mve_libcall2.c: Likewise.
+
+2021-01-01 Alexandre Oliva <oliva@adacore.com>
+
+ * g++.target/arm/no_unique_address_1.C: Add -mno-long-calls.
+ * g++.target/arm/no_unique_address_2.C: Likewise.
+
+2021-01-01 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.target/arm/headmerge-1.c: Add -mno-long-calls.
+ * gcc.target/arm/headmerge-2.c: Likewise.
+
+2021-01-01 Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.target/arm/fp16-aapcs-2.c: Use -mno-long-calls.
+
+Copyright (C) 2021 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/README b/gcc/testsuite/README
index 744ca2a..e62cc51 100644
--- a/gcc/testsuite/README
+++ b/gcc/testsuite/README
@@ -61,7 +61,7 @@ where
testsuite directory.
-Copyright (C) 1998-2021 Free Software Foundation, Inc.
+Copyright (C) 1998-2022 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 95b7462..612948a 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-2021 Free Software Foundation, Inc.
+Copyright (C) 2002-2022 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 f7d7299..8fd5d65 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-2021 Free Software Foundation, Inc.
+Copyright (C) 1997-2022 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/c-c++-common/Waddress-5.c b/gcc/testsuite/c-c++-common/Waddress-5.c
new file mode 100644
index 0000000..5d63c7d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Waddress-5.c
@@ -0,0 +1,133 @@
+/* PR c/33925 - missing -Waddress with the address of an inline function
+ { dg-do compile }
+ { dg-options "-Wall" }
+ { dg-require-weak "" } */
+
+extern inline int eifn (void);
+extern inline int eifn_def (void) { return 0; }
+
+static inline int sifn (void);
+static inline int sifn_def (void) { return 0; }
+
+inline int ifn (void);
+inline int ifn_def (void) { return 0; }
+
+extern __attribute__ ((weak)) int ewfn (void);
+extern __attribute__ ((weak)) int ewfn_def (void) { return 0; }
+
+__attribute__ ((weak)) int wfn (void);
+__attribute__ ((weak)) int wfn_def (void) { return 0; }
+
+static __attribute__((weakref ("ewfn"))) int swrfn (void);
+
+void test_function_eqz (int *p)
+{
+ *p++ = eifn == 0; // { dg-warning "-Waddress" }
+ *p++ = eifn_def == 0; // { dg-warning "-Waddress" }
+ *p++ = sifn == 0; // { dg-warning "-Waddress" }
+ *p++ = sifn_def == 0; // { dg-warning "-Waddress" }
+ *p++ = ifn == 0; // { dg-warning "-Waddress" }
+ *p++ = ifn_def == 0; // { dg-warning "-Waddress" }
+ *p++ = ewfn == 0;
+ *p++ = ewfn_def == 0; // { dg-warning "-Waddress" }
+ *p++ = wfn == 0;
+ *p++ = wfn_def == 0; // { dg-warning "-Waddress" }
+ *p++ = swrfn == 0;
+}
+
+
+int test_function_if (int i)
+{
+ if (eifn) // { dg-warning "-Waddress" }
+ i++;
+ if (eifn_def) // { dg-warning "-Waddress" }
+ i++;
+ if (sifn) // { dg-warning "-Waddress" }
+ i++;
+ if (sifn_def) // { dg-warning "-Waddress" }
+ i++;
+ if (ifn) // { dg-warning "-Waddress" }
+ i++;
+ if (ifn_def) // { dg-warning "-Waddress" }
+ i++;
+ if (ewfn)
+ i++;
+ if (ewfn_def) // { dg-warning "-Waddress" }
+ i++;
+ if (wfn)
+ i++;
+ if(wfn_def) // { dg-warning "-Waddress" }
+ i++;
+ if (swrfn)
+ i++;
+ return i;
+}
+
+
+extern int ei;
+extern int ei_def = 1;
+
+static int si;
+static int si_def = 1;
+
+int i;
+int i_def = 1;
+
+extern __attribute__ ((weak)) int ewi; // declaration (may be null)
+extern __attribute__ ((weak)) int ewi_def = 1;
+
+__attribute__ ((weak)) int wi; // definition (cannot be bull)
+__attribute__ ((weak)) int wi_def = 1;
+
+static __attribute__((weakref ("ewi"))) int swri;
+
+void test_scalar (int *p)
+{
+ *p++ = &ei == 0; // { dg-warning "-Waddress" }
+ *p++ = &ei_def == 0; // { dg-warning "-Waddress" }
+ *p++ = &si == 0; // { dg-warning "-Waddress" }
+ *p++ = &si_def == 0; // { dg-warning "-Waddress" }
+ *p++ = &i == 0; // { dg-warning "-Waddress" }
+ *p++ = &i_def == 0; // { dg-warning "-Waddress" }
+ *p++ = &ewi == 0;
+ *p++ = &ewi_def == 0; // { dg-warning "-Waddress" }
+ *p++ = &wi == 0; // { dg-warning "-Waddress" }
+ *p++ = &wi_def == 0; // { dg-warning "-Waddress" }
+ *p++ = &swri == 0;
+}
+
+
+extern int eia[];
+extern int eia_def[] = { 1 };
+
+static int sia[1];
+static int sia_def[1] = { 1 };
+
+int ia[1];
+int ia_def[] = { 1 };
+
+extern __attribute__ ((weak)) int ewia[];
+extern __attribute__ ((weak)) int ewia_def[] = { 1 };
+
+__attribute__ ((weak)) int wia[1]; // definition (cannot be null)
+__attribute__ ((weak)) int wia_def[] = { 1 };
+
+static __attribute__((weakref ("ewia"))) int swria[1];
+
+void test_array (int *p)
+{
+ *p++ = eia == 0; // { dg-warning "-Waddress" }
+ *p++ = eia_def == 0; // { dg-warning "-Waddress" }
+ *p++ = sia == 0; // { dg-warning "-Waddress" }
+ *p++ = sia_def == 0; // { dg-warning "-Waddress" }
+ *p++ = ia == 0; // { dg-warning "-Waddress" }
+ *p++ = ia_def == 0; // { dg-warning "-Waddress" }
+ *p++ = ewia == 0;
+ *p++ = ewia_def == 0; // { dg-warning "-Waddress" }
+ *p++ = wia == 0; // { dg-warning "-Waddress" }
+ *p++ = wia_def == 0; // { dg-warning "-Waddress" }
+ *p++ = swria == 0;
+}
+
+/* { dg-prune-output "never defined" }
+ { dg-prune-output "initialized and declared 'extern'" } */
diff --git a/gcc/testsuite/c-c++-common/Waddress-6.c b/gcc/testsuite/c-c++-common/Waddress-6.c
new file mode 100644
index 0000000..e66e6e4
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Waddress-6.c
@@ -0,0 +1,32 @@
+/* PR c/102867 - -Waddress from macro expansion in readelf.c
+ { dg-do compile }
+ { dg-options "-Wall" } */
+
+#define F(x) ((&x) != 0)
+
+int warn_nomacro (int *p, int i)
+{
+ return &p[i] != 0; // { dg-warning "-Waddress" }
+}
+
+int nowarn_macro_expansion (int *p, int i)
+{
+ // Verify that -Waddress isn't issued for code from macro expansion.
+ return F (p[i]); // { dg-bogus "-Waddress" }
+}
+
+#define G(x, i) ((&x) + i)
+
+int warn_function_macro_expansion (int *p, int i)
+{
+ /* Verify that -Waddress is issued for code involving macro expansion
+ where the comparison takes place outside the macro. */
+ return G (*p, i) != 0; // { dg-warning "-Waddress" }
+}
+
+#define malloc __builtin_malloc
+
+int warn_object_macro_expansion (int *p, int i)
+{
+ return malloc != 0; // { dg-warning "-Waddress" }
+}
diff --git a/gcc/testsuite/c-c++-common/Walloca-larger-than.C b/gcc/testsuite/c-c++-common/Walloca-larger-than.C
deleted file mode 100644
index 464ea24..0000000
--- a/gcc/testsuite/c-c++-common/Walloca-larger-than.C
+++ /dev/null
@@ -1,21 +0,0 @@
-/* PR middle-end/100425 - missing -Walloca-larger-than with -O0
- { dg-do compile }
- { dg-options "-O0 -Wall -Walloca-larger-than=128" } */
-
-typedef __SIZE_TYPE__ size_t;
-
-#if __cplusplus
-extern "C"
-#endif
-
-void* alloca (size_t);
-
-void sink (void*);
-
-void warn_alloca_too_large (void)
-{
- sink (alloca (1));
- sink (alloca (128));
- sink (alloca (129)); // { dh-warning "\\\[-Walloca-larger-than" }
- sink (alloca (1024)); // { dh-warning "\\\[-Walloca-larger-than" }
-}
diff --git a/gcc/testsuite/c-c++-common/Walloca-larger-than.c b/gcc/testsuite/c-c++-common/Walloca-larger-than.c
new file mode 100644
index 0000000..6fdc1de
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Walloca-larger-than.c
@@ -0,0 +1,22 @@
+/* PR middle-end/100425 - missing -Walloca-larger-than with -O0
+ { dg-do compile }
+ { dg-options "-O0 -Wall -Walloca-larger-than=128" }
+ { dg-require-effective-target alloca } */
+
+typedef __SIZE_TYPE__ size_t;
+
+#if __cplusplus
+extern "C"
+#endif
+
+void* alloca (size_t);
+
+void sink (void*);
+
+void warn_alloca_too_large (void)
+{
+ sink (alloca (1));
+ sink (alloca (128));
+ sink (alloca (129)); // { dg-warning "\\\[-Walloca-larger-than" }
+ sink (alloca (1024)); // { dg-warning "\\\[-Walloca-larger-than" }
+}
diff --git a/gcc/testsuite/c-c++-common/Warray-bounds-9.c b/gcc/testsuite/c-c++-common/Warray-bounds-9.c
index be05775..3b5cdfe 100644
--- a/gcc/testsuite/c-c++-common/Warray-bounds-9.c
+++ b/gcc/testsuite/c-c++-common/Warray-bounds-9.c
@@ -1,7 +1,8 @@
/* PR tree-optimization/99121 - ICE in -Warray-bounds on a multidimensional
VLA
{ dg-do compile }
- { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
#define NOIPA __attribute__ ((noipa))
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-1.c b/gcc/testsuite/c-c++-common/Wbidi-chars-1.c
new file mode 100644
index 0000000..34f5ac1
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-1.c
@@ -0,0 +1,12 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+
+int main() {
+ int isAdmin = 0;
+ /*‮ } â¦if (isAdmin)⩠⦠begin admins only */
+/* { dg-warning "bidirectional" "" { target *-*-* } .-1 } */
+ __builtin_printf("You are an admin.\n");
+ /* end admins only ‮ { â¦*/
+/* { dg-warning "bidirectional" "" { target *-*-* } .-1 } */
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-10.c b/gcc/testsuite/c-c++-common/Wbidi-chars-10.c
new file mode 100644
index 0000000..cdcdce2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-10.c
@@ -0,0 +1,27 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=unpaired,ucn" } */
+/* More nesting testing. */
+
+/* RLE‫ LRI⦠PDF‬ PDIâ©*/
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int LRE_\u202a_PDF_\u202c;
+int LRE_\u202a_PDF_\u202c_LRE_\u202a_PDF_\u202c;
+int LRE_\u202a_LRI_\u2066_PDF_\u202c_PDI_\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int RLE_\u202b_RLI_\u2067_PDF_\u202c_PDI_\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int RLE_\u202b_RLI_\u2067_PDI_\u2069_PDF_\u202c;
+int FSI_\u2068_LRO_\u202d_PDI_\u2069_PDF_\u202c;
+int FSI_\u2068;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int FSI_\u2068_PDI_\u2069;
+int FSI_\u2068_FSI_\u2068_PDI_\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069;
+int RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDF_\u202c;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_FSI_\u2068_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-11.c b/gcc/testsuite/c-c++-common/Wbidi-chars-11.c
new file mode 100644
index 0000000..ea83029
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-11.c
@@ -0,0 +1,13 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=unpaired,ucn" } */
+/* Test that we warn when mixing UCN and UTF-8. */
+
+int LRE_‪_PDF_\u202c;
+/* { dg-warning "mismatch" "" { target *-*-* } .-1 } */
+int LRE_\u202a_PDF_‬_;
+/* { dg-warning "mismatch" "" { target *-*-* } .-1 } */
+const char *s1 = "LRE_‪_PDF_\u202c";
+/* { dg-warning "mismatch" "" { target *-*-* } .-1 } */
+const char *s2 = "LRE_\u202a_PDF_‬";
+/* { dg-warning "mismatch" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-12.c b/gcc/testsuite/c-c++-common/Wbidi-chars-12.c
new file mode 100644
index 0000000..b07eec1
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-12.c
@@ -0,0 +1,19 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile { target { c || c++11 } } } */
+/* { dg-options "-Wbidi-chars=any" } */
+/* Test raw strings. */
+
+const char *s1 = R"(a b c LRE‪ 1 2 3 PDF‬ x y z)";
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+const char *s2 = R"(a b c RLE‫ 1 2 3 PDF‬ x y z)";
+/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
+const char *s3 = R"(a b c LRO‭ 1 2 3 PDF‬ x y z)";
+/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
+const char *s4 = R"(a b c RLO‮ 1 2 3 PDF‬ x y z)";
+/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
+const char *s7 = R"(a b c FSI⨠1 2 3 PDI⩠x y) z";
+/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
+const char *s8 = R"(a b c PDIâ© x y )z";
+/* { dg-warning "U\\+2069" "" { target *-*-* } .-1 } */
+const char *s9 = R"(a b c PDF‬ x y z)";
+/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-13.c b/gcc/testsuite/c-c++-common/Wbidi-chars-13.c
new file mode 100644
index 0000000..b2dd9fd
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-13.c
@@ -0,0 +1,17 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile { target { c || c++11 } } } */
+/* { dg-options "-Wbidi-chars=unpaired" } */
+/* Test raw strings. */
+
+const char *s1 = R"(a b c LRE‪ 1 2 3)";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+const char *s2 = R"(a b c RLE‫ 1 2 3)";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+const char *s3 = R"(a b c LRO‭ 1 2 3)";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+const char *s4 = R"(a b c FSI⨠1 2 3)";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+const char *s5 = R"(a b c LRI⦠1 2 3)";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+const char *s6 = R"(a b c RLIâ§ 1 2 3)";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-14.c b/gcc/testsuite/c-c++-common/Wbidi-chars-14.c
new file mode 100644
index 0000000..cb6b05e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-14.c
@@ -0,0 +1,38 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=unpaired,ucn" } */
+/* Test PDI handling, which also pops any subsequent LREs, RLEs, LROs,
+ or RLOs. */
+
+/* LRI_â¦_LRI_â¦_RLE_‫_RLE_‫_RLE_‫_PDI_â©*/
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+// LRI_â¦_RLE_‫_RLE_‫_RLE_‫_PDI_â©
+// LRI_â¦_RLO_‮_RLE_‫_RLE_‫_PDI_â©
+// LRI_â¦_RLO_‮_RLE_‫_PDI_â©
+// FSI_â¨_RLO_‮_PDI_â©
+// FSI_â¨_FSI_â¨_RLO_‮_PDI_â©
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+
+int LRI_\u2066_LRI_\u2066_LRE_\u202a_LRE_\u202a_LRE_\u202a_PDI_\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int LRI_\u2066_LRI_\u2066_LRE_\u202a_LRE_\u202a_LRE_\u202a_PDI_\u2069_PDI_\u2069;
+int LRI_\u2066_LRI_\u2066_LRI_\u2066_LRE_\u202a_LRE_\u202a_LRE_\u202a_PDI_\u2069_PDI_\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int PDI_\u2069;
+int LRI_\u2066_PDI_\u2069;
+int RLI_\u2067_PDI_\u2069;
+int LRE_\u202a_LRI_\u2066_PDI_\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int LRI_\u2066_LRE_\u202a_PDF_\u202c_PDI_\u2069;
+int LRI_\u2066_LRE_\u202a_LRE_\u202a_PDF_\u202c_PDI_\u2069;
+int RLI_\u2067_LRI_\u2066_LRE_\u202a_LRE_\u202a_PDF_\u202c_PDI_\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int FSI_\u2068_LRI_\u2066_LRE_\u202a_LRE_\u202a_PDF_\u202c_PDI_\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int RLO_\u202e_PDI_\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int RLI_\u2067_PDI_\u2069_RLI_\u2067;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int FSI_\u2068_PDF_\u202c_PDI_\u2069;
+int FSI_\u2068_FSI_\u2068_PDF_\u202c_PDI_\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-15.c b/gcc/testsuite/c-c++-common/Wbidi-chars-15.c
new file mode 100644
index 0000000..a0ce8ff
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-15.c
@@ -0,0 +1,59 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=unpaired" } */
+/* Test unpaired bidi control chars in multiline comments. */
+
+/*
+ * LRE‪ end
+ */
+/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
+/*
+ * RLE‫ end
+ */
+/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
+/*
+ * LRO‭ end
+ */
+/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
+/*
+ * RLO‮ end
+ */
+/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
+/*
+ * LRI⦠end
+ */
+/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
+/*
+ * RLIâ§ end
+ */
+/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
+/*
+ * FSI⨠end
+ */
+/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
+/* LRE‪
+ PDF‬ */
+/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
+/* FSIâ¨
+ PDIâ© */
+/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
+
+/* LRE<‪>
+ *
+ */
+/* { dg-warning "unpaired" "" { target *-*-* } .-3 } */
+
+/*
+ * LRE<‪>
+ */
+/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
+
+/*
+ *
+ * LRE<‪> */
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+
+/* RLI<â§> */ /* PDI<â©> */
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* LRE<‪> */ /* PDF<‬> */
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-16.c b/gcc/testsuite/c-c++-common/Wbidi-chars-16.c
new file mode 100644
index 0000000..eaf0ec9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-16.c
@@ -0,0 +1,26 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=any,ucn" } */
+/* Test LTR/RTL chars. */
+
+/* LTR<‎> */
+/* { dg-warning "U\\+200E" "" { target *-*-* } .-1 } */
+// LTR<‎>
+/* { dg-warning "U\\+200E" "" { target *-*-* } .-1 } */
+/* RTL<â€> */
+/* { dg-warning "U\\+200F" "" { target *-*-* } .-1 } */
+// RTL<â€>
+/* { dg-warning "U\\+200F" "" { target *-*-* } .-1 } */
+
+const char *s1 = "LTR<‎>";
+/* { dg-warning "U\\+200E" "" { target *-*-* } .-1 } */
+const char *s2 = "LTR\u200e";
+/* { dg-warning "U\\+200E" "" { target *-*-* } .-1 } */
+const char *s3 = "LTR\u200E";
+/* { dg-warning "U\\+200E" "" { target *-*-* } .-1 } */
+const char *s4 = "RTL<â€>";
+/* { dg-warning "U\\+200F" "" { target *-*-* } .-1 } */
+const char *s5 = "RTL\u200f";
+/* { dg-warning "U\\+200F" "" { target *-*-* } .-1 } */
+const char *s6 = "RTL\u200F";
+/* { dg-warning "U\\+200F" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-17.c b/gcc/testsuite/c-c++-common/Wbidi-chars-17.c
new file mode 100644
index 0000000..3419221
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-17.c
@@ -0,0 +1,30 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=unpaired,ucn" } */
+/* Test LTR/RTL chars. */
+
+/* LTR<‎> */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+// LTR<‎>
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+/* RTL<â€> */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+// RTL<â€>
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int ltr_\u200e;
+/* { dg-error "universal character " "" { target *-*-* } .-1 } */
+int rtl_\u200f;
+/* { dg-error "universal character " "" { target *-*-* } .-1 } */
+
+const char *s1 = "LTR<‎>";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+const char *s2 = "LTR\u200e";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+const char *s3 = "LTR\u200E";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+const char *s4 = "RTL<â€>";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+const char *s5 = "RTL\u200f";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+const char *s6 = "RTL\u200F";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-18.c b/gcc/testsuite/c-c++-common/Wbidi-chars-18.c
new file mode 100644
index 0000000..ae586d5
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-18.c
@@ -0,0 +1,11 @@
+/* PR preprocessor/104030 */
+/* { dg-do compile } */
+/* By default, don't warn about UCNs. */
+
+const char *
+fn ()
+{
+ const char *aText = "\u202D" "abc";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ return aText;
+}
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-19.c b/gcc/testsuite/c-c++-common/Wbidi-chars-19.c
new file mode 100644
index 0000000..9985c3b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-19.c
@@ -0,0 +1,11 @@
+/* PR preprocessor/104030 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=unpaired,ucn" } */
+
+const char *
+fn ()
+{
+ const char *aText = "\u202D" "abc";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ return aText;
+}
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-2.c b/gcc/testsuite/c-c++-common/Wbidi-chars-2.c
new file mode 100644
index 0000000..2340374
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-2.c
@@ -0,0 +1,9 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+
+int main() {
+ /* Say hello; newlineâ§/*/ return 0 ;
+/* { dg-warning "bidirectional" "" { target *-*-* } .-1 } */
+ __builtin_printf("Hello world.\n");
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-20.c b/gcc/testsuite/c-c++-common/Wbidi-chars-20.c
new file mode 100644
index 0000000..859f3d5
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-20.c
@@ -0,0 +1,11 @@
+/* PR preprocessor/104030 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=any" } */
+
+const char *
+fn ()
+{
+ const char *aText = "\u202D" "abc";
+/* { dg-bogus "U\\+202D" "" { target *-*-* } .-1 } */
+ return aText;
+}
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-21.c b/gcc/testsuite/c-c++-common/Wbidi-chars-21.c
new file mode 100644
index 0000000..2720b8a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-21.c
@@ -0,0 +1,11 @@
+/* PR preprocessor/104030 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=ucn,any" } */
+
+const char *
+fn ()
+{
+ const char *aText = "\u202D" "abc";
+/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
+ return aText;
+}
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-22.c b/gcc/testsuite/c-c++-common/Wbidi-chars-22.c
new file mode 100644
index 0000000..f960e59
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-22.c
@@ -0,0 +1,11 @@
+/* PR preprocessor/104030 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=none,ucn" } */
+
+const char *
+fn ()
+{
+ const char *aText = "\u202D" "abc";
+/* { dg-bogus "" "" { target *-*-* } .-1 } */
+ return aText;
+}
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-23.c b/gcc/testsuite/c-c++-common/Wbidi-chars-23.c
new file mode 100644
index 0000000..7de0a11
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-23.c
@@ -0,0 +1,11 @@
+/* PR preprocessor/104030 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=ucn" } */
+
+const char *
+fn ()
+{
+ const char *aText = "\u202D" "abc";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ return aText;
+}
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-3.c b/gcc/testsuite/c-c++-common/Wbidi-chars-3.c
new file mode 100644
index 0000000..9dc7edb
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-3.c
@@ -0,0 +1,11 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+
+int main() {
+ const char* access_level = "user";
+ if (__builtin_strcmp(access_level, "user‮ â¦// Check if adminâ© â¦")) {
+/* { dg-warning "bidirectional" "" { target *-*-* } .-1 } */
+ __builtin_printf("You are an admin.\n");
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-4.c b/gcc/testsuite/c-c++-common/Wbidi-chars-4.c
new file mode 100644
index 0000000..d2f0739
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-4.c
@@ -0,0 +1,188 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=any,ucn -Wno-multichar -Wno-overflow" } */
+/* Test all bidi chars in various contexts (identifiers, comments,
+ string literals, character constants), both UCN and UTF-8. The bidi
+ chars here are properly terminated, except for the character constants. */
+
+/* a b c LRE‪ 1 2 3 PDF‬ x y z */
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+/* a b c RLE‫ 1 2 3 PDF‬ x y z */
+/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
+/* a b c LRO‭ 1 2 3 PDF‬ x y z */
+/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
+/* a b c RLO‮ 1 2 3 PDF‬ x y z */
+/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
+/* a b c LRI⦠1 2 3 PDI⩠x y z */
+/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
+/* a b c RLIâ§ 1 2 3 PDIâ© x y */
+/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
+/* a b c FSI⨠1 2 3 PDI⩠x y z */
+/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
+
+/* Same but C++ comments instead. */
+// a b c LRE‪ 1 2 3 PDF‬ x y z
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+// a b c RLE‫ 1 2 3 PDF‬ x y z
+/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
+// a b c LRO‭ 1 2 3 PDF‬ x y z
+/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
+// a b c RLO‮ 1 2 3 PDF‬ x y z
+/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
+// a b c LRI⦠1 2 3 PDI⩠x y z
+/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
+// a b c RLIâ§ 1 2 3 PDIâ© x y
+/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
+// a b c FSI⨠1 2 3 PDI⩠x y z
+/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
+
+/* Here we're closing an unopened context, warn when =any. */
+/* a b c PDIâ© x y z */
+/* { dg-warning "U\\+2069" "" { target *-*-* } .-1 } */
+/* a b c PDF‬ x y z */
+/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
+// a b c PDIâ© x y z
+/* { dg-warning "U\\+2069" "" { target *-*-* } .-1 } */
+// a b c PDF‬ x y z
+/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
+
+/* Multiline comments. */
+/* a b c PDIâ© x y z
+ */
+/* { dg-warning "U\\+2069" "" { target *-*-* } .-2 } */
+/* a b c PDF‬ x y z
+ */
+/* { dg-warning "U\\+202C" "" { target *-*-* } .-2 } */
+/* first
+ a b c PDIâ© x y z
+ */
+/* { dg-warning "U\\+2069" "" { target *-*-* } .-2 } */
+/* first
+ a b c PDF‬ x y z
+ */
+/* { dg-warning "U\\+202C" "" { target *-*-* } .-2 } */
+/* first
+ a b c PDIâ© x y z */
+/* { dg-warning "U\\+2069" "" { target *-*-* } .-1 } */
+/* first
+ a b c PDF‬ x y z */
+/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
+
+void
+g1 ()
+{
+ const char *s1 = "a b c LRE‪ 1 2 3 PDF‬ x y z";
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+ const char *s2 = "a b c RLE‫ 1 2 3 PDF‬ x y z";
+/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
+ const char *s3 = "a b c LRO‭ 1 2 3 PDF‬ x y z";
+/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
+ const char *s4 = "a b c RLO‮ 1 2 3 PDF‬ x y z";
+/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
+ const char *s5 = "a b c LRI⦠1 2 3 PDI⩠x y z";
+/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
+ const char *s6 = "a b c RLIâ§ 1 2 3 PDIâ© x y z";
+/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
+ const char *s7 = "a b c FSI⨠1 2 3 PDI⩠x y z";
+/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
+ const char *s8 = "a b c PDIâ© x y z";
+/* { dg-warning "U\\+2069" "" { target *-*-* } .-1 } */
+ const char *s9 = "a b c PDF‬ x y z";
+/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
+
+ const char *s10 = "a b c LRE\u202a 1 2 3 PDF\u202c x y z";
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+ const char *s11 = "a b c LRE\u202A 1 2 3 PDF\u202c x y z";
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+ const char *s12 = "a b c RLE\u202b 1 2 3 PDF\u202c x y z";
+/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
+ const char *s13 = "a b c RLE\u202B 1 2 3 PDF\u202c x y z";
+/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
+ const char *s14 = "a b c LRO\u202d 1 2 3 PDF\u202c x y z";
+/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
+ const char *s15 = "a b c LRO\u202D 1 2 3 PDF\u202c x y z";
+/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
+ const char *s16 = "a b c RLO\u202e 1 2 3 PDF\u202c x y z";
+/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
+ const char *s17 = "a b c RLO\u202E 1 2 3 PDF\u202c x y z";
+/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
+ const char *s18 = "a b c LRI\u2066 1 2 3 PDI\u2069 x y z";
+/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
+ const char *s19 = "a b c RLI\u2067 1 2 3 PDI\u2069 x y z";
+/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
+ const char *s20 = "a b c FSI\u2068 1 2 3 PDI\u2069 x y z";
+/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
+}
+
+void
+g2 ()
+{
+ const char c1 = '\u202a';
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+ const char c2 = '\u202A';
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+ const char c3 = '\u202b';
+/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
+ const char c4 = '\u202B';
+/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
+ const char c5 = '\u202d';
+/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
+ const char c6 = '\u202D';
+/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
+ const char c7 = '\u202e';
+/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
+ const char c8 = '\u202E';
+/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
+ const char c9 = '\u2066';
+/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
+ const char c10 = '\u2067';
+/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
+ const char c11 = '\u2068';
+/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
+}
+
+int a‪b‬c;
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+int a‫b‬c;
+/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
+int a‭b‬c;
+/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
+int a‮b‬c;
+/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
+int aâ¦bâ©c;
+/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
+int aâ§bâ©c;
+/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
+int aâ¨bâ©c;
+/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
+int A‬X;
+/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
+int A\u202cY;
+/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
+int A\u202CY2;
+/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
+
+int d\u202ae\u202cf;
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+int d\u202Ae\u202cf2;
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+int d\u202be\u202cf;
+/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
+int d\u202Be\u202cf2;
+/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
+int d\u202de\u202cf;
+/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
+int d\u202De\u202cf2;
+/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
+int d\u202ee\u202cf;
+/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
+int d\u202Ee\u202cf2;
+/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
+int d\u2066e\u2069f;
+/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
+int d\u2067e\u2069f;
+/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
+int d\u2068e\u2069f;
+/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
+int X\u2069;
+/* { dg-warning "U\\+2069" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-5.c b/gcc/testsuite/c-c++-common/Wbidi-chars-5.c
new file mode 100644
index 0000000..ad49498
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-5.c
@@ -0,0 +1,188 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=unpaired,ucn -Wno-multichar -Wno-overflow" } */
+/* Test all bidi chars in various contexts (identifiers, comments,
+ string literals, character constants), both UCN and UTF-8. The bidi
+ chars here are properly terminated, except for the character constants. */
+
+/* a b c LRE‪ 1 2 3 PDF‬ x y z */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+/* a b c RLE‫ 1 2 3 PDF‬ x y z */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+/* a b c LRO‭ 1 2 3 PDF‬ x y z */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+/* a b c RLO‮ 1 2 3 PDF‬ x y z */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+/* a b c LRI⦠1 2 3 PDI⩠x y z */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+/* a b c RLIâ§ 1 2 3 PDIâ© x y */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+/* a b c FSI⨠1 2 3 PDI⩠x y z */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+
+/* Same but C++ comments instead. */
+// a b c LRE‪ 1 2 3 PDF‬ x y z
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+// a b c RLE‫ 1 2 3 PDF‬ x y z
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+// a b c LRO‭ 1 2 3 PDF‬ x y z
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+// a b c RLO‮ 1 2 3 PDF‬ x y z
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+// a b c LRI⦠1 2 3 PDI⩠x y z
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+// a b c RLIâ§ 1 2 3 PDIâ© x y
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+// a b c FSI⨠1 2 3 PDI⩠x y z
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+
+/* Here we're closing an unopened context, warn when =any. */
+/* a b c PDIâ© x y z */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+/* a b c PDF‬ x y z */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+// a b c PDIâ© x y z
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+// a b c PDF‬ x y z
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+
+/* Multiline comments. */
+/* a b c PDIâ© x y z
+ */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-2 } */
+/* a b c PDF‬ x y z
+ */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-2 } */
+/* first
+ a b c PDIâ© x y z
+ */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-2 } */
+/* first
+ a b c PDF‬ x y z
+ */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-2 } */
+/* first
+ a b c PDIâ© x y z */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+/* first
+ a b c PDF‬ x y z */
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+
+void
+g1 ()
+{
+ const char *s1 = "a b c LRE‪ 1 2 3 PDF‬ x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s2 = "a b c RLE‫ 1 2 3 PDF‬ x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s3 = "a b c LRO‭ 1 2 3 PDF‬ x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s4 = "a b c RLO‮ 1 2 3 PDF‬ x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s5 = "a b c LRI⦠1 2 3 PDI⩠x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s6 = "a b c RLIâ§ 1 2 3 PDIâ© x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s7 = "a b c FSI⨠1 2 3 PDI⩠x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s8 = "a b c PDIâ© x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s9 = "a b c PDF‬ x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+
+ const char *s10 = "a b c LRE\u202a 1 2 3 PDF\u202c x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s11 = "a b c LRE\u202A 1 2 3 PDF\u202c x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s12 = "a b c RLE\u202b 1 2 3 PDF\u202c x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s13 = "a b c RLE\u202B 1 2 3 PDF\u202c x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s14 = "a b c LRO\u202d 1 2 3 PDF\u202c x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s15 = "a b c LRO\u202D 1 2 3 PDF\u202c x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s16 = "a b c RLO\u202e 1 2 3 PDF\u202c x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s17 = "a b c RLO\u202E 1 2 3 PDF\u202c x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s18 = "a b c LRI\u2066 1 2 3 PDI\u2069 x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s19 = "a b c RLI\u2067 1 2 3 PDI\u2069 x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+ const char *s20 = "a b c FSI\u2068 1 2 3 PDI\u2069 x y z";
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+}
+
+void
+g2 ()
+{
+ const char c1 = '\u202a';
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char c2 = '\u202A';
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char c3 = '\u202b';
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char c4 = '\u202B';
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char c5 = '\u202d';
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char c6 = '\u202D';
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char c7 = '\u202e';
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char c8 = '\u202E';
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char c9 = '\u2066';
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char c10 = '\u2067';
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char c11 = '\u2068';
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+}
+
+int a‪b‬c;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int a‫b‬c;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int a‭b‬c;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int a‮b‬c;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int aâ¦bâ©c;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int aâ§bâ©c;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int aâ¨bâ©c;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int A‬X;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int A\u202cY;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int A\u202CY2;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+
+int d\u202ae\u202cf;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int d\u202Ae\u202cf2;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int d\u202be\u202cf;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int d\u202Be\u202cf2;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int d\u202de\u202cf;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int d\u202De\u202cf2;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int d\u202ee\u202cf;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int d\u202Ee\u202cf2;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int d\u2066e\u2069f;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int d\u2067e\u2069f;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int d\u2068e\u2069f;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+int X\u2069;
+/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-6.c b/gcc/testsuite/c-c++-common/Wbidi-chars-6.c
new file mode 100644
index 0000000..8c1c1b2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-6.c
@@ -0,0 +1,155 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=ucn,unpaired" } */
+/* Test nesting of bidi chars in various contexts. */
+
+/* Terminated by the wrong char: */
+/* a b c LRE‪ 1 2 3 PDI⩠x y z */
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* a b c RLE‫ 1 2 3 PDI⩠x y z*/
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* a b c LRO‭ 1 2 3 PDI⩠x y z */
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* a b c RLO‮ 1 2 3 PDI⩠x y z */
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* a b c LRI⦠1 2 3 PDF‬ x y z */
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* a b c RLI⧠1 2 3 PDF‬ x y z */
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* a b c FSI⨠1 2 3 PDF‬ x y z*/
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+
+/* LRE‪ PDF‬ */
+/* LRE‪ LRE‪ PDF‬ PDF‬ */
+/* PDF‬ LRE‪ PDF‬ */
+/* LRE‪ PDF‬ LRE‪ PDF‬ */
+/* LRE‪ LRE‪ PDF‬ */
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* PDF‬ LRE‪ */
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+
+// a b c LRE‪ 1 2 3 PDI⩠x y z
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+// a b c RLE‫ 1 2 3 PDI⩠x y z*/
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+// a b c LRO‭ 1 2 3 PDI⩠x y z
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+// a b c RLO‮ 1 2 3 PDI⩠x y z
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+// a b c LRI⦠1 2 3 PDF‬ x y z
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+// a b c RLI⧠1 2 3 PDF‬ x y z
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+// a b c FSI⨠1 2 3 PDF‬ x y z
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+
+// LRE‪ PDF‬
+// LRE‪ LRE‪ PDF‬ PDF‬
+// PDF‬ LRE‪ PDF‬
+// LRE‪ PDF‬ LRE‪ PDF‬
+// LRE‪ LRE‪ PDF‬
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+// PDF‬ LRE‪
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+
+void
+g1 ()
+{
+ const char *s1 = "a b c LRE‪ 1 2 3 PDI⩠x y z";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s2 = "a b c LRE\u202a 1 2 3 PDI\u2069 x y z";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s3 = "a b c RLE‫ 1 2 3 PDI⩠x y ";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s4 = "a b c RLE\u202b 1 2 3 PDI\u2069 x y z";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s5 = "a b c LRO‭ 1 2 3 PDI⩠x y z";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s6 = "a b c LRO\u202d 1 2 3 PDI\u2069 x y z";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s7 = "a b c RLO‮ 1 2 3 PDI⩠x y z";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s8 = "a b c RLO\u202e 1 2 3 PDI\u2069 x y z";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s9 = "a b c LRI⦠1 2 3 PDF‬ x y z";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s10 = "a b c LRI\u2066 1 2 3 PDF\u202c x y z";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s11 = "a b c RLI⧠1 2 3 PDF‬ x y z\
+ ";
+/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
+ const char *s12 = "a b c RLI\u2067 1 2 3 PDF\u202c x y z";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s13 = "a b c FSI⨠1 2 3 PDF‬ x y z";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s14 = "a b c FSI\u2068 1 2 3 PDF\u202c x y z";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s15 = "PDF‬ LRE‪";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s16 = "PDF\u202c LRE\u202a";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s17 = "LRE‪ PDF‬";
+ const char *s18 = "LRE\u202a PDF\u202c";
+ const char *s19 = "LRE‪ LRE‪ PDF‬ PDF‬";
+ const char *s20 = "LRE\u202a LRE\u202a PDF\u202c PDF\u202c";
+ const char *s21 = "PDF‬ LRE‪ PDF‬";
+ const char *s22 = "PDF\u202c LRE\u202a PDF\u202c";
+ const char *s23 = "LRE‪ LRE‪ PDF‬";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s24 = "LRE\u202a LRE\u202a PDF\u202c";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s25 = "PDF‬ LRE‪";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s26 = "PDF\u202c LRE\u202a";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s27 = "PDF‬ LRE\u202a";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+ const char *s28 = "PDF\u202c LRE‪";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+}
+
+int aLRE‪bPDIâ©;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int A\u202aB\u2069C;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int aRLE‫bPDIâ©;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int a\u202bB\u2069c;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int aLRO‭bPDIâ©;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int a\u202db\u2069c2;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int aRLO‮bPDIâ©;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int a\u202eb\u2069;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int aLRIâ¦bPDF‬;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int a\u2066b\u202c;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int aRLIâ§bPDF‬c
+;
+/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
+int a\u2067b\u202c;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int aFSIâ¨bPDF‬;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int a\u2068b\u202c;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int aFSIâ¨bPD\u202C;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int aFSI\u2068bPDF‬_;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int aLRE‪bPDF‬b;
+int A\u202aB\u202c;
+int a_LRE‪_LRE‪_b_PDF‬_PDF‬;
+int A\u202aA\u202aB\u202cB\u202c;
+int aPDF‬bLREadPDF‬;
+int a_\u202C_\u202a_\u202c;
+int a_LRE‪_b_PDF‬_c_LRE‪_PDF‬;
+int a_\u202a_\u202c_\u202a_\u202c_;
+int a_LRE‪_b_PDF‬_c_LRE‪;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int a_\u202a_\u202c_\u202a_;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-7.c b/gcc/testsuite/c-c++-common/Wbidi-chars-7.c
new file mode 100644
index 0000000..3270952
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-7.c
@@ -0,0 +1,9 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=any,ucn" } */
+/* Test we ignore UCNs in comments. */
+
+// a b c \u202a 1 2 3
+// a b c \u202A 1 2 3
+/* a b c \u202a 1 2 3 */
+/* a b c \u202A 1 2 3 */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-8.c b/gcc/testsuite/c-c++-common/Wbidi-chars-8.c
new file mode 100644
index 0000000..3983168
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-8.c
@@ -0,0 +1,13 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=any,ucn" } */
+/* Test \u vs \U. */
+
+int a_\u202A;
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+int a_\u202a_2;
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+int a_\U0000202A_3;
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+int a_\U0000202a_4;
+/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-9.c b/gcc/testsuite/c-c++-common/Wbidi-chars-9.c
new file mode 100644
index 0000000..0ddb0d9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-9.c
@@ -0,0 +1,29 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=unpaired,ucn" } */
+/* Test that we properly separate bidi contexts (comment/identifier/character
+ constant/string literal). */
+
+/* LRE ->‪<- */ int pdf_\u202c_1;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* RLE ->‫<- */ int pdf_\u202c_2;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* LRO ->‭<- */ int pdf_\u202c_3;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* RLO ->‮<- */ int pdf_\u202c_4;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* LRI ->â¦<-*/ int pdi_\u2069_1;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* RLI ->â§<- */ int pdi_\u2069_12;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* FSI ->â¨<- */ int pdi_\u2069_3;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+
+const char *s1 = "LRE\u202a"; /* PDF ->‬<- */
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+/* LRE ->‪<- */ const char *s2 = "PDF\u202c";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+const char *s3 = "LRE\u202a"; int pdf_\u202c_5;
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+int lre_\u202a; const char *s4 = "PDF\u202c";
+/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-ranges.c b/gcc/testsuite/c-c++-common/Wbidi-chars-ranges.c
new file mode 100644
index 0000000..0c71f30
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbidi-chars-ranges.c
@@ -0,0 +1,54 @@
+/* PR preprocessor/103026 */
+/* { dg-do compile } */
+/* { dg-options "-Wbidi-chars=unpaired,ucn -fdiagnostics-show-caret" } */
+/* Verify that we escape and underline pertinent bidirectional
+ control characters when quoting the source. */
+
+int test_unpaired_bidi () {
+ int isAdmin = 0;
+ /*‮ } â¦if (isAdmin)⩠⦠begin admins only */
+/* { dg-warning "bidirectional" "" { target *-*-* } .-1 } */
+#if 0
+ { dg-begin-multiline-output "" }
+ /*<U+202E> } <U+2066>if (isAdmin)<U+2069> <U+2066> begin admins only */
+ ~~~~~~~~ ~~~~~~~~ ^
+ | | |
+ | | end of bidirectional context
+ U+202E (RIGHT-TO-LEFT OVERRIDE) U+2066 (LEFT-TO-RIGHT ISOLATE)
+ { dg-end-multiline-output "" }
+#endif
+
+ __builtin_printf("You are an admin.\n");
+ /* end admins only ‮ { â¦*/
+/* { dg-warning "bidirectional" "" { target *-*-* } .-1 } */
+#if 0
+ { dg-begin-multiline-output "" }
+ /* end admins only <U+202E> { <U+2066>*/
+ ~~~~~~~~ ~~~~~~~~ ^
+ | | |
+ | | end of bidirectional context
+ | U+2066 (LEFT-TO-RIGHT ISOLATE)
+ U+202E (RIGHT-TO-LEFT OVERRIDE)
+ { dg-end-multiline-output "" }
+#endif
+
+ return 0;
+}
+
+int LRE_‪_PDF_\u202c;
+/* { dg-warning "mismatch" "" { target *-*-* } .-1 } */
+#if 0
+ { dg-begin-multiline-output "" }
+ int LRE_<U+202A>_PDF_\u202c;
+ ~~~~~~~~ ^~~~~~
+ { dg-end-multiline-output "" }
+#endif
+
+const char *s1 = "LRE_‪_PDF_\u202c";
+/* { dg-warning "mismatch" "" { target *-*-* } .-1 } */
+#if 0
+ { dg-begin-multiline-output "" }
+ const char *s1 = "LRE_<U+202A>_PDF_\u202c";
+ ~~~~~~~~ ^~~~~~
+ { dg-end-multiline-output "" }
+#endif
diff --git a/gcc/testsuite/c-c++-common/Wdangling-pointer-2.c b/gcc/testsuite/c-c++-common/Wdangling-pointer-2.c
new file mode 100644
index 0000000..20f11b2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wdangling-pointer-2.c
@@ -0,0 +1,438 @@
+/* PR middle-end/63272 - GCC should warn when using pointer to dead scoped
+ variable within the same function
+ Exercise basic cases of -Wdangling-pointer with optimization.
+ { dg-do compile }
+ { dg-options "-O2 -Wall -Wno-uninitialized -Wno-return-local-addr -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
+
+typedef __INTPTR_TYPE__ intptr_t;
+typedef __SIZE_TYPE__ size_t;
+
+#if __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
+#define NOIPA __attribute__ ((noipa))
+
+EXTERN_C void* alloca (size_t);
+EXTERN_C void* malloc (size_t);
+EXTERN_C void* memchr (const void*, int, size_t);
+EXTERN_C char* strchr (const char*, int);
+
+int sink (const void*, ...);
+#define sink(...) sink (0, __VA_ARGS__)
+
+
+NOIPA void nowarn_addr (void)
+{
+ int *p;
+ {
+ int a[] = { 1, 2, 3 };
+ p = a;
+ }
+
+ // This is suspect but not a clear error.
+ sink (&p);
+}
+
+
+NOIPA char* nowarn_ptr (void)
+{
+ char *p;
+ sink (&p);
+ return p;
+}
+
+
+NOIPA char* nowarn_cond_ptr (void)
+{
+ // Distilled from a false positive in Glibc dlerror.c.
+ char *q;
+ if (sink (&q))
+ return q;
+
+ return 0;
+}
+
+
+NOIPA void nowarn_loop_ptr (int n, int *p)
+{
+ // Distilled from a false positive in Glibc td_thr_get_info.c.
+ for (int i = 0; i != 2; ++i)
+ {
+ int x;
+ sink (&x);
+ *p++ = x;
+ }
+
+ /* With the loop unrolled, Q is clobbered just before the call to
+ sink(), making it indistinguishable from passing it a pointer
+ to an out-of-scope variable. Verify that the warning doesn't
+ suffer from false positives due to this.
+ int * q;
+ int * q.1_17;
+ int * q.1_26;
+
+ <bb 2>:
+ f (&q);
+ q.1_17 = q;
+ *p_5(D) = q.1_17;
+ q ={v} {CLOBBER};
+ f (&q);
+ q.1_26 = q;
+ MEM[(void * *)p_5(D) + 8B] = q.1_26;
+ q ={v} {CLOBBER};
+ return;
+ */
+}
+
+
+NOIPA void nowarn_intptr_t (void)
+{
+ intptr_t ip;
+ {
+ int a[] = { 1, 2, 3 };
+ ip = (intptr_t)a;
+ }
+
+ // Using an intptr_t is not diagnosed.
+ sink (0, ip);
+}
+
+
+NOIPA void nowarn_string_literal (void)
+{
+ const char *s;
+ {
+ s = "123";
+ }
+
+ sink (s);
+}
+
+
+NOIPA void nowarn_extern_array (int x)
+{
+ {
+ /* This is a silly sanity check. */
+ extern int eia[];
+ int *p;
+ {
+ p = eia;
+ }
+ sink (p);
+ }
+}
+
+
+NOIPA void nowarn_static_array (int x)
+{
+ {
+ const char *s;
+ {
+ static const char sca[] = "123";
+ s = sca;
+ }
+
+ sink (s);
+ }
+ {
+ const int *p;
+ {
+ static const int sia[] = { 1, 2, 3 };
+ p = sia;
+ }
+
+ sink (p);
+ }
+ {
+ const int *p;
+ {
+ static const int sia[] = { 1, 2, 3 };
+ p = (const int*)memchr (sia, x, sizeof sia);
+ }
+
+ sink (p);
+ }
+}
+
+
+NOIPA void nowarn_alloca (unsigned n)
+{
+ {
+ char *p;
+ {
+ p = (char*)alloca (n);
+ }
+ sink (p);
+ }
+ {
+ int *p;
+ {
+ p = (int*)alloca (n * sizeof *p);
+ sink (p);
+ }
+ sink (p);
+ }
+ {
+ long *p;
+ {
+ p = (long*)alloca (n * sizeof *p);
+ sink (p);
+ p = p + 1;
+ }
+ sink (p);
+ }
+}
+
+
+#pragma GCC diagnostic push
+/* Verify that -Wdangling-pointer works with #pragma diagnostic. */
+#pragma GCC diagnostic ignored "-Wdangling-pointer"
+
+
+NOIPA void* nowarn_return_local_addr (void)
+{
+ int a[] = { 1, 2, 3 };
+ int *p = a;
+
+ /* This is a likely bug but it's not really one of using a dangling
+ pointer but rather of returning the address of a local variable
+ which is diagnosed by -Wreturn-local-addr. */
+ return p;
+}
+
+NOIPA void* warn_return_local_addr (void)
+{
+ int *p = 0;
+ {
+ int a[] = { 1, 2, 3 };
+ sink (a);
+ p = a;
+ }
+
+ /* Unlike the above case, here the pointer is dangling when it's
+ used. */
+ return p; // { dg-warning "using dangling pointer 'p' to 'a'" "pr??????" { xfail *-*-* } }
+}
+
+
+NOIPA void* nowarn_return_alloca (int n)
+{
+ int *p = (int*)alloca (n);
+ sink (p);
+
+ /* This is a likely bug but it's not really one of using a dangling
+ pointer but rather of returning the address of a local variable
+ which is diagnosed by -Wreturn-local-addr. */
+ return p;
+}
+
+
+NOIPA void nowarn_scalar_call_ignored (void *vp)
+{
+ int *p;
+ {
+ int i;
+ p = &i;
+ }
+ sink (p);
+}
+
+#pragma GCC diagnostic pop
+
+NOIPA void warn_scalar_call (void)
+{
+ int *p;
+ {
+ int i; // { dg-message "'i' declared" "note" }
+ p = &i;
+ }
+ // When the 'p' is optimized away it's not mentioned in the warning.
+ sink (p); // { dg-warning "using \(a \)?dangling pointer \('p' \)?to 'i'" "array" }
+}
+
+
+NOIPA void warn_array_call (void)
+{
+ int *p;
+ {
+ int a[] = { 1, 2, 3 }; // { dg-message "'a' declared" "note" }
+ p = a;
+ }
+ sink (p); // { dg-warning "using \(a \)?dangling pointer \('p' \)?to 'a'" "array" }
+}
+
+
+NOIPA void* warn_array_return (void)
+{
+ int *p;
+ {
+ int a[] = { 1, 2, 3 }; // { dg-message "'a' declared" "note" }
+ p = a;
+ }
+
+ return p; // { dg-warning "using \(a \)?dangling pointer \('p' \)?to 'a'" "array" }
+}
+
+
+NOIPA void warn_pr63272_c1 (int i)
+{
+ int *p = 0;
+
+ if (i)
+ {
+ int k = i; // { dg-message "'k' declared" "note" }
+ p = &k;
+ }
+
+ sink (p ? *p : 0); // { dg-warning "dangling pointer 'p' to 'k' may be used" }
+}
+
+
+NOIPA void warn_pr63272_c4 (void)
+{
+ int *p = 0;
+
+ {
+ int b; // { dg-message "'b' declared" "note" }
+ p = &b;
+ }
+
+ sink (p); // { dg-warning "using \(a \)?dangling pointer \('p' \)?to 'b'" "scalar" }
+}
+
+
+NOIPA void warn_cond_if (int i, int n)
+{
+ int *p;
+ if (i)
+ {
+ int a[] = { 1, 2 }; // { dg-message "'a' declared" "note" }
+ sink (a);
+ p = a;
+ }
+ else
+ {
+ int *b = (int*)malloc (n);
+ sink (b);
+ p = b;
+ }
+
+ sink (p); // { dg-warning "dangling pointer 'p' to 'a' may be used" }
+}
+
+
+NOIPA void warn_cond_else (int i, int n)
+{
+ int *p;
+ if (i)
+ {
+ int *a = (int*)malloc (n);
+ sink (a);
+ p = a;
+ }
+ else
+ {
+ int b[] = { 2, 3 };
+ sink (b);
+ p = b;
+ }
+
+ sink (p); // { dg-warning "dangling pointer 'p' to 'b' may be used" }
+}
+
+
+NOIPA void warn_cond_if_else (int i)
+{
+ int *p;
+ if (i)
+ {
+ int a[] = { 1, 2 }; // { dg-message "'a' declared" "note" }
+ sink (a);
+ p = a;
+ }
+ else
+ {
+ int b[] = { 3, 4 }; // { dg-message "'b' declared" "pr??????" { xfail *-*-* } }
+ sink (b);
+ p = b;
+ }
+
+ /* With a PHI with more than invalid argument, only one use is diagnosed
+ because after the first diagnostic the code suppresses subsequent
+ ones for the same use. This needs to be fixed. */
+ sink (p); // { dg-warning "dangling pointer 'p' to 'a' may be used" }
+ // { dg-warning "dangling pointer 'p' to 'b' may be used" "pr??????" { xfail *-*-* } .-1 }
+}
+
+
+NOIPA void nowarn_gcc_i386 (int i)
+{
+ // Regression test reduced from gcc's i386.c.
+ char a[32], *p;
+
+ if (i != 1)
+ p = a;
+ else
+ p = 0;
+
+ if (i == 2)
+ sink (p);
+ else
+ {
+ if (p)
+ {
+ sink (p);
+ return;
+ }
+ sink (p);
+ }
+}
+
+
+NOIPA void warn_memchr (char c1, char c2, char c3, char c4)
+{
+ char *p = 0;
+ {
+ char a[] = { c1, c2, c3 };// { dg-message "'a' declared" "note" }
+ p = (char*)memchr (a, c4, 3);
+ if (!p)
+ return;
+ }
+
+ sink (p); // { dg-warning "using dangling pointer 'p' to 'a'" }
+}
+
+
+NOIPA void warn_strchr (char c1, char c2, char c3, char c4)
+{
+ char *p = 0;
+ {
+ char a[] = { c1, c2, c3 }; // { dg-message "'a' declared" "note" }
+ p = (char*)strchr (a, c4);
+ if (!p)
+ return;
+ }
+
+ sink (p); // { dg-warning "using dangling pointer 'p' to 'a'" }
+}
+
+
+static inline int* return_arg (int *p)
+{
+ return p;
+}
+
+NOIPA void warn_inline (int i1, int i2, int i3)
+{
+ int *p;
+ {
+ int a[] = { i1, i2, i3 }; // { dg-message "'a' declared" "note" }
+ p = return_arg (a);
+ }
+
+ sink (p); // { dg-warning "using \(a \)?dangling pointer \('p' \)?to 'a'" "inline" }
+}
diff --git a/gcc/testsuite/c-c++-common/Wdangling-pointer-3.c b/gcc/testsuite/c-c++-common/Wdangling-pointer-3.c
new file mode 100644
index 0000000..d2f8f43
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wdangling-pointer-3.c
@@ -0,0 +1,64 @@
+/* PR middle-end/63272 - GCC should warn when using pointer to dead scoped
+ variable within the same function
+ Exercise conditional uses dangling pointers with optimization.
+ { dg-do compile }
+ { dg-options "-O2 -Wall -Wno-maybe-uninitialized" } */
+
+typedef __INTPTR_TYPE__ intptr_t;
+typedef __SIZE_TYPE__ size_t;
+
+#if __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
+EXTERN_C void* memcpy (void*, const void*, size_t);
+
+void sink (const void*, ...);
+
+char* nowarn_conditional (char *s)
+{
+ // Reduced from Glibc's tmpnam.c.
+ extern char a[5];
+ char b[5];
+ char *p = s ? s : b;
+
+ sink (p);
+
+ if (s == 0)
+ return a;
+
+ return s;
+}
+
+
+char* nowarn_conditional_memcpy (char *s)
+{
+ // Reduced from Glibc's tmpnam.c.
+ extern char a[5];
+ char b[5];
+ char *p = s ? s : b;
+
+ sink (p);
+
+ if (s == 0)
+ return (char*)memcpy (a, p, 5);
+
+ return s;
+}
+
+
+int warn_conditional_block (int i)
+{
+ int *p;
+ if (i)
+ {
+ int a[] = { 1, 2, 3 };
+ p = &a[i];
+ }
+ else
+ p = &i;
+
+ return *p; // { dg-warning "dangling pointer \('p' \)to 'a' may be used" }
+}
diff --git a/gcc/testsuite/c-c++-common/Wdangling-pointer-4.c b/gcc/testsuite/c-c++-common/Wdangling-pointer-4.c
new file mode 100644
index 0000000..a747aab
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wdangling-pointer-4.c
@@ -0,0 +1,74 @@
+/* PR middle-end/63272 - GCC should warn when using pointer to dead scoped
+ variable within the same function
+ Exercise -Wdangling-pointer for VLAs.
+ { dg-do compile }
+ { dg-options "-O0 -Wall -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
+
+void sink (void*, ...);
+
+void nowarn_vla (int n)
+{
+ {
+ int vla1[n];
+ int *p1 = vla1;
+ sink (p1);
+
+ {
+ int vla2[n];
+ int *p2 = vla2;
+ sink (p1, p2);
+
+ {
+ int vla3[n];
+ int *p3 = vla3;
+ sink (p1, p2, p3);
+ }
+ sink (p1, p2);
+ }
+ sink (p1);
+ }
+}
+
+void warn_one_vla (int n)
+{
+ int *p;
+ {
+ int vla[n]; // { dg-message "'vla' declared" "pr??????" { xfail *-*-* } }
+ p = vla;
+ }
+ sink (p); // { dg-warning "using a dangling pointer to 'vla'" "vla" { xfail *-*-* } }
+}
+
+
+void warn_two_vlas_same_block (int n)
+{
+ int *p, *q;
+ {
+ int vla1[n]; // { dg-message "'vla1' declared" "pr??????" { xfail *-*-* } }
+ int vla2[n]; // { dg-message "'vla2' declared" "pr??????" { xfail *-*-* } }
+ p = vla1;
+ q = vla2;
+ }
+
+ sink (p); // { dg-warning "using a dangling pointer to 'vla1'" "vla" { xfail *-*-* } }
+ sink (q); // { dg-warning "using a dangling pointer to 'vla2'" "vla" { xfail *-*-* } }
+}
+
+
+void warn_two_vlas_in_series (int n)
+{
+ int *p;
+ {
+ int vla1[n]; // { dg-message "'vla1' declared" "pr??????" { xfail *-*-* } }
+ p = vla1;
+ }
+ sink (p); // { dg-warning "using a dangling pointer to 'vla1'" "vla" { xfail *-*-* } }
+
+ int *q;
+ {
+ int vla2[n]; // { dg-message "'vla2' declared" "pr??????" { xfail *-*-* } }
+ q = vla2;
+ }
+ sink (q); // { dg-warning "using a dangling pointer to 'vla2'" "vla" { xfail *-*-* } }
+}
diff --git a/gcc/testsuite/c-c++-common/Wdangling-pointer-5.c b/gcc/testsuite/c-c++-common/Wdangling-pointer-5.c
new file mode 100644
index 0000000..2a165ce
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wdangling-pointer-5.c
@@ -0,0 +1,91 @@
+/* PR middle-end/63272 - GCC should warn when using pointer to dead scoped
+ variable within the same function
+ Exercise -Wdangling-pointer for escaping stores of addreses of auto
+ variables.
+ { dg-do compile }
+ { dg-options "-O0 -Wall -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
+
+void* alloca (__SIZE_TYPE__);
+
+void* sink (void*, ...);
+
+extern void *evp;
+
+void nowarn_store_extern_call (void)
+{
+ int x;
+ evp = &x;
+ sink (0);
+}
+
+void nowarn_store_extern_ovrwrite (void)
+{
+ int x;
+ evp = &x;
+ evp = 0;
+}
+
+void nowarn_store_extern_store (void)
+{
+ int x;
+ void **p = (void**)sink (&evp);
+ evp = &x;
+ *p = 0;
+}
+
+
+void warn_store_alloca (int n)
+{
+ // This fails because of a bug in the warning.
+ void *p = alloca (n);
+ evp = p; // { dg-warning "storing the address of local variable 'x' in 'evp1'" "pr??????" { xfail *-*-* } }
+}
+
+
+void warn_store_extern (void)
+{
+ extern void *evp1; // { dg-message "'evp1' declared here" }
+ int x; // { dg-message "'x' declared here" }
+ evp1 = &x; // { dg-warning "storing the address of local variable 'x' in 'evp1'" }
+}
+
+
+void nowarn_store_arg_call (void **vpp)
+{
+ int x;
+ *vpp = &x;
+ sink (0);
+}
+
+void nowarn_store_arg_ovrwrite (void **vpp)
+{
+ int x;
+ *vpp = &x;
+ *vpp = 0;
+}
+
+void nowarn_store_arg_store (void **vpp)
+{
+ int x;
+ void **p = (void**)sink (0);
+ *vpp = &x;
+ *p = 0;
+}
+
+void* nowarn_store_arg_store_arg (void **vpp1, void **vpp2)
+{
+ int x;
+ void **p = (void**)sink (0);
+ *vpp1 = &x; // warn here?
+ *vpp2 = 0; // might overwrite *vpp1
+ return p;
+}
+
+void warn_store_arg (void **vpp)
+{
+ int x; // { dg-message "'x' declared here" }
+ *vpp = &x; // { dg-warning "storing the address of local variable 'x' in '\\*vpp'" }
+}
+
+
diff --git a/gcc/testsuite/c-c++-common/Wdangling-pointer-6.c b/gcc/testsuite/c-c++-common/Wdangling-pointer-6.c
new file mode 100644
index 0000000..9c05891
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wdangling-pointer-6.c
@@ -0,0 +1,32 @@
+/* PR middle-end/63272 - GCC should warn when using pointer to dead scoped
+ variable within the same function
+ Exercise -Wdangling-pointer with inlining.
+ { dg-do compile }
+ { dg-options "-O1 -Wall" } */
+
+void* sink (void*, ...);
+
+extern int *eip; // { dg-message "'eip' declared here" }
+
+static inline void store (int **p, int *q)
+{
+ *p = q; // { dg-warning "storing the address of local variable 'auto_x' in 'eip'" }
+}
+
+void nowarn_inlined_store_extern (void)
+{
+ extern int extern_x;
+ store (&eip, &extern_x);
+}
+
+void nowarn_inlined_store_static (void)
+{
+ static int static_x;
+ store (&eip, &static_x);
+}
+
+void warn_inlined_store_auto (void)
+{
+ int auto_x; // { dg-message "'auto_x' declared here" }
+ store (&eip, &auto_x);
+}
diff --git a/gcc/testsuite/c-c++-common/Wdangling-pointer.c b/gcc/testsuite/c-c++-common/Wdangling-pointer.c
new file mode 100644
index 0000000..0a18c3c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wdangling-pointer.c
@@ -0,0 +1,435 @@
+/* PR middle-end/63272 - GCC should warn when using pointer to dead scoped
+ variable within the same function
+ Exercise basic cases of -Wdangling-pointer without optimization.
+ { dg-do compile }
+ { dg-options "-O0 -Wall -Wno-uninitialized -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
+
+typedef __INTPTR_TYPE__ intptr_t;
+typedef __SIZE_TYPE__ size_t;
+
+#if __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
+EXTERN_C void* alloca (size_t);
+EXTERN_C void* malloc (size_t);
+EXTERN_C void* memchr (const void*, int, size_t);
+EXTERN_C char* strchr (const char*, int);
+
+int sink (const void*, ...);
+#define sink(...) sink (0, __VA_ARGS__)
+
+/* Verify that integer assignments don't cause bogus warnings.
+ Reduced from GFlibc's s_nextafter.c. */
+
+int nowarn_integer (float x)
+{
+ int i;
+
+ {
+ union
+ {
+ float x;
+ int i;
+ } u;
+
+ u.x = x;
+ i = u.i;
+ }
+
+ return i;
+}
+
+void nowarn_addr (void)
+{
+ int *p;
+ {
+ int a[] = { 1, 2, 3 };
+ p = a;
+ }
+
+ // This is suspect but not a clear error.
+ sink (&p);
+}
+
+
+char* nowarn_ptr (void)
+{
+ char *p;
+ sink (&p);
+ return p;
+}
+
+
+char* nowarn_cond_ptr (void)
+{
+ // Distilled from a false positive in Glibc dlerror.c.
+ char *q;
+ if (sink (&q))
+ return q;
+
+ return 0;
+}
+
+
+void nowarn_loop_ptr (int n, int *p)
+{
+ // Distilled from a false positive in Glibc td_thr_get_info.c.
+ for (int i = 0; i != 2; ++i)
+ {
+ int x;
+ sink (&x);
+ *p++ = x;
+ }
+}
+
+
+void nowarn_intptr_t (void)
+{
+ intptr_t ip;
+ {
+ int a[] = { 1, 2, 3 };
+ ip = (intptr_t)a;
+ }
+
+ // Using an intptr_t is not diagnosed.
+ sink (0, ip);
+}
+
+
+void nowarn_string_literal (void)
+{
+ const char *s;
+ {
+ s = "123";
+ }
+
+ sink (s);
+}
+
+
+void nowarn_extern_array (int x)
+{
+ {
+ /* This is a silly sanity check. */
+ extern int eia[];
+ int *p;
+ {
+ p = eia;
+ }
+ sink (p);
+ }
+}
+
+
+void nowarn_static_array (int x)
+{
+ {
+ const char *s;
+ {
+ static const char sca[] = "123";
+ s = sca;
+ }
+
+ sink (s);
+ }
+ {
+ const int *p;
+ {
+ static const int sia[] = { 1, 2, 3 };
+ p = sia;
+ }
+
+ sink (p);
+ }
+ {
+ const int *p;
+ {
+ static const int sia[] = { 1, 2, 3 };
+ p = (const int*)memchr (sia, x, sizeof sia);
+ }
+
+ sink (p);
+ }
+}
+
+
+void nowarn_alloca (unsigned n)
+{
+ {
+ char *p;
+ {
+ p = (char*)alloca (n);
+ }
+ sink (p);
+ }
+ {
+ int *p;
+ {
+ p = (int*)alloca (n * sizeof *p);
+ sink (p);
+ }
+ sink (p);
+ }
+ {
+ long *p;
+ {
+ p = (long*)alloca (n * sizeof *p);
+ sink (p);
+ p = p + 1;
+ }
+ sink (p);
+ }
+}
+
+
+#pragma GCC diagnostic push
+/* Verify that -Wdangling-pointer works with #pragma diagnostic. */
+#pragma GCC diagnostic ignored "-Wdangling-pointer"
+
+void nowarn_scalar_call_ignored (void *vp)
+{
+ int *p;
+ {
+ int i;
+ p = &i;
+ }
+ sink (p);
+}
+
+#pragma GCC diagnostic pop
+
+
+void* nowarn_return_local_addr (void)
+{
+ int a[] = { 1, 2, 3 };
+ int *p = a;
+
+ /* This is a likely bug but it's not really one of using a dangling
+ pointer but rather of returning the address of a local variable
+ which is diagnosed by -Wreturn-local-addr. */
+ return p;
+}
+
+void* warn_return_local_addr (void)
+{
+ int *p = 0;
+ {
+ int a[] = { 1, 2, 3 };
+ p = a;
+ }
+
+ /* Unlike the above case, here the pointer is dangling when it's
+ used. */
+ return p; // { dg-warning "using dangling pointer 'p' to 'a'" "array" }
+}
+
+
+void* nowarn_return_alloca (int n)
+{
+ int *p = (int*)alloca (n);
+ sink (p);
+
+ /* This is a likely bug but it's not really one of using a dangling
+ pointer but rather of returning the address of a local variable
+ which is diagnosed by -Wreturn-local-addr. */
+ return p;
+}
+
+
+void warn_scalar_call (void)
+{
+ int *p;
+ {
+ int i; // { dg-message "'i' declared" "note" }
+ p = &i;
+ }
+ sink (p); // { dg-warning "using dangling pointer 'p' to 'i'" "array" }
+}
+
+
+void warn_array_call (void)
+{
+ int *p;
+ {
+ int a[] = { 1, 2, 3 }; // { dg-message "'a' declared" "note" }
+ p = a;
+ }
+ sink (p); // { dg-warning "using dangling pointer 'p' to 'a'" "array" }
+}
+
+
+void* warn_array_return (void)
+{
+ int *p;
+ {
+ int a[] = { 1, 2, 3 }; // { dg-message "'a' declared" "note" }
+ p = a;
+ }
+ return p; // { dg-warning "using dangling pointer 'p' to 'a'" "array" }
+}
+
+
+void warn_pr63272_c1 (int i)
+{
+ int *p = 0;
+
+ if (i)
+ {
+ int k = i; // { dg-message "'k' declared" "note" }
+ p = &k;
+ }
+
+ sink (p ? *p : 0); // { dg-warning "dangling pointer 'p' to 'k' may be used" }
+}
+
+
+void warn_pr63272_c4 (void)
+{
+ int *p = 0;
+
+ {
+ int b; // { dg-message "'b' declared" "note" }
+ p = &b;
+ }
+
+ sink (p); // { dg-warning "using dangling pointer 'p' to 'b'" "scalar" }
+}
+
+void nowarn_cond_if (int i, int n)
+{
+ int *p;
+ if (i)
+ {
+ int a[] = { 1, 2 };
+ p = a;
+ sink (p);
+ }
+ else
+ {
+ int *b = (int*)malloc (n);
+ p = b;
+ sink (p);
+ }
+
+ p = 0;
+}
+
+
+void warn_cond_if (int i, int n)
+{
+ int *p;
+ if (i)
+ {
+ int a[] = { 1, 2 }; // { dg-message "'a' declared" "note" }
+ sink (a);
+ p = a;
+ }
+ else
+ {
+ int *b = (int*)malloc (n);
+ sink (b);
+ p = b;
+ }
+
+ sink (p); // { dg-warning "dangling pointer 'p' to 'a' may be used" }
+}
+
+
+void warn_cond_else (int i, int n)
+{
+ int *p;
+ if (i)
+ {
+ int *a = (int*)malloc (n);
+ sink (a);
+ p = a;
+ }
+ else
+ {
+ int b[] = { 2, 3 };
+ sink (b);
+ p = b;
+ }
+
+ sink (p); // { dg-warning "dangling pointer 'p' to 'b' may be used" }
+}
+
+
+void warn_cond_if_else (int i)
+{
+ int *p;
+ if (i)
+ {
+ int a[] = { 1, 2 }; // { dg-message "'a' declared" "note" }
+ sink (a);
+ p = a;
+ }
+ else
+ {
+ int b[] = { 3, 4 }; // { dg-message "'b' declared" "note" { xfail *-*-* } }
+ sink (b);
+ p = b;
+ }
+
+ /* With a PHI with more than invalid argument, only one use is diagnosed
+ because after the first diagnostic the code suppresses subsequent
+ ones for the same use. This needs to be fixed. */
+ sink (p); // { dg-warning "dangling pointer 'p' to 'a' may be used" }
+ // { dg-warning "dangling pointer 'p' to 'b' may be used" "pr??????" { xfail *-*-* } .-1 }
+}
+
+
+void nowarn_gcc_i386 (int i)
+{
+ // Regression test reduced from gcc's i386.c.
+ char a[32], *p;
+
+ if (i != 1)
+ p = a;
+ else
+ p = 0;
+
+ if (i == 2)
+ sink (p);
+ else
+ {
+ if (p)
+ {
+ sink (p);
+ return;
+ }
+ sink (p);
+ }
+}
+
+
+void warn_memchr (char c1, char c2, char c3, char c4)
+{
+ char *p = 0;
+ {
+ char a[] = { c1, c2, c3 };// { dg-message "'a' declared" "note" }
+ p = (char*)memchr (a, c4, 3);
+ if (!p)
+ return;
+ }
+
+ sink (p); // { dg-warning "using dangling pointer 'p' to 'a'" }
+}
+
+
+void warn_strchr (char c1, char c2, char c3, char c4)
+{
+ char *p = 0;
+ {
+ char a[] = { c1, c2, c3 }; // { dg-message "'a' declared" "note" }
+ p = (char*)strchr (a, c4);
+ if (!p)
+ return;
+ }
+
+ sink (p); // { dg-warning "using dangling pointer 'p' to 'a'" }
+}
diff --git a/gcc/testsuite/c-c++-common/Wformat-pr104148.c b/gcc/testsuite/c-c++-common/Wformat-pr104148.c
new file mode 100644
index 0000000..6786463
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wformat-pr104148.c
@@ -0,0 +1,33 @@
+/* PR c++/104148 */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+char *foo (const char *) __attribute__((format_arg(1)));
+void bar (const char *, ...) __attribute__((format(printf, 1, 2)));
+
+void
+baz (int x)
+{
+ bar ("%ld", x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ bar (x ? "%ld" : "%ld", x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ bar (x ? "%ld" : "%lld", x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ /* { dg-warning "format '%lld' expects argument of type 'long long int', but argument 2 has type 'int'" "" { target *-*-* } .-1 } */
+ bar (foo ("%ld"), x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ bar (x ? foo ("%ld") : "%ld", x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ bar (x ? foo ("%ld") : "%lld", x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ /* { dg-warning "format '%lld' expects argument of type 'long long int', but argument 2 has type 'int'" "" { target *-*-* } .-1 } */
+ bar (foo (x ? "%ld" : "%ld"), x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ bar (foo (x ? "%ld" : "%lld"), x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ /* { dg-warning "format '%lld' expects argument of type 'long long int', but argument 2 has type 'int'" "" { target *-*-* } .-1 } */
+ bar (("%ld"), x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ bar ((x ? "%ld" : "%ld"), x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ bar ((x ? "%ld" : "%lld"), x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ /* { dg-warning "format '%lld' expects argument of type 'long long int', but argument 2 has type 'int'" "" { target *-*-* } .-1 } */
+ bar ((foo ("%ld")), x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ bar ((x ? foo ("%ld") : "%ld"), x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ bar ((x ? foo ("%ld") : "%lld"), x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ /* { dg-warning "format '%lld' expects argument of type 'long long int', but argument 2 has type 'int'" "" { target *-*-* } .-1 } */
+ bar ((foo (x ? "%ld" : "%ld")), x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ bar ((foo (x ? "%ld" : "%lld")), x); /* { dg-warning "format '%ld' expects argument of type 'long int', but argument 2 has type 'int'" } */
+ /* { dg-warning "format '%lld' expects argument of type 'long long int', but argument 2 has type 'int'" "" { target *-*-* } .-1 } */
+}
diff --git a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-38.c b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-38.c
new file mode 100644
index 0000000..80f7d45
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-38.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-Wimplicit-fallthrough=3" } */
+
+#define FOO \
+int \
+foo (int a) \
+{ \
+ switch (a) \
+ { \
+ case 1: \
+ ++a; \
+ /* FALLTHRU */ \
+ case 2: \
+ ++a; \
+ /* FALLTHRU */ \
+ ca##se 3: \
+ ++a; \
+ default: \
+ break; \
+ } \
+ return a; \
+}
+
+FOO
diff --git a/gcc/testsuite/c-c++-common/Winvalid-memory-model.c b/gcc/testsuite/c-c++-common/Winvalid-memory-model.c
new file mode 100644
index 0000000..474ea56
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Winvalid-memory-model.c
@@ -0,0 +1,239 @@
+/* PR middle-end/99612 - Missing warning on incorrect memory order without
+ -Wsystem-headers
+ Verify that constants are propagated through calls to inline functions
+ even at -O0.
+ Also verify that the informational notes after each warning mention
+ the valid memore models for each function.
+ { dg-do compile }
+ { dg-options "-O0 -ftrack-macro-expansion=0" } */
+
+#if !__cplusplus
+# define bool _Bool
+#endif
+
+extern int ei;
+
+static __attribute__ ((always_inline)) inline
+int retval (int val)
+{
+ return val;
+}
+
+void test_load (int *pi)
+{
+ int relaxed = retval (__ATOMIC_RELAXED);
+ *pi++ = __atomic_load_n (&ei, relaxed);
+
+ int consume = retval (__ATOMIC_CONSUME);
+ *pi++ = __atomic_load_n (&ei, consume);
+
+ int acquire = retval (__ATOMIC_ACQUIRE);
+ *pi++ = __atomic_load_n (&ei, acquire);
+
+ int release = retval (__ATOMIC_RELEASE);
+ *pi++ = __atomic_load_n (&ei, release); // { dg-warning "invalid memory model 'memory_order_release'" }
+ // { dg-message "valid models are 'memory_order_relaxed', 'memory_order_seq_cst', 'memory_order_acquire', 'memory_order_consume'" "note" { target *-*-* } .-1 }
+
+ int acq_rel = retval (__ATOMIC_ACQ_REL);
+ *pi++ = __atomic_load_n (&ei, acq_rel); // { dg-warning "invalid memory model 'memory_order_acq_rel'" }
+
+ int seq_cst = retval (__ATOMIC_SEQ_CST);
+ *pi++ = __atomic_load_n (&ei, seq_cst);
+
+ /* Verify a nonconstant range. */
+ int r0_1 = *pi++;
+ if (r0_1 < 0 || 1 < r0_1)
+ r0_1 = 0;
+ *pi++ = __atomic_load_n (&ei, r0_1);
+
+ /* Verify an unbounded range. */
+ int unknown = *pi++;
+ *pi++ = __atomic_load_n (&ei, unknown);
+}
+
+
+void test_store (int *pi, int x)
+{
+ int relaxed = retval (__ATOMIC_RELAXED);
+ __atomic_store_n (pi++, x, relaxed);
+
+ int consume = retval (__ATOMIC_CONSUME);
+ __atomic_store_n (pi++, x, consume); // { dg-warning "invalid memory model 'memory_order_consume'" }
+ // { dg-message "valid models are 'memory_order_relaxed', 'memory_order_seq_cst', 'memory_order_release'" "note" { target *-*-* } .-1 }
+
+ int acquire = retval (__ATOMIC_ACQUIRE);
+ __atomic_store_n (pi++, x, acquire); // { dg-warning "invalid memory model 'memory_order_acquire'" }
+
+ int release = retval (__ATOMIC_RELEASE);
+ __atomic_store_n (pi++, x, release);
+
+ int acq_rel = retval (__ATOMIC_ACQ_REL);
+ __atomic_store_n (pi++, x, acq_rel); // { dg-warning "invalid memory model 'memory_order_acq_rel'" }
+
+ int seq_cst = retval (__ATOMIC_SEQ_CST);
+ __atomic_store_n (pi++, x, seq_cst);
+
+ int unknown = *pi++;
+ __atomic_store_n (pi++, x, unknown);
+}
+
+
+/* All memory models are valid. */
+
+void test_exchange (int *pi, int x)
+{
+ int relaxed = retval (__ATOMIC_RELAXED);
+ __atomic_exchange_n (pi++, x, relaxed);
+
+ int consume = retval (__ATOMIC_CONSUME);
+ __atomic_exchange_n (pi++, x, consume);
+
+ int acquire = retval (__ATOMIC_ACQUIRE);
+ __atomic_exchange_n (pi++, x, acquire);
+
+ int release = retval (__ATOMIC_RELEASE);
+ __atomic_exchange_n (pi++, x, release);
+
+ int acq_rel = retval (__ATOMIC_ACQ_REL);
+ __atomic_exchange_n (pi++, x, acq_rel);
+
+ int seq_cst = retval (__ATOMIC_SEQ_CST);
+ __atomic_exchange_n (pi++, x, seq_cst);
+
+ int unknown = *pi++;
+ __atomic_exchange_n (pi++, x, unknown);
+}
+
+
+void test_compare_exchange (int *pi, int *pj, bool weak)
+{
+#define cmpxchg(x, expect, desire, sucs_ord, fail_ord) \
+ __atomic_compare_exchange_n (x, expect, desire, weak, sucs_ord, fail_ord)
+
+ int relaxed = retval (__ATOMIC_RELAXED);
+ cmpxchg (&ei, pi++, *pj++, relaxed, relaxed);
+
+ int consume = retval (__ATOMIC_CONSUME);
+ cmpxchg (&ei, pi++, *pj++, relaxed, consume); // { dg-warning "failure memory model 'memory_order_consume' cannot be stronger than success memory model 'memory_order_relaxed'" }
+
+ int acquire = retval (__ATOMIC_ACQUIRE);
+ cmpxchg (&ei, pi++, *pj++, relaxed, acquire); // { dg-warning "failure memory model 'memory_order_acquire' cannot be stronger than success memory model 'memory_order_relaxed'" }
+
+ int release = retval (__ATOMIC_RELEASE);
+ cmpxchg (&ei, pi++, *pj++, relaxed, release); // { dg-warning "invalid failure memory model 'memory_order_release'" }
+
+ int acq_rel = retval (__ATOMIC_ACQ_REL);
+ cmpxchg (&ei, pi++, *pj++, relaxed, acq_rel); // { dg-warning "invalid failure memory model 'memory_order_acq_rel'" }
+
+ int seq_cst = retval (__ATOMIC_SEQ_CST);
+ cmpxchg (&ei, pi++, *pj++, relaxed, seq_cst); // { dg-warning "failure memory model 'memory_order_seq_cst' cannot be stronger than success memory model 'memory_order_relaxed'" }
+
+
+ cmpxchg (&ei, pi++, *pj++, consume, relaxed);
+ cmpxchg (&ei, pi++, *pj++, consume, consume);
+ cmpxchg (&ei, pi++, *pj++, consume, acquire); // { dg-warning "failure memory model 'memory_order_acquire' cannot be stronger than success memory model 'memory_order_consume'" }
+ cmpxchg (&ei, pi++, *pj++, consume, release); // { dg-warning "invalid failure memory model 'memory_order_release'" }
+ cmpxchg (&ei, pi++, *pj++, consume, acq_rel); // { dg-warning "invalid failure memory model 'memory_order_acq_rel'" }
+ cmpxchg (&ei, pi++, *pj++, consume, seq_cst); // { dg-warning "failure memory model 'memory_order_seq_cst' cannot be stronger than success memory model 'memory_order_consume'" }
+
+ cmpxchg (&ei, pi++, *pj++, acquire, relaxed);
+ cmpxchg (&ei, pi++, *pj++, acquire, consume);
+ cmpxchg (&ei, pi++, *pj++, acquire, acquire);
+ cmpxchg (&ei, pi++, *pj++, acquire, release); // { dg-warning "invalid failure memory model 'memory_order_release'" }
+ cmpxchg (&ei, pi++, *pj++, acquire, acq_rel); // { dg-warning "invalid failure memory model 'memory_order_acq_rel'" }
+ cmpxchg (&ei, pi++, *pj++, acquire, seq_cst); // { dg-warning "failure memory model 'memory_order_seq_cst' cannot be stronger than success memory model 'memory_order_acquire'" }
+
+ cmpxchg (&ei, pi++, *pj++, release, relaxed);
+ cmpxchg (&ei, pi++, *pj++, release, consume);
+ cmpxchg (&ei, pi++, *pj++, release, acquire);
+ cmpxchg (&ei, pi++, *pj++, release, release); // { dg-warning "invalid failure memory model 'memory_order_release'" }
+ cmpxchg (&ei, pi++, *pj++, release, acq_rel); // { dg-warning "invalid failure memory model 'memory_order_acq_rel'" }
+ cmpxchg (&ei, pi++, *pj++, release, seq_cst); // { dg-warning "failure memory model 'memory_order_seq_cst' cannot be stronger than success memory model 'memory_order_release'" }
+
+ cmpxchg (&ei, pi++, *pj++, acq_rel, relaxed);
+ cmpxchg (&ei, pi++, *pj++, acq_rel, consume);
+ cmpxchg (&ei, pi++, *pj++, acq_rel, acquire);
+ cmpxchg (&ei, pi++, *pj++, acq_rel, release); // { dg-warning "invalid failure memory model 'memory_order_release'" }
+ cmpxchg (&ei, pi++, *pj++, acq_rel, acq_rel); // { dg-warning "invalid failure memory model 'memory_order_acq_rel'" }
+ cmpxchg (&ei, pi++, *pj++, acq_rel, seq_cst); // { dg-warning "failure memory model 'memory_order_seq_cst' cannot be stronger than success memory model 'memory_order_acq_rel'" }
+
+ cmpxchg (&ei, pi++, *pj++, seq_cst, relaxed);
+ cmpxchg (&ei, pi++, *pj++, seq_cst, consume);
+ cmpxchg (&ei, pi++, *pj++, seq_cst, acquire);
+ cmpxchg (&ei, pi++, *pj++, seq_cst, release); // { dg-warning "invalid failure memory model 'memory_order_release'" }
+ cmpxchg (&ei, pi++, *pj++, seq_cst, acq_rel); // { dg-warning "invalid failure memory model 'memory_order_acq_rel'" }
+ cmpxchg (&ei, pi++, *pj++, seq_cst, seq_cst);
+
+ int unknown = *pi++;
+ cmpxchg (&ei, pi++, *pj++, unknown, seq_cst);
+ cmpxchg (&ei, pi++, *pj++, relaxed, unknown);
+}
+
+
+/* All memory models are valid. */
+
+void test_add_fetch (unsigned *pi, unsigned x)
+{
+ int relaxed = retval (__ATOMIC_RELAXED);
+ __atomic_add_fetch (pi++, x, relaxed);
+
+ int consume = retval (__ATOMIC_CONSUME);
+ __atomic_add_fetch (pi++, x, consume);
+
+ int acquire = retval (__ATOMIC_ACQUIRE);
+ __atomic_add_fetch (pi++, x, acquire);
+
+ int release = retval (__ATOMIC_RELEASE);
+ __atomic_add_fetch (pi++, x, release);
+
+ int acq_rel = retval (__ATOMIC_ACQ_REL);
+ __atomic_add_fetch (pi++, x, acq_rel);
+
+ int seq_cst = retval (__ATOMIC_SEQ_CST);
+ __atomic_add_fetch (pi++, x, seq_cst);
+
+ int invalid;
+ if (x & 1)
+ {
+ invalid = retval (123);
+ __atomic_add_fetch (pi++, x, invalid); // { dg-warning "invalid memory model 123 for '\(unsigned int \)?__atomic_add_fetch" }
+ }
+ else
+ {
+ invalid = retval (456);
+ __atomic_add_fetch (pi++, x, invalid); // { dg-warning "invalid memory model 456 for '\(unsigned int \)?__atomic_add_fetch" }
+ }
+}
+
+void test_sub_fetch (unsigned *pi, unsigned x)
+{
+ int relaxed = retval (__ATOMIC_RELAXED);
+ __atomic_sub_fetch (pi++, x, relaxed);
+
+ int consume = retval (__ATOMIC_CONSUME);
+ __atomic_sub_fetch (pi++, x, consume);
+
+ int acquire = retval (__ATOMIC_ACQUIRE);
+ __atomic_sub_fetch (pi++, x, acquire);
+
+ int release = retval (__ATOMIC_RELEASE);
+ __atomic_sub_fetch (pi++, x, release);
+
+ int acq_rel = retval (__ATOMIC_ACQ_REL);
+ __atomic_sub_fetch (pi++, x, acq_rel);
+
+ int seq_cst = retval (__ATOMIC_SEQ_CST);
+ __atomic_sub_fetch (pi++, x, seq_cst);
+
+ int invalid;
+ if (x & 1)
+ {
+ invalid = retval (123);
+ __atomic_sub_fetch (pi++, x, invalid); // { dg-warning "invalid memory model 123 for '\(unsigned int \)?__atomic_sub_fetch" }
+ }
+ else
+ {
+ invalid = retval (456);
+ __atomic_sub_fetch (pi++, x, invalid); // { dg-warning "invalid memory model 456 for '\(unsigned int \)?__atomic_sub_fetch" }
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/Wno-attributes-1.c b/gcc/testsuite/c-c++-common/Wno-attributes-1.c
new file mode 100644
index 0000000..84a84ea
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wno-attributes-1.c
@@ -0,0 +1,54 @@
+/* PR c++/101940 */
+/* { dg-do compile { target { c || c++11 } } } */
+/* { dg-additional-options "-Wno-attributes=company::,yoyodyne::attr" } */
+/* { dg-additional-options "-Wno-attributes=c1::attr,c1::attr,c1::__attr__" } */
+/* { dg-additional-options "-Wno-attributes=c2::,c2::attr" } */
+/* { dg-additional-options "-Wno-attributes=c3::attr,c3::" } */
+/* { dg-additional-options "-Wno-attributes=x::" } */
+/* { dg-additional-options "-Wno-attributes=yoyodyne::attr_new" } */
+/* { dg-additional-options "-Wno-attributes=c4::__attr__" } */
+/* { dg-additional-options "-Wno-attributes=c5::attr" } */
+/* { dg-additional-options "-Wno-attributes=__c6__::attr" } */
+
+[[company::attr]] void f1();
+[[company::attr2]] void f2();
+
+[[yoyodyne::attr]] void f3();
+[[yoyodyne::__attr__]] void f3__();
+[[yoyodyne::attrx]] void f4(); /* { dg-warning "ignored" } */
+[[yoyodyne::__attrx__]] void f4__(); /* { dg-warning "ignored" } */
+
+[[c1::attr]] void f5();
+
+[[c2::attr]] void f6();
+[[c2::attrx]] void f7();
+[[c2::__attr__]] void f6__();
+[[c2::__attrx__]] void f7__();
+
+[[c3::attr]] void f8();
+[[c3::attrx]] void f9();
+
+[[x::x]] void f10();
+
+[[yoyodyne::attr_new]] void f11();
+[[yoyodyne::__attr_new__]] void f11__();
+[[yoyodyne::attr_mew]] void f12(); /* { dg-warning "ignored" } */
+[[yoyodyne::__attr_mew__]] void f12__(); /* { dg-warning "ignored" } */
+
+[[c4::attr]] void f13();
+[[c4::__attr__]] void f13__();
+[[c4::attrx]] void f14(); /* { dg-warning "ignored" } */
+
+[[c5::attr]] void f15();
+[[c5::__attr__]] void f15__();
+[[__c5__::attr]] void __f15();
+[[__c5__::__attr__]] void __f15__();
+[[c5::attrx]] void f15x(); /* { dg-warning "ignored" } */
+[[__c5__::attrx]] void f15x(); /* { dg-warning "ignored" } */
+
+[[c6::attr]] void f16();
+[[c6::__attr__]] void f16__();
+[[__c6__::attr]] void __f16();
+[[__c6__::__attr__]] void __f16__();
+[[c6::attrx]] void f16x(); /* { dg-warning "ignored" } */
+[[__c6__::attrx]] void f16x(); /* { dg-warning "ignored" } */
diff --git a/gcc/testsuite/c-c++-common/Wno-attributes-2.c b/gcc/testsuite/c-c++-common/Wno-attributes-2.c
new file mode 100644
index 0000000..8e04401
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wno-attributes-2.c
@@ -0,0 +1,55 @@
+/* PR c++/101940 */
+/* { dg-do compile { target { c || c++11 } } } */
+
+#pragma GCC diagnostic ignored_attributes "company::,yoyodyne::attr"
+#pragma GCC diagnostic ignored_attributes "c1::attr,c1::attr,c1::__attr__"
+#pragma GCC diagnostic ignored_attributes "c2::,c2::attr"
+#pragma GCC diagnostic ignored_attributes "c3::attr,c3::"
+#pragma GCC diagnostic ignored_attributes "x::"
+#pragma GCC diagnostic ignored_attributes "yoyodyne::attr_new"
+#pragma GCC diagnostic ignored_attributes "c4::__attr__"
+#pragma GCC diagnostic ignored_attributes "c5::attr"
+#pragma GCC diagnostic ignored_attributes "__c6__::attr"
+
+[[company::attr]] void f1();
+[[company::attr2]] void f2();
+
+[[yoyodyne::attr]] void f3();
+[[yoyodyne::__attr__]] void f3__();
+[[yoyodyne::attrx]] void f4(); /* { dg-warning "ignored" } */
+[[yoyodyne::__attrx__]] void f4__(); /* { dg-warning "ignored" } */
+
+[[c1::attr]] void f5();
+
+[[c2::attr]] void f6();
+[[c2::attrx]] void f7();
+[[c2::__attr__]] void f6__();
+[[c2::__attrx__]] void f7__();
+
+[[c3::attr]] void f8();
+[[c3::attrx]] void f9();
+
+[[x::x]] void f10();
+
+[[yoyodyne::attr_new]] void f11();
+[[yoyodyne::__attr_new__]] void f11__();
+[[yoyodyne::attr_mew]] void f12(); /* { dg-warning "ignored" } */
+[[yoyodyne::__attr_mew__]] void f12__(); /* { dg-warning "ignored" } */
+
+[[c4::attr]] void f13();
+[[c4::__attr__]] void f13__();
+[[c4::attrx]] void f14(); /* { dg-warning "ignored" } */
+
+[[c5::attr]] void f15();
+[[c5::__attr__]] void f15__();
+[[__c5__::attr]] void __f15();
+[[__c5__::__attr__]] void __f15__();
+[[c5::attrx]] void f15x(); /* { dg-warning "ignored" } */
+[[__c5__::attrx]] void f15x(); /* { dg-warning "ignored" } */
+
+[[c6::attr]] void f16();
+[[c6::__attr__]] void f16__();
+[[__c6__::attr]] void __f16();
+[[__c6__::__attr__]] void __f16__();
+[[c6::attrx]] void f16x(); /* { dg-warning "ignored" } */
+[[__c6__::attrx]] void f16x(); /* { dg-warning "ignored" } */
diff --git a/gcc/testsuite/c-c++-common/Wno-attributes-3.c b/gcc/testsuite/c-c++-common/Wno-attributes-3.c
new file mode 100644
index 0000000..64370f2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wno-attributes-3.c
@@ -0,0 +1,9 @@
+/* PR c++/101940 */
+/* { dg-do compile } */
+/* { dg-additional-options "-Wno-attributes=___::" } */
+/* { dg-additional-options "-Wno-attributes=c::____" } */
+/* { dg-additional-options "-Wno-attributes=____::____" } */
+/* { dg-additional-options "-Wno-attributes=c@::attr" } */
+/* { dg-additional-options "-Wno-attributes=c2::@tr" } */
+
+/* { dg-error "wrong argument to ignored attributes" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/c-c++-common/Wno-attributes-4.c b/gcc/testsuite/c-c++-common/Wno-attributes-4.c
new file mode 100644
index 0000000..c5ea3e3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wno-attributes-4.c
@@ -0,0 +1,7 @@
+/* PR middle-end/103365 */
+/* { dg-do compile { target { c || c++11 } } } */
+/* { dg-additional-options "-Wno-attributes=foo::_bar" } */
+/* { dg-additional-options "-Wno-attributes=_foo::bar" } */
+
+[[foo::_bar]] void foo (void);
+[[_foo::bar]] void bar (void);
diff --git a/gcc/testsuite/c-c++-common/Wno-attributes-5.c b/gcc/testsuite/c-c++-common/Wno-attributes-5.c
new file mode 100644
index 0000000..9c0c3da
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wno-attributes-5.c
@@ -0,0 +1,8 @@
+/* PR middle-end/103365 */
+/* { dg-do compile { target { c || c++11 } } } */
+
+#pragma GCC diagnostic ignored_attributes "foo::_bar"
+#pragma GCC diagnostic ignored_attributes "_foo::bar"
+
+[[foo::_bar]] void foo (void);
+[[_foo::bar]] void bar (void);
diff --git a/gcc/testsuite/c-c++-common/Wno-attributes-6.c b/gcc/testsuite/c-c++-common/Wno-attributes-6.c
new file mode 100644
index 0000000..ca3c7be
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wno-attributes-6.c
@@ -0,0 +1,16 @@
+/* PR c/103649 */
+/* { dg-do compile { target { c || c++11 } } } */
+/* { dg-additional-options "-Wno-attributes=foo::bar" } */
+/* { dg-additional-options "-Wno-attributes=baz::" } */
+/* { dg-additional-options "-Wno-attributes=womp::womp" } */
+/* { dg-additional-options "-Wno-attributes=qux::foo" } */
+/* { dg-additional-options "-Wno-attributes=vendor::assume" } */
+
+[[vendor::assume(1 + 1 == 2)]];
+[[foo::bar(1, 2)]];
+[[baz::bar(1, 2)]];
+[[foo::bar(1, 2)]] void f1();
+[[baz::bar(1, 2)]] void f2();
+[[qux::foo({t})]] void f3();
+[[womp::womp (another::directive (threadprivate (t)))]] void f4();
+[[womp::womp (another::directive (threadprivate (t)))]];
diff --git a/gcc/testsuite/c-c++-common/Wstringop-overflow-2.c b/gcc/testsuite/c-c++-common/Wstringop-overflow-2.c
index ca38bda..3f91719 100644
--- a/gcc/testsuite/c-c++-common/Wstringop-overflow-2.c
+++ b/gcc/testsuite/c-c++-common/Wstringop-overflow-2.c
@@ -19,7 +19,7 @@ struct Ax ax_;
void gax_ (void)
{
ax_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
- ax_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ ax_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
ax_.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -30,7 +30,7 @@ struct Ax ax0 = { 0 };
void gax0 (void)
{
ax0.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
- ax0.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ ax0.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
ax0.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -41,7 +41,7 @@ struct Ax ax0_ = { 0, { } };
void gax0_ (void)
{
ax0_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
- ax0_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ ax0_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
ax0_.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -51,8 +51,8 @@ struct Ax ax1 = { 1, { 0 } };
void gax1 (void)
{
- ax1.a[0] = 0;
- ax1.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ ax1.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ ax1.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
ax1.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -100,7 +100,7 @@ struct A0 a0_;
void ga0_ (void)
{
a0_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
- a0_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ a0_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a0_.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -111,7 +111,7 @@ struct A0 a00 = { 0 };
void ga00 (void)
{
a00.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
- a00.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ a00.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a00.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -122,7 +122,7 @@ struct A0 a00_ = { 0, { } };
void ga00_ (void)
{
a00_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
- a00_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ a00_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a00_.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -166,13 +166,13 @@ struct A1 a1_;
void ga1_ (void)
{
- a1_.a[0] = 0;
- a1_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a1_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1_.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
struct A1 a;
- a.a[0] = 0;
- a.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ a.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
sink (&a);
}
@@ -183,14 +183,14 @@ struct A1 a1__ = { 0 };
void ga1__ (void)
{
- a1__.a[0] = 0;
- a1__.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1__.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a1__.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1__.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
struct A1 a = { 1 };
a.a[0] = 0;
a.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
- a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v2qi_store } } }
+ a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v2qi_store_align } } }
sink (&a);
}
@@ -200,14 +200,14 @@ struct A1 a1_0 = { 0, { } };
void ga1_0_ (void)
{
- a1_0.a[0] = 0;
- a1_0.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1_0.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a1_0.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1_0.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
struct A1 a = { 1, { } };
a.a[0] = 0;
a.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
- a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v2qi_store } } }
+ a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v2qi_store_align } } }
sink (&a);
}
@@ -217,14 +217,14 @@ struct A1 a1_1 = { 0, { 1 } };
void ga1_1 (void)
{
- a1_1.a[0] = 0;
- a1_1.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1_1.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a1_1.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1_1.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
- struct A1 a = { 0, { 1 } }; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v4qi_store } } }
+ struct A1 a = { 0, { 1 } }; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v4qi_store_align } } }
a.a[0] = 0;
- a.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v4qi_store } } }
- a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v4qi_store } } }
+ a.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v4qi_store_align } } }
+ a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v4qi_store_align } } }
sink (&a);
}
@@ -266,12 +266,12 @@ struct A1i a1i_;
void ga1i_ (void)
{
a1i_.a[0] = 0;
- a1i_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1i_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1i_.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
struct A1i a;
a.a[0] = 1;
- a.a[1] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
+ a.a[1] = 2; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a.a[2] = 3; // { dg-warning "\\\[-Wstringop-overflow" }
sink (&a);
}
@@ -283,13 +283,13 @@ struct A1i a1i__ = { 0 };
void ga1i__ (void)
{
a1i__.a[0] = 0;
- a1i__.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1i__.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1i__.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
struct A1i a = { 0 };
a.a[0] = 0;
a.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
- a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v2qi_store } } }
+ a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v2qi_store_align } } }
sink (&a);
}
@@ -299,14 +299,14 @@ struct A1 a1i_0 = { 0, { } };
void ga1i_0_ (void)
{
- a1i_0.a[0] = 0;
- a1i_0.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1i_0.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a1i_0.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1i_0.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
struct A1 a = { 0, { } };
a.a[0] = 0;
a.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
- a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v2qi_store } } }
+ a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v2qi_store_align } } }
sink (&a);
}
@@ -316,14 +316,14 @@ struct A1 a1i_1 = { 0, { 1 } };
void ga1i_1 (void)
{
- a1i_1.a[0] = 0;
- a1i_1.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1i_1.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a1i_1.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1i_1.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
- struct A1 a = { 0, { 1 } }; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { target { vect_slp_v4qi_store } } }
+ struct A1 a = { 0, { 1 } }; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { target { vect_slp_v4qi_store_align } } }
a.a[0] = 1;
- a.a[1] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v4qi_store } } }
- a.a[2] = 3; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v4qi_store } } }
+ a.a[1] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v4qi_store_align } } }
+ a.a[2] = 3; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { xfail { vect_slp_v4qi_store_align } } }
sink (&a);
}
diff --git a/gcc/testsuite/c-c++-common/Wuse-after-free-2.c b/gcc/testsuite/c-c++-common/Wuse-after-free-2.c
new file mode 100644
index 0000000..e309bdf
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wuse-after-free-2.c
@@ -0,0 +1,169 @@
+/* Verify that accessing freed objects by built-in functions is diagnosed.
+ { dg-do compile }
+ { dg-options "-Wall" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+#if __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
+EXTERN_C void free (void*);
+EXTERN_C void* realloc (void*, size_t);
+
+EXTERN_C void* memcpy (void*, const void*, size_t);
+EXTERN_C char* strcpy (char*, const char*);
+EXTERN_C size_t strlen (const char*);
+
+
+void sink (void*, ...);
+
+struct Member { char *p; char a[4]; };
+
+int nowarn_strcpy_memptr (struct Member *p)
+{
+ char *q = strcpy (p->p, p->a);
+ free (p);
+ return *q;
+}
+
+int nowarn_strlen_memptr (struct Member *p)
+{
+ const char *q = p->p;
+
+ free (p);
+
+ return strlen (q);
+}
+
+int warn_strlen_memptr (struct Member *p)
+{
+ free (p); // { dg-message "call to '\(void \)?free\(\\(void\\*\\)\)?'" "note" }
+ return strlen (p->p); // { dg-warning "-Wuse-after-free" }
+}
+
+int warn_strlen_memarray (struct Member *p)
+{
+ {
+ free (p);
+ return strlen (p->a); // { dg-warning "-Wuse-after-free" }
+ }
+
+ {
+ char *q = p->a;
+
+ free (p);
+ return strlen (q); // { dg-warning "-Wuse-after-free" "pr??????" { xfail *-*-* } }
+ }
+}
+
+void* nowarn_realloc_success (void *p)
+{
+ void *q = realloc (p, 7);
+ if (!q)
+ /* When realloc fails the original pointer remains valid. */
+ return p;
+
+ return q;
+}
+
+void* nowarn_realloc_equal (void *p, int *moved)
+{
+ void *q = realloc (p, 7);
+ /* Verify that equality is not diagnosed at the default level
+ (it is diagnosed at level 3). */
+ *moved = !(p == q);
+ return q;
+}
+
+void* nowarn_realloc_unequal (void *p, int *moved)
+{
+ void *q = realloc (p, 7);
+ /* Verify that inequality is not diagnosed at the default level
+ (it is diagnosed at level 3). */
+ *moved = p != q;
+ return q;
+}
+
+void* warn_realloc_relational (void *p, int *rel)
+{
+ void *q = realloc (p, 7); // { dg-message "call to '\(void\\* \)?realloc\(\\(void\\*, size_t\\)\)?'" "note" }
+ /* Verify that all relational expressions are diagnosed at the default
+ level. */
+ rel[0] = (char*)p < (char*)q; // { dg-warning "-Wuse-after-free" }
+ rel[1] = (char*)p <= (char*)q; // { dg-warning "-Wuse-after-free" }
+ rel[2] = (char*)p >= (char*)q; // { dg-warning "-Wuse-after-free" }
+ rel[3] = (char*)p > (char*)q; // { dg-warning "-Wuse-after-free" }
+ return q;
+}
+
+void* warn_realloc_unchecked (void *p, int *moved)
+{
+ void *q = realloc (p, 7); // { dg-message "call to '\(void\\* \)?realloc\(\\(void\\*, size_t\\)\)?'" "note" }
+ /* Use subtraction rather than inequality to trigger the warning
+ at the default level (equality is diagnosed only at level 3). */
+ *moved = (char*)p - (char*)q; // { dg-warning "-Wuse-after-free" }
+ return q;
+}
+
+void* nowarn_realloc_unchecked_copy (void *p1, void *p2, const void *s,
+ int n, int *x)
+{
+ void *p3 = memcpy (p1, s, n);
+ void *p4 = realloc (p2, 7);
+ *x = p3 != p4;
+ return p4;
+}
+
+void* warn_realloc_unchecked_copy (void *p, const void *s, int n, int *moved)
+{
+ void *p2 = memcpy (p, s, n);
+ void *q = realloc (p, 7); // { dg-message "call to '\(void\\* \)?realloc\(\\(void\\*, size_t\\)\)?'" "note" }
+ *moved = (char*)p2 - (char*)q; // { dg-warning "-Wuse-after-free" }
+ return q;
+}
+
+void* warn_realloc_failed (void *p, int *moved)
+{
+ void *q = realloc (p, 7); // { dg-message "call to '\(void\\* \)?realloc\(\\(void\\*, size_t\\)\)?'" "note" }
+ if (q)
+ {
+ /* When realloc succeeds the original pointer is invalid. */
+ *moved = (char*)p - (char*)q; // { dg-warning "-Wuse-after-free" }
+ return q;
+ }
+
+ return p;
+}
+
+extern void *evp;
+
+void* warn_realloc_extern (void *p, int *moved)
+{
+ evp = realloc (p, 7);
+ if (evp)
+ {
+ /* When realloc succeeds the original pointer is invalid. */
+ *moved = (char*)p - (char*)evp; // { dg-warning "-Wuse-after-free" "escaped" }
+ return evp;
+ }
+
+ return p; // { dg-bogus "-Wuse-after-free" "safe use after realloc failure" { xfail *-*-* } }
+}
+
+struct A { void *p, *q; int moved; };
+
+void* warn_realloc_arg (struct A *p)
+{
+ p->q = realloc (p->p, 7);
+ if (p->q)
+ {
+ /* When realloc succeeds the original pointer is invalid. */
+ p->moved = p->p != p->q; // { dg-warning "-Wuse-after-free" "escaped" { xfail *-*-* } }
+ return p->q;
+ }
+
+ return p->p;
+}
diff --git a/gcc/testsuite/c-c++-common/Wuse-after-free-3.c b/gcc/testsuite/c-c++-common/Wuse-after-free-3.c
new file mode 100644
index 0000000..0a2db1a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wuse-after-free-3.c
@@ -0,0 +1,83 @@
+/* Exercise -Wuse-after-free with user-defined deallocators.
+ { dg-do compile }
+ { dg-options "-O0 -Wall" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+#if __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
+#define A(...) __attribute__ ((malloc (__VA_ARGS__)))
+
+EXTERN_C void free (void *);
+EXTERN_C void* realloc (void *, size_t);
+
+typedef struct List { struct List *next; } List;
+
+// User-defined allocator/deallocator just like like realloc and free.
+extern void list_free (List *);
+extern List* list_realloc (size_t, List *);
+extern A (list_realloc, 2) List* list_realloc (size_t, List *);
+extern A (list_free, 1) List* list_realloc (size_t, List *);
+
+
+void sink (void *);
+
+extern int ei;
+extern List *elp, *elpa[];
+
+void nowarn_list_free (struct List *lp)
+{
+ {
+ list_free (lp);
+ lp = 0;
+ sink (lp);
+ }
+ {
+ list_free (elp);
+ elp = 0;
+ sink (elp);
+ }
+ {
+ list_free (elpa[0]);
+ elpa[0] = 0;
+ sink (elpa[0]);
+ }
+ {
+ void *vp = elpa[0];
+ list_free (elpa[0]);
+ sink (vp);
+ }
+ {
+ List *p = elpa[1];
+ if (ei & 1)
+ list_free (p);
+ if (ei & 2)
+ sink (p);
+ }
+ {
+ struct List *next = lp->next;
+ list_free (lp);
+ list_free (next);
+ }
+}
+
+
+void nowarn_list_free_list (List *head)
+{
+ for (List *p = head, *q; p; p = q)
+ {
+ q = p->next;
+ list_free (p);
+ }
+}
+
+void warn_list_free_list (List *head)
+{
+ List *p = head;
+ for (; p; p = p->next) // { dg-warning "\\\[-Wuse-after-free" }
+ list_free (p); // { dg-message "call to '\(void \)?list_free\(\\(List\\*\\)\)?'" "note" }
+}
diff --git a/gcc/testsuite/c-c++-common/Wuse-after-free-4.c b/gcc/testsuite/c-c++-common/Wuse-after-free-4.c
new file mode 100644
index 0000000..686ba7e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wuse-after-free-4.c
@@ -0,0 +1,102 @@
+/* Verify -Wuse-after-free=1 triggers only for unconditional uses and
+ not for equality expressions.
+ { dg-do compile }
+ { dg-options "-O0 -Wall -Wuse-after-free=1" } */
+
+#if __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
+EXTERN_C void free (void*);
+
+void sink (void*);
+
+
+void warn_double_free (void *p)
+{
+ free (p);
+ free (p); // { dg-warning "pointer 'p' used" }
+}
+
+void nowarn_cond_double_free (void *p, int c)
+{
+ free (p);
+ if (c)
+ free (p);
+}
+
+void warn_call_after_free (void *p)
+{
+ free (p);
+ sink (p); // { dg-warning "pointer 'p' used" }
+}
+
+void nowarn_cond_call_after_free (void *p, int c)
+{
+ free (p);
+ if (c)
+ sink (p);
+}
+
+void* warn_return_after_free (void *p)
+{
+ free (p);
+ return p; // { dg-warning "pointer 'p' used" }
+}
+
+void* nowarn_cond_return_after_free (void *p, int c)
+{
+ free (p);
+ if (c)
+ return p;
+ return 0;
+}
+
+void warn_relational_after_free (char *p, char *q[])
+{
+ free (p);
+
+ int a[] =
+ {
+ p < q[0], // { dg-warning "pointer 'p' used" }
+ p <= q[1], // { dg-warning "pointer 'p' used" }
+ p > q[2], // { dg-warning "pointer 'p' used" }
+ p >= q[3], // { dg-warning "pointer 'p' used" }
+ p == q[4],
+ p != q[5]
+ };
+
+ sink (a);
+}
+
+void nowarn_cond_relational_after_free (char *p, char *q[], int c)
+{
+ free (p);
+
+ int a[] =
+ {
+ c ? p < q[0] : q[0][0],
+ c ? p <= q[1] : q[1][1],
+ c ? p > q[2] : q[2][2],
+ c ? p >= q[3] : q[3][3],
+ c ? p == q[4] : q[4][4],
+ c ? p != q[5] : q[5][5],
+ };
+
+ sink (a);
+}
+
+
+// Verify no warning for the example in the manual.
+
+struct A { int refcount; void *data; };
+
+void release (struct A *p)
+{
+ int refcount = --p->refcount;
+ free (p);
+ if (refcount == 0)
+ free (p->data); // no warning at level 1
+}
diff --git a/gcc/testsuite/c-c++-common/Wuse-after-free-5.c b/gcc/testsuite/c-c++-common/Wuse-after-free-5.c
new file mode 100644
index 0000000..c6ff1f3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wuse-after-free-5.c
@@ -0,0 +1,103 @@
+/* Verify -Wuse-after-free=2 triggers for conditional as well as
+ unconditional uses but not for equality expressions.
+ { dg-do compile }
+ { dg-options "-O0 -Wall -Wuse-after-free=2" } */
+
+
+#if __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
+EXTERN_C void free (void*);
+
+void sink (void*);
+
+
+void warn_double_free (void *p)
+{
+ free (p);
+ free (p); // { dg-warning "pointer 'p' used" }
+}
+
+void warn_cond_double_free (void *p, int c)
+{
+ free (p);
+ if (c)
+ free (p); // { dg-warning "pointer 'p' may be used" }
+}
+
+void warn_call_after_free (void *p)
+{
+ free (p);
+ sink (p); // { dg-warning "pointer 'p' used" }
+}
+
+void warn_cond_call_after_free (void *p, int c)
+{
+ free (p);
+ if (c)
+ sink (p); // { dg-warning "pointer 'p' may be used" }
+}
+
+void* warn_return_after_free (void *p)
+{
+ free (p);
+ return p; // { dg-warning "pointer 'p' used" }
+}
+
+void* warn_cond_return_after_free (void *p, int c)
+{
+ free (p);
+ if (c)
+ return p; // { dg-warning "pointer 'p' may be used" }
+ return 0;
+}
+
+void warn_relational_after_free (char *p, char *q[])
+{
+ free (p);
+
+ int a[] =
+ {
+ p < q[0], // { dg-warning "pointer 'p' used" }
+ p <= q[1], // { dg-warning "pointer 'p' used" }
+ p > q[2], // { dg-warning "pointer 'p' used" }
+ p >= q[3], // { dg-warning "pointer 'p' used" }
+ p == q[4],
+ p != q[5]
+ };
+
+ sink (a);
+}
+
+void warn_cond_relational_after_free (char *p, char *q[], int c)
+{
+ free (p);
+
+ int a[] =
+ {
+ c ? p < q[0] : q[0][0], // { dg-warning "pointer 'p' may be used" }
+ c ? p <= q[1] : q[1][1], // { dg-warning "pointer 'p' may be used" }
+ c ? p > q[2] : q[2][2], // { dg-warning "pointer 'p' may be used" }
+ c ? p >= q[3] : q[3][3], // { dg-warning "pointer 'p' may be used" }
+ c ? p == q[4] : q[4][4],
+ c ? p != q[5] : q[5][5],
+ };
+
+ sink (a);
+}
+
+
+// Verify warning for the example in the manual.
+
+struct A { int refcount; void *data; };
+
+void release (struct A *p)
+{
+ int refcount = --p->refcount;
+ free (p);
+ if (refcount == 0)
+ free (p->data); // { dg-warning "pointer 'p' may be used" }
+}
diff --git a/gcc/testsuite/c-c++-common/Wuse-after-free-6.c b/gcc/testsuite/c-c++-common/Wuse-after-free-6.c
new file mode 100644
index 0000000..581b1a0
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wuse-after-free-6.c
@@ -0,0 +1,105 @@
+/* Verify -Wuse-after-free=2 triggers for conditional as well as
+ unconditional uses but not for equality expressions. Same as
+ -Wuse-after-free-5.c but with optimization.
+ { dg-do compile }
+ { dg-options "-O2 -Wall -Wuse-after-free=2" } */
+
+
+#if __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
+EXTERN_C void free (void*);
+
+void sink (void*);
+
+
+void warn_double_free (void *p)
+{
+ free (p);
+ free (p); // { dg-warning "pointer 'p' used" }
+}
+
+void warn_cond_double_free (void *p, int c)
+{
+ free (p);
+ if (c)
+ free (p); // { dg-warning "pointer 'p' may be used" }
+}
+
+void warn_call_after_free (void *p)
+{
+ free (p);
+ sink (p); // { dg-warning "pointer 'p' used" }
+}
+
+void warn_cond_call_after_free (void *p, int c)
+{
+ free (p);
+ if (c)
+ sink (p); // { dg-warning "pointer 'p' may be used" }
+}
+
+void* warn_return_after_free (void *p)
+{
+ free (p);
+ return p; // { dg-warning "pointer 'p' used" }
+}
+
+void* warn_cond_return_after_free (void *p, int c)
+{
+ free (p);
+ // PHI handling not fully implemented.
+ if (c)
+ return p; // { dg-warning "pointer 'p' may be used" "pr??????" { xfail *-*-* } }
+ return 0;
+}
+
+void warn_relational_after_free (char *p, char *q[])
+{
+ free (p);
+
+ int a[] =
+ {
+ p < q[0], // { dg-warning "pointer 'p' used" }
+ p <= q[1], // { dg-warning "pointer 'p' used" }
+ p > q[2], // { dg-warning "pointer 'p' used" }
+ p >= q[3], // { dg-warning "pointer 'p' used" }
+ p == q[4],
+ p != q[5]
+ };
+
+ sink (a);
+}
+
+void warn_cond_relational_after_free (char *p, char *q[], int c)
+{
+ free (p);
+
+ int a[] =
+ {
+ c ? p < q[0] : q[0][0], // { dg-warning "pointer 'p' may be used" }
+ c ? p <= q[1] : q[1][1], // { dg-warning "pointer 'p' may be used" }
+ c ? p > q[2] : q[2][2], // { dg-warning "pointer 'p' may be used" }
+ c ? p >= q[3] : q[3][3], // { dg-warning "pointer 'p' may be used" }
+ c ? p == q[4] : q[4][4],
+ c ? p != q[5] : q[5][5],
+ };
+
+ sink (a);
+}
+
+
+// Verify warning for the example in the manual.
+
+struct A { int refcount; void *data; };
+
+void release (struct A *p)
+{
+ int refcount = --p->refcount;
+ free (p);
+ if (refcount == 0)
+ free (p->data); // { dg-warning "pointer 'p' may be used" }
+}
diff --git a/gcc/testsuite/c-c++-common/Wuse-after-free-7.c b/gcc/testsuite/c-c++-common/Wuse-after-free-7.c
new file mode 100644
index 0000000..12bb6f2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wuse-after-free-7.c
@@ -0,0 +1,103 @@
+/* Verify -Wuse-after-free=3 triggers for conditional and unconditional
+ uses in all expressions including equality.
+ { dg-do compile }
+ { dg-options "-O0 -Wall -Wuse-after-free=3" } */
+
+
+#if __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
+EXTERN_C void free (void*);
+
+void sink (void*);
+
+
+void warn_double_free (void *p)
+{
+ free (p);
+ free (p); // { dg-warning "pointer 'p' used" }
+}
+
+void warn_cond_double_free (void *p, int c)
+{
+ free (p);
+ if (c)
+ free (p); // { dg-warning "pointer 'p' may be used" }
+}
+
+void warn_call_after_free (void *p)
+{
+ free (p);
+ sink (p); // { dg-warning "pointer 'p' used" }
+}
+
+void warn_cond_call_after_free (void *p, int c)
+{
+ free (p);
+ if (c)
+ sink (p); // { dg-warning "pointer 'p' may be used" }
+}
+
+void* warn_return_after_free (void *p)
+{
+ free (p);
+ return p; // { dg-warning "pointer 'p' used" }
+}
+
+void* warn_cond_return_after_free (void *p, int c)
+{
+ free (p);
+ if (c)
+ return p; // { dg-warning "pointer 'p' may be used" }
+ return 0;
+}
+
+void warn_relational_after_free (char *p, char *q[])
+{
+ free (p);
+
+ int a[] =
+ {
+ p < q[0], // { dg-warning "pointer 'p' used" }
+ p <= q[1], // { dg-warning "pointer 'p' used" }
+ p > q[2], // { dg-warning "pointer 'p' used" }
+ p >= q[3], // { dg-warning "pointer 'p' used" }
+ p == q[4], // { dg-warning "pointer 'p' used" }
+ p != q[5] // { dg-warning "pointer 'p' used" }
+ };
+
+ sink (a);
+}
+
+void warn_cond_relational_after_free (char *p, char *q[], int c)
+{
+ free (p);
+
+ int a[] =
+ {
+ c ? p < q[0] : q[0][0], // { dg-warning "pointer 'p' may be used" }
+ c ? p <= q[1] : q[1][1], // { dg-warning "pointer 'p' may be used" }
+ c ? p > q[2] : q[2][2], // { dg-warning "pointer 'p' may be used" }
+ c ? p >= q[3] : q[3][3], // { dg-warning "pointer 'p' may be used" }
+ c ? p == q[4] : q[4][4], // { dg-warning "pointer 'p' may be used" }
+ c ? p != q[5] : q[5][5], // { dg-warning "pointer 'p' may be used" }
+ };
+
+ sink (a);
+}
+
+
+// Verify warning for the example in the manual.
+
+struct A { int refcount; void *data; };
+
+void release (struct A *p)
+{
+ int refcount = --p->refcount;
+ free (p);
+ if (refcount == 0)
+ free (p->data); // { dg-warning "pointer 'p' may be used" }
+}
diff --git a/gcc/testsuite/c-c++-common/Wuse-after-free.c b/gcc/testsuite/c-c++-common/Wuse-after-free.c
new file mode 100644
index 0000000..634d314
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wuse-after-free.c
@@ -0,0 +1,167 @@
+/* Exercise basic cases of -Wuse-after-free without optimization.
+ { dg-do compile }
+ { dg-options "-O0 -Wall" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+#if __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
+EXTERN_C void* alloca (size_t);
+
+EXTERN_C void* calloc (size_t, size_t);
+EXTERN_C void* malloc (size_t);
+
+EXTERN_C void free (void*);
+
+
+void sink (void *);
+
+extern void* evp;
+extern void* evpa[];
+
+extern int ei;
+
+struct List { struct List *next; };
+
+void nowarn_free (void *vp, struct List *lp)
+{
+ {
+ free (vp);
+ vp = 0;
+ sink (vp);
+ }
+ {
+ free (evp);
+ evp = 0;
+ sink (evp);
+ }
+ {
+ free (evpa[0]);
+ evpa[0] = 0;
+ sink (evpa[0]);
+ }
+ {
+ void *vp = evpa[0];
+ free (evpa[1]);
+ sink (vp);
+ }
+ {
+ void *p = evpa[1];
+ if (ei & 1)
+ free (p);
+ if (ei & 2)
+ sink (p);
+ }
+ {
+ struct List *next = lp->next;
+ free (lp);
+ free (next);
+ }
+}
+
+void nowarn_free_arg (void *p, void *q)
+{
+ free (p);
+ if (q)
+ free (q);
+}
+
+void nowarn_free_extern (void)
+{
+ extern void *ep, *eq;
+ free (ep);
+ ep = eq;
+ free (ep);
+}
+
+void nowarn_free_assign (void)
+{
+ extern void *ep;
+ free (ep);
+ ep = 0;
+ free (ep);
+}
+
+#pragma GCC diagnostic push
+/* Verify that -Wuse-after-free works with #pragma diagnostic. Note
+ that the option name should not need to include a trailing =, even
+ though it's a multi-level option. (specifying the level after
+ the option, as in "-Wuse-after-free=2", doesn't work. */
+#pragma GCC diagnostic ignored "-Wuse-after-free"
+
+void nowarn_double_free_suppressed (void *p)
+{
+ free (p);
+ free (p);
+}
+
+#pragma GCC diagnostic pop
+
+void warn_double_free_arg (void *p)
+{
+ free (p); // { dg-message "call to '\(void \)?free\(\\(void\\*\\)\)?'" "note" }
+ // Verify exactly one warning is issued.
+ free (p); // { dg-warning "\\\-Wuse-after-free" }
+ // { dg-bogus "\\\-Wuse-after-free" "duplicate warning" { target *-*-* } .-1 }
+
+}
+
+void warn_double_free_extern (void)
+{
+ /* GCC assumes free() clobbers global memory and the warning is
+ too simplistic to see through that assumption. */
+ extern void *ep, *eq;
+ {
+ eq = ep;
+ free (ep); // { dg-message "call to 'free'" "pr??????" { xfail *-*-* } }
+ free (eq); // { dg-warning "\\\-Wuse-after-free" "pr??????" { xfail *-*-* } }
+ }
+}
+
+void warn_deref_after_free (int *p, int i)
+{
+ int *q0 = p, *q1 = p + 1, *qi = p + i;
+ free (p); // { dg-message "call to '\(void \)?free\(\\(void\\*\\)\)?'" "note" }
+ *p = 0; // { dg-warning "\\\-Wuse-after-free" }
+
+ *q0 = 0; // { dg-warning "\\\-Wuse-after-free" }
+ *q1 = 0; // { dg-warning "\\\-Wuse-after-free" }
+ *qi = 0; // { dg-warning "\\\-Wuse-after-free" }
+}
+
+void warn_array_ref_after_free (int *p, int i)
+{
+ free (p); // { dg-message "call to '\(void \)?free\(\\(void\\*\\)\)?'" "note" }
+ p[i] = 0; // { dg-warning "\\\-Wuse-after-free" }
+}
+
+void nowarn_free_list (struct List *head)
+{
+ for (struct List *p = head, *q; p; p = q)
+ {
+ q = p->next;
+ free (p);
+ }
+}
+
+void warn_free_list (struct List *head)
+{
+ struct List *p = head;
+ for (; p; p = p->next) // { dg-warning "\\\[-Wuse-after-free" }
+ free (p); // { dg-message "call to '\(void \)?free\(\\(void\\*\\)\)?'" "note" }
+}
+
+
+void warn_free (void *vp)
+{
+ {
+ free (vp); // { dg-message "call to '\(void \)?free\(\\(void\\*\\)\)?'" "note" }
+ evp = vp; // { dg-warning "-Wuse-after-free" }
+ evpa[0] = vp; // { dg-warning "-Wuse-after-free" }
+ evpa[1] = evp;
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/asan/null-deref-1.c b/gcc/testsuite/c-c++-common/asan/null-deref-1.c
index bae016d..c967b29 100644
--- a/gcc/testsuite/c-c++-common/asan/null-deref-1.c
+++ b/gcc/testsuite/c-c++-common/asan/null-deref-1.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-fno-omit-frame-pointer -fno-shrink-wrap" } */
+/* { dg-options "-fno-omit-frame-pointer -fno-shrink-wrap -fno-ipa-modref" } */
/* { dg-additional-options "-mno-omit-leaf-frame-pointer" { target { i?86-*-* x86_64-*-* } } } */
/* { dg-shouldfail "asan" } */
diff --git a/gcc/testsuite/c-c++-common/attr-retain-5.c b/gcc/testsuite/c-c++-common/attr-retain-5.c
index 1f3f8bf..5f8ed48 100644
--- a/gcc/testsuite/c-c++-common/attr-retain-5.c
+++ b/gcc/testsuite/c-c++-common/attr-retain-5.c
@@ -18,6 +18,9 @@ free_slotinfo (struct dtv_slotinfo_list **elemp)
return 1;
}
+/* Prune out the valid warning for the function above:
+ { dg-prune-output "-Winfinite-recursion" } */
+
__attribute__ ((used, retain, section ("__libc_freeres_fn")))
static void free_mem (void)
{
diff --git a/gcc/testsuite/c-c++-common/attr-retain-6.c b/gcc/testsuite/c-c++-common/attr-retain-6.c
index ed6cfae..ace9a7e 100644
--- a/gcc/testsuite/c-c++-common/attr-retain-6.c
+++ b/gcc/testsuite/c-c++-common/attr-retain-6.c
@@ -17,6 +17,9 @@ free_slotinfo (struct dtv_slotinfo_list **elemp)
return 1;
}
+/* Prune out the valid warning for the function above:
+ { dg-prune-output "-Winfinite-recursion" } */
+
__attribute__ ((section ("__libc_freeres_fn")))
void free_mem (void)
/* { dg-warning "'.*' without 'retain' attribute and '.*' with 'retain' attribute are placed in a section with the same name" "" { target R_flag_in_section } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/attr-retain-9.c b/gcc/testsuite/c-c++-common/attr-retain-9.c
index e6d7c0b..ab9bf4a 100644
--- a/gcc/testsuite/c-c++-common/attr-retain-9.c
+++ b/gcc/testsuite/c-c++-common/attr-retain-9.c
@@ -17,6 +17,9 @@ free_slotinfo (struct dtv_slotinfo_list **elemp)
return 1;
}
+/* Prune out the valid warning for the function above:
+ { dg-prune-output "-Winfinite-recursion" } */
+
__attribute__ ((section ("__libc_freeres_fn")))
static void free_mem (void)
/* { dg-warning "defined but not used" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/attr-used-5.c b/gcc/testsuite/c-c++-common/attr-used-5.c
index 448e19f..7ba5a45 100644
--- a/gcc/testsuite/c-c++-common/attr-used-5.c
+++ b/gcc/testsuite/c-c++-common/attr-used-5.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-skip-if "non-ELF target" { *-*-darwin* } } */
-/* { dg-options "-Wall -O2" } */
+/* { dg-options "-Wall -Wno-infinite-recursion -O2" } */
struct dtv_slotinfo_list
{
diff --git a/gcc/testsuite/c-c++-common/attr-used-6.c b/gcc/testsuite/c-c++-common/attr-used-6.c
index b9974e2..00b1282 100644
--- a/gcc/testsuite/c-c++-common/attr-used-6.c
+++ b/gcc/testsuite/c-c++-common/attr-used-6.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-skip-if "non-ELF target" { *-*-darwin* } } */
-/* { dg-options "-Wall -O2" } */
+/* { dg-options "-Wall -Wno-infinite-recursion -O2" } */
struct dtv_slotinfo_list
{
diff --git a/gcc/testsuite/c-c++-common/attr-used-9.c b/gcc/testsuite/c-c++-common/attr-used-9.c
index 049c0be..c4d86c1 100644
--- a/gcc/testsuite/c-c++-common/attr-used-9.c
+++ b/gcc/testsuite/c-c++-common/attr-used-9.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-skip-if "non-ELF target" { *-*-darwin* } } */
-/* { dg-options "-Wall -O2" } */
+/* { dg-options "-Wall -Wno-infinite-recursion -O2" } */
struct dtv_slotinfo_list
{
diff --git a/gcc/testsuite/c-c++-common/auto-init-1.c b/gcc/testsuite/c-c++-common/auto-init-1.c
index 84ba0a9..df04358 100644
--- a/gcc/testsuite/c-c++-common/auto-init-1.c
+++ b/gcc/testsuite/c-c++-common/auto-init-1.c
@@ -29,13 +29,13 @@ void foo()
return;
}
-/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(1, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(2, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\(4, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp4 = .DEFERRED_INIT \\(4, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp5 = .DEFERRED_INIT \\(4, 2, 0\\)" "gimple" { target ilp32 } } } */
-/* { dg-final { scan-tree-dump "temp5 = .DEFERRED_INIT \\(8, 2, 0\\)" "gimple" { target lp64 } } } */
-/* { dg-final { scan-tree-dump "temp6 = .DEFERRED_INIT \\(8, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp7 = .DEFERRED_INIT \\(4, 2, 0\\)" "gimple" { target ilp32 } } } */
-/* { dg-final { scan-tree-dump "temp7 = .DEFERRED_INIT \\(8, 2, 0\\)" "gimple" { target lp64 } } } */
-/* { dg-final { scan-tree-dump "temp8 = .DEFERRED_INIT \\(1, 2, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(1, 2, \&\"temp1\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(2, 2, \&\"temp2\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\(4, 2, \&\"temp3\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp4 = .DEFERRED_INIT \\(4, 2, \&\"temp4\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp5 = .DEFERRED_INIT \\(4, 2, \&\"temp5\"" "gimple" { target ilp32 } } } */
+/* { dg-final { scan-tree-dump "temp5 = .DEFERRED_INIT \\(8, 2, \&\"temp5\"" "gimple" { target lp64 } } } */
+/* { dg-final { scan-tree-dump "temp6 = .DEFERRED_INIT \\(8, 2, \&\"temp6\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp7 = .DEFERRED_INIT \\(4, 2, \&\"temp7\"" "gimple" { target ilp32 } } } */
+/* { dg-final { scan-tree-dump "temp7 = .DEFERRED_INIT \\(8, 2, \&\"temp7\"" "gimple" { target lp64 } } } */
+/* { dg-final { scan-tree-dump "temp8 = .DEFERRED_INIT \\(1, 2, \&\"temp8\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-10.c b/gcc/testsuite/c-c++-common/auto-init-10.c
index f35205f..dda7ea1 100644
--- a/gcc/testsuite/c-c++-common/auto-init-10.c
+++ b/gcc/testsuite/c-c++-common/auto-init-10.c
@@ -18,5 +18,5 @@ void foo()
return;
}
-/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(2, 1, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(2, 1, \&\"temp1\"" "gimple" } } */
/* { dg-final { scan-tree-dump-not "temp2 = .DEFERRED_INIT \\(" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-11.c b/gcc/testsuite/c-c++-common/auto-init-11.c
index a2d6690..aafa215 100644
--- a/gcc/testsuite/c-c++-common/auto-init-11.c
+++ b/gcc/testsuite/c-c++-common/auto-init-11.c
@@ -1,6 +1,7 @@
/* Verify zero initialization for VLA automatic variables. */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=zero -fdump-tree-gimple" } */
+/* { dg-require-effective-target alloca } */
extern void bar (int);
@@ -11,4 +12,4 @@ void foo(int n)
return;
}
-/* { dg-final { scan-tree-dump ".DEFERRED_INIT \\(D.\\d*, 2, 1\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump ".DEFERRED_INIT \\(D.\\d*, 2, \&\"arr\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-12.c b/gcc/testsuite/c-c++-common/auto-init-12.c
index f05d743..c073bc9 100644
--- a/gcc/testsuite/c-c++-common/auto-init-12.c
+++ b/gcc/testsuite/c-c++-common/auto-init-12.c
@@ -1,6 +1,7 @@
/* Verify zero initialization for VLA automatic variables. */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-tree-gimple" } */
+/* { dg-require-effective-target alloca } */
extern void bar (int);
@@ -11,4 +12,4 @@ void foo(int n)
return;
}
-/* { dg-final { scan-tree-dump ".DEFERRED_INIT \\(D.\\d*, 1, 1\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump ".DEFERRED_INIT \\(D.\\d*, 1, \&\"arr\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-13.c b/gcc/testsuite/c-c++-common/auto-init-13.c
index b0c0365..aa5883a 100644
--- a/gcc/testsuite/c-c++-common/auto-init-13.c
+++ b/gcc/testsuite/c-c++-common/auto-init-13.c
@@ -19,5 +19,5 @@ int foo()
return d.b + var.bar.b;
}
-/* { dg-final { scan-tree-dump "d = .DEFERRED_INIT \\(4, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "var = .DEFERRED_INIT \\(4, 1, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump "d = .DEFERRED_INIT \\(4, 1, \&\"d\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "var = .DEFERRED_INIT \\(4, 1, \&\"var\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-14.c b/gcc/testsuite/c-c++-common/auto-init-14.c
index 986bb19..dd1ff3e 100644
--- a/gcc/testsuite/c-c++-common/auto-init-14.c
+++ b/gcc/testsuite/c-c++-common/auto-init-14.c
@@ -19,5 +19,5 @@ int foo()
return d.b + var.bar.b;
}
-/* { dg-final { scan-tree-dump "d = .DEFERRED_INIT \\(4, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "var = .DEFERRED_INIT \\(4, 2, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump "d = .DEFERRED_INIT \\(4, 2, \&\"d\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "var = .DEFERRED_INIT \\(4, 2, \&\"var\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-15.c b/gcc/testsuite/c-c++-common/auto-init-15.c
index aa9d7fa..77710a9 100644
--- a/gcc/testsuite/c-c++-common/auto-init-15.c
+++ b/gcc/testsuite/c-c++-common/auto-init-15.c
@@ -1,6 +1,7 @@
/* Verify the auto initialization of nested VLA. */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=zero -fdump-tree-gimple" } */
+/* { dg-require-effective-target alloca } */
void g(void *);
@@ -10,4 +11,4 @@ void foo(int a)
g(x);
}
-/* { dg-final { scan-tree-dump ".DEFERRED_INIT \\(D.\\d*, 2, 1\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump ".DEFERRED_INIT \\(D.\\d*, 2, \&\"x\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-16.c b/gcc/testsuite/c-c++-common/auto-init-16.c
index 86493ee..3714bc3 100644
--- a/gcc/testsuite/c-c++-common/auto-init-16.c
+++ b/gcc/testsuite/c-c++-common/auto-init-16.c
@@ -1,6 +1,7 @@
/* Verify the auto initialization of nested VLA. */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-tree-gimple" } */
+/* { dg-require-effective-target alloca } */
void g(void *);
@@ -10,4 +11,4 @@ void foo(int a)
g(x);
}
-/* { dg-final { scan-tree-dump ".DEFERRED_INIT \\(D.\\d*, 1, 1\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump ".DEFERRED_INIT \\(D.\\d*, 1, \&\"x\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-2.c b/gcc/testsuite/c-c++-common/auto-init-2.c
index 69768d6..6ac63bb 100644
--- a/gcc/testsuite/c-c++-common/auto-init-2.c
+++ b/gcc/testsuite/c-c++-common/auto-init-2.c
@@ -29,13 +29,13 @@ void foo()
return;
}
-/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(1, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(2, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\(4, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp4 = .DEFERRED_INIT \\(4, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp5 = .DEFERRED_INIT \\(4, 1, 0\\)" "gimple" { target ilp32 } } } */
-/* { dg-final { scan-tree-dump "temp5 = .DEFERRED_INIT \\(8, 1, 0\\)" "gimple" { target lp64 } } } */
-/* { dg-final { scan-tree-dump "temp6 = .DEFERRED_INIT \\(8, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp7 = .DEFERRED_INIT \\(4, 1, 0\\)" "gimple" { target ilp32 } } } */
-/* { dg-final { scan-tree-dump "temp7 = .DEFERRED_INIT \\(8, 1, 0\\)" "gimple" { target lp64 } } } */
-/* { dg-final { scan-tree-dump "temp8 = .DEFERRED_INIT \\(1, 1, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(1, 1, \&\"temp1\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(2, 1, \&\"temp2\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\(4, 1, \&\"temp3\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp4 = .DEFERRED_INIT \\(4, 1, \&\"temp4\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp5 = .DEFERRED_INIT \\(4, 1, \&\"temp5\"" "gimple" { target ilp32 } } } */
+/* { dg-final { scan-tree-dump "temp5 = .DEFERRED_INIT \\(8, 1, \&\"temp5\"" "gimple" { target lp64 } } } */
+/* { dg-final { scan-tree-dump "temp6 = .DEFERRED_INIT \\(8, 1, \&\"temp6\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp7 = .DEFERRED_INIT \\(4, 1, \&\"temp7\"" "gimple" { target ilp32 } } } */
+/* { dg-final { scan-tree-dump "temp7 = .DEFERRED_INIT \\(8, 1, \&\"temp7\"" "gimple" { target lp64 } } } */
+/* { dg-final { scan-tree-dump "temp8 = .DEFERRED_INIT \\(1, 1, \&\"temp8\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-3.c b/gcc/testsuite/c-c++-common/auto-init-3.c
index 062d60c..9d9c86d 100644
--- a/gcc/testsuite/c-c++-common/auto-init-3.c
+++ b/gcc/testsuite/c-c++-common/auto-init-3.c
@@ -14,6 +14,6 @@ long double foo()
return result;
}
-/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(4, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(8, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\((8|12|16), 2, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(4, 2, \&\"temp1\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(8, 2, \&\"temp2\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\((8|12|16), 2, \&\"temp3\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-4.c b/gcc/testsuite/c-c++-common/auto-init-4.c
index 9d8f23e..848df2a 100644
--- a/gcc/testsuite/c-c++-common/auto-init-4.c
+++ b/gcc/testsuite/c-c++-common/auto-init-4.c
@@ -14,6 +14,6 @@ long double foo()
return result;
}
-/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(4, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(8, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\((8|12|16), 1, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(4, 1, \&\"temp1\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(8, 1, \&\"temp2\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\((8|12|16), 1, \&\"temp3\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-5.c b/gcc/testsuite/c-c++-common/auto-init-5.c
index 9c98a6e..9c4de61 100644
--- a/gcc/testsuite/c-c++-common/auto-init-5.c
+++ b/gcc/testsuite/c-c++-common/auto-init-5.c
@@ -15,7 +15,7 @@ _Complex long double foo()
return result;
}
-/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(8, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(16, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\((16|24|32), 2, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(8, 2, \&\"temp1\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(16, 2, \&\"temp2\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\((16|24|32), 2, \&\"temp3\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-6.c b/gcc/testsuite/c-c++-common/auto-init-6.c
index 3fe2456..6a40644 100644
--- a/gcc/testsuite/c-c++-common/auto-init-6.c
+++ b/gcc/testsuite/c-c++-common/auto-init-6.c
@@ -15,7 +15,7 @@ _Complex long double foo()
return result;
}
-/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(8, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(16, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\((16|24|32), 1, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(8, 1, \&\"temp1\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(16, 1, \&\"temp2\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\((16|24|32), 1, \&\"temp3\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-7.c b/gcc/testsuite/c-c++-common/auto-init-7.c
index 1998696..b44dd5e 100644
--- a/gcc/testsuite/c-c++-common/auto-init-7.c
+++ b/gcc/testsuite/c-c++-common/auto-init-7.c
@@ -29,7 +29,7 @@ double foo()
return result;
}
-/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(12, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(24, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\(28, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp4 = .DEFERRED_INIT \\(8, 2, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(12, 2, \&\"temp1\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(24, 2, \&\"temp2\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\(28, 2, \&\"temp3\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp4 = .DEFERRED_INIT \\(8, 2, \&\"temp4\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-8.c b/gcc/testsuite/c-c++-common/auto-init-8.c
index 9778e91..739ac02 100644
--- a/gcc/testsuite/c-c++-common/auto-init-8.c
+++ b/gcc/testsuite/c-c++-common/auto-init-8.c
@@ -29,7 +29,7 @@ double foo()
return result;
}
-/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(12, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(24, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\(28, 1, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump "temp4 = .DEFERRED_INIT \\(8, 1, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(12, 1, \&\"temp1\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(24, 1, \&\"temp2\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\(28, 1, \&\"temp3\"" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp4 = .DEFERRED_INIT \\(8, 1, \&\"temp4\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-9.c b/gcc/testsuite/c-c++-common/auto-init-9.c
index 29acb7f..113107f 100644
--- a/gcc/testsuite/c-c++-common/auto-init-9.c
+++ b/gcc/testsuite/c-c++-common/auto-init-9.c
@@ -16,5 +16,5 @@ void foo()
return;
}
-/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(2, 2, 0\\)" "gimple" } } */
-/* { dg-final { scan-tree-dump-not "temp2 = .DEFERRED_INIT \\(8, 2, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(2, 2, \&\"temp1\"" "gimple" } } */
+/* { dg-final { scan-tree-dump-not "temp2 = .DEFERRED_INIT \\(8, 2, \&\"temp2\"" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-esra.c b/gcc/testsuite/c-c++-common/auto-init-esra.c
index 77ec023..ce6779f 100644
--- a/gcc/testsuite/c-c++-common/auto-init-esra.c
+++ b/gcc/testsuite/c-c++-common/auto-init-esra.c
@@ -1,6 +1,6 @@
/* Verify the strength reduction adjustment for -ftrivial-auto-var-init. */
/* { dg-do compile } */
-/* { dg-options "-O2 -ftrivial-auto-var-init=zero -fdump-tree-gimple -fdump-tree-esra" } */
+/* { dg-options "-O2 -ftrivial-auto-var-init=zero -fno-PIC -fdump-tree-gimple -fdump-tree-esra" } */
typedef double VECTOR[3];
@@ -31,5 +31,5 @@ void VCross(VECTOR a, const VECTOR b, const VECTOR c)
Assign_Vector(a, tmp);
}
-/* { dg-final { scan-tree-dump-times "tmp = .DEFERRED_INIT \\(24, 2, 0\\)" 1 "gimple" } } */
-/* { dg-final { scan-tree-dump-times ".DEFERRED_INIT \\(8, 2, 0\\)" 3 "esra" } } */
+/* { dg-final { scan-tree-dump-times "tmp = .DEFERRED_INIT \\(24, 2, \&\"tmp\"" 1 "gimple" } } */
+/* { dg-final { scan-tree-dump-times ".DEFERRED_INIT \\(8, 2, \&\"tmp\"" 3 "esra" } } */
diff --git a/gcc/testsuite/c-c++-common/auto-init-padding-1.c b/gcc/testsuite/c-c++-common/auto-init-padding-1.c
index 83db8dd..d2e3227 100644
--- a/gcc/testsuite/c-c++-common/auto-init-padding-1.c
+++ b/gcc/testsuite/c-c++-common/auto-init-padding-1.c
@@ -19,5 +19,5 @@ void foo(int a)
g(s);
}
-/* { dg-final { scan-tree-dump ".DEFERRED_INIT \\(24, 1, 0\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump ".DEFERRED_INIT \\(24, 1, \&\"s\"" "gimple" } } */
/* { dg-final { scan-tree-dump "__builtin_clear_padding" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/builtin-assoc-barrier-1.c b/gcc/testsuite/c-c++-common/builtin-assoc-barrier-1.c
new file mode 100644
index 0000000..3ff3249
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/builtin-assoc-barrier-1.c
@@ -0,0 +1,71 @@
+// { dg-options "-O2 -ffast-math" }
+/* { dg-do run } */
+
+float a = 1.f;
+float b = 1.e20f;
+
+float
+fast()
+{
+ return __builtin_assoc_barrier (a + b) - b;
+}
+
+__attribute__((optimize("-fno-associative-math")))
+float
+normal()
+{
+ return a + b - b;
+}
+
+void test0()
+{
+ if (fast() != normal())
+ __builtin_abort();
+}
+
+#ifdef __cplusplus
+#ifdef __cpp_constexpr
+constexpr float
+pm(float x, float y)
+{
+ return __builtin_assoc_barrier(x + y) - y;
+}
+
+template <int x>
+ constexpr int
+ f()
+ {
+ return x;
+ }
+#endif
+
+template <class T>
+ T
+ pm(T x, T y)
+ {
+ return __builtin_assoc_barrier(x + y) - y;
+ }
+
+void test1()
+{
+ if (pm(a, b) != normal())
+ __builtin_abort();
+#ifdef __cpp_constexpr
+ constexpr float x = pm(1.f, 1.e20f);
+ constexpr int y = f<int(pm(1.f, 1.e20f))>();
+ if (x != normal())
+ __builtin_abort();
+ if (y != 0)
+ __builtin_abort();
+#endif
+}
+#else
+void test1() {}
+#endif
+
+int main()
+{
+ test0();
+ test1();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cpp/dir-only-9.c b/gcc/testsuite/c-c++-common/cpp/dir-only-9.c
new file mode 100644
index 0000000..d11cd97
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/dir-only-9.c
@@ -0,0 +1,13 @@
+/* PR preprocessor/103130 */
+/* { dg-do preprocess } */
+/* { dg-options -fdirectives-only } */
+
+/*\
+ * this is a comment
+\*/
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cpp/line-2.c b/gcc/testsuite/c-c++-common/cpp/line-2.c
index 97cf398..364ad0e 100644
--- a/gcc/testsuite/c-c++-common/cpp/line-2.c
+++ b/gcc/testsuite/c-c++-common/cpp/line-2.c
@@ -8,4 +8,4 @@ int line4;
// { dg-regexp {In file included from <command-line>:\n[^\n]*/line-2.h:4:2: error: #error wrong\n} }
-// { dg-regexp {[^\n]*/line-2.c:3:11: error: macro "bill" passed 1 arguments, but takes just 0\nIn file included from <command-line>:\n[^\n]*/line-2.h:3: note: macro "bill" defined here\n} }
+// { dg-regexp {[^\n]*/line-2.c:3:11: error: macro "bill" passed 1 arguments, but takes just 0\n[^\n]*/line-2.h:3: note: macro "bill" defined here\n} }
diff --git a/gcc/testsuite/c-c++-common/cpp/line-3.c b/gcc/testsuite/c-c++-common/cpp/line-3.c
index 2ffc449..b254ae4 100644
--- a/gcc/testsuite/c-c++-common/cpp/line-3.c
+++ b/gcc/testsuite/c-c++-common/cpp/line-3.c
@@ -15,6 +15,6 @@ int line4;
// { dg-regexp {In file included from <command-line>:\n[^\n]*/line-2.h:4:2: error: #error wrong\n} }
-// { dg-regexp {[^\n]*/line-3.c:3:11: error: macro "bill" passed 1 arguments, but takes just 0\nIn file included from <command-line>:\n[^\n]*/line-2.h:3: note: macro "bill" defined here\n} }
+// { dg-regexp {[^\n]*/line-3.c:3:11: error: macro "bill" passed 1 arguments, but takes just 0\n[^\n]*/line-2.h:3: note: macro "bill" defined here\n} }
// { dg-options "-fpreprocessed -fdirectives-only" }
diff --git a/gcc/testsuite/c-c++-common/cpp/pr104147.c b/gcc/testsuite/c-c++-common/cpp/pr104147.c
new file mode 100644
index 0000000..4ee237e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/pr104147.c
@@ -0,0 +1,27 @@
+/* PR preprocessor/104147 */
+/* { dg-do run } */
+
+#define X(x,y) x y
+#define STR_(x) #x
+#define STR(x) STR_(x)
+const char *str =
+STR(X(Y,Y))
+#define Y()
+STR(X(Y,Y))
+#undef Y
+STR(X(Y,Y))
+#define Y()
+STR(X(Y,Y))
+STR(X(Y,
+Y))
+STR(X(Y
+,Y))
+;
+
+int
+main ()
+{
+ if (__builtin_strcmp (str, "Y YY YY YY YY YY Y") != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cpp/ucnid-2011-1-utf8.c b/gcc/testsuite/c-c++-common/cpp/ucnid-2011-1-utf8.c
index 02c5fc0..970d53e 100644
--- a/gcc/testsuite/c-c++-common/cpp/ucnid-2011-1-utf8.c
+++ b/gcc/testsuite/c-c++-common/cpp/ucnid-2011-1-utf8.c
@@ -2,7 +2,7 @@
/* { dg-options "-std=c11 -pedantic" { target c } } */
/* { dg-options "-std=c++11 -pedantic" { target c++ } } */
-¨
+¨ /* { dg-error "is not valid in an identifier" "" { target c++ } } */
BÌ€
@@ -11,5 +11,5 @@ BÌ€
AÌ€ /* { dg-warning "not in NFC" } */
ð€€
-🿽
-󡈴
+🿽 /* { dg-error "is not valid in an identifier" "" { target c++ } } */
+󡈴 /* { dg-error "is not valid in an identifier" "" { target c++ } } */
diff --git a/gcc/testsuite/c-c++-common/cpp/ucnid-2011-1.c b/gcc/testsuite/c-c++-common/cpp/ucnid-2011-1.c
index b7ebce8..6babb40 100644
--- a/gcc/testsuite/c-c++-common/cpp/ucnid-2011-1.c
+++ b/gcc/testsuite/c-c++-common/cpp/ucnid-2011-1.c
@@ -2,7 +2,7 @@
/* { dg-options "-std=c11 -pedantic" { target c } } */
/* { dg-options "-std=c++11 -pedantic" { target c++ } } */
-\u00A8
+\u00A8 /* { dg-error "is not valid in an identifier" "" { target c++ } } */
B\u0300
@@ -11,5 +11,5 @@ B\u0300
A\u0300 /* { dg-warning "not in NFC" } */
\U00010000
-\U0001FFFD
-\U000E1234
+\U0001FFFD /* { dg-error "is not valid in an identifier" "" { target c++ } } */
+\U000E1234 /* { dg-error "is not valid in an identifier" "" { target c++ } } */
diff --git a/gcc/testsuite/c-c++-common/cpp/va-opt-8.c b/gcc/testsuite/c-c++-common/cpp/va-opt-8.c
new file mode 100644
index 0000000..583ebf0
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/va-opt-8.c
@@ -0,0 +1,18 @@
+/* PR preprocessor/103415 */
+/* { dg-do run } */
+/* { dg-options "-std=gnu99" { target c } } */
+/* { dg-options "-std=c++20" { target c++ } } */
+
+#define n(x, ...) = #__VA_OPT__(x##3)
+#define o(x, ...) #__VA_OPT__(x##__VA_ARGS__##9)
+const char *c n(1 2, 4);
+const char *d = o(5 6, 7 8);
+
+int
+main ()
+{
+ if (__builtin_strcmp (c, "1 23")
+ || __builtin_strcmp (d, "5 67 89"))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cpp/va-opt-9.c b/gcc/testsuite/c-c++-common/cpp/va-opt-9.c
new file mode 100644
index 0000000..5f73ad0
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/va-opt-9.c
@@ -0,0 +1,20 @@
+/* PR preprocessor/89971 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99" { target c } } */
+/* { dg-options "-std=c++20" { target c++ } } */
+
+int a, c;
+#define m1(...) a /##__VA_OPT__(b) c
+#define m2(...) a /##__VA_OPT__() c
+#define m3(...) a##__VA_OPT__()##b = 1
+#define m4(...) a##__VA_OPT__(b c d)##e = 2
+
+int
+foo (void)
+{
+ int d = m1();
+ int e = m2(1);
+ int m3(1 2 3);
+ int m4();
+ return d + e + ab + ae;
+}
diff --git a/gcc/testsuite/c-c++-common/diagnostic-format-json-1.c b/gcc/testsuite/c-c++-common/diagnostic-format-json-1.c
index 740becb..af57eb6 100644
--- a/gcc/testsuite/c-c++-common/diagnostic-format-json-1.c
+++ b/gcc/testsuite/c-c++-common/diagnostic-format-json-1.c
@@ -9,6 +9,7 @@
/* { dg-regexp "\"kind\": \"error\"" } */
/* { dg-regexp "\"column-origin\": 1" } */
+/* { dg-regexp "\"escape-source\": false" } */
/* { dg-regexp "\"message\": \"#error message\"" } */
/* { dg-regexp "\"caret\": \{" } */
diff --git a/gcc/testsuite/c-c++-common/diagnostic-format-json-2.c b/gcc/testsuite/c-c++-common/diagnostic-format-json-2.c
index 2f24a6c..edb802e 100644
--- a/gcc/testsuite/c-c++-common/diagnostic-format-json-2.c
+++ b/gcc/testsuite/c-c++-common/diagnostic-format-json-2.c
@@ -9,6 +9,7 @@
/* { dg-regexp "\"kind\": \"warning\"" } */
/* { dg-regexp "\"column-origin\": 1" } */
+/* { dg-regexp "\"escape-source\": false" } */
/* { dg-regexp "\"message\": \"#warning message\"" } */
/* { dg-regexp "\"option\": \"-Wcpp\"" } */
/* { dg-regexp "\"option_url\": \"https:\[^\n\r\"\]*#index-Wcpp\"" } */
diff --git a/gcc/testsuite/c-c++-common/diagnostic-format-json-3.c b/gcc/testsuite/c-c++-common/diagnostic-format-json-3.c
index afe96a9..bb7b8dc 100644
--- a/gcc/testsuite/c-c++-common/diagnostic-format-json-3.c
+++ b/gcc/testsuite/c-c++-common/diagnostic-format-json-3.c
@@ -9,6 +9,7 @@
/* { dg-regexp "\"kind\": \"error\"" } */
/* { dg-regexp "\"column-origin\": 1" } */
+/* { dg-regexp "\"escape-source\": false" } */
/* { dg-regexp "\"message\": \"#warning message\"" } */
/* { dg-regexp "\"option\": \"-Werror=cpp\"" } */
/* { dg-regexp "\"option_url\": \"https:\[^\n\r\"\]*#index-Wcpp\"" } */
diff --git a/gcc/testsuite/c-c++-common/diagnostic-format-json-4.c b/gcc/testsuite/c-c++-common/diagnostic-format-json-4.c
index ae51091..8ac9072 100644
--- a/gcc/testsuite/c-c++-common/diagnostic-format-json-4.c
+++ b/gcc/testsuite/c-c++-common/diagnostic-format-json-4.c
@@ -19,6 +19,7 @@ int test (void)
/* { dg-regexp "\"kind\": \"note\"" } */
/* { dg-regexp "\"message\": \"...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'\"" } */
+/* { dg-regexp "\"escape-source\": false" } */
/* { dg-regexp "\"caret\": \{" } */
/* { dg-regexp "\"file\": \"\[^\n\r\"\]*diagnostic-format-json-4.c\"" } */
@@ -39,6 +40,7 @@ int test (void)
/* { dg-regexp "\"kind\": \"warning\"" } */
/* { dg-regexp "\"column-origin\": 1" } */
/* { dg-regexp "\"message\": \"this 'if' clause does not guard...\"" } */
+/* { dg-regexp "\"escape-source\": false" } */
/* { dg-regexp "\"option\": \"-Wmisleading-indentation\"" } */
/* { dg-regexp "\"option_url\": \"https:\[^\n\r\"\]*#index-Wmisleading-indentation\"" } */
diff --git a/gcc/testsuite/c-c++-common/diagnostic-format-json-5.c b/gcc/testsuite/c-c++-common/diagnostic-format-json-5.c
index e0e9ce4..8d2eb0c 100644
--- a/gcc/testsuite/c-c++-common/diagnostic-format-json-5.c
+++ b/gcc/testsuite/c-c++-common/diagnostic-format-json-5.c
@@ -14,6 +14,7 @@ int test (struct s *ptr)
/* { dg-regexp "\"kind\": \"error\"" } */
/* { dg-regexp "\"column-origin\": 1" } */
+/* { dg-regexp "\"escape-source\": false" } */
/* { dg-regexp "\"message\": \".*\"" } */
/* Verify fix-it hints. */
diff --git a/gcc/testsuite/c-c++-common/goacc/builtin-goacc-parlevel-id-size.c b/gcc/testsuite/c-c++-common/goacc/builtin-goacc-parlevel-id-size.c
index 5cda818..19d6c21 100644
--- a/gcc/testsuite/c-c++-common/goacc/builtin-goacc-parlevel-id-size.c
+++ b/gcc/testsuite/c-c++-common/goacc/builtin-goacc-parlevel-id-size.c
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-additional-options "-O2" } */
+/* { dg-additional-options -Wuninitialized } */
+
#include "../../../../include/gomp-constants.h"
#pragma acc routine
@@ -8,6 +10,7 @@ int
foo (void)
{
int res;
+ /* { dg-note {'res' was declared here} {} { target *-*-* } .-1 } */
__builtin_goacc_parlevel_id (GOMP_DIM_GANG);
__builtin_goacc_parlevel_id (GOMP_DIM_WORKER);
@@ -18,6 +21,7 @@ foo (void)
__builtin_goacc_parlevel_size (GOMP_DIM_VECTOR);
res += __builtin_goacc_parlevel_id (GOMP_DIM_GANG);
+ /* { dg-warning {'res' is used uninitialized} {} { target *-*-* } .-1 } */
res += __builtin_goacc_parlevel_id (GOMP_DIM_WORKER);
res += __builtin_goacc_parlevel_id (GOMP_DIM_VECTOR);
@@ -34,6 +38,8 @@ foo2 (void)
int res;
#pragma acc parallel
+ /* implicit 'firstprivate (res)'
+ { dg-warning {'res' is used uninitialized} TODO { xfail *-*-* } .-2 } */
{
__builtin_goacc_parlevel_id (GOMP_DIM_GANG);
__builtin_goacc_parlevel_id (GOMP_DIM_WORKER);
@@ -59,6 +65,8 @@ foo3 (void)
int res;
#pragma acc kernels
+ /* implicit 'copy (res)'
+ { dg-warning {'res' is used uninitialized} TODO { xfail *-*-* } .-2 } */
{
__builtin_goacc_parlevel_id (GOMP_DIM_GANG);
__builtin_goacc_parlevel_id (GOMP_DIM_WORKER);
diff --git a/gcc/testsuite/c-c++-common/goacc/classify-kernels-parloops.c b/gcc/testsuite/c-c++-common/goacc/classify-kernels-parloops.c
new file mode 100644
index 0000000..f3685f2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/classify-kernels-parloops.c
@@ -0,0 +1,41 @@
+/* Check offloaded function's attributes and classification for OpenACC
+ kernels. */
+
+/* { dg-additional-options "--param openacc-kernels=parloops" } */
+
+/* { dg-additional-options "-O2" }
+ { dg-additional-options "-fopt-info-optimized-omp" }
+ { dg-additional-options "-fdump-tree-ompexp" }
+ { dg-additional-options "-fdump-tree-parloops1-all" }
+ { dg-additional-options "-fdump-tree-oaccloops" } */
+
+/* { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
+ aspects of that functionality. */
+
+#define N 1024
+
+extern unsigned int *__restrict a;
+extern unsigned int *__restrict b;
+extern unsigned int *__restrict c;
+
+void KERNELS ()
+{
+#pragma acc kernels copyin (a[0:N], b[0:N]) copyout (c[0:N]) /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
+ for (unsigned int i = 0; i < N; i++)
+ c[i] = a[i] + b[i];
+}
+
+/* Check the offloaded function's attributes.
+ { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels, omp target entrypoint\\)\\)" 1 "ompexp" } } */
+
+/* Check that exactly one OpenACC kernels construct is analyzed, and that it
+ can be parallelized.
+ { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 1 "parloops1" } }
+ { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint\\)\\)" 1 "parloops1" } }
+ { dg-final { scan-tree-dump-not "FAILED:" "parloops1" } } */
+
+/* Check the offloaded function's classification and compute dimensions (will
+ always be 1 x 1 x 1 for non-offloading compilation).
+ { dg-final { scan-tree-dump-times "(?n)Function is parallelized OpenACC kernels offload" 1 "oaccloops" } }
+ { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops" } }
+ { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint\\)\\)" 1 "oaccloops" } } */
diff --git a/gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized-parloops.c b/gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized-parloops.c
new file mode 100644
index 0000000..6522caf
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized-parloops.c
@@ -0,0 +1,45 @@
+/* Check offloaded function's attributes and classification for unparallelized
+ OpenACC kernels. */
+
+/* { dg-additional-options "--param openacc-kernels=parloops" } */
+
+/* { dg-additional-options "-O2" }
+ { dg-additional-options "-fopt-info-optimized-omp" }
+ { dg-additional-options "-fdump-tree-ompexp" }
+ { dg-additional-options "-fdump-tree-parloops1-all" }
+ { dg-additional-options "-fdump-tree-oaccloops" } */
+
+/* { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
+ aspects of that functionality. */
+
+#define N 1024
+
+extern unsigned int *__restrict a;
+extern unsigned int *__restrict b;
+extern unsigned int *__restrict c;
+
+/* An "extern"al mapping of loop iterations/array indices makes the loop
+ unparallelizable. */
+extern unsigned int f (unsigned int);
+
+void KERNELS ()
+{
+#pragma acc kernels copyin (a[0:N], b[0:N]) copyout (c[0:N]) /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+ for (unsigned int i = 0; i < N; i++)
+ c[i] = a[f (i)] + b[f (i)];
+}
+
+/* Check the offloaded function's attributes.
+ { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels, omp target entrypoint\\)\\)" 1 "ompexp" } } */
+
+/* Check that exactly one OpenACC kernels construct is analyzed, and that it
+ can't be parallelized.
+ { dg-final { scan-tree-dump-times "FAILED:" 1 "parloops1" } }
+ { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(, , \\), oacc kernels, omp target entrypoint\\)\\)" 1 "parloops1" } }
+ { dg-final { scan-tree-dump-not "SUCCESS: may be parallelized" "parloops1" } } */
+
+/* Check the offloaded function's classification and compute dimensions (will
+ always be 1 x 1 x 1 for non-offloading compilation).
+ { dg-final { scan-tree-dump-times "(?n)Function is unparallelized OpenACC kernels offload" 1 "oaccloops" } }
+ { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops" } }
+ { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc kernels, omp target entrypoint\\)\\)" 1 "oaccloops" } } */
diff --git a/gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized.c b/gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized.c
index 1d12658..daa8fcb 100644
--- a/gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized.c
+++ b/gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized.c
@@ -1,8 +1,10 @@
/* Check offloaded function's attributes and classification for unparallelized
OpenACC kernels. */
+/* { dg-additional-options "--param openacc-kernels=decompose" } */
+
/* { dg-additional-options "-O2" }
- { dg-additional-options "-fopt-info-optimized-omp" }
+ { dg-additional-options "-fopt-info-all-omp" }
{ dg-additional-options "-fdump-tree-ompexp" }
{ dg-additional-options "-fdump-tree-parloops1-all" }
{ dg-additional-options "-fdump-tree-oaccloops" } */
@@ -23,6 +25,7 @@ extern unsigned int f (unsigned int);
void KERNELS ()
{
#pragma acc kernels copyin (a[0:N], b[0:N]) copyout (c[0:N]) /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
+ /* { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
for (unsigned int i = 0; i < N; i++)
c[i] = a[f (i)] + b[f (i)];
}
diff --git a/gcc/testsuite/c-c++-common/goacc/classify-kernels.c b/gcc/testsuite/c-c++-common/goacc/classify-kernels.c
index bdf7b4a..b54a71e 100644
--- a/gcc/testsuite/c-c++-common/goacc/classify-kernels.c
+++ b/gcc/testsuite/c-c++-common/goacc/classify-kernels.c
@@ -1,8 +1,10 @@
/* Check offloaded function's attributes and classification for OpenACC
kernels. */
+/* { dg-additional-options "--param openacc-kernels=decompose" } */
+
/* { dg-additional-options "-O2" }
- { dg-additional-options "-fopt-info-optimized-omp" }
+ { dg-additional-options "-fopt-info-all-omp" }
{ dg-additional-options "-fdump-tree-ompexp" }
{ dg-additional-options "-fdump-tree-parloops1-all" }
{ dg-additional-options "-fdump-tree-oaccloops" } */
@@ -19,6 +21,7 @@ extern unsigned int *__restrict c;
void KERNELS ()
{
#pragma acc kernels copyin (a[0:N], b[0:N]) copyout (c[0:N]) /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
+ /* { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
for (unsigned int i = 0; i < N; i++)
c[i] = a[i] + b[i];
}
diff --git a/gcc/testsuite/c-c++-common/goacc/deep-copy-arrayofstruct.c b/gcc/testsuite/c-c++-common/goacc/deep-copy-arrayofstruct.c
index d411bcf..4247607 100644
--- a/gcc/testsuite/c-c++-common/goacc/deep-copy-arrayofstruct.c
+++ b/gcc/testsuite/c-c++-common/goacc/deep-copy-arrayofstruct.c
@@ -37,13 +37,12 @@ int main(int argc, char* argv[])
{
int j, k;
for (k = 0; k < S; k++)
-#pragma acc parallel loop copy(m[k].a[0:N]) /* { dg-error "expected .\\\). before .\\\.. token" } */
+#pragma acc parallel loop copy(m[k].a[0:N])
for (j = 0; j < N; j++)
m[k].a[j]++;
for (k = 0; k < S; k++)
-#pragma acc parallel loop copy(m[k].b[0:N], m[k].c[5:N-10]) /* { dg-error "expected .\\\). before .\\\.. token" } */
- /* { dg-error ".m. appears more than once in data clauses" "" { target c++ } .-1 } */
+#pragma acc parallel loop copy(m[k].b[0:N], m[k].c[5:N-10])
for (j = 0; j < N; j++)
{
m[k].b[j]++;
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c
index f549cba..e58bc17 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c
@@ -1,10 +1,16 @@
/* Test OpenACC 'kernels' construct decomposition. */
/* { dg-additional-options "-fopt-info-omp-all" } */
+
/* { dg-additional-options "-fdump-tree-gimple" } */
+
/* { dg-additional-options "--param=openacc-kernels=decompose" }
{ dg-additional-options "-fdump-tree-omp_oacc_kernels_decompose" } */
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+ Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types):
+ { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} } */
+
/* { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
aspects of that functionality. */
@@ -14,7 +20,7 @@
passed to 'incr' may be unset, and in that case, it will be set to [...]",
so to maintain compatibility with earlier Tcl releases, we manually
initialize counter variables:
- { dg-line l_dummy[variable c_loop_i 0] }
+ { dg-line l_dummy[variable c_compute 0 c_loop_i 0] }
{ dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
"WARNING: dg-line var l_dummy defined, but not used". */
@@ -28,36 +34,43 @@ main (void)
int i;
unsigned int sum = 1;
-#pragma acc kernels copyin(a[0:N]) copy(sum)
- /* { dg-bogus "optimized: assigned OpenACC seq loop parallelism" "TODO" { xfail *-*-* } .-1 }
+#pragma acc kernels copyin(a[0:N]) copy(sum) /* { dg-line l_compute[incr c_compute] } */
+ /* { dg-note {variable 'sum\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
+ /* { dg-bogus {optimized: assigned OpenACC seq loop parallelism} TODO { xfail *-*-* } l_compute$c_compute }
TODO Is this maybe the report that belongs to the XFAILed report further down? */
{
#pragma acc loop /* { dg-line l_loop_i[incr c_loop_i] } */
- /* { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
for (i = 0; i < N; ++i)
sum += a[i];
- sum++; /* { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" } */
+ /* { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+ sum++;
a[0]++;
#pragma acc loop independent /* { dg-line l_loop_i[incr c_loop_i] } */
- /* { dg-message "note: parallelized loop nest in OpenACC 'kernels' region" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized "assigned OpenACC gang vector loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
for (i = 0; i < N; ++i)
sum += a[i];
- if (sum > 10) /* { dg-message "note: beginning 'parloops' part in OpenACC 'kernels' region" } */
+ /* { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+ if (sum > 10)
{
#pragma acc loop /* { dg-line l_loop_i[incr c_loop_i] } */
/* { dg-missed "unparallelized loop nest in OpenACC 'kernels' region: it's executed conditionally" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/*TODO { dg-optimized "assigned OpenACC seq loop parallelism" "TODO" { xfail *-*-* } l_loop_i$c_loop_i } */
for (i = 0; i < N; ++i)
sum += a[i];
}
#pragma acc loop auto /* { dg-line l_loop_i[incr c_loop_i] } */
- /* { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
for (i = 0; i < N; ++i)
sum += a[i];
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c
index cdf85d4..64ce894 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c
@@ -1,9 +1,14 @@
/* Test OpenACC 'kernels' construct decomposition. */
/* { dg-additional-options "-fopt-info-omp-all" } */
+
/* { dg-additional-options "--param=openacc-kernels=decompose" }
/* { dg-additional-options "-O2" } for 'parloops'. */
+/* { dg-additional-options "--param=openacc-privatization=noisy" }
+ Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types):
+ { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} } */
+
/* { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
aspects of that functionality. */
@@ -13,7 +18,7 @@
passed to 'incr' may be unset, and in that case, it will be set to [...]",
so to maintain compatibility with earlier Tcl releases, we manually
initialize counter variables:
- { dg-line l_dummy[variable c_loop_i 0 c_loop_j 0 c_loop_k 0 c_part 0] }
+ { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0 c_part 0] }
{ dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
"WARNING: dg-line var l_dummy defined, but not used". */
@@ -40,23 +45,43 @@ main ()
#define N 10
int a[N], b[N], c[N];
-#pragma acc kernels
+#pragma acc kernels /* { dg-line l_compute[incr c_compute] } */
+ /* { dg-note {variable 'x\.0' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
{
- x = 0; /* { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" } */
+ /* { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+ x = 0;
y = x < 10;
z = x++;
;
}
- { /*TODO Instead of using 'for (int i = 0; [...])', move 'int i' outside, to work around for ICE detailed in 'kernels-decompose-ice-1.c'. */
+ {
int i;
-#pragma acc kernels /* { dg-optimized "assigned OpenACC gang loop parallelism" } */
- for (i = 0; i < N; i++) /* { dg-message "note: beginning 'parloops' part in OpenACC 'kernels' region" } */
+#pragma acc kernels /* { dg-line l_compute[incr c_compute] } */
+ /* { dg-optimized {assigned OpenACC gang loop parallelism} {} { target *-*-* } l_compute$c_compute } */
+ /* { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+ for (i = 0; i < N; i++)
a[i] = 0;
}
+#pragma acc kernels /* { dg-line l_compute[incr c_compute] } */
+ /* { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } l_compute$c_compute } */
+ /* { dg-note {variable 'i' declared in block is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_compute$c_compute } */
+ {
+ int i;
+ }
+
+#pragma acc kernels /* { dg-line l_compute[incr c_compute] } */
+ /* { dg-note {variable 'i' declared in block is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_compute$c_compute } */
+ /* { dg-optimized {assigned OpenACC gang loop parallelism} {} { target *-*-* } l_compute$c_compute } */
+ /* { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+ for (int i = 0; i < N; i++)
+ a[i] = 0;
+
#pragma acc kernels loop /* { dg-line l_loop_i[incr c_loop_i] } */
- /* { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
for (int i = 0; i < N; i++)
b[i] = a[N - i - 1];
@@ -64,44 +89,60 @@ main ()
#pragma acc kernels
{
#pragma acc loop /* { dg-line l_loop_i[incr c_loop_i] } */
- /* { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
for (int i = 0; i < N; i++)
b[i] = a[N - i - 1];
#pragma acc loop /* { dg-line l_loop_i[incr c_loop_i] } */
- /* { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
for (int i = 0; i < N; i++)
c[i] = a[i] * b[i];
- a[z] = 0; /* { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" } */
+ /* { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+ a[z] = 0;
#pragma acc loop /* { dg-line l_loop_i[incr c_loop_i] } */
- /* { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
for (int i = 0; i < N; i++)
c[i] += a[i];
#pragma acc loop seq /* { dg-line l_loop_i[incr c_loop_i] } */
- /* { dg-message "note: parallelized loop nest in OpenACC 'kernels' region" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
for (int i = 0 + 1; i < N; i++)
c[i] += c[i - 1];
}
-#pragma acc kernels
+#pragma acc kernels /* { dg-line l_compute[incr c_compute] } */
+ /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } */
/*TODO What does this mean?
- TODO { dg-optimized "assigned OpenACC worker vector loop parallelism" "" { target *-*-* } .-2 } */
+ TODO { dg-optimized "assigned OpenACC worker vector loop parallelism" "" { target *-*-* } l_compute$c_compute } */
{
#pragma acc loop independent /* { dg-line l_loop_i[incr c_loop_i] } */
+ /* { dg-note {variable 'i' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } */
/* { dg-optimized "assigned OpenACC gang loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } */
- /* { dg-message "note: parallelized loop nest in OpenACC 'kernels' region" "" { target *-*-* } l_loop_i$c_loop_i } */
+ /* { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i } */
for (int i = 0; i < N; ++i)
#pragma acc loop independent /* { dg-line l_loop_j[incr c_loop_j] } */
+ /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+ /* { dg-note {variable 'k' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
/* { dg-optimized "assigned OpenACC worker loop parallelism" "" { target *-*-* } l_loop_j$c_loop_j } */
for (int j = 0; j < N; ++j)
#pragma acc loop independent /* { dg-line l_loop_k[incr c_loop_k] } */
+ /* { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k } */
/* { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } l_loop_k$c_loop_k } */
/* { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_k$c_loop_k } */
for (int k = 0; k < N; ++k)
@@ -111,23 +152,27 @@ main ()
/*TODO Should the following turn into "gang-single" instead of "parloops"?
TODO The problem is that the first STMT is 'if (y <= 4) goto <D.2547>; else goto <D.2548>;', thus "parloops". */
- if (y < 5) /* { dg-message "note: beginning 'parloops' part in OpenACC 'kernels' region" } */
+ /* { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+ if (y < 5)
#pragma acc loop independent /* { dg-line l_loop_j[incr c_loop_j] } */
+ /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
/* { dg-missed "unparallelized loop nest in OpenACC 'kernels' region: it's executed conditionally" "" { target *-*-* } l_loop_j$c_loop_j } */
for (int j = 0; j < N; ++j)
b[j] = f_w (c[j]);
}
-#pragma acc kernels
- /* { dg-bogus "warning: region contains gang partitioned code but is not gang partitioned" "TODO 'kernels'" { xfail *-*-* } .-1 } */
+#pragma acc kernels /* { dg-line l_compute[incr c_compute] } */
+ /* { dg-bogus "warning: region contains gang partitioned code but is not gang partitioned" "TODO 'kernels'" { xfail *-*-* } l_compute$c_compute } */
{
y = f_g (a[5]); /* { dg-line l_part[incr c_part] } */
/*TODO If such a construct is placed in its own part (like it is, here), can't this actually use gang paralelism, instead of "gang-single"?
- { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" "" { target *-*-* } l_part$c_part } */
+ { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } l_part$c_part } */
/* { dg-optimized "assigned OpenACC gang worker vector loop parallelism" "" { target *-*-* } l_part$c_part } */
#pragma acc loop independent /* { dg-line l_loop_j[incr c_loop_j] } */
- /* { dg-message "note: parallelized loop nest in OpenACC 'kernels' region" "" { target *-*-* } l_loop_j$c_loop_j } */
+ /* { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_j$c_loop_j } */
+ /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+ /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
/* { dg-optimized "assigned OpenACC gang loop parallelism" "" { target *-*-* } l_loop_j$c_loop_j } */
for (int j = 0; j < N; ++j)
b[j] = y + f_w (c[j]); /* { dg-optimized "assigned OpenACC worker vector loop parallelism" } */
@@ -135,18 +180,23 @@ main ()
#pragma acc kernels
{
- y = 3; /* { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" } */
+ /* { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+ y = 3;
#pragma acc loop independent /* { dg-line l_loop_j[incr c_loop_j] } */
- /* { dg-message "note: parallelized loop nest in OpenACC 'kernels' region" "" { target *-*-* } l_loop_j$c_loop_j } */
+ /* { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_j$c_loop_j } */
+ /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
+ /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j } */
/* { dg-optimized "assigned OpenACC gang worker loop parallelism" "" { target *-*-* } l_loop_j$c_loop_j } */
for (int j = 0; j < N; ++j)
b[j] = y + f_v (c[j]); /* { dg-optimized "assigned OpenACC vector loop parallelism" } */
- z = 2; /* { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" } */
+ /* { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+ z = 2;
}
-#pragma acc kernels /* { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" } */
+ /* { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 } */
+#pragma acc kernels
;
return 0;
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c
deleted file mode 100644
index 8c3884b..0000000
--- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Test OpenACC 'kernels' construct decomposition. */
-
-/* { dg-additional-options "-fopt-info-omp-all" } */
-/* { dg-additional-options "-fchecking --param=openacc-kernels=decompose" } */
-/* { dg-ice "TODO" }
- { dg-prune-output "during GIMPLE pass: omplower" } */
-
-/* Reduced from 'kernels-decompose-2.c'.
- (Hopefully) similar instances:
- - 'kernels-decompose-ice-2.c'
- - 'libgomp.oacc-c-c++-common/declare-vla-kernels-decompose-ice-1.c'
- - 'libgomp.oacc-c-c++-common/kernels-decompose-1.c'
-*/
-
-int
-main ()
-{
-#define N 10
-
-#pragma acc kernels
- for (int i = 0; i < N; i++) /* { dg-message "note: beginning 'parloops' part in OpenACC 'kernels' region" } */
- ;
-
- return 0;
-}
-
-/*
- In 'gimple' we've got:
-
- main ()
- {
- int D.2087;
-
- {
- int a[10];
-
- try
- {
- #pragma omp target oacc_kernels map(tofrom:a [len: 40])
- {
- {
- int i;
-
- i = 0;
- goto <D.2085>;
- [...]
-
- ..., which in 'omp_oacc_kernels_decompose' we turn into:
-
- main ()
- {
- int D.2087;
-
- {
- int a[10];
-
- try
- {
- #pragma omp target oacc_data_kernels map(tofrom:a [len: 40])
- {
- try
- {
- {
- int i;
-
- #pragma omp target oacc_data_kernels map(alloc:i [len: 4])
- {
- try
- {
- {
- #pragma omp target oacc_kernels async(-1) map(force_present:i [len: 4]) map(force_present:a [len: 40])
- {
- i = 0;
- goto <D.2085>;
- [...]
-
- ..., which results in ICE in:
-
- #1 0x0000000000d2247b in lower_omp_target (gsi_p=gsi_p@entry=0x7fffffffbc90, ctx=ctx@entry=0x2c994c0) at [...]/gcc/omp-low.c:11981
- 11981 gcc_assert (offloaded);
- (gdb) list
- 11976 talign = TYPE_ALIGN_UNIT (TREE_TYPE (TREE_TYPE (ovar)));
- 11977 gimplify_assign (x, var, &ilist);
- 11978 }
- 11979 else if (is_gimple_reg (var))
- 11980 {
- 11981 gcc_assert (offloaded);
- 11982 tree avar = create_tmp_var (TREE_TYPE (var));
- 11983 mark_addressable (avar);
- 11984 enum gomp_map_kind map_kind = OMP_CLAUSE_MAP_KIND (c);
- 11985 if (GOMP_MAP_COPY_TO_P (map_kind)
- (gdb) call debug_tree(var)
- <var_decl 0x7ffff7feebd0 i
- type <integer_type 0x7ffff67be5e8 int sizes-gimplified public SI
- size <integer_cst 0x7ffff67a5f18 constant 32>
- unit-size <integer_cst 0x7ffff67a5f30 constant 4>
- align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff67be5e8 precision:32 min <integer_cst 0x7ffff67a5ed0 -2147483648> max <integer_cst 0x7ffff67a5ee8 2147483647>
- pointer_to_this <pointer_type 0x7ffff67c69d8>>
- used read SI [...]:15:12 size <integer_cst 0x7ffff67a5f18 32> unit-size <integer_cst 0x7ffff67a5f30 4>
- align:32 warn_if_not_align:0 context <function_decl 0x7ffff68eea00 main>>
-
- Just defusing the 'assert' is not sufficient:
-
- libgomp: present clause: !acc_is_present (0x7ffe29cba3ec, 4 (0x4))
-
- TODO Can't the 'omp_oacc_kernels_decompose' transformation be much simpler, such that we avoid the intermediate 'data' if we've got just one compute construct inside it?
- TODO But it's not clear if that'd just resolve one simple instance of the general problem?
-
-*/
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c
deleted file mode 100644
index 8bf60a9..0000000
--- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Test OpenACC 'kernels' construct decomposition. */
-
-/* { dg-additional-options "-fchecking --param=openacc-kernels=decompose" } */
-/* { dg-ice "TODO" }
- { dg-prune-output "during GIMPLE pass: omplower" } */
-
-/* Reduced from 'kernels-decompose-ice-1.c'. */
-
-int
-main ()
-{
-#pragma acc kernels
- {
- int i;
- }
-}
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr100280-1.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr100280-1.c
new file mode 100644
index 0000000..b497af2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-pr100280-1.c
@@ -0,0 +1,19 @@
+/* Reduced from 'libgomp.oacc-c-c++-common/kernels-loop-2.c'. */
+
+/* { dg-additional-options "--param openacc-kernels=decompose" } */
+
+/* { dg-additional-options "-fopt-info-all-omp" } */
+
+/* { dg-additional-options "--param=openacc-privatization=noisy" } */
+
+void
+foo (void) /* { dg-line l_f_1 } */
+{
+#pragma acc kernels /* { dg-line l_k_1 } */
+ /* { dg-note {variable 'i' declared in block is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_k_1 } */
+ /* { dg-optimized {assigned OpenACC seq loop parallelism} {} { target *-*-* } l_k_1 } */
+ /* { dg-bogus {note: beginning 'parloops' part in OpenACC 'kernels' region} {TODO location} { xfail *-*-* } l_f_1 }
+ { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} TODO { xfail *-*-* } .+1 } */
+ for (int i;;)
+ ;
+}
diff --git a/gcc/testsuite/c-c++-common/goacc/mdc-1.c b/gcc/testsuite/c-c++-common/goacc/mdc-1.c
index c2b8dc6..923a4ea 100644
--- a/gcc/testsuite/c-c++-common/goacc/mdc-1.c
+++ b/gcc/testsuite/c-c++-common/goacc/mdc-1.c
@@ -5,6 +5,8 @@
{ dg-do compile { target { lp64 || llp64 } } } */
/* { dg-additional-options "-fdump-tree-omplower" } */
+/* { dg-additional-options -Wuninitialized } */
+
void
t1 ()
{
@@ -13,10 +15,12 @@ t1 ()
} s;
int *a, *z;
+ /* { dg-note {'z' was declared here} {} { target *-*-* } .-1 } */
#pragma acc enter data copyin(s)
{
#pragma acc data copy(s.a[0:10]) copy(z[0:10])
+ /* { dg-warning {'z' is used uninitialized} {} { target *-*-* } .-1 } */
{
s.e = z;
#pragma acc parallel loop attach(s.e)
diff --git a/gcc/testsuite/c-c++-common/goacc/nested-reductions-1-kernels.c b/gcc/testsuite/c-c++-common/goacc/nested-reductions-1-kernels.c
index 9323e2c..e669369 100644
--- a/gcc/testsuite/c-c++-common/goacc/nested-reductions-1-kernels.c
+++ b/gcc/testsuite/c-c++-common/goacc/nested-reductions-1-kernels.c
@@ -2,11 +2,16 @@
/* See also 'gfortran.dg/goacc/nested-reductions-1-kernels.f90'. */
+/* { dg-additional-options -Wuninitialized } */
+
void acc_kernels (void)
{
int i, j, k, sum, diff;
#pragma acc kernels
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
{
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
@@ -74,6 +79,9 @@ void acc_kernels_loop (void)
int i, j, k, l, sum, diff;
#pragma acc kernels loop
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
for (int h = 0; h < 10; ++h)
{
#pragma acc loop reduction(+:sum)
@@ -151,6 +159,9 @@ void acc_kernels_loop_reduction (void)
int i, j, k, sum, diff;
#pragma acc kernels loop reduction(+:sum)
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
for (int h = 0; h < 10; ++h)
{
for (i = 0; i < 10; i++)
diff --git a/gcc/testsuite/c-c++-common/goacc/nested-reductions-1-parallel.c b/gcc/testsuite/c-c++-common/goacc/nested-reductions-1-parallel.c
index ce1d0a1..1182385 100644
--- a/gcc/testsuite/c-c++-common/goacc/nested-reductions-1-parallel.c
+++ b/gcc/testsuite/c-c++-common/goacc/nested-reductions-1-parallel.c
@@ -2,11 +2,16 @@
/* See also 'gfortran.dg/goacc/nested-reductions-1-parallel.f90'. */
+/* { dg-additional-options -Wuninitialized } */
+
void acc_parallel (void)
{
int i, j, k, sum, diff;
#pragma acc parallel
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
{
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
@@ -74,6 +79,9 @@ void acc_parallel_loop (void)
int i, j, k, l, sum, diff;
#pragma acc parallel loop
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
for (int h = 0; h < 10; ++h)
{
#pragma acc loop reduction(+:sum)
@@ -143,6 +151,9 @@ void acc_parallel_reduction (void)
int i, j, k, sum, diff;
#pragma acc parallel reduction(+:sum)
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
{
for (i = 0; i < 10; i++)
for (j = 0; j < 10; j++)
@@ -233,6 +244,9 @@ void acc_parallel_loop_reduction (void)
int i, j, k, sum, diff;
#pragma acc parallel loop reduction(+:sum)
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
for (int h = 0; h < 10; ++h)
{
for (i = 0; i < 10; i++)
diff --git a/gcc/testsuite/c-c++-common/goacc/nested-reductions-1-routine.c b/gcc/testsuite/c-c++-common/goacc/nested-reductions-1-routine.c
index 83d3995..df72cd1 100644
--- a/gcc/testsuite/c-c++-common/goacc/nested-reductions-1-routine.c
+++ b/gcc/testsuite/c-c++-common/goacc/nested-reductions-1-routine.c
@@ -2,24 +2,30 @@
/* See also 'gfortran.dg/goacc/nested-reductions-1-routine.f90'. */
+/* { dg-additional-options -Wuninitialized } */
+
#pragma acc routine gang
void acc_routine (void)
{
int i, j, k, sum, diff;
{
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum)
+ /* { dg-warning {'sum' is used uninitialized} {} { target *-*-* } .-1 } */
for (i = 0; i < 10; i++)
for (j = 0; j < 10; j++)
for (k = 0; k < 10; k++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop collapse(2) reduction(+:sum)
for (i = 0; i < 10; i++)
for (j = 0; j < 10; j++)
for (k = 0; k < 10; k++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
#pragma acc loop reduction(+:sum)
@@ -27,6 +33,7 @@ void acc_routine (void)
for (k = 0; k < 10; k++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
#pragma acc loop collapse(2) reduction(+:sum)
@@ -34,6 +41,7 @@ void acc_routine (void)
for (k = 0; k < 10; k++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
for (j = 0; j < 10; j++)
@@ -41,6 +49,7 @@ void acc_routine (void)
for (k = 0; k < 10; k++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
#pragma acc loop reduction(+:sum)
@@ -49,7 +58,9 @@ void acc_routine (void)
for (k = 0; k < 10; k++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum) reduction(-:diff)
+ /* { dg-warning {'diff' is used uninitialized} {} { target *-*-* } .-1 } */
for (i = 0; i < 10; i++)
{
#pragma acc loop reduction(+:sum)
diff --git a/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-kernels.c b/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-kernels.c
index dec7dbd..16a870b 100644
--- a/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-kernels.c
+++ b/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-kernels.c
@@ -2,11 +2,16 @@
/* See also 'gfortran.dg/goacc/nested-reductions-2-kernels.f90'. */
+/* { dg-additional-options -Wuninitialized } */
+
void acc_kernels (void)
{
int i, j, k, l, sum, diff;
#pragma acc kernels
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
{
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
@@ -99,6 +104,9 @@ void acc_kernels_loop (void)
int i, j, k, l, sum, diff;
#pragma acc kernels loop
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
for (int h = 0; h < 10; ++h)
{
#pragma acc loop reduction(+:sum)
@@ -209,6 +217,9 @@ void acc_kernels_loop_reduction (void)
int i, j, k, l, sum, diff;
#pragma acc kernels loop reduction(+:sum)
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
for (int h = 0; h < 10; ++h)
{
#pragma acc loop // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
diff --git a/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-parallel.c b/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-parallel.c
index 1f6b4e7..840ed86 100644
--- a/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-parallel.c
+++ b/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-parallel.c
@@ -2,11 +2,16 @@
/* See also 'gfortran.dg/goacc/nested-reductions-2-parallel.f90'. */
+/* { dg-additional-options -Wuninitialized } */
+
void acc_parallel (void)
{
int i, j, k, l, sum, diff;
#pragma acc parallel
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
{
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
@@ -99,6 +104,9 @@ void acc_parallel_loop (void)
int i, j, k, l, sum, diff;
#pragma acc parallel loop
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
for (int h = 0; h < 10; ++h)
{
#pragma acc loop reduction(+:sum)
@@ -201,6 +209,9 @@ void acc_parallel_reduction (void)
int i, j, k, l, sum, diff;
#pragma acc parallel reduction(+:sum)
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
{
#pragma acc loop // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
for (i = 0; i < 10; i++)
@@ -293,6 +304,9 @@ void acc_parallel_loop_reduction (void)
int i, j, k, l, sum, diff;
#pragma acc parallel loop reduction(+:sum)
+ /* implicit 'copy (sum, diff)'
+ { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 } */
for (int h = 0; h < 10; ++h)
{
#pragma acc loop // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
diff --git a/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-routine.c b/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-routine.c
index 5988d50..dd03c85 100644
--- a/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-routine.c
+++ b/gcc/testsuite/c-c++-common/goacc/nested-reductions-2-routine.c
@@ -2,13 +2,17 @@
/* See also 'gfortran.dg/goacc/nested-reductions-2-routine.f90'. */
+/* { dg-additional-options -Wuninitialized } */
+
#pragma acc routine gang
void acc_routine (void)
{
int i, j, k, l, sum, diff;
{
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum)
+ /* { dg-warning {'sum' is used uninitialized} {} { target *-*-* } .-1 } */
for (i = 0; i < 10; i++)
#pragma acc loop // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
for (j = 0; j < 10; j++)
@@ -16,6 +20,7 @@ void acc_routine (void)
for (k = 0; k < 10; k++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
#pragma acc loop collapse(2) // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
@@ -25,6 +30,7 @@ void acc_routine (void)
for (l = 0; l < 10; l++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
#pragma acc loop // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
@@ -36,6 +42,7 @@ void acc_routine (void)
for (l = 0; l < 10; l++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
#pragma acc loop reduction(-:sum) // { dg-warning "conflicting reduction operations for .sum." }
@@ -44,6 +51,7 @@ void acc_routine (void)
for (k = 0; k < 10; k++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
#pragma acc loop reduction(-:sum) // { dg-warning "conflicting reduction operations for .sum." }
@@ -52,6 +60,7 @@ void acc_routine (void)
for (k = 0; k < 10; k++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
#pragma acc loop reduction(-:sum) // { dg-warning "conflicting reduction operations for .sum." }
@@ -63,6 +72,7 @@ void acc_routine (void)
for (l = 0; l < 10; l++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum)
for (i = 0; i < 10; i++)
#pragma acc loop reduction(-:sum) // { dg-warning "conflicting reduction operations for .sum." }
@@ -74,7 +84,9 @@ void acc_routine (void)
for (l = 0; l < 10; l++)
sum = 1;
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
#pragma acc loop reduction(+:sum) reduction(-:diff)
+ /* { dg-warning {'diff' is used uninitialized} {} { target *-*-* } .-1 } */
for (i = 0; i < 10; i++)
{
#pragma acc loop reduction(-:diff) // { dg-warning "nested loop in reduction needs reduction clause for .sum." }
diff --git a/gcc/testsuite/c-c++-common/goacc/orphan-reductions-1.c b/gcc/testsuite/c-c++-common/goacc/orphan-reductions-1.c
new file mode 100644
index 0000000..d2fec10
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/orphan-reductions-1.c
@@ -0,0 +1,56 @@
+/* Test orphan reductions. */
+
+/* { dg-do compile } */
+
+#pragma acc routine seq
+int
+seq_reduction (int n)
+{
+ int i, sum = 0;
+#pragma acc loop seq reduction(+:sum)
+ for (i = 0; i < n; i++)
+ sum = sum + 1;
+
+ return sum;
+}
+
+#pragma acc routine gang
+int
+gang_reduction (int n)
+{
+ int i, s1 = 0, s2 = 0;
+#pragma acc loop gang reduction(+:s1) /* { dg-error "gang reduction on an orphan loop" } */
+ for (i = 0; i < n; i++)
+ s1 = s1 + 2;
+
+#pragma acc loop gang reduction(+:s2) /* { dg-error "gang reduction on an orphan loop" } */
+ for (i = 0; i < n; i++)
+ s2 = s2 + 2;
+
+
+ return s1 + s2;
+}
+
+#pragma acc routine worker
+int
+worker_reduction (int n)
+{
+ int i, sum = 0;
+#pragma acc loop worker reduction(+:sum)
+ for (i = 0; i < n; i++)
+ sum = sum + 3;
+
+ return sum;
+}
+
+#pragma acc routine vector
+int
+vector_reduction (int n)
+{
+ int i, sum = 0;
+#pragma acc loop vector reduction(+:sum)
+ for (i = 0; i < n; i++)
+ sum = sum + 4;
+
+ return sum;
+}
diff --git a/gcc/testsuite/c-c++-common/goacc/orphan-reductions-2.c b/gcc/testsuite/c-c++-common/goacc/orphan-reductions-2.c
new file mode 100644
index 0000000..6ff8698
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/orphan-reductions-2.c
@@ -0,0 +1,91 @@
+/* Verify that we diagnose "gang reduction on an orphan loop" for automatically
+ assigned gang level of parallelism. */
+
+/* { dg-do compile } */
+/* { dg-additional-options "-fopt-info-optimized-omp" } */
+/* { dg-additional-options "-Wopenacc-parallelism" } */
+
+#pragma acc routine gang
+/* { dg-bogus "warning: region is worker partitioned but does not contain worker partitioned code" "TODO default 'gang' 'vector'" { xfail *-*-* } .+3 }
+ TODO It's the compiler's own decision to not use 'worker' parallelism here, so it doesn't make sense to bother the user about it. */
+int
+f1 ()
+{
+ int sum = 0, i;
+
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
+#pragma acc loop reduction (+:sum) /* { dg-optimized "assigned OpenACC gang vector loop parallelism" } */
+ for (i = 0; i < 100; i++)
+ sum++;
+
+ return sum;
+}
+
+#pragma acc routine gang
+int
+f2 ()
+{
+ int sum = 0, i, j;
+
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
+#pragma acc loop reduction (+:sum) /* { dg-optimized "assigned OpenACC gang worker loop parallelism" } */
+ for (i = 0; i < 100; i++)
+#pragma acc loop reduction (+:sum) /* { dg-optimized "assigned OpenACC vector loop parallelism" } */
+ for (j = 0; j < 100; j++)
+ sum++;
+
+ return sum;
+}
+
+#pragma acc routine gang
+int
+f3 ()
+{
+ int sum = 0, i, j, k;
+
+ /* { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 } */
+#pragma acc loop reduction (+:sum) /* { dg-optimized "assigned OpenACC gang loop parallelism" } */
+ for (i = 0; i < 100; i++)
+#pragma acc loop reduction (+:sum) /* { dg-optimized "assigned OpenACC worker loop parallelism" } */
+ for (j = 0; j < 100; j++)
+#pragma acc loop reduction (+:sum) /* { dg-optimized "assigned OpenACC vector loop parallelism" } */
+ for (k = 0; k < 100; k++)
+ sum++;
+
+ return sum;
+}
+
+int
+main ()
+{
+ int sum = 0, i, j, k;
+
+#pragma acc parallel copy (sum)
+ {
+#pragma acc loop reduction (+:sum) /* { dg-optimized "assigned OpenACC gang vector loop parallelism" } */
+ for (i = 0; i < 100; i++)
+ sum++;
+ }
+
+#pragma acc parallel copy (sum)
+ {
+#pragma acc loop reduction (+:sum) /* { dg-optimized "assigned OpenACC gang worker loop parallelism" } */
+ for (i = 0; i < 100; i++)
+#pragma acc loop reduction (+:sum) /* { dg-optimized "assigned OpenACC vector loop parallelism" } */
+ for (j = 0; j < 100; j++)
+ sum++;
+ }
+
+#pragma acc parallel copy (sum)
+ {
+#pragma acc loop reduction (+:sum) /* { dg-optimized "assigned OpenACC gang loop parallelism" } */
+ for (i = 0; i < 100; i++)
+#pragma acc loop reduction (+:sum) /* { dg-optimized "assigned OpenACC worker loop parallelism" } */
+ for (j = 0; j < 100; j++)
+#pragma acc loop reduction (+:sum) /* { dg-optimized "assigned OpenACC vector loop parallelism" } */
+ for (k = 0; k < 100; k++)
+ sum++;
+ }
+
+ return sum;
+}
diff --git a/gcc/testsuite/c-c++-common/goacc/orphan-reductions-3.c b/gcc/testsuite/c-c++-common/goacc/orphan-reductions-3.c
new file mode 100644
index 0000000..cd8ad27
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/orphan-reductions-3.c
@@ -0,0 +1,102 @@
+/* Verify that the error message for gang reduction on orphaned OpenACC loops
+ is not reported for non-orphaned loops. */
+
+/* { dg-additional-options "-Wopenacc-parallelism" } */
+
+int
+kernels (int n)
+{
+ int i, s1 = 0, s2 = 0;
+#pragma acc kernels
+ {
+#pragma acc loop gang reduction(+:s1) /* { dg-bogus "gang reduction on an orphan loop" } */
+ for (i = 0; i < n; i++)
+ s1 = s1 + 2;
+
+#pragma acc loop gang reduction(+:s2) /* { dg-bogus "gang reduction on an orphan loop" } */
+ for (i = 0; i < n; i++)
+ s2 = s2 + 2;
+ }
+ return s1 + s2;
+}
+
+int
+parallel (int n)
+{
+ int i, s1 = 0, s2 = 0;
+#pragma acc parallel
+ {
+#pragma acc loop gang reduction(+:s1) /* { dg-bogus "gang reduction on an orphan loop" } */
+ for (i = 0; i < n; i++)
+ s1 = s1 + 2;
+
+#pragma acc loop gang reduction(+:s2) /* { dg-bogus "gang reduction on an orphan loop" } */
+ for (i = 0; i < n; i++)
+ s2 = s2 + 2;
+ }
+ return s1 + s2;
+}
+
+int
+serial (int n)
+{
+ int i, s1 = 0, s2 = 0;
+#pragma acc serial /* { dg-warning "region contains gang partitioned code but is not gang partitioned" } */
+ {
+#pragma acc loop gang reduction(+:s1) /* { dg-bogus "gang reduction on an orphan loop" } */
+ for (i = 0; i < n; i++)
+ s1 = s1 + 2;
+
+#pragma acc loop gang reduction(+:s2) /* { dg-bogus "gang reduction on an orphan loop" } */
+ for (i = 0; i < n; i++)
+ s2 = s2 + 2;
+ }
+ return s1 + s2;
+}
+
+int
+serial_combined (int n)
+{
+ int i, s1 = 0, s2 = 0;
+#pragma acc serial loop gang reduction(+:s1) /* { dg-bogus "gang reduction on an orphan loop" } */
+ /* { dg-warning "region contains gang partitioned code but is not gang partitioned" "" { target *-*-* } .-1 } */
+ for (i = 0; i < n; i++)
+ s1 = s1 + 2;
+
+#pragma acc serial loop gang reduction(+:s2) /* { dg-bogus "gang reduction on an orphan loop" } */
+ /* { dg-warning "region contains gang partitioned code but is not gang partitioned" "" { target *-*-* } .-1 } */
+ for (i = 0; i < n; i++)
+ s2 = s2 + 2;
+
+ return s1 + s2;
+}
+
+int
+parallel_combined (int n)
+{
+ int i, s1 = 0, s2 = 0;
+#pragma acc parallel loop gang reduction(+:s1) /* { dg-bogus "gang reduction on an orphan loop" } */
+ for (i = 0; i < n; i++)
+ s1 = s1 + 2;
+
+#pragma acc parallel loop gang reduction(+:s2) /* { dg-bogus "gang reduction on an orphan loop" } */
+ for (i = 0; i < n; i++)
+ s2 = s2 + 2;
+
+ return s1 + s2;
+}
+
+int
+kernels_combined (int n)
+{
+ int i, s1 = 0, s2 = 0;
+#pragma acc kernels loop gang reduction(+:s1) /* { dg-bogus "gang reduction on an orphan loop" } */
+ for (i = 0; i < n; i++)
+ s1 = s1 + 2;
+
+#pragma acc kernels loop gang reduction(+:s2) /* { dg-bogus "gang reduction on an orphan loop" } */
+ for (i = 0; i < n; i++)
+ s2 = s2 + 2;
+
+ return s1 + s2;
+}
diff --git a/gcc/testsuite/c-c++-common/goacc/pr102432.c b/gcc/testsuite/c-c++-common/goacc/pr102432.c
new file mode 100644
index 0000000..97450f3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/pr102432.c
@@ -0,0 +1,23 @@
+/* PR preprocessor/102432 */
+
+#define loop(x)
+
+void
+foo (void)
+{
+ int i;
+#pragma acc parallel
+#pragma acc loop
+ for (i = 0; i < 64; i++)
+ ;
+}
+
+void
+bar (void)
+{
+ int i;
+ _Pragma ("acc parallel")
+ _Pragma ("acc loop")
+ for (i = 0; i < 64; i++)
+ ;
+}
diff --git a/gcc/testsuite/c-c++-common/goacc/routine-4-extern.c b/gcc/testsuite/c-c++-common/goacc/routine-4-extern.c
index ec21db1..ec44758 100644
--- a/gcc/testsuite/c-c++-common/goacc/routine-4-extern.c
+++ b/gcc/testsuite/c-c++-common/goacc/routine-4-extern.c
@@ -26,23 +26,21 @@ void seq (void)
extern_vector (); /* { dg-error "routine call uses" } */
extern_seq ();
- int red;
-
-#pragma acc loop reduction (+:red) // { dg-warning "insufficient partitioning" }
+#pragma acc loop // { dg-warning "insufficient partitioning" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop gang // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop worker reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop worker // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop vector reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop vector // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
}
void vector (void)
@@ -52,23 +50,21 @@ void vector (void)
extern_vector ();
extern_seq ();
- int red;
-
-#pragma acc loop reduction (+:red)
+#pragma acc loop
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop gang // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop worker reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop worker // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop vector reduction (+:red)
+#pragma acc loop vector
for (int i = 0; i < 10; i++)
- red ++;
+ ;
}
void worker (void)
@@ -78,23 +74,21 @@ void worker (void)
extern_vector ();
extern_seq ();
- int red;
-
-#pragma acc loop reduction (+:red)
+#pragma acc loop
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop gang // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop worker reduction (+:red)
+#pragma acc loop worker
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop vector reduction (+:red)
+#pragma acc loop vector
for (int i = 0; i < 10; i++)
- red ++;
+ ;
}
void gang (void)
@@ -104,21 +98,19 @@ void gang (void)
extern_vector ();
extern_seq ();
- int red;
-
-#pragma acc loop reduction (+:red)
+#pragma acc loop
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop gang reduction (+:red)
+#pragma acc loop gang
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop worker reduction (+:red)
+#pragma acc loop worker
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop vector reduction (+:red)
+#pragma acc loop vector
for (int i = 0; i < 10; i++)
- red ++;
+ ;
}
diff --git a/gcc/testsuite/c-c++-common/goacc/routine-4.c b/gcc/testsuite/c-c++-common/goacc/routine-4.c
index 5f2194c..870ff64 100644
--- a/gcc/testsuite/c-c++-common/goacc/routine-4.c
+++ b/gcc/testsuite/c-c++-common/goacc/routine-4.c
@@ -17,23 +17,21 @@ void seq (void)
vector (); /* { dg-error "routine call uses" } */
seq ();
- int red;
-
-#pragma acc loop reduction (+:red) // { dg-warning "insufficient partitioning" }
+#pragma acc loop // { dg-warning "insufficient partitioning" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop gang // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop worker reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop worker // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop vector reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop vector // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
}
void vector (void) /* { dg-message "declared here" "1" } */
@@ -43,23 +41,21 @@ void vector (void) /* { dg-message "declared here" "1" } */
vector ();
seq ();
- int red;
-
-#pragma acc loop reduction (+:red)
+#pragma acc loop
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop gang // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop worker reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop worker // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop vector reduction (+:red)
+#pragma acc loop vector
for (int i = 0; i < 10; i++)
- red ++;
+ ;
}
void worker (void) /* { dg-message "declared here" "2" } */
@@ -69,23 +65,21 @@ void worker (void) /* { dg-message "declared here" "2" } */
vector ();
seq ();
- int red;
-
-#pragma acc loop reduction (+:red)
+#pragma acc loop
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop gang // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop worker reduction (+:red)
+#pragma acc loop worker
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop vector reduction (+:red)
+#pragma acc loop vector
for (int i = 0; i < 10; i++)
- red ++;
+ ;
}
void gang (void) /* { dg-message "declared here" "3" } */
@@ -95,21 +89,19 @@ void gang (void) /* { dg-message "declared here" "3" } */
vector ();
seq ();
- int red;
-
-#pragma acc loop reduction (+:red)
+#pragma acc loop
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop gang reduction (+:red)
+#pragma acc loop gang
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop worker reduction (+:red)
+#pragma acc loop worker
for (int i = 0; i < 10; i++)
- red ++;
+ ;
-#pragma acc loop vector reduction (+:red)
+#pragma acc loop vector
for (int i = 0; i < 10; i++)
- red ++;
+ ;
}
diff --git a/gcc/testsuite/c-c++-common/goacc/routine-5.c b/gcc/testsuite/c-c++-common/goacc/routine-5.c
index e3fbd65..94678f2 100644
--- a/gcc/testsuite/c-c++-common/goacc/routine-5.c
+++ b/gcc/testsuite/c-c++-common/goacc/routine-5.c
@@ -94,6 +94,14 @@ typedef struct c_2 c_2;
#pragma acc routine /* { dg-error ".#pragma acc routine. not immediately followed by function declaration or definition" } */
struct d_2 {} d_2;
+/* PR c++/101731 */
+/* Regarding the current C/C++ difference, see
+ <http://mid.mail-archive.com/20211122150231.GP2646553@tucnak>. */
+#pragma acc routine /* { dg-error "not immediately followed by a single function declaration or definition" "" { target c++ } } */
+int pr101731_foo (int pr101731_bar ());
+#pragma acc routine (pr101731_foo) vector /* { dg-error "has already been marked with an OpenACC 'routine' directive" "" { target c } } */
+#pragma acc routine (pr101731_bar) vector /* { dg-error "'pr101731_bar' has not been declared" } */
+
#pragma acc routine /* { dg-error ".#pragma acc routine. not immediately followed by function declaration or definition" } */
#pragma acc routine
int fn4 (void);
diff --git a/gcc/testsuite/c-c++-common/goacc/uninit-dim-clause.c b/gcc/testsuite/c-c++-common/goacc/uninit-dim-clause.c
index d9b143b..8368ccd 100644
--- a/gcc/testsuite/c-c++-common/goacc/uninit-dim-clause.c
+++ b/gcc/testsuite/c-c++-common/goacc/uninit-dim-clause.c
@@ -6,6 +6,9 @@
void acc_parallel()
{
int i, j, k;
+ /* { dg-note {'i' was declared here} {} { target *-*-* } .-1 } */
+ /* { dg-note {'j' was declared here} {} { target *-*-* } .-2 } */
+ /* { dg-note {'k' was declared here} {} { target *-*-* } .-3 } */
#pragma acc parallel num_gangs(i) /* { dg-warning "is used uninitialized" } */
/* { dg-warning "region is gang partitioned but does not contain gang partitioned code" "" { target *-*-* } .-1 } */
@@ -23,6 +26,9 @@ void acc_parallel()
void acc_kernels()
{
int i, j, k;
+ /* { dg-note {'i' was declared here} {} { target *-*-* } .-1 } */
+ /* { dg-note {'j' was declared here} {} { target *-*-* } .-2 } */
+ /* { dg-note {'k' was declared here} {} { target *-*-* } .-3 } */
#pragma acc kernels num_gangs(i) /* { dg-warning "is used uninitialized" } */
;
diff --git a/gcc/testsuite/c-c++-common/goacc/uninit-firstprivate-clause.c b/gcc/testsuite/c-c++-common/goacc/uninit-firstprivate-clause.c
index 334567d..bfe1a11 100644
--- a/gcc/testsuite/c-c++-common/goacc/uninit-firstprivate-clause.c
+++ b/gcc/testsuite/c-c++-common/goacc/uninit-firstprivate-clause.c
@@ -17,6 +17,7 @@ void
foo2 (void)
{
int i;
+ /* { dg-note {'i' was declared here} {} { target *-*-* } .-1 } */
#pragma acc parallel firstprivate (i) /* { dg-warning "is used uninitialized" } */
{
diff --git a/gcc/testsuite/c-c++-common/goacc/uninit-if-clause.c b/gcc/testsuite/c-c++-common/goacc/uninit-if-clause.c
index 683ac1b..de410e5 100644
--- a/gcc/testsuite/c-c++-common/goacc/uninit-if-clause.c
+++ b/gcc/testsuite/c-c++-common/goacc/uninit-if-clause.c
@@ -7,7 +7,15 @@ int
main (void)
{
int l, l2, l3, l4;
+ /* { dg-note {'l' was declared here} {} { target *-*-* } .-1 } */
+ /* { dg-note {'l2' was declared here} {} { target *-*-* } .-2 } */
+ /* { dg-note {'l3' was declared here} {} { target *-*-* } .-3 } */
+ /* { dg-note {'l4' was declared here} {} { target *-*-* } .-4 } */
bool b, b2, b3, b4;
+ /* { dg-note {'b' was declared here} {} { target *-*-* } .-1 } */
+ /* { dg-note {'b2' was declared here} {} { target *-*-* } .-2 } */
+ /* { dg-note {'b3' was declared here} {} { target *-*-* } .-3 } */
+ /* { dg-note {'b4' was declared here} {} { target *-*-* } .-4 } */
int i, i2;
#pragma acc parallel if(l) /* { dg-warning "is used uninitialized" } */
diff --git a/gcc/testsuite/c-c++-common/gomp/clauses-1.c b/gcc/testsuite/c-c++-common/gomp/clauses-1.c
index 742132f..71ca41c 100644
--- a/gcc/testsuite/c-c++-common/gomp/clauses-1.c
+++ b/gcc/testsuite/c-c++-common/gomp/clauses-1.c
@@ -102,7 +102,7 @@ baz (int d, int m, int i1, int i2, int p, int *idp, int s,
}
void
-bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
+bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int hda, int s,
int nte, int tl, int nth, int g, int nta, int fi, int pp, int *q, int *dd, int ntm)
{
#pragma omp for simd \
@@ -138,20 +138,20 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
#pragma omp target parallel \
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \
if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) \
- nowait depend(inout: dd[0]) allocate (omp_default_mem_alloc:f) in_reduction(+:r2)
+ nowait depend(inout: dd[0]) allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr(hda)
;
#pragma omp target parallel for \
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \
if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) \
lastprivate (l) linear (ll:1) ordered schedule(static, 4) collapse(1) nowait depend(inout: dd[0]) \
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2)
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr(hda)
for (int i = 0; i < 64; i++)
ll++;
#pragma omp target parallel for \
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \
if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) \
lastprivate (l) linear (ll:1) schedule(static, 4) collapse(1) nowait depend(inout: dd[0]) order(concurrent) \
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2)
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr(hda)
for (int i = 0; i < 64; i++)
ll++;
#pragma omp target parallel for simd \
@@ -159,27 +159,28 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) \
lastprivate (l) linear (ll:1) schedule(static, 4) collapse(1) \
safelen(8) simdlen(4) aligned(q: 32) nowait depend(inout: dd[0]) nontemporal(ntm) if (simd: i3) order(concurrent) \
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2)
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr(hda)
for (int i = 0; i < 64; i++)
ll++;
#pragma omp target teams \
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \
- shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) nowait depend(inout: dd[0]) \
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2)
+ shared(s) default(shared) reduction(+:r) num_teams(nte - 1:nte) thread_limit(tl) nowait depend(inout: dd[0]) \
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr(hda)
;
#pragma omp target teams distribute \
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \
shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) order(concurrent) \
- collapse(1) dist_schedule(static, 16) nowait depend(inout: dd[0]) allocate (omp_default_mem_alloc:f) in_reduction(+:r2)
+ collapse(1) dist_schedule(static, 16) nowait depend(inout: dd[0]) allocate (omp_default_mem_alloc:f) in_reduction(+:r2) \
+ has_device_addr(hda)
for (int i = 0; i < 64; i++)
;
#pragma omp target teams distribute parallel for \
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \
- shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) \
+ shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) \
collapse(1) dist_schedule(static, 16) \
if (parallel: i2) num_threads (nth) proc_bind(spread) \
lastprivate (l) schedule(static, 4) nowait depend(inout: dd[0]) order(concurrent) \
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2)
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr(hda)
for (int i = 0; i < 64; i++)
ll++;
#pragma omp target teams distribute parallel for simd \
@@ -189,22 +190,22 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
if (parallel: i2) num_threads (nth) proc_bind(spread) \
lastprivate (l) schedule(static, 4) order(concurrent) \
safelen(8) simdlen(4) aligned(q: 32) nowait depend(inout: dd[0]) nontemporal(ntm) if (simd: i3) \
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2)
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr(hda)
for (int i = 0; i < 64; i++)
ll++;
#pragma omp target teams distribute simd \
device(d) map (tofrom: m) if (i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \
- shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) \
+ shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) \
collapse(1) dist_schedule(static, 16) order(concurrent) \
safelen(8) simdlen(4) aligned(q: 32) nowait depend(inout: dd[0]) nontemporal(ntm) \
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2)
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr(hda)
for (int i = 0; i < 64; i++)
ll++;
#pragma omp target simd \
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \
safelen(8) simdlen(4) lastprivate (l) linear(ll: 1) aligned(q: 32) reduction(+:r) \
nowait depend(inout: dd[0]) nontemporal(ntm) if(simd:i3) order(concurrent) \
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2)
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr(hda)
for (int i = 0; i < 64; i++)
ll++;
#pragma omp taskgroup task_reduction(+:r2) allocate (r2)
@@ -236,7 +237,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
;
#pragma omp target
#pragma omp teams distribute parallel for \
- private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) \
+ private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) \
collapse(1) dist_schedule(static, 16) \
if (parallel: i2) num_threads (nth) proc_bind(spread) \
lastprivate (l) schedule(static, 4) order(concurrent) allocate (omp_default_mem_alloc: f)
@@ -254,7 +255,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
ll++;
#pragma omp target
#pragma omp teams distribute simd \
- private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) \
+ private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) \
collapse(1) dist_schedule(static, 16) order(concurrent) \
safelen(8) simdlen(4) aligned(q: 32) if(i3) nontemporal(ntm) \
allocate (omp_default_mem_alloc: f)
@@ -268,7 +269,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
for (int i = 0; i < 64; i++)
ll++;
#pragma omp teams distribute parallel for \
- private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) \
+ private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) \
collapse(1) dist_schedule(static, 16) order(concurrent) \
if (parallel: i2) num_threads (nth) proc_bind(spread) \
lastprivate (l) schedule(static, 4) allocate (f)
@@ -284,7 +285,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
for (int i = 0; i < 64; i++)
ll++;
#pragma omp teams distribute parallel for simd \
- private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) \
+ private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) \
collapse(1) dist_schedule(static, 16) \
if (parallel: i2) num_threads (nth) proc_bind(spread) \
lastprivate (l) schedule(static, 4) order(concurrent) \
@@ -417,7 +418,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
for (l = 0; l < 64; l++)
ll++;
#pragma omp teams loop \
- private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) \
+ private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) \
collapse(1) lastprivate (l) bind(teams) allocate (f)
for (l = 0; l < 64; ++l)
;
@@ -430,28 +431,28 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \
if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) \
nowait depend(inout: dd[0]) lastprivate (l) bind(parallel) order(concurrent) collapse(1) \
- allocate (omp_default_mem_alloc: f) in_reduction(+:r2)
+ allocate (omp_default_mem_alloc: f) in_reduction(+:r2) has_device_addr(hda)
for (l = 0; l < 64; ++l)
;
#pragma omp target parallel loop \
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \
if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) \
nowait depend(inout: dd[0]) lastprivate (l) order(concurrent) collapse(1) \
- allocate (omp_default_mem_alloc: f) in_reduction(+:r2)
+ allocate (omp_default_mem_alloc: f) in_reduction(+:r2) has_device_addr(hda)
for (l = 0; l < 64; ++l)
;
#pragma omp target teams loop \
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \
- shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) nowait depend(inout: dd[0]) \
+ shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) nowait depend(inout: dd[0]) \
lastprivate (l) bind(teams) collapse(1) \
- allocate (omp_default_mem_alloc: f) in_reduction(+:r2)
+ allocate (omp_default_mem_alloc: f) in_reduction(+:r2) has_device_addr(hda)
for (l = 0; l < 64; ++l)
;
#pragma omp target teams loop \
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \
shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) nowait depend(inout: dd[0]) \
lastprivate (l) order(concurrent) collapse(1) \
- allocate (omp_default_mem_alloc: f) in_reduction(+:r2)
+ allocate (omp_default_mem_alloc: f) in_reduction(+:r2) has_device_addr(hda)
for (l = 0; l < 64; ++l)
;
}
diff --git a/gcc/testsuite/c-c++-common/gomp/loop-10.c b/gcc/testsuite/c-c++-common/gomp/loop-10.c
new file mode 100644
index 0000000..1229e61
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/loop-10.c
@@ -0,0 +1,35 @@
+int a, b;
+#pragma omp threadprivate (a, b)
+
+void
+foo (void)
+{
+ #pragma omp for /* { dg-error "threadprivate iteration variable 'a'" } */
+ for (a = 0; a < 32; a++)
+ ;
+ #pragma omp parallel for collapse(2) /* { dg-error "threadprivate iteration variable 'a'" "" { target c } } */
+ for (a = 0; a < 32; a++) /* { dg-error "threadprivate iteration variable 'b'" "" { target c } .-1 } */
+ for (b = 0; b < 32; b++) /* { dg-error "threadprivate iteration variable 'a'" "" { target c++ } .-1 } */
+ ; /* { dg-error "threadprivate iteration variable 'b'" "" { target c++ } .-2 } */
+ #pragma omp simd /* { dg-error "threadprivate iteration variable 'a'" } */
+ for (a = 0; a < 32; a++)
+ ;
+ #pragma omp taskloop /* { dg-error "threadprivate iteration variable 'a'" } */
+ for (a = 0; a < 32; a++)
+ ;
+ #pragma omp loop bind(thread) /* { dg-error "threadprivate iteration variable 'a'" } */
+ for (a = 0; a < 32; a++)
+ ;
+}
+
+void
+bar (void)
+{
+ #pragma omp distribute collapse(2) /* { dg-error "threadprivate iteration variable 'a'" } */
+ for (a = 0; a < 32; a++) /* { dg-error "threadprivate iteration variable 'b'" "" { target *-*-* } .-1 } */
+ for (b = 0; b < a; b++)
+ ;
+ #pragma omp distribute parallel for simd /* { dg-error "threadprivate iteration variable 'a'" "" { target c } } */
+ for (a = 0; a < 32; a++) /* { dg-error "threadprivate iteration variable 'a'" "" { target c++ } } */
+ ;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/loop-11.c b/gcc/testsuite/c-c++-common/gomp/loop-11.c
new file mode 100644
index 0000000..5076e65
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/loop-11.c
@@ -0,0 +1,5 @@
+/* PR tree-optimization/103208 */
+/* { dg-do compile } */
+/* { dg-additional-options "-O2 -fwrapv" } */
+
+#include "loop-8.c"
diff --git a/gcc/testsuite/c-c++-common/gomp/num-teams-1.c b/gcc/testsuite/c-c++-common/gomp/num-teams-1.c
new file mode 100644
index 0000000..50cad85
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/num-teams-1.c
@@ -0,0 +1,48 @@
+int fn (int);
+
+void
+foo (void)
+{
+ #pragma omp teams num_teams (4 : 6)
+ ;
+ #pragma omp teams num_teams (7)
+ ;
+}
+
+void
+bar (void)
+{
+ #pragma omp target teams num_teams (5 : 19)
+ ;
+ #pragma omp target teams num_teams (21)
+ ;
+}
+
+void
+baz (void)
+{
+ #pragma omp teams num_teams (fn (1) : fn (2))
+ ;
+ #pragma omp teams num_teams (fn (3))
+ ;
+}
+
+void
+qux (void)
+{
+ #pragma omp target teams num_teams (fn (4) : fn (5))
+ ;
+ #pragma omp target teams num_teams (fn (6))
+ ;
+}
+
+void
+corge (void)
+{
+ #pragma omp target
+ #pragma omp teams num_teams (fn (7) : fn (8))
+ ;
+ #pragma omp target
+ #pragma omp teams num_teams (fn (9))
+ ;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/num-teams-2.c b/gcc/testsuite/c-c++-common/gomp/num-teams-2.c
new file mode 100644
index 0000000..242b994
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/num-teams-2.c
@@ -0,0 +1,27 @@
+int fn (int);
+
+void
+foo (int i)
+{
+ #pragma omp teams num_teams (6 : 4) /* { dg-warning "'num_teams' lower bound '6' bigger than upper bound '4'" } */
+ ;
+ #pragma omp teams num_teams (-7) /* { dg-warning "'num_teams' value must be positive" } */
+ ;
+ #pragma omp teams num_teams (i : -7) /* { dg-warning "'num_teams' value must be positive" } */
+ ;
+ #pragma omp teams num_teams (-7 : 8) /* { dg-warning "'num_teams' value must be positive" } */
+ ;
+}
+
+void
+bar (int i)
+{
+ #pragma omp target teams num_teams (6 : 4) /* { dg-warning "'num_teams' lower bound '6' bigger than upper bound '4'" } */
+ ;
+ #pragma omp target teams num_teams (-7) /* { dg-warning "'num_teams' value must be positive" } */
+ ;
+ #pragma omp target teams num_teams (i : -7) /* { dg-warning "'num_teams' value must be positive" } */
+ ;
+ #pragma omp target teams num_teams (-7 : 8) /* { dg-warning "'num_teams' value must be positive" } */
+ ;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr102431.c b/gcc/testsuite/c-c++-common/gomp/pr102431.c
new file mode 100644
index 0000000..bf4f3cb
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr102431.c
@@ -0,0 +1,16 @@
+/* PR middle-end/102431 */
+
+struct S { int s; } s;
+void add (struct S *, struct S *);
+void init (struct S *);
+void bar (int i, struct S *);
+#pragma omp declare reduction (+:struct S:add (&omp_out, &omp_in)) initializer (init (&omp_priv))
+
+void
+foo (void)
+{
+ int i;
+ #pragma omp loop bind(teams) reduction(+:s)
+ for (i = 0; i < 8; i++)
+ bar (i, &s);
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr102432.c b/gcc/testsuite/c-c++-common/gomp/pr102432.c
new file mode 100644
index 0000000..89b0f6d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr102432.c
@@ -0,0 +1,23 @@
+/* PR preprocessor/102432 */
+
+#define loop(x)
+
+void
+foo (void)
+{
+ int i;
+#pragma omp parallel
+#pragma omp loop
+ for (i = 0; i < 64; i++)
+ ;
+}
+
+void
+bar (void)
+{
+ int i;
+ _Pragma ("omp parallel")
+ _Pragma ("omp loop")
+ for (i = 0; i < 64; i++)
+ ;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr103642.c b/gcc/testsuite/c-c++-common/gomp/pr103642.c
new file mode 100644
index 0000000..bbd0896
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr103642.c
@@ -0,0 +1,34 @@
+/* PR middle-end/103642 */
+/* { dg-do compile } */
+
+#include <stdlib.h>
+
+typedef struct
+{
+ int *a;
+} S;
+
+typedef struct
+{
+ S *s;
+ int *ptr;
+} T;
+
+#define N 10
+
+int main (void)
+{
+ T t;
+ t.s = (S *) malloc (sizeof (S));
+ t.s->a = (int *) malloc (sizeof(int) * N);
+
+ #pragma omp target map(from: t.s->a[:N])
+ {
+ t.s->a[0] = 1;
+ }
+
+ free (t.s->a);
+ free (t.s);
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr103705.c b/gcc/testsuite/c-c++-common/gomp/pr103705.c
new file mode 100644
index 0000000..bf4c706
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr103705.c
@@ -0,0 +1,14 @@
+/* PR c++/103705 */
+/* { dg-do compile } */
+
+struct S
+{
+ int a[2];
+};
+
+int main (void)
+{
+ struct S s[1];
+ #pragma omp target update from(s[0].a[0:1])
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pragma-1.c b/gcc/testsuite/c-c++-common/gomp/pragma-1.c
new file mode 100644
index 0000000..e330f17
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pragma-1.c
@@ -0,0 +1,50 @@
+/* { dg-additional-options "-fdump-tree-original" } */
+/* PR c++/51484 */
+
+#define TEST(T) { \
+ int fail = 0, trial; \
+ for (int trial = 0; trial < TRIALS && fail == 0; trial++) { \
+ _Pragma("omp target teams num_teams(1) thread_limit(1024)") \
+ {T} \
+ } \
+}
+
+#define TRIALS (1)
+#define N (1024*3)
+
+int main(void) {
+
+ double C[N], D[N];
+ double S[N];
+ double p[2];
+ int i;
+ for (i = 0; i < N; i++)
+ {C[i] = 1; D[i] = i;}
+
+ int max_threads = 224;
+
+#define PARALLEL(X) TEST({ \
+_Pragma("omp parallel if(threads[0] > 1) num_threads(threads[0])") \
+{ \
+_Pragma("omp for ordered") \
+ X \
+_Pragma("omp for schedule(auto) ordered") \
+ X \
+} \
+})
+
+ for (int t = 0; t <= max_threads; t += max_threads) {
+ int threads[1]; threads[0] = t;
+ S[0] = 0;
+ PARALLEL(
+ for (int i = 0; i < N; i++) { \
+ _Pragma("omp ordered") \
+ S[0] += C[i] + D[i]; \
+ })
+ }
+ return 0;
+}
+
+/* On expansion, the _Pragma were wrongly placed, ensure the order is now correct: */
+/* { dg-final { scan-tree-dump "#pragma omp target.*#pragma omp teams num_teams\\(1\\) thread_limit\\(1024\\).*#pragma omp parallel num_threads\\(threads\\\[0\\\]\\) if\\(threads\\\[0\\\] > 1\\).*#pragma omp for ordered.*#pragma omp ordered.*#pragma omp for ordered schedule\\(auto\\).*#pragma omp ordered" "original" } } */
+
diff --git a/gcc/testsuite/c-c++-common/gomp/pragma-2.c b/gcc/testsuite/c-c++-common/gomp/pragma-2.c
new file mode 100644
index 0000000..5358f87
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pragma-2.c
@@ -0,0 +1,50 @@
+/* { dg-additional-options "-fdump-tree-original -save-temps" } */
+/* PR c++/51484 */
+
+#define TEST(T) { \
+ int fail = 0, trial; \
+ for (int trial = 0; trial < TRIALS && fail == 0; trial++) { \
+ _Pragma("omp target teams num_teams(1) thread_limit(1024)") \
+ {T} \
+ } \
+}
+
+#define TRIALS (1)
+#define N (1024*3)
+
+int main(void) {
+
+ double C[N], D[N];
+ double S[N];
+ double p[2];
+ int i;
+ for (i = 0; i < N; i++)
+ {C[i] = 1; D[i] = i;}
+
+ int max_threads = 224;
+
+#define PARALLEL(X) TEST({ \
+_Pragma("omp parallel if(threads[0] > 1) num_threads(threads[0])") \
+{ \
+_Pragma("omp for ordered") \
+ X \
+_Pragma("omp for schedule(auto) ordered") \
+ X \
+} \
+})
+
+ for (int t = 0; t <= max_threads; t += max_threads) {
+ int threads[1]; threads[0] = t;
+ S[0] = 0;
+ PARALLEL(
+ for (int i = 0; i < N; i++) { \
+ _Pragma("omp ordered") \
+ S[0] += C[i] + D[i]; \
+ })
+ }
+ return 0;
+}
+
+/* On expansion, the _Pragma were wrongly placed, ensure the order is now correct: */
+/* { dg-final { scan-tree-dump "#pragma omp target.*#pragma omp teams num_teams\\(1\\) thread_limit\\(1024\\).*#pragma omp parallel num_threads\\(threads\\\[0\\\]\\) if\\(threads\\\[0\\\] > 1\\).*#pragma omp for ordered.*#pragma omp ordered.*#pragma omp for ordered schedule\\(auto\\).*#pragma omp ordered" "original" } } */
+
diff --git a/gcc/testsuite/c-c++-common/gomp/pragma-3.c b/gcc/testsuite/c-c++-common/gomp/pragma-3.c
new file mode 100644
index 0000000..c1dee1b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pragma-3.c
@@ -0,0 +1,20 @@
+/* { dg-additional-options "-fdump-tree-original" } */
+/* PR preprocessor/103165 */
+
+#define inner(...) #__VA_ARGS__ ; _Pragma("omp error severity(warning) message (\"Test\") at(compilation)")
+#define outer(...) inner(__VA_ARGS__)
+
+void
+f (void)
+{
+ const char *str = outer(inner(1,2)); /* { dg-warning "'pragma omp error' encountered: Test" } */
+}
+
+#if 0
+After preprocessing, the expected result are the following three lines:
+ const char *str = "\"1,2\" ; _Pragma(\"omp error severity(warning) message (\\\"Test\\\") at(compilation)\")" ;
+#pragma omp error severity(warning) message ("Test") at(compilation)
+ ;
+#endif
+
+/* { dg-final { scan-tree-dump "const char \\* str = \\(const char \\*\\) \"\\\\\"1,2\\\\\" ; _Pragma\\(\\\\\"omp error severity\\(warning\\) message \\(\\\\\\\\\\\\\"Test\\\\\\\\\\\\\"\\) at\\(compilation\\)\\\\\"\\)\";" "original" } } */
diff --git a/gcc/testsuite/c-c++-common/gomp/pragma-4.c b/gcc/testsuite/c-c++-common/gomp/pragma-4.c
new file mode 100644
index 0000000..419c4ac
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pragma-4.c
@@ -0,0 +1,20 @@
+/* { dg-additional-options "-fdump-tree-original -save-temps" } */
+/* PR preprocessor/103165 */
+
+#define inner(...) #__VA_ARGS__ ; _Pragma("omp error severity(warning) message (\"Test\") at(compilation)")
+#define outer(...) inner(__VA_ARGS__)
+
+void
+f (void)
+{
+ const char *str = outer(inner(1,2)); /* { dg-warning "'pragma omp error' encountered: Test" } */
+}
+
+#if 0
+After preprocessing, the expected result are the following three lines:
+ const char *str = "\"1,2\" ; _Pragma(\"omp error severity(warning) message (\\\"Test\\\") at(compilation)\")" ;
+#pragma omp error severity(warning) message ("Test") at(compilation)
+ ;
+#endif
+
+/* { dg-final { scan-tree-dump "const char \\* str = \\(const char \\*\\) \"\\\\\"1,2\\\\\" ; _Pragma\\(\\\\\"omp error severity\\(warning\\) message \\(\\\\\\\\\\\\\"Test\\\\\\\\\\\\\"\\) at\\(compilation\\)\\\\\"\\)\";" "original" } } */
diff --git a/gcc/testsuite/c-c++-common/gomp/pragma-5.c b/gcc/testsuite/c-c++-common/gomp/pragma-5.c
new file mode 100644
index 0000000..af54b68
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pragma-5.c
@@ -0,0 +1,20 @@
+/* { dg-additional-options "-fdump-tree-original" } */
+/* PR preprocessor/103165 */
+
+#define inner(...) #__VA_ARGS__ ; _Pragma ( " omp error severity (warning) message (\"Test\") at(compilation)" )
+#define outer(...) inner(__VA_ARGS__)
+
+void
+f (void)
+{
+ const char *str = outer(inner(1,2)); /* { dg-warning "'pragma omp error' encountered: Test" } */
+}
+
+#if 0
+After preprocessing, the expected result are the following three lines:
+ const char *str = "\"1,2\" ; _Pragma ( \" omp error severity (warning) message (\\\"Test\\\") at(compilation)\" )" ;
+#pragma omp error severity(warning) message ("Test") at(compilation)
+ ;
+#endif
+
+/* { dg-final { scan-tree-dump "const char \\* str = \\(const char \\*\\) \"\\\\\"1,2\\\\\" ; _Pragma \\( \\\\\" omp\\\\t\\\\terror severity \\(warning\\)\\\\tmessage \\(\\\\\\\\\\\\\"Test\\\\\\\\\\\\\"\\) at\\(compilation\\)\\\\\" \\)\";" "original" } } */
diff --git a/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-3.c b/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-3.c
index 5e3a478..ea6e5a0 100644
--- a/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-3.c
+++ b/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-3.c
@@ -3,6 +3,7 @@ extern "C" {
#endif
int omp_get_num_teams (void);
+int bar (void);
#ifdef __cplusplus
}
@@ -22,6 +23,7 @@ foo (void)
#pragma omp target device (ancestor: 1)
{
+ a = bar (); /* OK */
a = omp_get_num_teams (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_num_teams\[^\n\r]*' in a region with 'device\\(ancestor\\)' clause" } */
}
diff --git a/gcc/testsuite/c-c++-common/gomp/target-enter-data-1.c b/gcc/testsuite/c-c++-common/gomp/target-enter-data-1.c
new file mode 100644
index 0000000..ce766d2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/target-enter-data-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fopenmp -fdump-tree-gimple" } */
+
+struct bar
+{
+ int num_vectors;
+ double *vectors;
+};
+
+struct foo
+{
+ int num_vectors;
+ struct bar *bars;
+ double **vectors;
+};
+
+void func (struct foo *f, int n, int m)
+{
+ #pragma omp target enter data map (to: f->vectors[m][:n])
+ #pragma omp target enter data map (to: f->bars[n].vectors[:m])
+ #pragma omp target enter data map (to: f->bars[n].vectors[:f->bars[n].num_vectors])
+}
+
+/* { dg-final { scan-tree-dump-times "map\\(to:\\*_\[0-9\]+ \\\[len: _\[0-9\]+\\\]\\) map\\(attach:\[^-\]+->vectors \\\[bias: \[^\]\]+\\\]\\)" 3 "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/gomp/target-has-device-addr-1.c b/gcc/testsuite/c-c++-common/gomp/target-has-device-addr-1.c
new file mode 100644
index 0000000..ebf55ee
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/target-has-device-addr-1.c
@@ -0,0 +1,65 @@
+/* { dg-do compile } */
+
+void
+foo ()
+{
+ int * x;
+ #pragma omp target is_device_ptr(x) has_device_addr(x) /*{ dg-error "'x' appears more than once in data clauses" } */
+ ;
+ #pragma omp target has_device_addr(x) is_device_ptr(x) /* { dg-error "'x' appears more than once in data clauses" } */
+ ;
+
+ int y = 42;
+ #pragma omp target has_device_addr(y) has_device_addr(y) /* { dg-error "'y' appears more than once in data clauses" } */
+ ;
+
+ #pragma omp target private(y) has_device_addr(y) /*{ dg-error "'y' appears more than once in data clauses" } */
+ ;
+ #pragma omp target has_device_addr(y) private(y) /*{ dg-error "'y' appears more than once in data clauses" } */
+ ;
+ #pragma omp target firstprivate(y) has_device_addr(y) /*{ dg-error "'y' appears more than once in data clauses" } */
+ ;
+
+ #pragma omp target has_device_addr(y) map(y) /* { dg-error "'y' appears both in data and map clauses" } */
+ ;
+ #pragma omp target map(y) has_device_addr(y) /* { dg-error "'y' appears both in data and map clauses" } */
+ ;
+
+ int z[3] = { 2, 5, 7 };
+ #pragma omp target data map(z[:3]) use_device_addr(z)
+ #pragma omp target has_device_addr(z[1:])
+ ;
+
+ #pragma omp target data map(z[:3]) use_device_addr(z)
+ #pragma omp target has_device_addr(z[1])
+ ;
+
+ #pragma omp target data map(z[:3]) use_device_addr(z)
+ #pragma omp target has_device_addr(z[1:2])
+ ;
+
+ #pragma omp target data map(z[:3]) use_device_addr(z)
+ #pragma omp target has_device_addr(z[:2])
+ ;
+
+ int w[3][4];
+ #pragma omp target data map(w) use_device_addr(w)
+ #pragma omp target has_device_addr(w[1][2])
+ ;
+
+ #pragma omp target data map(w) use_device_addr(w)
+ #pragma omp target has_device_addr(w[:1][2:])
+ ;
+
+ int u[0];
+ #pragma omp target data map(u) use_device_addr(u)
+ #pragma omp target has_device_addr(u)
+ ;
+
+ struct S { int m; } s;
+ s.m = 42;
+ #pragma omp target data map (s) use_device_addr (s)
+ #pragma omp target has_device_addr (s)
+ ++s.m;
+
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/target-has-device-addr-2.c b/gcc/testsuite/c-c++-common/gomp/target-has-device-addr-2.c
new file mode 100644
index 0000000..7378416
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/target-has-device-addr-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp -fdump-tree-gimple" } */
+
+void
+foo ()
+{
+ int x, y;
+
+ #pragma omp target data map(x, y) use_device_addr(x, y)
+ #pragma omp target has_device_addr(x, y)
+ {
+ x = 42;
+ }
+}
+
+/* { dg-final { scan-tree-dump "has_device_addr\\(x\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump-not "has_device_addr\\(y\\)" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/gomp/target-implicit-map-1.c b/gcc/testsuite/c-c++-common/gomp/target-implicit-map-1.c
new file mode 100644
index 0000000..52944fd
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/target-implicit-map-1.c
@@ -0,0 +1,39 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fdump-tree-gimple" } */
+#ifdef __cplusplus
+extern "C"
+#else
+extern
+#endif
+void abort (void);
+
+int
+main (void)
+{
+ #define N 5
+ int array[N][N];
+
+ for (int i = 0; i < N; i++)
+ {
+ #pragma omp target enter data map(alloc: array[i:1][0:N])
+
+ #pragma omp target
+ for (int j = 0; j < N; j++)
+ array[i][j] = i * 10 + j;
+
+ #pragma omp target exit data map(from: array[i:1][0:N])
+ }
+
+ for (int i = 0; i < N; i++)
+ for (int j = 0; j < N; j++)
+ if (array[i][j] != i + j)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump {#pragma omp target enter data map\(alloc:array\[[^]]+\]\[0\] \[len: [0-9]+\]\)} "gimple" } } */
+
+/* { dg-final { scan-tree-dump {#pragma omp target num_teams.* firstprivate\(i\) map\(tofrom:array \[len: [0-9]+\]\[implicit\]\)} "gimple" } } */
+
+/* { dg-final { scan-tree-dump {#pragma omp target exit data map\(from:array\[[^]]+\]\[0\] \[len: [0-9]+\]\)} "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/gomp/target-implicit-map-2.c b/gcc/testsuite/c-c++-common/gomp/target-implicit-map-2.c
new file mode 100644
index 0000000..3aa1a8f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/target-implicit-map-2.c
@@ -0,0 +1,52 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fdump-tree-gimple" } */
+#include <stdlib.h>
+
+#define N 10
+
+struct S
+{
+ int a, b;
+ int *ptr;
+ int c, d;
+};
+
+int
+main (void)
+{
+ struct S a;
+ a.ptr = (int *) malloc (sizeof (int) * N);
+
+ for (int i = 0; i < N; i++)
+ a.ptr[i] = 0;
+
+ #pragma omp target enter data map(to: a.ptr, a.ptr[:N])
+
+ #pragma omp target
+ for (int i = 0; i < N; i++)
+ a.ptr[i] += 1;
+
+ #pragma omp target update from(a.ptr[:N])
+
+ for (int i = 0; i < N; i++)
+ if (a.ptr[i] != 1)
+ abort ();
+
+ #pragma omp target map(a.ptr[:N])
+ for (int i = 0; i < N; i++)
+ a.ptr[i] += 1;
+
+ #pragma omp target update from(a.ptr[:N])
+
+ for (int i = 0; i < N; i++)
+ if (a.ptr[i] != 2)
+ abort ();
+
+ #pragma omp target exit data map(from:a.ptr, a.ptr[:N])
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump {#pragma omp target num_teams.* map\(tofrom:a \[len: [0-9]+\]\[implicit\]\)} "gimple" } } */
+
+/* { dg-final { scan-tree-dump {#pragma omp target num_teams.* map\(tofrom:a \[len: [0-9]+\]\[implicit\]\) map\(tofrom:\*_[0-9]+ \[len: [0-9]+\]\) map\(attach:a\.ptr \[bias: 0\]\)} "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/gomp/target-is-device-ptr-1.c b/gcc/testsuite/c-c++-common/gomp/target-is-device-ptr-1.c
new file mode 100644
index 0000000..ecf30ca
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/target-is-device-ptr-1.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+
+void
+foo ()
+{
+ int *x;
+
+ #pragma omp target is_device_ptr(x) is_device_ptr(x) /* { dg-error "'x' appears more than once in data clauses" } */
+ ;
+
+ #pragma omp target private(x) is_device_ptr(x) /*{ dg-error "'x' appears more than once in data clauses" } */
+ ;
+ #pragma omp target is_device_ptr(x) private(x) /*{ dg-error "'x' appears more than once in data clauses" } */
+ ;
+ #pragma omp target firstprivate(x) is_device_ptr(x) /*{ dg-error "'x' appears more than once in data clauses" } */
+ ;
+
+ #pragma omp target is_device_ptr(x) map(x) /* { dg-error "'x' appears both in data and map clauses" } */
+ ;
+ #pragma omp target map(x) is_device_ptr(x) /* { dg-error "'x' appears both in data and map clauses" } */
+ ;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/target-is-device-ptr-2.c b/gcc/testsuite/c-c++-common/gomp/target-is-device-ptr-2.c
new file mode 100644
index 0000000..df743dd
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/target-is-device-ptr-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp -fdump-tree-gimple" } */
+
+void
+foo ()
+{
+ int *x, *y;
+
+ #pragma omp target data map(x, y) use_device_ptr(x, y)
+ #pragma omp target is_device_ptr(x, y)
+ {
+ *x = 42;
+ }
+}
+
+/* { dg-final { scan-tree-dump "is_device_ptr\\(x\\)" "gimple" } } */
+/* { dg-final { scan-tree-dump-not "is_device_ptr\\(y\\)" "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/gomp/teams-3.c b/gcc/testsuite/c-c++-common/gomp/teams-3.c
new file mode 100644
index 0000000..7f8b47f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/teams-3.c
@@ -0,0 +1,64 @@
+/* PR middle-end/102972 */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* From omp.h */
+extern int omp_get_num_teams (void);
+extern void omp_set_num_teams (int);
+extern int omp_get_team_size (int);
+extern int omp_get_team_num (void);
+extern int omp_get_max_teams (void);
+extern void omp_set_teams_thread_limit (int);
+extern int omp_get_teams_thread_limit (void);
+extern int omp_is_initial_device (void);
+extern int omp_get_num_threads (void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+void valid ()
+{
+ #pragma omp teams
+ {
+ #pragma omp distribute
+ for (int i = 0; i < 64; i++)
+ ;
+
+ int n = omp_get_num_teams ();
+ if (n >= omp_get_team_num ())
+ __builtin_abort ();
+
+ #pragma omp parallel for
+ for (int i = 0; i < 64; i++)
+ if (!omp_is_initial_device () || omp_get_num_threads () < 0)
+ __builtin_abort ();
+
+ #pragma omp loop
+ for (int i = 0; i < 64; i++)
+ ;
+ }
+}
+
+void invalid_nest ()
+{
+ #pragma omp teams
+ {
+ #pragma distribute parallel for simd
+ for (int i = 0; i < 64; i++)
+ ;
+
+ int n = 0;
+ n += omp_get_team_size (0); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_team_size\[^\n\r]*' strictly nested in a 'teams' region" } */
+ n += omp_get_num_teams ();
+ n += omp_get_team_num ();
+ omp_set_num_teams (n); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_set_num_teams\[^\n\r]*' strictly nested in a 'teams' region" } */
+ n += omp_get_max_teams (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_max_teams\[^\n\r]*' strictly nested in a 'teams' region" } */
+ n += omp_get_teams_thread_limit (); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_teams_thread_limit\[^\n\r]*' strictly nested in a 'teams' region" } */
+ omp_set_teams_thread_limit (n); /* { dg-error "OpenMP runtime API call '\[^\n\r]*omp_set_teams_thread_limit\[^\n\r]*' strictly nested in a 'teams' region" } */
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/pr101537.c b/gcc/testsuite/c-c++-common/pr101537.c
new file mode 100644
index 0000000..c0c3cfc
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr101537.c
@@ -0,0 +1,26 @@
+/* PR c/101537 */
+/* { dg-do compile } */
+/* { dg-options "-Wconversion" } */
+
+int
+foo ()
+{
+ int aaa = 1;
+ unsigned char bbb = 0;
+ bbb |= aaa ? 1 : 0;
+ return bbb;
+}
+
+int
+bar (unsigned char x, int f)
+{
+ x |= f ? 1 : 0;
+ return x;
+}
+
+int
+baz (unsigned char x, int f)
+{
+ x = x | f ? 1 : 0;
+ return x;
+}
diff --git a/gcc/testsuite/c-c++-common/pr102281.c b/gcc/testsuite/c-c++-common/pr102281.c
new file mode 100644
index 0000000..a961451
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr102281.c
@@ -0,0 +1,17 @@
+/* PR102281 */
+/* { dg-do compile } */
+/* { dg-options "-ftrivial-auto-var-init=zero -Wno-psabi" } */
+long long var1;
+float var2;
+typedef long long V __attribute__((__vector_size__(2 * sizeof(long long))));
+typedef float W __attribute__((__vector_size__(4 * sizeof(float))));
+
+V foo (void)
+{
+ return (V) {var1};
+}
+
+W bar (void)
+{
+ return (W) {var2};
+}
diff --git a/gcc/testsuite/c-c++-common/pr103881.c b/gcc/testsuite/c-c++-common/pr103881.c
new file mode 100644
index 0000000..bb3f53b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr103881.c
@@ -0,0 +1,20 @@
+/* PR c/103881 */
+/* { dg-do compile } */
+/* { dg-options "-Wconversion" } */
+
+unsigned char bar (void);
+
+void
+foo (void)
+{
+ unsigned char t = 0;
+ t |= bar ();
+ t |= bar () & bar (); /* { dg-bogus "conversion from 'int' to 'unsigned char' may change value" "" { xfail c++ } } */
+ t &= bar () & bar (); /* { dg-bogus "conversion from 'int' to 'unsigned char' may change value" "" { xfail c++ } } */
+ t = bar () & bar ();
+
+ unsigned char a = bar ();
+ t |= a & a;
+ t |= bar () & a; /* { dg-bogus "conversion from 'int' to 'unsigned char' may change value" "" { xfail c++ } } */
+ t |= a & bar (); /* { dg-bogus "conversion from 'int' to 'unsigned char' may change value" "" { xfail c++ } } */
+}
diff --git a/gcc/testsuite/c-c++-common/pr83059.c b/gcc/testsuite/c-c++-common/pr83059.c
index 44ff67c..795faa5 100644
--- a/gcc/testsuite/c-c++-common/pr83059.c
+++ b/gcc/testsuite/c-c++-common/pr83059.c
@@ -1,10 +1,13 @@
-/* PR c++/83059 */
+/* PR c++/83059 - ICE on invalid C++ code: in tree_to_uhwi, at tree.c:6633 */
/* { dg-do compile } */
void
foo (int *p, int *q, int *r)
{
__atomic_compare_exchange (p, q, r, 0, 0, -1); /* { dg-warning "invalid memory model argument 6" } */
- /* { dg-warning "unknown architecture specifi" "" { target *-*-* } .-1 } */
- /* { dg-warning "failure memory model cannot be stronger than success memory model" "" { target *-*-* } .-2 } */
}
+
+/* The test triggers several distinct instance of the warning. Prune
+ them out; they're not relevant to its main purpose -- to verify
+ there's no ICE.
+ { dg-prune-output "-Winvalid-memory-model" } */
diff --git a/gcc/testsuite/c-c++-common/tm/inline-asm.c b/gcc/testsuite/c-c++-common/tm/inline-asm.c
index 7389260..1762668 100644
--- a/gcc/testsuite/c-c++-common/tm/inline-asm.c
+++ b/gcc/testsuite/c-c++-common/tm/inline-asm.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fgnu-tm -O1" } */
+/* { dg-options "-fgnu-tm -O1 -fno-ipa-modref -fno-ipa-pure-const" } */
static inline void
inline_death ()
diff --git a/gcc/testsuite/c-c++-common/torture/builtin-clear-padding-4.c b/gcc/testsuite/c-c++-common/torture/builtin-clear-padding-4.c
index d24f3b5..9cb202f 100644
--- a/gcc/testsuite/c-c++-common/torture/builtin-clear-padding-4.c
+++ b/gcc/testsuite/c-c++-common/torture/builtin-clear-padding-4.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target alloca } */
+
/* PR libstdc++/88101 */
struct S { char a; short b; char c; };
diff --git a/gcc/testsuite/c-c++-common/torture/builtin-convertvector-2.c b/gcc/testsuite/c-c++-common/torture/builtin-convertvector-2.c
new file mode 100644
index 0000000..d88f6a7
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/builtin-convertvector-2.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* PR target/101529 */
+
+typedef unsigned char __attribute__((__vector_size__ (1))) W;
+typedef unsigned char __attribute__((__vector_size__ (8))) V;
+typedef unsigned short __attribute__((__vector_size__ (16))) U;
+
+unsigned short us;
+
+/* aarch64 used to miscompile foo to just return 0. */
+W
+foo (unsigned char uc)
+{
+ V v = __builtin_convertvector ((U){ } >= us, V);
+ return __builtin_shufflevector ((W){ }, v, 4) & uc;
+}
+
+int
+main (void)
+{
+ W x = foo (5);
+ if (x[0] != 5)
+ __builtin_abort();
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/torture/builtin-shufflevector-2.c b/gcc/testsuite/c-c++-common/torture/builtin-shufflevector-2.c
new file mode 100644
index 0000000..7c4999e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/builtin-shufflevector-2.c
@@ -0,0 +1,26 @@
+/* { dg-do run} */
+/* PR target/101529 */
+typedef unsigned char C;
+typedef unsigned char __attribute__((__vector_size__ (8))) V;
+typedef unsigned char __attribute__((__vector_size__ (32))) U;
+
+C c;
+
+/* aarch64 used to miscompile foo to just return a vector of 0s */
+V
+foo (V v)
+{
+ v |= __builtin_shufflevector (c * v, (U) (0 == (U){ }),
+ 0, 1, 8, 32, 8, 20, 36, 36);
+ return v;
+}
+
+int
+main (void)
+{
+ V v = foo ((V) { });
+ for (unsigned i = 0; i < sizeof (v); i++)
+ if (v[i] != (i >= 2 ? 0xff : 0))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/torture/builtin-shufflevector-3.c b/gcc/testsuite/c-c++-common/torture/builtin-shufflevector-3.c
new file mode 100644
index 0000000..6e8fb64
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/builtin-shufflevector-3.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-Wno-psabi" } */
+
+typedef int __attribute__((__vector_size__ (sizeof(int)*4))) V;
+
+int
+foo(V v, int i)
+{
+ return __builtin_shufflevector (v, v, 2, 3)[i];
+}
+
+int
+bar(V v, int i)
+{
+ return __builtin_shufflevector(v, v, 4)[0] & i;
+}
diff --git a/gcc/testsuite/c-c++-common/torture/harden-comp.c b/gcc/testsuite/c-c++-common/torture/harden-comp.c
new file mode 100644
index 0000000..1ee0b36
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/harden-comp.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-fharden-compares -fdump-tree-hardcmp -ffat-lto-objects" } */
+
+int
+f (int i, int j)
+{
+ return i < j;
+}
+
+/* { dg-final { scan-tree-dump-times "Splitting block" 1 "hardcmp" } } */
+/* { dg-final { scan-tree-dump-times "Adding reversed compare" 1 "hardcmp" } } */
+/* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "hardcmp" } } */
+/* { dg-final { scan-tree-dump-times "_\[0-9\]* = i_\[0-9\]*\[(\]D\[)\] < j_\[0-9\]*\[(\]D\[)\];" 1 "hardcmp" } } */
+/* { dg-final { scan-tree-dump-times "_\[0-9\]* = i_\[0-9\]* >= j_\[0-9\]*;" 1 "hardcmp" } } */
diff --git a/gcc/testsuite/c-c++-common/torture/harden-cond.c b/gcc/testsuite/c-c++-common/torture/harden-cond.c
new file mode 100644
index 0000000..86de8e15
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/harden-cond.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-fharden-conditional-branches -fdump-tree-hardcbr -ffat-lto-objects" } */
+
+extern int f1 (void);
+extern int f2 (void);
+
+
+int
+f (int i, int j)
+{
+ return (i < j) ? f1 () : f2 ();
+}
+
+/* { dg-final { scan-tree-dump-times "Splitting edge" 2 "hardcbr" } } */
+/* { dg-final { scan-tree-dump-times "Adding reversed compare" 2 "hardcbr" } } */
+/* { dg-final { scan-tree-dump-times "__builtin_trap" 2 "hardcbr" } } */
+/* { dg-final { scan-tree-dump-times "if \[(\]i_\[0-9\]*\[(\]D\[)\] < j_\[0-9\]*\[(\]D\[)\]\[)\]" 1 "hardcbr" } } */
+/* { dg-final { scan-tree-dump-times "if \[(\]i_\[0-9\]* >= j_\[0-9\]*\[)\]" 2 "hardcbr" } } */
diff --git a/gcc/testsuite/c-c++-common/tsan/free_race.c b/gcc/testsuite/c-c++-common/tsan/free_race.c
index 258f7b7..390ec30 100644
--- a/gcc/testsuite/c-c++-common/tsan/free_race.c
+++ b/gcc/testsuite/c-c++-common/tsan/free_race.c
@@ -1,4 +1,5 @@
/* { dg-shouldfail "tsan" } */
+/* { dg-additional-options "-fno-ipa-modref" } */
#include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/tsan/free_race2.c b/gcc/testsuite/c-c++-common/tsan/free_race2.c
index 3971180..89d12c3 100644
--- a/gcc/testsuite/c-c++-common/tsan/free_race2.c
+++ b/gcc/testsuite/c-c++-common/tsan/free_race2.c
@@ -1,4 +1,5 @@
/* { dg-shouldfail "tsan" } */
+/* { dg-additional-options "-fno-ipa-modref" } */
#include <stdlib.h>
diff --git a/gcc/testsuite/config/default.exp b/gcc/testsuite/config/default.exp
index 9158c1c..90322d2 100644
--- a/gcc/testsuite/config/default.exp
+++ b/gcc/testsuite/config/default.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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 600a2e7..5fc34e2 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-2021 Free Software Foundation, Inc.
+Copyright (C) 2001-2022 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/abi-tag16.C b/gcc/testsuite/g++.dg/abi/abi-tag16.C
index d4fa142..3027d79 100644
--- a/gcc/testsuite/g++.dg/abi/abi-tag16.C
+++ b/gcc/testsuite/g++.dg/abi/abi-tag16.C
@@ -1,4 +1,4 @@
-// { dg-options -Wabi=9 }
+// { dg-options "-Wabi=9 -fno-implicit-constexpr" }
// { dg-final { scan-assembler "_ZGVZN1N1FEvE4NameB5cxx11" } }
namespace std {
__extension__ inline namespace __cxx11 __attribute__((abi_tag("cxx11"))) {
diff --git a/gcc/testsuite/g++.dg/abi/abi-tag18a.C b/gcc/testsuite/g++.dg/abi/abi-tag18a.C
index 95e192a..c6fb160 100644
--- a/gcc/testsuite/g++.dg/abi/abi-tag18a.C
+++ b/gcc/testsuite/g++.dg/abi/abi-tag18a.C
@@ -1,5 +1,5 @@
// { dg-skip-if "PR 70349" { hppa*-*-hpux* && { ! lp64 } } }
-// { dg-options -fabi-version=9 }
+// { dg-options "-fabi-version=9 -fno-implicit-constexpr" }
// { dg-final { scan-assembler "_Z1fB7__test1v" } }
// { dg-final { scan-assembler "_ZZ1fB7__test1vEN1T1gB7__test2Ev" } }
// { dg-final { scan-assembler "_ZZZ1fB7__test1vEN1T1gEvE1x" } }
diff --git a/gcc/testsuite/g++.dg/abi/guard4.C b/gcc/testsuite/g++.dg/abi/guard4.C
index 537c905..71e6744 100644
--- a/gcc/testsuite/g++.dg/abi/guard4.C
+++ b/gcc/testsuite/g++.dg/abi/guard4.C
@@ -3,9 +3,10 @@
namespace x {
struct s {
- s() {}
+ s();
static int a;
};
+ s::s() {}
// { dg-final { scan-assembler {.weak[^\n]*_ZGVN1x1bE} } }
struct s __attribute__((weak)) b = s();
}
diff --git a/gcc/testsuite/g++.dg/abi/lambda-defarg1.C b/gcc/testsuite/g++.dg/abi/lambda-defarg1.C
index 8c53858..79e4fa6 100644
--- a/gcc/testsuite/g++.dg/abi/lambda-defarg1.C
+++ b/gcc/testsuite/g++.dg/abi/lambda-defarg1.C
@@ -1,5 +1,6 @@
// PR c++/91241
// { dg-do compile { target c++11 } }
+// { dg-additional-options -fkeep-inline-functions }
struct A {
int *b(const int & = []() -> int { return 0; }(),
diff --git a/gcc/testsuite/g++.dg/abi/macro0.C b/gcc/testsuite/g++.dg/abi/macro0.C
index f25f291..2d07fcd 100644
--- a/gcc/testsuite/g++.dg/abi/macro0.C
+++ b/gcc/testsuite/g++.dg/abi/macro0.C
@@ -1,6 +1,6 @@
// This testcase will need to be kept in sync with c_common_post_options.
// { dg-options "-fabi-version=0" }
-#if __GXX_ABI_VERSION != 1016
+#if __GXX_ABI_VERSION != 1017
#error "Incorrect value of __GXX_ABI_VERSION"
#endif
diff --git a/gcc/testsuite/g++.dg/abi/mangle26.C b/gcc/testsuite/g++.dg/abi/mangle26.C
index 5d16095..2041d77 100644
--- a/gcc/testsuite/g++.dg/abi/mangle26.C
+++ b/gcc/testsuite/g++.dg/abi/mangle26.C
@@ -1,7 +1,7 @@
// Test of std mangling
// { dg-do compile }
-// { dg-options "-fno-inline" }
+// { dg-options "-fno-inline -fno-implicit-constexpr" }
namespace std {
struct A {
diff --git a/gcc/testsuite/g++.dg/abi/no_unique_address2.C b/gcc/testsuite/g++.dg/abi/no_unique_address2.C
index bef6d5b..3bb3f76 100644
--- a/gcc/testsuite/g++.dg/abi/no_unique_address2.C
+++ b/gcc/testsuite/g++.dg/abi/no_unique_address2.C
@@ -41,3 +41,30 @@ struct B4
#define SA(X) static_assert ((X), #X)
SA (sizeof (B2) == sizeof (B1));
SA (sizeof (B3) == sizeof (B4));
+
+namespace N2
+{
+ // C as big as _vptr to test PR c++/104139
+ struct C
+ {
+ long c;
+ };
+
+ struct D: virtual C
+ {
+ virtual void f();
+ };
+
+ struct B3: D
+ {
+ char c2;
+ };
+
+ struct B4
+ {
+ D d [[no_unique_address]];
+ char c2;
+ };
+
+ SA (sizeof (B3) == sizeof (B4));
+}
diff --git a/gcc/testsuite/g++.dg/abi/no_unique_address6.C b/gcc/testsuite/g++.dg/abi/no_unique_address6.C
new file mode 100644
index 0000000..5df6995
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/no_unique_address6.C
@@ -0,0 +1,23 @@
+// { dg-do compile { target c++20 } }
+
+#pragma GCC diagnostic ignored "-Winvalid-offsetof"
+
+struct E { };
+
+struct A: virtual E {
+ // Deny the vbase offset 0 so it goes at the end.
+ [[no_unique_address]] E e1;
+ char c;
+};
+
+struct B : public A {
+ char d;
+};
+
+struct C {
+ [[no_unique_address]] A a;
+ char d;
+};
+
+#define SA(X) static_assert ((X),#X)
+SA(__builtin_offsetof (B, d) == __builtin_offsetof (C, d));
diff --git a/gcc/testsuite/g++.dg/abi/nsdmi-aggr1.C b/gcc/testsuite/g++.dg/abi/nsdmi-aggr1.C
new file mode 100644
index 0000000..c212c43
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/nsdmi-aggr1.C
@@ -0,0 +1,39 @@
+// PR c++/103681
+// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fabi-version=16 -Wabi" }
+
+struct A {
+ long l;
+ char c = -1;
+};
+struct B : public A {
+ char d;
+ // { dg-warning "offset" "" { target c++14 } .-1 }
+};
+
+#define SA(X) static_assert(X,#X)
+SA(sizeof (B) == sizeof (A));
+// { dg-error "static assertion" "" { target c++14 } .-1 }
+
+struct X { char d; };
+struct B2 : A, X { };
+// { dg-warning "offset" "" { target c++14 } .-1 }
+SA(sizeof (B2) == sizeof (A));
+// { dg-error "static assertion" "" { target c++14 } .-1 }
+
+#if __cplusplus > 201800L
+
+struct C {
+ [[no_unique_address]] A a;
+ char d;
+ // { dg-warning "offset" "" { target c++20 } .-1 }
+};
+SA(sizeof (C) == sizeof (A));
+// { dg-error "static assertion" "" { target c++20 } .-1 }
+
+struct C2 : A, X { };
+// { dg-warning "offset" "" { target c++20 } .-1 }
+SA(sizeof (B2) == sizeof (A));
+// { dg-error "static assertion" "" { target c++20 } .-1 }
+
+#endif /* C++20 */
diff --git a/gcc/testsuite/g++.dg/abi/nsdmi-aggr1a.C b/gcc/testsuite/g++.dg/abi/nsdmi-aggr1a.C
new file mode 100644
index 0000000..e7a509d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/nsdmi-aggr1a.C
@@ -0,0 +1,35 @@
+// PR c++/103681
+// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fabi-version=0 -Wabi=16" }
+
+struct A {
+ long l;
+ char c = -1;
+};
+struct B : public A {
+ char d;
+ // { dg-warning "offset" "" { target c++14 } .-1 }
+};
+
+#define SA(X) static_assert(X,#X)
+SA(sizeof (B) == sizeof (A));
+
+struct X { char d; };
+struct B2 : A, X { };
+// { dg-warning "offset" "" { target c++14 } .-1 }
+SA(sizeof (B2) == sizeof (A));
+
+#if __cplusplus > 201800L
+
+struct C {
+ [[no_unique_address]] A a;
+ char d;
+ // { dg-warning "offset" "" { target c++20 } .-1 }
+};
+SA(sizeof (C) == sizeof (A));
+
+struct C2 : A, X { };
+// { dg-warning "offset" "" { target c++20 } .-1 }
+SA(sizeof (B2) == sizeof (A));
+
+#endif /* C++20 */
diff --git a/gcc/testsuite/g++.dg/analyzer/analyzer.exp b/gcc/testsuite/g++.dg/analyzer/analyzer.exp
index baca230..90bf184 100644
--- a/gcc/testsuite/g++.dg/analyzer/analyzer.exp
+++ b/gcc/testsuite/g++.dg/analyzer/analyzer.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 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/analyzer/pr102662.C b/gcc/testsuite/g++.dg/analyzer/pr102662.C
new file mode 100644
index 0000000..99252c7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/analyzer/pr102662.C
@@ -0,0 +1,39 @@
+/* { dg-additional-options "-fstrict-enums" } */
+
+enum OpCode {
+ OP_MOVE,
+ OP_LOADK,
+ OP_LOADBOOL,
+ OP_LOADNIL,
+ OP_GETUPVAL,
+ OP_SETUPVAL
+};
+
+enum OpArg {
+ OpArgN,
+ OpArgU,
+ OpArgR,
+ OpArgK
+};
+
+void
+symbexec_lastpc (enum OpCode symbexec_lastpc_op, enum OpArg luaP_opmodes)
+{
+ switch (luaP_opmodes)
+ {
+ case OpArgN:
+ case OpArgK:
+ {
+ switch (symbexec_lastpc_op)
+ {
+ case OP_LOADNIL:
+ case OP_SETUPVAL:
+ break;
+ default:
+ break;
+ }
+ }
+ default:
+ break;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/asan/asan.exp b/gcc/testsuite/g++.dg/asan/asan.exp
index 1ad7327..944da4e 100644
--- a/gcc/testsuite/g++.dg/asan/asan.exp
+++ b/gcc/testsuite/g++.dg/asan/asan.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.dg/asan/asan_test.C b/gcc/testsuite/g++.dg/asan/asan_test.C
index 49933ab..15c338b 100644
--- a/gcc/testsuite/g++.dg/asan/asan_test.C
+++ b/gcc/testsuite/g++.dg/asan/asan_test.C
@@ -2,7 +2,7 @@
// { dg-skip-if "" { *-*-* } { "*" } { "-O2" } }
// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
// { dg-additional-sources "asan_globals_test-wrapper.cc" }
-// { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Werror -Wno-alloc-size-larger-than -Wno-array-bounds -Wno-stringop-overflow -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread" }
+// { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Werror -Wno-alloc-size-larger-than -Wno-array-bounds -Wno-stringop-overflow -Wno-stringop-overread -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread" }
// { dg-additional-options "-ldl" { target { ! *-*-freebsd* } } }
// { dg-additional-options "-DASAN_NEEDS_SEGV=1" { target { ! arm*-*-* } } }
// { dg-additional-options "-DASAN_LOW_MEMORY=1 -DASAN_NEEDS_SEGV=0" { target arm*-*-* } }
diff --git a/gcc/testsuite/g++.dg/bprob/bprob.exp b/gcc/testsuite/g++.dg/bprob/bprob.exp
index c7c82a8..ecd6aff 100644
--- a/gcc/testsuite/g++.dg/bprob/bprob.exp
+++ b/gcc/testsuite/g++.dg/bprob/bprob.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2022 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/charset/charset.exp b/gcc/testsuite/g++.dg/charset/charset.exp
index 08b4437..7435c3e 100644
--- a/gcc/testsuite/g++.dg/charset/charset.exp
+++ b/gcc/testsuite/g++.dg/charset/charset.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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/break/README b/gcc/testsuite/g++.dg/compat/break/README
index fc27647..f3b6d7b 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-2021 Free Software Foundation, Inc.
+Copyright (C) 2002-2022 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 0773ff0..4b236c7 100644
--- a/gcc/testsuite/g++.dg/compat/compat.exp
+++ b/gcc/testsuite/g++.dg/compat/compat.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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 acb08f0..dc10cf8 100644
--- a/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
+++ b/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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/concepts/diagnostic18.C b/gcc/testsuite/g++.dg/concepts/diagnostic18.C
index 79f371b..c13b047 100644
--- a/gcc/testsuite/g++.dg/concepts/diagnostic18.C
+++ b/gcc/testsuite/g++.dg/concepts/diagnostic18.C
@@ -1,7 +1,7 @@
// PR c++/100055
// { dg-do compile { target concepts } }
-void foo(auto&& arg) requires({}); // { dg-error "statement-expressions are not allowed|braced-groups" }
+void foo(auto&& arg) requires({}); // { dg-error "statement-expressions are not allowed|braced-groups|non-templated" }
template <auto = 0> requires ([]{}()); // { dg-error "expected unqualified-id" }
-auto f() requires ([]{}());
+auto f() requires ([]{}()); // { dg-error "constraints on a non-templated" }
diff --git a/gcc/testsuite/g++.dg/coroutines/coroutines.exp b/gcc/testsuite/g++.dg/coroutines/coroutines.exp
index 2b1da3d..18d41aae 100644
--- a/gcc/testsuite/g++.dg/coroutines/coroutines.exp
+++ b/gcc/testsuite/g++.dg/coroutines/coroutines.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2021 Free Software Foundation, Inc.
+# Copyright (C) 2018-2022 Free Software Foundation, Inc.
# Contributed by Iain Sandoe <iain@sandoe.co.uk> under contract to Facebook.
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100127.C b/gcc/testsuite/g++.dg/coroutines/pr100127.C
new file mode 100644
index 0000000..374cd71
--- /dev/null
+++ b/gcc/testsuite/g++.dg/coroutines/pr100127.C
@@ -0,0 +1,65 @@
+#ifdef __clang__
+#include <experimental/coroutine>
+namespace std {
+ using namespace std::experimental;
+}
+#else
+#include <coroutine>
+#endif
+#include <optional>
+
+struct future
+{
+ using value_type = int;
+ struct promise_type;
+ using handle_type = std::coroutine_handle<promise_type>;
+
+ handle_type _coroutine;
+
+ future(handle_type h) : _coroutine{h} {}
+
+ ~future() noexcept{
+ if (_coroutine) {
+ _coroutine.destroy();
+ }
+ }
+
+ value_type get() {
+ auto ptr = _coroutine.promise()._value;
+ return *ptr;
+ }
+
+ struct promise_type {
+ std::optional<value_type> _value = std::nullopt;
+
+ future get_return_object() {
+ return future{handle_type::from_promise(*this)};
+ }
+ void return_value(value_type val) {
+ _value = static_cast<value_type &&>(val);
+ }
+ auto initial_suspend() noexcept {
+ class awaiter {
+ std::optional<value_type> & value;
+ public:
+ explicit awaiter(std::optional<value_type> & val) noexcept : value{val} {}
+ bool await_ready() noexcept { return value.has_value(); }
+ void await_suspend(handle_type) noexcept { }
+ value_type & await_resume() noexcept { return *value; }
+ };
+
+ return awaiter{_value};
+ }
+ std::suspend_always final_suspend() noexcept {
+ return {};
+ }
+ //void return_void() {}
+ void unhandled_exception() {}
+ };
+};
+
+future create_future()
+{ co_return 2021; }
+
+int main()
+{ auto f = create_future(); }
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
new file mode 100644
index 0000000..a325d38
--- /dev/null
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
@@ -0,0 +1,77 @@
+// { dg-additional-options "-fsyntax-only " }
+#ifdef __clang__
+#include <experimental/coroutine>
+namespace std {
+ using namespace std::experimental;
+}
+#else
+#include <coroutine>
+#endif
+
+struct Task
+{
+ struct promise_type
+ {
+ void return_void() const noexcept {}
+
+ void* operator new(std::size_t, auto &&...args) noexcept
+ {
+ static_assert(sizeof...(args) > 0);
+ static_assert(sizeof...(args) == 2);
+
+ return nullptr;
+ }
+
+ void operator delete(void *, std::size_t) noexcept
+ {
+ }
+
+ static Task get_return_object_on_allocation_failure() noexcept
+ {
+ return {};
+ }
+
+ Task get_return_object() noexcept
+ {
+ return Task{ *this };
+ }
+
+ std::suspend_always initial_suspend() noexcept
+ {
+ return {};
+ }
+
+ std::suspend_always final_suspend() noexcept
+ {
+ return {};
+ }
+
+ void unhandled_exception() noexcept {}
+ };
+
+ using promise_handle = std::coroutine_handle<promise_type>;
+
+ Task() = default;
+ Task(promise_type & promise) noexcept
+ : m_handle{ promise_handle::from_promise(promise) }
+ {}
+
+ ~Task()
+ {
+ if (m_handle.address()) { m_handle.destroy(); }
+ }
+
+ promise_handle m_handle{};
+};
+
+
+Task Foo(auto && ... args) noexcept
+{
+ co_return;
+}
+
+int main()
+{
+ int v;
+ Foo(v, 2134);
+}
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
new file mode 100644
index 0000000..6cdf8d1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
@@ -0,0 +1,93 @@
+#ifdef __clang__
+#include <experimental/coroutine>
+namespace std {
+ using namespace std::experimental;
+}
+#else
+#include <coroutine>
+#endif
+#include <cstdio>
+#include <typeinfo>
+#include <cxxabi.h> // needed for abi::__cxa_demangle
+#include <memory>
+
+std::shared_ptr<char> cppDemangle(const char *abiName)
+{
+ int status;
+ char *ret = abi::__cxa_demangle(abiName, 0, 0, &status);
+
+ /* NOTE: must free() the returned char when done with it! */
+ std::shared_ptr<char> retval;
+ retval.reset( (char *)ret, [](char *mem) { if (mem) free((void*)mem); } );
+ return retval;
+}
+
+template <typename T>
+struct Id{};
+struct Task
+{
+ struct promise_type
+ {
+ void return_void() const noexcept {}
+
+ static void is_int (std::string x) {
+ if (x != "Id<int>")
+ abort() ;
+ }
+ template <typename ... Args>
+ void* operator new(std::size_t len, Args ...args) noexcept
+ {
+ (is_int (cppDemangle(typeid(Id<Args>).name()).get()), ...);
+ (std::puts (cppDemangle(typeid(Id<Args>).name()).get()), ...);
+ return nullptr;
+ }
+
+ static Task get_return_object_on_allocation_failure() noexcept
+ {
+ return {};
+ }
+
+ Task get_return_object() noexcept
+ {
+ return Task{ *this };
+ }
+
+ std::suspend_always initial_suspend() noexcept
+ {
+ return {};
+ }
+
+ std::suspend_always final_suspend() noexcept
+ {
+ return {};
+ }
+
+ void unhandled_exception() noexcept {}
+ };
+
+ using promise_handle = std::coroutine_handle<promise_type>;
+
+ Task() = default;
+ Task(promise_type & promise) noexcept
+ : m_handle{ promise_handle::from_promise(promise) }
+ {}
+
+ ~Task()
+ {
+ if (m_handle.address()) { m_handle.destroy(); }
+ }
+
+ promise_handle m_handle{};
+};
+
+
+Task Foo(auto && ... args) noexcept
+{
+ co_return;
+}
+
+int main()
+{
+ int v;
+ Foo(v, 2134);
+}
diff --git a/gcc/testsuite/g++.dg/coroutines/pr96517.C b/gcc/testsuite/g++.dg/coroutines/pr96517.C
new file mode 100644
index 0000000..9cbac3e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/coroutines/pr96517.C
@@ -0,0 +1,29 @@
+// { dg-additional-options " -O1 " }
+#include <coroutine>
+
+struct coroutine {
+ struct promise_type {
+ coroutine get_return_object() { return {}; }
+ void return_void() {}
+ void unhandled_exception() {}
+ auto initial_suspend() noexcept { return std::suspend_never{}; }
+ auto final_suspend() noexcept { return std::suspend_never{}; }
+ };
+};
+
+struct data {
+ constexpr int get() { return 5; }
+};
+
+struct test {
+ data _data;
+
+ void foo() {
+ [this]() -> coroutine {
+ _data.get();
+ co_return;
+ };
+ }
+};
+
+int main() {}
diff --git a/gcc/testsuite/g++.dg/cpp/pr103012.C b/gcc/testsuite/g++.dg/cpp/pr103012.C
new file mode 100644
index 0000000..a172419
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp/pr103012.C
@@ -0,0 +1,18 @@
+// PR c++/103012
+// { dg-do compile }
+
+int a = 1;
+#pragma GCC optimize "Og"
+#define A(a) a +
+#define B(a) A(a)A(a)
+#define C(a) B(a)B(a)
+#define D(a) C(a)C(a)
+#define E(a) D(a)D(a)
+#define F(a) E(a)E(a)
+#define G(a) F(a)F(a)
+#define H(a) G(a)G(a)
+#define I(a) H(a)H(a)
+#define J(a) I(a)I(a)
+#define K(a) J(a)J(a)
+#define L(a) K(a)K(a)
+int b = L(a) 1;
diff --git a/gcc/testsuite/g++.dg/cpp/ucnid-1-utf8.C b/gcc/testsuite/g++.dg/cpp/ucnid-1-utf8.C
index 839b188..01172c8 100644
--- a/gcc/testsuite/g++.dg/cpp/ucnid-1-utf8.C
+++ b/gcc/testsuite/g++.dg/cpp/ucnid-1-utf8.C
@@ -1,17 +1,17 @@
/* { dg-do preprocess } */
/* { dg-options "-std=gnu++98 -pedantic" } */
-ª /* { dg-error "not valid in an identifier" } */
+ª
« /* { dg-error "not valid in an identifier" } */
¶ /* { dg-error "not valid in an identifier" } */
-º /* { dg-error "not valid in an identifier" } */
+º
À
Ö
-΄
+΄ /* { dg-error "not valid in an identifier" } */
-Ù© /* { dg-error "not valid in an identifier" } */
-AÙ© /* { dg-error "not valid in an identifier" } */
-0º /* { dg-error "not valid in an identifier" } */
-0Ù© /* { dg-error "not valid in an identifier" } */
-๙
+Ù© /* { dg-error "not valid at the start of an identifier" } */
+AÙ©
+0º
+0Ù©
+๙ /* { dg-error "not valid at the start of an identifier" } */
A๙
diff --git a/gcc/testsuite/g++.dg/cpp/ucnid-1.C b/gcc/testsuite/g++.dg/cpp/ucnid-1.C
index 65c8995..b0a64e3 100644
--- a/gcc/testsuite/g++.dg/cpp/ucnid-1.C
+++ b/gcc/testsuite/g++.dg/cpp/ucnid-1.C
@@ -1,17 +1,17 @@
/* { dg-do preprocess } */
/* { dg-options "-std=gnu++98 -pedantic" } */
-\u00AA /* { dg-error "not valid in an identifier" } */
+\u00AA
\u00AB /* { dg-error "not valid in an identifier" } */
\u00B6 /* { dg-error "not valid in an identifier" } */
-\u00BA /* { dg-error "not valid in an identifier" } */
+\u00BA
\u00C0
\u00D6
-\u0384
+\u0384 /* { dg-error "not valid in an identifier" } */
-\u0669 /* { dg-error "not valid in an identifier" } */
-A\u0669 /* { dg-error "not valid in an identifier" } */
-0\u00BA /* { dg-error "not valid in an identifier" } */
-0\u0669 /* { dg-error "not valid in an identifier" } */
-\u0E59
+\u0669 /* { dg-error "not valid at the start of an identifier" } */
+A\u0669
+0\u00BA
+0\u0669
+\u0E59 /* { dg-error "not valid at the start of an identifier" } */
A\u0E59
diff --git a/gcc/testsuite/g++.dg/cpp/ucnid-4-utf8.C b/gcc/testsuite/g++.dg/cpp/ucnid-4-utf8.C
index de252e8..1e5e3fc 100644
--- a/gcc/testsuite/g++.dg/cpp/ucnid-4-utf8.C
+++ b/gcc/testsuite/g++.dg/cpp/ucnid-4-utf8.C
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-std=gnu++98"} */
+/* { dg-options "-std=gnu++98" } */
ª
« /* { dg-error "not valid in an identifier" } */
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-void1.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-void1.C
new file mode 100644
index 0000000..accc1a4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-void1.C
@@ -0,0 +1,18 @@
+// PR c++/103057
+// { dg-do compile { target c++11 } }
+
+template <class T> struct A { };
+template <class T> struct B { using type = A<T>; };
+template <class T> struct C {
+ using type = typename T::foo; // { dg-error "int" }
+};
+template <class T> using L = B<void>;
+
+template <class T>
+typename L<typename C<T>::type>::type
+f(T) { };
+
+int main()
+{
+ f(42); // { dg-error "no match" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto25.C b/gcc/testsuite/g++.dg/cpp0x/auto25.C
index 19d51bc..3af0899 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto25.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto25.C
@@ -3,10 +3,10 @@
template<int> struct A
{
- int a[auto(1)]; // { dg-error "9:invalid use of" }
+ int a[auto(1)]; // { dg-error "9:only available" "" { target c++20_down } }
};
template<int> void foo()
{
- int a[auto(1)]; // { dg-error "9:invalid use of" }
+ int a[auto(1)]; // { dg-error "9:only available" "" { target c++20_down } }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto9.C b/gcc/testsuite/g++.dg/cpp0x/auto9.C
index 0e80c30..a3a6caf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto9.C
@@ -45,7 +45,7 @@ foo ()
C<int> c;
dynamic_cast<auto> (c); // { dg-error "auto" }
reinterpret_cast<auto> (c); // { dg-error "auto" }
- int i = auto (0); // { dg-error "auto" }
+ int i = auto (0); // { dg-error "auto" "" { target c++20_down } }
auto p1 = new (auto); // { dg-error "auto" }
auto p2 = new (auto) (42); // { dg-error "invalid use of|deduce" }
offsetof (auto, fld); // { dg-error "auto" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-104226.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-104226.C
new file mode 100644
index 0000000..a44f417
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-104226.C
@@ -0,0 +1,15 @@
+// PR c++/104226
+// { dg-do compile }
+// { dg-options "-Wno-psabi" }
+
+typedef unsigned short __attribute__((__vector_size__(16))) U;
+typedef unsigned int __attribute__((__vector_size__(16))) V;
+typedef unsigned int __attribute__((__vector_size__(32))) W;
+
+U
+foo (void)
+{
+ return __builtin_convertvector (__builtin_shufflevector ((V){}, (W){},
+ 0, 0, 1, 0,
+ 5, 5, 0, 2), U);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-104472.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-104472.C
new file mode 100644
index 0000000..c9c8bf4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-104472.C
@@ -0,0 +1,9 @@
+// PR c++/104472
+// { dg-options "-O2 -frounding-math" }
+// { dg-add-options float16 }
+// { dg-require-effective-target float16 }
+
+typedef short __attribute__((__vector_size__ (16))) V;
+typedef _Float16 __attribute__((__vector_size__ (16))) F;
+
+V v = __builtin_convertvector (__builtin_convertvector ((V){5534}, F), V) < 8;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C
new file mode 100644
index 0000000..603c6d5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C
@@ -0,0 +1,8 @@
+// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
+
+extern int a, b;
+static_assert (&a == &a, "");
+static_assert (&a != &b, "");
+constexpr bool c = &a == &a;
+constexpr bool d = &a != &b;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C
new file mode 100644
index 0000000..5c08dbb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C
@@ -0,0 +1,11 @@
+// PR c++/69681
+// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
+
+void f();
+void g();
+static_assert(f != g, "");
+
+#if __cpp_constexpr >= 201603L
+static_assert([]{} != []{}, "");
+#endif
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-condition.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-condition.C
index 733d494..e81acba 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-condition.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-condition.C
@@ -5,5 +5,5 @@ constexpr int something() { return 3; }
int main() {
if (constexpr long v = something()) {}
- if (static long v = something()) { } // { dg-error "'decl-specifier' invalid" }
+ if (static long v = something()) { } // { dg-error "'static' invalid" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C
index 1c43569..c167bb1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C
@@ -13,7 +13,7 @@ int main()
// --------------------
-struct complex // { dg-message "no .constexpr. constructor" }
+struct complex // { dg-message "no .constexpr. constructor" "" { target { ! implicit_constexpr } } }
{
complex(double r, double i) : re(r), im(i) { }
constexpr double real() const { return re; } // { dg-error "not a literal type" "" { target c++11_only } }
@@ -24,23 +24,23 @@ private:
double im;
};
-constexpr complex co1(0, 1); // { dg-error "19:the type .const complex. of .constexpr. variable .co1. is not literal" }
-constexpr double dd2 = co1.real(); // { dg-error "|in .constexpr. expansion of " }
+constexpr complex co1(0, 1); // { dg-error "19:the type .const complex. of .constexpr. variable .co1. is not literal" "" { target { ! implicit_constexpr } } }
+constexpr double dd2 = co1.real(); // { dg-error "|in .constexpr. expansion of " "" { target { ! implicit_constexpr } } }
// --------------------
-struct base // { dg-message "no .constexpr. constructor" }
+struct base // { dg-message "no .constexpr. constructor" "" { target { ! implicit_constexpr } } }
{
int _M_i;
base() : _M_i(5) { }
};
-struct derived : public base // { dg-message "base class" }
+struct derived : public base // { dg-message "base class" "" { target { ! implicit_constexpr } } }
{
- constexpr derived(): base() { } // { dg-error "non-.constexpr. function" }
+ constexpr derived(): base() { } // { dg-error "non-.constexpr. function" "" { target { ! implicit_constexpr } } }
};
-constexpr derived obj; // { dg-error "not literal" }
+constexpr derived obj; // { dg-error "not literal" "" { target { ! implicit_constexpr } } }
// --------------------
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty14a.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty14a.C
new file mode 100644
index 0000000..df34cfc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty14a.C
@@ -0,0 +1,11 @@
+// PR c++/101072
+// { dg-do compile { target c++11 } }
+// { dg-additional-options -fno-elide-constructors }
+
+struct S {};
+
+template <class T> void
+foo (S s)
+{
+ constexpr S x = s;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C
index e5e58bd..1d5c58b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C
@@ -87,7 +87,7 @@ struct resource {
}
};
constexpr resource f(resource d)
-{ return d; } // { dg-error "non-.constexpr." }
-constexpr resource d = f(9); // { dg-message ".constexpr." }
+{ return d; } // { dg-error "non-.constexpr." "" { target { ! implicit_constexpr } } }
+constexpr resource d = f(9); // { dg-message ".constexpr." "" { target { ! implicit_constexpr } } }
// 4.4 floating-point constant expressions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-fp-except1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-fp-except1.C
new file mode 100644
index 0000000..3887a5b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-fp-except1.C
@@ -0,0 +1,4 @@
+// { dg-do compile { target c++11 } }
+// { dg-additional-options -fconstexpr-fp-except }
+
+constexpr double inf = 1./0.;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice5.C
index 51b328e..e934421 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice5.C
@@ -9,5 +9,5 @@ struct A
struct B
{
A a[1];
- constexpr B() : a() {} // { dg-error "non-constant|non-.constexpr." }
+ constexpr B() : a() {} // { dg-error "non-constant|non-.constexpr." "" { target { ! implicit_constexpr } } }
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C
index a04f1d5..c018ede 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C
@@ -28,4 +28,4 @@ struct D
C<D> c;
};
-constexpr D d {}; // { dg-error "non-.constexpr. function" }
+constexpr D d {}; // { dg-error "non-.constexpr. function" "" { target { ! implicit_constexpr } } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C
index d58e2ec..3725528 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C
@@ -13,6 +13,6 @@ constexpr X X::g(X x) { return x; }
struct Y
{
Y() { }
- constexpr Y f(Y y) { return y; } // { dg-error "constexpr" }
- static constexpr Y g(Y y) { return y; } // { dg-error "constexpr" }
+ constexpr Y f(Y y) { return y; } // { dg-error "constexpr" "" { target { ! implicit_constexpr } } }
+ static constexpr Y g(Y y) { return y; } // { dg-error "constexpr" "" { target { ! implicit_constexpr } } }
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-neg3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-neg3.C
index 55bb838..89559d7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-neg3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-neg3.C
@@ -9,7 +9,7 @@ struct A
template<typename> struct B
{
A a;
- constexpr int bar() { return a.foo(); } // { dg-error "foo" }
+ constexpr int bar() { return a.foo(); } // { dg-error "foo" "" { target { ! implicit_constexpr } } }
};
-constexpr int i = B<void>().bar(); // { dg-error "bar" }
+constexpr int i = B<void>().bar(); // { dg-error "bar" "" { target { ! implicit_constexpr } } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-specialization.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-specialization.C
index 64d8f4e..acda6e0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-specialization.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-specialization.C
@@ -3,10 +3,10 @@
template<typename T> constexpr int foo(T);
template<> int foo(int);
-template<> int foo(int); // { dg-message "previous declaration 'int foo" }
-template<> constexpr int foo(int); // { dg-error "redeclaration 'constexpr int foo" }
+template<> int foo(int); // { dg-message "previous declaration 'int foo" "" { target { ! implicit_constexpr } } }
+template<> constexpr int foo(int); // { dg-error "redeclaration 'constexpr int foo" "" { target { ! implicit_constexpr } } }
template<typename T> int bar(T);
template<> constexpr int bar(int);
-template<> constexpr int bar(int); // { dg-message "previous declaration 'constexpr int bar" }
-template<> int bar(int); // { dg-error "redeclaration 'int bar" }
+template<> constexpr int bar(int); // { dg-message "previous declaration 'constexpr int bar" "" { target { ! implicit_constexpr } } }
+template<> int bar(int); // { dg-error "redeclaration 'int bar" "" { target { ! implicit_constexpr } } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C
new file mode 100644
index 0000000..8ab76f9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C
@@ -0,0 +1,15 @@
+// PR c++/103600
+// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
+
+#include <typeinfo>
+
+struct S { int i; };
+namespace {
+ struct T { int i; };
+};
+constexpr bool a = &typeid (int) == &typeid (int);
+constexpr bool b = &typeid (int) == &typeid (long);
+constexpr bool c = &typeid (double) != &typeid (int);
+constexpr bool d = &typeid (S) != &typeid (T);
+static_assert (a && !b && c && d, "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-bitfield1.C b/gcc/testsuite/g++.dg/cpp0x/decltype-bitfield1.C
new file mode 100644
index 0000000..27289fb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-bitfield1.C
@@ -0,0 +1,65 @@
+// PR c++/95009
+// { dg-do compile { target { c++11 && longlong64 } } }
+
+struct false_type { static constexpr bool value = false; };
+struct true_type { static constexpr bool value = true; };
+template<class T, class U>
+struct is_same : false_type {};
+template<class T>
+struct is_same<T, T> : true_type {};
+
+struct A {
+ int i : 31;
+ unsigned long long l : 37;
+} a;
+
+void
+g ()
+{
+ // Careful: pre{in,de}crements are lvalues -> deduce T&. */
+ static_assert (is_same<decltype(a.i), int>::value, "");
+ static_assert (is_same<decltype((a.i)), int&>::value, "");
+ static_assert (is_same<decltype(++a.i), int&>::value, "");
+ static_assert (is_same<decltype((++a.i)), int&>::value, "");
+ static_assert (is_same<decltype(a.i++), int>::value, "");
+ static_assert (is_same<decltype((a.i++)), int>::value, "");
+ static_assert (is_same<decltype(--a.i), int&>::value, "");
+ static_assert (is_same<decltype((--a.i)), int&>::value, "");
+ static_assert (is_same<decltype(a.i--), int>::value, "");
+ static_assert (is_same<decltype((a.i--)), int>::value, "");
+ static_assert (is_same<decltype(a.i += 1), int&>::value, "");
+ static_assert (is_same<decltype((a.i += 1)), int&>::value, "");
+ static_assert (is_same<decltype(a.i -= 1), int&>::value, "");
+ static_assert (is_same<decltype((a.i -= 1)), int&>::value, "");
+ static_assert (is_same<decltype(a.i *= 1), int&>::value, "");
+ static_assert (is_same<decltype((a.i *= 1)), int&>::value, "");
+ static_assert (is_same<decltype(+a.i), int>::value, "");
+ static_assert (is_same<decltype((+a.i)), int>::value, "");
+ static_assert (is_same<decltype(-a.i), int>::value, "");
+ static_assert (is_same<decltype((-a.i)), int>::value, "");
+ static_assert (is_same<decltype(~a.i), int>::value, "");
+ static_assert (is_same<decltype((~a.i)), int>::value, "");
+
+ static_assert (is_same<decltype(a.l), unsigned long long>::value, "");
+ static_assert (is_same<decltype((a.l)), unsigned long long&>::value, "");
+ static_assert (is_same<decltype(++a.l), unsigned long long&>::value, "");
+ static_assert (is_same<decltype((++a.l)), unsigned long long&>::value, "");
+ static_assert (is_same<decltype(a.l++), unsigned long long>::value, "");
+ static_assert (is_same<decltype((a.l++)), unsigned long long>::value, "");
+ static_assert (is_same<decltype(--a.l), unsigned long long&>::value, "");
+ static_assert (is_same<decltype((--a.l)), unsigned long long&>::value, "");
+ static_assert (is_same<decltype(a.l--), unsigned long long>::value, "");
+ static_assert (is_same<decltype((a.l--)), unsigned long long>::value, "");
+ static_assert (is_same<decltype(a.l += 1), unsigned long long&>::value, "");
+ static_assert (is_same<decltype((a.l += 1)), unsigned long long&>::value, "");
+ static_assert (is_same<decltype(a.l -= 1), unsigned long long&>::value, "");
+ static_assert (is_same<decltype((a.l -= 1)), unsigned long long&>::value, "");
+ static_assert (is_same<decltype(a.l *= 1), unsigned long long&>::value, "");
+ static_assert (is_same<decltype((a.l *= 1)), unsigned long long&>::value, "");
+ static_assert (is_same<decltype(+a.l), unsigned long long>::value, "");
+ static_assert (is_same<decltype((+a.l)), unsigned long long>::value, "");
+ static_assert (is_same<decltype(-a.l), unsigned long long>::value, "");
+ static_assert (is_same<decltype((-a.l)), unsigned long long>::value, "");
+ static_assert (is_same<decltype(~a.l), unsigned long long>::value, "");
+ static_assert (is_same<decltype((~a.l)), unsigned long long>::value, "");
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-bitfield2.C b/gcc/testsuite/g++.dg/cpp0x/decltype-bitfield2.C
new file mode 100644
index 0000000..4bf9c76
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-bitfield2.C
@@ -0,0 +1,18 @@
+// PR c++/95009
+// { dg-do compile { target c++11 } }
+
+struct A {
+ int i:31;
+};
+
+template<typename>
+void f ()
+{
+}
+
+int main ()
+{
+ A a;
+ f<decltype(a.i += 1)>();
+ f<decltype(++a.i)>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/dr2351.C b/gcc/testsuite/g++.dg/cpp0x/dr2351.C
new file mode 100644
index 0000000..5116dfe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/dr2351.C
@@ -0,0 +1,51 @@
+// DR2351
+// { dg-do compile { target c++11 } }
+
+void
+foo ()
+{
+ void{};
+ void();
+}
+
+template <class ...T>
+void
+bar (T... t)
+{
+ void{t...};
+ void(t...);
+}
+
+void
+baz ()
+{
+ bar ();
+}
+
+template <class ...T>
+void
+qux (T... t)
+{
+ void{t...}; // { dg-error "compound literal of non-object type" }
+}
+
+void
+corge ()
+{
+ qux (1, 2);
+}
+
+template <class ...T>
+void
+garply (T... t)
+{
+ void{t..., t..., t...};
+ void(t..., t..., t...);
+}
+
+template <class ...T>
+void
+grault (T... t)
+{
+ void{t..., 1}; // { dg-error "compound literal of non-object type" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/error2.C b/gcc/testsuite/g++.dg/cpp0x/error2.C
index e6af294..eb96636 100644
--- a/gcc/testsuite/g++.dg/cpp0x/error2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/error2.C
@@ -3,7 +3,7 @@
template<int> int foo();
-template<typename F> void bar(F f)
+template<typename F, int N> void bar(F f)
{
- f((foo<0>()=0)...); // { dg-error "pattern '\\(foo\\<0\\>\\)\\(\\)=0'" }
+ f((foo<N>()=0)...); // { dg-error "pattern '\\(foo\\<N\\>\\)\\(\\)=0'" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/fntmp-equiv1.C b/gcc/testsuite/g++.dg/cpp0x/fntmp-equiv1.C
index 833ae6f..c7d7d60 100644
--- a/gcc/testsuite/g++.dg/cpp0x/fntmp-equiv1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/fntmp-equiv1.C
@@ -3,21 +3,21 @@
int d(int, int);
template <long> class e {};
-template <unsigned long f, unsigned b, typename> e<sizeof(d(f, b))> d();
-template <unsigned long f, unsigned b, typename> e<d(f, b)> d();
+template <class T> e<sizeof(d(T{}, T{}))> d(...);
+template <class T> e<d(T{}, T{})> d(...);
template <class T, class U> constexpr T d2(T, U) { return 42; }
-template <unsigned long f, unsigned b, typename> e<d2(f, b)> d2();
-template <unsigned long f, unsigned b, typename> e<d2(f, b)> d2();
+template <class T> e<d2(T{}, T{})> d2(...);
+template <class T> e<d2(T{}, T{})> d2(...);
template <typename a, typename c> a d3(a, c);
-template <unsigned long f, unsigned b, typename> e<sizeof(d3(f, b))> d3();
-template <unsigned long f, unsigned b, typename> e<sizeof(d3(f, b))> d3();
+template <class T> e<sizeof(d3(T{}, T{}))> d3(...);
+template <class T> e<sizeof(d3(T{}, T{}))> d3(...);
int main()
{
- d<1,2,int>();
- d2<1,2,int>();
- d3<1,2,int>();
+ d<int>();
+ d2<int>();
+ d3<int>();
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor19.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor19.C
index 7e2d58b..3476f96 100644
--- a/gcc/testsuite/g++.dg/cpp0x/inh-ctor19.C
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor19.C
@@ -11,4 +11,4 @@ struct B : A
using A::A;
};
-constexpr B b; // { dg-error "literal" }
+constexpr B b; // { dg-error "literal" "" { target { ! implicit_constexpr } } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C
index 04c5863..c978f0c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C
@@ -1,6 +1,7 @@
// PR c++/81860
// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "_ZN1AIjEC\[12\]Ev" } }
+// { dg-additional-options -fno-implicit-constexpr }
template <typename T>
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-array14.C b/gcc/testsuite/g++.dg/cpp0x/initlist-array14.C
new file mode 100644
index 0000000..baa4afc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-array14.C
@@ -0,0 +1,12 @@
+// PR c++/104300
+// { dg-do compile { target c++11 } }
+
+struct ss {
+ char r;
+ ss();
+};
+struct a {
+ ss e[6];
+};
+a vv;
+void ff() { vv = {}; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist116.C b/gcc/testsuite/g++.dg/cpp0x/initlist116.C
new file mode 100644
index 0000000..90dd8d7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist116.C
@@ -0,0 +1,29 @@
+// PR c++/66139
+// { dg-do run { target c++11 } }
+
+int constructed = 0;
+
+class lock_guard_ext{
+public:
+ lock_guard_ext() { ++constructed; }
+ ~lock_guard_ext() { --constructed; }
+};
+
+struct Access {
+ lock_guard_ext lock;
+ int value;
+};
+
+int t() {
+ throw 0;
+}
+
+Access foo1() {
+ return { {}, t() };
+}
+
+int main () {
+ try { foo1(); } catch (int) {}
+ if (constructed != 0)
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist117.C b/gcc/testsuite/g++.dg/cpp0x/initlist117.C
new file mode 100644
index 0000000..415a5de
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist117.C
@@ -0,0 +1,40 @@
+// PR c++/66139
+// { dg-do run { target c++11 } }
+
+#include <initializer_list>
+
+int c, d;
+
+struct a
+{
+ a (int i) { if (i) throw i; c++; }
+ ~a () { d++; }
+};
+
+void check (void (*f) ())
+{
+ try
+ {
+ c = d = 0;
+ f ();
+ }
+ catch (int)
+ {
+ if (c != 1 || d != 1)
+ __builtin_abort ();
+ return;
+ }
+ __builtin_abort ();
+}
+
+int main ()
+{
+ struct s { a x, y; };
+ check ([] { s t { 0, 1 }; });
+ check ([] { s { 0, 1 }; });
+ check ([] { a t[2] { 0, 1 }; });
+ using array = a[2];
+ check ([] { array { 0, 1 }; });
+ check ([] { std::initializer_list <a> t { 0, 1 }; });
+ check ([] { std::initializer_list <a> { 0, 1 }; });
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist122.C b/gcc/testsuite/g++.dg/cpp0x/initlist122.C
index 002bc1e..81953a4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist122.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist122.C
@@ -6,11 +6,19 @@ struct Temp { ~Temp() { gone = true; } };
struct A{ A() {}; A(const Temp&) noexcept {}; };
struct B{ ~B() {}; };
struct Pair{ A a; B b; };
-
void foo(const Pair&) noexcept { if (gone) __builtin_abort(); }
+B bar() { if (gone) __builtin_abort(); return {}; }
+
int main()
{
- foo({A(Temp{}), B()});
+ Pair p{A(Temp{}), bar()};
+
+ if (!gone) __builtin_abort ();
+
+ gone = false;
+
+ foo({A(Temp{})});
+
if (!gone) __builtin_abort ();
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist127.C b/gcc/testsuite/g++.dg/cpp0x/initlist127.C
new file mode 100644
index 0000000..ebe5924
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist127.C
@@ -0,0 +1,39 @@
+// PR c++/104182
+// { dg-do run { target c++11 } }
+
+#include <initializer_list>
+
+int b;
+
+struct stringy {
+ const char *p;
+ stringy(const char *p): p(p) { ++b; }
+ const char& operator[](int i) const { return p[i]; }
+ ~stringy() { --b; }
+};
+
+struct S
+{
+ int A;
+ stringy B;
+};
+
+struct veccy {
+ S s;
+ veccy (const std::initializer_list<S> &l): s(*l.begin()) {}
+ const S& operator[](int i) const { return s; }
+};
+
+struct V
+{
+ veccy v;
+};
+
+static const V v{ { { { 237, "2" } } } };
+
+int main()
+{
+ if (v.v[0].A != 237 || v.v[0].B[0] != '2')
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist128.C b/gcc/testsuite/g++.dg/cpp0x/initlist128.C
new file mode 100644
index 0000000..2224686
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist128.C
@@ -0,0 +1,16 @@
+// PR c++/102434
+// { dg-do compile { target c++11 } }
+
+using size_t = decltype(sizeof 0);
+
+namespace std {
+ template<typename T> union initializer_list { // { dg-error "definition of .*std::initializer_list.* does not match" }
+ const T *ptr;
+ size_t n;
+ };
+}
+template<typename T>
+void Task() {}
+auto b = { &Task<int> };
+
+// { dg-prune-output "compilation terminated" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-104403.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-104403.C
new file mode 100644
index 0000000..f231d3e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-104403.C
@@ -0,0 +1,8 @@
+// PR c++/104403
+// { dg-do compile { target c++11 } }
+
+int
+main ()
+{
+ []{ switch (0) { case 0: static int value; return &value; } };
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg10.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg10.C
new file mode 100644
index 0000000..e08eb4f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg10.C
@@ -0,0 +1,21 @@
+// PR c++/103186
+// { dg-do compile { target c++11 } }
+
+struct f
+{
+ template<class T1>
+ f(const T1&){}
+};
+
+
+template<typename T> class A {
+public:
+ void foo(A<T> a, const f& fn = [](){}) { }
+ void bar(A<T> a) { foo(a); }
+};
+int main() {
+ A<int> a;
+ a.foo(a);
+ a.bar(a);
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh.C
new file mode 100644
index 0000000..4d1f4f3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh.C
@@ -0,0 +1,34 @@
+// Test that we properly clean up if we get an exception in the middle of
+// constructing the closure object.
+
+// { dg-do run }
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ A() {}
+ A(const A&) { throw 1; }
+};
+
+int bs;
+struct B
+{
+ B() { ++bs; }
+ B(const B&) { ++bs; }
+ ~B() { --bs; }
+};
+
+int main()
+{
+ {
+ B b1, b2;
+ A a;
+
+ try
+ {
+ [b1, a, b2]{ };
+ }
+ catch(...) {}
+ }
+ return bs;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C
index 3fb50df..eddd3c9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C
@@ -7,7 +7,7 @@
int main( void )
{
- std::set_unexpected( []{ throw 0; } );
+ std::set_unexpected( []{ throw 0; } ); // { dg-warning "deprecated" }
try
{
[]() throw( int ) { throw nullptr; }(); // { dg-warning "deprecated" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle3.C
index 5f17a21..2120d8c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle3.C
@@ -1,6 +1,7 @@
// PR c++/51818
// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "_ZN1AC1IN3foo3barMUlvE_EEET_" } }
+// { dg-additional-options -fno-implicit-constexpr }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle5.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle5.C
index dd95894..23df3a2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle5.C
@@ -1,4 +1,5 @@
// { dg-do compile { target c++11 } }
+// { dg-additional-options -fkeep-inline-functions }
// { dg-final { scan-assembler "_ZZN1AIiEC4IiEET_S2_Ed_NKUlvE_clEv" } }
template <class T> struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9.C
new file mode 100644
index 0000000..8f67f22
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9.C
@@ -0,0 +1,41 @@
+// PR c++/94376
+// { dg-do compile { target c++11 } }
+
+int main() {
+ // We used to incorrectly reject the first two cases.
+ int i = 0;
+ [=] () {
+ [=] () mutable {
+ ++i;
+ };
+ };
+
+#if __cpp_init_captures
+ [j=0] () {
+ [=] () mutable {
+ ++j;
+ };
+ };
+#endif
+
+ [=] () {
+ [&] () mutable {
+ ++i; // { dg-error "read-only" }
+ };
+ };
+
+ const int j = 0;
+ [=] () {
+ [=] () mutable {
+ ++j; // { dg-error "read-only" }
+ };
+ };
+
+#if __cpp_init_captures
+ [j=0] () {
+ [&] () mutable {
+ ++j; // { dg-error "read-only" "" { target c++14 } }
+ };
+ };
+#endif
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9a.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9a.C
new file mode 100644
index 0000000..d62f8f0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested9a.C
@@ -0,0 +1,42 @@
+// PR c++/94376
+// Like lambda-nested9.C but using explicit captures in the inner lambda.
+// { dg-do compile { target c++11 } }
+
+int main() {
+ // We used to incorrectly reject the first two cases.
+ int i = 0;
+ [=] () {
+ [i] () mutable {
+ ++i;
+ };
+ };
+
+#if __cpp_init_captures
+ [j=0] () {
+ [j] () mutable {
+ ++j;
+ };
+ };
+#endif
+
+ [=] () {
+ [&i] () mutable {
+ ++i; // { dg-error "read-only" }
+ };
+ };
+
+ const int j = 0;
+ [=] () {
+ [j] () mutable {
+ ++j; // { dg-error "read-only" }
+ };
+ };
+
+#if __cpp_init_captures
+ [j=0] () {
+ [&j] () mutable {
+ ++j; // { dg-error "read-only" "" { target c++14 } }
+ };
+ };
+#endif
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch.C
index d05c976..e417967 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch.C
@@ -16,11 +16,11 @@ main ()
break; // { dg-error "break" }
}
};
- l = []()
+ l = []() // { dg-warning "statement will never be executed" }
{
case 3: // { dg-error "case" }
break; // { dg-error "break" }
- }; // { dg-warning "statement will never be executed" }
+ };
}
}
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic13.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic13.C
index ac4e631..3df8829 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic13.C
@@ -3,7 +3,7 @@
template <class... Ts>
void f() {
- [] { struct S : Ts { }; }; // { dg-error "not expanded" }
+ [] { struct S : Ts { }; }; // { dg-message "" }
}
int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic14.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic14.C
index 185aa03..4634f16 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic14.C
@@ -3,6 +3,6 @@
template <int... E>
void f() {
- [] { enum e { e = E }; }; // { dg-error "not expanded" }
+ [] { enum e { e = E }; }; // { dg-message "" }
}
template void f<>();
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic14a.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic14a.C
new file mode 100644
index 0000000..810b4a4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic14a.C
@@ -0,0 +1,9 @@
+// PR c++/100198
+// { dg-do compile { target c++11 } }
+
+template <int... E>
+void f() {
+ ([] { enum e { e = E }; }(), ...); // { dg-bogus "" "" { xfail *-*-* } }
+}
+
+template void f<0>();
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic15.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic15.C
new file mode 100644
index 0000000..730215a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic15.C
@@ -0,0 +1,14 @@
+// PR c++/100030
+// { dg-do compile { target c++11 } }
+
+template <class... Ts>
+void sink(Ts...);
+
+template <class... Ts>
+void f(Ts...) {
+ sink([] { struct alignas(Ts) S {}; }...); // { dg-bogus "" "" { xfail *-*-* } }
+}
+
+int main() {
+ f(0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic16.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic16.C
new file mode 100644
index 0000000..8e48e38
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic16.C
@@ -0,0 +1,13 @@
+// PR c++/100282
+// { dg-do compile { target c++11 } }
+
+template <typename... Ts>
+void
+local_class ()
+{
+ int { []{ struct ZZ : Ts {}; }... }; // { dg-bogus "" "" { xfail *-*-* } }
+}
+
+template // <>
+void
+local_class<int> ();
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept06.C b/gcc/testsuite/g++.dg/cpp0x/noexcept06.C
index ad9edec..ea15223 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept06.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept06.C
@@ -23,7 +23,7 @@ void f() noexcept
int main()
{
- std::set_unexpected (my_unexpected);
+ std::set_unexpected (my_unexpected); // { dg-warning "deprecated" }
std::set_terminate (my_terminate);
f();
return 1;
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept07.C b/gcc/testsuite/g++.dg/cpp0x/noexcept07.C
index de16e01..dbcc23e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept07.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept07.C
@@ -18,7 +18,7 @@ void f() throw()
int main()
{
- std::set_unexpected (my_unexpected);
+ std::set_unexpected (my_unexpected); // { dg-warning "deprecated" }
f();
return 1;
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept71.C b/gcc/testsuite/g++.dg/cpp0x/noexcept71.C
new file mode 100644
index 0000000..361d6ad
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept71.C
@@ -0,0 +1,31 @@
+// PR c++/99980
+// { dg-do compile { target c++11 } }
+
+#define SA(X) static_assert(X, #X)
+
+struct S {
+ template<typename T>
+ void f(T) noexcept(B);
+
+ struct N {
+ template<typename T>
+ void f2(T) noexcept(B);
+ };
+
+ static constexpr bool B = true;
+};
+
+S s;
+SA(noexcept(s.f(10)));
+S::N n;
+SA(noexcept(n.f2(10)));
+
+struct Bad {
+ template<typename T>
+ using U = void() noexcept(B); // { dg-error "not declared" }
+
+ template<typename T>
+ friend void friendo() noexcept(B); // { dg-error "not declared" }
+
+ static constexpr bool B = true;
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept72.C b/gcc/testsuite/g++.dg/cpp0x/noexcept72.C
new file mode 100644
index 0000000..f1455b3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept72.C
@@ -0,0 +1,21 @@
+// PR c++/101715
+// { dg-do compile { target c++11 } }
+
+template <typename T> struct S {
+ S<T> bar() noexcept(T::value); // #1
+ S<T> foo() noexcept(T::value); // #2
+};
+
+template <typename T> S<T> S<T>::foo() noexcept(T::value) {} // #3
+
+template <typename T> struct S2 {
+ S2<T> bar1() noexcept(T::value);
+ S2<T> bar2() noexcept(T::value);
+ S2<T> bar3() noexcept(T::value);
+ S2<T> bar4() noexcept(T::value);
+ S2<T> bar5() noexcept(T::value);
+ S2<T> baz() noexcept(T::value2);
+ S2<T> foo() noexcept(T::value);
+};
+
+template <typename T> S2<T> S2<T>::foo() noexcept(T::value) {}
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept73.C b/gcc/testsuite/g++.dg/cpp0x/noexcept73.C
new file mode 100644
index 0000000..24524f3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept73.C
@@ -0,0 +1,13 @@
+// PR c++/101715
+// { dg-do compile { target c++11 } }
+
+template <typename T> struct S { };
+
+template<typename T>
+struct A
+{
+ A& foo(A&&) noexcept((S<T>::value));
+ A& assign(A&&) noexcept((S<T>::value));
+};
+template<typename T>
+A<T>& A<T>::foo(A&&) noexcept((S<T>::value)) {}
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept74.C b/gcc/testsuite/g++.dg/cpp0x/noexcept74.C
new file mode 100644
index 0000000..c439c9d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept74.C
@@ -0,0 +1,11 @@
+// PR c++/104079
+// { dg-do compile { target c++11 } }
+
+template<bool B>
+struct AT {
+ static void f() noexcept(B);
+
+ void g() noexcept(noexcept(f())) {
+ static_assert(noexcept(f()), "");
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept74a.C b/gcc/testsuite/g++.dg/cpp0x/noexcept74a.C
new file mode 100644
index 0000000..008654d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept74a.C
@@ -0,0 +1,12 @@
+// PR c++/104079
+// { dg-do compile { target c++11 } }
+// A variant of noexcept74.C where f is a function template.
+
+template<bool B>
+struct AT {
+ template<class...> static void f() noexcept(B);
+
+ void g() noexcept(noexcept(f())) {
+ static_assert(noexcept(f()), "");
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-array1.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-array1.C
new file mode 100644
index 0000000..1ab1435
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-array1.C
@@ -0,0 +1,6 @@
+// PR c++/103946
+// { dg-do compile { target c++11 } }
+
+struct s1 { s1(); };
+class s2 { s1 f1[2]{}; };
+s2 a;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template21.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template21.C
new file mode 100644
index 0000000..79d43a5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template21.C
@@ -0,0 +1,8 @@
+// PR c++/101532
+// { dg-do compile { target c++11 } }
+
+struct A { private: ~A(); };
+
+template<class> struct B { A a = A(); }; // { dg-error "private" }
+
+B<int> b; // { dg-error "deleted" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template21a.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template21a.C
new file mode 100644
index 0000000..08fd37b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template21a.C
@@ -0,0 +1,10 @@
+// PR c++/104225
+// { dg-do compile { target c++11 } }
+
+struct A { private: ~A(); };
+
+template<class> struct B { A a = A(); }; // { dg-error "private" }
+
+int main() {
+ new B<int>; // { dg-error "deleted" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-warn1.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-warn1.C
new file mode 100644
index 0000000..aacc8b2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-warn1.C
@@ -0,0 +1,10 @@
+// PR c++/103347
+// { dg-do compile { target c++11_down } }
+
+#include "nsdmi-warn1.h"
+
+struct A {
+ void *x = NULL; // { dg-error "11:only available" "" { target c++98_only } }
+ void *y{NULL}; // { dg-error "only available|extended initializer" "" { target c++98_only } }
+ int z = 1 + 2; // { dg-error "9:only available" "" { target c++98_only } }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-warn1.h b/gcc/testsuite/g++.dg/cpp0x/nsdmi-warn1.h
new file mode 100644
index 0000000..ee5be5a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-warn1.h
@@ -0,0 +1,2 @@
+#pragma GCC system_header
+#define NULL (void *)0
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr56868.cpp b/gcc/testsuite/g++.dg/cpp0x/pr56868.C
index afa7edb..afa7edb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr56868.cpp
+++ b/gcc/testsuite/g++.dg/cpp0x/pr56868.C
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr65327.C b/gcc/testsuite/g++.dg/cpp0x/pr65327.C
index 6e888eb..e814995 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr65327.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr65327.C
@@ -14,5 +14,5 @@ foo ()
constexpr volatile int // { dg-warning "deprecated" "" { target c++2a } }
bar ()
{
- return i;
-} // { dg-error "lvalue-to-rvalue conversion of a volatile lvalue" }
+ return i; // { dg-error "lvalue-to-rvalue conversion of a volatile lvalue" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual21.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual21.C
new file mode 100644
index 0000000..7f867c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual21.C
@@ -0,0 +1,23 @@
+// PR c++/104173
+// { dg-do compile { target c++11 } }
+
+struct QString {
+ QString toLower() &&;
+};
+
+struct QCoreApplication {
+ static QString applicationName();
+};
+
+QCoreApplication* instance();
+
+void f() {
+ instance()->applicationName().toLower();
+}
+
+template<class...>
+void g() {
+ instance()->applicationName().toLower();
+}
+
+template void g<>();
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn2.C b/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn2.C
index 4a02ab2..c343f32 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn2.C
@@ -5,5 +5,6 @@ template <class A0, class... As> struct tuple
tuple<As...> tail;
template <int Offset, class... More> int apply(const More&... more) {
return tail.apply<1>(more...); // { dg-error "" } needs .template
+ // { dg-warning "keyword before dependent template name" "" { target *-*-* } .-1 }
}
};
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn12.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn12.C
index 224f278..9888579 100644
--- a/gcc/testsuite/g++.dg/cpp1y/auto-fn12.C
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn12.C
@@ -1,5 +1,6 @@
// { dg-do compile { target c++14 } }
// { dg-final { scan-assembler "_ZN1AIiEcvDaEv" } }
+// { dg-additional-options -fno-implicit-constexpr }
template <class T>
struct A {
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-89074-1.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-89074-1.C
new file mode 100644
index 0000000..9d7e82a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-89074-1.C
@@ -0,0 +1,28 @@
+// PR c++/89074
+// { dg-do compile { target c++14 } }
+
+constexpr bool
+foo ()
+{
+ int a[] = { 1, 2 };
+ int b[] = { 3, 4 };
+
+ if (&a[0] == &b[0])
+ return false;
+
+ if (&a[1] == &b[0])
+ return false;
+
+ if (&a[1] == &b[1])
+ return false;
+
+ if (&a[2] == &b[1])
+ return false;
+
+ if (&a[2] == &b[0]) // { dg-error "is not a constant expression" }
+ return false;
+
+ return true;
+}
+
+constexpr bool a = foo ();
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-89074-2.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-89074-2.C
new file mode 100644
index 0000000..6a088ee
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-89074-2.C
@@ -0,0 +1,19 @@
+// PR c++/89074
+// { dg-do compile { target c++14 } }
+
+constexpr bool
+foo ()
+{
+ int a[] = { 1, 2 };
+ int b[] = { 3, 4 };
+
+ if (a + 0 == b + 0)
+ return false;
+
+ if (a + 1 == b + 0)
+ return false;
+
+ return true;
+}
+
+static_assert (foo (), "");
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-89074-3.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-89074-3.C
new file mode 100644
index 0000000..91a2e99
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-89074-3.C
@@ -0,0 +1,132 @@
+// PR c++/89074
+// { dg-do compile { target c++14 } }
+
+int fn1 (void) { return 0; }
+int fn2 (void) { return 1; }
+
+constexpr bool
+f1 ()
+{
+ char a[] = { 1, 2, 3, 4 };
+
+ if (&a[1] == "foo")
+ return false;
+
+ if (&a[1] == &"foo"[4])
+ return false;
+
+ if (&"foo"[1] == &a[0])
+ return false;
+
+ if (&"foo"[3] == &a[4])
+ return false;
+
+ if (&a[0] == "foo")
+ return false;
+
+ // Pointer to start of one object (var) and end of another one (literal)
+ if (&a[0] == &"foo"[4]) // { dg-error "is not a constant expression" }
+ return false;
+
+ return true;
+}
+
+constexpr bool
+f2 ()
+{
+ char a[] = { 1, 2, 3, 4 };
+
+ // Pointer to end of one object (var) and start of another one (literal)
+ if (&a[4] == "foo") // { dg-error "is not a constant expression" }
+ return false;
+
+ return true;
+}
+
+char v[] = { 1, 2, 3, 4 };
+
+constexpr bool
+f3 ()
+{
+ char a[] = { 1, 2, 3, 4 };
+
+ if (&a[1] == &v[1])
+ return false;
+
+ if (&a[0] == &v[3])
+ return false;
+
+ if (&a[2] == &v[4])
+ return false;
+
+ // Pointer to start of one object (automatic var) and end of another one (non-automagic var)
+ if (&a[0] == &v[4]) // { dg-error "is not a constant expression" }
+ return false;
+
+ return true;
+}
+
+constexpr bool
+f4 ()
+{
+ char a[] = { 1, 2, 3, 4, 5 };
+
+ // Pointer to end of one object (automatic var) and start of another one (non-automagic var)
+ if (&a[5] == &v[0]) // { dg-error "is not a constant expression" }
+ return false;
+
+ return true;
+}
+
+constexpr bool
+f5 ()
+{
+ if (fn1 != fn1)
+ return false;
+
+ if (fn1 == fn2)
+ return false;
+
+ if (&"abcde"[0] == &"edcba"[1])
+ return false;
+
+ if (&"abcde"[1] == &"edcba"[6])
+ return false;
+
+ // Pointer to start of one object (literal) and end of another one (literal)
+ if (&"abcde"[0] == &"edcba"[6]) // { dg-error "is not a constant expression" }
+ return false;
+
+ return true;
+}
+
+constexpr bool
+f6 ()
+{
+ // Pointer to start of one object (literal) and end of another one (literal)
+ if (&"abcde"[6] == &"edcba"[0]) // { dg-error "is not a constant expression" }
+ return false;
+
+ return true;
+}
+
+constexpr bool
+f7 ()
+{
+ if (&"abcde"[3] == &"fabcde"[3])
+ return false;
+
+ // These could be suffix merged, with &"abcde"[0] == &"fabcde"[1].
+ if (&"abcde"[3] == &"fabcde"[4]) // { dg-error "is not a constant expression" }
+ return false;
+
+ return true;
+}
+
+constexpr bool a = f1 ();
+constexpr bool b = f2 ();
+constexpr bool c = f3 ();
+constexpr bool d = f4 ();
+constexpr bool e = f5 ();
+constexpr bool f = f6 ();
+constexpr bool g = f7 ();
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-89285-2.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-89285-2.C
index 656bc9c..ea44daa 100644
--- a/gcc/testsuite/g++.dg/cpp1y/constexpr-89285-2.C
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-89285-2.C
@@ -10,7 +10,7 @@ struct B {
int *c = &x->a;
while (*c)
c = reinterpret_cast<int *>((reinterpret_cast<char *>(c) + *c));
- *c = reinterpret_cast<char *>(this) - reinterpret_cast<char *>(c);
+ *c = reinterpret_cast<char *>(this) - reinterpret_cast<char *>(c); // { dg-error "reinterpret_cast" }
}
};
struct C : A {
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-89285.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-89285.C
index 3809e1f..26aab9b 100644
--- a/gcc/testsuite/g++.dg/cpp1y/constexpr-89285.C
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-89285.C
@@ -17,4 +17,4 @@ struct C : A {
B bar {this};
};
-constexpr C foo {}; // { dg-message "expansion of" }
+constexpr C foo {}; // { dg-message "" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C
new file mode 100644
index 0000000..5ac8720
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C
@@ -0,0 +1,9 @@
+// PR c++/94716
+// { dg-do compile { target c++14 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
+
+template <int> char v = 0;
+static_assert (&v<2> == &v<2>, "");
+static_assert (&v<0> != &v<1>, "");
+constexpr bool a = &v<2> == &v<2>;
+constexpr bool b = &v<0> != &v<1>;
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-base2.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-base2.C
new file mode 100644
index 0000000..a267c14
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-base2.C
@@ -0,0 +1,15 @@
+// PR c++/103879
+// { dg-do compile { target c++14 } }
+
+struct A { int n = 42; };
+struct B : A { };
+struct C { B b; };
+
+constexpr int f() {
+ C c;
+ A& a = static_cast<A&>(c.b);
+ B& b = static_cast<B&>(a);
+ return b.n;
+}
+
+static_assert(f() == 42, "");
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-base2a.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-base2a.C
new file mode 100644
index 0000000..9eb72b9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-base2a.C
@@ -0,0 +1,17 @@
+// PR c++/103879
+// { dg-do compile { target c++14 } }
+
+struct A { int n = 42; };
+struct Y { int m = 0; };
+struct X : Y, A { };
+struct B : X { };
+struct C { B b; };
+
+constexpr int f() {
+ C c;
+ A& a = static_cast<A&>(c.b);
+ B& b = static_cast<B&>(a);
+ return b.n;
+}
+
+static_assert(f() == 42, "");
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-loop5.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-loop5.C
index 02f372d..150aadf 100644
--- a/gcc/testsuite/g++.dg/cpp1y/constexpr-loop5.C
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-loop5.C
@@ -9,11 +9,11 @@ template<typename>
constexpr int count()
{
auto item = thing {};
- for(; (item.foo(), false);); // { dg-error "foo" }
+ for(; (item.foo(), false);); // { dg-error "foo" "" { target { ! implicit_constexpr } } }
return 0;
}
int main()
{
- static_assert( count<int>() == 0, "" ); // { dg-error "" }
+ static_assert( count<int>() == 0, "" ); // { dg-error "" "" { target { ! implicit_constexpr } } }
}
diff --git a/gcc/testsuite/g++.dg/cpp1y/decltype-auto2.C b/gcc/testsuite/g++.dg/cpp1y/decltype-auto2.C
new file mode 100644
index 0000000..56e011e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/decltype-auto2.C
@@ -0,0 +1,12 @@
+// PR c++/103403
+// { dg-do compile { target c++14 } }
+
+template<typename T>
+auto constexpr RtoL1(T&& r) -> decltype(auto) {
+ return (r);
+};
+int main() {
+ int t;
+ int x{3};
+ decltype (RtoL1(x+0)) y = t;
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/decltype-auto3.C b/gcc/testsuite/g++.dg/cpp1y/decltype-auto3.C
new file mode 100644
index 0000000..914e87f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/decltype-auto3.C
@@ -0,0 +1,12 @@
+// PR c++/103403
+// { dg-do compile { target c++14 } }
+
+int main()
+{
+ int i = 1;
+ int&& r = 1;
+
+ decltype(auto) ri = (i);
+ decltype(auto) rr = (r);
+ decltype((r)) rr2 = (r);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/decltype-auto4.C b/gcc/testsuite/g++.dg/cpp1y/decltype-auto4.C
new file mode 100644
index 0000000..9765857
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/decltype-auto4.C
@@ -0,0 +1,65 @@
+// PR c++/103403
+// { dg-do compile { target c++14 } }
+
+struct false_type { static constexpr bool value = false; };
+struct true_type { static constexpr bool value = true; };
+template<class T, class U>
+struct is_same : false_type {};
+template<class T>
+struct is_same<T, T> : true_type {};
+
+int fn ();
+int &ref ();
+int &&rref ();
+
+struct S {
+ int i;
+ int &r = i;
+};
+
+void
+ids ()
+{
+ const S *s = new S();
+ int i;
+ int &ir = i;
+ decltype(auto) r1 = s->i;
+ static_assert (is_same<decltype(r1), int>::value, "");
+ decltype(auto) r2 = s->r;
+ static_assert (is_same<decltype(r2), int&>::value, "");
+ decltype(auto) r3 = i;
+ static_assert (is_same<decltype(r3), int>::value, "");
+ decltype(auto) r4 = ir;
+ static_assert (is_same<decltype(r4), int&>::value, "");
+}
+
+void
+nonids ()
+{
+ const S *s = new S();
+ int i;
+ int &ir = i;
+ int &&irr = 42;
+ decltype(auto) r1 = fn ();
+ static_assert (is_same<decltype(r1), int>::value, "");
+ decltype(auto) r2 = (fn ());
+ static_assert (is_same<decltype(r2), int>::value, "");
+ decltype(auto) r3 = ref ();
+ static_assert (is_same<decltype(r3), int&>::value, "");
+ decltype(auto) r4 = (ref ());
+ static_assert (is_same<decltype(r4), int&>::value, "");
+ decltype(auto) r5 = rref ();
+ static_assert (is_same<decltype(r5), int&&>::value, "");
+ decltype(auto) r6 = (rref ());
+ static_assert (is_same<decltype(r6), int&&>::value, "");
+ decltype(auto) r8 = (s->i);
+ static_assert (is_same<decltype(r8), const int&>::value, "");
+ decltype(auto) r9 = (s->r);
+ static_assert (is_same<decltype(r9), int&>::value, "");
+ decltype(auto) r10 = (i);
+ static_assert (is_same<decltype(r10), int&>::value, "");
+ decltype(auto) r11 = (ir);
+ static_assert (is_same<decltype(r11), int&>::value, "");
+ decltype(auto) r12 = (irr);
+ static_assert (is_same<decltype(r12), int&>::value, "");
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/decltype-auto5.C b/gcc/testsuite/g++.dg/cpp1y/decltype-auto5.C
new file mode 100644
index 0000000..01cc54f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/decltype-auto5.C
@@ -0,0 +1,35 @@
+// PR c++/102229
+// { dg-do compile { target c++14 } }
+
+struct S {
+ constexpr static decltype(auto) x = 42;
+ const constexpr static decltype(auto) y = 42; // { dg-error "cannot be cv-qualified" }
+
+ constexpr decltype(auto) mfn1 () { return 0; }
+ const constexpr decltype(auto) mfn2 () { return 0; } // { dg-error "cannot be cv-qualified" }
+};
+
+constexpr decltype(auto) i = 42;
+const constexpr decltype(auto) j = 42; // { dg-error "cannot be cv-qualified" }
+
+constexpr decltype(auto) fn() { return 42; }
+const decltype(auto) fn2() { return 42; } // { dg-error "cannot be cv-qualified" }
+
+auto constexpr foo() -> const decltype(auto) // { dg-error "cannot be cv-qualified" }
+{
+ return 0;
+}
+
+#if __cpp_concepts
+template<typename>
+concept C = true;
+
+constexpr C decltype(auto) x1 = 0;
+const constexpr C decltype(auto) x2 = 0; // { dg-error "cannot be cv-qualified" "" { target c++20 } }
+
+constexpr C decltype(auto) fn3() { return 0; }
+const constexpr C decltype(auto) fn4() { return 0; } // { dg-error "cannot be cv-qualified" "" { target c++20 } }
+#endif
+
+template<const decltype(auto) = 42> // { dg-error "cannot be cv-qualified" }
+void g ();
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-85713-2.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-85713-2.C
index 8fb8dfd..dbc9e8c 100644
--- a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-85713-2.C
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-85713-2.C
@@ -2,6 +2,6 @@
// { dg-do compile { target c++14 } }
auto l4 = [](auto v, auto (&array (int)) [5]) -> int { return v + array[0]; };
-auto l5 = [](auto v, auto (&array (auto)) [5]) -> int { return v + array[0]; };
+auto l5 = [](auto v, auto (&array (auto)) [5]) -> int { return v + array[0]; }; // { dg-error ".auto. parameter not permitted in this context" }
auto l6 = [](auto v, auto (&array (int int)) [5]) -> int { return v + array[0]; }; // { dg-error "two or more data types" }
auto l7 = [](auto v, auto (&array (int auto)) [5]) -> int { return v + array[0]; }; // { dg-error "two or more data types" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/noexcept2.C b/gcc/testsuite/g++.dg/cpp1y/noexcept2.C
new file mode 100644
index 0000000..38dd05c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/noexcept2.C
@@ -0,0 +1,20 @@
+// PR c++/102338
+// { dg-do compile { target c++14 } }
+
+struct S {
+ template<typename T>
+ static auto f(T&& t) noexcept {
+ return true;
+ }
+
+ template<typename T, typename... Ts>
+ static auto f(T&& t, Ts&& ... ts) noexcept(noexcept(f(ts...))) {
+ return f(ts...);
+ }
+
+};
+
+int main() {
+ S::f(true, 0, 5u);
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr104031.C b/gcc/testsuite/g++.dg/cpp1y/pr104031.C
new file mode 100644
index 0000000..5f73662
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr104031.C
@@ -0,0 +1,23 @@
+// PR c++/104031
+// { dg-do run { target c++14 } }
+// { dg-options "-O2" }
+
+struct A {
+ A () {}
+ ~A () {}
+};
+struct B {
+ A a;
+ int b = 0;
+};
+struct C
+{
+ [[gnu::noipa]]
+ C (B x) { if (x.b != 42) __builtin_abort (); }
+};
+static C c ({ .a = A{}, .b = 42 });
+
+int
+main ()
+{
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60054.C b/gcc/testsuite/g++.dg/cpp1y/pr60054.C
index f51120f..0d4925a 100644
--- a/gcc/testsuite/g++.dg/cpp1y/pr60054.C
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60054.C
@@ -6,6 +6,6 @@ template<typename T> decltype(T{}) fooB(T);
void bar()
{
- fooA((auto*)0); // { dg-error "invalid use" }
- fooB((auto*)0); // { dg-error "invalid use" }
+ fooA((auto*)0); // { dg-error "expected" }
+ fooB((auto*)0); // { dg-error "expected" }
}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60332.C b/gcc/testsuite/g++.dg/cpp1y/pr60332.C
index e75ab85..f3a7980 100644
--- a/gcc/testsuite/g++.dg/cpp1y/pr60332.C
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60332.C
@@ -3,4 +3,5 @@
void foo();
-auto f = (auto(*)())(&foo); // { dg-error "invalid" }
+auto f = (auto(*)())(&foo); // { dg-error "expected" }
+// { dg-error "only available" "" { target c++20_down } .-1 }
diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ69.C b/gcc/testsuite/g++.dg/cpp1y/var-templ69.C
new file mode 100644
index 0000000..420d617
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/var-templ69.C
@@ -0,0 +1,5 @@
+// PR c++/100652
+// { dg-do compile { target c++14 } }
+
+template<class...> int var;
+template<class... Ts> char var<bool, Ts>; // { dg-error "parameter packs not expanded" }
diff --git a/gcc/testsuite/g++.dg/cpp1z/aggr-base11.C b/gcc/testsuite/g++.dg/cpp1z/aggr-base11.C
new file mode 100644
index 0000000..88625dc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/aggr-base11.C
@@ -0,0 +1,19 @@
+// PR c++/96876
+// { dg-do compile { target c++17 } }
+
+struct B {
+protected:
+ ~B() {} // { dg-message "" }
+};
+
+struct A { };
+struct C1: B { int n; };
+struct C2: A, B { int n; };
+
+A af ();
+int f();
+
+void g() {
+ C1 c1{ {}, f()}; // { dg-error "protected" }
+ C2 c2{ af(), {}, f()}; // { dg-error "protected" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction-new1.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction-new1.C
new file mode 100644
index 0000000..7028335
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction-new1.C
@@ -0,0 +1,16 @@
+// PR c++/101988
+// { dg-do compile { target c++17 } }
+
+template<typename T>
+struct A {
+ A(T);
+ A();
+};
+auto p1 = new A[]{1}; // { dg-error "creating array of template placeholder type" }
+auto p2 = new A[1]{1}; // { dg-error "invalid use of placeholder" }
+auto p3 = new A<int>[]{1};
+auto p4 = new A<int>[1]{1};
+auto p5 = new A[]{1, 2}; // { dg-error "creating array of template placeholder type" }
+auto p6 = new A<int>[]{1, 2};
+auto p7 = new A<int>[]{A(1), A(1)};
+auto p8 = new A<int>[2]{A(1), A(1)};
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction100.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction100.C
new file mode 100644
index 0000000..9fa307f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction100.C
@@ -0,0 +1,13 @@
+// PR c++/90782
+// { dg-do compile { target c++17 } }
+
+template<class... A>
+struct bar {
+ template<class B>
+ bar(B& obj, void(B::*f)(A...)const=&B::operator()){}
+};
+int main() {
+ const auto f1 = [](){};
+ bar f8(f1);
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction101.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction101.C
new file mode 100644
index 0000000..379eb96
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction101.C
@@ -0,0 +1,17 @@
+// PR c++/91911
+// { dg-do compile { target c++17 } }
+
+template<class T>
+struct span {
+ using value_type = T;
+ span(T);
+};
+
+template<class T>
+using SpanType = decltype(span{T()});
+
+template<class T>
+using ConstSpanType = span<const typename SpanType<T>::value_type>;
+
+using type = ConstSpanType<int>;
+using type = span<const int>;
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction101a.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction101a.C
new file mode 100644
index 0000000..97869e6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction101a.C
@@ -0,0 +1,22 @@
+// PR c++/91911
+// { dg-do compile { target c++17 } }
+// A variant of class-deduction101.C where SpanType has more levels than
+// ConstSpanType.
+
+template<class T>
+struct span {
+ using value_type = T;
+ span(T);
+};
+
+template<class>
+struct A {
+ template<class T>
+ using SpanType = decltype(span{T()});
+};
+
+template<class T>
+using ConstSpanType = span<const typename A<int>::SpanType<const T>::value_type>;
+
+using type = ConstSpanType<int>;
+using type = span<const int>;
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction101b.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction101b.C
new file mode 100644
index 0000000..a823c9c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction101b.C
@@ -0,0 +1,22 @@
+// PR c++/91911
+// { dg-do compile { target c++17 } }
+// A variant of class-deduction101.C where SpanType has fewer levels than
+// ConstSpanType.
+
+template<class T>
+struct span {
+ using value_type = T;
+ span(T);
+};
+
+template<class T>
+using SpanType = decltype(span{T()});
+
+template<class>
+struct B {
+ template<class T>
+ using ConstSpanType = span<const typename SpanType<T>::value_type>;
+};
+
+using type = B<int>::ConstSpanType<int>;
+using type = span<const int>;
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction102.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction102.C
new file mode 100644
index 0000000..2050478
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction102.C
@@ -0,0 +1,25 @@
+// PR c++/98077
+// { dg-do compile { target c++17 } }
+
+template<class R>
+struct function {
+ template<class T> function(T);
+ using type = R;
+};
+
+template<class T> function(T) -> function<decltype(T()())>;
+
+template<class T>
+struct CallableTrait;
+
+template<class R>
+struct CallableTrait<function<R>> { using ReturnType = R; };
+
+template<class F>
+using CallableTraitT = CallableTrait<decltype(function{F()})>;
+
+template<class F>
+using ReturnType = typename CallableTraitT<F>::ReturnType;
+
+using type = ReturnType<int(*)()>;
+using type = int;
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction102a.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction102a.C
new file mode 100644
index 0000000..7a4b684
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction102a.C
@@ -0,0 +1,27 @@
+// PR c++/98077
+// { dg-do compile { target c++17 } }
+// A variant of class-deduction102.C where the template placeholder is a template
+// template parameter.
+
+template<class R>
+struct function {
+ template<class T> function(T);
+ using type = R;
+};
+
+template<class T> function(T) -> function<decltype(T()())>;
+
+template<class T>
+struct CallableTrait;
+
+template<class R>
+struct CallableTrait<function<R>> { using ReturnType = R; };
+
+template<class F, template<class> class Tmpl>
+using CallableTraitT = CallableTrait<decltype(Tmpl{F()})>;
+
+template<class F, template<class> class Tmpl>
+using ReturnType = typename CallableTraitT<F, Tmpl>::ReturnType;
+
+using type = ReturnType<int(*)(), function>;
+using type = int;
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction102b.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction102b.C
new file mode 100644
index 0000000..64e3f8c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction102b.C
@@ -0,0 +1,30 @@
+// PR c++/98077
+// { dg-do compile { target c++17 } }
+// A variant of class-deduction102.C where the template placeholder is a template
+// template parameter and ReturnType has more levels than CallableTraitT.
+
+template<class R>
+struct function {
+ template<class T> function(T);
+ using type = R;
+};
+
+template<class T> function(T) -> function<decltype(T()())>;
+
+template<class T>
+struct CallableTrait;
+
+template<class R>
+struct CallableTrait<function<R>> { using ReturnType = R; };
+
+template<class F, template<class> class Tmpl>
+using CallableTraitT = CallableTrait<decltype(Tmpl{F()})>;
+
+template<class>
+struct A {
+ template<class F, template<class> class Tmpl>
+ using ReturnType = typename CallableTraitT<F, Tmpl>::ReturnType;
+};
+
+using type = A<int>::ReturnType<int(*)(), function>;
+using type = int;
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction103.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction103.C
new file mode 100644
index 0000000..a1a3808
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction103.C
@@ -0,0 +1,22 @@
+// PR c++/103672
+// { dg-do compile { target c++17 } }
+
+template<class T>
+struct unique {
+ template<class... Args>
+ T* operator()(Args&&... args);
+};
+
+template<template<class...> class T, class... Args>
+using deduced_type = decltype(T{Args{}...});
+
+template<template<class> class F, template<class...> class T, class... Args>
+auto make(Args&&... args) {
+ return F<deduced_type<T, Args...>>{}(args...);
+}
+
+template<class A, class B>
+struct Foo { Foo(A,B); };
+
+using type = decltype(make<unique, Foo>(1, 2));
+using type = Foo<int, int>*;
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction104.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction104.C
new file mode 100644
index 0000000..a34dea0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction104.C
@@ -0,0 +1,17 @@
+// PR c++/82632
+// { dg-do compile { target c++17 } }
+
+template<class T> struct Optional {
+ template<class U> Optional(U&&);
+};
+
+template<class A> Optional(A) -> Optional<A>;
+
+Optional opt(1729);
+Optional dupe(opt);
+
+using ty1 = decltype(opt);
+using ty1 = Optional<int>;
+
+using ty2 = decltype(dupe);
+using ty2 = Optional<int>;
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction105.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction105.C
new file mode 100644
index 0000000..73a9c6b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction105.C
@@ -0,0 +1,17 @@
+// PR c++/82632
+// { dg-do compile { target c++17 } }
+
+template<class T, int = 1>
+struct Foo {
+ Foo() = default;
+ Foo(const Foo&) = delete;
+
+ template<int I>
+ Foo(const Foo<T, I>&);
+};
+
+template<class T, int I>
+Foo(Foo<T,I>) -> Foo<T,I+1>;
+
+Foo<int> a;
+Foo b = a;
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction106.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction106.C
new file mode 100644
index 0000000..b4c4d26
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction106.C
@@ -0,0 +1,16 @@
+// PR c++/104294
+// { dg-do compile { target c++17 } }
+
+template<class> struct B;
+
+template<class R, class... Args>
+struct B<R(Args...)> {
+ template<class T> struct C { C(T); };
+ C(decltype(nullptr)) -> C<void*>;
+};
+
+using ty1 = decltype(B<char(int)>::C{0});
+using ty1 = B<char(int)>::C<int>;
+
+using ty2 = decltype(B<char(int)>::C{nullptr});
+using ty2 = B<char(int)>::C<void*>;
diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-89074-1.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-89074-1.C
new file mode 100644
index 0000000..ca91765
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-89074-1.C
@@ -0,0 +1,26 @@
+// PR c++/89074
+// { dg-do compile { target c++17 } }
+
+struct S { int s; };
+struct T : public S { };
+struct U : public T { };
+
+constexpr bool
+foo ()
+{
+ U a[] = { 1, 2, 3, 4 };
+ U b[] = { 5, 6, 7, 8 };
+ T *c = (T *) a + 1;
+ S *d = (S *) c + 2;
+ S *e = (S *) b + 1;
+
+ if (a + 0 == b + 0)
+ return false;
+
+ if (d == e)
+ return false;
+
+ return true;
+}
+
+static_assert (foo (), "");
diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C
new file mode 100644
index 0000000..d40d536
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C
@@ -0,0 +1,9 @@
+// { dg-do compile { target c++17 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
+
+inline int a = 0;
+inline int b = 0;
+static_assert (&a == &a);
+static_assert (&a != &b);
+constexpr bool c = &a == &a;
+constexpr bool d = &a != &b;
diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-if36.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-if36.C
new file mode 100644
index 0000000..e425af2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-if36.C
@@ -0,0 +1,20 @@
+// PR c++/103310
+// Test that only manifestly-constant-evaluated comparisons lock a symbol's
+// weakness.
+
+// { dg-do compile { target c++17 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
+
+extern void weakfn1 (void);
+extern void weakfn2 (void);
+
+void call_weakfn (void)
+{
+ if (weakfn1)
+ weakfn1 ();
+ if constexpr (weakfn2)
+ weakfn2 ();
+}
+
+extern void weakfn1 (void) __attribute__((weak));
+extern void weakfn2 (void) __attribute__((weak)); // { dg-error "declared weak after being used" }
diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-lambda7.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-lambda7.C
index 474ce88..faac00c 100644
--- a/gcc/testsuite/g++.dg/cpp1z/constexpr-lambda7.C
+++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-lambda7.C
@@ -8,5 +8,5 @@ struct NonLiteral {
int n;
};
-static_assert( ID (NonLiteral{3}).n == 3); // { dg-error "non-literal" }
+static_assert( ID (NonLiteral{3}).n == 3); // { dg-error "non-literal" "" { target { ! implicit_constexpr } } }
// { dg-prune-output "static assertion" }
diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp-decltype1.C b/gcc/testsuite/g++.dg/cpp1z/decomp-decltype1.C
new file mode 100644
index 0000000..e8ca0fc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/decomp-decltype1.C
@@ -0,0 +1,28 @@
+// PR c++/81176
+// { dg-do compile { target c++17 } }
+
+namespace std {
+ template<typename T> struct tuple_size;
+ template<int, typename> struct tuple_element;
+}
+
+struct A {
+ int i;
+ template <int I> int& get() { return i; }
+};
+
+template<> struct std::tuple_size<A> { static const int value = 2; };
+template<int I> struct std::tuple_element<I,A> { using type = int; };
+
+template <class,class> struct same_type;
+template <class T> struct same_type<T,T> {};
+
+void
+foo (A x)
+{
+ auto [ a, b ] = x;
+ decltype(auto) c = a;
+ same_type<decltype(a), int>{};
+ same_type<decltype(c), int>{};
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp1z/eval-order11.C b/gcc/testsuite/g++.dg/cpp1z/eval-order11.C
new file mode 100644
index 0000000..19a24c8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/eval-order11.C
@@ -0,0 +1,89 @@
+// PR c++/70796
+// { dg-do run { target c++11 } }
+// { dg-options "-fstrong-eval-order" { target c++14_down } }
+
+struct A
+{
+ int x = 0;
+ A & operator ++ () { ++x; return *this; }
+};
+struct B
+{
+ A first, second;
+ B (A x, A y) : first{x}, second{y} {}
+};
+struct C
+{
+ int first, second;
+ C (int x, int y) : first{x}, second{y} {}
+};
+struct D
+{
+ int d;
+ void foo (int x, D *y)
+ {
+ if (y != this + 1)
+ __builtin_abort ();
+ d = x;
+ }
+};
+D d[2] = { { 1 }, { 2 } };
+
+void
+foo ()
+{
+ int i = 0;
+ C p{++i, ++i};
+ if (p.first != 1 || p.second != 2)
+ __builtin_abort ();
+}
+
+void
+bar ()
+{
+ int i = 0;
+ C p{++i, ++i};
+ if (p.first != 1 || p.second != 2)
+ __builtin_abort ();
+ int &j = i;
+ C q{++j, ++j};
+ if (q.first != 3 || q.second != 4)
+ __builtin_abort ();
+}
+
+void
+baz ()
+{
+ int i = 0;
+ C p{(int &) ++i, (int &) ++i};
+ if (p.first != 1 || p.second != 2)
+ __builtin_abort ();
+}
+
+void
+qux ()
+{
+ A i;
+ B p{++i, ++i};
+ if (p.first.x != 1 || p.second.x != 2)
+ __builtin_abort ();
+}
+
+void
+corge ()
+{
+ D *p = &d[0];
+ p->foo (3, ++p);
+ if (d[0].d != 3 || d[1].d != 2)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ bar ();
+ baz ();
+ foo ();
+ qux ();
+ corge ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1z/fold13.C b/gcc/testsuite/g++.dg/cpp1z/fold13.C
new file mode 100644
index 0000000..9d7554f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/fold13.C
@@ -0,0 +1,29 @@
+// { dg-do compile { target c++17 } }
+// Verify constexpr evaluation of a large left fold logical expression
+// isn't quadratic in the size of the expanded expression.
+
+template<int> struct S { static constexpr bool value = true; };
+
+template<class T, T...> struct integer_sequence { };
+
+template<class T, T N>
+using make_integer_sequence
+#if __has_builtin(__make_integer_seq)
+ = __make_integer_seq<integer_sequence, T, N>;
+#else
+ = integer_sequence<T, __integer_pack(N)...>;
+#endif
+
+template<int... Is>
+constexpr bool f_impl(integer_sequence<int, Is...>) {
+ return (... && S<Is>::value);
+}
+
+static_assert(f_impl(make_integer_sequence<int, 1024>()));
+
+template<int... Is>
+constexpr bool g_impl(integer_sequence<int, Is...>) {
+ return (... || !S<Is>::value);
+}
+
+static_assert(!g_impl(make_integer_sequence<int, 1024>()));
diff --git a/gcc/testsuite/g++.dg/cpp1z/inh-ctor23.C b/gcc/testsuite/g++.dg/cpp1z/inh-ctor23.C
index fe2c2eb..c806b0e 100644
--- a/gcc/testsuite/g++.dg/cpp1z/inh-ctor23.C
+++ b/gcc/testsuite/g++.dg/cpp1z/inh-ctor23.C
@@ -1,6 +1,6 @@
// Testcase from P0136
// { dg-do compile { target c++11 } }
-// { dg-options "-fnew-inheriting-ctors -fdump-tree-gimple -O2 -fno-inline" }
+// { dg-options "-fnew-inheriting-ctors -fdump-tree-gimple -O2 -fno-inline -fno-ipa-modref" }
struct W { W(int); };
struct V: W { using W::W; };
diff --git a/gcc/testsuite/g++.dg/cpp1z/lambda-this1.C b/gcc/testsuite/g++.dg/cpp1z/lambda-this1.C
index b13ff8b..e12330a 100644
--- a/gcc/testsuite/g++.dg/cpp1z/lambda-this1.C
+++ b/gcc/testsuite/g++.dg/cpp1z/lambda-this1.C
@@ -18,7 +18,7 @@ struct A {
auto i = [=] { return a; }; // { dg-warning "implicit capture" "" { target c++2a } }
auto j = [&] { return a; };
// P0409R2 - C++2A lambda capture [=, this]
- auto k = [=, this] { return a; };// { dg-error "explicit by-copy capture of 'this' redundant with by-copy capture default" "" { target c++17_down } }
+ auto k = [=, this] { return a; };// { dg-error "explicit by-copy capture of 'this' with by-copy capture default only available with" "" { target c++17_down } }
auto l = [&, this] { return a; };
auto m = [=, *this] { return a; };// { dg-error "'*this' capture only available with" "" { target c++14_down } }
auto n = [&, *this] { return a; };// { dg-error "'*this' capture only available with" "" { target c++14_down } }
@@ -27,12 +27,12 @@ struct A {
// { dg-error "'*this' capture only available with" "" { target c++14_down } .-1 }
auto q = [=, this, *this] { return a; };// { dg-error "already captured 'this'" }
// { dg-error "'*this' capture only available with" "" { target c++14_down } .-1 }
- // { dg-error "explicit by-copy capture of 'this' redundant with by-copy capture default" "" { target c++17_down } .-2 }
+ // { dg-error "explicit by-copy capture of 'this' with by-copy capture default only available with" "" { target c++17_down } .-2 }
auto r = [=, this, this] { return a; };// { dg-error "already captured 'this'" }
- // { dg-error "explicit by-copy capture of 'this' redundant with by-copy capture default" "" { target c++17_down } .-1 }
+ // { dg-error "explicit by-copy capture of 'this' with by-copy capture default only available with" "" { target c++17_down } .-1 }
auto s = [=, *this, this] { return a; };// { dg-error "already captured 'this'" }
// { dg-error "'*this' capture only available with" "" { target c++14_down } .-1 }
- // { dg-error "explicit by-copy capture of 'this' redundant with by-copy capture default" "" { target c++17_down } .-2 }
+ // { dg-error "explicit by-copy capture of 'this' with by-copy capture default only available with" "" { target c++17_down } .-2 }
auto t = [=, *this, *this] { return a; };// { dg-error "already captured 'this'" }
// { dg-error "'*this' capture only available with" "" { target c++14_down } .-1 }
auto u = [&, this, *this] { return a; };// { dg-error "already captured 'this'" }
diff --git a/gcc/testsuite/g++.dg/cpp1z/lambda-this8.C b/gcc/testsuite/g++.dg/cpp1z/lambda-this8.C
new file mode 100644
index 0000000..4542cbd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/lambda-this8.C
@@ -0,0 +1,9 @@
+// PR c++/100493
+// { dg-do compile { target c++17 } }
+// { dg-options "" }
+
+struct A {
+ void f() {
+ [=, this] { };
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp1z/noexcept-type25.C b/gcc/testsuite/g++.dg/cpp1z/noexcept-type25.C
new file mode 100644
index 0000000..ef5c826
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/noexcept-type25.C
@@ -0,0 +1,13 @@
+// PR c++/80951
+// { dg-do compile { target c++17 } }
+
+void f() noexcept;
+void g();
+
+template<bool E>
+constexpr bool h(void (*)() noexcept(E)) {
+ return E;
+}
+
+static_assert(h(f));
+static_assert(!h(g));
diff --git a/gcc/testsuite/g++.dg/cpp1z/nontype-auto20.C b/gcc/testsuite/g++.dg/cpp1z/nontype-auto20.C
new file mode 100644
index 0000000..87a2a5f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/nontype-auto20.C
@@ -0,0 +1,5 @@
+// PR c++/104074
+// { dg-do compile { target c++17 } }
+
+template<auto> class gr_sp;
+template<class T> using gr_rp = gr_sp<T::value + 42>;
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-array2.C b/gcc/testsuite/g++.dg/cpp23/auto-array2.C
new file mode 100644
index 0000000..0643168
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-array2.C
@@ -0,0 +1,11 @@
+// PR c++/101988
+// { dg-do compile { target c++17 } }
+
+template<class T> struct A { A(); };
+A<int> a[3];
+auto (*p)[3] = &a;
+A<int> (*p2)[3] = &a;
+A (*p3)[3] = &a; // { dg-error "template placeholder type" }
+auto (&r)[3] = a;
+A<int> (&r2)[3] = a;
+A (&r3)[3] = a; // { dg-error "template placeholder type" }
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-array3.C b/gcc/testsuite/g++.dg/cpp23/auto-array3.C
new file mode 100644
index 0000000..fdf2547
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-array3.C
@@ -0,0 +1,16 @@
+// PR c++/102414
+// PR c++/101874
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+
+constexpr int sz () { return 3; }
+
+void f ()
+{
+ int a[3];
+ const int N = 3;
+ auto (*a2)[N] = &a;
+ constexpr int M = 3;
+ auto (*a3)[M] = &a;
+ auto (*a4)[sz()] = &a;
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-array4.C b/gcc/testsuite/g++.dg/cpp23/auto-array4.C
new file mode 100644
index 0000000..4385c4a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-array4.C
@@ -0,0 +1,14 @@
+// PR c++/102414
+// PR c++/101874
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+
+void
+f (int i)
+{
+ auto x[i] = { 0 }; // { dg-message "variable-length array of .auto." }
+ auto(*p)[i] = (int(*)[i])0; // { dg-message "variable-length array of .auto." }
+ int a[3];
+ auto (*a1)[0/0] = &a; // { dg-message "variable-length array of .auto." }
+// { dg-warning "division by zero" "" { target *-*-* } .-1 }
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-fncast1.C b/gcc/testsuite/g++.dg/cpp23/auto-fncast1.C
new file mode 100644
index 0000000..25e53c4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-fncast1.C
@@ -0,0 +1,14 @@
+// PR c++/103049
+// P0849R8 - auto(x)
+// { dg-do compile { target c++23 } }
+// Testcase from P0849R8.
+
+struct A {};
+void f(A&) = delete; // #1
+void f(A&&); // #2
+A& g();
+void h() {
+// f(g()); // calls #1
+ f(A(g())); // calls #2 with a temporary object
+ f(auto(g())); // calls #2 with a temporary object
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-fncast10.C b/gcc/testsuite/g++.dg/cpp23/auto-fncast10.C
new file mode 100644
index 0000000..29c779b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-fncast10.C
@@ -0,0 +1,18 @@
+// { dg-do compile { target c++23 } }
+
+struct S {
+ int i1 : auto(12);
+ int i2 : auto{12};
+ static constexpr auto x = auto(12);
+ static constexpr auto y = auto{12};
+};
+
+struct R {
+ int i;
+};
+
+static constexpr R r1 = { auto(23) };
+static constexpr R r2 = { auto{23} };
+enum E { X = auto(12), Y = auto{1u} };
+static_assert (auto(true));
+static_assert (auto{true});
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-fncast11.C b/gcc/testsuite/g++.dg/cpp23/auto-fncast11.C
new file mode 100644
index 0000000..1ae0426
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-fncast11.C
@@ -0,0 +1,19 @@
+// PR c++/103408
+// { dg-do compile { target c++23 } }
+
+static_assert(requires { auto(0); });
+static_assert(requires { auto{0}; });
+
+static_assert(requires { auto(auto(0)); });
+static_assert(requires { auto{auto{0}}; });
+
+static_assert(requires { auto(auto(auto(0))); });
+static_assert(requires { auto{auto{auto{0}}}; });
+
+static_assert(requires { requires auto(true); });
+static_assert(requires { requires auto(auto(true)); });
+
+static_assert(!requires { requires auto(false); });
+static_assert(!requires { requires auto(auto(false)); });
+
+auto f() requires (auto(false)); // { dg-error "constraints on a non-templated" }
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-fncast2.C b/gcc/testsuite/g++.dg/cpp23/auto-fncast2.C
new file mode 100644
index 0000000..327a448
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-fncast2.C
@@ -0,0 +1,62 @@
+// PR c++/103049
+// P0849R8 - auto(x)
+// { dg-do compile { target c++23 } }
+
+struct X { };
+X& fn ();
+X&& fnr ();
+
+void h()
+{
+ double v[] = { 1.2, 3.4 };
+ +auto(v);
+ +auto{v};
+ static_assert (__is_same_as (decltype (auto(v)), double *));
+ static_assert (__is_same_as (decltype (auto{v}), double *));
+ auto a1 = fn ();
+ static_assert (__is_same_as (decltype (auto(fn())), decltype (a1)));
+ static_assert (__is_same_as (decltype (auto{fn()}), decltype (a1)));
+ auto a2 = fnr ();
+ static_assert (__is_same_as (decltype (auto(fnr())), decltype (a2)));
+ static_assert (__is_same_as (decltype (auto{fnr()}), decltype (a2)));
+ +auto(1);
+ new auto(1);
+ +auto{1};
+ new auto{1};
+}
+
+template<typename T>
+void baz (T t, const T &tr, T &&trr)
+{
+ +auto(t);
+ +auto{t};
+ +auto(tr);
+ +auto{tr};
+ +auto(trr);
+ +auto{trr};
+ static_assert (__is_same_as (decltype (auto(t)), T));
+ static_assert (__is_same_as (decltype (auto{t}), T));
+ static_assert (__is_same_as (decltype (auto(tr)), T));
+ static_assert (__is_same_as (decltype (auto{tr}), T));
+ static_assert (__is_same_as (decltype (auto(trr)), T));
+ static_assert (__is_same_as (decltype (auto{trr}), T));
+}
+
+template<typename = decltype(auto(1))>
+void foo ()
+{
+}
+
+template<int = auto(1)>
+void bar ()
+{
+}
+
+void
+g()
+{
+ foo<>();
+ bar<>();
+ int i = 42;
+ baz (1, i, 42);
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-fncast3.C b/gcc/testsuite/g++.dg/cpp23/auto-fncast3.C
new file mode 100644
index 0000000..1204458
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-fncast3.C
@@ -0,0 +1,21 @@
+// PR c++/103049
+// P0849R8 - auto(x)
+// { dg-do compile { target c++23 } }
+// Test invalid use.
+
+void
+f ()
+{
+ char x[] = "foo";
+ +decltype(auto){x}; // { dg-error "invalid use of .decltype\\(auto\\)." }
+ +decltype(auto)(x); // { dg-error "invalid use of .decltype\\(auto\\)." }
+
+ +auto(); // { dg-error "invalid use of .auto." }
+ new auto(); // { dg-error "requires exactly one element" }
+ +auto{}; // { dg-error "invalid use of .auto." }
+ new auto{}; // { dg-error "requires exactly one element" }
+ +auto(1, 2); // { dg-error "invalid use of .auto." }
+ new auto(1, 2); // { dg-error "requires exactly one element" }
+ +auto{1, 2}; // { dg-error "too many initializers" }
+ new auto{1, 2}; // { dg-error "requires exactly one element" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-fncast4.C b/gcc/testsuite/g++.dg/cpp23/auto-fncast4.C
new file mode 100644
index 0000000..0e26bf2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-fncast4.C
@@ -0,0 +1,26 @@
+// PR c++/103049
+// P0849R8 - auto(x)
+// { dg-do compile { target c++23 } }
+
+class cmdline_parser
+{
+ public:
+ cmdline_parser(char const*);
+
+ auto add_option(char const*, char const*) & -> cmdline_parser &;
+ auto add_option(char const*, char const*) && -> cmdline_parser &&;
+
+ void parse(int, char**);
+};
+
+int main(int argc, char *argv[])
+{
+ auto cmdline = cmdline_parser("driver");
+
+ cmdline.add_option("-h", "show help messages")
+ .add_option("-v", "show version");
+
+ auto internal = auto(cmdline).add_option("--logging-level", "set logging level to 1-3")
+ .add_option("--dump-full", "do not minimize dump");
+ internal.parse(argc, argv);
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-fncast5.C b/gcc/testsuite/g++.dg/cpp23/auto-fncast5.C
new file mode 100644
index 0000000..b29901f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-fncast5.C
@@ -0,0 +1,39 @@
+// PR c++/103049
+// P0849R8 - auto(x)
+// { dg-do compile { target c++23 } }
+
+struct X {
+ X() = default;
+ X(const X&) = delete;
+};
+
+void
+g ()
+{
+ X x;
+ +X(x); // { dg-error "use of deleted function" }
+ +auto(x); // { dg-error "use of deleted function" }
+}
+
+class A;
+void f(A);
+
+class A {
+ int x;
+
+public:
+ A();
+
+ auto run() {
+ f(A(*this));
+ f(auto(*this));
+ }
+
+protected:
+ A(const A&);
+};
+
+void z () {
+ A a;
+ a.run ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-fncast6.C b/gcc/testsuite/g++.dg/cpp23/auto-fncast6.C
new file mode 100644
index 0000000..6b7858d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-fncast6.C
@@ -0,0 +1,14 @@
+// PR c++/103049
+// P0849R8 - auto(x)
+// { dg-do compile { target c++20 } }
+
+void f (int);
+
+void
+g ()
+{
+ auto a1 = auto(f); // { dg-error "only available with" "" { target c++20_only } }
+ auto a2 = auto{f}; // { dg-error "only available with" "" { target c++20_only } }
+ static_assert (__is_same_as (decltype (a1), void(*)(int)));
+ static_assert (__is_same_as (decltype (a2), void(*)(int)));
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-fncast7.C b/gcc/testsuite/g++.dg/cpp23/auto-fncast7.C
new file mode 100644
index 0000000..763164f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-fncast7.C
@@ -0,0 +1,9 @@
+// PR c++/103401
+// { dg-do compile { target c++23 } }
+
+void f(decltype(auto(0))) { }
+
+int main()
+{
+ f<int,int>(0); // { dg-error "no matching function" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-fncast8.C b/gcc/testsuite/g++.dg/cpp23/auto-fncast8.C
new file mode 100644
index 0000000..9fb7b9c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-fncast8.C
@@ -0,0 +1,42 @@
+// PR c++/103401
+// { dg-do compile { target c++23 } }
+
+void f1 (decltype(auto(0)));
+void f2 (decltype(auto{0}));
+void f3 (int = auto(42));
+void f4 (int = auto{42});
+void f5 (decltype(auto(0)) = auto(42));
+void f6 (auto (x));
+void f7 (int[auto(10)]);
+void f8 (int[auto{10}]);
+void f9 (auto[auto{10}]);
+void f10 (auto);
+void f11 (int x, decltype(x) y);
+void f12 (int[sizeof(auto{10})]);
+void f13 (int[sizeof(auto(10))]);
+void f14 (int[__extension__ alignof(auto{10})]);
+void f15 (int[__extension__ alignof(auto(10))]);
+
+void
+g ()
+{
+ int a[2];
+ f1 (1);
+ f2 (1);
+ f3 ();
+ f3 (1);
+ f4 ();
+ f4 (1);
+ f5 ();
+ f5 (1);
+ f6 ('a');
+ f7 (&a[0]);
+ f8 (&a[0]);
+ f9 (&a[0]);
+ f10 (1);
+ f11 (1, 2);
+ f12 (&a[0]);
+ f13 (&a[0]);
+ f14 (&a[0]);
+ f15 (&a[0]);
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/auto-fncast9.C b/gcc/testsuite/g++.dg/cpp23/auto-fncast9.C
new file mode 100644
index 0000000..12a0dce
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/auto-fncast9.C
@@ -0,0 +1,17 @@
+// PR c++/103401
+// { dg-do compile { target c++23 } }
+
+void f1(decltype(new auto{0}));
+void f2(decltype(new int{0}));
+
+void
+g ()
+{
+ int i;
+ void f3(decltype(new auto{0}));
+ void f4(decltype(new int{0}));
+ f1 (&i);
+ f2 (&i);
+ f3 (&i);
+ f4 (&i);
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/concepts-err1.C b/gcc/testsuite/g++.dg/cpp23/concepts-err1.C
new file mode 100644
index 0000000..e5bdc54
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/concepts-err1.C
@@ -0,0 +1,6 @@
+// PR c++/103408
+// { dg-do compile { target c++23 } }
+
+template<int>
+concept C = auto([]{}); // { dg-error "constraint" }
+static_assert(C<0>); // { dg-error "non-constant condition for static assertion" }
diff --git a/gcc/testsuite/g++.dg/cpp23/constexpr-nonlit4.C b/gcc/testsuite/g++.dg/cpp23/constexpr-nonlit4.C
index e4ed2e3..bdc97a9 100644
--- a/gcc/testsuite/g++.dg/cpp23/constexpr-nonlit4.C
+++ b/gcc/testsuite/g++.dg/cpp23/constexpr-nonlit4.C
@@ -34,7 +34,7 @@ baz (int x)
{
static const int v = qux (); // { dg-message "'v' was not initialized with a constant expression" }
case 12:
- return v;
+ return v; // { dg-error "the value of 'v' is not usable in a constant expression" }
}
return 0;
}
@@ -46,12 +46,12 @@ corge (int x)
{
const thread_local int v = qux (); // { dg-message "'v' was not initialized with a constant expression" }
case 12:
- return v;
+ return v; // { dg-error "the value of 'v' is not usable in a constant expression" }
}
return 0;
}
constexpr int a = foo (12);
constexpr int b = bar (12);
-constexpr int c = baz (12); // { dg-error "the value of 'v' is not usable in a constant expression" }
-constexpr int d = corge (12); // { dg-error "the value of 'v' is not usable in a constant expression" }
+constexpr int c = baz (12);
+constexpr int d = corge (12);
diff --git a/gcc/testsuite/g++.dg/cpp23/constexpr-nonlit5.C b/gcc/testsuite/g++.dg/cpp23/constexpr-nonlit5.C
index 838f282..86d5dba 100644
--- a/gcc/testsuite/g++.dg/cpp23/constexpr-nonlit5.C
+++ b/gcc/testsuite/g++.dg/cpp23/constexpr-nonlit5.C
@@ -34,7 +34,7 @@ baz (int x)
{
static int v = 6; // { dg-message "int v' is not const" }
case 12:
- return v;
+ return v; // { dg-error "the value of 'v' is not usable in a constant expression" }
}
return 0;
}
@@ -46,12 +46,12 @@ corge (int x)
{
thread_local int v = 6; // { dg-message "int v' is not const" }
case 12:
- return v;
+ return v; // { dg-error "the value of 'v' is not usable in a constant expression" }
}
return 0;
}
constexpr int a = foo (12);
constexpr int b = bar (12);
-constexpr int c = baz (12); // { dg-error "the value of 'v' is not usable in a constant expression" }
-constexpr int d = corge (12); // { dg-error "the value of 'v' is not usable in a constant expression" }
+constexpr int c = baz (12);
+constexpr int d = corge (12);
diff --git a/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C b/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C
index 8bb3bf1..c1f91e7 100644
--- a/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C
+++ b/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C
@@ -528,8 +528,8 @@
#ifndef __cpp_concepts
# error "__cpp_concepts"
-#elif __cpp_concepts != 201907
-# error "__cpp_concepts != 201907"
+#elif __cpp_concepts != 202002
+# error "__cpp_concepts != 202002"
#endif
#ifndef __cpp_using_enum
@@ -551,3 +551,9 @@
#elif __cpp_if_consteval != 202106
# error "__cpp_if_consteval != 202106"
#endif
+
+#ifndef __cpp_multidimensional_subscript
+# error "__cpp_multidimensional_subscript"
+#elif __cpp_multidimensional_subscript != 202110
+# error "__cpp_multidimensional_subscript != 202110"
+#endif
diff --git a/gcc/testsuite/g++.dg/cpp23/normalize3.C b/gcc/testsuite/g++.dg/cpp23/normalize3.C
index bf4bb3a..1733d38 100644
--- a/gcc/testsuite/g++.dg/cpp23/normalize3.C
+++ b/gcc/testsuite/g++.dg/cpp23/normalize3.C
@@ -1,4 +1,4 @@
-// { dg-do preprocess { target { c++23 } } }
+// { dg-do preprocess { target { c++11 } } }
// { dg-options "-pedantic-errors" }
\u00AA
diff --git a/gcc/testsuite/g++.dg/cpp23/normalize4.C b/gcc/testsuite/g++.dg/cpp23/normalize4.C
index 9f83cd7..48e7231 100644
--- a/gcc/testsuite/g++.dg/cpp23/normalize4.C
+++ b/gcc/testsuite/g++.dg/cpp23/normalize4.C
@@ -1,4 +1,4 @@
-// { dg-do preprocess { target { c++23 } } }
+// { dg-do preprocess { target { c++11 } } }
// { dg-options "" }
\u00AA
diff --git a/gcc/testsuite/g++.dg/cpp23/normalize5.C b/gcc/testsuite/g++.dg/cpp23/normalize5.C
index afe339a..cbeb134 100644
--- a/gcc/testsuite/g++.dg/cpp23/normalize5.C
+++ b/gcc/testsuite/g++.dg/cpp23/normalize5.C
@@ -1,4 +1,4 @@
-// { dg-do preprocess { target { c++23 } } }
+// { dg-do preprocess { target { c++11 } } }
// { dg-options "-pedantic-errors" }
\u00AA
diff --git a/gcc/testsuite/g++.dg/cpp23/normalize7.C b/gcc/testsuite/g++.dg/cpp23/normalize7.C
index f639d65..a1c0a2f 100644
--- a/gcc/testsuite/g++.dg/cpp23/normalize7.C
+++ b/gcc/testsuite/g++.dg/cpp23/normalize7.C
@@ -3,10 +3,8 @@
// { dg-options "-pedantic-errors" }
constexpr int À = 1; // U+00C0
-constexpr int AÌ€ = 2; // U+0041 U+0300 { dg-warning "is not in NFC" "" { target { ! c++23 } } }
-// { dg-error "is not in NFC" "" { target c++23 } .-1 }
+constexpr int AÌ€ = 2; // U+0041 U+0300 { dg-error "is not in NFC" }
constexpr int gv1 = \u00c0;
-constexpr int gv2 = A\u0300; // { dg-warning "is not in NFC" "" { target { ! c++23 } } }
-// { dg-error "is not in NFC" "" { target c++23 } .-1 }
+constexpr int gv2 = A\u0300; // { dg-error "is not in NFC" }
static_assert(gv1 == 1, "");
static_assert(gv2 == 2, "");
diff --git a/gcc/testsuite/g++.dg/cpp23/subscript1.C b/gcc/testsuite/g++.dg/cpp23/subscript1.C
new file mode 100644
index 0000000..a96c93e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/subscript1.C
@@ -0,0 +1,55 @@
+// P2128R6
+// { dg-do run }
+// { dg-options "-std=c++23" }
+
+extern "C" void abort ();
+
+struct S
+{
+ constexpr S () : a {} {};
+ constexpr S (int x, int y, int z) : a {x, y, z} {};
+ constexpr int &operator[] () { return a[0]; }
+ constexpr int &operator[] (int x) { return a[x]; }
+ constexpr int &operator[] (int x, long y) { return a[x + y * 8]; }
+ int a[64];
+};
+
+struct T
+{
+ operator int () { return 42; };
+};
+
+int buf[64];
+
+struct U
+{
+ operator int * () { return buf; }
+};
+
+static_assert (S ()[1] == 0);
+static_assert (S (1, 2, 42)[2] == 42);
+static_assert (S ()[3, 4] == 0);
+static_assert (S (1, 43, 2)[1, 0] == 43);
+static_assert (S ()[] == 0);
+static_assert (S (44, 1, 2)[] == 44);
+
+int
+main ()
+{
+ S s;
+ for (int i = 0; i < 64; i++)
+ s.a[i] = 64 - i;
+ if (s[] != 64 || s[3] != 61 || s[4, 5] != 20)
+ abort ();
+ s[]++;
+ s[42]++;
+ ++s[3, 2];
+ if (s.a[0] != 65 || s.a[42] != 23 || s.a[19] != 46)
+ abort ();
+ T t;
+ U u;
+ if (&u[t] != &buf[42])
+ abort ();
+ if (&t[u] != &buf[42])
+ abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/subscript2.C b/gcc/testsuite/g++.dg/cpp23/subscript2.C
new file mode 100644
index 0000000..f8ec87d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/subscript2.C
@@ -0,0 +1,51 @@
+// P2128R6
+// { dg-do compile }
+// { dg-options "-std=c++23" }
+
+struct S
+{
+ S () : a {} {};
+ int &operator[] () { return a[0]; }
+ int &operator[] (int x) { return a[x]; }
+ int &operator[] (int x, long y) { return a[x + y * 8]; }
+ int a[64];
+};
+
+struct T
+{
+ operator int () { return 42; };
+};
+
+int buf[64];
+
+struct U
+{
+ operator int * () { return buf; }
+};
+
+struct V
+{
+ V () : a {} {};
+ V (int x, int y, int z) : a {x, y, z} {};
+ int &operator[] () { return a[0]; } // { dg-message "candidate" }
+ int &operator[] (int x, long y) { return a[x + y * 8]; } // { dg-message "candidate" }
+ int a[64];
+};
+
+void
+foo ()
+{
+ S s;
+ T t;
+ U u;
+ V v;
+ auto &a = buf[]; // { dg-error "built-in subscript operator without expression list" }
+ auto &b = buf[1, 2]; // { dg-warning "top-level comma expression in array subscript changed meaning in" }
+ auto &c = s[1, 2, 3]; // { dg-warning "top-level comma expression in array subscript changed meaning in" }
+ auto &d = v[1]; // { dg-error "no match for 'operator\\\[\\\]' in 'v\\\[1\\\]' \\\(operand types are 'V' and 'int'\\\)" }
+ auto &e = v[1, 2, 3]; // { dg-error "no match for call to 'V::operator\\\[\\\] \\\(int, int, int\\\)'" }
+ auto &f = t[42, u]; // { dg-warning "top-level comma expression in array subscript changed meaning in" }
+ auto &g = u[42, t]; // { dg-warning "top-level comma expression in array subscript changed meaning in" }
+ auto &h = buf[42, 2.5]; // { dg-warning "top-level comma expression in array subscript changed meaning in" }
+ // { dg-error "invalid types \[^\n\r]* for array subscript" "" { target *-*-* } .-1 }
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/subscript3.C b/gcc/testsuite/g++.dg/cpp23/subscript3.C
new file mode 100644
index 0000000..2d735e4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/subscript3.C
@@ -0,0 +1,90 @@
+// P2128R6
+// { dg-do run }
+// { dg-options "-std=c++23" }
+
+extern "C" void abort ();
+
+struct S
+{
+ constexpr S () : a {} {};
+ constexpr S (int x, int y, int z) : a {x, y, z} {};
+ constexpr int &operator[] () { return a[0]; }
+ constexpr int &operator[] (int x) { return a[x]; }
+ constexpr int &operator[] (int x, long y) { return a[x + y * 8]; }
+ int a[64];
+};
+
+struct T
+{
+ operator int () { return 42; };
+};
+
+int buf[64];
+
+struct U
+{
+ operator int * () { return buf; }
+};
+
+template <int N>
+void
+foo ()
+{
+ static_assert (S ()[1] == 0);
+ static_assert (S (1, 2, 42)[2] == 42);
+ static_assert (S ()[3, 4] == 0);
+ static_assert (S (1, 43, 2)[1, 0] == 43);
+ static_assert (S ()[] == 0);
+ static_assert (S (44, 1, 2)[] == 44);
+ S s;
+ for (int i = 0; i < 64; i++)
+ s.a[i] = 64 - i;
+ if (s[] != 64 || s[3] != 61 || s[4, 5] != 20)
+ abort ();
+ s[]++;
+ s[42]++;
+ ++s[3, 2];
+ if (s.a[0] != 65 || s.a[42] != 23 || s.a[19] != 46)
+ abort ();
+ T t;
+ U u;
+ if (&u[t] != &buf[42])
+ abort ();
+ if (&t[u] != &buf[42])
+ abort ();
+}
+
+template <typename V, typename W, typename X>
+void
+bar ()
+{
+ static_assert (V ()[1] == 0);
+ static_assert (V (1, 2, 42)[2] == 42);
+ static_assert (V ()[3, 4] == 0);
+ static_assert (V (1, 43, 2)[1, 0] == 43);
+ static_assert (V ()[] == 0);
+ static_assert (V (44, 1, 2)[] == 44);
+ V s;
+ for (int i = 0; i < 64; i++)
+ s.a[i] = 64 - i;
+ if (s[] != 64 || s[3] != 61 || s[4, 5] != 20)
+ abort ();
+ s[]++;
+ s[42]++;
+ ++s[3, 2];
+ if (s.a[0] != 65 || s.a[42] != 23 || s.a[19] != 46)
+ abort ();
+ W t;
+ X u;
+ if (&u[t] != &buf[42])
+ abort ();
+ if (&t[u] != &buf[42])
+ abort ();
+}
+
+int
+main ()
+{
+ foo <0> ();
+ bar <S, T, U> ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/subscript4.C b/gcc/testsuite/g++.dg/cpp23/subscript4.C
new file mode 100644
index 0000000..085095d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/subscript4.C
@@ -0,0 +1,44 @@
+// P2128R6
+// { dg-do run }
+// { dg-options "-std=c++23" }
+
+extern "C" void abort ();
+
+struct S
+{
+ constexpr S () : a {} {};
+ constexpr S (int x, int y, int z) : a {x, y, z} {};
+ constexpr int &operator[] () { return a[0]; }
+ constexpr int &operator[] (int x) { return a[x]; }
+ constexpr int &operator[] (int x, long y) { return a[x + y * 8]; }
+ int a[64];
+};
+int buf[26];
+
+template <class ...Ts>
+auto &
+foo (S &s, Ts... args)
+{
+ return s[args...];
+}
+
+template <typename T, class ...Ts>
+auto &
+bar (T &s, Ts... args)
+{
+ return s[args...];
+}
+
+int
+main ()
+{
+ S s;
+ if (&foo (s) != &s.a[0]
+ || &foo (s, 42) != &s.a[42]
+ || &foo (s, 5, 4) != &s.a[37]
+ || &bar (s) != &s.a[0]
+ || &bar (s, 22) != &s.a[22]
+ || &bar (s, 17, 3L) != &s.a[41]
+ || &bar (buf, 5) != &buf[5])
+ abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/subscript5.C b/gcc/testsuite/g++.dg/cpp23/subscript5.C
new file mode 100644
index 0000000..b36bc77
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/subscript5.C
@@ -0,0 +1,28 @@
+// P2128R6
+// { dg-do run { target c++11 } }
+
+#include <initializer_list>
+#include <cstdlib>
+
+struct S
+{
+ S () : a {} {};
+ int &operator[] (std::initializer_list<int> l) {
+ int sum = 0;
+ for (auto x : l)
+ sum += x;
+ return a[sum];
+ }
+ int a[64];
+};
+
+int
+main ()
+{
+ S s;
+ if (&s[{0}] != &s.a[0]
+ || &s[{42}] != &s.a[42]
+ || &s[{5, 7, 9}] != &s.a[5 + 7 + 9]
+ || &s[{1, 2, 3, 4}] != &s.a[1 + 2 + 3 + 4])
+ abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/subscript6.C b/gcc/testsuite/g++.dg/cpp23/subscript6.C
new file mode 100644
index 0000000..72c7aef
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/subscript6.C
@@ -0,0 +1,31 @@
+// P2128R6
+// { dg-do run }
+// { dg-options "-std=c++23" }
+
+#include <initializer_list>
+#include <cstdlib>
+
+struct S
+{
+ S () : a {} {};
+ int &operator[] (std::initializer_list<int> l, std::initializer_list<int> m) {
+ int sum = 0;
+ for (auto x : l)
+ sum += x;
+ for (auto x : m)
+ sum += x;
+ return a[sum];
+ }
+ int a[64];
+};
+
+int
+main ()
+{
+ S s;
+ if (&s[{0}, {3, 1, 2}] != &s.a[0 + 3 + 1 + 2]
+ || &s[{42}, {11, 1}] != &s.a[42 + 11 + 1]
+ || &s[{5, 7, 9}, {3}] != &s.a[5 + 7 + 9 + 3]
+ || &s[{1, 2, 3, 4}, {3, 5, 8}] != &s.a[1 + 2 + 3 + 4 + 3 + 5 + 8])
+ abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp23/ucnid-2-utf8.C b/gcc/testsuite/g++.dg/cpp23/ucnid-2-utf8.C
index 6c8aa6a..712785c 100644
--- a/gcc/testsuite/g++.dg/cpp23/ucnid-2-utf8.C
+++ b/gcc/testsuite/g++.dg/cpp23/ucnid-2-utf8.C
@@ -2,17 +2,17 @@
// { dg-do compile }
// { dg-options "-pedantic-errors" }
-bool 👷 = true; // { dg-error "is not valid in an identifier" "" { target { c++98_only || c++23 } } }
+bool 👷 = true; // { dg-error "is not valid in an identifier" }
bool 👷â€â™€ = false; // { dg-error "is not valid in an identifier" }
int â° = 0; // { dg-error "is not valid in an identifier" }
-int 🕠= 0; // { dg-error "is not valid in an identifier" "" { target { c++98_only || c++23 } } }
+int 🕠= 0; // { dg-error "is not valid in an identifier" }
int ☠ = 0; // { dg-error "is not valid in an identifier" }
-int 💀 = 0; // { dg-error "is not valid in an identifier" "" { target { c++98_only || c++23 } } }
+int 💀 = 0; // { dg-error "is not valid in an identifier" }
int ✋ = 0; // { dg-error "is not valid in an identifier" }
-int 👊 = 0; // { dg-error "is not valid in an identifier" "" { target { c++98_only || c++23 } } }
+int 👊 = 0; // { dg-error "is not valid in an identifier" }
int ✈ = 0; // { dg-error "is not valid in an identifier" }
-int 🚀 = 0; // { dg-error "is not valid in an identifier" "" { target { c++98_only || c++23 } } }
+int 🚀 = 0; // { dg-error "is not valid in an identifier" }
int ☹ = 0; // { dg-error "is not valid in an identifier" }
-int 😀 = 0; // { dg-error "is not valid in an identifier" "" { target { c++98_only || c++23 } } }
+int 😀 = 0; // { dg-error "is not valid in an identifier" }
struct E {};
-class 💩 : public E {}; // { dg-error "is not valid in an identifier" "" { target { c++98_only || c++23 } } }
+class 💩 : public E {}; // { dg-error "is not valid in an identifier" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/bit-cast11.C b/gcc/testsuite/g++.dg/cpp2a/bit-cast11.C
new file mode 100644
index 0000000..a3eb31b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/bit-cast11.C
@@ -0,0 +1,63 @@
+// P1272R4
+// { dg-do compile { target c++14 } }
+
+struct S { unsigned char a[2]; alignas(sizeof 0) int b; };
+struct T { char a; alignas(sizeof 0) int b; };
+struct U { char a : 1; char : 6; char b : 1; };
+struct V { int a; S b; };
+struct W { unsigned a; T b; };
+
+constexpr bool
+f1 ()
+{
+ T t = { 1, 2 };
+ S s = __builtin_bit_cast (S, t);
+ return s.a[0] == 1;
+}
+
+constexpr bool
+f2 ()
+{
+ U u = { 0, 0 };
+ unsigned char a = __builtin_bit_cast (unsigned char, u);
+ return true;
+}
+
+constexpr bool
+f3 ()
+{
+ T t = { 1, 2 };
+ S s = __builtin_bit_cast (S, t);
+ return s.a[1] == 0;
+}
+
+constexpr bool
+f4 ()
+{
+ U u = { 0, 0 };
+ unsigned char a = __builtin_bit_cast (unsigned char, u);
+ return a == 0; // { dg-error "is not a constant expression" }
+}
+
+constexpr bool
+f5 ()
+{
+ W t = { 1, 2 };
+ V s = __builtin_bit_cast (V, t);
+ return s.b.a[0] == 1;
+}
+
+constexpr bool
+f6 ()
+{
+ W t = { 1, 2 };
+ V s = __builtin_bit_cast (V, t);
+ return s.b.a[1] == 1;
+}
+
+constexpr bool a = f1 ();
+constexpr bool b = f2 ();
+constexpr bool c = f3 (); // { dg-error "accessing uninitialized array element" }
+constexpr bool d = f4 ();
+constexpr bool e = f5 ();
+constexpr bool f = f6 (); // { dg-error "accessing uninitialized array element" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/bit-cast12.C b/gcc/testsuite/g++.dg/cpp2a/bit-cast12.C
new file mode 100644
index 0000000..9c699dd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/bit-cast12.C
@@ -0,0 +1,68 @@
+// P1272R4
+// { dg-do compile { target c++14 } }
+
+namespace std
+{
+ enum class byte : unsigned char {};
+}
+
+struct S { unsigned char a[2]; alignas(sizeof 0) int b; };
+struct T { char a; alignas(sizeof 0) int b; };
+struct U { char a : 1; char : 6; char b : 1; };
+struct V { int a; S b; };
+struct W { unsigned a; T b; };
+
+constexpr bool
+f1 ()
+{
+ T t = { 1, 2 };
+ S s = __builtin_bit_cast (S, t);
+ return s.a[0] == 1;
+}
+
+constexpr bool
+f2 ()
+{
+ U u = { 0, 0 };
+ unsigned char a = __builtin_bit_cast (unsigned char, u);
+ return true;
+}
+
+constexpr bool
+f3 ()
+{
+ T t = { 1, 2 };
+ S s = __builtin_bit_cast (S, t);
+ return s.a[1] == 0;
+}
+
+constexpr bool
+f4 ()
+{
+ U u = { 0, 0 };
+ unsigned char a = __builtin_bit_cast (unsigned char, u);
+ return a == 0; // { dg-error "is not a constant expression" }
+}
+
+constexpr bool
+f5 ()
+{
+ W t = { 1, 2 };
+ V s = __builtin_bit_cast (V, t);
+ return s.b.a[0] == 1;
+}
+
+constexpr bool
+f6 ()
+{
+ W t = { 1, 2 };
+ V s = __builtin_bit_cast (V, t);
+ return s.b.a[1] == 1;
+}
+
+constexpr bool a = f1 ();
+constexpr bool b = f2 ();
+constexpr bool c = f3 (); // { dg-error "accessing uninitialized array element" }
+constexpr bool d = f4 ();
+constexpr bool e = f5 ();
+constexpr bool f = f6 (); // { dg-error "accessing uninitialized array element" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/bit-cast13.C b/gcc/testsuite/g++.dg/cpp2a/bit-cast13.C
new file mode 100644
index 0000000..f3bae59
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/bit-cast13.C
@@ -0,0 +1,63 @@
+// P1272R4
+// { dg-do compile { target c++14 } }
+
+struct S { char a[2]; alignas(sizeof 0) int b; };
+struct T { char a; alignas(sizeof 0) int b; };
+struct U { char a : 1; char : 6; char b : 1; };
+struct V { int a; S b; };
+struct W { unsigned a; T b; };
+
+constexpr bool
+f1 ()
+{
+ T t = { 1, 2 };
+ S s = __builtin_bit_cast (S, t); // { dg-error "accessing uninitialized byte" }
+ return s.a[0] == 1;
+}
+
+constexpr bool
+f2 ()
+{
+ U u = { 0, 0 };
+ char a = __builtin_bit_cast (char, u); // { dg-error "accessing uninitialized byte" }
+ return true;
+}
+
+constexpr bool
+f3 ()
+{
+ T t = { 1, 2 };
+ S s = __builtin_bit_cast (S, t); // { dg-error "accessing uninitialized byte" }
+ return s.a[1] == 0;
+}
+
+constexpr bool
+f4 ()
+{
+ U u = { 0, 0 };
+ char a = __builtin_bit_cast (char, u); // { dg-error "accessing uninitialized byte" }
+ return a == 0;
+}
+
+constexpr bool
+f5 ()
+{
+ W t = { 1, 2 };
+ V s = __builtin_bit_cast (V, t); // { dg-error "accessing uninitialized byte" }
+ return s.b.a[0] == 1;
+}
+
+constexpr bool
+f6 ()
+{
+ W t = { 1, 2 };
+ V s = __builtin_bit_cast (V, t); // { dg-error "accessing uninitialized byte" }
+ return s.b.a[1] == 1;
+}
+
+constexpr bool a = f1 ();
+constexpr bool b = f2 ();
+constexpr bool c = f3 ();
+constexpr bool d = f4 ();
+constexpr bool e = f5 ();
+constexpr bool f = f6 ();
diff --git a/gcc/testsuite/g++.dg/cpp2a/bit-cast14.C b/gcc/testsuite/g++.dg/cpp2a/bit-cast14.C
new file mode 100644
index 0000000..5e18591
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/bit-cast14.C
@@ -0,0 +1,75 @@
+// P1272R4
+// { dg-do compile { target c++14 } }
+
+struct S { unsigned char a : 8, b : 5, c : 3, d, e; unsigned int f : 8, g : 24; };
+struct T1 { unsigned char a : 1, : 7, b : 5, c : 3, d, e; unsigned int f : 8, g : 24; };
+struct T2 { unsigned char a : 8, b : 1, : 4, c : 3, d, e; unsigned int f : 8, g : 24; };
+struct T3 { unsigned char a : 8, b : 5, c : 1, : 2, d, e; unsigned int f : 8, g : 24; };
+struct T4 { unsigned char a : 8, b : 5, c : 3, d, e; unsigned int f : 1, : 7, g : 24; };
+
+constexpr bool
+f1 ()
+{
+ T1 t = { 0, 0, 0, 0, 0, 0, 0 };
+ S s = __builtin_bit_cast (S, t);
+ return true;
+}
+
+constexpr bool
+f2 ()
+{
+ T2 t = { 0, 0, 0, 0, 0, 0, 0 };
+ S s = __builtin_bit_cast (S, t);
+ return true;
+}
+
+constexpr bool
+f3 ()
+{
+ T3 t = { 0, 0, 0, 0, 0, 0, 0 };
+ S s = __builtin_bit_cast (S, t);
+ return true;
+}
+
+constexpr bool
+f4 ()
+{
+ T4 t = { 0, 0, 0, 0, 0, 0, 0 };
+ S s = __builtin_bit_cast (S, t); // { dg-error "accessing uninitialized byte" }
+ return true;
+}
+
+constexpr bool
+f5 ()
+{
+ T1 t = { 0, 0, 0, 0, 0, 0, 0 };
+ S s = __builtin_bit_cast (S, t);
+ unsigned char a = s.a;
+ return true;
+}
+
+constexpr bool
+f6 ()
+{
+ T2 t = { 0, 0, 0, 0, 0, 0, 0 };
+ S s = __builtin_bit_cast (S, t);
+ unsigned char b = s.b;
+ return true;
+}
+
+constexpr bool
+f7 ()
+{
+ T3 t = { 0, 0, 0, 0, 0, 0, 0 };
+ S s = __builtin_bit_cast (S, t);
+ unsigned char c = s.c;
+ return true;
+}
+
+constexpr bool a = f1 ();
+constexpr bool b = f2 ();
+constexpr bool c = f3 ();
+constexpr bool d = f4 ();
+constexpr bool e = f5 (); // { dg-error "accessing uninitialized member" }
+constexpr bool f = f6 (); // { dg-error "accessing uninitialized member" }
+constexpr bool g = f7 (); // { dg-error "accessing uninitialized member" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/comma1.C b/gcc/testsuite/g++.dg/cpp2a/comma1.C
index d9c140d..1799c18 100644
--- a/gcc/testsuite/g++.dg/cpp2a/comma1.C
+++ b/gcc/testsuite/g++.dg/cpp2a/comma1.C
@@ -8,19 +8,24 @@ struct S {
void
fn (int *a, int b, int c)
{
- a[b,c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } }
+ a[b,c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_only } }
+ // { dg-error "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[(b,c)];
- a[(void) b, c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } }
+ a[(void) b, c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_only } }
+ // { dg-error "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[((void) b, c)];
- a[(void) b, (void) c, (void) b, b]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } }
+ a[(void) b, (void) c, (void) b, b]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_only } }
+ // { dg-error "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[((void) b, (void) c, (void) b, b)];
- a[S(), 10]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } }
+ a[S(), 10]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_only } }
+ // { dg-error "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[(S(), 10)];
a[int{(1,2)}];
- a[int{(1,2)}, int{}]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } }
+ a[int{(1,2)}, int{}]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_only } }
+ // { dg-error "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[(int{(1,2)}, int{})];
}
diff --git a/gcc/testsuite/g++.dg/cpp2a/comma3.C b/gcc/testsuite/g++.dg/cpp2a/comma3.C
index c39dd4b..daf5359 100644
--- a/gcc/testsuite/g++.dg/cpp2a/comma3.C
+++ b/gcc/testsuite/g++.dg/cpp2a/comma3.C
@@ -9,19 +9,24 @@ struct S {
void
fn (int *a, int b, int c)
{
- a[b,c]; // { dg-warning "top-level comma expression in array subscript is deprecated" }
+ a[b,c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_down } }
+ // { dg-warning "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[(b,c)];
- a[(void) b, c]; // { dg-warning "top-level comma expression in array subscript is deprecated" }
+ a[(void) b, c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_down } }
+ // { dg-warning "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[((void) b, c)];
- a[(void) b, (void) c, (void) b, b]; // { dg-warning "top-level comma expression in array subscript is deprecated" }
+ a[(void) b, (void) c, (void) b, b]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_down } }
+ // { dg-warning "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[((void) b, (void) c, (void) b, b)];
- a[S(), 10]; // { dg-warning "top-level comma expression in array subscript is deprecated" }
+ a[S(), 10]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_down } }
+ // { dg-warning "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[(S(), 10)];
a[int{(1,2)}];
- a[int{(1,2)}, int{}]; // { dg-warning "top-level comma expression in array subscript is deprecated" }
+ a[int{(1,2)}, int{}]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_down } }
+ // { dg-warning "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[(int{(1,2)}, int{})];
}
diff --git a/gcc/testsuite/g++.dg/cpp2a/comma4.C b/gcc/testsuite/g++.dg/cpp2a/comma4.C
index 0d149c7..11aff99 100644
--- a/gcc/testsuite/g++.dg/cpp2a/comma4.C
+++ b/gcc/testsuite/g++.dg/cpp2a/comma4.C
@@ -10,18 +10,23 @@ void
fn (int *a, int b, int c)
{
a[b,c]; // { dg-bogus "top-level comma expression in array subscript is deprecated" }
+ // { dg-warning "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[(b,c)];
a[(void) b, c]; // { dg-bogus "top-level comma expression in array subscript is deprecated" }
+ // { dg-warning "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[((void) b, c)];
a[(void) b, (void) c, (void) b, b]; // { dg-bogus "top-level comma expression in array subscript is deprecated" }
+ // { dg-warning "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[((void) b, (void) c, (void) b, b)];
a[S(), 10]; // { dg-bogus "top-level comma expression in array subscript is deprecated" }
+ // { dg-warning "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[(S(), 10)];
a[int{(1,2)}];
a[int{(1,2)}, int{}]; // { dg-bogus "top-level comma expression in array subscript is deprecated" }
+ // { dg-warning "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[(int{(1,2)}, int{})];
}
diff --git a/gcc/testsuite/g++.dg/cpp2a/comma5.C b/gcc/testsuite/g++.dg/cpp2a/comma5.C
index acf5d43..8bf94d1 100644
--- a/gcc/testsuite/g++.dg/cpp2a/comma5.C
+++ b/gcc/testsuite/g++.dg/cpp2a/comma5.C
@@ -8,14 +8,20 @@ void
fn (int *a, int b, int c)
{
a[foo<int, int>(1, 2)];
- a[foo<int, int>(1, 2), foo<int, int>(3, 4)]; // { dg-warning "24:top-level comma expression in array subscript is deprecated" }
+ a[foo<int, int>(1, 2), foo<int, int>(3, 4)]; // { dg-warning "24:top-level comma expression in array subscript is deprecated" "" { target c++20_down } }
+ // { dg-error "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
- a[b < c, b < c]; // { dg-warning "top-level comma expression in array subscript is deprecated" }
- a[b < c, b > c]; // { dg-warning "top-level comma expression in array subscript is deprecated" }
- a[b > c, b > c]; // { dg-warning "top-level comma expression in array subscript is deprecated" }
- a[b > c, b < c]; // { dg-warning "top-level comma expression in array subscript is deprecated" }
+ a[b < c, b < c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_down } }
+ // { dg-error "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
+ a[b < c, b > c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_down } }
+ // { dg-error "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
+ a[b > c, b > c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_down } }
+ // { dg-error "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
+ a[b > c, b < c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_down } }
+ // { dg-error "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[(b < c, b < c)];
a[(b < c, b > c)];
- a[b << c, b << c]; // { dg-warning "top-level comma expression in array subscript is deprecated" }
+ a[b << c, b << c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20_down } }
+ // { dg-error "top-level comma expression in array subscript changed meaning in" "" { target c++23 } .-1 }
a[(b << c, b << c)];
}
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-class3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-class3.C
new file mode 100644
index 0000000..68b50b7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-class3.C
@@ -0,0 +1,12 @@
+// PR c++/103831
+// { dg-do compile { target c++20 } }
+
+struct A {
+ constexpr int size() { return 42; } // non-static
+};
+
+template<class T>
+ requires (T::size() == 42) // { dg-error "without object" }
+struct B : T { };
+
+template struct B<A>; // { dg-error "constraint" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-class4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-class4.C
new file mode 100644
index 0000000..90395f1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-class4.C
@@ -0,0 +1,11 @@
+// PR c++/103341
+// { dg-do compile { target c++20 } }
+
+template<class T, class U> concept same_as = __is_same(T, U);
+template<class T>
+struct A {
+ static inline same_as<T> auto value = 0; // { dg-error "constraint" }
+};
+
+template struct A<int>; // { dg-bogus "" }
+template struct A<bool>; // { dg-message "required from here" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda18.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda18.C
new file mode 100644
index 0000000..f1058da
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda18.C
@@ -0,0 +1,14 @@
+// PR c++/103706
+// { dg-do compile { target c++20 } }
+
+template<class T, class U> concept C = __is_same(U, int);
+
+template<class T> void f() {
+ []() -> C<T> auto {
+ C<T> auto x = T(); // { dg-error "constraints" }
+ return T(); // { dg-error "constraints" }
+ }();
+}
+
+template void f<int>(); // { dg-bogus "" }
+template void f<char>(); // { dg-message "required from here" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda19.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda19.C
new file mode 100644
index 0000000..1921f48
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda19.C
@@ -0,0 +1,11 @@
+// PR c++/103706
+// { dg-do compile { target c++20 } }
+
+template<class T> concept C = __is_same(T, int);
+
+template<class... Ts> void f() {
+ ([]() requires C<Ts> { return Ts(); }(), ...); // { dg-error "no match" }
+}
+
+template void f<int, int, int>(); // { dg-bogus "" }
+template void f<int, int, char>(); // { dg-message "required from here" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-memfun2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-memfun2.C
new file mode 100644
index 0000000..e3845e4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-memfun2.C
@@ -0,0 +1,25 @@
+// PR c++/103783
+// { dg-do compile { target c++20 } }
+
+template<bool B>
+struct A {
+ template<class...> void f1() = delete;
+ template<class...> static void f1() requires B;
+
+ template<class...> void f2() requires B;
+ template<class...> static void f2() = delete;
+
+ void g1() = delete;
+ static void g1() requires B;
+
+ void g2() requires B;
+ static void g2() = delete;
+};
+
+int main() {
+ A<true> a;
+ a.f1(); // OK
+ a.f2(); // OK
+ a.g1(); // OK, previously rejected as ambiguous
+ a.g2(); // OK, previously rejected as ambiguous
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec10.C b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec10.C
new file mode 100644
index 0000000..d45a1b0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec10.C
@@ -0,0 +1,17 @@
+// PR c++/92944
+// { dg-do compile { target c++20 } }
+
+namespace ns { template<class T> struct A { }; }
+
+template<class T> requires true struct ns::A<T> { using type = T; };
+template<class T> requires false struct ns::A<T> { };
+
+template<class T> struct ns::A<T*> { };
+template<class T> requires true struct ns::A<T*> { using type = T; };
+template<class T> requires false struct ns::A<T*> { };
+
+using ty1 = ns::A<int>::type;
+using ty1 = int;
+
+using ty2 = ns::A<int*>::type;
+using ty2 = int;
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec11.C b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec11.C
new file mode 100644
index 0000000..0333450
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec11.C
@@ -0,0 +1,19 @@
+// PR c++/103678
+// { dg-do compile { target c++20 } }
+
+template<class>
+struct A {
+ template<class...>
+ struct B;
+};
+
+template<class A_t>
+template<class B_t>
+struct A<A_t>::B<B_t> {};
+
+template<class A_t>
+template<class B_t>
+requires requires {
+ typename B_t;
+}
+struct A<A_t>::B<B_t> {};
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr104410.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr104410.C
new file mode 100644
index 0000000..dac08e1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr104410.C
@@ -0,0 +1,6 @@
+// PR c++/104410
+// { dg-do compile { target c++20 } }
+
+template<class T> constexpr bool use_func_v{};
+template<class T> void f() requires use_func_v<T> || true { }
+template void f<int>();
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-2.C
index 290aaf8..75f8e40 100644
--- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-2.C
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-2.C
@@ -4,9 +4,10 @@
template <typename T>
void foo1(T& t) {
typename T::template C<void> tcv = t;
- typename T::template C<auto> u = tcv; // { dg-error "not permitted" "" { target c++20 } }
- T::template C<auto>::f (tcv, u); // { dg-error "incomplete|not permitted" }
- (typename T::template D<auto> (t)); // { dg-error "invalid|not permitted" }
+ typename T::template C<auto> u = tcv; // { dg-error "" "" { target c++20 } }
+ T::template C<auto>::f (tcv, u); // { dg-error "" }
+ (typename T::template D<auto> (t)); // { dg-error "" }
+// { dg-warning "only available" "" { target c++17_down } .-1 }
}
struct T1 {
@@ -22,9 +23,9 @@ struct T1 {
template <typename T>
void foo2(T& t) {
typename T::template C<void> tcv = t;
- typename T::template C<auto> u = tcv; // { dg-error "not permitted" "" { target c++20 } }
- T::template C<auto>::f (tcv, u); // { dg-error "incomplete|not permitted" }
- T::template D<auto> (t); // { dg-error "invalid|not permitted" }
+ typename T::template C<auto> u = tcv; // { dg-error "" "" { target c++20 } }
+ T::template C<auto>::f (tcv, u); // { dg-error "" }
+ T::template D<auto> (t); // { dg-error "" }
}
struct T2 {
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-3.C
index d612327..1c1a41c 100644
--- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-3.C
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-3.C
@@ -8,9 +8,10 @@
template <typename T>
void foo1(T& t) {
typename T::template C<void> tcv = t;
- typename T::template C<auto> u = tcv; // { dg-error "not permitted" "" { target c++20 } }
- T::template C<auto>::f (tcv, u); // { dg-error "incomplete|not permitted" }
- (typename T::template D<auto> (t)); // { dg-error "invalid|not permitted" }
+ typename T::template C<auto> u = tcv; // { dg-error "" "" { target c++20 } }
+ T::template C<auto>::f (tcv, u); // { dg-error "" }
+ (typename T::template D<auto> (t)); // { dg-error "" }
+// { dg-warning "only available" "" { target c++17_down } .-1 }
}
struct T1 {
@@ -26,9 +27,9 @@ struct T1 {
template <typename T>
void foo2(T& t) {
typename T::template C<void> tcv = t;
- typename T::template C<auto> u = tcv; // { dg-error "not permitted" "" { target c++20 } }
- T::template C<auto>::f (tcv, u); // { dg-error "incomplete|not permitted" }
- T::template D<auto> (t); // { dg-error "yields a type|not permitted" }
+ typename T::template C<auto> u = tcv; // { dg-error "" "" { target c++20 } }
+ T::template C<auto>::f (tcv, u); // { dg-error "" }
+ T::template D<auto> (t); // { dg-error "" }
}
struct T2 {
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84979.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84979.C
index 81555eb..a836015 100644
--- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84979.C
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84979.C
@@ -5,5 +5,5 @@ template<typename> void foo() {}
void bar()
{
- foo<auto>(); // { dg-error "not permitted|invalid|no matching function" }
+ foo<auto>(); // { dg-error "" }
}
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr85846.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr85846.C
new file mode 100644
index 0000000..7fda002
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr85846.C
@@ -0,0 +1,12 @@
+// PR c++/85846
+// { dg-do compile { target c++20 } }
+
+template<int=0>
+concept A = true;
+
+bool i(A<>);
+
+template<class=int>
+concept B = true;
+
+bool j(B<>);
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr98394.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr98394.C
new file mode 100644
index 0000000..c8407cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr98394.C
@@ -0,0 +1,14 @@
+// PR c++/98394
+// { dg-do compile { target c++20 } }
+
+template<int...>
+concept C = true;
+
+template<int, int>
+concept D = true;
+
+int main() {
+ if (C<1>); // { dg-bogus "does not constrain a type" }
+ if (D<1>); // { dg-error "wrong number of template arguments" }
+ // { dg-bogus "does not constrain a type" "" { target *-*-* } .-1 }
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C
index 22696c3..0103e7a 100644
--- a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C
@@ -3,16 +3,21 @@
template<int N, typename T>
concept Foo = requires(T t) { foo<N + 1>(t); }; // { dg-error "template instantiation depth" }
-template<int N = 1, typename T = int>
- requires Foo<N, T>
-int foo(T t)
+namespace ns
{
- return foo<N + 1>(t);
+ struct S { };
+
+ template<int N, typename T>
+ requires Foo<N, T>
+ int foo(T t)
+ {
+ return foo<N + 1>(t);
+ }
}
int main(int, char**)
{
- return foo<1>(1);
+ return foo<1>(ns::S{});
}
// { dg-prune-output "compilation terminated" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-this1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-this1.C
new file mode 100644
index 0000000..d717028
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-this1.C
@@ -0,0 +1,30 @@
+// PR c++/103198
+// { dg-do compile { target c++20 } }
+
+template<class T, class = void>
+struct A {
+ T val;
+
+ template<class U>
+ requires requires { val.x; }
+ void f(U);
+
+ static void g(int)
+ requires requires { val.x; };
+
+ void h(int)
+ requires requires { val.x; };
+};
+
+struct B { int x; };
+struct C { };
+
+int main() {
+ A<B>().f(0);
+ A<B>().g(0);
+ A<B>().h(0);
+
+ A<C>().f(0); // { dg-error "no match" }
+ A<C>().g(0); // { dg-error "no match" }
+ A<C>().h(0); // { dg-error "no match" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-uneval5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-uneval5.C
new file mode 100644
index 0000000..a315a59
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-uneval5.C
@@ -0,0 +1,17 @@
+// PR c++/103714
+// { dg-do compile { target c++20 } }
+
+template<int I>
+struct A {
+ static const int i = I;
+
+ template<int J>
+ void f(A<J> d = {}) requires (d.i != i) {
+ f<I>(); // { dg-error "no match" }
+ }
+};
+
+int main() {
+ A<0> a;
+ a.f<1>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-var-templ2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-var-templ2.C
new file mode 100644
index 0000000..e1802ac
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-var-templ2.C
@@ -0,0 +1,13 @@
+// PR c++/103341
+// { dg-do compile { target c++20 } }
+
+template<class T, class U> concept same_as = __is_same(T, U);
+template<class T> same_as<T> auto v1a = 1;
+template<class T> same_as<T> auto v1b = T();
+template<class T> same_as<T*> auto v2a = 1; // { dg-error "constraints" }
+template<class T> same_as<T*> auto v2b = T(); // { dg-error "constraints" }
+
+template int v1a<int>;
+template int v1b<int>;
+template int v2a<int>; // { dg-message "required from here" }
+template int v2b<int>; // { dg-message "required from here" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval-memfn1.C b/gcc/testsuite/g++.dg/cpp2a/consteval-memfn1.C
new file mode 100644
index 0000000..910e7a1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/consteval-memfn1.C
@@ -0,0 +1,27 @@
+// PR c++/99895
+// { dg-do compile { target c++20 } }
+
+struct fixed_string {
+ consteval int size(int n) const {
+ if (n < 0) throw; // { dg-error "not a constant" }
+ return n;
+ }
+
+ static consteval int size_static(int n) {
+ if (n < 0) throw; // { dg-error "not a constant" }
+ return n;
+ }
+
+ consteval void operator()() const { }
+};
+
+template<class>
+void VerifyHash(fixed_string s) {
+ s.size(0); // { dg-bogus "" }
+ s.size(-1); // { dg-message "expansion of" }
+ s.size_static(0); // { dg-bogus "" }
+ s.size_static(-1); // { dg-message "expansion of" }
+ fixed_string::size_static(0); // { dg-bogus "" }
+ fixed_string::size_static(-1); // { dg-message "expansion of" }
+ s(); // { dg-bogus "" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval-memfn2.C b/gcc/testsuite/g++.dg/cpp2a/consteval-memfn2.C
new file mode 100644
index 0000000..71748f4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/consteval-memfn2.C
@@ -0,0 +1,34 @@
+// PR c++/99895
+// { dg-do compile { target c++20 } }
+
+static constexpr unsigned hash(const char* s, unsigned length)
+{
+ s=s;
+ return length;
+}
+template<unsigned N>
+struct fixed_string
+{
+ constexpr fixed_string(const char (&s)[N])
+ {
+ for (int i = 0; i < N; i++)
+ str[i] = s[i];
+ }
+ consteval const char* data() const { return str; }
+ consteval unsigned size() const { return N-1; }
+ char str[N];
+};
+template<unsigned expected_hash, fixed_string... s>
+static consteval void VerifyHash()
+{
+ (
+ [](auto){static_assert(hash(s.data(), s.size()) == expected_hash);}(s)
+ ,...);
+ // The compiler mistakenly translates s.data() into s.data(&s)
+ // and then complains that the call is not valid, because
+ // the function expects 0 parameters and 1 "was provided".
+}
+void foo()
+{
+ VerifyHash<5, "khaki", "plums">();
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval20.C b/gcc/testsuite/g++.dg/cpp2a/consteval20.C
index 2c35963..bd44712 100644
--- a/gcc/testsuite/g++.dg/cpp2a/consteval20.C
+++ b/gcc/testsuite/g++.dg/cpp2a/consteval20.C
@@ -10,10 +10,14 @@ constexpr S s;
int
bar ()
{
+ auto c = &S::foo; // { dg-error "taking address of an immediate function" }
+ constexpr auto d = &S::foo; // { dg-error "taking address of an immediate function" }
+ static auto e = &S::foo; // { dg-error "taking address of an immediate function" }
return (s.*&S::foo) (); // { dg-error "taking address of an immediate function" }
}
constexpr auto a = &S::foo; // { dg-error "taking address of an immediate function" }
+auto b = &S::foo; // { dg-error "taking address of an immediate function" }
consteval int
baz ()
diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval23.C b/gcc/testsuite/g++.dg/cpp2a/consteval23.C
index 4c7e844..a6fdaa8 100644
--- a/gcc/testsuite/g++.dg/cpp2a/consteval23.C
+++ b/gcc/testsuite/g++.dg/cpp2a/consteval23.C
@@ -2,6 +2,7 @@
// { dg-do compile { target c++20 } }
consteval int foo () { return 42; }
+constexpr auto baz (int (*fn) ()) { return fn; }
consteval int
bar (int (*fn) () = foo)
@@ -11,3 +12,6 @@ bar (int (*fn) () = foo)
static_assert (bar () == 42);
static_assert (bar (foo) == 42);
+static_assert (bar (&foo) == 42);
+static_assert (bar (baz (foo)) == 42);
+static_assert (bar (baz (&foo)) == 42);
diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval25.C b/gcc/testsuite/g++.dg/cpp2a/consteval25.C
new file mode 100644
index 0000000..80b76a4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/consteval25.C
@@ -0,0 +1,17 @@
+// PR c++/102753
+// { dg-do compile { target c++20 } }
+// { dg-options "" }
+
+consteval int foo () { return 42; }
+
+consteval int
+bar (int (*fn) ())
+{
+ return fn ();
+}
+
+void
+baz ()
+{
+ static_assert (bar (({ constexpr auto a = 1; foo; })) == 42);
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval26.C b/gcc/testsuite/g++.dg/cpp2a/consteval26.C
new file mode 100644
index 0000000..01acb80
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/consteval26.C
@@ -0,0 +1,39 @@
+// PR c++/103912
+// { dg-do run { target c++20 } }
+// { dg-additional-options "-O2 -g -fkeep-inline-functions" }
+
+extern "C" void abort ();
+
+struct A { A () {} };
+
+consteval auto
+foo ()
+{
+ if (1)
+ ;
+ return [] (A x) { return 1; };
+}
+
+consteval auto
+bar (int a)
+{
+ int b = a + 4;
+ if (1)
+ ;
+ return [=] (A x) { return a + b; };
+}
+
+int
+main ()
+{
+ A x;
+ auto h = foo ();
+ if (h (x) != 1)
+ abort ();
+ auto i = bar (5);
+ if (i (x) != 14)
+ abort ();
+ auto j = bar (42);
+ if (j (x) != 88)
+ abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval27.C b/gcc/testsuite/g++.dg/cpp2a/consteval27.C
new file mode 100644
index 0000000..72d56df
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/consteval27.C
@@ -0,0 +1,18 @@
+// PR c++/104055
+// { dg-do run { target c++20 } }
+
+int g;
+
+struct A {
+ ~A () { if (a != 17 || b != 26) __builtin_abort (); g = 42; }
+ consteval A () : a (17), b (26) {}
+ int a, b;
+};
+
+int
+main ()
+{
+ A{};
+ if (g != 42)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval28.C b/gcc/testsuite/g++.dg/cpp2a/consteval28.C
new file mode 100644
index 0000000..293a6be
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/consteval28.C
@@ -0,0 +1,10 @@
+// { dg-do compile { target c++20 } }
+
+struct empty { };
+
+consteval void f(empty) { }
+
+template<class>
+void g(empty e) {
+ f(e);
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor11.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor11.C
new file mode 100644
index 0000000..e371f89
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor11.C
@@ -0,0 +1,12 @@
+// PR c++/102191
+// { dg-do compile { target c++20 } }
+
+struct X {
+ struct A {
+ constexpr ~A() noexcept(false) { }
+ };
+
+ constexpr A operator()(auto...) { return {}; }
+};
+
+void f() { []() consteval { X{}(); }(); }
diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C
index 69fe9e2..a68a6b4 100644
--- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C
+++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C
@@ -7,16 +7,16 @@ struct S
constexpr ~S () {}
int s;
};
-struct T // { dg-message "'T' is not literal because" }
-{ // { dg-message "'T' does not have 'constexpr' destructor" "" { target *-*-* } .-1 }
+struct T // { dg-message "'T' is not literal because" "" { target { ! implicit_constexpr } } }
+{ // { dg-message "'T' does not have 'constexpr' destructor" "" { target { ! implicit_constexpr } } .-1 }
constexpr T () : t (0) {}
- ~T () {} // { dg-message "defaulted destructor calls non-'constexpr' 'T::~T\\(\\)'" }
+ ~T () {} // { dg-message "defaulted destructor calls non-'constexpr' 'T::~T\\(\\)'" "" { target { ! implicit_constexpr } } }
int t;
};
struct U : public S
{
constexpr U () : u (0) {}
- constexpr ~U () = default; // { dg-error "explicitly defaulted function 'constexpr U::~U\\(\\)' cannot be declared 'constexpr' because the implicit declaration is not 'constexpr'" }
+ constexpr ~U () = default; // { dg-error "explicitly defaulted function 'constexpr U::~U\\(\\)' cannot be declared 'constexpr' because the implicit declaration is not 'constexpr'" "" { target { ! implicit_constexpr } } }
int u;
T t;
};
@@ -100,11 +100,11 @@ struct W8
struct X : public T
{
constexpr X () : x (0) {}
- constexpr ~X () = default; // { dg-error "explicitly defaulted function 'constexpr X::~X\\(\\)' cannot be declared 'constexpr' because the implicit declaration is not 'constexpr'" }
+ constexpr ~X () = default; // { dg-error "explicitly defaulted function 'constexpr X::~X\\(\\)' cannot be declared 'constexpr' because the implicit declaration is not 'constexpr'" "" { target { ! implicit_constexpr } } }
int x;
};
constexpr S s;
-constexpr T t; // { dg-error "the type 'const T' of 'constexpr' variable 't' is not literal" }
+constexpr T t; // { dg-error "the type 'const T' of 'constexpr' variable 't' is not literal" "" { target { ! implicit_constexpr } } }
constexpr W0 w1;
constexpr W0 w2 = 12;
constexpr W1 w3 = 5; // { dg-message "in 'constexpr' expansion of" }
@@ -167,19 +167,19 @@ constexpr int x5 = f5 (); // { dg-message "in 'constexpr' expansion of" }
void
f6 ()
{
- constexpr T t2; // { dg-error "the type 'const T' of 'constexpr' variable 't2' is not literal" }
+ constexpr T t2; // { dg-error "the type 'const T' of 'constexpr' variable 't2' is not literal" "" { target { ! implicit_constexpr } } }
}
constexpr int
f7 ()
{
- constexpr T t3; // { dg-error "the type 'const T' of 'constexpr' variable 't3' is not literal" }
+ constexpr T t3; // { dg-error "the type 'const T' of 'constexpr' variable 't3' is not literal" "" { target { ! implicit_constexpr } } }
return 0;
}
constexpr int
f8 ()
{
- T t4; // { dg-error "variable 't4' of non-literal type 'T' in 'constexpr' function only available with" "" { target c++20_down } }
+ T t4; // { dg-error "variable 't4' of non-literal type 'T' in 'constexpr' function only available with" "" { target { c++20_down && { ! implicit_constexpr } } } }
return 0;
}
diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C
index 75984a2..e56ecfe 100644
--- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C
+++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C
@@ -73,11 +73,11 @@ fn7 (bool b)
int a; // { dg-message ".int a. is not const" }
if (b)
a = 42;
- return a;
+ return a; // { dg-error "the value of .a. is not usable" }
}
static_assert (fn7 (true) == 42);
-static_assert (fn7 (false) == 42); // { dg-error "non-constant condition|the value of .a. is not usable" }
+static_assert (fn7 (false) == 42); // { dg-error "non-constant condition" }
// { dg-message "in .constexpr. expansion of" "" { target *-*-* } .-1 }
constexpr int
diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C
index 6762c24..7eed50c 100644
--- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C
+++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C
@@ -9,7 +9,7 @@ struct A {
struct B : A {
constexpr B () : b (0) {}
- virtual int foo () { return 0 + b * 4; } // { dg-message "declared here" }
+ virtual int foo () { return 0 + b * 4; } // { dg-message "declared here" "" { target { ! implicit_constexpr } } }
int b;
};
@@ -18,7 +18,7 @@ foo ()
{
A *a = new B ();
a->a = 4;
- int r = a->foo (); // { dg-error "call to non-.constexpr. function" }
+ int r = a->foo (); // { dg-error "call to non-.constexpr. function" "" { target { ! implicit_constexpr } } }
delete a;
return r;
}
diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual20.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual20.C
new file mode 100644
index 0000000..3c411fa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual20.C
@@ -0,0 +1,22 @@
+// Test for constexpr call through vbase thunk.
+// { dg-do compile { target c++20 } }
+
+class Rep {
+public:
+ constexpr virtual int foo() { return 1; }
+};
+
+class VBase {
+public:
+ constexpr virtual int foo() { return 2; }
+};
+
+class Main : public Rep, virtual public VBase {
+public:
+ constexpr virtual int foo() { return 5; }
+};
+
+int main() {
+ Main m;
+ static_assert(static_cast<VBase*>(&m)->foo() == 5); // { dg-error "" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit11.C b/gcc/testsuite/g++.dg/cpp2a/constinit11.C
index e8b3bcb..b090277 100644
--- a/gcc/testsuite/g++.dg/cpp2a/constinit11.C
+++ b/gcc/testsuite/g++.dg/cpp2a/constinit11.C
@@ -39,9 +39,9 @@ constinit thread_local const int &r2 = gl;
constinit const int &r3 // { dg-error "variable .r3. does not have a constant initializer" }
= foo (); // { dg-error "call to non-.constexpr. function" }
constinit const literal &r4 = 42;
-constinit const nonliteral &r5 // { dg-error "variable .r5. does not have a constant initializer" }
- = 42; // { dg-error "call to non-.constexpr. function" }
-constinit const int &r6 = nonliteral(2).m; // { dg-error "variable .r6. does not have a constant initializer|call to non-.constexpr. function" }
+constinit const nonliteral &r5 // { dg-error "variable .r5. does not have a constant initializer" "" { target { ! implicit_constexpr } } }
+ = 42; // { dg-error "call to non-.constexpr. function" "" { target { ! implicit_constexpr } } }
+constinit const int &r6 = nonliteral(2).m; // { dg-error "variable .r6. does not have a constant initializer|call to non-.constexpr. function" "" { target { ! implicit_constexpr } } }
constinit pod p1;
constinit pod p2 = { 42 };
@@ -64,8 +64,8 @@ constinit thread_local literal l11{};
pod S::p;
constinit pod S::pc(S::p); // { dg-error "variable .S::pc. does not have a constant initializer|not usable" }
-constinit const nonliteral S::n(42); // { dg-error "variable .S::n. does not have a constant initializer|call to non-.constexpr. function" }
-constinit int n1 = nonliteral{42}.m; // { dg-error "variable .n1. does not have a constant initializer|temporary of non-literal type" }
+constinit const nonliteral S::n(42); // { dg-error "variable .S::n. does not have a constant initializer|call to non-.constexpr. function" "" { target { ! implicit_constexpr } } }
+constinit int n1 = nonliteral{42}.m; // { dg-error "variable .n1. does not have a constant initializer|temporary of non-literal type" "" { target { ! implicit_constexpr } } }
constinit int n2 = literal{42}.m;
void
diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit12.C b/gcc/testsuite/g++.dg/cpp2a/constinit12.C
index cc6569b..faa1b43 100644
--- a/gcc/testsuite/g++.dg/cpp2a/constinit12.C
+++ b/gcc/testsuite/g++.dg/cpp2a/constinit12.C
@@ -8,7 +8,7 @@ struct S {
template <class T>
struct U {
T m;
- constexpr U(int i) : m(i) { } // { dg-error "call to non-.constexpr. function" }
+ constexpr U(int i) : m(i) { } // { dg-error "call to non-.constexpr. function" "" { target { ! implicit_constexpr } } }
};
-constinit U<S> u(42); // { dg-error "does not have a constant initializer|called in a constant expression" }
+constinit U<S> u(42); // { dg-error "does not have a constant initializer|called in a constant expression" "" { target { ! implicit_constexpr } } }
diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit14.C b/gcc/testsuite/g++.dg/cpp2a/constinit14.C
index 86a058b..06c4cb4 100644
--- a/gcc/testsuite/g++.dg/cpp2a/constinit14.C
+++ b/gcc/testsuite/g++.dg/cpp2a/constinit14.C
@@ -2,7 +2,7 @@
// { dg-do compile { target c++20 } }
struct Value {
- Value() : v{new int{42}} {}
+ Value() : v{new int{42}} {} // { dg-error "result of 'operator new'" "" { target implicit_constexpr } }
int* v;
};
diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit15.C b/gcc/testsuite/g++.dg/cpp2a/constinit15.C
index 29e8b51..b621558 100644
--- a/gcc/testsuite/g++.dg/cpp2a/constinit15.C
+++ b/gcc/testsuite/g++.dg/cpp2a/constinit15.C
@@ -6,7 +6,7 @@ struct B {
};
struct A {
- constinit static inline B b1{}; // { dg-error "does not have a constant initializer|call to non-.constexpr. function" }
+ constinit static inline B b1{}; // { dg-error "does not have a constant initializer|call to non-.constexpr. function" "" { target { ! implicit_constexpr } } }
};
int main() {
diff --git a/gcc/testsuite/g++.dg/cpp2a/desig20.C b/gcc/testsuite/g++.dg/cpp2a/desig20.C
new file mode 100644
index 0000000..0ceda7c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/desig20.C
@@ -0,0 +1,20 @@
+// PR c++/101405
+// { dg-do compile { target c++20 } }
+
+struct A {
+ int const a = 1;
+ int const b = 2;
+};
+
+struct B : A {
+ using A::a;
+ using A::b;
+ int const c = 3;
+ int const d = 4;
+};
+
+int main()
+{
+ [[maybe_unused]] B b =
+ { .a = 10, .d = 42 }; // { dg-error "not a direct member" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/desig21.C b/gcc/testsuite/g++.dg/cpp2a/desig21.C
new file mode 100644
index 0000000..daadfa5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/desig21.C
@@ -0,0 +1,48 @@
+// PR c++/55227
+// Test designated initializer for char array by string constant
+
+// { dg-options "" }
+
+struct C {char a[2];};
+
+/* Case a, designated, unbraced, string-literal of the exact same size
+ as the initialized char array; valid and accepted before and after. */
+C a = {.a="a"};
+
+/* Cases b,c,d, designated, braced or mimatched-size, string literal,
+ previously rejected; "C99 designator 'a' outside aggregate initializer". */
+C b = {.a=""};
+C c = {.a={""}};
+C d = {.a={"a"}};
+
+/* Case e, designated char array field and braced, designated array element(s)
+ (with GNU [N]= extension) valid and accepted before and after. */
+C e = {.a={[0]='a'}};
+
+/* Cases f,g,h, braced string literal, 'designated' within inner braces;
+ invalid, previously accepted as positional with 'designator' ignored. */
+C f = {{[0]="a"}}; // { dg-error "C99 designator .0. outside aggregate initializer" }
+C g = {{.a="a"}}; // { dg-error "C99 designator .a. outside aggregate initializer" }
+C h = {{.b="a"}}; // { dg-error "C99 designator .b. outside aggregate initializer" }
+
+char a2[][10] = { [0] = { "aaa" } };
+
+struct D { C c; int a[8]; };
+
+D x = { .c {.a={"a"}}, .a={1,2,3,4,5,6,7,8} };
+
+struct A { union { int a; char c[4]; }; };
+
+A non = { .c = "c++" };
+
+template <class T>
+void t()
+{
+ C ca[] = { {.a=""}, {.a={""}}, };
+
+}
+
+void u()
+{
+ return t<void>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/destroying-delete5.C b/gcc/testsuite/g++.dg/cpp2a/destroying-delete5.C
index 553c964..6113d7f 100644
--- a/gcc/testsuite/g++.dg/cpp2a/destroying-delete5.C
+++ b/gcc/testsuite/g++.dg/cpp2a/destroying-delete5.C
@@ -18,7 +18,7 @@ void * Expression::operator new(std::size_t sz)
int i;
-void Expression::operator delete(Expression *p, std::destroying_delete_t)
+void Expression::operator delete(Expression *p, std::destroying_delete_t) // { dg-message "destroying delete" }
{
Expression * e = p;
::i = e->i;
@@ -28,7 +28,7 @@ void Expression::operator delete(Expression *p, std::destroying_delete_t)
int main()
{
- auto p = new Expression();
+ auto p = new Expression(); // { dg-warning "no corresponding dealloc" }
p->i = 1;
delete p;
if (i != 1)
diff --git a/gcc/testsuite/g++.dg/cpp2a/destroying-delete6.C b/gcc/testsuite/g++.dg/cpp2a/destroying-delete6.C
new file mode 100644
index 0000000..be78373
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/destroying-delete6.C
@@ -0,0 +1,36 @@
+// PR c++/100588
+// { dg-do run { target c++20 } }
+
+extern "C" void abort ();
+extern "C" int puts (const char *);
+#include <new>
+
+#ifndef DEBUG
+#define puts(S)
+#endif
+
+class A {
+ public:
+ A() { throw 42; }
+ ~A() { puts("A::~A"); }
+
+ void operator delete(void* p) {
+ puts("regular delete invoked");
+ ::operator delete(p);
+ }
+
+ void operator delete(A* p, std::destroying_delete_t) {
+ puts("destroying delete invoked");
+ p->~A();
+ ::operator delete(p);
+ abort ();
+ }
+};
+
+int main() {
+ try {
+ new A;
+ } catch (int) {
+ }
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C b/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C
index 3239df8..c65ea6b 100644
--- a/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C
+++ b/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C
@@ -134,8 +134,8 @@
#ifndef __cpp_constexpr
# error "__cpp_constexpr"
-#elif __cpp_constexpr != 201907
-# error "__cpp_constexpr != 201907"
+#elif __cpp_constexpr != 202002
+# error "__cpp_constexpr != 202002"
#endif
#ifndef __cpp_decltype_auto
@@ -528,8 +528,8 @@
#ifndef __cpp_concepts
# error "__cpp_concepts"
-#elif __cpp_concepts != 201907
-# error "__cpp_concepts != 201907"
+#elif __cpp_concepts != 202002
+# error "__cpp_concepts != 202002"
#endif
#ifndef __cpp_using_enum
diff --git a/gcc/testsuite/g++.dg/cpp2a/fn-template23.C b/gcc/testsuite/g++.dg/cpp2a/fn-template23.C
new file mode 100644
index 0000000..b85d4c9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/fn-template23.C
@@ -0,0 +1,36 @@
+// PR c++/102670
+// { dg-do compile { target c++20 } }
+
+namespace ns {
+ struct S { };
+
+ template<int I>
+ constexpr int adl(const S &) {
+ return I;
+ }
+}
+
+namespace redirect {
+ template<class T, int I>
+ concept can_call_adl = requires(T t) {
+ adl<I>(t);
+ };
+
+ template<int I>
+ struct adl_fn {
+ template<can_call_adl<I> T>
+ constexpr decltype(auto) operator()(T t) const {
+ return adl<I>(t);
+ }
+ };
+
+ namespace {
+ template<int I>
+ constexpr inline adl_fn<I> adl{};
+ }
+}
+
+int main() {
+ static_assert(redirect::can_call_adl<ns::S, 3>);
+ redirect::adl<3>(ns::S{});
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/fn-template24.C b/gcc/testsuite/g++.dg/cpp2a/fn-template24.C
new file mode 100644
index 0000000..b444ac6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/fn-template24.C
@@ -0,0 +1,16 @@
+// PR c++/99911
+// { dg-do compile { target c++20 } }
+
+namespace N {
+ struct A { };
+ template<class T> void get(A);
+};
+
+template<class T>
+auto f() {
+ return []<class U>(U) { get<U>(T{}); };
+}
+
+int main() {
+ f<N::A>()(0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/fn-template25.C b/gcc/testsuite/g++.dg/cpp2a/fn-template25.C
new file mode 100644
index 0000000..5da409c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/fn-template25.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++20 } }
+
+template<class T>
+void f() {
+ g<int>(T{}); // { dg-error "argument-dependent lookup" }
+ // { dg-bogus "no match" "" { target *-*-* } .-1 }
+}
+
+template<class T>
+void g(int); // { dg-message "declared here, later" }
+
+template void f<int>();
diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C b/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C
index 3e00e68..bc54a4c 100644
--- a/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C
+++ b/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C
@@ -1,6 +1,6 @@
// P0806R2
// { dg-do compile { target c++17 } }
-// { dg-options "" }
+// { dg-options "-pedantic" }
struct X {
int x;
diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class50.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class50.C
new file mode 100644
index 0000000..1c2786a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class50.C
@@ -0,0 +1,13 @@
+// PR c++/102933
+// { dg-do compile { target c++20 } }
+
+template<class T> struct X { T t; };
+
+template<X> void f();
+
+template<class T>
+void g() {
+ f<X{T{0}}>();
+}
+
+template void g<int>();
diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class50a.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class50a.C
new file mode 100644
index 0000000..eb8a6ad
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class50a.C
@@ -0,0 +1,5 @@
+// PR c++/102933
+// { dg-do compile { target c++20 } }
+// { dg-additional-options "-fconcepts-ts" }
+
+#include "nontype-class50.C"
diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class51.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class51.C
new file mode 100644
index 0000000..1501aa1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class51.C
@@ -0,0 +1,26 @@
+// PR c++/103631
+// { dg-do compile { target c++20 } }
+
+template<class Target, template<auto> class T>
+constexpr bool is_specialize_value_v = false;
+
+template<template<auto> class T, auto Ts>
+constexpr bool is_specialize_value_v<T<Ts>, T> = true;
+
+template<class Target, template<auto> class T>
+concept specialize_value = is_specialize_value_v<Target, T>;
+
+template<int> struct Test { };
+
+template<Test>
+struct A {
+ template<class T> void f(T) requires specialize_value<T, A>;
+};
+
+int main() {
+ A<Test<0>{}> a0;
+ A<Test<1>{}> a1;
+ a0.f(a0);
+ a0.f(a1);
+ a0.f(0); // { dg-error "no match" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C
index 6ccc7e8..dff5927 100644
--- a/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C
+++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C
@@ -9,7 +9,7 @@ struct A
struct B
{
A a;
- bool operator==(const B&) const = default; // { dg-error "A::operator==" }
+ bool operator==(const B&) const = default; // { dg-error "A::operator==" "" { target { ! implicit_constexpr } } }
};
-constexpr bool x = B() == B(); // { dg-error "non-.constexpr" }
+constexpr bool x = B() == B(); // { dg-error "non-.constexpr" "" { target { ! implicit_constexpr } } }
diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C
index d31faef..7a517a8 100644
--- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C
+++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C
@@ -12,5 +12,5 @@ struct D
};
constexpr D d{A()};
-static_assert (d == d); // { dg-error "non-constant|constexpr" }
-static_assert (!(d != d)); // { dg-error "non-constant|constexpr" }
+static_assert (d == d); // { dg-error "constant|constexpr" }
+static_assert (!(d != d)); // { dg-error "constant|constexpr" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth15.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth15.C
new file mode 100644
index 0000000..00ea6c1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth15.C
@@ -0,0 +1,22 @@
+// PR c++/96242
+// { dg-do compile { target c++20 } }
+
+#include <compare>
+
+template<bool B>
+struct X {
+ auto operator<=>(const X&) const noexcept(B) = default;
+ bool operator==(const X&) const noexcept(!B) = default;
+};
+
+X<true> x_t;
+static_assert(noexcept(x_t <=> x_t));
+static_assert(noexcept(x_t < x_t));
+static_assert(!noexcept(x_t == x_t));
+static_assert(!noexcept(x_t != x_t));
+
+X<false> x_f;
+static_assert(!noexcept(x_f <=> x_f));
+static_assert(!noexcept(x_f < x_f));
+static_assert(noexcept(x_f == x_f));
+static_assert(noexcept(x_f != x_f));
diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc20.C b/gcc/testsuite/g++.dg/cpp2a/srcloc20.C
new file mode 100644
index 0000000..acdf5a6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/srcloc20.C
@@ -0,0 +1,44 @@
+// { dg-do compile { target c++20 } }
+
+namespace std {
+ struct source_location {
+ struct __impl {
+ const char *_M_file_name;
+ const char *_M_function_name;
+ unsigned int _M_line, _M_column;
+ };
+ const __impl *__ptr;
+ constexpr source_location () : __ptr (nullptr) {}
+ static consteval source_location
+ current (const void *__p = __builtin_source_location ()) {
+ source_location __ret;
+ __ret.__ptr = static_cast <const __impl *> (__p);
+ return __ret;
+ }
+ constexpr const char *file_name () const {
+ return __ptr ? __ptr->_M_file_name : "";
+ }
+ constexpr const char *function_name () const {
+ return __ptr ? __ptr->_M_function_name : "";
+ }
+ constexpr unsigned line () const {
+ return __ptr ? __ptr->_M_line : 0;
+ }
+ constexpr unsigned column () const {
+ return __ptr ? __ptr->_M_column : 0;
+ }
+ };
+}
+
+using namespace std;
+
+auto a = source_location::current; // { dg-error "taking address of an immediate function" }
+constexpr auto b = &source_location::current; // { dg-error "taking address of an immediate function" }
+
+void
+foo ()
+{
+ auto c = &source_location::current; // { dg-error "taking address of an immediate function" }
+ constexpr auto d = source_location::current; // { dg-error "taking address of an immediate function" }
+ static auto e = source_location::current; // { dg-error "taking address of an immediate function" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C
index 62cb86a..ab7c012 100644
--- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C
+++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C
@@ -9,5 +9,5 @@ struct non_literal_class {
// auto operator<=> (const non_literal_fixed_string&) = default;
};
-template <non_literal_class> // { dg-error "11:is not a valid type for a template non-type parameter because it is not structural" }
-int operator"" _udl(); // { dg-error "5:literal operator template .int operator\"\"_udl\\(\\). has invalid parameter list" }
+template <non_literal_class> // { dg-error "11:is not a valid type for a template non-type parameter because it is not structural" "" { target { ! implicit_constexpr } } }
+int operator"" _udl(); // { dg-error "5:literal operator template .int operator\"\"_udl\\(\\). has invalid parameter list" "" { target { ! implicit_constexpr } } }
diff --git a/gcc/testsuite/g++.dg/debug/debug.exp b/gcc/testsuite/g++.dg/debug/debug.exp
index 2448ff6..5493cf6 100644
--- a/gcc/testsuite/g++.dg/debug/debug.exp
+++ b/gcc/testsuite/g++.dg/debug/debug.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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/auto1.C b/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C
index 5daf3cd..3e5867d 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C
@@ -1,6 +1,6 @@
// PR c++/53756
// { dg-do compile { target c++14 } }
-// { dg-options "-gdwarf-2 -dA -fno-debug-types-section" }
+// { dg-options "-gdwarf-2 -dA -fno-debug-types-section -fno-inline" }
// We're looking for something like
// .uleb128 0x3 # (DIE (0x33) DW_TAG_subprogram)
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C
index c0d3d22..b211c02 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C
@@ -1,5 +1,5 @@
// origin PR debug/49047
-// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" }
+// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings -fno-implicit-constexpr" }
// { dg-do compile }
struct K
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp b/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp
index bcefc2d..20cbe26 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2007-2022 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/lambda1.C b/gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C
index bd3ce5d..b2566c7 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C
@@ -1,6 +1,6 @@
// PR c++/43912
// { dg-do compile { target c++11 } }
-// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings -gno-strict-dwarf" }
+// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings -gno-strict-dwarf -fno-inline" }
// 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 { xfail { powerpc-ibm-aix* } } } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr101378.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr101378.C
new file mode 100644
index 0000000..ec5e44d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr101378.C
@@ -0,0 +1,13 @@
+// PR debug/101378
+// { dg-do compile { target c++11 } }
+// { dg-options "-gdwarf-5 -dA" }
+// { dg-final { scan-assembler-times "0\[^0-9x\\r\\n\]* DW_AT_data_member_location" 1 } }
+// { dg-final { scan-assembler-times "1\[^0-9x\\r\\n\]* DW_AT_data_member_location" 1 } }
+// { dg-final { scan-assembler-times "2\[^0-9x\\r\\n\]* DW_AT_data_member_location" 1 } }
+// { dg-final { scan-assembler-not "-1\[^0-9x\\r\\n\]* DW_AT_data_member_location" } }
+
+struct E {};
+struct S
+{
+ [[no_unique_address]] E e, f, g;
+} s;
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr104407.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr104407.C
new file mode 100644
index 0000000..4752587
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr104407.C
@@ -0,0 +1,12 @@
+// PR debug/104407
+// { dg-do compile { target c++17 } }
+// { dg-options "-O1 -fcompare-debug" }
+
+struct A { int i; long j; int k : 2; char l; } a;
+
+auto [ aa, bb, cc, dd ] = a;
+
+namespace N
+{
+ auto & [ m, n, o, ppp ] = a;
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C
index e7a6aa4..0a3721e 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C
@@ -1,6 +1,6 @@
// PR debug/54508
// { dg-do compile }
-// { dg-options "-gdwarf-2 -g2 -dA -fno-merge-debug-strings" }
+// { dg-options "-gdwarf-2 -g2 -dA -fno-merge-debug-strings -fno-inline" }
// { dg-final { scan-assembler "\"cbase\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
// { dg-final { scan-assembler "\"OPCODE\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C
index af0f6f1..1fb5004 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C
@@ -1,6 +1,6 @@
// { dg-do compile { target c++11 } }
// { dg-skip-if "" { powerpc-ibm-aix* } }
-// { dg-options "-gpubnames -gdwarf-4 -fno-debug-types-section -dA" }
+// { dg-options "-gpubnames -gdwarf-4 -fno-debug-types-section -dA -fno-inline" }
// { 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" } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-3.C b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-3.C
index 63b870b..37e04fb 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-3.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-3.C
@@ -1,6 +1,6 @@
// { dg-do compile { target c++11 } }
// { dg-skip-if "" { powerpc-ibm-aix* } }
-// { dg-options "-gpubnames -gdwarf-4 -fdebug-types-section -dA" }
+// { dg-options "-gpubnames -gdwarf-4 -fdebug-types-section -dA -fno-inline" }
// { 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" } }
diff --git a/gcc/testsuite/g++.dg/dfp/dfp.exp b/gcc/testsuite/g++.dg/dfp/dfp.exp
index dedde23..22e32d1 100644
--- a/gcc/testsuite/g++.dg/dfp/dfp.exp
+++ b/gcc/testsuite/g++.dg/dfp/dfp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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 8a91898..23542ac 100644
--- a/gcc/testsuite/g++.dg/dg.exp
+++ b/gcc/testsuite/g++.dg/dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2021 Free Software Foundation, Inc.
+# Copyright (C) 2000-2022 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/diagnostic/ptrtomem3.C b/gcc/testsuite/g++.dg/diagnostic/ptrtomem3.C
new file mode 100644
index 0000000..6096a98
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/ptrtomem3.C
@@ -0,0 +1,14 @@
+// Check that the diagnostic for a pointer-to-member expression has the caret
+// at the &.
+
+struct A
+{
+ int i;
+};
+
+void f();
+
+int main()
+{
+ return &A::i; // { dg-error "10:cannot convert" }
+}
diff --git a/gcc/testsuite/g++.dg/diagnostic/recur-align.C b/gcc/testsuite/g++.dg/diagnostic/recur-align.C
new file mode 100644
index 0000000..e7d4b9a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/recur-align.C
@@ -0,0 +1,19 @@
+// ICE with diagnostic recursion
+// { dg-do compile { target { c++11_only || c++14_only } } }
+// { dg-options -Waligned-new }
+
+struct __attribute__ ((aligned(256))) Aligned
+{
+ int b;
+};
+
+template<typename T>
+auto Foo (const T* x) -> decltype (new T (*x))
+{
+ return new T (*x); // { dg-warning "with extended alignment" }
+}
+
+void Bar () {
+ Aligned y;
+ Foo (&y);
+}
diff --git a/gcc/testsuite/g++.dg/diagnostic/redeclaration-2.C b/gcc/testsuite/g++.dg/diagnostic/redeclaration-2.C
new file mode 100644
index 0000000..4423e12
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/redeclaration-2.C
@@ -0,0 +1,19 @@
+// PR c++/103749
+
+struct foo {
+ template<typename>
+ friend struct bar;
+};
+
+struct bar { // { dg-error "redeclared as non-template" }
+ int baz;
+};
+
+template<typename>
+struct T; // { dg-message "previous" }
+
+struct T { // { dg-error "redeclared as non-template" }
+};
+
+bar var; // { dg-error "" }
+T t; // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/diagnostic/scope1.C b/gcc/testsuite/g++.dg/diagnostic/scope1.C
new file mode 100644
index 0000000..14d0a1b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/scope1.C
@@ -0,0 +1,12 @@
+// Test for avoiding redundant scope qualifiers.
+
+struct A
+{
+ struct B { };
+ static void f(B,B); // { dg-message {A::f\(B, B\)} }
+};
+
+int main()
+{
+ A::f(42); // { dg-error "no match" }
+}
diff --git a/gcc/testsuite/g++.dg/eh/aggregate1.C b/gcc/testsuite/g++.dg/eh/aggregate1.C
new file mode 100644
index 0000000..68d0ed7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/aggregate1.C
@@ -0,0 +1,56 @@
+// PR c++/52320
+// { dg-do run }
+
+#if DEBUG
+extern "C" int printf (const char *, ...);
+#define FUNCTION_NAME __PRETTY_FUNCTION__
+#define TRACE_FUNCTION printf ("%p->%s\n", this, FUNCTION_NAME);
+#else
+#define TRACE_FUNCTION
+#endif
+int c,d;
+#define TRACE_CTOR TRACE_FUNCTION ++c
+#define TRACE_DTOR TRACE_FUNCTION ++d
+
+int throw_at = 0;
+
+struct A {
+ A() { int i = c+1; if (i == throw_at) throw i; TRACE_CTOR; }
+ A(int i) { if (i == throw_at) throw i; TRACE_CTOR; }
+ A(const A&) { throw 10; }
+ A &operator=(const A&) { throw 11; return *this; }
+ ~A() { TRACE_DTOR; }
+};
+
+int fails;
+
+void try_idx (int i)
+{
+#if DEBUG
+ printf ("trying %d\n", i);
+#endif
+ throw_at = i;
+ c = d = 0;
+ int t = 10;
+ try {
+ struct X {
+ A e1[2], e2;
+ }
+ x2[3] = { { 1, 2, 3 }, { 4, 5, 6 } };
+ } catch (int x) { t = x; }
+ if (t != i || c != d || c != i-1)
+ {
+#if DEBUG
+ printf ("%d FAIL\n", i);
+#endif
+ ++fails;
+ }
+}
+
+int main()
+{
+ for (int i = 1; i <= 10; ++i)
+ try_idx (i);
+
+ return fails;
+}
diff --git a/gcc/testsuite/g++.dg/eh/aggregate2.C b/gcc/testsuite/g++.dg/eh/aggregate2.C
new file mode 100644
index 0000000..8424d63
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/aggregate2.C
@@ -0,0 +1,27 @@
+// PR c++/96876
+// { dg-do run { target c++11 } }
+
+int d;
+struct B {
+ ~B() { ++d; }
+};
+
+struct C1 { B b; int n; };
+struct C2 { int i; B b; int n; };
+
+int f() { throw 24; return 42; }
+int dummy;
+int g() { ++dummy; return 42; }
+
+int main() {
+ try {
+ C1 c{{}, f()};
+ } catch (...) { }
+
+ try {
+ C2 c{g(), {}, f()};
+ } catch (...) { }
+
+ if (d != 2)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/eh/array1.C b/gcc/testsuite/g++.dg/eh/array1.C
index 30b035c..79d62ad 100644
--- a/gcc/testsuite/g++.dg/eh/array1.C
+++ b/gcc/testsuite/g++.dg/eh/array1.C
@@ -2,10 +2,16 @@
// rather than one for each element.
// { dg-options "-fdump-tree-gimple" }
+#if __cplusplus < 201100L
+#define NOTHROW throw()
+#else
+#define NOTHROW noexcept
+#endif
+
struct A
{
A();
- ~A();
+ ~A() NOTHROW;
};
void f()
diff --git a/gcc/testsuite/g++.dg/eh/array2.C b/gcc/testsuite/g++.dg/eh/array2.C
new file mode 100644
index 0000000..d4d6c91
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/array2.C
@@ -0,0 +1,43 @@
+// Test that we clean up the right number of array elements when
+// a temporary destructor throws.
+// { dg-do run }
+
+#if __cplusplus > 201100L
+#define THROWING noexcept(false)
+#else
+#define THROWING
+#endif
+
+extern "C" void abort ();
+
+int b;
+int d = -1;
+struct A {
+ A() { }
+ A(const A&);
+ ~A() THROWING {
+ if (b == d) throw b;
+ }
+};
+struct B {
+ B(const A& = A()) { ++b; }
+ B(const B&);
+ ~B() { --b; }
+};
+void f()
+{
+ b = 0;
+ try
+ {
+ B bs[3];
+ if (b != 3) abort ();
+ }
+ catch (int i) { }
+ if (b != 0) abort ();
+}
+
+int main()
+{
+ for (d = 0; d <= 3; ++d)
+ f();
+}
diff --git a/gcc/testsuite/g++.dg/eh/array3.C b/gcc/testsuite/g++.dg/eh/array3.C
new file mode 100644
index 0000000..547541b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/array3.C
@@ -0,0 +1,40 @@
+// PR c++/66451
+// { dg-do run }
+
+#if __cplusplus > 201100L
+#define THROWING noexcept(false)
+#else
+#define THROWING
+#endif
+
+extern "C" void abort();
+
+int c;
+struct A
+{
+ int a;
+
+ A(int new_a) : a(new_a) { ++c; }
+ A(const A&); // not defined
+ ~A() THROWING
+ {
+ --c;
+ if(a==4)
+ throw a;
+ }
+};
+
+struct B
+{
+ A a[2];
+ ~B() { }
+};
+
+int sink;
+int main()
+{
+ try {
+ B b = {3,4};
+ } catch(...) { }
+ if (c != 0) abort();
+}
diff --git a/gcc/testsuite/g++.dg/eh/cleanup6.C b/gcc/testsuite/g++.dg/eh/cleanup6.C
new file mode 100644
index 0000000..e27563f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/cleanup6.C
@@ -0,0 +1,13 @@
+// Test that we don't wrap the non-throwing A cleanup with a B cleanup.
+
+// { dg-do compile { target c++11 } }
+// { dg-additional-options -fdump-tree-gimple }
+// { dg-final { scan-tree-dump-times "B::~B" 1 "gimple" } }
+
+struct A { A(); ~A(); };
+struct B { B(const A& = A()); ~B(); };
+
+int main()
+{
+ B b;
+}
diff --git a/gcc/testsuite/g++.dg/eh/ctor-fntry1.C b/gcc/testsuite/g++.dg/eh/ctor-fntry1.C
new file mode 100644
index 0000000..0c783bb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/ctor-fntry1.C
@@ -0,0 +1,23 @@
+// PR c++/61611
+// { dg-do run }
+
+struct A { };
+struct B { };
+
+struct Test
+{
+ Test()
+ try { throw A(); }
+ catch(const A&)
+ {
+ try { throw B(); }
+ catch(const B&) { }
+ }
+};
+
+int
+main()
+{
+ try { Test x; }
+ catch(const A&) { }
+}
diff --git a/gcc/testsuite/g++.dg/eh/delegating1.C b/gcc/testsuite/g++.dg/eh/delegating1.C
new file mode 100644
index 0000000..c33374a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/delegating1.C
@@ -0,0 +1,28 @@
+// PR c++/103711
+// { dg-do run { target c++11 } }
+
+int constructions = 0;
+int destructions = 0;
+
+struct A
+{
+ A() { constructions++; }
+ virtual ~A() { destructions++; }
+};
+
+struct B : public virtual A
+{
+ B(int) { }
+ B() : B(1) { throw -1; }
+ virtual ~B() = default;
+};
+
+struct C : public B { };
+
+int main() {
+ try {
+ C c;
+ }
+ catch (int) {}
+ return (constructions - destructions);
+}
diff --git a/gcc/testsuite/g++.dg/eh/delete1.C b/gcc/testsuite/g++.dg/eh/delete1.C
index 1727a74..92ed646 100644
--- a/gcc/testsuite/g++.dg/eh/delete1.C
+++ b/gcc/testsuite/g++.dg/eh/delete1.C
@@ -69,7 +69,7 @@ int ary ()
{
deleted = 0;
- Baz *p = new Baz[5];
+ Baz *p = new Baz[1];
try { delete[] p; }
catch (...) { return deleted != 1;}
return 1;
diff --git a/gcc/testsuite/g++.dg/eh/forced3.C b/gcc/testsuite/g++.dg/eh/forced3.C
index 9e92daf..51cbc8d 100644
--- a/gcc/testsuite/g++.dg/eh/forced3.C
+++ b/gcc/testsuite/g++.dg/eh/forced3.C
@@ -53,7 +53,7 @@ doit () throw()
int main()
{
- std::set_unexpected (handle_unexpected);
+ std::set_unexpected (handle_unexpected); // { dg-warning "deprecated" "" { target c++11 } }
doit ();
abort ();
}
diff --git a/gcc/testsuite/g++.dg/eh/new2.C b/gcc/testsuite/g++.dg/eh/new2.C
new file mode 100644
index 0000000..d4a1abf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/new2.C
@@ -0,0 +1,10 @@
+// PR c++/104007
+// { dg-do run }
+
+extern "C" void abort();
+#include <new>
+
+struct S { ~S() { abort(); } };
+int main() {
+ new (std::nothrow) S[1];
+}
diff --git a/gcc/testsuite/g++.dg/eh/ref-temp1.C b/gcc/testsuite/g++.dg/eh/ref-temp1.C
new file mode 100644
index 0000000..2df1a49
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/ref-temp1.C
@@ -0,0 +1,51 @@
+// PR c++/53868
+// { dg-do run { target c++11 } }
+
+#if __cplusplus > 201100L
+#define THROWING noexcept(false)
+#else
+#define THROWING
+#endif
+
+extern "C" int printf(const char *, ...);
+extern "C" void abort();
+
+struct SubobjectInA {
+ SubobjectInA();
+ ~SubobjectInA();
+};
+
+int a;
+struct A : SubobjectInA {
+ A() = delete;
+ A(const A &) = delete;
+ A(A &&) = delete;
+ A(int);
+ ~A();
+};
+
+#ifdef DEBUG
+#define TRACE_FUNC( ... ) \
+{ printf("%s\n", __PRETTY_FUNCTION__); __VA_ARGS__ }
+#else
+#define TRACE_FUNC( ... ) \
+{ __VA_ARGS__ }
+#endif
+
+struct Q {
+ Q() : q(0) TRACE_FUNC()
+ ~Q() THROWING;
+ int q;
+};
+
+int main() {
+ try { const A &a = Q().q; }
+ catch (...) { if (!a) return 0; }
+ abort();
+}
+
+SubobjectInA::SubobjectInA() TRACE_FUNC()
+SubobjectInA::~SubobjectInA() TRACE_FUNC()
+A::A(int) TRACE_FUNC(++a;)
+A::~A() TRACE_FUNC(--a;)
+Q::~Q() THROWING TRACE_FUNC( throw 0; )
diff --git a/gcc/testsuite/g++.dg/eh/ref-temp2.C b/gcc/testsuite/g++.dg/eh/ref-temp2.C
new file mode 100644
index 0000000..0c71896
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/ref-temp2.C
@@ -0,0 +1,15 @@
+// { dg-do run { target c++11 } }
+
+struct B { B() {} ~B() noexcept(false) { throw 42; } };
+int a;
+struct A { A() { ++a; }; A(B) { ++a; } ~A() { --a; } };
+
+using Arr = A[3];
+
+int main()
+{
+ try {
+ auto&& ref = Arr{B()};
+ } catch (...) { }
+ return a;
+}
diff --git a/gcc/testsuite/g++.dg/eh/return1.C b/gcc/testsuite/g++.dg/eh/return1.C
index 5ef2f1de..ac22254 100644
--- a/gcc/testsuite/g++.dg/eh/return1.C
+++ b/gcc/testsuite/g++.dg/eh/return1.C
@@ -11,13 +11,16 @@ int c, d;
#define THROWS
#endif
+extern "C" int printf (const char *, ...);
+#define DEBUG // printf ("%p %s\n", this, __PRETTY_FUNCTION__)
+
struct X
{
- X(bool throws) : throws_(throws) { ++c; }
- X(const X& x) : throws_(x.throws_) { ++c; }
+ X(bool throws) : throws_(throws) { ++c; DEBUG; }
+ X(const X& x); // not defined
~X() THROWS
{
- ++d;
+ ++d; DEBUG;
if (throws_) { throw 1; }
}
private:
@@ -42,6 +45,40 @@ void h()
#endif
}
+X i()
+{
+ try {
+ X x(true);
+ return X(false);
+ } catch(...) {}
+ return X(false);
+}
+
+X j()
+{
+ try {
+ return X(true),X(false);
+ } catch(...) {}
+ return X(false);
+}
+
+template <class T>
+T k()
+{
+ try {
+ return T(true),T(false);
+ } catch (...) {}
+ return T(true),T(false);
+}
+
+X l() try { return X(true),X(false); }
+ catch (...) { return X(true),X(false); }
+
+template <class T>
+T m()
+ try { return T(true),T(false); }
+ catch (...) { return T(true),T(false); }
+
int main()
{
try { f(); }
@@ -53,6 +90,15 @@ int main()
try { h(); }
catch (...) {}
- if (c != d)
- throw;
+ try { i(); }
+ catch (...) {}
+
+ try { j(); } catch (...) {}
+
+ try { k<X>(); } catch (...) {}
+
+ try { l(); } catch (...) {}
+ try { m<X>(); } catch (...) {}
+
+ return c - d;
}
diff --git a/gcc/testsuite/g++.dg/eh/unexpected1.C b/gcc/testsuite/g++.dg/eh/unexpected1.C
index cd5585f..973ebea 100644
--- a/gcc/testsuite/g++.dg/eh/unexpected1.C
+++ b/gcc/testsuite/g++.dg/eh/unexpected1.C
@@ -30,7 +30,7 @@ doit () throw (Two) // { dg-warning "deprecated" "" { target { c++11 } } }
int main ()
{
- std::set_unexpected (handle_unexpected);
+ std::set_unexpected (handle_unexpected); // { dg-warning "deprecated" "" { target { c++11 } } }
try
{
diff --git a/gcc/testsuite/g++.dg/ext/boolcomplex-1.c b/gcc/testsuite/g++.dg/ext/boolcomplex-1.C
index d05d9bb..d05d9bb 100644
--- a/gcc/testsuite/g++.dg/ext/boolcomplex-1.c
+++ b/gcc/testsuite/g++.dg/ext/boolcomplex-1.C
diff --git a/gcc/testsuite/g++.dg/ext/builtin-dynamic-object-size1.C b/gcc/testsuite/g++.dg/ext/builtin-dynamic-object-size1.C
new file mode 100644
index 0000000..b11ac20
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/builtin-dynamic-object-size1.C
@@ -0,0 +1,5 @@
+// { dg-do run }
+// { dg-options "-O2" }
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size1.C"
diff --git a/gcc/testsuite/g++.dg/ext/builtin-dynamic-object-size2.C b/gcc/testsuite/g++.dg/ext/builtin-dynamic-object-size2.C
new file mode 100644
index 0000000..6e52cf3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/builtin-dynamic-object-size2.C
@@ -0,0 +1,5 @@
+// { dg-do run }
+// { dg-options "-O2" }
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size2.C"
diff --git a/gcc/testsuite/g++.dg/ext/complex10.C b/gcc/testsuite/g++.dg/ext/complex10.C
new file mode 100644
index 0000000..67dfb0c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/complex10.C
@@ -0,0 +1,5 @@
+// PR c++/103114
+// { dg-do compile }
+// { dg-options "-frounding-math" }
+
+_Complex double d = 10.1i;
diff --git a/gcc/testsuite/g++.dg/ext/flexary37.C b/gcc/testsuite/g++.dg/ext/flexary37.C
index ceb5053..5cd48c1 100644
--- a/gcc/testsuite/g++.dg/ext/flexary37.C
+++ b/gcc/testsuite/g++.dg/ext/flexary37.C
@@ -12,4 +12,4 @@ public:
struct y { // { dg-error "unknown array size in delete" }
int a; C b[];
-} y = { 1, { { 2, 3 } } }; // { dg-error "unknown array size in delete" }
+} y = { 1, { { 2, 3 } } };
diff --git a/gcc/testsuite/g++.dg/ext/integer-pack5.C b/gcc/testsuite/g++.dg/ext/integer-pack5.C
new file mode 100644
index 0000000..8493864
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/integer-pack5.C
@@ -0,0 +1,29 @@
+// PR c++/94490
+// { dg-do compile { target c++14 } }
+
+template<class T>
+constexpr int fake_tuple_size_v = 3;
+template<int...> struct intseq {};
+
+// So that it compiles with clang++.
+#if __has_builtin(__make_integer_seq)
+using size_t = decltype(sizeof(1));
+template<typename, size_t... _Indices>
+using _IdxTuple = intseq<_Indices...>;
+
+template<int N> using genseq = __make_integer_seq<_IdxTuple, size_t, N>;
+#else
+template<int N> using genseq = intseq<__integer_pack(N)...>;
+#endif
+
+template<int A, class S = genseq<0 ? A : A>>
+struct arith_result
+{ };
+
+template<typename T>
+auto Mul(const T&)
+{
+ return [](auto) { return arith_result<fake_tuple_size_v<T>> { }; }(0);
+}
+
+auto x = Mul(0);
diff --git a/gcc/testsuite/g++.dg/ext/is_enum2.C b/gcc/testsuite/g++.dg/ext/is_enum2.C
new file mode 100644
index 0000000..de14d6a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/is_enum2.C
@@ -0,0 +1,10 @@
+// PR c++/99968
+// { dg-do compile { target c++11 } }
+// { dg-additional-options -g }
+
+template <class T> struct A {
+ using type = T;
+ static const bool value = false;
+};
+
+enum E { e0 = __is_enum(E), e1 = A<E>::value };
diff --git a/gcc/testsuite/g++.dg/ext/is_literal_type3.C b/gcc/testsuite/g++.dg/ext/is_literal_type3.C
index 22d8494..4fede87 100644
--- a/gcc/testsuite/g++.dg/ext/is_literal_type3.C
+++ b/gcc/testsuite/g++.dg/ext/is_literal_type3.C
@@ -6,7 +6,11 @@ struct S {
int n;
};
+#if __cpp_implicit_constexpr
+static_assert(__is_literal_type(S), "");
+#else
static_assert(!__is_literal_type(S), "");
+#endif
#ifdef __cpp_constexpr_dynamic_alloc
struct T {
diff --git a/gcc/testsuite/g++.dg/ext/visibility/template7.C b/gcc/testsuite/g++.dg/ext/visibility/template7.C
index 5197fb1..f1490fa 100644
--- a/gcc/testsuite/g++.dg/ext/visibility/template7.C
+++ b/gcc/testsuite/g++.dg/ext/visibility/template7.C
@@ -1,6 +1,6 @@
// PR c++/35688
// { dg-require-visibility "" }
-// { dg-options "-fvisibility=hidden" }
+// { dg-options "-fvisibility=hidden -fno-inline" }
// { dg-final { scan-hidden "_ZN1s6vectorI1AEC1Ev" } }
// { dg-final { scan-hidden "_ZN1s3fooI1AEEvT_" } }
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-12.C b/gcc/testsuite/g++.dg/gcov/gcov-12.C
index c4708e4..9f2b29b 100644
--- a/gcc/testsuite/g++.dg/gcov/gcov-12.C
+++ b/gcc/testsuite/g++.dg/gcov/gcov-12.C
@@ -1,5 +1,5 @@
/* PR 51113 */
-/* { dg-options "-fprofile-arcs -ftest-coverage -fpic" } */
+/* { dg-options "-fprofile-arcs -ftest-coverage -fpic -fno-implicit-constexpr" } */
/* { dg-do run { target native } } */
/* { dg-additional-sources "gcovpart-12b.C" } */
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-2.C b/gcc/testsuite/g++.dg/gcov/gcov-2.C
index 2b4cdd8..05db15d 100644
--- a/gcc/testsuite/g++.dg/gcov/gcov-2.C
+++ b/gcc/testsuite/g++.dg/gcov/gcov-2.C
@@ -1,6 +1,6 @@
/* Verify line coverage counts for simple member functions. */
-/* { dg-options "-fprofile-arcs -ftest-coverage" } */
+/* { dg-options "-fprofile-arcs -ftest-coverage -fno-implicit-constexpr" } */
/* { dg-do run { target native } } */
class C {
diff --git a/gcc/testsuite/g++.dg/gcov/gcov.exp b/gcc/testsuite/g++.dg/gcov/gcov.exp
index 1b9fdca..88acd95 100644
--- a/gcc/testsuite/g++.dg/gcov/gcov.exp
+++ b/gcc/testsuite/g++.dg/gcov/gcov.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/gcov/pr16855-priority.C b/gcc/testsuite/g++.dg/gcov/pr16855-priority.C
index 7e39565..c7a5839 100644
--- a/gcc/testsuite/g++.dg/gcov/pr16855-priority.C
+++ b/gcc/testsuite/g++.dg/gcov/pr16855-priority.C
@@ -19,7 +19,9 @@ class Test
{
public:
Test (void) { fprintf (stderr, "In Test::Test\n"); /* count(1) */ }
- ~Test (void) { fprintf (stderr, "In Test::~Test\n"); /* count(1) */ }
+ ~Test (void) {
+ fprintf (stderr, "In Test::~Test\n"); /* count(1) { xfail *-*-dragonfly* } */
+ }
} T1;
void
@@ -76,4 +78,4 @@ static void __attribute__ ((destructor ((65535)))) dtor_65535 ()
fprintf (stderr, "in destructor((65535))\n"); /* count(1) */
}
-/* { dg-final { run-gcov branches { -b pr16855-priority.C } } } */
+/* { dg-final { run-gcov branches { -b pr16855-priority.C } { xfail *-*-dragonfly* } } } */
diff --git a/gcc/testsuite/g++.dg/gcov/pr16855.C b/gcc/testsuite/g++.dg/gcov/pr16855.C
index a68b05c..f9b86a4 100644
--- a/gcc/testsuite/g++.dg/gcov/pr16855.C
+++ b/gcc/testsuite/g++.dg/gcov/pr16855.C
@@ -21,7 +21,7 @@ class Test
public:
Test (void) { fprintf (stderr, "In Test::Test\n"); /* count(1) */ }
~Test (void) {
- fprintf (stderr, "In Test::~Test\n"); /* count(1) { xfail *-*-darwin* } */
+ fprintf (stderr, "In Test::~Test\n"); /* count(1) { xfail *-*-darwin* *-*-dragonfly* } */
}
} T1;
@@ -49,4 +49,4 @@ static void __attribute__ ((destructor)) dtor_default ()
fprintf (stderr, "in destructor(())\n"); /* count(1) { xfail *-*-darwin* } */
}
-/* { dg-final { run-gcov branches { -b pr16855.C } { xfail *-*-darwin* } } } */
+/* { dg-final { run-gcov branches { -b pr16855.C } { xfail *-*-darwin* *-*-dragonfly* } } } */
diff --git a/gcc/testsuite/g++.dg/goacc-gomp/goacc-gomp.exp b/gcc/testsuite/g++.dg/goacc-gomp/goacc-gomp.exp
index 7c29591..6dee653 100644
--- a/gcc/testsuite/g++.dg/goacc-gomp/goacc-gomp.exp
+++ b/gcc/testsuite/g++.dg/goacc-gomp/goacc-gomp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.dg/goacc/goacc.exp b/gcc/testsuite/g++.dg/goacc/goacc.exp
index 5656e26..f291ac7 100644
--- a/gcc/testsuite/g++.dg/goacc/goacc.exp
+++ b/gcc/testsuite/g++.dg/goacc/goacc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.dg/gomp/attrs-1.C b/gcc/testsuite/g++.dg/gomp/attrs-1.C
index 2a5f2cf..f64b078 100644
--- a/gcc/testsuite/g++.dg/gomp/attrs-1.C
+++ b/gcc/testsuite/g++.dg/gomp/attrs-1.C
@@ -121,7 +121,7 @@ baz (int d, int m, int i1, int i2, int p, int *idp, int s,
}
void
-bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
+bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int hda, int s,
int nte, int tl, int nth, int g, int nta, int fi, int pp, int *q, int *dd, int ntm,
const char *msg)
{
@@ -185,20 +185,20 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
[[omp::directive (target parallel
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread)
- nowait depend(inout: dd[0]) allocate (omp_default_mem_alloc:f) in_reduction(+:r2))]]
+ nowait depend(inout: dd[0]) allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr (hda))]]
;
[[omp::directive (target parallel for
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread)
lastprivate (l) linear (ll:1) ordered schedule(static, 4) collapse(1) nowait depend(inout: dd[0])
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr (hda))]]
for (int i = 0; i < 64; i++)
ll++;
[[omp::directive (target parallel for
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread)
lastprivate (l) linear (ll:1) schedule(static, 4) collapse(1) nowait depend(inout: dd[0]) order(concurrent)
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr (hda))]]
for (int i = 0; i < 64; i++)
ll++;
[[omp::sequence (omp::directive (target parallel for simd
@@ -206,31 +206,32 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread)
lastprivate (l) linear (ll:1) schedule(static, 4) collapse(1)
safelen(8) simdlen(4) aligned(q: 32) nowait depend(inout: dd[0]) nontemporal(ntm) if (simd: i3) order(concurrent)
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2)))]]
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr (hda)))]]
for (int i = 0; i < 64; i++)
ll++;
[[omp::sequence (directive (target teams
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
- shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) nowait depend(inout: dd[0])
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2)))]]
+ shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) nowait depend(inout: dd[0])
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr (hda)))]]
;
[[omp::sequence (directive (target
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
- nowait depend(inout: dd[0]) allocate (omp_default_mem_alloc:f) in_reduction(+:r2)))]]
+ nowait depend(inout: dd[0]) allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr (hda)))]]
;
[[omp::sequence (omp::directive (target teams distribute
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) order(concurrent)
- collapse(1) dist_schedule(static, 16) nowait depend(inout: dd[0]) allocate (omp_default_mem_alloc:f) in_reduction(+:r2)))]]
+ collapse(1) dist_schedule(static, 16) nowait depend(inout: dd[0]) allocate (omp_default_mem_alloc:f) in_reduction(+:r2)
+ has_device_addr (hda)))]]
for (int i = 0; i < 64; i++)
;
[[omp::directive (target teams distribute parallel for
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
- shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl)
+ shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl)
collapse(1) dist_schedule(static, 16)
if (parallel: i2) num_threads (nth) proc_bind(spread)
lastprivate (l) schedule(static, 4) nowait depend(inout: dd[0]) order(concurrent)
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr (hda))]]
for (int i = 0; i < 64; i++)
ll++;
[[omp::directive (target teams distribute parallel for simd
@@ -240,22 +241,22 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
if (parallel: i2) num_threads (nth) proc_bind(spread)
lastprivate (l) schedule(static, 4) order(concurrent)
safelen(8) simdlen(4) aligned(q: 32) nowait depend(inout: dd[0]) nontemporal(ntm) if (simd: i3)
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr (hda))]]
for (int i = 0; i < 64; i++)
ll++;
[[omp::directive (target teams distribute simd
device(d) map (tofrom: m) if (i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
- shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl)
+ shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl)
collapse(1) dist_schedule(static, 16) order(concurrent)
safelen(8) simdlen(4) aligned(q: 32) nowait depend(inout: dd[0]) nontemporal(ntm)
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr (hda))]]
for (int i = 0; i < 64; i++)
ll++;
[[omp::directive (target simd
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
safelen(8) simdlen(4) lastprivate (l) linear(ll: 1) aligned(q: 32) reduction(+:r)
nowait depend(inout: dd[0]) nontemporal(ntm) if(simd:i3) order(concurrent)
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc:f) in_reduction(+:r2) has_device_addr (hda))]]
for (int i = 0; i < 64; i++)
ll++;
[[omp::sequence (directive (taskgroup task_reduction(+:r2) allocate (r2)),
@@ -309,7 +310,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
for (int i = 0; i < 64; i++)
;
[[omp::directive (teams
- private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl)
+ private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl)
allocate (omp_default_mem_alloc: f))]]
;
[[omp::sequence (omp::directive (target),
@@ -322,7 +323,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
ll++;
[[omp::sequence (directive (target),
directive (teams distribute parallel for simd
- private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl)
+ private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl)
collapse(1) dist_schedule(static, 16)
if (parallel: i2) num_threads (nth) proc_bind(spread)
lastprivate (l) schedule(static, 4) order(concurrent)
@@ -339,7 +340,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
for (int i = 0; i < 64; i++)
ll++;
[[omp::directive (teams distribute parallel for
- private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl)
+ private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl)
collapse(1) dist_schedule(static, 16)
if (parallel: i2) num_threads (nth) proc_bind(spread)
lastprivate (l) schedule(static, 4) copyin(t) allocate (f))]]
@@ -353,7 +354,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
for (int i = 0; i < 64; i++)
ll++;
[[omp::directive (teams distribute parallel for simd
- private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl)
+ private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl)
collapse(1) dist_schedule(static, 16)
if (parallel: i2) num_threads (nth) proc_bind(spread)
lastprivate (l) schedule(static, 4)
@@ -371,7 +372,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
for (int i = 0; i < 64; i++)
ll++;
[[omp::directive (teams distribute simd
- private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl)
+ private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl)
collapse(1) dist_schedule(static, 16) order(concurrent)
safelen(8) simdlen(4) aligned(q: 32) if(i3) nontemporal(ntm) allocate(f))]]
for (int i = 0; i < 64; i++)
@@ -507,7 +508,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
for (l = 0; l < 64; ++l)
;
[[omp::directive (teams loop
- private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl)
+ private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte - 1:nte) thread_limit(tl)
collapse(1) lastprivate (l) order(concurrent) allocate (f))]]
for (l = 0; l < 64; ++l)
;
@@ -515,28 +516,28 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread)
nowait depend(inout: dd[0]) lastprivate (l) bind(parallel) order(concurrent) collapse(1)
- allocate (omp_default_mem_alloc: f) in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc: f) in_reduction(+:r2) has_device_addr (hda))]]
for (l = 0; l < 64; ++l)
;
[[omp::directive (target parallel loop
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread)
nowait depend(inout: dd[0]) lastprivate (l) order(concurrent) collapse(1)
- allocate (omp_default_mem_alloc: f) in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc: f) in_reduction(+:r2) has_device_addr (hda))]]
for (l = 0; l < 64; ++l)
;
[[omp::directive (target teams loop
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) nowait depend(inout: dd[0])
lastprivate (l) bind(teams) collapse(1)
- allocate (omp_default_mem_alloc: f) in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc: f) in_reduction(+:r2) has_device_addr (hda))]]
for (l = 0; l < 64; ++l)
;
[[omp::directive (target teams loop
device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp)
- shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) nowait depend(inout: dd[0])
+ shared(s) default(shared) reduction(+:r) num_teams(nte - 1 : nte) thread_limit(tl) nowait depend(inout: dd[0])
lastprivate (l) order(concurrent) collapse(1)
- allocate (omp_default_mem_alloc: f) in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc: f) in_reduction(+:r2) has_device_addr (hda))]]
for (l = 0; l < 64; ++l)
;
[[omp::directive (critical)]] {
diff --git a/gcc/testsuite/g++.dg/gomp/attrs-2.C b/gcc/testsuite/g++.dg/gomp/attrs-2.C
index c00be7f..cc91fa2 100644
--- a/gcc/testsuite/g++.dg/gomp/attrs-2.C
+++ b/gcc/testsuite/g++.dg/gomp/attrs-2.C
@@ -121,7 +121,7 @@ baz (int d, int m, int i1, int i2, int p, int *idp, int s,
}
void
-bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
+bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int hda, int s,
int nte, int tl, int nth, int g, int nta, int fi, int pp, int *q, int *dd, int ntm,
const char *msg)
{
@@ -185,20 +185,20 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
[[omp::directive (target parallel,
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp),
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread)
- nowait depend(inout: dd[0]),allocate (omp_default_mem_alloc:f),in_reduction(+:r2))]]
+ nowait depend(inout: dd[0]),allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]]
;
[[omp::directive (target parallel for,
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp),
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread),
lastprivate (l),linear (ll:1),ordered schedule(static, 4),collapse(1),nowait depend(inout: dd[0]),
- allocate (omp_default_mem_alloc:f),in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]]
for (int i = 0; i < 64; i++)
ll++;
[[using omp:directive (target parallel for,
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp),
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread),
lastprivate (l),linear (ll:1),schedule(static, 4),collapse(1),nowait depend(inout: dd[0]),order(concurrent),
- allocate (omp_default_mem_alloc:f),in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]]
for (int i = 0; i < 64; i++)
ll++;
[[omp::sequence (omp::directive (target parallel for simd,
@@ -206,22 +206,23 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread),
lastprivate (l),linear (ll:1),schedule(static, 4),collapse(1),
safelen(8),simdlen(4),aligned(q: 32),nowait depend(inout: dd[0]),nontemporal(ntm),if (simd: i3),order(concurrent),
- allocate (omp_default_mem_alloc:f),in_reduction(+:r2)))]]
+ allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda)))]]
for (int i = 0; i < 64; i++)
ll++;
[[using omp:sequence (directive (target teams,
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp),
- shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),nowait, depend(inout: dd[0]),
- allocate (omp_default_mem_alloc:f) in_reduction(+:r2)))]]
+ shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),nowait,depend(inout: dd[0]),
+ allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda)))]]
;
[[using omp:sequence (directive (target,
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp),
- nowait depend(inout: dd[0]),allocate (omp_default_mem_alloc:f),in_reduction(+:r2)))]]
+ nowait depend(inout: dd[0]),allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr(hda)))]]
;
[[omp::sequence (omp::directive (target teams distribute,
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp),
- shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),order(concurrent),
- collapse(1),dist_schedule(static, 16),nowait depend(inout: dd[0]),allocate (omp_default_mem_alloc:f),in_reduction(+:r2)))]]
+ shared(s),default(shared),reduction(+:r),num_teams(nte-1:nte),thread_limit(tl),order(concurrent),
+ collapse(1),dist_schedule(static, 16),nowait depend(inout: dd[0]),allocate (omp_default_mem_alloc:f),in_reduction(+:r2),
+ has_device_addr (hda)))]]
for (int i = 0; i < 64; i++)
;
[[omp::directive (target teams distribute parallel for,
@@ -230,17 +231,17 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
collapse(1),dist_schedule(static, 16),
if (parallel: i2),num_threads (nth),proc_bind(spread),
lastprivate (l),schedule(static, 4),nowait depend(inout: dd[0]),order(concurrent),
- allocate (omp_default_mem_alloc:f),in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]]
for (int i = 0; i < 64; i++)
ll++;
[[omp::directive (target teams distribute parallel for simd,
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp),
- shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),
+ shared(s),default(shared),reduction(+:r),num_teams(2:nte),thread_limit(tl),
collapse(1),dist_schedule(static, 16),
if (parallel: i2),num_threads (nth),proc_bind(spread),
lastprivate (l),schedule(static, 4),order(concurrent),
safelen(8),simdlen(4),aligned(q: 32),nowait depend(inout: dd[0]),nontemporal(ntm),if (simd: i3),
- allocate (omp_default_mem_alloc:f),in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]]
for (int i = 0; i < 64; i++)
ll++;
[[omp::directive (target teams distribute simd,
@@ -248,14 +249,14 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),
collapse(1),dist_schedule(static, 16),order(concurrent),
safelen(8),simdlen(4),aligned(q: 32),nowait depend(inout: dd[0]),nontemporal(ntm),
- allocate (omp_default_mem_alloc:f),in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]]
for (int i = 0; i < 64; i++)
ll++;
[[omp::directive (target simd,
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp),
safelen(8),simdlen(4),lastprivate (l),linear(ll: 1),aligned(q: 32),reduction(+:r),
nowait depend(inout: dd[0]),nontemporal(ntm),if(simd:i3),order(concurrent),
- allocate (omp_default_mem_alloc:f),in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]]
for (int i = 0; i < 64; i++)
ll++;
[[omp::sequence (directive (taskgroup, task_reduction(+:r2), allocate (r2)),
@@ -304,7 +305,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
[[omp::directive (taskwait)]];
[[omp::sequence (directive (target, nowait,depend(inout: dd[0]),in_reduction(+:r2)),
directive (teams distribute,
- private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),
+ private(p),firstprivate(f),shared(s),default(shared),reduction(+:r),num_teams(nte - 1 : nte),thread_limit(tl),
collapse(1),dist_schedule(static, 16),allocate (omp_default_mem_alloc: f),order(concurrent)))]]
for (int i = 0; i < 64; i++)
;
@@ -314,7 +315,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
;
[[omp::sequence (omp::directive (target),
omp::directive (teams distribute parallel for,
- private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),
+ private(p),firstprivate(f),shared(s),default(shared),reduction(+:r),num_teams(16:nte),thread_limit(tl),
collapse(1),dist_schedule(static, 16),
if (parallel: i2),num_threads (nth),proc_bind(spread),
lastprivate (l),schedule(static, 4),order(concurrent),allocate (omp_default_mem_alloc: f)))]]
@@ -332,7 +333,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
ll++;
[[omp::sequence (directive (target),
directive (teams distribute simd,
- private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),
+ private(p),firstprivate(f),shared(s),default(shared),reduction(+:r),num_teams(nte-1:nte),thread_limit(tl),
collapse(1),dist_schedule(static, 16),order(concurrent),
safelen(8),simdlen(4),aligned(q: 32),if(i3),nontemporal(ntm),
allocate (omp_default_mem_alloc: f)))]]
@@ -346,7 +347,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
for (int i = 0; i < 64; i++)
ll++;
[[omp::directive (teams distribute parallel for,
- private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),
+ private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte-1:nte),thread_limit(tl),
collapse(1),dist_schedule(static, 16),order(concurrent),
if (parallel: i2),num_threads (nth),proc_bind(spread),
lastprivate (l),schedule(static, 4),allocate (f))]]
@@ -362,7 +363,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
for (int i = 0; i < 64; i++)
ll++;
[[omp::directive (teams distribute parallel for simd,
- private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),
+ private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte-1:nte),thread_limit(tl),
collapse(1),dist_schedule(static, 16),
if (parallel: i2),num_threads (nth),proc_bind(spread),
lastprivate (l),schedule(static, 4),order(concurrent),
@@ -502,7 +503,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
for (l = 0; l < 64; l++)
ll++;
[[omp::directive (teams loop,
- private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),
+ private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte-1:nte),thread_limit(tl),
collapse(1),lastprivate (l),bind(teams),allocate (f))]]
for (l = 0; l < 64; ++l)
;
@@ -515,28 +516,28 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int s,
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp),
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread),
nowait depend(inout: dd[0]),lastprivate (l),bind(parallel),order(concurrent),collapse(1),
- allocate (omp_default_mem_alloc: f),in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc: f),in_reduction(+:r2),has_device_addr (hda))]]
for (l = 0; l < 64; ++l)
;
[[omp::directive (target parallel loop,
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp),
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread),
nowait depend(inout: dd[0]),lastprivate (l),order(concurrent),collapse(1),
- allocate (omp_default_mem_alloc: f),in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc: f),in_reduction(+:r2),has_device_addr (hda))]]
for (l = 0; l < 64; ++l)
;
[[omp::directive (target teams loop,
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp),
- shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),nowait,depend(inout: dd[0]),
+ shared(s),default(shared),reduction(+:r),num_teams(nte-1:nte),thread_limit(tl),nowait,depend(inout: dd[0]),
lastprivate (l),bind(teams),collapse(1),
- allocate (omp_default_mem_alloc: f),in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc: f),in_reduction(+:r2),has_device_addr (hda))]]
for (l = 0; l < 64; ++l)
;
[[omp::directive (target teams loop,
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp),
shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),nowait,depend(inout: dd[0]),
lastprivate (l),order(concurrent),collapse(1)
- allocate (omp_default_mem_alloc: f),in_reduction(+:r2))]]
+ allocate (omp_default_mem_alloc: f),in_reduction(+:r2),has_device_addr (hda))]]
for (l = 0; l < 64; ++l)
;
[[omp::directive (critical)]] {
diff --git a/gcc/testsuite/g++.dg/gomp/gomp.exp b/gcc/testsuite/g++.dg/gomp/gomp.exp
index 25f6f13..d31726c 100644
--- a/gcc/testsuite/g++.dg/gomp/gomp.exp
+++ b/gcc/testsuite/g++.dg/gomp/gomp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.dg/gomp/loop-8.C b/gcc/testsuite/g++.dg/gomp/loop-8.C
new file mode 100644
index 0000000..41a1817
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/loop-8.C
@@ -0,0 +1,128 @@
+typedef __PTRDIFF_TYPE__ ptrdiff_t;
+
+template <typename T>
+class I
+{
+public:
+ typedef ptrdiff_t difference_type;
+ I ();
+ ~I ();
+ I (T *);
+ I (const I &);
+ T &operator * ();
+ T *operator -> ();
+ T &operator [] (const difference_type &) const;
+ I &operator = (const I &);
+ I &operator ++ ();
+ I operator ++ (int);
+ I &operator -- ();
+ I operator -- (int);
+ I &operator += (const difference_type &);
+ I &operator -= (const difference_type &);
+ I operator + (const difference_type &) const;
+ I operator - (const difference_type &) const;
+ template <typename S> friend bool operator == (I<S> &, I<S> &);
+ template <typename S> friend bool operator == (const I<S> &, const I<S> &);
+ template <typename S> friend bool operator < (I<S> &, I<S> &);
+ template <typename S> friend bool operator < (const I<S> &, const I<S> &);
+ template <typename S> friend bool operator <= (I<S> &, I<S> &);
+ template <typename S> friend bool operator <= (const I<S> &, const I<S> &);
+ template <typename S> friend bool operator > (I<S> &, I<S> &);
+ template <typename S> friend bool operator > (const I<S> &, const I<S> &);
+ template <typename S> friend bool operator >= (I<S> &, I<S> &);
+ template <typename S> friend bool operator >= (const I<S> &, const I<S> &);
+ template <typename S> friend typename I<S>::difference_type operator - (I<S> &, I<S> &);
+ template <typename S> friend typename I<S>::difference_type operator - (const I<S> &, const I<S> &);
+ template <typename S> friend I<S> operator + (typename I<S>::difference_type , const I<S> &);
+private:
+ T *p;
+};
+
+template <typename T> bool operator == (I<T> &, I<T> &);
+template <typename T> bool operator == (const I<T> &, const I<T> &);
+template <typename T> bool operator != (I<T> &, I<T> &);
+template <typename T> bool operator != (const I<T> &, const I<T> &);
+template <typename T> bool operator < (I<T> &, I<T> &);
+template <typename T> bool operator < (const I<T> &, const I<T> &);
+template <typename T> bool operator <= (I<T> &, I<T> &);
+template <typename T> bool operator <= (const I<T> &, const I<T> &);
+template <typename T> bool operator > (I<T> &, I<T> &);
+template <typename T> bool operator > (const I<T> &, const I<T> &);
+template <typename T> bool operator >= (I<T> &, I<T> &);
+template <typename T> bool operator >= (const I<T> &, const I<T> &);
+template <typename T> typename I<T>::difference_type operator - (I<T> &, I<T> &);
+template <typename T> typename I<T>::difference_type operator - (const I<T> &, const I<T> &);
+template <typename T> I<T> operator + (typename I<T>::difference_type, const I<T> &);
+
+extern I<int> i, j;
+#pragma omp threadprivate (i, j)
+extern I<int> k, l;
+#pragma omp threadprivate (k, l)
+I<int> k, l;
+
+void
+f1 (I<int> &x, I<int> &y)
+{
+ #pragma omp for collapse(2)
+ for (i = x; i < y; i++) // { dg-error "expected iteration declaration or initialization" }
+ for (j = x; j < y; j++)
+ ;
+}
+
+void
+f2 (I<int> &x, I<int> &y)
+{
+ #pragma omp for collapse(2)
+ for (k = x; k < y; k++) // { dg-error "expected iteration declaration or initialization" }
+ for (l = x; l < y; l++)
+ ;
+}
+
+template <int N>
+void
+f3 (I<int> &x, I<int> &y)
+{
+ #pragma omp for collapse(2)
+ for (i = x; i < y; i++) // { dg-error "'i' is predetermined 'threadprivate' for 'private'" }
+ for (j = x; j < y; j++) // { dg-error "'j' is predetermined 'threadprivate' for 'private'" }
+ ;
+}
+
+template <int N>
+void
+f4 (I<int> &x, I<int> &y)
+{
+ #pragma omp for collapse(2)
+ for (k = x; k < y; k++) // { dg-error "'k' is predetermined 'threadprivate' for 'private'" }
+ for (l = x; l < y; l++) // { dg-error "'l' is predetermined 'threadprivate' for 'private'" }
+ ;
+}
+
+template <typename T>
+void
+f5 (I<T> &x, I<T> &y)
+{
+ #pragma omp for collapse(2) // { dg-error "expected iteration declaration or initialization" }
+ for (i = x; i < y; i++) // { dg-error "'i' is predetermined 'threadprivate' for 'private'" }
+ for (j = x; j < y; j++) // { dg-error "'j' is predetermined 'threadprivate' for 'private'" }
+ ;
+}
+
+template <typename T>
+void
+f6 (I<T> &x, I<T> &y)
+{
+ #pragma omp for collapse(2) // { dg-error "expected iteration declaration or initialization" }
+ for (k = x; k < y; k++) // { dg-error "'k' is predetermined 'threadprivate' for 'private'" }
+ for (l = x; l < y; l++) // { dg-error "'l' is predetermined 'threadprivate' for 'private'" }
+ ;
+}
+
+void
+test (I<int> &x, I<int> &y)
+{
+ f3<0> (x, y);
+ f4<0> (x, y);
+ f5 (x, y);
+ f6 (x, y);
+}
diff --git a/gcc/testsuite/g++.dg/gomp/masked-1.C b/gcc/testsuite/g++.dg/gomp/masked-1.C
new file mode 100644
index 0000000..1ea4a13
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/masked-1.C
@@ -0,0 +1,14 @@
+// PR c++/103349
+// { dg-do compile { target c++11 } }
+
+int v;
+
+void
+foo (int x, int y)
+{
+ [=] ()
+ {
+#pragma omp masked
+ v = x + y;
+ } ();
+}
diff --git a/gcc/testsuite/g++.dg/gomp/num-teams-1.C b/gcc/testsuite/g++.dg/gomp/num-teams-1.C
new file mode 100644
index 0000000..5b36ffb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/num-teams-1.C
@@ -0,0 +1,122 @@
+int fn1 (int);
+template <typename T>
+T fn2 (T);
+
+template <int N>
+void
+f1 ()
+{
+ #pragma omp teams num_teams (4 : 6)
+ ;
+ #pragma omp teams num_teams (7)
+ ;
+}
+
+template <int N>
+void
+f2 ()
+{
+ #pragma omp target teams num_teams (5 : 19)
+ ;
+ #pragma omp target teams num_teams (21)
+ ;
+}
+
+template <int N>
+void
+f3 ()
+{
+ #pragma omp teams num_teams (fn1 (1) : fn1 (2))
+ ;
+ #pragma omp teams num_teams (fn1 (3))
+ ;
+}
+
+template <int N>
+void
+f4 ()
+{
+ #pragma omp target teams num_teams (fn1 (4) : fn1 (5))
+ ;
+ #pragma omp target teams num_teams (fn1 (6))
+ ;
+}
+
+template <int N>
+void
+f5 ()
+{
+ #pragma omp target
+ #pragma omp teams num_teams (fn1 (7) : fn1 (8))
+ ;
+ #pragma omp target
+ #pragma omp teams num_teams (fn1 (9))
+ ;
+}
+
+template <typename T, T N4, T N6, T N7>
+void
+f1 ()
+{
+ #pragma omp teams num_teams (N4 : N6)
+ ;
+ #pragma omp teams num_teams (N7)
+ ;
+}
+
+template <typename T, T N5, T N19, T N21>
+void
+f2 ()
+{
+ #pragma omp target teams num_teams (N5 : N19)
+ ;
+ #pragma omp target teams num_teams (N21)
+ ;
+}
+
+template <typename T, T N1, T N2, T N3>
+void
+f3 ()
+{
+ #pragma omp teams num_teams (fn2 (N1) : fn2 (N2))
+ ;
+ #pragma omp teams num_teams (fn2 (N3))
+ ;
+}
+
+template <typename T, T N4, T N5, T N6>
+void
+f4 ()
+{
+ #pragma omp target teams num_teams (fn2 (N4) : fn2 (N5))
+ ;
+ #pragma omp target teams num_teams (fn2 (N6))
+ ;
+}
+
+template <typename T, T N7, T N8, T N9>
+void
+f5 ()
+{
+ #pragma omp target
+ #pragma omp teams num_teams (fn2 (N7) : fn2 (N8))
+ ;
+ #pragma omp target
+ #pragma omp teams num_teams (fn2 (N9))
+ ;
+}
+
+void
+test ()
+{
+ f1<0> ();
+ f2<0> ();
+ f3<0> ();
+ f4<0> ();
+ f5<0> ();
+ f1<int, 4, 6, 7> ();
+ f2<int, 5, 19, 21> ();
+ f3<int, 1, 2, 3> ();
+ f4<int, 4, 5, 6> ();
+ f5<int, 7, 8, 9> ();
+}
diff --git a/gcc/testsuite/g++.dg/gomp/num-teams-2.C b/gcc/testsuite/g++.dg/gomp/num-teams-2.C
new file mode 100644
index 0000000..8b8933c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/num-teams-2.C
@@ -0,0 +1,64 @@
+template <int N>
+void
+foo (int i)
+{
+ #pragma omp teams num_teams (6 : 4) // { dg-warning "'num_teams' lower bound '6' bigger than upper bound '4'" }
+ ;
+ #pragma omp teams num_teams (-7) // { dg-warning "'num_teams' value must be positive" }
+ ;
+ #pragma omp teams num_teams (i : -7) // { dg-warning "'num_teams' value must be positive" }
+ ;
+ #pragma omp teams num_teams (-7 : 8) // { dg-warning "'num_teams' value must be positive" }
+ ;
+}
+
+template <int N>
+void
+bar (int i)
+{
+ #pragma omp target teams num_teams (6 : 4) // { dg-warning "'num_teams' lower bound '6' bigger than upper bound '4'" }
+ ;
+ #pragma omp target teams num_teams (-7) // { dg-warning "'num_teams' value must be positive" }
+ ;
+ #pragma omp target teams num_teams (i : -7) // { dg-warning "'num_teams' value must be positive" }
+ ;
+ #pragma omp target teams num_teams (-7 : 8) // { dg-warning "'num_teams' value must be positive" }
+ ;
+}
+
+template <typename T, T NM7, T N4, T N6, T N8>
+void
+baz (T i)
+{
+ #pragma omp teams num_teams (N6 : N4) // { dg-warning "'num_teams' lower bound '6' bigger than upper bound '4'" }
+ ;
+ #pragma omp teams num_teams (NM7) // { dg-warning "'num_teams' value must be positive" }
+ ;
+ #pragma omp teams num_teams (i : NM7) // { dg-warning "'num_teams' value must be positive" }
+ ;
+ #pragma omp teams num_teams (NM7 : N8) // { dg-warning "'num_teams' value must be positive" }
+ ;
+}
+
+template <typename T, T NM7, T N4, T N6, T N8>
+void
+qux (T i)
+{
+ #pragma omp target teams num_teams (N6 : N4) // { dg-warning "'num_teams' lower bound '6' bigger than upper bound '4'" }
+ ;
+ #pragma omp target teams num_teams (NM7) // { dg-warning "'num_teams' value must be positive" }
+ ;
+ #pragma omp target teams num_teams (i : NM7) // { dg-warning "'num_teams' value must be positive" }
+ ;
+ #pragma omp target teams num_teams (NM7 : N8) // { dg-warning "'num_teams' value must be positive" }
+ ;
+}
+
+void
+test ()
+{
+ foo<0> (5);
+ bar<0> (5);
+ baz<int, -7, 4, 6, 8> (5);
+ qux<int, -7, 4, 6, 8> (5);
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr102431.C b/gcc/testsuite/g++.dg/gomp/pr102431.C
new file mode 100644
index 0000000..7db36f4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr102431.C
@@ -0,0 +1,13 @@
+// PR middle-end/102431
+
+struct S { S (); ~S (); S (const S &); void add (const S &); int s; } s;
+void bar (int, S &);
+#pragma omp declare reduction (+:S:omp_out.add (omp_in))
+
+void
+foo ()
+{
+ #pragma omp loop bind(teams) reduction(+:s)
+ for (int i = 0; i < 8; i++)
+ bar (i, s);
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr103704.C b/gcc/testsuite/g++.dg/gomp/pr103704.C
new file mode 100644
index 0000000..68767c4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr103704.C
@@ -0,0 +1,19 @@
+// PR c++/103704
+// { dg-do compile }
+
+struct S { int a; };
+
+template <typename T>
+struct U : public T {
+ T a;
+ U ()
+ {
+#pragma omp target
+#pragma omp teams
+#pragma omp distribute private(a)
+ for (int k = 0; k < 1; ++k)
+ ;
+ }
+};
+
+struct V : public U<S> { V () : U<S> () {} };
diff --git a/gcc/testsuite/g++.dg/gomp/pr103851.C b/gcc/testsuite/g++.dg/gomp/pr103851.C
new file mode 100644
index 0000000..257e405
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr103851.C
@@ -0,0 +1,15 @@
+// { dg-do compile }
+// { dg-options "-fopenmp -ftrivial-auto-var-init=pattern" }
+
+struct _Deque_base {
+ long _M_map_size;
+ int *_M_start;
+ int *_M_finish;
+};
+void morphologicalFilter1D()
+{
+#pragma omp parallel
+ {
+ struct _Deque_base vals[4];
+ }
+}
diff --git a/gcc/testsuite/g++.dg/gomp/target-3.C b/gcc/testsuite/g++.dg/gomp/target-3.C
new file mode 100644
index 0000000..f4d40ec
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/target-3.C
@@ -0,0 +1,36 @@
+// { dg-do compile }
+// { dg-options "-fopenmp -fdump-tree-gimple" }
+
+struct S
+{
+ int a, b;
+ void bar (int);
+};
+
+void
+S::bar (int x)
+{
+ #pragma omp target map (alloc: a, b)
+ ;
+ #pragma omp target enter data map (alloc: a, b)
+}
+
+template <int N>
+struct T
+{
+ int a, b;
+ void bar (int);
+};
+
+template <int N>
+void
+T<N>::bar (int x)
+{
+ #pragma omp target map (alloc: a, b)
+ ;
+ #pragma omp target enter data map (alloc: a, b)
+}
+
+template struct T<0>;
+
+/* { dg-final { scan-tree-dump-times "map\\(struct:\\*this \\\[len: 2\\\]\\) map\\(alloc:this->a \\\[len: \[0-9\]+\\\]\\) map\\(alloc:this->b \\\[len: \[0-9\]+\\\]\\)" 4 "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/gomp/target-lambda-1.C b/gcc/testsuite/g++.dg/gomp/target-lambda-1.C
new file mode 100644
index 0000000..7f83f92
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/target-lambda-1.C
@@ -0,0 +1,94 @@
+// We use 'auto' without a function return type, so specify dialect here
+// { dg-additional-options "-std=c++14 -fdump-tree-gimple" }
+#include <cstdlib>
+#include <cstring>
+
+template <typename L>
+void
+omp_target_loop (int begin, int end, L loop)
+{
+ #pragma omp target teams distribute parallel for
+ for (int i = begin; i < end; i++)
+ loop (i);
+}
+
+struct S
+{
+ int a, len;
+ int *ptr;
+
+ auto merge_data_func (int *iptr, int &b)
+ {
+ auto fn = [=](void) -> bool
+ {
+ bool mapped;
+ #pragma omp target map(from:mapped)
+ {
+ mapped = (ptr != NULL && iptr != NULL);
+ if (mapped)
+ {
+ for (int i = 0; i < len; i++)
+ ptr[i] += a + b + iptr[i];
+ }
+ }
+ return mapped;
+ };
+ return fn;
+ }
+};
+
+int x = 1;
+
+int main (void)
+{
+ const int N = 10;
+ int *data1 = new int[N];
+ int *data2 = new int[N];
+ memset (data1, 0xab, sizeof (int) * N);
+ memset (data1, 0xcd, sizeof (int) * N);
+
+ int val = 1;
+ int &valref = val;
+ #pragma omp target enter data map(alloc: data1[:N], data2[:N])
+
+ omp_target_loop (0, N, [=](int i) { data1[i] = val; });
+ omp_target_loop (0, N, [=](int i) { data2[i] = valref + 1; });
+
+ #pragma omp target update from(data1[:N], data2[:N])
+
+ for (int i = 0; i < N; i++)
+ {
+ if (data1[i] != 1) abort ();
+ if (data2[i] != 2) abort ();
+ }
+
+ #pragma omp target exit data map(delete: data1[:N], data2[:N])
+
+ int b = 8;
+ S s = { 4, N, data1 };
+ auto f = s.merge_data_func (data2, b);
+
+ if (f ()) abort ();
+
+ #pragma omp target enter data map(to: data1[:N])
+ if (f ()) abort ();
+
+ #pragma omp target enter data map(to: data2[:N])
+ if (!f ()) abort ();
+
+ #pragma omp target exit data map(from: data1[:N], data2[:N])
+
+ for (int i = 0; i < N; i++)
+ {
+ if (data1[i] != 0xf) abort ();
+ if (data2[i] != 2) abort ();
+ }
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump {#pragma omp target num_teams.* firstprivate\(b\) map\(alloc:MEM.* \[len: 0\]\) map\(firstprivate:iptr \[pointer assign, bias: 0\]\) map\(alloc:MEM.* \[len: 0\]\) map\(firstprivate:this \[pointer assign, bias: 0\]\) map\(to:\*__closure \[len: [0-9]+\]\) map\(firstprivate:__closure \[pointer assign, bias: 0\]\) map\(tofrom:\*_[0-9]+ \[len: [0-9]+\]\) map\(always_pointer:__closure->__this \[pointer assign, bias: 0\]\) map\(attach_zero_length_array_section:__closure->__iptr \[bias: 0\]\) map\(attach_zero_length_array_section:_[0-9]+->ptr \[bias: 0\]\) map\(from:mapped \[len: [0-9]+\]\) map\(alloc:\*_[0-9]+ \[len: 0\]\) map\(alloc:\*_[0-9]+ \[len: 0\]\)} "gimple" } } */
+
+/* { dg-final { scan-tree-dump {#pragma omp target num_teams.* firstprivate\(end\) firstprivate\(begin\) map\(to:loop \[len: [0-9]+\]\) map\(attach_zero_length_array_section:loop\.__data1 \[bias: 0\]\) map\(alloc:\*_[0-9]+ \[len: 0\]\)} "gimple" } } */
+
+/* { dg-final { scan-tree-dump {#pragma omp target num_teams.* firstprivate\(end\) firstprivate\(begin\) map\(to:loop \[len: [0-9]+\]\) map\(attach_zero_length_array_section:loop\.__data2 \[bias: 0\]\) map\(alloc:\*_[0-9]+ \[len: 0\]\)} "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/gomp/target-lambda-2.C b/gcc/testsuite/g++.dg/gomp/target-lambda-2.C
new file mode 100644
index 0000000..bdf2564
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/target-lambda-2.C
@@ -0,0 +1,35 @@
+// We use 'auto' without a function return type, so specify dialect here
+// { dg-additional-options "-std=c++14 -fdump-tree-gimple" }
+#include <cstdlib>
+
+#define N 10
+int main (void)
+{
+ int X, Y;
+ #pragma omp target map(from: X, Y)
+ {
+ int x = 0, y = 0;
+
+ for (int i = 0; i < N; i++)
+ [&] (int v) { x += v; } (i);
+
+ auto yinc = [&y] { y++; };
+ for (int i = 0; i < N; i++)
+ yinc ();
+
+ X = x;
+ Y = y;
+ }
+
+ int Xs = 0;
+ for (int i = 0; i < N; i++)
+ Xs += i;
+ if (X != Xs)
+ abort ();
+
+ if (Y != N)
+ abort ();
+}
+
+/* Make sure lambda objects do NOT appear in target maps. */
+/* { dg-final { scan-tree-dump {(?n)#pragma omp target num_teams.* map\(from:Y \[len: [0-9]+\]\) map\(from:X \[len: [0-9]+\]\)$} "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/gomp/target-this-1.C b/gcc/testsuite/g++.dg/gomp/target-this-1.C
new file mode 100644
index 0000000..de93a3e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/target-this-1.C
@@ -0,0 +1,33 @@
+// { dg-do compile }
+// { dg-additional-options "-fdump-tree-gimple" }
+extern "C" void abort ();
+
+struct S
+{
+ int a, b, c, d;
+
+ int sum (void)
+ {
+ int val = 0;
+ val += a + b + this->c + this->d;
+ return val;
+ }
+
+ int sum_offload (void)
+ {
+ int val = 0;
+ #pragma omp target map(val)
+ val += a + b + this->c + this->d;
+ return val;
+ }
+};
+
+int main (void)
+{
+ S s = { 1, 2, 3, 4 };
+ if (s.sum () != s.sum_offload ())
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump {map\(tofrom:\*this \[len: [0-9]+\]\) map\(firstprivate:this \[pointer assign, bias: 0\]\)} "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/gomp/target-this-2.C b/gcc/testsuite/g++.dg/gomp/target-this-2.C
new file mode 100644
index 0000000..8a76bb8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/target-this-2.C
@@ -0,0 +1,49 @@
+// We use 'auto' without a function return type, so specify dialect here
+// { dg-do compile }
+// { dg-additional-options "-std=c++14 -fdump-tree-gimple" }
+
+extern "C" void abort ();
+
+struct T
+{
+ int x, y;
+
+ auto sum_func (int n)
+ {
+ auto fn = [=](int m) -> int
+ {
+ int v;
+ v = (x + y) * n + m;
+ return v;
+ };
+ return fn;
+ }
+
+ auto sum_func_offload (int n)
+ {
+ auto fn = [=](int m) -> int
+ {
+ int v;
+ #pragma omp target map(from:v)
+ v = (x + y) * n + m;
+ return v;
+ };
+ return fn;
+ }
+
+};
+
+int main (void)
+{
+ T a = { 1, 2 };
+
+ auto s1 = a.sum_func (3);
+ auto s2 = a.sum_func_offload (3);
+
+ if (s1 (1) != s2 (1))
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump {#pragma omp target num_teams.* firstprivate\(n\) map\(alloc:MEM.* \[len: 0\]\) map\(firstprivate:this \[pointer assign, bias: 0\]\) firstprivate\(m\) map\(to:\*__closure \[len: [0-9]+\]\) map\(firstprivate:__closure \[pointer assign, bias: 0\]\) map\(tofrom:\*_[0-9]+ \[len: [0-9]+\]\) map\(always_pointer:__closure->__this \[pointer assign, bias: 0\]\) map\(from:v \[len: [0-9]+\]\)} "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/gomp/target-this-3.C b/gcc/testsuite/g++.dg/gomp/target-this-3.C
new file mode 100644
index 0000000..91cfbd6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/target-this-3.C
@@ -0,0 +1,105 @@
+// { dg-do compile }
+// { dg-additional-options "-fdump-tree-gimple" }
+#include <cstdlib>
+#include <cstring>
+extern "C" void abort ();
+
+struct S
+{
+ int * ptr;
+ int ptr_len;
+
+ int *&refptr;
+ int refptr_len;
+
+ bool set_ptr (int n)
+ {
+ bool mapped;
+ #pragma omp target map(from:mapped)
+ {
+ if (ptr != NULL)
+ for (int i = 0; i < ptr_len; i++)
+ ptr[i] = n;
+ mapped = (ptr != NULL);
+ }
+ return mapped;
+ }
+
+ bool set_refptr (int n)
+ {
+ bool mapped;
+ #pragma omp target map(from:mapped)
+ {
+ if (refptr != NULL)
+ for (int i = 0; i < refptr_len; i++)
+ refptr[i] = n;
+ mapped = (refptr != NULL);
+ }
+ return mapped;
+ }
+};
+
+int main (void)
+{
+ #define N 10
+ int *ptr1 = new int[N];
+ int *ptr2 = new int[N];
+
+ memset (ptr1, 0, sizeof (int) * N);
+ memset (ptr2, 0, sizeof (int) * N);
+
+ S s = { ptr1, N, ptr2, N };
+
+ bool mapped;
+ int val = 123;
+
+ mapped = s.set_ptr (val);
+ if (mapped)
+ abort ();
+ if (s.ptr != ptr1)
+ abort ();
+ for (int i = 0; i < N; i++)
+ if (ptr1[i] != 0)
+ abort ();
+
+ mapped = s.set_refptr (val);
+ if (mapped)
+ abort ();
+ if (s.refptr != ptr2)
+ abort ();
+ for (int i = 0; i < N; i++)
+ if (ptr2[i] != 0)
+ abort ();
+
+ #pragma omp target data map(ptr1[:N])
+ mapped = s.set_ptr (val);
+
+ if (!mapped)
+ abort ();
+ if (s.set_refptr (0))
+ abort ();
+ if (s.ptr != ptr1 || s.refptr != ptr2)
+ abort ();
+ for (int i = 0; i < N; i++)
+ if (ptr1[i] != val)
+ abort ();
+
+ #pragma omp target data map(ptr2[:N])
+ mapped = s.set_refptr (val);
+
+ if (!mapped)
+ abort ();
+ if (s.set_ptr (0))
+ abort ();
+ if (s.ptr != ptr1 || s.refptr != ptr2)
+ abort ();
+ for (int i = 0; i < N; i++)
+ if (ptr2[i] != val)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump {#pragma omp target num_teams.* map\(alloc:MEM.* \[len: 0\]\) map\(firstprivate:this \[pointer assign, bias: 0\]\) firstprivate\(n\) map\(tofrom:\*this \[len: [0-9]+\]\) map\(firstprivate:this \[pointer assign, bias: 0\]\) map\(alloc:\*_[0-9]+ \[pointer assign, zero-length array section, bias: 0\]\) map\(attach:this->refptr \[bias: 0\]\) map\(from:mapped \[len: [0-9]+\]\)} "gimple" } } */
+
+/* { dg-final { scan-tree-dump {#pragma omp target num_teams.* map\(alloc:MEM.* \[len: 0\]\) map\(firstprivate:this \[pointer assign, bias: 0\]\) firstprivate\(n\) map\(tofrom:\*this \[len: [0-9]+\]\) map\(firstprivate:this \[pointer assign, bias: 0\]\) map\(attach_zero_length_array_section:this->ptr \[bias: 0\]\) map\(from:mapped \[len: [0-9]+\]\) map\(alloc:\*_[0-9]+ \[len: 0\]\)} "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/gomp/target-this-4.C b/gcc/testsuite/g++.dg/gomp/target-this-4.C
new file mode 100644
index 0000000..e4b2a71
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/target-this-4.C
@@ -0,0 +1,107 @@
+// We use 'auto' without a function return type, so specify dialect here
+// { dg-additional-options "-std=c++14 -fdump-tree-gimple" }
+#include <cstdlib>
+#include <cstring>
+
+struct T
+{
+ int *ptr;
+ int ptr_len;
+
+ int *&refptr;
+ int refptr_len;
+
+ auto set_ptr_func (int n)
+ {
+ auto fn = [=](void) -> bool
+ {
+ bool mapped;
+ #pragma omp target map(from:mapped)
+ {
+ if (ptr)
+ for (int i = 0; i < ptr_len; i++)
+ ptr[i] = n;
+ mapped = (ptr != NULL);
+ }
+ return mapped;
+ };
+ return fn;
+ }
+
+ auto set_refptr_func (int n)
+ {
+ auto fn = [=](void) -> bool
+ {
+ bool mapped;
+ #pragma omp target map(from:mapped)
+ {
+ if (refptr)
+ for (int i = 0; i < refptr_len; i++)
+ refptr[i] = n;
+ mapped = (refptr != NULL);
+ }
+ return mapped;
+ };
+ return fn;
+ }
+};
+
+int main (void)
+{
+ #define N 10
+ int *ptr1 = new int[N];
+ int *ptr2 = new int[N];
+
+ memset (ptr1, 0, sizeof (int) * N);
+ memset (ptr2, 0, sizeof (int) * N);
+
+ T a = { ptr1, N, ptr2, N };
+
+ auto p1 = a.set_ptr_func (1);
+ auto r2 = a.set_refptr_func (2);
+
+ if (p1 ())
+ abort ();
+ if (r2 ())
+ abort ();
+
+ if (a.ptr != ptr1)
+ abort ();
+ if (a.refptr != ptr2)
+ abort ();
+
+ for (int i = 0; i < N; i++)
+ if (ptr1[i] != 0)
+ abort ();
+
+ for (int i = 0; i < N; i++)
+ if (ptr2[i] != 0)
+ abort ();
+
+ #pragma omp target data map(ptr1[:N], ptr2[:N])
+ {
+ if (!p1 ())
+ abort ();
+ if (!r2 ())
+ abort ();
+ }
+
+ if (a.ptr != ptr1)
+ abort ();
+ if (a.refptr != ptr2)
+ abort ();
+
+ for (int i = 0; i < N; i++)
+ if (ptr1[i] != 1)
+ abort ();
+
+ for (int i = 0; i < N; i++)
+ if (ptr2[i] != 2)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump {#pragma omp target num_teams.* firstprivate\(n\) map\(alloc:MEM.* \[len: 0\]\) map\(firstprivate:this \[pointer assign, bias: 0\]\) map\(to:\*__closure \[len: [0-9]+\]\) map\(firstprivate:__closure \[pointer assign, bias: 0\]\) map\(tofrom:\*_[0-9]+ \[len: [0-9]+\]\) map\(always_pointer:__closure->__this \[pointer assign, bias: 0\]\) map\(attach_zero_length_array_section:_[0-9]+->ptr \[bias: 0\]\) map\(from:mapped \[len: [0-9]+\]\) map\(alloc:\*_[0-9]+ \[len: 0\]\)} "gimple" } } */
+
+/* { dg-final { scan-tree-dump {#pragma omp target num_teams.* firstprivate\(n\) map\(alloc:MEM.* \[len: 0\]\) map\(firstprivate:this \[pointer assign, bias: 0\]\) map\(to:\*__closure \[len: [0-9]+\]\) map\(firstprivate:__closure \[pointer assign, bias: 0\]\) map\(tofrom:\*_[0-9]+ \[len: [0-9]+\]\) map\(always_pointer:__closure->__this \[pointer assign, bias: 0\]\) map\(alloc:\*_[0-9]+ \[pointer assign, zero-length array section, bias: 0\]\) map\(attach:_[0-9]+->refptr \[bias: 0\]\) map\(from:mapped \[len: [0-9]+\]\) map\(alloc:\*_[0-9]+ \[len: 0\]\)} "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/gomp/target-this-5.C b/gcc/testsuite/g++.dg/gomp/target-this-5.C
new file mode 100644
index 0000000..a9ac74b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/target-this-5.C
@@ -0,0 +1,34 @@
+// { dg-do compile }
+// { dg-additional-options "-fdump-tree-gimple" }
+extern "C" void abort ();
+
+template<typename T>
+struct S
+{
+ T a, b, c, d;
+
+ T sum (void)
+ {
+ T val = 0;
+ val += a + b + this->c + this->d;
+ return val;
+ }
+
+ T sum_offload (void)
+ {
+ T val = 0;
+ #pragma omp target map(val)
+ val += a + b + this->c + this->d;
+ return val;
+ }
+};
+
+int main (void)
+{
+ S<int> s = { 1, 2, 3, 4 };
+ if (s.sum () != s.sum_offload ())
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump {map\(tofrom:\*this \[len: [0-9]+\]\) map\(firstprivate:this \[pointer assign, bias: 0\]\)} "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/gomp/this-2.C b/gcc/testsuite/g++.dg/gomp/this-2.C
index d03b8a0..b521a4f 100644
--- a/gcc/testsuite/g++.dg/gomp/this-2.C
+++ b/gcc/testsuite/g++.dg/gomp/this-2.C
@@ -9,14 +9,14 @@ struct S
void
S::bar (int x)
{
- #pragma omp target map (this, x) // { dg-error ".this. allowed in OpenMP only in .declare simd. clauses" }
+ #pragma omp target map (this, x) // { dg-error "cannot take the address of .this., which is an rvalue expression" }
;
- #pragma omp target map (this[0], x) // { dg-error ".this. allowed in OpenMP only in .declare simd. clauses" }
+ #pragma omp target map (this[0], x)
;
- #pragma omp target update to (this, x) // { dg-error ".this. allowed in OpenMP only in .declare simd. clauses" }
- #pragma omp target update to (this[0], x) // { dg-error ".this. allowed in OpenMP only in .declare simd. clauses" }
- #pragma omp target update from (this, x) // { dg-error ".this. allowed in OpenMP only in .declare simd. clauses" }
- #pragma omp target update from (this[1], x) // { dg-error ".this. allowed in OpenMP only in .declare simd. clauses" }
+ #pragma omp target update to (this, x) // { dg-error "cannot take the address of .this., which is an rvalue expression" }
+ #pragma omp target update to (this[0], x)
+ #pragma omp target update from (this, x) // { dg-error "cannot take the address of .this., which is an rvalue expression" }
+ #pragma omp target update from (this[1], x)
}
template <int N>
@@ -29,14 +29,14 @@ template <int N>
void
T<N>::bar (int x)
{
- #pragma omp target map (this, x) // { dg-error ".this. allowed in OpenMP only in .declare simd. clauses" }
+ #pragma omp target map (this, x) // { dg-error "cannot take the address of .this., which is an rvalue expression" }
;
- #pragma omp target map (this[0], x) // { dg-error ".this. allowed in OpenMP only in .declare simd. clauses" }
+ #pragma omp target map (this[0], x)
;
- #pragma omp target update to (this, x) // { dg-error ".this. allowed in OpenMP only in .declare simd. clauses" }
- #pragma omp target update to (this[0], x) // { dg-error ".this. allowed in OpenMP only in .declare simd. clauses" }
- #pragma omp target update from (this, x) // { dg-error ".this. allowed in OpenMP only in .declare simd. clauses" }
- #pragma omp target update from (this[1], x) // { dg-error ".this. allowed in OpenMP only in .declare simd. clauses" }
+ #pragma omp target update to (this, x) // { dg-error "cannot take the address of .this., which is an rvalue expression" }
+ #pragma omp target update to (this[0], x)
+ #pragma omp target update from (this, x) // { dg-error "cannot take the address of .this., which is an rvalue expression" }
+ #pragma omp target update from (this[1], x)
}
template struct T<0>;
diff --git a/gcc/testsuite/g++.dg/gomp/unmappable-1.C b/gcc/testsuite/g++.dg/gomp/unmappable-1.C
index d00ccb5..364f884 100644
--- a/gcc/testsuite/g++.dg/gomp/unmappable-1.C
+++ b/gcc/testsuite/g++.dg/gomp/unmappable-1.C
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
-class C /* { dg-message "type .C. with virtual members is not mappable" } */
+class C
{
public:
static int static_member; /* { dg-message "static field .C::static_member. is not mappable" } */
diff --git a/gcc/testsuite/g++.dg/graphite/graphite.exp b/gcc/testsuite/g++.dg/graphite/graphite.exp
index ed70cc0..e077c84 100644
--- a/gcc/testsuite/g++.dg/graphite/graphite.exp
+++ b/gcc/testsuite/g++.dg/graphite/graphite.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/hwasan/hwasan.exp b/gcc/testsuite/g++.dg/hwasan/hwasan.exp
index 8b49178..17fc9e9 100644
--- a/gcc/testsuite/g++.dg/hwasan/hwasan.exp
+++ b/gcc/testsuite/g++.dg/hwasan/hwasan.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.dg/init/aggr15.C b/gcc/testsuite/g++.dg/init/aggr15.C
new file mode 100644
index 0000000..a19a0f8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/aggr15.C
@@ -0,0 +1,11 @@
+// PR c++/65591
+
+struct ss {
+ ss() {};
+};
+struct C {
+ ss s[1000];
+};
+int main() {
+ C cs[5] = {};
+}
diff --git a/gcc/testsuite/g++.dg/init/aggr7-eh.C b/gcc/testsuite/g++.dg/init/aggr7-eh.C
new file mode 100644
index 0000000..db45e15
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/aggr7-eh.C
@@ -0,0 +1,62 @@
+// PR c++/50866, adjusted
+// { dg-do run }
+
+#if __cplusplus > 201100L
+#define THROWING noexcept(false)
+#else
+#define THROWING
+#endif
+
+extern "C" void abort ();
+
+int a;
+int d = -1;
+struct A {
+ A() { ++a; }
+ A(const A&);
+ ~A() THROWING {
+ --a;
+ if (a == d)
+ throw (short)a;
+ }
+};
+int b;
+int t;
+struct B {
+ B(const char *, const A& = A())
+ {
+ if (b == t)
+ throw b;
+ ++b;
+ if (a != b) abort ();
+ }
+ B(const B&);
+ ~B()
+ {
+ --b;
+ }
+};
+struct C {
+ B b1, b2, b3;
+};
+void f()
+{
+ try
+ {
+ C c = { "a","b","c" };
+ if (a != 0) abort ();
+ if (b != 3) abort ();
+ }
+ catch (int i) { }
+ catch (short s) { }
+ if (a != 0) abort ();
+ if (b != 0) abort ();
+}
+
+int main()
+{
+ for (t = 0; t <= 3; ++t)
+ f();
+ for (d = 0; d <= 2; ++d)
+ f();
+}
diff --git a/gcc/testsuite/g++.dg/init/aggr7-eh2.C b/gcc/testsuite/g++.dg/init/aggr7-eh2.C
new file mode 100644
index 0000000..0037b09
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/aggr7-eh2.C
@@ -0,0 +1,98 @@
+// PR c++/50866, adjusted
+// { dg-do run }
+
+#if __cplusplus > 201100L
+#define THROWING noexcept(false)
+#else
+#define THROWING
+#endif
+
+extern "C" void abort ();
+
+#ifdef DEBUG
+ extern "C" int printf (const char *, ...);
+ #define dump(X,Y) printf(X,Y)
+#define abort() printf("wrong\n");
+
+#else
+ #define dump(X,Y)
+#endif
+
+int a, b;
+int d;
+struct A {
+ int n;
+ A() { n = ++a; dump("A%d\n",a); }
+ A(const A&);
+ ~A() THROWING {
+ dump("~A%d\n",n);
+ --a;
+ if (d == 1 ? a == 0 : (b == d && a == 1))
+ {
+ dump ("~A%d throwing\n", n);
+ throw (short)b;
+ }
+ }
+};
+int t;
+struct B {
+ int n;
+ B(const A& = A())
+ {
+ if (b == t)
+ {
+ dump ("B%d throwing\n", b+1);
+ throw b;
+ }
+ n = ++b;
+ dump("B%d\n",b);
+
+ /* The first B has an explicit initializer, so its A lives for the
+ full-expression. The second B does not, so its A should be destroyed
+ before we construct the third B. */
+ if (a != 2) abort ();
+ }
+ B(const char *, const A& = A())
+ {
+ if (b == t)
+ {
+ dump ("B%d throwing\n", b+1);
+ throw b;
+ }
+ n = ++b;
+ dump("B%d\n",b);
+ if (a != b) abort ();
+ }
+ B(const B&);
+ ~B()
+ {
+ dump("~B%d\n",n);
+ --b;
+ }
+};
+struct C {
+ B bs[3];
+};
+void f()
+{
+ a = b = 0;
+ try
+ {
+ C c = { "x" };
+ if (a != 0) abort ();
+ if (b != 3) abort ();
+ }
+ catch (int i) { }
+ catch (short s) { }
+ if (a != 0) abort ();
+ if (b != 0) abort ();
+ dump ("\n", 0);
+}
+
+int main()
+{
+ for (t = 0; t <= 3; ++t)
+ f();
+ for (d = 1; d <= 3; ++d)
+ f();
+}
diff --git a/gcc/testsuite/g++.dg/init/aggr7-eh3.C b/gcc/testsuite/g++.dg/init/aggr7-eh3.C
new file mode 100644
index 0000000..6ddabec
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/aggr7-eh3.C
@@ -0,0 +1,98 @@
+// PR c++/50866, adjusted
+// { dg-do run }
+
+#if __cplusplus > 201100L
+#define THROWING noexcept(false)
+#else
+#define THROWING
+#endif
+
+extern "C" void abort ();
+
+#ifdef DEBUG
+ extern "C" int printf (const char *, ...);
+ #define dump(X,Y) printf(X,Y)
+#define abort() printf("wrong\n");
+
+#else
+ #define dump(X,Y)
+#endif
+
+int a, b;
+int d;
+struct A {
+ int n;
+ A() { n = ++a; dump("A%d\n",a); }
+ A(const A&);
+ ~A() THROWING {
+ dump("~A%d\n",n);
+ --a;
+ if (d == 1 ? a == 0 : (b == d && a == 1))
+ {
+ dump ("~A%d throwing\n", n);
+ throw (short)b;
+ }
+ }
+};
+int t;
+struct B {
+ int n;
+ B(const A& = A())
+ {
+ if (b == t)
+ {
+ dump ("B%d throwing\n", b+1);
+ throw b;
+ }
+ n = ++b;
+ dump("B%d\n",b);
+
+ /* The first B has an explicit initializer, so its A lives for the
+ full-expression. The second B does not, so its A should be destroyed
+ before we construct the third B. */
+ if (a != 2) abort ();
+ }
+ B(const char *, const A& = A())
+ {
+ if (b == t)
+ {
+ dump ("B%d throwing\n", b+1);
+ throw b;
+ }
+ n = ++b;
+ dump("B%d\n",b);
+ if (a != b) abort ();
+ }
+ B(const B&);
+ ~B()
+ {
+ dump("~B%d\n",n);
+ --b;
+ }
+};
+struct C {
+ B bs[3];
+};
+void f()
+{
+ a = b = 0;
+ try
+ {
+ B bs[3] = { "x" };
+ if (a != 0) abort ();
+ if (b != 3) abort ();
+ }
+ catch (int i) { }
+ catch (short s) { }
+ if (a != 0) abort ();
+ if (b != 0) abort ();
+ dump ("\n", 0);
+}
+
+int main()
+{
+ for (t = 0; t <= 3; ++t)
+ f();
+ for (d = 1; d <= 3; ++d)
+ f();
+}
diff --git a/gcc/testsuite/g++.dg/init/array12.C b/gcc/testsuite/g++.dg/init/array12.C
index 3bb4800..f45a6e1 100644
--- a/gcc/testsuite/g++.dg/init/array12.C
+++ b/gcc/testsuite/g++.dg/init/array12.C
@@ -1,5 +1,5 @@
// PR c++/12253
-// Bug: We were failing to destroy the temporary A passed to the
+// We should not destroy the temporary A passed to the
// constructor for b[0] before going on to construct b[1].
// { dg-do run }
@@ -11,18 +11,21 @@ int r;
struct A
{
- A() { printf ("A()\n"); if (c++) r = 1; }
+ A() { printf ("A()\n"); ++c; }
A(const A&) { printf ("A(const A&)\n"); ++c; }
~A() { printf ("~A()\n"); --c; }
};
struct B
{
- B(int, const A& = A()) { printf ("B()\n"); }
+ B(int i, const A& = A()) {
+ printf ("B()\n");
+ if (c != i) r = 1;
+ }
};
int main()
{
- B b[] = { 0, 0 };
+ B b[] = { 1, 2 };
return r;
}
diff --git a/gcc/testsuite/g++.dg/init/array41a.C b/gcc/testsuite/g++.dg/init/array41a.C
new file mode 100644
index 0000000..aa9fdc6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/array41a.C
@@ -0,0 +1,27 @@
+// PR c++/70690
+// { dg-do run { target c++11 } }
+
+struct A {
+ constexpr A() {}
+};
+
+struct APadded : public A {
+ char pad[63];
+};
+
+int f();
+int i = f();
+APadded cache[50];
+APadded *p = cache;
+
+int f()
+{
+ cache[0].pad[0] = 42;
+ return 1;
+}
+
+int main()
+{
+ if (cache[0].pad[0] != 42)
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/init/array61.C b/gcc/testsuite/g++.dg/init/array61.C
new file mode 100644
index 0000000..eaf535c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/array61.C
@@ -0,0 +1,16 @@
+// PR c++/92385
+// { dg-do compile { target c++11 } }
+// { dg-additional-options -fdump-tree-gimple }
+// { dg-final { scan-tree-dump-times "item::item" 1 "gimple" } }
+
+struct item {
+ int i;
+ item();
+};
+
+struct item_array {
+ item a[10];
+ item_array();
+};
+
+item_array::item_array() : a{} {}
diff --git a/gcc/testsuite/g++.dg/init/assign2.C b/gcc/testsuite/g++.dg/init/assign2.C
new file mode 100644
index 0000000..72d1264
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/assign2.C
@@ -0,0 +1,6 @@
+// PR c++/59950
+
+ struct Foo {};
+
+ int f(Foo *p);
+ int n = f(&(Foo() = Foo()));
diff --git a/gcc/testsuite/g++.dg/init/bitfield6.C b/gcc/testsuite/g++.dg/init/bitfield6.C
new file mode 100644
index 0000000..70854ee
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/bitfield6.C
@@ -0,0 +1,20 @@
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int : 8;
+ int i = 42;
+};
+
+constexpr A a;
+
+struct B : A {
+};
+
+constexpr B b;
+
+struct C {
+ int : 0;
+};
+
+constexpr C c;
diff --git a/gcc/testsuite/g++.dg/init/delete4.C b/gcc/testsuite/g++.dg/init/delete4.C
new file mode 100644
index 0000000..94932b4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/delete4.C
@@ -0,0 +1,14 @@
+// PR c++/20040
+
+class X
+{
+ void operator delete(void *p) throw () {} // { dg-message "declared private" }
+};
+
+X xa;
+
+int mymain()
+{
+ X *p = new X; // { dg-error "is private" }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/init/new50.C b/gcc/testsuite/g++.dg/init/new50.C
new file mode 100644
index 0000000..981d231
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/new50.C
@@ -0,0 +1,9 @@
+// PR c++/104084
+
+int nothrow;
+struct MaxAlignedAllocable {
+ void *operator new[](__SIZE_TYPE__, int);
+ void operator delete[](void *);
+ long Resize_size;
+ void Resize() { new (nothrow) MaxAlignedAllocable[Resize_size]; }
+};
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-35.C b/gcc/testsuite/g++.dg/ipa/devirt-35.C
index 87f72b8..ca9ccb7 100644
--- a/gcc/testsuite/g++.dg/ipa/devirt-35.C
+++ b/gcc/testsuite/g++.dg/ipa/devirt-35.C
@@ -15,7 +15,6 @@ m(struct B *b)
// test2 may change the type of A by placement new.
// C++ standard is bit imprecise about this.
}
-/* { dg-final { scan-tree-dump "converting indirect call to function virtual int B::t" "fre1" } } */
-/* { dg-final { scan-ipa-dump "to virtual int B::t" "devirt" } } */
+/* { dg-final { scan-tree-dump "converting indirect call to function virtual int B::t" "fre1" { target { ! implicit_constexpr } } } } */
+/* { dg-final { scan-ipa-dump "to virtual int B::t" "devirt" { target { ! implicit_constexpr } } } } */
/* { dg-final { scan-ipa-dump "1 speculatively devirtualized" "devirt" } } */
-
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-36.C b/gcc/testsuite/g++.dg/ipa/devirt-36.C
index 067a2bb..60b8301 100644
--- a/gcc/testsuite/g++.dg/ipa/devirt-36.C
+++ b/gcc/testsuite/g++.dg/ipa/devirt-36.C
@@ -18,7 +18,7 @@ m(struct B *b)
// test2 may change the type of A by placement new.
// C++ standard is bit imprecise about this.
}
-/* { dg-final { scan-tree-dump "converting indirect call to function virtual int B::t" "fre1" } } */
-/* { dg-final { scan-ipa-dump "to virtual int B::t" "devirt" } } */
+/* { dg-final { scan-tree-dump "converting indirect call to function virtual int B::t" "fre1" { target { ! implicit_constexpr } } } } */
+/* { dg-final { scan-ipa-dump "to virtual int B::t" "devirt" { target { ! implicit_constexpr } } } } */
/* { dg-final { scan-ipa-dump "1 speculatively devirtualized" "devirt" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-37.C b/gcc/testsuite/g++.dg/ipa/devirt-37.C
index b7f52a0..df5ab90 100644
--- a/gcc/testsuite/g++.dg/ipa/devirt-37.C
+++ b/gcc/testsuite/g++.dg/ipa/devirt-37.C
@@ -33,4 +33,4 @@ t()
/* { dg-final { scan-tree-dump "No dynamic type change found." "fre3" } } */
/* { dg-final { scan-tree-dump "Checking vtbl store:" "fre3" } } */
/* { dg-final { scan-tree-dump "Function call may change dynamic type:extcall" "fre3" } } */
-/* { dg-final { scan-tree-dump "converting indirect call to function virtual void" "fre3" } } */
+/* { dg-final { scan-tree-dump "converting indirect call to function virtual void" "fre3" { target { ! implicit_constexpr } } } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-40.C b/gcc/testsuite/g++.dg/ipa/devirt-40.C
index 32e0d22..31fe150 100644
--- a/gcc/testsuite/g++.dg/ipa/devirt-40.C
+++ b/gcc/testsuite/g++.dg/ipa/devirt-40.C
@@ -1,4 +1,12 @@
/* { dg-options "-O2 -fdump-tree-fre3-details" } */
+
+// A throwing dtor in C++98 mode changes the results.
+#if __cplusplus < 201100L
+#define NOTHROW throw()
+#else
+#define NOTHROW noexcept
+#endif
+
typedef enum
{
} UErrorCode;
@@ -6,7 +14,7 @@ class UnicodeString
{
public:
UnicodeString ();
- virtual ~UnicodeString ();
+ virtual ~UnicodeString () NOTHROW;
};
class A
{
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-44.C b/gcc/testsuite/g++.dg/ipa/devirt-44.C
index 5de7614..ed211e1 100644
--- a/gcc/testsuite/g++.dg/ipa/devirt-44.C
+++ b/gcc/testsuite/g++.dg/ipa/devirt-44.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -fno-ipa-cp -fdump-ipa-inline-details -fno-early-inlining" } */
+/* { dg-options "-O3 -fno-ipa-cp -fdump-ipa-inline-details -fno-early-inlining -fno-implicit-constexpr" } */
struct A {
virtual int foo () {return 1;}
void wrapfoo () {foo();}
diff --git a/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C b/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C
index 00ac61e7..fa31cfb 100644
--- a/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C
+++ b/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C
@@ -60,7 +60,7 @@ int main (int argc, char *argv[])
/* middleman_2 gets early inlined and the virtual call should get turned to
a direct call. */
-/* { dg-final { scan-tree-dump "Inlining int middleman_1" "einline" } } */
-/* { dg-final { scan-tree-dump "Inlining int middleman_2" "einline" } } */
+/* { dg-final { scan-tree-dump "Inlining int middleman_1" "einline" { target { ! implicit_constexpr } } } } */
+/* { dg-final { scan-tree-dump "Inlining int middleman_2" "einline" { target { ! implicit_constexpr } } } } */
/* { dg-final { scan-tree-dump "B::foo \\(" "einline" } } */
/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 2 "einline" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/ipa-icf-4.C b/gcc/testsuite/g++.dg/ipa/ipa-icf-4.C
index 0b49c6f..b4e1958 100644
--- a/gcc/testsuite/g++.dg/ipa/ipa-icf-4.C
+++ b/gcc/testsuite/g++.dg/ipa/ipa-icf-4.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf-optimized-missed -fno-inline" } */
+/* { dg-options "-O2 -fdump-ipa-icf-optimized-missed -fno-inline -fno-ipa-modref" } */
namespace {
struct A
diff --git a/gcc/testsuite/g++.dg/ipa/modref-1.C b/gcc/testsuite/g++.dg/ipa/modref-1.C
new file mode 100644
index 0000000..b492381
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/modref-1.C
@@ -0,0 +1,35 @@
+/* { dg-do link } */
+/* { dg-options "-O2 -fdump-tree-local-pure-const1 -fdump-tree-modref1 -std=gnu++2a" } */
+namespace {
+struct B {
+ int b;
+ struct B *bptr;
+ B() {b=1; }
+ B(B &src)
+ {
+ b=src.b;
+ bptr=0;
+ }
+ __attribute__ ((noinline))
+ static struct B genB()
+ {
+ struct B b;
+ b.b=2;
+ b.bptr = 0;
+ return b;
+ }
+};
+}
+void linker_error ();
+int main()
+{
+ struct B b1 = B::genB();
+ b1.b = 1;
+ struct B b2 = B::genB();
+ if (b1.b != 1 || b2.bptr == &b2)
+ linker_error ();
+ return 0;
+}
+/* { dg-final { scan-tree-dump "Function found to be const: static {anonymous}::B {anonymous}::B::genB" "local-pure-const1" } } */
+/* { dg-final { scan-tree-dump "Retslot flags: not_returned_directly" "modref1" } } */
+
diff --git a/gcc/testsuite/g++.dg/ipa/pr103099.C b/gcc/testsuite/g++.dg/ipa/pr103099.C
new file mode 100644
index 0000000..5fb137d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr103099.C
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+void pthread_mutex_unlock(int *);
+int __gthread_mutex_unlock___mutex, unlock___trans_tmp_1;
+struct Object {
+ void _change_notify() {}
+ bool _is_queued_for_deletion;
+};
+struct ClassDB {
+ template <class N, class M> static int bind_method(N, M);
+};
+struct CanvasItemMaterial : Object {
+ bool particles_animation;
+ void set_particles_animation(bool);
+};
+void CanvasItemMaterial::set_particles_animation(bool p_particles_anim) {
+ particles_animation = p_particles_anim;
+ if (unlock___trans_tmp_1)
+ pthread_mutex_unlock(&__gthread_mutex_unlock___mutex);
+ _change_notify();
+}
+void CanvasItemMaterial_bind_methods() {
+ ClassDB::bind_method("", &CanvasItemMaterial::set_particles_animation);
+}
diff --git a/gcc/testsuite/g++.dg/lookup/builtin5.C b/gcc/testsuite/g++.dg/lookup/builtin5.C
index 1bd67dc..652e3f5 100644
--- a/gcc/testsuite/g++.dg/lookup/builtin5.C
+++ b/gcc/testsuite/g++.dg/lookup/builtin5.C
@@ -1,5 +1,5 @@
// PR c++/37276
-
+// { dg-additional-options -fno-inline }
// { dg-final { scan-assembler "_ZSt5atanhd" } }
namespace std
diff --git a/gcc/testsuite/g++.dg/lookup/memfn1.C b/gcc/testsuite/g++.dg/lookup/memfn1.C
new file mode 100644
index 0000000..8f8e5d9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/memfn1.C
@@ -0,0 +1,16 @@
+// Verify we preserve the consistency of member function lookup outside of a
+// complete-class context.
+// { dg-do compile { target c++11 } }
+
+template<class...>
+struct A {
+ template<class T> static void f(); // #1
+ template<class T> static auto g() -> decltype(f<T>());
+ template<class T> static void f(...); // #2
+};
+
+int main() {
+ A<>::g<int>(); // OK, the later-declared #2 isn't considered when
+ // instantiating f<T>(), which would have otherwise
+ // led to ambiguity.
+}
diff --git a/gcc/testsuite/g++.dg/lookup/operator-3-ops.h b/gcc/testsuite/g++.dg/lookup/operator-3-ops.h
new file mode 100644
index 0000000..fbd242a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/operator-3-ops.h
@@ -0,0 +1,53 @@
+void operator+(N::A);
+void operator-(N::A);
+void operator*(N::A);
+void operator~(N::A);
+#if __cplusplus >= 201103L
+void operator&(N::A) = delete;
+#else
+void operator&(N::A);
+#endif
+void operator!(N::A);
+void operator++(N::A);
+void operator--(N::A);
+void operator++(N::A, int);
+void operator--(N::A, int);
+
+void operator->*(N::A, N::A);
+void operator/(N::A, N::A);
+void operator*(N::A, N::A);
+void operator+(N::A, N::A);
+void operator-(N::A, N::A);
+void operator%(N::A, N::A);
+void operator&(N::A, N::A);
+void operator|(N::A, N::A);
+void operator^(N::A, N::A);
+void operator<<(N::A, N::A);
+void operator>>(N::A, N::A);
+void operator&&(N::A, N::A);
+void operator||(N::A, N::A);
+#if __cplusplus >= 201103L
+void operator,(N::A, N::A) = delete;
+#else
+void operator,(N::A, N::A);
+#endif
+
+void operator==(N::A, N::A);
+void operator!=(N::A, N::A);
+void operator<(N::A, N::A);
+void operator>(N::A, N::A);
+void operator<=(N::A, N::A);
+void operator>=(N::A, N::A);
+#if __cplusplus > 201703L
+void operator<=>(N::A, N::A);
+#endif
+
+void operator+=(N::A, N::A);
+void operator-=(N::A, N::A);
+void operator*=(N::A, N::A);
+void operator/=(N::A, N::A);
+void operator%=(N::A, N::A);
+void operator|=(N::A, N::A);
+void operator^=(N::A, N::A);
+void operator<<=(N::A, N::A);
+void operator>>=(N::A, N::A);
diff --git a/gcc/testsuite/g++.dg/lookup/operator-3.C b/gcc/testsuite/g++.dg/lookup/operator-3.C
index bc5eb3d..ab0257a 100644
--- a/gcc/testsuite/g++.dg/lookup/operator-3.C
+++ b/gcc/testsuite/g++.dg/lookup/operator-3.C
@@ -1,4 +1,6 @@
// PR c++/51577
+// Verify we don't consider later-declared namespace-scope operator overloads
+// when instantiating a dependent operator expression that occurs at block scope.
template <class T> void f (T x) {
+x; // { dg-error "no match" }
@@ -50,59 +52,7 @@ template <class T> void f (T x) {
namespace N { struct A { }; }
-void operator+(N::A);
-void operator-(N::A);
-void operator*(N::A);
-void operator~(N::A);
-#if __cplusplus >= 201103L
-void operator&(N::A) = delete;
-#else
-void operator&(N::A);
-#endif
-void operator!(N::A);
-void operator++(N::A);
-void operator--(N::A);
-void operator++(N::A, int);
-void operator--(N::A, int);
-
-void operator->*(N::A, N::A);
-void operator/(N::A, N::A);
-void operator*(N::A, N::A);
-void operator+(N::A, N::A);
-void operator-(N::A, N::A);
-void operator%(N::A, N::A);
-void operator&(N::A, N::A);
-void operator|(N::A, N::A);
-void operator^(N::A, N::A);
-void operator<<(N::A, N::A);
-void operator>>(N::A, N::A);
-void operator&&(N::A, N::A);
-void operator||(N::A, N::A);
-#if __cplusplus >= 201103L
-void operator,(N::A, N::A) = delete;
-#else
-void operator,(N::A, N::A);
-#endif
-
-void operator==(N::A, N::A);
-void operator!=(N::A, N::A);
-void operator<(N::A, N::A);
-void operator>(N::A, N::A);
-void operator<=(N::A, N::A);
-void operator>=(N::A, N::A);
-#if __cplusplus > 201703L
-void operator<=>(N::A, N::A);
-#endif
-
-void operator+=(N::A, N::A);
-void operator-=(N::A, N::A);
-void operator*=(N::A, N::A);
-void operator/=(N::A, N::A);
-void operator%=(N::A, N::A);
-void operator|=(N::A, N::A);
-void operator^=(N::A, N::A);
-void operator<<=(N::A, N::A);
-void operator>>=(N::A, N::A);
+#include "operator-3-ops.h"
int main() {
f(N::A());
diff --git a/gcc/testsuite/g++.dg/lookup/operator-3a.C b/gcc/testsuite/g++.dg/lookup/operator-3a.C
new file mode 100644
index 0000000..62ae5c3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/operator-3a.C
@@ -0,0 +1,61 @@
+// PR c++/51577
+// { dg-do compile { target c++14 } }
+// Like operator-3.C but also containing a partial instantiation step.
+
+template <class...> auto f () {
+ return [] (auto x) {
+ +x; // { dg-error "no match" }
+ -x; // { dg-error "no match" }
+ *x; // { dg-error "no match" }
+ ~x; // { dg-error "no match" }
+ &x;
+ !x; // { dg-error "no match" }
+ ++x; // { dg-error "no match" }
+ --x; // { dg-error "no match" }
+ x++; // { dg-error "declared for postfix" }
+ x--; // { dg-error "declared for postfix" }
+
+ x->*x; // { dg-error "no match" }
+ x / x; // { dg-error "no match" }
+ x * x; // { dg-error "no match" }
+ x + x; // { dg-error "no match" }
+ x - x; // { dg-error "no match" }
+ x % x; // { dg-error "no match" }
+ x & x; // { dg-error "no match" }
+ x | x; // { dg-error "no match" }
+ x ^ x; // { dg-error "no match" }
+ x << x; // { dg-error "no match" }
+ x >> x; // { dg-error "no match" }
+ x && x; // { dg-error "no match" }
+ x || x; // { dg-error "no match" }
+ x, x;
+
+ x == x; // { dg-error "no match" }
+ x != x; // { dg-error "no match" }
+ x < x; // { dg-error "no match" }
+ x > x; // { dg-error "no match" }
+ x <= x; // { dg-error "no match" }
+ x >= x; // { dg-error "no match" }
+#if __cplusplus > 201703L
+ x <=> x; // { dg-error "no match" "" { target c++20 } }
+#endif
+
+ x += x; // { dg-error "no match" }
+ x -= x; // { dg-error "no match" }
+ x *= x; // { dg-error "no match" }
+ x /= x; // { dg-error "no match" }
+ x %= x; // { dg-error "no match" }
+ x |= x; // { dg-error "no match" }
+ x ^= x; // { dg-error "no match" }
+ x <<= x; // { dg-error "no match" }
+ x >>= x; // { dg-error "no match" }
+ };
+}
+
+namespace N { struct A { }; }
+
+#include "operator-3-ops.h"
+
+int main() {
+ f()(N::A());
+}
diff --git a/gcc/testsuite/g++.dg/lookup/operator-4.C b/gcc/testsuite/g++.dg/lookup/operator-4.C
new file mode 100644
index 0000000..e0b80a1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/operator-4.C
@@ -0,0 +1,74 @@
+// PR c++/51577
+// { dg-do compile { target c++17 } }
+// Like operator-3.C but for unary fold expressions.
+
+template <class... Ts> void f (Ts... xs) {
+ (xs->*...); // { dg-error "no match" }
+ (...->*xs); // { dg-error "no match" }
+ (xs / ...); // { dg-error "no match" }
+ (... / xs); // { dg-error "no match" }
+ (xs * ...); // { dg-error "no match" }
+ (... * xs); // { dg-error "no match" }
+ (xs + ...); // { dg-error "no match" }
+ (... + xs); // { dg-error "no match" }
+ (xs - ...); // { dg-error "no match" }
+ (... - xs); // { dg-error "no match" }
+ (xs % ...); // { dg-error "no match" }
+ (... % xs); // { dg-error "no match" }
+ (xs & ...); // { dg-error "no match" }
+ (... & xs); // { dg-error "no match" }
+ (xs | ...); // { dg-error "no match" }
+ (... | xs); // { dg-error "no match" }
+ (xs ^ ...); // { dg-error "no match" }
+ (... ^ xs); // { dg-error "no match" }
+ (xs << ...); // { dg-error "no match" }
+ (... << xs); // { dg-error "no match" }
+ (xs >> ...); // { dg-error "no match" }
+ (... >> xs); // { dg-error "no match" }
+ (xs && ...); // { dg-error "no match" }
+ (... && xs); // { dg-error "no match" }
+ (xs || ...); // { dg-error "no match" }
+ (... || xs); // { dg-error "no match" }
+ (xs, ...);
+ (..., xs);
+
+ (xs == ...); // { dg-error "no match" }
+ (... == xs); // { dg-error "no match" }
+ (xs != ...); // { dg-error "no match" }
+ (... != xs); // { dg-error "no match" }
+ (xs < ...); // { dg-error "no match" }
+ (... < xs); // { dg-error "no match" }
+ (xs > ...); // { dg-error "no match" }
+ (... > xs); // { dg-error "no match" }
+ (xs <= ...); // { dg-error "no match" }
+ (... <= xs); // { dg-error "no match" }
+ (xs >= ...); // { dg-error "no match" }
+ (... >= xs); // { dg-error "no match" }
+
+ (xs += ...); // { dg-error "no match" }
+ (... += xs); // { dg-error "no match" }
+ (xs -= ...); // { dg-error "no match" }
+ (... -= xs); // { dg-error "no match" }
+ (xs *= ...); // { dg-error "no match" }
+ (... *= xs); // { dg-error "no match" }
+ (xs /= ...); // { dg-error "no match" }
+ (... /= xs); // { dg-error "no match" }
+ (xs %= ...); // { dg-error "no match" }
+ (... %= xs); // { dg-error "no match" }
+ (xs |= ...); // { dg-error "no match" }
+ (... |= xs); // { dg-error "no match" }
+ (xs ^= ...); // { dg-error "no match" }
+ (... ^= xs); // { dg-error "no match" }
+ (xs <<= ...); // { dg-error "no match" }
+ (... <<= xs); // { dg-error "no match" }
+ (xs >>= ...); // { dg-error "no match" }
+ (... >>= xs); // { dg-error "no match" }
+}
+
+namespace N { struct A { }; }
+
+#include "operator-3-ops.h"
+
+int main() {
+ f(N::A(), N::A());
+}
diff --git a/gcc/testsuite/g++.dg/lookup/operator-4a.C b/gcc/testsuite/g++.dg/lookup/operator-4a.C
new file mode 100644
index 0000000..b4a3f94
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/operator-4a.C
@@ -0,0 +1,76 @@
+// PR c++/51577
+// { dg-do compile { target c++17 } }
+// Like operator-4.C but also containing a partial instantiation step.
+
+template <class...> auto f () {
+ return [] (auto... xs) {
+ (xs->*...); // { dg-error "no match" }
+ (...->*xs); // { dg-error "no match" }
+ (xs / ...); // { dg-error "no match" }
+ (... / xs); // { dg-error "no match" }
+ (xs * ...); // { dg-error "no match" }
+ (... * xs); // { dg-error "no match" }
+ (xs + ...); // { dg-error "no match" }
+ (... + xs); // { dg-error "no match" }
+ (xs - ...); // { dg-error "no match" }
+ (... - xs); // { dg-error "no match" }
+ (xs % ...); // { dg-error "no match" }
+ (... % xs); // { dg-error "no match" }
+ (xs & ...); // { dg-error "no match" }
+ (... & xs); // { dg-error "no match" }
+ (xs | ...); // { dg-error "no match" }
+ (... | xs); // { dg-error "no match" }
+ (xs ^ ...); // { dg-error "no match" }
+ (... ^ xs); // { dg-error "no match" }
+ (xs << ...); // { dg-error "no match" }
+ (... << xs); // { dg-error "no match" }
+ (xs >> ...); // { dg-error "no match" }
+ (... >> xs); // { dg-error "no match" }
+ (xs && ...); // { dg-error "no match" }
+ (... && xs); // { dg-error "no match" }
+ (xs || ...); // { dg-error "no match" }
+ (... || xs); // { dg-error "no match" }
+ (xs, ...);
+ (..., xs);
+
+ (xs == ...); // { dg-error "no match" }
+ (... == xs); // { dg-error "no match" }
+ (xs != ...); // { dg-error "no match" }
+ (... != xs); // { dg-error "no match" }
+ (xs < ...); // { dg-error "no match" }
+ (... < xs); // { dg-error "no match" }
+ (xs > ...); // { dg-error "no match" }
+ (... > xs); // { dg-error "no match" }
+ (xs <= ...); // { dg-error "no match" }
+ (... <= xs); // { dg-error "no match" }
+ (xs >= ...); // { dg-error "no match" }
+ (... >= xs); // { dg-error "no match" }
+
+ (xs += ...); // { dg-error "no match" }
+ (... += xs); // { dg-error "no match" }
+ (xs -= ...); // { dg-error "no match" }
+ (... -= xs); // { dg-error "no match" }
+ (xs *= ...); // { dg-error "no match" }
+ (... *= xs); // { dg-error "no match" }
+ (xs /= ...); // { dg-error "no match" }
+ (... /= xs); // { dg-error "no match" }
+ (xs %= ...); // { dg-error "no match" }
+ (... %= xs); // { dg-error "no match" }
+ (xs |= ...); // { dg-error "no match" }
+ (... |= xs); // { dg-error "no match" }
+ (xs ^= ...); // { dg-error "no match" }
+ (... ^= xs); // { dg-error "no match" }
+ (xs <<= ...); // { dg-error "no match" }
+ (... <<= xs); // { dg-error "no match" }
+ (xs >>= ...); // { dg-error "no match" }
+ (... >>= xs); // { dg-error "no match" }
+ };
+}
+
+namespace N { struct A { }; }
+
+#include "operator-3-ops.h"
+
+int main() {
+ f()(N::A(), N::A());
+}
diff --git a/gcc/testsuite/g++.dg/lookup/operator-5.C b/gcc/testsuite/g++.dg/lookup/operator-5.C
new file mode 100644
index 0000000..2bbb2c4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/operator-5.C
@@ -0,0 +1,74 @@
+// PR c++/51577
+// { dg-do compile { target c++17 } }
+// Like operator-4.C but for binary fold expressions.
+
+namespace N { struct A { }; }
+
+template <class... Ts> void f (Ts... xs) {
+ (xs->*...->*N::A{}); // { dg-error "no match" }
+ (N::A{}->*...->*xs); // { dg-error "no match" }
+ (xs / ... / N::A{}); // { dg-error "no match" }
+ (N::A{} / ... / xs); // { dg-error "no match" }
+ (xs * ... * N::A{}); // { dg-error "no match" }
+ (N::A{} * ... * xs); // { dg-error "no match" }
+ (xs + ... + N::A{}); // { dg-error "no match" }
+ (N::A{} + ... + xs); // { dg-error "no match" }
+ (xs - ... - N::A{}); // { dg-error "no match" }
+ (N::A{} - ... - xs); // { dg-error "no match" }
+ (xs % ... % N::A{}); // { dg-error "no match" }
+ (N::A{} % ... % xs); // { dg-error "no match" }
+ (xs & ... & N::A{}); // { dg-error "no match" }
+ (N::A{} & ... & xs); // { dg-error "no match" }
+ (xs | ... | N::A{}); // { dg-error "no match" }
+ (N::A{} | ... | xs); // { dg-error "no match" }
+ (xs ^ ... ^ N::A{}); // { dg-error "no match" }
+ (N::A{} ^ ... ^ xs); // { dg-error "no match" }
+ (xs << ... << N::A{}); // { dg-error "no match" }
+ (N::A{} << ... << xs); // { dg-error "no match" }
+ (xs >> ... >> N::A{}); // { dg-error "no match" }
+ (N::A{} >> ... >> xs); // { dg-error "no match" }
+ (xs && ... && N::A{}); // { dg-error "no match" }
+ (N::A{} && ... && xs); // { dg-error "no match" }
+ (xs || ... || N::A{}); // { dg-error "no match" }
+ (N::A{} || ... || xs); // { dg-error "no match" }
+ (xs , ... , N::A{});
+ (N::A{} , ... , xs);
+
+ (xs == ... == N::A{}); // { dg-error "no match" }
+ (N::A{} == ... == xs); // { dg-error "no match" }
+ (xs != ... != N::A{}); // { dg-error "no match" }
+ (N::A{} != ... != xs); // { dg-error "no match" }
+ (xs < ... < N::A{}); // { dg-error "no match" }
+ (N::A{} < ... < xs); // { dg-error "no match" }
+ (xs > ... > N::A{}); // { dg-error "no match" }
+ (N::A{} > ... > xs); // { dg-error "no match" }
+ (xs <= ... <= N::A{}); // { dg-error "no match" }
+ (N::A{} <= ... <= xs); // { dg-error "no match" }
+ (xs >= ... >= N::A{}); // { dg-error "no match" }
+ (N::A{} >= ... >= xs); // { dg-error "no match" }
+
+ (xs += ... += N::A{}); // { dg-error "no match" }
+ (N::A{} += ... += xs); // { dg-error "no match" }
+ (xs -= ... -= N::A{}); // { dg-error "no match" }
+ (N::A{} -= ... -= xs); // { dg-error "no match" }
+ (xs *= ... *= N::A{}); // { dg-error "no match" }
+ (N::A{} *= ... *= xs); // { dg-error "no match" }
+ (xs /= ... /= N::A{}); // { dg-error "no match" }
+ (N::A{} /= ... /= xs); // { dg-error "no match" }
+ (xs %= ... %= N::A{}); // { dg-error "no match" }
+ (N::A{} %= ... %= xs); // { dg-error "no match" }
+ (xs |= ... |= N::A{}); // { dg-error "no match" }
+ (N::A{} |= ... |= xs); // { dg-error "no match" }
+ (xs ^= ... ^= N::A{}); // { dg-error "no match" }
+ (N::A{} ^= ... ^= xs); // { dg-error "no match" }
+ (xs <<= ... <<= N::A{}); // { dg-error "no match" }
+ (N::A{} <<= ... <<= xs); // { dg-error "no match" }
+ (xs >>= ... >>= N::A{}); // { dg-error "no match" }
+ (N::A{} >>= ... >>= xs); // { dg-error "no match" }
+}
+
+#include "operator-3-ops.h"
+
+int main() {
+ f(N::A());
+}
diff --git a/gcc/testsuite/g++.dg/lookup/operator-5a.C b/gcc/testsuite/g++.dg/lookup/operator-5a.C
new file mode 100644
index 0000000..6f9ecd6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/operator-5a.C
@@ -0,0 +1,76 @@
+// PR c++/51577
+// { dg-do compile { target c++17 } }
+// Like operator-5.C but also containing a partial instantiation step.
+
+namespace N { struct A { }; }
+
+template <class...> auto f () {
+ return [] (auto... xs) {
+ (xs->*...->*N::A{}); // { dg-error "no match" }
+ (N::A{}->*...->*xs); // { dg-error "no match" }
+ (xs / ... / N::A{}); // { dg-error "no match" }
+ (N::A{} / ... / xs); // { dg-error "no match" }
+ (xs * ... * N::A{}); // { dg-error "no match" }
+ (N::A{} * ... * xs); // { dg-error "no match" }
+ (xs + ... + N::A{}); // { dg-error "no match" }
+ (N::A{} + ... + xs); // { dg-error "no match" }
+ (xs - ... - N::A{}); // { dg-error "no match" }
+ (N::A{} - ... - xs); // { dg-error "no match" }
+ (xs % ... % N::A{}); // { dg-error "no match" }
+ (N::A{} % ... % xs); // { dg-error "no match" }
+ (xs & ... & N::A{}); // { dg-error "no match" }
+ (N::A{} & ... & xs); // { dg-error "no match" }
+ (xs | ... | N::A{}); // { dg-error "no match" }
+ (N::A{} | ... | xs); // { dg-error "no match" }
+ (xs ^ ... ^ N::A{}); // { dg-error "no match" }
+ (N::A{} ^ ... ^ xs); // { dg-error "no match" }
+ (xs << ... << N::A{}); // { dg-error "no match" }
+ (N::A{} << ... << xs); // { dg-error "no match" }
+ (xs >> ... >> N::A{}); // { dg-error "no match" }
+ (N::A{} >> ... >> xs); // { dg-error "no match" }
+ (xs && ... && N::A{}); // { dg-error "no match" }
+ (N::A{} && ... && xs); // { dg-error "no match" }
+ (xs || ... || N::A{}); // { dg-error "no match" }
+ (N::A{} || ... || xs); // { dg-error "no match" }
+ (xs , ... , N::A{});
+ (N::A{} , ... , xs);
+
+ (xs == ... == N::A{}); // { dg-error "no match" }
+ (N::A{} == ... == xs); // { dg-error "no match" }
+ (xs != ... != N::A{}); // { dg-error "no match" }
+ (N::A{} != ... != xs); // { dg-error "no match" }
+ (xs < ... < N::A{}); // { dg-error "no match" }
+ (N::A{} < ... < xs); // { dg-error "no match" }
+ (xs > ... > N::A{}); // { dg-error "no match" }
+ (N::A{} > ... > xs); // { dg-error "no match" }
+ (xs <= ... <= N::A{}); // { dg-error "no match" }
+ (N::A{} <= ... <= xs); // { dg-error "no match" }
+ (xs >= ... >= N::A{}); // { dg-error "no match" }
+ (N::A{} >= ... >= xs); // { dg-error "no match" }
+
+ (xs += ... += N::A{}); // { dg-error "no match" }
+ (N::A{} += ... += xs); // { dg-error "no match" }
+ (xs -= ... -= N::A{}); // { dg-error "no match" }
+ (N::A{} -= ... -= xs); // { dg-error "no match" }
+ (xs *= ... *= N::A{}); // { dg-error "no match" }
+ (N::A{} *= ... *= xs); // { dg-error "no match" }
+ (xs /= ... /= N::A{}); // { dg-error "no match" }
+ (N::A{} /= ... /= xs); // { dg-error "no match" }
+ (xs %= ... %= N::A{}); // { dg-error "no match" }
+ (N::A{} %= ... %= xs); // { dg-error "no match" }
+ (xs |= ... |= N::A{}); // { dg-error "no match" }
+ (N::A{} |= ... |= xs); // { dg-error "no match" }
+ (xs ^= ... ^= N::A{}); // { dg-error "no match" }
+ (N::A{} ^= ... ^= xs); // { dg-error "no match" }
+ (xs <<= ... <<= N::A{}); // { dg-error "no match" }
+ (N::A{} <<= ... <<= xs); // { dg-error "no match" }
+ (xs >>= ... >>= N::A{}); // { dg-error "no match" }
+ (N::A{} >>= ... >>= xs); // { dg-error "no match" }
+ };
+}
+
+#include "operator-3-ops.h"
+
+int main() {
+ f()(N::A());
+}
diff --git a/gcc/testsuite/g++.dg/lookup/operator-6.C b/gcc/testsuite/g++.dg/lookup/operator-6.C
new file mode 100644
index 0000000..b59c137
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/operator-6.C
@@ -0,0 +1,59 @@
+// PR c++/83035
+// { dg-do compile { target c++11 } }
+// Like operator-3.C but where the lookup occurs at non-block scope.
+
+template<class T, class = void> struct S {
+ static constexpr bool is_primary = true;
+};
+
+template<class T> struct S<T, decltype(+T())> { };
+template<class T> struct S<T, decltype(-T())> { };
+template<class T> struct S<T, decltype(*T())> { };
+template<class T> struct S<T, decltype(~T())> { };
+template<class T> struct S<T, decltype(&T())> { };
+template<class T> struct S<T, decltype(!T())> { };
+template<class T> struct S<T, decltype(++T())> { };
+template<class T> struct S<T, decltype(--T())> { };
+template<class T> struct S<T, decltype(T()++)> { };
+template<class T> struct S<T, decltype(T()--)> { };
+
+template<class T> struct S<T, decltype(T()->*T())> { };
+template<class T> struct S<T, decltype(T() / T())> { };
+template<class T> struct S<T, decltype(T() * T())> { };
+template<class T> struct S<T, decltype(T() + T())> { };
+template<class T> struct S<T, decltype(T() - T())> { };
+template<class T> struct S<T, decltype(T() % T())> { };
+template<class T> struct S<T, decltype(T() & T())> { };
+template<class T> struct S<T, decltype(T() | T())> { };
+template<class T> struct S<T, decltype(T() ^ T())> { };
+template<class T> struct S<T, decltype(T() << T())> { };
+template<class T> struct S<T, decltype(T() >> T())> { };
+template<class T> struct S<T, decltype(T() && T())> { };
+template<class T> struct S<T, decltype(T() || T())> { };
+template<class T> struct S<T, decltype(T(), T())> { };
+
+template<class T> struct S<T, decltype(T() == T())> { };
+template<class T> struct S<T, decltype(T() != T())> { };
+template<class T> struct S<T, decltype(T() < T())> { };
+template<class T> struct S<T, decltype(T() > T())> { };
+template<class T> struct S<T, decltype(T() <= T())> { };
+template<class T> struct S<T, decltype(T() >= T())> { };
+#if __cplusplus > 201703L
+template<class T> struct S<T, decltype(T() <=> T())> { };
+#endif
+
+template<class T> struct S<T, decltype(T() += T())> { };
+template<class T> struct S<T, decltype(T() -= T())> { };
+template<class T> struct S<T, decltype(T() *= T())> { };
+template<class T> struct S<T, decltype(T() /= T())> { };
+template<class T> struct S<T, decltype(T() %= T())> { };
+template<class T> struct S<T, decltype(T() |= T())> { };
+template<class T> struct S<T, decltype(T() ^= T())> { };
+template<class T> struct S<T, decltype(T() <<= T())> { };
+template<class T> struct S<T, decltype(T() >>= T())> { };
+
+namespace N { struct A { }; }
+
+#include "operator-3-ops.h"
+
+static_assert(S<N::A>::is_primary, "");
diff --git a/gcc/testsuite/g++.dg/lookup/operator-7.C b/gcc/testsuite/g++.dg/lookup/operator-7.C
new file mode 100644
index 0000000..546fcb0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/operator-7.C
@@ -0,0 +1,27 @@
+// PR c++/100465
+
+namespace N
+{
+ struct string
+ {
+ template<typename T>
+ void operator+=(T);
+ };
+
+ struct A {
+ void operator+=(char); // #1
+
+ template<typename T>
+ void f() {
+ string s;
+ s += T();
+ }
+
+ void g() {
+ f<char>();
+ }
+ };
+} // namespace N
+
+template<typename T>
+void operator+=(N::string, T);
diff --git a/gcc/testsuite/g++.dg/lookup/operator-8.C b/gcc/testsuite/g++.dg/lookup/operator-8.C
new file mode 100644
index 0000000..64d8a97
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/operator-8.C
@@ -0,0 +1,34 @@
+// Verify phase 1 lookup works properly for rewritten non-dependent conditional
+// operator expressions.
+
+// This test currently fails due to build_min_non_dep_op_overload not knowing
+// how to handle rewritten operator expressions; see the FIXME in build_new_op.
+
+// { dg-do compile { target c++20 } }
+
+#include <compare>
+
+struct A {
+ bool operator==(int);
+ std::strong_ordering operator<=>(int);
+};
+
+template<class T>
+void f() {
+ A a;
+ (void)(a != 0, 0 != a); // { dg-bogus "deleted" "" { xfail *-*-* } }
+ (void)(a < 0, 0 < a); // { dg-bogus "deleted" "" { xfail *-*-* } }
+ (void)(a <= 0, 0 <= a); // { dg-bogus "deleted" "" { xfail *-*-* } }
+ (void)(a > 0, 0 > a); // { dg-bogus "deleted" "" { xfail *-*-* } }
+ (void)(a >= 0, 0 >= a); // { dg-bogus "deleted" "" { xfail *-*-* } }
+}
+
+// These later-declared namespace-scope overloads shouldn't be considered
+// when instantiating f<int>.
+bool operator!=(A, int) = delete;
+bool operator<(A, int) = delete;
+bool operator<=(A, int) = delete;
+bool operator>(A, int) = delete;
+bool operator>=(A, int) = delete;
+
+template void f<int>();
diff --git a/gcc/testsuite/g++.dg/lto/alignas1_0.C b/gcc/testsuite/g++.dg/lto/alignas1_0.C
new file mode 100644
index 0000000..a2fc72a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/alignas1_0.C
@@ -0,0 +1,7 @@
+// PR c++/104245
+// { dg-lto-do assemble }
+// { dg-require-effective-target c++11 }
+
+template <typename T> struct A { alignas(T) alignas(int) int a; };
+struct B { B(const char *, const char *, int, int); A<int> b; };
+B c {"", "", 0, 0};
diff --git a/gcc/testsuite/g++.dg/lto/inline-crossmodule-1_0.C b/gcc/testsuite/g++.dg/lto/inline-crossmodule-1_0.C
index adbc43e..0294dcc 100644
--- a/gcc/testsuite/g++.dg/lto/inline-crossmodule-1_0.C
+++ b/gcc/testsuite/g++.dg/lto/inline-crossmodule-1_0.C
@@ -1,5 +1,5 @@
// { dg-lto-do link }
-/* { dg-lto-options { "-O2 -fno-early-inlining -flto -fdump-ipa-inline-details" } } */
+/* { dg-lto-options { "-O2 -fno-early-inlining -fno-implicit-constexpr -flto -fdump-ipa-inline-details" } } */
#include "inline-crossmodule-1.h"
int a::key ()
{
diff --git a/gcc/testsuite/g++.dg/lto/lto.exp b/gcc/testsuite/g++.dg/lto/lto.exp
index 211e052..fd5392d 100644
--- a/gcc/testsuite/g++.dg/lto/lto.exp
+++ b/gcc/testsuite/g++.dg/lto/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/modules/enum-1_a.C b/gcc/testsuite/g++.dg/modules/enum-1_a.C
index 53e2ac8..24cad28 100644
--- a/gcc/testsuite/g++.dg/modules/enum-1_a.C
+++ b/gcc/testsuite/g++.dg/modules/enum-1_a.C
@@ -1,5 +1,5 @@
// { dg-module-do run }
-// { dg-additional-options "-fmodules-ts -fdump-lang-module-uid" }
+// { dg-additional-options "-fmodules-ts -fdump-lang-module-uid -fno-implicit-constexpr" }
export module enUm;
// { dg-module-cmi "enUm" }
diff --git a/gcc/testsuite/g++.dg/modules/explicit-bool-1_a.H b/gcc/testsuite/g++.dg/modules/explicit-bool-1_a.H
new file mode 100644
index 0000000..db49721
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/explicit-bool-1_a.H
@@ -0,0 +1,23 @@
+// PR c++/103752
+// { dg-additional-options -fmodule-header }
+// { dg-require-effective-target c++20 }
+
+template<typename _T1, typename _T2>
+struct pair
+{
+ constexpr
+ explicit(__is_same(_T1, _T2))
+ pair()
+ { }
+
+ _T1 first;
+ _T2 second;
+};
+
+struct string
+{
+ string() { }
+ string(const char* s) : s(s) { }
+
+ const char* s = "";
+};
diff --git a/gcc/testsuite/g++.dg/modules/explicit-bool-1_b.C b/gcc/testsuite/g++.dg/modules/explicit-bool-1_b.C
new file mode 100644
index 0000000..27bfdee
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/explicit-bool-1_b.C
@@ -0,0 +1,6 @@
+// { dg-additional-options -fmodules-ts }
+// { dg-require-effective-target c++20 }
+
+export module x;
+import "explicit-bool-1_a.H";
+pair<string, string> environment;
diff --git a/gcc/testsuite/g++.dg/modules/fn-inline-1_c.C b/gcc/testsuite/g++.dg/modules/fn-inline-1_c.C
index 55a7aaa..2b8bbdc 100644
--- a/gcc/testsuite/g++.dg/modules/fn-inline-1_c.C
+++ b/gcc/testsuite/g++.dg/modules/fn-inline-1_c.C
@@ -1,4 +1,4 @@
-// { dg-additional-options "-fmodules-ts" }
+// { dg-additional-options "-fmodules-ts -fno-inline" }
import bob;
int main ()
diff --git a/gcc/testsuite/g++.dg/modules/modules.exp b/gcc/testsuite/g++.dg/modules/modules.exp
index da7afc2..afb323d 100644
--- a/gcc/testsuite/g++.dg/modules/modules.exp
+++ b/gcc/testsuite/g++.dg/modules/modules.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2021 Free Software Foundation, Inc.
+# Copyright (C) 2017-2022 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/modules/pmf-1_a.H b/gcc/testsuite/g++.dg/modules/pmf-1_a.H
index c597db1..a7b3fc3 100644
--- a/gcc/testsuite/g++.dg/modules/pmf-1_a.H
+++ b/gcc/testsuite/g++.dg/modules/pmf-1_a.H
@@ -1,4 +1,4 @@
-// { dg-additional-options -fmodule-header }
+// { dg-additional-options "-fmodule-header -fno-implicit-constexpr" }
// { dg-module-cmi {} }
#include "pmf-1.h"
diff --git a/gcc/testsuite/g++.dg/modules/pmf-1_b.C b/gcc/testsuite/g++.dg/modules/pmf-1_b.C
index 0b08610..cb2a35b 100644
--- a/gcc/testsuite/g++.dg/modules/pmf-1_b.C
+++ b/gcc/testsuite/g++.dg/modules/pmf-1_b.C
@@ -1,4 +1,4 @@
-// { dg-additional-options "-fmodules-ts -fno-module-lazy -fdump-lang-module-alias" }
+// { dg-additional-options "-fmodules-ts -fno-module-lazy -fdump-lang-module-alias -fno-implicit-constexpr" }
#include "pmf-1.h"
import "pmf-1_a.H";
diff --git a/gcc/testsuite/g++.dg/modules/used-1_c.C b/gcc/testsuite/g++.dg/modules/used-1_c.C
index 0d1514e..b51a19f 100644
--- a/gcc/testsuite/g++.dg/modules/used-1_c.C
+++ b/gcc/testsuite/g++.dg/modules/used-1_c.C
@@ -1,4 +1,4 @@
-// { dg-additional-options -fmodules-ts }
+// { dg-additional-options "-fmodules-ts -fno-inline" }
import "used-1_b.H";
diff --git a/gcc/testsuite/g++.dg/opt/pr100469.C b/gcc/testsuite/g++.dg/opt/pr100469.C
new file mode 100644
index 0000000..9eb37e7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr100469.C
@@ -0,0 +1,32 @@
+// PR debug/100469
+// { dg-do compile }
+// { dg-options "-O2 -fcompare-debug -fno-tree-dse -fno-tree-forwprop -fno-tree-tail-merge --param=sccvn-max-alias-queries-per-access=0" }
+
+struct S
+{
+ long m;
+ S (const S &s)
+ {
+ m = s.m;
+ }
+ S (long l)
+ {
+ m = l;
+ }
+ bool operatorX (const S &s)
+ {
+ return m >= s.m;
+ }
+};
+
+static inline S
+bar (S a, S b)
+{
+ return a.operatorX (b) ? a : b;
+}
+
+S
+foo (S s)
+{
+ return bar (s, (S) 0);
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr101597.C b/gcc/testsuite/g++.dg/opt/pr101597.C
new file mode 100644
index 0000000..3b7b34f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr101597.C
@@ -0,0 +1,13 @@
+// PR c++/101597
+// { dg-do compile }
+// { dg-options "-O2 -Warray-bounds" }
+
+typedef __SIZE_TYPE__ size_t;
+struct S { virtual void *foo (size_t) __attribute__((alloc_size (2))); };
+
+int
+foo (void *p)
+{
+ char *q = static_cast<char *> (static_cast<S *> (p)->foo (32));
+ return q[64]; // { dg-warning "array subscript 64 is outside array bounds of" }
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr102970.C b/gcc/testsuite/g++.dg/opt/pr102970.C
new file mode 100644
index 0000000..2acb3c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr102970.C
@@ -0,0 +1,60 @@
+// { dg-do run }
+// { dg-require-effective-target c++14 }
+// { dg-options "-O2 -funroll-loops -fno-tree-vectorize" }
+
+#include <vector>
+#include <algorithm>
+#include <cassert>
+
+struct box {
+ box(int xmin, int xmax, int ymin, int ymax) noexcept
+ : m_xmin(xmin),
+ m_xmax(xmax),
+ m_ymin(ymin),
+ m_ymax(ymax) {
+ }
+
+ box(box const & o) noexcept
+ : m_xmin(o.m_xmin),
+ m_xmax(o.m_xmax),
+ m_ymin(o.m_ymin),
+ m_ymax(o.m_ymax) { }
+
+ int m_xmin;
+ int m_xmax;
+ int m_ymin;
+ int m_ymax;
+};
+
+
+int main() {
+ std::vector<box> vRects{ // requires 18 elements
+ { 900, 11, 22, 33 },
+ { 901, 11, 22, 33 },
+ { 902, 11, 22, 33 },
+ { 903, 11, 22, 33 },
+ { 704, 11, 22, 33 },
+ { 705, 11, 22, 33 },
+ { 706, 11, 22, 33 },
+ { 707, 11, 22, 33 },
+ { 808, 11, 22, 33 },
+ { 809, 11, 22, 33 },
+ { 810, 11, 22, 33 },
+ { 811, 11, 22, 33 },
+ { 812, 11, 22, 33 },
+ { 813, 11, 22, 33 },
+ { 814, 11, 22, 33 },
+ { 815, 11, 22, 33 },
+ { 816, 11, 22, 33 },
+ { 817, 11, 22, 33 },
+ { 818, 11, 22, 33 },
+ };
+
+ std::stable_sort(vRects.begin(), vRects.end(),
+ [](auto const &r1, auto const &r2) -> bool
+ {
+ if (r2.m_xmax==0||r2.m_ymin==0||r2.m_ymax==0){__builtin_abort();}
+ return r1.m_xmin < r2.m_xmin;
+ });
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr103742.C b/gcc/testsuite/g++.dg/opt/pr103742.C
new file mode 100644
index 0000000..6155d22
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr103742.C
@@ -0,0 +1,36 @@
+// PR debug/103742
+// { dg-do compile { target c++17 } }
+// { dg-options "-O2 -fnon-call-exceptions --param=early-inlining-insns=82 -fcompare-debug" }
+
+template <typename T> T max(T a, T b) { return a >= b ? a : b; }
+template <typename T> T abs(T);
+template <int T, int U> struct A {
+ long a;
+ A(A &x) { a = x.a; }
+ A(long);
+ A foo(A) {
+ if (abs(a) && a == a)
+ a = a ? U : T;
+ else
+ a += a;
+ return *this;
+ }
+ bool operator>=(A) { return a; }
+};
+struct B {};
+struct C {
+ A<2147483647, 0> c;
+};
+struct D {
+ A<2147483647, 0> d;
+ C e[];
+};
+struct E : D{} * f;
+A<2147483647, 0> bar() {
+ A<2147483647, 0> g = g.foo(f->d);
+ return max(g, (A<2147483647, 0>)1);
+}
+E *h;
+void baz() {
+ h->e[0].c = bar();
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr103756.C b/gcc/testsuite/g++.dg/opt/pr103756.C
new file mode 100644
index 0000000..d6d7596
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr103756.C
@@ -0,0 +1,57 @@
+// PR rtl-optimization/103756
+// { dg-do compile }
+// { dg-options "-std=c++17 -O -fcompare-debug -fconserve-stack -frename-registers -fno-tree-ch -fira-algorithm=priority" }
+
+char __copy_move_b___trans_tmp_9;
+template <typename> struct __iterator_traits;
+template <typename _Tp> struct __iterator_traits<_Tp *> {
+ typedef _Tp &reference;
+};
+template <typename _Iterator> struct reverse_iterator {
+ _Iterator current;
+ reverse_iterator();
+ reverse_iterator(reverse_iterator &__x) : current(__x.current) {}
+ _Iterator base() { return current; }
+ typename __iterator_traits<_Iterator>::reference operator*() {
+ return *current;
+ }
+ reverse_iterator operator--() {
+ ++current;
+ return *this;
+ }
+};
+template <typename _IteratorL, typename _IteratorR>
+auto operator-(_IteratorL __x, _IteratorR __y) {
+ return __y - __x.base();
+}
+struct __copy_move_backward {
+ template <typename _BI1, typename _BI2>
+ static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) {
+ typename __n = __last - __first;
+ for (; __n > 0; --__n) {
+ reverse_iterator __trans_tmp_8 = --__result;
+ *__trans_tmp_8 = __copy_move_b___trans_tmp_9;
+ }
+ return __result;
+ }
+};
+template <int, typename _BI1, typename _BI2>
+inline _BI2 __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) {
+ return __copy_move_backward::__copy_move_b(__first, __last, __result);
+}
+template <int _IsMove, typename _BI1, typename _BI2>
+_BI2 __copy_move_backward_a1(_BI1 __last, _BI2 __result) {
+ _BI1 __first;
+ return __copy_move_backward_a2<_IsMove>(__first, __last, __result);
+}
+template <int _IsMove, typename _II, typename _OI>
+void __copy_move_backward_a(_II, _OI __result) {
+ reverse_iterator<unsigned char *> __trans_tmp_7 =
+ __copy_move_backward_a1<_IsMove>(__trans_tmp_7, __result);
+}
+template <typename _BI1, typename _BI2>
+void move_backward(_BI1 __first, _BI2 __result) {
+ __copy_move_backward_a<true>(__first, __result);
+}
+reverse_iterator<unsigned char *> __rotate___first;
+void __rotate() { move_backward(__rotate___first, __rotate___first); }
diff --git a/gcc/testsuite/g++.dg/opt/pr103842.C b/gcc/testsuite/g++.dg/opt/pr103842.C
new file mode 100644
index 0000000..4fbafe3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr103842.C
@@ -0,0 +1,31 @@
+// PR target/103842
+// { dg-do compile }
+// { dg-options "-O3 -std=c++14" }
+
+void foo (float *);
+struct M {
+ float x[3][3];
+ float *operator[](int i) { return x[i]; }
+ M();
+ M(float f, float g) {
+ x[1][0] = x[1][1] = x[1][2] = f;
+ x[2][0] = g;
+ }
+ void bar();
+ M baz() {
+ M s(x[1][2] - x[1][2], x[1][1] - x[1][1]);
+ float r = s[2][0];
+ if (r)
+ for (int i = 0; i < 3; ++i)
+ for (int j = 0; j < 3; ++j)
+ s[i][j] /= r;
+ for (int i = 0;;) {
+ float *t = s[i];
+ foo(t);
+ }
+ }
+};
+void qux() {
+ M m, i = m.baz(), j = i;
+ j.bar();
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr103989.C b/gcc/testsuite/g++.dg/opt/pr103989.C
new file mode 100644
index 0000000..4604811
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr103989.C
@@ -0,0 +1,30 @@
+// { dg-require-effective-target c++17 }
+// { dg-options "-Og -Wall" }
+
+#include <optional>
+#include <memory>
+
+struct A {
+ A (int a) : a {a}
+ {}
+
+ const std::shared_ptr <int> x;
+ int a;
+};
+
+class B
+{
+public:
+ B (const std::optional <A>& a)
+ : a {a}
+ {
+ }
+public:
+ const std::optional <A> a;
+};
+
+int
+main ()
+{
+ B b {std::nullopt};
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr104334.C b/gcc/testsuite/g++.dg/opt/pr104334.C
new file mode 100644
index 0000000..8b75b6a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr104334.C
@@ -0,0 +1,40 @@
+// PR tree-optimization/104334
+// { dg-do run { target c++11 } }
+// { dg-options "-O2 --param logical-op-non-short-circuit=0" }
+
+enum class A { A0, A1, A2, A3 };
+int x;
+
+__attribute__((noipa)) void
+baz ()
+{
+ x = 1;
+}
+
+struct B {
+ unsigned b : 2;
+
+ A
+ foo () const
+ {
+ return static_cast<A> (b);
+ }
+
+ __attribute__((noinline)) void
+ bar ()
+ {
+ if (foo () == A::A2 || foo () == A::A3)
+ baz ();
+ }
+};
+
+int
+main ()
+{
+ B c;
+ c.b = 2;
+ c.bar ();
+ if (x != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr47639.C b/gcc/testsuite/g++.dg/opt/pr47639.C
new file mode 100644
index 0000000..429ad25
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr47639.C
@@ -0,0 +1,17 @@
+// { dg-do compile }
+// { dg-options "-fnon-call-exceptions -Wno-psabi" }
+
+typedef int __attribute__ ((vector_size (8))) vec;
+
+vec foo (vec v1, vec v2)
+{
+ try
+ {
+ return v1 / v2;
+ }
+ catch (...)
+ {
+ throw;
+ }
+}
+
diff --git a/gcc/testsuite/g++.dg/opt/pr47639.c b/gcc/testsuite/g++.dg/opt/pr47639.c
deleted file mode 100644
index 6ee8bb7..0000000
--- a/gcc/testsuite/g++.dg/opt/pr47639.c
+++ /dev/null
@@ -1,17 +0,0 @@
-// { dg-do compile }
-// { dg-options "-fnon-call-exceptions" }
-
-typedef int __attribute__ ((vector_size (8))) vec;
-
-vec foo (vec v1, vec v2)
-{
- try
- {
- return v1 / v2;
- }
- catch (...)
- {
- throw;
- }
-}
-
diff --git a/gcc/testsuite/g++.dg/other/pr88187.C b/gcc/testsuite/g++.dg/other/pr88187.C
index 13466d3..7812e3fd 100644
--- a/gcc/testsuite/g++.dg/other/pr88187.C
+++ b/gcc/testsuite/g++.dg/other/pr88187.C
@@ -4,4 +4,4 @@
template <int> struct A;
void f (A ()); // { dg-error "6:variable or field 'f' declared void" "" { target c++14_down } }
// { dg-error "missing template arguments before '\\(' token" "" { target c++14_down } .-1 }
- // { dg-error "placeholder .A. not permitted in this context" "" { target c++17 } .-2 }
+ // { dg-error "deduced class type 'A' in function return type" "" { target c++17 } .-2 }
diff --git a/gcc/testsuite/g++.dg/parse/no-typename1.C b/gcc/testsuite/g++.dg/parse/no-typename1.C
index 711c621..f40ea0e 100644
--- a/gcc/testsuite/g++.dg/parse/no-typename1.C
+++ b/gcc/testsuite/g++.dg/parse/no-typename1.C
@@ -6,6 +6,6 @@ template <typename T> struct A
{
template <typename U> struct B
{
- A<T>::template B<U> foo(); // { dg-error "" "" { target c++17_down } }
+ A<T>::template B<U> foo();
};
};
diff --git a/gcc/testsuite/g++.dg/parse/template-keyword2.C b/gcc/testsuite/g++.dg/parse/template-keyword2.C
new file mode 100644
index 0000000..ecd0667
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/template-keyword2.C
@@ -0,0 +1,8 @@
+// PR c++/104235
+
+template <class M>
+struct L: M {
+ using M::a;
+ void a();
+ void p() { this->template a<>(); }
+};
diff --git a/gcc/testsuite/g++.dg/pch/pch.exp b/gcc/testsuite/g++.dg/pch/pch.exp
index 4f369b2..766969a 100644
--- a/gcc/testsuite/g++.dg/pch/pch.exp
+++ b/gcc/testsuite/g++.dg/pch/pch.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/plugin/plugin.exp b/gcc/testsuite/g++.dg/plugin/plugin.exp
index 74e12df..b5fb42f 100644
--- a/gcc/testsuite/g++.dg/plugin/plugin.exp
+++ b/gcc/testsuite/g++.dg/plugin/plugin.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/pr102955.C b/gcc/testsuite/g++.dg/pr102955.C
new file mode 100644
index 0000000..de9689e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr102955.C
@@ -0,0 +1,14 @@
+/* PR debug/102955 */
+/* { dg-do compile } */
+/* { dg-options "-g -gtoggle" } */
+
+#pragma GCC optimize "0"
+struct j
+{
+ explicit j ();
+ ~j ();
+};
+void g (void)
+{
+ new j();
+}
diff --git a/gcc/testsuite/g++.dg/pr102988.C b/gcc/testsuite/g++.dg/pr102988.C
new file mode 100644
index 0000000..05a1a8f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr102988.C
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fharden-conditional-branches -fchecking=1" } */
+
+/* DECL_BY_REFERENCE RESULT_DECL is read-only, we can't create a copy
+ of its (address) default def and set it. */
+
+void ll();
+struct k {
+ ~k();
+};
+k ice(k *a)
+{
+ k v;
+ if (&v!= a)
+ ll();
+ return v;
+}
diff --git a/gcc/testsuite/g++.dg/pr103007.C b/gcc/testsuite/g++.dg/pr103007.C
new file mode 100644
index 0000000..1631a85
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr103007.C
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+
+typedef float MushMeshVector[4];
+struct MushMeshQuaternionPair {
+ void VectorRotate(MushMeshVector &);
+ MushMeshVector m_first;
+ MushMeshVector m_second;
+};
+void
+MushMeshQuaternionPair::
+VectorRotate(MushMeshVector &ioVec) {
+ ioVec[2] = (2 - m_first[1] + m_first[3] * 0);
+ ioVec[3] = (m_first[3] + m_first[1] - m_first[2] * 0);
+ float c = ioVec[2], d = ioVec[3];
+ ioVec[2] = (0 - d * m_second[1]);
+ ioVec[3] = (2 - c * m_second[1]);
+}
+
diff --git a/gcc/testsuite/g++.dg/pr103024.C b/gcc/testsuite/g++.dg/pr103024.C
new file mode 100644
index 0000000..15e68d4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr103024.C
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-fnon-call-exceptions -fharden-compares -fsignaling-nans" } */
+
+struct G4ErrorMatrix {
+ G4ErrorMatrix(int);
+ ~G4ErrorMatrix();
+};
+double PropagateError_charge;
+void PropagateError() {
+ G4ErrorMatrix transf(0);
+ int field(PropagateError_charge && field);
+}
diff --git a/gcc/testsuite/g++.dg/pr103038.C b/gcc/testsuite/g++.dg/pr103038.C
new file mode 100644
index 0000000..bb7183a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr103038.C
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-options "-ftrivial-auto-var-init=pattern" } */
+
+struct S;
+void test() { int(S::*PtrMem); }
diff --git a/gcc/testsuite/g++.dg/pr103122.C b/gcc/testsuite/g++.dg/pr103122.C
new file mode 100644
index 0000000..3465ead
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr103122.C
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+unsigned a;
+int b;
+short c;
+void d(long) {
+ for (bool e = (bool)c - 1; e < (bool)b - 1; e += 0)
+ ;
+ if (a) {
+ for (char f = 0; f < 7; f = 7)
+ for (int g = 0; g < c; g += 10)
+ ;
+ d(-!c);
+ }
+}
diff --git a/gcc/testsuite/g++.dg/pr103326.C b/gcc/testsuite/g++.dg/pr103326.C
new file mode 100644
index 0000000..260e7da
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr103326.C
@@ -0,0 +1,15 @@
+// { dg-do compile }
+// { dg-require-effective-target c++11 }
+
+using x86_64_v16qi [[gnu::__vector_size__ (16)]] = char;
+
+template<typename T>
+void foo()
+{
+ constexpr x86_64_v16qi zero{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+}
+
+void foo2()
+{
+ foo<int>();
+}
diff --git a/gcc/testsuite/g++.dg/pr103530.C b/gcc/testsuite/g++.dg/pr103530.C
new file mode 100644
index 0000000..c1d2059
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr103530.C
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fharden-compares -Wno-c++11-extensions" } */
+
+enum E:bool
+{ E0, E1 };
+
+int x;
+
+E
+baz (E rtt)
+{
+ return rtt == E0 ? E1 : E0;
+}
+
+bool bar ();
+
+void
+foo (E)
+{
+ E a = x ? E1 : E0;
+ if (bar ())
+ if (bar ())
+ {
+ E b = baz (a);
+ foo (b);
+ }
+}
diff --git a/gcc/testsuite/g++.dg/pr83541.C b/gcc/testsuite/g++.dg/pr83541.C
new file mode 100644
index 0000000..f5b181e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr83541.C
@@ -0,0 +1,17 @@
+// PR tree-optimization/83541
+// { dg-do compile }
+// { dg-options "-O3 -std=c++17 -ffast-math -fdump-tree-evrp" }
+
+#include <limits>
+
+int test(int x)
+{
+ if(x == std::numeric_limits<int>::max())
+ {
+ return x+1;
+ }
+ return 42;
+}
+
+// { dg-final { scan-tree-dump "return 42" evrp } }
+// { dg-final { scan-tree-dump-not "return _" evrp } }
diff --git a/gcc/testsuite/g++.dg/pr83979.c b/gcc/testsuite/g++.dg/pr83979.C
index a39b1ea..a39b1ea 100644
--- a/gcc/testsuite/g++.dg/pr83979.c
+++ b/gcc/testsuite/g++.dg/pr83979.C
diff --git a/gcc/testsuite/g++.dg/pr96707.C b/gcc/testsuite/g++.dg/pr96707.C
new file mode 100644
index 0000000..2653fe3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr96707.C
@@ -0,0 +1,10 @@
+/* { dg-do compile} */
+/* { dg-options "-O2 -fdump-tree-evrp" } */
+
+bool f(unsigned x, unsigned y)
+{
+ return (x >> y) <= x;
+}
+
+/* { dg-final { scan-tree-dump "return 1" "evrp" } } */
+
diff --git a/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp b/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp
index 1f4c2ff..086fd30 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2011-2022 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 1230cde..42c0e03 100644
--- a/gcc/testsuite/g++.dg/special/ecos.exp
+++ b/gcc/testsuite/g++.dg/special/ecos.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2022 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/template/array35.C b/gcc/testsuite/g++.dg/template/array35.C
new file mode 100644
index 0000000..9fd0263
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/array35.C
@@ -0,0 +1,11 @@
+// PR c++/104302
+
+struct ss {};
+static ss ff(void* const v);
+template <unsigned mem_size>
+void f1(void) {
+ int mem[mem_size];
+ ss StateRegs[] = {
+ ff(mem)
+ };
+}
diff --git a/gcc/testsuite/g++.dg/template/array36.C b/gcc/testsuite/g++.dg/template/array36.C
new file mode 100644
index 0000000..1511da7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/array36.C
@@ -0,0 +1,15 @@
+// Don't try to deduce array bounds from a dependent initializer.
+// { dg-do compile { target c++11 } }
+
+struct A { int i,j; };
+
+template <class T> void f(T t)
+{
+ A ar[] = { t, t };
+ static_assert (sizeof(ar)/sizeof(A) == 1, "");
+}
+
+int main()
+{
+ f(42);
+}
diff --git a/gcc/testsuite/g++.dg/template/attr-used.C b/gcc/testsuite/g++.dg/template/attr-used.C
new file mode 100644
index 0000000..e12bf4c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/attr-used.C
@@ -0,0 +1,16 @@
+// { dg-do compile }
+
+template<typename T> struct X {
+ void g () {}
+ void f () __attribute__((__used__)) {}
+};
+
+extern X<int> x; // X<int> incomplete here
+
+template <typename T>
+void Frob (T t) {
+ x.g(); // X<int> completed here, X<int>::f's body marked for instantiation
+}
+
+// Make sure X<int>::f is emitted
+// { dg-final { scan-assembler "_ZN1XIiE1fEv:" } }
diff --git a/gcc/testsuite/g++.dg/template/crash106.C b/gcc/testsuite/g++.dg/template/crash106.C
index f904bd4..35cedb5 100644
--- a/gcc/testsuite/g++.dg/template/crash106.C
+++ b/gcc/testsuite/g++.dg/template/crash106.C
@@ -7,6 +7,6 @@ struct A
template<T> void foo(); // { dg-error "type" "" { target c++17_down } }
};
-template<T N = 0.0, void (A::*)() = &A::foo<N> > struct B {}; // { dg-error "type|declared" "" { target c++17_down } }
+template<T N = 0.0, void (A::*)() = &A::foo<N> > struct B {}; // { dg-error "type|declared|could not convert" "" { target c++17_down } }
-B<> b; // { dg-error "(could not convert|no matches)" "" { target c++17_down } }
+B<> b; // { dg-message "" "" { target c++17_down } }
diff --git a/gcc/testsuite/g++.dg/template/dependent-name17.C b/gcc/testsuite/g++.dg/template/dependent-name17.C
new file mode 100644
index 0000000..ff623e2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/dependent-name17.C
@@ -0,0 +1,49 @@
+// C++ PR 70317
+// { dg-do compile }
+// { dg-prune-output "expected primary-expression" }
+
+template<class T> class mytemplateclass
+{
+public:
+ template<class U> void class_func() {}
+ template<class U> static void class_func_static() {}
+};
+
+class myclass
+{
+public:
+ int testint;
+ template<class U> void class_func() {}
+ template<class U> static void class_func_static() {}
+};
+
+template<class Y> void tests_func(mytemplateclass<Y> c, myclass c2)
+{
+ /* Dependent template accessors (ill-formed code). */
+ c.class_func<Y>(); // { dg-warning "keyword before dependent template name" }
+ (&c)->class_func<Y>(); // { dg-warning "keyword before dependent template name" }
+ mytemplateclass<Y>::class_func_static<Y>(); // { dg-warning "keyword before dependent template name" }
+
+ /* Dependent template accessors (well-formed code). */
+ c.template class_func<Y>();
+ (&c)->template class_func<Y>();
+ mytemplateclass<Y>::template class_func_static<Y>();
+
+ /* Non-dependent template accessors (well-formed code). */
+ c2.class_func<myclass>();
+ (&c2)->class_func<myclass>();
+ myclass::class_func_static<myclass>();
+}
+
+int main()
+{
+ mytemplateclass<myclass> c;
+ myclass c2;
+ tests_func<myclass>(c, c2);
+
+ c2.testint = 53;
+ /* Make sure this isn't treated as a template. */
+ bool testbool = c2.testint < 999 > 7;
+ /* This probably will be treated as a template initially but it should still work. */
+ testbool = c2.testint < 123 > (50);
+}
diff --git a/gcc/testsuite/g++.dg/template/dependent-name18.C b/gcc/testsuite/g++.dg/template/dependent-name18.C
new file mode 100644
index 0000000..f6f0a27
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/dependent-name18.C
@@ -0,0 +1,5 @@
+template <bool B> struct A { };
+template <class T> void f()
+{
+ A<T::I < T::J>();
+}
diff --git a/gcc/testsuite/g++.dg/template/explicit-args6.C b/gcc/testsuite/g++.dg/template/explicit-args6.C
index d853564..311a767 100644
--- a/gcc/testsuite/g++.dg/template/explicit-args6.C
+++ b/gcc/testsuite/g++.dg/template/explicit-args6.C
@@ -20,6 +20,8 @@ constexpr unsigned
frob()
{
static_assert(N == 1, "user-friendly diagnostic"); // { dg-error "user-friendly" }
+ // dg-message { "-1 == 1" "" { target *-*-* } .-1 }
+
// narrowing check, reject negative values
return unsigned{N}; // { dg-prune-output "narrowing" }
} // { dg-prune-output "flows off the end" }
diff --git a/gcc/testsuite/g++.dg/template/lookup18.C b/gcc/testsuite/g++.dg/template/lookup18.C
new file mode 100644
index 0000000..38f7347
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/lookup18.C
@@ -0,0 +1,17 @@
+// PR c++/93614
+
+template<class T>
+class foo{};
+
+template<class T>
+class template_class_with_struct
+{
+ void my_method() {
+ if(this->b.foo < 1);
+ };
+
+ struct bar
+ {
+ long foo;
+ } b;
+};
diff --git a/gcc/testsuite/g++.dg/template/nested7.C b/gcc/testsuite/g++.dg/template/nested7.C
new file mode 100644
index 0000000..3a5930c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/nested7.C
@@ -0,0 +1,12 @@
+// PR c++/102300
+
+template<typename T>
+struct holder
+{
+ template<typename F> struct fn {};
+
+ struct t1 : fn<T> {}; // pass
+ struct t2 : holder<T >::fn<T> {}; // fail
+ struct t3 : holder<T >::template fn<T> {}; // fail
+ struct t4 : holder<T*>::template fn<T> {}; // pass
+};
diff --git a/gcc/testsuite/g++.dg/template/non-dependent16.C b/gcc/testsuite/g++.dg/template/non-dependent16.C
new file mode 100644
index 0000000..ee8ef90
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/non-dependent16.C
@@ -0,0 +1,37 @@
+// This test verifies that after resolving a non-dependent call expression
+// ahead of time, we prune all but the selected candidate from the overload
+// set. Without this optimization, overload resolution for the final call to
+// f<void>() would be exponential in the size of the overload set.
+
+// { dg-do compile { target c++11 } }
+
+template<class T> void f();
+template<class T> auto f() -> decltype(f<void>(), 1, *T());
+template<class T> auto f() -> decltype(f<void>(), 2, *T());
+template<class T> auto f() -> decltype(f<void>(), 3, *T());
+template<class T> auto f() -> decltype(f<void>(), 4, *T());
+template<class T> auto f() -> decltype(f<void>(), 5, *T());
+template<class T> auto f() -> decltype(f<void>(), 6, *T());
+template<class T> auto f() -> decltype(f<void>(), 7, *T());
+template<class T> auto f() -> decltype(f<void>(), 8, *T());
+template<class T> auto f() -> decltype(f<void>(), 9, *T());
+template<class T> auto f() -> decltype(f<void>(), 10, *T());
+template<class T> auto f() -> decltype(f<void>(), 11, *T());
+template<class T> auto f() -> decltype(f<void>(), 12, *T());
+template<class T> auto f() -> decltype(f<void>(), 13, *T());
+template<class T> auto f() -> decltype(f<void>(), 14, *T());
+template<class T> auto f() -> decltype(f<void>(), 15, *T());
+template<class T> auto f() -> decltype(f<void>(), 16, *T());
+template<class T> auto f() -> decltype(f<void>(), 17, *T());
+template<class T> auto f() -> decltype(f<void>(), 18, *T());
+template<class T> auto f() -> decltype(f<void>(), 19, *T());
+template<class T> auto f() -> decltype(f<void>(), 20, *T());
+template<class T> auto f() -> decltype(f<void>(), 21, *T());
+template<class T> auto f() -> decltype(f<void>(), 22, *T());
+template<class T> auto f() -> decltype(f<void>(), 23, *T());
+template<class T> auto f() -> decltype(f<void>(), 24, *T());
+template<class T> auto f() -> decltype(f<void>(), 25, *T());
+
+int main() {
+ f<void>();
+}
diff --git a/gcc/testsuite/g++.dg/template/non-dependent16a.C b/gcc/testsuite/g++.dg/template/non-dependent16a.C
new file mode 100644
index 0000000..0e04d64
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/non-dependent16a.C
@@ -0,0 +1,36 @@
+// Like non-dependent16.C, but using member functions.
+
+// { dg-do compile { target c++11 } }
+
+struct A {
+ template<class T> static void f();
+ template<class T> static auto f() -> decltype(f<void>(), 1, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 2, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 3, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 4, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 5, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 6, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 7, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 8, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 9, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 10, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 11, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 12, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 13, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 14, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 15, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 16, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 17, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 18, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 19, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 20, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 21, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 22, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 23, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 24, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 25, *T());
+};
+
+int main() {
+ A::f<void>();
+}
diff --git a/gcc/testsuite/g++.dg/template/non-dependent16b.C b/gcc/testsuite/g++.dg/template/non-dependent16b.C
new file mode 100644
index 0000000..b0d1bbe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/non-dependent16b.C
@@ -0,0 +1,37 @@
+// Like non-dependent16a.C, but where A is a template.
+
+// { dg-do compile { target c++11 } }
+
+template<class...>
+struct A {
+ template<class T> static void f();
+ template<class T> static auto f() -> decltype(f<void>(), 1, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 2, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 3, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 4, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 5, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 6, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 7, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 8, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 9, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 10, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 11, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 12, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 13, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 14, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 15, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 16, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 17, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 18, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 19, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 20, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 21, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 22, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 23, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 24, *T());
+ template<class T> static auto f() -> decltype(f<void>(), 25, *T());
+};
+
+int main() {
+ A<>::f<void>();
+}
diff --git a/gcc/testsuite/g++.dg/template/non-dependent17.C b/gcc/testsuite/g++.dg/template/non-dependent17.C
new file mode 100644
index 0000000..6b62dd2a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/non-dependent17.C
@@ -0,0 +1,21 @@
+// A variant of deduce4.C with multiple overloads of foo. Verify we don't
+// crash after ahead-of-time pruning of the overload set for the non-dependent
+// call to foo.
+// { dg-do compile }
+
+template <typename T>
+struct S {
+ template <typename U, typename V>
+ static void foo(V) { }
+ template <typename U>
+ static void foo(...) { }
+
+ void bar () { foo<int>(10); }
+};
+
+void
+test ()
+{
+ S<int> s;
+ s.bar ();
+}
diff --git a/gcc/testsuite/g++.dg/template/non-dependent18.C b/gcc/testsuite/g++.dg/template/non-dependent18.C
new file mode 100644
index 0000000..3e15568
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/non-dependent18.C
@@ -0,0 +1,19 @@
+// PR c++/103831
+// { dg-do compile { target c++11 } }
+
+struct A {
+ constexpr int size() { return 42; } // non-static
+};
+
+template<class T>
+struct B : T {
+ static_assert(A::size() == 42, ""); // { dg-error "without object" }
+
+ static int f() {
+ static_assert(A::size() == 42, ""); // { dg-error "without object" }
+ return A::size(); // { dg-error "without object" }
+ }
+
+ int n = A::size();
+ static const int m = A::size(); // { dg-error "without object" }
+};
diff --git a/gcc/testsuite/g++.dg/template/non-dependent19.C b/gcc/testsuite/g++.dg/template/non-dependent19.C
new file mode 100644
index 0000000..d690e80
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/non-dependent19.C
@@ -0,0 +1,14 @@
+// PR c++/104432
+// { dg-do compile { target c++11 } }
+
+struct A {
+ template<class=int> void f();
+ void f(int);
+};
+
+template<class> struct B : A {
+ using A::f;
+ void g() { f(); }
+};
+
+template struct B<int>;
diff --git a/gcc/testsuite/g++.dg/template/non-dependent19a.C b/gcc/testsuite/g++.dg/template/non-dependent19a.C
new file mode 100644
index 0000000..2f523c8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/non-dependent19a.C
@@ -0,0 +1,16 @@
+// PR c++/104432
+// { dg-do compile { target c++11 } }
+// A variant of non-dependent19.C where A is a template.
+
+template<class>
+struct A {
+ template<class=int> void f();
+ void f(int);
+};
+
+template<class> struct B : A<int> {
+ using A<int>::f;
+ void g() { f(); }
+};
+
+template struct B<int>;
diff --git a/gcc/testsuite/g++.dg/template/non-dependent20.C b/gcc/testsuite/g++.dg/template/non-dependent20.C
new file mode 100644
index 0000000..ebf7d7f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/non-dependent20.C
@@ -0,0 +1,16 @@
+// PR c++/104432
+// { dg-do compile { target c++11 } }
+
+template<class T>
+struct A {
+ template<class=int> static void f(T);
+ static void f();
+};
+
+template<class> struct B : A<int>, A<int&> {
+ using A<int>::f;
+ using A<int&>::f;
+ void g() { f(0); }
+};
+
+template struct B<int>;
diff --git a/gcc/testsuite/g++.dg/template/partial-specialization10.C b/gcc/testsuite/g++.dg/template/partial-specialization10.C
new file mode 100644
index 0000000..d03f313
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/partial-specialization10.C
@@ -0,0 +1,25 @@
+// PR c++/104425
+// { dg-do compile { target c++11 } }
+
+namespace A { class foo {}; }
+namespace B { class bar {}; }
+
+A::foo& operator<<(A::foo& f, const B::bar&);
+
+namespace C {
+ template<class T> T val();
+
+ A::foo& operator<<(A::foo& f, int in);
+
+ template<class T, class = void>
+ struct has_insertion_operator {
+ static constexpr bool value = false;
+ };
+
+ template<class T>
+ struct has_insertion_operator<T, decltype(val<A::foo&>() << val<T>(), void())> {
+ static constexpr bool value = true;
+ };
+}
+
+static_assert(!C::has_insertion_operator<B::bar>::value, "");
diff --git a/gcc/testsuite/g++.dg/template/partial20.C b/gcc/testsuite/g++.dg/template/partial20.C
new file mode 100644
index 0000000..b29e099
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/partial20.C
@@ -0,0 +1,7 @@
+// PR c++/104291
+// { dg-do compile { target c++20 } }
+
+struct A { int x; };
+
+template<auto> struct B;
+template<int N> struct B<A{N}> { }; // { dg-error "not deducible" }
diff --git a/gcc/testsuite/g++.dg/template/redecl4.C b/gcc/testsuite/g++.dg/template/redecl4.C
index 5638bde..c9282cd 100644
--- a/gcc/testsuite/g++.dg/template/redecl4.C
+++ b/gcc/testsuite/g++.dg/template/redecl4.C
@@ -2,4 +2,4 @@
// { dg-do compile }
template<int> union A; // { dg-message "previous" }
-struct A; // { dg-error "non-template" }
+struct A; // { dg-error "redeclared as non-template" }
diff --git a/gcc/testsuite/g++.dg/template/sfinae32.C b/gcc/testsuite/g++.dg/template/sfinae32.C
new file mode 100644
index 0000000..ae1dada
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/sfinae32.C
@@ -0,0 +1,24 @@
+// PR c++/103700
+// { dg-do compile { target c++11 } }
+
+template<class T, int N> auto f(T* p) -> decltype(p + N);
+template<class T, int N> auto f(T* p) -> decltype(p - N);
+template<class T, int N> auto f(T* p) -> decltype(N + p);
+template<class T, int N> void f(T* p);
+
+template<class T> auto g(T* p, int n) -> decltype(p + n);
+template<class T> auto g(T* p, int n) -> decltype(p - n);
+template<class T> auto g(T* p, int n) -> decltype(n + p);
+template<class T> void g(T* p, int n);
+
+struct Incomplete;
+
+int main() {
+ f<Incomplete, 0>(nullptr);
+ f<Incomplete, 1>(nullptr);
+ f<Incomplete, -1>(nullptr);
+ f<Incomplete, 7>(nullptr);
+ f<Incomplete, -7>(nullptr);
+
+ g<Incomplete>(nullptr, 0);
+}
diff --git a/gcc/testsuite/g++.dg/template/sfinae32a.C b/gcc/testsuite/g++.dg/template/sfinae32a.C
new file mode 100644
index 0000000..e9dbe88
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/sfinae32a.C
@@ -0,0 +1,24 @@
+// PR c++/101239
+// { dg-do compile { target c++11 } }
+
+template<class T, int N> auto f(T* p) -> decltype(p[N]);
+template<class T, int N> auto f(T* p) -> decltype(p[-N]);
+template<class T, int N> auto f(T* p) -> decltype(N[p]);
+template<class T, int N> void f(T* p);
+
+template<class T> auto g(T* p, int n) -> decltype(p[n]);
+template<class T> auto g(T* p, int n) -> decltype(p[-n]);
+template<class T> auto g(T* p, int n) -> decltype(n[p]);
+template<class T> void g(T* p, int n);
+
+struct Incomplete;
+
+int main() {
+ f<Incomplete, 0>(nullptr);
+ f<Incomplete, 1>(nullptr);
+ f<Incomplete, -1>(nullptr);
+ f<Incomplete, 7>(nullptr);
+ f<Incomplete, -7>(nullptr);
+
+ g<Incomplete>(nullptr, 0);
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local11.C b/gcc/testsuite/g++.dg/tls/thread_local11.C
index 273ee03..7e83a45 100644
--- a/gcc/testsuite/g++.dg/tls/thread_local11.C
+++ b/gcc/testsuite/g++.dg/tls/thread_local11.C
@@ -2,7 +2,7 @@
// { dg-do compile { target c++11 } }
// { dg-add-options tls }
// { dg-require-effective-target tls_runtime }
-// { dg-additional-options "-fdump-tree-gimple" }
+// { dg-additional-options "-fdump-tree-gimple -fno-implicit-constexpr" }
// { dg-final { scan-tree-dump-times "_ZTW2s1" 2 "gimple" } }
// { dg-final { scan-tree-dump-times "_ZTW2s2" 2 "gimple" } }
// { dg-final { scan-tree-dump-times "_ZTW2s3" 2 "gimple" } }
diff --git a/gcc/testsuite/g++.dg/tls/thread_local11a.C b/gcc/testsuite/g++.dg/tls/thread_local11a.C
index d8c4a6d..a628398 100644
--- a/gcc/testsuite/g++.dg/tls/thread_local11a.C
+++ b/gcc/testsuite/g++.dg/tls/thread_local11a.C
@@ -3,7 +3,7 @@
// { dg-add-options tls }
// { dg-require-alias "" }
// { dg-require-effective-target tls_runtime }
-// { dg-additional-options "-fdump-tree-gimple" }
+// { dg-additional-options "-fdump-tree-gimple -fno-implicit-constexpr" }
// { dg-final { scan-tree-dump-times "_ZTH2s1" 1 "gimple" } }
// { dg-final { scan-tree-dump-times "_ZTH2s2" 1 "gimple" } }
// { dg-final { scan-tree-dump-times "_ZTH2s3" 1 "gimple" } }
diff --git a/gcc/testsuite/g++.dg/tls/tls.exp b/gcc/testsuite/g++.dg/tls/tls.exp
index d2be0fa..3f5abc4 100644
--- a/gcc/testsuite/g++.dg/tls/tls.exp
+++ b/gcc/testsuite/g++.dg/tls/tls.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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/asm-1.c b/gcc/testsuite/g++.dg/tm/asm-1.C
index 3c8ebd2..3c8ebd2 100644
--- a/gcc/testsuite/g++.dg/tm/asm-1.c
+++ b/gcc/testsuite/g++.dg/tm/asm-1.C
diff --git a/gcc/testsuite/g++.dg/tm/pr46653.C b/gcc/testsuite/g++.dg/tm/pr46653.C
index f8f3a1d..a4649eb 100644
--- a/gcc/testsuite/g++.dg/tm/pr46653.C
+++ b/gcc/testsuite/g++.dg/tm/pr46653.C
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-fgnu-tm -O" }
+// { dg-options "-fgnu-tm -O -fno-implicit-constexpr" }
class shared_count
{
diff --git a/gcc/testsuite/g++.dg/tm/tm.exp b/gcc/testsuite/g++.dg/tm/tm.exp
index 7b02f4f..e6878e8 100644
--- a/gcc/testsuite/g++.dg/tm/tm.exp
+++ b/gcc/testsuite/g++.dg/tm/tm.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/pr103040.C b/gcc/testsuite/g++.dg/torture/pr103040.C
new file mode 100644
index 0000000..d634895
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr103040.C
@@ -0,0 +1,37 @@
+// { dg-do run }
+// { dg-additional-options "-fno-early-inlining" }
+struct S101273
+{
+ int x;
+ S101273* impl;
+ S101273(int x)
+ {
+ this->x = x;
+ this->impl = this;
+ }
+ S101273(const S101273 &o)
+ {
+ this->x = o.x;
+ this->impl = this;
+ }
+ ~S101273() { }
+};
+
+S101273 makeS101273()
+{
+ return S101273(2);
+}
+
+S101273 nrvo101273()
+{
+ S101273 ret = makeS101273();
+ return ret;
+}
+
+int main()
+{
+ auto nrvo = nrvo101273();
+ if(&nrvo != nrvo.impl) __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr103073.C b/gcc/testsuite/g++.dg/torture/pr103073.C
new file mode 100644
index 0000000..02b1eee
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr103073.C
@@ -0,0 +1,8 @@
+// { dg-do compile }
+int a;
+void b(bool c[], char d[], bool g[][55][21]) {
+ for (signed e = 0; e < 11; e += 3)
+ for (unsigned f = c[0] + 1; f < d[0]; f += 3)
+ a = g[0][e][f + 2];
+}
+
diff --git a/gcc/testsuite/g++.dg/torture/pr103266.C b/gcc/testsuite/g++.dg/torture/pr103266.C
new file mode 100644
index 0000000..d5c13f5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr103266.C
@@ -0,0 +1,23 @@
+// { dg-do run }
+/* { dg-additional-options "-std=c++14" } */
+ typedef unsigned int u32;
+ typedef unsigned char u8;
+
+ static u32 pu8to32(const u8 * p8) __attribute__((noinline));
+ static u32 pu8to32(const u8 * p8) {
+ u32 v;
+
+ __builtin_memcpy(&v, __builtin_assume_aligned(p8, 1), sizeof(u32));
+
+ return v;
+ }
+
+ int main(void) {
+ // dse1 throws this store away
+ u8 d[sizeof(u32)] = {
+ 0x07, 0x00, 0x00, 0x07,
+ };
+
+ if (pu8to32(d) != 0x07000007)
+ __builtin_trap();
+ }
diff --git a/gcc/testsuite/g++.dg/torture/pr103351.C b/gcc/testsuite/g++.dg/torture/pr103351.C
new file mode 100644
index 0000000..d0bf721
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr103351.C
@@ -0,0 +1,88 @@
+// { dg-do compile }
+// { dg-additional-options "-fcompare-debug" }
+
+template <int> struct __conditional;
+template <bool _Cond, typename, typename>
+using __conditional_t = typename __conditional<_Cond>::type;
+template <typename> struct __is_void_helper {};
+template <typename _Tp> _Tp *__addressof(_Tp &__r) {
+ return __builtin_addressof(__r);
+}
+template <typename _Tp> _Tp *addressof(_Tp &__r) { return __addressof(__r); }
+template <typename _Tp>
+using __make_not_void = __conditional_t<_Tp ::value, int, _Tp>;
+template <typename> struct pointer_traits;
+template <typename _Tp> struct pointer_traits<_Tp *> {
+ typedef _Tp *pointer;
+ typedef _Tp element_type;
+ static pointer pointer_to(element_type &__r) { return addressof(__r); }
+};
+namespace {
+template <typename> struct new_allocator;
+}
+template <typename> struct allocator_traits;
+template <typename> struct allocator;
+template <typename _Tp> struct allocator_traits<allocator<_Tp>> {
+ using pointer = _Tp *;
+ using const_pointer = _Tp *;
+};
+namespace __gnu_cxx {
+template <typename = char>
+struct __alloc_traits : allocator_traits<allocator<char>> {};
+} // namespace __gnu_cxx
+template <class> struct char_traits;
+template <typename _CharT, typename = _CharT>
+class Trans_NS___cxx11_basic_string;
+template <> struct char_traits<char> {
+ typedef char char_type;
+ static void assign(char_type, char_type);
+};
+template <typename, typename> struct Trans_NS___cxx11_basic_string {
+ typedef __gnu_cxx::__alloc_traits<> _Alloc_traits;
+ typedef char_traits<char> traits_type;
+ typedef _Alloc_traits::pointer pointer;
+ typedef _Alloc_traits::const_pointer const_pointer;
+ struct {
+ pointer _M_p;
+ } _M_dataplus;
+ char _M_local_buf[];
+ void _M_data(pointer __p) { _M_dataplus._M_p = __p; }
+ bool _M_is_local() {
+ const_pointer __trans_tmp_5 =
+ pointer_traits<const_pointer>::pointer_to(*_M_local_buf);
+ return _M_dataplus._M_p == __trans_tmp_5;
+ }
+ void operator=(Trans_NS___cxx11_basic_string __str) {
+ bool __trans_tmp_2;
+ if (__str._M_is_local()) {
+ Trans_NS___cxx11_basic_string *__trans_tmp_1;
+ if (__builtin_expect(__trans_tmp_1 != this, true))
+ size();
+ } else if (__trans_tmp_2)
+ __str._M_data(__str._M_local_buf);
+ __str.clear();
+ }
+ void size();
+ void clear() { traits_type::assign(_M_dataplus._M_p[0], char()); }
+};
+template <class, typename, int> struct Pool {
+ template <class T> struct PoolIterator {
+ bool operator!=(PoolIterator);
+ T *operator*();
+ void operator++();
+ };
+ template <class T> struct IterateWrapper {
+ PoolIterator<T> begin();
+ PoolIterator<T> end();
+ };
+};
+struct BaseConsist {
+ Trans_NS___cxx11_basic_string<char> name;
+};
+struct Vehicle : BaseConsist {};
+Pool<int, int, true>::IterateWrapper<Vehicle> __trans_tmp_4;
+Trans_NS___cxx11_basic_string<char> __trans_tmp_6;
+void FixOldVehicles() {
+ for (Vehicle *v : __trans_tmp_4)
+ v->name = __trans_tmp_6;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr103361.C b/gcc/testsuite/g++.dg/torture/pr103361.C
new file mode 100644
index 0000000..ec1d6e1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr103361.C
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-floop-unroll-and-jam" } */
+
+char a, b;
+extern unsigned short c[];
+extern bool d[];
+const unsigned short &e(const unsigned short &f, const unsigned short &g) {
+ if (g < f)
+ return g;
+ return f;
+}
+void k() {
+ for (int h = 0; b; h += 3)
+ for (unsigned long i = 0; i < 11104842004558084287ULL;
+ i += -11104842004558084300ULL)
+ for (bool j(e(6, e(6, c[h + i]))); j < (bool)a; j = 7)
+ d[7] = 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr103669.C b/gcc/testsuite/g++.dg/torture/pr103669.C
new file mode 100644
index 0000000..a9509c3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr103669.C
@@ -0,0 +1,22 @@
+// { dg-do run }
+/* { dg-additional-options "--param=modref-max-depth=1" } */
+#include <list>
+
+typedef std::list<void *> PtrList;
+
+void
+SlList (PtrList *l)
+{
+ PtrList temp = *l;
+ PtrList::iterator iter;
+ for (iter = temp.begin (); iter != temp.end (); ++iter)
+ __builtin_abort ();
+}
+
+int
+main (void)
+{
+ PtrList list;
+ SlList (&list);
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr104450.C b/gcc/testsuite/g++.dg/torture/pr104450.C
new file mode 100644
index 0000000..402a484
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr104450.C
@@ -0,0 +1,16 @@
+// { dg-do compile }
+// { dg-additional-options "-fnon-call-exceptions" }
+// { dg-additional-options "-mavx512f" { target x86_64-*-* i?86-*-* } }
+
+#define vectsize 64
+typedef int __attribute__((__vector_size__ (vectsize))) V;
+typedef float __attribute__((__vector_size__ (vectsize))) F;
+F f;
+V v;
+struct g{~g();};
+void
+foo (void)
+{
+ g t;
+ v += (V) (0 <= f);
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr57993-2.C b/gcc/testsuite/g++.dg/torture/pr57993-2.C
new file mode 100644
index 0000000..529b5a9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr57993-2.C
@@ -0,0 +1,215 @@
+/* This ICEd due to an incomplete fix for PR57993. */
+/* { dg-do compile } */
+/* { dg-additional-options "-Wno-return-type" } */
+
+
+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) { return 0; }
+ 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) { return 0; }
+ 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/g++.dg/torture/pr71792.C b/gcc/testsuite/g++.dg/torture/pr71792.C
new file mode 100644
index 0000000..607774d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr71792.C
@@ -0,0 +1,42 @@
+// { dg-do run { target c++11 } }
+// PR C++/71792
+
+class some_class
+{
+public:
+ unsigned int np : 4;
+ unsigned int nc : 8;
+ unsigned int nc0 : 1;
+};
+
+template<bool what>
+static void test_bug (const some_class &mp) {
+ if (what) {
+ int t = 0;
+ for (auto i = mp.nc0; i < mp.nc; i++) {
+ if (t != i) __builtin_abort ();
+ t++;
+ }
+ }
+}
+
+static void test_ok (const some_class &mp) {
+ int t = 0;
+ for (auto i = mp.nc0; i < mp.nc; i++) {
+ if (t != i) __builtin_abort ();
+ t++;
+ }
+}
+
+int main ()
+{
+ some_class mp;
+ mp.nc0 = 0;
+ mp.nc = 9;
+ mp.np = 3;
+
+ test_bug<true> (mp);
+ test_ok (mp);
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp b/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp
index 1efb4c2..3212841 100644
--- a/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp
+++ b/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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-prof/indir-call-recursive-inlining.C b/gcc/testsuite/g++.dg/tree-prof/indir-call-recursive-inlining.C
new file mode 100644
index 0000000..11f6900
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-prof/indir-call-recursive-inlining.C
@@ -0,0 +1,54 @@
+/* { dg-options "-O2 " } */
+
+class Parent
+{
+public:
+ Parent *object;
+
+ Parent()
+ {
+ object = this;
+ }
+
+ virtual void recurse (int t) = 0;
+};
+
+class Child : public Parent
+{
+
+ Parent *
+ get_object ()
+ {
+ return this;
+ }
+
+public:
+ virtual void
+ recurse (int t)
+ {
+ if (t != 10)
+ for (int i = 0; i < 5; ++i)
+ get_object()->recurse(t + 1);
+ };
+};
+
+Parent *
+create_object ()
+{
+ Child *mod = new Child;
+ return mod;
+}
+
+int
+main (int argc, char **argv)
+{
+ Parent *parent = create_object ();
+
+ for (int i = 0; i < 5; ++i)
+ {
+ parent->recurse (0);
+ }
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp b/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp
index 6b716ef..8079f74 100644
--- a/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp
+++ b/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2022 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/aggregate1.C b/gcc/testsuite/g++.dg/tree-ssa/aggregate1.C
new file mode 100644
index 0000000..3f30a73
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/aggregate1.C
@@ -0,0 +1,19 @@
+// Test that we don't bother building a cleanup for the last aggregate element.
+// { dg-additional-options -fdump-tree-gimple }
+// { dg-final { scan-tree-dump-not {A::~A \(&b\.a} "gimple" } }
+
+struct A
+{
+ A(int);
+ ~A();
+};
+
+struct B
+{
+ A a;
+};
+
+int main()
+{
+ B b = { 1 };
+}
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr102216-1.C b/gcc/testsuite/g++.dg/tree-ssa/pr102216-1.C
new file mode 100644
index 0000000..21f7f67
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr102216-1.C
@@ -0,0 +1,21 @@
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+void link_error ();
+void g ()
+{
+ const char **language_names;
+
+ language_names = new const char *[6];
+
+ const char **language_names_p = language_names;
+
+ language_names_p++;
+ language_names_p++;
+ language_names_p++;
+
+ if ( (language_names_p) - (language_names+3) != 0)
+ link_error();
+ delete[] language_names;
+}
+/* We should have removed the link_error on the gimple level as GCC should
+ be able to tell that language_names_p is the same as language_names+3. */
+/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" } } */
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr102216-2.C b/gcc/testsuite/g++.dg/tree-ssa/pr102216-2.C
new file mode 100644
index 0000000..8d351a9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr102216-2.C
@@ -0,0 +1,45 @@
+/* { dg-options "-O2 -Wall" } */
+#include <algorithm>
+
+static inline bool
+compare_cstrings (const char *str1, const char *str2)
+{
+ return str1 < str2;
+}
+
+void
+add_set_language_command ()
+{
+ static const char **language_names;
+
+ language_names = new const char *[6];
+
+ language_names[0] = "auto";
+ language_names[1] = "local";
+ language_names[2] = "unknown";
+
+ const char **language_names_p = language_names;
+ /* language_names_p == &language_names[0]. */
+ language_names_p++;
+ /* language_names_p == &language_names[1]. */
+ language_names_p++;
+ /* language_names_p == &language_names[2]. */
+ language_names_p++;
+ /* language_names_p == &language_names[3]. */
+
+ const char **sort_begin;
+
+ if (0)
+ sort_begin = &language_names[3];
+ else
+ sort_begin = language_names_p;
+
+ language_names[3] = "";
+ language_names[4] = "";
+ language_names[5] = NULL;
+
+ /* There should be no warning associated with this std::sort as
+ sort_begin != &language_names[5] and GCC should be able to figure
+ that out. */
+ std::sort (sort_begin, &language_names[5], compare_cstrings);
+}
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr103168.C b/gcc/testsuite/g++.dg/tree-ssa/pr103168.C
new file mode 100644
index 0000000..82924a3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr103168.C
@@ -0,0 +1,24 @@
+// { dg-do compile }
+// { dg-options "-O2 -fdump-tree-fre1-details" }
+
+struct a
+{
+ int a;
+ static __attribute__ ((noinline))
+ int ret (int v) {return v;}
+
+ __attribute__ ((noinline))
+ int inca () {return a++;}
+};
+
+int
+test()
+{
+ struct a av;
+ av.a=1;
+ int val = av.ret (0) + av.inca();
+ av.a=2;
+ return val + av.ret(0) + av.inca();
+}
+
+/* { dg-final { scan-tree-dump-times "Replaced a::ret" 1 "fre1" } } */
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C b/gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C
index 9fb5dc1..fc26857 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -fcheck-new -fno-tree-vrp -fdump-tree-forwprop1" } */
+/* { dg-options "-O -fcheck-new -fno-tree-vrp -fdump-tree-forwprop1 -fno-thread-jumps" } */
#include <new>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/stabilize1.C b/gcc/testsuite/g++.dg/tree-ssa/stabilize1.C
deleted file mode 100644
index 5eb0bf8..0000000
--- a/gcc/testsuite/g++.dg/tree-ssa/stabilize1.C
+++ /dev/null
@@ -1,13 +0,0 @@
-// PR c++/53356
-// { dg-options "-fdump-tree-gimple" }
-// { dg-final { scan-tree-dump-not "= 0" "gimple" } }
-
-class A {};
-
-struct B {
- operator const A &() const;
-};
-
-A* cause_ICE() {
- return new A(B());
-}
diff --git a/gcc/testsuite/g++.dg/tsan/tsan.exp b/gcc/testsuite/g++.dg/tsan/tsan.exp
index 7befe8d..9a66c97 100644
--- a/gcc/testsuite/g++.dg/tsan/tsan.exp
+++ b/gcc/testsuite/g++.dg/tsan/tsan.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.dg/ubsan/pr70035.C b/gcc/testsuite/g++.dg/ubsan/pr70035.C
index a1d3dc2..521dcb8 100644
--- a/gcc/testsuite/g++.dg/ubsan/pr70035.C
+++ b/gcc/testsuite/g++.dg/ubsan/pr70035.C
@@ -1,7 +1,7 @@
// PR c++/70035
// { dg-do run }
// { dg-shouldfail "ubsan" }
-// { dg-options "-fsanitize=vptr -fno-sanitize-recover=undefined" }
+// { dg-options "-fsanitize=vptr -fno-sanitize-recover=undefined -fno-implicit-constexpr" }
struct A {
A (int) {}
diff --git a/gcc/testsuite/g++.dg/ubsan/ubsan.exp b/gcc/testsuite/g++.dg/ubsan/ubsan.exp
index 9f485db..e9e2e03 100644
--- a/gcc/testsuite/g++.dg/ubsan/ubsan.exp
+++ b/gcc/testsuite/g++.dg/ubsan/ubsan.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.dg/uninit-pred-loop-1_a.cc b/gcc/testsuite/g++.dg/uninit-pred-loop-1_a.C
index 835cdba..835cdba 100644
--- a/gcc/testsuite/g++.dg/uninit-pred-loop-1_a.cc
+++ b/gcc/testsuite/g++.dg/uninit-pred-loop-1_a.C
diff --git a/gcc/testsuite/g++.dg/uninit-pred-loop-1_b.C b/gcc/testsuite/g++.dg/uninit-pred-loop-1_b.C
new file mode 100644
index 0000000..b17b936
--- /dev/null
+++ b/gcc/testsuite/g++.dg/uninit-pred-loop-1_b.C
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-Wuninitialized -O2" } */
+
+extern int bar();
+int foo(int n)
+{
+ for (;;) {
+ int err = ({int _err;
+ for (int i = 0; i < n; ++i) {
+ _err = 17;
+ _err = bar();
+ }
+ _err;
+ });
+
+ if (err == 0) return 17;
+ }
+
+ return 18;
+}
+
diff --git a/gcc/testsuite/g++.dg/uninit-pred-loop-1_b.cc b/gcc/testsuite/g++.dg/uninit-pred-loop-1_b.cc
deleted file mode 100644
index e4ef3d2..0000000
--- a/gcc/testsuite/g++.dg/uninit-pred-loop-1_b.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-Wuninitialized -O2" } */
-
-extern int bar();
-int foo(int n)
-{
- for (;;) {
- int err = ({int _err;
- for (int i = 0; i < n; ++i) {
- _err = 17;
- _err = bar();
- }
- _err;
- }); /* { dg-warning "uninitialized" "warn on _err" } */
-
- if (err == 0) return 17;
- }
-
- return 18;
-}
-
diff --git a/gcc/testsuite/g++.dg/uninit-pred-loop-1_c.C b/gcc/testsuite/g++.dg/uninit-pred-loop-1_c.C
new file mode 100644
index 0000000..711812a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/uninit-pred-loop-1_c.C
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-Wuninitialized -O2 -std=c++98" } */
+
+extern int bar();
+int foo(int n, int m)
+{
+ for (;;) {
+ int err = ({int _err;
+ for (int i = 0; i < 16; ++i) {
+ if (m+i > n)
+ break;
+ _err = 17;
+ _err = bar();
+ }
+ _err;
+ });
+
+ if (err == 0) return 17;
+ }
+
+ return 18;
+}
+
diff --git a/gcc/testsuite/g++.dg/uninit-pred-loop-1_c.cc b/gcc/testsuite/g++.dg/uninit-pred-loop-1_c.cc
deleted file mode 100644
index 7f6b41d..0000000
--- a/gcc/testsuite/g++.dg/uninit-pred-loop-1_c.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-Wuninitialized -O2" } */
-
-extern int bar();
-int foo(int n, int m)
-{
- for (;;) {
- int err = ({int _err;
- for (int i = 0; i < 16; ++i) {
- if (m+i > n)
- break;
- _err = 17;
- _err = bar();
- }
- _err;
- });
-
- if (err == 0) return 17; }); /* { dg-warning "uninitialized" "warn on _err" } */
- }
-
- return 18;
-}
-
diff --git a/gcc/testsuite/g++.dg/uninit-pred-loop_1.cc b/gcc/testsuite/g++.dg/uninit-pred-loop_1.C
index 835cdba..835cdba 100644
--- a/gcc/testsuite/g++.dg/uninit-pred-loop_1.cc
+++ b/gcc/testsuite/g++.dg/uninit-pred-loop_1.C
diff --git a/gcc/testsuite/g++.dg/vect/pr103494.cc b/gcc/testsuite/g++.dg/vect/pr103494.cc
new file mode 100644
index 0000000..c0b0781
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr103494.cc
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+
+void glFinish();
+struct _Vector_base {
+ struct {
+ unsigned _M_start;
+ } _M_impl;
+};
+class vector : _Vector_base {
+public:
+ vector(long) {}
+ unsigned *data() { return &_M_impl._M_start; }
+};
+void *PutBitsIndexedImpl_color_table;
+int PutBitsIndexedImpl_dstRectHeight;
+char *PutBitsIndexedImpl_src_ptr;
+void PutBitsIndexedImpl() {
+ vector unpacked_buf(PutBitsIndexedImpl_dstRectHeight);
+ unsigned *dst_ptr = unpacked_buf.data();
+ for (int x; x; x++) {
+ char i = *PutBitsIndexedImpl_src_ptr++;
+ dst_ptr[x] = static_cast<int *>(PutBitsIndexedImpl_color_table)[i];
+ }
+ glFinish();
+}
diff --git a/gcc/testsuite/g++.dg/vect/pr71483.c b/gcc/testsuite/g++.dg/vect/pr71483.cc
index 77f879c..77f879c 100644
--- a/gcc/testsuite/g++.dg/vect/pr71483.c
+++ b/gcc/testsuite/g++.dg/vect/pr71483.cc
diff --git a/gcc/testsuite/g++.dg/vect/pr99149.cc b/gcc/testsuite/g++.dg/vect/pr99149.cc
index 9d58426..bb9f5fa 100755..100644
--- a/gcc/testsuite/g++.dg/vect/pr99149.cc
+++ b/gcc/testsuite/g++.dg/vect/pr99149.cc
@@ -24,5 +24,4 @@ public:
} n;
main() { n.j(); }
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_MUL" 1 "slp2" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_FMA" 1 "slp2" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_MUL" 1 "slp2" { xfail { vect_float } } } } */
diff --git a/gcc/testsuite/g++.dg/vect/pr99220.cc b/gcc/testsuite/g++.dg/vect/pr99220.cc
index b41b2d4..b41b2d4 100755..100644
--- a/gcc/testsuite/g++.dg/vect/pr99220.cc
+++ b/gcc/testsuite/g++.dg/vect/pr99220.cc
diff --git a/gcc/testsuite/g++.dg/vect/slp-pr98855.cc b/gcc/testsuite/g++.dg/vect/slp-pr98855.cc
index b101032..e0527c4 100644
--- a/gcc/testsuite/g++.dg/vect/slp-pr98855.cc
+++ b/gcc/testsuite/g++.dg/vect/slp-pr98855.cc
@@ -1,6 +1,5 @@
-// { dg-do compile }
-// { dg-additional-options "-fvect-cost-model=cheap" }
-// { dg-additional-options "-mavx2" { target x86_64-*-* i?86-*-* } }
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-additional-options "-fvect-cost-model=cheap -mavx2" }
#include <stdint.h>
#include <stdlib.h>
@@ -81,6 +80,5 @@ void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks, uint32_t *EK)
}
}
-// This used to work on { target x86_64-*-* i?86-*-* } but a fix in SLP
-// discovery makes us trip over the threshold again.
-// { dg-final { scan-tree-dump-times "not vectorized: vectorization is not profitable" 2 "slp1" { xfail *-*-* } } }
+// { dg-final { scan-tree-dump "not vectorized: vectorization is not profitable" "slp1" } }
+// { dg-final { scan-tree-dump-not "vectorizing stmts using SLP" "slp1" } }
diff --git a/gcc/testsuite/g++.dg/vect/vect.exp b/gcc/testsuite/g++.dg/vect/vect.exp
index 0480955..1ccfd59 100644
--- a/gcc/testsuite/g++.dg/vect/vect.exp
+++ b/gcc/testsuite/g++.dg/vect/vect.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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/Waddress-5.C b/gcc/testsuite/g++.dg/warn/Waddress-5.C
index b1ad38a..b1287b2 100644
--- a/gcc/testsuite/g++.dg/warn/Waddress-5.C
+++ b/gcc/testsuite/g++.dg/warn/Waddress-5.C
@@ -12,7 +12,7 @@ struct A
virtual void vf ();
virtual void pvf () = 0;
- void sf ();
+ static void sf ();
int *p;
int a[2];
diff --git a/gcc/testsuite/g++.dg/warn/Waddress-7.C b/gcc/testsuite/g++.dg/warn/Waddress-7.C
new file mode 100644
index 0000000..efdafa5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Waddress-7.C
@@ -0,0 +1,76 @@
+/* PR c/33925 - missing -Waddress with the address of an inline function
+ { dg-do compile }
+ { dg-options "-Wall" } */
+
+struct A
+{
+ int mf ();
+ int mf_def () { return 0; }
+
+ static int smf ();
+ static int smf_def () { return 0; }
+
+ int mi;
+ static int smi;
+ static int smi_def;
+
+ __attribute__ ((weak)) static int wsmi;
+ __attribute__ ((weak)) static int wsmi_def;
+
+ int mia[];
+ static int smia[];
+ static int smia_def[];
+
+ __attribute__ ((weak)) static int wsmia[];
+ __attribute__ ((weak)) static int wsmia_def[];
+
+ void test_waddress (bool*);
+};
+
+
+/* __attribute__ ((weak)) static */ int A::smi_def = 0;
+/* __attribute__ ((weak)) static */ int A::smia_def[] = { 0 };
+
+/* __attribute__ ((weak)) static */ int A::wsmi_def = 0;
+/* __attribute__ ((weak)) static */ int A::wsmia_def[] = { 0 };
+
+
+
+void A::test_waddress (bool *p)
+{
+ if (mf) // { dg-error "cannot convert" }
+ p++;
+ if (mf_def) // { dg-error "cannot convert" }
+ p++;
+
+ if (smf) // { dg-warning "-Waddress" }
+ p++;
+ if (smf_def) // { dg-warning "-Waddress" }
+ p++;
+
+ if (&mi) // { dg-warning "-Waddress" }
+ p++;
+ if (&smi) // { dg-warning "-Waddress" }
+ p++;
+ if (&smi_def) // { dg-warning "-Waddress" }
+ p++;
+
+ if (&wsmi)
+ p++;
+
+ if (&wsmi_def) // { dg-warning "-Waddress" }
+ p++;
+
+ if (mia) // { dg-warning "-Waddress" }
+ p++;
+ if (smia) // { dg-warning "-Waddress" }
+ p++;
+ if (smia_def) // { dg-warning "-Waddress" }
+ p++;
+
+ if (wsmia)
+ p++;
+
+ if (wsmia_def) // { dg-warning "-Waddress" }
+ p++;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Waddress-8.C b/gcc/testsuite/g++.dg/warn/Waddress-8.C
new file mode 100644
index 0000000..797102d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Waddress-8.C
@@ -0,0 +1,85 @@
+/* PR c++/96507 - missing -Waddress for member references
+ { dg-do compile }
+ { dg-options "-Wall" } */
+
+typedef void F ();
+
+extern F &efr;
+extern int &eir;
+
+bool warn_ext_rfun ()
+{
+ return &efr != 0; // { dg-warning "-Waddress" }
+}
+
+bool warn_ext_rvar ()
+{
+ return &eir != 0; // { dg-warning "-Waddress" }
+}
+
+
+bool warn_parm_rfun (F &rf)
+{
+ return &rf != 0; // { dg-warning "-Waddress" }
+}
+
+bool warn_parm_rvar (int &ir)
+{
+ return &ir != 0; // { dg-warning "-Waddress" }
+}
+
+// Comparing the address of a reference argument to null also triggers
+// a -Wnonnull-compare (that seems like a bug, hence PR 103363).
+// { dg-prune-output "-Wnonnull-compare" }
+
+
+struct S
+{
+ F &fr;
+ int &ir;
+};
+
+extern S es, esa[];
+
+bool warn_ext_mem_rfun ()
+{
+ return &es.fr != 0; // { dg-warning "-Waddress" }
+}
+
+bool warn_ext_mem_rvar ()
+{
+ return &es.ir != 0; // { dg-warning "-Waddress" }
+}
+
+
+bool warn_ext_arr_mem_rfun (int i)
+{
+ return &esa[i].fr != 0; // { dg-warning "-Waddress" }
+}
+
+bool warn_ext_arr_mem_rvar (int i)
+{
+ return &esa[i].ir != 0; // { dg-warning "-Waddress" }
+}
+
+
+bool warn_parm_mem_rfun (S &s)
+{
+ return &s.fr != 0; // { dg-warning "-Waddress" }
+}
+
+bool warn_parm_mem_rvar (S &s)
+{
+ return &s.ir != 0; // { dg-warning "-Waddress" }
+}
+
+
+bool warn_parm_arr_mem_rfun (S sa[], int i)
+{
+ return &sa[i].fr != 0; // { dg-warning "-Waddress" }
+}
+
+bool warn_parm_arr_mem_rvar (S sa[], int i)
+{
+ return &sa[i].ir != 0; // { dg-warning "-Waddress" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Walways-true-2.C b/gcc/testsuite/g++.dg/warn/Walways-true-2.C
index 29a80e5..e951e95 100644
--- a/gcc/testsuite/g++.dg/warn/Walways-true-2.C
+++ b/gcc/testsuite/g++.dg/warn/Walways-true-2.C
@@ -9,7 +9,7 @@
extern int foo (int) __attribute__ ((weak));
-int i __attribute__ ((weak));
+extern int i __attribute__ ((weak));
void
bar (int a)
diff --git a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
index 17b4d0d..89cbadb 100644
--- a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
+++ b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
@@ -19,11 +19,11 @@ struct S
p = (int*) new unsigned char [sizeof (int) * m];
for (int i = 0; i < m; i++)
- new (p + i) int ();
+ new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail *-*-* } } */
}
};
S a (0);
-/* Verify the loop has been eliminated.
- { dg-final { scan-tree-dump-not "goto" "optimized" } } */
+/* The loop cannot be eliminated since the global 'new' can change 'm'. */
+/* { dg-final { scan-tree-dump-not "goto" "optimized" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/g++.dg/warn/Wdangling-pointer-2.C b/gcc/testsuite/g++.dg/warn/Wdangling-pointer-2.C
new file mode 100644
index 0000000..151418f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wdangling-pointer-2.C
@@ -0,0 +1,23 @@
+/* { dg-do compile }
+ { dg-options "-O1 -Wall -Wno-class-memaccess" } */
+
+struct A { A (); };
+
+const A& return_arg (const A &a)
+{
+ return a;
+}
+
+void sink (const void*);
+
+void nowarn_ref (int i)
+{
+ const A &a = return_arg (A ()); // { dg-note "unnamed temporary" }
+ sink (&a); // { dg-warning "-Wdangling-pointer" }
+}
+
+void warn_dangling_ref (int i)
+{
+ const A &a = return_arg (A ()); // { dg-note "unnamed temporary" }
+ sink (&a); // { dg-warning "-Wdangling-pointer" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wdangling-pointer-3.C b/gcc/testsuite/g++.dg/warn/Wdangling-pointer-3.C
new file mode 100644
index 0000000..64117bf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wdangling-pointer-3.C
@@ -0,0 +1,39 @@
+/* PR middle-end/104076 - bogus -Wdangling-pointer on a conditional expression
+ { dg-do compile { target { c++11 } } }
+ { dg-options "-Wall" } */
+
+namespace std {
+
+template <class T>
+struct initializer_list
+{
+ T *array;
+ __SIZE_TYPE__ nelts;
+
+ initializer_list (const T *a, __SIZE_TYPE__ n)
+ : array (a), nelts (n) { }
+
+ initializer_list()
+ : array (), nelts () { }
+
+ T* begin () const { return array; }
+
+ const T* end () const { return array + nelts; }
+};
+
+}
+
+struct S1
+{
+ S1 (int);
+ ~S1 ();
+};
+
+struct S2 { S2 (std::initializer_list<S1>); };
+
+S2 f1();
+
+S2 f2(bool b)
+{
+ return b ? f1() : S2{0}; // { dg-bogus "-Wdangling-pointer" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wdangling-pointer.C b/gcc/testsuite/g++.dg/warn/Wdangling-pointer.C
new file mode 100644
index 0000000..22c559e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wdangling-pointer.C
@@ -0,0 +1,74 @@
+/* Exercise basic C++-only cases of -Wdangling-pointer.
+ { dg-do compile }
+ { dg-options "-Wall -Wno-class-memaccess" } */
+
+extern "C" void* memset (void*, int, __SIZE_TYPE__);
+
+void sink (const void*, ...);
+
+struct S { S (); };
+
+void nowarn_int_ref (int i)
+{
+ const S &sref = S ();
+ const int &iref = 1 + i;
+ sink (&sref, &iref);
+}
+
+void warn_init_ref_member ()
+{
+ struct AS
+ {
+ const S &sref;
+ AS ():
+ // The temporary S object is destroyed when AS::AS() returns.
+ sref (S ()) // { dg-warning "storing the address" }
+ { }
+ } as;
+
+ struct Ai
+ {
+ const int &iref;
+ Ai ():
+ // The temporary int is destroyed when Ai::Ai() returns.
+ iref (1 + 1) // { dg-warning "storing the address" }
+ { }
+ } ai;
+
+ sink (&as, &ai);
+}
+
+
+void default_ref_arg (const S& = S ());
+
+void nowarn_call_default_ref_arg ()
+{
+ default_ref_arg ();
+}
+
+
+void nowarn_array_access ()
+{
+ /* Verify that the clobber in the exceptional basic block doesn't
+ cause bogus warnings. */
+ S a[1];
+ memset (a, 0, sizeof a);
+ sink (a);
+}
+
+
+void nowarn_array_access_cond (int i)
+{
+ if (i)
+ {
+ S a1[1];
+ memset (a1, 0, sizeof a1);
+ sink (a1);
+ }
+ else
+ {
+ S a2[2];
+ memset (a2, 0, sizeof a2);
+ sink (a2);
+ }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-6.C b/gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-6.C
index 83b6ff9..91a8778 100644
--- a/gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-6.C
+++ b/gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-6.C
@@ -1,5 +1,5 @@
/* { dg-do compile }
- { dg-options "-O0 -Wall" } */
+ { dg-options "-O0 -Wall -Wno-dangling-pointer -Wno-return-local-address" } */
#if __cplusplus < 201103L
# define noexcept throw ()
@@ -18,6 +18,8 @@ extern void *p;
void nowarn_placement_new ()
{
char a[sizeof (A)];
+ /* The store to the global p might trigger -Wdangling pointer or
+ -Wreturn-local-address (if/when it runs without optimization). */
p = new (a) A (); // { dg-bogus "-Wfree-nonheap-object" }
}
diff --git a/gcc/testsuite/g++.dg/warn/Wignored-qualifiers2.C b/gcc/testsuite/g++.dg/warn/Wignored-qualifiers2.C
new file mode 100644
index 0000000..c4c3754
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wignored-qualifiers2.C
@@ -0,0 +1,17 @@
+// PR c++/92752
+// { dg-do compile }
+// { dg-additional-options "-Wignored-qualifiers" }
+
+struct X;
+
+template<class T>
+struct Wrap {
+ T data;
+ Wrap() : data() {}
+};
+
+typedef int (X::*type)();
+Wrap<const type> x;
+#if __cpp_initializer_lists
+const type t{};
+#endif
diff --git a/gcc/testsuite/g++.dg/warn/Winfinite-recursion-2.C b/gcc/testsuite/g++.dg/warn/Winfinite-recursion-2.C
new file mode 100644
index 0000000..b310283
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Winfinite-recursion-2.C
@@ -0,0 +1,75 @@
+/* PR middle-end/88232 - Please implement -Winfinite-recursion
+ Test case from PR 87742 (see PR 88232, comment 2.
+ { dg-do compile { target c++11 } }
+ { dg-options "-Wall -Winfinite-recursion" } */
+
+namespace std
+{
+class type_info {
+public:
+ void k() const;
+};
+
+} // namespace std
+
+using std::type_info;
+
+template <int a> struct f { static constexpr int c = a; };
+struct h {
+ typedef int e;
+};
+
+template <unsigned long, typename...> struct m;
+template <unsigned long ab, typename i, typename j, typename... ac>
+struct m<ab, i, j, ac...> : m<ab + 1, i, ac...> {};
+template <unsigned long ab, typename j, typename... ac>
+struct m<ab, j, j, ac...> : f<ab> {};
+template <unsigned long, typename...> struct n;
+template <unsigned long ab, typename j, typename... ac>
+struct n<ab, j, ac...> : n<ab - 1, ac...> {};
+template <typename j, typename... ac> struct n<0, j, ac...> : h {};
+template <typename... l> class F {
+ template <typename i> struct I : m<0, i, l...> {};
+ template <int ab> struct s : n<ab, l...> {};
+ static const type_info *const b[];
+ struct G {
+ template <typename ag>
+ operator ag() const // { dg-warning "-Winfinite-recursion" }
+ {
+ return *this;
+ }
+ };
+ unsigned o;
+ G ah;
+
+public:
+ F();
+ long t() const { return o; }
+ const type_info &m_fn3() const { return *b[o]; }
+ template <int ab> typename s<ab>::e *m_fn4() const {
+ if (o != ab)
+ return nullptr;
+ return ah;
+ }
+ template <int ab> void m_fn5() const {
+ m_fn4<ab>();
+ const type_info &r = m_fn3();
+ r.k();
+ }
+ template <typename i> void u() const { m_fn5<I<i>::c>(); }
+};
+template <typename... l> const type_info *const F<l...>::b[] {&typeid(l)...};
+using am = unsigned char;
+class H {
+ enum bd : am { be = 2 };
+ using bf = F<int, int, H>;
+ bf ah;
+ template <typename bg> void v() const { ah.u<bg>(); }
+ void w() const;
+};
+void H::w() const {
+ bd d = bd(ah.t());
+ switch (d)
+ case be:
+ v<H>();
+}
diff --git a/gcc/testsuite/g++.dg/warn/Winfinite-recursion-3.C b/gcc/testsuite/g++.dg/warn/Winfinite-recursion-3.C
new file mode 100644
index 0000000..166e6d5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Winfinite-recursion-3.C
@@ -0,0 +1,77 @@
+/* PR middle-end/88232 - Please implement -Winfinite-recursion
+ { dg-do compile }
+ { dg-options "-Wall -Winfinite-recursion" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+/* Might throw. */
+void f ();
+
+/* Verify a warning is issued even though a call to f() might throw,
+ breaking the infinite recursion. */
+
+void warn_f_call_r (int n) // { dg-warning "-Winfinite-recursion" }
+{
+ if (n > 7)
+ f ();
+ warn_f_call_r (n - 1); // { dg-message "recursive call" }
+}
+
+void warn_f_do_while_call_r (int n) // { dg-warning "-Winfinite-recursion" }
+{
+ f ();
+ do
+ {
+ f ();
+ warn_f_do_while_call_r (n - 1); // { dg-message "recursive call" }
+ }
+ while (1);
+}
+
+
+struct X
+{
+ X (int);
+ ~X ();
+};
+
+/* Verify a warning even though the X ctor might throw, breaking
+ the recursion. Using possible throwing to suppress the warning
+ would make it pretty much useless in C++. */
+
+int warn_class_with_ctor (int n) // { dg-warning "-Winfinite-recursion" }
+{
+ X x (n);
+ return n + warn_class_with_ctor (n - 1);
+}
+
+
+int nowarn_throw (int n)
+{
+ if (n > 7)
+ throw "argument too big";
+
+ return n + nowarn_throw (n - 1);
+}
+
+
+/* Verify call operator new doesn't suppress the warning even though
+ it might throw. */
+
+extern int* eipa[];
+
+void warn_call_new (int i) // { dg-warning "-Winfinite-recursion" }
+{
+ eipa[i] = new int;
+
+ warn_call_new (i - 1);
+}
+
+/* Verify a recursive call to operator new. */
+
+void* operator new[] (size_t n) // { dg-warning "-Winfinite-recursion" }
+{
+ char *p = new char[n + sizeof (n)]; // { dg-message "recursive call" }
+ *(size_t*)p = n;
+ return p + sizeof n;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Winfinite-recursion.C b/gcc/testsuite/g++.dg/warn/Winfinite-recursion.C
new file mode 100644
index 0000000..faf0984
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Winfinite-recursion.C
@@ -0,0 +1,34 @@
+/* PR middle-end/88232 - Please implement -Winfinite-recursion
+ { dg-do compile }
+ { dg-options "-Wall -Winfinite-recursion" } */
+
+template <typename D>
+struct C
+{
+ void foo () // { dg-warning "-Winfinite-recursion" }
+ {
+ static_cast<D *>(this)->foo ();
+ }
+};
+
+struct D : C<D>
+{
+ // this is missing:
+ // void foo() {}
+};
+
+void f (D *d)
+{
+ d->foo ();
+}
+
+
+struct E : C<D>
+{
+ void foo() {}
+};
+
+void g (E *e)
+{
+ e->foo ();
+}
diff --git a/gcc/testsuite/g++.dg/warn/Winvalid-memory-model-2.C b/gcc/testsuite/g++.dg/warn/Winvalid-memory-model-2.C
new file mode 100644
index 0000000..a157061
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Winvalid-memory-model-2.C
@@ -0,0 +1,79 @@
+/* PR middle-end/99612 - Missing warning on incorrect memory order without
+ -Wsystem-headers
+ Verify warnings for atomic functions with optimization.
+ { dg-do compile { target c++11 } }
+ { dg-options "-O1" } */
+
+#include <atomic>
+
+static const std::memory_order relaxed = std::memory_order_relaxed;
+static const std::memory_order consume = std::memory_order_consume;
+static const std::memory_order acquire = std::memory_order_acquire;
+static const std::memory_order release = std::memory_order_release;
+static const std::memory_order acq_rel = std::memory_order_acq_rel;
+static const std::memory_order seq_cst = std::memory_order_seq_cst;
+
+extern std::atomic<int> eai;
+
+void test_load (int *pi)
+{
+ *pi++ = eai.load (relaxed);
+ *pi++ = eai.load (consume);
+ *pi++ = eai.load (acquire);
+ *pi++ = eai.load (release); // warning
+ *pi++ = eai.load (acq_rel); // warning
+ *pi++ = eai.load (seq_cst);
+}
+
+/* { dg-regexp " *inlined from \[^\n\r\]+.C:23:.*" "" { target *-*-* } 0 }
+ { dg-regexp " *inlined from \[^\n\r\]+.C:24:.*" "" { target *-*-* } 0 }
+ { dg-warning "__atomic_load\[^\n\r\]* \\\[-Winvalid-memory-model" "warning" { target *-*-* } 0 } */
+
+
+void test_store (int *pi)
+{
+ eai.store (*pi++, relaxed);
+ eai.store (*pi++, consume); // warning
+ eai.store (*pi++, acquire); // warning
+ eai.store (*pi++, release);
+ eai.store (*pi++, acq_rel); // warning
+ eai.store (*pi++, seq_cst);
+}
+
+/* { dg-regexp " *inlined from \[^\n\r\]+.C:36:.*" "" { target *-*-* } 0 }
+ { dg-regexp " *inlined from \[^\n\r\]+.C:37:.*" "" { target *-*-* } 0 }
+ { dg-regexp " *inlined from \[^\n\r\]+.C:39:.*" "" { target *-*-* } 0 }
+ { dg-warning "__atomic_store\[^\n\r]* \\\[-Winvalid-memory-model" "warning" { target *-*-* } 0 } */
+
+
+void test_exchange (const int *pi)
+{
+ eai.exchange (*pi++, relaxed);
+ eai.exchange (*pi++, consume);
+ eai.exchange (*pi++, acquire);
+ eai.exchange (*pi++, release);
+ eai.exchange (*pi++, acq_rel);
+ eai.exchange (*pi++, seq_cst);
+}
+
+
+void test_compare_exchange (int *pi, int *pj)
+{
+#define cmpxchg(x, y, z, o1, o2) \
+ std::atomic_compare_exchange_weak_explicit (x, y, z, o1, o2)
+
+ cmpxchg (&eai, pi++, *pj++, relaxed, relaxed);
+ cmpxchg (&eai, pi++, *pj++, relaxed, consume); // warning
+ cmpxchg (&eai, pi++, *pj++, relaxed, acquire); // warning
+ cmpxchg (&eai, pi++, *pj++, relaxed, release); // warning
+ cmpxchg (&eai, pi++, *pj++, relaxed, acq_rel); // warning
+ cmpxchg (&eai, pi++, *pj++, relaxed, seq_cst); // warning
+ cmpxchg (&eai, pi++, *pj++, relaxed, relaxed);
+
+ /* { dg-regexp " *inlined from \[^\n\r\]+.C:66:.*" "" { target *-*-* } 0 }
+ { dg-regexp " *inlined from \[^\n\r\]+.C:67:.*" "" { target *-*-* } 0 }
+ { dg-regexp " *inlined from \[^\n\r\]+.C:68:.*" "" { target *-*-* } 0 }
+ { dg-regexp " *inlined from \[^\n\r\]+.C:69:.*" "" { target *-*-* } 0 }
+ { dg-regexp " *inlined from \[^\n\r\]+.C:70:.*" "" { target *-*-* } 0 }
+ { dg-warning "__atomic_compare_exchange\[^\n\r\]* \\\[-Winvalid-memory-model" "cmpxchg 1" { target *-*-* } 0 } */
+}
diff --git a/gcc/testsuite/g++.dg/warn/Winvalid-memory-model.C b/gcc/testsuite/g++.dg/warn/Winvalid-memory-model.C
new file mode 100644
index 0000000..5357d54
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Winvalid-memory-model.C
@@ -0,0 +1,84 @@
+/* PR middle-end/99612 - Missing warning on incorrect memory order without
+ -Wsystem-headers
+ Verify warings for basic atomic functions with no optimization.
+ { dg-do compile { target c++11 } }
+ { dg-options "-O0 -Wall" } */
+
+#include <atomic>
+
+static const std::memory_order relaxed = std::memory_order_relaxed;
+static const std::memory_order consume = std::memory_order_consume;
+static const std::memory_order acquire = std::memory_order_acquire;
+static const std::memory_order release = std::memory_order_release;
+static const std::memory_order acq_rel = std::memory_order_acq_rel;
+static const std::memory_order seq_cst = std::memory_order_seq_cst;
+
+extern std::atomic<int> eai;
+
+void test_load (int *pi)
+{
+ *pi++ = eai.load (relaxed);
+ *pi++ = eai.load (consume);
+ *pi++ = eai.load (acquire);
+ *pi++ = eai.load (release); // warning
+ *pi++ = eai.load (acq_rel); // warning
+ *pi++ = eai.load (seq_cst);
+}
+
+/* { dg-regexp " *inlined from \[^\n\r\]+.C:23:.*" "" { target *-*-* } 0 }
+ { dg-regexp " *inlined from \[^\n\r\]+.C:24:.*" "" { target *-*-* } 0 }
+ { dg-warning "__atomic_load\[^\n\r\]* \\\[-Winvalid-memory-model" "warning" { target *-*-* } 0 } */
+
+
+void test_store (int *pi)
+{
+ eai.store (*pi++, relaxed);
+ eai.store (*pi++, consume); // warning
+ eai.store (*pi++, acquire); // warning
+ eai.store (*pi++, release);
+ eai.store (*pi++, acq_rel); // warning
+ eai.store (*pi++, seq_cst);
+}
+
+/* { dg-regexp " *inlined from \[^\n\r\]+.C:36:.*" "" { target *-*-* } 0 }
+ { dg-regexp " *inlined from \[^\n\r\]+.C:37:.*" "" { target *-*-* } 0 }
+ { dg-regexp " *inlined from \[^\n\r\]+.C:39:.*" "" { target *-*-* } 0 }
+ { dg-warning "__atomic_store\[^\n\r]* \\\[-Winvalid-memory-model" "warning" { target *-*-* } 0 } */
+
+
+void test_exchange (const int *pi)
+{
+ eai.exchange (*pi++, relaxed);
+ eai.exchange (*pi++, consume);
+ eai.exchange (*pi++, acquire);
+ eai.exchange (*pi++, release);
+ eai.exchange (*pi++, acq_rel);
+ eai.exchange (*pi++, seq_cst);
+}
+
+/* The following tests fail because std::atomic_compare_exchange_weak_explicit
+ is not declared with attribute always_inline (like the member functions
+ above are). */
+
+void test_compare_exchange (int *pi, int *pj)
+{
+#define cmpxchg(x, y, z, o1, o2) \
+ std::atomic_compare_exchange_weak_explicit (x, y, z, o1, o2)
+
+ cmpxchg (&eai, pi++, *pj++, relaxed, relaxed);
+ cmpxchg (&eai, pi++, *pj++, relaxed, consume); // warning
+ cmpxchg (&eai, pi++, *pj++, relaxed, acquire); // warning
+ cmpxchg (&eai, pi++, *pj++, relaxed, release); // warning
+ cmpxchg (&eai, pi++, *pj++, relaxed, acq_rel); // warning
+ cmpxchg (&eai, pi++, *pj++, relaxed, seq_cst); // warning
+ cmpxchg (&eai, pi++, *pj++, relaxed, relaxed);
+
+ /* HACK: xfail doesn't seem to work for the dg-regexp directives below,
+ so disable them by prepending an X to their names...
+ { Xdg-regexp " *inlined from \[^\n\r\]+.C:66:.*" "" { xfail *-*-* } 0 }
+ { Xdg-regexp " *inlined from \[^\n\r\]+.C:67:.*" "" { xfail *-*-* } 0 }
+ { Xdg-regexp " *inlined from \[^\n\r\]+.C:68:.*" "" { xfail *-*-* } 0 }
+ { Xdg-regexp " *inlined from \[^\n\r\]+.C:69:.*" "" { xfail *-*-* } 0 }
+ { Xdg-regexp " *inlined from \[^\n\r\]+.C:70:.*" "" { xfail *-*-* } 0 }
+ { dg-warning "__atomic_compare_exchange\[^\n\r\]* \\\[-Winvalid-memory-model" "cmpxchg 1" { xfail *-*-* } 0 } */
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wmismatched-dealloc-3.C b/gcc/testsuite/g++.dg/warn/Wmismatched-dealloc-3.C
new file mode 100644
index 0000000..05c7fee
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wmismatched-dealloc-3.C
@@ -0,0 +1,70 @@
+/* Verify that passing a pointer to a deallocation function that was
+ previously passed to a mismatched reallocation function is diagnosed
+ by -Wmismatched-dealloc (and not by some other warning).
+ { dg-do compile }
+ { dg-options "-Wall" } */
+
+#define A(...) __attribute__ ((malloc (__VA_ARGS__)))
+
+typedef __SIZE_TYPE__ size_t;
+
+extern "C"
+{
+ void free (void *);
+ void* realloc (void *, size_t);
+}
+
+// User-defined allocator/deallocator just like like realloc.
+ int* int_realloc (size_t, int *);
+A (int_realloc, 2) int* int_realloc (size_t, int *);
+
+
+void sink (void *);
+
+
+void* warn_realloc_op_delete (void *p)
+{
+ void *q = realloc (p, 5); // { dg-message "call to 'void\\* realloc\\(void\\*, size_t\\)'" "note" }
+
+ operator delete (p); // { dg-warning "'void operator delete\\(void\\*\\)' called on pointer 'p' passed to mismatched allocation function 'void\\* realloc\\(void\\*, size_t\\)' \\\[-Wmismatched-dealloc" }
+ return q;
+}
+
+void* warn_realloc_op_delete_cond (void *p)
+{
+ void *q = realloc (p, 5); // { dg-message "call to 'void\\* realloc\\(void\\*, size_t\\)'" "note" }
+
+ if (!q)
+ operator delete (p); // { dg-warning "'void operator delete\\(void\\*\\)' called on pointer 'p' passed to mismatched allocation function 'void\\* realloc\\(void\\*, size_t\\)'" }
+ return q;
+}
+
+void* warn_realloc_array_delete_char (char *p)
+{
+ char *q;
+ q = (char*)realloc (p, 7); // { dg-message "call to 'void\\* realloc\\(void\\*, size_t\\)'" "note" }
+
+ if (!q)
+ delete[] (p); // { dg-warning "'void operator delete \\\[]\\(void\\*\\)' called on pointer 'p' passed to mismatched allocation function 'void\\* realloc\\(void\\*, size_t\\)'" }
+ return q;
+}
+
+
+int* warn_int_realloc_op_delete (int *p)
+{
+ int *q;
+ q = int_realloc (5, p); // { dg-message "call to 'int\\* int_realloc\\(size_t, int\\*\\)'" "note" }
+
+ operator delete (p); // { dg-warning "'void operator delete\\(void\\*\\)' called on pointer 'p' passed to mismatched allocation function 'int\\* int_realloc\\(size_t, int\\*\\)' \\\[-Wmismatched-dealloc" }
+ return q;
+}
+
+
+int* warn_int_realloc_free (int *p)
+{
+ int *q;
+ q = int_realloc (5, p); // { dg-message "call to 'int\\* int_realloc\\(size_t, int\\*\\)'" "note" }
+
+ free (p); // { dg-warning "'void free\\(void\\*\\)' called on pointer 'p' passed to mismatched allocation function 'int\\* int_realloc\\(size_t, int\\*\\)' \\\[-Wmismatched-dealloc" }
+ return q;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-5.C b/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-5.C
index 92c75df..bac2b68 100644
--- a/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-5.C
+++ b/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-5.C
@@ -1,7 +1,7 @@
/* PR c++/100876 - -Wmismatched-new-delete should either look through
or ignore placement new
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall -fdelete-null-pointer-checks" } */
extern "C" {
void* malloc (__SIZE_TYPE__);
diff --git a/gcc/testsuite/g++.dg/warn/Wmismatched-tags-9.C b/gcc/testsuite/g++.dg/warn/Wmismatched-tags-9.C
new file mode 100644
index 0000000..2712c4d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wmismatched-tags-9.C
@@ -0,0 +1,32 @@
+/* PR c++/103703 - ICE with -Wmismatched-tags with friends and templates
+ { dg-do compile }
+ { dg-options "-Wall -Wmismatched-tags" } */
+
+template <typename T>
+struct A
+{
+ struct B { };
+};
+
+template <typename T>
+struct C
+{
+ friend class A<C>::B; // { dg-warning "-Wmismatched-tags" "pr102036" { xfail *-*-* } }
+};
+
+template struct C<int>;
+
+
+template <typename T>
+struct D
+{
+ friend class A<D>::B; // okay, specialized as class below
+};
+
+template <>
+struct A<long>
+{
+ class B { };
+};
+
+template struct D<long>;
diff --git a/gcc/testsuite/g++.dg/warn/Wreturn-type-13.C b/gcc/testsuite/g++.dg/warn/Wreturn-type-13.C
new file mode 100644
index 0000000..fa2952b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wreturn-type-13.C
@@ -0,0 +1,35 @@
+// PR c++/103991
+// { dg-do compile { target c++17 } }
+
+struct S { ~S(); };
+int
+foo ()
+{
+ S s;
+ if constexpr (true)
+ return 0;
+ else
+ return 1;
+} // { dg-bogus "control reaches end of non-void function" }
+
+#if __cpp_if_consteval >= 202106L
+constexpr int
+bar ()
+{
+ S s;
+ if consteval
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+} // { dg-bogus "control reaches end of non-void function" }
+
+int
+baz ()
+{
+ return bar ();
+}
+#endif
diff --git a/gcc/testsuite/g++.dg/warn/Wshadow-18.C b/gcc/testsuite/g++.dg/warn/Wshadow-18.C
new file mode 100644
index 0000000..fcc1b3c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wshadow-18.C
@@ -0,0 +1,22 @@
+// PR c++/104379
+// { dg-do compile }
+// { dg-options "-Wshadow" }
+
+int x;
+
+template<typename T>
+struct S
+{
+ int i;
+ S(int i) { (void) i; } // { dg-warning "declaration of 'i' shadows a member of 'S<T>'" }
+ S(float x) { (void) x; } // { dg-warning "declaration of 'x' shadows a global declaration" }
+ S(int *p) { int a = 1; (void) p; (void) a;
+ { int a = 2; (void) a; } } // { dg-warning "declaration of 'a' shadows a previous local" }
+};
+
+S<int> i(1);
+S<long> j(1);
+S<int> k(1.0f);
+S<long> l(1.0f);
+S<int> m(&x);
+S<int> n(&x);
diff --git a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-3.C b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-3.C
index c68e82a..e1d547f 100644
--- a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-3.C
+++ b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-3.C
@@ -21,7 +21,7 @@ Ax ax_;
NOIPA void gax_ ()
{
ax_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
- ax_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ ax_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
ax_.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -32,7 +32,7 @@ Ax ax0 = { 0 };
NOIPA void gax0 ()
{
ax0.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
- ax0.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ ax0.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
ax0.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -43,7 +43,7 @@ Ax ax0_ = { 0, { } };
NOIPA void gax0_ ()
{
ax0_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
- ax0_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ ax0_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
ax0_.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -53,8 +53,8 @@ Ax ax1 = { 1, { 0 } };
NOIPA void gax1 ()
{
- ax1.a[0] = 0;
- ax1.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ ax1.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ ax1.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
ax1.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -102,7 +102,7 @@ A0 a0_;
NOIPA void ga0_ ()
{
a0_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
- a0_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ a0_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a0_.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -113,7 +113,7 @@ A0 a00 = { 0 };
NOIPA void ga00 ()
{
a00.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
- a00.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ a00.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a00.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -124,7 +124,7 @@ A0 a00_ = { 0, { } };
NOIPA void ga00_ ()
{
a00_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
- a00_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ a00_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a00_.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -168,8 +168,8 @@ A1 a1_;
NOIPA void ga1_ ()
{
- a1_.a[0] = 0;
- a1_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a1_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1_.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -179,8 +179,8 @@ A1 a1__ = { 0 };
NOIPA void ga1__ ()
{
- a1__.a[0] = 0;
- a1__.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1__.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a1__.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1__.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -190,8 +190,8 @@ A1 a1_0 = { 0, { } };
NOIPA void ga1_0_ ()
{
- a1_0.a[0] = 0;
- a1_0.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1_0.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a1_0.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1_0.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -201,8 +201,8 @@ A1 a1_1 = { 0, { 1 } };
NOIPA void ga1_1 ()
{
- a1_1.a[0] = 0;
- a1_1.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1_1.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a1_1.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1_1.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -244,7 +244,7 @@ A1i a1i_;
NOIPA void ga1i_ ()
{
a1i_.a[0] = 0;
- a1i_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1i_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1i_.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -255,7 +255,7 @@ A1i a1i__ = { 0 };
NOIPA void ga1i__ ()
{
a1i__.a[0] = 0;
- a1i__.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1i__.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1i__.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -265,8 +265,8 @@ A1 a1i_0 = { 0, { } };
NOIPA void ga1i_0_ ()
{
- a1i_0.a[0] = 0;
- a1i_0.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1i_0.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a1i_0.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1i_0.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
@@ -276,8 +276,8 @@ A1 a1i_1 = { 0, { 1 } };
NOIPA void ga1i_1 ()
{
- a1i_1.a[0] = 0;
- a1i_1.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
+ a1i_1.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ a1i_1.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
a1i_1.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
}
diff --git a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-8.C b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-8.C
new file mode 100644
index 0000000..d0ef5e7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-8.C
@@ -0,0 +1,10 @@
+// PR c++/103534
+// { dg-additional-options "-O -Wall" }
+
+#include <string>
+
+std::string foo(std::string x)
+{
+ // This used to get a bogus -Wstringop-overflow warning.
+ return std::string("1234567890123456") + x;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-14.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-14.C
new file mode 100644
index 0000000..cebadf1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-14.C
@@ -0,0 +1,31 @@
+// PR c++/19808
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized" }
+
+struct A {
+ int m;
+ int get() const { return m; }
+
+ A() : m{} { }
+ A(int) { }
+ A(const A &) { }
+ A(A *) { }
+};
+
+struct S {
+ A a, b;
+
+ S(int (*)[1]) : a() {}
+ S(int (*)[2]) : b(a.get()) {}
+ S(int (*)[3]) : b(a) {}
+ S(int (*)[4]) : a(&a) {}
+};
+
+struct R {
+ A a, b;
+
+ R(int (*)[1]) : a{} {}
+ R(int (*)[2]) : b{a.get()} {}
+ R(int (*)[3]) : b{a} {}
+ R(int (*)[4]) : a{&a} {}
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-15.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-15.C
new file mode 100644
index 0000000..89e9066
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-15.C
@@ -0,0 +1,118 @@
+// PR c++/19808
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized -Winit-self" }
+// Largely copied from clang's test/SemaCXX/uninitialized.cpp.
+
+int x;
+struct U {
+ U() : b(a) { }
+ int &a = x;
+ int &b;
+};
+
+struct T {
+ T() : a(b), b(a) { } // { dg-warning "reference .T::b. is not yet bound" }
+ int &a, &b;
+};
+
+struct S {
+ S() : a(a) { } // { dg-warning ".S::a. is initialized with itself" }
+ int &a;
+};
+
+struct A {
+ int a;
+ int b;
+ A() { }
+ A(int (*)[1]) : b(a) { } // { dg-warning ".A::a. is used uninitialized" }
+ A(int (*)[2]) : a(b) { } // { dg-warning ".A::b. is used uninitialized" }
+};
+
+struct D {
+ int a;
+ int &b;
+ int &c = a;
+ int d = b;
+ D() : b(a) { }
+};
+
+struct E {
+ int a;
+ int get();
+ static int num();
+ E() { }
+ E(int) { }
+};
+
+struct F {
+ int a;
+ E e;
+ int b;
+ F(int (*)[1]) : a(e.get()) { } // { dg-warning "member .F::e. is used uninitialized" }
+ F(int (*)[2]) : a(e.num()) { }
+ F(int (*)[3]) : e(a) { } // { dg-warning "member .F::a. is used uninitialized" }
+ F(int (*)[4]) : a(4), e(a) { }
+ F(int (*)[5]) : e(b) { } // { dg-warning "member .F::b. is used uninitialized" }
+ F(int (*)[6]) : e(b), b(4) { } // { dg-warning "member .F::b. is used uninitialized" }
+};
+
+struct G {
+ G(const A&) { };
+};
+
+struct H {
+ A a1;
+ G g;
+ A a2;
+ H() : g(a1) { }
+ // ??? clang++ doesn't warn here
+ H(int) : g(a2) { } // { dg-warning "member .H::a2. is used uninitialized" }
+};
+
+struct I {
+ I(int *) { }
+};
+
+struct J : I {
+ int *a;
+ int *b;
+ int c;
+ J() : I((a = new int(5))), b(a), c(*a) { }
+};
+
+struct M { };
+
+struct N : public M {
+ int a;
+ int b;
+ N() : b(a) { } // { dg-warning "member .N::a. is used uninitialized" }
+};
+
+struct O {
+ int x = 42;
+ int get() { return x; }
+};
+
+struct P {
+ O o;
+ int x = o.get();
+ P() : x(o.get()) { }
+};
+
+struct Q {
+ int a;
+ int b;
+ int &c;
+ Q() :
+ a(c = 5), // "reference .Q::c. is not yet bound" but too complex for the FE
+ b(c), // "reference .Q::c. is not yet bound" but too complex for the FE
+ c(a) { }
+};
+
+struct R {
+ int a;
+ int b;
+ int c;
+ int d = a + b + c;
+ R() : a(c = 5), b(c), c(a) { }
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-16.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-16.C
new file mode 100644
index 0000000..38f587b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-16.C
@@ -0,0 +1,12 @@
+// PR c++/19808
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized" }
+
+struct S {
+ int a;
+ int b;
+ int c;
+ S() : a((b = 42)), c(b) { }
+ S(int) : a(((1, b) = 42)), c(b) { }
+ S(char) : a(((c++, b) = 42)), c(b) { } // "field .S::c. is used uninitialized" but too complex for the FE
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-17.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-17.C
new file mode 100644
index 0000000..80c37ac
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-17.C
@@ -0,0 +1,33 @@
+// PR c++/19808
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized -Winit-self" }
+
+int
+foo (int *p)
+{
+ *p = 42;
+ return 5;
+}
+
+struct S {
+ int x;
+ int y;
+ int z;
+ S() : x(foo (&y)), z(y) { } // { dg-bogus "uninitialized" }
+};
+
+struct T {
+ int x;
+ int y;
+ int z;
+ T() : x(({ y = 30; 42; })), z(y) { } // { dg-bogus "uninitialized" }
+};
+
+struct A {
+ int x, y, z;
+ int f () { y = 1; return 2; }
+ A ():
+ x (f ()),
+ z (y) // { dg-bogus "uninitialized" }
+ { }
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-18.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-18.C
new file mode 100644
index 0000000..29ae77a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-18.C
@@ -0,0 +1,22 @@
+// PR c++/96121
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized" }
+
+struct A {
+ A();
+ int i;
+};
+struct B {
+ B(A);
+ int i;
+};
+
+struct composed2 {
+ B b_;
+ A a_;
+ composed2() : b_(a_) {} // { dg-warning "member .composed2::a_. is used uninitialized" }
+};
+
+composed2 test() {
+ return composed2{};
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-19.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-19.C
new file mode 100644
index 0000000..e4d53d4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-19.C
@@ -0,0 +1,50 @@
+// PR c++/19808
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized" }
+// Test we warn when initializing a base class.
+
+struct A {
+ A(int) { }
+};
+
+struct B : public A {
+ int x;
+ B() : A(x) { } // { dg-warning "member .B::x. is used uninitialized" }
+};
+
+struct C : public A {
+ int x;
+ int y;
+ C() : A(y = 4), x(y) { }
+};
+
+struct D : public A {
+ int x;
+ D() : A{x} { } // { dg-warning "member .D::x. is used uninitialized" }
+};
+
+struct E : public A {
+ int x;
+ int y;
+ E() : A{y = 4}, x(y) { }
+};
+
+struct F {
+ F(int&) { }
+};
+
+struct G : F {
+ int x;
+ G() : F(x) { }
+};
+
+struct H {
+ H(int *) { }
+};
+
+struct I : H {
+ int x;
+ int arr[2];
+ I() : H(&x) { }
+ I(int) : H(arr) { }
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-20.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-20.C
new file mode 100644
index 0000000..867c4da
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-20.C
@@ -0,0 +1,16 @@
+// PR c++/96121
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized" }
+// Test we warn with delegating constructors.
+
+struct A {
+ A(int);
+ A(int &, int);
+ A(int (*)[1]) : A(x) { } // { dg-warning "21:member .A::x. is used uninitialized" }
+ A(int (*)[2]) : A(x, x) { } // { dg-warning "24:member .A::x. is used uninitialized" }
+ A(int (*)[3]) : A(x, 0) { }
+ A(int (*)[4]) : A{x} { } // { dg-warning "21:member .A::x. is used uninitialized" }
+ A(int (*)[5]) : A{x, x} { } // { dg-warning "24:member .A::x. is used uninitialized" }
+ A(int (*)[6]) : A{x, 0} { }
+ int x;
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-21.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-21.C
new file mode 100644
index 0000000..57ca00a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-21.C
@@ -0,0 +1,20 @@
+// PR c++/19808
+// { dg-do compile }
+// { dg-options "-Wuninitialized" }
+
+struct A {
+ int a;
+ int b;
+ A(int) {}
+};
+
+struct S {
+ A a;
+ A a2;
+ S() :
+ /* We don't warn here, because we consider partial initialization
+ as initializing the whole object. */
+ a((a2.a = 42)),
+ a2(a2.a)
+ { }
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-22.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-22.C
new file mode 100644
index 0000000..89686a0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-22.C
@@ -0,0 +1,37 @@
+// PR c++/19808
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized -Winit-self" }
+// Test that we don't warn when initializing a reference, unless it's
+// self-init.
+
+struct R {
+ int &r;
+};
+
+struct S {
+ R r;
+ int a;
+ int &b;
+ int c;
+};
+
+struct X {
+ S s;
+ X() : s{ { s.a }, 1, s.c, 3} { }
+};
+
+struct A {
+ int &r;
+ A() : r{r} { } // { dg-warning ".A::r. is initialized with itself" }
+};
+
+struct B {
+ int &r;
+ int a;
+ B() : r{a} { }
+};
+
+struct C {
+ R x;
+ C() : x{x.r} { } // { dg-warning "member .C::x. is used uninitialized" }
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-23.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-23.C
new file mode 100644
index 0000000..7cb2a9e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-23.C
@@ -0,0 +1,24 @@
+// PR c++/19808
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized" }
+// Test that we don't warn in an uninstantiated template.
+
+struct A {
+ int *fn() { return nullptr; }
+};
+
+template<typename T>
+struct B {
+ B() : p(a->fn()) { }
+ A *a;
+ int *p;
+};
+
+template<typename T>
+struct C {
+ C() : p(a->fn()) { } // { dg-warning "member .C<int>::a. is used uninitialized" }
+ A *a;
+ int *p;
+};
+
+C<int> c;
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-24.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-24.C
new file mode 100644
index 0000000..e5dd429
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-24.C
@@ -0,0 +1,89 @@
+// PR c++/19808
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized -Winit-self" }
+
+int fint(int);
+int fintp(int *);
+int fintr(int &);
+int fintcr(const int &);
+
+int arr[10];
+
+struct S {
+ int x;
+ int y;
+ const int z = 42;
+ int *p;
+
+ S(int (*)[1]) : x(x) { } // { dg-warning "initialized with itself" }
+ S(int (*)[2]) : x(x + x) { } // { dg-warning "member .S::x. is used uninitialized" }
+ S(int (*)[3]) : x(static_cast<int>(y)) { } // { dg-warning "member .S::y. is used uninitialized" }
+ S(int (*)[4]) : x(static_cast<int>(x)) { } // { dg-warning "member .S::x. is used uninitialized" }
+ S(int (*)[5]) : x(fint(x)) { }
+ S(int (*)[6]) : x(fint(y)) { }
+
+ S(int (*)[7]) : x(sizeof(x)) { }
+ S(int (*)[8]) : x(sizeof(y)) { }
+ S(int (*)[9]) : p(&x) { }
+ S(int (*)[10]) : x(fintp(&y)) { }
+ S(int (*)[11]) : x(fintr(y)) { }
+ S(int (*)[12]) : x(fintcr(y)) { }
+ S(int (*)[26]) : x(((void)(__typeof(y)) 1, 1)) { }
+ S(int (*)[27]) : x(((void)(decltype(y)) 1, 1)) { }
+ S(int (*)[28]) : x(__alignof__(y)) { }
+ S(int (*)[29]) : x(noexcept(y)) { }
+
+ S(int (*)[13]) : x(0), y(x ? y : y) { }
+ S(int (*)[14]) : x(0), y(1 + (x ? y : y)) { }
+ S(int (*)[15]) : x(-y) { } // { dg-warning "member .S::y. is used uninitialized" }
+ S(int (*)[16]) : x(1 << y) { } // { dg-warning "member .S::y. is used uninitialized" }
+ S(int (*)[17]) : x(this->y) { } // { dg-warning "member .S::y. is used uninitialized" }
+ S(int (*)[18]) : x(arr[y]) { } // { dg-warning "member .S::y. is used uninitialized" }
+ S(int (*)[19]) : x(0), y(x ? x : y) { }
+ S(int (*)[20]) : x(0), y(y ? x : y) { }
+ S(int (*)[21]) : x(0), y(y ? x : x) { }
+ S(int (*)[22]) : x(0), y((fint(y), x)) { }
+ S(int (*)[23]) : x(0), y(x += y) { } // "member .S::y. is used uninitialized" but too complex for the FE
+ S(int (*)[24]) : x(y += 10) { } // "member .S::y. is used uninitialized" but too complex for the FE
+ S(int (*)[25]) : x(y++) { } // { dg-warning "member .S::y. is used uninitialized" }
+};
+
+// Same, but { }.
+struct R {
+ int x;
+ int y;
+ const int z = 42;
+ int *p;
+
+ R(int (*)[1]) : x{x} { } // { dg-warning "member .R::x. is used uninitialized" }
+ R(int (*)[2]) : x{x + x} { } // { dg-warning "member .R::x. is used uninitialized" }
+ R(int (*)[3]) : x{static_cast<int>(y)} { } // { dg-warning "member .R::y. is used uninitialized" }
+ R(int (*)[4]) : x{static_cast<int>(x)} { } // { dg-warning "member .R::x. is used uninitialized" }
+ R(int (*)[5]) : x{fint(x)} { }
+ R(int (*)[6]) : x{fint(y)} { }
+
+ R(int (*)[7]) : x{sizeof(x)} { }
+ R(int (*)[8]) : x{sizeof(y)} { }
+ R(int (*)[9]) : p{&x} { }
+ R(int (*)[10]) : x{fintp(&y)} { }
+ R(int (*)[11]) : x{fintr(y)} { }
+ R(int (*)[12]) : x{fintcr(y)} { }
+ R(int (*)[26]) : x{((void)(__typeof(y)) 1, 1)} { }
+ R(int (*)[27]) : x{((void)(decltype(y)) 1, 1)} { }
+ R(int (*)[28]) : x{__alignof__(y)} { }
+ R(int (*)[29]) : x{noexcept(y)} { }
+
+ R(int (*)[13]) : x{0}, y{x ? y : y} { }
+ R(int (*)[14]) : x{0}, y{1 + (x ? y : y)} { }
+ R(int (*)[15]) : x{-y} { } // { dg-warning "member .R::y. is used uninitialized" }
+ R(int (*)[16]) : x{1 << y} { } // { dg-warning "member .R::y. is used uninitialized" }
+ R(int (*)[17]) : x{this->y} { } // { dg-warning "member .R::y. is used uninitialized" }
+ R(int (*)[18]) : x{arr[y]} { } // { dg-warning "member .R::y. is used uninitialized" }
+ R(int (*)[19]) : x{0}, y{x ? x : y} { }
+ R(int (*)[20]) : x{0}, y{y ? x : y} { }
+ R(int (*)[21]) : x{0}, y{y ? x : x} { }
+ R(int (*)[22]) : x{0}, y{(fint(y), x)} { }
+ R(int (*)[23]) : x{0}, y{x += y} { } // "member .R::y. is used uninitialized" but too complex for the FE
+ R(int (*)[24]) : x{y += 10} { } // "member .R::y. is used uninitialized" but too complex for the FE
+ R(int (*)[25]) : x{y++} { } // { dg-warning "member .R::y. is used uninitialized" }
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-25.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-25.C
new file mode 100644
index 0000000..fb652f9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-25.C
@@ -0,0 +1,12 @@
+// PR c++/19808
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall" }
+
+struct A {
+ A *a;
+};
+
+struct B : A {
+ int i;
+ B() : A{a} {}
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-26.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-26.C
new file mode 100644
index 0000000..a887d12
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-26.C
@@ -0,0 +1,22 @@
+// PR c++/19808
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized" }
+// Anonymous union/struct.
+// ??? The diagnostic should be improved to say 'b' instead of
+// "<anonymous>".
+
+struct S {
+ __extension__ struct {
+ int a;
+ int b;
+ };
+ S() : a(b) { } // { dg-warning "is used uninitialized" }
+};
+
+struct U {
+ union {
+ int a;
+ int b;
+ };
+ U() : a(b) { } // { dg-warning "is used uninitialized" }
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-27.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-27.C
new file mode 100644
index 0000000..24e6b9b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-27.C
@@ -0,0 +1,20 @@
+// PR c++/19808
+// { dg-do compile }
+// { dg-options "-Wall" }
+
+enum E { red };
+
+struct C {
+ C(int *, unsigned);
+};
+
+template <unsigned U> struct D : C {
+ D(int, int, E) : C(e, U) {}
+ int e[2];
+};
+
+void
+g ()
+{
+ D<1>(0, 0, red);
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-28.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-28.C
new file mode 100644
index 0000000..816249c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-28.C
@@ -0,0 +1,60 @@
+// PR c++/19808
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized" }
+
+struct S {
+ int i, j, k, l;
+ S() : i(j), // { dg-warning "member .S::j. is used uninitialized" }
+ j(1),
+ k(l + 1), // { dg-warning "member .S::l. is used uninitialized" }
+ l(2) { }
+};
+
+struct A {
+ int a, b, c;
+ A() : a(b // { dg-warning "member .A::b. is used uninitialized" }
+ + c) { } // { dg-warning "member .A::c. is used uninitialized" }
+};
+
+struct B {
+ int &r;
+ int *p;
+ int a;
+ B() : r(a), p(&a), a(1) { }
+};
+
+struct C {
+ const int &r1, &r2;
+ C () : r1(r2), // { dg-warning "reference .C::r2. is not yet bound to a value when used here" }
+ r2(r1) { }
+};
+
+struct D {
+ int a = 1;
+ int b = 2;
+ D() : a(b + 1), b(a + 1) { } // { dg-warning "member .D::b. is used uninitialized" }
+};
+
+struct E {
+ int a = 1;
+ E() : a(a + 1) { } // { dg-warning "member .E::a. is used uninitialized" }
+};
+
+struct F {
+ int a = 1;
+ int b;
+ F() : b(a + 1) { }
+};
+
+struct bar {
+ int a;
+ bar() {}
+ bar(bar&) {}
+};
+
+class foo {
+ bar first;
+ bar second;
+public:
+ foo() : first(second) {} // { dg-warning "member .foo::second. is used uninitialized" }
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-29.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-29.C
new file mode 100644
index 0000000..da81abf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-29.C
@@ -0,0 +1,60 @@
+// PR c++/19808
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized" }
+
+struct S {
+ int i, j, k, l;
+ S() : i{j}, // { dg-warning "member .S::j. is used uninitialized" }
+ j{1},
+ k{l + 1}, // { dg-warning "member .S::l. is used uninitialized" }
+ l{2} { }
+};
+
+struct A {
+ int a, b, c;
+ A() : a{b // { dg-warning "member .A::b. is used uninitialized" }
+ + c} { } // { dg-warning "member .A::c. is used uninitialized" }
+};
+
+struct B {
+ int &r;
+ int *p;
+ int a;
+ B() : r{a}, p{&a}, a{1} { }
+};
+
+struct C {
+ const int &r1, &r2;
+ C () : r1{r2}, // { dg-warning "reference .C::r2. is not yet bound to a value when used here" }
+ r2{r1} { }
+};
+
+struct D {
+ int a = 1;
+ int b = 2;
+ D() : a{b + 1}, b{a + 1} { } // { dg-warning "member .D::b. is used uninitialized" }
+};
+
+struct E {
+ int a = 1;
+ E() : a{a + 1} { } // { dg-warning "member .E::a. is used uninitialized" }
+};
+
+struct F {
+ int a = 1;
+ int b;
+ F() : b{a + 1} { }
+};
+
+struct bar {
+ int a;
+ bar() {}
+ bar(bar&) {}
+};
+
+class foo {
+ bar first;
+ bar second;
+public:
+ foo() : first{second} {} // { dg-warning "member .foo::second. is used uninitialized" }
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-30.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-30.C
new file mode 100644
index 0000000..ba0f76e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-30.C
@@ -0,0 +1,13 @@
+// PR c++/19808
+// { dg-do compile }
+// { dg-options "-Wuninitialized" }
+
+class diagnostic_event {
+public:
+ virtual int get_stack_depth();
+};
+struct event_range {
+ event_range(diagnostic_event &initial_event)
+ : m_stack_depth(initial_event.get_stack_depth()) {}
+ int m_stack_depth;
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-31.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-31.C
new file mode 100644
index 0000000..e22b150
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-31.C
@@ -0,0 +1,73 @@
+// PR c++/19808
+// { dg-do compile }
+// { dg-options "-Wuninitialized" }
+
+class AllocatorWithCleanup {
+public:
+ int *allocate(int);
+};
+class SecBlock {
+ SecBlock() : m_ptr(m_alloc.allocate(0)) {} // { dg-bogus "uninitialized" }
+ AllocatorWithCleanup m_alloc;
+ int *m_ptr;
+};
+
+struct A {
+ int *allocate(int);
+};
+
+struct B {
+ int : 0;
+ int *allocate(int);
+};
+
+struct C : B {
+};
+
+struct D {
+ char arr[0];
+ int *allocate(int);
+};
+
+struct E { };
+
+struct F {
+ E arr[10];
+ int *allocate(int);
+};
+
+struct G {
+ E e;
+ int *allocate(int);
+};
+
+struct H {
+ virtual void foo ();
+ int *allocate(int);
+};
+
+template<typename T>
+struct X {
+ X() : m_ptr(t.allocate(0)) {} // { dg-bogus "uninitialized" }
+ T t;
+ int *m_ptr;
+};
+
+struct V {
+ int a;
+ int *allocate(int);
+};
+
+struct Z {
+ Z() : m_ptr(v.allocate(0)) {} // { dg-warning "uninitialized" }
+ V v;
+ int *m_ptr;
+};
+
+X<A> x1;
+X<B> x2;
+X<C> x3;
+X<D> x4;
+X<F> x5;
+X<G> x6;
+X<H> x7;
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-32.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-32.C
new file mode 100644
index 0000000..144a99e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-32.C
@@ -0,0 +1,14 @@
+// { dg-do compile }
+// { dg-additional-options "-Wall" }
+
+void* operator new[](__SIZE_TYPE__, void* __p);
+
+struct allocator
+{
+ ~allocator();
+};
+
+void *foo (void *p)
+{
+ return p ? new(p) allocator[1] : new allocator[1]; // { dg-bogus "uninitialized" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wuse-after-free.C b/gcc/testsuite/g++.dg/warn/Wuse-after-free.C
new file mode 100644
index 0000000..022bd8d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuse-after-free.C
@@ -0,0 +1,158 @@
+/* Exercise basic C++ only cases of -Wuse-after-free without optimization.
+ { dg-do compile }
+ { dg-options "-O0 -Wall" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+extern "C" void free (void *);
+extern "C" void* realloc (void *, size_t);
+
+void sink (void *);
+
+extern void* evp;
+extern void* evpa[];
+
+extern int ei;
+
+struct List { struct List *next; };
+
+void nowarn_delete (void *vp, struct List *lp)
+{
+ {
+ operator delete (vp);
+ vp = 0;
+ sink (vp);
+ }
+ {
+ operator delete (evp);
+ evp = 0;
+ sink (evp);
+ }
+ {
+ operator delete (evpa[0]);
+ evpa[0] = 0;
+ sink (evpa[0]);
+ }
+ {
+ void *vp = evpa[0];
+ operator delete (evpa[0]);
+ sink (vp);
+ }
+ {
+ void *p = evpa[1];
+ if (ei & 1)
+ operator delete (p);
+ if (ei & 2)
+ sink (p);
+ }
+ {
+ struct List *next = lp->next;
+ operator delete (lp);
+ operator delete (next);
+ }
+}
+
+void nowarn_delete_arg (void *p, void *q)
+{
+ operator delete (p);
+ if (q)
+ operator delete (q);
+}
+
+void nowarn_delete_extern (void)
+{
+ extern void *ep, *eq;
+ operator delete (ep);
+ ep = eq;
+ operator delete (ep);
+}
+
+void nowarn_delete_assign (void)
+{
+ extern void *ep;
+ operator delete (ep);
+ ep = 0;
+ operator delete (ep);
+}
+
+void warn_double_delete_arg (void *p)
+{
+ operator delete (p); // { dg-message "call to 'void operator delete\\(void\\*\\)'" "note" }
+ operator delete (p); // { dg-warning "\\\-Wuse-after-free" }
+}
+
+void warn_delete_free_arg (void *p)
+{
+ operator delete (p); // { dg-message "call to 'void operator delete\\(void\\*\\)'" "note" }
+ free (p); // { dg-warning "\\\-Wuse-after-free" }
+}
+
+void warn_free_delete_arg (void *p)
+{
+ free (p); // { dg-message "call to 'void free\\(void\\*\\)'" "note" }
+ operator delete (p); // { dg-warning "\\\-Wuse-after-free" }
+}
+
+void warn_mismatched_double_delete_arg (void *p, void *q)
+{
+ operator delete (p); // { dg-message "call to 'void operator delete\\(void\\*\\)'" "note" }
+ operator delete[] (p); // { dg-warning "\\\-Wuse-after-free" }
+
+ operator delete[] (q); // { dg-message "call to 'void operator delete \\\[]\\(void\\*\\)'" "note" }
+ operator delete (q); // { dg-warning "\\\-Wuse-after-free" }
+}
+
+void warn_double_delete_extern (void)
+{
+ /* GCC assumes operator delete() clobbers global memory and the warning is
+ too simplistic to see through that assumption. */
+ extern void *ep, *eq;
+ {
+ eq = ep;
+ operator delete (ep); // { dg-message "call to 'operator delete'" "pr??????" { xfail *-*-* } }
+ operator delete (eq); // { dg-warning "\\\-Wuse-after-free" "pr??????" { xfail *-*-* } }
+ }
+}
+
+void warn_deref_after_delete (int *p, int i)
+{
+ int *q0 = p, *q1 = p + 1, *qi = p + i;
+ operator delete (p); // { dg-message "call to 'void operator delete\\(void\\*\\)'" "note" }
+ *p = 0; // { dg-warning "\\\-Wuse-after-free" }
+
+ *q0 = 0; // { dg-warning "\\\-Wuse-after-free" }
+ *q1 = 0; // { dg-warning "\\\-Wuse-after-free" }
+ *qi = 0; // { dg-warning "\\\-Wuse-after-free" }
+}
+
+void warn_array_ref_after_delete (int *p, int i)
+{
+ operator delete (p); // { dg-message "call to 'void operator delete\\(void\\*\\)'" "note" }
+ p[i] = 0; // { dg-warning "\\\-Wuse-after-free" }
+}
+
+void nowarn_delete_list (struct List *head)
+{
+ for (struct List *p = head, *q; p; p = q)
+ {
+ q = p->next;
+ operator delete (p);
+ }
+}
+
+void warn_delete_list (struct List *head)
+{
+ struct List *p = head;
+ for (; p; p = p->next) // { dg-warning "\\\[-Wuse-after-free" }
+ operator delete (p); // { dg-message "call to 'void operator delete\\(void\\*\\)'" "note" }
+}
+
+void warn_delete (void *vp)
+{
+ {
+ operator delete (vp); // { dg-message "call to 'void operator delete\\(void\\*\\)'" "note" }
+ evp = vp; // { dg-warning "-Wuse-after-free" }
+ evpa[0] = vp; // { dg-warning "-Wuse-after-free" }
+ evpa[1] = evp;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wuse-after-free2.C b/gcc/testsuite/g++.dg/warn/Wuse-after-free2.C
new file mode 100644
index 0000000..6d5f2bf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuse-after-free2.C
@@ -0,0 +1,10 @@
+// PR target/104213
+// { dg-do compile }
+// { dg-options "-Wuse-after-free" }
+
+class C
+{
+ virtual ~C();
+};
+
+C::~C() {} // { dg-bogus "used after" }
diff --git a/gcc/testsuite/g++.dg/warn/Wuse-after-free3.C b/gcc/testsuite/g++.dg/warn/Wuse-after-free3.C
new file mode 100644
index 0000000..1862ac8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuse-after-free3.C
@@ -0,0 +1,16 @@
+// PR target/104213
+// { dg-do compile }
+// { dg-options "-Wuse-after-free" }
+// FIXME: We should not output the warning twice.
+
+struct A
+{
+ virtual ~A ();
+ void f ();
+};
+
+A::~A ()
+{
+ operator delete (this);
+ f (); // { dg-warning "used after" }
+} // { dg-warning "used after" }
diff --git a/gcc/testsuite/g++.dg/warn/Wuse-after-free4.C b/gcc/testsuite/g++.dg/warn/Wuse-after-free4.C
new file mode 100644
index 0000000..599d9bf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuse-after-free4.C
@@ -0,0 +1,27 @@
+/* PR middle-end/104232 - spurious -Wuse-after-free after conditional free
+ { dg-do compile }
+ { dg-options "-O2 -Wall" } */
+
+char* f (void);
+
+struct A
+{
+ char *p;
+ A (): p () { }
+ ~A ()
+ {
+ __builtin_free (p); // { dg-bogus "-Wuse-after-free" }
+ }
+};
+
+int test_no_warn (void)
+{
+ A px, qx;
+
+ qx.p = f ();
+ if (!qx.p)
+ return 0;
+
+ px.p = f ();
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wuseless-cast2.C b/gcc/testsuite/g++.dg/warn/Wuseless-cast2.C
new file mode 100644
index 0000000..22e4039
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuseless-cast2.C
@@ -0,0 +1,24 @@
+// PR c++/103480
+// { dg-do compile { target c++14 } }
+// { dg-options "-Wuseless-cast" }
+
+template <typename T, int N>
+struct A { typedef T t[N]; };
+template <typename T, int N>
+struct B { typename A<T, N>::t b; };
+struct C {
+ constexpr C (C &&) {}
+ template <int N>
+ static auto bar ()
+ {
+ B<C, N> r;
+ return r; // { dg-bogus "useless cast to type" }
+ }
+ C () = default;
+};
+
+void
+foo ()
+{
+ C::bar<2> ();
+}
diff --git a/gcc/testsuite/g++.dg/warn/pr104025.C b/gcc/testsuite/g++.dg/warn/pr104025.C
new file mode 100644
index 0000000..9457c8e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/pr104025.C
@@ -0,0 +1,20 @@
+// PR c++/104025
+// { dg-do compile }
+// { dg-options "-Wmissing-template-keyword -fcompare-debug" }
+
+void bar (int);
+
+struct S { int i; };
+
+template <class C>
+struct T
+{
+ int m;
+ C c;
+ void foo ()
+ {
+ bar (c.i < m);
+ }
+};
+
+template void T<S>::foo ();
diff --git a/gcc/testsuite/g++.dg/warn/pr83054.C b/gcc/testsuite/g++.dg/warn/pr83054.C
index 506c960..5285f94 100644
--- a/gcc/testsuite/g++.dg/warn/pr83054.C
+++ b/gcc/testsuite/g++.dg/warn/pr83054.C
@@ -2,6 +2,13 @@
// { dg-options "-O3 -Wsuggest-final-types" }
// { dg-do compile }
+// A throwing dtor in C++98 mode changes the warning.
+#if __cplusplus < 201100L
+#define NOTHROW throw()
+#else
+#define NOTHROW noexcept
+#endif
+
extern "C" int printf (const char *, ...);
struct foo // { dg-warning "final would enable devirtualization of 5 calls" }
{
@@ -12,7 +19,7 @@ struct foo // { dg-warning "final would enable devirtualization of 5 calls" }
x = count++;
printf("this %d = %x\n", x, (void *)this);
}
- virtual ~foo () {
+ virtual ~foo () NOTHROW {
printf("this %d = %x\n", x, (void *)this);
--count;
}
diff --git a/gcc/testsuite/g++.dg/warn/ref-temp1.C b/gcc/testsuite/g++.dg/warn/ref-temp1.C
index 26f1ca5..b09d921 100644
--- a/gcc/testsuite/g++.dg/warn/ref-temp1.C
+++ b/gcc/testsuite/g++.dg/warn/ref-temp1.C
@@ -9,3 +9,6 @@ struct Y {
};
Y::Y () : x(1) {} // { dg-warning "temporary" }
+
+/* The initialization of x with the temporary might also trigger:
+ { dg-prune-output "-Wdangling-pointer" } */
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/README b/gcc/testsuite/g++.old-deja/g++.brendan/README
index 380355f..895c355 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-2021 Free Software Foundation, Inc.
+Copyright (C) 1997-2022 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++.eh/spec1.C b/gcc/testsuite/g++.old-deja/g++.eh/spec1.C
index ea32045..3c832fd 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/spec1.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/spec1.C
@@ -17,7 +17,7 @@ f () throw (char, int, std::bad_exception) // { dg-warning "deprecated" "" { tar
int main ()
{
std::set_terminate (my_term);
- std::set_unexpected (my_unexp);
+ std::set_unexpected (my_unexp); // { dg-warning "deprecated" "" { target c++11 } }
try
{
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/spec2.C b/gcc/testsuite/g++.old-deja/g++.eh/spec2.C
index d1aa698..2f7556b 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/spec2.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/spec2.C
@@ -17,7 +17,7 @@ f () throw (int, std::bad_exception) // { dg-warning "deprecated" "" { target c+
int main ()
{
std::set_terminate (my_term);
- std::set_unexpected (my_unexp);
+ std::set_unexpected (my_unexp); // { dg-warning "deprecated" "" { target c++11 } }
try
{
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/spec3.C b/gcc/testsuite/g++.old-deja/g++.eh/spec3.C
index 1d57df3..278de2e 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/spec3.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/spec3.C
@@ -17,7 +17,7 @@ f () throw (std::bad_exception) // { dg-warning "deprecated" "" { target c++11
int main ()
{
std::set_terminate (my_term);
- std::set_unexpected (my_unexp);
+ std::set_unexpected (my_unexp); // { dg-warning "deprecated" "" { target c++11 } }
try
{
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/spec4.C b/gcc/testsuite/g++.old-deja/g++.eh/spec4.C
index e102239..d5d4896 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/spec4.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/spec4.C
@@ -17,7 +17,7 @@ f () throw (short) // { dg-warning "deprecated" "" { target c++11 } }
int main ()
{
std::set_terminate (my_term);
- std::set_unexpected (my_unexp);
+ std::set_unexpected (my_unexp); // { dg-warning "deprecated" "" { target c++11 } }
try
{
diff --git a/gcc/testsuite/g++.old-deja/g++.martin/new1.C b/gcc/testsuite/g++.old-deja/g++.martin/new1.C
index 502c4f4..18eb88d 100644
--- a/gcc/testsuite/g++.old-deja/g++.martin/new1.C
+++ b/gcc/testsuite/g++.old-deja/g++.martin/new1.C
@@ -1,5 +1,5 @@
// { dg-do run }
-//Lifetime of temporaries:
+//Lifetime of temporaries:
//egcs 2.92 performs cleanup for temporaries inside new expressions
//after the new is complete, not at the end of the full expression.
@@ -71,8 +71,8 @@ void test1()
func(new B(A(10).addr()));
}catch(int){
}
- CHECK(ctor_done==1);
- CHECK(new_done==2);
+ CHECK(new_done==1);
+ CHECK(ctor_done==2);
CHECK(func_done==3);
CHECK(dtor_done==4);
CHECK(delete_done==0);
@@ -86,10 +86,10 @@ void test2()
func(new B(A(10).addr()));
}catch(int){
}
- CHECK(ctor_done==1);
- CHECK(new_done==2);
+ CHECK(new_done==1);
+ CHECK(ctor_done==0);
CHECK(func_done==0);
- CHECK(dtor_done==3);
+ CHECK(dtor_done==0);
CHECK(delete_done==0);
}
@@ -101,11 +101,11 @@ void test3()
func(new B(A(10).addr()));
}catch(int){
}
- CHECK(new_done==0);
- CHECK(ctor_done==1);
+ CHECK(new_done==1);
+ CHECK(ctor_done==2);
CHECK(func_done==0);
CHECK(dtor_done==0);
- CHECK(delete_done==0);
+ CHECK(delete_done==3);
}
int main()
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh33.C b/gcc/testsuite/g++.old-deja/g++.mike/eh33.C
index cffb0c4..8d50f73 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh33.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh33.C
@@ -11,7 +11,7 @@ void my_unexpected() {
void foo() throw (int) { throw "Hi"; } // { dg-warning "deprecated" "" { target c++11 } }
int main() {
- std::set_unexpected (my_unexpected);
+ std::set_unexpected (my_unexpected); // { dg-warning "deprecated" "" { target c++11 } }
try {
foo();
} catch (int i) {
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh34.C b/gcc/testsuite/g++.old-deja/g++.mike/eh34.C
index 3218dd9..36512ae 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh34.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh34.C
@@ -11,7 +11,7 @@ void my_unexpected() {
void foo() throw () { throw "Hi"; }
int main() {
- std::set_unexpected (my_unexpected);
+ std::set_unexpected (my_unexpected); // { dg-warning "deprecated" "" { target c++11 } }
foo();
return 1;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh50.C b/gcc/testsuite/g++.old-deja/g++.mike/eh50.C
index 028a2de..2507cf2 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh50.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh50.C
@@ -12,7 +12,7 @@ template <class T> void foo(T) throw (int) { throw "Hi"; } // { dg-warning "depr
int
main() {
- std::set_unexpected (my_unexpected);
+ std::set_unexpected (my_unexpected); // { dg-warning "deprecated" "" { target c++11 } }
try {
foo(1);
} catch (int i) {
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh51.C b/gcc/testsuite/g++.old-deja/g++.mike/eh51.C
index 428635b..d1902f0 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh51.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh51.C
@@ -12,7 +12,7 @@ template <class T> void foo(T) throw (T) { throw "Hi"; } // { dg-warning "deprec
int
main() {
- std::set_unexpected (my_unexpected);
+ std::set_unexpected (my_unexpected); // { dg-warning "deprecated" "" { target c++11 } }
try {
foo(1);
} catch (int i) {
diff --git a/gcc/testsuite/g++.old-deja/g++.other/delete6.C b/gcc/testsuite/g++.old-deja/g++.other/delete6.C
index 733a6e2..56cfa00 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/delete6.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/delete6.C
@@ -25,4 +25,4 @@ inline void A::operator delete(void*p)
int main()
{A *ap=new A;
-delete ap;}
+delete ap;} // { dg-prune-output "unallocated object 'i'" }
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/README b/gcc/testsuite/g++.old-deja/g++.robertl/README
index db438fc..61bb003 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-2021 Free Software Foundation, Inc.
+Copyright (C) 1998-2022 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/eb43.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C
index 90afbe4..c54050c 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C
@@ -5,6 +5,7 @@
// to pointer_to_binary_function, which has an `explicit' constructor.
// { dg-prune-output "note" }
+// { dg-options "-Wno-deprecated" }
#include <vector>
#include <algorithm>
diff --git a/gcc/testsuite/g++.old-deja/old-deja.exp b/gcc/testsuite/g++.old-deja/old-deja.exp
index 1a6c43d..8a010e6 100644
--- a/gcc/testsuite/g++.old-deja/old-deja.exp
+++ b/gcc/testsuite/g++.old-deja/old-deja.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1988-2021 Free Software Foundation, Inc.
+# Copyright (C) 1988-2022 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++.target/aarch64/aarch64.exp b/gcc/testsuite/g++.target/aarch64/aarch64.exp
index 6ef2662..8c3836e 100644
--- a/gcc/testsuite/g++.target/aarch64/aarch64.exp
+++ b/gcc/testsuite/g++.target/aarch64/aarch64.exp
@@ -1,5 +1,5 @@
# Specific regression driver for AArch64.
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp b/gcc/testsuite/g++.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp
index 268e221..34d5393 100644
--- a/gcc/testsuite/g++.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp
+++ b/gcc/testsuite/g++.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2021 Free Software Foundation, Inc.
+# Copyright (C) 2014-2022 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++.target/aarch64/sve/aarch64-sve.exp b/gcc/testsuite/g++.target/aarch64/sve/aarch64-sve.exp
index 2b85023..03a6537 100644
--- a/gcc/testsuite/g++.target/aarch64/sve/aarch64-sve.exp
+++ b/gcc/testsuite/g++.target/aarch64/sve/aarch64-sve.exp
@@ -1,5 +1,5 @@
# Specific regression driver for AArch64.
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
# Contributed by ARM Ltd.
#
# This file is part of GCC.
diff --git a/gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp b/gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp
index 070a049..3814041 100644
--- a/gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp
+++ b/gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp
@@ -1,5 +1,5 @@
# Assembly-based regression-test driver for the SVE ACLE
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle.exp b/gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle.exp
index 8d3d8b4..d1887eb 100644
--- a/gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle.exp
+++ b/gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle.exp
@@ -1,5 +1,5 @@
# Specific regression driver for AArch64 SVE.
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
# Contributed by ARM Ltd.
#
# This file is part of GCC.
diff --git a/gcc/testsuite/g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp b/gcc/testsuite/g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp
index 4989818..78e8eca 100644
--- a/gcc/testsuite/g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp
+++ b/gcc/testsuite/g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp
@@ -1,5 +1,5 @@
# Assembly-based regression-test driver for the SVE ACLE
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.target/arm/arm.exp b/gcc/testsuite/g++.target/arm/arm.exp
index 7d873a4..9d8f92a 100644
--- a/gcc/testsuite/g++.target/arm/arm.exp
+++ b/gcc/testsuite/g++.target/arm/arm.exp
@@ -1,5 +1,5 @@
# Specific regression driver for arm.
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.target/arm/mve.exp b/gcc/testsuite/g++.target/arm/mve.exp
index ed62561..ecde1d5 100644
--- a/gcc/testsuite/g++.target/arm/mve.exp
+++ b/gcc/testsuite/g++.target/arm/mve.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2021 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 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++.target/arm/pr103676.C b/gcc/testsuite/g++.target/arm/pr103676.C
new file mode 100644
index 0000000..1607564
--- /dev/null
+++ b/gcc/testsuite/g++.target/arm/pr103676.C
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_thumb1_ok } */
+/* { dg-additional-options "-mcpu=cortex-m7 -mthumb -O2" } */
+
+typedef unsigned long long uint64_t;
+struct timer {
+ int active;
+ uint64_t expire;
+ void *arg;
+};
+int irq_disable();
+void irq_restore(int);
+static inline uint64_t h(const uint64_t *p64)
+{
+ uint64_t tmp;
+ asm(
+ "ldrd %Q[r], %R[r], %[p]\n"
+ : [r]"=lh"(tmp)
+ : [p]"m"(*p64)
+ : "memory"
+ );
+ return tmp;
+}
+uint64_t monotonic;
+void timer_callout(timer *tmr, uint64_t nsec, void *arg)
+{
+ const int s = irq_disable();
+ if (tmr->active)
+ tmr->arg = arg;
+ tmr->expire = h(&monotonic) + 100000 + (nsec == 1 ? 0 : nsec);
+ irq_restore(s);
+}
diff --git a/gcc/testsuite/g++.target/i386/avx512vl-pr100738-1.C b/gcc/testsuite/g++.target/i386/avx512vl-pr100738-1.C
new file mode 100644
index 0000000..ac4d62b
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/avx512vl-pr100738-1.C
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-Ofast -march=cascadelake" } */
+/* { dg-final {scan-assembler-times "vblendvps\[ \\t\]" 2 } } */
+/* { dg-final {scan-assembler-not "vpcmpeqd\[ \\t\]" } } */
+/* { dg-final {scan-assembler-not "vpxor\[ \\t\]" } } */
+/* { dg-final {scan-assembler-not "vpternlogd\[ \\t\]" } } */
+
+#include "pr100738-1.C"
diff --git a/gcc/testsuite/g++.target/i386/i386.exp b/gcc/testsuite/g++.target/i386/i386.exp
index 139a488..85e4169 100644
--- a/gcc/testsuite/g++.target/i386/i386.exp
+++ b/gcc/testsuite/g++.target/i386/i386.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2021 Free Software Foundation, Inc.
+# Copyright (C) 2018-2022 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++.target/i386/pr100738-1.C b/gcc/testsuite/g++.target/i386/pr100738-1.C
new file mode 100644
index 0000000..ace1866
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr100738-1.C
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-Ofast -mavx2" } */
+/* { dg-final {scan-assembler-times "vblendvps\[ \\t\]" 2 } } */
+/* { dg-final {scan-assembler-not "vpcmpeqd\[ \\t\]" } } */
+/* { dg-final {scan-assembler-not "vpxor\[ \\t\]" } } */
+
+typedef int v4si __attribute__((vector_size(16)));
+typedef char v16qi __attribute__((vector_size(16)));
+v4si
+foo_1 (v16qi a, v4si b, v4si c, v4si d)
+{
+ return ((v4si)~a) < 0 ? c : d;
+}
+
+v4si
+foo_2 (v16qi a, v4si b, v4si c, v4si d)
+{
+ return ((v4si)~a) >= 0 ? c : d;
+}
diff --git a/gcc/testsuite/g++.target/i386/pr101180.C b/gcc/testsuite/g++.target/i386/pr101180.C
new file mode 100644
index 0000000..4830708
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr101180.C
@@ -0,0 +1,25 @@
+// PR c++/101180
+// { dg-do compile { target c++11 } }
+
+#pragma GCC target "avx"
+template <typename> struct A {};
+#pragma GCC push_options
+#pragma GCC target "avx,avx2,bmi,bmi2,fma,f16c"
+template <typename T> using B = A<T>;
+template <typename> struct C;
+template <> struct C<float> {
+ __attribute__((always_inline)) float operator()(long) { return .0f; }
+};
+long d;
+template <typename T> void e(B<T>) {
+ T{C<T>()(d)};
+}
+template <typename T, typename FromT> void f(T d, FromT) {
+ e(d);
+}
+int g;
+void h() {
+ A<float> i;
+ f(i, g);
+}
+#pragma GCC pop_options
diff --git a/gcc/testsuite/g++.target/i386/pr102024.C b/gcc/testsuite/g++.target/i386/pr102024.C
new file mode 100644
index 0000000..0fbc026
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr102024.C
@@ -0,0 +1,12 @@
+// PR target/102024
+// { dg-do compile }
+
+struct S { float a; int : 0; float b; };
+void foo (struct S x);
+
+void
+bar (void)
+{
+ struct S s = { 0.0f, 0.0f };
+ foo (s); // { dg-bogus "the ABI of passing C structures with zero-width bit-fields has changed in GCC 12.1" }
+}
diff --git a/gcc/testsuite/g++.target/i386/pr102566-1.C b/gcc/testsuite/g++.target/i386/pr102566-1.C
new file mode 100644
index 0000000..94a66d7
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr102566-1.C
@@ -0,0 +1,31 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-O2" } */
+
+#include <atomic>
+
+bool
+tbit0 (std::atomic<int> &i)
+{
+#define BIT (1 << 0)
+ return i.fetch_or(BIT, std::memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+tbit30 (std::atomic<int> &i)
+{
+#define BIT (1 << 30)
+ return i.fetch_or(BIT, std::memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+tbit31 (std::atomic<int> &i)
+{
+#define BIT (1 << 31)
+ return i.fetch_or(BIT, std::memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btsl" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/g++.target/i386/pr102566-2.C b/gcc/testsuite/g++.target/i386/pr102566-2.C
new file mode 100644
index 0000000..4f2aea9
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr102566-2.C
@@ -0,0 +1,31 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-O2" } */
+
+#include <atomic>
+
+bool
+tbit0 (std::atomic<unsigned int> &i)
+{
+#define BIT (1 << 0)
+ return i.fetch_or(BIT, std::memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+tbit30 (std::atomic<unsigned int> &i)
+{
+#define BIT (1 << 30)
+ return i.fetch_or(BIT, std::memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+tbit31 (std::atomic<unsigned int> &i)
+{
+#define BIT (1 << 31)
+ return i.fetch_or(BIT, std::memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btsl" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/g++.target/i386/pr102566-3.C b/gcc/testsuite/g++.target/i386/pr102566-3.C
new file mode 100644
index 0000000..e88921d
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr102566-3.C
@@ -0,0 +1,31 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-O2" } */
+
+#include <atomic>
+
+bool
+tbit0 (std::atomic<unsigned int> &i)
+{
+#define BIT (1 << 0)
+ return !(i.fetch_or(BIT, std::memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+bool
+tbit30 (std::atomic<unsigned int> &i)
+{
+#define BIT (1 << 30)
+ return !(i.fetch_or(BIT, std::memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+bool
+tbit31 (std::atomic<unsigned int> &i)
+{
+#define BIT (1 << 31)
+ return !(i.fetch_or(BIT, std::memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btsl" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/g++.target/i386/pr102566-4.C b/gcc/testsuite/g++.target/i386/pr102566-4.C
new file mode 100644
index 0000000..44d1362
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr102566-4.C
@@ -0,0 +1,29 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-O2" } */
+
+#include <atomic>
+
+typedef int __attribute__ ((mode (__word__))) int_type;
+
+#define BIT (1 << 0)
+
+bool
+tbit0 (std::atomic<int_type> &i)
+{
+ return i.fetch_or(BIT, std::memory_order_relaxed) & ~1;
+}
+
+bool
+tbit30 (std::atomic<int_type> &i)
+{
+ return i.fetch_or(BIT, std::memory_order_relaxed) & ~2;
+}
+
+bool
+tbit31 (std::atomic<int_type> &i)
+{
+ return i.fetch_or(BIT, std::memory_order_relaxed) & ~4;
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*cmpxchg" 3 } } */
+/* { dg-final { scan-assembler-not "bts" } } */
diff --git a/gcc/testsuite/g++.target/i386/pr102566-5a.C b/gcc/testsuite/g++.target/i386/pr102566-5a.C
new file mode 100644
index 0000000..f9595be
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr102566-5a.C
@@ -0,0 +1,31 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-O2" } */
+
+#include <atomic>
+
+bool
+tbit0 (std::atomic<unsigned int> &i)
+{
+#define BIT (1 << 0)
+ return i.fetch_and(~BIT, std::memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+tbit30 (std::atomic<unsigned int> &i)
+{
+#define BIT (1 << 30)
+ return i.fetch_and(~BIT, std::memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+tbit31 (std::atomic<unsigned int> &i)
+{
+#define BIT (1 << 31)
+ return i.fetch_and(~BIT, std::memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btrl" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/g++.target/i386/pr102566-5b.C b/gcc/testsuite/g++.target/i386/pr102566-5b.C
new file mode 100644
index 0000000..d917b27
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr102566-5b.C
@@ -0,0 +1,31 @@
+/* { dg-do compile { target { c++11 && { ! ia32 } } } } */
+/* { dg-options "-O2" } */
+
+#include <atomic>
+
+bool
+tbit0 (std::atomic<unsigned long long> &i)
+{
+#define BIT (1ll << 0)
+ return i.fetch_and(~BIT, std::memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+tbit30 (std::atomic<unsigned long long> &i)
+{
+#define BIT (1ll << 30)
+ return i.fetch_and(~BIT, std::memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+tbit31 (std::atomic<unsigned long long> &i)
+{
+#define BIT (1ll << 63)
+ return i.fetch_and(~BIT, std::memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btrq" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/g++.target/i386/pr102566-6a.C b/gcc/testsuite/g++.target/i386/pr102566-6a.C
new file mode 100644
index 0000000..01d495e
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr102566-6a.C
@@ -0,0 +1,31 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-O2" } */
+
+#include <atomic>
+
+bool
+tbit0 (std::atomic<unsigned int> &i)
+{
+#define BIT (1 << 0)
+ return !(i.fetch_and(~BIT, std::memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+bool
+tbit30 (std::atomic<unsigned int> &i)
+{
+#define BIT (1 << 30)
+ return !(i.fetch_and(~BIT, std::memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+bool
+tbit31 (std::atomic<unsigned int> &i)
+{
+#define BIT (1 << 31)
+ return !(i.fetch_and(~BIT, std::memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btrl" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/g++.target/i386/pr102566-6b.C b/gcc/testsuite/g++.target/i386/pr102566-6b.C
new file mode 100644
index 0000000..adc11fc
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr102566-6b.C
@@ -0,0 +1,31 @@
+/* { dg-do compile { target { c++11 && { ! ia32 } } } } */
+/* { dg-options "-O2" } */
+
+#include <atomic>
+
+bool
+tbit0 (std::atomic<unsigned long long> &i)
+{
+#define BIT (1ll << 0)
+ return !(i.fetch_and(~BIT, std::memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+bool
+tbit30 (std::atomic<unsigned long long> &i)
+{
+#define BIT (1ll << 30)
+ return !(i.fetch_and(~BIT, std::memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+bool
+tbit31 (std::atomic<unsigned long long> &i)
+{
+#define BIT (1ll << 63)
+ return !(i.fetch_and(~BIT, std::memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btrq" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/g++.target/i386/pr103012.C b/gcc/testsuite/g++.target/i386/pr103012.C
new file mode 100644
index 0000000..2c9a8cd
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103012.C
@@ -0,0 +1,19 @@
+// PR c++/103012
+// { dg-do compile }
+// { dg-options "-mno-avx2" }
+
+int a = 1;
+#pragma GCC target "avx2"
+#define A(a) a +
+#define B(a) A(a)A(a)
+#define C(a) B(a)B(a)
+#define D(a) C(a)C(a)
+#define E(a) D(a)D(a)
+#define F(a) E(a)E(a)
+#define G(a) F(a)F(a)
+#define H(a) G(a)G(a)
+#define I(a) H(a)H(a)
+#define J(a) I(a)I(a)
+#define K(a) J(a)J(a)
+#define L(a) K(a)K(a)
+int b = L(a) 1;
diff --git a/gcc/testsuite/g++.target/i386/pr103696.C b/gcc/testsuite/g++.target/i386/pr103696.C
new file mode 100644
index 0000000..de7d5c6
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103696.C
@@ -0,0 +1,25 @@
+// PR c++/103696
+// { dg-options "-O2 -std=c++14 -fdump-tree-optimized" }
+
+int global_var;
+
+void fn() {
+}
+
+#pragma GCC optimize("finite-math-only")
+#pragma GCC target("sse3")
+
+void fn2() {
+}
+
+void fn3() {
+}
+
+int solve() {
+ auto nested = []() {
+ return global_var;
+ };
+ return nested();
+}
+
+/* { dg-final { scan-tree-dump-not "lambda" "optimized" } } */
diff --git a/gcc/testsuite/g++.target/i386/pr103750-fwprop-1.C b/gcc/testsuite/g++.target/i386/pr103750-fwprop-1.C
new file mode 100644
index 0000000..26987d3
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103750-fwprop-1.C
@@ -0,0 +1,26 @@
+/* PR target/103750. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -std=c++1y -march=cannonlake -fdump-rtl-fwprop1" } */
+/* { dg-final { scan-rtl-dump-not "subreg:HI\[ \\\(\]*reg:SI\[^\n]*\n\[^\n]*UNSPEC_TZCNT" "fwprop1" } } */
+
+#include<immintrin.h>
+const char16_t *qustrchr(char16_t *n, char16_t *e, char16_t c) noexcept
+{
+ __m256i mch256 = _mm256_set1_epi16(c);
+ for ( ; n < e; n += 32) {
+ __m256i data1 = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(n));
+ __m256i data2 = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(n) + 1);
+ __mmask16 mask1 = _mm256_cmpeq_epu16_mask(data1, mch256);
+ __mmask16 mask2 = _mm256_cmpeq_epu16_mask(data2, mch256);
+ if (_kortestz_mask16_u8(mask1, mask2))
+ continue;
+
+ unsigned idx = _tzcnt_u32(mask1);
+ if (mask1 == 0) {
+ idx = __tzcnt_u16(mask2);
+ n += 16;
+ }
+ return n + idx;
+ }
+ return e;
+}
diff --git a/gcc/testsuite/g++.target/i386/pr103861-1-sse4.C b/gcc/testsuite/g++.target/i386/pr103861-1-sse4.C
new file mode 100644
index 0000000..a07b3ad
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103861-1-sse4.C
@@ -0,0 +1,5 @@
+/* PR target/103861 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse4" } */
+
+#include "pr103861-1.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103861-1-xop.C b/gcc/testsuite/g++.target/i386/pr103861-1-xop.C
new file mode 100644
index 0000000..d65542d
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103861-1-xop.C
@@ -0,0 +1,5 @@
+/* PR target/103861 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mxop" } */
+
+#include "pr103861-1.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103861-1.C b/gcc/testsuite/g++.target/i386/pr103861-1.C
new file mode 100644
index 0000000..6475728
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103861-1.C
@@ -0,0 +1,17 @@
+/* PR target/103861 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse2" } */
+
+typedef unsigned char __attribute__((__vector_size__ (2))) __v2qu;
+typedef char __attribute__((__vector_size__ (2))) __v2qi;
+
+__v2qu au, bu;
+__v2qi as, bs;
+
+__v2qu uu (__v2qu a, __v2qu b) { return (a > b) ? au : bu; }
+__v2qu us (__v2qi a, __v2qi b) { return (a > b) ? au : bu; }
+__v2qi su (__v2qu a, __v2qu b) { return (a > b) ? as : bs; }
+__v2qi ss (__v2qi a, __v2qi b) { return (a > b) ? as : bs; }
+
+/* { dg-final { scan-assembler-times "pcmpeqb" 2 } } */
+/* { dg-final { scan-assembler-times "pcmpgtb" 2 } } */
diff --git a/gcc/testsuite/g++.target/i386/pr103973-1.C b/gcc/testsuite/g++.target/i386/pr103973-1.C
new file mode 100644
index 0000000..d7e2e89
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-1.C
@@ -0,0 +1,71 @@
+// PR target/103973
+// { dg-do run }
+// { dg-options "-O2 -std=c++20 -save-temps" }
+// { dg-final { scan-assembler-not "'\t\[v\]?ucomisd" { target { ! ia32 } } } }
+// { dg-final { scan-assembler-times "\t\[v\]?comisd" 2 { target { ! ia32 } } } }
+
+#include <compare>
+
+#ifndef double_type
+#define double_type double
+#endif
+
+__attribute__((noipa)) auto
+foo (double_type a, double_type b)
+{
+ return a <=> b;
+}
+
+__attribute__((noipa)) int
+bar (double_type a, double_type b)
+{
+ auto c = foo (a, b);
+ if (c == std::partial_ordering::less)
+ return -1;
+ if (c == std::partial_ordering::equivalent)
+ return 0;
+ if (c == std::partial_ordering::greater)
+ return 1;
+ return 2;
+}
+
+__attribute__((noipa)) auto
+baz (double_type a)
+{
+ return a <=> 0.0f;
+}
+
+__attribute__((noipa)) int
+qux (double_type a)
+{
+ auto c = baz (a);
+ if (c == std::partial_ordering::less)
+ return -1;
+ if (c == std::partial_ordering::equivalent)
+ return 0;
+ if (c == std::partial_ordering::greater)
+ return 1;
+ return 2;
+}
+
+int
+main ()
+{
+ double_type m5 = -5.0;
+ double_type p5 = 5.0;
+ volatile double_type p0 = 0.0;
+ double_type nan = p0 / p0;
+ if (bar (p5, p5) != 0 || bar (m5, m5) != 0)
+ __builtin_abort ();
+ if (bar (m5, p5) != -1 || bar (p5, m5) != 1)
+ __builtin_abort ();
+ if (bar (m5, nan) != 2 || bar (nan, p5) != 2)
+ __builtin_abort ();
+ if (bar (nan, nan) != 2)
+ __builtin_abort ();
+ if (qux (p0) != 0 || qux (nan) != 2)
+ __builtin_abort ();
+ if (qux (m5) != -1 || qux (p5) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.target/i386/pr103973-10.C b/gcc/testsuite/g++.target/i386/pr103973-10.C
new file mode 100644
index 0000000..53352f7
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-10.C
@@ -0,0 +1,7 @@
+// PR target/103973
+// { dg-do compile { target ia32 } }
+// { dg-options "-O2 -march=i686 -mfpmath=387 -std=c++20" }
+// { dg-final { scan-assembler-not "'\tfucom" } }
+// { dg-final { scan-assembler-times "\tfcom" 2 } }
+
+#include "pr103973-9.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-11.C b/gcc/testsuite/g++.target/i386/pr103973-11.C
new file mode 100644
index 0000000..535de21
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-11.C
@@ -0,0 +1,8 @@
+// PR target/103973
+// { dg-do run }
+// { dg-options "-O2 -save-temps -std=c++20" }
+// { dg-final { scan-assembler-not "'\t\[v\]?ucomiss" { target { ! ia32 } } } }
+// { dg-final { scan-assembler-times "\t\[v\]?comiss" 2 { target { ! ia32 } } } }
+
+#define double_type float
+#include "pr103973-9.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-12.C b/gcc/testsuite/g++.target/i386/pr103973-12.C
new file mode 100644
index 0000000..0fefd03
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-12.C
@@ -0,0 +1,8 @@
+// PR target/103973
+// { dg-do compile { target ia32 } }
+// { dg-options "-O2 -march=i686 -mfpmath=387 -std=c++20" }
+// { dg-final { scan-assembler-not "'\tfucom" } }
+// { dg-final { scan-assembler-times "\tfcom" 2 } }
+
+#define double_type float
+#include "pr103973-9.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-13.C b/gcc/testsuite/g++.target/i386/pr103973-13.C
new file mode 100644
index 0000000..a3d4ac5
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-13.C
@@ -0,0 +1,62 @@
+// PR target/103973
+// { dg-do run }
+// { dg-options "-O2 -ffast-math -std=c++20 -save-temps" }
+// { dg-final { scan-assembler-not "'\t\[v\]?ucomisd" { target { ! ia32 } } } }
+// { dg-final { scan-assembler-times "\t\[v\]?comisd" 2 { target { ! ia32 } } } }
+
+#include <compare>
+
+#ifndef double_type
+#define double_type double
+#endif
+
+__attribute__((noipa)) auto
+foo (double_type a, double_type b)
+{
+ return a <=> b;
+}
+
+__attribute__((noipa)) int
+bar (double_type a, double_type b)
+{
+ auto c = foo (a, b);
+ if (c == std::partial_ordering::less)
+ return -1;
+ if (c == std::partial_ordering::equivalent)
+ return 0;
+ return 1;
+}
+
+__attribute__((noipa)) auto
+baz (double_type a)
+{
+ return a <=> 0.0f;
+}
+
+__attribute__((noipa)) int
+qux (double_type a)
+{
+ auto c = baz (a);
+ if (c == std::partial_ordering::greater)
+ return 1;
+ if (c == std::partial_ordering::equivalent)
+ return 0;
+ return -1;
+}
+
+int
+main ()
+{
+ double_type m5 = -5.0;
+ double_type p5 = 5.0;
+ double_type p0 = 0.0;
+ if (bar (p5, p5) != 0 || bar (m5, m5) != 0)
+ __builtin_abort ();
+ if (bar (m5, p5) != -1 || bar (p5, m5) != 1)
+ __builtin_abort ();
+ if (qux (p0) != 0)
+ __builtin_abort ();
+ if (qux (m5) != -1 || qux (p5) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.target/i386/pr103973-14.C b/gcc/testsuite/g++.target/i386/pr103973-14.C
new file mode 100644
index 0000000..b4fc6fe
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-14.C
@@ -0,0 +1,7 @@
+// PR target/103973
+// { dg-do compile { target ia32 } }
+// { dg-options "-O2 -ffast-math -march=i686 -mfpmath=387 -std=c++20" }
+// { dg-final { scan-assembler-not "'\tfucom" } }
+// { dg-final { scan-assembler-times "\tfcom" 2 } }
+
+#include "pr103973-13.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-15.C b/gcc/testsuite/g++.target/i386/pr103973-15.C
new file mode 100644
index 0000000..4143d39
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-15.C
@@ -0,0 +1,8 @@
+// PR target/103973
+// { dg-do run }
+// { dg-options "-O2 -ffast-math -save-temps -std=c++20" }
+// { dg-final { scan-assembler-not "'\t\[v\]?ucomiss" { target { ! ia32 } } } }
+// { dg-final { scan-assembler-times "\t\[v\]?comiss" 2 { target { ! ia32 } } } }
+
+#define double_type float
+#include "pr103973-13.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-16.C b/gcc/testsuite/g++.target/i386/pr103973-16.C
new file mode 100644
index 0000000..95b6967
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-16.C
@@ -0,0 +1,8 @@
+// PR target/103973
+// { dg-do compile { target ia32 } }
+// { dg-options "-O2 -ffast-math -march=i686 -mfpmath=387 -std=c++20" }
+// { dg-final { scan-assembler-not "'\tfucom" } }
+// { dg-final { scan-assembler-times "\tfcom" 2 } }
+
+#define double_type float
+#include "pr103973-13.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-17.C b/gcc/testsuite/g++.target/i386/pr103973-17.C
new file mode 100644
index 0000000..f84b552
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-17.C
@@ -0,0 +1,8 @@
+// PR target/103973
+// { dg-do run { target large_long_double } }
+// { dg-options "-O2 -std=c++20 -save-temps" }
+// { dg-final { scan-assembler-not "'\tfucom" } }
+// { dg-final { scan-assembler-times "\tfcom" 2 } }
+
+#define double_type long double
+#include "pr103973-1.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-18.C b/gcc/testsuite/g++.target/i386/pr103973-18.C
new file mode 100644
index 0000000..57ff1f2
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-18.C
@@ -0,0 +1,8 @@
+// PR target/103973
+// { dg-do run { target large_long_double } }
+// { dg-options "-O2 -ffast-math -std=c++20 -save-temps" }
+// { dg-final { scan-assembler-not "'\tfucom" } }
+// { dg-final { scan-assembler-times "\tfcom" 2 } }
+
+#define double_type long double
+#include "pr103973-5.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-19.C b/gcc/testsuite/g++.target/i386/pr103973-19.C
new file mode 100644
index 0000000..b94bcfd
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-19.C
@@ -0,0 +1,8 @@
+// PR target/103973
+// { dg-do run { target large_long_double } }
+// { dg-options "-O2 -std=c++20 -save-temps" }
+// { dg-final { scan-assembler-not "'\tfucom" } }
+// { dg-final { scan-assembler-times "\tfcom" 2 } }
+
+#define double_type long double
+#include "pr103973-9.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-2.C b/gcc/testsuite/g++.target/i386/pr103973-2.C
new file mode 100644
index 0000000..be8978e
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-2.C
@@ -0,0 +1,7 @@
+// PR target/103973
+// { dg-do compile { target ia32 } }
+// { dg-options "-O2 -march=i686 -mfpmath=387 -std=c++20" }
+// { dg-final { scan-assembler-not "'\tfucom" } }
+// { dg-final { scan-assembler-times "\tfcom" 2 } }
+
+#include "pr103973-1.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-20.C b/gcc/testsuite/g++.target/i386/pr103973-20.C
new file mode 100644
index 0000000..8d5d919
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-20.C
@@ -0,0 +1,8 @@
+// PR target/103973
+// { dg-do run { target large_long_double } }
+// { dg-options "-O2 -ffast-math -std=c++20 -save-temps" }
+// { dg-final { scan-assembler-not "'\tfucom" } }
+// { dg-final { scan-assembler-times "\tfcom" 2 } }
+
+#define double_type long double
+#include "pr103973-13.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-3.C b/gcc/testsuite/g++.target/i386/pr103973-3.C
new file mode 100644
index 0000000..9ff1c5c
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-3.C
@@ -0,0 +1,8 @@
+// PR target/103973
+// { dg-do run }
+// { dg-options "-O2 -save-temps -std=c++20" }
+// { dg-final { scan-assembler-not "'\t\[v\]?ucomiss" { target { ! ia32 } } } }
+// { dg-final { scan-assembler-times "\t\[v\]?comiss" 2 { target { ! ia32 } } } }
+
+#define double_type float
+#include "pr103973-1.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-4.C b/gcc/testsuite/g++.target/i386/pr103973-4.C
new file mode 100644
index 0000000..5fec7c9
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-4.C
@@ -0,0 +1,8 @@
+// PR target/103973
+// { dg-do compile { target ia32 } }
+// { dg-options "-O2 -march=i686 -mfpmath=387 -std=c++20" }
+// { dg-final { scan-assembler-not "'\tfucom" } }
+// { dg-final { scan-assembler-times "\tfcom" 2 } }
+
+#define double_type float
+#include "pr103973-1.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-5.C b/gcc/testsuite/g++.target/i386/pr103973-5.C
new file mode 100644
index 0000000..7332698
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-5.C
@@ -0,0 +1,66 @@
+// PR target/103973
+// { dg-do run }
+// { dg-options "-O2 -ffast-math -std=c++20 -save-temps" }
+// { dg-final { scan-assembler-not "'\t\[v\]?ucomisd" { target { ! ia32 } } } }
+// { dg-final { scan-assembler-times "\t\[v\]?comisd" 2 { target { ! ia32 } } } }
+
+#include <compare>
+
+#ifndef double_type
+#define double_type double
+#endif
+
+__attribute__((noipa)) auto
+foo (double_type a, double_type b)
+{
+ return a <=> b;
+}
+
+__attribute__((noipa)) int
+bar (double_type a, double_type b)
+{
+ auto c = foo (a, b);
+ if (c == std::partial_ordering::less)
+ return -1;
+ if (c == std::partial_ordering::equivalent)
+ return 0;
+ if (c == std::partial_ordering::greater)
+ return 1;
+ return 2;
+}
+
+__attribute__((noipa)) auto
+baz (double_type a)
+{
+ return a <=> 0.0f;
+}
+
+__attribute__((noipa)) int
+qux (double_type a)
+{
+ auto c = baz (a);
+ if (c == std::partial_ordering::less)
+ return -1;
+ if (c == std::partial_ordering::equivalent)
+ return 0;
+ if (c == std::partial_ordering::greater)
+ return 1;
+ return 2;
+}
+
+int
+main ()
+{
+ double_type m5 = -5.0;
+ double_type p5 = 5.0;
+ double_type p0 = 0.0;
+ if (bar (p5, p5) != 0 || bar (m5, m5) != 0)
+ __builtin_abort ();
+ if (bar (m5, p5) != -1 || bar (p5, m5) != 1)
+ __builtin_abort ();
+ if (qux (p0) != 0)
+ __builtin_abort ();
+ if (qux (m5) != -1 || qux (p5) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.target/i386/pr103973-6.C b/gcc/testsuite/g++.target/i386/pr103973-6.C
new file mode 100644
index 0000000..e50fe09
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-6.C
@@ -0,0 +1,7 @@
+// PR target/103973
+// { dg-do compile { target ia32 } }
+// { dg-options "-O2 -ffast-math -march=i686 -mfpmath=387 -std=c++20" }
+// { dg-final { scan-assembler-not "'\tfucom" } }
+// { dg-final { scan-assembler-times "\tfcom" 2 } }
+
+#include "pr103973-5.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-7.C b/gcc/testsuite/g++.target/i386/pr103973-7.C
new file mode 100644
index 0000000..0e05b8e
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-7.C
@@ -0,0 +1,8 @@
+// PR target/103973
+// { dg-do run }
+// { dg-options "-O2 -ffast-math -save-temps -std=c++20" }
+// { dg-final { scan-assembler-not "'\t\[v\]?ucomiss" { target { ! ia32 } } } }
+// { dg-final { scan-assembler-times "\t\[v\]?comiss" 2 { target { ! ia32 } } } }
+
+#define double_type float
+#include "pr103973-5.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-8.C b/gcc/testsuite/g++.target/i386/pr103973-8.C
new file mode 100644
index 0000000..1150d28
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-8.C
@@ -0,0 +1,8 @@
+// PR target/103973
+// { dg-do compile { target ia32 } }
+// { dg-options "-O2 -ffast-math -march=i686 -mfpmath=387 -std=c++20" }
+// { dg-final { scan-assembler-not "'\tfucom" } }
+// { dg-final { scan-assembler-times "\tfcom" 2 } }
+
+#define double_type float
+#include "pr103973-5.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103973-9.C b/gcc/testsuite/g++.target/i386/pr103973-9.C
new file mode 100644
index 0000000..23a1791
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103973-9.C
@@ -0,0 +1,67 @@
+// PR target/103973
+// { dg-do run }
+// { dg-options "-O2 -std=c++20 -save-temps" }
+// { dg-final { scan-assembler-not "'\t\[v\]?ucomisd" { target { ! ia32 } } } }
+// { dg-final { scan-assembler-times "\t\[v\]?comisd" 2 { target { ! ia32 } } } }
+
+#include <compare>
+
+#ifndef double_type
+#define double_type double
+#endif
+
+__attribute__((noipa)) auto
+foo (double_type a, double_type b)
+{
+ return a <=> b;
+}
+
+__attribute__((noipa)) int
+bar (double_type a, double_type b)
+{
+ auto c = foo (a, b);
+ if (c == std::partial_ordering::less)
+ return -1;
+ if (c == std::partial_ordering::equivalent)
+ return 0;
+ return 1;
+}
+
+__attribute__((noipa)) auto
+baz (double_type a)
+{
+ return a <=> 0.0f;
+}
+
+__attribute__((noipa)) int
+qux (double_type a)
+{
+ auto c = baz (a);
+ if (c == std::partial_ordering::less)
+ return -1;
+ if (c == std::partial_ordering::equivalent)
+ return 0;
+ return 1;
+}
+
+int
+main ()
+{
+ double_type m5 = -5.0;
+ double_type p5 = 5.0;
+ volatile double_type p0 = 0.0;
+ double_type nan = p0 / p0;
+ if (bar (p5, p5) != 0 || bar (m5, m5) != 0)
+ __builtin_abort ();
+ if (bar (m5, p5) != -1 || bar (p5, m5) != 1)
+ __builtin_abort ();
+ if (bar (m5, nan) != 1 || bar (nan, p5) != 1)
+ __builtin_abort ();
+ if (bar (nan, nan) != 1)
+ __builtin_abort ();
+ if (qux (p0) != 0 || qux (nan) != 1)
+ __builtin_abort ();
+ if (qux (m5) != -1 || qux (p5) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.target/i386/pr35513-1.C b/gcc/testsuite/g++.target/i386/pr35513-1.C
new file mode 100644
index 0000000..6f8db37
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr35513-1.C
@@ -0,0 +1,25 @@
+// { dg-do run }
+// { dg-options "-O2 -mno-direct-extern-access" }
+
+#include <iostream>
+
+class Bug
+{
+};
+
+int throw_bug()
+{
+ throw Bug();
+
+ return 0;
+}
+
+int main()
+{
+ try {
+ std::cout << throw_bug();
+ } catch (Bug bug) {
+ };
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.target/i386/pr35513-2.C b/gcc/testsuite/g++.target/i386/pr35513-2.C
new file mode 100644
index 0000000..9143ff3
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr35513-2.C
@@ -0,0 +1,53 @@
+// { dg-do run }
+// { dg-options "-O2 -mno-direct-extern-access" }
+
+class Foo
+{
+public:
+ Foo(int n) : n_(n) { }
+ int f() { return n_; }
+
+ int badTest();
+ int goodTest();
+
+private:
+
+ int n_;
+};
+
+int Foo::badTest()
+{
+ try {
+ throw int(99);
+ }
+
+ catch (int &i) {
+ n_ = 16;
+ }
+
+ return n_;
+}
+
+
+int Foo::goodTest()
+{
+ int n;
+
+ try {
+ throw int(99);
+ }
+
+ catch (int &i) {
+ n = 16;
+ }
+
+ return n_;
+}
+
+int main()
+{
+ Foo foo(5);
+ foo.goodTest();
+ foo.badTest();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.target/msp430/msp430.exp b/gcc/testsuite/g++.target/msp430/msp430.exp
index 2e9fead..56fcb9c 100644
--- a/gcc/testsuite/g++.target/msp430/msp430.exp
+++ b/gcc/testsuite/g++.target/msp430/msp430.exp
@@ -1,5 +1,5 @@
# Specific regression driver for MSP430.
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.target/nios2/nios2.exp b/gcc/testsuite/g++.target/nios2/nios2.exp
index c23be09..48d7fc2 100644
--- a/gcc/testsuite/g++.target/nios2/nios2.exp
+++ b/gcc/testsuite/g++.target/nios2/nios2.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2021 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 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++.target/powerpc/powerpc.exp b/gcc/testsuite/g++.target/powerpc/powerpc.exp
index 4c9de3b..564c0dd 100644
--- a/gcc/testsuite/g++.target/powerpc/powerpc.exp
+++ b/gcc/testsuite/g++.target/powerpc/powerpc.exp
@@ -1,5 +1,5 @@
# Specific regression driver for PowerPC.
-# Copyright (C) 2019-2021 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.target/riscv/riscv.exp b/gcc/testsuite/g++.target/riscv/riscv.exp
index d9e832e..17b45c6 100644
--- a/gcc/testsuite/g++.target/riscv/riscv.exp
+++ b/gcc/testsuite/g++.target/riscv/riscv.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2021 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 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++.target/s390/s390.exp b/gcc/testsuite/g++.target/s390/s390.exp
index 4c08578..7db9afc 100644
--- a/gcc/testsuite/g++.target/s390/s390.exp
+++ b/gcc/testsuite/g++.target/s390/s390.exp
@@ -1,5 +1,5 @@
# Specific regression driver for S390.
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/g++.target/xtensa/xtensa.exp b/gcc/testsuite/g++.target/xtensa/xtensa.exp
index 0a83d9b..fa02b1e 100644
--- a/gcc/testsuite/g++.target/xtensa/xtensa.exp
+++ b/gcc/testsuite/g++.target/xtensa/xtensa.exp
@@ -1,5 +1,5 @@
# Specific regression driver for Xtensa.
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.c-torture/compile/compile.exp b/gcc/testsuite/gcc.c-torture/compile/compile.exp
index 7bde408..56f86be 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 1993-2022 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/pr100241-1.c b/gcc/testsuite/gcc.c-torture/compile/pr100241-1.c
new file mode 100644
index 0000000..593ef96
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr100241-1.c
@@ -0,0 +1,48 @@
+/* { dg-require-visibility "" } */
+/* { dg-options "-fvisibility=internal -fPIC" { target fpic } } */
+
+extern char num_4x4_blocks_high_lookup, num_4x4_blocks_wide_lookup,
+ vp9_foreach_transformed_block_in_plane_xd_0_0_0;
+int vp9_first_pass_encode_tile_mb_row_cpi_0,
+ vp9_first_pass_encode_tile_mb_row_tile_data_0_0, vp9_encode_sby_pass1_x;
+typedef void foreach_transformed_block_visitor();
+void vp9_encode_sby_pass1();
+typedef struct {
+ long coded_error;
+ long sr_coded_error;
+ long frame_noise_energy;
+ long intra_error;
+} FIRSTPASS_DATA;
+typedef struct {
+ FIRSTPASS_DATA fp_data;
+} TileDataEnc;
+TileDataEnc accumulate_fp_mb_row_stat_this_tile;
+void vp9_first_pass_encode_tile_mb_row(FIRSTPASS_DATA *fp_acc_data) {
+ int mb_col_end = vp9_first_pass_encode_tile_mb_row_tile_data_0_0;
+ for (; mb_col_end;) {
+ vp9_encode_sby_pass1();
+ if (vp9_first_pass_encode_tile_mb_row_cpi_0) {
+ FIRSTPASS_DATA __trans_tmp_1 = *fp_acc_data;
+ accumulate_fp_mb_row_stat_this_tile.fp_data.coded_error +=
+ accumulate_fp_mb_row_stat_this_tile.fp_data.sr_coded_error +=
+ __trans_tmp_1.sr_coded_error;
+ accumulate_fp_mb_row_stat_this_tile.fp_data.frame_noise_energy +=
+ __trans_tmp_1.frame_noise_energy;
+ accumulate_fp_mb_row_stat_this_tile.fp_data.intra_error +=
+ __trans_tmp_1.intra_error;
+ }
+ }
+}
+foreach_transformed_block_visitor vp9_foreach_transformed_block_in_plane_visit;
+void vp9_foreach_transformed_block_in_plane(void *arg) {
+ int c, max_blocks_wide = num_4x4_blocks_wide_lookup;
+ for (; num_4x4_blocks_high_lookup;) {
+ c = 0;
+ for (; c < max_blocks_wide;
+ c += vp9_foreach_transformed_block_in_plane_xd_0_0_0)
+ vp9_foreach_transformed_block_in_plane_visit(arg);
+ }
+}
+void vp9_encode_sby_pass1() {
+ vp9_foreach_transformed_block_in_plane(&vp9_encode_sby_pass1_x);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr100278.c b/gcc/testsuite/gcc.c-torture/compile/pr100278.c
new file mode 100644
index 0000000..4631080
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr100278.c
@@ -0,0 +1,15 @@
+
+void a()
+{
+#if defined __s390__
+ register int b asm("r5");
+#elif defined __x86_64__
+ register int b asm("eax");
+#else
+ volatile int b;
+#endif
+ if (b)
+ b = 1;
+ for (; b;)
+ ;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr100576.c b/gcc/testsuite/gcc.c-torture/compile/pr100576.c
index f2f40ec..f16a822 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr100576.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr100576.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target non_strict_prototype } */
+
/* PR middle-end/100576 */
const char v[] = {0x12};
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr101189.c b/gcc/testsuite/gcc.c-torture/compile/pr101189.c
new file mode 100644
index 0000000..ad83d32
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr101189.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/101189 */
+
+static int a, b;
+int main() {
+ int d = 0, e, f = 5;
+ if (a)
+ f = 0;
+ for (; f < 4; f++)
+ ;
+ e = f ^ -f;
+ e && d;
+ if (!e)
+ e || b;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr101941-1.c b/gcc/testsuite/gcc.c-torture/compile/pr101941-1.c
new file mode 100644
index 0000000..0481a38
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr101941-1.c
@@ -0,0 +1,50 @@
+/* { dg-additional-options "-fconserve-stack" } */
+
+/* Check to make sure that if
+ rfc4106_set_hash_subkey gets split,
+ the error function does not gets split away
+ from the if statement conditionalizing it. */
+
+struct crypto_aes_ctx {
+ char key_dec[128];
+};
+
+int rfc4106_set_hash_subkey_hash_subkey;
+
+void __write_overflow(void)__attribute__((__error__("")));
+void __write_overflow1(void);
+void aes_encrypt(void*);
+
+void fortify_panic(const char*) __attribute__((__noreturn__)) ;
+
+char *rfc4106_set_hash_subkey(struct crypto_aes_ctx *ctx) {
+ void *a = &ctx->key_dec[0];
+ unsigned p_size = __builtin_object_size(a, 0);
+#ifdef __OPTIMIZE__
+ if (p_size < 16) {
+ __write_overflow1();
+ fortify_panic(__func__);
+ }
+ if (p_size < 32) {
+ __write_overflow();
+ fortify_panic(__func__);
+ }
+#endif
+ aes_encrypt(ctx);
+ return ctx->key_dec;
+}
+
+char *(*gg)(struct crypto_aes_ctx *) = rfc4106_set_hash_subkey;
+
+void a(void)
+{
+ struct crypto_aes_ctx ctx;
+ rfc4106_set_hash_subkey(&ctx);
+}
+void b(void)
+{
+ struct crypto_aes_ctx ctx;
+ ctx.key_dec[0] = 0;
+ rfc4106_set_hash_subkey(&ctx);
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr103288-1.c b/gcc/testsuite/gcc.c-torture/compile/pr103288-1.c
new file mode 100644
index 0000000..88d1c67
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr103288-1.c
@@ -0,0 +1,6 @@
+
+int ui_5;
+long func_14_uli_8;
+void func_14() {
+ ui_5 &= (func_14_uli_8 ? 60 : ui_5) ? 5 : 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr103314-1.c b/gcc/testsuite/gcc.c-torture/compile/pr103314-1.c
new file mode 100644
index 0000000..f4a6313
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr103314-1.c
@@ -0,0 +1,6 @@
+/* { dg-options "" } */
+int main() {
+ int t = 1;
+ unsigned c = 0, d1 = t ? 1 ^ c ^ 1 >> (-1) : 0; /* { dg-warning "is negative" } */
+ return d1;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr103317-1.c b/gcc/testsuite/gcc.c-torture/compile/pr103317-1.c
new file mode 100644
index 0000000..f9d145e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr103317-1.c
@@ -0,0 +1,13 @@
+int a, b;
+char c;
+void
+d (void)
+{
+ char e = c;
+ if (b)
+ if (c < 16 - 11)
+ e = 16 - 11;
+ if (e > 8)
+ e = 8;
+ a = e;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr103513.c b/gcc/testsuite/gcc.c-torture/compile/pr103513.c
new file mode 100644
index 0000000..ca876a9
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr103513.c
@@ -0,0 +1,8 @@
+int a;
+void b(int c) {
+ int d = 3;
+ d ^= c < 2;
+ if (d < 3 && a)
+ while (1)
+ b(!a);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr103682.c b/gcc/testsuite/gcc.c-torture/compile/pr103682.c
new file mode 100644
index 0000000..5ee4b21
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr103682.c
@@ -0,0 +1,3 @@
+int bug(unsigned *ready, unsigned u) {
+ return __atomic_fetch_and (ready, ~u, 0) & u;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr103813.c b/gcc/testsuite/gcc.c-torture/compile/pr103813.c
new file mode 100644
index 0000000..b3fc066
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr103813.c
@@ -0,0 +1,10 @@
+/* PR middle-end/103813 */
+
+struct A { char b; char c[0x21000000]; };
+struct A d;
+
+int
+foo ()
+{
+ return d.c[0x20000000] || d.c[1];
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr104327.c b/gcc/testsuite/gcc.c-torture/compile/pr104327.c
new file mode 100644
index 0000000..d54e5d5
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr104327.c
@@ -0,0 +1,15 @@
+/* PR target/104327 */
+
+void foo (int *);
+
+static inline __attribute__((always_inline)) void
+bar (int *x)
+{
+ foo (x);
+}
+
+__attribute__((cold, optimize("Os"))) void
+baz (int *x)
+{
+ bar (x);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr104499.c b/gcc/testsuite/gcc.c-torture/compile/pr104499.c
new file mode 100644
index 0000000..e5d5cdd
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr104499.c
@@ -0,0 +1,11 @@
+/* PR tree-optimization/104499 */
+
+typedef int __attribute__((__vector_size__ (8 * sizeof (int)))) V;
+
+V v;
+
+void
+foo (void)
+{
+ v = ((1 | v) != 1);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr97576.c b/gcc/testsuite/gcc.c-torture/compile/pr97576.c
index 28294c8..d281613 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr97576.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr97576.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target non_strict_prototype } */
+
void
pc (void);
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr99787-1.c b/gcc/testsuite/gcc.c-torture/compile/pr99787-1.c
new file mode 100644
index 0000000..0e16301
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr99787-1.c
@@ -0,0 +1,19 @@
+/* { dg-options "-ftree-slp-vectorize -ffp-contract=on -ffloat-store" } */
+/* { dg-require-effective-target alloca } */
+
+_Complex foo_x_0;
+int foo_n11, foo_i, foo_l;
+_Complex float foo_s;
+_Complex *foo_f_0_0_0;
+
+void
+foo() {
+ _Complex f[foo_l];
+ for (; foo_i; foo_i++) {
+ int n9;
+ for (; n9 < foo_l; n9++)
+ for (; foo_n11; foo_n11++)
+ foo_s += foo_f_0_0_0[n9] * 0 * foo_f_0_0_0[foo_n11];
+ foo_x_0 += foo_s;
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/vector-dup-1.c b/gcc/testsuite/gcc.c-torture/compile/vector-dup-1.c
new file mode 100644
index 0000000..3475360
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/vector-dup-1.c
@@ -0,0 +1,15 @@
+/* { dg-additional-options "-fno-strict-aliasing" } */
+
+
+/* PR target/103170 */
+/* AARCH64 used to ICE on this for a typo in the string template. */
+#define vector __attribute__((vector_size(4*sizeof(float))))
+
+typedef vector float v4sf;
+
+v4sf f(int t)
+{
+ float tt = *(float*)&t;
+ asm("":"+r"(tt));
+ return (v4sf){tt,tt,tt,tt};
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
index baec137..fb47f51 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2003-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
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 fd9e601..240cc1d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c
@@ -517,3 +517,14 @@ vsnprintf (char *str, __SIZE_TYPE__ len, const char *fmt, va_list ap)
return ret;
}
#endif
+
+#if defined(__powerpc__) && defined(__LONG_DOUBLE_IEEE128__)
+__typeof (__sprintf_chk) __sprintf_chkieee128
+ __attribute__((alias ("__sprintf_chk")));
+__typeof (__vsprintf_chk) __vsprintf_chkieee128
+ __attribute__((alias ("__vsprintf_chk")));
+__typeof (__snprintf_chk) __snprintf_chkieee128
+ __attribute__((alias ("__snprintf_chk")));
+__typeof (__vsnprintf_chk) __vsnprintf_chkieee128
+ __attribute__((alias ("__vsnprintf_chk")));
+#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/execute.exp b/gcc/testsuite/gcc.c-torture/execute/execute.exp
index f25aeff..80524ad 100644
--- a/gcc/testsuite/gcc.c-torture/execute/execute.exp
+++ b/gcc/testsuite/gcc.c-torture/execute/execute.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2021 Free Software Foundation, Inc.
+# Copyright (C) 1991-2022 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/ieee.exp b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
index a7ca6e5..6d3c371 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 1993-2022 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/pr100453.c b/gcc/testsuite/gcc.c-torture/execute/pr100453.c
new file mode 100644
index 0000000..853a892
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr100453.c
@@ -0,0 +1,16 @@
+
+struct a {
+ int b : 4;
+} d;
+static int c, e;
+static const struct a f;
+static void g(const struct a h) {
+ for (; c < 1; c++)
+ d = h;
+ e = h.b;
+ c = h.b;
+}
+int main() {
+ g(f);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr101335.c b/gcc/testsuite/gcc.c-torture/execute/pr101335.c
new file mode 100644
index 0000000..45a399f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr101335.c
@@ -0,0 +1,15 @@
+
+unsigned a = 0xFFFFFFFF;
+int b;
+int main()
+{
+ int c = ~a;
+ unsigned d = c - 10;
+ if (d > c)
+ c = 20;
+ b = -(c | 0);
+ if (b > -8)
+ __builtin_abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr103052.c b/gcc/testsuite/gcc.c-torture/execute/pr103052.c
new file mode 100644
index 0000000..bef8674
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr103052.c
@@ -0,0 +1,35 @@
+static void js_error(void);
+static int top;
+static void js_throw(void)
+{
+ __builtin_exit(0);
+}
+
+// LOCATION A -- if js_pop is here, the bug is present
+static void js_pop(void)
+{
+ if (++top > 100)
+ js_error();
+}
+
+static void jsC_error(const char *v)
+{
+ if (v[0] == 0)
+ js_error();
+ js_throw();
+}
+static void checkfutureword(const char *exp)
+{
+ if (!__builtin_strcmp(exp, "const"))
+ jsC_error("boom");
+}
+static void js_error(void) {
+ checkfutureword("foo");
+ checkfutureword("bar");
+ js_pop();
+}
+int main(void)
+{
+ checkfutureword("const");
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr103209.c b/gcc/testsuite/gcc.c-torture/execute/pr103209.c
new file mode 100644
index 0000000..4816893
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr103209.c
@@ -0,0 +1,36 @@
+#include <stdio.h>
+#include <stdint.h>
+
+int32_t a[6];
+int64_t b;
+int32_t *c;
+int32_t **d = &c;
+int64_t *e = &b;
+int32_t **const *f = &d;
+int32_t **const **g = &f;
+int32_t *h();
+static int16_t j();
+static uint32_t k(int8_t, const int32_t *, int64_t);
+static uint32_t l() {
+ int32_t *m = &a[3];
+ int32_t n = 0;
+ int8_t o = 0;
+ int32_t *p[] = {&n, &n, &n, &n};
+ uint32_t q[6][1][2] = {};
+ for (o = 0; o <= 1; o = 6)
+ if (h(j(k(3, 0, q[2][0][0]), &n), n) == p[3])
+ *m = *e;
+ return 0;
+}
+int32_t *h(uint32_t, int32_t) { return ***g; }
+int16_t j(uint32_t, int32_t *r) { **f = r; return 0;}
+uint32_t k(int8_t, const int32_t *, int64_t) { *e = 3; return 0;}
+int main() {
+ int i = 0;
+ l();
+ for (i = 0; i < 6; i++){
+ if (i == 3 && a[i] != 3)
+ __builtin_abort ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr103255.c b/gcc/testsuite/gcc.c-torture/execute/pr103255.c
new file mode 100644
index 0000000..d74b054
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr103255.c
@@ -0,0 +1,41 @@
+/* PR tree-optimization/103255 */
+
+struct H
+{
+ unsigned a;
+ unsigned b;
+ unsigned c;
+};
+
+#if __SIZEOF_POINTER__ >= 4
+#define ADDR 0x400000
+#else
+#define ADDR 0x4000
+#endif
+#define OFF 0x20
+
+int
+main ()
+{
+ struct H *h = 0;
+ unsigned long o;
+ volatile int t = 1;
+
+ for (o = OFF; o <= OFF; o += 0x1000)
+ {
+ struct H *u;
+ u = (struct H *) (ADDR + o);
+ if (t)
+ {
+ h = u;
+ break;
+ }
+ }
+
+ if (h == 0)
+ return 0;
+ unsigned *tt = &h->b;
+ if ((__SIZE_TYPE__) tt != (ADDR + OFF + __builtin_offsetof (struct H, b)))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr103376.c b/gcc/testsuite/gcc.c-torture/execute/pr103376.c
new file mode 100644
index 0000000..22e2019
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr103376.c
@@ -0,0 +1,29 @@
+/* PR tree-optimization/103376 */
+
+long long a = 0x123456789abcdef0LL, f;
+int b, c, *d;
+
+__attribute__((noipa)) void
+foo (int x)
+{
+ asm volatile ("" : : "r" (x));
+}
+
+int
+main ()
+{
+ long long e;
+ e = a;
+ if (b)
+ {
+ foo (c);
+ d = (int *) 0;
+ while (*d)
+ ;
+ }
+ f = a ^ e;
+ asm volatile ("" : "+m" (f));
+ if (f != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr103405.c b/gcc/testsuite/gcc.c-torture/execute/pr103405.c
new file mode 100644
index 0000000..f6005dc
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr103405.c
@@ -0,0 +1,37 @@
+typedef __SIZE_TYPE__ size_t;
+void *malloc(size_t);
+
+static inline int *starter(int a)
+{
+ int *b = malloc(sizeof(int));
+ *b = a;
+ return b;
+}
+
+static inline _Bool equal(int *l, int *r)
+{
+ if (l == 0)
+ __builtin_abort();
+ if (r == 0)
+ __builtin_abort();
+ return *r == *l;
+}
+
+int main(void)
+{
+ int *i;
+ int *j;
+ void check(_Bool a)
+ {
+ _Bool t = equal(i, j);
+ if (a && t) __builtin_abort ();
+ _Bool t1 = equal(i, j);
+ if (!a && !t1) __builtin_abort ();
+ }
+ i = starter(1);
+ j = starter(0);
+ check(1);
+ i = starter(0);
+ check(0);
+
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr103417.c b/gcc/testsuite/gcc.c-torture/execute/pr103417.c
new file mode 100644
index 0000000..0fef890
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr103417.c
@@ -0,0 +1,11 @@
+/* PR tree-optimization/103417 */
+
+struct { int a : 8; int b : 24; } c = { 0, 1 };
+
+int
+main ()
+{
+ if (c.b && !c.b)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr10352-1.c b/gcc/testsuite/gcc.c-torture/execute/pr10352-1.c
new file mode 100644
index 0000000..babb9d4
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr10352-1.c
@@ -0,0 +1,12 @@
+/* this is another case where phiopt
+ would create -signed1bit which is undefined. */
+struct {
+ int a:1;
+} b;
+int *c = (int *)&b, d;
+int main() {
+ d = c && (b.a = (d < 0) ^ 3);
+ if (d != 1)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr104196.c b/gcc/testsuite/gcc.c-torture/execute/pr104196.c
new file mode 100644
index 0000000..80f267a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr104196.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/104196 */
+
+int a = 6;
+
+int
+main ()
+{
+ while (1)
+ {
+ int b = a < 0 && 0 < -__INT_MAX__ - a ? 0 : a;
+ if (b != 4096 - __INT_MAX__)
+ {
+ if (a < 6)
+ __builtin_abort ();
+ break;
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp b/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp
index 5c8c162..da573ec 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 1993-2022 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-selftests/dg-final.exp b/gcc/testsuite/gcc.dg-selftests/dg-final.exp
index 534c241..7fadeb4 100644
--- a/gcc/testsuite/gcc.dg-selftests/dg-final.exp
+++ b/gcc/testsuite/gcc.dg-selftests/dg-final.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2021 Free Software Foundation, Inc.
+# Copyright (C) 2018-2022 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/20021029-1.c b/gcc/testsuite/gcc.dg/20021029-1.c
index d13f669..f5ddecb 100644
--- a/gcc/testsuite/gcc.dg/20021029-1.c
+++ b/gcc/testsuite/gcc.dg/20021029-1.c
@@ -2,6 +2,7 @@
variables into writable sections. */
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic" } */
+/* { dg-additional-options "-G0" { target nios2-*-* } } */
/* { dg-final { scan-assembler-not ".data.rel.ro.local" } } */
/* { dg-final { scan-assembler-symbol-section {^_?ar} {^\.(const|rodata)|\[RO\]} } } */
/* { dg-require-effective-target label_values } */
diff --git a/gcc/testsuite/gcc.dg/README b/gcc/testsuite/gcc.dg/README
index 1c8c1c7..d7d2492 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-2021 Free Software Foundation, Inc.
+Copyright (C) 1997-2022 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/Walloca-larger-than-4.c b/gcc/testsuite/gcc.dg/Walloca-larger-than-4.c
index 9d4c4e8..aac8b97 100644
--- a/gcc/testsuite/gcc.dg/Walloca-larger-than-4.c
+++ b/gcc/testsuite/gcc.dg/Walloca-larger-than-4.c
@@ -1,6 +1,7 @@
/* PR middle-end/100425 - missing -Walloca-larger-than with -O0
{ dg-do compile }
- { dg-options "-O0 -Wall -Walloca-larger-than=128" } */
+ { dg-options "-O0 -Wall -Walloca-larger-than=128" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/Walways-true-2.c b/gcc/testsuite/gcc.dg/Walways-true-2.c
index 7f0bb7b..ae3262b 100644
--- a/gcc/testsuite/gcc.dg/Walways-true-2.c
+++ b/gcc/testsuite/gcc.dg/Walways-true-2.c
@@ -9,7 +9,7 @@
extern int foo (int) __attribute__ ((weak));
-int i __attribute__ ((weak));
+extern int i __attribute__ ((weak));
void
bar (int a)
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-48.c b/gcc/testsuite/gcc.dg/Warray-bounds-48.c
index 19b7634c..775b301 100644
--- a/gcc/testsuite/gcc.dg/Warray-bounds-48.c
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-48.c
@@ -30,7 +30,7 @@ static void nowarn_ax_extern (struct AX *p)
static void warn_ax_local_buf (struct AX *p)
{
- p->ax[0] = 4; p->ax[1] = 5; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v2hi_store && { ! vect_slp_v4hi_store } } } }
+ p->ax[0] = 4; p->ax[1] = 5; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v2hi_store_align && { ! vect_slp_v4hi_store_unalign } } } }
p->ax[2] = 6; // { dg-warning "\\\[-Warray-bounds" }
p->ax[3] = 7; // { dg-warning "\\\[-Warray-bounds" }
@@ -130,7 +130,7 @@ static void warn_a0_extern (struct A0 *p)
static void warn_a0_local_buf (struct A0 *p)
{
- p->a0[0] = 4; p->a0[1] = 5; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v2hi_store && { ! vect_slp_v4hi_store } } } }
+ p->a0[0] = 4; p->a0[1] = 5; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v2hi_store_align && { ! vect_slp_v4hi_store_unalign } } } }
p->a0[2] = 6; // { dg-warning "\\\[-Warray-bounds" }
p->a0[3] = 7; // { dg-warning "\\\[-Warray-bounds" }
@@ -212,6 +212,7 @@ void test_a0 (struct A0 *p, unsigned n)
struct A1
{
int32_t n;
+ __attribute__ ((aligned (4)))
int16_t a1[1]; // { dg-message "while referencing 'a1'" }
};
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-51.c b/gcc/testsuite/gcc.dg/Warray-bounds-51.c
index 8b589f3..7519b0f 100644
--- a/gcc/testsuite/gcc.dg/Warray-bounds-51.c
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-51.c
@@ -39,7 +39,7 @@ void test_struct_char_vla_location (void)
} s;
s.cvla[0] = __LINE__;
- s.cvla[nelts - 1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v2qi_store } } }
+ s.cvla[nelts - 1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v2qi_store_align } } }
s.cvla[nelts] = 0; // { dg-warning "\\\[-Warray-bounds" }
sink (&s);
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-91.c b/gcc/testsuite/gcc.dg/Warray-bounds-91.c
new file mode 100644
index 0000000..1c81091
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-91.c
@@ -0,0 +1,145 @@
+/* PR middle-end/103215 - bogus -Warray-bounds with two pointers with
+ different offsets each
+ Test for accesses into the same array through pointers with different
+ offsets each.
+ { dg-do compile }
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+
+#define NOIPA __attribute__ ((noipa))
+
+#define A(p, off) ((p)[off] = __COUNTER__)
+
+extern int a4[4];
+
+
+NOIPA void p0_p1 (int i)
+{
+ int *p0 = a4 + 0;
+ int *p1 = a4 + 1;
+ int *q = i ? p0 : p1;
+ A (q, -2); // { dg-warning "-Warray-bounds" }
+ A (q, -1); A (q, 0); A (q, 1); A (q, 2);
+ /* Since q points to a4 and -1 is a valid subscript, +3 must be invalid.
+ But the warning for each subscript is independent of prior subscripts
+ into the same object. That should be improved. */
+ A (q, 3); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Warray-bounds" }
+}
+
+NOIPA void p1_p0 (int i)
+{
+ int *p1 = a4 + 1;
+ int *p0 = a4 + 0;
+ int *q = i ? p0 : p1;
+ A (q, -2); // { dg-warning "-Warray-bounds" }
+ A (q, -1); A (q, 0); A (q, 1); A (q, 2);
+ A (q, 3); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Warray-bounds" }
+}
+
+
+NOIPA void p1_p2 (int i)
+{
+ int *p1 = a4 + 1;
+ int *p2 = a4 + 2;
+ int *q = i ? p1 : p2;
+ A (q, -3); // { dg-warning "-Warray-bounds" }
+ A (q, -2); A (q, -1); A (q, 0); A (q, 1);
+ A (q, 2); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Warray-bounds" }
+}
+
+NOIPA void p2_p1 (int i)
+{
+ int *p2 = a4 + 2;
+ int *p1 = a4 + 1;
+ int *q = i ? p1 : p2;
+ A (q, -3); // { dg-warning "-Warray-bounds" }
+ A (q, -2); A (q, -1); A (q, 0); A (q, 1);
+ A (q, 2); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Warray-bounds" }
+}
+
+
+NOIPA void p1_p3 (int i)
+{
+ int *p1 = a4 + 1;
+ int *p3 = a4 + 3;
+ int *q = i ? p1 : p3;
+ A (q, -4); // { dg-warning "-Warray-bounds" }
+ A (q, -3); A (q, -2); A (q, -1); A (q, 0);
+ A (q, 1); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Warray-bounds" }
+}
+
+NOIPA void p3_p1 (int i)
+{
+ int *p3 = a4 + 3;
+ int *p1 = a4 + 1;
+ int *q = i ? p1 : p3;
+ A (q, -4); // { dg-warning "-Warray-bounds" }
+ A (q, -3); A (q, -2); A (q, -1); A (q, 0);
+ A (q, 1); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Warray-bounds" }
+}
+
+
+NOIPA void p1_p4 (int i)
+{
+ int *p1 = a4 + 1;
+ int *p4 = a4 + 4;
+ int *q = i ? p1 : p4;
+ A (q, -5); // { dg-warning "-Warray-bounds" }
+ A (q, -4); A (q, -3); A (q, -2); A (q, -1);
+ A (q, 0); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 1); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Warray-bounds" }
+}
+
+NOIPA void p4_p1 (int i)
+{
+ int *p4 = a4 + 4;
+ int *p1 = a4 + 1;
+ int *q = i ? p1 : p4;
+ A (q, -5); // { dg-warning "-Warray-bounds" }
+ A (q, -4); A (q, -3); A (q, -2); A (q, -1);
+ A (q, 0); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 1); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Warray-bounds" }
+}
+
+
+NOIPA void p0_p1_p2 (int i)
+{
+ int *p0 = a4 + 0;
+ int *p1 = a4 + 1;
+ int *p2 = a4 + 2;
+ int *q = i < 0 ? p1 : 0 < i ? p2 : p0;
+ A (q, -3); // { dg-warning "-Warray-bounds" }
+ A (q, -2); A (q, -1); A (q, 0); A (q, 1);
+ A (q, 2); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Warray-bounds" }
+}
+
+
+NOIPA void p0_p1_p2_p3_p4 (int i)
+{
+ int *p0 = a4 + 0;
+ int *p1 = a4 + 1;
+ int *p2 = a4 + 2;
+ int *p3 = a4 + 3;
+ int *p4 = a4 + 4;
+ int *q = i < -1 ? p1 : i < 0 ? p2 : 1 < i ? p4 : 0 < i ? p3 : p0;
+ A (q, -5); // { dg-warning "-Warray-bounds" }
+ A (q, -4); A (q, -3); A (q, -2); A (q, -1);
+ A (q, 0); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 1); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Warray-bounds" }
+}
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-92.c b/gcc/testsuite/gcc.dg/Warray-bounds-92.c
new file mode 100644
index 0000000..8c8f5f7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-92.c
@@ -0,0 +1,149 @@
+/* PR middle-end/103215 - bogus -Warray-bounds with two pointers with
+ different offsets each
+ Test for accesses into distinct arrays through pointers with different
+ offsets each.
+
+ If/when -Warray-bounds is enhanced to issue "maybe" kinds of warnings
+ some of the accesses here will trigger those and will need updating.
+
+ { dg-do compile }
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+
+#define NOIPA __attribute__ ((noipa))
+
+#define A(p, off) ((p)[off] = __COUNTER__)
+
+extern int a4[4], a8[8];
+
+
+NOIPA void a4_p1_a8_p3 (int i)
+{
+ int *a4_p1 = a4 + 1;
+ int *a8_p3 = a8 + 3;
+ int *q = i ? a4_p1 : a8_p3;
+ A (q, -4); // { dg-warning "-Warray-bounds" }
+ /* Because -3 is a valid offset into a8 but not a4, q must point
+ to the former and so subscripts between -3 and +4 refer to its
+ elements. */
+ A (q, -3); A (q, -2); A (q, -1); A (q, 0);
+ A (q, 1); A (q, 2); A (q, 3); A (q, 4);
+ A (q, 5); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ /* Both of the following are definitely out of bounds but the first isn't
+ diagnosed because the code conservatively merges the offsets into A4
+ and A8. */
+ A (q, 7); // { dg-warning "-Warray-bounds" }
+}
+
+
+NOIPA void a4_p1_a8_p5 (int i)
+{
+ int *a4_p1 = a4 + 1;
+ int *a8_p5 = a8 + 5;
+ int *q = i ? a4_p1 : a8_p5;
+ A (q, -6); // { dg-warning "-Warray-bounds" }
+ /* Similarly to the above, because -5 is a valid offset into a8 but
+ not a4, q must point to the former and so subscripts between -5
+ and +2 refer to its elements. */
+ A (q, -5); A (q, -4); A (q, -3); A (q, -2);
+ A (q, -1); A (q, 0); A (q, 1); A (q, 2);
+ A (q, 3); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 7); // { dg-warning "-Warray-bounds" }
+}
+
+
+NOIPA void a4_p1_a8_p7 (int i)
+{
+ int *a4_p1 = a4 + 1;
+ int *a8_p7 = a8 + 7;
+ int *q = i ? a4_p1 : a8_p7;
+ A (q, -8); // { dg-warning "-Warray-bounds" }
+ A (q, -7); A (q, -6); A (q, -5); A (q, -4);
+ A (q, -3); A (q, -2); A (q, -1); A (q, 0);
+ /* Since -7 is valid, q must point to a8 and the last valid subscript
+ must be 0. */
+ A (q, 1); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 7); // { dg-warning "-Warray-bounds" }
+}
+
+
+NOIPA void mp_1_a4_p1_a8_p7 (int i, int j)
+{
+ int *a4_p1 = a4 + 1;
+ int *a8_p7 = a8 + 7;
+ int *p = i ? a4_p1 : a8_p7;
+ int *q = j ? p + 1 : p - 1;
+
+ A (q, -9); // { dg-warning "-Warray-bounds" }
+
+ /* q points either to a8 + [6, 8] or a4 + [0, 2]. */
+ A (q, -8); A (q, -7); A (q, -6); A (q, -5);
+ A (q, -4); A (q, -3); A (q, -2); A (q, -1);
+
+ /* Since all the above are valid, q must point to a8 + 8. But as
+ mentioned above, the warning for each subscript is independent
+ of prior subscripts into the same object so the access below
+ aren't diagnosed. */
+ A (q, 0); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 1); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 8); // { dg-warning "-Warray-bounds" }
+}
+
+
+NOIPA void mp1_a4_p1_a8_p5 (int i, int j)
+{
+ int *a4_p1 = a4 + 1;
+ int *a8_p5 = a8 + 5;
+ int *p = i ? a4_p1 : a8_p5;
+
+ int *q = j ? p + 1 : p - 1;
+
+ // q is assumed to point to a8 + 6
+ A (q, -7); // { dg-warning "-Warray-bounds" }
+ A (q, -6); A (q, -5); A (q, -4); A (q, -3);
+ A (q, -2); A (q, -1); A (q, 0); A (q, 1);
+ /* Even though the above accesses rule it out, q is now assumed
+ to point to either a4 + [0, 2] or a8 + [4, 5]. */
+ A (q, 2);
+ /* q is now assumed to point tp a4. Given that, only the first store
+ is valid. */
+ A (q, 3); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 5); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 6); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 7); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 8); // { dg-warning "-Warray-bounds" }
+}
+
+
+NOIPA void mp1_a4_p1_a8_p4 (int i, int j)
+{
+ int *a4_p1 = a4 + 1;
+ int *a8_p4 = a8 + 4;
+ int *p = i ? a4_p1 : a8_p4;
+
+ int *q = j ? p + 1 : p - 1;
+
+ // q is assumed to point to a8 + 5
+ A (q, -6); // { dg-warning "-Warray-bounds" }
+ A (q, -5);
+ A (q, -4);
+ A (q, -3);
+ A (q, -2);
+ A (q, -1);
+ A (q, 0);
+ A (q, 1);
+ A (q, 2);
+ /* Even though the above accesses rule it out, q is now assumed
+ to point tp a4. Given that, only the first store is valid. */
+ A (q, 3); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 5); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 6); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 7); // { dg-warning "-Warray-bounds" "pr??????" { xfail *-*-* } }
+ A (q, 8); // { dg-warning "-Warray-bounds" }
+}
diff --git a/gcc/testsuite/gcc.dg/Warray-parameter-10.c b/gcc/testsuite/gcc.dg/Warray-parameter-10.c
new file mode 100644
index 0000000..378f8af
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Warray-parameter-10.c
@@ -0,0 +1,20 @@
+/* PR c/102759 - ICE calling a function taking an argument redeclared
+ without a prototype.
+ { dg-do compile }
+ { dg-options "-Wall" } */
+
+void f (void)
+{
+ void gia (int[2]);
+ void g ();
+}
+
+/* Redeclaring the g(int[]) above without a prototype loses it. */
+void gia ();
+void g (int[2]);
+
+void h (void )
+{
+ gia (gia);
+ gia (g);
+}
diff --git a/gcc/testsuite/gcc.dg/Warray-parameter-11.c b/gcc/testsuite/gcc.dg/Warray-parameter-11.c
new file mode 100644
index 0000000..8ca1b55
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Warray-parameter-11.c
@@ -0,0 +1,24 @@
+/* PR c/101702 - ICE on invalid function redeclaration
+ { dg-do compile }
+ { dg-options "-Wall" } */
+
+typedef __INTPTR_TYPE__ intptr_t;
+
+#define copysign(x, y) __builtin_copysign (x, y)
+
+void f0 (double[!copysign (~2, 3)]);
+
+void f1 (double[!copysign (~2, 3)]);
+void f1 (double[1]); // { dg-warning "-Warray-parameter" }
+
+void f2 (int[(int)+1.0]);
+void f2 (int[(int)+1.1]);
+
+/* Also verify that equivalent expressions don't needlessly cause false
+ positives or negatives. */
+struct S { int a[1]; };
+extern struct S *sp;
+
+void f3 (int[(intptr_t)((char*)sp->a - (char*)sp)]);
+void f3 (int[(intptr_t)((char*)&sp->a[0] - (char*)sp)]);
+void f3 (int[(intptr_t)((char*)&sp->a[1] - (char*)sp)]); // { dg-warning "-Warray-parameter" }
diff --git a/gcc/testsuite/gcc.dg/Warray-parameter-3.c b/gcc/testsuite/gcc.dg/Warray-parameter-3.c
index b6ed8da..b888511 100644
--- a/gcc/testsuite/gcc.dg/Warray-parameter-3.c
+++ b/gcc/testsuite/gcc.dg/Warray-parameter-3.c
@@ -77,7 +77,7 @@ gia3 (int a[3])
__attribute__ ((noipa)) void
gcas3 (char a[static 3])
{
- a[0] = 0; a[1] = 1; a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v4qi_store } } }
+ a[0] = 0; a[1] = 1; a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v4qi_store_unalign } } }
a[3] = 3; // { dg-warning "\\\[-Warray-bounds" }
}
diff --git a/gcc/testsuite/gcc.dg/Wdangling-pointer-2.c b/gcc/testsuite/gcc.dg/Wdangling-pointer-2.c
new file mode 100644
index 0000000..0170263
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wdangling-pointer-2.c
@@ -0,0 +1,82 @@
+/* Exercise conditional C-only uses of dangling pointers with optimization.
+ { dg-do compile }
+ { dg-options "-O2 -Wall" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+extern void* memchr (const void*, int, size_t);
+extern char* strchr (const char*, int);
+
+void sink (void*, ...);
+
+
+void nowarn_compound_literal (int i, int j)
+{
+ {
+ int *p = i ? (int[]){ 1, 2, 3 } : (int[]){ 4, 5, 6 };
+ sink (p);
+ }
+ {
+ int a[] = { 1, 2, 3 };
+ int *q = i ? (int[]){ 4, 5, 6 } : a;
+ int *p = &q[1];
+ sink (p);
+ }
+ {
+ int *p = i ? (int[]){ 1, 2, 3 } : (int[]){ 4, 5, 6 };
+ int *q = __builtin_memchr (p, 2, 3 * sizeof *p);
+ sink (q);
+ }
+ {
+ int a[] = { i, i + 1, i + 2, 3 };
+ int *p = i ? (int[]){ j, j + 1, j + 2, 3 } : a;
+ int *q = __builtin_memchr (p, 3, 4 * sizeof *p);
+ sink (q);
+ }
+}
+
+
+void warn_maybe_compound_literal (int i, int j)
+{
+ int a[] = { 1, 2, 3 }, *p;
+ {
+ p = i ? (int[]){ 4, 5, 6 } : a;
+ }
+ // When the 'p' is optimized away it's not mentioned in the warning.
+ sink (p); // { dg-warning "dangling pointer \('p' \)?to an unnamed temporary may be used" }
+}
+
+
+void warn_maybe_compound_literal_memchr (int i, int j, int x)
+{
+ int a[] = { 1, 2, 3 }, *p;
+ {
+ int *q = i ? (int[]){ 4, 5, 6 } : a;
+ p = memchr (q, x, 3 * sizeof *q);
+ }
+ sink (p); // { dg-warning "dangling pointer 'p' to an unnamed temporary may be used" }
+}
+
+
+void warn_maybe_array (int i, int j)
+{
+ int a[] = { 1, 2, 3 }, *p;
+ {
+ int b[] = { 4, 5, 6 };
+ p = i ? a : b;
+ }
+ // When the 'p' is optimized away it's not mentioned in the warning.
+ sink (p); // { dg-warning "dangling pointer \('p' \)?to 'b' may be used" }
+}
+
+
+void warn_maybe_array_memchr (int i, int j, int x)
+{
+ int a[] = { 1, 2, 3 }, *p;
+ {
+ int b[] = { 4, 5, 6 };
+ int *q = i ? a : b;
+ p = memchr (q, x, 3 * sizeof *q);
+ }
+ sink (p); // { dg-warning "dangling pointer 'p' to 'b' may be used" }
+}
diff --git a/gcc/testsuite/gcc.dg/Wdangling-pointer.c b/gcc/testsuite/gcc.dg/Wdangling-pointer.c
new file mode 100644
index 0000000..89e2220
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wdangling-pointer.c
@@ -0,0 +1,76 @@
+/* Exercise basic C-only cases of -Wdangling-pointer.
+ { dg-do compile }
+ { dg-options "-O0 -Wall" }
+ { dg-require-effective-target alloca } */
+
+typedef __SIZE_TYPE__ size_t;
+
+extern void* memchr (const void*, int, size_t);
+extern char* strchr (const char*, int);
+
+void sink (const void*, ...);
+
+
+void nowarn_compound_literal (int i)
+{
+ {
+ int *p = (int[]){ 1, 2, 3 };
+ sink (p);
+ }
+ {
+ int *q = (int[]){ 1, 2, 3 };
+ int *p = &q[1];
+ sink (p);
+ }
+ {
+ int *p = __builtin_memchr ((int[]){ 1, 2, 3 }, 2, 3 * sizeof *p);
+ sink (p);
+ }
+ {
+ int *p = __builtin_memchr ((int[]){ i, i + 1 }, 3, 2 * sizeof *p);
+ sink (p);
+ }
+}
+
+
+void warn_compound_literal (int i)
+{
+ int *p;
+ {
+ p = (int[]){ 1, 2, 3 }; // { dg-message "unnamed temporary" },
+ }
+ sink (p); // { dg-warning "using dangling pointer 'p' to an unnamed temporary" }
+
+ {
+ int *q =
+ (int[]){ 1, 2, 3 }; // { dg-message "unnamed temporary" },
+ p = &q[1];
+ }
+ sink (p); // { dg-warning "using dangling pointer 'p' to an unnamed temporary" }
+ {
+ p = (int*)memchr (
+ (int[]){ 1, 2, 3 }, // { dg-message "unnamed temporary" }
+ 2, 3 * sizeof *p);
+ }
+ sink (p); // { dg-warning "using dangling pointer 'p' to an unnamed temporary" }
+
+ {
+ p = (int*)memchr (
+ (int[]){ i, i + 1 },// { dg-message "unnamed temporary" }
+ 3, 2 * sizeof *p);
+ }
+ sink (p); // { dg-warning "using dangling pointer 'p' to an unnamed temporary" }
+}
+
+
+void warn_store_compound_literal (int **p)
+{
+ int *q = (int[]) { 1, 2, 3 };
+ p[0] = q; // { dg-warning "storing the address" }
+}
+
+void warn_store_vla (int n, int **p)
+{
+ int a[n];
+ p[1] = &a[1]; // { dg-warning "-Wdangling-pointer" "pr??????" { xfail *-*-* } }
+}
diff --git a/gcc/testsuite/gcc.dg/Wfree-nonheap-object-2.c b/gcc/testsuite/gcc.dg/Wfree-nonheap-object-2.c
index 2b00d77..e9316a5 100644
--- a/gcc/testsuite/gcc.dg/Wfree-nonheap-object-2.c
+++ b/gcc/testsuite/gcc.dg/Wfree-nonheap-object-2.c
@@ -2,7 +2,8 @@
Verify that attempting to reallocate unallocated objects referenced
either directly or through pointers is diagnosed.
{ dg-do compile }
- { dg-options "-O2 -Wall -Wfree-nonheap-object" } */
+ { dg-options "-O2 -Wall -Wfree-nonheap-object" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/Wfree-nonheap-object.c b/gcc/testsuite/gcc.dg/Wfree-nonheap-object.c
index bb222cc..c7c6680 100644
--- a/gcc/testsuite/gcc.dg/Wfree-nonheap-object.c
+++ b/gcc/testsuite/gcc.dg/Wfree-nonheap-object.c
@@ -3,7 +3,8 @@
or through pointers is diagnosed. In most cases this doesn't require
optimization.
{ dg-do compile }
- { dg-options "-Wall -Wfree-nonheap-object" } */
+ { dg-options "-Wall -Wfree-nonheap-object" }
+ { dg-require-effective-target alloca } */
typedef __INTPTR_TYPE__ intptr_t;
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/Winfinite-recursion-2.c b/gcc/testsuite/gcc.dg/Winfinite-recursion-2.c
new file mode 100644
index 0000000..2348312
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Winfinite-recursion-2.c
@@ -0,0 +1,252 @@
+/* PR middle-end/88232 - Please implement -Winfinite-recursion
+ Exercise warning with optimization. Same as -Winfinite-recursion.c
+ plus mutually recursive calls that depend on inlining.
+ { dg-do compile }
+ { dg-options "-O2 -Wall -Winfinite-recursion" } */
+
+#define NORETURN __attribute__ ((noreturn))
+
+typedef __SIZE_TYPE__ size_t;
+
+extern void abort (void);
+extern void exit (int);
+
+extern int ei;
+int (*pfi_v)(void);
+
+
+/* Make sure the warning doesn't assume every call has a DECL. */
+
+int nowarn_pfi_v (void)
+{
+ return pfi_v ();
+}
+
+
+int warn_fi_v (void) // { dg-warning "-Winfinite-recursion" }
+{
+ return warn_fi_v (); // { dg-message "recursive call" }
+}
+
+/* Verify #pragma suppression works. */
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Winfinite-recursion"
+
+int suppress_warn_fi_v (void)
+{
+ return warn_fi_v ();
+}
+
+#pragma GCC diagnostic pop
+
+int nowarn_fi_v (void)
+{
+ if (ei++ == 0)
+ return nowarn_fi_v ();
+ return 0;
+}
+
+
+int warn_if_i (int i) // { dg-warning "-Winfinite-recursion" }
+{
+ if (i > 0)
+ return warn_if_i (--i); // { dg-message "recursive call" }
+ else if (i < 0)
+ return warn_if_i (-i); // { dg-message "recursive call" }
+ else
+ return warn_if_i (7); // { dg-message "recursive call" }
+}
+
+
+int nowarn_if_i (int i)
+{
+ if (i > 0)
+ return nowarn_if_i (--i);
+ else if (i < 0)
+ return nowarn_if_i (-i);
+ else
+ return -1;
+}
+
+int nowarn_switch (int i, int a[])
+{
+ switch (i)
+ {
+ case 0: return nowarn_switch (a[3], a + 1);
+ case 1: return nowarn_switch (a[5], a + 2);
+ case 2: return nowarn_switch (a[7], a + 3);
+ case 3: return nowarn_switch (a[9], a + 4);
+ }
+ return 77;
+}
+
+int warn_switch (int i, int a[]) // { dg-warning "-Winfinite-recursion" }
+{
+ switch (i)
+ {
+ case 0: return warn_switch (a[3], a + 1);
+ case 1: return warn_switch (a[5], a + 2);
+ case 2: return warn_switch (a[7], a + 3);
+ case 3: return warn_switch (a[9], a + 4);
+ default: return warn_switch (a[1], a + 5);
+ }
+}
+
+NORETURN void fnoreturn (void);
+
+/* Verify there's no warning for a function that doesn't return. */
+int nowarn_call_noret (void)
+{
+ fnoreturn ();
+}
+
+int warn_call_noret_r (void) // { dg-warning "-Winfinite-recursion" }
+{
+ warn_call_noret_r (); // { dg-message "recursive call" }
+ fnoreturn ();
+}
+
+/* Verify a warning even though the abort() call would prevent the infinite
+ recursion. There's no good way to tell the two cases apart and letting
+ a simple abort prevent the warning would make it ineffective in cases
+ where it's the result of assert() expansion and not meant to actually
+ prevent recursion. */
+
+int
+warn_noret_call_abort_r (char *s, int n) // { dg-warning "-Winfinite-recursion" }
+{
+ if (!s)
+ abort ();
+
+ if (n > 7)
+ abort ();
+
+ return n + warn_noret_call_abort_r (s, n - 1); // { dg-message "recursive call" }
+}
+
+/* Verify that a warning is not issued for an apparently infinitely
+ recursive function like the one above where the recursion would be
+ prevented by a call to a noreturn function if the recursive function
+ is itself declared noreturn. */
+
+NORETURN void nowarn_noret_call_abort_r (int n)
+{
+ if (n > 7)
+ abort ();
+
+ nowarn_noret_call_abort_r (n - 1);
+}
+
+int warn_call_abort_r (int n) // { dg-warning "-Winfinite-recursion" }
+{
+ n += warn_call_abort_r (n - 1); // { dg-message "recursive call" }
+ if (n > 7) // unreachable
+ abort ();
+ return n;
+}
+
+
+/* And again with exit() for good measure. */
+
+int warn_call_exit_r (int n) // { dg-warning "-Winfinite-recursion" }
+{
+ n += warn_call_exit_r (n - 1); // { dg-message "recursive call" }
+ if (n > 7)
+ exit (0);
+ return n;
+}
+
+struct __jmp_buf_tag { };
+typedef struct __jmp_buf_tag jmp_buf[1];
+
+extern jmp_buf jmpbuf;
+
+/* A call to longjmp() breaks infinite recursion. Verify it suppresses
+ the warning. */
+
+int nowarn_call_longjmp_r (int n)
+{
+ if (n > 7)
+ __builtin_longjmp (jmpbuf, 1);
+ return n + nowarn_call_longjmp_r (n - 1);
+}
+
+int warn_call_longjmp_r (int n) // { dg-warning "-Winfinite-recursion" }
+{
+ n += warn_call_longjmp_r (n - 1); // { dg-message "recursive call" }
+ if (n > 7)
+ __builtin_longjmp (jmpbuf, 1);
+ return n;
+}
+
+
+struct __sigjmp_buf_tag { };
+typedef struct __sigjmp_buf_tag sigjmp_buf[1];
+
+extern sigjmp_buf sigjmpbuf;
+
+/* GCC has no __builtin_siglongjmp(). */
+extern void siglongjmp (sigjmp_buf, int);
+
+/* A call to longjmp() breaks infinite recursion. Verify it suppresses
+ the warning. */
+
+int nowarn_call_siglongjmp_r (int n)
+{
+ if (n > 7)
+ siglongjmp (sigjmpbuf, 1);
+ return n + nowarn_call_siglongjmp_r (n - 1);
+}
+
+
+int nowarn_while_do_call_r (int n)
+{
+ int z = 0;
+ while (n)
+ z += nowarn_while_do_call_r (n--);
+ return z;
+}
+
+int warn_do_while_call_r (int n) // { dg-warning "-Winfinite-recursion" }
+{
+ int z = 0;
+ do
+ z += warn_do_while_call_r (n); // { dg-message "recursive call" }
+ while (--n);
+ return z;
+}
+
+
+/* Verify warnings for a naive replacement of a built-in fucntion. */
+
+void* malloc (size_t n) // { dg-warning "-Winfinite-recursion" }
+{
+ size_t *p =
+ (size_t*)__builtin_malloc (n + sizeof n); // { dg-message "recursive call" }
+ *p = n;
+ return p + 1;
+}
+
+
+int nowarn_fact (int n)
+{
+ return n ? n * nowarn_fact (n - 1) : 1;
+}
+
+
+static int fi_v (void);
+
+/* It would seem preferable to issue the warning for the extern function
+ but as it happens it's the static function that's inlined into a recursive
+ call to itself and warn_call_fi_v() expands to a call to it. */
+
+int warn_call_fi_v (void) // { dg-warning "-Winfinite-recursion" "" { xfail *-*-* } }
+{
+ return fi_v (); // { dg-message "recursive call" }
+}
+
+static int fi_v (void) // { dg-warning "-Winfinite-recursion" }
+{
+ return warn_call_fi_v ();
+}
diff --git a/gcc/testsuite/gcc.dg/Winfinite-recursion.c b/gcc/testsuite/gcc.dg/Winfinite-recursion.c
new file mode 100644
index 0000000..e325356
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Winfinite-recursion.c
@@ -0,0 +1,227 @@
+/* PR middle-end/88232 - Please implement -Winfinite-recursion
+ Verify simple cases without optimization.
+ { dg-do compile }
+ { dg-options "-Wall -Winfinite-recursion" } */
+
+#define NORETURN __attribute__ ((noreturn))
+
+typedef __SIZE_TYPE__ size_t;
+
+extern void abort (void);
+extern void exit (int);
+
+extern int ei;
+int (*pfi_v)(void);
+
+
+/* Make sure the warning doesn't assume every call has a DECL. */
+
+int nowarn_pfi_v (void)
+{
+ return pfi_v ();
+}
+
+
+int warn_fi_v (void) // { dg-warning "-Winfinite-recursion" }
+{
+ return warn_fi_v (); // { dg-message "recursive call" }
+}
+
+/* Verify #pragma suppression works. */
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Winfinite-recursion"
+
+int suppress_warn_fi_v (void)
+{
+ return warn_fi_v ();
+}
+
+#pragma GCC diagnostic pop
+
+
+int nowarn_fi_v (void)
+{
+ if (ei++ == 0)
+ return nowarn_fi_v ();
+ return 0;
+}
+
+int warn_if_i (int i) // { dg-warning "-Winfinite-recursion" }
+{
+ if (i > 0)
+ return warn_if_i (--i); // { dg-message "recursive call" }
+ else if (i < 0)
+ return warn_if_i (-i); // { dg-message "recursive call" }
+ else
+ return warn_if_i (7); // { dg-message "recursive call" }
+}
+
+
+int nowarn_if_i (int i)
+{
+ if (i > 0)
+ return nowarn_if_i (--i);
+ else if (i < 0)
+ return nowarn_if_i (-i);
+ else
+ return -1;
+}
+
+int nowarn_switch (int i, int a[])
+{
+ switch (i)
+ {
+ case 0: return nowarn_switch (a[3], a + 1);
+ case 1: return nowarn_switch (a[5], a + 2);
+ case 2: return nowarn_switch (a[7], a + 3);
+ case 3: return nowarn_switch (a[9], a + 4);
+ }
+ return 77;
+}
+
+int warn_switch (int i, int a[]) // { dg-warning "-Winfinite-recursion" }
+{
+ switch (i)
+ {
+ case 0: return warn_switch (a[3], a + 1);
+ case 1: return warn_switch (a[5], a + 2);
+ case 2: return warn_switch (a[7], a + 3);
+ case 3: return warn_switch (a[9], a + 4);
+ default: return warn_switch (a[1], a + 5);
+ }
+}
+
+NORETURN void fnoreturn (void);
+
+/* Verify there's no warning for a function that doesn't return. */
+int nowarn_call_noret (void)
+{
+ fnoreturn ();
+}
+
+int warn_call_noret_r (void) // { dg-warning "-Winfinite-recursion" }
+{
+ warn_call_noret_r (); // { dg-message "recursive call" }
+ fnoreturn ();
+}
+
+/* Verify a warning even though the abort() call would prevent the infinite
+ recursion. There's no good way to tell the two cases apart and letting
+ a simple abort prevent the warning would make it ineffective in cases
+ where it's the result of assert() expansion and not meant to actually
+ prevent recursion. */
+
+int
+warn_noret_call_abort_r (char *s, int n) // { dg-warning "-Winfinite-recursion" }
+{
+ if (!s)
+ abort ();
+
+ if (n > 7)
+ abort ();
+
+ return n + warn_noret_call_abort_r (s, n - 1); // { dg-message "recursive call" }
+}
+
+/* Verify that a warning is not issued for an apparently infinitely
+ recursive function like the one above where the recursion would be
+ prevented by a call to a noreturn function if the recursive function
+ is itself declared noreturn. */
+
+NORETURN void nowarn_noret_call_abort_r (int n)
+{
+ if (n > 7)
+ abort ();
+
+ nowarn_noret_call_abort_r (n - 1);
+}
+
+int warn_call_abort_r (int n) // { dg-warning "-Winfinite-recursion" }
+{
+ n += warn_call_abort_r (n - 1); // { dg-message "recursive call" }
+ if (n > 7) // unreachable
+ abort ();
+ return n;
+}
+
+
+/* And again with exit() for good measure. */
+
+int warn_call_exit_r (int n) // { dg-warning "-Winfinite-recursion" }
+{
+ n += warn_call_exit_r (n - 1); // { dg-message "recursive call" }
+ if (n > 7)
+ exit (0);
+ return n;
+}
+
+struct __jmp_buf_tag { };
+typedef struct __jmp_buf_tag jmp_buf[1];
+
+extern jmp_buf jmpbuf;
+
+/* A call to longjmp() breaks infinite recursion. Verify it suppresses
+ the warning. */
+
+int nowarn_call_longjmp_r (int n)
+{
+ if (n > 7)
+ __builtin_longjmp (jmpbuf, 1);
+ return n + nowarn_call_longjmp_r (n - 1);
+}
+
+int warn_call_longjmp_r (int n) // { dg-warning "-Winfinite-recursion" }
+{
+ n += warn_call_longjmp_r (n - 1); // { dg-message "recursive call" }
+ if (n > 7)
+ __builtin_longjmp (jmpbuf, 1);
+ return n;
+}
+
+
+struct __sigjmp_buf_tag { };
+typedef struct __sigjmp_buf_tag sigjmp_buf[1];
+
+extern sigjmp_buf sigjmpbuf;
+
+/* GCC has no __builtin_siglongjmp(). */
+extern void siglongjmp (sigjmp_buf, int);
+
+/* A call to longjmp() breaks infinite recursion. Verify it suppresses
+ the warning. */
+
+int nowarn_call_siglongjmp_r (int n)
+{
+ if (n > 7)
+ siglongjmp (sigjmpbuf, 1);
+ return n + nowarn_call_siglongjmp_r (n - 1);
+}
+
+
+int nowarn_while_do_call_r (int n)
+{
+ int z = 0;
+ while (n)
+ z += nowarn_while_do_call_r (n--);
+ return z;
+}
+
+int warn_do_while_call_r (int n) // { dg-warning "-Winfinite-recursion" }
+{
+ int z = 0;
+ do
+ z += warn_do_while_call_r (n); // { dg-message "recursive call" }
+ while (--n);
+ return z;
+}
+
+/* Verify warnings for a naive replacement of a built-in fucntion. */
+
+void* malloc (size_t n) // { dg-warning "-Winfinite-recursion" }
+{
+ size_t *p =
+ (size_t*)__builtin_malloc (n + sizeof n); // { dg-message "recursive call" }
+ *p = n;
+ return p + 1;
+}
diff --git a/gcc/testsuite/gcc.dg/Wmismatched-dealloc-2.c b/gcc/testsuite/gcc.dg/Wmismatched-dealloc-2.c
index 21a5ea7..c303d2f1 100644
--- a/gcc/testsuite/gcc.dg/Wmismatched-dealloc-2.c
+++ b/gcc/testsuite/gcc.dg/Wmismatched-dealloc-2.c
@@ -26,6 +26,7 @@ void dealloc (void*);
A (dealloc) void* alloc (int);
void sink (void*);
+void* source (void);
void test_alloc_A (void)
{
@@ -107,35 +108,35 @@ void test_realloc_A (void *ptr)
}
-void test_realloc (void *ptr)
+void test_realloc (void)
{
extern void free (void*);
extern void* realloc (void*, size_t);
{
- void *p = realloc (ptr, 1);
+ void *p = realloc (source (), 1);
p = realloc_A (p, 2);
__builtin_free (p);
}
{
- void *p = realloc (ptr, 2);
+ void *p = realloc (source (), 2);
p = realloc_A (p, 2);
free (p);
}
{
- void *p = realloc (ptr, 3);
+ void *p = realloc (source (), 3);
free (p);
}
{
- void *p = realloc (ptr, 4);
+ void *p = realloc (source (), 4);
__builtin_free (p);
}
{
- void *p = realloc (ptr, 5); // { dg-message "returned from 'realloc'" }
+ void *p = realloc (source (), 5); // { dg-message "returned from 'realloc'" }
dealloc (p); // { dg-warning "'dealloc' called on pointer returned from a mismatched allocation function" }
}
}
diff --git a/gcc/testsuite/gcc.dg/Wmismatched-dealloc-3.c b/gcc/testsuite/gcc.dg/Wmismatched-dealloc-3.c
index 5afcea3..3029006 100644
--- a/gcc/testsuite/gcc.dg/Wmismatched-dealloc-3.c
+++ b/gcc/testsuite/gcc.dg/Wmismatched-dealloc-3.c
@@ -157,6 +157,7 @@ void test_reallocarray (void *p)
}
{
+ p = source ();
void *q = realloc (p, 1);
q = reallocarray (q, 2, 3);
sink (q);
@@ -192,6 +193,7 @@ void test_reallocarray (void *p)
}
{
+ p = source ();
void *q = reallocarray (p, 7, 8);
q = __builtin_realloc (q, 9);
sink (q);
@@ -199,6 +201,7 @@ void test_reallocarray (void *p)
}
{
+ p = source ();
void *q = reallocarray (p, 7, 8);
q = realloc (q, 9);
sink (q);
@@ -206,6 +209,7 @@ void test_reallocarray (void *p)
}
{
+ p = source ();
void *q = reallocarray (p, 8, 9);
q = reallocarray (q, 3, 4);
sink (q);
@@ -213,6 +217,7 @@ void test_reallocarray (void *p)
}
{
+ p = source ();
void *q = reallocarray (p, 9, 10);
q = reallocarray (q, 3, 4);
sink (q);
diff --git a/gcc/testsuite/gcc.dg/Wobjsize-1.c b/gcc/testsuite/gcc.dg/Wobjsize-1.c
index 2bd2f93..988b8bc 100644
--- a/gcc/testsuite/gcc.dg/Wobjsize-1.c
+++ b/gcc/testsuite/gcc.dg/Wobjsize-1.c
@@ -7,11 +7,12 @@ char buf[6];
int main(int argc, char **argv)
{
- strcpy (buf,"hello "); /* { dg-warning "\\\[-Wstringop-overflow" } */
+ strcpy (buf,"hello ");
return 0;
}
-/* { dg-message "file included" "included" { target *-*-* } 0 }
+/* { dg-warning "\\\[-Wstringop-overflow" "warning" { target *-*-* } 0 }
+ { dg-message "file included" "included" { target *-*-* } 0 }
{ dg-message "inlined from" "inlined" { target *-*-* } 0 }
The test might emit two warnings, one for the strcpy call and
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-14.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-14.c
index c4a3f05..3d1d9e5 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-14.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-14.c
@@ -36,8 +36,8 @@ void test_memcpy_cond (int i)
void test_int16 (void)
{
char *p = a4 + 1;
- *(int16_t*)p = 0; // { dg-warning "writing 4 bytes into a region of size 3" "pr102706" { target { vect_slp_v2hi_store } } }
- *(int16_t*)(p + 2) = 0; // { dg-warning "writing 2 bytes into a region of size 1" "pr102706" { xfail { vect_slp_v2hi_store } } }
+ *(int16_t*)p = 0; // { dg-warning "writing 4 bytes into a region of size 3" "pr102706" { target { vect_slp_v2hi_store_unalign } } }
+ *(int16_t*)(p + 2) = 0; // { dg-warning "writing 2 bytes into a region of size 1" "pr102706" { xfail { vect_slp_v2hi_store_unalign } } }
}
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c
index 87f8462..f7dcb94 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c
@@ -29,8 +29,13 @@ void vla_bounded (int n)
a[0] = 0;
a[1] = 1;
+ a[31] = 31;
+
+ sink (&a);
+
a[n] = n; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" { xfail *-*-* } }
- a[69] = n; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" }
+ a[32] = 32; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" }
+ a[69] = 69; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" }
sink (&a);
}
@@ -56,8 +61,13 @@ void member_vla_bounded (int n)
s.a[0] = 0;
s.a[1] = 1;
+ s.a[31] = 31;
+
+ sink (&s);
+
s.a[n] = n; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" { xfail *-*-* } }
- s.a[69] = n; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" { xfail *-*-* } }
+ s.a[32] = 32; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" }
+ s.a[69] = 69; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" }
sink (&s);
}
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-21.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-21.c
index 3fccfc9..4cd3c1b 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-21.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-21.c
@@ -23,10 +23,10 @@ void test_store_zero_length (int i)
{
char a[3];
struct S0 *p = (struct S0*)a;
- p->a = 0; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v4qi_store } } }
+ p->a = 0; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v4qi_store_align } } }
p->b[0] = 0;
p->b[1] = 1; // { dg-bogus "\\\[-Wstringop-overflow" }
- p->b[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { xfail { vect_slp_v4qi_store } } }
+ p->b[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { xfail { vect_slp_v4qi_store_align } } }
p->b[i] = 2;
sink (p);
}
@@ -50,10 +50,10 @@ void test_store_flexarray (int i)
{
char a[3];
struct Sx *p = (struct Sx*)a;
- p->a = 0; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v4qi_store } } }
+ p->a = 0; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v4qi_store_align } } }
p->b[0] = 0;
p->b[1] = 1; // { dg-bogus "\\\[-Wstringop-overflow" }
- p->b[2] = 1; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { xfail { vect_slp_v4qi_store } } }
+ p->b[2] = 1; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { xfail { vect_slp_v4qi_store_align } } }
p->b[i] = 2;
sink (p);
}
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-28.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-28.c
index 5009fb5..f3e31fb 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-28.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-28.c
@@ -152,8 +152,8 @@ void ptr_add_2 (int n, int i0, int i1)
q += i0;
q[0] = 0; // p[0]
q += i1;
- q[0] = 1; // p[1]
- q[1] = 2; // p[2] // { dg-warning "\\\[-Wstringop-overflow" }
+ q[0] = 1; // p[1] // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ q[1] = 2; // p[2] // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
sink (p, q);
}
@@ -175,8 +175,8 @@ void ptr_add_3 (int n, int i0, int i1, int i2)
q[0] = 1; // p[1]
q[1] = 2; // p[2]
q += i2;
- q[0] = 3; // p[3]
- q[1] = 4; // p[4] // { dg-warning "\\\[-Wstringop-overflow" }
+ q[0] = 3; // p[3] // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
+ q[1] = 4; // p[4] // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
sink (p, q);
}
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-56.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-56.c
index b3e598c..5ba4de4 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-56.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-56.c
@@ -1,7 +1,8 @@
/* PR middle-end/92942 - missing -Wstringop-overflow for allocations with
a negative lower bound size
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
#define SIZE_MAX __SIZE_MAX__
#define UINT8_MAX __UINT8_MAX__
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-57.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-57.c
index 173aa16..6ae8589 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-57.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-57.c
@@ -1,7 +1,8 @@
/* Verify that an anti-range ~[A, B] with small positive A and B
is handled correctly and doesn't trigger warnings.
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
typedef __typeof__ (sizeof 0) size_t;
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-58.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-58.c
index b81186c..e0a4078 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-58.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-58.c
@@ -182,8 +182,8 @@ void memset_decl_2_off (void)
int i2 = SR (2, INT_MAX);
{
- char a5[5]; // { dg-warning "at offset [1, 5] into destination object 'a5'
- char a7[7]; // { dg-warning "at offset [2, 7] into destination object 'a7'
+ char a5[5]; // { dg-message "at offset \\\[1, 5] into destination object 'a5'" "note" }
+ char a7[7]; // { dg-message "at offset \\\[2, 7] into destination object 'a7'" "note" }
char *p5_p1 = a5 + i1;
char *p7_p2 = a7 + i2;
char *p5_7 = cond1 ? p5_p1 : p7_p2;
@@ -193,7 +193,11 @@ void memset_decl_2_off (void)
memset (p5_7, 0, 3);
memset (p5_7, 0, 4);
memset (p5_7, 0, 5);
- memset (p5_7, 0, 6); // { dg-warning "memset' writing 6 bytes into a region of size 5 " }
+ /* The warning code conservatively "merges" both the sizes and the offsets
+ into A5 and A7 and so only the second store below is diagnosed but not
+ the first. See PR 103215. The logic needs to be tightened up. */
+ memset (p5_7, 0, 6); // { dg-warning "memset' writing 6 bytes into a region of size 5 " "pr??????" { xfail *-*-* } }
+ memset (p5_7, 0, 7); // { dg-warning "memset' writing 7 bytes into a region of size 6 " }
}
int i3 = SR (3, INT_MAX);
@@ -208,7 +212,8 @@ void memset_decl_2_off (void)
// { dg-message "at offset \\\[4, 9] into destination object 'a9'" "note" { target *-*-* } .-1 }
// { dg-message "at offset \\\[3, 9] into destination object 'a9'" "note" { target *-*-* } .-2 }
// { dg-message "at offset \\\[2, 9] into destination object 'a9'" "note" { target *-*-* } .-3 }
- // { dg-message ": destination object 'a9'" "note" { target *-*-* } .-4 }
+ // { dg-message "at offset \\\[1, 9] into destination object 'a9'" "note" { target *-*-* } .-4 }
+ // { dg-message ": destination object 'a9'" "pr??????" { xfail *-*-* } .-5 }
char *p5_p2 = a5 + i2; // 3 bytes left
char *p9_p3 = a9 + i3; // 6 bytes left
char *p =
@@ -220,7 +225,8 @@ void memset_decl_2_off (void)
memset (q, 0, 3);
memset (q, 0, 4);
memset (q, 0, 5);
- memset (q, 0, 6); // { dg-warning "memset' writing 6 bytes into a region of size 5" }
+ memset (q, 0, 6); // { dg-warning "memset' writing 6 bytes into a region of size 5" "pr??????" { xfail *-*-* } }
+ memset (q, 0, 7); // { dg-warning "memset' writing 7 bytes into a region of size 6" }
--q; // [3 - 6] bytes left
memset (q, 0, 1);
@@ -229,7 +235,8 @@ void memset_decl_2_off (void)
memset (q, 0, 4);
memset (q, 0, 5);
memset (q, 0, 6);
- memset (q, 0, 7); // { dg-warning "memset' writing 7 bytes into a region of size 6" }
+ memset (q, 0, 7); // { dg-warning "memset' writing 7 bytes into a region of size 6" "pr??????" { xfail *-*-* } }
+ memset (q, 0, 8); // { dg-warning "memset' writing 8 bytes into a region of size 7" }
--q; // [4 - 7] bytes left
memset (q, 0, 1);
@@ -239,7 +246,8 @@ void memset_decl_2_off (void)
memset (q, 0, 5);
memset (q, 0, 6);
memset (q, 0, 7);
- memset (q, 0, 8); // { dg-warning "memset' writing 8 bytes into a region of size 7" }
+ memset (q, 0, 8); // { dg-warning "memset' writing 8 bytes into a region of size 7" "pr??????" { xfail *-*-* } }
+ memset (q, 0, 9); // { dg-warning "memset' writing 9 bytes into a region of size 8" }
int m1_x = SR (-1, INT_MAX);
int m2_x = SR (-2, INT_MAX);
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-59.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-59.c
index c45a92d..b6265e3 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-59.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-59.c
@@ -200,7 +200,11 @@ void memset_malloc_2_off (void)
memset (p5_7, 0, 3);
memset (p5_7, 0, 4);
memset (p5_7, 0, 5);
- memset (p5_7, 0, 6); // { dg-warning "memset' writing 6 bytes into a region of size 5 " }
+ /* The warning code conservatively "merges" both the sizes and the offsets
+ into A5 and A7 and so only the second store below is diagnosed but not
+ the first. See PR 103215. The logic needs to be tightened up. */
+ memset (p5_7, 0, 6); // { dg-warning "memset' writing 6 bytes into a region of size 5 " "pr??????" { xfail *-*-* } }
+ memset (p5_7, 0, 7); // { dg-warning "memset' writing 7 bytes into a region of size 6 " }
}
int i3 = SR (3, INT_MAX);
@@ -215,7 +219,8 @@ void memset_malloc_2_off (void)
// { dg-message "at offset \\\[4, 9] into destination object 'a9'" "note" { target *-*-* } .-1 }
// { dg-message "at offset \\\[3, 9] into destination object 'a9'" "note" { target *-*-* } .-2 }
// { dg-message "at offset \\\[2, 9] into destination object 'a9'" "note" { target *-*-* } .-3 }
- // { dg-message ": destination object 'a9'" "note" { target *-*-* } .-4 }
+ // { dg-message "at offset \\\[1, 9] into destination object 'a9'" "note" { target *-*-* } .-4 }
+ // { dg-message ": destination object 'a9'" "pr??????" { xfail *-*-* } .-5 }
char *p5_p2 = a5 + i2; // 3 bytes left
char *p9_p3 = a9 + i3; // 6 bytes left
char *p =
@@ -227,7 +232,8 @@ void memset_malloc_2_off (void)
memset (q, 0, 3);
memset (q, 0, 4);
memset (q, 0, 5);
- memset (q, 0, 6); // { dg-warning "memset' writing 6 bytes into a region of size 5" }
+ memset (q, 0, 6); // { dg-warning "memset' writing 6 bytes into a region of size 5" "pr??????" { xfail *-*-* } }
+ memset (q, 0, 7); // { dg-warning "memset' writing 7 bytes into a region of size 6" }
--q; // [3 - 6] bytes left
memset (q, 0, 1);
@@ -236,7 +242,8 @@ void memset_malloc_2_off (void)
memset (q, 0, 4);
memset (q, 0, 5);
memset (q, 0, 6);
- memset (q, 0, 7); // { dg-warning "memset' writing 7 bytes into a region of size 6" }
+ memset (q, 0, 7); // { dg-warning "memset' writing 7 bytes into a region of size 6" "pr??????" { xfail *-*-* } }
+ memset (q, 0, 8); // { dg-warning "memset' writing 8 bytes into a region of size 7" }
--q; // [4 - 7] bytes left
memset (q, 0, 1);
@@ -246,7 +253,8 @@ void memset_malloc_2_off (void)
memset (q, 0, 5);
memset (q, 0, 6);
memset (q, 0, 7);
- memset (q, 0, 8); // { dg-warning "memset' writing 8 bytes into a region of size 7" }
+ memset (q, 0, 8); // { dg-warning "memset' writing 8 bytes into a region of size 7" "pr??????" { xfail *-*-* } }
+ memset (q, 0, 9); // { dg-warning "memset' writing 9 bytes into a region of size 8" }
int m1_x = SR (-1, INT_MAX);
int m2_x = SR (-2, INT_MAX);
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-62.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-62.c
index 4b6d1ab..ea19aa8 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-62.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-62.c
@@ -217,14 +217,14 @@ void test_max (void)
{
/* Exercise both pointers pointing to the same object plus constant
offset. */
- char a2[2]; // { dg-message "at offset 1 into destination object 'a2' of size 2" "note" }
+ char a2[2];
char *pi = a2 + 1;
char *pj = a2 + 2;
char *q = MAX (pi, pj);
- memset (q, 0, 1);
- memset (q, 0, 2); // { dg-warning "writing 2 bytes into a region of size 1 " }
+ memset (q, 0, 1); // { dg-warning "writing 1 byte into a region of size 0 " }
+ memset (q, 0, 2); // { dg-warning "writing 2 bytes into a region of size 0 " }
}
{
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-67.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-67.c
index 7b8f3f0..0f01082 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-67.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-67.c
@@ -1,7 +1,8 @@
/* PR middle-end/100571 - bogus -Wstringop-overflow with VLA of elements
larger than byte
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
__attribute__ ((access (read_only, 1, 2))) void fro (int *, int);
__attribute__ ((access (write_only, 1, 2))) void fwo (int *, int);
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-68.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-68.c
index 04e91af..4d13239 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-68.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-68.c
@@ -2,7 +2,7 @@
a larger scalar into a smaller array
Verify overflow by aggregate stores.
{ dg-do compile }
- { dg-options "-O2" } */
+ { dg-options "-O2 -fno-tree-vectorize" } */
#define A(N) (A ## N)
#define Ac1 (AC1){ 0 }
@@ -57,19 +57,20 @@ void warn_comp_lit_zero (void)
void warn_comp_lit (void)
{
- *(AC2*)a1 = Ac2; // { dg-warning "writing 2 bytes into a region of size 1" "pr101475" { xfail *-*-* } }
- // After vectorization, below codes are optimized to
- // MEM <vector(4) char> [(char *)&a2] = { 0, 1, 2, 3 };
- // MEM <vector(4) char> [(char *)&a3] = { 0, 1, 2, 3 };
- // MEM <vector(8) char> [(char *)&a4] = { 0, 1, 2, 3, 4, 5, 6, 7 };
- // MEM <vector(8) char> [(char *)&a7] = { 0, 1, 2, 3, 4, 5, 6, 7 };
- // MEM <vector(16) char> [(char *)&a15] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
- // and warning should be expected, refer to PR102722.
- *(AC4*)a2 = Ac4; // { dg-warning "writing 4 bytes into a region of size 2" "pr101475" { xfail { ! { vect_slp_v4qi_store } } } }
- *(AC4*)a3 = Ac4; // { dg-warning "writing 4 bytes into a region of size 3" "pr101475" { xfail { ! { vect_slp_v4qi_store } } } }
- *(AC8*)a4 = Ac8; // { dg-warning "writing 8 bytes into a region of size 4" "pr101475" { xfail { ! { vect_slp_v8qi_store } } } }
- *(AC8*)a7 = Ac8; // { dg-warning "writing 8 bytes into a region of size 7" "pr101475" { xfail { ! { vect_slp_v8qi_store } } } }
- *(AC16*)a15 = Ac16; // { dg-warning "writing 16 bytes into a region of size 15" "pr101475" { xfail { ! { vect_slp_v16qi_store } } } }
+ /* Ideally only one warning would be issued for each of the stores
+ mentioning the size of the rest of the source being assigned to
+ the destination that doesn't fit. But without vectorization
+ the assignment is a series of one-character stores, except in
+ the first instance multiple warnings end up being issued for
+ each assignment, each saying "writing 1 byte into a region of
+ size 0". That's suboptimal and should be improved. See also
+ PR 92110. */
+ *(AC2*)a1 = Ac2; // { dg-warning "writing (2 bytes|1 byte) into a region of size (1|0)" "pr101475" }
+ *(AC4*)a2 = Ac4; // { dg-warning "writing (4 bytes|1 byte) into a region of size (2|0)" "pr101475" }
+ *(AC4*)a3 = Ac4; // { dg-warning "writing (4 bytes|1 byte) into a region of size (3|0)" "pr101475" }
+ *(AC8*)a4 = Ac8; // { dg-warning "writing (8 bytes|1 byte) into a region of size (4|0)" "pr101475" }
+ *(AC8*)a7 = Ac8; // { dg-warning "writing (8 bytes|1 byte) into a region of size (7|0)" "pr101475" }
+ *(AC16*)a15 = Ac16; // { dg-warning "writing (16 bytes|1 byte) into a region of size (15|0)" "pr101475" }
}
void warn_aggr_decl (void)
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-69.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-69.c
index 754b481..be361fe 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-69.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-69.c
@@ -2,7 +2,7 @@
a larger scalar into a smaller array
Verify overflow by vector stores.
{ dg-do compile }
- { dg-options "-O2" } */
+ { dg-options "-O2 -Wno-psabi" } */
#define V(N) __attribute__ ((vector_size (N)))
#define C1 (VC1){ 0 }
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-71.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-71.c
index f56a005..74311ec 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-71.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-71.c
@@ -2,7 +2,8 @@
a larger scalar into a smaller array
Verify warnings for overflow by stores of results of built-in functions.
{ dg-do compile }
- { dg-options "-O2" } */
+ { dg-options "-O2" }
+ { dg-require-effective-target alloca } */
typedef __INT16_TYPE__ int16_t;
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-75.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-75.c
index 0b242e8..9f9c3a9 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-75.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-75.c
@@ -9,7 +9,7 @@
the offset into it (although the offset might be better included in
the warning). */
extern char a3[3];
-extern char a5[5]; // { dg-message "at offset 5 into destination object 'a5' of size 5" "note" }
+extern char a5[5]; // { dg-message "at offset \[^a-zA-Z\n\r\]*5\[^a-zA-Z0-9\]* into destination object 'a5' of size 5" "note" }
void min_a3_a5 (int i)
{
@@ -20,14 +20,14 @@ void min_a3_a5 (int i)
by its own warning independently of -Wstringop-overflow. */
char *d = p < q ? p : q;
- d[4] = 0;
- d[5] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
+ d[4] = 0; // { dg-warning "writing 2 bytes into a region of size 1" "" { target { vect_slp_v2qi_store_unalign } } }
+ d[5] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
}
// Same as above but with the larger array as the first MIN_EXPR operand.
extern char b4[4];
-extern char b6[6]; // { dg-message "at offset 6 into destination object 'b6' of size 6" "note" }
+extern char b6[6]; // { dg-message "at offset \[^a-zA-Z\n\r\]*6\[^a-zA-Z0-9\]* into destination object 'b6' of size 6" "note" }
void min_b6_b4 (int i)
{
@@ -35,36 +35,36 @@ void min_b6_b4 (int i)
char *q = b4 + i;
char *d = p < q ? p : q;
- d[5] = 0;
- d[6] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
+ d[5] = 0; // { dg-warning "writing 2 bytes into a region of size 1" "" { target { vect_slp_v2qi_store_unalign } } }
+ d[6] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
}
/* Same as above but with the first MIN_EXPR operand pointing to an unknown
object. */
-extern char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" }
+extern char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" { xfail { vect_slp_v2qi_store_unalign } } }
void min_p_c7 (char *p, int i)
{
char *q = c7 + i;
char *d = p < q ? p : q;
- d[6] = 0;
- d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
+ d[6] = 0; // { dg-warning "writing 2 bytes into a region of size 1" "" { target { vect_slp_v2qi_store_unalign } } }
+ d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
}
/* Same as above but with the second MIN_EXPR operand pointing to an unknown
object. */
-extern char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" }
+extern char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" { xfail { vect_slp_v2qi_store_unalign } } }
void min_d8_p (char *q, int i)
{
char *p = d8 + i;
char *d = p < q ? p : q;
- d[7] = 0;
- d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
+ d[7] = 0; // { dg-warning "writing 2 bytes into a region of size 1" "" { target { vect_slp_v2qi_store_unalign } } }
+ d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
}
@@ -89,7 +89,7 @@ void min_A3_A5 (int i, struct A3_5 *pa3_5)
struct B4_B6
{
char b4[4];
- char b6[6]; // { dg-message "at offset 6 into destination object 'b6' of size 6" "note" }
+ char b6[6]; // { dg-message "at offset 6 into destination object 'b6' of size 6" "note" { xfail { vect_slp_v2qi_store_unalign } } }
};
void min_B6_B4 (int i, struct B4_B6 *pb4_b6)
@@ -99,13 +99,13 @@ void min_B6_B4 (int i, struct B4_B6 *pb4_b6)
char *d = p < q ? p : q;
d[5] = 0;
- d[6] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
+ d[6] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
}
struct C7
{
- char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" }
+ char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" { xfail { vect_slp_v2qi_store_unalign } } }
};
void min_p_C7 (char *p, int i, struct C7 *pc7)
@@ -114,13 +114,13 @@ void min_p_C7 (char *p, int i, struct C7 *pc7)
char *d = p < q ? p : q;
d[6] = 0;
- d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
+ d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
}
struct D8
{
- char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" }
+ char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" { xfail { vect_slp_v2qi_store_unalign } } }
};
void min_D8_p (char *q, int i, struct D8 *pd8)
@@ -129,5 +129,5 @@ void min_D8_p (char *q, int i, struct D8 *pd8)
char *d = p < q ? p : q;
d[7] = 0;
- d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
+ d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
}
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-76.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-76.c
index 5246726..d5cf866 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-76.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-76.c
@@ -27,10 +27,10 @@ void max_a3_a5 (int i)
by its own warning independently of -Wstringop-overflow. */
char *d = MAX (p, q);
- d[2] = 0; // { dg-warning "writing 4 bytes into a region of size 3" "pr102706" { target { vect_slp_v4qi_store } } }
+ d[2] = 0; // { dg-warning "writing 4 bytes into a region of size 3" "pr102706" { target { vect_slp_v4qi_store_unalign } } }
d[3] = 0;
d[4] = 0;
- d[5] = 0; // { dg-warning "writing 1 byte into a region of size 0" "pr102706" { xfail { vect_slp_v4qi_store } } }
+ d[5] = 0; // { dg-warning "writing 1 byte into a region of size 0" "pr102706" { xfail { vect_slp_v4qi_store_unalign } } }
}
@@ -44,38 +44,38 @@ void max_b6_b4 (int i)
char *q = b4 + i;
char *d = MAX (p, q);
- d[3] = 0; // { dg-warning "writing 4 bytes into a region of size 3" "pr102706" { target { vect_slp_v4qi_store } } }
+ d[3] = 0; // { dg-warning "writing 4 bytes into a region of size 3" "pr102706" { target { vect_slp_v4qi_store_unalign } } }
d[4] = 0;
d[5] = 0;
- d[6] = 0; // { dg-warning "writing 1 byte into a region of size 0" "pr102706" { xfail { vect_slp_v4qi_store } } }
+ d[6] = 0; // { dg-warning "writing 1 byte into a region of size 0" "pr102706" { xfail { vect_slp_v4qi_store_unalign } } }
}
/* Same as above but with the first MAX_EXPR operand pointing to an unknown
object. */
-extern char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" }
+extern char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" { xfail { vect_slp_v2qi_store_unalign } } }
void max_p_c7 (char *p, int i)
{
char *q = c7 + i;
char *d = MAX (p, q);
- d[6] = 0;
- d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
+ d[6] = 0; // { dg-warning "writing 2 bytes into a region of size 1" "" { target { vect_slp_v2qi_store_unalign } } }
+ d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
}
/* Same as above but with the second MIN_EXPR operand pointing to an unknown
object. */
-extern char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" }
+extern char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" { xfail { vect_slp_v2qi_store_unalign } } }
void max_d8_p (char *q, int i)
{
char *p = d8 + i;
char *d = MAX (p, q);
- d[7] = 0;
- d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
+ d[7] = 0; // { dg-warning "writing 2 bytes into a region of size 1" "" { target { vect_slp_v2qi_store_unalign } } }
+ d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
}
@@ -83,7 +83,7 @@ struct A3_5
{
char a3[3]; // { dg-message "at offset 3 into destination object 'a3' of size 3" "pr??????" { xfail *-*-* } }
// refer to pr102697 for xfail
- char a5[5]; // { dg-message "at offset 5 into destination object 'a5' of size 5" "note" { xfail { vect_slp_v4qi_store } } }
+ char a5[5]; // { dg-message "at offset 5 into destination object 'a5' of size 5" "note" { xfail { vect_slp_v4qi_store_unalign } } }
};
void max_A3_A5 (int i, struct A3_5 *pa3_5)
@@ -96,7 +96,7 @@ void max_A3_A5 (int i, struct A3_5 *pa3_5)
d[2] = 0;
d[3] = 0; // { dg-warning "writing 1 byte into a region of size 0" "pr??????" { xfail *-*-* } }
d[4] = 0;
- d[5] = 0; // { dg-warning "writing 1 byte into a region of size 0" "pr102697" { xfail { vect_slp_v4qi_store } } }
+ d[5] = 0; // { dg-warning "writing 1 byte into a region of size 0" "pr102697" { xfail { vect_slp_v4qi_store_unalign } } }
}
@@ -104,7 +104,7 @@ struct B4_B6
{
char b4[4];
// refer to pr102697 for xfail
- char b6[6]; // { dg-message "at offset \[^a-zA-Z\n\r\]*6\[^a-zA-Z0-9\]* into destination object 'b6' of size 6" "note" { xfail { vect_slp_v4qi_store } } }
+ char b6[6]; // { dg-message "at offset \[^a-zA-Z\n\r\]*6\[^a-zA-Z0-9\]* into destination object 'b6' of size 6" "note" { xfail { vect_slp_v4qi_store_unalign } } }
};
void max_B6_B4 (int i, struct B4_B6 *pb4_b6)
@@ -116,13 +116,13 @@ void max_B6_B4 (int i, struct B4_B6 *pb4_b6)
d[3] = 0;
d[4] = 0;
d[5] = 0;
- d[6] = 0; // { dg-warning "writing 1 byte into a region of size 0" "pr102697" { xfail { vect_slp_v4qi_store } } }
+ d[6] = 0; // { dg-warning "writing 1 byte into a region of size 0" "pr102697" { xfail { vect_slp_v4qi_store_unalign } } }
}
struct C7
{
- char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" }
+ char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" { xfail { vect_slp_v2qi_store_unalign } } }
};
void max_p_C7 (char *p, int i, struct C7 *pc7)
@@ -131,13 +131,13 @@ void max_p_C7 (char *p, int i, struct C7 *pc7)
char *d = MAX (p, q);
d[6] = 0;
- d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
+ d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
}
struct D8
{
- char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" }
+ char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" { xfail { vect_slp_v2qi_store_unalign } } }
};
void max_D8_p (char *q, int i, struct D8 *pd8)
@@ -146,5 +146,5 @@ void max_D8_p (char *q, int i, struct D8 *pd8)
char *d = MAX (p, q);
d[7] = 0;
- d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
+ d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
}
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-82.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-82.c
new file mode 100644
index 0000000..ee2693d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-82.c
@@ -0,0 +1,29 @@
+/* Verify that notes after warnings for array and VLA parameters show
+ the array form.
+ { dg-do compile }
+ { dg-options "-Wall" } */
+
+void fia5 (int[5]);
+
+void gia3_fia5 (void)
+{
+ int a[3];
+ fia5 (a); // { dg-warning "-Wstringop-overflow" }
+ // { dg-message "argument 1 of type 'int\\\[5]'" "note" { target *-*-* } .-1 }
+}
+
+
+/* The type of the argument would ideall be 'int[n]' but the variable
+ bound is lost/cleared by free-lang-data and never makes it into
+ the middle end. An (inferior) alternative would be 'int[*]' but
+ the pretty printer doesn't know how to format the star. A better
+ solution might be to introduce a new notation, like 'int[$1]',
+ where the $1 refers to the VLA argument bound. */
+void fvla (int n, int[n]);
+
+void gia3_fvla (void)
+{
+ int a[3];
+ fvla (sizeof a, a); // { dg-warning "-Wstringop-overflow" }
+ // { dg-message "argument 2 of type 'int\\\[]'" "note" { target *-*-* } .-1 }
+}
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-83.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-83.c
new file mode 100644
index 0000000..6928ee4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-83.c
@@ -0,0 +1,19 @@
+/* PR middle-end/103143 - ICE due to infinite recursion in pointer-query.cc
+ { dg-do compile }
+ { dg-options "-O2 -Wall" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+void foo (size_t x)
+{
+ struct T { char buf[64]; char buf2[64]; } t;
+ char *p = &t.buf[8];
+ char *r = t.buf2;
+ size_t i;
+
+ for (i = 0; i < x; i++)
+ {
+ r = __builtin_mempcpy (r, p, i);
+ p = r + 1;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-84.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-84.c
new file mode 100644
index 0000000..2c0f507
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-84.c
@@ -0,0 +1,15 @@
+/* PR middle-end/102960 - ICE: in sign_mask, at wide-int.h:855 in GCC 10.3.0
+ { dg-do compile }
+ { dg-options "-Og -Wall" } */
+
+void f (int i)
+{
+ const char *s;
+ if (i)
+ s = &"abcd"[i];
+
+ __builtin_printf ("%s", s);
+}
+
+/* The use of s in the call to sprintf should result in:
+ { dg-prune-output "-Wmaybe-uninitialized" } */
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-85.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-85.c
new file mode 100644
index 0000000..ac61e0a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-85.c
@@ -0,0 +1,153 @@
+/* PR middle-end/103215 - bogus -Wstringop-overflow with two pointers with
+ different offsets each
+ Test for accesses into distinct arrays through pointers with different
+ offsets each.
+
+ If/when -Wstringop-overflow is enhanced to issue "maybe" kinds of
+ warnings some of the accesses here will trigger those and will need
+ updating.
+
+ { dg-do compile }
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+
+#define NOIPA __attribute__ ((noipa))
+
+void sink (int[1]);
+#define A(p, off) sink (p + off)
+
+extern int a4[4], a8[8];
+
+
+
+
+NOIPA void a4_p1_a8_p3 (int i)
+{
+ int *a4_p1 = a4 + 1;
+ int *a8_p3 = a8 + 3;
+ int *q = i ? a4_p1 : a8_p3;
+ A (q, -4); // { dg-warning "-Wstringop-overflow" }
+ /* Because -3 is a valid offset into a8 but not a4, q must point
+ to the former and so subscripts between -3 and +4 refer to its
+ elements. */
+ A (q, -3); A (q, -2); A (q, -1); A (q, 0);
+ A (q, 1); A (q, 2); A (q, 3); A (q, 4);
+ A (q, 5); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ /* Both of the following are definitely out of bounds but the first isn't
+ diagnosed because the code conservatively merges the offsets into A4
+ and A8. */
+ A (q, 7); // { dg-warning "-Wstringop-overflow" }
+}
+
+
+NOIPA void a4_p1_a8_p5 (int i)
+{
+ int *a4_p1 = a4 + 1;
+ int *a8_p5 = a8 + 5;
+ int *q = i ? a4_p1 : a8_p5;
+ A (q, -6); // { dg-warning "-Wstringop-overflow" }
+ /* Similarly to the above, because -5 is a valid offset into a8 but
+ not a4, q must point to the former and so subscripts between -5
+ and +2 refer to its elements. */
+ A (q, -5); A (q, -4); A (q, -3); A (q, -2);
+ A (q, -1); A (q, 0); A (q, 1); A (q, 2);
+ A (q, 3); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 7); // { dg-warning "-Wstringop-overflow" }
+}
+
+
+NOIPA void a4_p1_a8_p7 (int i)
+{
+ int *a4_p1 = a4 + 1;
+ int *a8_p7 = a8 + 7;
+ int *q = i ? a4_p1 : a8_p7;
+ A (q, -8); // { dg-warning "-Wstringop-overflow" }
+ A (q, -7); A (q, -6); A (q, -5); A (q, -4);
+ A (q, -3); A (q, -2); A (q, -1); A (q, 0);
+ /* Since -7 is valid, q must point to a8 and the last valid subscript
+ must be 0. */
+ A (q, 1); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 7); // { dg-warning "-Wstringop-overflow" }
+}
+
+
+NOIPA void mp_1_a4_p1_a8_p7 (int i, int j)
+{
+ int *a4_p1 = a4 + 1;
+ int *a8_p7 = a8 + 7;
+ int *p = i ? a4_p1 : a8_p7;
+ int *q = j ? p + 1 : p - 1;
+
+ A (q, -9); // { dg-warning "-Wstringop-overflow" }
+
+ /* q points either to a8 + [6, 8] or a4 + [0, 2]. */
+ A (q, -8); A (q, -7); A (q, -6); A (q, -5);
+ A (q, -4); A (q, -3); A (q, -2); A (q, -1);
+
+ /* Since all the above are valid, q must point to a8 + 8. But as
+ mentioned above, the warning for each subscript is independent
+ of prior subscripts into the same object so the access below
+ aren't diagnosed. */
+ A (q, 0); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 1); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 8); // { dg-warning "-Wstringop-overflow" }
+}
+
+
+NOIPA void mp1_a4_p1_a8_p5 (int i, int j)
+{
+ int *a4_p1 = a4 + 1;
+ int *a8_p5 = a8 + 5;
+ int *p = i ? a4_p1 : a8_p5;
+
+ int *q = j ? p + 1 : p - 1;
+
+ // q is assumed to point to a8 + 6
+ A (q, -7); // { dg-warning "-Wstringop-overflow" }
+ A (q, -6); A (q, -5); A (q, -4); A (q, -3);
+ A (q, -2); A (q, -1); A (q, 0); A (q, 1);
+ /* Even though the above accesses rule it out, q is now assumed
+ to point to either a4 + [0, 2] or a8 + [4, 5]. */
+ A (q, 2);
+ /* q is now assumed to point tp a4. Given that, only the first store
+ is valid. */
+ A (q, 3); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 5); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 6); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 7); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 8); // { dg-warning "-Wstringop-overflow" }
+}
+
+
+NOIPA void mp1_a4_p1_a8_p4 (int i, int j)
+{
+ int *a4_p1 = a4 + 1;
+ int *a8_p4 = a8 + 4;
+ int *p = i ? a4_p1 : a8_p4;
+
+ int *q = j ? p + 1 : p - 1;
+
+ // q is assumed to point to a8 + 5
+ A (q, -6); // { dg-warning "-Wstringop-overflow" }
+ A (q, -5);
+ A (q, -4);
+ A (q, -3);
+ A (q, -2);
+ A (q, -1);
+ A (q, 0);
+ A (q, 1);
+ A (q, 2);
+ /* Even though the above accesses rule it out, q is now assumed
+ to point tp a4. Given that, only the first store is valid. */
+ A (q, 3); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 5); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 6); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 7); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 8); // { dg-warning "-Wstringop-overflow" }
+}
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-86.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-86.c
new file mode 100644
index 0000000..345abe4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-86.c
@@ -0,0 +1,63 @@
+/* PR middle-end/101751 - attribute access none with void pointer expects
+ nonzero size
+ { dg-do compile }
+ { dg-options "-Wall" } */
+
+__attribute__ ((access (none, 1))) void
+fvp_m1 (const void*);
+
+void nowarn_m1 (void)
+{
+ /* Verify these don't trigger a warning for calls to a function
+ declared with attribute access none. */
+ fvp_m1 ((void*)-1); // { dg-bogus "-Wstringop-" }
+ fvp_m1 ((void*)1); // { dg-bogus "-Wstringop-" }
+}
+
+
+__attribute__ ((access (none, 1))) void
+fvp_none (void*);
+
+void nowarn_c_cp1 (void)
+{
+ char c;
+ fvp_none (&c);
+ fvp_none (&c + 1); // { dg-bogus "-Wstringop-" }
+}
+
+void nowarn_f_fp1 (void)
+{
+ fvp_none ((char*)&nowarn_f_fp1);
+ fvp_none ((char*)&nowarn_f_fp1 + 1);
+}
+
+void nowarn_sp1_sp_4 (void)
+{
+ fvp_none ("" + 1); // { dg-bogus "-Wstringop-" }
+ fvp_none ("123" + 4); // { dg-bogus "-Wstringop-" }
+}
+
+
+__attribute__ ((access (none, 1))) void
+wfvp_none (void*); // { dg-message "in a call to function 'wfvp_none' declared with attribute 'access \\\(none, 1\\\)'" }
+
+void warn_cm1_p1 (void)
+{
+ char c;
+ /* With optimization both of the following are diagnosed by -Warray-bounds.
+ The second also without optimization by -Wstringop-overread. They
+ should both be diagnosed by the same warning even without optimization. */
+ wfvp_none (&c - 1); // { dg-warning "" "pr??????" { xfail *-*-* } }
+ wfvp_none (&c + 2); // { dg-warning "" }
+}
+
+void warn_fp2 (void)
+{
+ void *p = (char*)&warn_fp2 + sizeof warn_fp2;
+ fvp_none (p); // { dg-warning "" "pr??????" { xfail *-*-* } }
+}
+
+void warn_sp2 (void)
+{
+ wfvp_none ("" + 2); // { dg-warning "" }
+}
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-87.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-87.c
new file mode 100644
index 0000000..bc12192
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-87.c
@@ -0,0 +1,147 @@
+/* PR middle-end/103215 - bogus -Warray-bounds with two pointers with
+ different offsets each
+ Test for accesses by a user-defined function into the same array
+ through pointers with different offsets each. See Warray-bounds-91.c
+ for the corresponding test exercising -Warray-bounds for direct accesses.
+ { dg-do compile }
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+
+#define NOIPA __attribute__ ((noipa))
+
+void sink (int[1]);
+#define A(p, off) sink (p + off)
+
+extern int a4[4];
+
+
+NOIPA void p0_p1 (int i)
+{
+ int *p0 = a4 + 0;
+ int *p1 = a4 + 1;
+ int *q = i ? p0 : p1;
+ A (q, -2); // { dg-warning "-Wstringop-overflow" }
+ A (q, -1); A (q, 0); A (q, 1); A (q, 2);
+ /* Since q points to a4 and -1 is a valid subscript, +3 must be invalid.
+ But the warning for each subscript is independent of prior subscripts
+ into the same object. That should be improved. */
+ A (q, 3); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Wstringop-overflow" }
+}
+
+NOIPA void p1_p0 (int i)
+{
+ int *p1 = a4 + 1;
+ int *p0 = a4 + 0;
+ int *q = i ? p0 : p1;
+ A (q, -2); // { dg-warning "-Wstringop-overflow" }
+ A (q, -1); A (q, 0); A (q, 1); A (q, 2);
+ A (q, 3); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Wstringop-overflow" }
+}
+
+
+NOIPA void p1_p2 (int i)
+{
+ int *p1 = a4 + 1;
+ int *p2 = a4 + 2;
+ int *q = i ? p1 : p2;
+ A (q, -3); // { dg-warning "-Wstringop-overflow" }
+ A (q, -2); A (q, -1); A (q, 0); A (q, 1);
+ A (q, 2); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Wstringop-overflow" }
+}
+
+NOIPA void p2_p1 (int i)
+{
+ int *p2 = a4 + 2;
+ int *p1 = a4 + 1;
+ int *q = i ? p1 : p2;
+ A (q, -3); // { dg-warning "-Wstringop-overflow" }
+ A (q, -2); A (q, -1); A (q, 0); A (q, 1);
+ A (q, 2); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Wstringop-overflow" }
+}
+
+
+NOIPA void p1_p3 (int i)
+{
+ int *p1 = a4 + 1;
+ int *p3 = a4 + 3;
+ int *q = i ? p1 : p3;
+ A (q, -4); // { dg-warning "-Wstringop-overflow" }
+ A (q, -3); A (q, -2); A (q, -1); A (q, 0);
+ A (q, 1); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Wstringop-overflow" }
+}
+
+NOIPA void p3_p1 (int i)
+{
+ int *p3 = a4 + 3;
+ int *p1 = a4 + 1;
+ int *q = i ? p1 : p3;
+ A (q, -4); // { dg-warning "-Wstringop-overflow" }
+ A (q, -3); A (q, -2); A (q, -1); A (q, 0);
+ A (q, 1); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Wstringop-overflow" }
+}
+
+
+NOIPA void p1_p4 (int i)
+{
+ int *p1 = a4 + 1;
+ int *p4 = a4 + 4;
+ int *q = i ? p1 : p4;
+ A (q, -5); // { dg-warning "-Wstringop-overflow" }
+ A (q, -4); A (q, -3); A (q, -2); A (q, -1);
+ A (q, 0); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 1); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Wstringop-overflow" }
+}
+
+NOIPA void p4_p1 (int i)
+{
+ int *p4 = a4 + 4;
+ int *p1 = a4 + 1;
+ int *q = i ? p1 : p4;
+ A (q, -5); // { dg-warning "-Wstringop-overflow" }
+ A (q, -4); A (q, -3); A (q, -2); A (q, -1);
+ A (q, 0); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 1); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Wstringop-overflow" }
+}
+
+
+NOIPA void p0_p1_p2 (int i)
+{
+ int *p0 = a4 + 0;
+ int *p1 = a4 + 1;
+ int *p2 = a4 + 2;
+ int *q = i < 0 ? p1 : 0 < i ? p2 : p0;
+ A (q, -3); // { dg-warning "-Wstringop-overflow" }
+ A (q, -2); A (q, -1); A (q, 0); A (q, 1);
+ A (q, 2); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Wstringop-overflow" }
+}
+
+
+NOIPA void p0_p1_p2_p3_p4 (int i)
+{
+ int *p0 = a4 + 0;
+ int *p1 = a4 + 1;
+ int *p2 = a4 + 2;
+ int *p3 = a4 + 3;
+ int *p4 = a4 + 4;
+ int *q = i < -1 ? p1 : i < 0 ? p2 : 1 < i ? p4 : 0 < i ? p3 : p0;
+ A (q, -5); // { dg-warning "-Wstringop-overflow" }
+ A (q, -4); A (q, -3); A (q, -2); A (q, -1);
+ A (q, 0); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 1); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 2); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 3); // { dg-warning "-Wstringop-overflow" "pr??????" { xfail *-*-* } }
+ A (q, 4); // { dg-warning "-Wstringop-overflow" }
+}
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-88.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-88.c
new file mode 100644
index 0000000..c6b443e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-88.c
@@ -0,0 +1,327 @@
+/* PR middle-end/101475 - missing -Wstringop-overflow storing a compound
+ literal
+ { dg-do compile }
+ { dg-options "-O2 -fno-tree-vectorize" } */
+
+extern char ea1[1], ea2[2], ea3[3], ea4[4];
+
+/* The trailing A member of all of Sx, S0, and S1 is treated the same:
+ as a flexible array member. */
+struct Sx { char n, a[]; };
+struct S0 { char n, a[0]; };
+struct S1 { char n, a[1]; };
+/* The trailing A member in both S2 and S3 is treated as an ordinary
+ array with exactly two elements and accesses to elements beyond
+ the last are diagnosed regardless of whether they are within
+ the bounds the enclosing object. */
+struct S2 { char n, a[2]; };
+struct S3 { char n, a[3]; };
+
+
+void fx_ea1 (void)
+{
+ struct Sx *p = (struct Sx*)ea1;
+ p->n = 0;
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f0_ea1 (void)
+{
+ struct S0 *p = (struct S0*)ea1;
+ p->n = 0;
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f1_ea1 (void)
+{
+ struct S1 *p = (struct S1*)ea1;
+ p->n = 0;
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f2_ea1 (void)
+{
+ struct S2 *p = (struct S2*)ea1;
+ p->n = 0;
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f3_ea1 (void)
+{
+ struct S3 *p = (struct S3*)ea1;
+ p->n = 0;
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+
+void fx_ea1_p1 (void)
+{
+ struct Sx *p = (struct Sx*)(ea1 + 1);
+ p->n = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f0_ea1_p1 (void)
+{
+ struct S0 *p = (struct S0*)(ea1 + 1);
+ p->n = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f1_ea1_p1 (void)
+{
+ struct S1 *p = (struct S1*)(ea1 + 1);
+ p->n = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f2_ea1_p1 (void)
+{
+ struct S2 *p = (struct S2*)(ea1 + 1);
+ p->n = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f3_ea1_p1 (void)
+{
+ struct S3 *p = (struct S3*)(ea1 + 1);
+ p->n = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+
+void fx_ea2 (void)
+{
+ struct Sx *p = (struct Sx*)ea2;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f0_ea2 (void)
+{
+ struct S0 *p = (struct S0*)ea2;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f1_ea2 (void)
+{
+ struct S1 *p = (struct S1*)ea2;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f2_ea2 (void)
+{
+ struct S2 *p = (struct S2*)ea2;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f3_ea2 (void)
+{
+ struct S3 *p = (struct S3*)ea2;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+
+void fx_ea2_p1 (void)
+{
+ struct Sx *p = (struct Sx*)(ea2 + 1);
+ p->n = 0;
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f0_ea2_p1 (void)
+{
+ struct S0 *p = (struct S0*)(ea2 + 1);
+ p->n = 0;
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f1_ea2_p1 (void)
+{
+ struct S1 *p = (struct S1*)(ea2 + 1);
+ p->n = 0;
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f2_ea2_p1 (void)
+{
+ struct S2 *p = (struct S2*)(ea2 + 1);
+ p->n = 0;
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f3_ea2_p1 (void)
+{
+ struct S3 *p = (struct S3*)(ea2 + 1);
+ p->n = 0;
+ p->a[0] = 0; // { dg-warning "-Wstringop-overflow" }
+ p->a[1] = 1; // { dg-warning "-Wstringop-overflow" }
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+
+void fx_ea3 (void)
+{
+ struct Sx *p = (struct Sx*)ea3;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1;
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f0_ea3 (void)
+{
+ struct S0 *p = (struct S0*)ea3;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1;
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f1_ea3 (void)
+{
+ struct S1 *p = (struct S1*)ea3;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1;
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f2_ea3 (void)
+{
+ struct S2 *p = (struct S2*)ea3;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1;
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f3_ea3 (void)
+{
+ struct S3 *p = (struct S3*)ea3;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1;
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+
+void fx_ea4 (void)
+{
+ struct Sx *p = (struct Sx*)ea4;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1;
+ p->a[2] = 2;
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f0_ea4 (void)
+{
+ struct S0 *p = (struct S0*)ea4;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1;
+ p->a[2] = 2;
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f1_ea4 (void)
+{
+ struct S1 *p = (struct S1*)ea4;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1;
+ p->a[2] = 2;
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f2_ea4 (void)
+{
+ struct S2 *p = (struct S2*)ea4;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1;
+ /* Even though the offset of p->a[2] is within the bounds of EA4
+ the warning triggers because it only considers trailing arrays
+ of at mnost one element as "poor man's flexible arrays." */
+ p->a[2] = 2; // { dg-warning "-Wstringop-overflow" }
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
+
+void f3_ea4 (void)
+{
+ struct S3 *p = (struct S3*)ea4;
+ p->n = 0;
+ p->a[0] = 0;
+ p->a[1] = 1;
+ p->a[2] = 2;
+ p->a[3] = 3; // { dg-warning "-Wstringop-overflow" }
+}
diff --git a/gcc/testsuite/gcc.dg/Wuse-after-free-2.c b/gcc/testsuite/gcc.dg/Wuse-after-free-2.c
new file mode 100644
index 0000000..9f7ed45
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wuse-after-free-2.c
@@ -0,0 +1,115 @@
+/* PR middle-end/104232 - spurious -Wuse-after-free after conditional free
+ { dg-do compile }
+ { dg-options "-O2 -Wall" } */
+
+void free (void*);
+
+void sink (void*);
+
+void nowarn_cond_2 (char *p0, char *q0, int i)
+{
+ char *r = i ? p0 : q0;
+
+ free (p0);
+
+ /* The use of a PHI operand could be diagnosed using the "maybe" form
+ of the warning at level 2 but it's not done. If it ever changes
+ this test and those below will need to be updated. */
+ sink (r);
+}
+
+void nowarn_cond_2_null (char *p0, int i)
+{
+ char *r = i ? p0 : 0;
+
+ free (p0);
+ sink (r);
+}
+
+void nowarn_cond_3 (char *p0, char *q0, int i)
+{
+ char *r = i < 0 ? p0 - 1 : 0 < i ? p0 + 1 : q0;
+
+ free (p0);
+ sink (r);
+}
+
+void nowarn_cond_3_null (char *p0, int i)
+{
+ char *r = i < 0 ? p0 - 1 : 0 < i ? p0 + 1 : 0;
+
+ free (p0);
+ sink (r);
+}
+
+void nowarn_cond_4 (char *p0, char *q0, int i)
+{
+ char *r = i < -1 ? p0 - 2 : i < 0 ? p0 - 1 : 1 < i ? p0 + 1 : q0;
+
+ free (p0);
+ sink (r);
+}
+
+int nowarn_cond_loop (char *p)
+{
+ char *q = p;
+ while (*q)
+ {
+ if (*q == 'x')
+ {
+ q = "";
+ break;
+ }
+ ++q;
+ }
+
+ free (p);
+ return *q;
+}
+
+
+void warn_cond_2_cst (char *p, int i)
+{
+ /* Same as nowarn_cond_2() above but with R being derived only from
+ P, which means that any R's use after P has been freed should be
+ diagnosed. */
+ char *r = i ? p + 1 : p + 2;
+
+ free (p); // { dg-message "call to 'free'" }
+ sink (r); // { dg-warning "pointer used after 'free'" }
+}
+
+void warn_cond_2_var (char *p, int i, int j)
+{
+ char *r = i ? p + i : p + j;
+
+ free (p); // { dg-message "call to 'free'" }
+ sink (r); // { dg-warning "pointer used after 'free'" }
+}
+
+void warn_cond_3_var (char *p0, int i, int j)
+{
+ char *r = i < 0 ? p0 - i : 0 < i ? p0 + j : p0 + i + j;
+
+ free (p0); // { dg-message "call to 'free'" }
+ sink (r + 1); // { dg-warning "pointer used after 'free'" }
+}
+
+int warn_cond_4 (char *p0, char *q0, int i)
+{
+ char *r = i < -1 ? p0 - 2 : i < 0 ? p0 - 1 : 1 < i ? p0 + 2 : p0 + 1;
+
+ free (p0); // { dg-message "call to 'free'" }
+ return *r; // { dg-warning "pointer used after 'free'" }
+}
+
+int warn_cond_loop (char *p)
+{
+ char *q = p;
+
+ while (*q)
+ ++q;
+
+ free (p); // { dg-message "call to 'free'" }
+ return *q; // { dg-warning "pointer 'q' used after 'free'" }
+}
diff --git a/gcc/testsuite/gcc.dg/Wuse-after-free-3.c b/gcc/testsuite/gcc.dg/Wuse-after-free-3.c
new file mode 100644
index 0000000..d1bcfcb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wuse-after-free-3.c
@@ -0,0 +1,22 @@
+/* PR middle-end/104232 - spurious -Wuse-after-free after conditional free
+ { dg-do compile }
+ { dg-options "-O2 -Wall" } */
+
+char* f (void);
+
+static inline void freep (void *p)
+{
+ __builtin_free (*(void**)p); // { dg-bogus "-Wuse-after-free" }
+}
+
+int test_no_warn (void)
+{
+ __attribute__ ((__cleanup__ (freep))) char *s = 0, *t = 0;
+
+ t = f ();
+ if (!t)
+ return 0;
+
+ s = f ();
+ return 1;
+}
diff --git a/gcc/testsuite/gcc.dg/Wuse-after-free.c b/gcc/testsuite/gcc.dg/Wuse-after-free.c
new file mode 100644
index 0000000..9862de5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wuse-after-free.c
@@ -0,0 +1,41 @@
+/* PR middle-end/104069 - -Werror=use-after-free false positive on
+ elfutils-0.186
+ { dg-do compile }
+ { dg-options "-Wall" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+extern void* realloc (void *, size_t);
+
+void* __libdw_unzstd (size_t todo)
+{
+ void *sb = 0;
+
+ for ( ; ; )
+ {
+ // Ran only once.
+ if (!sb)
+ {
+ char *b = realloc (sb, todo);
+ if (!b)
+ break;
+
+ sb = b;
+ }
+
+ todo -= 1;
+ if (todo == 0)
+ break;
+ }
+
+ // Shrink buffer: leave only one byte for simplicity.
+ char *b = realloc (sb, 1);
+ if (b)
+ sb = b;
+ else
+ {
+ // Realloc failed mysteriously, leave 'sb' untouched.
+ }
+
+ return sb; // { dg-bogus "-Wuse-after-free" }
+}
diff --git a/gcc/testsuite/gcc.dg/Wvla-larger-than-5.c b/gcc/testsuite/gcc.dg/Wvla-larger-than-5.c
index c131f83..ebd7fb3 100644
--- a/gcc/testsuite/gcc.dg/Wvla-larger-than-5.c
+++ b/gcc/testsuite/gcc.dg/Wvla-larger-than-5.c
@@ -1,6 +1,7 @@
/* PR middle-end/100510 - bogus -Wvla-large-than with -Walloca
{ dg-do compile }
- { dg-options "-O0 -Walloca -Wvla-larger-than=1000" } */
+ { dg-options "-O0 -Walloca -Wvla-larger-than=1000" }
+ { dg-require-effective-target alloca } */
void f (void*);
diff --git a/gcc/testsuite/gcc.dg/Wzero-length-array-bounds-2.c b/gcc/testsuite/gcc.dg/Wzero-length-array-bounds-2.c
index b232149..2ef5ccd 100644
--- a/gcc/testsuite/gcc.dg/Wzero-length-array-bounds-2.c
+++ b/gcc/testsuite/gcc.dg/Wzero-length-array-bounds-2.c
@@ -87,7 +87,7 @@ void test_C_global_buf (void)
p->b1.a[ 1].i = 0; // { dg-warning "\\\[-Wzero-length-bounds" }
sink (p);
- p->b2.a[ 0].i = 0; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v2si_store && { ! vect_slp_v4si_store } } } }
+ p->b2.a[ 0].i = 0; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v2si_store_align && { ! vect_slp_v4si_store_unalign } } } }
p->b2.a[ 1].i = 0;
p->b2.a[ 2].i = 0; // { dg-warning "\\\[-Warray-bounds" }
p->b2.a[ 3].i = 0; // { dg-warning "\\\[-Warray-bounds" }
diff --git a/gcc/testsuite/gcc.dg/add-mul-overflow-1.c b/gcc/testsuite/gcc.dg/add-mul-overflow-1.c
new file mode 100644
index 0000000..b23cddd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/add-mul-overflow-1.c
@@ -0,0 +1,28 @@
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+int res[4];
+
+void
+f1 (int x, int y)
+{
+ res[2] = __builtin_add_overflow (x, y, res + 0);
+ res[3] = __builtin_add_overflow (y, x, res + 1);
+}
+
+void
+f2 (int x, int y)
+{
+ res[2] = __builtin_sub_overflow (x, y, res + 0);
+ res[3] = __builtin_sub_overflow (y, x, res + 1);
+}
+
+void
+f3 (int x, int y)
+{
+ res[2] = __builtin_mul_overflow (x, y, res + 0);
+ res[3] = __builtin_mul_overflow (y, x, res + 1);
+}
+
+/* { dg-final { scan-tree-dump-times {\.ADD_OVERFLOW} 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times {\.SUB_OVERFLOW} 2 "optimized" } } */
+/* { dg-final { scan-tree-dump-times {\.MUL_OVERFLOW} 1 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/aliasing-3.c b/gcc/testsuite/gcc.dg/analyzer/aliasing-3.c
new file mode 100644
index 0000000..003077a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/aliasing-3.c
@@ -0,0 +1,75 @@
+#include "analyzer-decls.h"
+
+#define NULL ((void *)0)
+
+struct s1
+{
+ int f1;
+};
+
+static struct s1 *p1_glob = NULL;
+
+void test_1 (struct s1 **pp1, struct s1 *p1_parm)
+{
+ struct s1 *init_p1_glob = p1_glob;
+
+ __analyzer_eval (p1_glob == init_p1_glob); /* { dg-warning "TRUE" } */
+
+ if (!p1_glob)
+ return;
+
+ __analyzer_eval (p1_glob == init_p1_glob); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p1_glob != NULL); /* { dg-warning "TRUE" } */
+
+ *pp1 = p1_parm;
+
+ /* The write through *pp1 can't have changed p1_glob, because
+ we never take a pointer to p1_glob (and it's static to this TU). */
+ __analyzer_eval (p1_glob == init_p1_glob); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p1_glob != NULL); /* { dg-warning "TRUE" } */
+}
+
+struct s2
+{
+ int f1;
+};
+
+static struct s2 *p2_glob = NULL;
+
+void test_2 (struct s2 **pp2, struct s2 *p2_parm)
+{
+ /* Ensure that p2_glob is modified. */
+ p2_glob = __builtin_malloc (sizeof (struct s2));
+ if (!p2_glob)
+ return;
+
+ __analyzer_eval (p2_glob != NULL); /* { dg-warning "TRUE" } */
+
+ *pp2 = p2_parm;
+
+ /* The write through *pp2 can't have changed p2_glob, because
+ we never take a pointer to p2_glob (and it's static to this TU). */
+ __analyzer_eval (p2_glob != NULL); /* { dg-warning "TRUE" } */
+}
+
+struct s3
+{
+ int f1;
+};
+
+struct s3 *p3_glob = NULL;
+
+void test_3 (struct s3 **pp3, struct s3 *p3_parm)
+{
+ p3_glob = __builtin_malloc (sizeof (struct s3));
+ if (!p3_glob)
+ return;
+
+ __analyzer_eval (p3_glob != NULL); /* { dg-warning "TRUE" } */
+
+ *pp3 = p3_parm;
+
+ /* The write through *pp3 could have changed p3_glob, because
+ another TU could take a pointer to p3_glob. */
+ __analyzer_eval (p3_glob != NULL); /* { dg-warning "UNKNOWN" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-decls.h b/gcc/testsuite/gcc.dg/analyzer/analyzer-decls.h
index e8745c0..d052579 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-decls.h
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-decls.h
@@ -18,6 +18,9 @@ extern void __analyzer_dump (void);
/* Emit a warning describing the size of the base region of (*ptr). */
extern void __analyzer_dump_capacity (const void *ptr);
+/* Dump information about what decls have escaped at this point on the path. */
+extern void __analyzer_dump_escaped (void);
+
/* Dump information after analysis on all of the exploded nodes at this
program point.
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2a.c b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2a.c
index 9faf5da..cf014b0 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2a.c
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2a.c
@@ -1,6 +1,9 @@
/* { dg-additional-options "-fanalyzer-verbosity=2" } */
-#include <stdio.h>
+typedef struct FILE FILE;
+
+FILE* fopen (const char*, const char*);
+int fclose (FILE*);
extern int foo ();
extern void bar ();
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3a.c b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3a.c
index 1b2b798..b0ece20 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3a.c
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3a.c
@@ -1,6 +1,9 @@
/* { dg-additional-options "-fanalyzer-verbosity=3" } */
-#include <stdio.h>
+typedef struct FILE FILE;
+
+FILE* fopen (const char*, const char*);
+int fclose (FILE*);
extern int foo ();
extern void bar ();
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer.exp b/gcc/testsuite/gcc.dg/analyzer/analyzer.exp
index e4b198b..15d979c 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer.exp
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2021 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 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/analyzer/asm-x86-1.c b/gcc/testsuite/gcc.dg/analyzer/asm-x86-1.c
index f6026b7..a3f86e4 100644
--- a/gcc/testsuite/gcc.dg/analyzer/asm-x86-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/asm-x86-1.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble { target x86_64-*-* } } */
+/* { dg-do compile { target x86_64-*-* } } */
#include "analyzer-decls.h"
diff --git a/gcc/testsuite/gcc.dg/analyzer/asm-x86-lp64-1.c b/gcc/testsuite/gcc.dg/analyzer/asm-x86-lp64-1.c
index c235e22..4730255 100644
--- a/gcc/testsuite/gcc.dg/analyzer/asm-x86-lp64-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/asm-x86-lp64-1.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble { target x86_64-*-* } } */
+/* { dg-do compile { target x86_64-*-* } } */
/* { dg-require-effective-target lp64 } */
#include "analyzer-decls.h"
diff --git a/gcc/testsuite/gcc.dg/analyzer/asm-x86-lp64-2.c b/gcc/testsuite/gcc.dg/analyzer/asm-x86-lp64-2.c
index fa50739..2864ab6 100644
--- a/gcc/testsuite/gcc.dg/analyzer/asm-x86-lp64-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/asm-x86-lp64-2.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble { target x86_64-*-* } } */
+/* { dg-do compile { target x86_64-*-* } } */
/* { dg-require-effective-target lp64 } */
/* Adapted from Linux x86: page_ref_dec_and_test.c (GPL-2.0). */
diff --git a/gcc/testsuite/gcc.dg/analyzer/attr-tainted_args-1.c b/gcc/testsuite/gcc.dg/analyzer/attr-tainted_args-1.c
new file mode 100644
index 0000000..e1d87c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/attr-tainted_args-1.c
@@ -0,0 +1,88 @@
+// TODO: remove need for this option
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include "analyzer-decls.h"
+
+struct arg_buf
+{
+ int i;
+ int j;
+};
+
+/* Example of marking a function as tainted. */
+
+void __attribute__((tainted_args))
+test_1 (int i, void *p, char *q)
+{
+ /* There should be a single enode,
+ for the "tainted" entry to the function. */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
+
+ __analyzer_dump_state ("taint", i); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", p); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", q); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", *q); /* { dg-warning "state: 'tainted'" } */
+
+ struct arg_buf *args = p;
+ __analyzer_dump_state ("taint", args->i); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", args->j); /* { dg-warning "state: 'tainted'" } */
+}
+
+/* Example of marking a callback field as tainted. */
+
+struct s2
+{
+ void (*cb) (int, void *, char *)
+ __attribute__((tainted_args));
+};
+
+/* Function not marked as tainted. */
+
+void
+test_2a (int i, void *p, char *q)
+{
+ /* There should be a single enode,
+ for the normal entry to the function. */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
+
+ __analyzer_dump_state ("taint", i); /* { dg-warning "state: 'start'" } */
+ __analyzer_dump_state ("taint", p); /* { dg-warning "state: 'start'" } */
+ __analyzer_dump_state ("taint", q); /* { dg-warning "state: 'start'" } */
+
+ struct arg_buf *args = p;
+ __analyzer_dump_state ("taint", args->i); /* { dg-warning "state: 'start'" } */
+ __analyzer_dump_state ("taint", args->j); /* { dg-warning "state: 'start'" } */
+}
+
+/* Function referenced via t2b.cb, marked as "tainted". */
+
+void
+test_2b (int i, void *p, char *q)
+{
+ /* There should be two enodes
+ for the direct call, and the "tainted" entry to the function. */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "2 processed enodes" } */
+}
+
+/* Callback used via t2c.cb, marked as "tainted". */
+void
+__analyzer_test_2c (int i, void *p, char *q)
+{
+ /* There should be a single enode,
+ for the "tainted" entry to the function. */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
+
+ __analyzer_dump_state ("taint", i); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", p); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", q); /* { dg-warning "state: 'tainted'" } */
+}
+
+struct s2 t2b =
+{
+ .cb = test_2b
+};
+
+struct s2 t2c =
+{
+ .cb = __analyzer_test_2c
+};
diff --git a/gcc/testsuite/gcc.dg/analyzer/attr-tainted_args-misuses.c b/gcc/testsuite/gcc.dg/analyzer/attr-tainted_args-misuses.c
new file mode 100644
index 0000000..4b0dc91
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/attr-tainted_args-misuses.c
@@ -0,0 +1,6 @@
+int not_a_fn __attribute__ ((tainted_args)); /* { dg-warning "'tainted_args' attribute ignored; valid only for functions and function pointer fields" } */
+
+struct s
+{
+ int f __attribute__ ((tainted_args)); /* { dg-warning "'tainted_args' attribute ignored; field must be a function pointer" } */
+};
diff --git a/gcc/testsuite/gcc.dg/analyzer/calloc-1.c b/gcc/testsuite/gcc.dg/analyzer/calloc-1.c
new file mode 100644
index 0000000..bc28128
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/calloc-1.c
@@ -0,0 +1,27 @@
+#include "analyzer-decls.h"
+
+typedef __SIZE_TYPE__ size_t;
+
+#define NULL ((void *)0)
+
+extern void *calloc (size_t __nmemb, size_t __size)
+ __attribute__ ((__nothrow__ , __leaf__))
+ __attribute__ ((__malloc__))
+ __attribute__ ((__alloc_size__ (1, 2))) ;
+
+char *test_1 (size_t sz)
+{
+ char *p;
+
+ p = calloc (1, 3);
+ if (!p)
+ return NULL;
+
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: '\\(\[^\n\r\]*\\)3'" } */
+
+ __analyzer_eval (p[0] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[1] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[2] == 0); /* { dg-warning "TRUE" } */
+
+ return p;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/capacity-1.c b/gcc/testsuite/gcc.dg/analyzer/capacity-1.c
index 9ea41f7..2d12483 100644
--- a/gcc/testsuite/gcc.dg/analyzer/capacity-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/capacity-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target alloca } */
+
#include <stdlib.h>
#include "analyzer-decls.h"
@@ -53,7 +55,7 @@ test_malloc (void)
void
test_alloca (size_t sz)
{
- void *p = alloca (sz);
+ void *p = __builtin_alloca (sz);
__analyzer_dump_capacity (p); /* { dg-warning "capacity: 'INIT_VAL\\(sz_\[^\n\r\]*\\)'" } */
}
diff --git a/gcc/testsuite/gcc.dg/analyzer/capacity-3.c b/gcc/testsuite/gcc.dg/analyzer/capacity-3.c
index 41e282c..c099ff5 100644
--- a/gcc/testsuite/gcc.dg/analyzer/capacity-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/capacity-3.c
@@ -1,10 +1,12 @@
+/* { dg-require-effective-target alloca } */
+
#include <stdlib.h>
#include "analyzer-decls.h"
static void __attribute__((noinline))
__analyzer_callee_1 (size_t inner_sz)
{
- void *p = alloca (inner_sz);
+ void *p = __builtin_alloca (inner_sz);
__analyzer_dump_capacity (p); /* { dg-warning "capacity: 'INIT_VAL\\(outer_sz_\[^\n\r\]*\\)'" } */
}
diff --git a/gcc/testsuite/gcc.dg/analyzer/casts-1.c b/gcc/testsuite/gcc.dg/analyzer/casts-1.c
index 15cd85f..7e4af38 100644
--- a/gcc/testsuite/gcc.dg/analyzer/casts-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/casts-1.c
@@ -13,6 +13,14 @@ struct s2
char arr[4];
};
+struct s3
+{
+ struct inner {
+ char a;
+ char b;
+ } arr[2];
+};
+
void test_1 ()
{
struct s1 x = {'A', 'B', 'C', 'D'};
@@ -24,10 +32,16 @@ void test_1 ()
__analyzer_eval (((struct s2 *)&x)->arr[1] == 'B'); /* { dg-warning "TRUE" } */
__analyzer_eval (((struct s2 *)&x)->arr[2] == 'C'); /* { dg-warning "TRUE" } */
__analyzer_eval (((struct s2 *)&x)->arr[3] == 'D'); /* { dg-warning "TRUE" } */
+ struct s3 *p3 = (struct s3 *)&x;
+ __analyzer_eval (p3->arr[0].a == 'A'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p3->arr[0].b == 'B'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p3->arr[1].a == 'C'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p3->arr[1].b == 'D'); /* { dg-warning "TRUE" } */
((struct s2 *)&x)->arr[1] = '#';
__analyzer_eval (((struct s2 *)&x)->arr[1] == '#'); /* { dg-warning "TRUE" } */
__analyzer_eval (x.b == '#'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p3->arr[0].b == '#'); /* { dg-warning "TRUE" } */
}
void test_2 ()
@@ -38,12 +52,27 @@ void test_2 ()
__analyzer_eval (x.arr[2] == 'C'); /* { dg-warning "TRUE" } */
__analyzer_eval (x.arr[3] == 'D'); /* { dg-warning "TRUE" } */
struct s1 *p = (struct s1 *)&x;
- __analyzer_eval (p->a == 'A'); /* { dg-warning "TRUE" "true" { xfail *-*-* } } */
- /* { dg-bogus "UNKNOWN" "unknown" { xfail *-*-* } .-1 } */
- __analyzer_eval (p->b == 'B'); /* { dg-warning "TRUE" "true" { xfail *-*-* } } */
- /* { dg-bogus "UNKNOWN" "unknown" { xfail *-*-* } .-1 } */
- __analyzer_eval (p->c == 'C'); /* { dg-warning "TRUE" "true" { xfail *-*-* } } */
- /* { dg-bogus "UNKNOWN" "unknown" { xfail *-*-* } .-1 } */
- __analyzer_eval (p->d == 'D'); /* { dg-warning "TRUE" "true" { xfail *-*-* } } */
- /* { dg-bogus "UNKNOWN" "unknown" { xfail *-*-* } .-1 } */
+ __analyzer_eval (p->a == 'A'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p->b == 'B'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p->c == 'C'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p->d == 'D'); /* { dg-warning "TRUE" } */
+}
+
+void test_3 ()
+{
+ struct s3 x = {'A', 'B', 'C', 'D'};
+ __analyzer_eval (x.arr[0].a == 'A'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (x.arr[0].b == 'B'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (x.arr[1].a == 'C'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (x.arr[1].b == 'D'); /* { dg-warning "TRUE" } */
+ struct s1 *p1 = (struct s1 *)&x;
+ __analyzer_eval (p1->a == 'A'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p1->b == 'B'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p1->c == 'C'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p1->d == 'D'); /* { dg-warning "TRUE" } */
+ struct s2 *p2 = (struct s2 *)&x;
+ __analyzer_eval (p2->arr[0] == 'A'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p2->arr[1] == 'B'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p2->arr[2] == 'C'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p2->arr[3] == 'D'); /* { dg-warning "TRUE" } */
}
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-1.c b/gcc/testsuite/gcc.dg/analyzer/data-model-1.c
index 908d999..4318191 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-1.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target alloca } */
+/* { dg-additional-options "-fno-ipa-modref" } */
#include <stdlib.h>
#include <string.h>
@@ -151,7 +152,7 @@ int test_12 (void)
/* Use of uninit value. */
int test_12a (void)
{
- int i;
+ int i; /* { dg-message "region created on stack here" } */
return i; /* { dg-warning "use of uninitialized value 'i'" } */
}
@@ -162,7 +163,7 @@ void test_12b (void *p, void *q)
int test_12c (void)
{
- int i;
+ int i; /* { dg-message "region created on stack here" } */
int j;
j = i; /* { dg-warning "use of uninitialized value 'i'" } */
@@ -348,7 +349,7 @@ void test_18 (int i)
void test_19 (void)
{
- int i, j;
+ int i, j; /* { dg-message "region created on stack here" } */
/* Compare two uninitialized locals. */
__analyzer_eval (i == j); /* { dg-warning "UNKNOWN" "unknown " } */
/* { dg-warning "use of uninitialized value 'i'" "uninit i" { target *-*-* } .-1 } */
@@ -632,7 +633,7 @@ void test_29a (struct coord p[])
void test_29b (void)
{
- struct coord p[11];
+ struct coord p[11]; /* { dg-message "region created on stack here" } */
struct coord *q;
p[0].x = 100024;
@@ -818,7 +819,7 @@ void test_36 (int i)
int test_37 (void)
{
- int *ptr;
+ int *ptr; /* { dg-message "region created on stack here" } */
return *ptr; /* { dg-warning "use of uninitialized value 'ptr'" } */
}
@@ -826,7 +827,7 @@ int test_37 (void)
void test_37a (int i)
{
- int *ptr;
+ int *ptr; /* { dg-message "region created on stack here" } */
*ptr = i; /* { dg-warning "use of uninitialized value 'ptr'" } */
}
diff --git a/gcc/testsuite/gcc.dg/analyzer/edges-1.c b/gcc/testsuite/gcc.dg/analyzer/edges-1.c
index 6b53ddd..f08a614 100644
--- a/gcc/testsuite/gcc.dg/analyzer/edges-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/edges-1.c
@@ -1,4 +1,7 @@
-#include <stdio.h>
+typedef struct FILE FILE;
+
+FILE* fopen (const char*, const char*);
+int fclose (FILE*);
extern int foo ();
extern void bar ();
diff --git a/gcc/testsuite/gcc.dg/analyzer/escaping-1.c b/gcc/testsuite/gcc.dg/analyzer/escaping-1.c
new file mode 100644
index 0000000..2dfd02b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/escaping-1.c
@@ -0,0 +1,27 @@
+#include "analyzer-decls.h"
+
+#define NULL ((void *)0)
+
+extern void unknown_fn (void *);
+
+static int only_used_by_test_1;
+
+static void test_1 (void)
+{
+ int local_1, local_2;
+ __analyzer_dump_escaped (); /* { dg-warning "escaped: 0: " } */
+
+ unknown_fn (NULL);
+ __analyzer_dump_escaped (); /* { dg-warning "escaped: 0: " } */
+
+ unknown_fn (&local_1);
+ __analyzer_dump_escaped (); /* { dg-warning "escaped: 1: 'local_1'" } */
+
+ /* Should be idempotent. */
+ unknown_fn (&local_1);
+ __analyzer_dump_escaped (); /* { dg-warning "escaped: 1: 'local_1'" } */
+
+ /* Escape a static global. */
+ unknown_fn (&only_used_by_test_1);
+ __analyzer_dump_escaped (); /* { dg-warning "escaped: 2: 'local_1', 'only_used_by_test_1'" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/explode-1.c b/gcc/testsuite/gcc.dg/analyzer/explode-1.c
index f48408e..9b95afd 100644
--- a/gcc/testsuite/gcc.dg/analyzer/explode-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/explode-1.c
@@ -12,7 +12,7 @@ void test (void)
{
void *p0, *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8;
void **pp;
- while (get ()) /* { dg-warning "leak" } */
+ while (get ())
{
switch (get ())
{
@@ -47,7 +47,7 @@ void test (void)
{
default:
case 0:
- *pp = malloc (16);
+ *pp = malloc (16); /* { dg-warning "leak" } */
break;
case 1:
free (*pp);
diff --git a/gcc/testsuite/gcc.dg/analyzer/fields.c b/gcc/testsuite/gcc.dg/analyzer/fields.c
index de55208..0bf877f 100644
--- a/gcc/testsuite/gcc.dg/analyzer/fields.c
+++ b/gcc/testsuite/gcc.dg/analyzer/fields.c
@@ -1,4 +1,4 @@
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
extern size_t strlen (const char *__s)
__attribute__ ((__nothrow__ , __leaf__))
diff --git a/gcc/testsuite/gcc.dg/analyzer/file-1.c b/gcc/testsuite/gcc.dg/analyzer/file-1.c
index f9afa88..e8d9343 100644
--- a/gcc/testsuite/gcc.dg/analyzer/file-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/file-1.c
@@ -1,4 +1,9 @@
-#include <stdio.h>
+typedef struct FILE FILE;
+
+FILE* fopen (const char*, const char*);
+int fclose (FILE*);
+#define SEEK_SET 0
+int fseek (FILE *, long int, int);
void
test_1 (const char *path)
@@ -13,6 +18,9 @@ test_1 (const char *path)
/* { dg-message "second 'fclose' here; first 'fclose' was at \\(5\\)" "second fclose" { target *-*-* } .-1 } */
}
+/* Swallow -Wuse-after-free issued for the same problem
+ { dg-prune-output "-Wuse-after-free" } */
+
void
test_2 (const char *src, const char *dst)
{
diff --git a/gcc/testsuite/gcc.dg/analyzer/file-2.c b/gcc/testsuite/gcc.dg/analyzer/file-2.c
index aa04570..9c58108 100644
--- a/gcc/testsuite/gcc.dg/analyzer/file-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/file-2.c
@@ -1,4 +1,7 @@
-#include <stdio.h>
+typedef struct FILE FILE;
+
+FILE* fopen (const char*, const char*);
+int fclose (FILE*);
struct foo
{
@@ -16,3 +19,6 @@ void test (const char *path)
fclose (f.m_f);
fclose (f.m_f); /* { dg-warning "double 'fclose' of FILE 'f.m_f'" } */
}
+
+/* Swallow -Wuse-after-free issued for the same problem
+ { dg-prune-output "-Wuse-after-free" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/file-paths-1.c b/gcc/testsuite/gcc.dg/analyzer/file-paths-1.c
index d346f7a..f350178 100644
--- a/gcc/testsuite/gcc.dg/analyzer/file-paths-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/file-paths-1.c
@@ -1,6 +1,13 @@
/* { dg-additional-options "-fanalyzer-verbosity=3" } */
-#include <stdio.h>
+typedef struct FILE FILE;
+
+FILE* fopen (const char*, const char*);
+int fclose (FILE*);
+char *fgets (char *, int, FILE *);
+
+#define NULL ((void *)0)
+
/* Verify that we correctly emit CFG events in the face of buffers
being clobbered in these leak reports. */
diff --git a/gcc/testsuite/gcc.dg/analyzer/file-pr58237.c b/gcc/testsuite/gcc.dg/analyzer/file-pr58237.c
index 68f49c2..ecc7144 100644
--- a/gcc/testsuite/gcc.dg/analyzer/file-pr58237.c
+++ b/gcc/testsuite/gcc.dg/analyzer/file-pr58237.c
@@ -1,4 +1,10 @@
-#include <stdio.h>
+typedef struct FILE FILE;
+
+FILE* fopen (const char*, const char*);
+int fclose (FILE*);
+char *fgets (char *, int, FILE *);
+
+#define NULL ((void *)0)
void f0(const char *str)
{
diff --git a/gcc/testsuite/gcc.dg/analyzer/gzio-3.c b/gcc/testsuite/gcc.dg/analyzer/gzio-3.c
index 0a11f65..4266832 100644
--- a/gcc/testsuite/gcc.dg/analyzer/gzio-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/gzio-3.c
@@ -1,4 +1,4 @@
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
typedef struct _IO_FILE FILE;
extern size_t fread(void *__restrict __ptr, size_t __size, size_t __n,
FILE *__restrict __stream);
diff --git a/gcc/testsuite/gcc.dg/analyzer/gzio-3a.c b/gcc/testsuite/gcc.dg/analyzer/gzio-3a.c
index 15ed010..faf86fa 100644
--- a/gcc/testsuite/gcc.dg/analyzer/gzio-3a.c
+++ b/gcc/testsuite/gcc.dg/analyzer/gzio-3a.c
@@ -1,4 +1,4 @@
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
typedef struct _IO_FILE FILE;
extern size_t fread(void *__restrict __ptr, size_t __size, size_t __n,
FILE *__restrict __stream);
diff --git a/gcc/testsuite/gcc.dg/analyzer/leak-3.c b/gcc/testsuite/gcc.dg/analyzer/leak-3.c
new file mode 100644
index 0000000..d11cc03
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/leak-3.c
@@ -0,0 +1,41 @@
+#include <stdlib.h>
+
+/* Reduced from Juliet 1.3's CWE415_Double_Free__malloc_free_char_67a.c
+ goodG2B which was showing a false leak report in a non-LTO build. */
+
+struct s1
+{
+ char * structFirst;
+};
+void external_fn_1(struct s1 myStruct);
+void test_1()
+{
+ char * data;
+ struct s1 myStruct;
+ data = (char *)malloc(100*sizeof(char));
+ if (data == NULL)
+ exit(-1);
+ myStruct.structFirst = data;
+ external_fn_1(myStruct);
+} /* { dg-bogus "leak of 'data'" } */
+
+/* As above, but with padding before the field. */
+
+struct s2
+{
+ void *padding;
+ char *ptr;
+};
+void external_fn_2(struct s2 myStruct);
+void test_2()
+{
+ char * data;
+ struct s2 myStruct;
+ data = (char *)malloc(100*sizeof(char));
+ if (data == NULL)
+ exit(-1);
+ myStruct.padding = NULL;
+ myStruct.ptr = data;
+ external_fn_2(myStruct);
+} /* { dg-bogus "leak of 'data'" } */
+
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-1.c b/gcc/testsuite/gcc.dg/analyzer/malloc-1.c
index df2fc9c..3219f85 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-1.c
@@ -189,7 +189,7 @@ void test_15 (void)
void test_16 (void)
{
- void *p, *q;
+ void *p, *q; /* { dg-message "region created on stack here" } */
p = malloc (1024);
if (!p)
@@ -457,7 +457,7 @@ test_39 (int i)
int *
test_40 (int i)
{
- int *p = (int*)malloc(sizeof(int*));
+ int *p = (int*)malloc(sizeof(int*)); /* { dg-message "region created on heap here" } */
i = *p; /* { dg-warning "dereference of possibly-NULL 'p' \\\[CWE-690\\\]" "possibly-null" } */
/* { dg-warning "use of uninitialized value '\\*p'" "uninit" { target *-*-*} .-1 } */
return p;
diff --git a/gcc/testsuite/gcc.dg/analyzer/memcpy-1.c b/gcc/testsuite/gcc.dg/analyzer/memcpy-1.c
index f120eac..a9368d3 100644
--- a/gcc/testsuite/gcc.dg/analyzer/memcpy-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/memcpy-1.c
@@ -1,6 +1,16 @@
#include <string.h>
#include "analyzer-decls.h"
+/* Function for thwarting expansion of memcpy by optimizer. */
+
+typedef void * (*memcpy_t) (void *dst, const void *src, size_t n);
+
+static memcpy_t __attribute__((noinline))
+get_memcpy (void)
+{
+ return memcpy;
+}
+
void *test_1 (void *dst, void *src, size_t n)
{
void *result = memcpy (dst, src, n);
@@ -15,6 +25,14 @@ void *test_1a (void *dst, void *src, size_t n)
return result;
}
+void *test_1b (void *dst, void *src, size_t n)
+{
+ memcpy_t fn = get_memcpy ();
+ void *result = fn (dst, src, n);
+ __analyzer_eval (result == dst); /* { dg-warning "TRUE" } */
+ return result;
+}
+
void test_2 (int i)
{
int j;
@@ -29,6 +47,14 @@ void test_2a (int i)
__analyzer_eval (i == j); /* { dg-warning "TRUE" } */
}
+void test_2b (int i)
+{
+ int j;
+ memcpy_t fn = get_memcpy ();
+ fn (&j, &i, sizeof (int));
+ __analyzer_eval (i == j); /* { dg-warning "TRUE" } */
+}
+
void test_3 (void *src, size_t n)
{
char buf[40], other[40];
@@ -41,3 +67,102 @@ void test_3 (void *src, size_t n)
__analyzer_eval (buf[0] == 'a'); /* { dg-warning "UNKNOWN" } */
__analyzer_eval (other[0] == 'b'); /* { dg-warning "TRUE" } */
}
+
+void test_3b (void *src, size_t n)
+{
+ char buf[40], other[40];
+ memcpy_t fn = get_memcpy ();
+ buf[0] = 'a';
+ other[0] = 'b';
+ __analyzer_eval (buf[0] == 'a'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (other[0] == 'b'); /* { dg-warning "TRUE" } */
+
+ fn (buf, src, n);
+ __analyzer_eval (buf[0] == 'a'); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (other[0] == 'b'); /* { dg-warning "TRUE" } */
+}
+
+/* Overwriting a zeroed buffer, then memcpy of the result. */
+
+void test_4 (int a, int b)
+{
+ int src[1024];
+ int dst[1024];
+ memset (src, 0, sizeof (src));
+ src[42] = a;
+ src[100] = b;
+ __analyzer_eval (src[0] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (src[42] == a); /* { dg-warning "TRUE" } */
+ __analyzer_eval (src[100] == b); /* { dg-warning "TRUE" } */
+ __analyzer_eval (src[1023] == 0); /* { dg-warning "TRUE" } */
+
+ memcpy (dst, src, sizeof (src));
+ __analyzer_eval (dst[0] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (dst[42] == a); /* { dg-warning "TRUE" } */
+ __analyzer_eval (dst[100] == b); /* { dg-warning "TRUE" } */
+ __analyzer_eval (dst[1023] == 0); /* { dg-warning "TRUE" } */
+}
+
+void test_4b (int a, int b)
+{
+ int src[1024];
+ int dst[1024];
+ memcpy_t fn = get_memcpy ();
+ memset (src, 0, sizeof (src));
+ src[42] = a;
+ src[100] = b;
+ __analyzer_eval (src[0] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (src[42] == a); /* { dg-warning "TRUE" } */
+ __analyzer_eval (src[100] == b); /* { dg-warning "TRUE" } */
+ __analyzer_eval (src[1023] == 0); /* { dg-warning "TRUE" } */
+
+ fn (dst, src, sizeof (src));
+ __analyzer_eval (dst[0] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (dst[42] == a); /* { dg-warning "TRUE" } */
+ __analyzer_eval (dst[100] == b); /* { dg-warning "TRUE" } */
+ __analyzer_eval (dst[1023] == 0); /* { dg-warning "TRUE" } */
+}
+
+/* Populating a buffer from an unknown buffer. */
+
+void test_5 (void *src, size_t sz)
+{
+ char dst[1024];
+ memcpy (dst, src, sizeof (dst));
+ __analyzer_eval (dst[0] == 0); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (dst[1023] == 0); /* { dg-warning "UNKNOWN" } */
+}
+
+void test_5b (void *src, size_t sz)
+{
+ char dst[1024];
+ memcpy_t fn = get_memcpy ();
+ fn (dst, src, sizeof (dst));
+ __analyzer_eval (dst[0] == 0); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (dst[1023] == 0); /* { dg-warning "UNKNOWN" } */
+}
+
+/* Zero-sized memcpy. */
+
+void test_6 (void *dst, void *src)
+{
+ memcpy (dst, src, 0);
+}
+
+void test_6b (void *dst, void *src)
+{
+ memcpy_t fn = get_memcpy ();
+ fn (dst, src, 0);
+}
+
+/* memcpy to string literal. */
+
+void test_7 (void *src, size_t sz)
+{
+ memcpy ((void *)"hello world", src, sz); /* { dg-warning "write to string literal" } */
+}
+
+void test_7b (void *src, size_t sz)
+{
+ memcpy ((void *)"hello world", src, sz); /* { dg-warning "write to string literal" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/memset-CVE-2017-18549-1.c b/gcc/testsuite/gcc.dg/analyzer/memset-CVE-2017-18549-1.c
index de9b5e3..b12408a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/memset-CVE-2017-18549-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/memset-CVE-2017-18549-1.c
@@ -47,7 +47,7 @@ static int aac_send_raw_srb(/* [...snip...] */)
/* [...snip...] */
- struct aac_srb_reply reply;
+ struct aac_srb_reply reply; /* { dg-message "region created on stack here" } */
reply.status = ST_OK;
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr101547.c b/gcc/testsuite/gcc.dg/analyzer/pr101547.c
index 8791cff..b42e64c 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr101547.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr101547.c
@@ -5,7 +5,7 @@ void
k2 (void)
{
char *setfiles[1];
- int i;
+ int i; /* { dg-message "region created on stack here" } */
setfiles[i] = fopen ("", ""); /* { dg-warning "use of uninitialized value 'i'" } */
} /* { dg-warning "leak of FILE" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr101875.c b/gcc/testsuite/gcc.dg/analyzer/pr101875.c
index 5988b8e..7700c7d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr101875.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr101875.c
@@ -8,7 +8,7 @@ void
k2 (void)
{
char *setfiles[1];
- int i;
+ int i; /* { dg-message "region created on stack here" } */
setfiles[i] = fopen("", ""); /* { dg-warning "use of uninitialized value 'i'" } */
if (!setfiles[i]) /* { dg-warning "use of uninitialized value 'i'" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr101962.c b/gcc/testsuite/gcc.dg/analyzer/pr101962.c
index 7b83d03..d15820a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr101962.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr101962.c
@@ -16,7 +16,7 @@ maybe_inc_int_ptr (int *ptr)
int
test_1 (void)
{
- int stack;
+ int stack; /* { dg-message "region created on stack here" } */
int *a = &stack;
a = maybe_inc_int_ptr (a);
a = maybe_inc_int_ptr (a);
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr102692.c b/gcc/testsuite/gcc.dg/analyzer/pr102692.c
new file mode 100644
index 0000000..c8993c8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr102692.c
@@ -0,0 +1,110 @@
+/* { dg-additional-options "-O2 -Wno-analyzer-too-complex" } */
+/* TODO: remove the need for -Wno-analyzer-too-complex. */
+
+struct lisp;
+union vectorlike_header { long size; };
+
+static struct lisp *
+make_lisp_ptr (void *ptr, int type)
+{
+ char *p = ptr;
+ void *q = p + type;
+ return q;
+}
+
+static _Bool
+TAGGEDP (struct lisp *a, unsigned tag)
+{
+ return ! (((unsigned) (long) a - tag) & 7);
+}
+
+static _Bool
+VECTORLIKEP (struct lisp *x)
+{
+ return TAGGEDP (x, 5);
+}
+
+extern _Bool
+PSEUDOVECTOR_TYPEP (union vectorlike_header const *a, int code);
+
+static _Bool
+PSEUDOVECTORP (struct lisp *a, int code)
+{
+ if (! VECTORLIKEP (a))
+ return 0;
+ else
+ return PSEUDOVECTOR_TYPEP ((union vectorlike_header *) ((char *) a - 5),
+ code);
+}
+
+struct Lisp_Overlay
+{
+ union vectorlike_header header;
+ struct lisp *end;
+ struct Lisp_Overlay *next;
+};
+
+static _Bool
+OVERLAYP (struct lisp *x)
+{
+ return PSEUDOVECTORP (x, 4);
+}
+
+static struct Lisp_Overlay *
+XOVERLAY (struct lisp *a)
+{
+ void *r = (char *) a - 5;
+ return r;
+}
+struct buffer { struct Lisp_Overlay *overlays_before; };
+
+long marker_position (struct lisp *);
+
+void
+fix_overlays_before (struct buffer *bp, long prev, long pos)
+{
+ struct Lisp_Overlay *tail = bp->overlays_before, *parent = 0, *right_pair;
+ struct lisp *tem;
+ long end;
+ while (tail
+ && (tem = make_lisp_ptr (tail, 5),
+ (end = marker_position (XOVERLAY (tem)->end)) >= pos))
+ {
+ parent = tail;
+ tail = tail->next;
+ }
+ if (!tail || end < prev || !tail->next) /* { dg-bogus "use of uninitialized value 'end'" "uninit" { xfail *-*-* } } */
+ /* { dg-bogus "dereference of NULL 'tail'" "null deref" { target *-*-* } .-1 } */
+ return;
+ right_pair = parent;
+ parent = tail;
+ tail = tail->next;
+ while (tail)
+ {
+ tem = make_lisp_ptr (tail, 5);
+ end = marker_position (XOVERLAY (tem)->end);
+ if (end == pos)
+ {
+ struct Lisp_Overlay *found = tail;
+ tail = found->next;
+ parent->next = tail;
+ if (!right_pair)
+ {
+ found->next = bp->overlays_before;
+ bp->overlays_before = found;
+ }
+ else
+ {
+ found->next = right_pair->next;
+ right_pair->next = found;
+ }
+ }
+ else if (end == prev)
+ {
+ parent = tail;
+ tail = tail->next;
+ }
+ else
+ break;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr102695.c b/gcc/testsuite/gcc.dg/analyzer/pr102695.c
new file mode 100644
index 0000000..2ca9882
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr102695.c
@@ -0,0 +1,44 @@
+extern void* malloc (__SIZE_TYPE__);
+
+const char* write_strchr_literal (int x)
+{
+ char *p = __builtin_strchr ("123", x);
+ *p = 0; /* { dg-warning "dereference of NULL 'p'" "null deref" } */
+ /* { dg-warning "write to string literal" "string literal" { target *-*-* } .-1 } */
+ return p;
+}
+
+const char* write_strchr_const_array (int x)
+{
+ static const char a[] = "123";
+ char *p = __builtin_strchr (a, x);
+ *p = 0; /* { dg-warning "dereference of NULL 'p'" "null deref" } */
+ /* { dg-warning "write to 'const' object 'a'" "write to const" { target *-*-* } .-1 } */
+ return a;
+}
+
+char* write_function (void)
+{
+ char *p = (char*)malloc /* forgot arguments */;
+ p[1] = 'a'; /* { dg-warning "write to function 'malloc'" } */
+ __builtin_strcpy (p, "123"); /* { dg-warning "write to function 'malloc'" } */
+ return p;
+}
+
+char* write_label (void)
+{
+ char *p = (char*)&&L;
+ *p = 0; /* { dg-warning "write to label 'L'" } */
+L:
+ return p;
+}
+
+struct A { const int i; };
+
+extern /* not const */ struct A a;
+
+void write_const_member (void)
+{
+ char *p = (char*)&a.i;
+ *p = 0; // missing warning
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr103217-2.c b/gcc/testsuite/gcc.dg/analyzer/pr103217-2.c
new file mode 100644
index 0000000..3a9c414
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr103217-2.c
@@ -0,0 +1,52 @@
+typedef __SIZE_TYPE__ size_t;
+
+extern void *calloc (size_t __nmemb, size_t __size)
+ __attribute__ ((__nothrow__ , __leaf__, __malloc__, __alloc_size__ (1, 2)));
+
+extern char *strdup (const char *__s)
+ __attribute__ ((__nothrow__ , __leaf__, __malloc__, __nonnull__ (1)));
+
+extern void abort (void)
+ __attribute__ ((__nothrow__ , __leaf__, __noreturn__));
+
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+ __attribute__ ((__nothrow__ , __leaf__, __nonnull__ (2, 3)));
+extern char *optarg;
+
+extern void free (void *__ptr)
+ __attribute__ ((__nothrow__ , __leaf__));
+
+char *xstrdup(const char *src) {
+ char *val = strdup(src);
+ if (!val)
+ abort();
+ return val;
+}
+
+struct test {
+ char *one, *two;
+};
+
+int main(int argc, char *argv[]) {
+ struct test *options = calloc(1, sizeof(*options));
+ int rc;
+ if (!options)
+ abort();
+
+ while ((rc = getopt(argc, argv, "a:b:")) != -1) {
+ switch (rc) {
+ case 'a':
+ free(options->one);
+ options->one = xstrdup(optarg);
+ break;
+ case 'b':
+ free(options->two);
+ options->two = xstrdup(optarg);
+ break;
+ }
+ }
+ free(options->one);
+ free(options->two);
+ free(options);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr103217-3.c b/gcc/testsuite/gcc.dg/analyzer/pr103217-3.c
new file mode 100644
index 0000000..b103a121
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr103217-3.c
@@ -0,0 +1,52 @@
+extern char *strdup (const char *__s)
+ __attribute__ ((__nothrow__ , __leaf__, __malloc__, __nonnull__ (1)));
+
+extern void abort (void)
+ __attribute__ ((__nothrow__ , __leaf__, __noreturn__));
+
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+ __attribute__ ((__nothrow__ , __leaf__, __nonnull__ (2, 3)));
+extern char *optarg;
+
+extern void free (void *__ptr)
+ __attribute__ ((__nothrow__ , __leaf__));
+
+struct state {
+ const char *confpath;
+ const char *host;
+ const char *port;
+ const char *state_dir_prefix;
+};
+
+static inline char *xstrdup(const char *s) {
+ char *val = strdup(s);
+ if (!val)
+ abort();
+ return val;
+}
+
+int config_init(struct state *config);
+
+int main(int argc, char *argv[]) {
+ int rc;
+ struct state state = { 0 };
+
+ config_init(&state);
+
+ while ((rc = getopt(argc, argv, "H:p:")) != -1) {
+ switch (rc) {
+ case 'H':
+ free((void*)state.host);
+ state.host = xstrdup(optarg);
+ break;
+ case 'p':
+ free((void*)state.port);
+ state.port = xstrdup(optarg);
+ break;
+ }
+ }
+
+ free((void*)state.host);
+ free((void*)state.port);
+ return rc;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr103217-4.c b/gcc/testsuite/gcc.dg/analyzer/pr103217-4.c
new file mode 100644
index 0000000..516e1f4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr103217-4.c
@@ -0,0 +1,52 @@
+extern char *strdup (const char *__s)
+ __attribute__ ((__nothrow__ , __leaf__, __malloc__, __nonnull__ (1)));
+
+extern void abort (void)
+ __attribute__ ((__nothrow__ , __leaf__, __noreturn__));
+
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+ __attribute__ ((__nothrow__ , __leaf__, __nonnull__ (2, 3)));
+extern char *optarg;
+
+extern void free (void *__ptr)
+ __attribute__ ((__nothrow__ , __leaf__));
+
+struct state {
+ const char *confpath;
+ const char *host;
+ const char *port;
+ const char *state_dir_prefix;
+};
+
+static inline char *xstrdup(const char *s) {
+ char *val = strdup(s);
+ if (!val)
+ abort();
+ return val;
+}
+
+int config_init(struct state *config);
+
+int main(int argc, char *argv[]) {
+ int rc;
+ struct state state = { 0 };
+
+ config_init(&state);
+
+ if ((rc = getopt(argc, argv, "H:p:")) != -1) {
+ switch (rc) {
+ case 'H':
+ free((void*)state.host);
+ state.host = xstrdup(optarg);
+ break;
+ case 'p':
+ free((void*)state.port);
+ state.port = xstrdup(optarg);
+ break;
+ }
+ }
+
+ free((void*)state.host);
+ free((void*)state.port);
+ return rc;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr103217-5.c b/gcc/testsuite/gcc.dg/analyzer/pr103217-5.c
new file mode 100644
index 0000000..d916d92
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr103217-5.c
@@ -0,0 +1,47 @@
+extern char *strdup (const char *__s)
+ __attribute__ ((__nothrow__ , __leaf__, __malloc__, __nonnull__ (1)));
+
+extern void abort (void)
+ __attribute__ ((__nothrow__ , __leaf__, __noreturn__));
+
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+ __attribute__ ((__nothrow__ , __leaf__, __nonnull__ (2, 3)));
+extern char *optarg;
+
+extern void free (void *__ptr)
+ __attribute__ ((__nothrow__ , __leaf__));
+
+struct state {
+ const char *confpath;
+ const char *host;
+ const char *port;
+ const char *state_dir_prefix;
+};
+
+static inline char *xstrdup(const char *s) {
+ char *val = strdup(s);
+ if (!val)
+ abort();
+ return val;
+}
+
+int config_init(struct state *config);
+
+int main(int argc, char *argv[]) {
+ struct state state;
+
+ config_init(&state);
+
+ switch (getopt(argc, argv, "H:p:")) {
+ case 'H':
+ state.host = xstrdup(optarg);
+ break;
+ case 'p':
+ state.port = xstrdup(optarg);
+ break;
+ }
+
+ free((void*)state.host);
+ free((void*)state.port);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr103217.c b/gcc/testsuite/gcc.dg/analyzer/pr103217.c
new file mode 100644
index 0000000..a0ef8bf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr103217.c
@@ -0,0 +1,42 @@
+extern char *strdup (const char *__s)
+ __attribute__ ((__nothrow__ , __leaf__, __malloc__, __nonnull__ (1)));
+
+extern void abort (void)
+ __attribute__ ((__nothrow__ , __leaf__, __noreturn__));
+
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+ __attribute__ ((__nothrow__ , __leaf__, __nonnull__ (2, 3)));
+extern char *optarg;
+
+extern void free (void *__ptr)
+ __attribute__ ((__nothrow__ , __leaf__));
+
+#define NULL ((void *)0)
+
+char *xstrdup(const char *src) {
+ char *val = strdup(src);
+ if (!val)
+ abort();
+ return val;
+}
+
+int main(int argc, char *argv[]) {
+ char *one = NULL, *two = NULL;
+ int rc;
+
+ while ((rc = getopt(argc, argv, "a:b:")) != -1) {
+ switch (rc) {
+ case 'a':
+ free(one);
+ one = xstrdup(optarg);
+ break;
+ case 'b':
+ free(two);
+ two = xstrdup(optarg);
+ break;
+ }
+ }
+ free(one);
+ free(two);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr103526.c b/gcc/testsuite/gcc.dg/analyzer/pr103526.c
new file mode 100644
index 0000000..39d60fd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr103526.c
@@ -0,0 +1,50 @@
+#include <stdlib.h>
+#include <string.h>
+
+struct game_state {
+ const char *word;
+ char *word_state;
+};
+
+const char *const teststr = "test string";
+
+static struct game_state *
+game_new(void)
+{
+ struct game_state tmp = {0};
+ struct game_state *rval = NULL;
+ size_t wordlen;
+
+ tmp.word = teststr;
+ wordlen = strlen(tmp.word);
+ if ((tmp.word_state = malloc(wordlen+1)) == NULL)
+ goto err;
+ if ((rval = malloc(sizeof(*rval))) == NULL)
+ goto err;
+ memcpy(rval, &tmp, sizeof(*rval));
+
+ return (rval);
+err:
+ free(tmp.word_state);
+ free(rval);
+ return (NULL);
+} /* { dg-bogus "leak" } */
+
+static void
+game_free(struct game_state *game)
+{
+ if (game == NULL)
+ return;
+ free(game->word_state);
+ free(game);
+}
+
+int
+main(void)
+{
+ struct game_state *game;
+ if ((game = game_new()) == NULL)
+ exit(1);
+ game_free(game);
+ exit(0);
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr104029.c b/gcc/testsuite/gcc.dg/analyzer/pr104029.c
new file mode 100644
index 0000000..adf15ed
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr104029.c
@@ -0,0 +1,115 @@
+// TODO: remove need for this option
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+typedef __SIZE_TYPE__ size_t;
+typedef const void *t_comptype;
+typedef int (*t_compfunc)(t_comptype, t_comptype);
+
+extern int *__errno_location(void)
+ __attribute__((__nothrow__, __leaf__,__const__));
+extern void free(void *__ptr)
+ __attribute__((__nothrow__, __leaf__));
+extern void *my_malloc1(const char *file, int line, size_t size);
+
+int heapsort(void *vbase, size_t nmemb, size_t size, t_compfunc compar) {
+ char tmp, *tmp1, *tmp2, *abase, *k, *p, *t;
+ size_t cnt, i, j, l;
+
+ if (nmemb <= 1)
+ return (0);
+
+ if (!size) {
+ (*__errno_location()) = 22;
+ return (-1);
+ }
+
+ k = my_malloc1(__FILE__, __LINE__, size);
+
+ abase = (char *)vbase - size;
+
+ for (l = nmemb / 2 + 1; --l;) {
+ for (i = l; (j = i * 2) <= nmemb; i = j) {
+ p = abase + j * size;
+ if (j < nmemb && compar(p, p + size) < 0) {
+ p += size;
+ ++j;
+ }
+ t = abase + i * size;
+ if (compar(p, t) <= 0)
+ break;
+ {
+ cnt = size;
+ do {
+ tmp = *t;
+ *t++ = *p;
+ *p++ = tmp;
+ } while (--cnt);
+ };
+ }
+ };
+
+ while (nmemb > 1) {
+ {
+ cnt = size;
+ tmp1 = k;
+ tmp2 = abase + nmemb * size;
+ do {
+ *tmp1++ = *tmp2++;
+ } while (--cnt);
+ };
+ {
+ cnt = size;
+ tmp1 = abase + nmemb * size;
+ tmp2 = abase + size;
+ do {
+ *tmp1++ = *tmp2++;
+ } while (--cnt);
+ };
+ --nmemb;
+ {
+ for (i = 1; (j = i * 2) <= nmemb; i = j) {
+ p = abase + j * size;
+ if (j < nmemb && compar(p, p + size) < 0) {
+ p += size;
+ ++j;
+ }
+ t = abase + i * size;
+ {
+ cnt = size;
+ tmp1 = t;
+ tmp2 = p;
+ do {
+ *tmp1++ = *tmp2++;
+ } while (--cnt);
+ };
+ }
+ for (;;) {
+ j = i;
+ i = j / 2;
+ p = abase + j * size;
+ t = abase + i * size;
+ if (j == 1 || compar(k, t) < 0) {
+ {
+ cnt = size;
+ tmp1 = p;
+ tmp2 = k;
+ do {
+ *tmp1++ = *tmp2++;
+ } while (--cnt);
+ };
+ break;
+ }
+ {
+ cnt = size;
+ tmp1 = p;
+ tmp2 = t;
+ do {
+ *tmp1++ = *tmp2++;
+ } while (--cnt);
+ };
+ }
+ };
+ }
+ free(k);
+ return (0);
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr104062.c b/gcc/testsuite/gcc.dg/analyzer/pr104062.c
new file mode 100644
index 0000000..7129c27
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr104062.c
@@ -0,0 +1,13 @@
+void *
+calloc (__SIZE_TYPE__, __SIZE_TYPE__);
+
+void *
+realloc (void *, __SIZE_TYPE__);
+
+void
+foo (void)
+{
+ int *ap5 = calloc (4, sizeof *ap5);
+ int *ap7 = realloc (ap5, sizeof *ap5);
+} /* { dg-warning "leak of 'ap5'" "leak of ap5" } */
+/* { dg-warning "leak of 'ap7'" "leak of ap7" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr104089.c b/gcc/testsuite/gcc.dg/analyzer/pr104089.c
new file mode 100644
index 0000000..3bf637e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr104089.c
@@ -0,0 +1,11 @@
+/* { dg-add-options float16 } */
+/* { dg-require-effective-target float16 } */
+/* { dg-additional-options "-frounding-math" } */
+
+volatile _Float16 true_min = 5.96046447753906250000000000000000000e-8F16;
+
+int
+main (void)
+{
+ return __builtin_fpclassify (0, 1, 4, 3, 2, true_min);
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr104224.c b/gcc/testsuite/gcc.dg/analyzer/pr104224.c
new file mode 100644
index 0000000..b047c4c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr104224.c
@@ -0,0 +1,106 @@
+#include <stdio.h>
+
+struct test {
+ int one;
+ int two;
+};
+
+void func2(const struct test *t)
+{
+ if (t->one == 0)
+ printf("init func2\n");
+
+ if (t->two == 0) /* { dg-warning "uninitialized" } */
+ printf("uninit func2\n");
+}
+
+void func1(struct test *t)
+{
+ t->one = 1;
+ func2(t);
+}
+
+int func3(int num)
+{
+ if (num)
+ return num;
+ else
+ return 0;
+}
+
+void func4(int *a, int max)
+{
+ int i;
+ // skip the first
+ for (i=1; i<max; i++)
+ a[i] = 0;
+}
+
+void func5(const int *a, int max)
+{
+ /* a[0] is uninitialized, but the rest of the array is initialized. */
+ int i;
+ for (i=0; i<max; i++) {
+ if (a[i]) /* { dg-warning "uninitialized" "" { xfail *-*-* } } */
+ printf("func5: %d\n", i);
+ }
+}
+
+int func6(const int *num)
+{
+ if (*num) /* { dg-warning "uninitialized" } */
+ return *num; /* { dg-warning "uninitialized" } */
+ else
+ return 0;
+}
+
+int j;
+int func7(void)
+{
+ return j; /* { dg-bogus "uninitialized" } */
+}
+
+void func8(const int *a, int max)
+{
+ int i;
+ for (i=0; i<max; i++) {
+ if (a[i]) /* { dg-warning "uninitialized" } */
+ printf("func8: %d\n", i);
+ }
+}
+
+enum {RED, AMBER, GREEN, BLACK};
+
+int main(void)
+{
+ struct test t; /* { dg-message "region created on stack here" } */
+ int num; /* { dg-message "region created on stack here" } */
+ int arry[10];
+ int arry_2[10]; /* { dg-message "region created on stack here" } */
+ int go; /* { dg-message "region created on stack here" } */
+ int color = BLACK;
+
+ func1(&t);
+ func3(num); /* { dg-warning "use of uninitialized value 'num'" } */
+ func4(arry, 10);
+ func5(arry, 10);
+ func6(&num);
+
+ printf("num: %d\n", num); /* { dg-warning "use of uninitialized value 'num'" } */
+ printf("func7: %d\n", func7());
+ func8(arry_2, 10);
+
+ switch (color) {
+ case RED:
+ case AMBER:
+ go = 0;
+ break;
+ case GREEN:
+ go = 1;
+ break;
+ }
+
+ printf("go :%d\n", go); /* { dg-warning "use of uninitialized value 'go'" } */
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr104369-1.c b/gcc/testsuite/gcc.dg/analyzer/pr104369-1.c
new file mode 100644
index 0000000..d3b3241
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr104369-1.c
@@ -0,0 +1,86 @@
+/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=10" } */
+// TODO: remove need for this option
+
+typedef __SIZE_TYPE__ size_t;
+#define NULL ((void *)0)
+#define POLLIN 0x001
+
+typedef struct {
+ unsigned long int __val[(1024 / (8 * sizeof(unsigned long int)))];
+} __sigset_t;
+
+typedef unsigned int socklen_t;
+
+struct timespec {
+ /* [...snip...] */
+};
+
+typedef unsigned long int nfds_t;
+
+struct pollfd {
+ int fd;
+ short int events;
+ short int revents;
+};
+
+extern int ppoll(struct pollfd *__fds, nfds_t __nfds,
+ const struct timespec *__timeout, const __sigset_t *__ss);
+
+struct sockaddr_un {
+ /* [...snip...] */
+ char sun_path[108];
+};
+
+typedef union {
+ /* [...snip...] */
+ struct sockaddr_un *__restrict __sockaddr_un__;
+ /* [...snip...] */
+} __SOCKADDR_ARG __attribute__((transparent_union));
+
+extern int accept(int __fd, __SOCKADDR_ARG __addr,
+ socklen_t *__restrict __addr_len);
+
+extern void *calloc(size_t __nmemb, size_t __size)
+ __attribute__((__nothrow__, __leaf__))
+ __attribute__((__malloc__))
+ __attribute__((__alloc_size__(1, 2)));
+
+extern void *realloc(void *__ptr, size_t __size)
+ __attribute__((__nothrow__, __leaf__))
+ __attribute__((__warn_unused_result__))
+ __attribute__((__alloc_size__(2)));
+
+extern void exit(int __status)
+ __attribute__((__nothrow__, __leaf__))
+ __attribute__((__noreturn__));
+
+int main() {
+ int rc;
+ int nsockets = 1;
+ struct pollfd *pollfds, *newpollfds;
+ struct sockaddr_un remote;
+ socklen_t len = sizeof(remote);
+
+ pollfds = calloc(1, sizeof(struct pollfd));
+ if (!pollfds) {
+ exit(1);
+ }
+
+ while (1) {
+ rc = ppoll(pollfds, nsockets, NULL, NULL);
+ if (rc < 0) {
+ continue;
+ }
+
+ if (pollfds[0].revents & POLLIN) {
+ nsockets++;
+ newpollfds = realloc(pollfds, nsockets * sizeof(*pollfds));
+ if (!newpollfds) {
+ exit(1);
+ }
+ pollfds = newpollfds;
+ pollfds[nsockets - 1].fd = accept(pollfds[0].fd, &remote, &len);
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr104369-2.c b/gcc/testsuite/gcc.dg/analyzer/pr104369-2.c
new file mode 100644
index 0000000..57dc9ca
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr104369-2.c
@@ -0,0 +1,79 @@
+typedef __SIZE_TYPE__ size_t;
+#define NULL ((void *)0)
+#define POLLIN 0x001
+
+typedef struct {
+ unsigned long int __val[(1024 / (8 * sizeof(unsigned long int)))];
+} __sigset_t;
+
+typedef unsigned int socklen_t;
+
+struct timespec {
+ /* [...snip...] */
+};
+
+typedef unsigned long int nfds_t;
+
+struct pollfd {
+ int fd;
+ short int events;
+ short int revents;
+};
+
+extern int ppoll(struct pollfd *__fds, nfds_t __nfds,
+ const struct timespec *__timeout, const __sigset_t *__ss);
+
+struct sockaddr_un {
+ /* [...snip...] */
+ char sun_path[108];
+};
+
+typedef union {
+ /* [...snip...] */
+ struct sockaddr_un *__restrict __sockaddr_un__;
+ /* [...snip...] */
+} __SOCKADDR_ARG __attribute__((transparent_union));
+
+extern int accept(int __fd, __SOCKADDR_ARG __addr,
+ socklen_t *__restrict __addr_len);
+
+extern void *calloc(size_t __nmemb, size_t __size)
+ __attribute__((__nothrow__, __leaf__))
+ __attribute__((__malloc__))
+ __attribute__((__alloc_size__(1, 2)));
+
+extern void *realloc(void *__ptr, size_t __size)
+ __attribute__((__nothrow__, __leaf__))
+ __attribute__((__warn_unused_result__))
+ __attribute__((__alloc_size__(2)));
+
+extern void exit(int __status)
+ __attribute__((__nothrow__, __leaf__))
+ __attribute__((__noreturn__));
+
+int main() {
+ int rc;
+ int nsockets = 1;
+ struct pollfd *pollfds, *newpollfds;
+ struct sockaddr_un remote;
+ socklen_t len = sizeof(remote);
+
+ pollfds = calloc(1, sizeof(struct pollfd));
+ if (!pollfds) {
+ exit(1);
+ }
+
+ rc = ppoll(pollfds, nsockets, NULL, NULL);
+ if (rc < 0) {
+ exit(2);
+ }
+
+ nsockets++;
+ newpollfds = realloc(pollfds, nsockets * sizeof(*pollfds));
+ if (!newpollfds) {
+ exit(3);
+ }
+ pollfds = newpollfds;
+ pollfds[nsockets - 1].fd = accept(pollfds[0].fd, &remote, &len);
+ exit(4);
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr104417.c b/gcc/testsuite/gcc.dg/analyzer/pr104417.c
new file mode 100644
index 0000000..41ea5db
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr104417.c
@@ -0,0 +1,7 @@
+char eparr[1];
+
+void *
+warn_realloc_extern_ptrarr_offset (int i, int n)
+{
+ return __builtin_realloc (eparr + i, n); /* { dg-warning "'__builtin_realloc' called on unallocated object 'eparr'" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr104452.c b/gcc/testsuite/gcc.dg/analyzer/pr104452.c
new file mode 100644
index 0000000..85eb82d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr104452.c
@@ -0,0 +1,10 @@
+/* { dg-additional-options "-O" } */
+
+void
+test_1 (void)
+{
+ int __attribute__((__vector_size__ (16))) x;
+ for (unsigned i = 0; i < 4;)
+ if (x[i]) /* { dg-warning "use of uninitialized value" } */
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr93382.c b/gcc/testsuite/gcc.dg/analyzer/pr93382.c
index 210b97d..1e6612d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr93382.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr93382.c
@@ -23,5 +23,5 @@ int
pl (void)
{
ql ();
- return arr[idx]; /* { dg-warning "use of tainted value 'idx' in array lookup without bounds checking" "" { xfail *-*-* } } */
+ return arr[idx]; /* { dg-warning "use of attacker-controlled value 'idx' in array lookup without bounds checking" "" { xfail *-*-* } } */
}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94047.c b/gcc/testsuite/gcc.dg/analyzer/pr94047.c
index d13da3e..a579673 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr94047.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94047.c
@@ -12,7 +12,7 @@ bar (struct list *l)
void
foo (void)
{
- struct list l;
+ struct list l; /* { dg-message "region created on stack here" } */
tlist t = l; /* { dg-warning "use of uninitialized value 'l'" } */
for (;;)
bar (&t);
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94362-1.c b/gcc/testsuite/gcc.dg/analyzer/pr94362-1.c
new file mode 100644
index 0000000..1302ced
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94362-1.c
@@ -0,0 +1,60 @@
+/* { dg-additional-options "-Wno-analyzer-too-complex" } */
+/* TODO: remove the need for -Wno-analyzer-too-complex. */
+
+typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
+typedef struct engine_st ENGINE;
+struct stack_st_EVP_PKEY_ASN1_METHOD;
+struct evp_pkey_asn1_method_st {
+ unsigned long pkey_flags;
+};
+
+const EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe,
+ const char *str, int len);
+extern int
+sk_EVP_PKEY_ASN1_METHOD_num(const struct stack_st_EVP_PKEY_ASN1_METHOD *sk);
+extern const EVP_PKEY_ASN1_METHOD *
+sk_EVP_PKEY_ASN1_METHOD_value(const struct stack_st_EVP_PKEY_ASN1_METHOD *sk,
+ int idx);
+extern const EVP_PKEY_ASN1_METHOD hmac_asn1_meth;
+static const EVP_PKEY_ASN1_METHOD *standard_methods[] = {&hmac_asn1_meth};
+static struct stack_st_EVP_PKEY_ASN1_METHOD *app_methods = ((void *)0);
+
+int EVP_PKEY_asn1_get_count(void) {
+ int num = (sizeof(standard_methods) / sizeof((standard_methods)[0]));
+ if (app_methods)
+ num += sk_EVP_PKEY_ASN1_METHOD_num(app_methods);
+ return num;
+}
+
+const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx) {
+ int num = (sizeof(standard_methods) / sizeof((standard_methods)[0]));
+ if (idx < 0)
+ return ((void *)0);
+ if (idx < num)
+ return standard_methods[idx];
+ idx -= num;
+ return sk_EVP_PKEY_ASN1_METHOD_value(app_methods, idx);
+}
+
+const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe, const char *str,
+ int len) {
+ int i;
+ const EVP_PKEY_ASN1_METHOD *ameth = ((void *)0);
+
+ if (pe) {
+ ENGINE *e;
+ ameth = ENGINE_pkey_asn1_find_str(&e, str, len);
+ if (ameth) {
+ *pe = e;
+ return ameth;
+ }
+ *pe = ((void *)0);
+ }
+ for (i = EVP_PKEY_asn1_get_count(); i-- > 0;) {
+ ameth = EVP_PKEY_asn1_get0(i);
+ if (ameth->pkey_flags & 0x1)
+ continue;
+ return ameth;
+ }
+ return ((void *)0);
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94362-2.c b/gcc/testsuite/gcc.dg/analyzer/pr94362-2.c
new file mode 100644
index 0000000..301d2ed
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94362-2.c
@@ -0,0 +1,42 @@
+/* Verify that we consider various paths to be impossible,
+ using functions to thwart early optimizations. */
+
+#include "analyzer-decls.h"
+
+void test_1 (int idx)
+{
+ if (idx > 0)
+ if (idx - 1 < 0)
+ __analyzer_dump_path (); /* { dg-bogus "" } */
+}
+
+static int called_by_test_1a (int idx)
+{
+ return idx - 1;
+}
+
+void test_1a (int idx)
+{
+ if (idx > 0)
+ if (called_by_test_1a (idx) < 0)
+ __analyzer_dump_path (); /* { dg-bogus "" } */
+}
+
+void test_2 (int idx)
+{
+ if (idx + 1 > 0)
+ if (idx < 0)
+ __analyzer_dump_path (); /* { dg-bogus "" } */
+}
+
+static int called_by_test_2a (int idx)
+{
+ return idx + 1;
+}
+
+void test_2a (int idx)
+{
+ if (called_by_test_2a (idx) > 0)
+ if (idx < 0)
+ __analyzer_dump_path (); /* { dg-bogus "" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94579.c b/gcc/testsuite/gcc.dg/analyzer/pr94579.c
new file mode 100644
index 0000000..0ab88c2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94579.c
@@ -0,0 +1,11 @@
+struct a *c;
+struct a {
+ int b;
+} d() {
+}
+
+void e()
+
+{
+ *c = d();
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94858-1.c b/gcc/testsuite/gcc.dg/analyzer/pr94858-1.c
index f7be1c6..d33c174 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr94858-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94858-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-Wno-analyzer-too-complex" } */
+
#include <stdlib.h>
typedef short hashNx;
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr98969.c b/gcc/testsuite/gcc.dg/analyzer/pr98969.c
index 7e1587d..e4e4f05 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr98969.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr98969.c
@@ -4,14 +4,14 @@ struct foo
};
void
-test_1 (long int i)
+test_1 (__UINTPTR_TYPE__ i)
{
struct foo *f = (struct foo *)i;
f->expr = __builtin_malloc (1024);
} /* { dg-bogus "leak" } */
void
-test_2 (long int i)
+test_2 (__UINTPTR_TYPE__ i)
{
__builtin_free (((struct foo *)i)->expr);
__builtin_free (((struct foo *)i)->expr); /* { dg-warning "double-'free' of '\\*\\(\\(struct foo \\*\\)i\\)\\.expr'" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr99269.c b/gcc/testsuite/gcc.dg/analyzer/pr99269.c
new file mode 100644
index 0000000..1cce3ae
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pr99269.c
@@ -0,0 +1,16 @@
+#include <stdlib.h>
+
+void example(void) {
+ int len;
+ int **namelist = NULL;
+
+ len = 2;
+ namelist = malloc(len * sizeof *namelist);
+ if (!namelist) return;
+ namelist[0] = malloc(sizeof **namelist);
+ namelist[1] = malloc(sizeof **namelist);
+
+ while(len--) { free(namelist[len]); }
+ free(namelist);
+ return;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr99716-1.c b/gcc/testsuite/gcc.dg/analyzer/pr99716-1.c
index 6720c3c..2ccdcc7 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr99716-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr99716-1.c
@@ -1,5 +1,10 @@
-#include <stdio.h>
-#include <stdlib.h>
+typedef struct FILE FILE;
+
+FILE* fopen (const char*, const char*);
+int fclose (FILE*);
+int fprintf (FILE *, const char *, ...);
+
+#define NULL ((void *)0)
void
test_1 (void)
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr99716-2.c b/gcc/testsuite/gcc.dg/analyzer/pr99716-2.c
index 7c9881c..adc9819 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr99716-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr99716-2.c
@@ -10,7 +10,7 @@ extern int foo (void);
void
test_mountpoint (const char *mp)
{
- const int nr_passes = 5 + (random () & 31);
+ const int nr_passes = 5 + (rand () & 31);
int pass;
int ret = 1;
FILE *fp;
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr99774-1.c b/gcc/testsuite/gcc.dg/analyzer/pr99774-1.c
index 620cf65..a0bca8b 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr99774-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr99774-1.c
@@ -7,7 +7,7 @@ typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long uint64_t;
typedef unsigned long uint64_t;
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
extern void *calloc(size_t __nmemb, size_t __size)
__attribute__((__nothrow__, __leaf__))
diff --git a/gcc/testsuite/gcc.dg/analyzer/pragma-2.c b/gcc/testsuite/gcc.dg/analyzer/pragma-2.c
new file mode 100644
index 0000000..58fcaab
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/pragma-2.c
@@ -0,0 +1,57 @@
+/* Verify that we can disable -Wanalyzer-too-complex via pragmas. */
+/* { dg-additional-options "-Wanalyzer-too-complex -Werror=analyzer-too-complex -fno-analyzer-state-merge -g" } */
+
+#include <stdlib.h>
+
+extern int get (void);
+
+/* In theory each of p0...p4 can be in various malloc states,
+ independently, so the total combined number of states
+ at any program point within the loop is NUM_VARS * NUM_STATES. */
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wanalyzer-too-complex"
+
+void test (void)
+{
+ void *p0 = NULL, *p1 = NULL, *p2 = NULL, *p3 = NULL, *p4 = NULL;
+ void **pp = NULL;
+ while (get ())
+ {
+ switch (get ())
+ {
+ default:
+ case 0:
+ pp = &p0;
+ break;
+ case 1:
+ pp = &p1;
+ break;
+ case 2:
+ pp = &p2;
+ break;
+ case 3:
+ pp = &p3;
+ break;
+ case 4:
+ pp = &p4;
+ break;
+ }
+
+ switch (get ())
+ {
+ default:
+ case 0:
+ *pp = malloc (16); /* { dg-warning "leak" } */
+ break;
+ case 1:
+ free (*pp);
+ break;
+ case 2:
+ /* no-op. */
+ break;
+ }
+ }
+}
+
+#pragma GCC diagnostic pop
diff --git a/gcc/testsuite/gcc.dg/analyzer/realloc-3.c b/gcc/testsuite/gcc.dg/analyzer/realloc-3.c
new file mode 100644
index 0000000..89676e1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/realloc-3.c
@@ -0,0 +1,81 @@
+#include "analyzer-decls.h"
+
+typedef __SIZE_TYPE__ size_t;
+
+#define NULL ((void *)0)
+
+extern void *calloc (size_t __nmemb, size_t __size)
+ __attribute__ ((__nothrow__ , __leaf__))
+ __attribute__ ((__malloc__))
+ __attribute__ ((__alloc_size__ (1, 2))) ;
+extern void *malloc (size_t __size)
+ __attribute__ ((__nothrow__ , __leaf__))
+ __attribute__ ((__malloc__))
+ __attribute__ ((__alloc_size__ (1)));
+extern void *realloc (void *__ptr, size_t __size)
+ __attribute__ ((__nothrow__ , __leaf__))
+ __attribute__ ((__warn_unused_result__))
+ __attribute__ ((__alloc_size__ (2)));
+extern void free (void *__ptr)
+ __attribute__ ((__nothrow__ , __leaf__));
+
+/* realloc of calloc buffer. */
+
+char *test_8 (size_t sz)
+{
+ char *p, *q;
+
+ p = calloc (1, 3);
+ if (!p)
+ return NULL;
+
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: '\\(\[^\n\r\]*\\)3'" } */
+
+ __analyzer_eval (p[0] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[1] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[2] == 0); /* { dg-warning "TRUE" } */
+
+ q = realloc (p, 6);
+
+ /* We should have 3 nodes, corresponding to "failure",
+ "success without moving", and "success with moving". */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "3 processed enodes" } */
+
+ if (q)
+ {
+ __analyzer_dump_capacity (q); /* { dg-warning "capacity: '\\(\[^\n\r\]*\\)6'" } */
+ q[3] = 'd';
+ q[4] = 'e';
+ q[5] = 'f';
+ if (q == p)
+ {
+ /* "realloc" success, growing the buffer in-place. */
+ __analyzer_eval (p[0] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[1] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[2] == 0); /* { dg-warning "TRUE" } */
+ }
+ else
+ {
+ /* "realloc" success, moving the buffer (and thus freeing "p"). */
+ __analyzer_eval (q[0] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (q[1] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (q[2] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[0] == 'a'); /* { dg-warning "UNKNOWN" "unknown" } */
+ /* { dg-warning "use after 'free' of 'p'" "use after free" { target *-*-* } .-1 } */
+ }
+ __analyzer_eval (q[3] == 'd'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (q[4] == 'e'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (q[5] == 'f'); /* { dg-warning "TRUE" } */
+ }
+ else
+ {
+ /* "realloc" failure. p should be unchanged. */
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: '\\(\[^\n\r\]*\\)3'" } */
+ __analyzer_eval (p[0] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[1] == 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[2] == 0); /* { dg-warning "TRUE" } */
+ return p;
+ }
+
+ return q;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/realloc-4.c b/gcc/testsuite/gcc.dg/analyzer/realloc-4.c
new file mode 100644
index 0000000..ac338ec
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/realloc-4.c
@@ -0,0 +1,85 @@
+#include "analyzer-decls.h"
+
+typedef __SIZE_TYPE__ size_t;
+
+#define NULL ((void *)0)
+
+extern void *calloc (size_t __nmemb, size_t __size)
+ __attribute__ ((__nothrow__ , __leaf__))
+ __attribute__ ((__malloc__))
+ __attribute__ ((__alloc_size__ (1, 2))) ;
+extern void *malloc (size_t __size)
+ __attribute__ ((__nothrow__ , __leaf__))
+ __attribute__ ((__malloc__))
+ __attribute__ ((__alloc_size__ (1)));
+extern void *realloc (void *__ptr, size_t __size)
+ __attribute__ ((__nothrow__ , __leaf__))
+ __attribute__ ((__warn_unused_result__))
+ __attribute__ ((__alloc_size__ (2)));
+extern void free (void *__ptr)
+ __attribute__ ((__nothrow__ , __leaf__));
+
+/* realloc where we don't know the original size of the region. */
+
+char *test_8 (char *p, size_t sz)
+{
+ char *q;
+
+ __analyzer_dump_capacity (p); /* { dg-warning "capacity: 'UNKNOWN\\(\[^\n\r\]*\\)'" } */
+
+ p[0] = 'a';
+ p[1] = 'b';
+ p[2] = 'c';
+ __analyzer_eval (p[0] == 'a'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[1] == 'b'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[2] == 'c'); /* { dg-warning "TRUE" } */
+
+ q = realloc (p, 6);
+
+ /* We should have 3 nodes, corresponding to "failure",
+ "success without moving", and "success with moving". */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "3 processed enodes" } */
+
+ if (q)
+ {
+ q[3] = 'd';
+ q[4] = 'e';
+ q[5] = 'f';
+ if (q == p)
+ {
+ /* "realloc" success, growing the buffer in-place. */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
+ __analyzer_dump_capacity (q); /* { dg-warning "capacity: '\\(\[^\n\r\]*\\)6'" } */
+ __analyzer_eval (q[0] == 'a'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (q[1] == 'b'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (q[2] == 'c'); /* { dg-warning "TRUE" } */
+ }
+ else
+ {
+ /* "realloc" success, moving the buffer (and thus freeing "p"). */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
+ __analyzer_dump_capacity (q); /* { dg-warning "capacity: '\\(\[^\n\r\]*\\)6'" } */
+ /* We don't know how much of the buffer is copied. */
+ __analyzer_eval (q[0] == 'a'); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (q[1] == 'b'); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (q[2] == 'c'); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (p[0] == 'a'); /* { dg-warning "UNKNOWN" "unknown" } */
+ /* { dg-warning "use after 'free' of 'p'" "use after free" { target *-*-* } .-1 } */
+ }
+ __analyzer_eval (q[3] == 'd'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (q[4] == 'e'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (q[5] == 'f'); /* { dg-warning "TRUE" } */
+ }
+ else
+ {
+ /* "realloc" failure. p should be unchanged. */
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
+ __analyzer_dump_capacity (q); /* { dg-warning "capacity: 'UNKNOWN\\(\[^\n\r\]*\\)'" } */
+ __analyzer_eval (p[0] == 'a'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[1] == 'b'); /* { dg-warning "TRUE" } */
+ __analyzer_eval (p[2] == 'c'); /* { dg-warning "TRUE" } */
+ return p;
+ }
+
+ return q;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/strchr-1.c b/gcc/testsuite/gcc.dg/analyzer/strchr-1.c
new file mode 100644
index 0000000..dfe1bc9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/strchr-1.c
@@ -0,0 +1,26 @@
+#include <string.h>
+#include "analyzer-decls.h"
+
+const char* test_literal (int x)
+{
+ char *p = __builtin_strchr ("123", x);
+ if (p)
+ {
+ __analyzer_eval (*p == x); /* { dg-message "UNKNOWN" } */
+ /* TODO: this ought to be TRUE, but it's unclear that it's
+ worth stashing this constraint. */
+ }
+ return p;
+}
+
+void test_2 (const char *s, int c)
+{
+ char *p = __builtin_strchr (s, c); /* { dg-message "when '__builtin_strchr' returns NULL"} */
+ *p = 'A'; /* { dg-warning "dereference of NULL 'p'" "null deref" } */
+}
+
+void test_3 (const char *s, int c)
+{
+ char *p = strchr (s, c); /* { dg-message "when 'strchr' returns NULL"} */
+ *p = 'A'; /* { dg-warning "dereference of NULL 'p'" "null deref" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/strndup-1.c b/gcc/testsuite/gcc.dg/analyzer/strndup-1.c
index 5822353..edf494a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/strndup-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/strndup-1.c
@@ -1,4 +1,4 @@
-/* { dg-skip-if "no strndup in libc" { *-*-darwin[789]* *-*-darwin10* } } */
+/* { dg-skip-if "no strndup in libc" { *-*-darwin[789]* *-*-darwin10* *-*-mingw* } } */
#include <string.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/analyzer/symbolic-1.c b/gcc/testsuite/gcc.dg/analyzer/symbolic-1.c
index 0eba646..2f4e00b 100644
--- a/gcc/testsuite/gcc.dg/analyzer/symbolic-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/symbolic-1.c
@@ -5,7 +5,7 @@
void test_1 (char a, char b, char c, char d, char e, char f,
int i, int j)
{
- char arr[1024];
+ char arr[1024]; /* { dg-message "region created on stack here" } */
arr[2] = a; /* (1) */
arr[3] = b; /* (2) */
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-1.c
deleted file mode 100644
index cd46dd5..0000000
--- a/gcc/testsuite/gcc.dg/analyzer/taint-1.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/* { dg-additional-options "-fanalyzer-checker=taint" } */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-struct foo
-{
- signed int i;
- char buf[256];
-};
-
-char test_1(FILE *f)
-{
- struct foo tmp;
-
- if (1 == fread(&tmp, sizeof(tmp), 1, f)) { /* { dg-message "\\(\[0-9\]+\\) 'tmp' gets an unchecked value here" "event: tmp gets unchecked value" { xfail *-*-* } } */
- /* { dg-message "\\(\[0-9\]+\\) following 'true' branch\\.\\.\\." "event: following true branch" { target *-*-* } .-1 } */
- /* BUG: the following array lookup trusts that the input data's index is
- in the range 0 <= i < 256; otherwise it's accessing the stack */
- return tmp.buf[tmp.i]; // { dg-warning "use of tainted value 'tmp.i' in array lookup without bounds checking" "warning" } */
- /* { dg-message "23: \\(\[0-9\]+\\) \\.\\.\\.to here" "event: to here" { target *-*-* } .-1 } */
- /* { dg-message "23: \\(\[0-9\]+\\) 'tmp.i' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.i has an unchecked value" { xfail *-*-* } .-2 } */
- /* { dg-message "\\(\[0-9\]+\\) use of tainted value 'tmp.i' in array lookup without bounds checking" "final event" { target *-*-* } .-3 } */
-
- // TOOD: better messages for state changes
- }
- return 0;
-}
-
-char test_2(struct foo *f, int i)
-{
- /* not a bug: the data is not known to be tainted: */
- return f->buf[f->i];
-}
-
-char test_3(FILE *f)
-{
- struct foo tmp;
-
- if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
- if (tmp.i >= 0 && tmp.i < 256) {
- /* not a bug: the access is guarded by upper and lower bounds: */
- return tmp.buf[tmp.i];
- }
- }
- return 0;
-}
-
-char test_4(FILE *f)
-{
- struct foo tmp;
-
- if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
- if (tmp.i >= 0) { /* { dg-message "'tmp.i' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.i has an unchecked value" { xfail *-*-* } } */
- /* { dg-message "'tmp.i' has its lower bound checked here" "event: lower bound checked" { target *-*-* } .-1 } */
- return tmp.buf[tmp.i]; /* { dg-warning "use of tainted value 'tmp.i' in array lookup without upper-bounds checking" "warning" } */
- }
- }
- return 0;
-}
-
-char test_5(FILE *f)
-{
- struct foo tmp;
-
- if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
- if (tmp.i < 256) { /* { dg-message "'tmp.i' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.i has an unchecked value" { xfail *-*-* } } */
- /* { dg-message "'tmp.i' has its upper bound checked here" "event: upper bound checked" { target *-*-* } .-1 } */
- return tmp.buf[tmp.i]; /* { dg-warning "use of tainted value 'tmp.i' in array lookup without lower-bounds checking" "warning" } */
- }
- }
- return 0;
-}
-
-/* unsigned types have a natural lower bound of 0 */
-struct bar
-{
- unsigned int i;
- char buf[256];
-};
-
-char test_6(FILE *f)
-{
- struct bar tmp;
-
- if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
- return tmp.buf[tmp.i]; /* { dg-warning "use of tainted value 'tmp.i' in array lookup without upper-bounds checking" } */
- }
- return 0;
-}
-
-char test_7(FILE *f)
-{
- struct bar tmp;
-
- if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
- if (tmp.i >= 0) {
- return tmp.buf[tmp.i]; /* { dg-warning "use of tainted value 'tmp.i' in array lookup without upper-bounds checking" } */
- }
- }
- return 0;
-}
-
-char test_8(FILE *f)
-{
- struct bar tmp;
-
- if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
- if (tmp.i < 256) {
- /* not a bug: has an upper bound, and an implicit lower bound: */
- return tmp.buf[tmp.i];
- }
- }
- return 0;
-}
-
-char test_9(FILE *f)
-{
- struct foo tmp;
-
- if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
- if (tmp.i == 42) {
- /* not a bug: tmp.i compared against a specific value: */
- return tmp.buf[tmp.i]; /* { dg-bogus "tainted" "" { xfail *-*-* } } */
- // TODO: xfail
- }
- }
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-CVE-2011-2210-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-CVE-2011-2210-1.c
new file mode 100644
index 0000000..b44be99
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-CVE-2011-2210-1.c
@@ -0,0 +1,93 @@
+/* "The osf_getsysinfo function in arch/alpha/kernel/osf_sys.c in the
+ Linux kernel before 2.6.39.4 on the Alpha platform does not properly
+ restrict the data size for GSI_GET_HWRPB operations, which allows
+ local users to obtain sensitive information from kernel memory via
+ a crafted call."
+
+ Fixed in 3d0475119d8722798db5e88f26493f6547a4bb5b on linux-2.6.39.y
+ in linux-stable. */
+
+// TODO: remove need for this option:
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include "analyzer-decls.h"
+#include "test-uaccess.h"
+
+/* Adapted from include/linux/linkage.h. */
+
+#define asmlinkage
+
+/* Adapted from include/linux/syscalls.h. */
+
+#define __SC_DECL1(t1, a1) t1 a1
+#define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__)
+#define __SC_DECL3(t3, a3, ...) t3 a3, __SC_DECL2(__VA_ARGS__)
+#define __SC_DECL4(t4, a4, ...) t4 a4, __SC_DECL3(__VA_ARGS__)
+#define __SC_DECL5(t5, a5, ...) t5 a5, __SC_DECL4(__VA_ARGS__)
+#define __SC_DECL6(t6, a6, ...) t6 a6, __SC_DECL5(__VA_ARGS__)
+
+#define SYSCALL_DEFINEx(x, sname, ...) \
+ __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
+
+#define SYSCALL_DEFINE(name) asmlinkage long sys_##name
+#define __SYSCALL_DEFINEx(x, name, ...) \
+ asmlinkage __attribute__((tainted_args)) \
+ long sys##name(__SC_DECL##x(__VA_ARGS__))
+
+#define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
+
+/* Adapted from arch/alpha/include/asm/hwrpb.h. */
+
+struct hwrpb_struct {
+ unsigned long phys_addr; /* check: physical address of the hwrpb */
+ unsigned long id; /* check: "HWRPB\0\0\0" */
+ unsigned long revision;
+ unsigned long size; /* size of hwrpb */
+ /* [...snip...] */
+};
+
+extern struct hwrpb_struct *hwrpb;
+
+/* Adapted from arch/alpha/kernel/osf_sys.c. */
+
+SYSCALL_DEFINE5(osf_getsysinfo, unsigned long, op, void __user *, buffer,
+ unsigned long, nbytes, int __user *, start, void __user *, arg)
+{
+ /* [...snip...] */
+
+ __analyzer_dump_state ("taint", nbytes); /* { dg-warning "tainted" } */
+
+ /* TODO: should have an event explaining why "nbytes" is treated as
+ attacker-controlled. */
+
+ /* case GSI_GET_HWRPB: */
+ if (nbytes < sizeof(*hwrpb))
+ return -1;
+
+ __analyzer_dump_state ("taint", nbytes); /* { dg-warning "has_lb" } */
+
+ if (copy_to_user(buffer, hwrpb, nbytes) != 0) /* { dg-warning "use of attacker-controlled value 'nbytes' as size without upper-bounds checking" } */
+ return -2;
+
+ return 1;
+
+ /* [...snip...] */
+}
+
+/* With the fix for the sense of the size comparison. */
+
+SYSCALL_DEFINE5(osf_getsysinfo_fixed, unsigned long, op, void __user *, buffer,
+ unsigned long, nbytes, int __user *, start, void __user *, arg)
+{
+ /* [...snip...] */
+
+ /* case GSI_GET_HWRPB: */
+ if (nbytes > sizeof(*hwrpb))
+ return -1;
+ if (copy_to_user(buffer, hwrpb, nbytes) != 0) /* { dg-bogus "attacker-controlled" } */
+ return -2;
+
+ return 1;
+
+ /* [...snip...] */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-CVE-2020-13143-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-CVE-2020-13143-1.c
new file mode 100644
index 0000000..328c579
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-CVE-2020-13143-1.c
@@ -0,0 +1,38 @@
+/* See notes in this header. */
+#include "taint-CVE-2020-13143.h"
+
+// TODO: remove need for this option
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+struct configfs_attribute {
+ /* [...snip...] */
+ ssize_t (*store)(struct config_item *, const char *, size_t) /* { dg-message "\\(1\\) field 'store' of 'struct configfs_attribute' is marked with '__attribute__\\(\\(tainted_args\\)\\)'" } */
+ __attribute__((tainted_args)); /* (this is added). */
+};
+static inline struct gadget_info *to_gadget_info(struct config_item *item)
+{
+ return container_of(to_config_group(item), struct gadget_info, group);
+}
+
+static ssize_t gadget_dev_desc_UDC_store(struct config_item *item,
+ const char *page, size_t len)
+{
+ struct gadget_info *gi = to_gadget_info(item);
+ char *name;
+ int ret;
+
+#if 0
+ /* FIXME: this is the fix. */
+ if (strlen(page) < len)
+ return -EOVERFLOW;
+#endif
+
+ name = kstrdup(page, GFP_KERNEL);
+ if (!name)
+ return -ENOMEM;
+ if (name[len - 1] == '\n') /* { dg-warning "use of attacker-controlled value 'len \[^\n\r\]+' as offset without upper-bounds checking" } */
+ name[len - 1] = '\0'; /* { dg-warning "use of attacker-controlled value 'len \[^\n\r\]+' as offset without upper-bounds checking" } */
+ /* [...snip...] */ \
+}
+
+CONFIGFS_ATTR(gadget_dev_desc_, UDC); /* { dg-message "\\(2\\) function 'gadget_dev_desc_UDC_store' used as initializer for field 'store' marked with '__attribute__\\(\\(tainted_args\\)\\)'" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-CVE-2020-13143-2.c b/gcc/testsuite/gcc.dg/analyzer/taint-CVE-2020-13143-2.c
new file mode 100644
index 0000000..c74a460
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-CVE-2020-13143-2.c
@@ -0,0 +1,32 @@
+/* See notes in this header. */
+#include "taint-CVE-2020-13143.h"
+
+// TODO: remove need for this option
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+struct configfs_attribute {
+ /* [...snip...] */
+ ssize_t (*store)(struct config_item *, const char *, size_t) /* { dg-message "\\(1\\) field 'store' of 'struct configfs_attribute' is marked with '__attribute__\\(\\(tainted_args\\)\\)'" } */
+ __attribute__((tainted_args)); /* (this is added). */
+};
+
+/* Highly simplified version. */
+
+static ssize_t gadget_dev_desc_UDC_store(struct config_item *item,
+ const char *page, size_t len)
+{
+ /* TODO: ought to have state_change_event talking about where the tainted value comes from. */
+
+ char *name;
+ /* [...snip...] */
+
+ name = kstrdup(page, GFP_KERNEL);
+ if (!name)
+ return -ENOMEM;
+ if (name[len - 1] == '\n') /* { dg-warning "use of attacker-controlled value 'len \[^\n\r\]+' as offset without upper-bounds checking" } */
+ name[len - 1] = '\0'; /* { dg-warning "use of attacker-controlled value 'len \[^\n\r\]+' as offset without upper-bounds checking" } */
+ /* [...snip...] */
+ return 0;
+}
+
+CONFIGFS_ATTR(gadget_dev_desc_, UDC); /* { dg-message "\\(2\\) function 'gadget_dev_desc_UDC_store' used as initializer for field 'store' marked with '__attribute__\\(\\(tainted_args\\)\\)'" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-CVE-2020-13143.h b/gcc/testsuite/gcc.dg/analyzer/taint-CVE-2020-13143.h
new file mode 100644
index 0000000..0ba0235
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-CVE-2020-13143.h
@@ -0,0 +1,91 @@
+/* Shared header for the various taint-CVE-2020-13143.h tests.
+
+ "gadget_dev_desc_UDC_store in drivers/usb/gadget/configfs.c in the
+ Linux kernel 3.16 through 5.6.13 relies on kstrdup without considering
+ the possibility of an internal '\0' value, which allows attackers to
+ trigger an out-of-bounds read, aka CID-15753588bcd4."
+
+ Fixed by 15753588bcd4bbffae1cca33c8ced5722477fe1f on linux-5.7.y
+ in linux-stable. */
+
+// TODO: remove need for this option
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include <stddef.h>
+
+/* Adapted from include/uapi/asm-generic/posix_types.h */
+
+typedef unsigned int __kernel_size_t;
+typedef int __kernel_ssize_t;
+
+/* Adapted from include/linux/types.h */
+
+//typedef __kernel_size_t size_t;
+typedef __kernel_ssize_t ssize_t;
+
+/* Adapted from include/linux/kernel.h */
+
+#define container_of(ptr, type, member) ({ \
+ void *__mptr = (void *)(ptr); \
+ /* [...snip...] */ \
+ ((type *)(__mptr - offsetof(type, member))); })
+
+/* Adapted from include/linux/configfs.h */
+
+struct config_item {
+ /* [...snip...] */
+};
+
+struct config_group {
+ struct config_item cg_item;
+ /* [...snip...] */
+};
+
+static inline struct config_group *to_config_group(struct config_item *item)
+{
+ return item ? container_of(item,struct config_group,cg_item) : NULL;
+}
+
+#define CONFIGFS_ATTR(_pfx, _name) \
+static struct configfs_attribute _pfx##attr_##_name = { \
+ /* [...snip...] */ \
+ .store = _pfx##_name##_store, \
+}
+
+/* Adapted from include/linux/compiler.h */
+
+#define __force
+
+/* Adapted from include/asm-generic/errno-base.h */
+
+#define ENOMEM 12 /* Out of memory */
+
+/* Adapted from include/linux/types.h */
+
+#define __bitwise__
+typedef unsigned __bitwise__ gfp_t;
+
+/* Adapted from include/linux/gfp.h */
+
+#define ___GFP_WAIT 0x10u
+#define ___GFP_IO 0x40u
+#define ___GFP_FS 0x80u
+#define __GFP_WAIT ((__force gfp_t)___GFP_WAIT)
+#define __GFP_IO ((__force gfp_t)___GFP_IO)
+#define __GFP_FS ((__force gfp_t)___GFP_FS)
+#define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS)
+
+/* Adapted from include/linux/compiler_attributes.h */
+
+#define __malloc __attribute__((__malloc__))
+
+/* Adapted from include/linux/string.h */
+
+extern char *kstrdup(const char *s, gfp_t gfp) __malloc;
+
+/* Adapted from drivers/usb/gadget/configfs.c */
+
+struct gadget_info {
+ struct config_group group;
+ /* [...snip...] */ \
+};
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-alloc-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-alloc-1.c
new file mode 100644
index 0000000..bc4f63b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-alloc-1.c
@@ -0,0 +1,65 @@
+// TODO: remove need for this option
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+/* { dg-require-effective-target alloca } */
+
+#include "analyzer-decls.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct foo
+{
+ size_t sz;
+};
+
+/* malloc with tainted size. */
+
+void *test_1 (FILE *f)
+{
+ struct foo tmp;
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) { /* { dg-message "\\(\[0-9\]+\\) 'tmp' gets an unchecked value here" "event: tmp gets unchecked value" { xfail *-*-* } } */
+ /* { dg-message "\\(\[0-9\]+\\) following 'true' branch\\.\\.\\." "event: following true branch" { target *-*-* } .-1 } */
+ __analyzer_dump_state ("taint", tmp.sz); /* { dg-warning "state: 'tainted'" } */
+ /* { dg-message "\\(\[0-9\]+\\) \\.\\.\\.to here" "event: to here" { target *-*-* } .-1 } */
+
+ return malloc (tmp.sz); /* { dg-warning "use of attacker-controlled value 'tmp\\.sz' as allocation size without upper-bounds checking" "warning" } */
+ /* { dg-message "23: \\(\[0-9\]+\\) 'tmp.i' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.i has an unchecked value" { xfail *-*-* } .-1 } */
+ /* { dg-message "\\(\[0-9\]+\\) use of attacker-controlled value 'tmp\\.sz' as allocation size without upper-bounds checking" "final event" { target *-*-* } .-2 } */
+
+ // TOOD: better messages for state changes
+ }
+ return 0;
+}
+
+/* VLA with tainted size. */
+
+void *test_2 (FILE *f)
+{
+ struct foo tmp;
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) { /* { dg-message "\\(\[0-9\]+\\) 'tmp' gets an unchecked value here" "event: tmp gets unchecked value" { xfail *-*-* } } */
+ /* { dg-message "\\(\[0-9\]+\\) following 'true' branch\\.\\.\\." "event: following true branch" { target *-*-* } .-1 } */
+ __analyzer_dump_state ("taint", tmp.sz); /* { dg-warning "state: 'tainted'" } */
+ /* { dg-message "\\(\[0-9\]+\\) \\.\\.\\.to here" "event: to here" { target *-*-* } .-1 } */
+
+ /* VLA with tainted size. */
+ {
+ char buf[tmp.sz]; /* { dg-warning "use of attacker-controlled value 'tmp\\.sz' as allocation size without upper-bounds checking" "warning" } */
+ /* { dg-message "\\(\[0-9\]+\\) 'tmp.i' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.i has an unchecked value" { xfail *-*-* } .-1 } */
+ /* { dg-message "\\(\[0-9\]+\\) use of attacker-controlled value 'tmp\\.sz' as allocation size without upper-bounds checking" "final event" { target *-*-* } .-2 } */
+ fread (buf, tmp.sz, 1, f);
+ }
+
+ // TOOD: better messages for state changes
+ }
+ return 0;
+}
+
+void *test_3 (FILE *f)
+{
+ int num;
+ fread (&num, sizeof (int), 1, f);
+ __analyzer_dump_state ("taint", num); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", num * 16); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", (size_t)(num * 16)); /* { dg-warning "state: 'tainted'" } */
+ return malloc (num * 16); /* { dg-warning "use of attacker-controlled value 'num \\* 16' as allocation size without upper-bounds checking" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-alloc-2.c b/gcc/testsuite/gcc.dg/analyzer/taint-alloc-2.c
new file mode 100644
index 0000000..72dbca5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-alloc-2.c
@@ -0,0 +1,27 @@
+// TODO: remove need for this option:
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include "analyzer-decls.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct foo
+{
+ int num;
+};
+
+/* malloc with tainted size from a field. */
+
+void *test_1 (FILE *f)
+{
+ struct foo tmp;
+ fread(&tmp, sizeof(tmp), 1, f); /* { dg-message "\\(\[0-9\]+\\) 'tmp' gets an unchecked value here" "event: tmp gets unchecked value" { xfail *-*-* } } */
+
+ __analyzer_dump_state ("taint", tmp.num); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", tmp.num * 16); /* { dg-warning "state: 'tainted'" } */
+
+ return malloc (tmp.num * 16); /* { dg-warning "use of attacker-controlled value 'tmp\\.num \\* 16' as allocation size without upper-bounds checking" "warning" } */
+ /* { dg-message "\\(\[0-9\]+\\) use of attacker-controlled value 'tmp\\.num \\* 16' as allocation size without upper-bounds checking" "final event with expr" { target *-*-* } .-1 } */
+ // TODO: show where tmp.num * 16 gets the bogus value
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-alloc-3.c b/gcc/testsuite/gcc.dg/analyzer/taint-alloc-3.c
new file mode 100644
index 0000000..80d8f0b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-alloc-3.c
@@ -0,0 +1,21 @@
+// TODO: remove need for this option:
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include "analyzer-decls.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* malloc with tainted size from a syscall. */
+
+void *p;
+
+void __attribute__((tainted_args))
+test_1 (size_t sz) /* { dg-message "\\(1\\) function 'test_1' marked with '__attribute__\\(\\(tainted_args\\)\\)'" } */
+{
+ /* TODO: should have a message saying why "sz" is tainted, e.g.
+ "treating 'sz' as attacker-controlled because 'test_1' is marked with '__attribute__((tainted_args))'" */
+
+ p = malloc (sz); /* { dg-warning "use of attacker-controlled value 'sz' as allocation size without upper-bounds checking" "warning" } */
+ /* { dg-message "\\(\[0-9\]+\\) use of attacker-controlled value 'sz' as allocation size without upper-bounds checking" "final event" { target *-*-* } .-1 } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-alloc-4.c b/gcc/testsuite/gcc.dg/analyzer/taint-alloc-4.c
new file mode 100644
index 0000000..bd47097
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-alloc-4.c
@@ -0,0 +1,31 @@
+// TODO: remove need for this option:
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include "analyzer-decls.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* malloc with tainted size from a syscall. */
+
+struct arg_buf
+{
+ size_t sz;
+};
+
+void *p;
+
+void __attribute__((tainted_args))
+test_1 (void *data) /* { dg-message "\\(1\\) function 'test_1' marked with '__attribute__\\(\\(tainted_args\\)\\)'" } */
+{
+ /* we should treat pointed-to-structs as tainted. */
+ __analyzer_dump_state ("taint", data); /* { dg-warning "state: 'tainted'" } */
+
+ struct arg_buf *args = data;
+
+ __analyzer_dump_state ("taint", args); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", args->sz); /* { dg-warning "state: 'tainted'" } */
+
+ p = malloc (args->sz); /* { dg-warning "use of attacker-controlled value '\\*args.sz' as allocation size without upper-bounds checking" "warning" } */
+ /* { dg-message "\\(\[0-9\]+\\) use of attacker-controlled value '\\*args.sz' as allocation size without upper-bounds checking" "final event" { target *-*-* } .-1 } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-divisor-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-divisor-1.c
new file mode 100644
index 0000000..5a5a0b9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-divisor-1.c
@@ -0,0 +1,26 @@
+// TODO: remove need for this option:
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include "analyzer-decls.h"
+#include <stdio.h>
+
+struct st1
+{
+ int a;
+ int b;
+};
+
+
+int test_1 (FILE *f)
+{
+ struct st1 s;
+ fread (&s, sizeof (s), 1, f);
+ return s.a / s.b; /* { dg-warning "use of attacker-controlled value 's\\.b' as divisor without checking for zero" } */
+}
+
+int test_2 (FILE *f)
+{
+ struct st1 s;
+ fread (&s, sizeof (s), 1, f);
+ return s.a % s.b; /* { dg-warning "use of attacker-controlled value 's\\.b' as divisor without checking for zero" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-merger.c b/gcc/testsuite/gcc.dg/analyzer/taint-merger.c
new file mode 100644
index 0000000..e4e48f3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-merger.c
@@ -0,0 +1,57 @@
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+// TODO: remove need for this option
+
+#include "analyzer-decls.h"
+
+int v_start;
+
+__attribute__((tainted_args))
+void test (int v_tainted, int v_has_lb, int v_has_ub, int v_stop)
+{
+ /* Get each var into the 5 different taintedness states. */
+ if (v_has_lb < 10)
+ return;
+ if (v_has_ub > 100)
+ return;
+ if (v_stop < 0 || v_stop > 100)
+ return;
+
+ /* Verify that we have the taintedness states we expect. */
+
+ __analyzer_dump_state ("taint", v_start); /* { dg-warning "state: 'start'" } */
+ __analyzer_dump_state ("taint", v_tainted); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", v_has_lb); /* { dg-warning "state: 'has_lb'" } */
+ __analyzer_dump_state ("taint", v_has_ub); /* { dg-warning "state: 'has_ub'" } */
+ __analyzer_dump_state ("taint", v_stop); /* { dg-warning "state: 'stop'" } */
+
+ /* Check all combinations of taintedness state. */
+ __analyzer_dump_state ("taint", v_start + v_start); /* { dg-warning "state: 'start'" } */
+ __analyzer_dump_state ("taint", v_start + v_tainted); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", v_start + v_has_lb); /* { dg-warning "state: 'has_lb'" } */
+ __analyzer_dump_state ("taint", v_start + v_has_ub); /* { dg-warning "state: 'has_ub'" } */
+ __analyzer_dump_state ("taint", v_start + v_stop); /* { dg-warning "state: 'stop'" } */
+
+ __analyzer_dump_state ("taint", v_tainted + v_start); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", v_tainted + v_tainted); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", v_tainted + v_has_lb); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", v_tainted + v_has_ub); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", v_tainted + v_stop); /* { dg-warning "state: 'tainted'" } */
+
+ __analyzer_dump_state ("taint", v_has_lb + v_start); /* { dg-warning "state: 'has_lb'" } */
+ __analyzer_dump_state ("taint", v_has_lb + v_tainted); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", v_has_lb + v_has_lb); /* { dg-warning "state: 'has_lb'" } */
+ __analyzer_dump_state ("taint", v_has_lb + v_has_ub); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", v_has_lb + v_stop); /* { dg-warning "state: 'has_lb'" } */
+
+ __analyzer_dump_state ("taint", v_has_ub + v_start); /* { dg-warning "state: 'has_ub'" } */
+ __analyzer_dump_state ("taint", v_has_ub + v_tainted); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", v_has_ub + v_has_lb); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", v_has_ub + v_has_ub); /* { dg-warning "state: 'has_ub'" } */
+ __analyzer_dump_state ("taint", v_has_ub + v_stop); /* { dg-warning "state: 'has_ub'" } */
+
+ __analyzer_dump_state ("taint", v_stop + v_start); /* { dg-warning "state: 'stop'" } */
+ __analyzer_dump_state ("taint", v_stop + v_tainted); /* { dg-warning "state: 'tainted'" } */
+ __analyzer_dump_state ("taint", v_stop + v_has_lb); /* { dg-warning "state: 'has_lb'" } */
+ __analyzer_dump_state ("taint", v_stop + v_has_ub); /* { dg-warning "state: 'has_ub'" } */
+ __analyzer_dump_state ("taint", v_stop + v_stop); /* { dg-warning "state: 'stop'" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-ops.c b/gcc/testsuite/gcc.dg/analyzer/taint-ops.c
new file mode 100644
index 0000000..729dbe5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-ops.c
@@ -0,0 +1,106 @@
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+// TODO: remove need for this option
+/* This test can probably be removed when -fanalyzer enables
+ the taint checker by default. */
+
+#include "analyzer-decls.h"
+
+void
+test_1 (char a)
+{
+ char b = -a;
+}
+
+/* Copies of code from data-model-1.c. */
+
+void test_20 (int i, int j)
+{
+ __analyzer_eval (i + 1); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (i + j); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (i - 1); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (i - j); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (i * 2); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (i * j); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (i / 2); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (i / j); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (i % 2); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (i % j); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (i & 1); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (i & j); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (i | 1); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (i | j); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (i ^ 1); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (i ^ j); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (i >> 1); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (i >> j); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (i << 1); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (i << j); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (i && 0); /* { dg-warning "FALSE" } */
+ __analyzer_eval (i && 1); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (i && j); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (i || 0); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (i || 1); /* { dg-warning "TRUE" } */
+ __analyzer_eval (i || j); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval (~i); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (-i); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (+i); /* { dg-warning "UNKNOWN" } */
+
+ /* Anything added above should be added to the next function also. */
+}
+
+void test_21 (void)
+{
+ int i, j, zero;
+ int *pi = &i;
+ int *pj = &j;
+ int *pzero = &zero;
+ *pi = 5;
+ *pj = 3;
+ *pzero = 0;
+
+ __analyzer_eval (i + j == 8); /* { dg-warning "TRUE" } */
+ __analyzer_eval (i - j == 2); /* { dg-warning "TRUE" } */
+ __analyzer_eval (i * j == 15); /* { dg-warning "TRUE" } */
+ __analyzer_eval (i / j == 1); /* { dg-warning "TRUE" } */
+ __analyzer_eval (i % j == 2); /* { dg-warning "TRUE" } */
+
+ /* Division by zero. */
+ // TODO: should we warn for this?
+ __analyzer_eval (i / zero); /* { dg-warning "UNKNOWN" } */
+ __analyzer_eval (i % zero); /* { dg-warning "UNKNOWN" } */
+
+ __analyzer_eval ((i & 1) == (5 & 1)); /* { dg-warning "TRUE" } */
+ __analyzer_eval ((i & j) == (5 & 3)); /* { dg-warning "TRUE" } */
+ __analyzer_eval ((i | 1) == (5 | 1)); /* { dg-warning "TRUE" } */
+ __analyzer_eval ((i | j) == (5 | 3)); /* { dg-warning "TRUE" } */
+ __analyzer_eval ((i ^ 1) == (5 ^ 1)); /* { dg-warning "TRUE" } */
+ __analyzer_eval ((i ^ j) == (5 ^ 3)); /* { dg-warning "TRUE" } */
+ __analyzer_eval ((i >> 1) == (5 >> 1)); /* { dg-warning "TRUE" } */
+ __analyzer_eval ((i >> j) == (5 >> 3)); /* { dg-warning "TRUE" } */
+ __analyzer_eval ((i << 1) == (5 << 1)); /* { dg-warning "TRUE" } */
+ __analyzer_eval ((i << j) == (5 << 3)); /* { dg-warning "TRUE" } */
+ __analyzer_eval (i && 0); /* { dg-warning "FALSE" } */
+ __analyzer_eval (i && 1); /* { dg-warning "TRUE" } */
+ __analyzer_eval (i && j); /* { dg-warning "TRUE" } */
+
+ __analyzer_eval (i || 0); /* { dg-warning "TRUE" } */
+ __analyzer_eval (i || 1); /* { dg-warning "TRUE" } */
+ __analyzer_eval (i || j); /* { dg-warning "TRUE" } */
+
+ __analyzer_eval (~i == ~5); /* { dg-warning "TRUE" } */
+ __analyzer_eval (-i == -5); /* { dg-warning "TRUE" } */
+ __analyzer_eval (+i == +5); /* { dg-warning "TRUE" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-read-index-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-read-index-1.c
new file mode 100644
index 0000000..71c0816
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-read-index-1.c
@@ -0,0 +1,131 @@
+// TODO: remove need for this option:
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct foo
+{
+ signed int i;
+ char buf[256];
+};
+
+char test_1(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) { /* { dg-message "\\(\[0-9\]+\\) 'tmp' gets an unchecked value here" "event: tmp gets unchecked value" { xfail *-*-* } } */
+ /* { dg-message "\\(\[0-9\]+\\) following 'true' branch\\.\\.\\." "event: following true branch" { target *-*-* } .-1 } */
+ /* BUG: the following array lookup trusts that the input data's index is
+ in the range 0 <= i < 256; otherwise it's accessing the stack */
+ return tmp.buf[tmp.i]; // { dg-warning "use of attacker-controlled value 'tmp.i' in array lookup without bounds checking" "warning" } */
+ /* { dg-message "23: \\(\[0-9\]+\\) \\.\\.\\.to here" "event: to here" { target *-*-* } .-1 } */
+ /* { dg-message "23: \\(\[0-9\]+\\) 'tmp.i' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.i has an unchecked value" { xfail *-*-* } .-2 } */
+ /* { dg-message "\\(\[0-9\]+\\) use of attacker-controlled value 'tmp.i' in array lookup without bounds checking" "final event" { target *-*-* } .-3 } */
+
+ // TOOD: better messages for state changes
+ }
+ return 0;
+}
+
+char test_2(struct foo *f, int i)
+{
+ /* not a bug: the data is not known to be tainted: */
+ return f->buf[f->i];
+}
+
+char test_3(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.i >= 0 && tmp.i < 256) {
+ /* not a bug: the access is guarded by upper and lower bounds: */
+ return tmp.buf[tmp.i];
+ }
+ }
+ return 0;
+}
+
+char test_4(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.i >= 0) { /* { dg-message "'tmp.i' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.i has an unchecked value" { xfail *-*-* } } */
+ /* { dg-message "'tmp.i' has its lower bound checked here" "event: lower bound checked" { xfail *-*-* } .-1 } */
+ return tmp.buf[tmp.i]; /* { dg-warning "use of attacker-controlled value 'tmp.i' in array lookup without upper-bounds checking" "warning" } */
+ }
+ }
+ return 0;
+}
+
+char test_5(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.i < 256) { /* { dg-message "'tmp.i' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.i has an unchecked value" { xfail *-*-* } } */
+ /* { dg-message "'tmp.i' has its upper bound checked here" "event: upper bound checked" { xfail *-*-* } .-1 } */
+ return tmp.buf[tmp.i]; /* { dg-warning "use of attacker-controlled value 'tmp.i' in array lookup without checking for negative" "warning" } */
+ }
+ }
+ return 0;
+}
+
+/* unsigned types have a natural lower bound of 0 */
+struct bar
+{
+ unsigned int i;
+ char buf[256];
+};
+
+char test_6(FILE *f)
+{
+ struct bar tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ return tmp.buf[tmp.i]; /* { dg-warning "use of attacker-controlled value 'tmp.i' in array lookup without upper-bounds checking" } */
+ }
+ return 0;
+}
+
+char test_7(FILE *f)
+{
+ struct bar tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.i >= 0) {
+ return tmp.buf[tmp.i]; /* { dg-warning "use of attacker-controlled value 'tmp.i' in array lookup without upper-bounds checking" } */
+ }
+ }
+ return 0;
+}
+
+char test_8(FILE *f)
+{
+ struct bar tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.i < 256) {
+ /* not a bug: has an upper bound, and an implicit lower bound: */
+ return tmp.buf[tmp.i];
+ }
+ }
+ return 0;
+}
+
+char test_9(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.i == 42) {
+ /* not a bug: tmp.i compared against a specific value: */
+ return tmp.buf[tmp.i]; /* { dg-bogus "attacker-controlled" "" { xfail *-*-* } } */
+ // TODO: xfail
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-read-offset-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-read-offset-1.c
new file mode 100644
index 0000000..6db59bc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-read-offset-1.c
@@ -0,0 +1,128 @@
+// TODO: remove need for this option:
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct foo
+{
+ ssize_t offset;
+};
+
+char *p;
+
+char test_1(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) { /* { dg-message "\\(\[0-9\]+\\) 'tmp' gets an unchecked value here" "event: tmp gets unchecked value" { xfail *-*-* } } */
+ /* { dg-message "\\(\[0-9\]+\\) following 'true' branch\\.\\.\\." "event: following true branch" { target *-*-* } .-1 } */
+ return *(p + tmp.offset); // { dg-warning "use of attacker-controlled value 'tmp.offset' as offset without bounds checking" "warning" } */
+ /* { dg-message "\\(\[0-9\]+\\) \\.\\.\\.to here" "event: to here" { target *-*-* } .-1 } */
+ /* { dg-message "\\(\[0-9\]+\\) 'tmp.offset' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.offset has an unchecked value" { xfail *-*-* } .-2 } */
+ /* { dg-message "\\(\[0-9\]+\\) use of attacker-controlled value 'tmp.offset' as offset without bounds checking" "final event" { target *-*-* } .-3 } */
+
+ // TOOD: better messages for state changes
+ }
+ return 0;
+}
+
+char test_2(struct foo *f)
+{
+ /* not a bug: the data is not known to be tainted: */
+ return *(p + f->offset);
+}
+
+char test_3(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.offset >= 0 && tmp.offset < 256) {
+ /* not a bug: the access is guarded by upper and lower bounds: */
+ return *(p + tmp.offset);
+ }
+ }
+ return 0;
+}
+
+char test_4(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.offset >= 0) { /* { dg-message "'tmp.offset' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.offset has an unchecked value" { xfail *-*-* } } */
+ /* { dg-message "'tmp.offset' has its lower bound checked here" "event: lower bound checked" { xfail *-*-* } .-1 } */
+ return *(p + tmp.offset); /* { dg-warning "use of attacker-controlled value 'tmp.offset' as offset without upper-bounds checking" "warning" } */
+ }
+ }
+ return 0;
+}
+
+char test_5(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.offset < 256) { /* { dg-message "'tmp.offset' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.offset has an unchecked value" { xfail *-*-* } } */
+ /* { dg-message "'tmp.offset' has its upper bound checked here" "event: upper bound checked" { xfail *-*-* } .-1 } */
+ return *(p + tmp.offset); /* { dg-warning "use of attacker-controlled value 'tmp.offset' as offset without lower-bounds checking" "warning" } */
+ }
+ }
+ return 0;
+}
+
+/* unsigned types have a natural lower bound of 0 */
+struct bar
+{
+ size_t offset;
+};
+
+char test_6(FILE *f)
+{
+ struct bar tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ return *(p + tmp.offset); /* { dg-warning "use of attacker-controlled value 'tmp.offset' as offset without upper-bounds checking" } */
+ }
+ return 0;
+}
+
+char test_7(FILE *f)
+{
+ struct bar tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.offset >= 0) {
+ return *(p + tmp.offset); /* { dg-warning "use of attacker-controlled value 'tmp.offset' as offset without upper-bounds checking" } */
+ }
+ }
+ return 0;
+}
+
+char test_8(FILE *f)
+{
+ struct bar tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.offset < 256) {
+ /* not a bug: has an upper bound, and an implicit lower bound: */
+ return *(p + tmp.offset);
+ }
+ }
+ return 0;
+}
+
+char test_9(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.offset == 42) {
+ /* not a bug: tmp.offset compared against a specific value: */
+ return *(p + tmp.offset); /* { dg-bogus "attacker-controlled" "" { xfail *-*-* } } */
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-realloc.c b/gcc/testsuite/gcc.dg/analyzer/taint-realloc.c
new file mode 100644
index 0000000..bd0ed00
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-realloc.c
@@ -0,0 +1,21 @@
+// TODO: remove need for this option:
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include "analyzer-decls.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* realloc with tainted size. */
+
+void *p;
+
+void __attribute__((tainted_args))
+test_1 (size_t sz) /* { dg-message "\\(1\\) function 'test_1' marked with '__attribute__\\(\\(tainted_args\\)\\)'" } */
+{
+ void *q;
+
+ __analyzer_dump_state ("taint", sz); /* { dg-warning "state: 'tainted'" } */
+
+ q = realloc (p, sz); /* { dg-warning "use of attacker-controlled value 'sz' as allocation size without upper-bounds checking" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-size-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-size-1.c
new file mode 100644
index 0000000..0b166f7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-size-1.c
@@ -0,0 +1,41 @@
+// TODO: remove need for this option:
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include "analyzer-decls.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct foo
+{
+ size_t sz;
+};
+
+char buf[100];
+char buf2[100];
+
+/* memset with tainted size. */
+
+void test_1 (FILE *f)
+{
+ struct foo tmp;
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) { /* { dg-message "\\(\[0-9\]+\\) 'tmp' gets an unchecked value here" "event: tmp gets unchecked value" { xfail *-*-* } } */
+ /* { dg-message "\\(\[0-9\]+\\) following 'true' branch\\.\\.\\." "event: following true branch" { target *-*-* } .-1 } */
+ __analyzer_dump_state ("taint", tmp.sz); /* { dg-warning "state: 'tainted'" } */
+ /* { dg-message "\\(\[0-9\]+\\) \\.\\.\\.to here" "event: to here" { target *-*-* } .-1 } */
+
+ memset (buf, 0, tmp.sz); /* { dg-warning "use of attacker-controlled value 'tmp\\.sz' as size without upper-bounds checking" "warning" } */
+ /* { dg-message "23: \\(\[0-9\]+\\) 'tmp.i' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.i has an unchecked value" { xfail *-*-* } .-1 } */
+ /* { dg-message "\\(\[0-9\]+\\) use of attacker-controlled value 'tmp\\.sz' as size without upper-bounds checking" "final event" { target *-*-* } .-2 } */
+
+ // TOOD: better messages for state changes
+ }
+}
+
+/* memcpy with tainted size. */
+
+void __attribute__((tainted_args))
+test_2 (size_t sz)
+{
+ memcpy (buf, buf2, sz); /* { dg-warning "use of attacker-controlled value 'sz' as size without upper-bounds checking" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-size-access-attr-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-size-access-attr-1.c
new file mode 100644
index 0000000..724679a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-size-access-attr-1.c
@@ -0,0 +1,63 @@
+/* Passing tainted sizes to external functions with attribute ((access)) with
+ a size-index. */
+
+// TODO: remove need for this option:
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include "analyzer-decls.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct foo
+{
+ size_t sz;
+};
+
+char buf[100];
+
+extern void extern_fn_read_only (void *p, size_t sz) /* { dg-message "parameter 2 of 'extern_fn_read_only' marked as a size via attribute 'access \\(read_only, 1, 2\\)'" } */
+ __attribute__ ((access (read_only, 1, 2)));
+
+void test_fn_read_only (FILE *f, void *p)
+{
+ struct foo tmp;
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) { /* { dg-message "\\(\[0-9\]+\\) 'tmp' gets an unchecked value here" "event: tmp gets unchecked value" { xfail *-*-* } } */
+ /* { dg-message "\\(\[0-9\]+\\) following 'true' branch\\.\\.\\." "event: following true branch" { target *-*-* } .-1 } */
+ __analyzer_dump_state ("taint", tmp.sz); /* { dg-warning "state: 'tainted'" } */
+ /* { dg-message "\\(\[0-9\]+\\) \\.\\.\\.to here" "event: to here" { target *-*-* } .-1 } */
+
+ extern_fn_read_only (p, tmp.sz); /* { dg-warning "use of attacker-controlled value 'tmp.sz' as size without upper-bounds checking" } */
+ }
+}
+
+/* We shouldn't complain if the value has been sanitized. */
+
+void test_fn_sanitized (FILE *f, void *p)
+{
+ struct foo tmp;
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ __analyzer_dump_state ("taint", tmp.sz); /* { dg-warning "state: 'tainted'" } */
+
+ if (tmp.sz > 100)
+ return;
+
+ __analyzer_dump_state ("taint", tmp.sz); /* { dg-warning "state: 'has_ub'" } */
+
+ extern_fn_read_only (p, tmp.sz); /* { dg-bogus "use of attacker-controlled value" } */
+ }
+}
+
+/* We shouldn't complain if there was no size annotation. */
+
+extern void extern_fn_no_size (void *p)
+ __attribute__ ((access (read_only, 1)));
+
+void test_fn_no_size (FILE *f, void *p)
+{
+ struct foo tmp;
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ __analyzer_dump_state ("taint", tmp.sz); /* { dg-warning "state: 'tainted'" } */
+ extern_fn_no_size (p);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-write-index-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-write-index-1.c
new file mode 100644
index 0000000..cc7ab1c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-write-index-1.c
@@ -0,0 +1,132 @@
+// TODO: remove need for this option:
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct foo
+{
+ signed int i;
+ char buf[256];
+};
+
+struct foo g;
+char test_1(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) { /* { dg-message "\\(\[0-9\]+\\) 'tmp' gets an unchecked value here" "event: tmp gets unchecked value" { xfail *-*-* } } */
+ /* { dg-message "\\(\[0-9\]+\\) following 'true' branch\\.\\.\\." "event: following true branch" { target *-*-* } .-1 } */
+ /* BUG: the following array lookup trusts that the input data's index is
+ in the range 0 <= i < 256; otherwise it's accessing the stack */
+ g.buf[tmp.i] = 42; // { dg-warning "use of attacker-controlled value 'tmp.i' in array lookup without bounds checking" "warning" } */
+ /* { dg-message "\\(\[0-9\]+\\) \\.\\.\\.to here" "event: to here" { target *-*-* } .-1 } */
+ /* { dg-message "\\(\[0-9\]+\\) 'tmp.i' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.i has an unchecked value" { xfail *-*-* } .-2 } */
+ /* { dg-message "\\(\[0-9\]+\\) use of attacker-controlled value 'tmp.i' in array lookup without bounds checking" "final event" { target *-*-* } .-3 } */
+
+ // TOOD: better messages for state changes
+ }
+ return 0;
+}
+
+char test_2(struct foo *f, int i)
+{
+ /* not a bug: the data is not known to be tainted: */
+ return f->buf[f->i];
+}
+
+char test_3(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.i >= 0 && tmp.i < 256) {
+ /* not a bug: the access is guarded by upper and lower bounds: */
+ g.buf[tmp.i] = 42;
+ }
+ }
+ return 0;
+}
+
+char test_4(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.i >= 0) { /* { dg-message "'tmp.i' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.i has an unchecked value" { xfail *-*-* } } */
+ /* { dg-message "'tmp.i' has its lower bound checked here" "event: lower bound checked" { xfail *-*-* } .-1 } */
+ g.buf[tmp.i] = 42; /* { dg-warning "use of attacker-controlled value 'tmp.i' in array lookup without upper-bounds checking" "warning" } */
+ }
+ }
+ return 0;
+}
+
+char test_5(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.i < 256) { /* { dg-message "'tmp.i' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.i has an unchecked value" { xfail *-*-* } } */
+ /* { dg-message "'tmp.i' has its upper bound checked here" "event: upper bound checked" { xfail *-*-* } .-1 } */
+ g.buf[tmp.i] = 42; /* { dg-warning "use of attacker-controlled value 'tmp.i' in array lookup without checking for negative" "warning" } */
+ }
+ }
+ return 0;
+}
+
+/* unsigned types have a natural lower bound of 0 */
+struct bar
+{
+ unsigned int i;
+ char buf[256];
+};
+
+char test_6(FILE *f)
+{
+ struct bar tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ g.buf[tmp.i] = 42; /* { dg-warning "use of attacker-controlled value 'tmp.i' in array lookup without upper-bounds checking" } */
+ }
+ return 0;
+}
+
+char test_7(FILE *f)
+{
+ struct bar tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.i >= 0) {
+ g.buf[tmp.i] = 42; /* { dg-warning "use of attacker-controlled value 'tmp.i' in array lookup without upper-bounds checking" } */
+ }
+ }
+ return 0;
+}
+
+char test_8(FILE *f)
+{
+ struct bar tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.i < 256) {
+ /* not a bug: has an upper bound, and an implicit lower bound: */
+ g.buf[tmp.i] = 42;
+ }
+ }
+ return 0;
+}
+
+char test_9(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.i == 42) {
+ /* not a bug: tmp.i compared against a specific value: */
+ g.buf[tmp.i] = 42; /* { dg-bogus "attacker-controlled" "" { xfail *-*-* } } */
+ // TODO: xfail
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-write-offset-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-write-offset-1.c
new file mode 100644
index 0000000..d0df622
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-write-offset-1.c
@@ -0,0 +1,132 @@
+// TODO: remove need for this option:
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct foo
+{
+ ssize_t offset;
+};
+
+char *p;
+
+char test_1(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) { /* { dg-message "\\(\[0-9\]+\\) 'tmp' gets an unchecked value here" "event: tmp gets unchecked value" { xfail *-*-* } } */
+ /* { dg-message "\\(\[0-9\]+\\) following 'true' branch\\.\\.\\." "event: following true branch" { target *-*-* } .-1 } */
+ /* BUG: the following array lookup trusts that the input data's index is
+ in the range 0 <= i < 256; otherwise it's accessing the stack */
+ *(p + tmp.offset) = 42; // { dg-warning "use of attacker-controlled value 'tmp.offset' as offset without bounds checking" "warning" } */
+ /* { dg-message "\\(\[0-9\]+\\) \\.\\.\\.to here" "event: to here" { target *-*-* } .-1 } */
+ /* { dg-message "\\(\[0-9\]+\\) 'tmp.offset' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.offset has an unchecked value" { xfail *-*-* } .-2 } */
+ /* { dg-message "\\(\[0-9\]+\\) use of attacker-controlled value 'tmp.offset' as offset without bounds checking" "final event" { target *-*-* } .-3 } */
+
+ // TOOD: better messages for state changes
+ }
+ return 0;
+}
+
+char test_2(struct foo *f)
+{
+ /* not a bug: the data is not known to be tainted: */
+ *(p + f->offset) = 42;
+}
+
+char test_3(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.offset >= 0 && tmp.offset < 256) {
+ /* not a bug: the access is guarded by upper and lower bounds: */
+ *(p + tmp.offset) = 42;
+ }
+ }
+ return 0;
+}
+
+char test_4(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.offset >= 0) { /* { dg-message "'tmp.offset' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.offset has an unchecked value" { xfail *-*-* } } */
+ /* { dg-message "'tmp.offset' has its lower bound checked here" "event: lower bound checked" { xfail *-*-* } .-1 } */
+ *(p + tmp.offset) = 42; /* { dg-warning "use of attacker-controlled value 'tmp.offset' as offset without upper-bounds checking" "warning" } */
+ }
+ }
+ return 0;
+}
+
+char test_5(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.offset < 256) { /* { dg-message "'tmp.offset' has an unchecked value here \\(from 'tmp'\\)" "event: tmp.offset has an unchecked value" { xfail *-*-* } } */
+ /* { dg-message "'tmp.offset' has its upper bound checked here" "event: upper bound checked" { xfail *-*-* } .-1 } */
+ *(p + tmp.offset) = 42; /* { dg-warning "use of attacker-controlled value 'tmp.offset' as offset without lower-bounds checking" "warning" } */
+ }
+ }
+ return 0;
+}
+
+/* unsigned types have a natural lower bound of 0 */
+struct bar
+{
+ unsigned int offset;
+ char buf[256];
+};
+
+char test_6(FILE *f)
+{
+ struct bar tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ *(p + tmp.offset) = 42; /* { dg-warning "use of attacker-controlled value 'tmp.offset' as offset without upper-bounds checking" } */
+ }
+ return 0;
+}
+
+char test_7(FILE *f)
+{
+ struct bar tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.offset >= 0) {
+ *(p + tmp.offset) = 42; /* { dg-warning "use of attacker-controlled value 'tmp.offset' as offset without upper-bounds checking" } */
+ }
+ }
+ return 0;
+}
+
+char test_8(FILE *f)
+{
+ struct bar tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.offset < 256) {
+ /* not a bug: has an upper bound, and an implicit lower bound: */
+ *(p + tmp.offset) = 42;
+ }
+ }
+ return 0;
+}
+
+char test_9(FILE *f)
+{
+ struct foo tmp;
+
+ if (1 == fread(&tmp, sizeof(tmp), 1, f)) {
+ if (tmp.offset == 42) {
+ /* not a bug: tmp.offset compared against a specific value: */
+ *(p + tmp.offset) = 42; /* { dg-bogus "tainted" "" { xfail *-*-* } } */
+ // TODO: xfail
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/test-uaccess.h b/gcc/testsuite/gcc.dg/analyzer/test-uaccess.h
new file mode 100644
index 0000000..70c9d63
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/test-uaccess.h
@@ -0,0 +1,15 @@
+/* Shared header for testcases for copy_from_user/copy_to_user. */
+
+/* Adapted from include/linux/compiler.h */
+
+#define __user
+
+/* Adapted from include/asm-generic/uaccess.h */
+
+extern int copy_from_user(void *to, const void __user *from, long n)
+ __attribute__((access (write_only, 1, 3),
+ access (read_only, 2, 3)));
+
+extern long copy_to_user(void __user *to, const void *from, unsigned long n)
+ __attribute__((access (write_only, 1, 3),
+ access (read_only, 2, 3)));
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/analyzer-torture.exp b/gcc/testsuite/gcc.dg/analyzer/torture/analyzer-torture.exp
index e16f447..77a5be6 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/analyzer-torture.exp
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/analyzer-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 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/analyzer/torture/asm-x86-linux-array_index_mask_nospec.c b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-array_index_mask_nospec.c
index 6201fdb..b2d615c 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-array_index_mask_nospec.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-array_index_mask_nospec.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble { target x86_64-*-* } } */
+/* { dg-do compile { target x86_64-*-* } } */
/* { dg-require-effective-target lp64 } */
/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c
index cf5cf97..9861c2d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble { target x86_64-*-* } } */
+/* { dg-do compile { target x86_64-pc-linux-gnu } } */
/* { dg-require-effective-target lp64 } */
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-2.c b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-2.c
index c4b365f..09fef5d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-2.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble { target x86_64-*-* } } */
+/* { dg-do compile { target x86_64-pc-linux-gnu } } */
/* { dg-require-effective-target lp64 } */
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid.c b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid.c
index 243931a..518fe8c 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble { target x86_64-*-* } } */
+/* { dg-do compile { target x86_64-*-* } } */
/* { dg-require-effective-target lp64 } */
#include "../analyzer-decls.h"
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-rdmsr-paravirt.c b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-rdmsr-paravirt.c
index d994787..ed807ab 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-rdmsr-paravirt.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-rdmsr-paravirt.c
@@ -1,6 +1,6 @@
/* Adapted from Linux: arch/x86/include/asm/paravirt.h */
-/* { dg-do assemble { target x86_64-*-* } } */
+/* { dg-do compile { target x86_64-pc-linux-gnu } } */
/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-rdmsr.c b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-rdmsr.c
index 69d0165..3735d33 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-rdmsr.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-rdmsr.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble { target x86_64-*-* } } */
+/* { dg-do compile { target x86_64-*-* } } */
/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
#include "../analyzer-decls.h"
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c
index e90dccf5..4cbf432 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble { target x86_64-*-* } } */
+/* { dg-do compile { target x86_64-*-* } } */
/* { dg-require-effective-target lp64 } */
/* { dg-additional-options "-fsanitize=bounds -fno-analyzer-call-summaries" } */
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-reduced.c b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-reduced.c
index a18c58c..e046d8c 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-reduced.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-reduced.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble { target x86_64-*-* } } */
+/* { dg-do compile { target x86_64-*-* } } */
/* { dg-require-effective-target lp64 } */
/* Reproducer for false positive from -Wanalyzer-null-dereference seen
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/empty-struct-1.c b/gcc/testsuite/gcc.dg/analyzer/torture/empty-struct-1.c
new file mode 100644
index 0000000..1f1c07a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/empty-struct-1.c
@@ -0,0 +1,18 @@
+struct empty {};
+
+struct empty g;
+
+extern void sink (struct empty e);
+
+void test_1 (struct empty a)
+{
+ sink (a); /* { dg-bogus "uninit" } */
+}
+void test_2 ()
+{
+ struct empty a, b;
+ b = a;
+ g = b;
+ sink (b); /* { dg-bogus "uninit" } */
+ /* ...as there's nothing to initialize. */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/pr103685.c b/gcc/testsuite/gcc.dg/analyzer/torture/pr103685.c
new file mode 100644
index 0000000..1b22248
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/pr103685.c
@@ -0,0 +1,33 @@
+typedef struct ec_key_st EC_KEY;
+typedef struct ec_group_st EC_GROUP;
+typedef struct R3410_ec {
+ int nid;
+ EC_GROUP *group;
+} R3410_ec_params;
+extern R3410_ec_params R3410_2012_512_paramset[];
+
+static R3410_ec_params *gost_nid2params(int nid) {
+ R3410_ec_params *params;
+
+ params = R3410_2012_512_paramset;
+ while (params->nid != 0) {
+ if (params->nid == nid)
+ return params;
+ params++;
+ }
+
+ return ((void *)0);
+}
+
+int fill_GOST_EC_params(EC_KEY *eckey, int nid) {
+ R3410_ec_params *params = gost_nid2params(nid);
+ if (!eckey || !params) {
+ return 0;
+ }
+
+ if (params->group) {
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/pr104159.c b/gcc/testsuite/gcc.dg/analyzer/torture/pr104159.c
new file mode 100644
index 0000000..ad85d08
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/pr104159.c
@@ -0,0 +1,18 @@
+/* { dg-additional-options "-Wno-analyzer-use-of-uninitialized-value -Wno-psabi" } */
+
+typedef int __attribute__((__vector_size__(4))) T;
+typedef unsigned __attribute__((__vector_size__(4))) U;
+typedef unsigned __attribute__((__vector_size__(16))) V;
+typedef unsigned long __attribute__((__vector_size__(16))) W;
+
+U u;
+T t;
+
+void
+foo(W w) {
+ U u = __builtin_shufflevector((V)w, u, 0);
+ t = (T){} + u + u;
+ foo((W){});
+ for (;;)
+ ;
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/ubsan-1.c b/gcc/testsuite/gcc.dg/analyzer/torture/ubsan-1.c
index b9f34f1..18a5f8d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/ubsan-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/ubsan-1.c
@@ -1,5 +1,6 @@
/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
/* { dg-additional-options "-fsanitize=bounds" } */
+/* { dg-require-effective-target alloca } */
#include <stdlib.h>
#include "../analyzer-decls.h"
@@ -19,6 +20,7 @@ int test_2 (int *arr, int i, int n)
__analyzer_eval (arr[i]); /* { dg-warning "TRUE" } */
else
__analyzer_eval (arr[i]); /* { dg-warning "FALSE" } */
+ return 1;
}
int test_3 (int arr[], int i, int n)
@@ -29,6 +31,7 @@ int test_3 (int arr[], int i, int n)
__analyzer_eval (arr[i]); /* { dg-warning "TRUE" } */
else
__analyzer_eval (arr[i]); /* { dg-warning "FALSE" } */
+ return 1;
}
void test_4 (int i, int n)
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/uninit-bit-field-ref.c b/gcc/testsuite/gcc.dg/analyzer/torture/uninit-bit-field-ref.c
new file mode 100644
index 0000000..e2f9138
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/uninit-bit-field-ref.c
@@ -0,0 +1,31 @@
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-Wno-psabi" } */
+
+typedef __INT32_TYPE__ int32_t;
+typedef int32_t vnx4si __attribute__((vector_size (32)));
+
+extern void check_for_uninit (vnx4si v);
+
+void test_1a (vnx4si *out, int a, int b)
+{
+ vnx4si v = (vnx4si) { 1, 2, 3, 4, 5, 6, a, b };
+ check_for_uninit (v);
+}
+
+void test_1b (vnx4si *out, int a, int b)
+{
+ check_for_uninit ((vnx4si) { 1, 2, 3, 4, 5, 6, a, b });
+}
+
+static __attribute__((noipa)) void
+called_by_test_2 (vnx4si *out, int a, int b)
+{
+ *out = (vnx4si) { 1, 2, 3, 4, 5, 6, a, b };
+}
+
+void test_2 (vnx4si *out, int a, int b)
+{
+ vnx4si v;
+ called_by_test_2 (&v, a, b);
+ check_for_uninit (v);
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-pattern.c b/gcc/testsuite/gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-pattern.c
new file mode 100644
index 0000000..2445ee5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-pattern.c
@@ -0,0 +1,10 @@
+/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
+/* { dg-additional-options "-ftrivial-auto-var-init=pattern" } */
+
+int test_1 (void)
+{
+ int i; /* { dg-message "region created on stack here" } */
+ return i; /* { dg-warning "use of uninitialized value 'i.*'" } */
+ /* FIXME: the LTO build sometimes shows SSA names here
+ (PR analyzer/94976). */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-uninitialized.c b/gcc/testsuite/gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-uninitialized.c
new file mode 100644
index 0000000..7c4dd27
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-uninitialized.c
@@ -0,0 +1,10 @@
+/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
+/* { dg-additional-options "-ftrivial-auto-var-init=uninitialized" } */
+
+int test_1 (void)
+{
+ int i; /* { dg-message "region created on stack here" } */
+ return i; /* { dg-warning "use of uninitialized value 'i.*'" } */
+ /* FIXME: the LTO build sometimes shows SSA names here
+ (PR analyzer/94976). */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-zero.c b/gcc/testsuite/gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-zero.c
new file mode 100644
index 0000000..6486d25
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/uninit-trivial-auto-var-init-zero.c
@@ -0,0 +1,10 @@
+/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
+/* { dg-additional-options "-ftrivial-auto-var-init=zero" } */
+
+int test_1 (void)
+{
+ int i; /* { dg-message "region created on stack here" } */
+ return i; /* { dg-warning "use of uninitialized value 'i.*'" } */
+ /* FIXME: the LTO build sometimes shows SSA names here
+ (PR analyzer/94976). */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/uninit-1.c b/gcc/testsuite/gcc.dg/analyzer/uninit-1.c
index 8fcdcd6..9a6576e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/uninit-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/uninit-1.c
@@ -1,14 +1,15 @@
#include "analyzer-decls.h"
+typedef __SIZE_TYPE__ size_t;
int test_1 (void)
{
- int i;
+ int i; /* { dg-message "region created on stack here" } */
return i; /* { dg-warning "use of uninitialized value 'i'" } */
}
int test_2 (void)
{
- int i;
+ int i; /* { dg-message "region created on stack here" } */
return i * 2; /* { dg-warning "use of uninitialized value 'i'" } */
}
@@ -20,13 +21,13 @@ int test_3 (void)
int test_4 (void)
{
- int *p;
+ int *p; /* { dg-message "region created on stack here" } */
return *p; /* { dg-warning "use of uninitialized value 'p'" } */
}
int test_5 (int flag, int *q)
{
- int *p;
+ int *p; /* { dg-message "region created on stack here" } */
if (flag) /* { dg-message "following 'false' branch" } */
p = q;
@@ -39,6 +40,90 @@ int test_5 (int flag, int *q)
int test_6 (int i)
{
- int arr[10];
+ int arr[10]; /* { dg-message "region created on stack here" } */
return arr[i]; /* { dg-warning "use of uninitialized value 'arr\\\[i\\\]'" } */
}
+
+int test_rshift_rhs (int i)
+{
+ int j; /* { dg-message "region created on stack here" } */
+ return i >> j; /* { dg-warning "use of uninitialized value 'j'" } */
+}
+
+int test_lshift_rhs (int i)
+{
+ int j; /* { dg-message "region created on stack here" } */
+ return i << j; /* { dg-warning "use of uninitialized value 'j'" } */
+}
+
+int test_rshift_lhs (int i)
+{
+ int j; /* { dg-message "region created on stack here" } */
+ return j >> i; /* { dg-warning "use of uninitialized value 'j'" } */
+}
+
+int test_lshift_lhs (int i)
+{
+ int j; /* { dg-message "region created on stack here" } */
+ return j << i; /* { dg-warning "use of uninitialized value 'j'" } */
+}
+
+int test_cmp (int i)
+{
+ int j; /* { dg-message "region created on stack here" } */
+ return i < j; /* { dg-warning "use of uninitialized value 'j'" } */
+}
+
+float test_plus_rhs (float x)
+{
+ float y; /* { dg-message "region created on stack here" } */
+ return x + y; /* { dg-warning "use of uninitialized value 'y'" } */
+}
+
+float test_plus_lhs (float x)
+{
+ float y; /* { dg-message "region created on stack here" } */
+ return y + x; /* { dg-warning "use of uninitialized value 'y'" } */
+}
+
+float test_minus_rhs (float x)
+{
+ float y; /* { dg-message "region created on stack here" } */
+ return x - y; /* { dg-warning "use of uninitialized value 'y'" } */
+}
+
+float test_minus_lhs (float x)
+{
+ float y; /* { dg-message "region created on stack here" } */
+ return y - x; /* { dg-warning "use of uninitialized value 'y'" } */
+}
+
+float test_times_rhs (float x)
+{
+ float y; /* { dg-message "region created on stack here" } */
+ return x * y; /* { dg-warning "use of uninitialized value 'y'" } */
+}
+
+float test_times_lhs (float x)
+{
+ float y; /* { dg-message "region created on stack here" } */
+ return y * x; /* { dg-warning "use of uninitialized value 'y'" } */
+}
+
+float test_divide_rhs (float x)
+{
+ float y; /* { dg-message "region created on stack here" } */
+ return x / y; /* { dg-warning "use of uninitialized value 'y'" } */
+}
+
+float test_divide_lhs (float x)
+{
+ float y; /* { dg-message "region created on stack here" } */
+ return y / x; /* { dg-warning "use of uninitialized value 'y'" } */
+}
+
+size_t test_builtin_strlen (void)
+{
+ const char *ptr; /* { dg-message "region created on stack here" } */
+ return __builtin_strlen (ptr); /* { dg-warning "use of uninitialized value 'ptr'" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/uninit-4.c b/gcc/testsuite/gcc.dg/analyzer/uninit-4.c
index 791b111..616cb34 100644
--- a/gcc/testsuite/gcc.dg/analyzer/uninit-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/uninit-4.c
@@ -14,7 +14,7 @@ struct foo
struct foo *__attribute__((noinline))
alloc_foo (int a, int b)
{
- struct foo *p = malloc (sizeof (struct foo));
+ struct foo *p = malloc (sizeof (struct foo)); /* { dg-message "region created on heap here" } */
if (!p)
return NULL;
p->i = a;
diff --git a/gcc/testsuite/gcc.dg/analyzer/uninit-CWE-457-examples.c b/gcc/testsuite/gcc.dg/analyzer/uninit-CWE-457-examples.c
new file mode 100644
index 0000000..47d9c89
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/uninit-CWE-457-examples.c
@@ -0,0 +1,119 @@
+/* Examples adapted from https://cwe.mitre.org/data/definitions/457.html
+ which states "Copyright © 2006–2022, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation."
+ and which has this on:
+ https://cwe.mitre.org/about/termsofuse.html
+
+ Terms of Use
+
+ CWEâ„¢ is free to use by any organization or individual for any research, development, and/or commercial purposes, per these CWE Terms of Use. The MITRE Corporation ("MITRE") has copyrighted the CWE List, Top 25, CWSS, and CWRAF for the benefit of the community in order to ensure each remains a free and open standard, as well as to legally protect the ongoing use of it and any resulting content by government, vendors, and/or users. CWE is a trademark of MITRE. Please contact cwe@mitre.org if you require further clarification on this issue.
+
+ LICENSE
+
+ CWE Submissions: By submitting materials to The MITRE Corporation’s ("MITRE") Common Weakness Enumeration Program (CWE™), you hereby grant to MITRE a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to use, reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute your submitted materials and derivative works. Unless otherwise required by applicable law or agreed to in writing, it is understood that you are providing such materials on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
+
+ CWE Usage: MITRE hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. Any copy you make for such purposes is authorized on the condition that you reproduce MITRE’s copyright designation and this license in any such copy.
+
+ DISCLAIMERS
+
+ ALL DOCUMENTS AND THE INFORMATION CONTAINED IN THE CWE ARE PROVIDED ON AN "AS IS" BASIS AND THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE MITRE CORPORATION, ITS BOARD OF TRUSTEES, OFFICERS, AGENTS, AND EMPLOYEES, DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION THEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+
+ IN NO EVENT SHALL THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE MITRE CORPORATION, ITS BOARD OF TRUSTEES, OFFICERS, AGENTS, AND EMPLOYEES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE INFORMATION OR THE USE OR OTHER DEALINGS IN THE CWE. */
+
+#include <stdio.h>
+
+/* (example 1 from the page is written in PHP). */
+
+/* Example 2. */
+
+extern int repaint(int, int);
+
+#define NEXT_SZ 42
+
+void example_2_bad_code (int ctl, int i)
+{
+ int aN, bN; /* { dg-message "11: region created on stack here" } */
+ switch (ctl) { /* { dg-message "following 'default:' branch\\.\\.\\." } */
+ case -1:
+ aN = 0;
+ bN = 0;
+ break;
+
+ case 0:
+ aN = i;
+ bN = -i;
+ break;
+
+ case 1:
+ aN = i + NEXT_SZ;
+ bN = i - NEXT_SZ;
+ break;
+
+ default:
+ aN = -1;
+ aN = -1;
+ break;
+ }
+ repaint(aN, bN); /* { dg-warning "use of uninitialized value 'bN'" } */
+}
+
+void example_2_fixed (int ctl, int i)
+{
+ int aN, bN;
+ switch (ctl) {
+ case -1:
+ aN = 0;
+ bN = 0;
+ break;
+
+ case 0:
+ aN = i;
+ bN = -i;
+ break;
+
+ case 1:
+ aN = i + NEXT_SZ;
+ bN = i - NEXT_SZ;
+ break;
+
+ default:
+ aN = -1;
+ bN = -1; /* (fixing bN/aN typo) */
+ break;
+ }
+ repaint(aN, bN);
+}
+
+/* Example 3. */
+
+void example_3_bad_code (int i, int err_val)
+{
+ char *test_string; /* { dg-message "9: region created on stack here" } */
+ if (i != err_val) /* { dg-message "following 'false' branch \\(when 'i == err_val'\\)\\.\\.\\." } */
+ {
+ test_string = "Hello World!";
+ }
+ printf("%s", test_string); /* { dg-warning "use of uninitialized value 'test_string'" } */
+}
+
+void example_3_fix_a (int i, int err_val)
+{
+ char *test_string = "Done at the beginning";
+ if (i != err_val)
+ {
+ test_string = "Hello World!";
+ }
+ printf("%s", test_string);
+}
+
+void example_3_fix_b (int i, int err_val)
+{
+ char *test_string;
+ if (i != err_val)
+ {
+ test_string = "Hello World!";
+ }
+ else {
+ test_string = "Done on the other side!";
+ }
+ printf("%s", test_string);
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/uninit-alloca.c b/gcc/testsuite/gcc.dg/analyzer/uninit-alloca.c
new file mode 100644
index 0000000..5dd3f85
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/uninit-alloca.c
@@ -0,0 +1,7 @@
+/* { dg-require-effective-target alloca } */
+
+int test_1 (void)
+{
+ int *p = __builtin_alloca (sizeof (int)); /* { dg-message "region created on stack here" } */
+ return *p; /* { dg-warning "use of uninitialized value '\\*p'" } */
+}
diff --git a/gcc/testsuite/gcc.dg/analyzer/uninit-pr94713.c b/gcc/testsuite/gcc.dg/analyzer/uninit-pr94713.c
index cc337dc..e3bb8ce 100644
--- a/gcc/testsuite/gcc.dg/analyzer/uninit-pr94713.c
+++ b/gcc/testsuite/gcc.dg/analyzer/uninit-pr94713.c
@@ -3,7 +3,7 @@ void f2 (int);
int foo (void)
{
- int *p;
+ int *p; /* { dg-message "region created on stack here" } */
f1 (p); /* { dg-warning "use of uninitialized value 'p'" } */
f2 (p[0]); /* { dg-warning "use of uninitialized value 'p'" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/uninit-pr94714.c b/gcc/testsuite/gcc.dg/analyzer/uninit-pr94714.c
index df07f98..f120901 100644
--- a/gcc/testsuite/gcc.dg/analyzer/uninit-pr94714.c
+++ b/gcc/testsuite/gcc.dg/analyzer/uninit-pr94714.c
@@ -3,7 +3,7 @@
int main (void)
{
int *p;
- int i;
+ int i; /* { dg-message "region created on stack here" } */
p = &i; /* { dg-bogus "uninitialized" } */
printf ("%d\n", p[0]); /* { dg-warning "use of uninitialized value '\\*p'" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/zlib-3.c b/gcc/testsuite/gcc.dg/analyzer/zlib-3.c
index 57f5dcd..5098b4f 100644
--- a/gcc/testsuite/gcc.dg/analyzer/zlib-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/zlib-3.c
@@ -46,7 +46,7 @@ static int huft_build(uInt *b, uInt n, uInt s, const uInt *d, const uInt *e,
uInt mask;
register uInt *p;
inflate_huft *q;
- struct inflate_huft_s r;
+ struct inflate_huft_s r; /* { dg-message "region created on stack here" } */
inflate_huft *u[15];
register int w;
uInt x[15 + 1];
diff --git a/gcc/testsuite/gcc.dg/analyzer/zlib-5.c b/gcc/testsuite/gcc.dg/analyzer/zlib-5.c
index afb6102..1e3746d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/zlib-5.c
+++ b/gcc/testsuite/gcc.dg/analyzer/zlib-5.c
@@ -2,7 +2,7 @@
#include "analyzer-decls.h"
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
typedef unsigned char Byte;
typedef unsigned int uInt;
typedef unsigned long uLong;
diff --git a/gcc/testsuite/gcc.dg/asan/asan.exp b/gcc/testsuite/gcc.dg/asan/asan.exp
index a55003d..981bacd 100644
--- a/gcc/testsuite/gcc.dg/asan/asan.exp
+++ b/gcc/testsuite/gcc.dg/asan/asan.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.dg/asan/pr99673.c b/gcc/testsuite/gcc.dg/asan/pr99673.c
new file mode 100644
index 0000000..05857fd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/asan/pr99673.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-Wstringop-overread" } */
+
+struct B {
+ int i;
+ struct A {
+ short sa[8];
+ } a[2];
+};
+
+struct C {
+ char n, ax[];
+};
+
+struct D { int i, j, k; };
+
+int f (const short[8]);
+
+void g (struct C *pc, struct D *pd, int i)
+{
+ struct B *pb = (void *)pc->ax;
+ pd->i = pb->i;
+
+ const short *psa = pb->a[i].sa;
+ if (f (psa))
+ return;
+}
diff --git a/gcc/testsuite/gcc.dg/asan/use-after-scope-4.c b/gcc/testsuite/gcc.dg/asan/use-after-scope-4.c
index 44dc795..e1486e7 100644
--- a/gcc/testsuite/gcc.dg/asan/use-after-scope-4.c
+++ b/gcc/testsuite/gcc.dg/asan/use-after-scope-4.c
@@ -1,4 +1,5 @@
// { dg-do run }
+/* { dg-options "-fno-stack-protector" } */
#define FN(NAME) \
NAME (void) \
diff --git a/gcc/testsuite/gcc.dg/atomic-invalid-2.c b/gcc/testsuite/gcc.dg/atomic-invalid-2.c
index c73458e..220432c 100644
--- a/gcc/testsuite/gcc.dg/atomic-invalid-2.c
+++ b/gcc/testsuite/gcc.dg/atomic-invalid-2.c
@@ -38,13 +38,13 @@ exchange (atomic_int *i)
{
int r;
- atomic_compare_exchange_strong_explicit (i, &r, 0, memory_order_seq_cst, memory_order_release); /* { dg-warning "invalid failure memory" } */
- atomic_compare_exchange_strong_explicit (i, &r, 0, memory_order_seq_cst, memory_order_acq_rel); /* { dg-warning "invalid failure memory" } */
- atomic_compare_exchange_strong_explicit (i, &r, 0, memory_order_relaxed, memory_order_consume); /* { dg-warning "failure memory model cannot be stronger" } */
+ atomic_compare_exchange_strong_explicit (i, &r, 0, memory_order_seq_cst, memory_order_release); /* { dg-warning "invalid failure memory model 'memory_order_release'" } */
+ atomic_compare_exchange_strong_explicit (i, &r, 0, memory_order_seq_cst, memory_order_acq_rel); /* { dg-warning "invalid failure memory model 'memory_order_acq_rel'" } */
+ atomic_compare_exchange_strong_explicit (i, &r, 0, memory_order_relaxed, memory_order_consume); /* { dg-warning "failure memory model 'memory_order_consume' cannot be stronger than success memory model 'memory_order_relaxed'" } */
- atomic_compare_exchange_weak_explicit (i, &r, 0, memory_order_seq_cst, memory_order_release); /* { dg-warning "invalid failure memory" } */
- atomic_compare_exchange_weak_explicit (i, &r, 0, memory_order_seq_cst, memory_order_acq_rel); /* { dg-warning "invalid failure memory" } */
- atomic_compare_exchange_weak_explicit (i, &r, 0, memory_order_relaxed, memory_order_consume); /* { dg-warning "failure memory model cannot be stronger" } */
+ atomic_compare_exchange_weak_explicit (i, &r, 0, memory_order_seq_cst, memory_order_release); /* { dg-warning "invalid failure memory model 'memory_order_release'" } */
+ atomic_compare_exchange_weak_explicit (i, &r, 0, memory_order_seq_cst, memory_order_acq_rel); /* { dg-warning "invalid failure memory model 'memory_order_acq_rel'" } */
+ atomic_compare_exchange_weak_explicit (i, &r, 0, memory_order_relaxed, memory_order_consume); /* { dg-warning "failure memory model 'memory_order_consume' cannot be stronger than success memory model 'memory_order_relaxed'" } */
}
/* atomic_flag_clear():
diff --git a/gcc/testsuite/gcc.dg/atomic-invalid.c b/gcc/testsuite/gcc.dg/atomic-invalid.c
index f2adcdf..26da5b7 100644
--- a/gcc/testsuite/gcc.dg/atomic-invalid.c
+++ b/gcc/testsuite/gcc.dg/atomic-invalid.c
@@ -13,7 +13,7 @@ bool x;
int
main ()
{
- __atomic_compare_exchange_n (&i, &e, 1, 0, __ATOMIC_RELAXED, __ATOMIC_SEQ_CST); /* { dg-warning "failure memory model cannot be stronger" } */
+ __atomic_compare_exchange_n (&i, &e, 1, 0, __ATOMIC_RELAXED, __ATOMIC_SEQ_CST); /* { dg-warning "failure memory model 'memory_order_seq_cst' cannot be stronger" } */
__atomic_compare_exchange_n (&i, &e, 1, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELEASE); /* { dg-warning "invalid failure memory" } */
__atomic_compare_exchange_n (&i, &e, 1, 1, __ATOMIC_SEQ_CST, __ATOMIC_ACQ_REL); /* { dg-warning "invalid failure memory" } */
diff --git a/gcc/testsuite/gcc.dg/atomic/atomic.exp b/gcc/testsuite/gcc.dg/atomic/atomic.exp
index 9cbcb53..745c39b 100644
--- a/gcc/testsuite/gcc.dg/atomic/atomic.exp
+++ b/gcc/testsuite/gcc.dg/atomic/atomic.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.dg/attr-aligned.c b/gcc/testsuite/gcc.dg/attr-aligned.c
index ec54563..a2e11c9 100644
--- a/gcc/testsuite/gcc.dg/attr-aligned.c
+++ b/gcc/testsuite/gcc.dg/attr-aligned.c
@@ -12,8 +12,12 @@
# define ALIGN_MAX_STATIC 0x1000
/* Excessive alignment for functions and objects with static storage
duration that's expected to trigger an error. */
-#elif __MACH__
-# define ALIGN_MAX_STATIC 0x8000
+#elif __APPLE__
+# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070
+# define ALIGN_MAX_STATIC 0x8000
+# else
+# define ALIGN_MAX_STATIC ALIGN_MAX_HARD
+# endif
#elif pdp11
# define ALIGN_MAX_STATIC 2
/* Work around a pdp11 ICE (see PR target/87821). */
diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-6.c b/gcc/testsuite/gcc.dg/attr-alloc_size-6.c
index bf010c5..e28057f 100644
--- a/gcc/testsuite/gcc.dg/attr-alloc_size-6.c
+++ b/gcc/testsuite/gcc.dg/attr-alloc_size-6.c
@@ -5,7 +5,7 @@
-Walloc-larger-than=maximum. */
/* { dg-do compile } */
/* { dg-require-effective-target alloca } */
-/* { dg-options "-O0 -Wall -Walloc-size-larger-than=12345" } */
+/* { dg-options "-O0 -Wall -Walloc-size-larger-than=12345 -Wno-use-after-free" } */
#define MAXOBJSZ 12345
diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-7.c b/gcc/testsuite/gcc.dg/attr-alloc_size-7.c
index 3adde5c..6c26935 100644
--- a/gcc/testsuite/gcc.dg/attr-alloc_size-7.c
+++ b/gcc/testsuite/gcc.dg/attr-alloc_size-7.c
@@ -4,7 +4,7 @@
of the maximum specified by -Walloc-size-larger-than=maximum. */
/* { dg-do compile } */
/* { dg-require-effective-target alloca } */
-/* { dg-options "-O1 -Wall -Walloc-size-larger-than=12345" } */
+/* { dg-options "-O1 -Wall -Walloc-size-larger-than=12345 -Wno-use-after-free" } */
#define SIZE_MAX __SIZE_MAX__
#define MAXOBJSZ 12345
diff --git a/gcc/testsuite/gcc.dg/attr-returns-nonnull.c b/gcc/testsuite/gcc.dg/attr-returns-nonnull.c
index 22ee30a..e4e20b8 100644
--- a/gcc/testsuite/gcc.dg/attr-returns-nonnull.c
+++ b/gcc/testsuite/gcc.dg/attr-returns-nonnull.c
@@ -1,7 +1,7 @@
/* Verify that attribute returns_nonnull on global and local function
declarations is merged.
{ dg-do compile }
- { dg-options "-Wall -fdump-tree-optimized" } */
+ { dg-options "-Wall -fdump-tree-optimized -fdelete-null-pointer-checks" } */
void foo (void);
diff --git a/gcc/testsuite/gcc.dg/auto-init-uninit-16.c b/gcc/testsuite/gcc.dg/auto-init-uninit-16.c
index 38e1950..f14864b 100644
--- a/gcc/testsuite/gcc.dg/auto-init-uninit-16.c
+++ b/gcc/testsuite/gcc.dg/auto-init-uninit-16.c
@@ -1,7 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -Wuninitialized -ftrivial-auto-var-init=zero" } */
-/* -ftrivial-auto-var-init will make the uninitialized warning for address
- taken auto var going away, FIXME later. */
int foo, bar;
@@ -20,6 +18,6 @@ void testfunc()
decode_reloc(foo, &alt_reloc);
- if (alt_reloc) /* { dg-warning "may be used uninitialized" "" { xfail *-*-* } } */
+ if (alt_reloc) /* { dg-warning "may be used uninitialized" "" } */
bar = 42;
}
diff --git a/gcc/testsuite/gcc.dg/auto-init-uninit-34.c b/gcc/testsuite/gcc.dg/auto-init-uninit-34.c
index 1a68765..d6e7ed3 100644
--- a/gcc/testsuite/gcc.dg/auto-init-uninit-34.c
+++ b/gcc/testsuite/gcc.dg/auto-init-uninit-34.c
@@ -4,8 +4,6 @@
to functions declared with attribute access is diagnosed where expected.
{ dg-do compile }
{ dg-options "-O -Wall -ftrivial-auto-var-init=zero" } */
-/* -ftrivial-auto-var-init will make the uninitialized warning for address
- taken auto var going away, FIXME later. */
#define RW(...) __attribute__ ((access (read_write, __VA_ARGS__)))
@@ -21,10 +19,10 @@ void nowarn_scalar (void)
void warn_scalar_1 (void)
{
- int i1; // { dg-message "declared here" "" { xfail *-*-* } }
+ int i1; // { dg-message "declared here" "" }
int i2, i3 = 1, i4;
- f4pi (&i1, &i2, &i3, &i4); // { dg-warning "'i1' may be used uninitialized" "" { xfail *-*-* } }
+ f4pi (&i1, &i2, &i3, &i4); // { dg-warning "'i1' may be used uninitialized" "" }
}
void warn_scalar_2 (void)
@@ -32,7 +30,7 @@ void warn_scalar_2 (void)
int j1 = 0, j2, j4;
int j3;
- f4pi (&j1, &j2, &j3, &j4); // { dg-warning "'j3' may be used uninitialized" "" { xfail *-*-* } }
+ f4pi (&j1, &j2, &j3, &j4); // { dg-warning "'j3' may be used uninitialized" "" }
}
diff --git a/gcc/testsuite/gcc.dg/auto-init-uninit-37.c b/gcc/testsuite/gcc.dg/auto-init-uninit-37.c
index 2791b37..aea5542 100644
--- a/gcc/testsuite/gcc.dg/auto-init-uninit-37.c
+++ b/gcc/testsuite/gcc.dg/auto-init-uninit-37.c
@@ -5,8 +5,6 @@
arguments of array, VLA, or pointer types.
{ dg-do compile }
{ dg-options "-O2 -Wall -ftrack-macro-expansion=0 -ftrivial-auto-var-init=zero" } */
-/* -ftrivial-auto-var-init will make the uninitialized warning for address
- taken auto var going away, FIXME later. */
#define NONE /* none */
#define RO(...) __attribute__ ((access (read_only, __VA_ARGS__)))
@@ -42,9 +40,9 @@ typedef int IA_[];
typedef const int CIA_[];
T1 (NONE, fia_, IA_);
-T1 (NONE, fcia_, CIA_); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
-T1 (RO (1), froia_, IA_); // { dg-warning "\\\[-Wuninitialized" "" { xfail *-*-* } }
-T1 (RW (1), frwia_, IA_); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
+T1 (NONE, fcia_, CIA_); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
+T1 (RO (1), froia_, IA_); // { dg-warning "\\\[-Wuninitialized" "" }
+T1 (RW (1), frwia_, IA_); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
T1 (WO (1), fwoia_, IA_);
T1 (X (1), fxia_, IA_);
@@ -53,9 +51,9 @@ typedef int IA1[1];
typedef const int CIA1[1];
T1 (NONE, fia1, IA1);
-T1 (NONE, fcia1, CIA1); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
-T1 (RO (1), froia1, IA1); // { dg-warning "\\\[-Wuninitialized" "" { xfail *-*-* } }
-T1 (RW (1), frwia1, IA1); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
+T1 (NONE, fcia1, CIA1); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
+T1 (RO (1), froia1, IA1); // { dg-warning "\\\[-Wuninitialized" "" }
+T1 (RW (1), frwia1, IA1); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
T1 (WO (1), fwoia1, IA1);
T1 (X (1), fxia1, IA1);
@@ -64,9 +62,9 @@ T1 (X (1), fxia1, IA1);
#define CIARS1 const int[restrict static 1]
T1 (NONE, fiars1, IARS1);
-T1 (NONE, fciars1, CIARS1);// { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
-T1 (RO (1), froiars1, IARS1); // { dg-warning "\\\[-Wuninitialized" "" { xfail *-*-* } }
-T1 (RW (1), frwiars1, IARS1); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
+T1 (NONE, fciars1, CIARS1);// { dg-warning "\\\[-Wmaybe-uninitialized" "" }
+T1 (RO (1), froiars1, IARS1); // { dg-warning "\\\[-Wuninitialized" "" }
+T1 (RW (1), frwiars1, IARS1); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
T1 (WO (1), fwoiars1, IARS1);
T1 (X (1), fxiars1, IARS1);
@@ -75,9 +73,9 @@ T1 (X (1), fxiars1, IARS1);
#define CIAS1 const int[static 1]
T1 (NONE, fias1, IAS1);
-T1 (NONE, fcias1, CIAS1); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
-T1 (RO (1), froias1, IAS1); // { dg-warning "\\\[-Wuninitialized" "" { xfail *-*-* } }
-T1 (RW (1), frwias1, IAS1); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
+T1 (NONE, fcias1, CIAS1); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
+T1 (RO (1), froias1, IAS1); // { dg-warning "\\\[-Wuninitialized" "" }
+T1 (RW (1), frwias1, IAS1); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
T1 (WO (1), fwoias1, IAS1);
T1 (X (1), fxias1, IAS1);
@@ -86,9 +84,9 @@ T1 (X (1), fxias1, IAS1);
#define CIAX const int[*]
T1 (NONE, fiax, IAX);
-T1 (NONE, fciax, CIAX); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
-T1 (RO (1), froiax, IAX); // { dg-warning "\\\[-Wuninitialized" "" { xfail *-*-* } }
-T1 (RW (1), frwiax, IAX); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
+T1 (NONE, fciax, CIAX); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
+T1 (RO (1), froiax, IAX); // { dg-warning "\\\[-Wuninitialized" "" }
+T1 (RW (1), frwiax, IAX); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
T1 (WO (1), fwoiax, IAX);
T1 (X (1), fxiax, IAX);
@@ -97,9 +95,9 @@ T1 (X (1), fxiax, IAX);
#define CIAN int n, const int[n]
T2 (NONE, fian, IAN);
-T2 (NONE, fcian, CIAN); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
-T2 (RO (2, 1), froian, IAN); // { dg-warning "\\\[-Wuninitialized" "" { xfail *-*-* } }
-T2 (RW (2, 1), frwian, IAN); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
+T2 (NONE, fcian, CIAN); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
+T2 (RO (2, 1), froian, IAN); // { dg-warning "\\\[-Wuninitialized" "" }
+T2 (RW (2, 1), frwian, IAN); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
T2 (WO (2, 1), fwoian, IAN);
T2 (X (2, 1), fxian, IAN);
@@ -108,9 +106,9 @@ typedef int* IP;
typedef const int* CIP;
T1 (NONE, fip, IP);
-T1 (NONE, fcip, CIP); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
-T1 (RO (1), froip, IP); // { dg-warning "\\\[-Wuninitialized" "" { xfail *-*-* } }
-T1 (RW (1), frwip, IP); // { dg-warning "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
+T1 (NONE, fcip, CIP); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
+T1 (RO (1), froip, IP); // { dg-warning "\\\[-Wuninitialized" "" }
+T1 (RW (1), frwip, IP); // { dg-warning "\\\[-Wmaybe-uninitialized" "" }
T1 (WO (1), fwoip, IP);
T1 (X (1), fxip, IP);
diff --git a/gcc/testsuite/gcc.dg/auto-init-uninit-B.c b/gcc/testsuite/gcc.dg/auto-init-uninit-B.c
index b6d3efd..40d3196 100644
--- a/gcc/testsuite/gcc.dg/auto-init-uninit-B.c
+++ b/gcc/testsuite/gcc.dg/auto-init-uninit-B.c
@@ -1,7 +1,5 @@
/* Origin: PR c/179 from Gray Watson <gray@256.com>, adapted as a testcase
by Joseph Myers <jsm28@cam.ac.uk>. */
-/* -ftrivial-auto-var-init will make the uninitialized warning for address
- taken auto var going away, FIXME later. */
/* { dg-do compile } */
/* { dg-options "-O2 -Wuninitialized -ftrivial-auto-var-init=zero" } */
extern void foo (int *);
@@ -11,7 +9,7 @@ void
baz (void)
{
int i;
- if (i) /* { dg-warning "is used uninitialized" "uninit i warning" { xfail *-*-* } } */
+ if (i) /* { dg-warning "is used uninitialized" "uninit i warning" } */
bar (i);
foo (&i);
}
diff --git a/gcc/testsuite/gcc.dg/autopar/autopar.exp b/gcc/testsuite/gcc.dg/autopar/autopar.exp
index 856808e..cc543ce 100644
--- a/gcc/testsuite/gcc.dg/autopar/autopar.exp
+++ b/gcc/testsuite/gcc.dg/autopar/autopar.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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/bad-pragma-locations.c b/gcc/testsuite/gcc.dg/bad-pragma-locations.c
new file mode 100644
index 0000000..8068839
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bad-pragma-locations.c
@@ -0,0 +1,86 @@
+/* Verify that we use precise locations when emitting diagnostics
+ about pragmas. */
+
+/* { dg-do assemble } */
+/* { dg-options "-fdiagnostics-show-caret" } */
+
+/* pack ****************************************************************************/
+
+#pragma pack
+/* { dg-warning "missing '\\(' after '#pragma pack' - ignored" "" { target *-*-* } .-1 }
+ { dg-begin-multiline-output "" }
+ #pragma pack
+ ^~~~
+ { dg-end-multiline-output "" } */
+
+#pragma pack (
+/* { dg-warning "malformed '#pragma pack' - ignored" "" { target *-*-* } .-1 }
+ { dg-begin-multiline-output "" }
+ #pragma pack (
+ ^~~~
+ { dg-end-multiline-output "" } */
+
+#pragma pack (32
+/* { dg-warning "malformed '#pragma pack' - ignored" "" { target *-*-* } .-1 }
+ { dg-begin-multiline-output "" }
+ #pragma pack (32
+ ^~~~
+ { dg-end-multiline-output "" } */
+
+#pragma pack (3.14159
+/* { dg-warning "invalid constant in '#pragma pack' - ignored" "" { target *-*-* } .-1 }
+ { dg-begin-multiline-output "" }
+ #pragma pack (3.14159
+ ^~~~~~~
+ { dg-end-multiline-output "" } */
+
+#pragma pack (push, 3.14159
+/* { dg-warning "invalid constant in '#pragma pack' - ignored" "" { target *-*-* } .-1 }
+ { dg-begin-multiline-output "" }
+ #pragma pack (push, 3.14159
+ ^~~~~~~
+ { dg-end-multiline-output "" } */
+
+#pragma pack (toothbrush
+/* { dg-warning "unknown action 'toothbrush' for '#pragma pack' - ignored" "" { target *-*-* } .-1 }
+ { dg-begin-multiline-output "" }
+ #pragma pack (toothbrush
+ ^~~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+#pragma pack() pyjamas
+/* { dg-warning "junk at end of '#pragma pack'" "" { target *-*-* } .-1 }
+ { dg-begin-multiline-output "" }
+ #pragma pack() pyjamas
+ ^~~~~~~
+ { dg-end-multiline-output "" } */
+
+/* target ****************************************************************************/
+
+#pragma GCC target 42
+/* { dg-warning "#pragma GCC option' is not a string" "" { target *-*-* } .-1 }
+ { dg-begin-multiline-output "" }
+ #pragma GCC target 42
+ ^~
+ { dg-end-multiline-output "" } */
+
+#pragma GCC target ( 1776
+/* { dg-warning "#pragma GCC option' is not a string" "" { target *-*-* } .-1 }
+ { dg-begin-multiline-output "" }
+ #pragma GCC target ( 1776
+ ^~~~
+ { dg-end-multiline-output "" } */
+
+/* message ****************************************************************************/
+
+#pragma message "foo" int
+/* { dg-warning "junk at end of '#pragma message'" "" { target *-*-* } .-1 }
+ { dg-message "'#pragma message: foo'" "" { target *-*-* } .-2 }
+ { dg-begin-multiline-output "" }
+ #pragma message "foo" int
+ ^~~
+ { dg-end-multiline-output "" }
+ { dg-begin-multiline-output "" }
+ #pragma message "foo" int
+ ^~~~~~~
+ { dg-end-multiline-output "" } */
diff --git a/gcc/testsuite/gcc.dg/bic-bitmask-13.c b/gcc/testsuite/gcc.dg/bic-bitmask-13.c
new file mode 100644
index 0000000..bac86c2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bic-bitmask-13.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-O0 -save-temps -fdump-tree-dce" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+__attribute__((noinline, noipa, optimize("O1")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+#include "bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {<=\s* 255} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s* 4294967040} dce7 { target vect_int } } } */
+
diff --git a/gcc/testsuite/gcc.dg/bic-bitmask-14.c b/gcc/testsuite/gcc.dg/bic-bitmask-14.c
new file mode 100644
index 0000000..ec3bd6a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bic-bitmask-14.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -save-temps -fdump-tree-dce" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+__attribute__((noinline, noipa, optimize("O0")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+#include "bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {<=\s* 255} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s* 4294967040} dce7 { target vect_int } } } */
+
diff --git a/gcc/testsuite/gcc.dg/bic-bitmask-15.c b/gcc/testsuite/gcc.dg/bic-bitmask-15.c
new file mode 100644
index 0000000..8bdf1ea
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bic-bitmask-15.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -save-temps -fdump-tree-dce" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) >= 0;
+}
+
+__attribute__((noinline, noipa, optimize("O0")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) >= 0;
+}
+
+#include "bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {=\s* 1} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s* 4294967040} dce7 { target vect_int } } } */
+
diff --git a/gcc/testsuite/gcc.dg/bic-bitmask-16.c b/gcc/testsuite/gcc.dg/bic-bitmask-16.c
new file mode 100644
index 0000000..cfea925
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bic-bitmask-16.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -save-temps -fdump-tree-dce" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) > 0;
+}
+
+__attribute__((noinline, noipa, optimize("O0")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) > 0;
+}
+
+#include "bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {>\s* 255} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s* 4294967040} dce7 { target vect_int } } } */
+
diff --git a/gcc/testsuite/gcc.dg/bic-bitmask-17.c b/gcc/testsuite/gcc.dg/bic-bitmask-17.c
new file mode 100644
index 0000000..86873b9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bic-bitmask-17.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -save-temps -fdump-tree-dce" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) <= 0;
+}
+
+__attribute__((noinline, noipa, optimize("O0")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) <= 0;
+}
+
+#include "bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {<=\s* 255} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s* 4294967040} dce7 { target vect_int } } } */
+
diff --git a/gcc/testsuite/gcc.dg/bic-bitmask-18.c b/gcc/testsuite/gcc.dg/bic-bitmask-18.c
new file mode 100644
index 0000000..70bab0c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bic-bitmask-18.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -save-temps -fdump-tree-dce" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~1)) < 0;
+}
+
+__attribute__((noinline, noipa, optimize("O0")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~1)) < 0;
+}
+
+#include "bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times { = 0;} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/bic-bitmask-19.c b/gcc/testsuite/gcc.dg/bic-bitmask-19.c
new file mode 100644
index 0000000..c4620df
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bic-bitmask-19.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -save-temps -fdump-tree-dce" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~1)) != 0;
+}
+
+__attribute__((noinline, noipa, optimize("O0")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~1)) != 0;
+}
+
+#include "bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {>\s* 1} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s* 4294967294} dce7 { target vect_int } } } */
+
diff --git a/gcc/testsuite/gcc.dg/bic-bitmask-20.c b/gcc/testsuite/gcc.dg/bic-bitmask-20.c
new file mode 100644
index 0000000..a114122
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bic-bitmask-20.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -save-temps -fdump-tree-dce" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~5)) == 0;
+}
+
+__attribute__((noinline, noipa, optimize("O0")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~5)) == 0;
+}
+
+#include "bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-not {<=\s* 4294967289} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump {&\s* 4294967290} dce7 { target vect_int } } } */
+
diff --git a/gcc/testsuite/gcc.dg/bic-bitmask-21.c b/gcc/testsuite/gcc.dg/bic-bitmask-21.c
new file mode 100644
index 0000000..bd12a58
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bic-bitmask-21.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -save-temps -fdump-tree-dce" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(int32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+__attribute__((noinline, noipa, optimize("O0")))
+void fun2(int32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+#define TYPE int32_t
+#include "bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump {<=\s* 255} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s* 4294967290} dce7 { target vect_int } } } */
+
diff --git a/gcc/testsuite/gcc.dg/bic-bitmask-22.c b/gcc/testsuite/gcc.dg/bic-bitmask-22.c
new file mode 100644
index 0000000..a9f0867
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bic-bitmask-22.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -save-temps -fdump-tree-dce" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) != 0;
+}
+
+__attribute__((noinline, noipa, optimize("O0")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) != 0;
+}
+
+#include "bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump {>\s* 255} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s* 4294967290} dce7 { target vect_int } } } */
+
diff --git a/gcc/testsuite/gcc.dg/bic-bitmask-7.c b/gcc/testsuite/gcc.dg/bic-bitmask-7.c
new file mode 100644
index 0000000..bc49f29
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bic-bitmask-7.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -save-temps -fdump-tree-dce" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~1)) < 0;
+}
+
+__attribute__((noinline, noipa, optimize("O1")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~1)) < 0;
+}
+
+#include "bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {__builtin_memset} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/bic-bitmask.h b/gcc/testsuite/gcc.dg/bic-bitmask.h
new file mode 100644
index 0000000..faf80b9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bic-bitmask.h
@@ -0,0 +1,43 @@
+#include <stdio.h>
+
+#ifndef N
+#define N 65
+#endif
+
+#ifndef TYPE
+#define TYPE uint32_t
+#endif
+
+#ifndef DEBUG
+#define DEBUG 0
+#endif
+
+#define BASE ((TYPE) -1 < 0 ? -126 : 4)
+
+int main ()
+{
+ TYPE a[N];
+ TYPE b[N];
+
+ for (int i = 0; i < N; ++i)
+ {
+ a[i] = BASE + i * 13;
+ b[i] = BASE + i * 13;
+ if (DEBUG)
+ printf ("%d: 0x%x\n", i, a[i]);
+ }
+
+ fun1 (a, N);
+ fun2 (b, N);
+
+ for (int i = 0; i < N; ++i)
+ {
+ if (DEBUG)
+ printf ("%d = 0x%x == 0x%x\n", i, a[i], b[i]);
+
+ if (a[i] != b[i])
+ __builtin_abort ();
+ }
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-alloc-size.c b/gcc/testsuite/gcc.dg/builtin-dynamic-alloc-size.c
new file mode 100644
index 0000000..9d0eadd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-alloc-size.c
@@ -0,0 +1,7 @@
+/* { dg-do compile }
+ { dg-require-effective-target alloca }
+ { dg-additional-options "-O2 -fdump-tree-optimized" } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-alloc-size.c"
+/* { dg-final { scan-tree-dump-not "abort" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c
new file mode 100644
index 0000000..dd8dc99
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c
@@ -0,0 +1,514 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+typedef __SIZE_TYPE__ size_t;
+#define abort __builtin_abort
+
+void *
+__attribute__ ((alloc_size (1)))
+__attribute__ ((__nothrow__ , __leaf__))
+__attribute__ ((noinline))
+alloc_func (size_t sz)
+{
+ return __builtin_malloc (sz);
+}
+
+void *
+__attribute__ ((alloc_size (1, 2)))
+__attribute__ ((__nothrow__ , __leaf__))
+__attribute__ ((noinline))
+calloc_func (size_t cnt, size_t sz)
+{
+ return __builtin_calloc (cnt, sz);
+}
+
+void *
+__attribute__ ((noinline))
+unknown_allocator (size_t cnt, size_t sz)
+{
+ return __builtin_calloc (cnt, sz);
+}
+
+size_t
+__attribute__ ((noinline))
+test_unknown (size_t cnt, size_t sz)
+{
+ void *ch = unknown_allocator (cnt, sz);
+ size_t ret = __builtin_dynamic_object_size (ch, 0);
+ __builtin_free (ch);
+ return ret;
+}
+
+/* Malloc-like allocator. */
+
+size_t
+__attribute__ ((noinline))
+test_malloc (size_t sz)
+{
+ void *ch = alloc_func (sz);
+ size_t ret = __builtin_dynamic_object_size (ch, 0);
+ __builtin_free (ch);
+ return ret;
+}
+
+size_t
+__attribute__ ((noinline))
+test_builtin_malloc (size_t sz)
+{
+ void *ch = __builtin_malloc (sz);
+ size_t ret = __builtin_dynamic_object_size (ch, 0);
+ __builtin_free (ch);
+ return ret;
+}
+
+size_t
+__attribute__ ((noinline))
+test_builtin_malloc_cond (int cond)
+{
+ void *ch = __builtin_malloc (cond ? 32 : 64);
+ size_t ret = __builtin_dynamic_object_size (ch, 0);
+ __builtin_free (ch);
+ return ret;
+}
+
+size_t
+__attribute__ ((noinline))
+test_builtin_malloc_condphi (int cond)
+{
+ void *ch;
+
+ if (cond)
+ ch = __builtin_malloc (32);
+ else
+ ch = __builtin_malloc (64);
+
+ size_t ret = __builtin_dynamic_object_size (ch, 0);
+
+ __builtin_free (ch);
+ return ret;
+}
+
+size_t
+__attribute__ ((noinline))
+test_builtin_malloc_condphi2 (int cond, size_t in)
+{
+ void *ch;
+
+ if (cond)
+ ch = __builtin_malloc (in);
+ else
+ ch = __builtin_malloc (64);
+
+ size_t ret = __builtin_dynamic_object_size (ch, 0);
+
+ __builtin_free (ch);
+ return ret;
+}
+
+size_t
+__attribute__ ((noinline))
+test_builtin_malloc_condphi3 (int cond, size_t in, size_t in2)
+{
+ void *ch;
+
+ if (cond)
+ ch = __builtin_malloc (in);
+ else
+ ch = __builtin_malloc (in2);
+
+ size_t ret = __builtin_dynamic_object_size (ch, 0);
+
+ __builtin_free (ch);
+ return ret;
+}
+
+size_t
+__attribute__ ((noinline))
+test_builtin_malloc_condphi4 (size_t sz, int cond)
+{
+ char *a = __builtin_malloc (sz);
+ char b[sz / 2];
+
+ size_t ret = __builtin_dynamic_object_size (cond ? b : (void *) &a, 0);
+ __builtin_free (a);
+ return ret;
+}
+
+size_t
+__attribute__ ((noinline))
+test_builtin_malloc_condphi5 (size_t sz, int cond, char *c)
+{
+ char *a = __builtin_malloc (sz);
+
+ size_t ret = __builtin_dynamic_object_size (cond ? c : (void *) &a, 0);
+ __builtin_free (a);
+ return ret;
+}
+
+/* Calloc-like allocator. */
+
+size_t
+__attribute__ ((noinline))
+test_calloc (size_t cnt, size_t sz)
+{
+ void *ch = calloc_func (cnt, sz);
+ size_t ret = __builtin_dynamic_object_size (ch, 0);
+ __builtin_free (ch);
+ return ret;
+}
+
+size_t
+__attribute__ ((noinline))
+test_builtin_calloc (size_t cnt, size_t sz)
+{
+ void *ch = __builtin_calloc (cnt, sz);
+ size_t ret = __builtin_dynamic_object_size (ch, 0);
+ __builtin_free (ch);
+ return ret;
+}
+
+size_t
+__attribute__ ((noinline))
+test_builtin_calloc_cond (int cond1, int cond2)
+{
+ void *ch = __builtin_calloc (cond1 ? 32 : 64, cond2 ? 1024 : 16);
+ size_t ret = __builtin_dynamic_object_size (ch, 0);
+ __builtin_free (ch);
+ return ret;
+}
+
+size_t
+__attribute__ ((noinline))
+test_builtin_calloc_condphi (size_t cnt, size_t sz, int cond)
+{
+ struct
+ {
+ int a;
+ char b;
+ } bin[cnt];
+
+ char *ch = __builtin_calloc (cnt, sz);
+ size_t ret = __builtin_dynamic_object_size (cond ? ch : (void *) &bin, 0);
+
+ __builtin_free (ch);
+ return ret;
+}
+
+/* Passthrough functions. */
+
+size_t
+__attribute__ ((noinline))
+test_passthrough (size_t sz, char *in)
+{
+ char *bin = __builtin_malloc (sz);
+ char *dest = __builtin_memcpy (bin, in, sz);
+
+ size_t ret = __builtin_dynamic_object_size (dest, 0);
+ __builtin_free (bin);
+ return ret;
+}
+
+size_t
+__attribute__ ((noinline))
+test_passthrough_nonssa (char *in)
+{
+ char bin[__builtin_strlen (in) + 1];
+ char *dest = __builtin_memcpy (bin, in, __builtin_strlen (in) + 1);
+
+ return __builtin_dynamic_object_size (dest, 0);
+}
+
+/* Variable length arrays. */
+size_t
+__attribute__ ((noinline))
+test_dynarray (size_t sz)
+{
+ char bin[sz];
+
+ return __builtin_dynamic_object_size (bin, 0);
+}
+
+size_t
+__attribute__ ((noinline))
+test_dynarray_cond (int cond)
+{
+ char bin[cond ? 8 : 16];
+
+ return __builtin_dynamic_object_size (bin, 0);
+}
+
+size_t
+__attribute__ ((noinline))
+test_deploop (size_t sz, size_t cond)
+{
+ char *bin = __builtin_alloca (32);
+
+ for (size_t i = 0; i < sz; i++)
+ if (i == cond)
+ bin = __builtin_alloca (sz);
+
+ return __builtin_dynamic_object_size (bin, 0);
+}
+
+/* Address expressions. */
+
+struct dynarray_struct
+{
+ long a;
+ char c[16];
+ int b;
+};
+
+size_t
+__attribute__ ((noinline))
+test_dynarray_struct (size_t sz, size_t off)
+{
+ struct dynarray_struct bin[sz];
+
+ return __builtin_dynamic_object_size (&bin[off].c, 0);
+}
+
+size_t
+__attribute__ ((noinline))
+test_dynarray_struct_subobj (size_t sz, size_t off)
+{
+ struct dynarray_struct bin[sz];
+
+ return __builtin_dynamic_object_size (&bin[off].c[4], 1);
+}
+
+size_t
+__attribute__ ((noinline))
+test_dynarray_struct_subobj2 (size_t sz, size_t off, size_t *objsz)
+{
+ struct dynarray_struct2
+ {
+ long a;
+ int b;
+ char c[sz];
+ };
+
+ struct dynarray_struct2 bin;
+
+ *objsz = sizeof (bin);
+
+ return __builtin_dynamic_object_size (&bin.c[off], 1);
+}
+
+size_t
+__attribute__ ((noinline))
+test_substring (size_t sz, size_t off)
+{
+ char str[sz];
+
+ return __builtin_dynamic_object_size (&str[off], 0);
+}
+
+size_t
+__attribute__ ((noinline))
+test_substring_ptrplus (size_t sz, size_t off)
+{
+ int str[sz];
+
+ return __builtin_dynamic_object_size (str + off, 0);
+}
+
+size_t
+__attribute__ ((noinline))
+test_substring_ptrplus2 (size_t sz, size_t off, size_t off2)
+{
+ int str[sz];
+ int *ptr = &str[off];
+
+ return __builtin_dynamic_object_size (ptr + off2, 0);
+}
+
+size_t
+__attribute__ ((access (__read_write__, 1, 2)))
+__attribute__ ((noinline))
+test_parmsz_simple (void *obj, size_t sz)
+{
+ return __builtin_dynamic_object_size (obj, 0);
+}
+
+size_t
+__attribute__ ((noinline))
+__attribute__ ((access (__read_write__, 1, 2)))
+test_parmsz (void *obj, size_t sz, size_t off)
+{
+ return __builtin_dynamic_object_size (obj + off, 0);
+}
+
+size_t
+__attribute__ ((access (__read_write__, 1, 2)))
+__attribute__ ((noinline))
+test_parmsz_scaled (int *obj, size_t sz)
+{
+ return __builtin_dynamic_object_size (obj, 0);
+}
+
+size_t
+__attribute__ ((noinline))
+__attribute__ ((access (__read_write__, 1, 2)))
+test_parmsz_scaled_off (int *obj, size_t sz, size_t off)
+{
+ return __builtin_dynamic_object_size (obj + off, 0);
+}
+
+size_t
+__attribute__ ((access (__read_write__, 1, 3)))
+__attribute__ ((noinline))
+test_parmsz_unknown (void *obj, void *unknown, size_t sz, int cond)
+{
+ return __builtin_dynamic_object_size (cond ? obj : unknown, 0);
+}
+
+size_t
+__attribute__ ((noinline))
+__attribute__ ((access (__read_write__, 1, 2)))
+test_loop (int *obj, size_t sz, size_t start, size_t end, int incr)
+{
+ int *ptr = obj + start;
+
+ for (int i = start; i != end; i = i + incr)
+ {
+ ptr = ptr + incr;
+ if (__builtin_dynamic_object_size (ptr, 0) == 0)
+ return 0;
+ }
+
+ return __builtin_dynamic_object_size (ptr, 0);
+}
+
+unsigned nfails = 0;
+
+#define FAIL() ({ \
+ __builtin_printf ("Failure at line: %d\n", __LINE__); \
+ nfails++; \
+})
+
+int
+main (int argc, char **argv)
+{
+ size_t outsz = test_unknown (32, 42);
+ if (outsz != -1 && outsz != 32)
+ FAIL ();
+ if (test_malloc (2048) != 2048)
+ FAIL ();
+ if (test_builtin_malloc (2048) != 2048)
+ FAIL ();
+ if (test_builtin_malloc_cond (1) != 32)
+ FAIL ();
+ if (test_builtin_malloc_cond (0) != 64)
+ FAIL ();
+ if (test_builtin_malloc_condphi (1) != 32)
+ FAIL ();
+ if (test_builtin_malloc_condphi (0) != 64)
+ FAIL ();
+ if (test_builtin_malloc_condphi2 (1, 128) != 128)
+ FAIL ();
+ if (test_builtin_malloc_condphi2 (0, 128) != 64)
+ FAIL ();
+ if (test_builtin_malloc_condphi3 (1, 128, 256) != 128)
+ FAIL ();
+ if (test_builtin_malloc_condphi3 (0, 128, 256) != 256)
+ FAIL ();
+ if (test_builtin_malloc_condphi4 (128, 1) != 64)
+ FAIL ();
+ if (test_builtin_malloc_condphi4 (128, 0) != sizeof (void *))
+ FAIL ();
+ if (test_builtin_malloc_condphi5 (128, 0, argv[0]) != -1)
+ FAIL ();
+ if (test_calloc (2048, 4) != 2048 * 4)
+ FAIL ();
+ if (test_builtin_calloc (2048, 8) != 2048 * 8)
+ FAIL ();
+ if (test_builtin_calloc_cond (0, 0) != 64 * 16)
+ FAIL ();
+ if (test_builtin_calloc_cond (1, 1) != 32 * 1024)
+ FAIL ();
+ if (test_builtin_calloc_condphi (128, 1, 0)
+ != 128 * sizeof (struct { int a; char b; }))
+ FAIL ();
+ if (test_builtin_calloc_condphi (128, 1, 1) != 128)
+ FAIL ();
+ if (test_passthrough (__builtin_strlen (argv[0]) + 1, argv[0])
+ != __builtin_strlen (argv[0]) + 1)
+ FAIL ();
+ if (test_passthrough_nonssa (argv[0]) != __builtin_strlen (argv[0]) + 1)
+ FAIL ();
+ if (test_dynarray (__builtin_strlen (argv[0])) != __builtin_strlen (argv[0]))
+ FAIL ();
+ if (test_dynarray_struct (42, 4) !=
+ ((42 - 4) * sizeof (struct dynarray_struct)
+ - __builtin_offsetof (struct dynarray_struct, c)))
+ FAIL ();
+ if (test_dynarray_struct (42, 48) != 0)
+ FAIL ();
+ if (test_substring (128, 4) != 128 - 4)
+ FAIL ();
+ if (test_substring (128, 142) != 0)
+ FAIL ();
+ if (test_dynarray_struct_subobj (42, 4) != 16 - 4)
+ FAIL ();
+ if (test_dynarray_struct_subobj (42, 48) != 0)
+ FAIL ();
+ size_t objsz = 0;
+ if (test_dynarray_struct_subobj2 (42, 4, &objsz)
+ != objsz - 4 - sizeof (long) - sizeof (int))
+ FAIL ();
+ if (test_substring_ptrplus (128, 4) != (128 - 4) * sizeof (int))
+ FAIL ();
+ if (test_substring_ptrplus (128, 142) != 0)
+ FAIL ();
+ if (test_substring_ptrplus2 (128, 4, 4) != (128 - 8) * sizeof (int))
+ FAIL ();
+ if (test_substring_ptrplus2 (128, 4, -3) != (128 - 1) * sizeof (int))
+ FAIL ();
+ if (test_dynarray_cond (0) != 16)
+ FAIL ();
+ if (test_dynarray_cond (1) != 8)
+ FAIL ();
+ if (test_deploop (128, 4) != 128)
+ FAIL ();
+ if (test_deploop (128, 129) != 32)
+ FAIL ();
+ if (test_parmsz_simple (argv[0], __builtin_strlen (argv[0]) + 1)
+ != __builtin_strlen (argv[0]) + 1)
+ FAIL ();
+ int arr[42];
+ if (test_parmsz_scaled (arr, 42) != sizeof (arr))
+ FAIL ();
+ if (test_parmsz_unknown (argv[0], argv[0], __builtin_strlen (argv[0]) + 1, 0)
+ != -1)
+ if (test_parmsz (argv[0], __builtin_strlen (argv[0]) + 1, -1) != 0)
+ FAIL ();
+ if (test_parmsz (argv[0], __builtin_strlen (argv[0]) + 1, 0)
+ != __builtin_strlen (argv[0]) + 1)
+ FAIL ();
+ if (test_parmsz (argv[0], __builtin_strlen (argv[0]) + 1,
+ __builtin_strlen (argv[0])) != 1)
+ FAIL ();
+ if (test_parmsz (argv[0], __builtin_strlen (argv[0]) + 1,
+ __builtin_strlen (argv[0]) + 2) != 0)
+ FAIL ();
+ if (test_parmsz_scaled_off (arr, 42, 2) != 40 * sizeof (int))
+ FAIL ();
+ if (test_loop (arr, 42, 0, 32, 1) != 10 * sizeof (int))
+ FAIL ();
+ if (test_loop (arr, 42, 32, -1, -1) != 0)
+ FAIL ();
+ if (test_loop (arr, 42, 32, 10, -1) != 32 * sizeof (int))
+ FAIL ();
+ if (test_loop (arr, 42, 42, 0, -1) != 42 * sizeof (int))
+ FAIL ();
+ if (test_loop (arr, 42, 44, 0, -1) != 0)
+ FAIL ();
+ if (test_loop (arr, 42, 20, 52, 1) != 0)
+ FAIL ();
+
+ if (nfails > 0)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-1.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-1.c
new file mode 100644
index 0000000..7cc8b1c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-1.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-1.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-10.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-10.c
new file mode 100644
index 0000000..3a2d982
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-10.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-early_objsz-details" } */
+// { dg-skip-if "packed attribute missing for drone_source_packet" { "epiphany-*-*" } }
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-10.c"
+
+/* early_objsz should resolve __builtin_dynamic_object_size like
+ __builtin_object_size. */
+/* { dg-final { scan-tree-dump "maximum object size 21" "early_objsz" } } */
+/* { dg-final { scan-tree-dump "maximum subobject size 16" "early_objsz" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-11.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-11.c
new file mode 100644
index 0000000..65dcec9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-11.c
@@ -0,0 +1,7 @@
+/* PR48985 */
+/* { dg-do run } */
+/* { dg-options "-std=gnu89" } */
+/* { dg-skip-if "packed attribute missing for struct s" { "epiphany-*-*" } } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-11.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-12.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-12.c
new file mode 100644
index 0000000..f0ce050
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-12.c
@@ -0,0 +1,5 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-12.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-13.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-13.c
new file mode 100644
index 0000000..555e235
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-13.c
@@ -0,0 +1,5 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-13.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-14.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-14.c
new file mode 100644
index 0000000..2620720
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-14.c
@@ -0,0 +1,5 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-14.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-15.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-15.c
new file mode 100644
index 0000000..cd8a941
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-15.c
@@ -0,0 +1,5 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-15.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-16.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-16.c
new file mode 100644
index 0000000..cc77508
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-16.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-options "-O0" } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+char ax2[]; /* { dg-warning "assumed to have one element" } */
+#include "builtin-object-size-16.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-17.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-17.c
new file mode 100644
index 0000000..f5c57a8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-17.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -fdump-tree-ssa" } */
+
+char ax2[]; /* { dg-warning "assumed to have one element" } */
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-17.c"
+/* { dg-final { scan-tree-dump-not "failure_on_line" "ssa" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-18.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-18.c
new file mode 100644
index 0000000..70c1ebc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-18.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* __stpncpy_chk could return buf up to buf + 64, so
+ the minimum object size might be far smaller than 64. */
+/* { dg-final { scan-tree-dump-not "return 64;" "optimized" } } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-18.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-19.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-19.c
new file mode 100644
index 0000000..44141a3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-19.c
@@ -0,0 +1,104 @@
+/* PR tree-optimization/88372 - alloc_size attribute is ignored
+ on function pointers { dg-do compile }
+ { dg-options "-O2 -fdump-tree-optimized" } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-18.c"
+
+typedef __SIZE_TYPE__ size_t;
+
+#define ATTR(...) __attribute__ ((__VA_ARGS__))
+#define CONCAT(x, y) x ## y
+#define CAT(x, y) CONCAT (x, y)
+#define FAILNAME(name) CAT (call_ ## name ##_on_line_, __LINE__)
+
+#define FAIL(name) do { \
+ extern void FAILNAME (name) (void); \
+ FAILNAME (name)(); \
+ } while (0)
+
+/* Macro to emit a call to function named
+ call_in_true_branch_not_eliminated_on_line_NNN()
+ for each call that's expected to be eliminated. The dg-final
+ scan-tree-dump-time directive at the bottom of the test verifies
+ that no such call appears in output. */
+#define ELIM(expr) \
+ if (!(expr)) FAIL (in_true_branch_not_eliminated); else (void)0
+
+void sink (void*);
+
+#define T(alloc, n) do { \
+ void *p = alloc; \
+ sink (p); \
+ ELIM (n == __builtin_object_size (p, 0)); \
+ ELIM (n == __builtin_object_size (p, 1)); \
+ ELIM (n == __builtin_object_size (p, 2)); \
+ ELIM (n == __builtin_object_size (p, 3)); \
+ } while (0)
+
+
+ATTR (alloc_size (1)) void* (*alloc_1_x)(size_t, size_t);
+ATTR (alloc_size (2)) void* (*alloc_x_2)(size_t, size_t);
+
+/* Verify that things work when attribute alloc_size is applied
+ to a typedef that is then used to declared a pointer. */
+typedef ATTR (alloc_size (1, 2)) void* (alloc_1_2_t)(size_t, size_t);
+
+void test_alloc_ptr (alloc_1_2_t *alloc_1_2)
+{
+ T (alloc_1_x (0, 0), 0);
+ T (alloc_1_x (1, 0), 1);
+ T (alloc_1_x (3, 0), 3);
+ T (alloc_1_x (9, 5), 9);
+
+ T (alloc_x_2 (0, 0), 0);
+ T (alloc_x_2 (1, 0), 0);
+ T (alloc_x_2 (0, 1), 1);
+ T (alloc_x_2 (9, 5), 5);
+
+ T (alloc_1_2 (0, 0), 0);
+ T (alloc_1_2 (1, 0), 0);
+ T (alloc_1_2 (0, 1), 0);
+ T (alloc_1_2 (9, 5), 45);
+}
+
+/* Verify that object size is detected even in indirect calls via
+ function pointers to built-in allocation functions, even without
+ explicit use of attribute alloc_size on the pointers. */
+
+typedef void *(allocfn_1) (size_t);
+typedef void *(allocfn_1_2) (size_t, size_t);
+
+static inline void *
+call_alloc (allocfn_1 *fn1, allocfn_1_2 *fn2, size_t n1, size_t n2)
+{
+ return fn1 ? fn1 (n1) : fn2 (n1, n2);
+}
+
+static inline void *
+call_malloc (size_t n)
+{
+ return call_alloc (__builtin_malloc, 0, n, 0);
+}
+
+static inline void *
+call_calloc (size_t n1, size_t n2)
+{
+ return call_alloc (0, __builtin_calloc, n1, n2);
+}
+
+void test_builtin_ptr (void)
+{
+ T (call_malloc (0), 0);
+ T (call_malloc (1), 1);
+ T (call_malloc (9), 9);
+
+ T (call_calloc (0, 0), 0);
+ T (call_calloc (0, 1), 0);
+ T (call_calloc (1, 0), 0);
+ T (call_calloc (1, 1), 1);
+ T (call_calloc (1, 3), 3);
+ T (call_calloc (2, 3), 6);
+}
+
+/* { dg-final { scan-tree-dump-not "not_eliminated" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-2.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-2.c
new file mode 100644
index 0000000..267dbf4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-2.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-2.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-3.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-3.c
new file mode 100644
index 0000000..fb9dc56
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-3.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-3.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-4.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-4.c
new file mode 100644
index 0000000..870548b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-4.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-4.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-5-main.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-5-main.c
new file mode 100644
index 0000000..49f459b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-5-main.c
@@ -0,0 +1,32 @@
+#ifdef N
+typedef __SIZE_TYPE__ size_t;
+
+char buf[N];
+
+void test1 (size_t);
+void test2 (size_t);
+void test3 (size_t);
+void test4 (size_t);
+void test5 (size_t);
+void test6 (size_t);
+void test7 (size_t);
+
+int
+main (void)
+{
+ test1 (42);
+ test2 (42);
+ test3 (42);
+ test4 (42);
+ test5 (42);
+ test6 (42);
+ test7 (42);
+ return 0;
+}
+#else
+int
+main (void)
+{
+ return 0;
+}
+#endif
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-5.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-5.c
new file mode 100644
index 0000000..80b77dd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-5.c
@@ -0,0 +1,6 @@
+/* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } */
+/* { dg-options "-O2 -DN=0x4000000" } */
+/* { dg-additional-sources "builtin-dynamic-object-size-5-main.c" } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-5.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-6.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-6.c
new file mode 100644
index 0000000..6a275ce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-6.c
@@ -0,0 +1,5 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-6.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-7.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-7.c
new file mode 100644
index 0000000..e2a6599
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-7.c
@@ -0,0 +1,5 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-7.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-8.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-8.c
new file mode 100644
index 0000000..e7af383
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-8.c
@@ -0,0 +1,5 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-8.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-9.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-9.c
new file mode 100644
index 0000000..19021bc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-9.c
@@ -0,0 +1,5 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#define __builtin_object_size __builtin_dynamic_object_size
+#include "builtin-object-size-9.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-1.c b/gcc/testsuite/gcc.dg/builtin-object-size-1.c
index 8cdae49..b772e2d 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-1.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-1.c
@@ -42,9 +42,17 @@ test1 (void *q, int x)
abort ();
if (__builtin_object_size (q, 0) != (size_t) -1)
abort ();
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 0)
+ != (x < 0
+ ? sizeof (a) - __builtin_offsetof (struct A, a) - 9
+ : sizeof (a) - __builtin_offsetof (struct A, c) - 1))
+ abort ();
+#else
if (__builtin_object_size (r, 0)
!= sizeof (a) - __builtin_offsetof (struct A, a) - 9)
abort ();
+#endif
if (x < 6)
r = &w[2].a[1];
else
@@ -58,37 +66,71 @@ test1 (void *q, int x)
if (__builtin_object_size (&y.b, 0)
!= sizeof (a) - __builtin_offsetof (struct A, b))
abort ();
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 0)
+ != (x < 6
+ ? 2 * sizeof (w[0]) - __builtin_offsetof (struct A, a) - 1
+ : sizeof (a) - __builtin_offsetof (struct A, a) - 6))
+ abort ();
+#else
if (__builtin_object_size (r, 0)
!= 2 * sizeof (w[0]) - __builtin_offsetof (struct A, a) - 1)
abort ();
+#endif
if (x < 20)
r = malloc (30);
else
r = calloc (2, 16);
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 0) != (x < 20 ? 30 : 2 * 16))
+ abort ();
+#else
/* We may duplicate this test onto the two exit paths. On one path
the size will be 32, the other it will be 30. If we don't duplicate
this test, then the size will be 32. */
if (__builtin_object_size (r, 0) != 2 * 16
&& __builtin_object_size (r, 0) != 30)
abort ();
+#endif
if (x < 20)
r = malloc (30);
else
r = calloc (2, 14);
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 0) != (x < 20 ? 30 : 2 * 14))
+ abort ();
+#else
if (__builtin_object_size (r, 0) != 30)
abort ();
+#endif
if (x < 30)
r = malloc (sizeof (a));
else
r = &a.a[3];
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 0) != (x < 30 ? sizeof (a) : sizeof (a) - 3))
+ abort ();
+#else
if (__builtin_object_size (r, 0) != sizeof (a))
abort ();
+#endif
r = memcpy (r, "a", 2);
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 0) != (x < 30 ? sizeof (a) : sizeof (a) - 3))
+ abort ();
+#else
if (__builtin_object_size (r, 0) != sizeof (a))
abort ();
+#endif
r = memcpy (r + 2, "b", 2) + 2;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 0)
+ != (x < 30 ? sizeof (a) - 4 : sizeof (a) - 7))
+ abort ();
+#else
if (__builtin_object_size (r, 0) != sizeof (a) - 4)
abort ();
+#endif
r = &a.a[4];
r = memset (r, 'a', 2);
if (__builtin_object_size (r, 0)
@@ -119,12 +161,21 @@ test1 (void *q, int x)
abort ();
if (__builtin_object_size (&extb[5], 0) != sizeof (extb) - 5)
abort ();
+#ifdef __builtin_object_size
+ if (__builtin_object_size (var, 0) != x + 10)
+ abort ();
+ if (__builtin_object_size (var + 10, 0) != x)
+ abort ();
+ if (__builtin_object_size (&var[5], 0) != x + 5)
+ abort ();
+#else
if (__builtin_object_size (var, 0) != (size_t) -1)
abort ();
if (__builtin_object_size (var + 10, 0) != (size_t) -1)
abort ();
if (__builtin_object_size (&var[5], 0) != (size_t) -1)
abort ();
+#endif
if (__builtin_object_size (zerol, 0) != 0)
abort ();
if (__builtin_object_size (&zerol, 0) != 0)
@@ -165,6 +216,7 @@ test2 (void)
struct B { char buf1[10]; char buf2[10]; } a;
char *r, buf3[20];
int i;
+ size_t res;
if (sizeof (a) != 20)
return;
@@ -181,7 +233,24 @@ test2 (void)
else if (i == l1 + 2)
r = &a.buf1[9];
}
- if (__builtin_object_size (r, 0) != 20)
+#ifdef __builtin_object_size
+ res = sizeof (buf3);
+
+ for (i = 0; i < 4; ++i)
+ {
+ if (i == l1 - 1)
+ res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 1;
+ else if (i == l1)
+ res = sizeof (a) - __builtin_offsetof (struct B, buf2) - 7;
+ else if (i == l1 + 1)
+ res = sizeof (buf3) - 5;
+ else if (i == l1 + 2)
+ res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 9;
+ }
+#else
+ res = 20;
+#endif
+ if (__builtin_object_size (r, 0) != res)
abort ();
r = &buf3[20];
for (i = 0; i < 4; ++i)
@@ -195,13 +264,45 @@ test2 (void)
else if (i == l1 + 2)
r = &a.buf1[9];
}
- if (__builtin_object_size (r, 0) != 15)
+#ifdef __builtin_object_size
+ res = sizeof (buf3) - 20;
+
+ for (i = 0; i < 4; ++i)
+ {
+ if (i == l1 - 1)
+ res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 7;
+ else if (i == l1)
+ res = sizeof (a) - __builtin_offsetof (struct B, buf2) - 7;
+ else if (i == l1 + 1)
+ res = sizeof (buf3) - 5;
+ else if (i == l1 + 2)
+ res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 9;
+ }
+ if (__builtin_object_size (r, 0) != res)
+ abort ();
+#else
+ res = 15;
+#endif
+ if (__builtin_object_size (r, 0) != res)
abort ();
r += 8;
+#ifdef __builtin_object_size
+ res -= 8;
+ if (__builtin_object_size (r, 0) != res)
+ abort ();
+ if (res >= 6)
+ {
+ if (__builtin_object_size (r + 6, 0) != res - 6)
+ abort ();
+ }
+ else if (__builtin_object_size (r + 6, 0) != 0)
+ abort ();
+#else
if (__builtin_object_size (r, 0) != 7)
abort ();
if (__builtin_object_size (r + 6, 0) != 1)
abort ();
+#endif
r = &buf3[18];
for (i = 0; i < 4; ++i)
{
@@ -214,8 +315,31 @@ test2 (void)
else if (i == l1 + 2)
r = &a.buf1[4];
}
+#ifdef __builtin_object_size
+ res = sizeof (buf3) - 18;
+
+ for (i = 0; i < 4; ++i)
+ {
+ if (i == l1 - 1)
+ res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 9;
+ else if (i == l1)
+ res = sizeof (a) - __builtin_offsetof (struct B, buf2) - 9;
+ else if (i == l1 + 1)
+ res = sizeof (buf3) - 5;
+ else if (i == l1 + 2)
+ res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 4;
+ }
+ if (res >= 12)
+ {
+ if (__builtin_object_size (r + 12, 0) != res - 12)
+ abort ();
+ }
+ else if (__builtin_object_size (r + 12, 0) != 0)
+ abort ();
+#else
if (__builtin_object_size (r + 12, 0) != 4)
abort ();
+#endif
}
void
@@ -358,6 +482,10 @@ test5 (size_t x)
for (i = 0; i < x; ++i)
p = p + 4;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 0) != sizeof (buf) - 8 - 4 * x)
+ abort ();
+#else
/* My understanding of ISO C99 6.5.6 is that a conforming
program will not end up with p equal to &buf[0]
through &buf[7], i.e. calling this function with say
@@ -367,6 +495,7 @@ test5 (size_t x)
it would be 64 (or conservative (size_t) -1 == unknown). */
if (__builtin_object_size (p, 0) != sizeof (buf) - 8)
abort ();
+#endif
memset (p, ' ', sizeof (buf) - 8 - 4 * 4);
}
@@ -380,8 +509,13 @@ test6 (size_t x)
for (i = 0; i < x; ++i)
p = p + 4;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 0) != sizeof (t) - 8 - 4 * x)
+ abort ();
+#else
if (__builtin_object_size (p, 0) != sizeof (t) - 8)
abort ();
+#endif
memset (p, ' ', sizeof (t) - 8 - 4 * 4);
}
@@ -424,6 +558,77 @@ test8 (void)
abort ();
}
+void
+__attribute__ ((noinline))
+test9 (unsigned cond)
+{
+ char *buf2 = malloc (10);
+ char *p;
+
+ if (cond)
+ p = &buf2[8];
+ else
+ p = &buf2[4];
+
+#ifdef __builtin_object_size
+ if (__builtin_object_size (&p[-4], 0) != (cond ? 6 : 10))
+ abort ();
+#else
+ if (__builtin_object_size (&p[-4], 0) != 10)
+ abort ();
+#endif
+
+ for (unsigned i = cond; i > 0; i--)
+ p--;
+
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 0) != ((cond ? 2 : 6) + cond))
+ abort ();
+#else
+ if (__builtin_object_size (p, 0) != 10)
+ abort ();
+#endif
+
+ p = &y.c[8];
+ for (unsigned i = cond; i > 0; i--)
+ p--;
+
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 0)
+ != sizeof (y) - __builtin_offsetof (struct A, c) - 8 + cond)
+ abort ();
+#else
+ if (__builtin_object_size (p, 0) != sizeof (y))
+ abort ();
+#endif
+}
+
+void
+__attribute__ ((noinline))
+test10 (void)
+{
+ static char buf[255];
+ unsigned int i, len = sizeof (buf);
+ char *p = buf;
+
+ for (i = 0 ; i < sizeof (buf) ; i++)
+ {
+ if (len < 2)
+ {
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p - 3, 0) != sizeof (buf) - i + 3)
+ abort ();
+#else
+ if (__builtin_object_size (p - 3, 0) != sizeof (buf))
+ abort ();
+#endif
+ break;
+ }
+ p++;
+ len--;
+ }
+}
+
int
main (void)
{
@@ -437,5 +642,7 @@ main (void)
test6 (4);
test7 ();
test8 ();
+ test9 (1);
+ test10 ();
exit (0);
}
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-16.c b/gcc/testsuite/gcc.dg/builtin-object-size-16.c
index 4822939..f26d5d9 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-16.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-16.c
@@ -54,7 +54,9 @@ static int nfails;
typedef __SIZE_TYPE__ size_t;
extern char ax[];
+#ifndef __builtin_object_size
char ax2[]; /* { dg-warning "assumed to have one element" } */
+#endif
extern char a0[0];
static char a1[1];
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-17.c b/gcc/testsuite/gcc.dg/builtin-object-size-17.c
index 0497bbf..28f8414 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-17.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-17.c
@@ -49,7 +49,9 @@
typedef __SIZE_TYPE__ size_t;
extern char ax[];
+#ifndef __builtin_object_size
char ax2[]; /* { dg-warning "assumed to have one element" } */
+#endif
extern char a0[0];
static char a1[1];
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-2.c b/gcc/testsuite/gcc.dg/builtin-object-size-2.c
index ad2dd29..2729538 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-2.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-2.c
@@ -43,8 +43,15 @@ test1 (void *q, int x)
abort ();
if (__builtin_object_size (q, 1) != (size_t) -1)
abort ();
+#ifdef __builtin_object_size
+ if (x < 0
+ ? __builtin_object_size (r, 1) != sizeof (a.a) - 9
+ : __builtin_object_size (r, 1) != sizeof (a.c) - 1)
+ abort ();
+#else
if (__builtin_object_size (r, 1) != sizeof (a.c) - 1)
abort ();
+#endif
if (x < 6)
r = &w[2].a[1];
else
@@ -55,36 +62,69 @@ test1 (void *q, int x)
abort ();
if (__builtin_object_size (&y.b, 1) != sizeof (a.b))
abort ();
+#ifdef __builtin_object_size
+ if (x < 6
+ ? __builtin_object_size (r, 1) != sizeof (a.a) - 1
+ : __builtin_object_size (r, 1) != sizeof (a.a) - 6)
+ abort ();
+#else
if (__builtin_object_size (r, 1) != sizeof (a.a) - 1)
abort ();
+#endif
if (x < 20)
r = malloc (30);
else
r = calloc (2, 16);
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 1) != (x < 20 ? 30 : 2 * 16))
+ abort ();
+#else
/* We may duplicate this test onto the two exit paths. On one path
the size will be 32, the other it will be 30. If we don't duplicate
this test, then the size will be 32. */
if (__builtin_object_size (r, 1) != 2 * 16
&& __builtin_object_size (r, 1) != 30)
abort ();
+#endif
if (x < 20)
r = malloc (30);
else
r = calloc (2, 14);
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 1) != (x < 20 ? 30 : 2 * 14))
+ abort ();
+#else
if (__builtin_object_size (r, 1) != 30)
abort ();
+#endif
if (x < 30)
r = malloc (sizeof (a));
else
r = &a.a[3];
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 1) != (x < 30 ? sizeof (a) : sizeof (a) - 3))
+ abort ();
+#else
if (__builtin_object_size (r, 1) != sizeof (a))
abort ();
+#endif
r = memcpy (r, "a", 2);
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 1) != (x < 30 ? sizeof (a) : sizeof (a) - 3))
+ abort ();
+#else
if (__builtin_object_size (r, 1) != sizeof (a))
abort ();
+#endif
r = memcpy (r + 2, "b", 2) + 2;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 0)
+ != (x < 30 ? sizeof (a) - 4 : sizeof (a) - 7))
+ abort ();
+#else
if (__builtin_object_size (r, 1) != sizeof (a) - 4)
abort ();
+#endif
r = &a.a[4];
r = memset (r, 'a', 2);
if (__builtin_object_size (r, 1) != sizeof (a.a) - 4)
@@ -123,6 +163,20 @@ test1 (void *q, int x)
abort ();
if (__builtin_object_size (&extc[5].c[3], 1) != (size_t) -1)
abort ();
+#ifdef __builtin_object_size
+ if (__builtin_object_size (var, 1) != x + 10)
+ abort ();
+ if (__builtin_object_size (var + 10, 1) != x)
+ abort ();
+ if (__builtin_object_size (&var[5], 1) != x + 5)
+ abort ();
+ if (__builtin_object_size (vara, 1) != (x + 10) * sizeof (struct A))
+ abort ();
+ if (__builtin_object_size (vara + 10, 1) != x * sizeof (struct A))
+ abort ();
+ if (__builtin_object_size (&vara[5], 1) != (x + 5) * sizeof (struct A))
+ abort ();
+#else
if (__builtin_object_size (var, 1) != (size_t) -1)
abort ();
if (__builtin_object_size (var + 10, 1) != (size_t) -1)
@@ -135,6 +189,7 @@ test1 (void *q, int x)
abort ();
if (__builtin_object_size (&vara[5], 1) != (size_t) -1)
abort ();
+#endif
if (__builtin_object_size (&vara[0].a, 1) != sizeof (vara[0].a))
abort ();
if (__builtin_object_size (&vara[10].a[0], 1) != sizeof (vara[0].a))
@@ -185,6 +240,9 @@ test2 (void)
struct B { char buf1[10]; char buf2[10]; } a;
char *r, buf3[20];
int i;
+#ifdef __builtin_object_size
+ size_t dyn_res;
+#endif
if (sizeof (a) != 20)
return;
@@ -201,8 +259,26 @@ test2 (void)
else if (i == l1 + 2)
r = &a.buf1[9];
}
+#ifdef __builtin_object_size
+ dyn_res = sizeof (buf3);
+
+ for (i = 0; i < 4; ++i)
+ {
+ if (i == l1 - 1)
+ dyn_res = sizeof (a.buf1) - 1;
+ else if (i == l1)
+ dyn_res = sizeof (a.buf2) - 7;
+ else if (i == l1 + 1)
+ dyn_res = sizeof (buf3) - 5;
+ else if (i == l1 + 2)
+ dyn_res = sizeof (a.buf1) - 9;
+ }
+ if (__builtin_object_size (r, 1) != dyn_res)
+ abort ();
+#else
if (__builtin_object_size (r, 1) != sizeof (buf3))
abort ();
+#endif
r = &buf3[20];
for (i = 0; i < 4; ++i)
{
@@ -215,13 +291,50 @@ test2 (void)
else if (i == l1 + 2)
r = &a.buf1[9];
}
+#ifdef __builtin_object_size
+ dyn_res = sizeof (buf3) - 20;
+
+ for (i = 0; i < 4; ++i)
+ {
+ if (i == l1 - 1)
+ dyn_res = sizeof (a.buf1) - 7;
+ else if (i == l1)
+ dyn_res = sizeof (a.buf2) - 7;
+ else if (i == l1 + 1)
+ dyn_res = sizeof (buf3) - 5;
+ else if (i == l1 + 2)
+ dyn_res = sizeof (a.buf1) - 9;
+ }
+ if (__builtin_object_size (r, 1) != dyn_res)
+ abort ();
+#else
if (__builtin_object_size (r, 1) != sizeof (buf3) - 5)
abort ();
+#endif
r += 8;
+#ifdef __builtin_object_size
+ if (dyn_res >= 8)
+ {
+ dyn_res -= 8;
+ if (__builtin_object_size (r, 1) != dyn_res)
+ abort ();
+
+ if (dyn_res >= 6)
+ {
+ if (__builtin_object_size (r + 6, 1) != dyn_res - 6)
+ abort ();
+ }
+ else if (__builtin_object_size (r + 6, 1) != 0)
+ abort ();
+ }
+ else if (__builtin_object_size (r, 1) != 0)
+ abort ();
+#else
if (__builtin_object_size (r, 1) != sizeof (buf3) - 13)
abort ();
if (__builtin_object_size (r + 6, 1) != sizeof (buf3) - 19)
abort ();
+#endif
}
void
@@ -339,8 +452,13 @@ test5 (size_t x)
for (i = 0; i < x; ++i)
p = p + 4;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 1) != sizeof (t.buf) - 8 - 4 * x)
+ abort ();
+#else
if (__builtin_object_size (p, 1) != sizeof (t.buf) - 8)
abort ();
+#endif
memset (p, ' ', sizeof (t.buf) - 8 - 4 * 4);
}
@@ -382,6 +500,50 @@ test7 (void)
abort ();
}
+void
+__attribute__ ((noinline))
+test8 (unsigned cond)
+{
+ char *buf2 = malloc (10);
+ char *p;
+
+ if (cond)
+ p = &buf2[8];
+ else
+ p = &buf2[4];
+
+#ifdef __builtin_object_size
+ if (__builtin_object_size (&p[-4], 1) != (cond ? 6 : 10))
+ abort ();
+#else
+ if (__builtin_object_size (&p[-4], 1) != 10)
+ abort ();
+#endif
+
+ for (unsigned i = cond; i > 0; i--)
+ p--;
+
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 1) != ((cond ? 2 : 6) + cond))
+ abort ();
+#else
+ if (__builtin_object_size (p, 1) != 10)
+ abort ();
+#endif
+
+ p = &y.c[8];
+ for (unsigned i = cond; i > 0; i--)
+ p--;
+
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 1) != sizeof (y.c) - 8 + cond)
+ abort ();
+#else
+ if (__builtin_object_size (p, 1) != sizeof (y.c))
+ abort ();
+#endif
+}
+
int
main (void)
{
@@ -394,5 +556,6 @@ main (void)
test5 (4);
test6 ();
test7 ();
+ test8 (1);
exit (0);
}
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-3.c b/gcc/testsuite/gcc.dg/builtin-object-size-3.c
index d5ca504..44a9918 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-3.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-3.c
@@ -42,9 +42,17 @@ test1 (void *q, int x)
abort ();
if (__builtin_object_size (q, 2) != 0)
abort ();
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 2)
+ != (x < 0
+ ? sizeof (a) - __builtin_offsetof (struct A, a) - 9
+ : sizeof (a) - __builtin_offsetof (struct A, c) - 1))
+ abort ();
+#else
if (__builtin_object_size (r, 2)
!= sizeof (a) - __builtin_offsetof (struct A, c) - 1)
abort ();
+#endif
if (x < 6)
r = &w[2].a[1];
else
@@ -58,36 +66,71 @@ test1 (void *q, int x)
if (__builtin_object_size (&y.b, 2)
!= sizeof (a) - __builtin_offsetof (struct A, b))
abort ();
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 2)
+ != (x < 6
+ ? 2 * sizeof (w[0]) - __builtin_offsetof (struct A, a) - 1
+ : sizeof (a) - __builtin_offsetof (struct A, a) - 6))
+ abort ();
+#else
if (__builtin_object_size (r, 2)
!= sizeof (a) - __builtin_offsetof (struct A, a) - 6)
abort ();
+#endif
if (x < 20)
r = malloc (30);
else
r = calloc (2, 16);
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 2) != (x < 20 ? 30 : 2 * 16))
+ abort ();
+#else
if (__builtin_object_size (r, 2) != 30)
abort ();
+#endif
if (x < 20)
r = malloc (30);
else
r = calloc (2, 14);
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 2) != (x < 20 ? 30 : 2 * 14))
+ abort ();
+#else
if (__builtin_object_size (r, 2) != 2 * 14)
abort ();
+#endif
if (x < 30)
r = malloc (sizeof (a));
else
r = &a.a[3];
+#ifdef __builtin_object_size
+ size_t objsz = (x < 30 ? sizeof (a)
+ : sizeof (a) - __builtin_offsetof (struct A, a) - 3);
+ if (__builtin_object_size (r, 2) != objsz)
+ abort ();
+#else
if (__builtin_object_size (r, 2)
!= sizeof (a) - __builtin_offsetof (struct A, a) - 3)
abort ();
+#endif
r = memcpy (r, "a", 2);
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 2) != objsz)
+ abort ();
+#else
if (__builtin_object_size (r, 2)
!= sizeof (a) - __builtin_offsetof (struct A, a) - 3)
abort ();
+#endif
r = memcpy (r + 2, "b", 2) + 2;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 2) != objsz - 4)
+ abort ();
+#else
if (__builtin_object_size (r, 2)
!= sizeof (a) - __builtin_offsetof (struct A, a) - 3 - 4)
abort ();
+#endif
r = &a.a[4];
r = memset (r, 'a', 2);
if (__builtin_object_size (r, 2)
@@ -118,12 +161,21 @@ test1 (void *q, int x)
abort ();
if (__builtin_object_size (&extb[5], 2) != sizeof (extb) - 5)
abort ();
+#ifdef __builtin_object_size
+ if (__builtin_object_size (var, 2) != x + 10)
+ abort ();
+ if (__builtin_object_size (var + 10, 2) != x)
+ abort ();
+ if (__builtin_object_size (&var[5], 2) != x + 5)
+ abort ();
+#else
if (__builtin_object_size (var, 2) != 0)
abort ();
if (__builtin_object_size (var + 10, 2) != 0)
abort ();
if (__builtin_object_size (&var[5], 2) != 0)
abort ();
+#endif
if (__builtin_object_size (zerol, 2) != 0)
abort ();
if (__builtin_object_size (&zerol, 2) != 0)
@@ -164,6 +216,9 @@ test2 (void)
struct B { char buf1[10]; char buf2[10]; } a;
char *r, buf3[20];
int i;
+#ifdef __builtin_object_size
+ size_t dyn_res;
+#endif
if (sizeof (a) != 20)
return;
@@ -180,8 +235,26 @@ test2 (void)
else if (i == l1 + 2)
r = &a.buf1[9];
}
+#ifdef __builtin_object_size
+ dyn_res = sizeof (buf3);
+
+ for (i = 0; i < 4; ++i)
+ {
+ if (i == l1 - 1)
+ dyn_res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 1;
+ else if (i == l1)
+ dyn_res = sizeof (a) - __builtin_offsetof (struct B, buf2) - 7;
+ else if (i == l1 + 1)
+ dyn_res = sizeof (buf3) - 5;
+ else if (i == l1 + 2)
+ dyn_res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 9;
+ }
+ if (__builtin_object_size (r, 2) != dyn_res)
+ abort ();
+#else
if (__builtin_object_size (r, 2) != 3)
abort ();
+#endif
r = &buf3[20];
for (i = 0; i < 4; ++i)
{
@@ -208,13 +281,44 @@ test2 (void)
else if (i == l1 + 2)
r = &a.buf1[4];
}
+#ifdef __builtin_object_size
+ dyn_res = sizeof (buf3) - 2;
+
+ for (i = 0; i < 4; ++i)
+ {
+ if (i == l1 - 1)
+ dyn_res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 1;
+ else if (i == l1)
+ dyn_res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 2;
+ else if (i == l1 + 1)
+ dyn_res = sizeof (buf3) - 5;
+ else if (i == l1 + 2)
+ dyn_res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 4;
+ }
+ if (__builtin_object_size (r, 2) != dyn_res)
+ abort ();
+#else
if (__builtin_object_size (r, 2) != 15)
abort ();
+#endif
r += 8;
+#ifdef __builtin_object_size
+ dyn_res -= 8;
+ if (__builtin_object_size (r, 2) != dyn_res)
+ abort ();
+ if (dyn_res >= 6)
+ {
+ if (__builtin_object_size (r + 6, 2) != dyn_res - 6)
+ abort ();
+ }
+ else if (__builtin_object_size (r + 6, 2) != 0)
+ abort ();
+#else
if (__builtin_object_size (r, 2) != 7)
abort ();
if (__builtin_object_size (r + 6, 2) != 1)
abort ();
+#endif
r = &buf3[18];
for (i = 0; i < 4; ++i)
{
@@ -227,8 +331,31 @@ test2 (void)
else if (i == l1 + 2)
r = &a.buf1[4];
}
+#ifdef __builtin_object_size
+ dyn_res = sizeof (buf3) - 18;
+
+ for (i = 0; i < 4; ++i)
+ {
+ if (i == l1 - 1)
+ dyn_res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 9;
+ else if (i == l1)
+ dyn_res = sizeof (a) - __builtin_offsetof (struct B, buf2) - 9;
+ else if (i == l1 + 1)
+ dyn_res = sizeof (buf3) - 5;
+ else if (i == l1 + 2)
+ dyn_res = sizeof (a) - __builtin_offsetof (struct B, buf1) - 4;
+ }
+ if (dyn_res >= 12)
+ {
+ if (__builtin_object_size (r + 12, 2) != dyn_res - 12)
+ abort ();
+ }
+ else if (__builtin_object_size (r + 12, 2) != 0)
+ abort ();
+#else
if (__builtin_object_size (r + 12, 2) != 0)
abort ();
+#endif
}
void
@@ -371,7 +498,11 @@ test5 (size_t x)
for (i = 0; i < x; ++i)
p = p + 4;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 2) != sizeof (buf) - 8 - 4 * x)
+#else
if (__builtin_object_size (p, 2) != 0)
+#endif
abort ();
memset (p, ' ', sizeof (buf) - 8 - 4 * 4);
}
@@ -386,7 +517,11 @@ test6 (size_t x)
for (i = 0; i < x; ++i)
p = p + 4;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 2) != sizeof (t) - 8 - 4 * x)
+#else
if (__builtin_object_size (p, 2) != 0)
+#endif
abort ();
memset (p, ' ', sizeof (t) - 8 - 4 * 4);
}
@@ -430,6 +565,77 @@ test8 (void)
abort ();
}
+void
+__attribute__ ((noinline))
+test9 (unsigned cond)
+{
+ char *buf2 = malloc (10);
+ char *p;
+
+ if (cond)
+ p = &buf2[8];
+ else
+ p = &buf2[4];
+
+#ifdef __builtin_object_size
+ if (__builtin_object_size (&p[-4], 2) != (cond ? 6 : 10))
+ abort ();
+#else
+ if (__builtin_object_size (&p[-4], 2) != 0)
+ abort ();
+#endif
+
+ for (unsigned i = cond; i > 0; i--)
+ p--;
+
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 2) != ((cond ? 2 : 6) + cond))
+ abort ();
+#else
+ if (__builtin_object_size (p, 2) != 0)
+ abort ();
+#endif
+
+ p = &y.c[8];
+ for (unsigned i = cond; i > 0; i--)
+ p--;
+
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 2)
+ != sizeof (y) - __builtin_offsetof (struct A, c) - 8 + cond)
+ abort ();
+#else
+ if (__builtin_object_size (p, 2) != 0)
+ abort ();
+#endif
+}
+
+void
+__attribute__ ((noinline))
+test10 (void)
+{
+ static char buf[255];
+ unsigned int i, len = sizeof (buf);
+ char *p = buf;
+
+ for (i = 0 ; i < sizeof (buf) ; i++)
+ {
+ if (len < 2)
+ {
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p - 3, 2) != sizeof (buf) - i + 3)
+ abort ();
+#else
+ if (__builtin_object_size (p - 3, 2) != 0)
+ abort ();
+#endif
+ break;
+ }
+ p++;
+ len--;
+ }
+}
+
int
main (void)
{
@@ -443,5 +649,7 @@ main (void)
test6 (4);
test7 ();
test8 ();
+ test9 (1);
+ test10 ();
exit (0);
}
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-4.c b/gcc/testsuite/gcc.dg/builtin-object-size-4.c
index 9f159e3..b9fddfe 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-4.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-4.c
@@ -43,7 +43,12 @@ test1 (void *q, int x)
abort ();
if (__builtin_object_size (q, 3) != 0)
abort ();
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 3)
+ != (x < 0 ? sizeof (a.a) - 9 : sizeof (a.c) - 1))
+#else
if (__builtin_object_size (r, 3) != sizeof (a.a) - 9)
+#endif
abort ();
if (x < 6)
r = &w[2].a[1];
@@ -55,31 +60,57 @@ test1 (void *q, int x)
abort ();
if (__builtin_object_size (&y.b, 3) != sizeof (a.b))
abort ();
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 3)
+ != (x < 6 ? sizeof (w[2].a) - 1 : sizeof (a.a) - 6))
+#else
if (__builtin_object_size (r, 3) != sizeof (a.a) - 6)
+#endif
abort ();
if (x < 20)
r = malloc (30);
else
r = calloc (2, 16);
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 3) != (x < 20 ? 30 : 2 * 16))
+#else
if (__builtin_object_size (r, 3) != 30)
+#endif
abort ();
if (x < 20)
r = malloc (30);
else
r = calloc (2, 14);
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 3) != (x < 20 ? 30 : 2 * 14))
+#else
if (__builtin_object_size (r, 3) != 2 * 14)
+#endif
abort ();
if (x < 30)
r = malloc (sizeof (a));
else
r = &a.a[3];
+#ifdef __builtin_object_size
+ size_t objsz = x < 30 ? sizeof (a) : sizeof (a.a) - 3;
+ if (__builtin_object_size (r, 3) != objsz)
+#else
if (__builtin_object_size (r, 3) != sizeof (a.a) - 3)
+#endif
abort ();
r = memcpy (r, "a", 2);
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 3) != objsz)
+#else
if (__builtin_object_size (r, 3) != sizeof (a.a) - 3)
+#endif
abort ();
r = memcpy (r + 2, "b", 2) + 2;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 3) != objsz - 4)
+#else
if (__builtin_object_size (r, 3) != sizeof (a.a) - 3 - 4)
+#endif
abort ();
r = &a.a[4];
r = memset (r, 'a', 2);
@@ -119,6 +150,20 @@ test1 (void *q, int x)
abort ();
if (__builtin_object_size (&extc[5].c[3], 3) != 0)
abort ();
+#ifdef __builtin_object_size
+ if (__builtin_object_size (var, 3) != x + 10)
+ abort ();
+ if (__builtin_object_size (var + 10, 3) != x)
+ abort ();
+ if (__builtin_object_size (&var[5], 3) != x + 5)
+ abort ();
+ if (__builtin_object_size (vara, 3) != (x + 10) * sizeof (struct A))
+ abort ();
+ if (__builtin_object_size (vara + 10, 3) != x * sizeof (struct A))
+ abort ();
+ if (__builtin_object_size (&vara[5], 3) != (x + 5) * sizeof (struct A))
+ abort ();
+#else
if (__builtin_object_size (var, 3) != 0)
abort ();
if (__builtin_object_size (var + 10, 3) != 0)
@@ -131,6 +176,7 @@ test1 (void *q, int x)
abort ();
if (__builtin_object_size (&vara[5], 3) != 0)
abort ();
+#endif
if (__builtin_object_size (&vara[0].a, 3) != sizeof (vara[0].a))
abort ();
if (__builtin_object_size (&vara[10].a[0], 3) != sizeof (vara[0].a))
@@ -184,6 +230,9 @@ test2 (void)
struct B { char buf1[10]; char buf2[10]; } a;
char *r, buf3[20];
int i;
+#ifdef __builtin_object_size
+ size_t dyn_res = 0;
+#endif
if (sizeof (a) != 20)
return;
@@ -228,13 +277,38 @@ test2 (void)
else if (i == l1 + 2)
r = &a.buf1[2];
}
+#ifdef __builtin_object_size
+ dyn_res = sizeof (buf3) - 1;
+
+ for (i = 0; i < 4; ++i)
+ {
+ if (i == l1 - 1)
+ dyn_res = sizeof (a.buf1) - 6;
+ else if (i == l1)
+ dyn_res = sizeof (a.buf2) - 4;
+ else if (i == l1 + 1)
+ dyn_res = sizeof (buf3) - 5;
+ else if (i == l1 + 2)
+ dyn_res = sizeof (a.buf1) - 2;
+ }
+ if (__builtin_object_size (r, 3) != dyn_res)
+ abort ();
+#else
if (__builtin_object_size (r, 3) != sizeof (a.buf1) - 6)
abort ();
+#endif
r += 2;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (r, 3) != dyn_res - 2)
+ abort ();
+ if (__builtin_object_size (r + 1, 3) != dyn_res - 3)
+ abort ();
+#else
if (__builtin_object_size (r, 3) != sizeof (a.buf1) - 6 - 2)
abort ();
if (__builtin_object_size (r + 1, 3) != sizeof (a.buf1) - 6 - 3)
abort ();
+#endif
}
void
@@ -352,7 +426,11 @@ test5 (size_t x)
for (i = 0; i < x; ++i)
p = p + 4;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 3) != sizeof (t.buf) - 8 - 4 * x)
+#else
if (__builtin_object_size (p, 3) != 0)
+#endif
abort ();
memset (p, ' ', sizeof (t.buf) - 8 - 4 * 4);
}
@@ -395,6 +473,50 @@ test7 (void)
abort ();
}
+void
+__attribute__ ((noinline))
+test8 (unsigned cond)
+{
+ char *buf2 = malloc (10);
+ char *p;
+
+ if (cond)
+ p = &buf2[8];
+ else
+ p = &buf2[4];
+
+#ifdef __builtin_object_size
+ if (__builtin_object_size (&p[-4], 3) != (cond ? 6 : 10))
+ abort ();
+#else
+ if (__builtin_object_size (&p[-4], 3) != 0)
+ abort ();
+#endif
+
+ for (unsigned i = cond; i > 0; i--)
+ p--;
+
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 3) != ((cond ? 2 : 6) + cond))
+ abort ();
+#else
+ if (__builtin_object_size (p, 3) != 0)
+ abort ();
+#endif
+
+ p = &y.c[8];
+ for (unsigned i = cond; i > 0; i--)
+ p--;
+
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 3) != sizeof (y.c) - 8 + cond)
+ abort ();
+#else
+ if (__builtin_object_size (p, 3) != 0)
+ abort ();
+#endif
+}
+
int
main (void)
{
@@ -407,5 +529,6 @@ main (void)
test5 (4);
test6 ();
test7 ();
+ test8 (1);
exit (0);
}
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-5.c b/gcc/testsuite/gcc.dg/builtin-object-size-5.c
index 7c274cd..d1ad761 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-5.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-5.c
@@ -1,9 +1,13 @@
/* { dg-do compile { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } */
/* { dg-options "-O2" } */
+#ifndef N
+# define N 0x40000000
+#endif
+
typedef __SIZE_TYPE__ size_t;
extern void abort (void);
-extern char buf[0x40000000];
+extern char buf[N];
void
test1 (size_t x)
@@ -13,7 +17,11 @@ test1 (size_t x)
for (i = 0; i < x; ++i)
p = p + 4;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 0) != sizeof (buf) - 8 - 4 * x)
+#else
if (__builtin_object_size (p, 0) != sizeof (buf) - 8)
+#endif
abort ();
}
@@ -25,7 +33,11 @@ test2 (size_t x)
for (i = 0; i < x; ++i)
p = p + 4;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 1) != sizeof (buf) - 8 - 4 * x)
+#else
if (__builtin_object_size (p, 1) != sizeof (buf) - 8)
+#endif
abort ();
}
@@ -37,7 +49,11 @@ test3 (size_t x)
for (i = 0; i < x; ++i)
p = p + 4;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 2) != sizeof (buf) - 8 - 4 * x)
+#else
if (__builtin_object_size (p, 2) != 0)
+#endif
abort ();
}
@@ -49,8 +65,39 @@ test4 (size_t x)
for (i = 0; i < x; ++i)
p = p + 4;
+#ifdef __builtin_object_size
+ if (__builtin_object_size (p, 3) != sizeof (buf) - 8 - 4 * x)
+#else
if (__builtin_object_size (p, 3) != 0)
+#endif
+ abort ();
+}
+
+void
+test5 (void)
+{
+ char *p = &buf[0x90000004];
+ if (__builtin_object_size (p + 2, 0) != 0)
+ abort ();
+}
+
+void
+test6 (void)
+{
+ char *p = &buf[-4];
+ if (__builtin_object_size (p + 2, 0) != 0)
+ abort ();
+}
+
+#ifdef __builtin_object_size
+void
+test7 (void)
+{
+ char *buf2 = __builtin_malloc (8);
+ char *p = &buf2[0x90000004];
+ if (__builtin_object_size (p + 2, 0) != 0)
abort ();
}
+#endif
/* { dg-final { scan-assembler-not "abort" } } */
diff --git a/gcc/testsuite/gcc.dg/charset/charset.exp b/gcc/testsuite/gcc.dg/charset/charset.exp
index a97e79d..51611b3 100644
--- a/gcc/testsuite/gcc.dg/charset/charset.exp
+++ b/gcc/testsuite/gcc.dg/charset/charset.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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/compat.exp b/gcc/testsuite/gcc.dg/compat/compat.exp
index d1c4902..f5b0f3a 100644
--- a/gcc/testsuite/gcc.dg/compat/compat.exp
+++ b/gcc/testsuite/gcc.dg/compat/compat.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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 b685f04..c9d0a29 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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/assembl2.S b/gcc/testsuite/gcc.dg/cpp/assembl2.S
index 00855d3..b3afd39 100644
--- a/gcc/testsuite/gcc.dg/cpp/assembl2.S
+++ b/gcc/testsuite/gcc.dg/cpp/assembl2.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2021 Free Software Foundation, Inc. */
+/* Copyright (C) 2000-2022 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
diff --git a/gcc/testsuite/gcc.dg/cpp/cpp.exp b/gcc/testsuite/gcc.dg/cpp/cpp.exp
index fd1101c..e75c63f 100644
--- a/gcc/testsuite/gcc.dg/cpp/cpp.exp
+++ b/gcc/testsuite/gcc.dg/cpp/cpp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/trad/trad.exp b/gcc/testsuite/gcc.dg/cpp/trad/trad.exp
index 4a6b882..6714673 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/warn-normalized-4-bytes.c b/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c
new file mode 100644
index 0000000..e6e1f3e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c
@@ -0,0 +1,21 @@
+// { dg-do preprocess }
+// { dg-options "-std=gnu99 -Werror=normalized=nfc -fdiagnostics-show-caret -fdiagnostics-escape-format=bytes" }
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
+
+/* གྷ = U+0F43 TIBETAN LETTER GHA, which has decomposition "0F42 0FB7" i.e.
+ U+0F42 TIBETAN LETTER GA: ག
+ U+0FB7 TIBETAN SUBJOINED LETTER HA: ྷ
+
+ The UTF-8 encoding of U+0F43 TIBETAN LETTER GHA is: E0 BD 83. */
+
+foo before_\u0F43_after bar // { dg-error "`before_.U00000f43_after' is not in NFC .-Werror=normalized=." }
+/* { dg-begin-multiline-output "" }
+ foo before_\u0F43_after bar
+ ^~~~~~~~~~~~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+foo before_གྷ_after bar // { dg-error "`before_.U00000f43_after' is not in NFC .-Werror=normalized=." }
+/* { dg-begin-multiline-output "" }
+ foo before_<e0><bd><83>_after bar
+ ^~~~~~~~~~~~~~~~~~~~~~~~~
+ { dg-end-multiline-output "" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c b/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c
new file mode 100644
index 0000000..f9f2f7a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c
@@ -0,0 +1,19 @@
+// { dg-do preprocess }
+// { dg-options "-std=gnu99 -Werror=normalized=nfc -fdiagnostics-show-caret -fdiagnostics-escape-format=unicode" }
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
+
+/* གྷ = U+0F43 TIBETAN LETTER GHA, which has decomposition "0F42 0FB7" i.e.
+ U+0F42 TIBETAN LETTER GA: ག
+ U+0FB7 TIBETAN SUBJOINED LETTER HA: ྷ */
+
+foo before_\u0F43_after bar // { dg-error "`before_.U00000f43_after' is not in NFC .-Werror=normalized=." }
+/* { dg-begin-multiline-output "" }
+ foo before_\u0F43_after bar
+ ^~~~~~~~~~~~~~~~~~~
+ { dg-end-multiline-output "" } */
+
+foo before_གྷ_after bar // { dg-error "`before_.U00000f43_after' is not in NFC .-Werror=normalized=." }
+/* { dg-begin-multiline-output "" }
+ foo before_<U+0F43>_after bar
+ ^~~~~~~~~~~~~~~~~~~~~
+ { dg-end-multiline-output "" } */
diff --git a/gcc/testsuite/gcc.dg/darwin-aligned-globals.c b/gcc/testsuite/gcc.dg/darwin-aligned-globals.c
new file mode 100644
index 0000000..18b71e7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/darwin-aligned-globals.c
@@ -0,0 +1,24 @@
+/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-additional-options "-fcommon" } */
+
+/* Test alignment rules which differ for earlier hosts (so we must
+ work on the principle that this test will be exercised by self-
+ hosted compilers. */
+
+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070
+#define align_OK (1ul << 28)
+#define align_BAD (1ul << 29)
+#else
+#define align_OK (1ul << 15)
+#define align_BAD (1ul << 16)
+#endif
+
+/* All non common vars are allowed larger alignment on modern systems. */
+static int xn __attribute__ ((aligned (align_OK)));
+static int xi __attribute__ ((aligned (align_OK))) = 5 ;
+int gxi __attribute__ ((aligned (align_OK))) = 6 ;
+
+/* test that we detect bad cases. */
+static int yn __attribute__ ((aligned (align_BAD))); /* { dg-error {requested alignment .[0-9]+. exceeds object file maximum} } */
+static int yi __attribute__ ((aligned (align_BAD))) = 5; /* { dg-error {requested alignment .[0-9]+. exceeds object file maximum} } */
+int yni __attribute__ ((aligned (align_BAD))) = 6; /* { dg-error {requested alignment .[0-9]+. exceeds object file maximum} } */
diff --git a/gcc/testsuite/gcc.dg/darwin-comm-1.c b/gcc/testsuite/gcc.dg/darwin-comm-1.c
new file mode 100644
index 0000000..4651998
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/darwin-comm-1.c
@@ -0,0 +1,5 @@
+/* { dg-do compile { target *-*-darwin[912]* } } */
+/* { dg-options "-fcommon" } */
+
+/* In all cases, common has a max alignment of 2^15. */
+int badcommon __attribute__ ((aligned (65536))); /* { dg-error "common variables must have an alignment" } */
diff --git a/gcc/testsuite/gcc.dg/darwin-minversion-link.c b/gcc/testsuite/gcc.dg/darwin-minversion-link.c
index 765fb79..b6ede31 100644
--- a/gcc/testsuite/gcc.dg/darwin-minversion-link.c
+++ b/gcc/testsuite/gcc.dg/darwin-minversion-link.c
@@ -15,7 +15,8 @@
/* { dg-additional-options "-mmacosx-version-min=010.013.06 -DCHECK=101306" { target *-*-darwin17* } } */
/* { dg-additional-options "-mmacosx-version-min=010.014.05 -DCHECK=101405" { target *-*-darwin18* } } */
/* { dg-additional-options "-mmacosx-version-min=010.015.06 -DCHECK=101506" { target *-*-darwin19* } } */
-/* { dg-additional-options "-mmacosx-version-min=011.000.00 -DCHECK=110000" { target *-*-darwin20 } } */
+/* { dg-additional-options "-mmacosx-version-min=011.000.00 -DCHECK=110000" { target *-*-darwin20* } } */
+/* { dg-additional-options "-mmacosx-version-min=012.000.00 -DCHECK=120000" { target *-*-darwin21* } } */
int
main ()
diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c
index f809d93..dbb236b 100644
--- a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c
+++ b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c
@@ -12,6 +12,7 @@
/* { dg-do compile ) */
/* { dg-options "-O0 -gbtf -dA" } */
/* { dg-options "-O0 -gbtf -dA -msdata=none" { target { { powerpc*-*-* } && ilp32 } } } */
+/* { dg-options "-O0 -gbtf -dA -G0" { target { nios2-*-* } } } */
/* Check for two DATASEC entries with vlen 3, and one with vlen 1. */
/* { dg-final { scan-assembler-times "0xf000003\[\t \]+\[^\n\]*btt_info" 2 } } */
diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf.exp b/gcc/testsuite/gcc.dg/debug/btf/btf.exp
index 15593fd..0b2a384 100644
--- a/gcc/testsuite/gcc.dg/debug/btf/btf.exp
+++ b/gcc/testsuite/gcc.dg/debug/btf/btf.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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/ctf/ctf.exp b/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp
index 7ad6723..d9ea481 100644
--- a/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp
+++ b/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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/debug.exp b/gcc/testsuite/gcc.dg/debug/debug.exp
index bc5505e..c65e641 100644
--- a/gcc/testsuite/gcc.dg/debug/debug.exp
+++ b/gcc/testsuite/gcc.dg/debug/debug.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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/dwarf2.exp b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
index bb77397..f29edbd 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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/pr103874.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr103874.c
new file mode 100644
index 0000000..2f0e2d4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr103874.c
@@ -0,0 +1,12 @@
+/* PR debug/103874 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g -gsplit-dwarf -dA -Wno-implicit-function-declaration" } */
+
+void
+foo (void)
+{
+ {
+ bar ();
+ baz ();
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/debug/pr104337.c b/gcc/testsuite/gcc.dg/debug/pr104337.c
new file mode 100644
index 0000000..d15680f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/pr104337.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+struct a {
+ unsigned b : 7;
+};
+inline __attribute__((optimize(3))) __attribute__((always_inline)) struct a
+c() {
+ struct a d;
+ return d;
+}
+void e() {
+ for (;;)
+ c();
+}
+int main() {}
diff --git a/gcc/testsuite/gcc.dg/devnull-dump.c b/gcc/testsuite/gcc.dg/devnull-dump.c
new file mode 100644
index 0000000..378e090
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/devnull-dump.c
@@ -0,0 +1,7 @@
+/* { dg-do assemble } */
+/* { dg-options "-fdump-ipa-clones -o /dev/null" } */
+
+int main()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/dfp/dfp.exp b/gcc/testsuite/gcc.dg/dfp/dfp.exp
index a21bef0..1b17386 100644
--- a/gcc/testsuite/gcc.dg/dfp/dfp.exp
+++ b/gcc/testsuite/gcc.dg/dfp/dfp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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/dg.exp b/gcc/testsuite/gcc.dg/dg.exp
index 9da2507..9c8b0ea 100644
--- a/gcc/testsuite/gcc.dg/dg.exp
+++ b/gcc/testsuite/gcc.dg/dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/encoding-issues-bytes.c b/gcc/testsuite/gcc.dg/encoding-issues-bytes.c
new file mode 100644
index 0000000..d3dc59f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/encoding-issues-bytes.c
Binary files differ
diff --git a/gcc/testsuite/gcc.dg/encoding-issues-unicode.c b/gcc/testsuite/gcc.dg/encoding-issues-unicode.c
new file mode 100644
index 0000000..39f3713
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/encoding-issues-unicode.c
Binary files differ
diff --git a/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp b/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp
index 7ac2347..f37538d 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/fmax-fmin-1.c b/gcc/testsuite/gcc.dg/fmax-fmin-1.c
new file mode 100644
index 0000000..e7e0518
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fmax-fmin-1.c
@@ -0,0 +1,18 @@
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+void
+f1 (double *res, double x, double y)
+{
+ res[0] = __builtin_fmax (x, y);
+ res[1] = __builtin_fmax (y, x);
+}
+
+void
+f2 (double *res, double x, double y)
+{
+ res[0] = __builtin_fmin (x, y);
+ res[1] = __builtin_fmin (y, x);
+}
+
+/* { dg-final { scan-tree-dump-times {__builtin_fmax} 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times {__builtin_fmin} 1 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/fold-condneg-1.c b/gcc/testsuite/gcc.dg/fold-condneg-1.c
new file mode 100644
index 0000000..c4edd74
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-condneg-1.c
@@ -0,0 +1,59 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int test_i0(int x)
+{
+ return x != 0 ? -x : 0;
+}
+
+int test_i1(int x)
+{
+ return x != 1 ? -x : -1;
+}
+
+int test_im1(int x)
+{
+ return x != -1 ? -x : 1;
+}
+
+unsigned int test_u0(unsigned int x)
+{
+ return x != 0 ? -x : 0;
+}
+
+unsigned int test_u1(unsigned int x)
+{
+ return x != 1 ? -x : ~0u;
+}
+
+unsigned int test_um1(unsigned int x)
+{
+ return x != ~0u ? -x : 1;
+}
+
+unsigned char test_uc0(unsigned char x)
+{
+ return x != 0 ? -x : 0;
+}
+
+unsigned char test_uc1(unsigned char x)
+{
+ return x != 1 ? -x : 255;
+}
+
+unsigned char test_uc127(unsigned char x)
+{
+ return x != 127 ? -x : 129;
+}
+
+unsigned char test_uc128(unsigned char x)
+{
+ return x != 128 ? -x : 128;
+}
+
+unsigned char test_uc255(unsigned char x)
+{
+ return x != 255 ? -x : 1;
+}
+
+/* { dg-final { scan-tree-dump-not "goto" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/fold-condneg-2.c b/gcc/testsuite/gcc.dg/fold-condneg-2.c
new file mode 100644
index 0000000..1af2463
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-condneg-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftrapv -fdump-tree-optimized" } */
+
+#define INT_MIN (-__INT_MAX__ - 1)
+
+int test(int x)
+{
+ return x != INT_MIN ? -x : INT_MIN;
+}
+
+/* { dg-final { scan-tree-dump "goto" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/fold-condnot-1.c b/gcc/testsuite/gcc.dg/fold-condnot-1.c
new file mode 100644
index 0000000..75d558c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-condnot-1.c
@@ -0,0 +1,84 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int test_i0(int x)
+{
+ return x != 0 ? ~x : ~0;
+}
+
+int test_i1(int x)
+{
+ return x != 1 ? ~x : -2;
+}
+
+int test_im1(int x)
+{
+ return x != ~0 ? ~x : 0;
+}
+
+unsigned int test_u0(unsigned int x)
+{
+ return x != 0 ? ~x : ~0;
+}
+
+unsigned int test_u1(unsigned int x)
+{
+ return x != 1 ? ~x : ~1u;
+}
+
+unsigned int test_um1(unsigned int x)
+{
+ return x != ~0u ? ~x : 0;
+}
+
+signed char test_c0(signed char x)
+{
+ return x != 0 ? ~x : -1;
+}
+
+signed char test_c1(signed char x)
+{
+ return x != 1 ? ~x : -2;
+}
+
+signed char test_cm1(signed char x)
+{
+ return x != -1 ? ~x : 0;
+}
+
+signed char test_cm128(signed char x)
+{
+ return x != -128 ? ~x : 127;
+}
+
+signed char test_c127(signed char x)
+{
+ return x != 127 ? ~x : -128;
+}
+
+unsigned char test_uc0(unsigned char x)
+{
+ return x != 0 ? ~x : 255;
+}
+
+unsigned char test_uc1(unsigned char x)
+{
+ return x != 1 ? ~x : 254;
+}
+
+unsigned char test_uc127(unsigned char x)
+{
+ return x != 127 ? ~x : 128;
+}
+
+unsigned char test_uc128(unsigned char x)
+{
+ return x != 128 ? ~x : 127;
+}
+
+unsigned char test_ucm1(unsigned char x)
+{
+ return x != 255 ? ~x : 0;
+}
+
+/* { dg-final { scan-tree-dump-not "goto" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/fold-stringops-1.c b/gcc/testsuite/gcc.dg/fold-stringops-1.c
new file mode 100644
index 0000000..e26632a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-stringops-1.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-lower-details" } */
+
+char dst[2048];
+
+char *
+copy1 (const char *src, int cond)
+{
+ __builtin___stpncpy_chk (dst, src, 42, __builtin_object_size (dst, 0));
+
+ return dst;
+}
+
+char *
+copy2 (void)
+{
+ __builtin___stpcpy_chk (dst, "Hello world", __builtin_object_size (dst, 0));
+
+ return dst;
+}
+/* { dg-final { scan-tree-dump "simplified __builtin___stpncpy_chk to __builtin_strncpy" "lower" } } */
+/* { dg-final { scan-tree-dump "simplified __builtin___stpcpy_chk to __builtin_strcpy" "lower" } } */
+
diff --git a/gcc/testsuite/gcc.dg/fold-stringops-2.c b/gcc/testsuite/gcc.dg/fold-stringops-2.c
new file mode 100644
index 0000000..ac7d29e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-stringops-2.c
@@ -0,0 +1,63 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+#define bos(__d) __builtin_object_size ((__d), 0)
+
+char *
+safe1 (const char *src, int cond, size_t len)
+{
+ char *dst;
+
+ if (cond)
+ dst = __builtin_malloc (1024);
+ else
+ dst = __builtin_malloc (2048);
+
+ len = len > 2048 ? 2048 : len;
+
+ return __builtin___memcpy_chk (dst, src, len, bos (dst));
+}
+
+char *
+safe2 (const char *src, int cond, unsigned char len)
+{
+ char *dst;
+
+ if (cond)
+ dst = __builtin_malloc (1024);
+ else
+ dst = __builtin_malloc (2048);
+
+ return __builtin___strncpy_chk (dst, src, len, bos (dst));
+}
+
+int
+safe3 (const char *src, int cond, unsigned char len)
+{
+ char *dst;
+
+ if (cond)
+ dst = __builtin_malloc (1024);
+ else
+ dst = __builtin_malloc (2048);
+
+ return __builtin___snprintf_chk (dst, len, 0, bos (dst), "%s", src);
+}
+
+char dst[1024];
+
+void
+safe4 (size_t len)
+{
+ len = len > sizeof (dst) - 1 ? sizeof (dst) - 1 : len;
+ len = len < sizeof (dst) / 2 ? sizeof (dst) / 2 : len;
+
+ __builtin_strncat (dst, "hello", len);
+}
+
+/* { dg-final { scan-assembler-not "__memcpy_chk" } } */
+/* { dg-final { scan-assembler-not "__strncpy_chk" } } */
+/* { dg-final { scan-assembler-not "__snprintf_chk" } } */
+/* { dg-final { scan-assembler-not "strncat" } } */
diff --git a/gcc/testsuite/gcc.dg/fold-stringops-3.c b/gcc/testsuite/gcc.dg/fold-stringops-3.c
new file mode 100644
index 0000000..ae2efbf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-stringops-3.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+char dst[1024];
+
+void
+safe1 (size_t len)
+{
+ len = len > sizeof (dst) ? sizeof (dst) : len;
+ len = len < sizeof (dst) / 2 ? sizeof (dst) / 2 : len;
+
+ __builtin_snprintf (dst, len, "hello");
+ __builtin_snprintf (dst + 5, len, "%s", " world");
+}
+
+/* { dg-final { scan-assembler-not "snprintf" } } */
diff --git a/gcc/testsuite/gcc.dg/format/format.exp b/gcc/testsuite/gcc.dg/format/format.exp
index a451aa3..dac5d21 100644
--- a/gcc/testsuite/gcc.dg/format/format.exp
+++ b/gcc/testsuite/gcc.dg/format/format.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/gcov-info-to-gcda.c b/gcc/testsuite/gcc.dg/gcov-info-to-gcda.c
index a42a768..4583360 100644
--- a/gcc/testsuite/gcc.dg/gcov-info-to-gcda.c
+++ b/gcc/testsuite/gcc.dg/gcov-info-to-gcda.c
@@ -1,5 +1,4 @@
-/* { dg-do run } */
-/* { dg-skip-if "profile-info-section" { powerpc-ibm-aix* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-fprofile-arcs -fprofile-info-section" } */
#define assert(expr) \
diff --git a/gcc/testsuite/gcc.dg/gimplefe-48.c b/gcc/testsuite/gcc.dg/gimplefe-48.c
new file mode 100644
index 0000000..1399cc9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gimplefe-48.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fgimple -Wno-psabi -w" } */
+/* { dg-additional-options "-mavx2" { target x86_64-*-* i?86-*-* } } */
+
+typedef int v8si __attribute__((vector_size(8*sizeof(int))));
+typedef v8si v8sib __attribute__((vector_mask));
+
+v8si res;
+
+void __GIMPLE (ssa) foo (v8si v1, v8si v2, v8si v3, v8si v4)
+{
+ v8sib tem;
+ v8si resr;
+
+__BB(2):
+ tem_3 = v1_1(D) <= v2_2(D);
+ resr_4 = tem_3 ? v3_5(D) : v4_6(D);
+ res = resr_4;
+ return;
+}
diff --git a/gcc/testsuite/gcc.dg/goacc-gomp/goacc-gomp.exp b/gcc/testsuite/gcc.dg/goacc-gomp/goacc-gomp.exp
index 79e1c2b..2234103 100644
--- a/gcc/testsuite/gcc.dg/goacc-gomp/goacc-gomp.exp
+++ b/gcc/testsuite/gcc.dg/goacc-gomp/goacc-gomp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.dg/goacc/goacc.exp b/gcc/testsuite/gcc.dg/goacc/goacc.exp
index 3c5ecf8..7ebb1d1 100644
--- a/gcc/testsuite/gcc.dg/goacc/goacc.exp
+++ b/gcc/testsuite/gcc.dg/goacc/goacc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.dg/goacc/loop-processing-1.c b/gcc/testsuite/gcc.dg/goacc/loop-processing-1.c
index 78b9aed..f6e2515 100644
--- a/gcc/testsuite/gcc.dg/goacc/loop-processing-1.c
+++ b/gcc/testsuite/gcc.dg/goacc/loop-processing-1.c
@@ -15,4 +15,4 @@ void vector_1 (int *ary, int size)
}
}
-/* { dg-final { scan-tree-dump {OpenACC loops.*Loop 0\(0\).*Loop 24\(1\).*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_HEAD_MARK, 0, 1, 36\);.*Head-0:.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_HEAD_MARK, 0, 1, 36\);.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_FORK, \.data_dep\.[0-9_]+, 0\);.*Tail-0:.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_TAIL_MARK, \.data_dep\.[0-9_]+, 1\);.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_JOIN, \.data_dep\.[0-9_]+, 0\);.*Loop 6\(6\).*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_HEAD_MARK, 0, 2, 6\);.*Head-0:.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_HEAD_MARK, 0, 2, 6\);.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_FORK, \.data_dep\.[0-9_]+, 1\);.*Head-1:.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_HEAD_MARK, \.data_dep\.[0-9_]+, 1\);.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_FORK, \.data_dep\.[0-9_]+, 2\);.*Tail-1:.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_TAIL_MARK, \.data_dep\.[0-9_]+, 2\);.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_JOIN, \.data_dep\.[0-9_]+, 2\);.*Tail-0:.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_TAIL_MARK, \.data_dep\.[0-9_]+, 1\);.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_JOIN, \.data_dep\.[0-9_]+, 1\);} "oaccloops" } } */
+/* { dg-final { scan-tree-dump {OpenACC loops.*Loop 0\(0\).*Loop 44\(1\).*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_HEAD_MARK, 0, 1, 68\);.*Head-0:.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_HEAD_MARK, 0, 1, 68\);.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_FORK, \.data_dep\.[0-9_]+, 0\);.*Tail-0:.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_TAIL_MARK, \.data_dep\.[0-9_]+, 1\);.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_JOIN, \.data_dep\.[0-9_]+, 0\);.*Loop 6\(6\).*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_HEAD_MARK, 0, 2, 6\);.*Head-0:.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_HEAD_MARK, 0, 2, 6\);.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_FORK, \.data_dep\.[0-9_]+, 1\);.*Head-1:.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_HEAD_MARK, \.data_dep\.[0-9_]+, 1\);.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_FORK, \.data_dep\.[0-9_]+, 2\);.*Tail-1:.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_TAIL_MARK, \.data_dep\.[0-9_]+, 2\);.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_JOIN, \.data_dep\.[0-9_]+, 2\);.*Tail-0:.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_TAIL_MARK, \.data_dep\.[0-9_]+, 1\);.*\.data_dep\.[0-9_]+ = \.UNIQUE \(OACC_JOIN, \.data_dep\.[0-9_]+, 1\);} "oaccloops" } } */
diff --git a/gcc/testsuite/gcc.dg/gomp/gomp.exp b/gcc/testsuite/gcc.dg/gomp/gomp.exp
index a79f877..caf66e4 100644
--- a/gcc/testsuite/gcc.dg/gomp/gomp.exp
+++ b/gcc/testsuite/gcc.dg/gomp/gomp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.dg/gomp/target-3.c b/gcc/testsuite/gcc.dg/gomp/target-3.c
new file mode 100644
index 0000000..3e79212
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/target-3.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp -fdump-tree-gimple" } */
+
+struct S
+{
+ int a, b;
+};
+
+void foo (struct S *s)
+{
+ #pragma omp target map (alloc: s->a, s->b)
+ ;
+ #pragma omp target enter data map (alloc: s->a, s->b)
+}
+
+/* { dg-final { scan-tree-dump-times "map\\(struct:\\*s \\\[len: 2\\\]\\) map\\(alloc:s->a \\\[len: \[0-9\]+\\\]\\) map\\(alloc:s->b \\\[len: \[0-9\]+\\\]\\)" 2 "gimple" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/graphite.exp b/gcc/testsuite/gcc.dg/graphite/graphite.exp
index fa8fa6b..1c3c90c 100644
--- a/gcc/testsuite/gcc.dg/graphite/graphite.exp
+++ b/gcc/testsuite/gcc.dg/graphite/graphite.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 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/pr99085.c b/gcc/testsuite/gcc.dg/graphite/pr99085.c
index dc1c935..dd06886 100644
--- a/gcc/testsuite/gcc.dg/graphite/pr99085.c
+++ b/gcc/testsuite/gcc.dg/graphite/pr99085.c
@@ -1,6 +1,7 @@
/* PR target/99085 */
/* { dg-do compile } */
/* { dg-options "-O2 -fgraphite-identity -fsel-sched-pipelining -fselective-scheduling2" } */
+/* { dg-require-effective-target alloca } */
void
foo (int m, int n, int o, int i)
diff --git a/gcc/testsuite/gcc.dg/guality/example.c b/gcc/testsuite/gcc.dg/guality/example.c
index 32014e2b..0d5f48b 100644
--- a/gcc/testsuite/gcc.dg/guality/example.c
+++ b/gcc/testsuite/gcc.dg/guality/example.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "gdb hang" { hppa*-*-linux* } } */
/* { dg-options "-g" } */
/* { dg-do run { xfail { ! aarch64*-*-* } } } */
/* { dg-xfail-run-if "" aarch64*-*-* "*" { "-O[01g]" } } */
diff --git a/gcc/testsuite/gcc.dg/guality/ipa-sra-1.c b/gcc/testsuite/gcc.dg/guality/ipa-sra-1.c
new file mode 100644
index 0000000..9ef4eac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/ipa-sra-1.c
@@ -0,0 +1,45 @@
+/* { dg-do run } */
+/* { dg-options "-g -fno-ipa-icf" } */
+
+
+void __attribute__((noipa))
+use (int x)
+{
+ asm volatile ("" : : "r" (x) : "memory");
+}
+
+static int __attribute__((noinline))
+bar (int i, int k)
+{
+ asm ("" : "+r" (i));
+ use (i); /* { dg-final { gdb-test . "k" "3" { xfail { ! { aarch64*-*-* && { any-opts "-O0" "-O1" "-Og" } } } } } } */
+ return 6;
+}
+
+volatile int v;
+
+static int __attribute__((noinline))
+foo (int i, int k)
+{
+ int r;
+ v = 9;
+ k = (k + 14)/k;
+ r = bar (i, k); /* { dg-final { gdb-test . "k" "3" } } */
+ return r;
+}
+
+volatile int v;
+
+int __attribute__((noipa))
+get_val1 (void) {return 20;}
+int __attribute__((noipa))
+get_val2 (void) {return 7;}
+
+int
+main (void)
+{
+ int k = get_val2 ();
+ int r = foo (get_val1 (), k);
+ v = r + k; /* k has to live accross the call or all is probably lost */
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54519-1.c b/gcc/testsuite/gcc.dg/guality/pr54519-1.c
index 81703eb..5880d9b 100644
--- a/gcc/testsuite/gcc.dg/guality/pr54519-1.c
+++ b/gcc/testsuite/gcc.dg/guality/pr54519-1.c
@@ -18,9 +18,9 @@ fn2 (int x, int y, int z)
fn1 (x); /* { dg-final { gdb-test .+2 "x" "36" } } */
if (x == 36) /* { dg-final { gdb-test .+1 "y" "25" { xfail { aarch64*-*-* && { any-opts "-flto" } } } } } */
fn1 (x); /* { dg-final { gdb-test . "z" "6" { xfail { aarch64*-*-* && { any-opts "-flto" } } } } } */
- fn1 (x); /* { dg-final { gdb-test .+2 "x" "98" } } */
- if (x == 98) /* { dg-final { gdb-test .+1 "y" "117" { xfail { aarch64*-*-* && { any-opts "-flto" } } } } } */
- fn1 (x); /* { dg-final { gdb-test . "z" "8" { xfail { aarch64*-*-* && { any-opts "-flto" } } } } } */
+ fn1 (x); /* { dg-final { gdb-test .+2 "x" "98" { xfail { aarch64*-*-* && { any-opts "-Os" } } } } } */
+ if (x == 98) /* { dg-final { gdb-test .+1 "y" "117" { xfail { aarch64*-*-* && { any-opts "-Os" "-flto" } } } } } */
+ fn1 (x); /* { dg-final { gdb-test . "z" "8" { xfail { aarch64*-*-* && { any-opts "-Os" "-flto" } } } } } */
fn1 (x);
fn1 (x + a);
}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54519-3.c b/gcc/testsuite/gcc.dg/guality/pr54519-3.c
index fabab96..9c18993 100644
--- a/gcc/testsuite/gcc.dg/guality/pr54519-3.c
+++ b/gcc/testsuite/gcc.dg/guality/pr54519-3.c
@@ -18,9 +18,9 @@ fn2 (int x, int y, int z)
fn1 (x); /* { dg-final { gdb-test .+2 "x" "36" } } */
if (x == 36) /* { dg-final { gdb-test .+1 "y" "25" { xfail { aarch64*-*-* && { any-opts "-flto" } } } } } */
fn1 (x); /* { dg-final { gdb-test . "z" "6" { xfail { aarch64*-*-* && { any-opts "-flto" } } } } } */
- fn1 (x); /* { dg-final { gdb-test .+2 "x" "98" } } */
- if (x == 98) /* { dg-final { gdb-test .+1 "y" "117" { xfail { aarch64*-*-* && { any-opts "-flto" } } } } } */
- fn1 (x); /* { dg-final { gdb-test . "z" "8" { xfail { aarch64*-*-* && { any-opts "-flto" } } } } } */
+ fn1 (x); /* { dg-final { gdb-test .+2 "x" "98" { xfail { aarch64*-*-* && { any-opts "-Os" } } } } } */
+ if (x == 98) /* { dg-final { gdb-test .+1 "y" "117" { xfail { aarch64*-*-* && { any-opts "-Os" "-flto" } } } } } */
+ fn1 (x); /* { dg-final { gdb-test . "z" "8" { xfail { aarch64*-*-* && { any-opts "-Os" "-flto" } } } } } */
fn1 (x);
fn1 (x + a);
}
diff --git a/gcc/testsuite/gcc.dg/hwasan/hwasan.exp b/gcc/testsuite/gcc.dg/hwasan/hwasan.exp
index d930b8e..7aae2fa 100644
--- a/gcc/testsuite/gcc.dg/hwasan/hwasan.exp
+++ b/gcc/testsuite/gcc.dg/hwasan/hwasan.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.dg/ifcvt-4.c b/gcc/testsuite/gcc.dg/ifcvt-4.c
index ec142cf..37aa76a 100644
--- a/gcc/testsuite/gcc.dg/ifcvt-4.c
+++ b/gcc/testsuite/gcc.dg/ifcvt-4.c
@@ -2,7 +2,7 @@
/* { dg-additional-options "-misel" { target { powerpc*-*-* } } } */
/* { dg-additional-options "-march=z196" { target { s390x-*-* } } } */
/* { dg-additional-options "-mtune-ctrl=^one_if_conv_insn" { target { i?86-*-* x86_64-*-* } } } */
-/* { dg-skip-if "Multiple set if-conversion not guaranteed on all subtargets" { "arm*-*-* avr-*-* hppa*64*-*-* s390-*-* visium-*-*" riscv*-*-* msp430-*-* } } */
+/* { dg-skip-if "Multiple set if-conversion not guaranteed on all subtargets" { "arm*-*-* avr-*-* hppa*64*-*-* visium-*-*" riscv*-*-* msp430-*-* nios2-*-*} } */
/* { dg-skip-if "" { "s390x-*-*" } { "-m31" } } */
typedef int word __attribute__((mode(word)));
@@ -13,8 +13,7 @@ foo (word x, word y, word a)
word i = x;
word j = y;
/* Try to make taking the branch likely. */
- __builtin_expect (x > y, 1);
- if (x > y)
+ if (__builtin_expect (x > y, 0))
{
i = a;
j = i;
diff --git a/gcc/testsuite/gcc.dg/init-compare-1.c b/gcc/testsuite/gcc.dg/init-compare-1.c
new file mode 100644
index 0000000..6737c85
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/init-compare-1.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fdelete-null-pointer-checks" } */
+
+extern int a, b;
+int c = &a == &a;
+int d = &a != &b;
diff --git a/gcc/testsuite/gcc.dg/init-rounding-math-1.c b/gcc/testsuite/gcc.dg/init-rounding-math-1.c
new file mode 100644
index 0000000..2bece1a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/init-rounding-math-1.c
@@ -0,0 +1,11 @@
+/* Test static initializer folding of implicit conversions to floating point
+ types, even with -frounding-math and related options. Bug 103031. */
+/* { dg-do compile } */
+/* { dg-options "-frounding-math -ftrapping-math -fsignaling-nans" } */
+
+float f1 = -1ULL;
+float f2 = __DBL_MAX__;
+float f3 = __DBL_MIN__;
+float f4 = 0.1;
+float f5 = __builtin_nans ("");
+double d1 = -1ULL;
diff --git a/gcc/testsuite/gcc.dg/ipa/inline-9.c b/gcc/testsuite/gcc.dg/ipa/inline-9.c
index 72ac4aa..347ad55 100644
--- a/gcc/testsuite/gcc.dg/ipa/inline-9.c
+++ b/gcc/testsuite/gcc.dg/ipa/inline-9.c
@@ -20,4 +20,4 @@ main()
for (int i=0;i<100;i++)
test(i);
}
-/* { dg-final { scan-ipa-dump "Inlined 1 calls" "inline" } } */
+/* { dg-final { scan-ipa-dump "Inlined 2 calls" "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/inline10.c b/gcc/testsuite/gcc.dg/ipa/inline10.c
new file mode 100644
index 0000000..81884b4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/inline10.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -c -fdump-ipa-inline-details -fno-early-inlining -fno-partial-inlining" } */
+void link_error ();
+int
+test(int a)
+{
+ if (a>10)
+ {
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ }
+}
+int test2()
+{
+ for (int i=0;i<10;i++)
+ test(i);
+}
+/* { dg-final { scan-ipa-dump "Known to be false: not inlined, op0 > 10" "inline" } } */
+/* { dg-final { scan-ipa-dump "Inlined test" "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-sra-4.c b/gcc/testsuite/gcc.dg/ipa/ipa-sra-4.c
index fdbd5e5..c86ae83 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-sra-4.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-sra-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fipa-sra -fno-ipa-pure-const -fdump-ipa-sra" } */
+/* { dg-options "-O2 -fipa-sra -fno-ipa-pure-const -fdump-ipa-sra -fno-ipa-modref" } */
static int
__attribute__((noinline))
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-sra-ret-nonull.c b/gcc/testsuite/gcc.dg/ipa/ipa-sra-ret-nonull.c
new file mode 100644
index 0000000..18c13ef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-sra-ret-nonull.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-sra-details" } */
+
+volatile void *gp;
+volatile void *gq;
+char buf[16];
+
+__attribute__((returns_nonnull, noinline))
+static char *
+foo (char *p, char *q)
+{
+ gq = q;
+ gp = p;
+ return q;
+}
+
+__attribute__((returns_nonnull, noinline))
+static char *
+bar (char *p, char *q)
+{
+ return foo (p, q) + 8;
+}
+
+__attribute__((noipa))
+static char *
+get_charp (void)
+{
+ return &buf[0];
+}
+
+int
+main ()
+{
+ char *r;
+ asm volatile ("" : : : "memory");
+ r = bar (get_charp (), get_charp ());
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump-times "Will SKIP return." 2 "sra" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa.exp b/gcc/testsuite/gcc.dg/ipa/ipa.exp
index df81fde..e284ad0 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa.exp
+++ b/gcc/testsuite/gcc.dg/ipa/ipa.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/modref-3.c b/gcc/testsuite/gcc.dg/ipa/modref-3.c
new file mode 100644
index 0000000..9a20e01
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/modref-3.c
@@ -0,0 +1,20 @@
+/* { dg-options "-O2 -fdump-ipa-modref" } */
+/* { dg-do link } */
+int *ptr;
+void linker_error ();
+int
+main ()
+{
+ int a;
+ __attribute__((noinline)) int test2 ()
+ {
+ ptr = 0;
+ return a;
+ }
+ a = 1;
+ test2 ();
+ if (a != 1)
+ linker_error ();
+ return 0;
+}
+/* { dg-final { scan-ipa-dump "Static chain flags: no_direct_clobber no_indirect_clobber no_direct_escape no_indirect_escape not_returned_directly no_indirect_read" "modref" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/pr103107.c b/gcc/testsuite/gcc.dg/ipa/pr103107.c
new file mode 100644
index 0000000..3ea3fc5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr103107.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-Og -g -fipa-sra -fno-tree-dce" } */
+
+typedef int __attribute__((__vector_size__ (8))) V;
+V v;
+
+static void
+bar (int i)
+{
+ V l = v + i;
+}
+
+void
+foo (void)
+{
+ bar (0);
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr103132.c b/gcc/testsuite/gcc.dg/ipa/pr103132.c
new file mode 100644
index 0000000..bef5649
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr103132.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+int globus_i_GLOBUS_GRIDFTP_SERVER_debug_handle_1;
+int globus_l_gfs_ipc_unpack_data__sz;
+void globus_i_GLOBUS_GRIDFTP_SERVER_debug_printf(const char *, ...);
+static void globus_l_gfs_ipc_unpack_cred(int len) {
+ if (globus_i_GLOBUS_GRIDFTP_SERVER_debug_handle_1)
+ globus_i_GLOBUS_GRIDFTP_SERVER_debug_printf("", __func__);
+}
+static void globus_l_gfs_ipc_unpack_data(int len) {
+ for (; globus_l_gfs_ipc_unpack_data__sz;)
+ len--;
+ len -= 4;
+ len -= 4;
+ globus_l_gfs_ipc_unpack_cred(len);
+}
+void globus_l_gfs_ipc_reply_read_body_cb(int len)
+{ globus_l_gfs_ipc_unpack_data(len); }
diff --git a/gcc/testsuite/gcc.dg/ipa/pr103227-1.c b/gcc/testsuite/gcc.dg/ipa/pr103227-1.c
new file mode 100644
index 0000000..0f56eb1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr103227-1.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized-slim" } */
+
+struct S
+{
+ int a, b, c;
+};
+
+int ellide (int c);
+
+static void __attribute__ ((noinline))
+foo (struct S *p)
+{
+ int c = p->c;
+ if (c != 21)
+ ellide (c);
+}
+
+void
+entry (void)
+{
+ struct S s;
+ s.a = 1;
+ s.b = 64;
+ s.c = 21;
+ foo (&s);
+}
+
+/* { dg-final { scan-tree-dump-not "ellide" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/pr103227-2.c b/gcc/testsuite/gcc.dg/ipa/pr103227-2.c
new file mode 100644
index 0000000..e4f3c71
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr103227-2.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized-slim" } */
+
+struct S
+{
+ int a, b, c;
+};
+
+int ellide (int c);
+
+static void __attribute__ ((noinline))
+foo (struct S s)
+{
+ int c = s.c;
+ if (c != 21)
+ ellide (c);
+}
+
+void
+entry (void)
+{
+ struct S s;
+ s.a = 1;
+ s.b = 64;
+ s.c = 21;
+ foo (s);
+}
+
+/* { dg-final { scan-tree-dump-not "ellide" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/pr103227-3.c b/gcc/testsuite/gcc.dg/ipa/pr103227-3.c
new file mode 100644
index 0000000..a48026d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr103227-3.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-tree-fre -fno-tree-sra -fdump-tree-optimized-slim" } */
+
+struct S
+{
+ int a, b, c;
+};
+
+volatile int z1;
+int z2 = 44;
+
+void __attribute__((noipa))
+use_int (int c)
+{
+ z1 = c;
+}
+
+static void __attribute__ ((noinline))
+bar (struct S s)
+{
+ use_int (s.c);
+}
+
+
+static void __attribute__ ((noinline))
+foo (struct S s)
+{
+ int c = s.c;
+ if (c != 21)
+ use_int (c);
+
+ s.c = z2;
+ bar (s);
+ if (s.c != 44)
+ __builtin_abort ();
+}
+
+int
+main (void)
+{
+ struct S s;
+ s.a = 1;
+ s.b = 64;
+ s.c = 21;
+ foo (s);
+ return 0;
+}
+
+
+
+
+/* { dg-final { scan-tree-dump-not "ellide" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/pr103601.c b/gcc/testsuite/gcc.dg/ipa/pr103601.c
new file mode 100644
index 0000000..7bdb5e5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr103601.c
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fgnu89-inline" } */
+
+typedef struct { } spinlock_t;
+struct list_head {
+ struct list_head *next, *prev;
+};
+struct __wait_queue_head {
+ spinlock_t lock;
+ struct list_head task_list;
+};
+typedef struct __wait_queue_head wait_queue_head_t;
+static inline void init_waitqueue_head(wait_queue_head_t *q)
+{
+ q->lock = (spinlock_t) { };
+ do { (&q->task_list)->next = (&q->task_list); (&q->task_list)->prev = (&q->task_list); } while (0);
+}
+struct timer_list {
+ void (*function)(unsigned long);
+};
+struct rpc_task {
+ struct timer_list tk_timer;
+ wait_queue_head_t tk_wait;
+};
+static void
+rpc_run_timer(struct rpc_task *task)
+{
+}
+inline void
+rpc_init_task(struct rpc_task *task)
+{
+ task->tk_timer.function = (void (*)(unsigned long)) rpc_run_timer;
+ init_waitqueue_head(&task->tk_wait);
+}
+
diff --git a/gcc/testsuite/gcc.dg/loop-invariant-2.c b/gcc/testsuite/gcc.dg/loop-invariant-2.c
new file mode 100644
index 0000000..df3d845
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/loop-invariant-2.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-loop2_invariant" } */
+
+volatile int x;
+void
+bar (int, char *, char *);
+void
+foo (int *a, int n, int k)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ {
+ if (__builtin_expect (x, 0))
+ bar (k / 5, "one", "two");
+ a[i] = k;
+ }
+}
+
+/* { dg-final { scan-rtl-dump "Don't move invariant from bb: .*out of loop" "loop2_invariant" } } */
diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-1.c b/gcc/testsuite/gcc.dg/loop-unswitch-1.c
index de2fb2c..f9d628d 100644
--- a/gcc/testsuite/gcc.dg/loop-unswitch-1.c
+++ b/gcc/testsuite/gcc.dg/loop-unswitch-1.c
@@ -1,6 +1,6 @@
/* For PR rtl-optimization/27735 */
/* { dg-do compile } */
-/* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-details -fno-finite-loops" } */
+/* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-all -fno-finite-loops" } */
void set_color(void);
void xml_colorize_line(unsigned int *p, int state)
@@ -33,4 +33,4 @@ parse_tag: ;
}
/* Test that we actually unswitched something. */
-/* { dg-final { scan-tree-dump ";; Unswitching loop" "unswitch" } } */
+/* { dg-final { scan-tree-dump "Unswitching loop" "unswitch" } } */
diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-2.c b/gcc/testsuite/gcc.dg/loop-unswitch-2.c
index 0931f6e..e92ae553 100644
--- a/gcc/testsuite/gcc.dg/loop-unswitch-2.c
+++ b/gcc/testsuite/gcc.dg/loop-unswitch-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-details -fdisable-tree-thread2 -fdisable-tree-thread3" } */
+/* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-all -fno-thread-jumps" } */
void foo (float **a, float **b, float *c, int n, int m, int l)
{
@@ -11,6 +11,5 @@ void foo (float **a, float **b, float *c, int n, int m, int l)
c[i] += a[i][k] * b[k][j];
}
-/* { dg-final { scan-tree-dump-times "guard hoisted" 3 "unswitch" } } */
+/* { dg-final { scan-tree-dump-times "Guard hoisted" 3 "unswitch" } } */
/* { dg-final { scan-tree-dump-not "Invalid sum" "unswitch" } } */
-
diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-3.c b/gcc/testsuite/gcc.dg/loop-unswitch-3.c
index 089b610..31a90ef 100644
--- a/gcc/testsuite/gcc.dg/loop-unswitch-3.c
+++ b/gcc/testsuite/gcc.dg/loop-unswitch-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-details" } */
+/* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-all" } */
#include <stdlib.h>
#define N 32
@@ -21,7 +21,4 @@ float *foo(int ustride, int size, float *src)
return buffer;
}
-/* { dg-final { scan-tree-dump-times "guard hoisted" 1 "unswitch" } } */
-/* { dg-final { scan-tree-dump-not "Invalid sum" "unswitch" } } */
-
-
+/* { dg-final { scan-tree-dump-times "Guard hoisted" 1 "unswitch" } } */
diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-4.c b/gcc/testsuite/gcc.dg/loop-unswitch-4.c
index 320a1cd..05d0fe8 100644
--- a/gcc/testsuite/gcc.dg/loop-unswitch-4.c
+++ b/gcc/testsuite/gcc.dg/loop-unswitch-4.c
@@ -49,4 +49,3 @@ int main()
return 0;
}
-
diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-5.c b/gcc/testsuite/gcc.dg/loop-unswitch-5.c
index b41e853..7788000 100644
--- a/gcc/testsuite/gcc.dg/loop-unswitch-5.c
+++ b/gcc/testsuite/gcc.dg/loop-unswitch-5.c
@@ -1,6 +1,6 @@
/* PR middle-end/71691 */
/* { dg-do run } */
-/* { dg-options "-fno-tree-vrp -O2 -funswitch-loops -fdump-tree-unswitch-details" } */
+/* { dg-options "-fno-tree-vrp -O2 -funswitch-loops" } */
/* Note: The -fno-tree-vrp above is only there to avoid VRP papering
over the problem. */
diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-6.c b/gcc/testsuite/gcc.dg/loop-unswitch-6.c
new file mode 100644
index 0000000..36dc31a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/loop-unswitch-6.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -funswitch-loops -g -fdump-tree-unswitch-details" } */
+/* { dg-additional-options "-fcompare-debug" { target { ! powerpc-ibm-aix* } } } */
+
+short a, d;
+int b, c;
+static int e() {
+ int f = -2L, g = 9, h = 0;
+ for (; h < 2; h++)
+ if (a <= 5) {
+ g = 0;
+ if (c && a)
+ break;
+ if (c - 1)
+ goto i;
+ }
+ if (b) {
+ int *j[] = {&f};
+ if (d)
+ for (; f < 9; f++)
+ if (g)
+ for (; f; f++)
+ ;
+ i:
+ while (f) {
+ a--;
+ break;
+ }
+ }
+}
+int main() { e(); }
+
+/* { dg-final { scan-tree-dump-times "Guard hoisted" 1 "unswitch" } } */
diff --git a/gcc/testsuite/gcc.dg/lto/lto.exp b/gcc/testsuite/gcc.dg/lto/lto.exp
index 0ecd24d..afb095e 100644
--- a/gcc/testsuite/gcc.dg/lto/lto.exp
+++ b/gcc/testsuite/gcc.dg/lto/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/modref-3_0.c b/gcc/testsuite/gcc.dg/lto/modref-3_0.c
index bd8f96f..0210d11 100644
--- a/gcc/testsuite/gcc.dg/lto/modref-3_0.c
+++ b/gcc/testsuite/gcc.dg/lto/modref-3_0.c
@@ -14,4 +14,4 @@ main()
__builtin_abort ();
return 0;
}
-/* { dg-final { scan-wpa-ipa-dump "parm 1 flags: nodirectescape" "modref" } } */
+/* { dg-final { scan-wpa-ipa-dump "parm 1 flags: no_direct_clobber no_direct_escape" "modref" } } */
diff --git a/gcc/testsuite/gcc.dg/lto/modref-4_0.c b/gcc/testsuite/gcc.dg/lto/modref-4_0.c
index db90b4f..9437585 100644
--- a/gcc/testsuite/gcc.dg/lto/modref-4_0.c
+++ b/gcc/testsuite/gcc.dg/lto/modref-4_0.c
@@ -14,4 +14,4 @@ main()
__builtin_abort ();
return 0;
}
-/* { dg-final { scan-wpa-ipa-dump "parm 1 flags: nodirectescape" "modref" } } */
+/* { dg-final { scan-wpa-ipa-dump "parm 1 flags: no_direct_clobber no_direct_escape" "modref" } } */
diff --git a/gcc/testsuite/gcc.dg/lto/pr102059-1_0.c b/gcc/testsuite/gcc.dg/lto/pr102059-1_0.c
new file mode 100644
index 0000000..e1004f5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr102059-1_0.c
@@ -0,0 +1,12 @@
+/* { dg-lto-do link } */
+/* { dg-skip-if "power10 and above only" { ! { power10_ok } } } */
+/* -Wno-attributes suppresses always_inline warnings. */
+/* { dg-lto-options { "-O2 -mdejagnu-cpu=power8 -flto -Wno-attributes -mno-power8-fusion" } } */
+
+int __attribute__ ((always_inline))
+foo1 (int *b)
+{
+ *b += 100;
+ return *b;
+}
+
diff --git a/gcc/testsuite/gcc.dg/lto/pr102059-1_1.c b/gcc/testsuite/gcc.dg/lto/pr102059-1_1.c
new file mode 100644
index 0000000..7e31fc7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr102059-1_1.c
@@ -0,0 +1,9 @@
+extern int foo1 (int *b);
+
+int __attribute__ ((always_inline)) foo2 (int *b)
+{
+ int res = foo1 (b);
+ *b += res;
+ return *b;
+}
+
diff --git a/gcc/testsuite/gcc.dg/lto/pr102059-1_2.c b/gcc/testsuite/gcc.dg/lto/pr102059-1_2.c
new file mode 100644
index 0000000..bfa1e62
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr102059-1_2.c
@@ -0,0 +1,11 @@
+extern int foo2 (int *b);
+
+#pragma GCC target "cpu=power10"
+__attribute__ ((always_inline))
+int
+main (int *a)
+{
+ *a = foo2 (a);
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/lto/pr102059-2_0.c b/gcc/testsuite/gcc.dg/lto/pr102059-2_0.c
new file mode 100644
index 0000000..ebb0a7b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr102059-2_0.c
@@ -0,0 +1,12 @@
+/* { dg-lto-do link } */
+/* { dg-skip-if "power10 and above only" { ! { power10_ok } } } */
+/* { dg-lto-options { "-O2 -mdejagnu-cpu=power8 -mno-power8-fusion -flto -fdump-ipa-inline" } } */
+
+int
+foo1 (int *b)
+{
+ *b += 100;
+ return *b;
+}
+
+/* { dg-final { scan-wpa-ipa-dump-not "target specific option mismatch" "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/lto/pr102059-2_1.c b/gcc/testsuite/gcc.dg/lto/pr102059-2_1.c
new file mode 100644
index 0000000..2e5570d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr102059-2_1.c
@@ -0,0 +1,9 @@
+extern int foo1 (int *b);
+
+int foo2 (int *b)
+{
+ int res = foo1 (b);
+ *b += res;
+ return *b;
+}
+
diff --git a/gcc/testsuite/gcc.dg/lto/pr102059-2_2.c b/gcc/testsuite/gcc.dg/lto/pr102059-2_2.c
new file mode 100644
index 0000000..3195170
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr102059-2_2.c
@@ -0,0 +1,10 @@
+extern int foo2 (int *b);
+
+#pragma GCC target "cpu=power10"
+int
+main (int *a)
+{
+ *a = foo2 (a);
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/lto/semantic-interposition-1_0.c b/gcc/testsuite/gcc.dg/lto/semantic-interposition-1_0.c
new file mode 100644
index 0000000..db84274
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/semantic-interposition-1_0.c
@@ -0,0 +1,13 @@
+/* { dg-lto-do link } */
+/* { dg-require-effective-target shared } */
+/* { dg-extra-ld-options { -shared } } */
+/* { dg-lto-options {{-O2 -flto -fpic -fdump-ipa-inline-details --shared}} } */
+extern int ret1();
+
+int
+test()
+{
+ return ret1();
+}
+/* { dg-final { scan-wpa-ipa-dump "Inlined 1 calls" "inline" } } */
+
diff --git a/gcc/testsuite/gcc.dg/lto/semantic-interposition-1_1.c b/gcc/testsuite/gcc.dg/lto/semantic-interposition-1_1.c
new file mode 100644
index 0000000..9a74177
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/semantic-interposition-1_1.c
@@ -0,0 +1,5 @@
+/* { dg-options "-O2 -flto -fpic -fno-semantic-interposition" } */
+int ret1()
+{
+ return 1;
+}
diff --git a/gcc/testsuite/gcc.dg/noncompile/noncompile.exp b/gcc/testsuite/gcc.dg/noncompile/noncompile.exp
index 2ce8c53..cfded6e 100644
--- a/gcc/testsuite/gcc.dg/noncompile/noncompile.exp
+++ b/gcc/testsuite/gcc.dg/noncompile/noncompile.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/old-style-asm-1.c b/gcc/testsuite/gcc.dg/old-style-asm-1.c
index f9406ff0..c8fb668 100644
--- a/gcc/testsuite/gcc.dg/old-style-asm-1.c
+++ b/gcc/testsuite/gcc.dg/old-style-asm-1.c
@@ -1,9 +1,6 @@
/* PR inline-asm/8832 */
/* { dg-do compile } */
-/* { dg-options "-O2 -dP -fdisable-tree-ethread -fdisable-tree-thread1 -fdisable-tree-thread2 -fdisable-tree-thread3 -fdisable-tree-thread4" } */
-
-/* Note: Threader will duplicate BBs and replace one conditional branch by an
- unconditional one. */
+/* { dg-options "-O2 -dP -fno-thread-jumps" } */
/* Verify that GCC doesn't optimize
old style asm instructions. */
diff --git a/gcc/testsuite/gcc.dg/optimize-bswapsi-7.c b/gcc/testsuite/gcc.dg/optimize-bswapsi-7.c
new file mode 100644
index 0000000..1e4db5e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/optimize-bswapsi-7.c
@@ -0,0 +1,37 @@
+/* PR tree-optimization/103376 */
+/* { dg-do compile } */
+/* { dg-require-effective-target bswap } */
+/* { dg-options "-O2 -fno-tree-vectorize -fdump-tree-optimized" } */
+/* { dg-additional-options "-march=z900" { target s390-*-* } } */
+
+static unsigned int
+f1 (unsigned int x)
+{
+ return (x << 24) | (x >> 8);
+}
+
+unsigned int
+f2 (unsigned *p)
+{
+ return ((f1 (p[0]) | (p[0] >> 8)) & 0xff000000U) | (p[0] >> 24) | ((p[0] & 0xff00U) << 8) | ((p[0] & 0xff0000U) >> 8);
+}
+
+unsigned int
+f3 (unsigned *p)
+{
+ return ((f1 (p[0]) | (p[0] & 0x00ff00ffU)) & 0xff00ff00U) | (f1 (f1 (f1 (p[0]))) & 0x00ff00ffU);
+}
+
+unsigned int
+f4 (unsigned *p)
+{
+ return (f1 (p[0]) ^ (p[0] >> 8)) ^ (p[0] >> 24) ^ ((p[0] & 0xff00U) << 8) ^ ((p[0] & 0xff0000U) >> 8);
+}
+
+unsigned int
+f5 (unsigned *p)
+{
+ return (((f1 (p[0]) | (p[0] >> 16)) ^ (p[0] >> 8)) & 0xffff0000U) ^ (p[0] >> 24) ^ ((p[0] & 0xff00U) << 8) ^ ((p[0] & 0xff0000U) >> 8);
+}
+
+/* { dg-final { scan-tree-dump-times "= __builtin_bswap32 \\\(" 4 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/params/params.exp b/gcc/testsuite/gcc.dg/params/params.exp
index 9bd0a0a..8277322 100644
--- a/gcc/testsuite/gcc.dg/params/params.exp
+++ b/gcc/testsuite/gcc.dg/params/params.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2021 Free Software Foundation, Inc.
+# Copyright (C) 2016-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.dg/pch/pch.exp b/gcc/testsuite/gcc.dg/pch/pch.exp
index b32767b..78cc422 100644
--- a/gcc/testsuite/gcc.dg/pch/pch.exp
+++ b/gcc/testsuite/gcc.dg/pch/pch.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/plugin.exp b/gcc/testsuite/gcc.dg/plugin/plugin.exp
index 66a437d..2ade945 100644
--- a/gcc/testsuite/gcc.dg/plugin/plugin.exp
+++ b/gcc/testsuite/gcc.dg/plugin/plugin.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/pr100225.c b/gcc/testsuite/gcc.dg/pr100225.c
index b321634..f0efd29 100644
--- a/gcc/testsuite/gcc.dg/pr100225.c
+++ b/gcc/testsuite/gcc.dg/pr100225.c
@@ -1,6 +1,7 @@
/* PR rtl-optimization/100225 */
/* { dg-do compile } */
/* { dg-options "-O1 -fmodulo-sched" } */
+/* { dg-require-effective-target alloca } */
void
vorbis_synthesis_lapout (void);
diff --git a/gcc/testsuite/gcc.dg/pr100509.c b/gcc/testsuite/gcc.dg/pr100509.c
index 9405e2a..38e7002 100644
--- a/gcc/testsuite/gcc.dg/pr100509.c
+++ b/gcc/testsuite/gcc.dg/pr100509.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O" } */
+/* { dg-require-alias "" } */
struct X {
int a;
diff --git a/gcc/testsuite/gcc.dg/pr100520.c b/gcc/testsuite/gcc.dg/pr100520.c
new file mode 100644
index 0000000..60f79c2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr100520.c
@@ -0,0 +1,5 @@
+/* PR gcov-profile/100520 */
+/* { dg-do compile } */
+/* { dg-options "-fcompare-debug -fprofile-generate" } */
+
+static int f() {}
diff --git a/gcc/testsuite/gcc.dg/pr100843.c b/gcc/testsuite/gcc.dg/pr100843.c
new file mode 100644
index 0000000..695a2ec
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr100843.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -w" } */
+
+char c;
+void *memset();
+void test_integer_conversion_memset(void *d) {
+ memset(d, '\0', c);
+}
diff --git a/gcc/testsuite/gcc.dg/pr101145-1.c b/gcc/testsuite/gcc.dg/pr101145-1.c
new file mode 100644
index 0000000..e6f7923
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr101145-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+unsigned foo(unsigned val, unsigned start)
+{
+ unsigned cnt = 0;
+ for (unsigned i = start; i > val; ++i)
+ cnt++;
+ return cnt;
+}
+
+/* { dg-final { scan-tree-dump "cnt_\[0-9\] = -start_\[0-9\]\\(D\\);" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr101145-2.c b/gcc/testsuite/gcc.dg/pr101145-2.c
new file mode 100644
index 0000000..6ecfeb2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr101145-2.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+unsigned foo(unsigned val, unsigned start)
+{
+ unsigned cnt = 0;
+ unsigned i = start;
+ do {
+ cnt++;
+ i++;
+ } while (i > val);
+ return cnt;
+}
+
+/* { dg-final { scan-tree-dump "cnt_\[0-9\] = start_\[0-9\]\\(D\\) >= val_\[0-9\]\\(D\\) \\? _\[0-9\] : 1;" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr101885.c b/gcc/testsuite/gcc.dg/pr101885.c
new file mode 100644
index 0000000..05fd0ed
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr101885.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+int a = 3, c;
+short b = 5, d, f;
+volatile short e;
+
+__attribute__((noipa)) void
+foo (void)
+{
+}
+
+int
+main ()
+{
+ for (f = 0; f != 2; f++)
+ {
+ int g = a;
+ if (b)
+ if (a)
+ for (a = b = 0; b <= 3; b++)
+ ;
+ for (c = 0; c != 16; ++c)
+ e;
+ }
+ b = d;
+ foo ();
+ if (a != 0)
+ __builtin_abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr102009.c b/gcc/testsuite/gcc.dg/pr102009.c
new file mode 100644
index 0000000..5b3a39b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr102009.c
@@ -0,0 +1,10 @@
+/* PR tree-optimization/102009 */
+/* { dg-do compile } */
+
+void *realloc (); /* { dg-message "declared here" } */
+
+void *
+foo (void *p)
+{
+ return realloc (p); /* { dg-warning "too few arguments to built-in function 'realloc' expecting " } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr102087_1.c b/gcc/testsuite/gcc.dg/pr102087_1.c
new file mode 100644
index 0000000..ba4efe3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr102087_1.c
@@ -0,0 +1,13 @@
+/* PR tree-optimization/102087 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fprefetch-loop-arrays -w" { target x86_64-*-* powerpc*-*-* } } */
+
+char **Gif_ClipImage_gfi_0;
+int Gif_ClipImage_gfi_1, Gif_ClipImage_y, Gif_ClipImage_shift;
+void Gif_ClipImage() {
+ Gif_ClipImage_y = Gif_ClipImage_gfi_1 - 1;
+ for (; Gif_ClipImage_y >= Gif_ClipImage_shift; Gif_ClipImage_y++)
+ Gif_ClipImage_gfi_0[Gif_ClipImage_shift] =
+ Gif_ClipImage_gfi_0[Gif_ClipImage_y];
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr102140.c b/gcc/testsuite/gcc.dg/pr102140.c
new file mode 100644
index 0000000..813ba87
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr102140.c
@@ -0,0 +1,23 @@
+/* PR target/102140 */
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-Og -fipa-cp -fno-tree-ccp -fno-tree-ter -Wno-psabi" } */
+
+typedef int __attribute__((__vector_size__ (64))) U;
+typedef __int128 __attribute__((__vector_size__ (64))) V;
+
+int a, b;
+
+static void
+bar (char c, V v)
+{
+ v *= c;
+ U u = a + (U) v;
+ (union { U b; }) { u };
+ b = 0;
+}
+
+void
+foo (void)
+{
+ bar (1, (V){((__int128) 9223372036854775808ULL) << 64});
+}
diff --git a/gcc/testsuite/gcc.dg/pr102356.c b/gcc/testsuite/gcc.dg/pr102356.c
new file mode 100644
index 0000000..6fce770
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr102356.c
@@ -0,0 +1,33 @@
+/* PR rtl-optimization/102356 */
+/* { dg-do compile { target int32plus } } */
+/* { dg-options "-O3 -g" } */
+
+signed char a = 0;
+unsigned char b = 9;
+unsigned long long c = 0xF1FBFC17225F7A57ULL;
+int d = 0x3A6667C6;
+
+unsigned char
+foo (unsigned int x)
+{
+ unsigned int *e = &x;
+ if ((c /= ((0 * (*e *= b)) <= 0)))
+ ;
+ for (d = 9; d > 2; d -= 2)
+ {
+ c = -2;
+ do
+ if ((*e *= *e))
+ {
+ a = 4;
+ do
+ {
+ a -= 3;
+ if ((*e *= *e))
+ b = 9;
+ }
+ while (a > 2);
+ }
+ while (c++);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr102478.c b/gcc/testsuite/gcc.dg/pr102478.c
new file mode 100644
index 0000000..43bc49b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr102478.c
@@ -0,0 +1,29 @@
+/* PR rtl-optimization/102478 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-if-conversion -Wno-div-by-zero" } */
+
+unsigned a, b, c;
+
+void
+foo (void)
+{
+ c |= __builtin_expect (65535 / a, 0) && 0 / 0;
+ b = 0;
+}
+
+void
+bar (void)
+{
+ if (a <= 65535)
+ __builtin_trap ();
+ b = 0;
+}
+
+void
+baz (void)
+{
+ if (a > 65535)
+ b = 0;
+ else
+ __builtin_trap ();
+}
diff --git a/gcc/testsuite/gcc.dg/pr102648.c b/gcc/testsuite/gcc.dg/pr102648.c
new file mode 100644
index 0000000..a0f6386
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr102648.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+void foo();
+static char a, c;
+static int d, e;
+static short b(short f, short g) { return f * g; }
+int main() {
+ short h = 4;
+ for (; d;)
+ if (h)
+ if(e) {
+ if (!b(a & 1 | h, 3))
+ c = 0;
+ h = 1;
+ }
+ if (c)
+ foo();
+}
+
+/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr102892-1.c b/gcc/testsuite/gcc.dg/pr102892-1.c
new file mode 100644
index 0000000..a9302b5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr102892-1.c
@@ -0,0 +1,21 @@
+/* { dg-do link } */
+/* { dg-options "-O3" } */
+/* { dg-additional-sources "pr102892-2.c" } */
+
+static long b[2][1] = {0};
+
+extern void bar(void);
+extern void foo(void);
+
+int
+main ()
+{
+ long c = 0;
+ for (long a; a < 1; ++a)
+ for (; c <= 1; c++) {
+ bar();
+ if (1 == b[c][0])
+ foo();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr102892-2.c b/gcc/testsuite/gcc.dg/pr102892-2.c
new file mode 100644
index 0000000..b39bd6c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr102892-2.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+void
+bar (void)
+{
+}
diff --git a/gcc/testsuite/gcc.dg/pr102983.c b/gcc/testsuite/gcc.dg/pr102983.c
new file mode 100644
index 0000000..ef58af6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr102983.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-evrp" } */
+void foo(void);
+
+static int a = 1;
+
+int main() {
+ int c = 0;
+ for (int b = 0; b <= 0; b++) {
+ if (!a)
+ foo();
+ if (b > c){
+ if (c)
+ continue;
+ a = 0;
+ }
+ c = 1;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "Folding predicate c_.* to 1" 1 "evrp" } } */
diff --git a/gcc/testsuite/gcc.dg/pr103003.c b/gcc/testsuite/gcc.dg/pr103003.c
new file mode 100644
index 0000000..d3d65f8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103003.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+typedef char int8_t;
+int8_t c_4, uli_5;
+unsigned short us_6;
+void func_1() {
+ int uli_9;
+ short ptr_16ptr_11 = &uli_9; /* { dg-warning "initialization of*" } */
+ for (; us_6 <= 6;)
+ if ((us_6 *= uli_9) < (uli_5 || 0) ?: ((c_4 = us_6) >= us_6) - uli_5)
+ uli_9 = 9;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103028.c b/gcc/testsuite/gcc.dg/pr103028.c
new file mode 100644
index 0000000..df96c62
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103028.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-fif-conversion2 -Og" } */
+/* { dg-options "-fif-conversion2 -Og -march=z9-ec" { target { s390x-*-* } } } */
+
+unsigned char x;
+int foo(void)
+{
+ unsigned long long i = x;
+ i = i + 0x80000000;
+ unsigned long long t = 0xffffffff;
+
+ if (i > t) {
+ unsigned long long ii;
+ asm("":"=g"(ii):"0"(i));
+ if ((ii <= t))
+ __builtin_trap();
+ return x;
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103062.c b/gcc/testsuite/gcc.dg/pr103062.c
new file mode 100644
index 0000000..cbc371b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103062.c
@@ -0,0 +1,7 @@
+// { dg-do compile }
+// { dg-options "-O2 -fno-tree-forwprop" }
+
+void *a, *b, *c;
+void foo(void) {
+ c = (void *)((__INTPTR_TYPE__)a & (__INTPTR_TYPE__)b);
+}
diff --git a/gcc/testsuite/gcc.dg/pr103075.c b/gcc/testsuite/gcc.dg/pr103075.c
new file mode 100644
index 0000000..b332fb0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103075.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O -frounding-math" } */
+
+float
+foo (void)
+{
+ return (float) 0x1699925 * 1.1;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103079.c b/gcc/testsuite/gcc.dg/pr103079.c
new file mode 100644
index 0000000..7f6632f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103079.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -fdump-tree-vrp2" } */
+
+int a, b = -2;
+int main() {
+ int d = 0;
+ int t;
+ if (b)
+ goto t1;
+ if (t) {
+t1:
+ if (!a)
+ d = b;
+ while (d > -1)
+ ;
+ }
+ return 0;
+}
+/* { dg-final { scan-tree-dump "PHI" "vrp2" } } */
+
diff --git a/gcc/testsuite/gcc.dg/pr103093.c b/gcc/testsuite/gcc.dg/pr103093.c
new file mode 100644
index 0000000..f425721
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103093.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int i_0, c_4, uc_7, func_2_c_11;
+
+short *func_2_ptr_10;
+
+void func_2() {
+ uc_7 = 7;
+ for (; uc_7 <= 60; uc_7 += 1) {
+ c_4 = 5;
+ for (; c_4 <= 76; c_4 += 1) {
+ func_2_ptr_10 = &i_0; /* { dg-warning "assignment to .*" } */
+ if ((i_0 |= 5) > 0 ?: (60 && uc_7) | *func_2_ptr_10)
+ if (func_2_c_11)
+ for (;;)
+ ;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr103120.c b/gcc/testsuite/gcc.dg/pr103120.c
new file mode 100644
index 0000000..b680a6c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103120.c
@@ -0,0 +1,33 @@
+// { dg-do run }
+// { dg-options "-O2" }
+
+#define radix 10
+__INT32_TYPE__ numDigits(__UINT64_TYPE__ value)
+{
+ __INT32_TYPE__ n = 1;
+ while (value > __UINT32_MAX__)
+ {
+ n += 4;
+ value /= radix * radix * radix * radix;
+ }
+ __UINT32_TYPE__ v = (__UINT32_TYPE__)value;
+ while (1)
+ {
+ if (v < radix)
+ return n;
+ if (v < radix * radix)
+ return n + 1;
+ if (v < radix * radix * radix)
+ return n + 2;
+ if (v < radix * radix * radix * radix)
+ return n + 3;
+ n += 4;
+ v /= radix * radix * radix * radix;
+ }
+}
+
+int main()
+{
+ if (numDigits(__UINT64_MAX__) != 20)
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/gcc.dg/pr103184-1.c b/gcc/testsuite/gcc.dg/pr103184-1.c
new file mode 100644
index 0000000..e567f95
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103184-1.c
@@ -0,0 +1,43 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+extern char foo;
+extern unsigned char bar;
+
+int
+foo1 (void)
+{
+ return __sync_fetch_and_and (&foo, ~1) & 1;
+}
+
+int
+foo2 (void)
+{
+ return __sync_fetch_and_or (&foo, 1) & 1;
+}
+
+int
+foo3 (void)
+{
+ return __sync_fetch_and_xor (&foo, 1) & 1;
+}
+
+unsigned short
+bar1 (void)
+{
+ return __sync_fetch_and_and (&bar, ~1) & 1;
+}
+
+unsigned short
+bar2 (void)
+{
+ return __sync_fetch_and_or (&bar, 1) & 1;
+}
+
+unsigned short
+bar3 (void)
+{
+ return __sync_fetch_and_xor (&bar, 1) & 1;
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*cmpxchgb" 6 { target { x86_64-*-* i?86-*-* } } } } */
diff --git a/gcc/testsuite/gcc.dg/pr103184-2.c b/gcc/testsuite/gcc.dg/pr103184-2.c
new file mode 100644
index 0000000..499761f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103184-2.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+
+int
+tbit0 (_Atomic int* a, int n)
+{
+#define BIT (0x1 << n)
+ return atomic_fetch_or (a, BIT) & BIT;
+#undef BIT
+}
diff --git a/gcc/testsuite/gcc.dg/pr103207.c b/gcc/testsuite/gcc.dg/pr103207.c
new file mode 100644
index 0000000..69c0f55
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103207.c
@@ -0,0 +1,15 @@
+// { dg-do compile }
+// { dg-options "-O2 --param case-values-threshold=1 -w" }
+
+int f (int i)
+{
+ switch (i) {
+ case 2147483647:
+ return 1;
+ case 9223372036854775807L:
+ return 2;
+ case (2147483647*4)%4:
+ return 4;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103222.c b/gcc/testsuite/gcc.dg/pr103222.c
new file mode 100644
index 0000000..2a84437
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103222.c
@@ -0,0 +1,33 @@
+// { dg-do run }
+// { dg-options "-O2" }
+
+#include <stdint.h>
+#include <stdio.h>
+int16_t a;
+static uint32_t *b ;
+static uint8_t func_2();
+static int32_t func_1() {
+ int16_t a = 1;
+ func_2(0, a, a);
+ return 0;
+}
+uint8_t func_2(uint32_t p1, uint32_t p2, uint32_t p3) {
+ int p = 0;
+ for (15;; a++) {
+ for (0;;) {
+ if (p2)
+ break;
+ b = &p2;
+ return p2;
+ }
+ p3 = (p2 = p3, p);
+ }
+ return 0;
+}
+
+int main() {
+ func_1();
+ if (a != 2)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103248.c b/gcc/testsuite/gcc.dg/pr103248.c
new file mode 100644
index 0000000..da6232d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103248.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target fixed_point } */
+/* { dg-options "-fnon-call-exceptions" } */
+
+_Accum sa;
+int c;
+
+void div_csa() { c /= sa; }
diff --git a/gcc/testsuite/gcc.dg/pr103254.c b/gcc/testsuite/gcc.dg/pr103254.c
new file mode 100644
index 0000000..62d2415
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103254.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-timeout 10 } */
+
+short int i;
+
+void
+foo (void)
+{
+ for (i = 1; i < 2; i += 4)
+ {
+ int j;
+
+ for (j = 0; j < 5; j += 4)
+ {
+ int k;
+
+ for (k = 0; k < 68; k += 4)
+ {
+ i &= j;
+ j &= i;
+ }
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr103268-1.c b/gcc/testsuite/gcc.dg/pr103268-1.c
new file mode 100644
index 0000000..6d583d5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103268-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+extern int si;
+long
+test_types (void)
+{
+ unsigned int u2 = __atomic_fetch_xor (&si, 0, 5);
+ return u2;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103268-2.c b/gcc/testsuite/gcc.dg/pr103268-2.c
new file mode 100644
index 0000000..12283bb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103268-2.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+extern long pscc_a_2_3;
+extern int pscc_a_1_4;
+
+void
+pscc (void)
+{
+ pscc_a_1_4 = __sync_fetch_and_and (&pscc_a_2_3, 1);
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr103270.c b/gcc/testsuite/gcc.dg/pr103270.c
new file mode 100644
index 0000000..819310e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103270.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+
+void test(int a, int* i)
+{
+ for (; a < 5; ++a)
+ {
+ int b = 0;
+ int c = 0;
+ for (; b != -11; b--)
+ for (int d = 0; d ==0; d++)
+ {
+ *i += c & a;
+ c = b;
+ }
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "extra loop exit heuristics of edge\[^:\]*:" "profile_estimate"} } */
diff --git a/gcc/testsuite/gcc.dg/pr103277.c b/gcc/testsuite/gcc.dg/pr103277.c
new file mode 100644
index 0000000..5c206f9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103277.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fbranch-probabilities -fno-ipa-pure-const" } */
+
+__attribute__ ((returns_twice)) void
+bar (void)
+{
+}
+
+void
+foo (int cond)
+{
+ if (cond)
+ bar ();
+} /* { dg-message "profile count data" } */
diff --git a/gcc/testsuite/gcc.dg/pr103359.c b/gcc/testsuite/gcc.dg/pr103359.c
new file mode 100644
index 0000000..13406f9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103359.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-evrp" } */
+
+void foo();
+static char a, c;
+static int d, e;
+static short b(short f, short g) { return f * g; }
+int main() {
+ short h = 4;
+ for (; d;)
+ if (h)
+ if(e) {
+ if (!b(a & 1 | h, 3))
+ c = 0;
+ h = 1;
+ }
+ if (c)
+ foo();
+}
+
+/* { dg-final { scan-tree-dump-not "c = 0" "evrp" } } */
diff --git a/gcc/testsuite/gcc.dg/pr103406.c b/gcc/testsuite/gcc.dg/pr103406.c
new file mode 100644
index 0000000..9c7b83b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103406.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+#define HUGE __DBL_MAX__
+#define INF (HUGE + HUGE)
+#define NAN (INF - INF)
+
+double foo() {
+ double x = -NAN;
+ double y = NAN;
+ return x + y;
+}
+
+/* { dg-final { scan-tree-dump-not "return 0\.0" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr103431.c b/gcc/testsuite/gcc.dg/pr103431.c
new file mode 100644
index 0000000..09f224a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103431.c
@@ -0,0 +1,21 @@
+/* PR middle-end/103431 */
+/* { dg-do run { target int128 } } */
+/* { dg-options "-O -fno-tree-bit-ccp -fno-tree-dominator-opts" } */
+
+__attribute__((noipa))
+void foo (unsigned short a)
+{
+ __uint128_t b = 5;
+ int size = __SIZEOF_INT128__ * __CHAR_BIT__ - 1;
+ a /= 0xfffffffd;
+ __uint128_t c = (b << (a & size) | b >> (-(a & size) & size));
+ if (c != 5)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ foo (0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103440.c b/gcc/testsuite/gcc.dg/pr103440.c
new file mode 100644
index 0000000..b97f45c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103440.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-Os" } */
+/* { dg-timeout 10 } */
+
+int a, b, c, d, e;
+int main() {
+ int f = 2, g = 1, h = -3;
+L1:
+ c = b ^ 1;
+ if (!f)
+ goto L3;
+ if (d)
+ g = e;
+ f = h;
+ if (!c)
+ goto L1;
+L2:
+ if (g)
+ a = 0;
+L3:
+ if (d == g)
+ goto L2;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103451.c b/gcc/testsuite/gcc.dg/pr103451.c
new file mode 100644
index 0000000..c701934
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103451.c
@@ -0,0 +1,19 @@
+// { dg-do compile }
+// { dg-options "-O2 -w -fnon-call-exceptions -fno-delete-dead-exceptions -fdump-tree-optimized" }
+
+int func_10_ptr_12;
+
+void func_10(long li_8)
+{
+ long *ptr_9 = &li_8;
+ li_8 &= *ptr_9 / 0 ?: li_8;
+ for (;;)
+ func_10_ptr_12 &= 4 ? *ptr_9 : 4;
+}
+
+void func_9_s_8()
+{
+ func_10(func_9_s_8);
+}
+
+// { dg-final { scan-tree-dump " / 0" "optimized" } }
diff --git a/gcc/testsuite/gcc.dg/pr103485.c b/gcc/testsuite/gcc.dg/pr103485.c
new file mode 100644
index 0000000..1afa928
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103485.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+
+int foo_v256u128_0;
+unsigned __attribute__((__vector_size__ (sizeof(unsigned) * 8))) foo_v256u8_0;
+
+void
+foo (void)
+{
+ foo_v256u8_0 -= (foo_v256u8_0 >> sizeof (foo_v256u8_0) - 1) + foo_v256u128_0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103587.c b/gcc/testsuite/gcc.dg/pr103587.c
new file mode 100644
index 0000000..1cbc4d5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103587.c
@@ -0,0 +1,7 @@
+/* PR c/103587 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+[[foo::bar(
+#pragma GCC ivdep
+)]]; /* { dg-warning "attribute ignored" } */
diff --git a/gcc/testsuite/gcc.dg/pr103594.c b/gcc/testsuite/gcc.dg/pr103594.c
new file mode 100644
index 0000000..0eae239
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103594.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target fpic } } */
+/* { dg-options "-O1 -fpic" } */
+
+int regex_subst(void)
+{
+ const void *subst = "";
+ return (*(int (*)(int))subst) (0);
+}
+
+int foobar (void)
+{
+ int x;
+ return (*(int (*)(void))&x) ();
+}
diff --git a/gcc/testsuite/gcc.dg/pr103721-2.c b/gcc/testsuite/gcc.dg/pr103721-2.c
new file mode 100644
index 0000000..aefa1f0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103721-2.c
@@ -0,0 +1,28 @@
+// { dg-do run }
+// { dg-options "-O2" }
+
+extern void abort ();
+struct S { int x; } a[10];
+struct S *b;
+
+int
+main ()
+{
+ int i, j = 0;
+ struct S *q = a;
+
+ for (i = 100; --i > 0; )
+ {
+ struct S *p;
+ j++;
+ if (j >= 10)
+ j = 0;
+ p = &a[j];
+
+ if (p == q)
+ abort ();
+ __atomic_thread_fence (__ATOMIC_SEQ_CST);
+ q = p;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103721.c b/gcc/testsuite/gcc.dg/pr103721.c
new file mode 100644
index 0000000..6ec2e44
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103721.c
@@ -0,0 +1,25 @@
+// { dg-do run }
+// { dg-options "-O2" }
+
+int ipos = 0;
+int f (int world)
+{
+ int searchVolume = world;
+ int currentVolume = 0;
+ while (currentVolume != searchVolume && searchVolume) {
+ currentVolume = searchVolume;
+ if (ipos != 0)
+ searchVolume = 0;
+ else
+ searchVolume = 1;
+ }
+ return (currentVolume);
+}
+int main()
+{
+ const int i = f (1111);
+ __builtin_printf ("%d\n", (int)(i));
+ if (i != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103793.c b/gcc/testsuite/gcc.dg/pr103793.c
new file mode 100644
index 0000000..d7ed721
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103793.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-guess-branch-probability" } */
+
+extern void bar (void);
+
+void
+foo (int x, int w)
+{
+ for (int y; y < w; y++)
+ if (y < x)
+ bar ();
+}
diff --git a/gcc/testsuite/gcc.dg/pr103808.c b/gcc/testsuite/gcc.dg/pr103808.c
new file mode 100644
index 0000000..51fc460
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103808.c
@@ -0,0 +1,23 @@
+/* PR debug/103808 */
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-fcompare-debug -O2 -ftrapv" } */
+
+void
+foo (__int128 x, int y)
+{
+ for (;;)
+ {
+ __int128 a, b;
+
+ x |= !!y;
+ a = x + 1;
+ b = y ? ++y : ++x;
+ y = a < b;
+ asm ("" : "+r" (y));
+ if (x >> 2)
+ y *= 2;
+
+ if (y == b)
+ __builtin_unreachable ();
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr103837.c b/gcc/testsuite/gcc.dg/pr103837.c
new file mode 100644
index 0000000..43593d5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103837.c
@@ -0,0 +1,19 @@
+/* PR rtl-optimization/103837 */
+/* { dg-do compile } */
+/* { dg-options "-Og -fcompare-debug -fmove-loop-invariants -fnon-call-exceptions -fexceptions -fdelete-dead-exceptions -fno-tree-dce -w" } */
+
+unsigned long int
+foo (int x)
+{
+ double a;
+ int b;
+ unsigned long int ret = a;
+
+ for (;;)
+ {
+ b = !!((int) a);
+ a = x;
+ }
+
+ return ret;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103838.c b/gcc/testsuite/gcc.dg/pr103838.c
new file mode 100644
index 0000000..cde44e6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103838.c
@@ -0,0 +1,28 @@
+/* PR debug/103838 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug" } */
+
+#ifdef __SIZEOF_INT128__
+__int128 m;
+#else
+long long m;
+#endif
+int n;
+
+__attribute__((noinline)) void
+bar (void)
+{
+ n += !!m;
+}
+
+void
+foo (void)
+{
+ int i;
+
+ for (i = 0; i < 2; ++i)
+ {
+ bar ();
+ m /= 3;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr103860.c b/gcc/testsuite/gcc.dg/pr103860.c
new file mode 100644
index 0000000..15eee55
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103860.c
@@ -0,0 +1,31 @@
+/* PR rtl-optimization/103860 */
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-fPIC" { target fpic } } */
+
+static int d, *e;
+int f;
+
+__attribute__((noinline)) signed char
+foo (signed char b, signed char c)
+{
+ return b + c;
+}
+
+int
+main ()
+{
+ signed char l;
+ for (l = -1; l; l = foo (l, 1))
+ {
+ while (d < 0)
+ ;
+ if (d > 0)
+ {
+ f = 0;
+ *e = 0;
+ }
+ }
+ d = 0;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr103961.c b/gcc/testsuite/gcc.dg/pr103961.c
new file mode 100644
index 0000000..2cd5288
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103961.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+extern void abort ();
+
+extern inline __attribute__ ((__gnu_inline__)) int
+sprintf (char *restrict s, const char *restrict fmt, ...)
+{
+ return __builtin___sprintf_chk (s, 1, __builtin_object_size (s, 1),
+ fmt, __builtin_va_arg_pack ());
+}
+
+void
+cap_to_text (int c)
+{
+ char buf[1572];
+ char *p;
+ int n, t;
+ p = 20 + buf;
+ for (t = 8; t--; )
+ {
+ for (n = 0; n < c; n++)
+ p += sprintf (p, "a,");
+ p--;
+ if (__builtin_object_size (p, 1) == 0)
+ abort ();
+ }
+}
+
+/* { dg-final { scan-assembler-not "abort" } } */
diff --git a/gcc/testsuite/gcc.dg/pr104198.c b/gcc/testsuite/gcc.dg/pr104198.c
new file mode 100644
index 0000000..bfc7a77
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104198.c
@@ -0,0 +1,36 @@
+/* Make sure if conversion for two instructions does not break
+ anything (if it runs). */
+
+/* { dg-do run } */
+/* { dg-options "-O2 -std=c99" } */
+
+#include <limits.h>
+#include <assert.h>
+
+__attribute__ ((noinline))
+int foo (int *a, int n)
+{
+ int min = 999999;
+ int bla = 0;
+ for (int i = 0; i < n; i++)
+ {
+ if (a[i] < min)
+ {
+ min = a[i];
+ bla = 1;
+ }
+ }
+
+ if (bla)
+ min += 1;
+ return min;
+}
+
+int main()
+{
+ int a[] = {2, 1, -13, INT_MAX, INT_MIN, 0};
+
+ int res = foo (a, sizeof (a) / sizeof (a[0]));
+
+ assert (res == (INT_MIN + 1));
+}
diff --git a/gcc/testsuite/gcc.dg/pr104263.c b/gcc/testsuite/gcc.dg/pr104263.c
new file mode 100644
index 0000000..79b548c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104263.c
@@ -0,0 +1,25 @@
+/* PR tree-optimization/104263 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug -fnon-call-exceptions -fno-inline-small-functions" } */
+
+int n;
+
+int
+bar (void)
+{
+ int a;
+
+ n = 0;
+ a = 0;
+
+ return n;
+}
+
+__attribute__ ((pure, returns_twice)) int
+foo (void)
+{
+ n = bar () + 1;
+ foo ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr104288.c b/gcc/testsuite/gcc.dg/pr104288.c
new file mode 100644
index 0000000..95eb196
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104288.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-evrp -fdelete-null-pointer-checks" } */
+/* { dg-skip-if "" { keeps_null_pointer_checks } } */
+
+void keep(int result) __attribute__((noipa));
+void keep(int result)
+{
+ if (result)
+ __builtin_exit(0);
+}
+
+void foo (void *p) __attribute__((nonnull(1)));
+
+void bar (void *p)
+{
+ keep (p == 0);
+ foo (p);
+ if (!p)
+ __builtin_abort ();
+}
+
+/* { dg-final { scan-tree-dump-not "abort" "evrp" } } */
+/* { dg-final { scan-tree-dump-times "== 0B;" 1 "evrp" } } */
diff --git a/gcc/testsuite/gcc.dg/pr104380.c b/gcc/testsuite/gcc.dg/pr104380.c
new file mode 100644
index 0000000..54b2a87
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104380.c
@@ -0,0 +1,32 @@
+/* PR target/104380 */
+/* This test needs runtime that provides __*_chk functions. */
+/* { dg-do run { target *-*-linux* *-*-gnu* *-*-uclinux* } } */
+/* { dg-options "-O2 -std=c99" } */
+
+#define FORTIFY_SOURCE 2
+#include <stdio.h>
+#include <stdarg.h>
+
+static char buf[4096];
+static char gfmt[] = "%Lg";
+
+static int __attribute__ ((noipa))
+foo (char *str, const char *fmt, ...)
+{
+ int ret;
+ va_list ap;
+ va_start (ap, fmt);
+ ret = vsnprintf (str, 4096, fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+int
+main ()
+{
+ long double dval = 128.0L;
+ int ret = foo (buf, gfmt, dval);
+ if (ret != 3 || __builtin_strcmp (buf, "128") != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr104389.c b/gcc/testsuite/gcc.dg/pr104389.c
new file mode 100644
index 0000000..0c6c85a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104389.c
@@ -0,0 +1,26 @@
+/* PR tree-optimization/104389 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-add-options ieee } */
+/* { dg-require-effective-target inf } */
+
+__attribute__((noipa)) double
+foo (void)
+{
+ double a = __builtin_huge_val ();
+ return a * 0.0;
+}
+
+__attribute__((noipa)) long double
+bar (void)
+{
+ return __builtin_huge_vall () * 0.0L;
+}
+
+int
+main ()
+{
+ if (!__builtin_isnan (foo ()) || !__builtin_isnanl (bar ()))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr104420-1.c b/gcc/testsuite/gcc.dg/pr104420-1.c
new file mode 100644
index 0000000..48385fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104420-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-add-options ieee } */
+
+double f(int a)
+{
+ return a * 0.0;
+}
+
+/* { dg-final { scan-tree-dump " \\\* 0.0" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr104420-2.c b/gcc/testsuite/gcc.dg/pr104420-2.c
new file mode 100644
index 0000000..49d0189
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104420-2.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-add-options ieee } */
+
+double f(int a)
+{
+ return a * -0.0;
+}
+
+/* { dg-final { scan-tree-dump " \\\* -0.0" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr104420-3.c b/gcc/testsuite/gcc.dg/pr104420-3.c
new file mode 100644
index 0000000..962dfff
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104420-3.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-add-options ieee } */
+
+double f(unsigned int a)
+{
+ return a * 0.0;
+}
+
+/* { dg-final { scan-tree-dump "return 0.0" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr104420-4.c b/gcc/testsuite/gcc.dg/pr104420-4.c
new file mode 100644
index 0000000..95ed0cc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104420-4.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-add-options ieee } */
+
+double f(unsigned int a)
+{
+ return a * -0.0;
+}
+
+/* { dg-final { scan-tree-dump "return -0.0" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr104427.c b/gcc/testsuite/gcc.dg/pr104427.c
new file mode 100644
index 0000000..397cb13
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104427.c
@@ -0,0 +1,13 @@
+/* PR c/104427 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+/* { dg-add-options float16 } */
+/* { dg-require-effective-target float16 } */
+
+_Float16 x, y;
+
+int
+foo ()
+{
+ return __builtin_assoc_barrier (x + y) - y;
+}
diff --git a/gcc/testsuite/gcc.dg/pr104459.c b/gcc/testsuite/gcc.dg/pr104459.c
new file mode 100644
index 0000000..de8a643
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104459.c
@@ -0,0 +1,38 @@
+/* PR rtl-optimization/104459 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -funswitch-loops -fno-tree-dce -fcompare-debug -w" } */
+
+void
+foo (int x, int y)
+{
+ unsigned int a;
+
+ for (;;)
+ {
+ short int *p = (short int *) &x;
+ unsigned int q = 0;
+
+ a /= 2;
+ if (a)
+ {
+ q -= y;
+ while (q)
+ ;
+ }
+
+ if (x)
+ {
+ for (q = 0; q != 1; q += 2)
+ {
+ unsigned int n;
+
+ n = *p ? 0 : q;
+ y += n < 1;
+
+ n = a || *p;
+ if (n % x == 0)
+ y /= x;
+ }
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr104464.c b/gcc/testsuite/gcc.dg/pr104464.c
new file mode 100644
index 0000000..ed6a22c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104464.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fnon-call-exceptions -fno-tree-dce -fno-tree-forwprop -fsignaling-nans" } */
+
+typedef double __attribute__((__vector_size__(16))) F;
+F f;
+
+void
+foo(void)
+{
+ f += (F)(f != (F){}[0]);
+}
diff --git a/gcc/testsuite/gcc.dg/pr25530.c b/gcc/testsuite/gcc.dg/pr25530.c
index b846ab3..771b36b9 100644
--- a/gcc/testsuite/gcc.dg/pr25530.c
+++ b/gcc/testsuite/gcc.dg/pr25530.c
@@ -8,4 +8,4 @@ f (unsigned t)
return (t / 2) * 2;
}
-/* { dg-final { scan-tree-dump "\& -2" "optimized" } } */
+/* { dg-final { scan-tree-dump "\& -2|4294967294" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr83072-2.c b/gcc/testsuite/gcc.dg/pr83072-2.c
new file mode 100644
index 0000000..f495f25
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr83072-2.c
@@ -0,0 +1,18 @@
+/* { dg-do compile} */
+/* { dg-options "-O2 -fdump-tree-evrp-details" } */
+
+int f1(int a, int b, int c){
+ if(c==0)__builtin_unreachable();
+ a *= c;
+ b *= c;
+ return a == b;
+}
+
+int f2(int a, int b, int c){
+ c |= 1;
+ a *= c;
+ b *= c;
+ return a == b;
+}
+
+/* { dg-final { scan-tree-dump-times "gimple_simplified to" 2 "evrp" } } */
diff --git a/gcc/testsuite/gcc.dg/pr83073.c b/gcc/testsuite/gcc.dg/pr83073.c
new file mode 100644
index 0000000..1168ae82
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr83073.c
@@ -0,0 +1,10 @@
+/* { dg-do compile} */
+/* { dg-options "-O2 -fdump-tree-evrp-details -fno-tree-fre -fno-tree-ccp -fno-tree-forwprop" } */
+
+int f(int x)
+{
+ x = x|1;
+ return x & 1;
+}
+
+/* { dg-final { scan-tree-dump "gimple_simplified to.* = 1" "evrp" } } */
diff --git a/gcc/testsuite/gcc.dg/pr87052.c b/gcc/testsuite/gcc.dg/pr87052.c
index 2affc48..18e092c 100644
--- a/gcc/testsuite/gcc.dg/pr87052.c
+++ b/gcc/testsuite/gcc.dg/pr87052.c
@@ -38,4 +38,4 @@ void test (void)
{ dg-final { scan-tree-dump-times "c = \"\";" 1 "gimple" } }
{ dg-final { scan-tree-dump-times "d = { *};" 1 "gimple" } }
{ dg-final { scan-tree-dump-times "e = " 1 "gimple" } }
- { dg-final { scan-tree-dump-times "e = {CLOBBER}" 1 "gimple" } } */
+ { dg-final { scan-tree-dump-times "e = {CLOBBER\\(eol\\)}" 1 "gimple" } } */
diff --git a/gcc/testsuite/gcc.dg/pr95115.c b/gcc/testsuite/gcc.dg/pr95115.c
new file mode 100644
index 0000000..46a95df
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr95115.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftrapping-math" } */
+/* { dg-add-options ieee } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+double
+x (void)
+{
+ double d = __builtin_inf ();
+ return d / d;
+}
+
+int
+main (void)
+{
+ double r = x ();
+ if (!__builtin_isnan (r))
+ abort ();
+ if (!fetestexcept (FE_INVALID))
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr96392.c b/gcc/testsuite/gcc.dg/pr96392.c
index 662bacb..fb7de21 100644
--- a/gcc/testsuite/gcc.dg/pr96392.c
+++ b/gcc/testsuite/gcc.dg/pr96392.c
@@ -12,11 +12,6 @@ double sub0(int x)
return x - 0.0;
}
-double mult0(int x)
-{
- return 0.0 * x;
-}
-
double negate(int x)
{
return 0.0 - x;
@@ -29,5 +24,4 @@ double subtract(int x)
/* { dg-final { scan-tree-dump-not " \\+ " "optimized" } } */
/* { dg-final { scan-tree-dump-not " \\- " "optimized" } } */
-/* { dg-final { scan-tree-dump-not " \\* " "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr98721-1.c b/gcc/testsuite/gcc.dg/pr98721-1.c
index 868b071..1c7574f 100644
--- a/gcc/testsuite/gcc.dg/pr98721-1.c
+++ b/gcc/testsuite/gcc.dg/pr98721-1.c
@@ -1,6 +1,7 @@
/* PR tree-optimization/98721 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
int
foo (int n)
diff --git a/gcc/testsuite/gcc.dg/pr99122-2.c b/gcc/testsuite/gcc.dg/pr99122-2.c
index 2b10542..c0c850f 100644
--- a/gcc/testsuite/gcc.dg/pr99122-2.c
+++ b/gcc/testsuite/gcc.dg/pr99122-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -g -w" } */
+/* { dg-require-effective-target alloca } */
static int foo ();
diff --git a/gcc/testsuite/gcc.dg/pragma-diag-10.c b/gcc/testsuite/gcc.dg/pragma-diag-10.c
index 127b299..a1637be 100644
--- a/gcc/testsuite/gcc.dg/pragma-diag-10.c
+++ b/gcc/testsuite/gcc.dg/pragma-diag-10.c
@@ -1,7 +1,8 @@
/* PR middle-end/98512 - #pragma GCC diagnostic ignored ineffective
in conjunction with alias attribute
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-alias "" } */
void *
__rawmemchr_ppc (const void *s, int c)
diff --git a/gcc/testsuite/gcc.dg/rtl/aarch64/big-endian-cse-1.c b/gcc/testsuite/gcc.dg/rtl/aarch64/big-endian-cse-1.c
new file mode 100644
index 0000000..1559a48
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/rtl/aarch64/big-endian-cse-1.c
@@ -0,0 +1,42 @@
+/* { dg-do compile { target aarch64*-*-* } } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O3 -mbig-endian" } */
+
+void __RTL (startwith ("vregs")) foo (void *ptr1, void *ptr2)
+{
+ (function "foo"
+ (param "ptr1"
+ (DECL_RTL (reg/v:DI <0> [ ptr1 ]))
+ (DECL_RTL_INCOMING (reg:DI x0 [ ptr1 ]))
+ ) ;; param "ptr1"
+ (param "ptr2"
+ (DECL_RTL (reg/v:DI <1> [ ptr2 ]))
+ (DECL_RTL_INCOMING (reg:DI x1 [ ptr2 ]))
+ ) ;; param "ptr2"
+ (insn-chain
+ (block 2
+ (edge-from entry (flags "FALLTHRU"))
+ (cnote 3 [bb 2] NOTE_INSN_BASIC_BLOCK)
+ (insn 4 (set (reg:DI <0>) (reg:DI x0)))
+ (insn 5 (set (reg:DI <1>) (reg:DI x1)))
+ (insn 6 (set (reg:V2SI <2>)
+ (const_vector:V2SI [(const_int 1)
+ (const_int 0)])) (nil))
+ (insn 7 (set (mem:V2SI (reg:DI <0>) [1 ptr1+0 S8 A8])
+ (reg:V2SI <2>)))
+ (insn 8 (set (reg:V4SI <3>)
+ (const_vector:V4SI [(const_int 1)
+ (const_int 1)
+ (const_int 1)
+ (const_int 1)])) (nil))
+ (insn 9 (set (reg:SI <4>) (subreg:SI (reg:V4SI <3>) 12))
+ (expr_list:REG_EQUAL (const_int 1) (nil)))
+ (insn 10 (set (mem:SI (reg:DI <1>) [1 ptr2+0 S4 A4])
+ (reg:SI <4>)))
+ (edge-to exit (flags "FALLTHRU"))
+ ) ;; block 2
+ ) ;; insn-chain
+ ) ;; function
+}
+
+/* { dg-final { scan-assembler-not {\tstr\twzr,} } } */
diff --git a/gcc/testsuite/gcc.dg/rtl/rtl.exp b/gcc/testsuite/gcc.dg/rtl/rtl.exp
index 5253314..36d4323 100644
--- a/gcc/testsuite/gcc.dg/rtl/rtl.exp
+++ b/gcc/testsuite/gcc.dg/rtl/rtl.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2021 Free Software Foundation, Inc.
+# Copyright (C) 2016-2022 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/sancov/pr104158-1.c b/gcc/testsuite/gcc.dg/sancov/pr104158-1.c
new file mode 100644
index 0000000..2a31879
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/sancov/pr104158-1.c
@@ -0,0 +1,11 @@
+/* PR sanitizer/104158 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize-coverage=trace-cmp -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump "__sanitizer_cov_trace_cmp" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "__sanitizer_cov_trace_pc" "optimized" } } */
+
+int
+foo (int a, int b)
+{
+ return a == b;
+}
diff --git a/gcc/testsuite/gcc.dg/sancov/pr104158-2.c b/gcc/testsuite/gcc.dg/sancov/pr104158-2.c
new file mode 100644
index 0000000..b143504
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/sancov/pr104158-2.c
@@ -0,0 +1,11 @@
+/* PR sanitizer/104158 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize-coverage=trace-pc -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-not "__sanitizer_cov_trace_cmp" "optimized" } } */
+/* { dg-final { scan-tree-dump "__sanitizer_cov_trace_pc" "optimized" } } */
+
+int
+foo (int a, int b)
+{
+ return a == b;
+}
diff --git a/gcc/testsuite/gcc.dg/sancov/pr104158-3.c b/gcc/testsuite/gcc.dg/sancov/pr104158-3.c
new file mode 100644
index 0000000..e2a1cfb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/sancov/pr104158-3.c
@@ -0,0 +1,11 @@
+/* PR sanitizer/104158 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize-coverage=trace-cmp,trace-pc -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump "__sanitizer_cov_trace_cmp" "optimized" } } */
+/* { dg-final { scan-tree-dump "__sanitizer_cov_trace_pc" "optimized" } } */
+
+int
+foo (int a, int b)
+{
+ return a == b;
+}
diff --git a/gcc/testsuite/gcc.dg/sancov/pr104158-4.c b/gcc/testsuite/gcc.dg/sancov/pr104158-4.c
new file mode 100644
index 0000000..9c2e722
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/sancov/pr104158-4.c
@@ -0,0 +1,11 @@
+/* PR sanitizer/104158 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize-coverage=trace-pc,trace-cmp -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump "__sanitizer_cov_trace_cmp" "optimized" } } */
+/* { dg-final { scan-tree-dump "__sanitizer_cov_trace_pc" "optimized" } } */
+
+int
+foo (int a, int b)
+{
+ return a == b;
+}
diff --git a/gcc/testsuite/gcc.dg/sancov/pr104158-5.c b/gcc/testsuite/gcc.dg/sancov/pr104158-5.c
new file mode 100644
index 0000000..5b130d0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/sancov/pr104158-5.c
@@ -0,0 +1,11 @@
+/* PR sanitizer/104158 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize-coverage=trace-cmp -fsanitize-coverage=trace-pc -fno-sanitize-coverage=trace-cmp -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-not "__sanitizer_cov_trace_cmp" "optimized" } } */
+/* { dg-final { scan-tree-dump "__sanitizer_cov_trace_pc" "optimized" } } */
+
+int
+foo (int a, int b)
+{
+ return a == b;
+}
diff --git a/gcc/testsuite/gcc.dg/sancov/pr104158-6.c b/gcc/testsuite/gcc.dg/sancov/pr104158-6.c
new file mode 100644
index 0000000..3eed1d7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/sancov/pr104158-6.c
@@ -0,0 +1,11 @@
+/* PR sanitizer/104158 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize-coverage=trace-cmp -fsanitize-coverage=trace-pc -fno-sanitize-coverage=trace-pc,trace-cmp -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-not "__sanitizer_cov_trace_cmp" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "__sanitizer_cov_trace_pc" "optimized" } } */
+
+int
+foo (int a, int b)
+{
+ return a == b;
+}
diff --git a/gcc/testsuite/gcc.dg/sancov/pr104158-7.c b/gcc/testsuite/gcc.dg/sancov/pr104158-7.c
new file mode 100644
index 0000000..7fc5b73
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/sancov/pr104158-7.c
@@ -0,0 +1,11 @@
+/* PR sanitizer/104158 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize-coverage=trace-cmp,trace-cmp -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump "__sanitizer_cov_trace_cmp" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "__sanitizer_cov_trace_pc" "optimized" } } */
+
+int
+foo (int a, int b)
+{
+ return a == b;
+}
diff --git a/gcc/testsuite/gcc.dg/sancov/sancov.exp b/gcc/testsuite/gcc.dg/sancov/sancov.exp
index ab69d12..6dda030 100644
--- a/gcc/testsuite/gcc.dg/sancov/sancov.exp
+++ b/gcc/testsuite/gcc.dg/sancov/sancov.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2021 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.dg/sibcall-1.c b/gcc/testsuite/gcc.dg/sibcall-1.c
index 367ee43..f2bd3ad 100644
--- a/gcc/testsuite/gcc.dg/sibcall-1.c
+++ b/gcc/testsuite/gcc.dg/sibcall-1.c
@@ -47,7 +47,7 @@ recurser_void (int n)
void *trackpoint;
-void __attribute__ ((noinline))
+void __attribute__ ((noipa))
track (int n)
{
char stackpos[1];
diff --git a/gcc/testsuite/gcc.dg/sibcall-10.c b/gcc/testsuite/gcc.dg/sibcall-10.c
index 4ac2ee4..dcb3e6a 100644
--- a/gcc/testsuite/gcc.dg/sibcall-10.c
+++ b/gcc/testsuite/gcc.dg/sibcall-10.c
@@ -46,7 +46,7 @@ int main ()
reasonably sure is to make them have the same contents (regarding the
n tests). */
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
recurser_void1 (void)
{
if (n == 0 || n == 7 || n == 8)
@@ -58,7 +58,7 @@ recurser_void1 (void)
recurser_void2 ();
}
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
recurser_void2 (void)
{
if (n == 0 || n == 7 || n == 8)
@@ -73,7 +73,7 @@ recurser_void2 (void)
void *trackpoint;
-void __attribute__ ((noinline))
+void __attribute__ ((noipa))
track ()
{
char stackpos[1];
diff --git a/gcc/testsuite/gcc.dg/sibcall-2.c b/gcc/testsuite/gcc.dg/sibcall-2.c
index a626273..0d4df82 100644
--- a/gcc/testsuite/gcc.dg/sibcall-2.c
+++ b/gcc/testsuite/gcc.dg/sibcall-2.c
@@ -38,7 +38,7 @@ recurser_void (void)
void *trackpoint;
-void __attribute__ ((noinline))
+void __attribute__ ((noipa))
track ()
{
char stackpos[1];
diff --git a/gcc/testsuite/gcc.dg/sibcall-3.c b/gcc/testsuite/gcc.dg/sibcall-3.c
index 9962b64..80555cf 100644
--- a/gcc/testsuite/gcc.dg/sibcall-3.c
+++ b/gcc/testsuite/gcc.dg/sibcall-3.c
@@ -40,7 +40,7 @@ int main ()
reasonably sure is to make them have the same contents (regarding the
n tests). */
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
recurser_void1 (int n)
{
if (n == 0 || n == 7 || n == 8)
@@ -52,7 +52,7 @@ recurser_void1 (int n)
recurser_void2 (n + 1);
}
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
recurser_void2 (int n)
{
if (n == 0 || n == 7 || n == 8)
@@ -66,7 +66,7 @@ recurser_void2 (int n)
void *trackpoint;
-void __attribute__ ((noinline))
+void __attribute__ ((noipa))
track (int n)
{
char stackpos[1];
diff --git a/gcc/testsuite/gcc.dg/sibcall-4.c b/gcc/testsuite/gcc.dg/sibcall-4.c
index 9ba1d16..97086bb 100644
--- a/gcc/testsuite/gcc.dg/sibcall-4.c
+++ b/gcc/testsuite/gcc.dg/sibcall-4.c
@@ -41,7 +41,7 @@ int main ()
reasonably sure is to make them have the same contents (regarding the
n tests). */
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
recurser_void1 (void)
{
if (n == 0 || n == 7 || n == 8)
@@ -53,7 +53,7 @@ recurser_void1 (void)
recurser_void2 ();
}
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
recurser_void2 (void)
{
if (n == 0 || n == 7 || n == 8)
@@ -67,7 +67,7 @@ recurser_void2 (void)
void *trackpoint;
-void __attribute__ ((noinline))
+void __attribute__ ((noipa))
track ()
{
char stackpos[1];
diff --git a/gcc/testsuite/gcc.dg/sibcall-9.c b/gcc/testsuite/gcc.dg/sibcall-9.c
index c06acdb..006dc0d 100644
--- a/gcc/testsuite/gcc.dg/sibcall-9.c
+++ b/gcc/testsuite/gcc.dg/sibcall-9.c
@@ -45,7 +45,7 @@ int main ()
reasonably sure is to make them have the same contents (regarding the
n tests). */
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
recurser_void1 (int n)
{
if (n == 0 || n == 7 || n == 8)
@@ -57,7 +57,7 @@ recurser_void1 (int n)
recurser_void2 (n + 1);
}
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
recurser_void2 (int n)
{
if (n == 0 || n == 7 || n == 8)
@@ -72,7 +72,7 @@ recurser_void2 (int n)
void *trackpoint;
-void __attribute__ ((noinline))
+void __attribute__ ((noipa))
track (int n)
{
char stackpos[1];
diff --git a/gcc/testsuite/gcc.dg/signbit-2.c b/gcc/testsuite/gcc.dg/signbit-2.c
new file mode 100644
index 0000000..b609f67
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/signbit-2.c
@@ -0,0 +1,24 @@
+/* { dg-do assemble } */
+/* { dg-options "-O3 --save-temps -fdump-tree-optimized" } */
+
+/* This test does not work when the truth type does not match vector type. */
+/* { dg-additional-options "-mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */
+
+#include <stdint.h>
+
+void fun1(int32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (-x[i]) >> 31;
+}
+
+void fun2(int32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (-x[i]) >> 30;
+}
+
+/* { dg-final { scan-tree-dump {\s+>\s+\{ 0(, 0)+ \}} optimized { target vect_int } } } */
+/* { dg-final { scan-tree-dump {\s+>\s+0} optimized { target { ! vect_int } } } } */
+/* { dg-final { scan-tree-dump-not {\s+>>\s+31} optimized } } */
diff --git a/gcc/testsuite/gcc.dg/signbit-3.c b/gcc/testsuite/gcc.dg/signbit-3.c
new file mode 100644
index 0000000..19e9c06
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/signbit-3.c
@@ -0,0 +1,13 @@
+/* { dg-do assemble } */
+/* { dg-options "-O1 --save-temps -fdump-tree-optimized" } */
+
+#include <stdint.h>
+
+void fun1(int32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (-x[i]) >> 31;
+}
+
+/* { dg-final { scan-tree-dump-times {\s+>\s+0;} 1 optimized } } */
+/* { dg-final { scan-tree-dump-not {\s+>>\s+31} optimized } } */
diff --git a/gcc/testsuite/gcc.dg/signbit-4.c b/gcc/testsuite/gcc.dg/signbit-4.c
new file mode 100644
index 0000000..bc459ba
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/signbit-4.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -fwrapv" } */
+
+#include <stdint.h>
+#include <limits.h>
+#include <stdio.h>
+
+#ifndef N
+#define N 65
+#endif
+
+#ifndef TYPE
+#define TYPE int32_t
+#endif
+
+#ifndef DEBUG
+#define DEBUG 1
+#endif
+
+#define BASE ((TYPE) -1 < 0 ? -126 : 4)
+
+__attribute__ ((noinline, noipa))
+void fun1(TYPE *x, int n)
+{
+ for (int i = 0; i < n; i++)
+ x[i] = (-x[i]) >> 31;
+}
+
+__attribute__ ((noinline, noipa, optimize("O0")))
+void fun2(TYPE *x, int n)
+{
+ for (int i = 0; i < n; i++)
+ x[i] = (-x[i]) >> 31;
+}
+
+int main ()
+{
+ TYPE a[N];
+ TYPE b[N];
+
+ a[0] = INT_MIN;
+ b[0] = INT_MIN;
+
+ for (int i = 1; i < N; ++i)
+ {
+ a[i] = BASE + i * 13;
+ b[i] = BASE + i * 13;
+ if (DEBUG)
+ printf ("%d: 0x%x\n", i, a[i]);
+ }
+
+ fun1 (a, N);
+ fun2 (b, N);
+
+ for (int i = 0; i < N; ++i)
+ {
+ if (DEBUG)
+ printf ("%d = 0x%x == 0x%x\n", i, a[i], b[i]);
+
+ if (a[i] != b[i])
+ __builtin_abort ();
+ }
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/signbit-5.c b/gcc/testsuite/gcc.dg/signbit-5.c
new file mode 100644
index 0000000..2b119cd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/signbit-5.c
@@ -0,0 +1,70 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+/* This test does not work when the truth type does not match vector type. */
+/* { dg-additional-options "-mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */
+
+
+#include <stdint.h>
+#include <limits.h>
+#include <stdio.h>
+
+#ifndef N
+#define N 65
+#endif
+
+#ifndef TYPE
+#define TYPE int32_t
+#endif
+
+#ifndef DEBUG
+#define DEBUG 1
+#endif
+
+#define BASE ((TYPE) -1 < 0 ? -126 : 4)
+
+__attribute__ ((noinline, noipa))
+void fun1(TYPE *x, int n)
+{
+ for (int i = 0; i < n; i++)
+ x[i] = (-x[i]) >> 31;
+}
+
+__attribute__ ((noinline, noipa, optimize("O1")))
+void fun2(TYPE *x, int n)
+{
+ for (int i = 0; i < n; i++)
+ x[i] = (-x[i]) >> 31;
+}
+
+int main ()
+{
+ TYPE a[N];
+ TYPE b[N];
+
+ a[0] = INT_MIN;
+ b[0] = INT_MIN;
+
+ for (int i = 1; i < N; ++i)
+ {
+ a[i] = BASE + i * 13;
+ b[i] = BASE + i * 13;
+ if (DEBUG)
+ printf ("%d: 0x%x\n", i, a[i]);
+ }
+
+ fun1 (a, N);
+ fun2 (b, N);
+
+ for (int i = 0; i < N; ++i)
+ {
+ if (DEBUG)
+ printf ("%d = 0x%x == 0x%x\n", i, a[i], b[i]);
+
+ if (a[i] != b[i])
+ __builtin_abort ();
+ }
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/signbit-6.c b/gcc/testsuite/gcc.dg/signbit-6.c
new file mode 100644
index 0000000..da18662
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/signbit-6.c
@@ -0,0 +1,72 @@
+/* { dg-do run } */
+/* { dg-options "-O1" } */
+
+#include <stdint.h>
+#include <limits.h>
+#include <stdio.h>
+
+#ifndef N
+#define N 65
+#endif
+
+#ifndef TYPE
+#define TYPE int32_t
+#endif
+
+#ifndef DEBUG
+#define DEBUG 1
+#endif
+
+#define BASE ((TYPE) -1 < 0 ? -126 : 4)
+
+__attribute__ ((noinline, noipa))
+void fun1(TYPE *x, int n)
+{
+ for (int i = 0; i < n; i++)
+ x[i] = (-x[i]) >> 31;
+}
+
+__attribute__ ((noinline, noipa, optimize("O0")))
+void fun2(TYPE *x, int n)
+{
+ for (int i = 0; i < n; i++)
+ x[i] = (-x[i]) >> 31;
+}
+
+int main ()
+{
+ TYPE a[N];
+ TYPE b[N];
+
+ a[0] = INT_MIN;
+ b[0] = INT_MIN;
+
+ for (int i = 1; i < N; ++i)
+ {
+ a[i] = BASE + i * 13;
+ b[i] = BASE + i * 13;
+ if (DEBUG)
+ printf ("%d: 0x%x\n", i, a[i]);
+ }
+
+ fun1 (a, N);
+ fun2 (b, N);
+
+ if (DEBUG)
+ printf ("%d = 0x%x == 0x%x\n", 0, a[0], b[0]);
+
+ if (a[0] != 0x0 || b[0] != -1)
+ __builtin_abort ();
+
+
+ for (int i = 1; i < N; ++i)
+ {
+ if (DEBUG)
+ printf ("%d = 0x%x == 0x%x\n", i, a[i], b[i]);
+
+ if (a[i] != b[i])
+ __builtin_abort ();
+ }
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp b/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp
index 852e554..fc04f93 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2011-2022 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/mips-abi.exp b/gcc/testsuite/gcc.dg/special/mips-abi.exp
index 23aacf5..54e5abb 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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 29175f3..59251bf 100644
--- a/gcc/testsuite/gcc.dg/special/special.exp
+++ b/gcc/testsuite/gcc.dg/special/special.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2022 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/spellcheck-options-24.c b/gcc/testsuite/gcc.dg/spellcheck-options-24.c
new file mode 100644
index 0000000..1bd6cc2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/spellcheck-options-24.c
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize-coverage=trace-pc,tracecmp" } */
+
+/* { dg-error "unrecognized argument in option '-fsanitize-coverage=trace-pc,tracecmp'" "" { target *-*-* } 0 } */
+/* { dg-message "valid arguments to '-fsanitize-coverage=' are: trace-cmp trace-pc; did you mean 'trace-cmp'?" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.dg/sso-14.c b/gcc/testsuite/gcc.dg/sso-14.c
index aeff3fb..7b1590a 100644
--- a/gcc/testsuite/gcc.dg/sso-14.c
+++ b/gcc/testsuite/gcc.dg/sso-14.c
@@ -2,6 +2,7 @@
/* Testcase by George Thopas <george.thopas@gmail.com> */
/* { dg-do compile } */
+/* { dg-require-effective-target alloca } */
#include <stddef.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/sso-6.c b/gcc/testsuite/gcc.dg/sso-6.c
index e955fa9..5592532 100644
--- a/gcc/testsuite/gcc.dg/sso-6.c
+++ b/gcc/testsuite/gcc.dg/sso-6.c
@@ -3,7 +3,7 @@
/* { dg-do run } */
/* { dg-require-effective-target int32plus } */
-#pragma scalar_storage_order /* { dg-warning "missing .big-endian.little-endian.default." } */
+#pragma scalar_storage_order /* { dg-warning "missing .big-endian., .little-endian., or .default." } */
#pragma scalar_storage_order big-endian
@@ -36,7 +36,7 @@ struct S5
int i;
};
-#pragma scalar_storage_order other /* { dg-warning "expected .big-endian.little-endian.default." } */
+#pragma scalar_storage_order other /* { dg-warning "expected .big-endian., .little-endian., or .default." } */
struct S1 my_s1 = { 0x12345678 };
struct S2 my_s2 = { 0x12345678 };
diff --git a/gcc/testsuite/gcc.dg/sso/sso.exp b/gcc/testsuite/gcc.dg/sso/sso.exp
index 1755823..f8faf1f 100644
--- a/gcc/testsuite/gcc.dg/sso/sso.exp
+++ b/gcc/testsuite/gcc.dg/sso/sso.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 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/stack-usage-1.c b/gcc/testsuite/gcc.dg/stack-usage-1.c
index 93cfe7c..1d7d1fe 100644
--- a/gcc/testsuite/gcc.dg/stack-usage-1.c
+++ b/gcc/testsuite/gcc.dg/stack-usage-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fstack-usage" } */
+/* { dg-options "-fstack-usage -fno-stack-protector" } */
/* nvptx doesn't have a reg allocator, and hence no stack usage data. */
/* { dg-skip-if "" { nvptx-*-* } } */
diff --git a/gcc/testsuite/gcc.dg/store_merging_18.c b/gcc/testsuite/gcc.dg/store_merging_18.c
index 66e157e..fdff6b4 100644
--- a/gcc/testsuite/gcc.dg/store_merging_18.c
+++ b/gcc/testsuite/gcc.dg/store_merging_18.c
@@ -1,6 +1,6 @@
/* PR tree-optimization/83843 */
/* { dg-do run } */
-/* { dg-options "-O2 -fdump-tree-store-merging" } */
+/* { dg-options "-O2 -fno-tree-vectorize -fdump-tree-store-merging" } */
/* { dg-final { scan-tree-dump-times "Merging successful" 3 "store-merging" { target { store_merge && { ! arm*-*-* } } } } } */
__attribute__((noipa)) void
diff --git a/gcc/testsuite/gcc.dg/store_merging_29.c b/gcc/testsuite/gcc.dg/store_merging_29.c
index 6b32aa9..e7afc9d 100644
--- a/gcc/testsuite/gcc.dg/store_merging_29.c
+++ b/gcc/testsuite/gcc.dg/store_merging_29.c
@@ -1,7 +1,7 @@
/* PR tree-optimization/88709 */
/* { dg-do run { target int32 } } */
/* { dg-require-effective-target store_merge } */
-/* { dg-options "-O2 -fdump-tree-store-merging-details" } */
+/* { dg-options "-O2 -fno-tree-vectorize -fdump-tree-store-merging-details" } */
/* { dg-final { scan-tree-dump "New sequence of 3 stores to replace old one of 6 stores" "store-merging" { target { le && { ! arm*-*-* } } } } } */
/* { dg-final { scan-tree-dump "New sequence of \[34] stores to replace old one of 6 stores" "store-merging" { target { be && { ! arm*-*-* } } } } } */
diff --git a/gcc/testsuite/gcc.dg/struct-by-value-1.c b/gcc/testsuite/gcc.dg/struct-by-value-1.c
index addf253..ae7adb5 100644
--- a/gcc/testsuite/gcc.dg/struct-by-value-1.c
+++ b/gcc/testsuite/gcc.dg/struct-by-value-1.c
@@ -1,6 +1,7 @@
/* Test structure passing by value. */
/* { dg-do run } */
/* { dg-options "-O2" } */
+/* { dg-options "-O2 -G0" { target { nios2-*-* } } } */
#define T(N) \
struct S##N { unsigned char i[N]; }; \
diff --git a/gcc/testsuite/gcc.dg/superblock.c b/gcc/testsuite/gcc.dg/superblock.c
index 2b2fa9e..6b4419a 100644
--- a/gcc/testsuite/gcc.dg/superblock.c
+++ b/gcc/testsuite/gcc.dg/superblock.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-asynchronous-unwind-tables -fsched2-use-superblocks -fdump-rtl-sched2 -fdump-rtl-bbro" } */
+/* { dg-options "-O2 -fno-asynchronous-unwind-tables -fsched2-use-superblocks -fdump-rtl-sched2 -fdump-rtl-bbro -fno-stack-protector" } */
/* { dg-require-effective-target scheduling } */
typedef int aligned __attribute__ ((aligned (64)));
diff --git a/gcc/testsuite/gcc.dg/tls/tls.exp b/gcc/testsuite/gcc.dg/tls/tls.exp
index ef7d21c..59933b8 100644
--- a/gcc/testsuite/gcc.dg/tls/tls.exp
+++ b/gcc/testsuite/gcc.dg/tls/tls.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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/tm.exp b/gcc/testsuite/gcc.dg/tm/tm.exp
index 804b087..fd3455f 100644
--- a/gcc/testsuite/gcc.dg/tm/tm.exp
+++ b/gcc/testsuite/gcc.dg/tm/tm.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/20211118-1.c b/gcc/testsuite/gcc.dg/torture/20211118-1.c
new file mode 100644
index 0000000..67ef684
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/20211118-1.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+
+unsigned p[3];
+void __attribute__((noipa))
+bar (float *q, int n, int m)
+{
+ for (int i = 0; i < m; ++i)
+ {
+ if (i == n)
+ {
+ unsigned a = p[1];
+ p[1] = a + 1;
+ *q = 1.;
+ }
+ q++;
+ }
+}
+
+int main()
+{
+#if __SIZEOF_FLOAT__ == __SIZEOF_INT__
+ bar ((float *)p, 1, 3);
+ if (((float *)p)[1] != 1.)
+ __builtin_abort ();
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c
new file mode 100644
index 0000000..ec23274
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c
@@ -0,0 +1,41 @@
+/* PR57245 */
+/* { dg-do run } */
+/* { dg-require-effective-target fenv } */
+/* { dg-additional-options "-frounding-math" } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+#if __DBL_MANT_DIG__ == 53 && __FLT_MANT_DIG__ == 24
+#ifdef FE_UPWARD
+ fesetround (FE_UPWARD);
+ float f = 1.3;
+ if (f != 0x1.4ccccep+0f)
+ __builtin_abort ();
+#endif
+#ifdef FE_TONEAREST
+ fesetround (FE_TONEAREST);
+ /* Use different actual values so the bogus CSE we perform does not
+ break things. */
+ f = 1.33;
+ if (f != 0x1.547ae2p+0f)
+ abort ();
+#endif
+#ifdef FE_DOWNWARD
+ fesetround (FE_DOWNWARD);
+ f = 1.333;
+ if (f != 0x1.553f7cp+0f)
+ abort ();
+#endif
+#ifdef FE_TOWARDZERO
+ fesetround (FE_TOWARDZERO);
+ f = 1.3333;
+ if (f != 0x1.555326p+0f)
+ abort ();
+#endif
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c
index 1070230..707d539 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c
@@ -4,7 +4,6 @@
/* { dg-require-effective-target int128 } */
/* { dg-require-effective-target fenv } */
/* { dg-options "-frounding-math" } */
-/* { dg-xfail-run-if "see PR80556 c63" { x86_64-*-darwin* i68?-*-darwin* } { "*" } { "" } } */
#include <fenv.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c
index 3facf32..09600f9 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c
@@ -4,7 +4,6 @@
/* { dg-require-effective-target int128 } */
/* { dg-require-effective-target fenv } */
/* { dg-options "-frounding-math" } */
-/* { dg-xfail-run-if "see PR80556 c63" { x86_64-*-darwin* i68?-*-darwin* } { "*" } { "" } } */
#include <fenv.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-1.c b/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-1.c
new file mode 100644
index 0000000..fadad8c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-1.c
@@ -0,0 +1,74 @@
+/* PR84407 */
+/* { dg-do run } */
+/* { dg-require-effective-target fenv } */
+/* { dg-additional-options "-frounding-math -fexcess-precision=standard" } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+void __attribute__((noipa))
+fooa ()
+{
+#if __DBL_MANT_DIG__ == 53
+#ifdef FE_TONEAREST
+ fesetround(FE_TONEAREST);
+ __UINT64_TYPE__ x = 0x7fffffffffffffff;
+ double f = x;
+ if (f != 0x1p+63)
+ abort ();
+#endif
+#endif
+}
+
+void __attribute__((noipa))
+foob ()
+{
+#if __DBL_MANT_DIG__ == 53
+#ifdef FE_DOWNWARD
+ fesetround(FE_DOWNWARD);
+ __UINT64_TYPE__ x = 0x7fffffffffffffff;
+ double f = x;
+ if (f != 0x1.fffffffffffffp+62)
+ abort ();
+#endif
+#endif
+}
+
+void __attribute__((noipa))
+fooc ()
+{
+#if __DBL_MANT_DIG__ == 53
+#ifdef FE_UPWARD
+ fesetround(FE_UPWARD);
+ __UINT64_TYPE__ x = 0x7fffffffffffffff;
+ double f = x;
+ if (f != 0x1p+63)
+ abort ();
+#endif
+#endif
+}
+
+void __attribute__((noipa))
+food ()
+{
+#if __DBL_MANT_DIG__ == 53
+#ifdef FE_TOWARDZERO
+ fesetround(FE_TOWARDZERO);
+ __UINT64_TYPE__ x = 0x7fffffffffffffff;
+ double f = x;
+ if (f != 0x1.fffffffffffffp+62)
+ abort ();
+#endif
+#endif
+}
+
+
+int
+main ()
+{
+ fooa ();
+ foob ();
+ fooc ();
+ food ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-2.c b/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-2.c
new file mode 100644
index 0000000..952f96b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-2.c
@@ -0,0 +1,75 @@
+/* PR84407 */
+/* { dg-do run } */
+/* { dg-require-effective-target fenv } */
+/* { dg-additional-options "-frounding-math" } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+void __attribute__((noipa))
+fooa ()
+{
+#if __DBL_MANT_DIG__ == 53
+#ifdef FE_TONEAREST
+ fesetround(FE_TONEAREST);
+ /* Large enough constant to trigger unsigned_float. */
+ __UINT64_TYPE__ x = 0x8000000000000001;
+ double f = x;
+ if (f != 0x1p+63)
+ abort ();
+#endif
+#endif
+}
+
+void __attribute__((noipa))
+foob ()
+{
+#if __DBL_MANT_DIG__ == 53
+#ifdef FE_DOWNWARD
+ fesetround(FE_DOWNWARD);
+ __UINT64_TYPE__ x = 0x8000000000000001;
+ double f = x;
+ if (f != 0x1p+63)
+ abort ();
+#endif
+#endif
+}
+
+void __attribute__((noipa))
+fooc ()
+{
+#if __DBL_MANT_DIG__ == 53
+#ifdef FE_UPWARD
+ fesetround(FE_UPWARD);
+ __UINT64_TYPE__ x = 0x8000000000000001;
+ double f = x;
+ if (f != 0x1.0000000000001p+63)
+ abort ();
+#endif
+#endif
+}
+
+void __attribute__((noipa))
+food ()
+{
+#if __DBL_MANT_DIG__ == 53
+#ifdef FE_TOWARDZERO
+ fesetround(FE_TOWARDZERO);
+ __UINT64_TYPE__ x = 0x8000000000000001;
+ double f = x;
+ if (f != 0x1p+63)
+ abort ();
+#endif
+#endif
+}
+
+
+int
+main ()
+{
+ fooa ();
+ foob ();
+ fooc ();
+ food ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr100499-1.c b/gcc/testsuite/gcc.dg/torture/pr100499-1.c
new file mode 100644
index 0000000..9511c32
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr100499-1.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+
+typedef __UINT16_TYPE__ uint16_t;
+typedef __INT32_TYPE__ int32_t;
+static uint16_t g_2823 = 0xEC75L;
+static uint16_t g_116 = 0xBC07L;
+
+static uint16_t
+safe_mul_func_uint16_t_u_u(uint16_t ui1, uint16_t ui2)
+{
+ return ((unsigned int)ui1) * ((unsigned int)ui2);
+}
+
+int main ()
+{
+ uint16_t l_2815 = 0xffff;
+ uint16_t *l_2821 = &g_116;
+ uint16_t *l_2822 = &g_2823;
+
+lbl_2826:
+ l_2815 &= 0x1eae;
+ if (safe_mul_func_uint16_t_u_u(((*l_2821) = l_2815), (--(*l_2822))))
+ goto lbl_2826;
+ if (g_2823 != 32768)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr100499-2.c b/gcc/testsuite/gcc.dg/torture/pr100499-2.c
new file mode 100644
index 0000000..999f931
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr100499-2.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+
+unsigned char ag = 55;
+unsigned i;
+int main()
+{
+ unsigned char c;
+ unsigned char a = ag;
+d:
+ c = a-- * 52;
+ if (c)
+ goto d;
+ if (a != 255)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr100499-3.c b/gcc/testsuite/gcc.dg/torture/pr100499-3.c
new file mode 100644
index 0000000..01be1e5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr100499-3.c
@@ -0,0 +1,14 @@
+/* { dg-do run } */
+
+int a = 0;
+unsigned char b = 0;
+
+int main() {
+ a - 6;
+ for (; a >= -13; a = a - 8)
+ while((unsigned char)(b-- * 6))
+ ;
+ if (b != 127)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr100740.c b/gcc/testsuite/gcc.dg/torture/pr100740.c
new file mode 100644
index 0000000..a85855e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr100740.c
@@ -0,0 +1,12 @@
+/* { dg-do run } */
+
+unsigned a, b;
+int main()
+{
+ unsigned c = 0;
+ for (a = 0; a < 2; a++)
+ for (b = 0; b < 2; b++)
+ if (++c < a)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr100786.c b/gcc/testsuite/gcc.dg/torture/pr100786.c
new file mode 100644
index 0000000..42f4e48
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr100786.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+
+const double a = 0;
+extern int b __attribute__((alias("a")));
+void inc() { b++; }
+
+const int a2 = 0;
+extern double b2 __attribute__((alias("a2")));
+void inc2() { b2+=1; }
diff --git a/gcc/testsuite/gcc.dg/torture/pr101508.c b/gcc/testsuite/gcc.dg/torture/pr101508.c
new file mode 100644
index 0000000..e1cb264
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr101508.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+
+int
+main ()
+{
+ unsigned i;
+ for (i = 0; i < 3; ++i)
+ {
+ if (i > i * 2)
+ __builtin_abort ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr101972.c b/gcc/testsuite/gcc.dg/torture/pr101972.c
new file mode 100644
index 0000000..3adb482
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr101972.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-require-effective-target int32plus } */
+
+int a, b, c, d, f;
+static short e = 63891;
+char g = 30;
+unsigned h(int i, int j) { return i << j; }
+int *l(int *);
+void m()
+{
+ a = 0;
+ for (; a >= 0; a--)
+ {
+ int *k = &b;
+ *k = e < 0;
+ }
+ c = b;
+ l(&c);
+}
+int *l(int *i)
+{
+ d = 2;
+ for (; d <= 6; d++)
+ {
+ if (h(d, *i) <= d)
+ ;
+ else
+ continue;
+ g = 0;
+ return &f;
+ }
+ return (void *)0;
+}
+int main()
+{
+ m();
+ if (g != 30)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr102131-1.c b/gcc/testsuite/gcc.dg/torture/pr102131-1.c
new file mode 100644
index 0000000..5ff576d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr102131-1.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+
+int a;
+int main()
+{
+ unsigned b = 0;
+ int c = 1;
+ for (; b < 3; b++)
+ {
+ while (c < b)
+ __builtin_abort ();
+ for (a = 0; a < 3; a++)
+ c++;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr102131-2.c b/gcc/testsuite/gcc.dg/torture/pr102131-2.c
new file mode 100644
index 0000000..830c72c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr102131-2.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+
+int a;
+int main()
+{
+ unsigned b = 0;
+ int c = 1;
+ for (;b < 3; b++)
+ {
+ if (c < b)
+ __builtin_abort ();
+ c+=3;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr102131-3.c b/gcc/testsuite/gcc.dg/torture/pr102131-3.c
new file mode 100644
index 0000000..aed10c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr102131-3.c
@@ -0,0 +1,11 @@
+/* { dg-do run } */
+
+int a;
+int main()
+{
+ unsigned b = 0;
+ for (a = 2; a < 8; a += 2)
+ if (++b > a)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr102131-4.c b/gcc/testsuite/gcc.dg/torture/pr102131-4.c
new file mode 100644
index 0000000..c63c08b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr102131-4.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-require-effective-target int32plus } */
+
+unsigned a;
+int main()
+{
+ unsigned b = 1;
+ for (; b < 4; b++) {
+ a = (a ^ 2000000000) * -b;
+ if (b > a)
+ __builtin_abort ();
+ a = 3000000000;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr103181.c b/gcc/testsuite/gcc.dg/torture/pr103181.c
new file mode 100644
index 0000000..6bc705a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103181.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+
+typedef unsigned char __attribute__((__vector_size__ (2))) U;
+typedef unsigned short S;
+typedef unsigned int __attribute__((__vector_size__ (64))) V;
+
+V v;
+U a, b, c;
+
+U
+foo (S s)
+{
+ v += __builtin_bswap16 (s) || (S) (a / ((U){3, 0}));
+ return b + c;
+}
+
+int
+main (void)
+{
+ U x = foo (4);
+ if (x[0] || x[1])
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr103188.c b/gcc/testsuite/gcc.dg/torture/pr103188.c
new file mode 100644
index 0000000..0412f6f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103188.c
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+
+int a, b, c, d = 10, e = 1, f, g, h, i;
+int main()
+{
+ int j = -1;
+k:
+ h = c;
+l:
+ c = ~c;
+ if (e)
+ m:
+ a = 0;
+ if (j > 1)
+ goto m;
+ if (!e)
+ goto l;
+ if (c)
+ goto p;
+n:
+ goto m;
+o:
+ if (f) {
+ if (g)
+ goto k;
+ j = 0;
+ p:
+ if (d)
+ goto o;
+ goto n;
+ }
+ if (i)
+ goto l;
+ for (; a < 1; a++)
+ while (a > d)
+ b++;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr103204.c b/gcc/testsuite/gcc.dg/torture/pr103204.c
new file mode 100644
index 0000000..b08b686
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103204.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+int a[1][1];
+int b, c;
+void d()
+{
+ int e;
+ int f[0];
+ int *g;
+ for (; e;)
+ c = b;
+ if (a[0][b] = (__UINTPTR_TYPE__)f != 3)
+ g = &f[b];
+ int h;
+ *g = *g = *g = h;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr103219.c b/gcc/testsuite/gcc.dg/torture/pr103219.c
new file mode 100644
index 0000000..cb9023e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103219.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+
+int f();
+void g();
+int a, b, c, e;
+int d[10];
+int main()
+{
+ if (c)
+ if (f())
+ {
+ g();
+ if (e) {
+ a = 0;
+ for (; a != 6; a = a + 2)
+ {
+ b = 0;
+ for (; b <= 3; b++)
+ d[b] &= 1;
+ }
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr103237.c b/gcc/testsuite/gcc.dg/torture/pr103237.c
new file mode 100644
index 0000000..f2399f9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103237.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-additional-options "-ftree-vectorize" } */
+
+int g1;
+unsigned int g2 = -1U;
+static void __attribute__((noipa))
+func_1()
+{
+ int *l_1 = &g1;
+ for (int g3a = 0; g3a != 4; g3a++)
+ for (int l_2 = 0; l_2 <= 3; l_2++)
+ {
+ unsigned int *l_3 = &g2;
+ *l_1 = *l_3 ^= 1;
+ }
+}
+int
+main()
+{
+ func_1();
+ if (g1 != -1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr103458.c b/gcc/testsuite/gcc.dg/torture/pr103458.c
new file mode 100644
index 0000000..3fd3b5f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103458.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-Wno-div-by-zero" } */
+
+__attribute__ ((returns_twice)) int
+bar (void);
+
+void
+foo (int *p, int x)
+{
+ *p = 0;
+ while (*p < 1)
+ {
+ x = 0;
+ while (x < 1)
+ bar ();
+
+ x /= 0;
+ }
+
+ foo (p, x);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr103489.c b/gcc/testsuite/gcc.dg/torture/pr103489.c
new file mode 100644
index 0000000..cd62623
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103489.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-ftree-vectorize" } */
+
+_Bool a[80];
+short b, f;
+void g(short h[][8][16])
+{
+ for (_Bool c = 0; c < b;)
+ for (_Bool d = 0; d < (_Bool)f; d = 1)
+ for (short e = 0; e < 16; e++)
+ a[e] = h[b][1][e];
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr103596.c b/gcc/testsuite/gcc.dg/torture/pr103596.c
new file mode 100644
index 0000000..4f65c36
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103596.c
@@ -0,0 +1,36 @@
+/* { dg-do compile } */
+/* { dg-additional-options "--param case-values-threshold=1" } */
+
+int n;
+
+void
+qux (int a)
+{
+}
+
+int
+baz (void)
+{
+ return -1;
+}
+
+__attribute__ ((returns_twice)) int
+bar (int b)
+{
+ if (n != 0)
+ {
+ if (b != 2)
+ if (b != 0)
+ return n + b;
+
+ if (n == 2)
+ return 0;
+ }
+}
+
+void
+foo (void)
+{
+ qux (n);
+ bar (baz ());
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr103615.c b/gcc/testsuite/gcc.dg/torture/pr103615.c
new file mode 100644
index 0000000..2109245
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103615.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+
+int z = 5;
+int a[6] = { 0, 0, 0, 0, 0, 1 };
+int main()
+{
+ for (int x = 5; x; x--)
+ for (int y = z; y >= x; y--)
+ a[y - x] += a[y];
+ if (a[0] != 7)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr103816.c b/gcc/testsuite/gcc.dg/torture/pr103816.c
new file mode 100644
index 0000000..769036a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103816.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-w" } */
+
+extern struct {
+ unsigned char a;
+ unsigned char b;
+ unsigned char c;
+ unsigned char d;
+} g[];
+void main() { g[0].b = (g[0].b & g[4].b) * g[2305843009213693952ULL].c; }
diff --git a/gcc/testsuite/gcc.dg/torture/pr103987.c b/gcc/testsuite/gcc.dg/torture/pr103987.c
new file mode 100644
index 0000000..6bfc768
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103987.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+void foo();
+
+void bar(int i)
+{
+ foo (i);
+}
+
+void foo(int *p)
+{
+ *p = 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr104279.c b/gcc/testsuite/gcc.dg/torture/pr104279.c
new file mode 100644
index 0000000..7c4fc20
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr104279.c
@@ -0,0 +1,12 @@
+/* PR tree-optimization/104279 */
+/* { dg-do compile } */
+
+unsigned a, b;
+
+int
+main ()
+{
+ b = ~(0 || ~0);
+ a = ~b / ~a;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr104280.c b/gcc/testsuite/gcc.dg/torture/pr104280.c
new file mode 100644
index 0000000..c5a1d9b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr104280.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/104280 */
+/* { dg-do run } */
+
+int
+foo (unsigned b, int c)
+{
+ return b / c;
+}
+
+int
+main ()
+{
+ if (foo (1, 2) != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr104281.c b/gcc/testsuite/gcc.dg/torture/pr104281.c
new file mode 100644
index 0000000..35c8e20
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr104281.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/104281 */
+/* { dg-do run } */
+
+unsigned a = 1;
+int b, c = 2;
+long d;
+
+int
+main ()
+{
+ while (1)
+ {
+ int m = a;
+ L:
+ a = ~(-(m || b & d));
+ b = ((1 ^ a) / c);
+ if (b)
+ goto L;
+ break;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr104402.c b/gcc/testsuite/gcc.dg/torture/pr104402.c
new file mode 100644
index 0000000..1cb0370
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr104402.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+
+_Complex int a;
+char b;
+void c() {
+ if (b != 2 + (long)(a != 0 ^ 0))
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr104467.c b/gcc/testsuite/gcc.dg/torture/pr104467.c
new file mode 100644
index 0000000..c3bfb60
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr104467.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-mavx" { target x86_64-*-* i?86-*-* } } */
+
+unsigned long __attribute__((__vector_size__ (8 * sizeof (long)))) u;
+signed long __attribute__((__vector_size__ (8 * sizeof (long)))) s;
+
+void
+foo (void)
+{
+ s &= u + (0, 0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57147-2.c b/gcc/testsuite/gcc.dg/torture/pr57147-2.c
index 036a6d0..9952e3b 100644
--- a/gcc/testsuite/gcc.dg/torture/pr57147-2.c
+++ b/gcc/testsuite/gcc.dg/torture/pr57147-2.c
@@ -17,7 +17,13 @@ static void SetNaClSwitchExpectations (void)
void TestSyscall(void)
{
SetNaClSwitchExpectations();
+
_setjmp (g_return_jmp_buf);
}
+/* sizeof g_return_jmp_buf is zero size but it's being passed to
+ a function declared to take an array of one element which might
+ trigger a warning. Prune it out:
+ { dg-prune-output "-Wstringop-overflow" } */
+
/* { dg-final { scan-tree-dump-not "setjmp" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr57993-2.cpp b/gcc/testsuite/gcc.dg/torture/pr57993-2.cpp
deleted file mode 100644
index b7bffa8..0000000
--- a/gcc/testsuite/gcc.dg/torture/pr57993-2.cpp
+++ /dev/null
@@ -1,213 +0,0 @@
-/* This ICEd due to an incomplete fix for PR57993. */
-/* { dg-do 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/stackalign/stackalign.exp b/gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp
index d77eae4..ad9a7db 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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.exp b/gcc/testsuite/gcc.dg/torture/tls/tls.exp
index ff085c2..d6480c6 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2010-2022 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-prof/init-array.c b/gcc/testsuite/gcc.dg/tree-prof/init-array.c
new file mode 100644
index 0000000..0f7a5c8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/init-array.c
@@ -0,0 +1,43 @@
+/* { dg-options "-O3 -fdump-tree-cunrolli-details" } */
+
+static int s[10][10][10];
+static int d[10][10][10];
+
+__attribute__((noipa))
+int array()
+{
+ int i;
+ register int j, k;
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ for (k = 0; k < 10; k++)
+ d[i][j][k] = s[i][j][k];
+
+ return(0);
+}
+
+__attribute__((noipa))
+void TestBench()
+{
+ for (int i = 0; i < 150000; ++i)
+ {
+ array();
+ }
+}
+
+int main(int argc, char *argv[])
+{
+
+ TestBench();
+
+ if (d[9][9][9] == 0 && s[9][9][9] == 0)
+ {
+ return 0;
+ }
+ else
+ {
+ return -1;
+ }
+}
+
+/* { dg-final-use { scan-tree-dump-times "loop with 10 iterations completely unrolled" 2 "cunrolli"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/merge_block.c b/gcc/testsuite/gcc.dg/tree-prof/merge_block.c
index 5da5ddf..e8a8873 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/merge_block.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/merge_block.c
@@ -1,5 +1,5 @@
-/* { dg-options "-O2 -fno-ipa-pure-const -fdump-tree-optimized-blocks-details -fno-early-inlining" } */
+/* { dg-options "-O2 -fno-ipa-pure-const -fdump-tree-optimized-blocks-details -fno-early-inlining -fno-ipa-modref" } */
int a[8];
int t()
{
diff --git a/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp b/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp
index 90f2c4d..04b8636 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp
+++ b/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2022 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/bittest.c b/gcc/testsuite/gcc.dg/tree-ssa/bittest.c
new file mode 100644
index 0000000..7d712ca
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/bittest.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+
+void bar (void);
+
+void
+foo(unsigned int abc123)
+{
+ unsigned int xyzpdq = (1 << abc123);
+ if ((xyzpdq & 0x800) != 0)
+ bar();
+}
+
+void
+baz(unsigned int abc123)
+{
+ unsigned int xyzpdq = (1 << abc123);
+ if ((xyzpdq & 0x800) == 0)
+ bar();
+}
+
+/* What we want to verify is that the bit test against xyzpdq is
+ replaced with a test against abc123 which avoids the shifting
+ and bit ops. */
+/* { dg-final { scan-tree-dump-not "xyzpdq" "optimized"} } */
+/* { dg-final { scan-tree-dump-times "if .abc123" 2 "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-13.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-13.c
new file mode 100644
index 0000000..c5b5f0c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-13.c
@@ -0,0 +1,131 @@
+/* PR tree-optimization/104119 - unexpected -Wformat-overflow after strlen
+ in ILP32 since Ranger integration
+ Verify that unlike -Wformat-overflow the sprintf optimization doesn't
+ assume the length of a string isn't bounded by the size of the array
+ member it's stored in.
+ { dg-do compile }
+ { dg-options "-O2 -Wall -fdump-tree-optimized" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+void* memcpy (void*, const void*, size_t);
+int snprintf (char*, size_t, const char*, ...);
+char* strcpy (char*, const char*);
+size_t strlen (const char*);
+
+extern void keep_call_on_line (int);
+extern void elim_call_on_line (int);
+
+void sink (void*, ...);
+
+struct __attribute__ ((packed)) S
+{
+ char a4[4], b4[4], ax[];
+};
+
+extern struct S es;
+
+void test_extern_decl_memcpy (void)
+{
+ struct S *p = &es;
+
+ /* Set strlen (P->A4) to [3, PTRDIFF - 2]. */
+ memcpy (p->a4, "123", 3);
+ int i = snprintf (0, 0, "%s", p->a4);
+ if (i > 4)
+ keep_call_on_line (__LINE__);
+}
+
+void test_extern_decl_strcpy_3 (void)
+{
+ struct S *p = &es;
+
+ /* Set strlen (P->A4) to 3. */
+ strcpy (p->a4, "123");
+ int i = snprintf (0, 0, "%s", p->a4);
+ if (i > 4)
+ elim_call_on_line (__LINE__);
+}
+
+void test_extern_decl_strcpy_X (const char *s)
+{
+ struct S *p = &es;
+
+ /* Set strlen (P->A4) to [0, PTRDIFF_MAX - 2]. */
+ strcpy (p->a4, s);
+ int i = snprintf (0, 0, "%s", p->a4);
+ if (i > 4)
+ keep_call_on_line (__LINE__);
+}
+
+size_t test_extern_decl_strlen (void)
+{
+ struct S *p = &es;
+
+ /* Set strlen (P->A4) to [0, PTRDIFF - 2]. */
+ size_t n = strlen (p->a4);
+ int i = snprintf (0, 0, "%s", p->a4);
+ if (i > 4)
+ keep_call_on_line (__LINE__);
+ return n;
+}
+
+
+static struct S ss;
+
+/* Store and read SS to prevent optimizers from assuming it's unchanged. */
+
+extern void set_ss (struct S *p)
+{
+ if (ss.a4[(unsigned char)*p->a4])
+ __builtin_memcpy (&ss, p, sizeof ss);
+}
+
+
+void test_static_decl_memcpy (void)
+{
+ struct S *p = &ss;
+
+ /* Set strlen (P->A4) to [3, PTRDIFF - 2]. */
+ memcpy (p->a4, "123", 3);
+ int i = snprintf (0, 0, "%s", p->a4);
+ if (i > 4)
+ keep_call_on_line (__LINE__);
+}
+
+void test_static_decl_strcpy_3 (void)
+{
+ struct S *p = &ss;
+
+ /* Set strlen (P->A4) to 3. */
+ strcpy (p->a4, "123");
+ int i = snprintf (0, 0, "%s", p->a4);
+ if (i > 4)
+ elim_call_on_line (__LINE__);
+}
+
+void test_static_decl_strcpy_X (const char *s)
+{
+ struct S *p = &ss;
+
+ /* Set strlen (P->A4) to [0, PTRDIFF_MAX - 2]. */
+ strcpy (p->a4, s);
+ int i = snprintf (0, 0, "%s", p->a4);
+ if (i > 4)
+ keep_call_on_line (__LINE__);
+}
+
+size_t test_static_decl_strlen (void)
+{
+ struct S *p = &ss;
+
+ /* Set strlen (P->A4) to [0, PTRDIFF - 2]. */
+ size_t n = strlen (p->a4);
+ int i = snprintf (0, 0, "%s", p->a4);
+ if (i > 4)
+ keep_call_on_line (__LINE__);
+ return n;
+}
+
+/* { dg-final { scan-tree-dump-times "keep_call_on_line" 6 "optimized" } }
+ { dg-final { scan-tree-dump-not "elim_call_on_line" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-warn-6.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-warn-6.c
new file mode 100644
index 0000000..2857e83
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-warn-6.c
@@ -0,0 +1,47 @@
+/* PR tree-optimization/78969 - bogus snprintf truncation warning due to
+ missing range info
+ { dg-do compile }
+ { dg-options "-O2 -Wall -Wformat-truncation=2" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+extern int snprintf (char*, size_t, const char*, ...);
+
+
+void f (unsigned j, char *p)
+{
+ if (j > 999)
+ j = 0;
+
+ snprintf (p, 4, "%3u", j);
+}
+
+void g (unsigned j, char *p)
+{
+ if (j > 999)
+ return;
+
+ snprintf (p, 4, "%3u", j); // { dg-bogus "-Wformat-truncation" }
+}
+
+
+void pr78969_c4 (char * p /* NNN\0" */)
+{
+ for (int idx = 0; idx < 1000; idx++) {
+ // guaranteed to be in [0-999] range
+ snprintf (p, 4, "%d", idx); // { dg-bogus "-Wformat-truncation" }
+ }
+}
+
+
+void sink (int, ...);
+
+char d[4];
+
+void pr78969_c12 (unsigned i)
+{
+ if (i >= 1000 && i < 10000)
+ snprintf (d, 4, "%3d", i / 10); // { dg-bogus "-Wformat-truncation" }
+ else
+ sink (i / 10 % 10);
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-16.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-16.c
index d6cbfe3..f975e16 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-16.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-16.c
@@ -130,16 +130,18 @@ void test_width_var (void)
{
/* Create an unsigned range with a lower bound greater than 1 and
- an upper bound in excess of INT_MAX and verify that the lower
- bound isn't used as the minimum output (since the excessive
- upper bound wraps around zero). It's possible to constrain
- the upper bound on the output more, based on the upper bound
- of the width here, but not worth the trouble. */
- extern unsigned w;
+ an upper bound in excess of INT_MAX and verify that after conversion
+ to signed int the lower bound isn't used as the minimum output (since
+ the excessive upper bound wraps around zero). Passing the precision
+ as unsigned, without the cast to signed int, is undedined.
+ It's possible to constrain the upper bound on the output more, based
+ on the upper bound of the width here, but not worth the trouble. */
+ unsigned w = W (unsigned);
if (w < 5 || (unsigned)-1 - 7 < w)
w = 5;
+ int val = V (int);
- T ("%*u", w, V (int)); /* { dg-warning "between 1 and 2147483648 " } */
+ T ("%*u", (int)w, val); /* { dg-warning "between 1 and 2147483648 " } */
}
{
@@ -234,13 +236,17 @@ void test_precision_var (void)
{
/* Similar to the corresponding width case, create an unsigned range
with a lower bound greater than 1 and an upper bound in excess of
- INT_MAX and verify that the lower bound isn't used as the minimum
- output (since the excessive upper bound wraps around zero). */
- extern unsigned p;
+ INT_MAX and verify that after conversion to int the lower bound isn't
+ used as the minimum output (since the excessive upper bound wraps
+ around zero). Passing the precision as unsigned, without a cast to
+ signed int, is undefined. */
+ unsigned p = V (unsigned);
if (p < 7 || (unsigned)-1 - 9 < p)
p = 7;
- T ("%.*u", p, V (int)); /* { dg-warning "up to 2147483647 " } */
+ int val = V (int);
+
+ T ("%.*u", (int)p, val); /* { dg-warning "up to 2147483647 " } */
}
{
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-22.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-22.c
index 685a4fd..82eb585 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-22.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-22.c
@@ -18,7 +18,18 @@ void g (char *s1, char *s2)
if (n + d + 1 >= 1025)
return;
- sprintf (b, "%s.%s", s1, s2); // { dg-bogus "\\\[-Wformat-overflow" }
+ /* Ranger can find ranges here:
+ [1] n_6: size_t [0, 1023]
+ [2] d_8: size_t [0, 1023]
+
+ Whereas evrp can't really:
+ [1] n_6: size_t [0, 9223372036854775805]
+ [2] d_8: size_t [0, 9223372036854775805]
+
+ This is causing the sprintf warning pass to issue a false
+ positive here. */
+
+ sprintf (b, "%s.%s", s1, s2); // { dg-bogus "\\\[-Wformat-overflow" "" { xfail *-*-* } }
f (b);
}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-25.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-25.c
index df46023..a28f066 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-25.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-25.c
@@ -1,6 +1,7 @@
/* PR middle-end/97373 - missing warning on sprintf into allocated destination
{ dg-do compile }
- { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
#include "../range.h"
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-28.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-28.c
new file mode 100644
index 0000000..d58d980
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-28.c
@@ -0,0 +1,21 @@
+/* Verify that -Wformat-overflow uses context-sensitive ranges even
+ at -O0 to avoid both false positives and negatives.
+ { dg-do compile }
+ { dg-options "-O0 -Wall" } */
+
+extern int sprintf (char*, const char*, ...);
+
+extern char a[4];
+
+void test_context_range (int c)
+{
+ int i = 998;
+
+ /* Prior to the switch to Ranger in GCC 12 -Wformat-overflow triggers
+ for both calls because EVRP doesn't expose the accurate range of
+ the argument. */
+ if (c)
+ sprintf (a, "%i", i + 2); // { dg-warning "writing a terminating nul past the end of the destination" }
+ else
+ sprintf (a, "%i", i + 1); // { dg-bogus "-Wformat-overflow" }
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-29.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-29.c
new file mode 100644
index 0000000..3591f4f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-29.c
@@ -0,0 +1,179 @@
+/* PR tree-optimization/104119 - unexpected -Wformat-overflow after strlen
+ in ILP32 since Ranger integration
+ { dg-do compile }
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+void* malloc (size_t);
+int sprintf (char*, const char*, ...);
+size_t strlen (const char*);
+
+void sink (void*, ...);
+
+struct __attribute__ ((packed)) S
+{
+ char a3[3], a4[4], a5[5], a6[6], a7[7], a8[8], a9[9], ax[];
+};
+
+extern struct S s;
+extern char a4[4], a7[7], a8[8];
+
+
+void test_decl (void)
+{
+ struct S *p = &s;
+
+ {
+ size_t n = strlen (p->a3);
+ sprintf (a4, "%s", p->a3); // { dg-bogus "-Wformat-overflow" }
+ sink (a4, n);
+ }
+
+ {
+ size_t n = strlen (p->a4);
+ sprintf (a4, "%s", p->a4); // { dg-bogus "-Wformat-overflow" }
+ sink (a4, n);
+ }
+
+ {
+ size_t n = strlen (p->a5);
+ sprintf (a4, "%s", p->a5); // { dg-warning "may write a terminating nul past the end" }
+ sink (a4, n);
+ }
+
+ {
+ size_t n = strlen (p->a7);
+ sprintf (a8, "%s", p->a7); // { dg-bogus "-Wformat-overflow" }
+ sink (a8, n);
+ }
+
+ {
+ size_t n = strlen (p->a8);
+ sprintf (a8, "%s", p->a8); // { dg-bogus "-Wformat-overflow" }
+ sink (a8, n);
+ }
+
+ {
+ size_t n = strlen (p->a9);
+ sprintf (a8, "%s", p->a9); // { dg-warning "may write a terminating nul past the end " }
+ sink (a8, n);
+ }
+
+ {
+ size_t n = strlen (p->ax);
+ sprintf (a7, "%s", p->ax); // { dg-bogus "-Wformat-overflow" "pr??????" { xfail ilp32 } }
+ sink (a7, n);
+ }
+}
+
+
+/* Verify the warning with a pointer to an allocated object with nonstant
+ size in known range. */
+
+void test_alloc_5_8 (int n)
+{
+ if (n < 5 || 8 < n)
+ n = 5;
+
+ struct S *p = (struct S*)malloc (sizeof *p + n);
+ sink (p); // initialize *p
+
+ {
+ size_t n = strlen (p->a3);
+ sprintf (a4, "%s", p->a3); // { dg-bogus "-Wformat-overflow" }
+ sink (a4, n);
+ }
+
+ {
+ size_t n = strlen (p->a4);
+ sprintf (a4, "%s", p->a4); // { dg-bogus "-Wformat-overflow" }
+ sink (a4, n);
+ }
+
+ {
+ size_t n = strlen (p->a5);
+ sprintf (a4, "%s", p->a5); // { dg-warning "may write a terminating nul past the end" }
+ sink (a4, n);
+ }
+
+ {
+ size_t n = strlen (p->a7);
+ sprintf (a8, "%s", p->a7); // { dg-bogus "-Wformat-overflow" }
+ sink (a8, n);
+ }
+
+ {
+ size_t n = strlen (p->a8);
+ sprintf (a8, "%s", p->a8); // { dg-bogus "-Wformat-overflow" }
+ sink (a8, n);
+ }
+
+ {
+ size_t n = strlen (p->a9);
+ sprintf (a8, "%s", p->a9); // { dg-warning "may write a terminating nul past the end " }
+ sink (a8, n);
+ }
+
+ {
+ /* The size of the flexible array member p->ax is between 5 and 8
+ bytes so the length of the string stored in it is at most 7.
+ Verify the warning triggers based on its size and also gets
+ the length right. */
+ size_t n = strlen (p->ax);
+ sprintf (a4, "%s", p->ax); // { dg-warning "writing up to 7 bytes " }
+ sink (a4, n);
+ }
+
+ {
+ size_t n = strlen (p->ax);
+ sprintf (a8, "%s", p->ax);
+ sink (a8, n);
+ }
+}
+
+
+void test_ptr (struct S *p)
+{
+ {
+ size_t n = strlen (p->a3);
+ sprintf (a4, "%s", p->a3); // { dg-bogus "-Wformat-overflow" }
+ sink (a4, n);
+ }
+
+ {
+ size_t n = strlen (p->a4);
+ sprintf (a4, "%s", p->a4); // { dg-bogus "-Wformat-overflow" }
+ sink (a4, n);
+ }
+
+ {
+ size_t n = strlen (p->a5);
+ sprintf (a4, "%s", p->a5); // { dg-warning "may write a terminating nul past the end" }
+ sink (a4, n);
+ }
+
+ {
+ size_t n = strlen (p->a7);
+ sprintf (a8, "%s", p->a7); // { dg-bogus "-Wformat-overflow" }
+ sink (a8, n);
+ }
+
+ {
+ size_t n = strlen (p->a8);
+ sprintf (a8, "%s", p->a8); // { dg-bogus "-Wformat-overflow" }
+ sink (a8, n);
+ }
+
+ {
+ size_t n = strlen (p->a9);
+ sprintf (a8, "%s", p->a9); // { dg-warning "may write a terminating nul past the end " }
+ sink (a8, n);
+ }
+
+ {
+ size_t n = strlen (p->ax);
+ sprintf (a8, "%s", p->ax); // { dg-bogus "-Wformat-overflow" "pr??????" { xfail ilp32 } }
+ sink (a8, n);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c
index f90558e..9368a2e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c
@@ -3,7 +3,8 @@
constant folding. With optimization enabled the test will fail to
link if any of the assertions fails. Without optimization the test
aborts at runtime if any of the assertions fails. */
-/* { dg-do run } */
+/* { dg-do run { target c99_runtime } } */
+/* { dg-do link { target { ! c99_runtime } } } */
/* { dg-skip-if "not IEEE float layout" { "pdp11-*-*" } } */
/* { dg-additional-options "-O2 -Wall -Wno-pedantic -fprintf-return-value" } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/divide-6.c b/gcc/testsuite/gcc.dg/tree-ssa/divide-6.c
new file mode 100644
index 0000000..a9fc4c0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/divide-6.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+unsigned int f(unsigned int x) {
+ return 1 / x;
+}
+
+/* { dg-final { scan-tree-dump-not "1 / x_..D.;" "optimized" } } */
+/* { dg-final { scan-tree-dump "x_..D. == 1;" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/divide-7.c b/gcc/testsuite/gcc.dg/tree-ssa/divide-7.c
new file mode 100644
index 0000000..c605515
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/divide-7.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+int f(int x) {
+ return 1 / x;
+}
+
+/* { dg-final { scan-tree-dump-not "1 / x_\[0-9]\+\\\(D\\\);" "optimized" } } */
+/* { dg-final { scan-tree-dump " <= 2 \\? x_\[0-9]\+\\\(D\\\) : 0;" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/evrp-trans2.c b/gcc/testsuite/gcc.dg/tree-ssa/evrp-trans2.c
new file mode 100644
index 0000000..d6fe427
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/evrp-trans2.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-evrp" } */
+
+#define int unsigned
+#include "evrp-trans.c"
+
+/* { dg-final { scan-tree-dump-not "kill" "evrp" } } */
+/* { dg-final { scan-tree-dump-times "keep" 13 "evrp"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/evrp9.c b/gcc/testsuite/gcc.dg/tree-ssa/evrp9.c
index 6e7828e..fb7c319 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/evrp9.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/evrp9.c
@@ -24,5 +24,7 @@ foo (unsigned int x, unsigned int y)
bar ();
}
-/* { dg-final { scan-tree-dump-not "== 5" "evrp" } } */
-/* { dg-final { scan-tree-dump-not "== 6" "evrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate minv_.* == 5 to 0" 1 "evrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate minv_.* == 6 to 0" 1 "evrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate maxv_.* == 5 to 0" 1 "evrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate maxv_.* == 6 to 0" 1 "evrp" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c
index 707e630..a55231b 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-iftoswitch-optimized" } */
+/* Supplying case-values-threshold makes the testcase less target dependent. */
+/* { dg-options "-O2 -fdump-tree-iftoswitch-optimized --param case-values-threshold=4" } */
int IsMySuperRandomChar(int aChar)
{
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-5.c b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-5.c
index ceeae90..54771e6 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-5.c
@@ -4,8 +4,8 @@
int crud (unsigned char c)
{
return (((((((((((int) c == 46) || (int) c == 44)
- || (int) c == 58) || (int) c == 59) || (int) c == 60)
- || (int) c == 62) || (int) c == 34) || (int) c == 92)
+ || (int) c == 58) || (int) c == 60) || (int) c == 62)
+ || (int) c == 64) || (int) c == 34) || (int) c == 92)
|| (int) c == 39) != 0);
}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/inline-13.c b/gcc/testsuite/gcc.dg/tree-ssa/inline-13.c
new file mode 100644
index 0000000..94d8a9c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/inline-13.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-early-inlining -fdump-tree-fixup_cfg3" } */
+
+int n;
+
+static int
+bar (void)
+{
+ int a;
+
+ n = 0;
+ a = 0;
+
+ return n;
+}
+
+__attribute__ ((pure, returns_twice)) int
+foo (void)
+{
+ n = bar () + 1;
+ foo ();
+
+ return 0;
+}
+
+/* Abnormal edges should be properly elided after IPA inlining of bar. */
+/* { dg-final { scan-tree-dump-times "bb" 1 "fixup_cfg3" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopts-5.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-5.c
new file mode 100644
index 0000000..a6af497
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-5.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2 -fdump-tree-ivopts-details" } */
+
+int*
+foo (int* mem, int sz, int val)
+{
+ int i;
+ for (i = 0; i < sz; i++)
+ if (mem[i] == val)
+ return &mem[i];
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "inv_expr \[0-9\]: \\t\\(unsigned long\\) sz_\[0-9\]\\(D\\) \\* 4 \\+ \\(unsigned long\\) mem_\[0-9\]\\(D\\)" "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopts-6.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-6.c
new file mode 100644
index 0000000..8383154
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-6.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2 -fdump-tree-ivopts-details" } */
+
+int*
+foo (int* mem, int sz, int val)
+{
+ int i;
+ for (i = 0; i != sz; i++)
+ if (mem[i] == val)
+ return &mem[i];
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "inv_expr \[0-9\]: \\t\\(unsigned long\\) sz_\[0-9\]\\(D\\) \\* 4 \\+ \\(unsigned long\\) mem_\[0-9\]\\(D\\)" "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopts-7.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-7.c
new file mode 100644
index 0000000..44f5603
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-7.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2 -fdump-tree-ivopts-details" } */
+
+int*
+foo (int* mem, int beg, int end, int val)
+{
+ int i;
+ for (i = beg; i < end; i++)
+ if (mem[i] == val)
+ return &mem[i];
+ return 0;
+}
+/* { dg-final { scan-tree-dump "inv_expr \[0-9\]: \\t\\(unsigned long\\) \\(\\(unsigned int\\) end_\[0-9\]\\(D\\) - \\(unsigned int\\) beg_\[0-9\]\\(D\\)\\)" "ivopts" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopts-8.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-8.c
new file mode 100644
index 0000000..b2556ea
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-8.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-ivopts-details" } */
+
+int*
+foo (int* mem, char sz, int val)
+{
+ char i;
+ for (i = 0; i < sz; i++)
+ if (mem[i] == val)
+ return &mem[i];
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "inv_expr \[0-9\]: \\t\\(unsigned (long|int)\\) sz_\[0-9\]*\\(D\\) \\* 4 \\+ \\(unsigned (long|int)\\) mem_\[0-9\]*\\(D\\)" "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopts-9.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-9.c
new file mode 100644
index 0000000..d26d994
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopts-9.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-ivopts-details" } */
+
+int*
+foo (int* mem, unsigned char sz, int val)
+{
+ unsigned char i;
+ for (i = 0; i < sz; i++)
+ if (mem[i] == val)
+ return &mem[i];
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "inv_expr \[0-9\]: \\t\\(unsigned (long|int)\\) sz_\[0-9\]\\(D\\) \\* 4 \\+ \\(unsigned (long|int)\\) mem_\[0-9\]\\(D\\)" "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-1.c
index 6abfd27..bf6335f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-1.c
@@ -1,5 +1,6 @@
/* { dg-do run { target s390x-*-* } } */
/* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-details" } */
+/* { dg-additional-options "-march=z13 -mzarch" { target s390x-*-* } } */
/* { dg-final { scan-tree-dump-times "generated rawmemchrQI" 2 "ldist" { target s390x-*-* } } } */
/* { dg-final { scan-tree-dump-times "generated rawmemchrHI" 2 "ldist" { target s390x-*-* } } } */
/* { dg-final { scan-tree-dump-times "generated rawmemchrSI" 2 "ldist" { target s390x-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-2.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-2.c
index 00d6ea0..83f5a35 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-2.c
@@ -1,5 +1,6 @@
/* { dg-do run { target s390x-*-* } } */
/* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-details" } */
+/* { dg-additional-options "-march=z13 -mzarch" { target s390x-*-* } } */
/* { dg-final { scan-tree-dump-times "generated rawmemchrQI" 2 "ldist" { target s390x-*-* } } } */
/* { dg-final { scan-tree-dump-times "generated rawmemchrHI" 2 "ldist" { target s390x-*-* } } } */
/* { dg-final { scan-tree-dump-times "generated rawmemchrSI" 2 "ldist" { target s390x-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-1.c
index 918b600..aeb04b9 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-1.c
@@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-details" } */
+/* { dg-additional-options "-march=z13 -mzarch" { target s390x-*-* } } */
/* { dg-final { scan-tree-dump-times "generated strlenQI\n" 4 "ldist" } } */
/* { dg-final { scan-tree-dump-times "generated strlenHI\n" 4 "ldist" { target s390x-*-* } } } */
/* { dg-final { scan-tree-dump-times "generated strlenSI\n" 4 "ldist" { target s390x-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-3.c
index 370fd5e..0652857 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-details" } */
+/* { dg-additional-options "-march=z13 -mzarch" { target s390x-*-* } } */
/* { dg-final { scan-tree-dump-times "generated strlenSI\n" 1 "ldist" { target s390x-*-* } } } */
extern int s[];
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-4.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-4.c
new file mode 100644
index 0000000..eafb37e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-strlen-4.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-distribution -fno-tree-loop-distribute-patterns -fdump-tree-ldist-details" } */
+/* { dg-final { scan-tree-dump-not "generated strlen" "ldist" } } */
+
+/* Copied from gcc/testsuite/gcc.c-torture/execute/builtins/lib/strlen.c. */
+
+__SIZE_TYPE__
+foo (const char *s)
+{
+ __SIZE_TYPE__ i;
+
+ i = 0;
+ while (s[i] != 0)
+ i++;
+
+ return i;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-10.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-10.c
new file mode 100644
index 0000000..4a6d9e5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-10.c
@@ -0,0 +1,20 @@
+/* { dg-do link } */
+/* { dg-options "-O2 -fdump-tree-modref1" } */
+void linker_error ();
+__attribute__((noinline))
+int *
+test (int **a)
+{
+ return *a;
+}
+int
+main()
+{
+ int val;
+ int *a=&val;
+ int *b = test (&a);
+ if (b == (int *)&a)
+ linker_error ();
+ return 0;
+}
+/* { dg-final { scan-tree-dump "no_direct_clobber no_indirect_clobber no_direct_escape no_indirect_escape not_returned_directly no_indirect_read" "modref1"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-11.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-11.c
new file mode 100644
index 0000000..10ebe1f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-11.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-modref1 -fno-ipa-pure-const" } */
+struct linkedlist {
+ struct linkedlist *next;
+};
+struct linkedlist *
+find_last (struct linkedlist *l)
+{
+ while (l->next)
+ l = l->next;
+ return l;
+}
+/* { dg-final { scan-tree-dump "parm 0 flags: no_direct_clobber no_indirect_clobber no_direct_escape no_indirect_escape" "modref1"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-12.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-12.c
new file mode 100644
index 0000000..f8ce047
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-12.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+void foo ();
+int
+test()
+{
+ struct {int a,b;} a = {0,0};
+ __attribute__ ((noinline))
+ void nested ()
+ {
+ a.b++;
+ }
+ nested ();
+ return a.a;
+}
+/* { dg-final { scan-tree-dump "return 0" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-13.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-13.c
new file mode 100644
index 0000000..276711e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-13.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-release_ssa" } */
+struct wrap {
+ void **array;
+};
+__attribute__ ((noinline))
+void
+write_array (struct wrap *ptr)
+{
+ ptr->array[0]=0;
+}
+int
+test ()
+{
+ void *arrayval;
+ struct wrap w = {&arrayval};
+ write_array (&w);
+ return w.array == &arrayval;
+}
+/* We should deterine that write_array writes to PTR only indirectly. */
+/* { dg-final { scan-tree-dump "return 1" "release_ssa" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-14.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-14.c
new file mode 100644
index 0000000..986248f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-14.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wsuggest-attribute=const" } */
+struct a {int a,b,c;};
+__attribute__ ((noinline))
+int init (struct a *a)
+{
+ a->a=1;
+ a->b=2;
+ a->c=3;
+}
+int const_fn () /* { dg-warning "function might be candidate for attribute 'const" } */
+{
+ struct a a;
+ init (&a);
+ return a.a + a.b + a.c;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-15.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-15.c
new file mode 100644
index 0000000..06881f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-15.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-modref1" } */
+int test (int *a)
+{
+ int i;
+ for (i=0; a[i];i++);
+ return i+a[i];
+}
+/* { dg-final { scan-tree-dump "access: Parm 0" "modref1"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-5.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-5.c
index fde3177..0bee79d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/modref-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-5.c
@@ -24,4 +24,4 @@ main()
__builtin_abort ();
return 0;
}
-/* { dg-final { scan-tree-dump "parm 1 flags: nodirectescape" "modref1" } } */
+/* { dg-final { scan-tree-dump "parm 1 flags: no_direct_clobber no_direct_escape" "modref1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-6.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-6.c
index 2d97a49..7146389 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/modref-6.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-6.c
@@ -28,10 +28,10 @@ int test2()
return a;
}
/* Flags for normal call. */
-/* { dg-final { scan-tree-dump "parm 0 flags: direct noclobber noescape nodirectescape not_returned" "modref1" } } */
+/* { dg-final { scan-tree-dump "parm 0 flags: no_direct_clobber no_indirect_clobber no_direct_escape no_indirect_escape not_returned_directly not_returned_indirectly no_indirect_read" "modref1" } } */
/* Flags for pure call. */
-/* { dg-final { scan-tree-dump "parm 0 flags: direct not_returned" "modref1" } } */
+/* { dg-final { scan-tree-dump "parm 0 flags: not_returned_directly not_returned_indirectly no_indirect_read" "modref1" } } */
/* Flags for const call. */
-/* { dg-final { scan-tree-dump "parm 0 flags: not_returned" "modref1" } } */
+/* { dg-final { scan-tree-dump "parm 0 flags: not_returned_directly" "modref1" } } */
/* Overall we want to make "int a" non escaping. */
/* { dg-final { scan-tree-dump "return 42" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-7.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-7.c
index 53ffa1c..b55d706 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/modref-7.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-7.c
@@ -10,4 +10,4 @@ int test(struct a *a, int p)
a->array[0] = 1;
}
/* All three accesses combine to one bigger access. */
-/* { dg-final { scan-tree-dump-not "param=modref-max-accesses" "modref1" } } */
+/* { dg-final { scan-tree-dump-not "--param modref-max-accesses" "modref1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-8.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-8.c
index 15ae4ac..c51590f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/modref-8.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-8.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 --param modref-max-adjustments=8 -fdump-tree-modref1" } */
+/* { dg-options "-O2 --param modref-max-adjustments=8 -fdump-tree-modref1 -fno-optimize-sibling-calls" } */
/* { dg-do compile } */
void
set (char *p)
@@ -17,8 +17,8 @@ recurse (char *p, int n)
if (n)
recurse (p+1,n-1);
}
-/* { dg-final { scan-tree-dump-not "param=modref-max-accesses" "modref1" } } */
-/* { dg-final { scan-tree-dump "param=modref-max-adjustments" "modref1" } } */
+/* { dg-final { scan-tree-dump-not "--param modref-max-accesses" "modref1" } } */
+/* { dg-final { scan-tree-dump "--param modref-max-adjustments" "modref1" } } */
/* In set all accesses should merge together. */
/* { dg-final { scan-tree-dump "access: Parm 0 param offset:0 offset:0 size:8 max_size:40" "modref1" } } */
/* In recurse we should cap the recrusion after 8 attempts and set max_size to -1. */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-1.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-1.c
new file mode 100644
index 0000000..1f80cc5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dse1-details" } */
+volatile int *ptr;
+struct a {
+ int a,b,c;
+} a;
+__attribute__((noinline))
+static int init (struct a*a)
+{
+ a->a=0;
+ a->b=1;
+}
+__attribute__((noinline))
+static int use (struct a*a)
+{
+ if (a->c != 3)
+ *ptr=5;
+}
+
+void
+main(void)
+{
+ struct a a;
+ init (&a);
+ a.c=3;
+ use (&a);
+}
+/* { dg-final { scan-tree-dump "Deleted dead store: init" "dse1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-2.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-2.c
new file mode 100644
index 0000000..e41d065
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-2.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dse2-details" } */
+volatile int *ptr;
+struct a {
+ int a,b,c;
+} a;
+__attribute__((noinline))
+static int init (struct a*a)
+{
+ a->a=0;
+ a->b=1;
+ a->c=1;
+}
+__attribute__((noinline))
+static int use (struct a*a)
+{
+ if (a->c != 3)
+ *ptr=5;
+}
+
+void
+main(void)
+{
+ struct a a;
+ init (&a);
+ a.c=3;
+ use (&a);
+}
+/* Only DSE2 is tracking live bytes needed to figure out that store to c is
+ also dead above. */
+/* { dg-final { scan-tree-dump "Deleted dead store: init" "dse2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-3.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-3.c
new file mode 100644
index 0000000..c69e423
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-3.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dse1-details" } */
+__attribute__ ((noinline))
+void write (int *a)
+{
+ *a=1;
+ a[1]=2;
+}
+int test ()
+{
+ int a;
+ a=2;
+ write (&a);
+ return a;
+}
+int test2 (int *a)
+{
+ *a=2;
+ write (a);
+ return *a;
+}
+/* { dg-final { scan-tree-dump-times "Deleted dead store" 2 "dse1"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-4.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-4.c
new file mode 100644
index 0000000..19e91b0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-4.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dse1-details" } */
+struct a {int a,b,c;};
+__attribute__ ((noinline))
+void
+kill_me (struct a *a)
+{
+ a->a=0;
+ a->b=0;
+ a->c=0;
+}
+__attribute__ ((noinline))
+void
+my_pleasure (struct a *a)
+{
+ a->a=1;
+ a->c=2;
+}
+void
+set (struct a *a)
+{
+ kill_me (a);
+ my_pleasure (a);
+ a->b=1;
+}
+/* { dg-final { scan-tree-dump "Deleted dead store: kill_me" "dse1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-5.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-5.c
new file mode 100644
index 0000000..dc2c289
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-5.c
@@ -0,0 +1,42 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dse1-details" } */
+struct a {int a,b,c;};
+__attribute__ ((noinline))
+void
+kill_me (struct a *a)
+{
+ a->a=0;
+ a->b=0;
+ a->c=0;
+}
+__attribute__ ((noinline))
+int
+wrap(int b, struct a *a)
+{
+ kill_me (a);
+ return b;
+}
+__attribute__ ((noinline))
+void
+my_pleasure (struct a *a)
+{
+ a->a=1;
+ a->c=2;
+}
+__attribute__ ((noinline))
+int
+wrap2(int b, struct a *a)
+{
+ my_pleasure (a);
+ return b;
+}
+
+int
+set (struct a *a)
+{
+ wrap (0, a);
+ int ret = wrap2 (0, a);
+ a->b=1;
+ return ret;
+}
+/* { dg-final { scan-tree-dump "Deleted dead store: wrap" "dse1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-6.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-6.c
new file mode 100644
index 0000000..d1e45a8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-dse-6.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+int
+main()
+{
+ int a,b;
+ __attribute__ ((noinline))
+ void kill_me()
+ {
+ a=1234;
+ b=2234;
+ }
+ a=0;
+ b=1234;
+ __attribute__ ((noinline))
+ int reta()
+ {
+ return a;
+ }
+ return reta();
+}
+/* { dg-final { scan-tree-dump-not "kill_me" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "1234" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/nonzero-1.c b/gcc/testsuite/gcc.dg/tree-ssa/nonzero-1.c
index c9d438e..aa21b71 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/nonzero-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/nonzero-1.c
@@ -1,12 +1,13 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdelete-null-pointer-checks" } */
+/* { dg-options "-O2 -fdelete-null-pointer-checks -fdump-tree-optimized" } */
/* { dg-require-weak "" } */
/* { dg-skip-if "" keeps_null_pointer_checks } */
-extern int a; /* { dg-error "declared weak after being used" } */
+extern int a;
int
t()
{
+ /* { dg-final { scan-tree-dump "&a != 0" "optimized" } } */
return &a!=0;
}
extern int a __attribute__ ((weak));
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/nonzero-1a.c b/gcc/testsuite/gcc.dg/tree-ssa/nonzero-1a.c
new file mode 100644
index 0000000..3d1eb97
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/nonzero-1a.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdelete-null-pointer-checks -fdump-tree-optimized" } */
+
+/* { dg-skip-if "" keeps_null_pointer_checks } */
+extern int a;
+int
+t()
+{
+ /* { dg-final { scan-tree-dump-not "&a != 0" "optimized" } } */
+ return &a!=0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-26.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-26.c
new file mode 100644
index 0000000..21aa66e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-26.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fgimple -fdump-tree-phiopt1" } */
+
+int __GIMPLE (ssa,startwith("phiopt"))
+foo (int a, int b, int flag)
+{
+ int res;
+
+ __BB(2):
+ if (flag_2(D) != 0)
+ goto __BB6;
+ else
+ goto __BB4;
+
+ __BB(4):
+ if (a_3(D) > b_4(D))
+ goto __BB7;
+ else
+ goto __BB6;
+
+ __BB(6):
+ goto __BB7;
+
+ __BB(7):
+ res_1 = __PHI (__BB4: a_3(D), __BB6: b_4(D));
+ return res_1;
+}
+
+/* We should be able to detect MAX despite the extra edge into
+ the middle BB. */
+/* { dg-final { scan-tree-dump "MAX" "phiopt1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-1.c b/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-1.c
index 59663dd..be504dd 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Ofast -fdump-tree-vrp-thread1" } */
+/* { dg-options "-Ofast -fdump-tree-dom2" } */
void g (int);
void g1 (int);
@@ -27,4 +27,9 @@ f (long a, long b, long c, long d, long x)
g (a);
}
-/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "vrp-thread1" } } */
+/* This is actually a regression. The backward threader cannot thread
+ the above scenario, but it is being caught by the DOM threader
+ which still uses the forward threader. We should implement this
+ optimization in the backward threader before killing the forward
+ threader. Similarly for the other phi_on_compare-*.c tests. */
+/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "dom2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-2.c b/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-2.c
index 0c2f6e0..b186570 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Ofast -fdump-tree-vrp-thread1" } */
+/* { dg-options "-Ofast -fdump-tree-dom2" } */
void g (void);
void g1 (void);
@@ -20,4 +20,4 @@ f (long a, long b, long c, long d, int x)
}
}
-/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "vrp-thread1" } } */
+/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "dom2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-3.c b/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-3.c
index 6a3d359..b48ecbf 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Ofast -fdump-tree-vrp-thread1" } */
+/* { dg-options "-Ofast -fdump-tree-dom2" } */
void g (void);
void g1 (void);
@@ -22,4 +22,4 @@ f (long a, long b, long c, long d, int x)
}
}
-/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "vrp-thread1" } } */
+/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "dom2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-4.c b/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-4.c
index 9bc4c6d..1e09f89 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Ofast -fdump-tree-vrp-thread1" } */
+/* { dg-options "-Ofast -fdump-tree-dom2" } */
void g (int);
void g1 (int);
@@ -37,4 +37,4 @@ f (long a, long b, long c, long d, int x)
g (c + d);
}
-/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "vrp-thread1" } } */
+/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "dom2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr100278.c b/gcc/testsuite/gcc.dg/tree-ssa/pr100278.c
deleted file mode 100644
index 8d70228..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr100278.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
-
-void a()
-{
-#if defined __s390__
- register int b asm("r5");
-#elif defined __x86_64__
- register int b asm("eax");
-#else
- volatile int b;
-#endif
- if (b)
- b = 1;
- for (; b;)
- ;
-}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr100359.c b/gcc/testsuite/gcc.dg/tree-ssa/pr100359.c
new file mode 100644
index 0000000..2924352
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr100359.c
@@ -0,0 +1,31 @@
+/* { dg-do link } */
+/* { dg-options "-O3 -fdump-tree-cunrolli-optimized" } */
+
+extern void foo(void);
+static int b, f, *a = &b;
+int **c = &a;
+static void d() {
+ int g, h;
+ for (f = 0; f < 1; f++) {
+ int *i = &b;
+ {
+ int *j[3], **k = &a;
+ for (g = 0; g < 3; g++)
+ for (h = 0; h < 1; h++)
+ j[g] = &b;
+ *k = j[0];
+ }
+ *c = i;
+ }
+}
+int main() {
+ d();
+ *a = 0;
+ if (**c)
+ foo();
+ return 0;
+}
+
+/* Verify that we unroll the inner loop early even with -O3. */
+/* { dg-final { scan-tree-dump "loop with 1 iterations completely unrolled" "cunrolli" } } */
+/* { dg-final { scan-tree-dump "loop with 3 iterations completely unrolled" "cunrolli" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr100453.c b/gcc/testsuite/gcc.dg/tree-ssa/pr100453.c
deleted file mode 100644
index 0cf0ad2..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr100453.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* { dg-do run } */
-/* { dg-options "-O1" } */
-
-struct a {
- int b : 4;
-} d;
-static int c, e;
-static const struct a f;
-static void g(const struct a h) {
- for (; c < 1; c++)
- d = h;
- e = h.b;
- c = h.b;
-}
-int main() {
- g(f);
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr101189.c b/gcc/testsuite/gcc.dg/tree-ssa/pr101189.c
deleted file mode 100644
index 5730708..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr101189.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* PR tree-optimization/101189 */
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
-
-static int a, b;
-int main() {
- int d = 0, e, f = 5;
- if (a)
- f = 0;
- for (; f < 4; f++)
- ;
- e = f ^ -f;
- e && d;
- if (!e)
- e || b;
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr101335.c b/gcc/testsuite/gcc.dg/tree-ssa/pr101335.c
deleted file mode 100644
index 921362c..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr101335.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do run } */
-/* { dg-options "-O2" } */
-
-unsigned a = 0xFFFFFFFF;
-int b;
-int main()
-{
- int c = ~a;
- unsigned d = c - 10;
- if (d > c)
- c = 20;
- b = -(c | 0);
- if (b > -8)
- __builtin_abort ();
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr101941-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr101941-1.c
new file mode 100644
index 0000000..a1a342a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr101941-1.c
@@ -0,0 +1,53 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fconserve-stack -fdump-tree-optimized" } */
+/* Check to make sure that if
+ rfc4106_set_hash_subkey gets split,
+ the error function does not gets split away
+ from the if statement conditionalizing it.
+ Checking this via the scan tree also. */
+struct crypto_aes_ctx {
+ char key_dec[128];
+};
+
+int rfc4106_set_hash_subkey_hash_subkey;
+
+void __write_overflow(void)__attribute__((__error__("")));
+void __write_overflow1(void);
+void aes_encrypt(void*);
+
+void fortify_panic(const char*) __attribute__((__noreturn__)) ;
+
+char *rfc4106_set_hash_subkey(struct crypto_aes_ctx *ctx) {
+ void *a = &ctx->key_dec[0];
+ unsigned p_size = __builtin_object_size(a, 0);
+#ifdef __OPTIMIZE__
+ if (p_size < 16) {
+ __write_overflow1();
+ fortify_panic(__func__);
+ }
+ if (p_size < 32) {
+ __write_overflow();
+ fortify_panic(__func__);
+ }
+#endif
+ aes_encrypt(ctx);
+ return ctx->key_dec;
+}
+
+char *(*gg)(struct crypto_aes_ctx *) = rfc4106_set_hash_subkey;
+
+void a(void)
+{
+ struct crypto_aes_ctx ctx;
+ rfc4106_set_hash_subkey(&ctx);
+}
+void b(void)
+{
+ struct crypto_aes_ctx ctx;
+ ctx.key_dec[0] = 0;
+ rfc4106_set_hash_subkey(&ctx);
+}
+
+/* This testcase should still split out one of the above basic blocks dealing
+ with __write_overflow. */
+/* { dg-final { scan-tree-dump-times "Function rfc4106_set_hash_subkey.part" 1 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr102232.c b/gcc/testsuite/gcc.dg/tree-ssa/pr102232.c
new file mode 100644
index 0000000..62bca69
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr102232.c
@@ -0,0 +1,52 @@
+/* PR tree-optimization/102232 */
+/* { dg-do run } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+int __attribute__ ((noipa)) foo (int a, int b)
+{
+ return b * (1 + a / b) - a;
+}
+
+int
+main (void)
+{
+ // few randomly generated test cases
+ if (foo (71856034, 238) != 212)
+ {
+ __builtin_abort ();
+ }
+ if (foo (71856034, 10909) != 1549)
+ {
+ __builtin_abort ();
+ }
+ if (foo (20350, 1744) != 578)
+ {
+ __builtin_abort ();
+ }
+ if (foo (444813, 88563) != 86565)
+ {
+ __builtin_abort ();
+ }
+ if (foo (112237, 63004) != 13771)
+ {
+ __builtin_abort ();
+ }
+ if (foo (68268386, 787116) != 210706)
+ {
+ __builtin_abort ();
+ }
+ if (foo (-444813, 88563) != 90561)
+ {
+ __builtin_abort ();
+ }
+ if (foo (-68268386, 787116) != 1363526)
+ {
+ __builtin_abort ();
+ }
+
+ return 0;
+}
+
+/* Verify that multiplication and division has been removed. */
+/* { dg-final { scan-tree-dump-not " \\* " "optimized" } } */
+/* { dg-final { scan-tree-dump-not " / " "optimized" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr102880.c b/gcc/testsuite/gcc.dg/tree-ssa/pr102880.c
new file mode 100644
index 0000000..0306dee
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr102880.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+void foo(void);
+
+static int b, c, d, e, f, ah;
+static short g, ai, am, aq, as;
+static char an, at, av, ax, ay;
+static char a(char h, char i) { return i == 0 || h && i == 1 ? 0 : h % i; }
+static void ae(int h) {
+ if (a(b, h))
+ foo();
+
+}
+int main() {
+ ae(1);
+ ay = a(0, ay);
+ ax = a(g, aq);
+ at = a(0, as);
+ av = a(c, 1);
+ an = a(am, f);
+ int al = e || ((a(1, ah) && b) & d) == 2;
+ ai = al;
+}
+
+/* We should eliminate the call to foo. */
+/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr102906.c b/gcc/testsuite/gcc.dg/tree-ssa/pr102906.c
new file mode 100644
index 0000000..1846f0b6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr102906.c
@@ -0,0 +1,17 @@
+// { dg-do compile }
+// { dg-options "-Os -fdump-tree-ch-details" }
+
+extern unsigned int foo (int*) __attribute__((pure));
+
+unsigned int
+tr2 (int array[], int n)
+{
+ unsigned int sum = 0;
+ int x;
+ if (n > 0)
+ for (x = 0; x < n; x++)
+ sum += foo (&array[x]);
+ return sum;
+}
+
+// { dg-final { scan-tree-dump-not "Not duplicating.*optimizing for size" "ch2" } }
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr102951.c b/gcc/testsuite/gcc.dg/tree-ssa/pr102951.c
new file mode 100644
index 0000000..42b6fe6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr102951.c
@@ -0,0 +1,41 @@
+/* PR tree-optimization/102951 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-ccp1" } */
+/* { dg-final { scan-tree-dump-times "return \&a\\\[1\\\];" 2 "ccp1" } } */
+/* { dg-final { scan-tree-dump-times "return \&a\\\[4\\\];" 2 "ccp1" } } */
+/* { dg-final { scan-tree-dump-not "MIN_EXPR" "ccp1" } } */
+/* { dg-final { scan-tree-dump-not "MAX_EXPR" "ccp1" } } */
+
+extern int a[5];
+
+int *
+foo (void)
+{
+ int *p1 = &a[1];
+ int *p2 = &a[2];
+ return p1 < p2 ? p1 : p2;
+}
+
+int *
+bar (void)
+{
+ int *p1 = &a[1];
+ int *p2 = &a[2];
+ return p1 <= p2 ? p1 : p2;
+}
+
+int *
+baz (void)
+{
+ int *p1 = &a[3];
+ int *p2 = &a[4];
+ return p1 > p2 ? p1 : p2;
+}
+
+int *
+qux (void)
+{
+ int *p1 = &a[3];
+ int *p2 = &a[4];
+ return p1 >= p2 ? p1 : p2;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr103218-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr103218-1.c
new file mode 100644
index 0000000..f086f07
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr103218-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* PR tree-optimization/103218 */
+
+/* These first two are removed during forwprop1 */
+signed char f(signed char a)
+{
+ signed char t = a < 0;
+ int tt = (unsigned char)(t << 7);
+ return tt;
+}
+signed char f0(signed char a)
+{
+ unsigned char t = a < 0;
+ int tt = (unsigned char)(t << 7);
+ return tt;
+}
+
+/* This one is removed during phiopt. */
+signed char f1(signed char a)
+{
+ if (a < 0)
+ return 1u<<7;
+ return 0;
+}
+
+/* These three examples should remove "a < 0" by optimized. */
+/* { dg-final { scan-tree-dump-times "< 0" 0 "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr103220-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr103220-1.c
new file mode 100644
index 0000000..f2ef3f1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr103220-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+unsigned char f(unsigned char a)
+{
+ signed char d = (signed char) a;
+ signed char e = d & ~1;
+ unsigned char t = e;
+ t &= ~2;
+ return t;
+}
+/* The above should reduce down to just & 252 rather than keping
+ the two &s there. */
+/* { dg-final { scan-tree-dump-times "& 252" 1 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "& -2" 0 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "& 253" 0 "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr103220-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr103220-2.c
new file mode 100644
index 0000000..25d7412
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr103220-2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+signed char f(unsigned char a)
+{
+ unsigned char b = a & 127;
+ signed char c = (signed char) b;
+ signed char d = (signed char) a;
+ signed char e = d & -128;
+ signed char h = c | e;
+ return h;
+}
+/* The above should reduce down to just return with a cast.
+ removing the two &s there and |'s. */
+/* { dg-final { scan-tree-dump-times "& 127" 0 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "& -128" 0 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "\\\| " 0 "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr103228-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr103228-1.c
new file mode 100644
index 0000000..a753981
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr103228-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+int f(int a, int b)
+{
+ b|=1u;
+ b|=2;
+ return b;
+}
+/* { dg-final { scan-tree-dump-times "\\\| 3" 1 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "\\\| 1" 0 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "\\\| 2" 0 "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr103245-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr103245-1.c
new file mode 100644
index 0000000..68ddead
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr103245-1.c
@@ -0,0 +1,25 @@
+/* PR tree-optimization/103245 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-times " = ABSU_EXPR <v_\[0-9]*\\\(D\\\)>;" 1 "optimized" } } */
+
+unsigned
+f1 (int v)
+{
+ unsigned int d_6;
+ int b_5;
+ int a_4;
+ _Bool _1;
+ unsigned int v1_2;
+ unsigned int _7;
+ int _9;
+
+ _1 = v < 0;
+ a_4 = (int) _1;
+ b_5 = -a_4;
+ _9 = b_5 | 1;
+ d_6 = (unsigned int) _9;
+ v1_2 = (unsigned int) v;
+ _7 = v1_2 * d_6;
+ return _7;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr103257-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr103257-1.c
new file mode 100644
index 0000000..89f4f44
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr103257-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+void link_error(void);
+unsigned b, c;
+static short a(short e, short f) { return e * f; }
+int main() {
+ if (a(1 ^ ((0, 0) ^ 1 && b) <= b, c))
+ link_error ();
+ c = 0;
+}
+/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c b/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c
new file mode 100644
index 0000000..dc8810a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c
@@ -0,0 +1,53 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-bswap-details" } */
+
+typedef unsigned int uint32_t;
+typedef unsigned char uint8_t;
+
+uint32_t load_le_32_or(const uint8_t *ptr)
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ return ((uint32_t)ptr[0]) |
+ ((uint32_t)ptr[1] << 8) |
+ ((uint32_t)ptr[2] << 16) |
+ ((uint32_t)ptr[3] << 24);
+#else
+ return ((uint32_t)ptr[3]) |
+ ((uint32_t)ptr[2] << 8) |
+ ((uint32_t)ptr[1] << 16) |
+ ((uint32_t)ptr[0] << 24);
+#endif
+}
+
+uint32_t load_le_32_add(const uint8_t *ptr)
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ return ((uint32_t)ptr[0]) +
+ ((uint32_t)ptr[1] << 8) +
+ ((uint32_t)ptr[2] << 16) +
+ ((uint32_t)ptr[3] << 24);
+#else
+ return ((uint32_t)ptr[3]) +
+ ((uint32_t)ptr[2] << 8) +
+ ((uint32_t)ptr[1] << 16) +
+ ((uint32_t)ptr[0] << 24);
+#endif
+}
+
+uint32_t load_le_32_xor(const uint8_t *ptr)
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ return ((uint32_t)ptr[0]) ^
+ ((uint32_t)ptr[1] << 8) ^
+ ((uint32_t)ptr[2] << 16) ^
+ ((uint32_t)ptr[3] << 24);
+#else
+ return ((uint32_t)ptr[3]) ^
+ ((uint32_t)ptr[2] << 8) ^
+ ((uint32_t)ptr[1] << 16) ^
+ ((uint32_t)ptr[0] << 24);
+#endif
+}
+
+/* { dg-final { scan-tree-dump-times "32 bit load in target endianness found" 3 "bswap" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr103514.c b/gcc/testsuite/gcc.dg/tree-ssa/pr103514.c
new file mode 100644
index 0000000..2e81335
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr103514.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-O --param logical-op-non-short-circuit=1 -fdump-tree-optimized" } */
+#include <stdbool.h>
+
+bool
+i (bool a, bool b)
+{
+ return (a & b) ^ (a == b);
+}
+
+bool
+j (bool a, bool b)
+{
+ return (a & b) == (a ^ b);
+}
+
+bool
+g (bool a, bool b)
+{
+ return (a && b) == (a ^ b);
+}
+
+bool
+h (bool a, bool b)
+{
+ return (a && b) ^ (a == b);
+}
+
+
+/* Make sure we have removed "==" and "^" and "&". */
+/* { dg-final { scan-tree-dump-not "&" "optimized"} } */
+/* { dg-final { scan-tree-dump-not "\\^" "optimized"} } */
+/* { dg-final { scan-tree-dump-not "==" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr20701.c b/gcc/testsuite/gcc.dg/tree-ssa/pr20701.c
index 496c425..f05076c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr20701.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr20701.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1 -fno-early-inlining -fdelete-null-pointer-checks -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdump-tree-vrp1 -fno-early-inlining -fdelete-null-pointer-checks -fno-thread-jumps" } */
typedef struct {
int code;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
index 4ea5f21..f9216a4 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
@@ -5,7 +5,7 @@
range information out of the conditional. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fno-thread-jumps -fdump-tree-vrp1-details" } */
/* { dg-additional-options "-fdisable-tree-ethread -fdisable-tree-thread1" } */
int
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c
index b9edabc..8c8f447 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c
@@ -4,8 +4,7 @@
allows us to eliminate the second "if" statement. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdisable-tree-evrp -fdump-tree-vrp1-details" } */
-/* { dg-additional-options "-fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdisable-tree-evrp -fdisable-tree-ethread -fdisable-tree-threadfull1 -fdump-tree-vrp1-details" } */
struct f {
int i;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21417.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21417.c
index b934c9c..36d9cb0 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr21417.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21417.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdisable-tree-thread3 -fdump-tree-thread4-details" } */
+/* { dg-options "-O2 -fdump-tree-thread2-details" } */
struct tree_common
{
@@ -49,5 +49,5 @@ L23:
/* We should thread the backedge to the top of the loop; ie we only
execute the if (expr->common.code != 142) test once per loop
iteration. */
-/* { dg-final { scan-tree-dump-times "jump thread" 1 "thread4" } } */
+/* { dg-final { scan-tree-dump-times "jump thread" 1 "thread2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21458-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21458-2.c
index f8d7353..9610570 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr21458-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21458-2.c
@@ -16,4 +16,4 @@ foo (int a)
}
}
-/* { dg-final { scan-tree-dump-times "Predicate evaluates to: 1" 1 "evrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate.* to 1" 1 "evrp" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
index 43f046e..83b7c80 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-evrp-details -fdump-tree-vrp-thread1-details" } */
+/* { dg-options "-O2 -fdump-tree-evrp-details" } */
static int blocksize = 4096;
@@ -34,8 +34,3 @@ void foo (void)
/* First, we should simplify the bits < 0 test within the loop. */
/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "evrp" } } */
-
-/* We used to check for 3 threaded jumps here, but they all would
- rotate the loop. */
-
-
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c
index 72dce83..504b3cc 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c
@@ -2,7 +2,7 @@
Make sure VRP folds the second "if" statement. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdisable-tree-evrp -fdump-tree-vrp1-details -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fno-thread-jumps -fdisable-tree-evrp -fdump-tree-vrp1-details" } */
int
foo (int a)
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c
index ba3fda3..f70f254 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-ccp -fdisable-tree-evrp -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-ccp -fdisable-tree-evrp -fdump-tree-vrp1" } */
void h (void);
@@ -17,4 +17,5 @@ int g (int i, int j)
return 1;
}
-/* { dg-final { scan-tree-dump-times "gimple_simplified" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "return 0" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-not "return 1" "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c b/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c
index a2044d0..102b073 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c
@@ -1,6 +1,6 @@
/* PR tree-optimization/49039 */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1 -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1 -fno-thread-jumps" } */
extern void bar (void);
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr55177-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr55177-1.c
new file mode 100644
index 0000000..de1a264
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr55177-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+extern int x;
+
+void foo(void)
+{
+ int a = __builtin_bswap32(x);
+ a &= 0x5a5b5c5d;
+ x = __builtin_bswap32(a);
+}
+
+/* { dg-final { scan-tree-dump-times "__builtin_bswap32" 0 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "& 1566333786" 1 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "& 1515936861" 0 "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c b/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c
index 764b3fe..0f66aae 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Ofast -fdump-tree-vrp-thread1-details" } */
+/* { dg-options "-Ofast -fdisable-tree-cunrolli -fdump-tree-threadfull1-details" } */
typedef unsigned short u16;
typedef unsigned char u8;
@@ -56,7 +56,8 @@ main (int argc, char argv[])
return crc;
}
-/* None of the threads we can get in vrp-thread1 are valid. They all
- cross or rotate loops. */
-/* { dg-final { scan-tree-dump-not "Registering jump thread" "vrp-thread1" } } */
-/* { dg-final { scan-tree-dump-not "joiner" "vrp-thread1" } } */
+/* We used to have no threads in vrp-thread1 because all the attempted
+ ones would cross loops. Now we get 30+ threads before VRP because
+ of loop unrolling. A better option is to disable unrolling and
+ test for the original 4 threads that this test was testing. */
+/* { dg-final { scan-tree-dump-times "Registering jump thread" 4 "threadfull1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr61839_1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr61839_1.c
index 0229a82..f5af7a1 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr61839_1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr61839_1.c
@@ -1,6 +1,6 @@
/* PR tree-optimization/61839. */
/* { dg-do run } */
-/* { dg-options "-O2 -fdump-tree-vrp-thread1 -fdisable-tree-evrp -fdump-tree-optimized -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdisable-tree-evrp -fdisable-tree-ethread -fdisable-tree-threadfull1 -fdump-tree-vrp1 -fdump-tree-optimized" } */
/* { dg-require-effective-target int32plus } */
__attribute__ ((noinline))
@@ -38,11 +38,11 @@ int main ()
}
/* Scan for c = 972195717) >> [0, 1] in function foo. */
-/* { dg-final { scan-tree-dump-times "486097858 : 972195717" 1 "vrp-thread1" } } */
+/* { dg-final { scan-tree-dump-times "486097858 : 972195717" 1 "vrp1" } } */
/* Previously we were checking for two ?: with constant PHI arguments,
but now we collapse them into one. */
/* Scan for c = 972195717) >> [2, 3] in function bar. */
-/* { dg-final { scan-tree-dump-times "243048929 : 121524464" 1 "vrp-thread1" } } */
+/* { dg-final { scan-tree-dump-times "243048929 : 121524464" 1 "vrp1" } } */
/* { dg-final { scan-tree-dump-times "486097858" 0 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr61839_3.c b/gcc/testsuite/gcc.dg/tree-ssa/pr61839_3.c
index 7be1873..bc2126f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr61839_3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr61839_3.c
@@ -1,6 +1,6 @@
/* PR tree-optimization/61839. */
/* { dg-do run } */
-/* { dg-options "-O2 -fdump-tree-vrp-thread1 -fdump-tree-optimized -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdump-tree-vrp -fdump-tree-optimized -fdisable-tree-ethread -fdisable-tree-threadfull1" } */
__attribute__ ((noinline))
int foo (int a, unsigned b)
@@ -22,5 +22,5 @@ int main ()
}
/* Scan for c [12, 13] << 8 in function foo. */
-/* { dg-final { scan-tree-dump-times "3072 : 3328" 1 "vrp-thread1" } } */
+/* { dg-final { scan-tree-dump-times "3072 : 3328" 1 "vrp1" } } */
/* { dg-final { scan-tree-dump-times "3072" 0 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c b/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c
index ba7025a..e9bb744 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-thread1-details -fdump-tree-thread4" } */
+/* { dg-options "-O2 -fdump-tree-threadfull1-details -fdump-tree-thread2" } */
extern int status, pt;
extern int count;
@@ -35,7 +35,7 @@ foo (int N, int c, int b, int *a)
/* There are 2 jump threading opportunities (which don't cross loops),
all of which will be realized, which will eliminate testing of
FLAG, completely. */
-/* { dg-final { scan-tree-dump-times "Registering jump" 2 "thread1"} } */
+/* { dg-final { scan-tree-dump-times "Registering jump" 2 "threadfull1"} } */
/* We used to remove references to FLAG by DCE2, but this was
depending on early threaders threading through loop boundaries
@@ -43,4 +43,4 @@ foo (int N, int c, int b, int *a)
run after loop optimizations , can successfully eliminate the
references to FLAG. Verify that ther are no references by the late
threading passes. */
-/* { dg-final { scan-tree-dump-not "if .flag" "thread4"} } */
+/* { dg-final { scan-tree-dump-not "if .flag" "thread2"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr68198.c b/gcc/testsuite/gcc.dg/tree-ssa/pr68198.c
index af8b7a5..1250729 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr68198.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr68198.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-thread1-details -fdisable-tree-ethread" } */
+/* { dg-options "-O2 -fdump-tree-threadfull1-details -fdisable-tree-ethread" } */
extern void abort (void);
@@ -38,4 +38,4 @@ c_finish_omp_clauses (tree clauses)
}
/* There are 3 jump threading opportunities. */
-/* { dg-final { scan-tree-dump-times "Registering jump" 3 "thread1"} } */
+/* { dg-final { scan-tree-dump-times "Registering jump" 3 "threadfull1"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr69270-3.c b/gcc/testsuite/gcc.dg/tree-ssa/pr69270-3.c
index 89735f6..5ffd5f7 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr69270-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr69270-3.c
@@ -3,7 +3,7 @@
/* We're looking for a constant argument a PHI node. There
should only be one if we unpropagate correctly. */
-/* { dg-final { scan-tree-dump-times ", 1" 1 "uncprop1"} } */
+/* { dg-final { scan-tree-dump-times "<1\|, 1" 1 "uncprop1"} } */
typedef long unsigned int size_t;
typedef union gimple_statement_d *gimple;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr76174.c b/gcc/testsuite/gcc.dg/tree-ssa/pr76174.c
new file mode 100644
index 0000000..17a4a0f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr76174.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-cddce1" } */
+
+void foo();
+
+void l(unsigned int r) {
+ unsigned int q = 0;
+ unsigned int c = r;
+ for (unsigned int x = 0; x<r; x++) {
+ if (q == c) {
+ foo();
+ c *= 2;
+ }
+ q++;
+ }
+}
+
+/* We should be able to elide the body of the function by means of
+ figuring out the equality between the two IVs and then simplifying
+ the q == c test. */
+/* { dg-final { scan-tree-dump-not "foo" "cddce1" } } */
+/* { dg-final { scan-tree-dump-times "bb" 1 "cddce1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c
index f2a5e78..b3db1bc 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-thread-details-blocks-stats" } */
+/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-thread-details-blocks-stats -fdump-tree-threadfull1-blocks-stats -fdump-tree-threadfull2-blocks-stats" } */
typedef enum STATES {
START=0,
INVALID,
@@ -123,8 +123,8 @@ enum STATES FMS( u8 **in , u32 *transitions) {
aarch64 has the highest CASE_VALUES_THRESHOLD in GCC. It's high enough
to change decisions in switch expansion which in turn can expose new
jump threading opportunities. Skip the later tests on aarch64. */
-/* { dg-final { scan-tree-dump "Jumps threaded: \[7-9\]" "thread2" } } */
+/* { dg-final { scan-tree-dump "Jumps threaded: \[7-9\]" "thread1" } } */
/* { dg-final { scan-tree-dump-not "optimizing for size" "thread1" } } */
-/* { dg-final { scan-tree-dump-not "optimizing for size" "thread2" } } */
-/* { dg-final { scan-tree-dump-not "optimizing for size" "thread3" { target { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-tree-dump-not "optimizing for size" "thread4" { target { ! aarch64*-*-* } } } } */
+/* { dg-final { scan-tree-dump-not "optimizing for size" "threadfull1" } } */
+/* { dg-final { scan-tree-dump-not "optimizing for size" "thread2" { target { ! aarch64*-*-* } } } } */
+/* { dg-final { scan-tree-dump-not "optimizing for size" "threadfull2" { target { ! aarch64*-*-* } } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr77445.c b/gcc/testsuite/gcc.dg/tree-ssa/pr77445.c
index 883a63d..72bf0ec 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr77445.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr77445.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-thread3-details-blocks -fno-early-inlining -fno-tree-vrp -fno-tree-dominator-opts" } */
+/* { dg-options "-O2 -fno-early-inlining -fno-tree-vrp -fno-tree-dominator-opts -fdump-tree-thread2-details-blocks" } */
static int a;
static int b;
@@ -25,5 +25,5 @@ main (int argc)
if (b)
test2 ();
}
-/* { dg-final { scan-tree-dump-times "Registering jump thread" 2 "thread3" } } */
-/* { dg-final { scan-tree-dump-not "Invalid sum" "thread3" } } */
+/* { dg-final { scan-tree-dump-times "Registering jump thread" 2 "thread2" } } */
+/* { dg-final { scan-tree-dump-not "Invalid sum" "thread2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr89074.c b/gcc/testsuite/gcc.dg/tree-ssa/pr89074.c
new file mode 100644
index 0000000..666dfa7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr89074.c
@@ -0,0 +1,12 @@
+/* PR c++/89074 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump "return 1;" "optimized" } } */
+
+int
+foo (void)
+{
+ const char *a = &"foo"[0];
+ const char *b = "foo";
+ return a == b;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c
new file mode 100644
index 0000000..205133d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c
@@ -0,0 +1,84 @@
+/* PR tree-optimization/96779 */
+/* { dg-do run } */
+/* { dg-options "-O -fdump-tree-optimized -fwrapv" } */
+
+#include <stdbool.h>
+
+bool __attribute__ ((noipa)) f_func(int a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) g_func(unsigned int a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) h_func(short a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) k_func(long a)
+{
+ return -a == a;
+}
+
+int
+main (void)
+{
+ // few randomly generated test cases
+ if (f_func (71856034))
+ {
+ __builtin_abort ();
+ }
+ if (g_func (71856034))
+ {
+ __builtin_abort ();
+ }
+ if (h_func (1744))
+ {
+ __builtin_abort ();
+ }
+ if (k_func (68268386))
+ {
+ __builtin_abort ();
+ }
+ if (f_func (-112237))
+ {
+ __builtin_abort ();
+ }
+ if (g_func (-787116))
+ {
+ __builtin_abort ();
+ }
+ if (h_func (-863))
+ {
+ __builtin_abort ();
+ }
+ if (k_func (-787116))
+ {
+ __builtin_abort ();
+ }
+ if (!f_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!g_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!h_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!k_func (0))
+ {
+ __builtin_abort ();
+ }
+
+ return 0;
+}
+
+/* Verify that we have *not* transfered "= -" pattern in any of those functions. */
+/* { dg-final { scan-tree-dump-times "= -" 4 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c
new file mode 100644
index 0000000..0d46e8e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c
@@ -0,0 +1,79 @@
+/* PR tree-optimization/96779 */
+/* { dg-do run } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+#include <stdbool.h>
+
+bool __attribute__ ((noipa)) f_func(int a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) h_func(short a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) k_func(long a)
+{
+ return -a == a;
+}
+
+int
+main (void)
+{
+ // few randomly generated test cases
+ if (f_func (71856034))
+ {
+ __builtin_abort ();
+ }
+ if (f_func (71856034))
+ {
+ __builtin_abort ();
+ }
+ if (h_func (1744))
+ {
+ __builtin_abort ();
+ }
+ if (k_func (68268386))
+ {
+ __builtin_abort ();
+ }
+ if (f_func (-112237))
+ {
+ __builtin_abort ();
+ }
+ if (f_func (-787116))
+ {
+ __builtin_abort ();
+ }
+ if (h_func (-863))
+ {
+ __builtin_abort ();
+ }
+ if (k_func (-787116))
+ {
+ __builtin_abort ();
+ }
+ if (!f_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!f_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!h_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!k_func (0))
+ {
+ __builtin_abort ();
+ }
+
+ return 0;
+}
+
+/* Verify that we transfered to "= -" pattern from "_2 = -_1;". */
+/* { dg-final { scan-tree-dump-not "= -" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr98737-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr98737-1.c
new file mode 100644
index 0000000..e313a7f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr98737-1.c
@@ -0,0 +1,148 @@
+/* PR target/98737 */
+/* { dg-do compile { target i?86-*-* x86_64-*-* powerpc*-*-* aarch64*-*-* } } */
+/* { dg-options "-O2 -fdump-tree-optimized -fcompare-debug" } */
+/* { dg-additional-options "-march=i686" { target ia32 } } */
+/* { dg-final { scan-tree-dump-not "__atomic_fetch_" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "__sync_fetch_and_" "optimized" } } */
+
+typedef signed char schar;
+typedef unsigned long ulong;
+typedef unsigned int uint;
+typedef unsigned short ushort;
+typedef unsigned char uchar;
+long vlong;
+int vint;
+short vshort;
+schar vschar;
+ulong vulong;
+uint vuint;
+ushort vushort;
+uchar vuchar;
+#define A(n, t, ut, f, o, ...) \
+t fn##n (t x) \
+{ \
+ ut z = f (&v##t, x, ##__VA_ARGS__); \
+ t w = (t) z; \
+ return w o x; \
+}
+#define B(n, f, o, ...) \
+ A(n##0, long, ulong, f, o, ##__VA_ARGS__) \
+ A(n##1, int, uint, f, o, ##__VA_ARGS__) \
+ A(n##2, short, ushort, f, o, ##__VA_ARGS__) \
+ A(n##3, schar, uchar, f, o, ##__VA_ARGS__) \
+ A(n##4, ulong, ulong, f, o, ##__VA_ARGS__) \
+ A(n##5, uint, uint, f, o, ##__VA_ARGS__) \
+ A(n##6, ushort, ushort, f, o, ##__VA_ARGS__) \
+ A(n##7, uchar, uchar, f, o, ##__VA_ARGS__)
+
+B(00, __atomic_fetch_add, +, __ATOMIC_RELAXED)
+B(01, __atomic_fetch_sub, -, __ATOMIC_RELAXED)
+B(02, __atomic_fetch_and, &, __ATOMIC_RELAXED)
+B(03, __atomic_fetch_xor, ^, __ATOMIC_RELAXED)
+B(04, __atomic_fetch_or, |, __ATOMIC_RELAXED)
+B(05, __sync_fetch_and_add, +)
+B(06, __sync_fetch_and_sub, -)
+B(07, __sync_fetch_and_and, &)
+B(08, __sync_fetch_and_xor, ^)
+B(09, __sync_fetch_and_or, |)
+
+#undef A
+#define A(n, t, ut, f, o, ...) \
+t fn##n (void) \
+{ \
+ ut z = f (&v##t, 42, ##__VA_ARGS__); \
+ t w = (t) z; \
+ return w o 42; \
+}
+
+B(10, __atomic_fetch_add, +, __ATOMIC_RELAXED)
+B(11, __atomic_fetch_sub, -, __ATOMIC_RELAXED)
+B(12, __atomic_fetch_and, &, __ATOMIC_RELAXED)
+B(13, __atomic_fetch_xor, ^, __ATOMIC_RELAXED)
+B(14, __atomic_fetch_or, |, __ATOMIC_RELAXED)
+B(15, __sync_fetch_and_add, +)
+B(16, __sync_fetch_and_sub, -)
+B(17, __sync_fetch_and_and, &)
+B(18, __sync_fetch_and_xor, ^)
+B(19, __sync_fetch_and_or, |)
+
+#undef A
+#define A(n, t, ut, f, o, ...) \
+t fn##n (t x) \
+{ \
+ ut z = f (&v##t, x, ##__VA_ARGS__); \
+ t w = (t) z; \
+ t v = w o x; \
+ return v == 0; \
+}
+
+B(20, __atomic_fetch_add, +, __ATOMIC_RELAXED)
+B(21, __atomic_fetch_sub, -, __ATOMIC_RELAXED)
+B(22, __atomic_fetch_and, &, __ATOMIC_RELAXED)
+B(23, __atomic_fetch_xor, ^, __ATOMIC_RELAXED)
+B(24, __atomic_fetch_or, |, __ATOMIC_RELAXED)
+B(25, __sync_fetch_and_add, +)
+B(26, __sync_fetch_and_sub, -)
+B(27, __sync_fetch_and_and, &)
+B(28, __sync_fetch_and_xor, ^)
+B(29, __sync_fetch_and_or, |)
+
+#undef A
+#define A(n, t, ut, f, o, ...) \
+t fn##n (void) \
+{ \
+ ut z = f (&v##t, 42, ##__VA_ARGS__); \
+ t w = (t) z; \
+ t v = w o 42; \
+ return v != 0; \
+}
+
+B(30, __atomic_fetch_add, +, __ATOMIC_RELAXED)
+B(31, __atomic_fetch_sub, -, __ATOMIC_RELAXED)
+B(32, __atomic_fetch_and, &, __ATOMIC_RELAXED)
+B(33, __atomic_fetch_xor, ^, __ATOMIC_RELAXED)
+B(34, __atomic_fetch_or, |, __ATOMIC_RELAXED)
+B(35, __sync_fetch_and_add, +)
+B(36, __sync_fetch_and_sub, -)
+B(37, __sync_fetch_and_and, &)
+B(38, __sync_fetch_and_xor, ^)
+B(39, __sync_fetch_and_or, |)
+
+#undef A
+#define A(n, t, ut, f, o, ...) \
+t fn##n (t x) \
+{ \
+ return (t) (((t) f (&v##t, x, ##__VA_ARGS__)) \
+ o x) != 0; \
+}
+
+B(40, __atomic_fetch_add, +, __ATOMIC_RELAXED)
+B(41, __atomic_fetch_sub, -, __ATOMIC_RELAXED)
+B(42, __atomic_fetch_and, &, __ATOMIC_RELAXED)
+B(43, __atomic_fetch_xor, ^, __ATOMIC_RELAXED)
+B(44, __atomic_fetch_or, |, __ATOMIC_RELAXED)
+B(45, __sync_fetch_and_add, +)
+B(46, __sync_fetch_and_sub, -)
+B(47, __sync_fetch_and_and, &)
+B(48, __sync_fetch_and_xor, ^)
+B(49, __sync_fetch_and_or, |)
+
+#undef A
+#define A(n, t, ut, f, o, ...) \
+t fn##n (void) \
+{ \
+ return (t) (((t) f (&v##t, 42, ##__VA_ARGS__))\
+ o 42) == 0; \
+}
+
+B(50, __atomic_fetch_add, +, __ATOMIC_RELAXED)
+B(51, __atomic_fetch_sub, -, __ATOMIC_RELAXED)
+B(52, __atomic_fetch_and, &, __ATOMIC_RELAXED)
+B(53, __atomic_fetch_xor, ^, __ATOMIC_RELAXED)
+/* (whatever | 42) == 0 is 0, so we can't test this. */
+/* B(54, __atomic_fetch_or, |, __ATOMIC_RELAXED) */
+B(55, __sync_fetch_and_add, +)
+B(56, __sync_fetch_and_sub, -)
+B(57, __sync_fetch_and_and, &)
+B(58, __sync_fetch_and_xor, ^)
+/* B(59, __sync_fetch_and_or, |) */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr98737-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr98737-2.c
new file mode 100644
index 0000000..09149bc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr98737-2.c
@@ -0,0 +1,123 @@
+/* PR target/98737 */
+/* { dg-do compile { target i?86-*-* x86_64-*-* powerpc*-*-* aarch64*-*-* } } */
+/* { dg-options "-O2 -fdump-tree-optimized -fcompare-debug" } */
+/* { dg-additional-options "-march=i686" { target ia32 } } */
+/* { dg-final { scan-tree-dump-not "__atomic_\[^f]" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "__sync_\[^f]" "optimized" } } */
+
+typedef signed char schar;
+typedef unsigned long ulong;
+typedef unsigned int uint;
+typedef unsigned short ushort;
+typedef unsigned char uchar;
+long vlong;
+int vint;
+short vshort;
+schar vschar;
+ulong vulong;
+uint vuint;
+ushort vushort;
+uchar vuchar;
+#define A(n, t, ut, f, o, ...) \
+t fn##n (t x) \
+{ \
+ ut z = f (&v##t, x, ##__VA_ARGS__); \
+ t w = (t) z; \
+ return w o x; \
+}
+#define B(n, f, o, ...) \
+ A(n##0, long, ulong, f, o, ##__VA_ARGS__) \
+ A(n##1, int, uint, f, o, ##__VA_ARGS__) \
+ A(n##2, short, ushort, f, o, ##__VA_ARGS__) \
+ A(n##3, schar, uchar, f, o, ##__VA_ARGS__) \
+ A(n##4, ulong, ulong, f, o, ##__VA_ARGS__) \
+ A(n##5, uint, uint, f, o, ##__VA_ARGS__) \
+ A(n##6, ushort, ushort, f, o, ##__VA_ARGS__) \
+ A(n##7, uchar, uchar, f, o, ##__VA_ARGS__)
+
+B(00, __atomic_add_fetch, -, __ATOMIC_RELAXED)
+B(01, __atomic_sub_fetch, +, __ATOMIC_RELAXED)
+B(03, __atomic_xor_fetch, ^, __ATOMIC_RELAXED)
+B(05, __sync_add_and_fetch, -)
+B(06, __sync_sub_and_fetch, +)
+B(08, __sync_xor_and_fetch, ^)
+
+#undef A
+#define A(n, t, ut, f, o, ...) \
+t fn##n (void) \
+{ \
+ ut z = f (&v##t, 42, ##__VA_ARGS__); \
+ t w = (t) z; \
+ return w o 42; \
+}
+
+B(10, __atomic_add_fetch, -, __ATOMIC_RELAXED)
+B(11, __atomic_sub_fetch, +, __ATOMIC_RELAXED)
+B(13, __atomic_xor_fetch, ^, __ATOMIC_RELAXED)
+B(15, __sync_add_and_fetch, -)
+B(16, __sync_sub_and_fetch, +)
+B(18, __sync_xor_and_fetch, ^)
+
+#undef A
+#define A(n, t, ut, f, o, ...) \
+t fn##n (t x) \
+{ \
+ ut z = f (&v##t, x, ##__VA_ARGS__); \
+ t w = (t) z; \
+ t v = w o x; \
+ return v == 0; \
+}
+
+B(20, __atomic_add_fetch, -, __ATOMIC_RELAXED)
+B(21, __atomic_sub_fetch, +, __ATOMIC_RELAXED)
+B(23, __atomic_xor_fetch, ^, __ATOMIC_RELAXED)
+B(25, __sync_add_and_fetch, -)
+B(26, __sync_sub_and_fetch, +)
+B(28, __sync_xor_and_fetch, ^)
+
+#undef A
+#define A(n, t, ut, f, o, ...) \
+t fn##n (void) \
+{ \
+ ut z = f (&v##t, 42, ##__VA_ARGS__); \
+ t w = (t) z; \
+ t v = w o 42; \
+ return v != 0; \
+}
+
+B(30, __atomic_add_fetch, -, __ATOMIC_RELAXED)
+B(31, __atomic_sub_fetch, +, __ATOMIC_RELAXED)
+B(33, __atomic_xor_fetch, ^, __ATOMIC_RELAXED)
+B(35, __sync_add_and_fetch, -)
+B(36, __sync_sub_and_fetch, +)
+B(38, __sync_xor_and_fetch, ^)
+
+#undef A
+#define A(n, t, ut, f, o, ...) \
+t fn##n (t x) \
+{ \
+ return (t) (((t) f (&v##t, x, ##__VA_ARGS__)) \
+ o x) != 0; \
+}
+
+B(40, __atomic_add_fetch, -, __ATOMIC_RELAXED)
+B(41, __atomic_sub_fetch, +, __ATOMIC_RELAXED)
+B(43, __atomic_xor_fetch, ^, __ATOMIC_RELAXED)
+B(45, __sync_add_and_fetch, -)
+B(46, __sync_sub_and_fetch, +)
+B(48, __sync_xor_and_fetch, ^)
+
+#undef A
+#define A(n, t, ut, f, o, ...) \
+t fn##n (void) \
+{ \
+ return (t) (((t) f (&v##t, 42, ##__VA_ARGS__))\
+ o 42) == 0; \
+}
+
+B(50, __atomic_add_fetch, -, __ATOMIC_RELAXED)
+B(51, __atomic_sub_fetch, +, __ATOMIC_RELAXED)
+B(53, __atomic_xor_fetch, ^, __ATOMIC_RELAXED)
+B(55, __sync_add_and_fetch, -)
+B(56, __sync_sub_and_fetch, +)
+B(58, __sync_xor_and_fetch, ^)
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr98953.c b/gcc/testsuite/gcc.dg/tree-ssa/pr98953.c
new file mode 100644
index 0000000..7687dc2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr98953.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-bswap-details" } */
+
+int foo(unsigned char *ptr)
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ return ptr[0] + (ptr[1] << 8);
+#else
+ return ptr[1] + (ptr[0] << 8);
+#endif
+}
+
+/* { dg-final { scan-tree-dump "16 bit load in target endianness found" "bswap" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-callused.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-callused.c
index aa639b4..b9a57d8 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-callused.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-callused.c
@@ -22,5 +22,5 @@ int bar (int b)
return *foo (&q);
}
-/* { dg-final { scan-tree-dump "CALLUSED\\(\[0-9\]+\\) = { NONLOCAL f.* i q }" "alias" } } */
+/* { dg-final { scan-tree-dump "CALLUSED\\(\[0-9\]+\\) = { ESCAPED NONLOCAL f.* i q }" "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-1.c
index c3ccb5d..c6c2b2b 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-thread1-details --param logical-op-non-short-circuit=1" } */
+/* { dg-options "-O2 -fdump-tree-threadfull1-details --param logical-op-non-short-circuit=1" } */
// Copied from ssa-dom-thread-11.c
@@ -17,4 +17,4 @@ mark_target_live_regs (int b, int block, int bb_tick)
/* When the first two conditionals in the first IF are true, but
the third conditional is false, then there's a jump threading
opportunity to bypass the second IF statement. */
-/* { dg-final { scan-tree-dump-times "Registering.*jump thread" 1 "thread1"} } */
+/* { dg-final { scan-tree-dump-times "Registering.*jump thread" 1 "threadfull1"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-2.c b/gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-2.c
index d2689b6..163d9e1 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-thread2-details -w" } */
+/* { dg-options "-O2 -fdump-tree-thread1-details -w" } */
// Copied from ssa-dom-thread-12.c.
@@ -36,4 +36,4 @@ scan_function (gimple stmt)
that stmt->num_ops - 3 != 0. When that test is false, we can derive
a value for stmt->num_ops. That in turn allows us to thread the jump
for the conditional at the start of the call to gimple_op. */
-/* { dg-final { scan-tree-dump-times "Registering.*jump thread" 1 "thread2"} } */
+/* { dg-final { scan-tree-dump-times "Registering.*jump thread" 1 "thread1"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-4.c b/gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-4.c
index d5aa2e8..dde43ff 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ranger-threader-4.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* { dg-additional-options "-O2 -fdump-tree-vrp-details -fdump-tree-thread1-details --param logical-op-non-short-circuit=1" } */
-/* { dg-final { scan-tree-dump-times "Registering jump" 8 "thread1" } } */
+/* { dg-additional-options "-O2 -fdump-tree-threadfull1-details --param logical-op-non-short-circuit=1" } */
+/* { dg-final { scan-tree-dump-times "Registering jump" 8 "threadfull1" } } */
/* Copied from ssa-thread-14. */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c b/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c
index 638bf38..410b280 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fno-trapping-math -funsafe-math-optimizations -fdump-tree-recip" } */
-double F[2] = { 0.0, 0.0 }, e;
+double F[5] = { 0.0, 0.0 }, e;
/* In this case the optimization is interesting. */
float h ()
@@ -13,7 +13,7 @@ float h ()
d = 2.*e;
E = 1. - d;
- for( i=0; i < 2; i++ )
+ for( i=0; i < 5; i++ )
if( d > 0.01 )
{
P = ( W < E ) ? (W - E)/d : (E - W)/d;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c
index 759d9ab..5b2ac53 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-vrp -fdump-tree-dom2-details" } */
+/* { dg-options "-O2 -fno-tree-vrp -fdisable-tree-threadfull1 -fdump-tree-dom2-details" } */
void t(void);
void q(void);
void q1(void);
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-11.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-11.c
index 73969bb..bcc9ccf 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-11.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-11.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom2-details --param logical-op-non-short-circuit=1 -fdisable-tree-thread1 -fdisable-tree-thread2 -fdisable-tree-vrp-thread1 " } */
+/* { dg-options "-O2 -fdump-tree-dom2-details --param logical-op-non-short-circuit=1 -fdisable-tree-thread1 -fdisable-tree-thread2 -fdisable-tree-threadfull1" } */
static int *bb_ticks;
extern void frob (void);
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-12.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-12.c
index bad5e0a..e68acbb 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-12.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-12.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom2-details -w -fdisable-tree-thread2" } */
+/* { dg-options "-O2 -fdump-tree-dom2-details -w -fdisable-tree-thread1" } */
typedef long unsigned int size_t;
union tree_node;
typedef union tree_node *tree;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-14.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-14.c
index a25fe8b..8497ed6 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-14.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-14.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-dom2-details -w --param logical-op-non-short-circuit=1" } */
-/* { dg-additional-options "-fdisable-tree-thread1 -fdisable-tree-ethread -fdisable-tree-thread2" } */
+/* { dg-additional-options "-fdisable-tree-thread1 -fdisable-tree-ethread -fdisable-tree-threadfull1" } */
enum optab_methods
{
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-16.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-16.c
index 1b677f4..e8555f2 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-16.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-16.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom2-details -w --param logical-op-non-short-circuit=1 -fdisable-tree-vrp-thread1" } */
+/* { dg-options "-O2 -fdump-tree-dom2-details -w --param logical-op-non-short-circuit=1 -fdisable-tree-threadfull1" } */
unsigned char
validate_subreg (unsigned int offset, unsigned int isize, unsigned int osize, int zz, int qq)
{
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2b.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2b.c
index 823ada9..74a55aa 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2b.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2b.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-thread3-stats -fdump-tree-dom2-stats -fdisable-tree-ethread" } */
+/* { dg-options "-O2 -fdump-tree-thread2-stats -fdump-tree-dom2-stats -fdisable-tree-ethread" } */
void foo();
void bla();
@@ -26,4 +26,4 @@ void thread_latch_through_header (void)
case. And we want to thread through the header as well. These
are both caught by threading in DOM. */
/* { dg-final { scan-tree-dump-not "Jumps threaded" "dom2"} } */
-/* { dg-final { scan-tree-dump-times "Jumps threaded: 1" 1 "thread3"} } */
+/* { dg-final { scan-tree-dump-times "Jumps threaded: 1" 1 "thread2"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c
index ee17edd..b64e71d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c
@@ -1,15 +1,18 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom2-stats -fdump-tree-thread3-stats -fdump-tree-dom3-stats -fdump-tree-vrp-thread2-stats -fno-guess-branch-probability" } */
+/* { dg-options "-O2 -fdump-tree-dom2-stats -fdump-tree-thread2-stats -fdump-tree-dom3-stats -fno-guess-branch-probability" } */
/* { dg-final { scan-tree-dump-not "Jumps threaded" "dom2" } } */
+/* We were previously checking for no threads in vrp-thread2, but now
+ that we have merged the post and pre threaders, we get a dozen
+ threads before VRP2. */
+
/* aarch64 has the highest CASE_VALUES_THRESHOLD in GCC. It's high enough
to change decisions in switch expansion which in turn can expose new
jump threading opportunities. Skip the later tests on aarch64. */
/* { dg-final { scan-tree-dump-not "Jumps threaded" "dom3" { target { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-tree-dump-not "Jumps threaded" "vrp-thread2" { target { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-tree-dump "Jumps threaded: 11" "thread3" { target { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-tree-dump "Jumps threaded: 18" "thread3" { target { aarch64*-*-* } } } } */
+/* { dg-final { scan-tree-dump "Jumps threaded: 7" "thread2" { target { ! aarch64*-*-* } } } } */
+/* { dg-final { scan-tree-dump "Jumps threaded: 18" "thread2" { target { aarch64*-*-* } } } } */
enum STATE {
S0=0,
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-98.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-98.c
new file mode 100644
index 0000000..3d28609
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-98.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-fre1-details" } */
+
+int foo (int a, int s, unsigned int k)
+{
+ int i = a, j = a;
+ do
+ {
+ i += s;
+ j += j;
+ j -= a;
+ }
+ while (k--);
+ return j+i;
+}
+
+/* We want the redundant PHI for j to disappear. */
+/* { dg-final { scan-tree-dump "Replaced redundant PHI node defining j" "fre1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-18.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-18.c
new file mode 100644
index 0000000..da19806
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-18.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fstrict-aliasing -fdump-tree-lim2-details" } */
+
+unsigned p;
+
+void foo (float *q)
+{
+ for (int i = 0; i < 256; ++i)
+ {
+ if (p)
+ {
+ unsigned a = p;
+ *(q++) = 1.;
+ p = a + 1;
+ }
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "Executing store motion" 1 "lim2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-19.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-19.c
new file mode 100644
index 0000000..51c1913
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-19.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
+
+volatile int x;
+void
+bar (int, char *, char *);
+void
+foo (int *a, int n, int m, int s, int t)
+{
+ int i;
+ int j;
+ int k;
+
+ for (i = 0; i < m; i++) // Loop 1
+ {
+ if (__builtin_expect (x, 0))
+ for (j = 0; j < n; j++) // Loop 2
+ for (k = 0; k < n; k++) // Loop 3
+ {
+ bar (s / 5, "one", "two");
+ a[t] = s;
+ }
+ a[t] = t;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "out of loop 2" 4 "lim2" } } */
+/* { dg-final { scan-tree-dump-times "out of loop 1" 3 "lim2" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-20.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-20.c
new file mode 100644
index 0000000..bc60a04
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-20.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
+
+/* Test that `count' is not hoisted out of loop when bb is cold. */
+
+int count;
+volatile int x;
+
+struct obj {
+ int data;
+ struct obj *next;
+
+} *q;
+
+void
+func (int m)
+{
+ struct obj *p;
+ for (int i = 0; i < m; i++)
+ if (__builtin_expect (x, 0))
+ count++;
+
+}
+
+/* { dg-final { scan-tree-dump-not "Executing store motion of" "lim2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-21.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-21.c
new file mode 100644
index 0000000..ffe6f8f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-21.c
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
+
+/* Test that `data' and 'data1' is not hoisted out of inner loop and outer loop
+ when it is in cold loop. */
+
+int count;
+volatile int x;
+
+struct obj {
+ int data;
+ int data1;
+ struct obj *next;
+};
+
+void
+func (int m, int n, int k, struct obj *a)
+{
+ struct obj *q = a;
+ for (int j = 0; j < m; j++)
+ if (__builtin_expect (m, 0))
+ for (int i = 0; i < m; i++)
+ {
+ if (__builtin_expect (x, 0))
+ {
+ count++;
+ q->data += 3; /* Not hoisted out to inner loop. */
+ }
+ count += n;
+ q->data1 += k; /* Not hoisted out to outer loop. */
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "Executing store motion of" "lim2" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-22.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-22.c
new file mode 100644
index 0000000..16ba4ce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-22.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
+
+volatile int x;
+volatile int y;
+void
+bar (int, char *, char *);
+void
+foo (int *a, int n, int m, int s, int t)
+{
+ int i;
+ int j;
+ int k;
+
+ for (i = 0; i < m; i++) // Loop 1
+ {
+ if (__builtin_expect (x, 0))
+ for (j = 0; j < n; j++) // Loop 2
+ if (__builtin_expect (y, 0))
+ for (k = 0; k < n; k++) // Loop 3
+ {
+ bar (s / 5, "one", "two");
+ a[t] = s;
+ }
+ a[t] = t;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "out of loop 3" 4 "lim2" } } */
+/* { dg-final { scan-tree-dump-times "out of loop 1" 3 "lim2" } } */
+
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-23.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-23.c
new file mode 100644
index 0000000..e788074
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-23.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-lim2-details" } */
+
+volatile int x;
+void
+bar (int, char *, char *);
+void
+foo (int *a, int n, int k)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ {
+ if (__builtin_expect (x, 0))
+ bar (k / 5, "one", "two");
+ a[i] = k;
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "out of loop 1" "lim2" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c
index 8c5cc82..51fc065 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c
@@ -1,7 +1,6 @@
/* { dg-do compile } */
-/* { dg-additional-options "-O2 -fdump-tree-vrp-thread1-details --param logical-op-non-short-circuit=1" } */
-/* { dg-additional-options "-fdisable-tree-thread1" } */
-/* { dg-final { scan-tree-dump-times "Threaded jump" 8 "vrp-thread1" } } */
+/* { dg-additional-options "-O2 --param logical-op-non-short-circuit=1 -fdump-tree-threadfull1-details" } */
+/* { dg-final { scan-tree-dump-times "Registering jump thread" 8 "threadfull1" } } */
void foo (void);
void bar (void);
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-backedge.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-backedge.c
index 890a0ee..ef9a3e8 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-backedge.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-backedge.c
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-O2 -fdisable-tree-ethread -fdisable-tree-thread1 -fdisable-tree-thread2 -fno-tree-dominator-opts -fdump-tree-thread3-details" }
+// { dg-options "-O2 -fdisable-tree-ethread -fdisable-tree-thread1 -fdisable-tree-thread2 -fno-tree-dominator-opts -fdump-tree-threadfull2-details" }
// Test that we can thread jumps across the backedge of a loop through
// the switch statement to a particular case.
@@ -29,4 +29,4 @@ int foo (unsigned int x, int s)
return s;
}
-// { dg-final { scan-tree-dump "Registering jump thread:.*normal \\(back\\)" "thread3" } }
+// { dg-final { scan-tree-dump "Registering jump thread:.*normal \\(back\\)" "threadfull2" } }
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
index f3ca140..25c2d3a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-thread1-details -fdelete-null-pointer-checks" } */
+/* { dg-options "-O2 -fdump-tree-threadfull1-details -fdelete-null-pointer-checks" } */
/* { dg-skip-if "" keeps_null_pointer_checks } */
void oof (void);
@@ -29,5 +29,5 @@ build_omp_regions_1 (basic_block bb, struct omp_region *parent,
/* ARM Cortex-M defined LOGICAL_OP_NON_SHORT_CIRCUIT to false,
so skip below test. */
-/* { dg-final { scan-tree-dump-times "Registering jump thread" 1 "thread1" { target { ! arm_cortex_m } } } } */
+/* { dg-final { scan-tree-dump-times "Registering jump thread" 1 "threadfull1" { target { ! arm_cortex_m } } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp b/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp
index 2a22ea9..e5b524f 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/vrp02.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c
index 2285c55..6e9c8df 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1 -fdelete-null-pointer-checks -fdisable-tree-evrp -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdump-tree-vrp1 -fdelete-null-pointer-checks -fdisable-tree-evrp -fno-thread-jumps" } */
struct A
{
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c
index 1d7ea4e8..4cbaca4 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1 -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1 -fno-thread-jumps" } */
struct A
{
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp05.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp05.c
index c17cd1b..7f38e8d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp05.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp05.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1 -fno-early-inlining -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdump-tree-vrp1 -fno-early-inlining -fno-thread-jumps" } */
inline int ten()
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
index acb03c2..898477e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1 -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1 -fno-thread-jumps" } */
int baz (void);
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c
index 31a5415..ec5f6cc 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1-details -fdelete-null-pointer-checks -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1-details -fdelete-null-pointer-checks -fno-thread-jumps" } */
int
foo (int i, int *p)
@@ -34,6 +34,3 @@ foo (int i, int *p)
/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" } } */
/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 0" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 0" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
-
-/* { dg-final { scan-tree-dump-times "PREDICATE: p_\[0-9\]" 2 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "PREDICATE: p_\[0-9\]" 1 "vrp1" { target { keeps_null_pointer_checks } } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c
index 2c6742b..c9d9023 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1-details -fdisable-tree-thread1 -fdelete-null-pointer-checks" } */
+/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1-details -fno-thread-jumps -fdelete-null-pointer-checks" } */
/* Compile with -fno-tree-fre -O2 to prevent CSEing *p. */
int
@@ -20,5 +20,4 @@ foo (int a, int *p)
}
/* Target disabling -fdelete-null-pointer-checks should not fold checks */
/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "PREDICATE: p_.* ne_expr 0" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c
index fad0051..3541696 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1 -std=gnu89 -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1 -std=gnu89 -fno-thread-jumps" } */
foo (int *p)
{
@@ -27,4 +27,5 @@ L78:
}
}
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.. != 0B to 1" 2 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_" 2 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "!= 0B to 1" 2 "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp106.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp106.c
index f25ea9c..dc5021a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp106.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp106.c
@@ -1,6 +1,6 @@
/* PR tree-optimization/18046 */
-/* { dg-options "-O2 -fdump-tree-vrp-thread1-details" } */
-/* { dg-final { scan-tree-dump-times "Threaded jump" 1 "vrp-thread1" } } */
+/* { dg-options "-O2 -fdump-tree-ethread-details" } */
+/* { dg-final { scan-tree-dump-times "Registering jump thread" 1 "ethread" } } */
/* During VRP we expect to thread the true arm of the conditional through the switch
and to the BB that corresponds to the 7 ... 9 case label. */
extern void foo (void);
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp113.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp113.c
index ab8d91e..dfe4989 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp113.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp113.c
@@ -13,5 +13,3 @@ int f(int a) {
case 7: return 19;
}
}
-
-/* { dg-final { scan-tree-dump "return 3;" "vrp1" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp116.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp116.c
index d9d7b23..9e68a77 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp116.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp116.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
int
f (int m1, int m2, int c)
@@ -9,4 +9,4 @@ f (int m1, int m2, int c)
return e ? m1 : m2;
}
-/* { dg-final { scan-tree-dump-times "\\? c_\[0-9\]\\(D\\) : 0" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "\\? c_\[0-9\]\\(D\\) : 0" 1 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c
index f9df67f..e582299 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c
@@ -23,5 +23,5 @@ int g (int b) {
return 1;
}
-/* { dg-final { scan-tree-dump "Folding predicate a_. == 0 to 0" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate b_. != 0 to 1" "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folding predicate a_\.\* == 0 to 0" "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folding predicate b_\.\* != 0 to 1" "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c
index 88833eb..470675e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1 -fno-tree-fre -fdisable-tree-evrp -fdisable-tree-ethread -fdisable-tree-thread1" } */
+/* { dg-options "-O2 -fdump-tree-vrp1 -fno-tree-fre -fdisable-tree-evrp -fno-thread-jumps" } */
/* This is from PR14052. */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp92.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp92.c
index 66d74e9..9e53547 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp92.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp92.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdisable-tree-evrp -fno-tree-fre -fdump-tree-vrp1-details -fdisable-tree-ethread" } */
+/* { dg-options "-O2 -fdisable-tree-evrp -fno-tree-fre -fdump-tree-vrp1 -fdisable-tree-ethread" } */
void bar (void);
int foo (int i, int j)
@@ -18,5 +18,6 @@ int foo (int i, int j)
return j;
}
-/* { dg-final { scan-tree-dump "res_.: int \\\[1, 1\\\]" "vrp1" } } */
-/* { dg-final { scan-tree-dump-not "Threaded" "vrp1" } } */
+/* { dg-final { scan-tree-dump-not "PHI" "vrp1" } } */
+/* { dg-final { scan-tree-dump-not "goto" "vrp1" } } */
+/* { dg-final { scan-tree-dump-not "if" "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tsan/tsan.exp b/gcc/testsuite/gcc.dg/tsan/tsan.exp
index c760ae0..28b5183 100644
--- a/gcc/testsuite/gcc.dg/tsan/tsan.exp
+++ b/gcc/testsuite/gcc.dg/tsan/tsan.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.dg/ubsan/commutative-1.c b/gcc/testsuite/gcc.dg/ubsan/commutative-1.c
new file mode 100644
index 0000000..128f5b1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ubsan/commutative-1.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=undefined -fdump-tree-optimized" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-flto" } { "" } } */
+
+int res[2];
+
+void
+f1 (int x, int y)
+{
+ res[0] = x + y;
+ res[1] = y + x;
+}
+
+void
+f2 (int x, int y)
+{
+ res[0] = x - y;
+ res[1] = y - x;
+}
+
+void
+f3 (int x, int y)
+{
+ res[0] = x * y;
+ res[1] = y * x;
+}
+
+/* { dg-final { scan-tree-dump-times {\.UBSAN_CHECK_ADD} 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times {\.UBSAN_CHECK_SUB} 2 "optimized" } } */
+/* { dg-final { scan-tree-dump-times {\.UBSAN_CHECK_MUL} 1 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ubsan/pr103456.c b/gcc/testsuite/gcc.dg/ubsan/pr103456.c
new file mode 100644
index 0000000..7624fa8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ubsan/pr103456.c
@@ -0,0 +1,21 @@
+/* PR tree-optimization/103456 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=undefined -O -fdump-tree-objsz -ffat-lto-objects" } */
+
+static char *multilib_options = "m64/m32";
+
+void
+used_arg_t (void)
+{
+ char *q = multilib_options;
+ for (;;)
+ {
+ while (*q)
+ q++;
+ while (__builtin_strchr (q, '_') == 0)
+ while (*q)
+ q++;
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "maximum object size 0" "objsz1" } } */
diff --git a/gcc/testsuite/gcc.dg/ubsan/ubsan.exp b/gcc/testsuite/gcc.dg/ubsan/ubsan.exp
index 16a0a53..27c6f24 100644
--- a/gcc/testsuite/gcc.dg/ubsan/ubsan.exp
+++ b/gcc/testsuite/gcc.dg/ubsan/ubsan.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.dg/uninit-38.c b/gcc/testsuite/gcc.dg/uninit-38.c
index 0d70bcd..9a20243 100644
--- a/gcc/testsuite/gcc.dg/uninit-38.c
+++ b/gcc/testsuite/gcc.dg/uninit-38.c
@@ -6,7 +6,8 @@
be adjusted. Ditto if -Wuninitialized output changes for some
other reason.
{ dg-do compile { target { { lp64 || ilp32 } || llp64 } } }
- { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0 -fno-ipa-modref" }
+ { dg-require-effective-target alloca } */
#define CONCAT(x, y) x ## y
#define CAT(x, y) CONCAT(x, y)
diff --git a/gcc/testsuite/gcc.dg/uninit-39.c b/gcc/testsuite/gcc.dg/uninit-39.c
index 0f91854..4d17f14 100644
--- a/gcc/testsuite/gcc.dg/uninit-39.c
+++ b/gcc/testsuite/gcc.dg/uninit-39.c
@@ -1,7 +1,8 @@
/* PR c/98592 - ICE in gimple_canonical_types_compatible_p while formatting
a MEM_REF
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
void f (int);
diff --git a/gcc/testsuite/gcc.dg/uninit-41.c b/gcc/testsuite/gcc.dg/uninit-41.c
index b485611..f2e17a8 100644
--- a/gcc/testsuite/gcc.dg/uninit-41.c
+++ b/gcc/testsuite/gcc.dg/uninit-41.c
@@ -1,7 +1,8 @@
/* Verify that calls to non-modifying built-ins aren't considered
potentially modifying.
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/uninit-pr100250.c b/gcc/testsuite/gcc.dg/uninit-pr100250.c
index 8e7a787..d47fc24c 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr100250.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr100250.c
@@ -1,6 +1,7 @@
/* PR middle-end/100250 - ICE related to -Wmaybe-uninitialized
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
extern void f (int D, const int[D], const int[D]);
diff --git a/gcc/testsuite/gcc.dg/uninit-pr101300.c b/gcc/testsuite/gcc.dg/uninit-pr101300.c
index 4392e8ba..840fd0b 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr101300.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr101300.c
@@ -1,7 +1,8 @@
/* PR middle-end/101300 - -fsanitize=undefined suppresses -Wuninitialized
for a VLA read at -O0
{ dg-do compile }
- { dg-options "-O0 -Wall -fsanitize=undefined" } */
+ { dg-options "-O0 -Wall -fsanitize=undefined" }
+ { dg-require-effective-target alloca } */
int warn_vla_rd0 (int n)
{
diff --git a/gcc/testsuite/gcc.dg/uninit-pr101494.c b/gcc/testsuite/gcc.dg/uninit-pr101494.c
index d3267b6..3c68d14 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr101494.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr101494.c
@@ -1,6 +1,7 @@
/* PR middle-end/101494 - bogus -Wmaybe-uninitialized on memrchr of size 0
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/uninit-pr20644-O0.c b/gcc/testsuite/gcc.dg/uninit-pr20644-O0.c
index 8ae697a..a335d8c 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr20644-O0.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr20644-O0.c
@@ -7,7 +7,7 @@ int foo ()
int j;
if (1 == i)
- return j; /* { dg-bogus "uninitialized" "uninitialized" { xfail *-*-* } } */
+ return j; /* { dg-bogus "uninitialized" "uninitialized" } */
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/uninit-pr50476.c b/gcc/testsuite/gcc.dg/uninit-pr50476.c
index db4146d..3720184 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr50476.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr50476.c
@@ -7,7 +7,7 @@ int *x = 0;
void f (void)
{
int y = 1;
- x = &y;
+ x = &y; // { dg-warning "\\\[-Wdangling-pointer" }
}
int g (void)
diff --git a/gcc/testsuite/gcc.dg/uninit-pr89230-1.c b/gcc/testsuite/gcc.dg/uninit-pr89230-1.c
index dfc87a5..bf536e2 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr89230-1.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr89230-1.c
@@ -9,7 +9,7 @@ struct S { int i, j; };
int g (void)
{
struct S *p = f ();
- struct S *q; // { dg-bogus "may be used uninitialized" "uninitialized" { xfail *-*-* } }
+ struct S *q; // { dg-bogus "" "uninitialized" { xfail *-*-* } }
if (p->i || !(q = f ()) || p->j != q->i)
{
@@ -18,7 +18,7 @@ int g (void)
if (p->i)
return 1;
- if (!q) // { dg-bogus "\\\[-Wmaybe-uninitialized" }
+ if (!q) // { dg-bogus "\\\[-Wmaybe-uninitialized" "" { xfail *-*-* } }
return 2;
}
diff --git a/gcc/testsuite/gcc.dg/uninit-pr98578.c b/gcc/testsuite/gcc.dg/uninit-pr98578.c
index 98d6117..db566c79 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr98578.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr98578.c
@@ -1,6 +1,7 @@
/* PR middle-end/98578 - ICE warning on uninitialized VLA access
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall -fno-ipa-modref" }
+ { dg-require-effective-target alloca } */
void* malloc (__SIZE_TYPE__);
diff --git a/gcc/testsuite/gcc.dg/uninit-pr98583.c b/gcc/testsuite/gcc.dg/uninit-pr98583.c
index 638b029..6159c95 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr98583.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr98583.c
@@ -1,7 +1,8 @@
/* PR middle-end/98583 - missing -Wuninitialized reading from a second VLA
in its own block
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
void f (int*);
void g (int);
diff --git a/gcc/testsuite/gcc.dg/uninit-pred-7_a.c b/gcc/testsuite/gcc.dg/uninit-pred-7_a.c
index c2ba2a4..434d90a 100644
--- a/gcc/testsuite/gcc.dg/uninit-pred-7_a.c
+++ b/gcc/testsuite/gcc.dg/uninit-pred-7_a.c
@@ -23,7 +23,7 @@ int foo (int n, int l, int m, int r)
blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
if ( l )
- blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
+ blah(v); /* { dg-bogus "uninitialized" "bogus warning" { xfail *-*-* } } */
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/uninit-pred-9_b.c b/gcc/testsuite/gcc.dg/uninit-pred-9_b.c
index 8c2d28c..53c4a53 100644
--- a/gcc/testsuite/gcc.dg/uninit-pred-9_b.c
+++ b/gcc/testsuite/gcc.dg/uninit-pred-9_b.c
@@ -17,10 +17,10 @@ int foo (int n, int l, int m, int r)
if (l > 100)
if ( (n <= 9) && (m < 100) && (r < 19) )
- blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
+ blah(v); /* { dg-bogus "uninitialized" "bogus warning" { xfail powerpc64*-*-* cris-*-* } } */
if ( (n <= 8) && (m < 99) && (r < 19) )
- blah(v); /* { dg-bogus "uninitialized" "pr101674" { xfail powerpc64*-*-* mmix-*-* cris-*-* } } */
+ blah(v); /* { dg-bogus "uninitialized" "pr101674" { xfail mmix-*-* } } */
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-17.c b/gcc/testsuite/gcc.dg/vect/bb-slp-17.c
index f8bfb4b..fc3ef42 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-17.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-17.c
@@ -57,5 +57,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "slp2" { target vect_int_mult } } } */
-
+/* We need V2SI vector add support for the b[] vectorization, if we don't
+ have that we might only see the store vectorized and thus 2 subgraphs. */
+/* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "slp2" { target { vect_int_mult && vect64 } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr103800.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr103800.c
new file mode 100644
index 0000000..33c2d20
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr103800.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+
+int a;
+long b;
+extern int c[], d[];
+extern _Bool e[];
+void f() {
+ if (a)
+ ;
+ for (;;) {
+ for (int g = 2; g; g = a)
+ d[g] = 0;
+ for (int h = 1; h < 13; h++)
+ e[h] = b ? (short)c[4 + h - 1] : c[4 + h - 1];
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-byte.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-byte.c
deleted file mode 100644
index aadee7f..0000000
--- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-byte.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_byte } */
-/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
-
-#define TYPE int8_t
-#define N 16
-#include <stdint.h>
-#include "complex-add-pattern-template.c"
-
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { xfail aarch64_sve2 } } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-int.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-int.c
index 8eba24d..cead05f 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-int.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-int.c
@@ -1,12 +1,15 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_int } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
#define TYPE int32_t
#define N 16
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_byte } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_int } && ! target { aarch64_sve2 } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c
index 9275ff1..0d21f57 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-long.c
@@ -1,12 +1,17 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_long } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+#define UNROLL
#define TYPE int64_t
#define N 16
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_long } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_long } && ! target { aarch64_sve2 } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" { target { vect_long_long } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" { target { vect_long_long } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" { target { vect_long_long } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-short.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-short.c
index 8cbbdb8..8928386 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-short.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-short.c
@@ -1,12 +1,17 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_short } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+#define UNROLL
#define TYPE int16_t
#define N 16
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_short } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_short } && ! target { aarch64_sve2 } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-byte.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-byte.c
deleted file mode 100644
index b753914..0000000
--- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-byte.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_byte } */
-/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
-
-#define TYPE uint8_t
-#define N 16
-#include <stdint.h>
-#include "complex-add-pattern-template.c"
-
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { xfail aarch64_sve2 } } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-int.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-int.c
index 270c49e..4ab4b9a 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-int.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-int.c
@@ -1,12 +1,17 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_int } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+#define UNROLL
#define TYPE uint32_t
#define N 16
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_int } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_int } && ! target { aarch64_sve2 } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c
index 88144e5..38aa9c0 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-long.c
@@ -1,12 +1,16 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_long } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+#define UNROLL
#define TYPE uint64_t
#define N 16
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_long } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_long } && ! target { aarch64_sve2 } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" { target { vect_long_long } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" { target { vect_long_long } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-short.c b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-short.c
index 445af39..8846c98 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-short.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/bb-slp-complex-add-pattern-unsigned-short.c
@@ -1,12 +1,17 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_short } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+#define UNROLL
#define TYPE uint16_t
#define N 16
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail aarch64_sve2 } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_short } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_short } && ! target { aarch64_sve2 } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/complex-add-pattern-template.c b/gcc/testsuite/gcc.dg/vect/complex/complex-add-pattern-template.c
index a99a929..658af29 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/complex-add-pattern-template.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/complex-add-pattern-template.c
@@ -1,5 +1,8 @@
void add90 (TYPE a[restrict N], TYPE b[restrict N], TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i+=2)
{
c[i] = a[i] - b[i+1];
@@ -11,6 +14,9 @@ void add90 (TYPE a[restrict N], TYPE b[restrict N], TYPE c[restrict N])
void add270 (TYPE a[restrict N], TYPE b[restrict N], TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i+=2)
{
c[i] = a[i] + b[i+1];
@@ -22,6 +28,9 @@ void add270 (TYPE a[restrict N], TYPE b[restrict N], TYPE c[restrict N])
void addMixed (TYPE a[restrict N], TYPE b[restrict N], TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i+=4)
{
c[i] = a[i] - b[i+1];
@@ -34,6 +43,9 @@ void addMixed (TYPE a[restrict N], TYPE b[restrict N], TYPE c[restrict N])
void add90HandUnrolled (TYPE a[restrict N], TYPE b[restrict N],
TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < (N /2); i+=4)
{
c[i] = a[i] - b[i+1];
@@ -48,6 +60,9 @@ void add90HandUnrolled (TYPE a[restrict N], TYPE b[restrict N],
void add90Hybrid (TYPE a[restrict N], TYPE b[restrict N], TYPE c[restrict N],
TYPE d[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i+=2)
{
c[i] = a[i] - b[i+1];
@@ -57,4 +72,4 @@ void add90Hybrid (TYPE a[restrict N], TYPE b[restrict N], TYPE c[restrict N],
}
}
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" } } */ \ No newline at end of file
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/complex-add-template.c b/gcc/testsuite/gcc.dg/vect/complex/complex-add-template.c
index 32c81e6..f37ab98 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/complex-add-template.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/complex-add-template.c
@@ -3,6 +3,9 @@
void add0 (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
_Complex TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i++)
c[i] = a[i] + b[i];
}
@@ -10,6 +13,9 @@ void add0 (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
void add90snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
_Complex TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i++)
c[i] = a[i] + (b[i] * I);
}
@@ -19,6 +25,9 @@ void add90snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
void add180snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
_Complex TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i++)
c[i] = a[i] + (b[i] * I * I);
}
@@ -26,6 +35,9 @@ void add180snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
void add270snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
_Complex TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i++)
c[i] = a[i] + (b[i] * I * I * I);
}
@@ -35,6 +47,9 @@ void add270snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
void add90fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
_Complex TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i++)
c[i] = (a[i] * I) + b[i];
}
@@ -44,6 +59,9 @@ void add90fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
void add180fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
_Complex TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i++)
c[i] = (a[i] * I * I) + b[i];
}
@@ -51,6 +69,9 @@ void add180fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
void add270fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
_Complex TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i++)
c[i] = (a[i] * I * I * I) + b[i];
}
@@ -60,6 +81,9 @@ void add270fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
void addconjfst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
_Complex TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i++)
c[i] = ~a[i] + b[i];
}
@@ -67,6 +91,9 @@ void addconjfst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
void addconjsnd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
_Complex TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i++)
c[i] = a[i] + ~b[i];
}
@@ -74,6 +101,9 @@ void addconjsnd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
void addconjboth (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
_Complex TYPE c[restrict N])
{
+#if defined (UNROLL)
+#pragma GCC unroll 16
+#endif
for (int i=0; i < N; i++)
c[i] = ~a[i] + ~b[i];
}
diff --git a/gcc/testsuite/gcc.dg/vect/complex/complex-operations-run.c b/gcc/testsuite/gcc.dg/vect/complex/complex-operations-run.c
index a0348a7..14ac512 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/complex-operations-run.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/complex-operations-run.c
@@ -1,7 +1,7 @@
/* { dg-do run } */
/* { dg-require-effective-target vect_complex_add_double } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
#include <stdio.h>
#include <complex.h>
diff --git a/gcc/testsuite/gcc.dg/vect/complex/complex.exp b/gcc/testsuite/gcc.dg/vect/complex/complex.exp
index f94c7a8..ea6bfcd 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/complex.exp
+++ b/gcc/testsuite/gcc.dg/vect/complex/complex.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/vect/complex/fast-math-bb-slp-complex-add-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c
index 7bbb61a..2e611b7 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c
@@ -1,12 +1,16 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_double } */
+/* { dg-require-effective-target vect_double } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
+
+#define UNROLL
#define TYPE double
#define N 16
#include "complex-add-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_double } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_double } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c
index cf99f1d..1e63a5f 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c
@@ -1,11 +1,15 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_float } */
+/* { dg-require-effective-target vect_float } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
+
+#define UNROLL
#define TYPE float
#define N 16
#include "complex-add-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_float } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_float } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-half-float.c
index 9f535dd..0ae49c1 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-half-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-half-float.c
@@ -1,7 +1,8 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_half } */
+/* { dg-require-effective-target float16 } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
/* { dg-add-options arm_v8_3a_fp16_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE _Float16
#define N 16
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-double.c
index e121113..3f5619b 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-double.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-double.c
@@ -1,11 +1,16 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_double } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
+/* { dg-require-effective-target vect_double } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+#define UNROLL
#define TYPE double
#define N 16
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_double } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_double } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c
index 8565833..a961a85 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c
@@ -1,11 +1,15 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_float } */
+/* { dg-require-effective-target vect_float } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
+
+#define UNROLL
#define TYPE float
#define N 16
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_float } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_float } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c
index 857ee9d..885fd97 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c
@@ -1,11 +1,16 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_half } */
+/* { dg-require-effective-target float16 } */
/* { dg-add-options arm_v8_3a_fp16_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
+
+#define UNROLL
#define TYPE _Float16
#define N 16
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { xfail arm*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_half } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_half } && ! target { arm*-*-* } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c
index d9d13c2..b77c847 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c
@@ -1,9 +1,11 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_double } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-additional-options "-fdump-tree-vect-details" } */
#define TYPE double
#define N 16
#include "complex-mla-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c
index ac680cb..cd68fd1 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c
@@ -1,8 +1,10 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_float } */
-/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-additional-options "-fdump-tree-vect-details" } */
+/* { dg-add-options arm_v8_3a_fp16_complex_neon } */
#define TYPE float
#define N 16
#include "complex-mla-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c
index d0a48d0..5100920 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-half-float.c
@@ -1,9 +1,12 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_half } */
+/* { dg-require-effective-target float16 } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
/* { dg-add-options arm_v8_3a_fp16_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE _Float16
#define N 16
#include "complex-mla-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA_CONJ" "slp1" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "slp1" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c
index d9d13c2..9d98394 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c
@@ -1,9 +1,11 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_double } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-additional-options "-fdump-tree-vect-details" } */
#define TYPE double
#define N 16
-#include "complex-mla-template.c"
+#include "complex-mls-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c
index ac680cb..cf540a0 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c
@@ -1,8 +1,11 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_float } */
+/* { dg-additional-options "-fdump-tree-vect-details" } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE float
#define N 16
-#include "complex-mla-template.c"
+#include "complex-mls-template.c"
+
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c
index d0a48d0..217401b 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-half-float.c
@@ -1,9 +1,12 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_half } */
+/* { dg-require-effective-target float16 } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
/* { dg-add-options arm_v8_3a_fp16_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE _Float16
#define N 16
-#include "complex-mla-template.c"
+#include "complex-mls-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS_CONJ" "slp1" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "slp1" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c
index ab8313f..dcac519 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c
@@ -1,9 +1,11 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_double } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-additional-options "-fdump-tree-vect-details" } */
#define TYPE double
#define N 16
#include "complex-mul-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c
index 49bf961..27280ae 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c
@@ -1,8 +1,11 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_float } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE float
#define N 16
#include "complex-mul-template.c"
+
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL_CONJ" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "slp1" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c
index f5c23fb..309b168 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-half-float.c
@@ -1,9 +1,12 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_half } */
+/* { dg-require-effective-target float16 } */
+/* { dg-additional-options "-fno-tree-loop-vectorize" } */
/* { dg-add-options arm_v8_3a_fp16_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE _Float16
#define N 16
#include "complex-mul-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL_CONJ" "slp1" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "slp1" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-double.c
index 0d4d3ce..f935405 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-double.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-double.c
@@ -1,11 +1,12 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_double } */
+/* { dg-require-effective-target vect_double } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE double
#define N 200
#include "complex-add-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 2 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" } } */ \ No newline at end of file
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 2 "vect" { target { vect_complex_add_double } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" { target { vect_complex_add_double } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-float.c
index b986696..71f391d 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-float.c
@@ -1,11 +1,12 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_float } */
+/* { dg-require-effective-target vect_float } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE float
#define N 200
#include "complex-add-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 2 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" } } */ \ No newline at end of file
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 2 "vect" { target { vect_complex_add_float } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" { target { vect_complex_add_float } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-half-float.c
index c3dca57..e5b826f 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-half-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-half-float.c
@@ -1,11 +1,10 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_half } */
+/* { dg-require-effective-target float16 } */
/* { dg-add-options arm_v8_3a_fp16_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE _Float16
#define N 200
#include "complex-add-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 2 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" } } */ \ No newline at end of file
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 2 "vect" { target { vect_complex_add_half } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 2 "vect" { target { vect_complex_add_half } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c
index df4d3f6..5b70d83 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-double.c
@@ -1,11 +1,13 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_double } */
+/* { dg-require-effective-target vect_double } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE double
#define N 200
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 4 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 4 "vect" { target { vect_complex_add_double } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_double } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c
index 6df5c6d..3ef0564 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-float.c
@@ -1,11 +1,13 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_float } */
+/* { dg-require-effective-target vect_float } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE float
#define N 200
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 4 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 4 "vect" { target { vect_complex_add_float } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_float } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c
index a725112..06a9216 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c
@@ -1,12 +1,16 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_half } */
+/* { dg-require-effective-target vect_float } */
+/* { dg-require-effective-target float16 } */
/* { dg-add-options arm_v8_3a_fp16_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE _Float16
#define N 200
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 4 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 4 "vect" { target { vect_complex_add_half } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_half } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-double.c
index c85ff07..3ec46e5 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-double.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-double.c
@@ -1,8 +1,9 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_double } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE double
#define N 200
#include "complex-mla-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-float.c
index a17b91b..af59323 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-float.c
@@ -1,8 +1,9 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_complex_add_float } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE float
#define N 200
#include "complex-mla-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-half-float.c
index fa81985..34146f3 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-half-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mla-half-float.c
@@ -1,8 +1,8 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_half } */
/* { dg-add-options arm_v8_3a_fp16_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE _Float16
#define N 200
#include "complex-mla-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-double.c
index c85ff07..0982a2b 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-double.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-double.c
@@ -1,8 +1,10 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_double } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE double
#define N 200
-#include "complex-mla-template.c"
+#include "complex-mls-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-float.c
index a17b91b..a069533 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-float.c
@@ -1,8 +1,10 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_float } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE float
#define N 200
-#include "complex-mla-template.c"
+#include "complex-mls-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMA" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-half-float.c
index fa81985..89ac54c 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-half-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mls-half-float.c
@@ -1,8 +1,9 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_half } */
/* { dg-add-options arm_v8_3a_fp16_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE _Float16
#define N 200
-#include "complex-mla-template.c"
+#include "complex-mls-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-double.c
index 77c01a8..56a8ea4 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-double.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-double.c
@@ -1,8 +1,8 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_double } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE double
#define N 200
#include "complex-mul-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-float.c
index a8b44f2..969416d 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-float.c
@@ -1,8 +1,8 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_float } */
/* { dg-add-options arm_v8_3a_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE float
#define N 200
#include "complex-mul-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-half-float.c
index d57df82..da1b921 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-half-float.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-complex-mul-half-float.c
@@ -1,8 +1,8 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_half } */
/* { dg-add-options arm_v8_3a_fp16_complex_neon } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
#define TYPE _Float16
#define N 200
#include "complex-mul-template.c"
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL_CONJ" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/pr102819-1.c b/gcc/testsuite/gcc.dg/vect/complex/pr102819-1.c
new file mode 100644
index 0000000..46b9a55
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/complex/pr102819-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+float f[12][100];
+
+void bad1(float v1, float v2)
+{
+ for (int r = 0; r < 100; r += 4)
+ {
+ int i = r + 1;
+ f[0][r] = f[1][r] * (f[2][r] + v2) - f[1][i] * (f[2][i] + v1);
+ f[0][i] = f[1][r] * (f[2][i] + v1) + f[1][i] * (f[2][r] + v2);
+ f[0][r+2] = f[1][r+2] * (f[2][r+2] + v2) - f[1][i+2] * (f[2][i+2] + v1);
+ f[0][i+2] = f[1][r+2] * (f[2][i+2] + v1) + f[1][i+2] * (f[2][r+2] + v2);
+ // ^^^^^^^ ^^^^^^^
+ }
+}
+
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "vect" { target { vect_float } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/complex/pr102819-2.c b/gcc/testsuite/gcc.dg/vect/complex/pr102819-2.c
new file mode 100644
index 0000000..ffe646e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/complex/pr102819-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+float f[12][100];
+
+void bad1(float v1, float v2)
+{
+ for (int r = 0; r < 100; r += 2)
+ {
+ int i = r + 1;
+ f[0][r] = f[1][r] * (f[2][r] + v1) - f[1][i] * (f[2][i] + v2);
+ f[0][i] = f[1][r] * (f[2][i] + v1) + f[1][i] * (f[2][r] + v2);
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "Found COMPLEX_MUL" "vect" { target { vect_float } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/complex/pr102819-3.c b/gcc/testsuite/gcc.dg/vect/complex/pr102819-3.c
new file mode 100644
index 0000000..5f98aa2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/complex/pr102819-3.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+float f[12][100];
+
+void good1(float v1, float v2)
+{
+ for (int r = 0; r < 100; r += 2)
+ {
+ int i = r + 1;
+ f[0][r] = f[1][r] * (f[2][r] + v2) - f[1][i] * (f[2][i] + v1);
+ f[0][i] = f[1][r] * (f[2][i] + v1) + f[1][i] * (f[2][r] + v2);
+ }
+}
+
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "vect" { target { vect_float } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/complex/pr102819-4.c b/gcc/testsuite/gcc.dg/vect/complex/pr102819-4.c
new file mode 100644
index 0000000..8828517
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/complex/pr102819-4.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+float f[12][100];
+
+void good1()
+{
+ for (int r = 0; r < 100; r += 2)
+ {
+ int i = r + 1;
+ f[0][r] = f[1][r] * f[2][r] - f[1][i] * f[2][i];
+ f[0][i] = f[1][r] * f[2][i] + f[1][i] * f[2][r];
+ }
+}
+
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "vect" { target { vect_float } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/complex/pr102819-5.c b/gcc/testsuite/gcc.dg/vect/complex/pr102819-5.c
new file mode 100644
index 0000000..6a2d549
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/complex/pr102819-5.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+float f[12][100];
+
+void good2()
+{
+ for (int r = 0; r < 100; r += 2)
+ {
+ int i = r + 1;
+ f[0][r] = f[1][r] * (f[2][r] + 1) - f[1][i] * (f[2][i] + 1);
+ f[0][i] = f[1][r] * (f[2][i] + 1) + f[1][i] * (f[2][r] + 1);
+ }
+}
+
+/* { dg-final { scan-tree-dump "Found COMPLEX_MUL" "vect" { target { vect_float } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/complex/pr102819-6.c b/gcc/testsuite/gcc.dg/vect/complex/pr102819-6.c
new file mode 100644
index 0000000..71e66db
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/complex/pr102819-6.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+float f[12][100];
+
+void bad1()
+{
+ for (int r = 0; r < 100; r += 2)
+ {
+ int i = r + 1;
+ f[0][r] = f[1][r] * f[2][r] - f[1][i] * f[3][i];
+ f[0][i] = f[1][r] * f[2][i] + f[1][i] * f[3][r];
+ // ^^^^^^^ ^^^^^^^
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "Found COMPLEX_MUL" "vect" { target { vect_float } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/complex/pr102819-7.c b/gcc/testsuite/gcc.dg/vect/complex/pr102819-7.c
new file mode 100644
index 0000000..536672f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/complex/pr102819-7.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+float f[12][100];
+
+void bad2()
+{
+ for (int r = 0; r < 100; r += 2)
+ {
+ int i = r + 1;
+ f[0][r] = f[1][r] * (f[2][r] + 1) - f[1][i] * f[2][i];
+ f[0][i] = f[1][r] * (f[2][i] + 1) + f[1][i] * f[2][r];
+ // ^^^^
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "Found COMPLEX_MUL" "vect" { target { vect_float } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/complex/pr102819-8.c b/gcc/testsuite/gcc.dg/vect/complex/pr102819-8.c
new file mode 100644
index 0000000..07b4814
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/complex/pr102819-8.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+float f[12][100];
+
+void bad3()
+{
+ for (int r = 0; r < 100; r += 2)
+ {
+ int i = r + 1;
+ f[0][r] = f[1][r] * f[2][r] - f[1][r] * f[2][i];
+ f[0][i] = f[1][r] * f[2][i] + f[1][i] * f[2][r];
+ // ^^^^^^^
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "Found COMPLEX_MUL" "vect" { target { vect_float } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/complex/pr102819-9.c b/gcc/testsuite/gcc.dg/vect/complex/pr102819-9.c
new file mode 100644
index 0000000..7655852
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/complex/pr102819-9.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+#include <stdio.h>
+#include <complex.h>
+
+#define N 200
+#define TYPE float
+#define TYPE2 float
+
+void g (TYPE2 complex a[restrict N], TYPE complex b[restrict N], TYPE complex c[restrict N])
+{
+ for (int i=0; i < N; i++)
+ {
+ c[i] -= a[i] * b[0];
+ }
+}
+
+/* The pattern overlaps with COMPLEX_ADD so we need to support consuming ADDs in COMPLEX_FMS. */
+
+/* { dg-final { scan-tree-dump "Found COMPLEX_FMS" "vect" { xfail { vect_float } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/pr103169.c b/gcc/testsuite/gcc.dg/vect/complex/pr103169.c
new file mode 100644
index 0000000..1bfabbd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/complex/pr103169.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { vect_double } } } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+/* { dg-additional-options "-O2 -fvect-cost-model=unlimited" } */
+
+_Complex double b_0, c_0;
+
+void
+mul270snd (void)
+{
+ c_0 = b_0 * 1.0iF * 1.0iF;
+}
+
diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-byte.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-byte.c
index 438d219..bf7c135 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-byte.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-byte.c
@@ -1,12 +1,14 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_byte } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
#define TYPE int8_t
#define N 200
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_byte } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_byte } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-int.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-int.c
index 04c27dc..2fd2a9f 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-int.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-int.c
@@ -1,12 +1,14 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_int } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
#define TYPE int32_t
#define N 200
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_int } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_int } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-long.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-long.c
index 27988ad..7097715 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-long.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-long.c
@@ -1,12 +1,15 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_long } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+#define UNROLL
#define TYPE int64_t
#define N 200
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_long } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_long } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" { target { vect_long_long } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" { target { vect_long_long } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-short.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-short.c
index 88d225d..8cbb8ac 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-short.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-short.c
@@ -1,12 +1,14 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_short } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
#define TYPE int16_t
#define N 200
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_short } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_short } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-byte.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-byte.c
index 59109c0..9477f0d 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-byte.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-byte.c
@@ -1,12 +1,14 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_byte } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
#define TYPE uint8_t
#define N 200
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_byte } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_byte } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-int.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-int.c
index 44d9635..41f6004 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-int.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-int.c
@@ -1,12 +1,14 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_int } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
#define TYPE uint32_t
#define N 200
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_int } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_int } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c
index 6671457..7708ac4 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-long.c
@@ -1,12 +1,15 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_long } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+
+#define UNROLL
#define TYPE uint64_t
#define N 200
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_long } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_long } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" { target { vect_long_long } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" { target { vect_long_long } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-short.c b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-short.c
index 841adf8..6260be4 100644
--- a/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-short.c
+++ b/gcc/testsuite/gcc.dg/vect/complex/vect-complex-add-pattern-unsigned-short.c
@@ -1,12 +1,14 @@
/* { dg-do compile } */
-/* { dg-require-effective-target vect_complex_add_short } */
/* { dg-require-effective-target stdint_types } */
-/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
#define TYPE uint16_t
#define N 200
#include <stdint.h>
#include "complex-add-pattern-template.c"
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "vect" { target { vect_complex_add_short } } } } */
+/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "vect" { target { vect_complex_add_short } } } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "vect" } } */
+/* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "vect" } } */
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 a4d67b1..7976e3e 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,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/vect/costmodel/ppc/ppc-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp
index 040b0de..483308a 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,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/vect/costmodel/x86_64/x86_64-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp
index 167c5dc..428d164 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,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/vect/pr101145_1.c b/gcc/testsuite/gcc.dg/vect/pr101145_1.c
index 9332b2c..24a9da6 100644
--- a/gcc/testsuite/gcc.dg/vect/pr101145_1.c
+++ b/gcc/testsuite/gcc.dg/vect/pr101145_1.c
@@ -1,4 +1,4 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_char_add } */
/* { dg-additional-options "-O3" } */
#define TYPE signed char
#define MIN -128
diff --git a/gcc/testsuite/gcc.dg/vect/pr101145_2.c b/gcc/testsuite/gcc.dg/vect/pr101145_2.c
index fa2c6be..9091f60 100644
--- a/gcc/testsuite/gcc.dg/vect/pr101145_2.c
+++ b/gcc/testsuite/gcc.dg/vect/pr101145_2.c
@@ -1,4 +1,4 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_char_add } */
/* { dg-additional-options "-O3" } */
#define TYPE unsigned char
#define MIN 0
diff --git a/gcc/testsuite/gcc.dg/vect/pr101145_3.c b/gcc/testsuite/gcc.dg/vect/pr101145_3.c
index 9f43c82..001e5f3 100644
--- a/gcc/testsuite/gcc.dg/vect/pr101145_3.c
+++ b/gcc/testsuite/gcc.dg/vect/pr101145_3.c
@@ -1,4 +1,4 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_long_long } */
/* { dg-additional-options "-O3" } */
#define TYPE int *
#define MIN ((TYPE)0)
diff --git a/gcc/testsuite/gcc.dg/vect/pr102832.c b/gcc/testsuite/gcc.dg/vect/pr102832.c
new file mode 100644
index 0000000..7cb4db5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr102832.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+/* { dg-additional-options "-march=armv8.2-a+sve -msve-vector-bits=128" { target aarch64-*-* } } */
+
+int a, b;
+char c;
+signed char d(int e, int f) { return e - f; }
+void g() {
+ a = 0;
+ for (; a >= -17; a = d(a, 1))
+ c ^= b;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr103253.c b/gcc/testsuite/gcc.dg/vect/pr103253.c
new file mode 100644
index 0000000..abe3f09
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr103253.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target fopenmp } */
+/* { dg-additional-options "-O2 -fexceptions -fopenmp -fno-delete-dead-exceptions -fno-trapping-math" } */
+
+double
+do_work (double do_work_pri)
+{
+ int i;
+
+#pragma omp simd
+ for (i = 0; i < 17; ++i)
+ do_work_pri = (!i ? 0.5 : i) * 2.0;
+
+ return do_work_pri;
+}
+
diff --git a/gcc/testsuite/gcc.dg/vect/pr103494.c b/gcc/testsuite/gcc.dg/vect/pr103494.c
new file mode 100644
index 0000000..b544bf2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr103494.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+
+typedef int T1;
+typedef signed char T2;
+
+T1
+f (T1 *d, T2 *x, int n)
+{
+ unsigned char res = 0;
+ for (int i = 0; i < n; ++i)
+ res += d[x[i]];
+ return res;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr103517.c b/gcc/testsuite/gcc.dg/vect/pr103517.c
new file mode 100644
index 0000000..de87fc4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr103517.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-march=skylake-avx512" { target x86_64-*-* i?86-*-* } } */
+
+int a;
+short b, c;
+extern short d[];
+void e() {
+ for (short f = 1; f < (short)a; f += 2)
+ if (d[f + 1]) {
+ b = d[f];
+ c = d[f + 1];
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr103544.c b/gcc/testsuite/gcc.dg/vect/pr103544.c
new file mode 100644
index 0000000..c8bdee8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr103544.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+/* { dg-additional-options "-march=haswell" { target x86_64-*-* i?86-*-* } } */
+
+int crash_me(char* ptr, unsigned long size)
+{
+ short result[16] = {0};
+
+ unsigned long no_iters = 0;
+ for(unsigned long i = 0; i < size - 12; i+= 13){
+ for(unsigned long j = 0; j < 12; j++){
+ result[j] += ptr[i + j] - '0';
+ }
+ no_iters++;
+ }
+
+ int result_int = 0;
+ for(int j = 0; j < 12; j++){
+ int bit_value = result[j] > no_iters/2 ? 1 : 0;
+ result_int |= bit_value;
+ }
+
+ return result_int;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr103581.c b/gcc/testsuite/gcc.dg/vect/pr103581.c
new file mode 100644
index 0000000..d072748
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr103581.c
@@ -0,0 +1,59 @@
+/* { dg-additional-options "-mavx2 -mtune-ctrl=use_gather" { target avx2_runtime } } */
+
+#include "tree-vect.h"
+
+#define MASKGATHER(SUFF, TYPE1, TYPE2) \
+TYPE1 * __attribute__((noipa)) \
+maskgather ## SUFF (int n, TYPE2 *indices, TYPE1 *data) \
+{ \
+ TYPE1 *out = __builtin_malloc (sizeof (TYPE1) * n); \
+ for (int i = 0; i < n; ++i) \
+ { \
+ TYPE2 d = indices[i]; \
+ if (d > 1) \
+ out[i] = data[d]; \
+ } \
+ return out; \
+}
+
+MASKGATHER(udiusi, unsigned long long, unsigned int)
+MASKGATHER(usiusi, unsigned int, unsigned int)
+MASKGATHER(udiudi, unsigned long long, unsigned long long)
+MASKGATHER(usiudi, unsigned int, unsigned long long)
+
+int
+main()
+{
+ check_vect ();
+
+ unsigned int idx4[32], data4[32];
+ unsigned long long idx8[32], data8[32];
+ for (int i = 0; i < 32; ++i)
+ {
+ idx4[i] = i;
+ idx8[i] = i;
+ data4[i] = i;
+ data8[i] = i;
+ }
+ unsigned long long *resudiusi = maskgatherudiusi (16, idx4, data8);
+ unsigned int *resusiusi = maskgatherusiusi (16, idx4, data4);
+ unsigned long long *resudiudi = maskgatherudiudi (16, idx8, data8);
+ unsigned int *resusiudi = maskgatherusiudi (16, idx8, data4);
+ for (int i = 0; i < 16; ++i)
+ {
+ unsigned int d = idx4[i];
+ if (d > 1)
+ {
+ if (resudiusi[i] != data4[d])
+ __builtin_abort ();
+ if (resudiudi[i] != data4[d])
+ __builtin_abort ();
+ if (resusiudi[i] != data4[d])
+ __builtin_abort ();
+ if (resusiusi[i] != data4[d])
+ __builtin_abort ();
+ }
+ }
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/vect/pr103744-1.c b/gcc/testsuite/gcc.dg/vect/pr103744-1.c
new file mode 100644
index 0000000..1bc81e2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr103744-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+
+int r;
+
+void
+foo (short int *s, short int *d1, short int *d2, int z)
+{
+ int *a;
+
+ while (z < 1)
+ {
+ int i;
+
+ i = *s++ - (*d1++ + *d2++);
+ r += a[i];
+ i = *s++ - (*d1++ + *d2++);
+ r += a[i];
+ ++z;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr103744-2.c b/gcc/testsuite/gcc.dg/vect/pr103744-2.c
new file mode 100644
index 0000000..52307ab
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr103744-2.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+
+int
+f1 (int *restrict x, unsigned short *restrict y)
+{
+ int res = 0;
+ for (int i = 0; i < 100; i += 2)
+ {
+ unsigned short i1 = y[i + 0] + 1;
+ unsigned short i2 = y[i + 1] + 2;
+ res += x[i1];
+ res += x[i2];
+ }
+ return res;
+}
+
+void
+f2 (int *restrict x, unsigned short *restrict y)
+{
+ int res1 = 0;
+ int res2 = 0;
+ for (int i = 0; i < 100; i += 2)
+ {
+ unsigned short i1 = y[i + 0] + 1;
+ unsigned short i2 = y[i + 1] + 2;
+ res1 += x[i1];
+ res2 += x[i2];
+ }
+ x[0] = res1;
+ x[1] = res2;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr103864.c b/gcc/testsuite/gcc.dg/vect/pr103864.c
new file mode 100644
index 0000000..464d573
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr103864.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O3 -fno-tree-reassoc" } */
+
+void
+crash_me (short int *crash_me_result, int i, char crash_me_ptr_0)
+{
+ while (i < 1)
+ {
+ int j;
+
+ for (j = 0; j < 2; ++j)
+ crash_me_result[j] += crash_me_ptr_0 + 1;
+
+ i += 3;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr104112-1.c b/gcc/testsuite/gcc.dg/vect/pr104112-1.c
new file mode 100644
index 0000000..84e69b8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr104112-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-Ofast" } */
+/* { dg-additional-options "-march=armv8.2-a+sve -msve-vector-bits=512" { target aarch64-*-* } } */
+
+void
+boom(int n, double *a, double *x)
+{
+ int i, j;
+ double temp;
+
+ for (j = n; j >= 1; --j)
+ {
+ temp = x[j];
+ for (i = j - 1; i >= 1; --i)
+ temp += a[i + j] * x[i];
+ x[j] = temp;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr104112-2.c b/gcc/testsuite/gcc.dg/vect/pr104112-2.c
new file mode 100644
index 0000000..7469b3c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr104112-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* Diagnose vector ops that are later decomposed. */
+/* { dg-additional-options "-Wvector-operation-performance" } */
+
+unsigned short foo (unsigned short *a, int n)
+{
+ unsigned short sum = 0;
+ for (int i = 0; i < n; ++i)
+ sum += a[i];
+ return sum;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr104152.c b/gcc/testsuite/gcc.dg/vect/pr104152.c
new file mode 100644
index 0000000..3a313c3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr104152.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-Ofast" } */
+/* { dg-additional-options "-march=armv8.2-a+sve" { target aarch64-*-* } } */
+
+#define M_PI 3.14f
+#define NK 24
+#define DIM 3
+
+typedef float rvec_ [3];
+
+static rvec_ v0[NK] = {
+ { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { 1, 1, 0 }, { 1, -1, 0 },
+ { 1, 0, 1 }, { 1, 0, -1 }, { 0, 1, 1 }, { 0, 1, -1 }, { 1, 1, 1 },
+ { 1, 1, -1 }, { 1, -1, 1 }, { -1, 1, 1 }, { 2, 0, 0 }, { 0, 2, 0 },
+ { 0, 0, 2 }, { 3, 0, 0 }, { 0, 3, 0 }, { 0, 0, 3 }, { 4, 0, 0 },
+ { 0, 4, 0 }, { 0, 0, 4 } };
+
+static inline float iprod__(const rvec_ a, const rvec_ b)
+{
+ return (a[0] * b[0] + a[1] * b[1] + a[2] * b[2]);
+}
+
+int badaboum(rvec_ cm_mol, float **tc)
+{
+ float sx;
+ int k, d;
+ rvec_ kfac[3];
+
+ for (k = 0; k < DIM; k++)
+ for (d = 0; d < DIM; d++)
+ kfac[k][d] = M_PI * v0[k][d] / v0[d][d];
+
+ for (k = 0; k < DIM; k++)
+ {
+ sx = __builtin_sinf(iprod__(kfac[k], cm_mol));
+ tc[k][0] += sx * iprod__(v0[k], cm_mol);
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr104445.c b/gcc/testsuite/gcc.dg/vect/pr104445.c
new file mode 100644
index 0000000..8ec3b3b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr104445.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+/* { dg-additional-options "-mavx -mno-mmx" { target x86_64-*-* i?86-*-* } } */
+
+signed char a;
+signed char f (int i, int j)
+{
+ signed char c;
+ while (i != 0)
+ {
+ a ^= j;
+ ++c;
+ ++i;
+ }
+ return c;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr81196-2.c b/gcc/testsuite/gcc.dg/vect/pr81196-2.c
new file mode 100644
index 0000000..8d5ce6b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr81196-2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+void b (int *p)
+{
+ p = (int *)__builtin_assume_aligned(p, __BIGGEST_ALIGNMENT__);
+ int *q = p + 255;
+ for(; p < q; ++p, --q)
+ {
+ int t = *p;
+ *p = *q;
+ *q = t;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr99102.c b/gcc/testsuite/gcc.dg/vect/pr99102.c
index 6c1a13f..0d030d1 100644
--- a/gcc/testsuite/gcc.dg/vect/pr99102.c
+++ b/gcc/testsuite/gcc.dg/vect/pr99102.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
/* { dg-additional-options "-msve-vector-bits=256" { target aarch64_sve256_hw } } */
long a[44];
short d, e = -7;
diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-9.c b/gcc/testsuite/gcc.dg/vect/slp-perm-9.c
index 873eddf..154c00a 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-perm-9.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-perm-9.c
@@ -61,9 +61,7 @@ int main (int argc, const char* argv[])
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { { vect_perm_short || vect32 } || vect_load_lanes } } } } */
/* We don't try permutes with a group size of 3 for variable-length
vectors. */
-/* { dg-final { scan-tree-dump-times "permutation requires at least three vectors" 1 "vect" { target { vect_perm_short && { { ! vect_perm3_short } && { ! vect_partial_vectors_usage_1 } } } xfail vect_variable_length } } } */
-/* Try to vectorize the epilogue using partial vectors. */
-/* { dg-final { scan-tree-dump-times "permutation requires at least three vectors" 2 "vect" { target { vect_perm_short && { { ! vect_perm3_short } && vect_partial_vectors_usage_1 } } xfail vect_variable_length } } } */
+/* { dg-final { scan-tree-dump "permutation requires at least three vectors" "vect" { target { vect_perm_short && { ! vect_perm3_short } } xfail vect_variable_length } } } */
/* { dg-final { scan-tree-dump-not "permutation requires at least three vectors" "vect" { target vect_perm3_short } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target { { ! { vect_perm3_short || vect32 } } || vect_load_lanes } } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { { vect_perm3_short || vect32 } && { ! vect_load_lanes } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/license.txt b/gcc/testsuite/gcc.dg/vect/tsvc/license.txt
new file mode 100644
index 0000000..e16b36c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/license.txt
@@ -0,0 +1,29 @@
+Copyright (c) 2011 University of Illinois at Urbana-Champaign. All rights reserved.
+
+Developed by: Polaris Research Group
+ University of Illinois at Urbana-Champaign
+ http://polaris.cs.uiuc.edu
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal with the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimers.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimers in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the names of Polaris Research Group, University of Illinois at
+ Urbana-Champaign, nor the names of its contributors may be used to endorse
+ or promote products derived from this Software without specific prior
+ written permission.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+WITH THE SOFTWARE.
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
new file mode 100644
index 0000000..75494c2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h
@@ -0,0 +1,1436 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+#define iterations 10000
+#define LEN_1D 32000
+#define LEN_2D 256
+#define ARRAY_ALIGNMENT 64
+
+#pragma GCC push_options
+#pragma GCC optimize "-fno-tree-vectorize"
+
+#include <stdio.h>
+#include <stdlib.h>
+#if !defined(__APPLE__) && !defined(__DragonFly__)
+#include <malloc.h>
+#endif
+#include <string.h>
+#include <math.h>
+
+typedef float real_t;
+#define ABS fabsf
+
+int dummy(real_t[LEN_1D], real_t[LEN_1D], real_t[LEN_1D], real_t[LEN_1D],
+ real_t[LEN_1D], real_t[LEN_2D][LEN_2D], real_t[LEN_2D][LEN_2D],
+ real_t[LEN_2D][LEN_2D], real_t);
+
+__attribute__((aligned(ARRAY_ALIGNMENT)))
+real_t flat_2d_array[LEN_2D * LEN_2D];
+__attribute__((aligned(ARRAY_ALIGNMENT))) real_t x[LEN_1D];
+__attribute__((aligned(ARRAY_ALIGNMENT))) real_t a[LEN_1D], b[LEN_1D],
+ c[LEN_1D], d[LEN_1D], e[LEN_1D], aa[LEN_2D][LEN_2D], bb[LEN_2D][LEN_2D],
+ cc[LEN_2D][LEN_2D], tt[LEN_2D][LEN_2D];
+__attribute__((aligned(ARRAY_ALIGNMENT))) int indx[LEN_1D];
+
+real_t* __restrict__ xx;
+real_t* yy;
+
+void set_1d_array(real_t * arr, int length, real_t value, int stride);
+void set_2d_array(real_t arr[LEN_2D][LEN_2D], real_t value, int stride);
+
+struct args_t {
+ struct timeval t1;
+ struct timeval t2;
+ void * __restrict__ arg_info;
+};
+
+enum {SET1D_RECIP_IDX = -1, SET1D_RECIP_IDX_SQ = -2};
+
+real_t sum1d(real_t arr[LEN_1D]);
+real_t sum2d(real_t arr[LEN_2D][LEN_2D]);
+
+real_t sum_x();
+real_t sum_a();
+real_t sum_b();
+real_t sum_c();
+real_t sum_e();
+
+real_t sum_half_xx();
+
+real_t sum_a_aa();
+
+real_t sum_aa();
+real_t sum_bb();
+real_t sum_cc();
+real_t sum_xx();
+
+real_t sum_aa_bb();
+
+real_t sum_flat_2d_array();
+
+real_t sum1d(real_t arr[LEN_1D]){
+ real_t ret = 0.;
+ for (int i = 0; i < LEN_1D; i++)
+ ret += arr[i];
+ return ret;
+}
+
+real_t sum2d(real_t arr[LEN_2D][LEN_2D]){
+ real_t sum = 0.;
+ for (int i = 0; i < LEN_2D; i++){
+ for (int j = 0; j < LEN_2D; j++){
+ sum += arr[i][j];
+ }
+ }
+
+ return sum;
+}
+
+real_t sum_x()
+{
+ return sum1d(x);
+}
+
+real_t sum_xx()
+{
+ return sum1d(xx);
+}
+
+real_t sum_a()
+{
+ return sum1d(a);
+}
+
+real_t sum_b()
+{
+ return sum1d(b);
+}
+
+real_t sum_a_aa()
+{
+ return sum1d(a) + sum2d(aa);
+}
+
+real_t sum_c()
+{
+ return sum1d(c);
+}
+
+real_t sum_e()
+{
+ return sum1d(e);
+}
+
+real_t sum_aa()
+{
+ return sum2d(aa);
+}
+
+real_t sum_bb()
+{
+ return sum2d(bb);
+}
+
+real_t sum_aa_bb()
+{
+ return sum2d(aa) + sum2d(bb);
+}
+
+real_t sum_cc()
+{
+ return sum2d(cc);
+}
+
+real_t sum_half_xx()
+{
+ real_t temp = 00;
+
+ for (int i = 0; i < LEN_1D/2; i++){
+ temp += xx[i];
+ }
+
+ return temp;
+}
+
+real_t sum_flat_2d_array()
+{
+ real_t sum = 0.;
+
+ for (int i = 0; i < LEN_2D*LEN_2D; i++){
+ sum += flat_2d_array[i];
+ }
+
+ return sum;
+}
+
+
+void set_1d_array(real_t * arr, int length, real_t value, int stride)
+{
+ if (stride == SET1D_RECIP_IDX) {
+ for (int i = 0; i < length; i++) {
+ arr[i] = 1. / (real_t) (i+1);
+ }
+ } else if (stride == SET1D_RECIP_IDX_SQ) {
+ for (int i = 0; i < length; i++) {
+ arr[i] = 1. / (real_t) ((i+1) * (i+1));
+ }
+ } else {
+ for (int i = 0; i < length; i += stride) {
+ arr[i] = value;
+ }
+ }
+}
+
+void set_2d_array(real_t arr[LEN_2D][LEN_2D], real_t value, int stride)
+{
+ for (int i = 0; i < LEN_2D; i++) {
+ set_1d_array(arr[i], LEN_2D, value, stride);
+ }
+}
+
+void init(int** ip, real_t* s1, real_t* s2){
+#if !defined (__APPLE__) && !defined (_AIX) && !defined(__DragonFly__)
+ xx = (real_t*) memalign(ARRAY_ALIGNMENT, LEN_1D*sizeof(real_t));
+ *ip = (int *) memalign(ARRAY_ALIGNMENT, LEN_1D*sizeof(real_t));
+#else
+# if defined (__APPLE__) \
+ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060
+ /* We have no aligned allocator, but malloc is guaranteed to return
+ alignment suitable for the largest vector item. */
+ xx = (real_t*) malloc (LEN_1D*sizeof(real_t));
+ *ip = (int *) malloc (LEN_1D*sizeof(real_t));
+# else
+ posix_memalign ((void*)&xx, ARRAY_ALIGNMENT, LEN_1D*sizeof(real_t));
+ posix_memalign ((void*)ip, ARRAY_ALIGNMENT, LEN_1D*sizeof(real_t));
+# endif
+#endif
+
+ for (int i = 0; i < LEN_1D; i = i+5){
+ (*ip)[i] = (i+4);
+ (*ip)[i+1] = (i+2);
+ (*ip)[i+2] = (i);
+ (*ip)[i+3] = (i+3);
+ (*ip)[i+4] = (i+1);
+ }
+
+ set_1d_array(a, LEN_1D, 1.,1);
+ set_1d_array(b, LEN_1D, 1.,1);
+ set_1d_array(c, LEN_1D, 1.,1);
+ set_1d_array(d, LEN_1D, 1.,1);
+ set_1d_array(e, LEN_1D, 1.,1);
+ set_1d_array(x, LEN_1D, 1.,1);
+ set_2d_array(aa, 0.,SET1D_RECIP_IDX);
+ set_2d_array(bb, 0.,SET1D_RECIP_IDX);
+ set_2d_array(cc, 0.,SET1D_RECIP_IDX);
+
+ for (int i = 0; i < LEN_1D; i++) {
+ indx[i] = (i+1) % 4+1;
+ }
+
+ *s1 = 1.0;
+ *s2 = 2.0;
+}
+
+int initialise_arrays(const char* name)
+{
+ real_t any=0.;
+ real_t zero=0.;
+ real_t half=.5;
+ real_t one=1.;
+ real_t two=2.;
+ real_t small = .000001;
+ int unit =1;
+ int frac = SET1D_RECIP_IDX;
+ int frac2 = SET1D_RECIP_IDX_SQ;
+
+ if (!strcmp(name, "s000")) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = 1+i;
+ b[i] = 2+i;
+ c[i] = 3+i;
+ d[i] = 4+i;
+ e[i] = 5+i;
+ }
+ } else if (!strcmp(name, "s111")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ set_1d_array(c, LEN_1D, any,frac2);
+ set_1d_array(d, LEN_1D, any,frac2);
+ set_1d_array(e, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s112")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s113")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s114")) {
+ set_2d_array(aa, any,frac);
+ set_2d_array(bb, any,frac2);
+ } else if (!strcmp(name, "s115")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_2d_array(aa,small,unit);
+ set_2d_array(bb,small,unit);
+ set_2d_array(cc,small,unit);
+ } else if (!strcmp(name, "s116")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ } else if (!strcmp(name, "s118")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_2d_array(bb,small,unit);
+ } else if (!strcmp(name, "s119")) {
+ set_2d_array(aa, one,unit);
+ set_2d_array(bb, any,frac2);
+ } else if (!strcmp(name, "s121")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s122")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s123")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s124")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s125")) {
+ set_1d_array(flat_2d_array, LEN_2D*LEN_2D,zero,unit);
+ set_2d_array(aa, one,unit);
+ set_2d_array(bb,half,unit);
+ set_2d_array(cc, two,unit);
+ } else if (!strcmp(name, "s126")) {
+ set_2d_array(bb, one,unit);
+ set_1d_array( flat_2d_array, LEN_2D*LEN_2D,any,frac);
+ set_2d_array(cc, any,frac);
+ } else if (!strcmp(name, "s127")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s128")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, two,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D, one,unit);
+ } else if (!strcmp(name, "s131")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s132")) {
+ set_2d_array(aa, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s141")) {
+ set_1d_array( flat_2d_array, LEN_2D*LEN_2D, one,unit);
+ set_2d_array(bb, any,frac2);
+ } else if (!strcmp(name, "s151")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s152")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D,zero,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s161")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array( &b[0], LEN_1D/2, one,2);
+ set_1d_array( &b[1], LEN_1D/2,-one,2);
+ set_1d_array(c, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s162")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s171")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s172")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s173")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s174")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s175")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s176")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s211")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s212")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s221")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s222")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ } else if (!strcmp(name, "s231")) {
+ set_2d_array(aa, one,unit);
+ set_2d_array(bb, any,frac2);
+ } else if (!strcmp(name, "s232")) {
+ set_2d_array(aa, one,unit);
+ set_2d_array(bb,zero,unit);
+ } else if (!strcmp(name, "s233")) {
+ set_2d_array(aa, any,frac);
+ set_2d_array(bb, any,frac);
+ set_2d_array(cc, any,frac);
+ } else if (!strcmp(name, "s234")) {
+ set_2d_array(aa, one,unit);
+ set_2d_array(bb, any,frac);
+ set_2d_array(cc, any,frac);
+ } else if (!strcmp(name, "s235")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_2d_array(aa, one,unit);
+ set_2d_array(bb, any, frac2);
+ } else if (!strcmp(name, "s241")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D, one,unit);
+ } else if (!strcmp(name, "s242")) {
+ set_1d_array(a, LEN_1D,small,unit);
+ set_1d_array(b, LEN_1D,small,unit);
+ set_1d_array(c, LEN_1D,small,unit);
+ set_1d_array(d, LEN_1D,small,unit);
+ } else if (!strcmp(name, "s243")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s244")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D,small,unit);
+ set_1d_array(d, LEN_1D,small,unit);
+ } else if (!strcmp(name, "s251")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s252")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ } else if (!strcmp(name, "s253")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D,small,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s254")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ } else if (!strcmp(name, "s255")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ } else if (!strcmp(name, "s256")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D, two,frac);
+ set_2d_array(aa, two,unit);
+ set_2d_array(bb, one,unit);
+ } else if (!strcmp(name, "s257")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_2d_array(aa, two,unit);
+ set_2d_array(bb, one,unit);
+ } else if (!strcmp(name, "s258")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ set_1d_array(b, LEN_1D,zero,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D,zero,unit);
+ set_2d_array(aa, any,frac);
+ } else if (!strcmp(name, "s261")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ set_1d_array(c, LEN_1D, any,frac2);
+ set_1d_array(d, LEN_1D, one,unit);
+ } else if (!strcmp(name, "s271")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s272")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, two,unit);
+ } else if (!strcmp(name, "s273")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D,small,unit);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s274")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s275")) {
+ set_2d_array(aa, one,unit);
+ set_2d_array(bb,small,unit);
+ set_2d_array(cc,small,unit);
+ } else if (!strcmp(name, "s276")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s277")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array( b, LEN_1D/2, one,unit);
+ set_1d_array( &b[LEN_1D/2], LEN_1D/2,-one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s278")) {
+ set_1d_array( a, LEN_1D/2,-one,unit);
+ set_1d_array( &a[LEN_1D/2], LEN_1D/2,one,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s279")) {
+ set_1d_array( a, LEN_1D/2,-one,unit);
+ set_1d_array( &a[LEN_1D/2], LEN_1D/2,one,unit);
+// set_1d_array(a, LEN_1D, -one,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s2710")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s2711")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s2712")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s281")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ } else if (!strcmp(name, "1s281")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D, one,unit);
+ set_1d_array(e, LEN_1D, one,unit);
+ set_1d_array(x, LEN_1D, one,unit);
+ } else if (!strcmp(name, "s291")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ } else if (!strcmp(name, "s292")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ } else if (!strcmp(name, "s293")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s2101")) {
+ set_2d_array(aa, one,unit);
+ set_2d_array(bb, any,frac);
+ set_2d_array(cc, any,frac);
+ } else if (!strcmp(name, "s2102")) {
+ set_2d_array(aa,zero,unit);
+ } else if (!strcmp(name, "s2111")) {
+ set_2d_array(aa, small,unit);
+ } else if (!strcmp(name, "s311")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s312")) {
+ set_1d_array(a, LEN_1D,1.000001,unit);
+ } else if (!strcmp(name, "s313")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ set_1d_array(b, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s314")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s315")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s316")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s317")) {
+ } else if (!strcmp(name, "s318")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ a[LEN_1D-1] = -two;
+ } else if (!strcmp(name, "s319")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D,zero,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s3110")) {
+ set_2d_array(aa, any,frac);
+ aa[LEN_2D-1][LEN_2D-1] = two;
+ } else if (!strcmp(name, "s3111")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s3112")) {
+ set_1d_array(a, LEN_1D, any,frac2);
+ set_1d_array(b, LEN_1D,zero,unit);
+ } else if (!strcmp(name, "s3113")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ a[LEN_1D-1] = -two;
+ } else if (!strcmp(name, "s321")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D,zero,unit);
+ } else if (!strcmp(name, "s322")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D,zero,unit);
+ set_1d_array(c, LEN_1D,zero,unit);
+ } else if (!strcmp(name, "s323")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s331")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ a[LEN_1D-1] = -one;
+ } else if (!strcmp(name, "s332")) {
+ set_1d_array(a, LEN_1D, any,frac2);
+ a[LEN_1D-1] = two;
+ } else if (!strcmp(name, "s341")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s342")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ set_1d_array(b, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s343")) {
+ set_2d_array(aa, any,frac);
+ set_2d_array(bb, one,unit);
+ } else if (!strcmp(name, "s351")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ c[0] = 1.;
+ } else if (!strcmp(name, "s352")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ set_1d_array(b, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s353")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ c[0] = 1.;
+ } else if (!strcmp(name, "s411")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s412")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s413")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s414")) {
+ set_2d_array(aa, one,unit);
+ set_2d_array(bb, any,frac);
+ set_2d_array(cc, any,frac);
+ } else if (!strcmp(name, "s415")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ a[LEN_1D-1] = -one;
+ } else if (!strcmp(name, "s421")) {
+ set_1d_array(a, LEN_1D, any,frac2);
+ set_1d_array(flat_2d_array, LEN_1D, one, unit);
+ } else if (!strcmp(name, "s422")) {
+ set_1d_array(flat_2d_array, LEN_1D,one,unit);
+ set_1d_array(a, LEN_1D, any,frac2);
+ set_1d_array(flat_2d_array + LEN_1D, LEN_1D, zero, unit);
+ } else if (!strcmp(name, "s1421")) {
+ set_1d_array(b, LEN_1D, one, unit);
+ } else if (!strcmp(name, "s423")) {
+ set_1d_array(flat_2d_array, LEN_1D,zero,unit);
+ set_1d_array(a, LEN_1D, any,frac2);
+ set_1d_array(flat_2d_array + LEN_1D, LEN_1D, one, unit);
+ } else if (!strcmp(name, "s424")) {
+ set_1d_array(flat_2d_array, LEN_1D,one,unit);
+ set_1d_array(a, LEN_1D, any,frac2);
+ set_1d_array(flat_2d_array, LEN_1D, zero, unit);
+ } else if (!strcmp(name, "s431")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s432")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s441")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(&d[0], LEN_1D/3 , -one,unit);
+ set_1d_array(&d[LEN_1D/3], LEN_1D/3 , zero,unit);
+ set_1d_array(&d[(2*LEN_1D/3)], LEN_1D/3+1, one,unit);
+ } else if (!strcmp(name, "s442")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s443")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s451")) {
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s452")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D,small,unit);
+ } else if (!strcmp(name, "s453")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s471")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, one,unit);
+ set_1d_array(d, LEN_1D, any,frac);
+ set_1d_array(e, LEN_1D, any,frac);
+ set_1d_array(x, LEN_1D, zero, unit);
+ } else if (!strcmp(name, "s481")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s482")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s491")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s4112")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s4113")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "s4114")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s4115")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ set_1d_array(b, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s4116")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ set_2d_array(aa, any,frac);
+ } else if (!strcmp(name, "s4117")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D, any,frac);
+ set_1d_array(d, LEN_1D, any,frac);
+ } else if (!strcmp(name, "s4121")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "va")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "vag")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "vas")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "vif")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "vpv")) {
+ set_1d_array(a, LEN_1D,zero,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "vtv")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, one,unit);
+ } else if (!strcmp(name, "vpvtv")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, any,frac);
+ } else if (!strcmp(name, "vpvts")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, any,frac2);
+ } else if (!strcmp(name, "vpvpv")) {
+ set_1d_array(a, LEN_1D, any,frac2);
+ set_1d_array(b, LEN_1D, one,unit);
+ set_1d_array(c, LEN_1D,-one,unit);
+ } else if (!strcmp(name, "vtvtv")) {
+ set_1d_array(a, LEN_1D, one,unit);
+ set_1d_array(b, LEN_1D, two,unit);
+ set_1d_array(c, LEN_1D,half,unit);
+ } else if (!strcmp(name, "vsumr")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ } else if (!strcmp(name, "vdotr")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ set_1d_array(b, LEN_1D, any,frac);
+ } else if (!strcmp(name, "vbor")) {
+ set_1d_array(a, LEN_1D, any,frac);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, one,frac);
+ set_1d_array(d, LEN_1D, two,frac);
+ set_1d_array(e, LEN_1D,half,frac);
+ set_2d_array(aa, any,frac);
+ } else {
+ set_1d_array(a, LEN_1D, any,frac);
+ set_1d_array(b, LEN_1D, any,frac);
+ set_1d_array(c, LEN_1D, one,frac);
+ set_1d_array(d, LEN_1D, two,frac);
+ set_1d_array(e, LEN_1D,half,frac);
+ set_2d_array(aa, half,frac);
+ set_2d_array(bb, one,frac);
+ set_2d_array(cc, any,frac);
+ }
+
+ return 0;
+}
+
+real_t calc_checksum(const char * name)
+{
+ if (!strcmp(name, "s000")) {
+ return sum_a();
+ } else if (!strcmp(name, "s111")) {
+ return sum_a();
+ } else if (!strcmp(name, "s1111")) {
+ return sum_a();
+ } else if (!strcmp(name, "s112")) {
+ return sum_a();
+ } else if (!strcmp(name, "s1112")) {
+ return sum_a();
+ } else if (!strcmp(name, "s113")) {
+ return sum_a();
+ } else if (!strcmp(name, "s1113")) {
+ return sum_a();
+ } else if (!strcmp(name, "s114")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s115")) {
+ return sum_a();
+ } else if (!strcmp(name, "s1115")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s116")) {
+ return sum_a();
+ } else if (!strcmp(name, "s118")) {
+ return sum_a();
+ } else if (!strcmp(name, "s119")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s1119")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s121")) {
+ return sum_a();
+ } else if (!strcmp(name, "s122")) {
+ return sum_a();
+ } else if (!strcmp(name, "s123")) {
+ return sum_a();
+ } else if (!strcmp(name, "s124")) {
+ return sum_a();
+ } else if (!strcmp(name, "s125")) {
+ return sum_flat_2d_array();
+ } else if (!strcmp(name, "s126")) {
+ return sum_bb();
+ } else if (!strcmp(name, "s127")) {
+ return sum_a();
+ } else if (!strcmp(name, "s128")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s131")) {
+ return sum_a();
+ } else if (!strcmp(name, "s132")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s141")) {
+ return sum_flat_2d_array();
+ } else if (!strcmp(name, "s151")) {
+ return sum_a();
+ } else if (!strcmp(name, "s152")) {
+ return sum_a();
+ } else if (!strcmp(name, "s161")) {
+ return sum_a() + sum_c();
+ } else if (!strcmp(name, "s1161")) {
+ return sum_a() + sum_c();
+ } else if (!strcmp(name, "s162")) {
+ return sum_a();
+ } else if (!strcmp(name, "s171")) {
+ return sum_a();
+ } else if (!strcmp(name, "s172")) {
+ return sum_a();
+ } else if (!strcmp(name, "s173")) {
+ return sum_a();
+ } else if (!strcmp(name, "s174")) {
+ return sum_a();
+ } else if (!strcmp(name, "s175")) {
+ return sum_a();
+ } else if (!strcmp(name, "s176")) {
+ return sum_a();
+ } else if (!strcmp(name, "s211")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s212")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s1213")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s221")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s1221")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s222")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s231")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s232")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s1232")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s233")) {
+ return sum_aa_bb();
+ } else if (!strcmp(name, "s2233")) {
+ return sum_aa_bb();
+ } else if (!strcmp(name, "s235")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s241")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s242")) {
+ return sum_a();
+ } else if (!strcmp(name, "s243")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s244")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s1244")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s2244")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s251")) {
+ return sum_a();
+ } else if (!strcmp(name, "s1251")) {
+ return sum_a();
+ } else if (!strcmp(name, "s2251")) {
+ return sum_a();
+ } else if (!strcmp(name, "s3251")) {
+ return sum_a();
+ } else if (!strcmp(name, "s252")) {
+ return sum_a();
+ } else if (!strcmp(name, "s253")) {
+ return sum_a() + sum_c();
+ } else if (!strcmp(name, "s254")) {
+ return sum_a();
+ } else if (!strcmp(name, "s255")) {
+ return sum_a();
+ } else if (!strcmp(name, "s256")) {
+ return sum_a_aa();
+ } else if (!strcmp(name, "s257")) {
+ return sum_a_aa();
+ } else if (!strcmp(name, "s258")) {
+ return sum_b() + sum_e();
+ } else if (!strcmp(name, "s261")) {
+ return sum_a() + sum_c();
+ } else if (!strcmp(name, "s271")) {
+ return sum_a();
+ } else if (!strcmp(name, "s272")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s273")) {
+ return sum_a() + sum_b() + sum_c();
+ } else if (!strcmp(name, "s274")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s275")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s2275")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s276")) {
+ return sum_a();
+ } else if (!strcmp(name, "s277")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s278")) {
+ return sum_a() + sum_b() + sum_c();
+ } else if (!strcmp(name, "s279")) {
+ return sum_a() + sum_b() + sum_c();
+ } else if (!strcmp(name, "s1279")) {
+ return sum_a() + sum_b() + sum_c();
+ } else if (!strcmp(name, "s2710")) {
+ return sum_a() + sum_b() + sum_c();
+ } else if (!strcmp(name, "s2711")) {
+ return sum_a();
+ } else if (!strcmp(name, "s2712")) {
+ return sum_a();
+ } else if (!strcmp(name, "s281")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s1281")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s291")) {
+ return sum_a();
+ } else if (!strcmp(name, "s292")) {
+ return sum_a();
+ } else if (!strcmp(name, "s293")) {
+ return sum_a();
+ } else if (!strcmp(name, "s2101")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s2102")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s2111")) {
+ return sum_aa();
+ } else if (!strcmp(name, "s311")) {
+ return sum_a();
+ } else if (!strcmp(name, "s31111")) {
+ return sum_a();
+ } else if (!strcmp(name, "s321")) {
+ return sum_a();
+ } else if (!strcmp(name, "s322")) {
+ return sum_a();
+ } else if (!strcmp(name, "s323")) {
+ return sum_a() + sum_b();
+ } else if (!strcmp(name, "s341")) {
+ return sum_a();
+ } else if (!strcmp(name, "s342")) {
+ return sum_a();
+ } else if (!strcmp(name, "s343")) {
+ return sum_flat_2d_array();
+ } else if (!strcmp(name, "s351")) {
+ return sum_a();
+ } else if (!strcmp(name, "s1351")) {
+ return sum_a();
+ } else if (!strcmp(name, "s353")) {
+ return sum_a();
+ } else if (!strcmp(name, "s421")) {
+ return sum_xx();
+ } else if (!strcmp(name, "s1421")) {
+ return sum_half_xx();
+ } else if (!strcmp(name, "s422")) {
+ return sum_xx();
+ } else if (!strcmp(name, "s423")) {
+ return sum_flat_2d_array();
+ } else if (!strcmp(name, "s424")) {
+ return sum_xx();
+ } else if (!strcmp(name, "s431")) {
+ return sum_a();
+ } else if (!strcmp(name, "s441")) {
+ return sum_a();
+ } else if (!strcmp(name, "s442")) {
+ return sum_a();
+ } else if (!strcmp(name, "s443")) {
+ return sum_a();
+ } else if (!strcmp(name, "s451")) {
+ return sum_a();
+ } else if (!strcmp(name, "s452")) {
+ return sum_a();
+ } else if (!strcmp(name, "s453")) {
+ return sum_a();
+ } else if (!strcmp(name, "s471")) {
+ return sum_x() + sum_b();
+ } else if (!strcmp(name, "s481")) {
+ return sum_a();
+ } else if (!strcmp(name, "s482")) {
+ return sum_a();
+ } else if (!strcmp(name, "s491")) {
+ return sum_a();
+ } else if (!strcmp(name, "s4112")) {
+ return sum_a();
+ } else if (!strcmp(name, "s4113")) {
+ return sum_a();
+ } else if (!strcmp(name, "s4114")) {
+ return sum_a();
+ } else if (!strcmp(name, "s4117")) {
+ return sum_a();
+ } else if (!strcmp(name, "s4121")) {
+ return sum_a();
+ } else if (!strcmp(name, "va")) {
+ return sum_a();
+ } else if (!strcmp(name, "vag")) {
+ return sum_a();
+ } else if (!strcmp(name, "vas")) {
+ return sum_a();
+ } else if (!strcmp(name, "vif")) {
+ return sum_a();
+ } else if (!strcmp(name, "vpv")) {
+ return sum_a();
+ } else if (!strcmp(name, "vtv")) {
+ return sum_a();
+ } else if (!strcmp(name, "vpvtv")) {
+ return sum_a();
+ } else if (!strcmp(name, "vpvts")) {
+ return sum_a();
+ } else if (!strcmp(name, "vpvpv")) {
+ return sum_a();
+ } else if (!strcmp(name, "vtvtv")) {
+ return sum_a();
+ } else if (!strcmp(name, "vsumr")) {
+ return sum_a();
+ } else if (!strcmp(name, "vbor")) {
+ return sum_x();
+ } else {
+ fprintf(stderr, "Unknown function name passed to calc_checksum: %s\n", name);
+ exit(1);
+ }
+}
+
+real_t get_expected_result(const char * name)
+{
+ if (!strcmp(name, "s000")) {
+ return 512075584.f;
+ } else if (!strcmp(name, "s111")) {
+ return 32000.410156f;
+ } else if (!strcmp(name, "s1111")) {
+ return 13.352669f;
+ } else if (!strcmp(name, "s112")) {
+ return 81335.929688f;
+ } else if (!strcmp(name, "s1112")) {
+ return 32009.560547f;
+ } else if (!strcmp(name, "s113")) {
+ return 32000.642578f;
+ } else if (!strcmp(name, "s1113")) {
+ return 40010.613281f;
+ } else if (!strcmp(name, "s114")) {
+ return 919.856323f;
+ } else if (!strcmp(name, "s115")) {
+ return 31727.289062f;
+ } else if (!strcmp(name, "s1115")) {
+ return 25487.052734f;
+ } else if (!strcmp(name, "s116")) {
+ return 32000.f;
+ } else if (!strcmp(name, "s118")) {
+ return 32353.884766f;
+ } else if (!strcmp(name, "s119")) {
+ return 86338.984375f;
+ } else if (!strcmp(name, "s1119")) {
+ return 201466.421875f;
+ } else if (!strcmp(name, "s121")) {
+ return 32009.027344f;
+ } else if (!strcmp(name, "s122")) {
+ return 48446.664062f;
+ } else if (!strcmp(name, "s123")) {
+ return 32003.285156f;
+ } else if (!strcmp(name, "s124")) {
+ return 32001.642578f;
+ } else if (!strcmp(name, "s125")) {
+ return 131072.f;
+ } else if (!strcmp(name, "s126")) {
+ return 66955.132812f;
+ } else if (!strcmp(name, "s127")) {
+ return 32003.285156f;
+ } else if (!strcmp(name, "s128")) {
+ return 80000.f;
+ } else if (!strcmp(name, "s131")) {
+ return 32009.027344f;
+ } else if (!strcmp(name, "s132")) {
+ return 65538.5625f;
+ } else if (!strcmp(name, "s141")) {
+ return 3307351.5f;
+ } else if (!strcmp(name, "s151")) {
+ return 32009.027344f;
+ } else if (!strcmp(name, "s152")) {
+ return 44020.523438f;
+ } else if (!strcmp(name, "s161")) {
+ return 64002.054688f;
+ } else if (!strcmp(name, "s1161")) {
+ return 23.546331f;
+ } else if (!strcmp(name, "s162")) {
+ return 32009.023438f;
+ } else if (!strcmp(name, "s171")) {
+ return 48448.019531f;
+ } else if (!strcmp(name, "s172")) {
+ return 48448.019531f;
+ } else if (!strcmp(name, "s173")) {
+ return 32001.626953f;
+ } else if (!strcmp(name, "s174")) {
+ return 32001.626953f;
+ } else if (!strcmp(name, "s175")) {
+ return 32009.023438f;
+ } else if (!strcmp(name, "s176")) {
+ return 32000.f;
+ } else if (!strcmp(name, "s211")) {
+ return 63983.308594f;
+ } else if (!strcmp(name, "s212")) {
+ return 42008.136719f;
+ } else if (!strcmp(name, "s1213")) {
+ return 14.450508f;
+ } else if (!strcmp(name, "s221")) {
+ return 615418176.f;
+ } else if (!strcmp(name, "s1221")) {
+ return 79623.265625f;
+ } else if (!strcmp(name, "s222")) {
+ return 32000.f;
+ } else if (!strcmp(name, "s231")) {
+ return 119107.445312f;
+ } else if (!strcmp(name, "s232")) {
+ return 65536.f;
+ } else if (!strcmp(name, "s1232")) {
+ return 2885.801514f;
+ } else if (!strcmp(name, "s233")) {
+ return 504911.65625f;
+ } else if (!strcmp(name, "s2233")) {
+ return 337652.8125f;
+ } else if (!strcmp(name, "s235")) {
+ return 44810.886719f;
+ } else if (!strcmp(name, "s241")) {
+ return 64000.f;
+ } else if (!strcmp(name, "s242")) {
+ return 1535966208.f;
+ } else if (!strcmp(name, "s243")) {
+ return 138653.21875f;
+ } else if (!strcmp(name, "s244")) {
+ return 64623.015625f;
+ } else if (!strcmp(name, "s1244")) {
+ return 36.141911f;
+ } else if (!strcmp(name, "s2244")) {
+ return 32.852161f;
+ } else if (!strcmp(name, "s251")) {
+ return 32004.367188f;
+ } else if (!strcmp(name, "s1251")) {
+ return 39967.507812f;
+ } else if (!strcmp(name, "s2251")) {
+ return 2.635388f;
+ } else if (!strcmp(name, "s3251")) {
+ return 13.59558f;
+ } else if (!strcmp(name, "s252")) {
+ return 63999.f;
+ } else if (!strcmp(name, "s253")) {
+ return 320115936.f;
+ } else if (!strcmp(name, "s254")) {
+ return 32000.f;
+ } else if (!strcmp(name, "s255")) {
+ return 31953.501953f;
+ } else if (!strcmp(name, "s256")) {
+ return 66207.828125f;
+ } else if (!strcmp(name, "s257")) {
+ return 163072.f;
+ } else if (!strcmp(name, "s258")) {
+ return 14.65278f;
+ } else if (!strcmp(name, "s261")) {
+ return 54894.515625f;
+ } else if (!strcmp(name, "s271")) {
+ return 97793.570312f;
+ } else if (!strcmp(name, "s272")) {
+ return 64000.f;
+ } else if (!strcmp(name, "s273")) {
+ return 96311.546875f;
+ } else if (!strcmp(name, "s274")) {
+ return 320133920.f;
+ } else if (!strcmp(name, "s275")) {
+ return 65536.f;
+ } else if (!strcmp(name, "s2275")) {
+ return 1640158.5f;
+ } else if (!strcmp(name, "s276")) {
+ return 97793.570312f;
+ } else if (!strcmp(name, "s277")) {
+ return 32000.f;
+ } else if (!strcmp(name, "s278")) {
+ return 64012.589844f;
+ } else if (!strcmp(name, "s279")) {
+ return 64014.289062f;
+ } else if (!strcmp(name, "s1279")) {
+ return 32.852161f;
+ } else if (!strcmp(name, "s2710")) {
+ return 96003.28125f;
+ } else if (!strcmp(name, "s2711")) {
+ return 97793.570312f;
+ } else if (!strcmp(name, "s2712")) {
+ return 97793.570312f;
+ } else if (!strcmp(name, "s281")) {
+ return 32000.f;
+ } else if (!strcmp(name, "s1281")) {
+ return INFINITY;
+ } else if (!strcmp(name, "s291")) {
+ return 32000.f;
+ } else if (!strcmp(name, "s292")) {
+ return 31953.501953f;
+ } else if (!strcmp(name, "s293")) {
+ return 31999.998047f;
+ } else if (!strcmp(name, "s2101")) {
+ return 229657.921875f;
+ } else if (!strcmp(name, "s2102")) {
+ return 256.f;
+ } else if (!strcmp(name, "s2111")) {
+ return 34544940.f;
+ } else if (!strcmp(name, "s311")) {
+ return 10.950721f;
+ } else if (!strcmp(name, "s31111")) {
+ return 10.950721f;
+ } else if (!strcmp(name, "s312")) {
+ return 1.030869f;
+ } else if (!strcmp(name, "s313")) {
+ return 1.644824f;
+ } else if (!strcmp(name, "s314")) {
+ return 1.f;
+ } else if (!strcmp(name, "s315")) {
+ return 54857.f;
+ } else if (!strcmp(name, "s316")) {
+ return 0.000031f;
+ } else if (!strcmp(name, "s317")) {
+ return 0.f;
+ } else if (!strcmp(name, "s318")) {
+ return 32002.f;
+ } else if (!strcmp(name, "s319")) {
+ return 43.802898f;
+ } else if (!strcmp(name, "s3110")) {
+ return 514.f;
+ } else if (!strcmp(name, "s13110")) {
+ return 3.f;
+ } else if (!strcmp(name, "s3111")) {
+ return 10.950725f;
+ } else if (!strcmp(name, "s3112")) {
+ return 1.644725f;
+ } else if (!strcmp(name, "s3113")) {
+ return 2.f;
+ } else if (!strcmp(name, "s321")) {
+ return 32000.f;
+ } else if (!strcmp(name, "s322")) {
+ return 32000.f;
+ } else if (!strcmp(name, "s323")) {
+ return 146472.4375f;
+ } else if (!strcmp(name, "s331")) {
+ return 32000.f;
+ } else if (!strcmp(name, "s332")) {
+ return -1.f;
+ } else if (!strcmp(name, "s341")) {
+ return 10.950721f;
+ } else if (!strcmp(name, "s342")) {
+ return 10.950721f;
+ } else if (!strcmp(name, "s343")) {
+ return 1567.932129f;
+ } else if (!strcmp(name, "s351")) {
+ return 2560660224.f;
+ } else if (!strcmp(name, "s1351")) {
+ return 21.901442f;
+ } else if (!strcmp(name, "s352")) {
+ return 1.644808f;
+ } else if (!strcmp(name, "s353")) {
+ return 320084192.f;
+ } else if (!strcmp(name, "s421")) {
+ return 32009.023438f;
+ } else if (!strcmp(name, "s1421")) {
+ return 16000.f;
+ } else if (!strcmp(name, "s422")) {
+ return 3.737715f;
+ } else if (!strcmp(name, "s423")) {
+ return 64006.683594f;
+ } else if (!strcmp(name, "s424")) {
+ return 822.364014f;
+ } else if (!strcmp(name, "s431")) {
+ return 196500.265625f;
+ } else if (!strcmp(name, "s441")) {
+ return 48448.019531f;
+ } else if (!strcmp(name, "s442")) {
+ return 40224.117188f;
+ } else if (!strcmp(name, "s443")) {
+ return 64895.867188f;
+ } else if (!strcmp(name, "s451")) {
+ return 32007.898438f;
+ } else if (!strcmp(name, "s452")) {
+ return 32511.939453f;
+ } else if (!strcmp(name, "s453")) {
+ return 21.901442f;
+ } else if (!strcmp(name, "s471")) {
+ return 64004.925781f;
+ } else if (!strcmp(name, "s481")) {
+ return 48448.019531f;
+ } else if (!strcmp(name, "s482")) {
+ return 48448.019531f;
+ } else if (!strcmp(name, "s491")) {
+ return 32001.640625f;
+ } else if (!strcmp(name, "s4112")) {
+ return 141504.875f;
+ } else if (!strcmp(name, "s4113")) {
+ return 32001.640625f;
+ } else if (!strcmp(name, "s4114")) {
+ return 32000.f;
+ } else if (!strcmp(name, "s4115")) {
+ return 1.038636f;
+ } else if (!strcmp(name, "s4116")) {
+ return 0.753265f;
+ } else if (!strcmp(name, "s4117")) {
+ return 32002.205078f;
+ } else if (!strcmp(name, "s4121")) {
+ return 48448.019531f;
+ } else if (!strcmp(name, "va")) {
+ return 1.644725f;
+ } else if (!strcmp(name, "vag")) {
+ return 1.644725f;
+ } else if (!strcmp(name, "vas")) {
+ return 1.644725f;
+ } else if (!strcmp(name, "vif")) {
+ return 1.644725f;
+ } else if (!strcmp(name, "vpv")) {
+ return 164487.78125f;
+ } else if (!strcmp(name, "vtv")) {
+ return 32000.f;
+ } else if (!strcmp(name, "vpvtv")) {
+ return 97793.570312f;
+ } else if (!strcmp(name, "vpvts")) {
+ return 17522152701952.f;
+ } else if (!strcmp(name, "vpvpv")) {
+ return 1.644725f;
+ } else if (!strcmp(name, "vtvtv")) {
+ return 32000.f;
+ } else if (!strcmp(name, "vsumr")) {
+ return 10.950725f;
+ } else if (!strcmp(name, "vdotr")) {
+ return 1.644824f;
+ } else if (!strcmp(name, "vbor")) {
+ return 31924.046875f;
+ } else {
+ fprintf(stderr, "Unknown function name passed to expected_result: %s\n", name);
+ exit(1);
+ }
+}
+
+typedef real_t(*test_function_t)(struct args_t *);
+
+static _Bool is_checksum_same(real_t expected, real_t value)
+{
+ if (expected == INFINITY)
+ return value == INFINITY;
+ else if(expected == 0.f)
+ return value <= 0.01f;
+ else {
+ real_t fraction = value / expected;
+ return 0.99f <= fraction && fraction <= 1.01f;
+ }
+}
+
+void run(test_function_t vector_func, const char *fname, void * arg_info)
+{
+ struct args_t func_args = {.arg_info=arg_info};
+
+ double result = vector_func(&func_args);
+ double expected_result = get_expected_result(fname);
+
+ if (!is_checksum_same(expected_result, result))
+ {
+ fprintf (stderr, "value: %f, expected: %f\n", result, expected_result);
+ __builtin_abort();
+ }
+}
+
+int
+__attribute__((noipa))
+dummy(float a[LEN_1D], float b[LEN_1D], float c[LEN_1D], float d[LEN_1D], float e[LEN_1D], float aa[LEN_2D][LEN_2D], float bb[LEN_2D][LEN_2D], float cc[LEN_2D][LEN_2D], float s){
+ // -- called in each loop to make all computations appear required
+ return 0;
+}
+
+#pragma GCC pop_options
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s000.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s000.c
new file mode 100644
index 0000000..b5d5faa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s000.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s000(struct args_t * func_args)
+{
+// linear dependence testing
+// no dependence - vectorizable
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 2*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = b[i] + 1;
+ }
+ dummy((real_t*)a, (real_t*)b, (real_t*)c, (real_t*)d, (real_t*)e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s000, "s000", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s111.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s111.c
new file mode 100644
index 0000000..37e4684
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s111.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s111(struct args_t * func_args)
+{
+// linear dependence testing
+// no dependence - vectorizable
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 2*iterations; nl++) {
+ for (int i = 1; i < LEN_1D; i += 2) {
+ a[i] = a[i - 1] + b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s111, "s111", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1111.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1111.c
new file mode 100644
index 0000000..cd7e84e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1111.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1111(struct args_t * func_args)
+{
+// no dependence - vectorizable
+// jump in data access
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 2*iterations; nl++) {
+ for (int i = 0; i < LEN_1D/2; i++) {
+ a[2*i] = c[i] * b[i] + d[i] * b[i] + c[i] * c[i] + d[i] * b[i] + d[i] * c[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1111, "s1111", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1112.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1112.c
new file mode 100644
index 0000000..20cb346
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1112.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1112(struct args_t * func_args)
+{
+// linear dependence testing
+// loop reversal
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations*3; nl++) {
+ for (int i = LEN_1D - 1; i >= 0; i--) {
+ a[i] = b[i] + (real_t) 1.;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1112, "s1112", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1113.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1113.c
new file mode 100644
index 0000000..55aa8ed
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1113.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1113(struct args_t * func_args)
+{
+// linear dependence testing
+// one iteration dependency on a(LEN_1D/2) but still vectorizable
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 2*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = a[LEN_1D/2] + b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1113, "s1113", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1115.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1115.c
new file mode 100644
index 0000000..18cb5ec
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1115.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1115(struct args_t * func_args)
+{
+// linear dependence testing
+// triangular saxpy loop
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 100*(iterations/LEN_2D); nl++) {
+ for (int i = 0; i < LEN_2D; i++) {
+ for (int j = 0; j < LEN_2D; j++) {
+ aa[i][j] = aa[i][j]*cc[j][i] + bb[i][j];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1115, "s1115", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1119.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1119.c
new file mode 100644
index 0000000..16610fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1119.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1119(struct args_t * func_args)
+{
+// linear dependence testing
+// no dependence - vectorizable
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 200*(iterations/(LEN_2D)); nl++) {
+ for (int i = 1; i < LEN_2D; i++) {
+ for (int j = 0; j < LEN_2D; j++) {
+ aa[i][j] = aa[i-1][j] + bb[i][j];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1119, "s1119", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s112.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s112.c
new file mode 100644
index 0000000..c8afaf7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s112.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s112(struct args_t * func_args)
+{
+// linear dependence testing
+// loop reversal
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 3*iterations; nl++) {
+ for (int i = LEN_1D - 2; i >= 0; i--) {
+ a[i+1] = a[i] + b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s112, "s112", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { { ! powerpc*-*-* } || has_arch_pwr8 } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s113.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s113.c
new file mode 100644
index 0000000..f22ab4c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s113.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s113(struct args_t * func_args)
+{
+// linear dependence testing
+// a(i)=a(1) but no actual dependence cycle
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 1; i < LEN_1D; i++) {
+ a[i] = a[0] + b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s113, "s113", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s114.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s114.c
new file mode 100644
index 0000000..59e5041
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s114.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s114(struct args_t * func_args)
+{
+// linear dependence testing
+// transpose vectorization
+// Jump in data access - not vectorizable
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 200*(iterations/(LEN_2D)); nl++) {
+ for (int i = 0; i < LEN_2D; i++) {
+ for (int j = 0; j < i; j++) {
+ aa[i][j] = aa[j][i] + bb[i][j];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s114, "s114", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s115.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s115.c
new file mode 100644
index 0000000..153cbf8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s115.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s115(struct args_t * func_args)
+{
+// linear dependence testing
+// triangular saxpy loop
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 1000*(iterations/LEN_2D); nl++) {
+ for (int j = 0; j < LEN_2D; j++) {
+ for (int i = j+1; i < LEN_2D; i++) {
+ a[i] -= aa[j][i] * a[j];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s115, "s115", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s116.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s116.c
new file mode 100644
index 0000000..93d16b3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s116.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s116(struct args_t * func_args)
+{
+// linear dependence testing
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations*10; nl++) {
+ for (int i = 0; i < LEN_1D - 5; i += 5) {
+ a[i] = a[i + 1] * a[i];
+ a[i + 1] = a[i + 2] * a[i + 1];
+ a[i + 2] = a[i + 3] * a[i + 2];
+ a[i + 3] = a[i + 4] * a[i + 3];
+ a[i + 4] = a[i + 5] * a[i + 4];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s116, "s116", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1161.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1161.c
new file mode 100644
index 0000000..28ce526
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1161.c
@@ -0,0 +1,48 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1161(struct args_t * func_args)
+{
+// control flow
+// tests for recognition of loop independent dependences
+// between statements in mutually exclusive regions.
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D-1; ++i) {
+ if (c[i] < (real_t)0.) {
+ goto L20;
+ }
+ a[i] = c[i] + d[i] * e[i];
+ goto L10;
+L20:
+ b[i] = a[i] + d[i] * d[i];
+L10:
+ ;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1161, "s1161", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s118.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s118.c
new file mode 100644
index 0000000..3896a9a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s118.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s118(struct args_t * func_args)
+{
+// linear dependence testing
+// potential dot product recursion
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 200*(iterations/LEN_2D); nl++) {
+ for (int i = 1; i < LEN_2D; i++) {
+ for (int j = 0; j <= i - 1; j++) {
+ a[i] += bb[j][i] * a[i-j-1];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s118, "s118", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s119.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s119.c
new file mode 100644
index 0000000..43391c5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s119.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s119(struct args_t * func_args)
+{
+// linear dependence testing
+// no dependence - vectorizable
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 200*(iterations/(LEN_2D)); nl++) {
+ for (int i = 1; i < LEN_2D; i++) {
+ for (int j = 1; j < LEN_2D; j++) {
+ aa[i][j] = aa[i-1][j-1] + bb[i][j];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s119, "s119", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s121.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s121.c
new file mode 100644
index 0000000..98a67ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s121.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s121(struct args_t * func_args)
+{
+// induction variable recognition
+// loop with possible ambiguity because of scalar store
+
+ initialise_arrays(__func__);
+
+ int j;
+ for (int nl = 0; nl < 3*iterations; nl++) {
+ for (int i = 0; i < LEN_1D-1; i++) {
+ j = i + 1;
+ a[i] = a[j] + b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s121, "s121", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1213.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1213.c
new file mode 100644
index 0000000..f9f3beb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1213.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1213(struct args_t * func_args)
+{
+// statement reordering
+// dependency needing temporary
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 1; i < LEN_1D-1; i++) {
+ a[i] = b[i-1]+c[i];
+ b[i] = a[i+1]*d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1213, "s1213", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s122.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s122.c
new file mode 100644
index 0000000..0aceeb7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s122.c
@@ -0,0 +1,48 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s122(struct args_t * func_args)
+{
+// induction variable recognition
+// variable lower and upper bound, and stride
+// reverse data access and jump in data access
+
+ struct{int a;int b;} * x = func_args->arg_info;
+ int n1 = x->a;
+ int n3 = x->b;
+
+ initialise_arrays(__func__);
+
+ int j, k;
+ for (int nl = 0; nl < iterations; nl++) {
+ j = 1;
+ k = 0;
+ for (int i = n1-1; i < LEN_1D; i += n3) {
+ k += j;
+ a[i] += b[LEN_1D - k];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s122, "s122", &(struct{int a;int b;}){n1, n3});
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1221.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1221.c
new file mode 100644
index 0000000..4ecccfd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1221.c
@@ -0,0 +1,38 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1221(struct args_t * func_args)
+{
+// run-time symbolic resolution
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 4; i < LEN_1D; i++) {
+ b[i] = b[i - 4] + a[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1221, "s1221", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s123.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s123.c
new file mode 100644
index 0000000..adb4da8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s123.c
@@ -0,0 +1,47 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s123(struct args_t * func_args)
+{
+// induction variable recognition
+// induction variable under an if
+// not vectorizable, the condition cannot be speculated
+
+ initialise_arrays(__func__);
+
+ int j;
+ for (int nl = 0; nl < iterations; nl++) {
+ j = -1;
+ for (int i = 0; i < (LEN_1D/2); i++) {
+ j++;
+ a[j] = b[i] + d[i] * e[i];
+ if (c[i] > (real_t)0.) {
+ j++;
+ a[j] = c[i] + d[i] * e[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s123, "s123", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1232.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1232.c
new file mode 100644
index 0000000..347ed47
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1232.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1232(struct args_t * func_args)
+{
+// loop interchange
+// interchanging of triangular loops
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 100*(iterations/LEN_2D); nl++) {
+ for (int j = 0; j < LEN_2D; j++) {
+ for (int i = j; i < LEN_2D; i++) {
+ aa[i][j] = bb[i][j] + cc[i][j];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 1.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1232, "s1232", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s124.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s124.c
new file mode 100644
index 0000000..0748110
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s124.c
@@ -0,0 +1,47 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s124(struct args_t * func_args)
+{
+// induction variable recognition
+// induction variable under both sides of if (same value)
+
+ initialise_arrays(__func__);
+
+ int j;
+ for (int nl = 0; nl < iterations; nl++) {
+ j = -1;
+ for (int i = 0; i < LEN_1D; i++) {
+ if (b[i] > (real_t)0.) {
+ j++;
+ a[j] = b[i] + d[i] * e[i];
+ } else {
+ j++;
+ a[j] = c[i] + d[i] * e[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s124, "s124", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1244.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1244.c
new file mode 100644
index 0000000..94a3041
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1244.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1244(struct args_t * func_args)
+{
+// node splitting
+// cycle with ture and anti dependency
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D-1; i++) {
+ a[i] = b[i] + c[i] * c[i] + b[i]*b[i] + c[i];
+ d[i] = a[i] + a[i+1];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1244, "s1244", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s125.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s125.c
new file mode 100644
index 0000000..6790743
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s125.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s125(struct args_t * func_args)
+{
+// induction variable recognition
+// induction variable in two loops; collapsing possible
+
+ initialise_arrays(__func__);
+
+ int k;
+ for (int nl = 0; nl < 100*(iterations/(LEN_2D)); nl++) {
+ k = -1;
+ for (int i = 0; i < LEN_2D; i++) {
+ for (int j = 0; j < LEN_2D; j++) {
+ k++;
+ flat_2d_array[k] = aa[i][j] + bb[i][j] * cc[i][j];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s125, "s125", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1251.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1251.c
new file mode 100644
index 0000000..b2e099c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1251.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1251(struct args_t * func_args)
+{
+// scalar and array expansion
+// scalar expansion
+
+ initialise_arrays(__func__);
+
+ real_t s;
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ s = b[i]+c[i];
+ b[i] = a[i]+d[i];
+ a[i] = s*e[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1251, "s1251", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s126.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s126.c
new file mode 100644
index 0000000..a1c71b3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s126.c
@@ -0,0 +1,45 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s126(struct args_t * func_args)
+{
+// induction variable recognition
+// induction variable in two loops; recurrence in inner loop
+
+ initialise_arrays(__func__);
+
+ int k;
+ for (int nl = 0; nl < 10*(iterations/LEN_2D); nl++) {
+ k = 1;
+ for (int i = 0; i < LEN_2D; i++) {
+ for (int j = 1; j < LEN_2D; j++) {
+ bb[j][i] = bb[j-1][i] + flat_2d_array[k-1] * cc[j][i];
+ ++k;
+ }
+ ++k;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s126, "s126", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s127.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s127.c
new file mode 100644
index 0000000..6f9a821
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s127.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s127(struct args_t * func_args)
+{
+// induction variable recognition
+// induction variable with multiple increments
+
+ initialise_arrays(__func__);
+
+ int j;
+ for (int nl = 0; nl < 2*iterations; nl++) {
+ j = -1;
+ for (int i = 0; i < LEN_1D/2; i++) {
+ j++;
+ a[j] = b[i] + c[i] * d[i];
+ j++;
+ a[j] = b[i] + d[i] * e[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s127, "s127", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1279.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1279.c
new file mode 100644
index 0000000..ce48bf7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1279.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1279(struct args_t * func_args)
+{
+// control flow
+// vector if/gotos
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (a[i] < (real_t)0.) {
+ if (b[i] > a[i]) {
+ c[i] += d[i] * e[i];
+ }
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1279, "s1279", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s128.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s128.c
new file mode 100644
index 0000000..7b8874a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s128.c
@@ -0,0 +1,45 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s128(struct args_t * func_args)
+{
+// induction variables
+// coupled induction variables
+// jump in data access
+
+ initialise_arrays(__func__);
+
+ int j, k;
+ for (int nl = 0; nl < 2*iterations; nl++) {
+ j = -1;
+ for (int i = 0; i < LEN_1D/2; i++) {
+ k = j + 1;
+ a[i] = b[k] - d[i];
+ j = k + 1;
+ b[k] = a[i] + c[k];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 1.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s128, "s128", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1281.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1281.c
new file mode 100644
index 0000000..dba95a8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1281.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1281(struct args_t * func_args)
+{
+// crossing thresholds
+// index set splitting
+// reverse data access
+
+ initialise_arrays(__func__);
+
+ real_t x;
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ x = b[i]*c[i] + a[i]*d[i] + e[i];
+ a[i] = x-(real_t)1.0;
+ b[i] = x;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1281, "s1281", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s131.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s131.c
new file mode 100644
index 0000000..73f58a7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s131.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s131(struct args_t * func_args)
+{
+// global data flow analysis
+// forward substitution
+
+ initialise_arrays(__func__);
+
+ int m = 1;
+ for (int nl = 0; nl < 5*iterations; nl++) {
+ for (int i = 0; i < LEN_1D - 1; i++) {
+ a[i] = a[i + m] + b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s131, "s131", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s13110.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s13110.c
new file mode 100644
index 0000000..4d2ef4c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s13110.c
@@ -0,0 +1,51 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s13110(struct args_t * func_args)
+{
+// reductions
+// if to max with index reductio 2 dimensions
+
+ initialise_arrays(__func__);
+
+ int xindex, yindex;
+ real_t max, chksum;
+ for (int nl = 0; nl < 100*(iterations/(LEN_2D)); nl++) {
+ max = aa[(0)][0];
+ xindex = 0;
+ yindex = 0;
+ for (int i = 0; i < LEN_2D; i++) {
+ for (int j = 0; j < LEN_2D; j++) {
+ if (aa[i][j] > max) {
+ max = aa[i][j];
+ xindex = i;
+ yindex = j;
+ }
+ }
+ }
+ chksum = max + (real_t) xindex + (real_t) yindex;
+ dummy(a, b, c, d, e, aa, bb, cc, chksum);
+ }
+
+ return max + xindex+1 + yindex+1;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s13110, "s13110", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s132.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s132.c
new file mode 100644
index 0000000..c2f5c2f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s132.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s132(struct args_t * func_args)
+{
+// global data flow analysis
+// loop with multiple dimension ambiguous subscripts
+
+ initialise_arrays(__func__);
+
+ int m = 0;
+ int j = m;
+ int k = m+1;
+ for (int nl = 0; nl < 400*iterations; nl++) {
+ for (int i= 1; i < LEN_2D; i++) {
+ aa[j][i] = aa[k][i-1] + b[i] * c[1];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s132, "s132", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1351.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1351.c
new file mode 100644
index 0000000..d020f90
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1351.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1351(struct args_t * func_args)
+{
+// induction pointer recognition
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 8*iterations; nl++) {
+ real_t* __restrict__ A = a;
+ real_t* __restrict__ B = b;
+ real_t* __restrict__ C = c;
+ for (int i = 0; i < LEN_1D; i++) {
+ *A = *B+*C;
+ A++;
+ B++;
+ C++;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1351, "s1351", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s141.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s141.c
new file mode 100644
index 0000000..b8ef6a6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s141.c
@@ -0,0 +1,45 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s141(struct args_t * func_args)
+{
+// nonlinear dependence testing
+// walk a row in a symmetric packed array
+// element a(i,j) for (int j>i) stored in location j*(j-1)/2+i
+
+ initialise_arrays(__func__);
+
+ int k;
+ for (int nl = 0; nl < 200*(iterations/LEN_2D); nl++) {
+ for (int i = 0; i < LEN_2D; i++) {
+ k = (i+1) * ((i+1) - 1) / 2 + (i+1)-1;
+ for (int j = i; j < LEN_2D; j++) {
+ flat_2d_array[k] += bb[j][i];
+ k += j+1;
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s141, "s141", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1421.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1421.c
new file mode 100644
index 0000000..043989f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1421.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s1421(struct args_t * func_args)
+{
+// storage classes and equivalencing
+// equivalence- no overlap
+
+ initialise_arrays(__func__);
+
+ xx = &b[LEN_1D/2];
+
+ for (int nl = 0; nl < 8*iterations; nl++) {
+ for (int i = 0; i < LEN_1D/2; i++) {
+ b[i] = xx[i] + a[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 1.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s1421, "s1421", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s151.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s151.c
new file mode 100644
index 0000000..46f7181
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s151.c
@@ -0,0 +1,45 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+void s151s(real_t a[LEN_1D], real_t b[LEN_1D], int m)
+{
+ for (int i = 0; i < LEN_1D-1; i++) {
+ a[i] = a[i + m] + b[i];
+ }
+}
+
+real_t s151(struct args_t * func_args)
+{
+// interprocedural data flow analysis
+// passing parameter information into a subroutine
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 5*iterations; nl++) {
+ s151s(a, b, 1);
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s151, "s151", NULL);
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s152.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s152.c
new file mode 100644
index 0000000..d9c4186
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s152.c
@@ -0,0 +1,46 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+void s152s(real_t a[LEN_1D], real_t b[LEN_1D], real_t c[LEN_1D], int i)
+{
+ a[i] += b[i] * c[i];
+}
+
+real_t s152(struct args_t * func_args)
+{
+// interprocedural data flow analysis
+// collecting information from a subroutine
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ b[i] = d[i] * e[i];
+ s152s(a, b, c, i);
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s152, "s152", NULL);
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s161.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s161.c
new file mode 100644
index 0000000..123ce6c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s161.c
@@ -0,0 +1,48 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s161(struct args_t * func_args)
+{
+// control flow
+// tests for recognition of loop independent dependences
+// between statements in mutually exclusive regions.
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations/2; nl++) {
+ for (int i = 0; i < LEN_1D-1; ++i) {
+ if (b[i] < (real_t)0.) {
+ goto L20;
+ }
+ a[i] = c[i] + d[i] * e[i];
+ goto L10;
+L20:
+ c[i+1] = a[i] + d[i] * d[i];
+L10:
+ ;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s161, "s161", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s162.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s162.c
new file mode 100644
index 0000000..521363d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s162.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s162(struct args_t * func_args)
+{
+// control flow
+// deriving assertions
+
+ int k = *(int*)func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ if (k > 0) {
+ for (int i = 0; i < LEN_1D-1; i++) {
+ a[i] = a[i + k] + b[i] * c[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s162, "s162", &n1);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s171.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s171.c
new file mode 100644
index 0000000..291ec0a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s171.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s171(struct args_t * func_args)
+{
+// symbolics
+// symbolic dependence tests
+
+ int inc = *(int*)func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i * inc] += b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s171, "s171", &n1);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s172.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s172.c
new file mode 100644
index 0000000..077f6e3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s172.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s172(struct args_t * func_args)
+{
+// symbolics
+// vectorizable if n3 .ne. 0
+
+ struct{int a;int b;} * x = func_args->arg_info;
+ int n1 = x->a;
+ int n3 = x->b;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = n1-1; i < LEN_1D; i += n3) {
+ a[i] += b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s172, "s172", &(struct{int a;int b;}){n1, n3});
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s173.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s173.c
new file mode 100644
index 0000000..4bd166b9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s173.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s173(struct args_t * func_args)
+{
+// symbolics
+// expression in loop bounds and subscripts
+
+ initialise_arrays(__func__);
+
+ int k = LEN_1D/2;
+ for (int nl = 0; nl < 10*iterations; nl++) {
+ for (int i = 0; i < LEN_1D/2; i++) {
+ a[i+k] = a[i] + b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s173, "s173", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s174.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s174.c
new file mode 100644
index 0000000..a4df4da
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s174.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s174(struct args_t * func_args)
+{
+// symbolics
+// loop with subscript that may seem ambiguous
+
+ int M = *(int*)func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 10*iterations; nl++) {
+ for (int i = 0; i < M; i++) {
+ a[i+M] = a[i] + b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s174, "s174", &(struct{int a;}){LEN_1D/2});
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s175.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s175.c
new file mode 100644
index 0000000..4bfb854
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s175.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s175(struct args_t * func_args)
+{
+// symbolics
+// symbolic dependence tests
+
+ int inc = *(int*)func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D-1; i += inc) {
+ a[i] = a[i + inc] + b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s175, "s175", &n1);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s176.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s176.c
new file mode 100644
index 0000000..79faf7f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s176.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s176(struct args_t * func_args)
+{
+// symbolics
+// convolution
+
+ initialise_arrays(__func__);
+
+ int m = LEN_1D/2;
+ for (int nl = 0; nl < 4*(iterations/LEN_1D); nl++) {
+ for (int j = 0; j < (LEN_1D/2); j++) {
+ for (int i = 0; i < m; i++) {
+ a[i] += b[i+m-j-1] * c[j];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s176, "s176", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2101.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2101.c
new file mode 100644
index 0000000..ad6e586
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2101.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s2101(struct args_t * func_args)
+{
+// diagonals
+// main diagonal calculation
+// jump in data access
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 10*iterations; nl++) {
+ for (int i = 0; i < LEN_2D; i++) {
+ aa[i][i] += bb[i][i] * cc[i][i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s2101, "s2101", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2102.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2102.c
new file mode 100644
index 0000000..dd00eb8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2102.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s2102(struct args_t * func_args)
+{
+// diagonals
+// identity matrix, best results vectorize both inner and outer loops
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 100*(iterations/LEN_2D); nl++) {
+ for (int i = 0; i < LEN_2D; i++) {
+ for (int j = 0; j < LEN_2D; j++) {
+ aa[j][i] = (real_t)0.;
+ }
+ aa[i][i] = (real_t)1.;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s2102, "s2102", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s211.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s211.c
new file mode 100644
index 0000000..5053322
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s211.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s211(struct args_t * func_args)
+{
+// statement reordering
+// statement reordering allows vectorization
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 1; i < LEN_1D-1; i++) {
+ a[i] = b[i - 1] + c[i] * d[i];
+ b[i] = b[i + 1] - e[i] * d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s211, "s211", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2111.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2111.c
new file mode 100644
index 0000000..42ff35f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2111.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s2111(struct args_t * func_args)
+{
+// wavefronts, it will make jump in data access
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 100*(iterations/(LEN_2D)); nl++) {
+ for (int j = 1; j < LEN_2D; j++) {
+ for (int i = 1; i < LEN_2D; i++) {
+ aa[j][i] = (aa[j][i-1] + aa[j-1][i])/1.9;
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s2111, "s2111", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s212.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s212.c
new file mode 100644
index 0000000..366b678
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s212.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s212(struct args_t * func_args)
+{
+// statement reordering
+// dependency needing temporary
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D-1; i++) {
+ a[i] *= c[i];
+ b[i] += a[i + 1] * d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s212, "s212", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s221.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s221.c
new file mode 100644
index 0000000..7f42c24
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s221.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s221(struct args_t * func_args)
+{
+// loop distribution
+// loop that is partially recursive
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations/2; nl++) {
+ for (int i = 1; i < LEN_1D; i++) {
+ a[i] += c[i] * d[i];
+ b[i] = b[i - 1] + a[i] + d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s221, "s221", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s222.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s222.c
new file mode 100644
index 0000000..0cdb8cd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s222.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s222(struct args_t * func_args)
+{
+// loop distribution
+// partial loop vectorizatio recurrence in middle
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations/2; nl++) {
+ for (int i = 1; i < LEN_1D; i++) {
+ a[i] += b[i] * c[i];
+ e[i] = e[i - 1] * e[i - 1];
+ a[i] -= b[i] * c[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s222, "s222", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2233.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2233.c
new file mode 100644
index 0000000..c367c21
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2233.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s2233(struct args_t * func_args)
+{
+// loop interchange
+// interchanging with one of two inner loops
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 100*(iterations/LEN_2D); nl++) {
+ for (int i = 1; i < LEN_2D; i++) {
+ for (int j = 1; j < LEN_2D; j++) {
+ aa[j][i] = aa[j-1][i] + cc[j][i];
+ }
+ for (int j = 1; j < LEN_2D; j++) {
+ bb[i][j] = bb[i-1][j] + cc[i][j];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s2233, "s2233", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2244.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2244.c
new file mode 100644
index 0000000..9b0ca74
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2244.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s2244(struct args_t * func_args)
+{
+// node splitting
+// cycle with ture and anti dependency
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D-1; i++) {
+ a[i+1] = b[i] + e[i];
+ a[i] = b[i] + c[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s2244, "s2244", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2251.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2251.c
new file mode 100644
index 0000000..980696b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2251.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s2251(struct args_t * func_args)
+{
+// scalar and array expansion
+// scalar expansion
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ real_t s = (real_t)0.0;
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = s*e[i];
+ s = b[i]+c[i];
+ b[i] = a[i]+d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s2251, "s2251", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2275.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2275.c
new file mode 100644
index 0000000..e182b83
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2275.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s2275(struct args_t * func_args)
+{
+// loop distribution is needed to be able to interchange
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 100*(iterations/LEN_2D); nl++) {
+ for (int i = 0; i < LEN_2D; i++) {
+ for (int j = 0; j < LEN_2D; j++) {
+ aa[j][i] = aa[j][i] + bb[j][i] * cc[j][i];
+ }
+ a[i] = b[i] + c[i] * d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s2275, "s2275", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s231.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s231.c
new file mode 100644
index 0000000..da52334
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s231.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s231(struct args_t * func_args)
+{
+// loop interchange
+// loop with data dependency
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 100*(iterations/LEN_2D); nl++) {
+ for (int i = 0; i < LEN_2D; ++i) {
+ for (int j = 1; j < LEN_2D; j++) {
+ aa[j][i] = aa[j - 1][i] + bb[j][i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s231, "s231", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s232.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s232.c
new file mode 100644
index 0000000..37bb310
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s232.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s232(struct args_t * func_args)
+{
+// loop interchange
+// interchanging of triangular loops
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 100*(iterations/(LEN_2D)); nl++) {
+ for (int j = 1; j < LEN_2D; j++) {
+ for (int i = 1; i <= j; i++) {
+ aa[j][i] = aa[j][i-1]*aa[j][i-1]+bb[j][i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 1.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s232, "s232", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s233.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s233.c
new file mode 100644
index 0000000..10f003a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s233.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s233(struct args_t * func_args)
+{
+// loop interchange
+// interchanging with one of two inner loops
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 100*(iterations/LEN_2D); nl++) {
+ for (int i = 1; i < LEN_2D; i++) {
+ for (int j = 1; j < LEN_2D; j++) {
+ aa[j][i] = aa[j-1][i] + cc[j][i];
+ }
+ for (int j = 1; j < LEN_2D; j++) {
+ bb[j][i] = bb[j][i-1] + cc[j][i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s233, "s233", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s235.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s235.c
new file mode 100644
index 0000000..1340b20
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s235.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s235(struct args_t * func_args)
+{
+// loop interchanging
+// imperfectly nested loops
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 200*(iterations/LEN_2D); nl++) {
+ for (int i = 0; i < LEN_2D; i++) {
+ a[i] += b[i] * c[i];
+ for (int j = 1; j < LEN_2D; j++) {
+ aa[j][i] = aa[j-1][i] + bb[j][i] * a[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s235, "s235", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s241.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s241.c
new file mode 100644
index 0000000..14b4188
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s241.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s241(struct args_t * func_args)
+{
+// node splitting
+// preloading necessary to allow vectorization
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 2*iterations; nl++) {
+ for (int i = 0; i < LEN_1D-1; i++) {
+ a[i] = b[i] * c[i ] * d[i];
+ b[i] = a[i] * a[i+1] * d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s241, "s241", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s242.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s242.c
new file mode 100644
index 0000000..924c679
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s242.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s242(struct args_t * func_args)
+{
+// node splitting
+
+ struct{real_t a;real_t b;} * x = func_args->arg_info;
+ real_t s1 = x->a;
+ real_t s2 = x->b;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations/5; nl++) {
+ for (int i = 1; i < LEN_1D; ++i) {
+ a[i] = a[i - 1] + s1 + s2 + b[i] + c[i] + d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s242, "s242", &(struct{real_t a;real_t b;}){s1, s2});
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s243.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s243.c
new file mode 100644
index 0000000..9361821
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s243.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s243(struct args_t * func_args)
+{
+// node splitting
+// false dependence cycle breaking
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D-1; i++) {
+ a[i] = b[i] + c[i ] * d[i];
+ b[i] = a[i] + d[i ] * e[i];
+ a[i] = b[i] + a[i+1] * d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s243, "s243", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s244.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s244.c
new file mode 100644
index 0000000..8886876
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s244.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s244(struct args_t * func_args)
+{
+// node splitting
+// false dependence cycle breaking
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D-1; ++i) {
+ a[i] = b[i] + c[i] * d[i];
+ b[i] = c[i] + b[i];
+ a[i+1] = b[i] + a[i+1] * d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s244, "s244", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s251.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s251.c
new file mode 100644
index 0000000..a648f94
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s251.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s251(struct args_t * func_args)
+{
+// scalar and array expansion
+// scalar expansion
+
+ initialise_arrays(__func__);
+
+ real_t s;
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ s = b[i] + c[i] * d[i];
+ a[i] = s * s;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s251, "s251", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s252.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s252.c
new file mode 100644
index 0000000..f1302b6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s252.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s252(struct args_t * func_args)
+{
+// scalar and array expansion
+// loop with ambiguous scalar temporary
+
+ initialise_arrays(__func__);
+
+ real_t t, s;
+ for (int nl = 0; nl < iterations; nl++) {
+ t = (real_t) 0.;
+ for (int i = 0; i < LEN_1D; i++) {
+ s = b[i] * c[i];
+ a[i] = s + t;
+ t = s;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s252, "s252", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s253.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s253.c
new file mode 100644
index 0000000..4af52aa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s253.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s253(struct args_t * func_args)
+{
+// scalar and array expansion
+// scalar expansio assigned under if
+
+ initialise_arrays(__func__);
+
+ real_t s;
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (a[i] > b[i]) {
+ s = a[i] - b[i] * d[i];
+ c[i] += s;
+ a[i] = s;
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s253, "s253", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s254.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s254.c
new file mode 100644
index 0000000..bdc8a01
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s254.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s254(struct args_t * func_args)
+{
+// scalar and array expansion
+// carry around variable
+
+ initialise_arrays(__func__);
+
+ real_t x;
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ x = b[LEN_1D-1];
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = (b[i] + x) * (real_t).5;
+ x = b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s254, "s254", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s255.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s255.c
new file mode 100644
index 0000000..c680ee1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s255.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s255(struct args_t * func_args)
+{
+// scalar and array expansion
+// carry around variables, 2 levels
+
+ initialise_arrays(__func__);
+
+ real_t x, y;
+ for (int nl = 0; nl < iterations; nl++) {
+ x = b[LEN_1D-1];
+ y = b[LEN_1D-2];
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = (b[i] + x + y) * (real_t).333;
+ y = x;
+ x = b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s255, "s255", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s256.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s256.c
new file mode 100644
index 0000000..2e18fa8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s256.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s256(struct args_t * func_args)
+{
+// scalar and array expansion
+// array expansion
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 10*(iterations/LEN_2D); nl++) {
+ for (int i = 0; i < LEN_2D; i++) {
+ for (int j = 1; j < LEN_2D; j++) {
+ a[j] = (real_t)1.0 - a[j - 1];
+ aa[j][i] = a[j] + bb[j][i]*d[j];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s256, "s256", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s257.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s257.c
new file mode 100644
index 0000000..8a01633
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s257.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s257(struct args_t * func_args)
+{
+// scalar and array expansion
+// array expansion
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 10*(iterations/LEN_2D); nl++) {
+ for (int i = 1; i < LEN_2D; i++) {
+ for (int j = 0; j < LEN_2D; j++) {
+ a[i] = aa[j][i] - a[i-1];
+ aa[j][i] = a[i] + bb[j][i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s257, "s257", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s258.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s258.c
new file mode 100644
index 0000000..34f16a0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s258.c
@@ -0,0 +1,45 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s258(struct args_t * func_args)
+{
+// scalar and array expansion
+// wrap-around scalar under an if
+
+ initialise_arrays(__func__);
+
+ real_t s;
+ for (int nl = 0; nl < iterations; nl++) {
+ s = 0.;
+ for (int i = 0; i < LEN_2D; ++i) {
+ if (a[i] > 0.) {
+ s = d[i] * d[i];
+ }
+ b[i] = s * c[i] + d[i];
+ e[i] = (s + (real_t)1.) * aa[0][i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s258, "s258", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s261.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s261.c
new file mode 100644
index 0000000..6edb1a5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s261.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s261(struct args_t * func_args)
+{
+// scalar and array expansion
+// wrap-around scalar under an if
+
+ initialise_arrays(__func__);
+
+ real_t t;
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 1; i < LEN_1D; ++i) {
+ t = a[i] + b[i];
+ a[i] = t + c[i-1];
+ t = c[i] * d[i];
+ c[i] = t;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s261, "s261", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s271.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s271.c
new file mode 100644
index 0000000..0c9b67d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s271.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s271(struct args_t * func_args)
+{
+// control flow
+// loop with singularity handling
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (b[i] > (real_t)0.) {
+ a[i] += b[i] * c[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s271, "s271", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2710.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2710.c
new file mode 100644
index 0000000..19d8484
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2710.c
@@ -0,0 +1,55 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s2710(struct args_t * func_args)
+{
+// control flow
+// scalar and vector ifs
+
+ int x = *(int*)func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations/2; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (a[i] > b[i]) {
+ a[i] += b[i] * d[i];
+ if (LEN_1D > 10) {
+ c[i] += d[i] * d[i];
+ } else {
+ c[i] = d[i] * e[i] + (real_t)1.;
+ }
+ } else {
+ b[i] = a[i] + e[i] * e[i];
+ if (x > (real_t)0.) {
+ c[i] = a[i] + d[i] * d[i];
+ } else {
+ c[i] += e[i] * e[i];
+ }
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s2710, "s2710", &s1);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2711.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2711.c
new file mode 100644
index 0000000..c1a5f35
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2711.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s2711(struct args_t * func_args)
+{
+// control flow
+// semantic if removal
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (b[i] != (real_t)0.0) {
+ a[i] += b[i] * c[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s2711, "s2711", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2712.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2712.c
new file mode 100644
index 0000000..765d230
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2712.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s2712(struct args_t * func_args)
+{
+// control flow
+// if to elemental min
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (a[i] >= b[i]) {
+ a[i] += b[i] * c[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s2712, "s2712", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s272.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s272.c
new file mode 100644
index 0000000..ae6b23e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s272.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s272(struct args_t * func_args)
+{
+// control flow
+// loop with independent conditional
+
+ int t = *(int*)func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (e[i] >= t) {
+ a[i] += c[i] * d[i];
+ b[i] += c[i] * c[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s272, "s272", &s1);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s273.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s273.c
new file mode 100644
index 0000000..dbdb5f6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s273.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s273(struct args_t * func_args)
+{
+// control flow
+// simple loop with dependent conditional
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] += d[i] * e[i];
+ if (a[i] < (real_t)0.)
+ b[i] += d[i] * e[i];
+ c[i] += a[i] * d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s273, "s273", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s274.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s274.c
new file mode 100644
index 0000000..89b30e8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s274.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s274(struct args_t * func_args)
+{
+// control flow
+// complex loop with dependent conditional
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = c[i] + e[i] * d[i];
+ if (a[i] > (real_t)0.) {
+ b[i] = a[i] + b[i];
+ } else {
+ a[i] = d[i] * e[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s274, "s274", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s275.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s275.c
new file mode 100644
index 0000000..929cf11
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s275.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s275(struct args_t * func_args)
+{
+// control flow
+// if around inner loop, interchanging needed
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 10*(iterations/LEN_2D); nl++) {
+ for (int i = 0; i < LEN_2D; i++) {
+ if (aa[0][i] > (real_t)0.) {
+ for (int j = 1; j < LEN_2D; j++) {
+ aa[j][i] = aa[j-1][i] + bb[j][i] * cc[j][i];
+ }
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s275, "s275", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s276.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s276.c
new file mode 100644
index 0000000..7389c61
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s276.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s276(struct args_t * func_args)
+{
+// control flow
+// if test using loop index
+
+ initialise_arrays(__func__);
+
+ int mid = (LEN_1D/2);
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (i+1 < mid) {
+ a[i] += b[i] * c[i];
+ } else {
+ a[i] += b[i] * d[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s276, "s276", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s277.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s277.c
new file mode 100644
index 0000000..5904b63
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s277.c
@@ -0,0 +1,49 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s277(struct args_t * func_args)
+{
+// control flow
+// test for dependences arising from guard variable computation.
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D-1; i++) {
+ if (a[i] >= (real_t)0.) {
+ goto L20;
+ }
+ if (b[i] >= (real_t)0.) {
+ goto L30;
+ }
+ a[i] += c[i] * d[i];
+L30:
+ b[i+1] = c[i] + d[i] * e[i];
+L20:
+;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s277, "s277", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s278.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s278.c
new file mode 100644
index 0000000..7459017
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s278.c
@@ -0,0 +1,47 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s278(struct args_t * func_args)
+{
+// control flow
+// if/goto to block if-then-else
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (a[i] > (real_t)0.) {
+ goto L20;
+ }
+ b[i] = -b[i] + d[i] * e[i];
+ goto L30;
+L20:
+ c[i] = -c[i] + d[i] * e[i];
+L30:
+ a[i] = b[i] + c[i] * d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s278, "s278", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s279.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s279.c
new file mode 100644
index 0000000..3a024e9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s279.c
@@ -0,0 +1,51 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s279(struct args_t * func_args)
+{
+// control flow
+// vector if/gotos
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations/2; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (a[i] > (real_t)0.) {
+ goto L20;
+ }
+ b[i] = -b[i] + d[i] * d[i];
+ if (b[i] <= a[i]) {
+ goto L30;
+ }
+ c[i] += d[i] * e[i];
+ goto L30;
+L20:
+ c[i] = -c[i] + e[i] * e[i];
+L30:
+ a[i] = b[i] + c[i] * d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s279, "s279", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s281.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s281.c
new file mode 100644
index 0000000..d60f2ea
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s281.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s281(struct args_t * func_args)
+{
+// crossing thresholds
+// index set splitting
+// reverse data access
+
+ initialise_arrays(__func__);
+
+ real_t x;
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ x = a[LEN_1D-i-1] + b[i] * c[i];
+ a[i] = x-(real_t)1.0;
+ b[i] = x;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s281, "s281", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s291.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s291.c
new file mode 100644
index 0000000..0b474c2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s291.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s291(struct args_t * func_args)
+{
+// loop peeling
+// wrap around variable, 1 level
+
+ initialise_arrays(__func__);
+
+ int im1;
+ for (int nl = 0; nl < 2*iterations; nl++) {
+ im1 = LEN_1D-1;
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = (b[i] + b[im1]) * (real_t).5;
+ im1 = i;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s291, "s291", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s292.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s292.c
new file mode 100644
index 0000000..1745875
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s292.c
@@ -0,0 +1,45 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s292(struct args_t * func_args)
+{
+// loop peeling
+// wrap around variable, 2 levels
+// similar to S291
+
+ initialise_arrays(__func__);
+
+ int im1, im2;
+ for (int nl = 0; nl < iterations; nl++) {
+ im1 = LEN_1D-1;
+ im2 = LEN_1D-2;
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = (b[i] + b[im1] + b[im2]) * (real_t).333;
+ im2 = im1;
+ im1 = i;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s292, "s292", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s293.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s293.c
new file mode 100644
index 0000000..3213948
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s293.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s293(struct args_t * func_args)
+{
+// loop peeling
+// a(i)=a(0) with actual dependence cycle, loop is vectorizable
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = a[0];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s293, "s293", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s311.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s311.c
new file mode 100644
index 0000000..11f5ee7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s311.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s311(struct args_t * func_args)
+{
+// reductions
+// sum reduction
+
+ initialise_arrays(__func__);
+
+ real_t sum;
+ for (int nl = 0; nl < iterations*10; nl++) {
+ sum = (real_t)0.;
+ for (int i = 0; i < LEN_1D; i++) {
+ sum += a[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, sum);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s311, "s311", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3110.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3110.c
new file mode 100644
index 0000000..b8b2fa8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3110.c
@@ -0,0 +1,52 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s3110(struct args_t * func_args)
+{
+// reductions
+// if to max with index reductio 2 dimensions
+// similar to S315
+
+ initialise_arrays(__func__);
+
+ int xindex, yindex;
+ real_t max, chksum;
+ for (int nl = 0; nl < 100*(iterations/(LEN_2D)); nl++) {
+ max = aa[(0)][0];
+ xindex = 0;
+ yindex = 0;
+ for (int i = 0; i < LEN_2D; i++) {
+ for (int j = 0; j < LEN_2D; j++) {
+ if (aa[i][j] > max) {
+ max = aa[i][j];
+ xindex = i;
+ yindex = j;
+ }
+ }
+ }
+ chksum = max + (real_t) xindex + (real_t) yindex;
+ dummy(a, b, c, d, e, aa, bb, cc, chksum);
+ }
+
+ return max + xindex+1 + yindex+1;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s3110, "s3110", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3111.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3111.c
new file mode 100644
index 0000000..c7b2d61
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3111.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s3111(struct args_t * func_args)
+{
+// reductions
+// conditional sum reduction
+
+ initialise_arrays(__func__);
+
+ real_t sum;
+ for (int nl = 0; nl < iterations/2; nl++) {
+ sum = 0.;
+ for (int i = 0; i < LEN_1D; i++) {
+ if (a[i] > (real_t)0.) {
+ sum += a[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, sum);
+ }
+
+ return sum;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s3111, "s31111", NULL);
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s31111.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s31111.c
new file mode 100644
index 0000000..ad21513
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s31111.c
@@ -0,0 +1,54 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t test(real_t* A){
+ real_t s = (real_t)0.0;
+ for (int i = 0; i < 4; i++)
+ s += A[i];
+ return s;
+}
+
+real_t s31111(struct args_t * func_args)
+{
+// reductions
+// sum reduction
+
+ initialise_arrays(__func__);
+
+ real_t sum;
+ for (int nl = 0; nl < 2000*iterations; nl++) {
+ sum = (real_t)0.;
+ sum += test(a);
+ sum += test(&a[4]);
+ sum += test(&a[8]);
+ sum += test(&a[12]);
+ sum += test(&a[16]);
+ sum += test(&a[20]);
+ sum += test(&a[24]);
+ sum += test(&a[28]);
+ dummy(a, b, c, d, e, aa, bb, cc, sum);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s31111, "s31111", NULL);
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3112.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3112.c
new file mode 100644
index 0000000..ec81ad8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3112.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s3112(struct args_t * func_args)
+{
+// reductions
+// sum reduction saving running sums
+
+ initialise_arrays(__func__);
+
+ real_t sum;
+ for (int nl = 0; nl < iterations; nl++) {
+ sum = (real_t)0.0;
+ for (int i = 0; i < LEN_1D; i++) {
+ sum += a[i];
+ b[i] = sum;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, sum);
+ }
+
+ return sum;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s3112, "s3112", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3113.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3113.c
new file mode 100644
index 0000000..bff35ca
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3113.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s3113(struct args_t * func_args)
+{
+// reductions
+// maximum of absolute value
+
+ initialise_arrays(__func__);
+
+ real_t max;
+ for (int nl = 0; nl < iterations*4; nl++) {
+ max = ABS(a[0]);
+ for (int i = 0; i < LEN_1D; i++) {
+ if ((ABS(a[i])) > max) {
+ max = ABS(a[i]);
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, max);
+ }
+
+ return max;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s3113, "s3113", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s312.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s312.c
new file mode 100644
index 0000000..ab0571a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s312.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s312(struct args_t * func_args)
+{
+// reductions
+// product reduction
+
+ initialise_arrays(__func__);
+
+ real_t prod;
+ for (int nl = 0; nl < 10*iterations; nl++) {
+ prod = (real_t)1.;
+ for (int i = 0; i < LEN_1D; i++) {
+ prod *= a[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, prod);
+ }
+
+ return prod;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s312, "s312", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s313.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s313.c
new file mode 100644
index 0000000..e58a539
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s313.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s313(struct args_t * func_args)
+{
+// reductions
+// dot product
+
+ initialise_arrays(__func__);
+
+ real_t dot;
+ for (int nl = 0; nl < iterations*5; nl++) {
+ dot = (real_t)0.;
+ for (int i = 0; i < LEN_1D; i++) {
+ dot += a[i] * b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, dot);
+ }
+
+ return dot;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s313, "s313", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s314.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s314.c
new file mode 100644
index 0000000..87dd706
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s314.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s314(struct args_t * func_args)
+{
+// reductions
+// if to max reduction
+
+ initialise_arrays(__func__);
+
+ real_t x;
+ for (int nl = 0; nl < iterations*5; nl++) {
+ x = a[0];
+ for (int i = 0; i < LEN_1D; i++) {
+ if (a[i] > x) {
+ x = a[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, x);
+ }
+
+ return x;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s314, "s314", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s315.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s315.c
new file mode 100644
index 0000000..8d734a0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s315.c
@@ -0,0 +1,50 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s315(struct args_t * func_args)
+{
+// reductions
+// if to max with index reductio 1 dimension
+
+ initialise_arrays(__func__);
+
+ for (int i = 0; i < LEN_1D; i++)
+ a[i] = (i * 7) % LEN_1D;
+
+ real_t x, chksum;
+ int index;
+ for (int nl = 0; nl < iterations; nl++) {
+ x = a[0];
+ index = 0;
+ for (int i = 0; i < LEN_1D; ++i) {
+ if (a[i] > x) {
+ x = a[i];
+ index = i;
+ }
+ }
+ chksum = x + (real_t) index;
+ dummy(a, b, c, d, e, aa, bb, cc, chksum);
+ }
+
+ return index + x + 1;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s315, "s315", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s316.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s316.c
new file mode 100644
index 0000000..4a711bc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s316.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s316(struct args_t * func_args)
+{
+// reductions
+// if to min reduction
+
+ initialise_arrays(__func__);
+
+ real_t x;
+ for (int nl = 0; nl < iterations*5; nl++) {
+ x = a[0];
+ for (int i = 1; i < LEN_1D; ++i) {
+ if (a[i] < x) {
+ x = a[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, x);
+ }
+
+ return x;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s316, "s316", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s317.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s317.c
new file mode 100644
index 0000000..126b452
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s317.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s317(struct args_t * func_args)
+{
+// reductions
+// product reductio vectorize with
+// 1. scalar expansion of factor, and product reduction
+// 2. closed form solution: q = factor**n
+
+ initialise_arrays(__func__);
+
+ real_t q;
+ for (int nl = 0; nl < 5*iterations; nl++) {
+ q = (real_t)1.;
+ for (int i = 0; i < LEN_1D/2; i++) {
+ q *= (real_t).99;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, q);
+ }
+
+ return q;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s317, "s317", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s318.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s318.c
new file mode 100644
index 0000000..f4e1a4b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s318.c
@@ -0,0 +1,54 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s318(struct args_t * func_args)
+{
+// reductions
+// isamax, max absolute value, increments not equal to 1
+
+ int inc = *(int*)func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ int k, index;
+ real_t max, chksum;
+ for (int nl = 0; nl < iterations/2; nl++) {
+ k = 0;
+ index = 0;
+ max = ABS(a[0]);
+ k += inc;
+ for (int i = 1; i < LEN_1D; i++) {
+ if (ABS(a[k]) <= max) {
+ goto L5;
+ }
+ index = i;
+ max = ABS(a[k]);
+L5:
+ k += inc;
+ }
+ chksum = max + (real_t) index;
+ dummy(a, b, c, d, e, aa, bb, cc, chksum);
+ }
+
+ return max + index + 1;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s318, "s318", &n1);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s319.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s319.c
new file mode 100644
index 0000000..dbb0bd3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s319.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s319(struct args_t * func_args)
+{
+// reductions
+// coupled reductions
+
+ initialise_arrays(__func__);
+
+ real_t sum;
+ for (int nl = 0; nl < 2*iterations; nl++) {
+ sum = 0.;
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = c[i] + d[i];
+ sum += a[i];
+ b[i] = c[i] + e[i];
+ sum += b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, sum);
+ }
+
+ return sum;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s319, "s319", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s321.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s321.c
new file mode 100644
index 0000000..3011e56
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s321.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s321(struct args_t * func_args)
+{
+// recurrences
+// first order linear recurrence
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 1; i < LEN_1D; i++) {
+ a[i] += a[i-1] * b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s321, "s321", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s322.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s322.c
new file mode 100644
index 0000000..075e811
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s322.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s322(struct args_t * func_args)
+{
+// recurrences
+// second order linear recurrence
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations/2; nl++) {
+ for (int i = 2; i < LEN_1D; i++) {
+ a[i] = a[i] + a[i - 1] * b[i] + a[i - 2] * c[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s322, "s322", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s323.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s323.c
new file mode 100644
index 0000000..c95345d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s323.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s323(struct args_t * func_args)
+{
+// recurrences
+// coupled recurrence
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations/2; nl++) {
+ for (int i = 1; i < LEN_1D; i++) {
+ a[i] = b[i-1] + c[i] * d[i];
+ b[i] = a[i] + c[i] * e[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s323, "s323", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3251.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3251.c
new file mode 100644
index 0000000..51ca173
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s3251.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s3251(struct args_t * func_args)
+{
+// scalar and array expansion
+// scalar expansion
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D-1; i++){
+ a[i+1] = b[i]+c[i];
+ b[i] = c[i]*e[i];
+ d[i] = a[i]*e[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s3251, "s3251", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s331.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s331.c
new file mode 100644
index 0000000..e580df7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s331.c
@@ -0,0 +1,45 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s331(struct args_t * func_args)
+{
+// search loops
+// if to last-1
+
+ initialise_arrays(__func__);
+
+ int j;
+ real_t chksum;
+ for (int nl = 0; nl < iterations; nl++) {
+ j = -1;
+ for (int i = 0; i < LEN_1D; i++) {
+ if (a[i] < (real_t)0.) {
+ j = i;
+ }
+ }
+ chksum = (real_t) j;
+ dummy(a, b, c, d, e, aa, bb, cc, chksum);
+ }
+
+ return j+1;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s331, "s331", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c
new file mode 100644
index 0000000..3fd490b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c
@@ -0,0 +1,52 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s332(struct args_t * func_args)
+{
+// search loops
+// first value greater than threshold
+
+ int t = *(int*)func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ int index;
+ real_t value;
+ real_t chksum;
+ for (int nl = 0; nl < iterations; nl++) {
+ index = -2;
+ value = -1.;
+ for (int i = 0; i < LEN_1D; i++) {
+ if (a[i] > t) {
+ index = i;
+ value = a[i];
+ goto L20;
+ }
+ }
+L20:
+ chksum = value + (real_t) index;
+ dummy(a, b, c, d, e, aa, bb, cc, chksum);
+ }
+
+ return value;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s332, "s332", &s1);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s341.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s341.c
new file mode 100644
index 0000000..2aa2fa5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s341.c
@@ -0,0 +1,45 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s341(struct args_t * func_args)
+{
+// packing
+// pack positive values
+// not vectorizable, value of j in unknown at each iteration
+
+ initialise_arrays(__func__);
+
+ int j;
+ for (int nl = 0; nl < iterations; nl++) {
+ j = -1;
+ for (int i = 0; i < LEN_1D; i++) {
+ if (b[i] > (real_t)0.) {
+ j++;
+ a[j] = b[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s341, "s341", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s342.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s342.c
new file mode 100644
index 0000000..a2af1c7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s342.c
@@ -0,0 +1,45 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s342(struct args_t * func_args)
+{
+// packing
+// unpacking
+// not vectorizable, value of j in unknown at each iteration
+
+ initialise_arrays(__func__);
+
+ int j = 0;
+ for (int nl = 0; nl < iterations; nl++) {
+ j = -1;
+ for (int i = 0; i < LEN_1D; i++) {
+ if (a[i] > (real_t)0.) {
+ j++;
+ a[i] = b[j];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s342, "s342", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s343.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s343.c
new file mode 100644
index 0000000..d76c882
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s343.c
@@ -0,0 +1,47 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s343(struct args_t * func_args)
+{
+// packing
+// pack 2-d array into one dimension
+// not vectorizable, value of k in unknown at each iteration
+
+ initialise_arrays(__func__);
+
+ int k;
+ for (int nl = 0; nl < 10*(iterations/LEN_2D); nl++) {
+ k = -1;
+ for (int i = 0; i < LEN_2D; i++) {
+ for (int j = 0; j < LEN_2D; j++) {
+ if (bb[j][i] > (real_t)0.) {
+ k++;
+ flat_2d_array[k] = aa[j][i];
+ }
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s343, "s343", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s351.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s351.c
new file mode 100644
index 0000000..b5875d1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s351.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s351(struct args_t * func_args)
+{
+// loop rerolling
+// unrolled saxpy
+
+ initialise_arrays(__func__);
+
+ real_t alpha = c[0];
+ for (int nl = 0; nl < 8*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i += 5) {
+ a[i] += alpha * b[i];
+ a[i + 1] += alpha * b[i + 1];
+ a[i + 2] += alpha * b[i + 2];
+ a[i + 3] += alpha * b[i + 3];
+ a[i + 4] += alpha * b[i + 4];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s351, "s351", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s352.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s352.c
new file mode 100644
index 0000000..11d2412
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s352.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s352(struct args_t * func_args)
+{
+// loop rerolling
+// unrolled dot product
+
+ initialise_arrays(__func__);
+
+ real_t dot;
+ for (int nl = 0; nl < 8*iterations; nl++) {
+ dot = (real_t)0.;
+ for (int i = 0; i < LEN_1D; i += 5) {
+ dot = dot + a[i] * b[i] + a[i + 1] * b[i + 1] + a[i + 2]
+ * b[i + 2] + a[i + 3] * b[i + 3] + a[i + 4] * b[i + 4];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, dot);
+ }
+
+ return dot;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s352, "s352", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s353.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s353.c
new file mode 100644
index 0000000..5889858
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s353.c
@@ -0,0 +1,47 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s353(struct args_t * func_args)
+{
+// loop rerolling
+// unrolled sparse saxpy
+// gather is required
+
+ int * __restrict__ ip = func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ real_t alpha = c[0];
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i += 5) {
+ a[i] += alpha * b[ip[i]];
+ a[i + 1] += alpha * b[ip[i + 1]];
+ a[i + 2] += alpha * b[ip[i + 2]];
+ a[i + 3] += alpha * b[ip[i + 3]];
+ a[i + 4] += alpha * b[ip[i + 4]];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s353, "s353", ip);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4112.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4112.c
new file mode 100644
index 0000000..bca9a1b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4112.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s4112(struct args_t * func_args)
+{
+// indirect addressing
+// sparse saxpy
+// gather is required
+
+ struct{int * __restrict__ a;real_t b;} * x = func_args->arg_info;
+ int * __restrict__ ip = x->a;
+ real_t s = x->b;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] += b[ip[i]] * s;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s4112, "s4112", &(struct{int*a;real_t b;}){ip, s1});
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4113.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4113.c
new file mode 100644
index 0000000..b64682a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4113.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s4113(struct args_t * func_args)
+{
+// indirect addressing
+// indirect addressing on rhs and lhs
+// gather and scatter is required
+
+ int * __restrict__ ip = func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[ip[i]] = b[ip[i]] + c[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s4113, "s4113", ip);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4114.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4114.c
new file mode 100644
index 0000000..b305900
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4114.c
@@ -0,0 +1,47 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s4114(struct args_t * func_args)
+{
+// indirect addressing
+// mix indirect addressing with variable lower and upper bounds
+// gather is required
+
+ struct{int * __restrict__ a;int b;} * x = func_args->arg_info;
+ int * __restrict__ ip = x->a;
+ int n1 = x->b;
+
+ initialise_arrays(__func__);
+
+ int k;
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = n1-1; i < LEN_1D; i++) {
+ k = ip[i];
+ a[i] = b[i] + c[LEN_1D-k+1-2] * d[i];
+ k += 5;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s4114, "s4114", &(struct{int*a;int b;}){ip, n1});
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4115.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4115.c
new file mode 100644
index 0000000..f85e75e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4115.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s4115(struct args_t * func_args)
+{
+// indirect addressing
+// sparse dot product
+// gather is required
+
+ int * __restrict__ ip = func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ real_t sum;
+ for (int nl = 0; nl < iterations; nl++) {
+ sum = 0.;
+ for (int i = 0; i < LEN_1D; i++) {
+ sum += a[i] * b[ip[i]];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return sum;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s4115, "s4115", ip);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4116.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4116.c
new file mode 100644
index 0000000..95a771e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4116.c
@@ -0,0 +1,49 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s4116(struct args_t * func_args)
+{
+// indirect addressing
+// more complicated sparse sdot
+// gather is required
+
+ struct{int * __restrict__ a;int b;int c;} * x = func_args->arg_info;
+ int * __restrict__ ip = x->a;
+ int j = x->b;
+ int inc = x->c;
+
+ initialise_arrays(__func__);
+
+ real_t sum;
+ int off;
+ for (int nl = 0; nl < 100*iterations; nl++) {
+ sum = 0.;
+ for (int i = 0; i < LEN_2D-1; i++) {
+ off = inc + i;
+ sum += a[off] * aa[j-1][ip[i]];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return sum;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s4116, "s4116", &(struct{int * a; int b; int c;}){ip, LEN_2D/2, n1});
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4117.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4117.c
new file mode 100644
index 0000000..a1d757b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4117.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s4117(struct args_t * func_args)
+{
+// indirect addressing
+// seq function
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = b[i] + c[i/2] * d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s4117, "s4117", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4121.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4121.c
new file mode 100644
index 0000000..54aa9d0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4121.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t f(real_t a, real_t b){
+ return a*b;
+}
+
+real_t s4121(struct args_t * func_args)
+{
+// statement functions
+// elementwise multiplication
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] += f(b[i],c[i]);
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s4121, "s4121", NULL);
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s421.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s421.c
new file mode 100644
index 0000000..e6c00c5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s421.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s421(struct args_t * func_args)
+{
+// storage classes and equivalencing
+// equivalence- no overlap
+
+ initialise_arrays(__func__);
+
+ xx = flat_2d_array;
+
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ yy = xx;
+ for (int i = 0; i < LEN_1D - 1; i++) {
+ xx[i] = yy[i+1] + a[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 1.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s421, "s421", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s422.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s422.c
new file mode 100644
index 0000000..4d491da
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s422.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s422(struct args_t * func_args)
+{
+// storage classes and equivalencing
+// common and equivalence statement
+// anti-dependence, threshold of 4
+
+ initialise_arrays(__func__);
+
+ xx = flat_2d_array + 4;
+
+ for (int nl = 0; nl < 8*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ xx[i] = flat_2d_array[i + 8] + a[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s422, "s422", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s423.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s423.c
new file mode 100644
index 0000000..7605f05
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s423.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s423(struct args_t * func_args)
+{
+// storage classes and equivalencing
+// common and equivalenced variables - with anti-dependence
+
+ // do this again here
+ int vl = 64;
+ xx = flat_2d_array + vl;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D - 1; i++) {
+ flat_2d_array[i+1] = xx[i] + a[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 1.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s423, "s423", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s424.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s424.c
new file mode 100644
index 0000000..211f2d4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s424.c
@@ -0,0 +1,44 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s424(struct args_t * func_args)
+{
+// storage classes and equivalencing
+// common and equivalenced variables - overlap
+// vectorizeable in strips of 64 or less
+
+ // do this again here
+ int vl = 63;
+ xx = flat_2d_array + vl;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D - 1; i++) {
+ xx[i+1] = flat_2d_array[i] + a[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 1.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s424, "s424", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s431.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s431.c
new file mode 100644
index 0000000..f2b0358
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s431.c
@@ -0,0 +1,43 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s431(struct args_t * func_args)
+{
+// parameters
+// parameter statement
+
+ int k1=1;
+ int k2=2;
+ int k=2*k1-k2;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations*10; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = a[i+k] + b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s431, "s431", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s441.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s441.c
new file mode 100644
index 0000000..e73f782
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s441.c
@@ -0,0 +1,45 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s441(struct args_t * func_args)
+{
+// non-logical if's
+// arithmetic if
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (d[i] < (real_t)0.) {
+ a[i] += b[i] * c[i];
+ } else if (d[i] == (real_t)0.) {
+ a[i] += b[i] * b[i];
+ } else {
+ a[i] += c[i] * c[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s441, "s441", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s442.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s442.c
new file mode 100644
index 0000000..22fad60
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s442.c
@@ -0,0 +1,57 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s442(struct args_t * func_args)
+{
+// non-logical if's
+// computed goto
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations/2; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ switch (indx[i]) {
+ case 1: goto L15;
+ case 2: goto L20;
+ case 3: goto L30;
+ case 4: goto L40;
+ }
+L15:
+ a[i] += b[i] * b[i];
+ goto L50;
+L20:
+ a[i] += c[i] * c[i];
+ goto L50;
+L30:
+ a[i] += d[i] * d[i];
+ goto L50;
+L40:
+ a[i] += e[i] * e[i];
+L50:
+ ;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s442, "s442", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s443.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s443.c
new file mode 100644
index 0000000..a07800b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s443.c
@@ -0,0 +1,50 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s443(struct args_t * func_args)
+{
+// non-logical if's
+// arithmetic if
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 2*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (d[i] <= (real_t)0.) {
+ goto L20;
+ } else {
+ goto L30;
+ }
+L20:
+ a[i] += b[i] * c[i];
+ goto L50;
+L30:
+ a[i] += b[i] * b[i];
+L50:
+ ;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s443, "s443", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s451.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s451.c
new file mode 100644
index 0000000..ac0c9ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s451.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s451(struct args_t * func_args)
+{
+// intrinsic functions
+// intrinsics
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations/5; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = sinf(b[i]) + cosf(c[i]);
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s451, "s451", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s452.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s452.c
new file mode 100644
index 0000000..fe97c4d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s452.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s452(struct args_t * func_args)
+{
+// intrinsic functions
+// seq function
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = b[i] + c[i] * (real_t) (i+1);
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s452, "s452", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s453.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s453.c
new file mode 100644
index 0000000..1fc1d66
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s453.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s453(struct args_t * func_args)
+{
+// induction varibale recognition
+
+ real_t s;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations*2; nl++) {
+ s = 0.;
+ for (int i = 0; i < LEN_1D; i++) {
+ s += (real_t)2.;
+ a[i] = s * b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s453, "s453", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s471.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s471.c
new file mode 100644
index 0000000..b842dda
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s471.c
@@ -0,0 +1,49 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+int s471s(void)
+{
+// -- dummy subroutine call made in s471
+ return 0;
+}
+
+real_t s471(struct args_t * func_args){
+
+// call statements
+
+ int m = LEN_1D;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations/2; nl++) {
+ for (int i = 0; i < m; i++) {
+ x[i] = b[i] + d[i] * d[i];
+ s471s();
+ b[i] = c[i] + d[i] * e[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s471, "s471", NULL);
+
+ return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c
new file mode 100644
index 0000000..bf98e17
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s481(struct args_t * func_args)
+{
+// non-local goto's
+// stop statement
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (d[i] < (real_t)0.) {
+ exit (0);
+ }
+ a[i] += b[i] * c[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s481, "s481", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c
new file mode 100644
index 0000000..c4e2680
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c
@@ -0,0 +1,40 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s482(struct args_t * func_args)
+{
+// non-local goto's
+// other loop exit with code before exit
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] += b[i] * c[i];
+ if (c[i] > b[i]) break;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s482, "s482", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s491.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s491.c
new file mode 100644
index 0000000..8465e13
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s491.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t s491(struct args_t * func_args)
+{
+// vector semantics
+// indirect addressing on lhs, store in sequence
+// scatter is required
+
+ int * __restrict__ ip = func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[ip[i]] = b[i] + c[i] * d[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&s491, "s491", ip);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-va.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-va.c
new file mode 100644
index 0000000..441b5bd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-va.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t va(struct args_t * func_args)
+{
+// control loops
+// vector assignment
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations*10; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&va, "va", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vag.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vag.c
new file mode 100644
index 0000000..9213b27
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vag.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t vag(struct args_t * func_args)
+{
+// control loops
+// vector assignment, gather
+// gather is required
+
+ int * __restrict__ ip = func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 2*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = b[ip[i]];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&vag, "vag", ip);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vas.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vas.c
new file mode 100644
index 0000000..5ff3885
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vas.c
@@ -0,0 +1,42 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t vas(struct args_t * func_args)
+{
+// control loops
+// vector assignment, scatter
+// scatter is required
+
+ int * __restrict__ ip = func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 2*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[ip[i]] = b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&vas, "vas", ip);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vbor.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vbor.c
new file mode 100644
index 0000000..801410d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vbor.c
@@ -0,0 +1,54 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t vbor(struct args_t * func_args)
+{
+// control loops
+// basic operations rates, isolate arithmetic from memory traffic
+// all combinations of three, 59 flops for 6 loads and 1 store.
+
+ initialise_arrays(__func__);
+
+ real_t a1, b1, c1, d1, e1, f1;
+ for (int nl = 0; nl < iterations*10; nl++) {
+ for (int i = 0; i < LEN_2D; i++) {
+ a1 = a[i];
+ b1 = b[i];
+ c1 = c[i];
+ d1 = d[i];
+ e1 = e[i];
+ f1 = aa[0][i];
+ a1 = a1 * b1 * c1 + a1 * b1 * d1 + a1 * b1 * e1 + a1 * b1 * f1 +
+ a1 * c1 * d1 + a1 * c1 * e1 + a1 * c1 * f1 + a1 * d1 * e1
+ + a1 * d1 * f1 + a1 * e1 * f1;
+ b1 = b1 * c1 * d1 + b1 * c1 * e1 + b1 * c1 * f1 + b1 * d1 * e1 +
+ b1 * d1 * f1 + b1 * e1 * f1;
+ c1 = c1 * d1 * e1 + c1 * d1 * f1 + c1 * e1 * f1;
+ d1 = d1 * e1 * f1;
+ x[i] = a1 * b1 * c1 * d1;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&vbor, "vbor", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vdotr.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vdotr.c
new file mode 100644
index 0000000..80ed9f8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vdotr.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t vdotr(struct args_t * func_args)
+{
+// control loops
+// vector dot product reduction
+
+ initialise_arrays(__func__);
+
+ real_t dot;
+ for (int nl = 0; nl < iterations*10; nl++) {
+ dot = 0.;
+ for (int i = 0; i < LEN_1D; i++) {
+ dot += a[i] * b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, dot);
+ }
+
+ return dot;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&vdotr, "vdotr", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vif.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vif.c
new file mode 100644
index 0000000..48e1c14
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vif.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t vif(struct args_t * func_args)
+{
+// control loops
+// vector if
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ if (b[i] > (real_t)0.) {
+ a[i] = b[i];
+ }
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&vif, "vif", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! aarch64_sve } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpv.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpv.c
new file mode 100644
index 0000000..232904f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpv.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t vpv(struct args_t * func_args)
+{
+// control loops
+// vector plus vector
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations*10; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] += b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&vpv, "vpv", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpvpv.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpvpv.c
new file mode 100644
index 0000000..b4d0850
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpvpv.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t vpvpv(struct args_t * func_args)
+{
+// control loops
+// vector plus vector plus vector
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] += b[i] + c[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&vpvpv, "vpvpv", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpvts.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpvts.c
new file mode 100644
index 0000000..f193afa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpvts.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t vpvts(struct args_t * func_args)
+{
+// control loops
+// vector plus vector times scalar
+
+ real_t s = *(int*)func_args->arg_info;
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] += b[i] * s;
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&vpvts, "vpvts", &s1);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpvtv.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpvtv.c
new file mode 100644
index 0000000..b726b27
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vpvtv.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t vpvtv(struct args_t * func_args)
+{
+// control loops
+// vector plus vector times vector
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] += b[i] * c[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&vpvtv, "vpvtv", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vsumr.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vsumr.c
new file mode 100644
index 0000000..0847eae
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vsumr.c
@@ -0,0 +1,41 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t vsumr(struct args_t * func_args)
+{
+// control loops
+// vector sum reduction
+
+ initialise_arrays(__func__);
+
+ real_t sum;
+ for (int nl = 0; nl < iterations*10; nl++) {
+ sum = 0.;
+ for (int i = 0; i < LEN_1D; i++) {
+ sum += a[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, sum);
+ }
+
+ return sum;
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&vsumr, "vsumr", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vtv.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vtv.c
new file mode 100644
index 0000000..d3457d4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vtv.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t vtv(struct args_t * func_args)
+{
+// control loops
+// vector times vector
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < iterations*10; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] *= b[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&vtv, "vtv", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vtvtv.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vtvtv.c
new file mode 100644
index 0000000..32148ec
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vtvtv.c
@@ -0,0 +1,39 @@
+/* This file is distributed under the University of Illinois Open Source
+ License. See license.txt for details. */
+
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-require-effective-target vect_float } */
+
+#include "tsvc.h"
+
+real_t vtvtv(struct args_t * func_args)
+{
+// control loops
+// vector times vector times vector
+
+ initialise_arrays(__func__);
+
+ for (int nl = 0; nl < 4*iterations; nl++) {
+ for (int i = 0; i < LEN_1D; i++) {
+ a[i] = a[i] * b[i] * c[i];
+ }
+ dummy(a, b, c, d, e, aa, bb, cc, 0.);
+ }
+
+ return calc_checksum(__func__);
+}
+
+int main (int argc, char **argv)
+{
+ int n1 = 1;
+ int n3 = 1;
+ int* ip;
+ real_t s1,s2;
+ init(&ip, &s1, &s2);
+
+ run(&vtvtv, "vtvtv", NULL);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-10.c b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-10.c
new file mode 100644
index 0000000..fe4f677
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-10.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-additional-options "-O3 -save-temps -fdump-tree-dce -w" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(int32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+__attribute__((noinline, noipa, optimize("O1")))
+void fun2(int32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+#define TYPE int32_t
+#include "../bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump {<=\s*.+\{ 255,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s*.+\{ 4294967290,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-11.c b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-11.c
new file mode 100644
index 0000000..b77f4d4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-11.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-additional-options "-O3 -save-temps -fdump-tree-dce -w" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) != 0;
+}
+
+__attribute__((noinline, noipa, optimize("O1")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) != 0;
+}
+
+#include "../bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump {>\s*.+\{ 255,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s*.+\{ 4294967290,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-12.c b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-12.c
new file mode 100644
index 0000000..30d36f4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-12.c
@@ -0,0 +1,17 @@
+/* { dg-do assemble } */
+/* { dg-additional-options "-O3 -fdump-tree-dce -w" } */
+
+#include <stdint.h>
+
+typedef unsigned int v4si __attribute__ ((vector_size (16)));
+
+__attribute__((noinline, noipa))
+void fun(v4si *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+/* { dg-final { scan-tree-dump {<=\s*.+\{ 255,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s*.+\{ 4294967290,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-2.c b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-2.c
new file mode 100644
index 0000000..58c0b92
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-2.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-additional-options "-O3 -save-temps -fdump-tree-dce -w" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+__attribute__((noinline, noipa, optimize("O1")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+#include "../bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {<=\s*.+\{ 255,.+\}} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s*.+\{ 4294967040,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-23.c b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-23.c
new file mode 100644
index 0000000..67119d3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-23.c
@@ -0,0 +1,16 @@
+/* { dg-do assemble } */
+/* { dg-additional-options "-O1 -fdump-tree-dce -w" } */
+
+#include <stdint.h>
+
+typedef unsigned int v4si __attribute__ ((vector_size (16)));
+
+__attribute__((noinline, noipa))
+v4si fun(v4si x)
+{
+ v4si mask = { 255, 15, 1, 0xFFFF };
+ v4si zeros = {0};
+ return (x & ~mask) == zeros;
+}
+
+/* { dg-final { scan-tree-dump {<=\s*.+\{ 255, 15, 1, 65535 \}} dce7 { target vect_int } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-3.c b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-3.c
new file mode 100644
index 0000000..58c0b92
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-3.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-additional-options "-O3 -save-temps -fdump-tree-dce -w" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+__attribute__((noinline, noipa, optimize("O1")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) == 0;
+}
+
+#include "../bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {<=\s*.+\{ 255,.+\}} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s*.+\{ 4294967040,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-4.c b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-4.c
new file mode 100644
index 0000000..6e2da41
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-4.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-additional-options "-O3 -save-temps -fdump-tree-dce -w" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) >= 0;
+}
+
+__attribute__((noinline, noipa, optimize("O1")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) >= 0;
+}
+
+#include "../bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {=\s*.+\{ 1,.+\}} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s*.+\{ 4294967040,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-5.c b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-5.c
new file mode 100644
index 0000000..5ef0f46
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-5.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-additional-options "-O3 -save-temps -fdump-tree-dce -w" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) > 0;
+}
+
+__attribute__((noinline, noipa, optimize("O1")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) > 0;
+}
+
+#include "../bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {>\s*.+\{ 255,.+\}} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s*.+\{ 4294967040,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-6.c b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-6.c
new file mode 100644
index 0000000..22e5f88
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-6.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-additional-options "-O3 -save-temps -fdump-tree-dce -w" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) <= 0;
+}
+
+__attribute__((noinline, noipa, optimize("O1")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~255)) <= 0;
+}
+
+#include "../bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {<=\s*.+\{ 255,.+\}} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s*.+\{ 4294967040,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-8.c b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-8.c
new file mode 100644
index 0000000..edff542
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-8.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-additional-options "-O3 -save-temps -fdump-tree-dce -w" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~1)) != 0;
+}
+
+__attribute__((noinline, noipa, optimize("O1")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~1)) != 0;
+}
+
+#include "../bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-times {>\s*.+\{ 1,.+\}} 1 dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {&\s*.+\{ 4294967294,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-9.c b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-9.c
new file mode 100644
index 0000000..319d80e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-bic-bitmask-9.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-additional-options "-O3 -save-temps -fdump-tree-dce -w" } */
+
+#include <stdint.h>
+
+__attribute__((noinline, noipa))
+void fun1(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~5)) == 0;
+}
+
+__attribute__((noinline, noipa, optimize("O1")))
+void fun2(uint32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (x[i]&(~5)) == 0;
+}
+
+#include "../bic-bitmask.h"
+
+/* { dg-final { scan-tree-dump-not {<=\s*.+\{ 4294967289,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump {&\s*.+\{ 4294967290,.+\}} dce7 { target vect_int } } } */
+/* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmax-1.c b/gcc/testsuite/gcc.dg/vect/vect-fmax-1.c
new file mode 100644
index 0000000..841ffab
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-fmax-1.c
@@ -0,0 +1,83 @@
+#include "tree-vect.h"
+
+#ifndef TYPE
+#define TYPE float
+#define FN __builtin_fmaxf
+#endif
+
+TYPE __attribute__((noipa))
+test (TYPE x, TYPE *ptr, int n)
+{
+ for (int i = 0; i < n; ++i)
+ x = FN (x, ptr[i]);
+ return x;
+}
+
+#define N 128
+#define HALF (N / 2)
+
+int
+main (void)
+{
+ check_vect ();
+
+ TYPE a[N];
+
+ for (int i = 0; i < N; ++i)
+ a[i] = i;
+
+ if (test (-1, a, 1) != 0)
+ __builtin_abort ();
+ if (test (-1, a, 64) != 63)
+ __builtin_abort ();
+ if (test (-1, a, 65) != 64)
+ __builtin_abort ();
+ if (test (-1, a, 66) != 65)
+ __builtin_abort ();
+ if (test (-1, a, 67) != 66)
+ __builtin_abort ();
+ if (test (-1, a, 128) != 127)
+ __builtin_abort ();
+ if (test (127, a, 128) != 127)
+ __builtin_abort ();
+ if (test (128, a, 128) != 128)
+ __builtin_abort ();
+
+ for (int i = 0; i < N; ++i)
+ a[i] = -i;
+
+ if (test (-60, a, 4) != 0)
+ __builtin_abort ();
+ if (test (0, a, 4) != 0)
+ __builtin_abort ();
+ if (test (1, a, 4) != 1)
+ __builtin_abort ();
+
+ for (int i = 0; i < HALF; ++i)
+ {
+ a[i] = i;
+ a[HALF + i] = HALF - i;
+ }
+
+ if (test (0, a, HALF - 16) != HALF - 17)
+ __builtin_abort ();
+ if (test (0, a, HALF - 2) != HALF - 3)
+ __builtin_abort ();
+ if (test (0, a, HALF - 1) != HALF - 2)
+ __builtin_abort ();
+ if (test (0, a, HALF) != HALF - 1)
+ __builtin_abort ();
+ if (test (0, a, HALF + 1) != HALF)
+ __builtin_abort ();
+ if (test (0, a, HALF + 2) != HALF)
+ __builtin_abort ();
+ if (test (0, a, HALF + 3) != HALF)
+ __builtin_abort ();
+ if (test (0, a, HALF + 16) != HALF)
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmax-2.c b/gcc/testsuite/gcc.dg/vect/vect-fmax-2.c
new file mode 100644
index 0000000..3d1f644
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-fmax-2.c
@@ -0,0 +1,7 @@
+#define TYPE double
+#define FN __builtin_fmax
+
+#include "vect-fmax-1.c"
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmax-3.c b/gcc/testsuite/gcc.dg/vect/vect-fmax-3.c
new file mode 100644
index 0000000..f711ed0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-fmax-3.c
@@ -0,0 +1,83 @@
+#include "tree-vect.h"
+
+void __attribute__((noipa))
+test (double x0, double x1, double *restrict res, double *restrict ptr, int n)
+{
+ for (int i = 0; i < n; i += 2)
+ {
+ x0 = __builtin_fmax (x0, ptr[i + 0]);
+ x1 = __builtin_fmax (x1, ptr[i + 1]);
+ }
+ res[0] = x0;
+ res[1] = x1;
+}
+
+#define N 128
+#define HALF (N / 2)
+
+int
+main (void)
+{
+ check_vect ();
+
+ double res[2], a[N];
+
+ for (int i = 0; i < N; i += 2)
+ {
+ a[i] = i < HALF ? i : HALF;
+ a[i + 1] = i / 8;
+ }
+
+ test (-1, -1, res, a, 2);
+ if (res[0] != 0 || res[1] != 0)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, 6);
+ if (res[0] != 4 || res[1] != 0)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, 8);
+ if (res[0] != 6 || res[1] != 0)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, 10);
+ if (res[0] != 8 || res[1] != 1)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, HALF - 2);
+ if (res[0] != HALF - 4 || res[1] != HALF / 8 - 1)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, HALF);
+ if (res[0] != HALF - 2 || res[1] != HALF / 8 - 1)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, HALF + 2);
+ if (res[0] != HALF || res[1] != HALF / 8)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, HALF + 8);
+ if (res[0] != HALF || res[1] != HALF / 8)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, HALF + 10);
+ if (res[0] != HALF || res[1] != HALF / 8 + 1)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, N);
+ if (res[0] != HALF || res[1] != N / 8 - 1)
+ __builtin_abort ();
+
+ test (HALF + 1, -1, res, a, N);
+ if (res[0] != HALF + 1 || res[1] != N / 8 - 1)
+ __builtin_abort ();
+
+ test (HALF + 1, N, res, a, N);
+ if (res[0] != HALF + 1 || res[1] != N)
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmin-1.c b/gcc/testsuite/gcc.dg/vect/vect-fmin-1.c
new file mode 100644
index 0000000..3d5f843
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-fmin-1.c
@@ -0,0 +1,86 @@
+#include "tree-vect.h"
+
+#ifndef TYPE
+#define TYPE float
+#define FN __builtin_fminf
+#endif
+
+TYPE __attribute__((noipa))
+test (TYPE x, TYPE *ptr, int n)
+{
+ for (int i = 0; i < n; ++i)
+ x = FN (x, ptr[i]);
+ return x;
+}
+
+#define N 128
+#define HALF (N / 2)
+
+int
+main (void)
+{
+ check_vect ();
+
+ TYPE a[N];
+
+ for (int i = 0; i < N; ++i)
+ a[i] = -i;
+
+ if (test (1, a, 1) != 0)
+ __builtin_abort ();
+ if (test (1, a, 64) != -63)
+ __builtin_abort ();
+ if (test (1, a, 65) != -64)
+ __builtin_abort ();
+ if (test (1, a, 66) != -65)
+ __builtin_abort ();
+ if (test (1, a, 67) != -66)
+ __builtin_abort ();
+ if (test (1, a, 128) != -127)
+ __builtin_abort ();
+ if (test (-127, a, 128) != -127)
+ __builtin_abort ();
+ if (test (-128, a, 128) != -128)
+ __builtin_abort ();
+
+ for (int i = 0; i < N; ++i)
+ a[i] = i;
+
+ if (test (1, a, 4) != 0)
+ __builtin_abort ();
+ if (test (0, a, 4) != 0)
+ __builtin_abort ();
+ if (test (-1, a, 4) != -1)
+ __builtin_abort ();
+
+ for (int i = 0; i < HALF; ++i)
+ {
+ a[i] = HALF - i;
+ a[HALF + i] = i;
+ }
+
+ if (test (N, a, HALF - 16) != 17)
+ __builtin_abort ();
+ if (test (N, a, HALF - 2) != 3)
+ __builtin_abort ();
+ if (test (N, a, HALF - 1) != 2)
+ __builtin_abort ();
+ if (test (N, a, HALF) != 1)
+ __builtin_abort ();
+ if (test (N, a, HALF + 1) != 0)
+ __builtin_abort ();
+ if (test (N, a, HALF + 2) != 0)
+ __builtin_abort ();
+ if (test (N, a, HALF + 3) != 0)
+ __builtin_abort ();
+ if (test (N, a, HALF + 16) != 0)
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmin-2.c b/gcc/testsuite/gcc.dg/vect/vect-fmin-2.c
new file mode 100644
index 0000000..21e45cc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-fmin-2.c
@@ -0,0 +1,9 @@
+#ifndef TYPE
+#define TYPE double
+#define FN __builtin_fmin
+#endif
+
+#include "vect-fmin-1.c"
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c b/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c
new file mode 100644
index 0000000..cc38bf4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c
@@ -0,0 +1,83 @@
+#include "tree-vect.h"
+
+void __attribute__((noipa))
+test (double x0, double x1, double *restrict res, double *restrict ptr, int n)
+{
+ for (int i = 0; i < n; i += 2)
+ {
+ x0 = __builtin_fmin (x0, ptr[i + 0]);
+ x1 = __builtin_fmin (x1, ptr[i + 1]);
+ }
+ res[0] = x0;
+ res[1] = x1;
+}
+
+#define N 128
+#define HALF (N / 2)
+
+int
+main (void)
+{
+ check_vect ();
+
+ double res[2], a[N];
+
+ for (int i = 0; i < N; i += 2)
+ {
+ a[i] = i < HALF ? HALF - i : 0;
+ a[i + 1] = -i / 8;
+ }
+
+ test (N, N, res, a, 2);
+ if (res[0] != HALF || res[1] != 0)
+ __builtin_abort ();
+
+ test (N, N, res, a, 6);
+ if (res[0] != HALF - 4 || res[1] != 0)
+ __builtin_abort ();
+
+ test (N, N, res, a, 8);
+ if (res[0] != HALF - 6 || res[1] != 0)
+ __builtin_abort ();
+
+ test (N, N, res, a, 10);
+ if (res[0] != HALF - 8 || res[1] != -1)
+ __builtin_abort ();
+
+ test (N, N, res, a, HALF - 2);
+ if (res[0] != 4 || res[1] != -HALF / 8 + 1)
+ __builtin_abort ();
+
+ test (N, N, res, a, HALF);
+ if (res[0] != 2 || res[1] != -HALF / 8 + 1)
+ __builtin_abort ();
+
+ test (N, N, res, a, HALF + 2);
+ if (res[0] != 0 || res[1] != -HALF / 8)
+ __builtin_abort ();
+
+ test (N, N, res, a, HALF + 8);
+ if (res[0] != 0 || res[1] != -HALF / 8)
+ __builtin_abort ();
+
+ test (N, N, res, a, HALF + 10);
+ if (res[0] != 0 || res[1] != -HALF / 8 - 1)
+ __builtin_abort ();
+
+ test (N, N, res, a, N);
+ if (res[0] != 0 || res[1] != -N / 8 + 1)
+ __builtin_abort ();
+
+ test (-1, N, res, a, N);
+ if (res[0] != -1 || res[1] != -N / 8 + 1)
+ __builtin_abort ();
+
+ test (-1, -N / 8, res, a, N);
+ if (res[0] != -1 || res[1] != -N / 8)
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-gather-1.c b/gcc/testsuite/gcc.dg/vect/vect-gather-1.c
new file mode 100644
index 0000000..4cee73f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-gather-1.c
@@ -0,0 +1,60 @@
+#include "tree-vect.h"
+
+#define N 16
+
+void __attribute__((noipa))
+f (int *restrict y, int *restrict x, int *restrict indices)
+{
+ for (int i = 0; i < N; ++i)
+ {
+ y[i * 2] = x[indices[i * 2]] + 1;
+ y[i * 2 + 1] = x[indices[i * 2 + 1]] + 2;
+ }
+}
+
+int y[N * 2];
+int x[N * 2] = {
+ 72704, 52152, 51301, 96681,
+ 57937, 60490, 34504, 60944,
+ 42225, 28333, 88336, 74300,
+ 29250, 20484, 38852, 91536,
+ 86917, 63941, 31590, 21998,
+ 22419, 26974, 28668, 13968,
+ 3451, 20247, 44089, 85521,
+ 22871, 87362, 50555, 85939
+};
+int indices[N * 2] = {
+ 15, 16, 9, 19,
+ 7, 22, 19, 1,
+ 22, 13, 15, 30,
+ 5, 12, 11, 11,
+ 10, 25, 5, 20,
+ 22, 24, 24, 28,
+ 30, 19, 6, 4,
+ 7, 12, 8, 21
+};
+int expected[N * 2] = {
+ 91537, 86919, 28334, 22000,
+ 60945, 28670, 21999, 52154,
+ 28669, 20486, 91537, 50557,
+ 60491, 29252, 74301, 74302,
+ 88337, 20249, 60491, 22421,
+ 28669, 3453, 3452, 22873,
+ 50556, 22000, 34505, 57939,
+ 60945, 29252, 42226, 26976
+};
+
+int
+main (void)
+{
+ check_vect ();
+
+ f (y, x, indices);
+ for (int i = 0; i < 32; ++i)
+ if (y[i] != expected[i])
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Loop contains only SLP stmts" vect { target vect_gather_load_ifn } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-gather-2.c b/gcc/testsuite/gcc.dg/vect/vect-gather-2.c
new file mode 100644
index 0000000..a1f6ba4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-gather-2.c
@@ -0,0 +1,36 @@
+/* { dg-do compile } */
+
+#define N 16
+
+void
+f1 (int *restrict y, int *restrict x1, int *restrict x2,
+ int *restrict indices)
+{
+ for (int i = 0; i < N; ++i)
+ {
+ y[i * 2] = x1[indices[i * 2]] + 1;
+ y[i * 2 + 1] = x2[indices[i * 2 + 1]] + 2;
+ }
+}
+
+void
+f2 (int *restrict y, int *restrict x, int *restrict indices)
+{
+ for (int i = 0; i < N; ++i)
+ {
+ y[i * 2] = x[indices[i * 2]] + 1;
+ y[i * 2 + 1] = x[indices[i * 2 + 1] * 2] + 2;
+ }
+}
+
+void
+f3 (int *restrict y, int *restrict x, int *restrict indices)
+{
+ for (int i = 0; i < N; ++i)
+ {
+ y[i * 2] = x[indices[i * 2]] + 1;
+ y[i * 2 + 1] = x[(unsigned int) indices[i * 2 + 1]] + 2;
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "Loop contains only SLP stmts" vect { target vect_gather_load_ifn } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-gather-3.c b/gcc/testsuite/gcc.dg/vect/vect-gather-3.c
new file mode 100644
index 0000000..738bd3f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-gather-3.c
@@ -0,0 +1,64 @@
+#include "tree-vect.h"
+
+#define N 16
+
+void __attribute__((noipa))
+f (int *restrict y, int *restrict x, int *restrict indices)
+{
+ for (int i = 0; i < N; ++i)
+ {
+ y[i * 2] = (indices[i * 2] < N * 2
+ ? x[indices[i * 2]] + 1
+ : 1);
+ y[i * 2 + 1] = (indices[i * 2 + 1] < N * 2
+ ? x[indices[i * 2 + 1]] + 2
+ : 2);
+ }
+}
+
+int y[N * 2];
+int x[N * 2] = {
+ 72704, 52152, 51301, 96681,
+ 57937, 60490, 34504, 60944,
+ 42225, 28333, 88336, 74300,
+ 29250, 20484, 38852, 91536,
+ 86917, 63941, 31590, 21998,
+ 22419, 26974, 28668, 13968,
+ 3451, 20247, 44089, 85521,
+ 22871, 87362, 50555, 85939
+};
+int indices[N * 2] = {
+ 15, 0x10000, 0xcafe0, 19,
+ 7, 22, 19, 1,
+ 0x20000, 0x70000, 15, 30,
+ 5, 12, 11, 11,
+ 10, 25, 5, 20,
+ 22, 24, 32, 28,
+ 30, 19, 6, 0xabcdef,
+ 7, 12, 8, 21
+};
+int expected[N * 2] = {
+ 91537, 2, 1, 22000,
+ 60945, 28670, 21999, 52154,
+ 1, 2, 91537, 50557,
+ 60491, 29252, 74301, 74302,
+ 88337, 20249, 60491, 22421,
+ 28669, 3453, 1, 22873,
+ 50556, 22000, 34505, 2,
+ 60945, 29252, 42226, 26976
+};
+
+int
+main (void)
+{
+ check_vect ();
+
+ f (y, x, indices);
+ for (int i = 0; i < 32; ++i)
+ if (y[i] != expected[i])
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Loop contains only SLP stmts" vect { target { vect_gather_load_ifn && vect_masked_load } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-gather-4.c b/gcc/testsuite/gcc.dg/vect/vect-gather-4.c
new file mode 100644
index 0000000..ee2e4e4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-gather-4.c
@@ -0,0 +1,48 @@
+/* { dg-do compile } */
+
+#define N 16
+
+void
+f1 (int *restrict y, int *restrict x1, int *restrict x2,
+ int *restrict indices)
+{
+ for (int i = 0; i < N; ++i)
+ {
+ y[i * 2] = (indices[i * 2] < N * 2
+ ? x1[indices[i * 2]] + 1
+ : 1);
+ y[i * 2 + 1] = (indices[i * 2 + 1] < N * 2
+ ? x2[indices[i * 2 + 1]] + 2
+ : 2);
+ }
+}
+
+void
+f2 (int *restrict y, int *restrict x, int *restrict indices)
+{
+ for (int i = 0; i < N; ++i)
+ {
+ y[i * 2] = (indices[i * 2] < N * 2
+ ? x[indices[i * 2]] + 1
+ : 1);
+ y[i * 2 + 1] = (indices[i * 2 + 1] < N * 2
+ ? x[indices[i * 2 + 1] * 2] + 2
+ : 2);
+ }
+}
+
+void
+f3 (int *restrict y, int *restrict x, int *restrict indices)
+{
+ for (int i = 0; i < N; ++i)
+ {
+ y[i * 2] = (indices[i * 2] < N * 2
+ ? x[indices[i * 2]] + 1
+ : 1);
+ y[i * 2 + 1] = (indices[i * 2 + 1] < N * 2
+ ? x[(unsigned int) indices[i * 2 + 1]] + 2
+ : 2);
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "Loop contains only SLP stmts" vect { target vect_gather_load_ifn } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-18.c b/gcc/testsuite/gcc.dg/vect/vect-simd-18.c
index b25f5a5..cca350f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-simd-18.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-18.c
@@ -17,7 +17,7 @@ foo (int s, int *p)
return r;
}
-int p[10000 / 78];
+int p[10000 / 78 + 1];
int
main ()
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-19.c b/gcc/testsuite/gcc.dg/vect/vect-simd-19.c
index a71dfa6..67e25c0 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-simd-19.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-19.c
@@ -17,7 +17,7 @@ foo (int s, int m, int n, int *p)
return r;
}
-int p[10000 / 78];
+int p[10000 / 78 + 1];
int
main ()
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-20.c b/gcc/testsuite/gcc.dg/vect/vect-simd-20.c
index c85f05f..57217c8 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-simd-20.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-20.c
@@ -18,7 +18,7 @@ foo (int s, int m, int n, int *p)
return r;
}
-int p[10000 / 78 * 7];
+int p[((10000 / 78) + 1) * 7];
int
main ()
diff --git a/gcc/testsuite/gcc.dg/vect/vect.exp b/gcc/testsuite/gcc.dg/vect/vect.exp
index dca9a4d..5271608 100644
--- a/gcc/testsuite/gcc.dg/vect/vect.exp
+++ b/gcc/testsuite/gcc.dg/vect/vect.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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
@@ -95,6 +95,9 @@ foreach flags $VECT_ADDITIONAL_FLAGS {
[glob -nocomplain $srcdir/$subdir/vect-*.\[cS\]]] \
$flags $DEFAULT_VECTCFLAGS
et-dg-runtest dg-runtest [lsort \
+ [glob -nocomplain $srcdir/$subdir/tsvc/*.\[cS\]]] \
+ $flags $DEFAULT_VECTCFLAGS
+ et-dg-runtest dg-runtest [lsort \
[glob -nocomplain $srcdir/$subdir/slp-*.\[cS\]]] \
$flags $DEFAULT_VECTCFLAGS
et-dg-runtest dg-runtest [lsort \
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-1.c b/gcc/testsuite/gcc.dg/vla-stexp-1.c
index 97d6693..baaad36 100644
--- a/gcc/testsuite/gcc.dg/vla-stexp-1.c
+++ b/gcc/testsuite/gcc.dg/vla-stexp-1.c
@@ -1,6 +1,7 @@
/* PR29970*/
/* { dg-do run } */
/* { dg-options "-Wall -O0" } */
+/* { dg-require-effective-target alloca } */
int foo(void)
{
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-2.c b/gcc/testsuite/gcc.dg/vla-stexp-2.c
index 176f400..9f15125 100644
--- a/gcc/testsuite/gcc.dg/vla-stexp-2.c
+++ b/gcc/testsuite/gcc.dg/vla-stexp-2.c
@@ -1,6 +1,7 @@
/* PR101838 */
/* { dg-do run } */
/* { dg-options "-Wpedantic -O0" } */
+/* { dg-require-effective-target alloca } */
int bar0(
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-3.c b/gcc/testsuite/gcc.dg/vla-stexp-3.c
new file mode 100644
index 0000000..e663de1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vla-stexp-3.c
@@ -0,0 +1,11 @@
+/* PR91038 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+
+void bar(void)
+{
+ ({ int N = 2; int (*x)[9][N] = 0; x; })[1];
+ ({ int N = 2; int (*x)[9][N] = 0; x; })[0]; // should not ice
+}
+
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-4.c b/gcc/testsuite/gcc.dg/vla-stexp-4.c
new file mode 100644
index 0000000..929768c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vla-stexp-4.c
@@ -0,0 +1,95 @@
+/* PR29970, PR91038 */
+/* { dg-do run } */
+/* { dg-options "-O0 -Wunused-variable" } */
+/* { dg-require-effective-target alloca } */
+
+int foo3b(void) // should not return 0
+{
+ int n = 0;
+ return sizeof *({ n = 10; int x[n]; &x; });
+}
+
+int foo4(void) // should not ICE
+{
+ return (*({
+ int n = 20;
+ char (*x)[n][n] = __builtin_malloc(n * n);
+ (*x)[12][1] = 1;
+ x;
+ }))[12][1];
+}
+
+int foo5(void) // should return 1, returns 0
+{
+ int n = 0;
+ return (*({
+ n = 20;
+ char (*x)[n][n] = __builtin_malloc(n * n);
+ (*x)[12][1] = 1;
+ (*x)[0][1] = 0;
+ x;
+ }))[12][1];
+}
+
+int foo5c(void) // should return 400
+{
+ int n = 0;
+ return sizeof(*({
+ n = 20;
+ char (*x)[n][n] = __builtin_malloc(n * n);
+ (*x)[12][1] = 1;
+ (*x)[0][1] = 0;
+ x;
+ }));
+}
+
+int foo5b(void) // should return 1, returns 0
+{
+ int n = 0; /* { dg-warning "unused variable" } */
+ return (*({
+ int n = 20;
+ char (*x)[n][n] = __builtin_malloc(n * n);
+ (*x)[12][1] = 1;
+ (*x)[0][1] = 0;
+ x;
+ }))[12][1];
+}
+
+int foo5a(void) // should return 1, returns 0
+{
+ return (*({
+ int n = 20;
+ char (*x)[n][n] = __builtin_malloc(n * n);
+ (*x)[12][1] = 1;
+ (*x)[0][1] = 0;
+ x;
+ }))[12][1];
+}
+
+
+
+
+int main()
+{
+ if (sizeof(int[10]) != foo3b())
+ __builtin_abort();
+
+ if (1 != foo4())
+ __builtin_abort();
+
+ if (400 != foo5c())
+ __builtin_abort();
+
+ if (1 != foo5a())
+ __builtin_abort();
+
+ if (1 != foo5b()) // -O0
+ __builtin_abort();
+
+ if (1 != foo5())
+ __builtin_abort();
+
+ return 0;
+}
+
+
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-5.c b/gcc/testsuite/gcc.dg/vla-stexp-5.c
new file mode 100644
index 0000000..68614f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vla-stexp-5.c
@@ -0,0 +1,31 @@
+/* PR29970 */
+/* { dg-do run } */
+/* { dg-options "-Wunused-variable" } */
+/* { dg-require-effective-target alloca } */
+
+
+
+
+int foo2a(void) // should not ICE
+{
+ return ({ int n = 20; struct { int x[n];} x; x.x[12] = 1; sizeof(x); });
+}
+
+
+int foo2b(void) // should not ICE
+{
+ return sizeof *({ int n = 20; struct { int x[n];} x; x.x[12] = 1; &x; });
+}
+
+int main()
+{
+ if (sizeof(struct { int x[20]; }) != foo2a())
+ __builtin_abort();
+
+ if (sizeof(struct { int x[20]; }) != foo2b())
+ __builtin_abort();
+
+ return 0;
+}
+
+
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-6.c b/gcc/testsuite/gcc.dg/vla-stexp-6.c
new file mode 100644
index 0000000..3d96d38
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vla-stexp-6.c
@@ -0,0 +1,94 @@
+/* PR29970, PR91038 */
+/* { dg-do run } */
+/* { dg-options "-O2 -Wunused-variable" } */
+
+int foo3b(void) // should not return 0
+{
+ int n = 0;
+ return sizeof *({ n = 10; int x[n]; &x; });
+}
+
+int foo4(void) // should not ICE
+{
+ return (*({
+ int n = 20;
+ char (*x)[n][n] = __builtin_malloc(n * n);
+ (*x)[12][1] = 1;
+ x;
+ }))[12][1];
+}
+
+int foo5(void) // should return 1, returns 0
+{
+ int n = 0;
+ return (*({
+ n = 20;
+ char (*x)[n][n] = __builtin_malloc(n * n);
+ (*x)[12][1] = 1;
+ (*x)[0][1] = 0;
+ x;
+ }))[12][1];
+}
+
+int foo5c(void) // should return 400
+{
+ int n = 0;
+ return sizeof(*({
+ n = 20;
+ char (*x)[n][n] = __builtin_malloc(n * n);
+ (*x)[12][1] = 1;
+ (*x)[0][1] = 0;
+ x;
+ }));
+}
+
+int foo5b(void) // should return 1, returns 0
+{
+ int n = 0; /* { dg-warning "unused variable" } */
+ return (*({
+ int n = 20;
+ char (*x)[n][n] = __builtin_malloc(n * n);
+ (*x)[12][1] = 1;
+ (*x)[0][1] = 0;
+ x;
+ }))[12][1];
+}
+
+int foo5a(void) // should return 1, returns 0
+{
+ return (*({
+ int n = 20;
+ char (*x)[n][n] = __builtin_malloc(n * n);
+ (*x)[12][1] = 1;
+ (*x)[0][1] = 0;
+ x;
+ }))[12][1];
+}
+
+
+
+
+int main()
+{
+ if (sizeof(int[10]) != foo3b())
+ __builtin_abort();
+
+ if (1 != foo4())
+ __builtin_abort();
+
+ if (400 != foo5c())
+ __builtin_abort();
+
+ if (1 != foo5a())
+ __builtin_abort();
+
+ if (1 != foo5b()) // -O0
+ __builtin_abort();
+
+ if (1 != foo5())
+ __builtin_abort();
+
+ return 0;
+}
+
+
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-7.c b/gcc/testsuite/gcc.dg/vla-stexp-7.c
new file mode 100644
index 0000000..3091b91
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vla-stexp-7.c
@@ -0,0 +1,44 @@
+/* PR91038 */
+/* { dg-do run } */
+/* { dg-options "-O2 -Wunused-variable" } */
+
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+struct lbm {
+
+ int D;
+ const int* DQ;
+
+} D2Q9 = { 2,
+ (const int*)&(const int[9][2]){
+ { 0, 0 },
+ { 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 },
+ { 1, 1 }, { -1, 1 }, { -1, -1 }, { 1, -1 },
+ }
+};
+
+void zouhe_left(void)
+{
+ __auto_type xx = (*({ int N = 2; struct lbm __x = D2Q9; ((const int(*)[9][N])__x.DQ); }));
+
+ if (1 != xx[1][0])
+ __builtin_abort();
+
+ if (2 != ARRAY_SIZE(xx[1]))
+ __builtin_abort();
+
+ if (1 != (*({ int N = 2; struct lbm __x = D2Q9; ((const int(*)[9][N])__x.DQ); }))[1][0])
+ __builtin_abort();
+
+ if (2 != ARRAY_SIZE(*({ int N = 2; struct lbm __x = D2Q9; ((const int(*)[9][N])__x.DQ); })[1]))
+ __builtin_abort();
+}
+
+int main()
+{
+ zouhe_left();
+ return 0;
+}
+
+
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-8.c b/gcc/testsuite/gcc.dg/vla-stexp-8.c
new file mode 100644
index 0000000..5b475eb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vla-stexp-8.c
@@ -0,0 +1,47 @@
+/* PR29970, PR91038 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wunused-variable" } */
+
+
+int foo0(void)
+{
+ int c = *(*(*({ int n = 10; int (*x)[n][n] = __builtin_malloc(sizeof *x); x; }) + 5) + 5);
+ return c;
+}
+
+int foo1(void)
+{
+ int c = *(5 + *(5 + *({ int n = 10; int (*x)[n][n] = __builtin_malloc(sizeof *x); x; })));
+ return c;
+}
+
+int bar2(void)
+{
+ int c = (*({ int n = 10; struct { int y[n]; int z; }* x = __builtin_malloc(sizeof *x); x; })).z;
+ return c;
+}
+
+int bar3(void)
+{
+ int n = 2; /* { dg-warning "unused variable" } */
+ int c = (*({ int n = 3; /* { dg-warning "unused variable" } */
+ ({ int n = 10; int (*x)[n][n] = __builtin_malloc(sizeof *x); x; }); }))[5][5];
+ return c;
+}
+
+int bar3b(void)
+{
+ int n = 2; /* { dg-warning "unused variable" } */
+ int c = (*({ int n = 3; /* { dg-warning "unused variable" } */
+ ({ int n = 10; int (*x)[n][n] = __builtin_malloc(sizeof *x); x; }); }))[0][0];
+ return c;
+}
+
+int bar4(void)
+{
+ int n = 2; /* { dg-warning "unused variable" } */
+ int c = *(5 + *( 5 + *({ int n = 3; /* { dg-warning "unused variable" } */
+ ({ int n = 10; int (*x)[n][n] = __builtin_malloc(sizeof *x); x; }); })));
+ return c;
+}
+
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-9.c b/gcc/testsuite/gcc.dg/vla-stexp-9.c
new file mode 100644
index 0000000..3593a79
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vla-stexp-9.c
@@ -0,0 +1,53 @@
+/* PR91038 */
+/* { dg-do run } */
+/* { dg-options "-O2 -Wunused-variable" } */
+
+
+
+void foo(void)
+{
+ if (2 * sizeof(int) != sizeof((*({ int N = 2; int (*x)[9][N] = 0; x; })[1])))
+ __builtin_abort();
+}
+
+void bar(void)
+{
+ if (2 * sizeof(int) != sizeof((*({ int N = 2; int (*x)[9][N] = 0; x; })[0])))
+ __builtin_abort();
+}
+
+void bar0(void)
+{
+ if (2 * 9 * sizeof(int) != sizeof((*({ int N = 2; int (*x)[9][N] = 0; x; }))))
+ __builtin_abort();
+}
+
+void bar11(void)
+{
+ sizeof(*((*({ int N = 2; int (*x)[9][N] = 0; x; }) + 0)));
+}
+
+void bar12(void)
+{
+ if (2 * sizeof(int) != sizeof(*((*({ int N = 2; int (*x)[9][N] = 0; x; }) ))))
+ __builtin_abort();
+}
+
+void bar1(void)
+{
+ if (2 * sizeof(int) != sizeof(*((*({ int N = 2; int (*x)[9][N] = 0; x; }) + 0))))
+ __builtin_abort();
+}
+
+
+
+
+int main()
+{
+ foo();
+ bar0();
+ bar12();
+ bar1();
+ bar();
+}
+
diff --git a/gcc/testsuite/gcc.dg/vmx/vmx.exp b/gcc/testsuite/gcc.dg/vmx/vmx.exp
index 9d1da87..3c20c96 100644
--- a/gcc/testsuite/gcc.dg/vmx/vmx.exp
+++ b/gcc/testsuite/gcc.dg/vmx/vmx.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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/vxworks/vxworks.exp b/gcc/testsuite/gcc.dg/vxworks/vxworks.exp
index 8f8d822..e176f51 100644
--- a/gcc/testsuite/gcc.dg/vxworks/vxworks.exp
+++ b/gcc/testsuite/gcc.dg/vxworks/vxworks.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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-strnlen-no-nul.c b/gcc/testsuite/gcc.dg/warn-strnlen-no-nul.c
index 846e930..70f6a43 100644
--- a/gcc/testsuite/gcc.dg/warn-strnlen-no-nul.c
+++ b/gcc/testsuite/gcc.dg/warn-strnlen-no-nul.c
@@ -143,17 +143,18 @@ T (v0 ? b[1] : "", bsz);
T (v0 ? b[2] : "", bsz);
T (v0 ? b[3] : "", bsz);
-/* The warnings below are strictly correct but the strnlen calls are safe
- because the reads are bounded by the length of the constant arguments.
- It might make sense to relax the warning to avoid triggering for them. */
+/* Warning for the calls below would be strictly correct even though
+ the strnlen calls are safe because the reads are bounded by
+ the length of the constant arguments. Most of the calls are
+ not diagnosed anymore as a result of the fix for PR 103215. */
T (v0 ? "" : b[0], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-T (v0 ? "" : b[1], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-T (v0 ? "" : b[2], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-T (v0 ? "" : b[3], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
+T (v0 ? "" : b[1], bsz + 1);
+T (v0 ? "" : b[2], bsz + 1);
+T (v0 ? "" : b[3], bsz + 1);
T (v0 ? b[0] : "", bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-T (v0 ? b[1] : "", bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-T (v0 ? b[2] : "", bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-T (v0 ? b[3] : "", bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
+T (v0 ? b[1] : "", bsz + 1);
+T (v0 ? b[2] : "", bsz + 1);
+T (v0 ? b[3] : "", bsz + 1);
T (v0 ? "" : b[i0], bsz);
T (v0 ? "" : b[i1], bsz);
@@ -167,11 +168,11 @@ T (v0 ? b[i3] : "", bsz);
T (v0 ? "" : b[i0], bsz + 1);
T (v0 ? "" : b[i1], bsz + 1);
T (v0 ? "" : b[i2], bsz + 1);
-T (v0 ? "" : b[i3], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" "pr86937" } */
+T (v0 ? "" : b[i3], bsz + 1);
T (v0 ? b[i0] : "", bsz + 1);
T (v0 ? b[i1] : "", bsz + 1);
T (v0 ? b[i2] : "", bsz + 1);
-T (v0 ? b[i3] : "", bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" "pr86937" } */
+T (v0 ? b[i3] : "", bsz + 1);
T (v0 ? "1234" : b[3], bsz);
T (v0 ? "1234" : b[i3], bsz);
@@ -183,15 +184,17 @@ T (v0 ? b[0] : b[2], bsz);
T (v0 ? b[2] : b[3], bsz);
T (v0 ? b[3] : b[2], bsz);
-T (v0 ? "1234" : b[3], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-T (v0 ? "1234" : b[i3], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-T (v0 ? b[3] : "1234", bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-T (v0 ? b[i3] : "1234", bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-
-T (v0 ? a : b[3], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-T (v0 ? b[0] : b[2], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-T (v0 ? b[2] : b[3], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
-T (v0 ? b[3] : b[2], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" } */
+T (v0 ? "1234" : b[3], bsz + 1);
+T (v0 ? "1234" : b[i3], bsz + 1);
+T (v0 ? b[3] : "1234", bsz + 1);
+T (v0 ? b[i3] : "1234", bsz + 1);
+
+/* That the following are not diagnosed is a bug/limitation resulting from
+ the fix for PR 103215. */
+T (v0 ? a : b[3], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" "pr103215" { xfail *-*-* } } */
+T (v0 ? b[0] : b[2], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" "pr103215" { xfail *-*-* } } */
+T (v0 ? b[2] : b[3], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" "pr103215" { xfail *-*-* } } */
+T (v0 ? b[3] : b[2], bsz + 1); /* { dg-warning "bound 6 exceeds source size 5" "pr103215" { xfail *-*-* } } */
struct A { char a[5], b[5]; };
diff --git a/gcc/testsuite/gcc.dg/weak/weak-3.c b/gcc/testsuite/gcc.dg/weak/weak-3.c
index a719848..5fdf029 100644
--- a/gcc/testsuite/gcc.dg/weak/weak-3.c
+++ b/gcc/testsuite/gcc.dg/weak/weak-3.c
@@ -55,7 +55,7 @@ void * foo1e (void)
extern void * ffoo1f (void);
void * foo1f (void)
{
- if (ffoo1f) /* { dg-warning "" } */
+ if (ffoo1f) /* { dg-warning "-Waddress" } */
ffoo1f ();
return 0;
}
@@ -68,7 +68,9 @@ void * ffoox1g (void) { return (void *)0; }
extern void * ffoo1g (void) __attribute__((weak, alias ("ffoox1g")));
void * foo1g (void)
{
- if (ffoo1g)
+ /* ffoo1g is a weak alias for a symbol defined in this file, expect
+ a -Waddress for the test (which is folded to true). */
+ if (ffoo1g) // { dg-warning "-Waddress" }
ffoo1g ();
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/weak/weak.exp b/gcc/testsuite/gcc.dg/weak/weak.exp
index c4359e9..794bd88 100644
--- a/gcc/testsuite/gcc.dg/weak/weak.exp
+++ b/gcc/testsuite/gcc.dg/weak/weak.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/wrapped-binop-simplify.c b/gcc/testsuite/gcc.dg/wrapped-binop-simplify.c
index a5d953b..706eed8 100644
--- a/gcc/testsuite/gcc.dg/wrapped-binop-simplify.c
+++ b/gcc/testsuite/gcc.dg/wrapped-binop-simplify.c
@@ -1,6 +1,6 @@
/* { dg-do compile { target { { i?86-*-* x86_64-*-* s390*-*-* } && lp64 } } } */
/* { dg-options "-O2 -fdump-tree-vrp2-details" } */
-/* { dg-final { scan-tree-dump-times "gimple_simplified to" 4 "vrp2" } } */
+/* { dg-final { scan-tree-dump-times "gimple_simplified to" 1 "vrp2" } } */
void v1 (unsigned long *in, unsigned long *out, unsigned int n)
{
diff --git a/gcc/testsuite/gcc.misc-tests/acker1.exp b/gcc/testsuite/gcc.misc-tests/acker1.exp
index 8784663..376af20 100644
--- a/gcc/testsuite/gcc.misc-tests/acker1.exp
+++ b/gcc/testsuite/gcc.misc-tests/acker1.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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 24eb5e1..e2c588a 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2022 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 708dc6c..431b66f 100644
--- a/gcc/testsuite/gcc.misc-tests/bprob.exp
+++ b/gcc/testsuite/gcc.misc-tests/bprob.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2022 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 383688e..63244d3 100644
--- a/gcc/testsuite/gcc.misc-tests/dectest.exp
+++ b/gcc/testsuite/gcc.misc-tests/dectest.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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 c965f36..cca4139 100644
--- a/gcc/testsuite/gcc.misc-tests/dhry.exp
+++ b/gcc/testsuite/gcc.misc-tests/dhry.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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.exp b/gcc/testsuite/gcc.misc-tests/gcov.exp
index c2e2c58..82376d9 100644
--- a/gcc/testsuite/gcc.misc-tests/gcov.exp
+++ b/gcc/testsuite/gcc.misc-tests/gcov.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/godump-1.c b/gcc/testsuite/gcc.misc-tests/godump-1.c
index d37ab0b..95dabdc 100644
--- a/gcc/testsuite/gcc.misc-tests/godump-1.c
+++ b/gcc/testsuite/gcc.misc-tests/godump-1.c
@@ -501,10 +501,10 @@ struct { struct { uint8_t ca[3]; } s; uint32_t i; } sn;
/* { dg-final { scan-file godump-1.out "(?n)^var _sn struct \{ s struct \{ ca \\\[2\\+1\\\]uint8; \}; i uint32; \}$" } } */
typedef struct { struct { uint8_t a; uint16_t s; }; uint8_t b; } tsn_anon;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tsn_anon struct \{ a uint8; s uint16; b uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]int16; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tsn_anon struct \{ a uint8; s uint16; b uint8; Godump_0_pad \\\[.\\\]byte; _ \\\[0\\\]int16; \}$" } } */
struct { struct { uint8_t a; uint16_t s; }; uint8_t b; } sn_anon;
-/* { dg-final { scan-file godump-1.out "(?n)^var _sn_anon struct \{ a uint8; s uint16; b uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]int16; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _sn_anon struct \{ a uint8; s uint16; b uint8; Godump_0_pad \\\[.\\\]byte; _ \\\[0\\\]int16; \}$" } } */
/*** structs with bitfields ***/
@@ -575,16 +575,16 @@ struct { uint8_t bf : 8; uint8_t c; } sbf_pad8_3;
/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad8_3 struct \{ bf uint8; c uint8; \}$" } } */
typedef struct { uint16_t bf : 1; uint8_t c; } tsbf_pad16_1;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad16_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_align \\\[0\\\]int16; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad16_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; _ \\\[0\\\]int16; \}$" } } */
struct { uint16_t bf : 1; uint8_t c; } sbf_pad16_1;
-/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad16_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_align \\\[0\\\]int16; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad16_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; _ \\\[0\\\]int16; \}$" } } */
typedef struct { uint16_t bf : 15; uint8_t c; } tsbf_pad16_2;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad16_2 struct \{ Godump_0_pad \\\[2\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int16; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad16_2 struct \{ Godump_0_pad \\\[2\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; _ \\\[0\\\]int16; \}$" } } */
struct { uint16_t bf : 15; uint8_t c; } sbf_pad16_2;
-/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad16_2 struct \{ Godump_0_pad \\\[2\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int16; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad16_2 struct \{ Godump_0_pad \\\[2\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; _ \\\[0\\\]int16; \}$" } } */
typedef struct { uint16_t bf : 16; uint8_t c; } tsbf_pad16_3;
/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad16_3 struct \{ bf uint16; c uint8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
@@ -593,16 +593,16 @@ struct { uint16_t bf : 16; uint8_t c; } sbf_pad16_3;
/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad16_3 struct \{ bf uint16; c uint8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
typedef struct { uint32_t bf : 1; uint8_t c; } tsbf_pad32_1;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad32_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int32; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad32_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; _ \\\[0\\\]int32; \}$" } } */
struct { uint32_t bf : 1; uint8_t c; } sbf_pad32_1;
-/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad32_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int32; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad32_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; _ \\\[0\\\]int32; \}$" } } */
typedef struct { uint32_t bf : 31; uint8_t c; } tsbf_pad32_2;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad32_2 struct \{ Godump_0_pad \\\[4\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int32; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad32_2 struct \{ Godump_0_pad \\\[4\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; _ \\\[0\\\]int32; \}$" } } */
struct { uint32_t bf : 31; uint8_t c; } sbf_pad32_2;
-/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad32_2 struct \{ Godump_0_pad \\\[4\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int32; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad32_2 struct \{ Godump_0_pad \\\[4\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; _ \\\[0\\\]int32; \}$" } } */
typedef struct { uint32_t bf : 32; uint8_t c; } tsbf_pad32_3;
/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad32_3 struct \{ bf uint32; c uint8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
@@ -611,16 +611,16 @@ struct { uint32_t bf : 32; uint8_t c; } sbf_pad32_3;
/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad32_3 struct \{ bf uint32; c uint8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
typedef struct { uint64_t bf : 1; uint8_t c; } tsbf_pad64_1;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad64_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int64; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad64_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; _ \\\[0\\\]int64; \}$" } } */
struct { uint64_t bf : 1; uint8_t c; } sbf_pad64_1;
-/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad64_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int64; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad64_1 struct \{ Godump_0_pad \\\[1\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; _ \\\[0\\\]int64; \}$" } } */
typedef struct { uint64_t bf : 63; uint8_t c; } tsbf_pad64_2;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad64_2 struct \{ Godump_0_pad \\\[8\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int64; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad64_2 struct \{ Godump_0_pad \\\[8\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; _ \\\[0\\\]int64; \}$" } } */
struct { uint64_t bf : 63; uint8_t c; } sbf_pad64_2;
-/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad64_2 struct \{ Godump_0_pad \\\[8\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; Godump_2_align \\\[0\\\]int64; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_pad64_2 struct \{ Godump_0_pad \\\[8\\\]byte; c uint8; Godump_1_pad \\\[.\\\]byte; _ \\\[0\\\]int64; \}$" } } */
typedef struct { uint64_t bf : 64; uint8_t c; } tsbf_pad64_3;
/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_pad64_3 struct \{ bf uint\[0-9\]*; c uint8; Godump_0_pad \\\[.\\\]byte; \}$" } } */
@@ -680,7 +680,7 @@ struct
uint32_t bf3 : 12;
uint16_t s;
} sbf_gaps;
-/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_gaps struct \{ bf1 uint8; c uint8; bf2 uint8; Godump_0_pad \\\[2\\\]byte; s uint16; Godump_1_align \\\[0\\\]int32; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _sbf_gaps struct \{ bf1 uint8; c uint8; bf2 uint8; Godump_0_pad \\\[2\\\]byte; s uint16; _ \\\[0\\\]int32; \}$" } } */
typedef struct
{
@@ -690,7 +690,7 @@ typedef struct
uint32_t bf3 : 12;
uint16_t s;
} tsbf_gaps;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_gaps struct \{ bf1 uint8; c uint8; bf2 uint8; Godump_0_pad \\\[2\\\]byte; s uint16; Godump_1_align \\\[0\\\]int32; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tsbf_gaps struct \{ bf1 uint8; c uint8; bf2 uint8; Godump_0_pad \\\[2\\\]byte; s uint16; _ \\\[0\\\]int32; \}$" } } */
typedef struct
{
@@ -708,7 +708,7 @@ typedef struct
};
} u;
} ts_nested;
-/* { dg-final { scan-file godump-1.out "(?n)^type _ts_nested struct \{ u struct \{ s int16; Godump_0_pad \\\[2\\\]byte; Godump_1_align \\\[0\\\]u?int32; \}; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _ts_nested struct \{ u struct \{ s int16; Godump_0_pad \\\[2\\\]byte; _ \\\[0\\\]u?int32; \}; \}$" } } */
struct
{
@@ -726,7 +726,7 @@ struct
};
} u;
} s_nested;
-/* { dg-final { scan-file godump-1.out "(?n)^var _s_nested struct \{ u struct \{ s int16; Godump_0_pad \\\[2\\\]byte; Godump_1_align \\\[0\\\]u?int32; \}; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _s_nested struct \{ u struct \{ s int16; Godump_0_pad \\\[2\\\]byte; _ \\\[0\\\]u?int32; \}; \}$" } } */
typedef struct
{
@@ -744,7 +744,7 @@ typedef struct
};
} u;
} ts_nested2;
-/* { dg-final { scan-file godump-1.out "(?n)^type _ts_nested2 struct \{ u struct \{ Godump_0_pad \\\[4\\\]byte; Godump_1_pad \\\[2\\\]byte; s int16; c int8; Godump_2_pad \\\[1\\\]byte; Godump_3_pad \\\[2\\\]byte; Godump_4_align \\\[0\\\]u?int32; \}; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _ts_nested2 struct \{ u struct \{ Godump_0_pad \\\[4\\\]byte; Godump_1_pad \\\[2\\\]byte; s int16; c int8; Godump_2_pad \\\[1\\\]byte; Godump_3_pad \\\[2\\\]byte; _ \\\[0\\\]u?int32; \}; \}$" } } */
struct
{
@@ -762,7 +762,7 @@ struct
};
} u;
} s_nested2;
-/* { dg-final { scan-file godump-1.out "(?n)^var _s_nested2 struct \{ u struct \{ Godump_0_pad \\\[4\\\]byte; Godump_1_pad \\\[2\\\]byte; s int16; c int8; Godump_2_pad \\\[1\\\]byte; Godump_3_pad \\\[2\\\]byte; Godump_4_align \\\[0\\\]u?int32; \}; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _s_nested2 struct \{ u struct \{ Godump_0_pad \\\[4\\\]byte; Godump_1_pad \\\[2\\\]byte; s int16; c int8; Godump_2_pad \\\[1\\\]byte; Godump_3_pad \\\[2\\\]byte; _ \\\[0\\\]u?int32; \}; \}$" } } */
/*** unions ***/
@@ -780,10 +780,10 @@ union u_t_idem_v2 { };
/* { dg-final { scan-file godump-1.out "(?n)^type _u_t_idem_v2 struct \{ \}$" } } */
typedef union { uint8_t c; uint64_t l; } tu1;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tu1 struct \{ c uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tu1 struct \{ c uint8; Godump_0_pad \\\[.\\\]byte; _ \\\[0\\\]u?int64; \}$" } } */
union { uint8_t c; uint64_t l; } u1;
-/* { dg-final { scan-file godump-1.out "(?n)^var _u1 struct \{ c uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _u1 struct \{ c uint8; Godump_0_pad \\\[.\\\]byte; _ \\\[0\\\]u?int64; \}$" } } */
typedef union { uint64_t l; uint8_t c; } tu2;
/* { dg-final { scan-file godump-1.out "(?n)^type _tu2 struct \{ l uint64; \}$" } } */
@@ -798,16 +798,16 @@ union { uint64_t l[3]; uint8_t c; } u3;
/* { dg-final { scan-file godump-1.out "(?n)^var _u3 struct \{ l \\\[2\\+1\\\]uint64; \}$" } } */
typedef struct { union { uint8_t c; uint64_t l; }; } tsu_anon;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tsu_anon struct \{ c uint8; Godump_0_pad \\\[7\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tsu_anon struct \{ c uint8; Godump_0_pad \\\[7\\\]byte; _ \\\[0\\\]u?int64; \}$" } } */
struct { union { uint8_t c; uint64_t l; }; } su_anon;
-/* { dg-final { scan-file godump-1.out "(?n)^var _su_anon struct \{ c uint8; Godump_0_pad \\\[7\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _su_anon struct \{ c uint8; Godump_0_pad \\\[7\\\]byte; _ \\\[0\\\]u?int64; \}$" } } */
typedef union { uint64_t bf : 1; uint8_t ca[5]; } tu_size;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tu_size struct \{ ca \\\[4\\+1\\\]uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tu_size struct \{ ca \\\[4\\+1\\\]uint8; Godump_0_pad \\\[.\\\]byte; _ \\\[0\\\]u?int64; \}$" } } */
union { uint64_t bf : 1; uint8_t ca[5]; } u_size;
-/* { dg-final { scan-file godump-1.out "(?n)^var _u_size struct \{ ca \\\[4\\+1\\\]uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _u_size struct \{ ca \\\[4\\+1\\\]uint8; Godump_0_pad \\\[.\\\]byte; _ \\\[0\\\]u?int64; \}$" } } */
typedef union { uint64_t : 1; uint8_t ca[5]; } tu2_size;
/* { dg-final { scan-file godump-1.out "(?n)^type _tu2_size struct \{ ca \\\[4\\+1\\\]uint8; \}$" } } */
@@ -818,10 +818,10 @@ union { uint64_t : 1; uint8_t ca[5]; } u2_size;
typedef union u_undef_t u_undef_t2;
typedef union { uint64_t b : 1; uint8_t ca[5]; } tu3_size;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tu3_size struct \{ ca \\\[4\\+1\\\]uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tu3_size struct \{ ca \\\[4\\+1\\\]uint8; Godump_0_pad \\\[.\\\]byte; _ \\\[0\\\]u?int64; \}$" } } */
union { uint64_t b : 1; uint8_t ca[5]; } u3_size;
-/* { dg-final { scan-file godump-1.out "(?n)^var _u3_size struct \{ ca \\\[4\\+1\\\]uint8; Godump_0_pad \\\[.\\\]byte; Godump_1_align \\\[0\\\]u?int64; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _u3_size struct \{ ca \\\[4\\+1\\\]uint8; Godump_0_pad \\\[.\\\]byte; _ \\\[0\\\]u?int64; \}$" } } */
typedef union
{
@@ -839,7 +839,7 @@ typedef union
};
} u;
} tu_nested;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tu_nested struct \{ u struct \{ s int16; Godump_0_pad \\\[2\\\]byte; Godump_1_align \\\[0\\\]u?int32; \}; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tu_nested struct \{ u struct \{ s int16; Godump_0_pad \\\[2\\\]byte; _ \\\[0\\\]u?int32; \}; \}$" } } */
union
{
@@ -857,7 +857,7 @@ union
};
} u;
} u_nested;
-/* { dg-final { scan-file godump-1.out "(?n)^var _u_nested struct \{ u struct \{ s int16; Godump_0_pad \\\[2\\\]byte; Godump_1_align \\\[0\\\]u?int32; \}; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _u_nested struct \{ u struct \{ s int16; Godump_0_pad \\\[2\\\]byte; _ \\\[0\\\]u?int32; \}; \}$" } } */
typedef union
{
@@ -875,7 +875,7 @@ typedef union
};
} u;
} tu_nested2;
-/* { dg-final { scan-file godump-1.out "(?n)^type _tu_nested2 struct \{ u struct \{ Godump_0_pad \\\[4\\\]byte; Godump_1_pad \\\[2\\\]byte; s int16; c int8; Godump_2_pad \\\[1\\\]byte; Godump_3_pad \\\[2\\\]byte; Godump_4_align \\\[0\\\]u?int32; \}; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _tu_nested2 struct \{ u struct \{ Godump_0_pad \\\[4\\\]byte; Godump_1_pad \\\[2\\\]byte; s int16; c int8; Godump_2_pad \\\[1\\\]byte; Godump_3_pad \\\[2\\\]byte; _ \\\[0\\\]u?int32; \}; \}$" } } */
union
{
@@ -893,7 +893,7 @@ union
};
} u;
} u_nested2;
-/* { dg-final { scan-file godump-1.out "(?n)^var _u_nested2 struct \{ u struct \{ Godump_0_pad \\\[4\\\]byte; Godump_1_pad \\\[2\\\]byte; s int16; c int8; Godump_2_pad \\\[1\\\]byte; Godump_3_pad \\\[2\\\]byte; Godump_4_align \\\[0\\\]u?int32; \}; \}$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _u_nested2 struct \{ u struct \{ Godump_0_pad \\\[4\\\]byte; Godump_1_pad \\\[2\\\]byte; s int16; c int8; Godump_2_pad \\\[1\\\]byte; Godump_3_pad \\\[2\\\]byte; _ \\\[0\\\]u?int32; \}; \}$" } } */
/*** functions ***/
diff --git a/gcc/testsuite/gcc.misc-tests/godump.exp b/gcc/testsuite/gcc.misc-tests/godump.exp
index ee61dc6..90317bf 100644
--- a/gcc/testsuite/gcc.misc-tests/godump.exp
+++ b/gcc/testsuite/gcc.misc-tests/godump.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2021 Free Software Foundation, Inc.
+# Copyright (C) 2014-2022 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 eb6d868..8dffdcd 100644
--- a/gcc/testsuite/gcc.misc-tests/help.exp
+++ b/gcc/testsuite/gcc.misc-tests/help.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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/i386-prefetch.exp b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
index dfd8d6c..0d65729 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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 2cb109e..c955332 100644
--- a/gcc/testsuite/gcc.misc-tests/linkage.exp
+++ b/gcc/testsuite/gcc.misc-tests/linkage.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1988-2021 Free Software Foundation, Inc.
+# Copyright (C) 1988-2022 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/matrix1.exp b/gcc/testsuite/gcc.misc-tests/matrix1.exp
index 6afeae3..8db1065 100644
--- a/gcc/testsuite/gcc.misc-tests/matrix1.exp
+++ b/gcc/testsuite/gcc.misc-tests/matrix1.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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 646a8b4..2a2fbce 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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 480e3a5..2feb6ba 100644
--- a/gcc/testsuite/gcc.misc-tests/mg.exp
+++ b/gcc/testsuite/gcc.misc-tests/mg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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 718bd5d..c939aef 100644
--- a/gcc/testsuite/gcc.misc-tests/options.exp
+++ b/gcc/testsuite/gcc.misc-tests/options.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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
@@ -79,7 +79,7 @@ proc get_dump_flags {} {
set res [list]
global srcdir
- set file "$srcdir/../dumpfile.c"
+ set file "$srcdir/../dumpfile.cc"
set a [open $file]
set lines [split [read $a] "\n"]
diff --git a/gcc/testsuite/gcc.misc-tests/output.exp b/gcc/testsuite/gcc.misc-tests/output.exp
index a74f804..1b08a57 100644
--- a/gcc/testsuite/gcc.misc-tests/output.exp
+++ b/gcc/testsuite/gcc.misc-tests/output.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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/outputs.exp b/gcc/testsuite/gcc.misc-tests/outputs.exp
index b2dd088..bc1fbe4 100644
--- a/gcc/testsuite/gcc.misc-tests/outputs.exp
+++ b/gcc/testsuite/gcc.misc-tests/outputs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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 c04499d..f6fd99d 100644
--- a/gcc/testsuite/gcc.misc-tests/sieve.exp
+++ b/gcc/testsuite/gcc.misc-tests/sieve.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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 6226849..14a846f 100644
--- a/gcc/testsuite/gcc.misc-tests/sort2.exp
+++ b/gcc/testsuite/gcc.misc-tests/sort2.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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.src/maintainers.exp b/gcc/testsuite/gcc.src/maintainers.exp
index 62aa738..045f7ec 100644
--- a/gcc/testsuite/gcc.src/maintainers.exp
+++ b/gcc/testsuite/gcc.src/maintainers.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2021 Free Software Foundation, Inc.
+# Copyright (C) 2018-2022 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
@@ -14,22 +14,33 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
-load_lib "gcc-defs.exp"
+load_lib "target-supports.exp"
proc gcc_src_run_maintainers_verify_sh {} {
- set script maintainers-verify.sh
+ set script check-MAINTAINERS.py
global srcdir
set rootdir $srcdir/../..
set contrib $rootdir/contrib
-
set maintainers $rootdir/MAINTAINERS
- set verify_output [exec $contrib/$script $maintainers]
- if { "$verify_output" == "" } {
+ if { ![check_effective_target_recent_python3] } {
+ unsupported "$script recent python3 is missing"
+ return
+ }
+
+ if { ![check_effective_target_python3_module "unidecode"] } {
+ unsupported "$script 'unidecode' python3 module is missing"
+ return
+ }
+
+
+ set result [remote_exec host $contrib/$script $maintainers]
+ set status [lindex $result 0]
+ if { $status == 0 } then {
pass "$script"
} else {
- send_log "$verify_output\n"
+ send_log "$result\n"
fail "$script"
}
}
@@ -40,4 +51,3 @@ if ![gcc_parallel_test_run_p maintainers] {
gcc_parallel_test_enable 0
gcc_src_run_maintainers_verify_sh
gcc_parallel_test_enable 1
-
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp b/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp
index 0a74c35..3e652c4 100644
--- a/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
# Contributed by ARM Ltd.
#
# This file is part of GCC.
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/macro-def.h b/gcc/testsuite/gcc.target/aarch64/aapcs64/macro-def.h
index 72a4706..e681de6 100644
--- a/gcc/testsuite/gcc.target/aarch64/aapcs64/macro-def.h
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/macro-def.h
@@ -63,7 +63,7 @@
#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
+ by the caller, so here we extract the pointer, deref it and compare the
content with that of the original one. */
#define PTR(type, val, offset, ...) { \
type * ptr; \
diff --git a/gcc/testsuite/gcc.target/aarch64/aarch64.exp b/gcc/testsuite/gcc.target/aarch64/aarch64.exp
index e5a530d..0a2732a 100644
--- a/gcc/testsuite/gcc.target/aarch64/aarch64.exp
+++ b/gcc/testsuite/gcc.target/aarch64/aarch64.exp
@@ -1,5 +1,5 @@
# Specific regression driver for AArch64.
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
# Contributed by ARM Ltd.
#
# This file is part of GCC.
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/acle.exp b/gcc/testsuite/gcc.target/aarch64/acle/acle.exp
index 1a17990..96e8ff7 100644
--- a/gcc/testsuite/gcc.target/aarch64/acle/acle.exp
+++ b/gcc/testsuite/gcc.target/aarch64/acle/acle.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2021 Free Software Foundation, Inc.
+# Copyright (C) 2014-2022 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/acle/ls64_asm.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_asm.c
new file mode 100644
index 0000000..ba9960c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_asm.c
@@ -0,0 +1,58 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O2" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+/* Inline assembly for LS64 instructions. */
+
+#include <arm_acle.h>
+
+void
+ls64_load (data512_t *output, const void *addr)
+{
+ __asm__ volatile ("ld64b %0, [%1]"
+ : "=r" (*output)
+ : "r" (addr)
+ : "memory");
+}
+
+/* { dg-final { scan-assembler-times {ld64b } 1 } } */
+
+void
+ls64_store (const data512_t *input, void *addr)
+{
+ __asm__ volatile ("st64b %1, [%0]"
+ : /* No outputs. */
+ : "r" (addr), "r" (*input)
+ : "memory");
+}
+
+/* { dg-final { scan-assembler-times {st64b } 1 } } */
+
+uint64_t
+ls64_store_v (const data512_t *input, void *addr)
+{
+ uint64_t status;
+ __asm__ volatile ("st64bv %0, %2, [%1]"
+ : "=r" (status)
+ : "r" (addr), "r" (*input)
+ : "memory");
+ return status;
+}
+
+/* { dg-final { scan-assembler-times {st64bv } 1 } } */
+
+uint64_t
+ls64_store_v0 (const data512_t *input, void *addr)
+{
+ uint64_t status;
+ __asm__ volatile ("st64bv0 %0, %2, [%1]"
+ : "=r" (status)
+ : "r" (addr), "r" (*input)
+ : "memory");
+ return status;
+}
+
+/* { dg-final { scan-assembler-times {st64bv0 } 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/ls64_ld64b-2.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_ld64b-2.c
new file mode 100644
index 0000000..2a94657
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_ld64b-2.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O2" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+#include <arm_acle.h>
+
+void
+func (const void * addr) {
+ data512_t ret = __arm_ld64b (addr);
+}
+
+/* { dg-final { scan-assembler-times {ld64b\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/ls64_ld64b-3.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_ld64b-3.c
new file mode 100644
index 0000000..155ea40
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_ld64b-3.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O2" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+#include <arm_acle.h>
+
+void
+func(const void * addr, data512_t *data) {
+ *data = __arm_ld64b (addr);
+}
+
+/* { dg-final { scan-assembler-times {ld64b\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/ls64_ld64b.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_ld64b.c
new file mode 100644
index 0000000..e3fc141
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_ld64b.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O2" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+#include <arm_acle.h>
+
+data512_t
+func(const void * addr) {
+ return __arm_ld64b (addr);
+}
+
+/* { dg-final { scan-assembler-times {ld64b\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/ls64_ld_st_o0.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_ld_st_o0.c
new file mode 100644
index 0000000..550d75c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_ld_st_o0.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O0" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+#include <arm_acle.h>
+
+/* Make sure no issues when compile with -O0. */
+
+data512_t
+func1 (const void * addr) {
+ return __arm_ld64b (addr);
+}
+
+void
+func2 (void *addr, data512_t value) {
+ __arm_st64b (addr, value);
+}
+
+uint64_t
+func3 (void *addr, data512_t value) {
+ return __arm_st64bv (addr, value);
+}
+
+uint64_t
+func4 (void *addr, data512_t value) {
+ return __arm_st64bv0 (addr, value);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64b-2.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64b-2.c
new file mode 100644
index 0000000..bfd737b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64b-2.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O2" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+#include <arm_acle.h>
+
+void
+func(void *addr, data512_t *value) {
+ __arm_st64b (addr, *value);
+}
+
+/* { dg-final { scan-assembler-times {st64b\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64b.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64b.c
new file mode 100644
index 0000000..75b9180
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64b.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O2" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+#include <arm_acle.h>
+
+void
+func(void *addr, data512_t value) {
+ __arm_st64b (addr, value);
+}
+
+/* { dg-final { scan-assembler-times {st64b\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv-2.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv-2.c
new file mode 100644
index 0000000..c3ef83e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv-2.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O2" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+#include <arm_acle.h>
+
+void
+func(void *addr, data512_t value) {
+ __arm_st64bv (addr, value);
+}
+
+/* { dg-final { scan-assembler-times {st64bv\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv-3.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv-3.c
new file mode 100644
index 0000000..370db79
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv-3.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O2" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+#include <arm_acle.h>
+
+void
+func(void *addr, data512_t *value) {
+ __arm_st64bv (addr, *value);
+}
+
+/* { dg-final { scan-assembler-times {st64bv\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv.c
new file mode 100644
index 0000000..52ef9c4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O2" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+#include <arm_acle.h>
+
+uint64_t
+func(void *addr, data512_t value) {
+ return __arm_st64bv (addr, value);
+}
+
+/* { dg-final { scan-assembler-times {st64bv\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv0-2.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv0-2.c
new file mode 100644
index 0000000..c49fa56
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv0-2.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O2" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+#include <arm_acle.h>
+
+void
+func(void *addr, data512_t value) {
+ __arm_st64bv0 (addr, value);
+}
+
+/* { dg-final { scan-assembler-times {st64bv0\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv0-3.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv0-3.c
new file mode 100644
index 0000000..af6917c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv0-3.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O2" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+#include <arm_acle.h>
+
+void
+func(void *addr, data512_t *value) {
+ __arm_st64bv0 (addr, *value);
+}
+
+/* { dg-final { scan-assembler-times {st64bv0\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv0.c b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv0.c
new file mode 100644
index 0000000..bce10ae
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/acle/ls64_st64bv0.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+ls64 -O2" } */
+
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+
+#include <arm_acle.h>
+
+uint64_t
+func(void *addr, data512_t value) {
+ return __arm_st64bv0 (addr, value);
+}
+
+/* { dg-final { scan-assembler-times {st64bv0\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp
index ed3fbe8..c3a95ff 100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2021 Free Software Foundation, Inc.
+# Copyright (C) 2014-2022 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/advsimd-intrinsics/bf16_vldN_lane_2.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bf16_vldN_lane_2.c
index 670cf0b..87b5fc3 100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bf16_vldN_lane_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bf16_vldN_lane_2.c
@@ -17,7 +17,7 @@ test_vld2q_lane_bf16 (const bfloat16_t *ptr, bfloat16x8x2_t b)
return vld2q_lane_bf16 (ptr, b, 2);
}
-/* { dg-final { scan-assembler-times "ld2\\t{v2.h - v3.h}\\\[2\\\], \\\[x0\\\]" 2 } } */
+/* { dg-final { scan-assembler-times "ld2\\t{v\[0-9\]+.h - v\[0-9\]+.h}\\\[2\\\], \\\[x0\\\]" 2 } } */
bfloat16x4x3_t
test_vld3_lane_bf16 (const bfloat16_t *ptr, bfloat16x4x3_t b)
@@ -25,15 +25,13 @@ test_vld3_lane_bf16 (const bfloat16_t *ptr, bfloat16x4x3_t b)
return vld3_lane_bf16 (ptr, b, 2);
}
-/* { dg-final { scan-assembler-times "ld3\t{v4.h - v6.h}\\\[2\\\], \\\[x0\\\]" 1 } } */
-
bfloat16x8x3_t
test_vld3q_lane_bf16 (const bfloat16_t *ptr, bfloat16x8x3_t b)
{
return vld3q_lane_bf16 (ptr, b, 2);
}
-/* { dg-final { scan-assembler-times "ld3\t{v1.h - v3.h}\\\[2\\\], \\\[x0\\\]" 1 } } */
+/* { dg-final { scan-assembler-times "ld3\t{v\[0-9\]+.h - v\[0-9\]+.h}\\\[2\\\], \\\[x0\\\]" 2 } } */
bfloat16x4x4_t
test_vld4_lane_bf16 (const bfloat16_t *ptr, bfloat16x4x4_t b)
@@ -41,12 +39,10 @@ test_vld4_lane_bf16 (const bfloat16_t *ptr, bfloat16x4x4_t b)
return vld4_lane_bf16 (ptr, b, 2);
}
-/* { dg-final { scan-assembler-times "ld4\t{v4.h - v7.h}\\\[2\\\], \\\[x0\\\]" 1 } } */
-
bfloat16x8x4_t
test_vld4q_lane_bf16 (const bfloat16_t *ptr, bfloat16x8x4_t b)
{
return vld4q_lane_bf16 (ptr, b, 2);
}
-/* { dg-final { scan-assembler-times "ld4\t{v0.h - v3.h}\\\[2\\\], \\\[x0\\\]" 1 } } */
+/* { dg-final { scan-assembler-times "ld4\t{v\[0-9\]+.h - v\[0-9\]+.h}\\\[2\\\], \\\[x0\\\]" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-1.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-1.c
index ad51507..ad51507 100755..100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-1.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-1.c
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c
index ae0a953..ae0a953 100755..100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-3.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-3.c
index 6071262..6071262 100755..100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-3.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-3.c
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-1.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-1.c
new file mode 100644
index 0000000..4bc3aa9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { aarch64*-*-* } } } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
+
+#include <arm_neon.h>
+
+uint8x16_t foo (uint32x4_t a, uint32x4_t b)
+{
+ uint16x4_t a1 = vrshrn_n_u32 (a, 16);
+ uint16x8_t b1 = vrshrn_high_n_u32 (a1, b, 16);
+ return vrshrn_high_n_u16 (vrshrn_n_u16 (b1, 8), b1, 8);
+}
+
+/* { dg-final { scan-assembler-times {\tmovi\t} 1 } } */
+/* { dg-final { scan-assembler-times {\traddhn\t} 2 } } */
+/* { dg-final { scan-assembler-times {\traddhn2\t} 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-2.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-2.c
new file mode 100644
index 0000000..09d913e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { aarch64*-*-* } } } */
+
+#include <arm_neon.h>
+
+uint32x4_t foo (uint64x2_t a, uint64x2_t b)
+{
+ return vrshrn_high_n_u64 (vrshrn_n_u64 (a, 32), b, 32);
+}
+
+/* { dg-final { scan-assembler-times {\traddhn\t} 1 } } */
+/* { dg-final { scan-assembler-times {\traddhn2\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-3.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-3.c
new file mode 100644
index 0000000..bdccbb3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-3.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { aarch64*-*-* } } } */
+
+#include <arm_neon.h>
+
+uint16x8_t foo (uint32x4_t a, uint32x4_t b)
+{
+ return vrshrn_high_n_u32 (vrshrn_n_u32 (a, 16), b, 16);
+}
+
+/* { dg-final { scan-assembler-times {\traddhn\t} 1 } } */
+/* { dg-final { scan-assembler-times {\traddhn2\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-4.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-4.c
new file mode 100644
index 0000000..4b23edd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/shrn-4.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { aarch64*-*-* } } } */
+
+#include <arm_neon.h>
+
+uint8x16_t foo (uint16x8_t a, uint16x8_t b)
+{
+ return vrshrn_high_n_u16 (vrshrn_n_u16 (a, 8), b, 8);
+}
+
+/* { dg-final { scan-assembler-times {\traddhn\t} 1 } } */
+/* { dg-final { scan-assembler-times {\traddhn2\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c
index ac4f821..ac4f821 100755..100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c
index 61c7c51..61c7c51 100755..100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-3.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-3.c
index 18ecabe..18ecabe 100755..100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-3.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-3.c
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-4.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-4.c
index 66c87d4..66c87d4 100755..100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-4.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-4.c
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-1.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-1.c
new file mode 100644
index 0000000..6baed3a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-1.c
@@ -0,0 +1,11 @@
+/* { dg-do assemble { target aarch64*-*-* } } */
+/* { dg-additional-options "--save-temps" } */
+
+#include <arm_neon.h>
+
+uint8x8_t foo (uint8x8_t a)
+{
+ return vshr_n_u8 (a, 2);
+}
+
+/* { dg-final { scan-assembler-times {\tushr\t.+, 2} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-2.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-2.c
new file mode 100644
index 0000000..df46ae3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-2.c
@@ -0,0 +1,11 @@
+/* { dg-do assemble { target aarch64*-*-* } } */
+/* { dg-additional-options "--save-temps" } */
+
+#include <arm_neon.h>
+
+int16x8_t foo (int16x8_t a)
+{
+ return vshrq_n_s16 (a, 8);
+}
+
+/* { dg-final { scan-assembler-times {\tsshr\t.+, 8} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-3.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-3.c
new file mode 100644
index 0000000..86fcc7a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-3.c
@@ -0,0 +1,11 @@
+/* { dg-do assemble { target aarch64*-*-* } } */
+/* { dg-additional-options "--save-temps" } */
+
+#include <arm_neon.h>
+
+int16x8_t foo (int16x8_t a)
+{
+ return vshrq_n_s16 (a, 16);
+}
+
+/* { dg-final { scan-assembler-times {\tsshr\t.+, 16} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-4.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-4.c
new file mode 100644
index 0000000..11f8fec
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-4.c
@@ -0,0 +1,11 @@
+/* { dg-do assemble { target aarch64*-*-* } } */
+/* { dg-additional-options "--save-temps" } */
+
+#include <arm_neon.h>
+
+int64x1_t foo (int64x1_t a)
+{
+ return vshl_s64 (a, vdup_n_s64(80));
+}
+
+/* { dg-final { scan-assembler-times {\tsshl\t.+, d[0-9]+} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-5.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-5.c
new file mode 100644
index 0000000..e140e5f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-5.c
@@ -0,0 +1,12 @@
+/* { dg-do assemble { target aarch64*-*-* } } */
+/* { dg-additional-options "--save-temps" } */
+/* { dg-skip-if "no optimizations" { *-*-* } { "-O0" } { "" } } */
+
+#include <arm_neon.h>
+
+int64x1_t foo (int64x1_t a)
+{
+ return vshl_s64 (a, vdup_n_s64(-6));
+}
+
+/* { dg-final { scan-assembler-times {\tsshr\t.+, 6} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-6.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-6.c
new file mode 100644
index 0000000..442e316
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-6.c
@@ -0,0 +1,10 @@
+/* { dg-do assemble { target aarch64*-*-* } } */
+/* { dg-additional-options "--save-temps" } */
+
+#include <arm_neon.h>
+
+int32x4_t foo (int32x4_t x) {
+ return vshlq_s32(x, vdupq_n_s32(256));
+}
+
+/* { dg-final { scan-assembler-times {\tsshl\t.+, v[0-9].4s} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-7.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-7.c
new file mode 100644
index 0000000..20b4920
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-7.c
@@ -0,0 +1,12 @@
+/* { dg-do assemble { target aarch64*-*-* } } */
+/* { dg-additional-options "--save-temps" } */
+/* { dg-skip-if "no optimizations" { *-*-* } { "-O0" } { "" } } */
+
+#include <arm_neon.h>
+
+int32x4_t foo (int32x4_t x) {
+ return vshlq_s32(vdupq_n_s32(1), vdupq_n_s32(10));
+}
+
+/* { dg-final { scan-assembler-not {\tsshl\t} } } */
+/* { dg-final { scan-assembler-times {\tmovi\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-8.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-8.c
new file mode 100644
index 0000000..f586aa7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vshl-opt-8.c
@@ -0,0 +1,10 @@
+/* { dg-do assemble { target aarch64*-*-* } } */
+/* { dg-additional-options "--save-temps" } */
+
+#include <arm_neon.h>
+
+int32x4_t foo (int32x4_t x) {
+ return vshlq_s32(x, vdupq_n_s32(-64));
+}
+
+/* { dg-final { scan-assembler-times {\tsshl\t.+, v[0-9]+.4s} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/asm-flag-7.c b/gcc/testsuite/gcc.target/aarch64/asm-flag-7.c
new file mode 100644
index 0000000..6c31b85
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/asm-flag-7.c
@@ -0,0 +1,22 @@
+/* Test that "=@cc*" works with MEM_P RTX */
+/* PR target/102941 */
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+#ifndef __GCC_ASM_FLAG_OUTPUTS__
+#error "missing preprocessor define"
+#endif
+int test_cmpu_x;
+
+void f(long *);
+long
+test_cmpu_y() {
+ long le;
+ f(&le);
+ __asm__("cmp %"
+ "[x], %"
+ "[y]"
+ : "=@ccls"(le)
+ : [x] ""(test_cmpu_x), [y] ""(test_cmpu_y));
+ return le;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/auto-init-2.c b/gcc/testsuite/gcc.target/aarch64/auto-init-2.c
index 2c54e6d..375befd 100644
--- a/gcc/testsuite/gcc.target/aarch64/auto-init-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/auto-init-2.c
@@ -32,4 +32,4 @@ void foo()
/* { dg-final { scan-rtl-dump-times "0xfe\\\]" 1 "expand" } } */
/* { dg-final { scan-rtl-dump-times "0xfffffffffffffefe" 1 "expand" } } */
/* { dg-final { scan-rtl-dump-times "0xfffffffffefefefe" 2 "expand" } } */
-/* { dg-final { scan-rtl-dump-times "0xfefefefefefefefe" 2 "expand" } } */
+/* { dg-final { scan-rtl-dump-times "0xfefefefefefefefe" 3 "expand" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/auto-init-6.c b/gcc/testsuite/gcc.target/aarch64/auto-init-6.c
index 27c16b3..0456c66 100644
--- a/gcc/testsuite/gcc.target/aarch64/auto-init-6.c
+++ b/gcc/testsuite/gcc.target/aarch64/auto-init-6.c
@@ -1,6 +1,6 @@
/* Verify pattern initialization for complex type automatic variables. */
/* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern" } */
_Complex long double result;
@@ -15,4 +15,4 @@ _Complex long double foo()
return result;
}
-/* { dg-final { scan-rtl-dump-times "0xfffffffffffffffe\\\]\\\) repeated x16" 3 "expand" } } */
+/* { dg-final { scan-assembler-times "word\t-16843010" 14 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/bic-bitmask-1.c b/gcc/testsuite/gcc.target/aarch64/bic-bitmask-1.c
new file mode 100644
index 0000000..568c1ff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/bic-bitmask-1.c
@@ -0,0 +1,13 @@
+/* { dg-do assemble } */
+/* { dg-options "-O2 -save-temps" } */
+
+#include <arm_neon.h>
+
+uint32x4_t foo (int32x4_t a)
+{
+ int32x4_t cst = vdupq_n_s32 (255);
+ int32x4_t zero = vdupq_n_s32 (0);
+ return vceqq_s32 (vbicq_s32 (a, cst), zero);
+}
+
+/* { dg-final { scan-assembler-not {\tbic\t} { xfail { aarch64*-*-* } } } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c b/gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c
index 229ce1c..1d6e55f 100644
--- a/gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c
+++ b/gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c
@@ -4,7 +4,7 @@ void __attribute__ ((target("branch-protection=leaf")))
foo1 ()
{
}
-/* { dg-error {invalid protection type \("leaf"\) in 'target\("branch-protection="\)' pragma or attribute} "" { target *-*-* } 5 } */
+/* { dg-error {invalid protection type \('leaf'\) in 'target\("branch-protection="\)' pragma or attribute} "" { target *-*-* } 5 } */
/* { dg-error {pragma or attribute 'target\("branch-protection=leaf"\)' is not valid} "" { target *-*-* } 5 } */
void __attribute__ ((target("branch-protection=none+pac-ret")))
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/aarch64-cpunative.exp b/gcc/testsuite/gcc.target/aarch64/cpunative/aarch64-cpunative.exp
index 1a17990..96e8ff7 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/aarch64-cpunative.exp
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/aarch64-cpunative.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2021 Free Software Foundation, Inc.
+# Copyright (C) 2014-2022 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/cpymem-q-reg_1.c b/gcc/testsuite/gcc.target/aarch64/cpymem-q-reg_1.c
index df5f67e..45f3f0a 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpymem-q-reg_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/cpymem-q-reg_1.c
@@ -10,7 +10,7 @@ foo (void)
__builtin_memcpy (dst, src, N * sizeof (int));
}
-/* { dg-final { scan-assembler {ldp\tq[0-9]*} } } */
+/* { dg-final { scan-assembler {ldp\tq[0-9]*|ld1\t{v[0-9]*\.16b - v[0-9]*\.16b}} } } */
/* { dg-final { scan-assembler-not {ldp\tx[0-9]*} } } */
-/* { dg-final { scan-assembler {stp\tq[0-9]*} } } */
+/* { dg-final { scan-assembler {stp\tq[0-9]*|st1\t{v[0-9]*\.16b - v[0-9]*\.16b}} } } */
/* { dg-final { scan-assembler-not {stp\tx[0-9]*} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fmaxnm_1.c b/gcc/testsuite/gcc.target/aarch64/fmaxnm_1.c
new file mode 100644
index 0000000..40c36c7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fmaxnm_1.c
@@ -0,0 +1,24 @@
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+#pragma GCC target "+nosve"
+
+float
+f1 (float x, float *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fmaxf (x, ptr[i]);
+ return x;
+}
+
+double
+f2 (double x, double *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fmax (x, ptr[i]);
+ return x;
+}
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tv[0-9]+\.4s, v[0-9]+\.4s, v[0-9]+\.4s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnmv\ts[0-9]+, v[0-9]+\.4s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tv[0-9]+\.2d, v[0-9]+\.2d, v[0-9]+\.2d\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnmp\td[0-9]+, v[0-9]+\.2d\n} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fmaxnm_2.c b/gcc/testsuite/gcc.target/aarch64/fmaxnm_2.c
new file mode 100644
index 0000000..6e48ac8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fmaxnm_2.c
@@ -0,0 +1,20 @@
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+#pragma GCC target "+nosve"
+
+void
+f (double *restrict res, double *restrict ptr)
+{
+ double x0 = res[0];
+ double x1 = res[1];
+ for (int i = 0; i < 128; i += 2)
+ {
+ x0 = __builtin_fmax (x0, ptr[i + 0]);
+ x1 = __builtin_fmax (x1, ptr[i + 1]);
+ }
+ res[0] = x0;
+ res[1] = x1;
+}
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tv[0-9]+\.2d, v[0-9]+\.2d, v[0-9]+\.2d\n} 1 } } */
+/* { dg-final { scan-assembler {\tstr\tq[0-9]+, \[x0\]\n} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fminnm_1.c b/gcc/testsuite/gcc.target/aarch64/fminnm_1.c
new file mode 100644
index 0000000..1cf372b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fminnm_1.c
@@ -0,0 +1,24 @@
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+#pragma GCC target "+nosve"
+
+float
+f1 (float x, float *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fminf (x, ptr[i]);
+ return x;
+}
+
+double
+f2 (double x, double *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fmin (x, ptr[i]);
+ return x;
+}
+
+/* { dg-final { scan-assembler-times {\tfminnm\tv[0-9]+\.4s, v[0-9]+\.4s, v[0-9]+\.4s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnmv\ts[0-9]+, v[0-9]+\.4s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tv[0-9]+\.2d, v[0-9]+\.2d, v[0-9]+\.2d\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnmp\td[0-9]+, v[0-9]+\.2d\n} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fminnm_2.c b/gcc/testsuite/gcc.target/aarch64/fminnm_2.c
new file mode 100644
index 0000000..543e188
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fminnm_2.c
@@ -0,0 +1,20 @@
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+#pragma GCC target "+nosve"
+
+void
+f (double *restrict res, double *restrict ptr)
+{
+ double x0 = res[0];
+ double x1 = res[1];
+ for (int i = 0; i < 128; i += 2)
+ {
+ x0 = __builtin_fmin (x0, ptr[i + 0]);
+ x1 = __builtin_fmin (x1, ptr[i + 1]);
+ }
+ res[0] = x0;
+ res[1] = x1;
+}
+
+/* { dg-final { scan-assembler-times {\tfminnm\tv[0-9]+\.2d, v[0-9]+\.2d, v[0-9]+\.2d\n} 1 } } */
+/* { dg-final { scan-assembler {\tstr\tq[0-9]+, \[x0\]\n} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fmla_intrinsic_1.c b/gcc/testsuite/gcc.target/aarch64/fmla_intrinsic_1.c
index adb787a..c1aeb06 100644
--- a/gcc/testsuite/gcc.target/aarch64/fmla_intrinsic_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/fmla_intrinsic_1.c
@@ -107,10 +107,12 @@ main (int argc, char **argv)
/* vfma_lane_f64.
vfma_laneq_f64. */
-/* { dg-final { scan-assembler-times "fmadd\\td\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+" 2 } } */
+/* { dg-final { scan-assembler-times "fmadd\\td\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+" 1 { target aarch64_big_endian } } } */
+/* { dg-final { scan-assembler-times "fmadd\\td\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+" 2 { target aarch64_little_endian } } } */
/* vfmaq_lane_f64.
vfmaq_laneq_f64. */
-/* { dg-final { scan-assembler-times "fmla\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.d\\\[\[0-9\]+\\\]" 2 } } */
+/* { dg-final { scan-assembler-times "fmla\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.d\\\[\[0-9\]+\\\]" 3 { target aarch64_big_endian } } } */
+/* { dg-final { scan-assembler-times "fmla\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.d\\\[\[0-9\]+\\\]" 2 { target aarch64_little_endian } } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fmls_intrinsic_1.c b/gcc/testsuite/gcc.target/aarch64/fmls_intrinsic_1.c
index 865def2..3137ea9 100644
--- a/gcc/testsuite/gcc.target/aarch64/fmls_intrinsic_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/fmls_intrinsic_1.c
@@ -108,10 +108,12 @@ main (int argc, char **argv)
/* vfms_lane_f64.
vfms_laneq_f64. */
-/* { dg-final { scan-assembler-times "fmsub\\td\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+" 2 } } */
+/* { dg-final { scan-assembler-times "fmsub\\td\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+" 1 { target aarch64_big_endian } } } */
+/* { dg-final { scan-assembler-times "fmsub\\td\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+" 2 { target aarch64_little_endian } } } */
/* vfmsq_lane_f64.
vfmsq_laneq_f64. */
-/* { dg-final { scan-assembler-times "fmls\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.d\\\[\[0-9\]+\\\]" 2 } } */
+/* { dg-final { scan-assembler-times "fmls\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.d\\\[\[0-9\]+\\\]" 3 { target aarch64_big_endian } } } */
+/* { dg-final { scan-assembler-times "fmls\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.d\\\[\[0-9\]+\\\]" 2 { target aarch64_little_endian } } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fmul_intrinsic_1.c b/gcc/testsuite/gcc.target/aarch64/fmul_intrinsic_1.c
index d01095e..7d4829c 100644
--- a/gcc/testsuite/gcc.target/aarch64/fmul_intrinsic_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/fmul_intrinsic_1.c
@@ -107,10 +107,12 @@ main (int argc, char **argv)
/* vmul_lane_f64.
Vmul_laneq_f64. */
-/* { dg-final { scan-assembler-times "fmul\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 2 } } */
+/* { dg-final { scan-assembler-times "fmul\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 1 { target aarch64_big_endian } } } */
+/* { dg-final { scan-assembler-times "fmul\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 2 { target aarch64_little_endian } } } */
/* 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\]+\\\]" 2 } } */
+/* { dg-final { scan-assembler-times "fmul\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.d\\\[\[0-9\]+\\\]" 3 { target aarch64_big_endian } } } */
+/* { dg-final { scan-assembler-times "fmul\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.d\\\[\[0-9\]+\\\]" 2 { target aarch64_little_endian } } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fp16/fp16.exp b/gcc/testsuite/gcc.target/aarch64/fp16/fp16.exp
index e2b24ea..74d0eed 100644
--- a/gcc/testsuite/gcc.target/aarch64/fp16/fp16.exp
+++ b/gcc/testsuite/gcc.target/aarch64/fp16/fp16.exp
@@ -1,5 +1,5 @@
# Tests of 16-bit floating point (__fp16), for both ARM and AArch64.
-# Copyright (C) 2015-2021 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 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/masked_epilogue.c b/gcc/testsuite/gcc.target/aarch64/masked_epilogue.c
new file mode 100644
index 0000000..286a7be
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/masked_epilogue.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -march=armv8-a+sve -msve-vector-bits=scalable" } */
+
+void f(unsigned char y[restrict],
+ unsigned char x[restrict], int n) {
+ for (int i = 0; i < n; ++i)
+ y[i] = (y[i] + x[i] + 1) >> 1;
+}
+
+/* { dg-final { scan-tree-dump {LOOP EPILOGUE VECTORIZED \(MODE=VNx} "vect" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mops_1.c b/gcc/testsuite/gcc.target/aarch64/mops_1.c
new file mode 100644
index 0000000..661c141
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mops_1.c
@@ -0,0 +1,57 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=armv8.6-a+mops --param=aarch64-mops-memcpy-size-threshold=0" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+#include <stdlib.h>
+
+/* We want to inline variable-sized memcpy.
+** do_it_cpy:
+** cpyfp \[x1\]\!, \[x0\]\!, x2\!
+** cpyfm \[x1\]\!, \[x0\]\!, x2\!
+** cpyfe \[x1\]\!, \[x0\]\!, x2\!
+** ret
+*/
+void do_it_cpy (char * in, char * out, size_t size)
+{
+ __builtin_memcpy (out, in, size);
+}
+
+/*
+** do_it_cpy_large:
+** mov x2, 1024
+** cpyfp \[x1\]\!, \[x0\]!, x2\!
+** cpyfm \[x1\]\!, \[x0\]!, x2\!
+** cpyfe \[x1\]\!, \[x0\]\!, x2\!
+** ret
+*/
+void do_it_cpy_large (char * in, char * out)
+{
+ __builtin_memcpy (out, in, 1024);
+}
+
+/*
+** do_it_cpy_127:
+** mov x2, 127
+** cpyfp \[x1\]\!, \[x0\]!, x2\!
+** cpyfm \[x1\]\!, \[x0\]!, x2\!
+** cpyfe \[x1\]\!, \[x0\]\!, x2\!
+** ret
+*/
+void do_it_cpy_127 (char * in, char * out)
+{
+ __builtin_memcpy (out, in, 127);
+}
+
+/*
+** do_it_cpy_128:
+** mov x2, 128
+** cpyfp \[x1\]\!, \[x0\]!, x2\!
+** cpyfm \[x1\]\!, \[x0\]!, x2\!
+** cpyfe \[x1\]\!, \[x0\]\!, x2\!
+** ret
+*/
+void do_it_cpy_128 (char * in, char * out)
+{
+ __builtin_memcpy (out, in, 128);
+}
+
diff --git a/gcc/testsuite/gcc.target/aarch64/mops_2.c b/gcc/testsuite/gcc.target/aarch64/mops_2.c
new file mode 100644
index 0000000..6fda4dd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mops_2.c
@@ -0,0 +1,57 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=armv8.6-a+mops --param=aarch64-mops-memmove-size-threshold=0" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+#include <stdlib.h>
+
+/* We want to inline variable-sized memmove.
+** do_it_mov:
+** cpyp \[x1\]\!, \[x0\]\!, x2\!
+** cpym \[x1\]\!, \[x0\]\!, x2\!
+** cpye \[x1\]\!, \[x0\]\!, x2\!
+** ret
+*/
+void do_it_mov (char * in, char * out, size_t size)
+{
+ __builtin_memmove (out, in, size);
+}
+
+/*
+** do_it_mov_large:
+** mov x2, 1024
+** cpyp \[x1\]\!, \[x0\]!, x2\!
+** cpym \[x1\]\!, \[x0\]!, x2\!
+** cpye \[x1\]\!, \[x0\]\!, x2\!
+** ret
+*/
+void do_it_mov_large (char * in, char * out)
+{
+ __builtin_memmove (out, in, 1024);
+}
+
+/*
+** do_it_mov_127:
+** mov x2, 127
+** cpyp \[x1\]\!, \[x0\]!, x2\!
+** cpym \[x1\]\!, \[x0\]!, x2\!
+** cpye \[x1\]\!, \[x0\]\!, x2\!
+** ret
+*/
+void do_it_mov_127 (char * in, char * out)
+{
+ __builtin_memmove (out, in, 127);
+}
+
+/*
+** do_it_mov_128:
+** mov x2, 128
+** cpyp \[x1\]\!, \[x0\]!, x2\!
+** cpym \[x1\]\!, \[x0\]!, x2\!
+** cpye \[x1\]\!, \[x0\]\!, x2\!
+** ret
+*/
+void do_it_mov_128 (char * in, char * out)
+{
+ __builtin_memmove (out, in, 128);
+}
+
diff --git a/gcc/testsuite/gcc.target/aarch64/mops_3.c b/gcc/testsuite/gcc.target/aarch64/mops_3.c
new file mode 100644
index 0000000..0eda2ff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mops_3.c
@@ -0,0 +1,85 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=armv8.6-a+mops --param=aarch64-mops-memset-size-threshold=0" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+#include <stdlib.h>
+
+/* We want to inline variable-sized memset.
+** do_it_set:
+** setp \[x0\]\!, x2\!, x1
+** setm \[x0\]\!, x2\!, x1
+** sete \[x0\]\!, x2\!, x1
+** ret
+*/
+void do_it_set (char * out, int n, size_t size)
+{
+ __builtin_memset (out, n, size);
+}
+
+/*
+** do_it_set_large:
+** mov w2, 1
+** mov x1, 1024
+** setp \[x0\]\!, x1\!, x2
+** setm \[x0\]\!, x1\!, x2
+** sete \[x0\]\!, x1\!, x2
+** ret
+*/
+void do_it_set_large (char * out)
+{
+ __builtin_memset (out, 1, 1024);
+}
+
+/*
+** do_it_set_256:
+** mov w2, 1
+** mov x1, 256
+** setp \[x0\]\!, x1\!, x2
+** setm \[x0\]\!, x1\!, x2
+** sete \[x0\]\!, x1\!, x2
+** ret
+*/
+void do_it_set_256 (char * out)
+{
+ __builtin_memset (out, 1, 256);
+}
+
+/*
+** do_it_set_255:
+** mov w2, 1
+** mov x1, 255
+** setp \[x0\]\!, x1\!, x2
+** setm \[x0\]\!, x1\!, x2
+** sete \[x0\]\!, x1\!, x2
+** ret
+*/
+void do_it_set_255 (char * out)
+{
+ __builtin_memset (out, 1, 255);
+}
+
+/*
+** do_it_set_0:
+** setp \[x0\]\!, x1\!, xzr
+** setm \[x0\]\!, x1\!, xzr
+** sete \[x0\]\!, x1\!, xzr
+** ret
+*/
+void do_it_set_0 (char * out, size_t n)
+{
+ __builtin_memset (out, 0, n);
+}
+
+/*
+** do_it_set_0_255:
+** mov x1, 255
+** setp \[x0\]\!, x1\!, xzr
+** setm \[x0\]\!, x1\!, xzr
+** sete \[x0\]\!, x1\!, xzr
+** ret
+*/
+void do_it_set_0_255 (char * out)
+{
+ __builtin_memset (out, 0, 255);
+}
+
diff --git a/gcc/testsuite/gcc.target/aarch64/neoverse_v1_1.c b/gcc/testsuite/gcc.target/aarch64/neoverse_v1_1.c
new file mode 100644
index 0000000..c1563f0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/neoverse_v1_1.c
@@ -0,0 +1,15 @@
+/* { dg-options "-O2 -mcpu=neoverse-v1" } */
+
+void
+foo (short *restrict x, short y[restrict][128])
+{
+ for (int i = 0; i < 128; ++i)
+ {
+ y[0][i] = x[i * 3 + 0];
+ y[1][i] = x[i * 3 + 1];
+ y[2][i] = x[i * 3 + 2];
+ }
+}
+
+/* This shouldn't be a post-increment. */
+/* { dg-final { scan-assembler {ld3\t{[^{}]*}, \[x[0-9]+\]\n} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pr100518.c b/gcc/testsuite/gcc.target/aarch64/pr100518.c
new file mode 100644
index 0000000..5ca599f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr100518.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mabi=ilp32 -mstrict-align -O2" } */
+
+int unsigned_range_min, unsigned_range_max, a11___trans_tmp_1;
+
+void a11() {
+ a11___trans_tmp_1 = unsigned_range_max < unsigned_range_min;
+ __builtin_memset((char *)1, 0, a11___trans_tmp_1);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/pr102376.c b/gcc/testsuite/gcc.target/aarch64/pr102376.c
new file mode 100644
index 0000000..fc830ad
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr102376.c
@@ -0,0 +1,3 @@
+/* { dg-do compile } */
+
+void calculate(void) __attribute__ ((__target__ ("sve"))); /* { dg-error "arch extension 'sve' should be prefixed by '\\+'" } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pr103085.c b/gcc/testsuite/gcc.target/aarch64/pr103085.c
new file mode 100644
index 0000000..dbc9c15
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr103085.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fstack-protector-strong -fPIC" } */
+
+void g(int*);
+void
+f (int x)
+{
+ int arr[10];
+ g (arr);
+}
+
diff --git a/gcc/testsuite/gcc.target/aarch64/pr103094.c b/gcc/testsuite/gcc.target/aarch64/pr103094.c
new file mode 100644
index 0000000..beda99d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr103094.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fdump-rtl-expand -w" } */
+
+#include <arm_neon.h>
+
+void foo (uint8x8x2_t cols_01_23, uint8x8x2_t cols_45_67, uint16_t*
+outptr0) {
+ uint16x4x4_t cols_01_23_45_67 = { {
+ vreinterpret_u16_u8(cols_01_23.val[0]),
+ vreinterpret_u16_u8(cols_01_23.val[1]),
+ vreinterpret_u16_u8(cols_45_67.val[0]),
+ vreinterpret_u16_u8(cols_45_67.val[1])
+ } };
+
+ vst4_lane_u16(outptr0, cols_01_23_45_67, 0); }
+
+/* Check that we expand to v0 and v2 from the function arguments. */
+/* { dg-final { scan-rtl-dump {\(reg:V2x8QI \d+ v0 \[ cols_01_23
+\]\)} expand } } */
+/* { dg-final { scan-rtl-dump {\(reg:V2x8QI \d+ v2 \[ cols_45_67
+\]\)} expand } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/pr103149.c b/gcc/testsuite/gcc.target/aarch64/pr103149.c
new file mode 100644
index 0000000..906bc9a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr103149.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+sve -O2 -fharden-conditional-branches -fno-tree-scev-cprop" } */
+
+/* -fharden-conditional-branches prevents optimization of its redundant
+ compares by detaching values from the operands with asm statements. They
+ used to require GENERAL_REGS, but the vectorized booleans, generated while
+ vectorizing this function, can't be held in GENERAL_REGS. */
+
+void
+foo (int *p)
+{
+ while (*p < 1)
+ ++*p;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/pr103311.c b/gcc/testsuite/gcc.target/aarch64/pr103311.c
new file mode 100644
index 0000000..7bcc7db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr103311.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_3a_complex_neon_ok } */
+/* { dg-add-options arm_v8_3a_complex_neon } */
+/* { dg-additional-options "-std=c99" } */
+
+_Complex double y;
+
+void
+cbknu (_Complex double f)
+{
+ const _Complex double cone = 1.0e0;
+
+ f = f * cone;
+ y = f * cone;
+}
+
diff --git a/gcc/testsuite/gcc.target/aarch64/pr103350-1.c b/gcc/testsuite/gcc.target/aarch64/pr103350-1.c
new file mode 100644
index 0000000..61c796d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr103350-1.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-additional-options "-Os -fno-tree-ter -save-temps -fdump-rtl-ree-all -free -std=c99 -w" } */
+
+typedef unsigned char u8;
+typedef unsigned char __attribute__((__vector_size__ (8))) v64u8;
+typedef unsigned char __attribute__((__vector_size__ (16))) v128u8;
+typedef unsigned char __attribute__((__vector_size__ (32))) v256u8;
+typedef unsigned short __attribute__((__vector_size__ (8))) v64u16;
+typedef unsigned int __attribute__((__vector_size__ (16))) v128u32;
+typedef unsigned long long u64;
+typedef unsigned __int128 u128;
+
+v64u16 foo0_v32u16_0 = { 4, 5, 6, 7 };
+u64 foo0_u64_0 = 0x30;
+
+__attribute__((__noipa__))
+v64u8 foo0 (v64u16 v64u16_0, u128 u128_0)
+{
+ /* 03 00 05 00 03 00 02 00 ... */
+ v256u8 v256u16_1 = (v256u8)__builtin_shufflevector (v64u16_0, foo0_v32u16_0,
+ 3, 5, 3, 2, 3, 5, 1, 0,
+ 3, 5, 3, 2, 2, 0, 2, 0);
+ /* 00 00 00 00 01 00 00 00 ... */
+ v128u8 v128u8_1 = (v128u8) __builtin_convertvector (v64u16_0, v128u32);
+ /* 10 */
+ u8 u8_1 = foo0_u64_0 % u128_0;
+ /* 03 00 05 00 04 00 02 00 ... */
+ v128u8 v128u8_r = ((union {v256u8 a; v128u8 b[2];}) v256u16_1).b[0] + v128u8_1;
+ /* 00 00 01 00 02 00 03 00 */
+ v64u8 v64u8_0 = (v64u8)v64u16_0;
+ /* 03 00 06 00 06 00 05 00 */
+ v64u8 v64u8_r = ((union {v128u8 a; v64u8 b[2];}) v128u8_r).b[0] + v64u8_0;
+ /* 13 10 16 10 16 10 15 10 */
+ return v64u8_r + u8_1;
+}
+
+int
+main (void)
+{
+ v64u8 x = foo0 ((v64u16){ 0, 1, 2, 3 }, 0x20);
+ v64u8 exp = { 0x13, 0x10, 0x16, 0x10, 0x16, 0x10, 0x15, 0x10 };
+ for (unsigned i = 0; i < sizeof(x); i++)
+ if (x[i] != exp[i])
+ __builtin_abort();
+ return 0;
+}
+
+/* { dg-final { scan-rtl-dump {because some vector uses aren't extension} ree } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pr103350-2.c b/gcc/testsuite/gcc.target/aarch64/pr103350-2.c
new file mode 100644
index 0000000..2696212
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr103350-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-additional-options "-O2 -save-temps -fdump-rtl-ree-all -free -std=c99 -w" } */
+
+typedef unsigned char __attribute__((__vector_size__ (8))) v64u8;
+typedef unsigned char __attribute__((__vector_size__ (16))) v128u8;
+typedef unsigned short __attribute__((__vector_size__ (8))) v64u16;
+typedef unsigned short __attribute__((__vector_size__ (64))) v512u16;
+typedef unsigned int __attribute__((__vector_size__ (16))) v128u32;
+typedef unsigned long long u64;
+typedef unsigned long long __attribute__((__vector_size__ (8))) v64u64;
+typedef unsigned long long __attribute__((__vector_size__ (16))) v128u64;
+typedef unsigned __int128 u128;
+typedef unsigned __int128 __attribute__((__vector_size__ (64))) v512u128;
+v512u16 foo0_v512u16_0;
+u64 foo0_u64_0;
+u64 foo0_u16_0;
+
+void
+foo0 (v64u16 v64u16_0, v64u64 v64u64_0, u128 u128_0, v64u8 * ret)
+{
+ /* { 0, 4, 0, 0 } */
+ v128u32 v128u32_2 = __builtin_convertvector (v64u16_0, v128u32);
+ /* 0 */
+ foo0_u16_0 ^= foo0_u64_0 % u128_0;
+ /* { 0, ... } */
+ foo0_v512u16_0 *=
+ __builtin_shufflevector (v64u16_0, v64u16_0, 7, 7, 2, 1, 0, 0, 3, 6, 2, 3,
+ 1, 0, 7, 5, 6, 7, 4, 3, 2, 3, 0, 6, 1, 2, 3, 3,
+ 6, 7, 6, 2, 4, 3);
+ /* { 0, 0, 0, 0, 4, 0, ... } */
+ v128u8 v128u8_r = (v128u8) ((v512u128) foo0_v512u16_0)[0] +
+ (v128u8) v128u32_2;
+ /* { 0, 0, 4, 0, 4, 0, 0, 0 } */
+ v64u8 v64u8_r = (v64u8) ((v128u64) v128u8_r)[0] +
+ (v64u8) v64u16_0 + (v64u8) v64u64_0;
+ *ret = v64u8_r;
+}
+
+int
+main (void)
+{
+ v64u8 x, exp = (v64u8){ 0, 0, 4, 0, 4, 0, 0, 0 };
+ foo0 ((v64u16){0, 4}, (v64u64){}, 5, &x);
+ /*
+ for (unsigned i = 0; i < sizeof (x); i++)
+ __builtin_printf ("%02x", x[i]);
+ */
+ for (unsigned i = 0; i < sizeof (x); i++)
+ if (x[i] != exp[i]) __builtin_abort();
+ return 0;
+}
+
+/* { dg-final { scan-rtl-dump {because some vector uses aren't extension} ree } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pr103523.c b/gcc/testsuite/gcc.target/aarch64/pr103523.c
new file mode 100644
index 0000000..736e893
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr103523.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+sve -mtune=neoverse-v1 -Ofast" } */
+
+void d(float *a, float b, int c) {
+ float e;
+ for (; c; c--, e += b)
+ a[c] = e;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/pr103741.c b/gcc/testsuite/gcc.target/aarch64/pr103741.c
new file mode 100644
index 0000000..ef3ae66
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr103741.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-march=armv8-a+sve -O1" } */
+
+long int m, n;
+
+int
+qux (int z)
+{
+ return 4 >> z ? z : 0;
+}
+
+int
+bar (long int y)
+{
+ return y ? 3 : 2;
+}
+
+__attribute__ ((simd)) int
+foo (int x)
+{
+ long int a = x & m;
+ int b = bar (x) / n;
+
+ return qux (b) == a;
+}
+
diff --git a/gcc/testsuite/gcc.target/aarch64/pr104005.c b/gcc/testsuite/gcc.target/aarch64/pr104005.c
new file mode 100644
index 0000000..09dd819
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr104005.c
@@ -0,0 +1,17 @@
+/* { dg-options "-O2 -funroll-loops" } */
+
+typedef int v2 __attribute__((vector_size(8)));
+
+void f(void) {
+ v2 v[1024];
+ v2 *ptr = v;
+ for (int i = 0; i < 512; ++i)
+ {
+ ptr[0][0] = 0;
+ asm volatile ("":::"memory");
+ ptr[0][1] = 1;
+ ptr += 2;
+ }
+}
+
+/* { dg-final { scan-assembler-not {\tstp\t} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_2.c b/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_2.c
index 7244359..2d76bfc 100644
--- a/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_2.c
@@ -240,6 +240,20 @@
#endif
#pragma GCC pop_options
+#pragma GCC push_options
+#pragma GCC target ("arch=armv8.7-a")
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+#pragma GCC pop_options
+
+#pragma GCC push_options
+#pragma GCC target ("arch=armv8.7-a+ls64")
+#ifndef __ARM_FEATURE_LS64
+#error "__ARM_FEATURE_LS64 is not defined but should be!"
+#endif
+#pragma GCC pop_options
+
#pragma GCC pop_options
int
diff --git a/gcc/testsuite/gcc.target/aarch64/reg-alloc-2.c b/gcc/testsuite/gcc.target/aarch64/reg-alloc-2.c
new file mode 100644
index 0000000..d4d260c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/reg-alloc-2.c
@@ -0,0 +1,47 @@
+/* { dg-options "-O2 -fno-schedule-insns -fno-schedule-insns2" } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
+
+#define PROB 0.1
+
+struct L
+{
+ int data;
+ volatile struct L *next;
+ volatile struct L *inner;
+};
+
+/* The thing we're testing here is that the !head->inner path of the outer loop
+ body has no stack accesses. It's possible that we'll need to update this
+ pattern for unrelated code changes. but the test should be XFAILed rather
+ than changed if any new stack accesses occur on the !head->inner path. */
+/*
+** foo:
+** ...
+** ldr (w[0-9]+), \[(x[0-9]+)\]
+** add (w[0-9]+), (?:\3, \1|\1, \3)
+** ldr (x[0-9]+), \[\2, #?16\]
+** str \3, \[\2\]
+** ldr \2, \[\2, #?8\]
+** cbn?z \4, .*
+** ...
+** ret
+*/
+void
+foo (volatile struct L *head, int inc)
+{
+ while (head)
+ {
+ inc = head->data + inc;
+ volatile struct L *inner = head->inner;
+ head->data = inc;
+ head = head->next;
+ if (__builtin_expect_with_probability (inner != 0, 0, PROB))
+ for (int i = 0; i < 1000; ++i)
+ /* Leave x30 for i. */
+ asm volatile ("// foo" :::
+ "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7",
+ "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15",
+ "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23",
+ "x24", "x25", "x26", "x27", "x28");
+ }
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/reg-alloc-3.c b/gcc/testsuite/gcc.target/aarch64/reg-alloc-3.c
new file mode 100644
index 0000000..7acdc43
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/reg-alloc-3.c
@@ -0,0 +1,65 @@
+/* { dg-options "-O2 -fno-schedule-insns -fno-schedule-insns2" } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
+
+#define PROB 0.1
+
+struct L
+{
+ int data;
+ volatile struct L *next;
+ volatile struct L *inner;
+};
+
+void ext();
+
+/* The thing we're testing here is that the !head->inner path of the outer loop
+ body has no stack accesses. It's possible that we'll need to update this
+ pattern for unrelated code changes. but the test should be XFAILed rather
+ than changed if any new stack accesses creep into the !head->inner path. */
+/*
+** foo:
+** ...
+** ldr (w[0-9]+), \[(x[0-9]+)\]
+** add (w[0-9]+), (?:\3, \1|\1, \3)
+** ldr (x[0-9]+), \[\2, #?16\]
+** str \3, \[\2\]
+** ldr \2, \[\2, #?8\]
+** cbn?z \4, .*
+** ...
+** ret
+*/
+void
+foo (volatile struct L *head, int inc, double *ptr)
+{
+ double d = *ptr;
+ while (head)
+ {
+ /* Clobber all call-preserved GPRs, so that the loop has to use
+ call-clobbered GPRs if it is to avoid spilling. */
+ asm volatile ("" :::
+ "x19", "x20", "x21", "x22", "x23",
+ "x24", "x25", "x26", "x27", "x28");
+ inc = head->data + inc;
+ volatile struct L *inner = head->inner;
+ head->data = inc;
+ head = head->next;
+ if (__builtin_expect_with_probability (inner != 0, 0, PROB))
+ for (int i = 0; i < 1000; ++i)
+ {
+ ext ();
+ /* Hack to create high register pressure, so that IRA doesn't
+ collapse this loop into the parent loop. */
+ d += 1;
+ asm volatile ("// foo" :::
+ "d0", "d1", "d2", "d3",
+ "d4", "d5", "d6", "d7",
+ "d8", "d9", "d10", "d11",
+ "d12", "d13", "d14", "d15",
+ "d16", "d17", "d18", "d19",
+ "d20", "d21", "d22", "d23",
+ "d24", "d25", "d26", "d27",
+ "d28", "d29", "d30", "d31");
+ }
+ }
+ *ptr = d;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/reg-alloc-4.c b/gcc/testsuite/gcc.target/aarch64/reg-alloc-4.c
new file mode 100644
index 0000000..ceb6f50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/reg-alloc-4.c
@@ -0,0 +1,69 @@
+/* { dg-options "-O2 -fno-schedule-insns -fno-schedule-insns2" } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
+
+#define PROB 0.1
+
+struct L
+{
+ int data;
+ volatile struct L *next;
+ volatile struct L *inner;
+};
+
+/* The thing we're testing here is that the !head->inner path of the outer loop
+ body has no stack accesses. It's possible that we'll need to update this
+ pattern for unrelated code changes. but the test should be XFAILed rather
+ than changed if any new stack accesses occur on the !head->inner path. */
+/*
+** foo:
+** ...
+** ldr (w[0-9]+), \[(x[0-9]+)\]
+** add (w[0-9]+), (?:\3, \1|\1, \3)
+** ldr (x[0-9]+), \[\2, #?16\]
+** str \3, \[\2\]
+** ldr \2, \[\2, #?8\]
+** cbn?z \4, .*
+** ...
+** ret
+*/
+void
+foo (volatile struct L *head, int inc)
+{
+ while (head)
+ {
+ /* Clobber all call-preserved GPRs, so that the loop has to use
+ call-clobbered GPRs if it is to avoid spilling. */
+ asm volatile ("" :::
+ "x19", "x20", "x21", "x22", "x23",
+ "x24", "x25", "x26", "x27", "x28");
+ inc = head->data + inc;
+ volatile struct L *inner = head->inner;
+ head->data = inc;
+ head = head->next;
+ if (__builtin_expect_with_probability (inner != 0, 0, PROB))
+ for (int i = 0; i < 1000; ++i)
+ asm volatile ("" :: /* example allocation: */
+ "r" (i), /* x0 */
+ "r" (inner), /* x1 */
+ "r" (inner->next), /* x2 */
+ "r" (inner->next), /* x3 */
+ "r" (inner->next), /* x4 */
+ "r" (inner->next), /* x5 */
+ "r" (inner->next), /* x6 */
+ "r" (inner->next), /* x7 */
+ "r" (inner->next), /* x8 */
+ "r" (inner->next), /* x9 */
+ "r" (inner->next), /* x10 */
+ "r" (inner->next), /* x11 */
+ "r" (inner->next), /* x12 */
+ "r" (inner->next), /* x13 */
+ "r" (inner->next), /* x14 */
+ "r" (inner->next), /* x15 */
+ "r" (inner->next), /* x16 */
+ "r" (inner->next), /* x17 */
+ "r" (inner->next), /* x18 */
+ "r" (inner->next) : /* x30 */
+ "x19", "x20", "x21", "x22", "x23",
+ "x24", "x25", "x26", "x27", "x28");
+ }
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/shrn-combine-10.c b/gcc/testsuite/gcc.target/aarch64/shrn-combine-10.c
index 3a1cfce..dc9e9be 100644
--- a/gcc/testsuite/gcc.target/aarch64/shrn-combine-10.c
+++ b/gcc/testsuite/gcc.target/aarch64/shrn-combine-10.c
@@ -6,7 +6,7 @@
uint32x4_t foo (uint64x2_t a, uint64x2_t b)
{
- return vrshrn_high_n_u64 (vrshrn_n_u64 (a, 32), b, 32);
+ return vshrn_high_n_u64 (vshrn_n_u64 (a, 32), b, 32);
}
/* { dg-final { scan-assembler-times {\tuzp2\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/shrn-combine-8.c b/gcc/testsuite/gcc.target/aarch64/shrn-combine-8.c
index 6a47f3c..c93c179 100644
--- a/gcc/testsuite/gcc.target/aarch64/shrn-combine-8.c
+++ b/gcc/testsuite/gcc.target/aarch64/shrn-combine-8.c
@@ -6,7 +6,7 @@
uint8x16_t foo (uint16x8_t a, uint16x8_t b)
{
- return vrshrn_high_n_u16 (vrshrn_n_u16 (a, 8), b, 8);
+ return vshrn_high_n_u16 (vshrn_n_u16 (a, 8), b, 8);
}
/* { dg-final { scan-assembler-times {\tuzp2\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/shrn-combine-9.c b/gcc/testsuite/gcc.target/aarch64/shrn-combine-9.c
index 929a55c..bdb3c13 100644
--- a/gcc/testsuite/gcc.target/aarch64/shrn-combine-9.c
+++ b/gcc/testsuite/gcc.target/aarch64/shrn-combine-9.c
@@ -6,7 +6,7 @@
uint16x8_t foo (uint32x4_t a, uint32x4_t b)
{
- return vrshrn_high_n_u32 (vrshrn_n_u32 (a, 16), b, 16);
+ return vshrn_high_n_u32 (vshrn_n_u32 (a, 16), b, 16);
}
/* { dg-final { scan-assembler-times {\tuzp2\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/signbit-1.c b/gcc/testsuite/gcc.target/aarch64/signbit-1.c
new file mode 100644
index 0000000..a5654d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/signbit-1.c
@@ -0,0 +1,20 @@
+/* { dg-do assemble } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <stdint.h>
+
+#pragma GCC target "+nosve"
+
+void fun1(int32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (-x[i]) >> 31;
+}
+
+void fun2(int32_t *x, int n)
+{
+ for (int i = 0; i < (n & -16); i++)
+ x[i] = (-x[i]) >> 30;
+}
+
+/* { dg-final { scan-assembler-times {\tcmgt\t} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/signbit-2.c b/gcc/testsuite/gcc.target/aarch64/signbit-2.c
new file mode 100644
index 0000000..e4e9afc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/signbit-2.c
@@ -0,0 +1,36 @@
+/* { dg-do assemble } */
+/* { dg-options "-O1 --save-temps" } */
+
+#include <arm_neon.h>
+
+int32x2_t foo1 (int32x2_t a)
+{
+ return vshr_n_s32 (vneg_s32 (a), 31);
+}
+
+int32x4_t foo2 (int32x4_t a)
+{
+ return vshrq_n_s32 (vnegq_s32 (a), 31);
+}
+
+int16x8_t foo3 (int16x8_t a)
+{
+ return vshrq_n_s16 (vnegq_s16 (a), 15);
+}
+
+int16x4_t foo4 (int16x4_t a)
+{
+ return vshr_n_s16 (vneg_s16 (a), 15);
+}
+
+int8x16_t foo5 (int8x16_t a)
+{
+ return vshrq_n_s8 (vnegq_s8 (a), 7);
+}
+
+int8x8_t foo6 (int8x8_t a)
+{
+ return vshr_n_s8 (vneg_s8 (a), 7);
+}
+
+/* { dg-final { scan-assembler-times {\tcmgt\t} 6 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/simd/lowering_tbaa.c b/gcc/testsuite/gcc.target/aarch64/simd/lowering_tbaa.c
new file mode 100644
index 0000000..eaeae21
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/simd/lowering_tbaa.c
@@ -0,0 +1,30 @@
+/* Tests the TBAA information of lowered AArch64 SIMD loads. */
+/* { dg-do run } */
+/* { dg-options "-save-temps -O2" } */
+
+#include <arm_neon.h>
+
+void __attribute__((noipa))
+g (float *)
+{
+}
+
+int32x4_t __attribute__((noipa))
+f (void)
+{
+ float a[4] = { 1, 2, 3, 4 };
+ g (a);
+ a[0] = a[1] = a[2] = a[3] = 0;
+ void *volatile ptr = a;
+ return vld1q_s32 ((int32_t *) ptr);
+}
+
+int
+main (void)
+{
+ int32x4_t x = f ();
+ int32x4_t y = vdupq_n_s32 (0);
+ if (__builtin_memcmp (&x, &y, 16) != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/simd/simd.exp b/gcc/testsuite/gcc.target/aarch64/simd/simd.exp
index 3f7f661..4aded4b 100644
--- a/gcc/testsuite/gcc.target/aarch64/simd/simd.exp
+++ b/gcc/testsuite/gcc.target/aarch64/simd/simd.exp
@@ -1,5 +1,5 @@
# Specific regression driver for AArch64 SIMD instructions.
-# Copyright (C) 2014-2021 Free Software Foundation, Inc.
+# Copyright (C) 2014-2022 Free Software Foundation, Inc.
# Contributed by ARM Ltd.
#
# This file is part of GCC.
diff --git a/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-mitigation.exp b/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-mitigation.exp
index 8536933..2fccd7b 100644
--- a/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-mitigation.exp
+++ b/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-mitigation.exp
@@ -1,5 +1,5 @@
# Regression driver for SLS mitigation on AArch64.
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 Free Software Foundation, Inc.
# Contributed by ARM Ltd.
#
# This file is part of GCC.
diff --git a/gcc/testsuite/gcc.target/aarch64/spellcheck_1.c b/gcc/testsuite/gcc.target/aarch64/spellcheck_1.c
index a0795c1c..8654674 100644
--- a/gcc/testsuite/gcc.target/aarch64/spellcheck_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/spellcheck_1.c
@@ -4,6 +4,6 @@ __attribute__((target ("arch=armv8-a-typo"))) void
foo ()
{
/* { dg-message "valid arguments are: \[^\n\r]*(; did you mean 'armv*'?)?" "" { target *-*-* } .-1 } */
- /* { dg-error "invalid name \\(\"armv8-a-typo\"\\) in 'target\\(\"arch=\"\\)' pragma or attribute" "" { target *-*-* } .-2 } */
+ /* { dg-error "invalid name \\('armv8-a-typo'\\) in 'target\\(\"arch=\"\\)' pragma or attribute" "" { target *-*-* } .-2 } */
/* { dg-error "pragma or attribute 'target\\(\"arch=armv8-a-typo\"\\)' is not valid" "" { target *-*-* } .-3 } */
}
diff --git a/gcc/testsuite/gcc.target/aarch64/spellcheck_2.c b/gcc/testsuite/gcc.target/aarch64/spellcheck_2.c
index 70096f8..1cc2c05 100644
--- a/gcc/testsuite/gcc.target/aarch64/spellcheck_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/spellcheck_2.c
@@ -4,6 +4,6 @@ __attribute__((target ("cpu=cortex-a57-typo"))) void
foo ()
{
/* { dg-message "valid arguments are: \[^\n\r]*; did you mean 'cortex-a57'?" "" { target *-*-* } .-1 } */
- /* { dg-error "invalid name \\(\"cortex-a57-typo\"\\) in 'target\\(\"cpu=\"\\)' pragma or attribute" "" { target *-*-* } .-2 } */
+ /* { dg-error "invalid name \\('cortex-a57-typo'\\) in 'target\\(\"cpu=\"\\)' pragma or attribute" "" { target *-*-* } .-2 } */
/* { dg-error "pragma or attribute 'target\\(\"cpu=cortex-a57-typo\"\\)' is not valid" "" { target *-*-* } .-3 } */
}
diff --git a/gcc/testsuite/gcc.target/aarch64/spellcheck_3.c b/gcc/testsuite/gcc.target/aarch64/spellcheck_3.c
index 20dff2b..9953872 100644
--- a/gcc/testsuite/gcc.target/aarch64/spellcheck_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/spellcheck_3.c
@@ -4,6 +4,6 @@ __attribute__((target ("tune=cortex-a57-typo"))) void
foo ()
{
/* { dg-message "valid arguments are: \[^\n\r]*; did you mean 'cortex-a57'?" "" { target *-*-* } .-1 } */
- /* { dg-error "invalid name \\(\"cortex-a57-typo\"\\) in 'target\\(\"tune=\"\\)' pragma or attribute" "" { target *-*-* } .-2 } */
+ /* { dg-error "invalid name \\('cortex-a57-typo'\\) in 'target\\(\"tune=\"\\)' pragma or attribute" "" { target *-*-* } .-2 } */
/* { dg-error "pragma or attribute 'target\\(\"tune=cortex-a57-typo\"\\)' is not valid" "" { target *-*-* } .-3 } */
}
diff --git a/gcc/testsuite/gcc.target/aarch64/spellcheck_7.c b/gcc/testsuite/gcc.target/aarch64/spellcheck_7.c
index 1d31950..1e1cbec 100644
--- a/gcc/testsuite/gcc.target/aarch64/spellcheck_7.c
+++ b/gcc/testsuite/gcc.target/aarch64/spellcheck_7.c
@@ -9,4 +9,4 @@ foo ()
}
/* { dg-error "invalid feature modifier .typo. in .-march=armv8-a\\+typo." "" { target *-*-* } 0 } */
-/* { dg-message "valid arguments are: \[^\n\r]*;'?" "" { target *-*-* } 0 } */
+/* { dg-message "valid arguments are: \[^\n\r]*" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.target/aarch64/stp_1.c b/gcc/testsuite/gcc.target/aarch64/stp_1.c
new file mode 100644
index 0000000..c1a5e6b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/stp_1.c
@@ -0,0 +1,29 @@
+/* { dg-options "-O -fpeephole2" } */
+
+int res[2];
+
+void
+f1 (int x, int y)
+{
+ res[0] = res[1] = x + y;
+}
+
+void
+f2 (int x, int y, int *res)
+{
+ res[0] = res[1] = x + y;
+}
+
+void
+f3 (int x, int y)
+{
+ res[1] = res[0] = x + y;
+}
+
+void
+f4 (int x, int y, int *res)
+{
+ res[1] = res[0] = x + y;
+}
+
+/* { dg-final { scan-assembler-times {\tstp\t} 4 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/aarch64-sve.exp b/gcc/testsuite/gcc.target/aarch64/sve/aarch64-sve.exp
index 439a012..71dd668 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/aarch64-sve.exp
+++ b/gcc/testsuite/gcc.target/aarch64/sve/aarch64-sve.exp
@@ -1,5 +1,5 @@
# Specific regression driver for AArch64 SVE.
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
# Contributed by ARM Ltd.
#
# This file is part of GCC.
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp b/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp
index 3522991..a271f17 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp
@@ -1,5 +1,5 @@
# Assembly-based regression-test driver for the SVE ACLE
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle.exp b/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle.exp
index 2f36f1c..ce71c9c 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle.exp
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle.exp
@@ -1,5 +1,5 @@
# Specific regression driver for AArch64 SVE.
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
# Contributed by ARM Ltd.
#
# This file is part of GCC.
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr104092.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr104092.c
new file mode 100644
index 0000000..c17ece7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr104092.c
@@ -0,0 +1,7 @@
+/* { dg-options "-O2 -Wall" } */
+
+#include <arm_sve.h>
+
+svuint64_t bar(svbool_t pg, const uint64_t *addr) {
+ return svget2(svld2_u64(pg, addr), 0);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/complex_mul_1.c b/gcc/testsuite/gcc.target/aarch64/sve/complex_mul_1.c
new file mode 100644
index 0000000..d197e7d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/complex_mul_1.c
@@ -0,0 +1,16 @@
+/* { dg-options "-O2 -fgimple -fdump-tree-optimized" } */
+
+void __GIMPLE
+foo (__SVFloat64_t x, __SVFloat64_t y, __SVFloat64_t *res1,
+ __SVFloat64_t *res2)
+{
+ __SVFloat64_t a1;
+ __SVFloat64_t a2;
+
+ a1 = .COMPLEX_MUL (x, y);
+ a2 = .COMPLEX_MUL (y, x);
+ __MEM<__SVFloat64_t> (res1) = a1;
+ __MEM<__SVFloat64_t> (res2) = a2;
+}
+
+/* { dg-final { scan-tree-dump-times {\.COMPLEX_MUL} 1 "optimized" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5.c
new file mode 100644
index 0000000..4bae7e0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#include "cond_fmaxnm_1.c"
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #0\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.h, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.s, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.d, #2\.0} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, z[0-9]+\.h\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, z[0-9]+\.s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
+
+/* { dg-final { scan-assembler-not {\tmov\tz} } } */
+/* { dg-final { scan-assembler-not {\tmovprfx\t} } } */
+/* { dg-final { scan-assembler-not {\tsel\t} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5_run.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5_run.c
new file mode 100644
index 0000000..1aa2eb4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_5_run.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target aarch64_sve_hw } } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#include "cond_fmaxnm_1_run.c"
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_6.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_6.c
new file mode 100644
index 0000000..912db00
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_6.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#include "cond_fmaxnm_2.c"
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #0\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.s, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.d, #2\.0} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, z[0-9]+\.s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d\n} 3 } } */
+
+/* { dg-final { scan-assembler-not {\tmov\tz} } } */
+/* { dg-final { scan-assembler-not {\tsel\t} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_6_run.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_6_run.c
new file mode 100644
index 0000000..19f6edd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_6_run.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target aarch64_sve_hw } } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#include "cond_fmaxnm_2_run.c"
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7.c
new file mode 100644
index 0000000..30f07f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#include "cond_fmaxnm_3.c"
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #0\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.h, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.s, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.d, #2\.0} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, z[0-9]+\.h\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, z[0-9]+\.s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
+
+/* { dg-final { scan-assembler-not {\tmovprfx\t} } } */
+/* { dg-final { scan-assembler-not {\tmov\tz} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7_run.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7_run.c
new file mode 100644
index 0000000..3e647ed
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_7_run.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target aarch64_sve_hw } } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#include "cond_fmaxnm_3_run.c"
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_8.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_8.c
new file mode 100644
index 0000000..a590d38
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_8.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#include "cond_fmaxnm_4.c"
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #0\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.h, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.s, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.d, #2\.0} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, z[0-9]+\.h\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, z[0-9]+\.s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+\.s, p[0-7]/z, z[0-9]+\.s\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+\.d, p[0-7]/z, z[0-9]+\.d\n} 3 } } */
+
+/* { dg-final { scan-assembler-not {\tmov\tz} } } */
+/* { dg-final { scan-assembler-not {\tsel\t} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_8_run.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_8_run.c
new file mode 100644
index 0000000..d421e54
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_8_run.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target aarch64_sve_hw } } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#include "cond_fmaxnm_4_run.c"
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5.c
new file mode 100644
index 0000000..290c4be
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#define FN(X) __builtin_fmin##X
+#include "cond_fmaxnm_1.c"
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #0\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.h, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.s, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.d, #2\.0} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, z[0-9]+\.h\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, z[0-9]+\.s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
+
+/* { dg-final { scan-assembler-not {\tmov\tz} } } */
+/* { dg-final { scan-assembler-not {\tmovprfx\t} } } */
+/* { dg-final { scan-assembler-not {\tsel\t} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5_run.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5_run.c
new file mode 100644
index 0000000..76baf6a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_5_run.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target aarch64_sve_hw } } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#include "cond_fminnm_1_run.c"
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_6.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_6.c
new file mode 100644
index 0000000..cc9db99
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_6.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#define FN(X) __builtin_fmin##X
+#include "cond_fmaxnm_2.c"
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #0\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.s, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.d, #2\.0} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, z[0-9]+\.s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d\n} 3 } } */
+
+/* { dg-final { scan-assembler-not {\tmov\tz} } } */
+/* { dg-final { scan-assembler-not {\tsel\t} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_6_run.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_6_run.c
new file mode 100644
index 0000000..dbafea1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_6_run.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target aarch64_sve_hw } } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#include "cond_fminnm_2_run.c"
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7.c
new file mode 100644
index 0000000..347a1a3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#define FN(X) __builtin_fmin##X
+#include "cond_fmaxnm_3.c"
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #0\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.h, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.s, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.d, #2\.0} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, z[0-9]+\.h\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, z[0-9]+\.s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tsel\tz[0-9]+\.h, p[0-7], z[0-9]+\.h, z[0-9]+\.h\n} 3 } } */
+
+/* { dg-final { scan-assembler-not {\tmovprfx\t} } } */
+/* { dg-final { scan-assembler-not {\tmov\tz} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7_run.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7_run.c
new file mode 100644
index 0000000..6617095
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_7_run.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target aarch64_sve_hw } } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#include "cond_fminnm_3_run.c"
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_8.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_8.c
new file mode 100644
index 0000000..20d6cb5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_8.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#define FN(X) __builtin_fmin##X
+#include "cond_fmaxnm_4.c"
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #0\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #0\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, #1\.0\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, #1\.0\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.h, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.s, #2\.0} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmov\tz[0-9]+\.d, #2\.0} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h, z[0-9]+\.h\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s, z[0-9]+\.s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d, z[0-9]+\.d\n} 1 } } */
+
+/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+\.s, p[0-7]/z, z[0-9]+\.s\n} 3 } } */
+/* { dg-final { scan-assembler-times {\tmovprfx\tz[0-9]+\.d, p[0-7]/z, z[0-9]+\.d\n} 3 } } */
+
+/* { dg-final { scan-assembler-not {\tmov\tz} } } */
+/* { dg-final { scan-assembler-not {\tsel\t} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_8_run.c b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_8_run.c
new file mode 100644
index 0000000..4fb6497
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_8_run.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target aarch64_sve_hw } } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#include "cond_fminnm_4_run.c"
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cost_model_13.c b/gcc/testsuite/gcc.target/aarch64/sve/cost_model_13.c
new file mode 100644
index 0000000..95f2ce9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cost_model_13.c
@@ -0,0 +1,16 @@
+/* { dg-options "-O3 -mtune=neoverse-v1" } */
+
+int
+f11 (short *restrict x, int n)
+{
+ short res = 0;
+ for (int i = 0; i < n; ++i)
+ res += x[i];
+ return res;
+}
+
+/* We should use SVE rather than Advanced SIMD. */
+/* { dg-final { scan-assembler {\tld1h\tz[0-9]+\.h,} } } */
+/* { dg-final { scan-assembler {\tadd\tz[0-9]+\.h,} } } */
+/* { dg-final { scan-assembler-not {\tldr\tq[0-9]+,} } } */
+/* { dg-final { scan-assembler-not {\tv[0-9]+\.8h,} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/fmaxnm_2.c b/gcc/testsuite/gcc.target/aarch64/sve/fmaxnm_2.c
new file mode 100644
index 0000000..ee3cdc2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/fmaxnm_2.c
@@ -0,0 +1,22 @@
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+float
+f1 (float x, float *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fmaxf (x, ptr[i]);
+ return x;
+}
+
+double
+f2 (double x, double *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fmax (x, ptr[i]);
+ return x;
+}
+
+/* { dg-final { scan-assembler {\twhilelo\t(p[0-7])\.s,.*\tfmaxnm\tz[0-9]+\.s, \1/m, z[0-9]+\.s, z[0-9]+\.s\n} } } */
+/* { dg-final { scan-assembler-times {\tfmaxnmv\ts[0-9]+, p[0-7], z[0-9]+\.s\n} 1 } } */
+/* { dg-final { scan-assembler {\twhilelo\t(p[0-7])\.d,.*\tfmaxnm\tz[0-9]+\.d, \1/m, z[0-9]+\.d, z[0-9]+\.d\n} } } */
+/* { dg-final { scan-assembler-times {\tfmaxnmv\td[0-9]+, p[0-7], z[0-9]+\.d\n} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/fmaxnm_3.c b/gcc/testsuite/gcc.target/aarch64/sve/fmaxnm_3.c
new file mode 100644
index 0000000..a8eee0f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/fmaxnm_3.c
@@ -0,0 +1,18 @@
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+void
+f (double *restrict res, double *restrict ptr)
+{
+ double x0 = res[0];
+ double x1 = res[1];
+ for (int i = 0; i < 128; i += 2)
+ {
+ x0 = __builtin_fmax (x0, ptr[i + 0]);
+ x1 = __builtin_fmax (x1, ptr[i + 1]);
+ }
+ res[0] = x0;
+ res[1] = x1;
+}
+
+/* { dg-final { scan-assembler {\twhilelo\t(p[0-7])\.d,.*\tfmaxnm\tz[0-9]+\.d, \1/m, z[0-9]+\.d, z[0-9]+\.d\n} } } */
+/* { dg-final { scan-assembler-times {\tfmaxnmv\td[0-9]+, p[0-7], z[0-9]+\.d\n} 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/fminnm_2.c b/gcc/testsuite/gcc.target/aarch64/sve/fminnm_2.c
new file mode 100644
index 0000000..10aced0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/fminnm_2.c
@@ -0,0 +1,22 @@
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+float
+f1 (float x, float *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fminf (x, ptr[i]);
+ return x;
+}
+
+double
+f2 (double x, double *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fmin (x, ptr[i]);
+ return x;
+}
+
+/* { dg-final { scan-assembler {\twhilelo\t(p[0-7])\.s,.*\tfminnm\tz[0-9]+\.s, \1/m, z[0-9]+\.s, z[0-9]+\.s\n} } } */
+/* { dg-final { scan-assembler-times {\tfminnmv\ts[0-9]+, p[0-7], z[0-9]+\.s\n} 1 } } */
+/* { dg-final { scan-assembler {\twhilelo\t(p[0-7])\.d,.*\tfminnm\tz[0-9]+\.d, \1/m, z[0-9]+\.d, z[0-9]+\.d\n} } } */
+/* { dg-final { scan-assembler-times {\tfminnmv\td[0-9]+, p[0-7], z[0-9]+\.d\n} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/fminnm_3.c b/gcc/testsuite/gcc.target/aarch64/sve/fminnm_3.c
new file mode 100644
index 0000000..80ad016
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/fminnm_3.c
@@ -0,0 +1,18 @@
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+void
+f (double *restrict res, double *restrict ptr)
+{
+ double x0 = res[0];
+ double x1 = res[1];
+ for (int i = 0; i < 128; i += 2)
+ {
+ x0 = __builtin_fmin (x0, ptr[i + 0]);
+ x1 = __builtin_fmin (x1, ptr[i + 1]);
+ }
+ res[0] = x0;
+ res[1] = x1;
+}
+
+/* { dg-final { scan-assembler {\twhilelo\t(p[0-7])\.d,.*\tfminnm\tz[0-9]+\.d, \1/m, z[0-9]+\.d, z[0-9]+\.d\n} } } */
+/* { dg-final { scan-assembler-times {\tfminnmv\td[0-9]+, p[0-7], z[0-9]+\.d\n} 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/gather_load_10.c b/gcc/testsuite/gcc.target/aarch64/sve/gather_load_10.c
new file mode 100644
index 0000000..2a07c0b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/gather_load_10.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp-simd -msve-vector-bits=256 -fno-vect-cost-model" } */
+
+#include <stdint.h>
+
+void
+foo (uint64_t *restrict x, uint64_t *restrict y, uint64_t *restrict index)
+{
+#pragma omp for simd simdlen(2)
+ for (int i = 0; i < 128; ++i)
+ x[i] += y[index[i]];
+}
+
+/* { dg-final { scan-assembler-times {\tldr\td[0-9]+, \[x[0-9]+, x[0-9]+, lsl #?3\]} 2 } } */
+/* { dg-final { scan-assembler-not {\tshl\tv[0-9]+\.2d,} } } */
+/* { dg-final { scan-assembler-not {\tumov\t} } } */
+/* { dg-final { scan-assembler {\tadd\tv[0-9]+\.2d,} } } */
+/* { dg-final { scan-assembler {\tstr\tq[0-9]+,} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/gather_load_11.c b/gcc/testsuite/gcc.target/aarch64/sve/gather_load_11.c
new file mode 100644
index 0000000..f6f78c1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/gather_load_11.c
@@ -0,0 +1,49 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-vect-cost-model" } */
+
+#include <stdint.h>
+
+void
+f1 (int32_t *restrict y, int32_t *restrict x, int32_t *restrict index)
+{
+ for (int i = 0; i < 100; ++i)
+ {
+ y[i * 2] = x[index[i * 2]] + 1;
+ y[i * 2 + 1] = x[index[i * 2 + 1]] + 2;
+ }
+}
+
+void
+f2 (int32_t *restrict y, int32_t *restrict x, uint32_t *restrict index)
+{
+ for (int i = 0; i < 100; ++i)
+ {
+ y[i * 2] = x[index[i * 2]] + 1;
+ y[i * 2 + 1] = x[index[i * 2 + 1]] + 2;
+ }
+}
+
+void
+f3 (int32_t *restrict y, int32_t *restrict x, uint64_t *restrict index)
+{
+ for (int i = 0; i < 100; ++i)
+ {
+ y[i * 2] = x[index[i * 2]] + 1;
+ y[i * 2 + 1] = x[index[i * 2 + 1]] + 2;
+ }
+}
+
+void
+f4 (int64_t *restrict y, int64_t *restrict x, uint64_t *restrict index)
+{
+ for (int i = 0; i < 100; ++i)
+ {
+ y[i * 2] = x[index[i * 2]] + 1;
+ y[i * 2 + 1] = x[index[i * 2 + 1]] + 2;
+ }
+}
+
+/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, z[0-9]+\.s, sxtw #?2\]} 1 } } */
+/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, z[0-9]+\.s, uxtw #?2\]} 1 } } */
+/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.d, p[0-7]/z, \[x[0-9]+, z[0-9]+\.d, lsl #?2\]} 1 } } */
+/* { dg-final { scan-assembler-times {\tld1d\tz[0-9]+\.d, p[0-7]/z, \[x[0-9]+, z[0-9]+\.d, lsl #?3\]} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_gather_load_8.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_gather_load_8.c
new file mode 100644
index 0000000..95767f3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_gather_load_8.c
@@ -0,0 +1,65 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-vect-cost-model" } */
+
+#include <stdint.h>
+
+void
+f1 (int32_t *restrict y, int32_t *restrict x, int32_t *restrict index)
+{
+ for (int i = 0; i < 100; ++i)
+ {
+ y[i * 2] = (index[i * 2] < 128
+ ? x[index[i * 2]] + 1
+ : 1);
+ y[i * 2 + 1] = (index[i * 2 + 1] < 128
+ ? x[index[i * 2 + 1]] + 2
+ : 2);
+ }
+}
+
+void
+f2 (int32_t *restrict y, int32_t *restrict x, uint32_t *restrict index)
+{
+ for (int i = 0; i < 100; ++i)
+ {
+ y[i * 2] = (index[i * 2] < 128
+ ? x[index[i * 2]] + 1
+ : 1);
+ y[i * 2 + 1] = (index[i * 2 + 1] < 128
+ ? x[index[i * 2 + 1]] + 2
+ : 2);
+ }
+}
+
+void
+f3 (int32_t *restrict y, int32_t *restrict x, uint64_t *restrict index)
+{
+ for (int i = 0; i < 100; ++i)
+ {
+ y[i * 2] = (index[i * 2] < 128
+ ? x[index[i * 2]] + 1
+ : 1);
+ y[i * 2 + 1] = (index[i * 2 + 1] < 128
+ ? x[index[i * 2 + 1]] + 2
+ : 2);
+ }
+}
+
+void
+f4 (int64_t *restrict y, int64_t *restrict x, uint64_t *restrict index)
+{
+ for (int i = 0; i < 100; ++i)
+ {
+ y[i * 2] = (index[i * 2] < 128
+ ? x[index[i * 2]] + 1
+ : 1);
+ y[i * 2 + 1] = (index[i * 2 + 1] < 128
+ ? x[index[i * 2 + 1]] + 2
+ : 2);
+ }
+}
+
+/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, z[0-9]+\.s, sxtw #?2\]} 1 } } */
+/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, z[0-9]+\.s, uxtw #?2\]} 1 } } */
+/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.d, p[0-7]/z, \[x[0-9]+, z[0-9]+\.d, lsl #?2\]} 1 } } */
+/* { dg-final { scan-assembler-times {\tld1d\tz[0-9]+\.d, p[0-7]/z, \[x[0-9]+, z[0-9]+\.d, lsl #?3\]} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_1.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_1.c
index 03b2b93..450fbb8 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_1.c
@@ -6,9 +6,9 @@
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
- MASKTYPE *__restrict cond, int n) \
+ MASKTYPE *__restrict cond, intptr_t n) \
{ \
- for (int i = 0; i < n; ++i) \
+ for (intptr_t i = 0; i < n; ++i) \
if (cond[i]) \
dest[i] = src[i * 2] + src[i * 2 + 1]; \
}
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_2.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_2.c
index 87ac317..499abd7 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_2.c
@@ -6,9 +6,9 @@
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
- MASKTYPE *__restrict cond, int n) \
+ MASKTYPE *__restrict cond, intptr_t n) \
{ \
- for (int i = 0; i < n; ++i) \
+ for (intptr_t i = 0; i < n; ++i) \
if (cond[i]) \
dest[i] = (src[i * 3] \
+ src[i * 3 + 1] \
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_3.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_3.c
index 54806f9..a5ce071 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_3.c
@@ -6,9 +6,9 @@
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
- MASKTYPE *__restrict cond, int n) \
+ MASKTYPE *__restrict cond, intptr_t n) \
{ \
- for (int i = 0; i < n; ++i) \
+ for (intptr_t i = 0; i < n; ++i) \
if (cond[i]) \
dest[i] = (src[i * 4] \
+ src[i * 4 + 1] \
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_4.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_4.c
index 4c73004f..bdfea96 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_4.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_4.c
@@ -6,9 +6,9 @@
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
- MASKTYPE *__restrict cond, int n) \
+ MASKTYPE *__restrict cond, intptr_t n) \
{ \
- for (int i = 0; i < n; ++i) \
+ for (intptr_t i = 0; i < n; ++i) \
if (cond[i]) \
dest[i] = src[i * 3] + src[i * 3 + 2]; \
}
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_5.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_5.c
index 2a33ee8..299955a 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_5.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_5.c
@@ -6,9 +6,9 @@
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
- MASKTYPE *__restrict cond, int n) \
+ MASKTYPE *__restrict cond, intptr_t n) \
{ \
- for (int i = 0; i < n; ++i) \
+ for (intptr_t i = 0; i < n; ++i) \
if (cond[i]) \
dest[i] = src[i * 4] + src[i * 4 + 3]; \
}
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_6.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_6.c
index d4542ec..999c7b5 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_6.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_6.c
@@ -6,9 +6,9 @@
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
- MASKTYPE *__restrict cond, int n) \
+ MASKTYPE *__restrict cond, intptr_t n) \
{ \
- for (int i = 0; i < n; ++i) \
+ for (intptr_t i = 0; i < n; ++i) \
if (cond[i]) \
dest[i] = src[i * 2]; \
}
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_7.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_7.c
index 9d26e15..57d71ed 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_7.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_7.c
@@ -6,9 +6,9 @@
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
- MASKTYPE *__restrict cond, int n) \
+ MASKTYPE *__restrict cond, intptr_t n) \
{ \
- for (int i = 0; i < n; ++i) \
+ for (intptr_t i = 0; i < n; ++i) \
if (cond[i]) \
dest[i] = src[i * 3] + src[i * 3 + 1]; \
}
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_8.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_8.c
index 17fd4c0..1ead3ba 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_8.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_8.c
@@ -6,9 +6,9 @@
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
- MASKTYPE *__restrict cond, int n) \
+ MASKTYPE *__restrict cond, intptr_t n) \
{ \
- for (int i = 0; i < n; ++i) \
+ for (intptr_t i = 0; i < n; ++i) \
if (cond[i]) \
dest[i] = src[i * 4] + src[i * 4 + 2]; \
}
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_1.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_1.c
index a75a694..39fae68 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_1.c
@@ -6,9 +6,9 @@
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
- MASKTYPE *__restrict cond, INTYPE bias, int n) \
+ MASKTYPE *__restrict cond, INTYPE bias, intptr_t n) \
{ \
- for (int i = 0; i < n; ++i) \
+ for (intptr_t i = 0; i < n; ++i) \
{ \
INTYPE value = src[i] + bias; \
if (cond[i]) \
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_2.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_2.c
index 0fd35f2..0fe9b99 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_2.c
@@ -6,9 +6,9 @@
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
- MASKTYPE *__restrict cond, INTYPE bias, int n) \
+ MASKTYPE *__restrict cond, INTYPE bias, intptr_t n) \
{ \
- for (int i = 0; i < n; ++i) \
+ for (intptr_t i = 0; i < n; ++i) \
{ \
INTYPE value = src[i] + bias; \
if (cond[i]) \
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_3.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_3.c
index 1765d54..a943087 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_3.c
@@ -6,9 +6,9 @@
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
- MASKTYPE *__restrict cond, INTYPE bias, int n) \
+ MASKTYPE *__restrict cond, INTYPE bias, intptr_t n) \
{ \
- for (int i = 0; i < n; ++i) \
+ for (intptr_t i = 0; i < n; ++i) \
{ \
INTYPE value = src[i] + bias; \
if (cond[i]) \
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_4.c b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_4.c
index 59e9ee4..d3f0216 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_4.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_4.c
@@ -6,15 +6,15 @@
#define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
void __attribute__ ((noinline, noclone)) \
NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src, \
- MASKTYPE *__restrict cond, int n) \
+ MASKTYPE *__restrict cond, intptr_t n) \
{ \
- for (int i = 0; i < n; ++i) \
+ for (intptr_t i = 0; i < n; ++i) \
{ \
if (cond[i] < 8) \
dest[i * 2] = src[i]; \
if (cond[i] > 2) \
dest[i * 2 + 1] = src[i]; \
- } \
+ } \
}
#define TEST2(NAME, OUTTYPE, INTYPE) \
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp b/gcc/testsuite/gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp
index 64218fb..8378673 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp
@@ -1,5 +1,5 @@
# Specific regression driver for AArch64 SVE.
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
# Contributed by ARM Ltd.
#
# This file is part of GCC.
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_256.c b/gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_256.c
index fdfbec5..af0af29 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_256.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pcs/struct_3_256.c
@@ -933,7 +933,11 @@ SEL2 (struct, nonpst1)
/*
** test_nonpst1:
+** (
+** fmov d0, d3
+** |
** mov v0\.8b, v3\.8b
+** )
** ret
*/
/* { dg-final { scan-assembler-not {\t\.variant_pcs\ttest_nonpst1\n} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr104474-1.c b/gcc/testsuite/gcc.target/aarch64/sve/pr104474-1.c
new file mode 100644
index 0000000..9e5bfe6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr104474-1.c
@@ -0,0 +1,9 @@
+/* { dg-options "-mcpu=neoverse-512tvb -frounding-math -msve-vector-bits=512" } */
+
+typedef float __attribute__((__vector_size__ (64))) F;
+
+F
+foo (void)
+{
+ return (F){68435453, 0, 0, 0, 0, 0, 0, 5, 0, 431144844};
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr104474-2.c b/gcc/testsuite/gcc.target/aarch64/sve/pr104474-2.c
new file mode 100644
index 0000000..02a4b6a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr104474-2.c
@@ -0,0 +1,9 @@
+/* { dg-options "-mcpu=neoverse-512tvb -msve-vector-bits=512" } */
+
+typedef float __attribute__((__vector_size__ (64))) F;
+
+F
+foo (float t)
+{
+ return (F){t, 0, 0, 0, 0, 0, 0, 5, 0, t};
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr104474-3.c b/gcc/testsuite/gcc.target/aarch64/sve/pr104474-3.c
new file mode 100644
index 0000000..7bed014
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr104474-3.c
@@ -0,0 +1,9 @@
+/* { dg-options "-mcpu=neoverse-v1 -frounding-math -msve-vector-bits=256" } */
+
+typedef _Float16 __attribute__((__vector_size__ (32))) F;
+
+F
+foo (void)
+{
+ return (F){0, 6270, 0, 0, 0, 0, 0, 0, 3229, 0, 40};
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pred-combine-and.c b/gcc/testsuite/gcc.target/aarch64/sve/pred-combine-and.c
new file mode 100644
index 0000000..ee92734
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pred-combine-and.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+void f5(float * restrict z0, float * restrict z1, float *restrict x, float * restrict y, float c, int n)
+{
+ for (int i = 0; i < n; i++) {
+ float a = x[i];
+ float b = y[i];
+ if (a > b) {
+ z0[i] = a + b;
+ if (a > c) {
+ z1[i] = a - b;
+ }
+ }
+ }
+}
+
+/* { dg-final { scan-assembler-times {\tfcmgt\tp[0-9]+\.s, p[0-9]+/z, z[0-9]+\.s, z[0-9]+\.s} 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-1.c b/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-1.c
index 2c06564..c9a8b82 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-1.c
@@ -1,5 +1,5 @@
-/* { dg-do assemble { target aarch64_asm_sve_ok } } */
-/* { dg-options "-O3 --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
/*
** f10:
@@ -21,3 +21,4 @@ void f10(double * restrict z, double * restrict w, double * restrict x, double *
/* { dg-final { scan-assembler-not {\tbic\t} } } */
/* { dg-final { scan-assembler-times {\tnot\tp[0-9]+\.b, p[0-9]+/z, p[0-9]+\.b\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfcmgt\tp[0-9]+\.d, p[0-9]+/z, z[0-9]+\.d, #0} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-2.c b/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-2.c
index 0c3b78d..8d78f47 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-2.c
@@ -1,5 +1,5 @@
-/* { dg-do assemble { target aarch64_asm_sve_ok } } */
-/* { dg-options "-O3 --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
/*
** f11:
@@ -21,3 +21,4 @@ void f11(double * restrict z, double * restrict w, double * restrict x, double *
/* { dg-final { scan-assembler-not {\tbic\t} } } */
/* { dg-final { scan-assembler-times {\tnot\tp[0-9]+\.b, p[0-9]+/z, p[0-9]+\.b\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfcmgt\tp[0-9]+\.d, p[0-9]+/z, z[0-9]+\.d, #0.0} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-3.c b/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-3.c
index 248f8ab..38fbfef 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-3.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-3.c
@@ -1,5 +1,5 @@
-/* { dg-do assemble { target aarch64_asm_sve_ok } } */
-/* { dg-options "-O3 --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
/*
** f12:
@@ -19,3 +19,4 @@ void f12(int * restrict z, int * restrict w, int * restrict x, int * restrict y,
/* { dg-final { scan-assembler-not {\tbic\t} } } */
/* { dg-final { scan-assembler-not {\tnot\tp[0-9]+\.b, p[0-9]+/z, p[0-9]+\.b\n} } } */
+/* { dg-final { scan-assembler-times {\tcmple\tp[0-9]+\.s, p[0-9]+/z, z[0-9]+\.s, #0} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c b/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c
index 9620030..0001dd3 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c
@@ -1,5 +1,5 @@
-/* { dg-do assemble { target aarch64_asm_sve_ok } } */
-/* { dg-options "-O3 --save-temps" } */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
#include <math.h>
@@ -12,3 +12,4 @@ void f13(double * restrict z, double * restrict w, double * restrict x, double *
/* { dg-final { scan-assembler-not {\tbic\t} } } */
/* { dg-final { scan-assembler-times {\tnot\tp[0-9]+\.b, p[0-9]+/z, p[0-9]+\.b\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfcmuo\tp[0-9]+\.d, p[0-9]+/z, z[0-9]+\.d, z[0-9]+\.d} 1 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/single_5.c b/gcc/testsuite/gcc.target/aarch64/sve/single_5.c
index 7d16205..233118b 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/single_5.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/single_5.c
@@ -13,15 +13,14 @@
/* { dg-final { scan-assembler-times {\tmovi\tv[0-9]+\.4s, 0x6\n} 1 } } */
/* { dg-final { scan-assembler-times {\tmov\tz[0-9]+\.d, #7\n} 1 { xfail *-*-* } } } */
/* { dg-final { scan-assembler-times {\tmov\tz[0-9]+\.d, #8\n} 1 { xfail *-*-* } } } */
-/* { dg-final { scan-assembler-times {\tfmov\tv[0-9]+\.8h, 1\.0e\+0\n} 1 { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-times {\tfmov\tv[0-9]+\.8h, 1\.0e\+0\n} 1 } } */
/* { dg-final { scan-assembler-times {\tfmov\tv[0-9]+\.4s, 2\.0e\+0\n} 1 } } */
/* { dg-final { scan-assembler-times {\tfmov\tv[0-9]+\.2d, 3\.0e\+0\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tstr\tq[0-9]+,} 11 { xfail *-*-* } } } */
-/* { dg-final { scan-assembler-times {\tstr\tq[0-9]+,} 10 } } */
+/* { dg-final { scan-assembler-times {\tstr\tq[0-9]+,} 11 } } */
/* { dg-final { scan-assembler-not {\twhile} } } */
/* { dg-final { scan-assembler-not {\tb} } } */
/* { dg-final { scan-assembler-not {\tcmp} } } */
/* { dg-final { scan-assembler-not {\tindex} } } */
-/* { dg-final { scan-assembler-not {\tptrue\t} { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-not {\tptrue\t} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/struct_vect_25.c b/gcc/testsuite/gcc.target/aarch64/sve/struct_vect_25.c
index bde6d04..bce4adc 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/struct_vect_25.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/struct_vect_25.c
@@ -10,18 +10,12 @@
/* { dg-final { scan-assembler-times {\tst3\t{v[0-9]+\.16b - v[0-9]+\.16b}, \[x[0-9]+\], #?48\n} 1 } } */
/* { dg-final { scan-assembler-times {\tst4\t{v[0-9]+\.16b - v[0-9]+\.16b}, \[x[0-9]+\], #?64\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tld2\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?32\n} 2 { xfail *-*-* } } } */
-/* { dg-final { scan-assembler-times {\tld3\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?48\n} 2 { xfail *-*-* } } } */
-/* { dg-final { scan-assembler-times {\tld4\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?64\n} 2 { xfail *-*-* } } } */
-/* { dg-final { scan-assembler-times {\tst2\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?32\n} 2 { xfail *-*-* } } } */
-/* { dg-final { scan-assembler-times {\tst3\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?48\n} 2 { xfail *-*-* } } } */
-/* { dg-final { scan-assembler-times {\tst4\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?64\n} 2 { xfail *-*-* } } } */
-/* { dg-final { scan-assembler-times {\tld2\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?32\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tld3\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?48\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tld4\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?64\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tst2\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?32\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tst3\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?48\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tst4\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?64\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tld2\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?32\n} 2 } } */
+/* { dg-final { scan-assembler-times {\tld3\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?48\n} 2 } } */
+/* { dg-final { scan-assembler-times {\tld4\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?64\n} 2 } } */
+/* { dg-final { scan-assembler-times {\tst2\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?32\n} 2 } } */
+/* { dg-final { scan-assembler-times {\tst3\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?48\n} 2 } } */
+/* { dg-final { scan-assembler-times {\tst4\t{v[0-9]+\.8h - v[0-9]+\.8h}, \[x[0-9]+\], #?64\n} 2 } } */
/* { dg-final { scan-assembler-times {\tld2\t{v[0-9]+\.4s - v[0-9]+\.4s}, \[x[0-9]+\], #?32\n} 2 } } */
/* { dg-final { scan-assembler-times {\tld3\t{v[0-9]+\.4s - v[0-9]+\.4s}, \[x[0-9]+\], #?48\n} 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve2/aarch64-sve2.exp b/gcc/testsuite/gcc.target/aarch64/sve2/aarch64-sve2.exp
index 28d6155..60652db 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve2/aarch64-sve2.exp
+++ b/gcc/testsuite/gcc.target/aarch64/sve2/aarch64-sve2.exp
@@ -1,5 +1,5 @@
# Specific regression driver for AArch64 SVE2.
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
# Contributed by ARM Ltd.
#
# This file is part of GCC.
diff --git a/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp b/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp
index 67f817d..e08cd61 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp
+++ b/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp
@@ -1,5 +1,5 @@
# Assembly-based regression-test driver for the SVE ACLE
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle.exp b/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle.exp
index a8c5421..f025596 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle.exp
+++ b/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle.exp
@@ -1,5 +1,5 @@
# Specific regression driver for AArch64 SVE.
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
# Contributed by ARM Ltd.
#
# This file is part of GCC.
diff --git a/gcc/testsuite/gcc.target/aarch64/torture/aarch64-torture.exp b/gcc/testsuite/gcc.target/aarch64/torture/aarch64-torture.exp
index 2c0679f..334a5c3 100644
--- a/gcc/testsuite/gcc.target/aarch64/torture/aarch64-torture.exp
+++ b/gcc/testsuite/gcc.target/aarch64/torture/aarch64-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2021 Free Software Foundation, Inc.
+# Copyright (C) 2018-2022 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/vec-init-10.c b/gcc/testsuite/gcc.target/aarch64/vec-init-10.c
new file mode 100644
index 0000000..f5dd83b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vec-init-10.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+#include <arm_neon.h>
+
+int64x2_t f1(int64_t *x, int c) {
+ return c ? (int64x2_t) { x[0], x[2] } : (int64x2_t) { 0, 0 };
+}
+
+int64x2_t f2(int64_t *x, int i0, int i1, int c) {
+ return c ? (int64x2_t) { x[i0], x[i1] } : (int64x2_t) { 0, 0 };
+}
+
+/* { dg-final { scan-assembler-times {\t(?:ldr\td[0-9]+|ld1\t)} 4 } } */
+/* { dg-final { scan-assembler-not {\tldr\tx} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vec-init-11.c b/gcc/testsuite/gcc.target/aarch64/vec-init-11.c
new file mode 100644
index 0000000..df24270
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vec-init-11.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+#include <arm_neon.h>
+
+void f1(int64x2_t *res, int64_t *x, int c0, int c1) {
+ res[0] = (int64x2_t) { c0 ? x[0] : 0, c1 ? x[2] : 0 };
+}
+
+/* { dg-final { scan-assembler-times {\tldr\tx[0-9]+} 2 } } */
+/* { dg-final { scan-assembler {\tstp\tx[0-9]+, x[0-9]+} } } */
+/* { dg-final { scan-assembler-not {\tldr\td} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vec-init-12.c b/gcc/testsuite/gcc.target/aarch64/vec-init-12.c
new file mode 100644
index 0000000..c287478
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vec-init-12.c
@@ -0,0 +1,65 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
+
+#include <arm_neon.h>
+
+/*
+** s32_1:
+** ldr q0, \[x0\]
+** ret
+*/
+int32x4_t s32_1(int32x2_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return vcombine_s32 (ptr[1], ptr[0]);
+ else
+ return vcombine_s32 (ptr[0], ptr[1]);
+}
+/*
+** s32_2:
+** add x([0-9])+, x0, #?8
+** ld1 {v0\.d}\[1\], \[x\1\]
+** ret
+*/
+int32x4_t s32_2(int32x2_t a0, int32x2_t *ptr) {
+ return vcombine_s32 (a0, ptr[1]);
+}
+/*
+** s32_3:
+** ldr d0, \[x0\], #?16
+** ld1 {v0\.d}\[1\], \[x0\]
+** ret
+*/
+int32x4_t s32_3(int32x2_t *ptr) {
+ return vcombine_s32 (ptr[0], ptr[2]);
+}
+
+/*
+** f32_1:
+** ldr q0, \[x0\]
+** ret
+*/
+float32x4_t f32_1(float32x2_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return vcombine_f32 (ptr[1], ptr[0]);
+ else
+ return vcombine_f32 (ptr[0], ptr[1]);
+}
+/*
+** f32_2:
+** add x([0-9])+, x0, #?8
+** ld1 {v0\.d}\[1\], \[x\1\]
+** ret
+*/
+float32x4_t f32_2(float32x2_t a0, float32x2_t *ptr) {
+ return vcombine_f32 (a0, ptr[1]);
+}
+/*
+** f32_3:
+** ldr d0, \[x0\], #?16
+** ld1 {v0\.d}\[1\], \[x0\]
+** ret
+*/
+float32x4_t f32_3(float32x2_t *ptr) {
+ return vcombine_f32 (ptr[0], ptr[2]);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vec-init-13.c b/gcc/testsuite/gcc.target/aarch64/vec-init-13.c
new file mode 100644
index 0000000..d0f88cb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vec-init-13.c
@@ -0,0 +1,123 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
+
+#include <arm_neon.h>
+
+/*
+** s64q_1:
+** fmov d0, x0
+** ret
+*/
+int64x2_t s64q_1(int64_t a0) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int64x2_t) { 0, a0 };
+ else
+ return (int64x2_t) { a0, 0 };
+}
+/*
+** s64q_2:
+** ldr d0, \[x0\]
+** ret
+*/
+int64x2_t s64q_2(int64_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int64x2_t) { 0, ptr[0] };
+ else
+ return (int64x2_t) { ptr[0], 0 };
+}
+/*
+** s64q_3:
+** ldr d0, \[x0, #?8\]
+** ret
+*/
+int64x2_t s64q_3(int64_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int64x2_t) { 0, ptr[1] };
+ else
+ return (int64x2_t) { ptr[1], 0 };
+}
+
+/*
+** f64q_1:
+** fmov d0, d0
+** ret
+*/
+float64x2_t f64q_1(float64_t a0) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (float64x2_t) { 0, a0 };
+ else
+ return (float64x2_t) { a0, 0 };
+}
+/*
+** f64q_2:
+** ldr d0, \[x0\]
+** ret
+*/
+float64x2_t f64q_2(float64_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (float64x2_t) { 0, ptr[0] };
+ else
+ return (float64x2_t) { ptr[0], 0 };
+}
+/*
+** f64q_3:
+** ldr d0, \[x0, #?8\]
+** ret
+*/
+float64x2_t f64q_3(float64_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (float64x2_t) { 0, ptr[1] };
+ else
+ return (float64x2_t) { ptr[1], 0 };
+}
+
+/*
+** s32q_1:
+** fmov d0, d0
+** ret
+*/
+int32x4_t s32q_1(int32x2_t a0, int32x2_t a1) {
+ return vcombine_s32 (a0, (int32x2_t) { 0, 0 });
+}
+/*
+** s32q_2:
+** ldr d0, \[x0\]
+** ret
+*/
+int32x4_t s32q_2(int32x2_t *ptr) {
+ return vcombine_s32 (ptr[0], (int32x2_t) { 0, 0 });
+}
+/*
+** s32q_3:
+** ldr d0, \[x0, #?8\]
+** ret
+*/
+int32x4_t s32q_3(int32x2_t *ptr) {
+ return vcombine_s32 (ptr[1], (int32x2_t) { 0, 0 });
+}
+
+/*
+** f32q_1:
+** fmov d0, d0
+** ret
+*/
+float32x4_t f32q_1(float32x2_t a0, float32x2_t a1) {
+ return vcombine_f32 (a0, (float32x2_t) { 0, 0 });
+}
+/*
+** f32q_2:
+** ldr d0, \[x0\]
+** ret
+*/
+float32x4_t f32q_2(float32x2_t *ptr) {
+ return vcombine_f32 (ptr[0], (float32x2_t) { 0, 0 });
+}
+/*
+** f32q_3:
+** ldr d0, \[x0, #?8\]
+** ret
+*/
+float32x4_t f32q_3(float32x2_t *ptr) {
+ return vcombine_f32 (ptr[1], (float32x2_t) { 0, 0 });
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vec-init-14.c b/gcc/testsuite/gcc.target/aarch64/vec-init-14.c
new file mode 100644
index 0000000..0287508
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vec-init-14.c
@@ -0,0 +1,123 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
+
+#include <arm_neon.h>
+
+void ext();
+
+/*
+** s32_1:
+** fmov s0, w0
+** ins v0\.s\[1\], w1
+** ret
+*/
+int32x2_t s32_1(int32_t a0, int32_t a1) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int32x2_t) { a1, a0 };
+ else
+ return (int32x2_t) { a0, a1 };
+}
+/*
+** s32_2:
+** fmov s0, w0
+** ld1 {v0\.s}\[1\], \[x1\]
+** ret
+*/
+int32x2_t s32_2(int32_t a0, int32_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int32x2_t) { ptr[0], a0 };
+ else
+ return (int32x2_t) { a0, ptr[0] };
+}
+/*
+** s32_3:
+** ldr s0, \[x0\]
+** ins v0\.s\[1\], w1
+** ret
+*/
+int32x2_t s32_3(int32_t *ptr, int32_t a1) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int32x2_t) { a1, ptr[0] };
+ else
+ return (int32x2_t) { ptr[0], a1 };
+}
+/*
+** s32_4:
+** stp w1, w2, \[x0\]
+** ret
+*/
+void s32_4(int32x2_t *res, int32_t a0, int32_t a1) {
+ res[0] = (int32x2_t) { a0, a1 };
+}
+/*
+** s32_5:
+** stp w1, w2, \[x0, #?4\]
+** ret
+*/
+void s32_5(uintptr_t res, int32_t a0, int32_t a1) {
+ *(int32x2_t *)(res + 4) = (int32x2_t) { a0, a1 };
+}
+/* Currently uses d8 to hold res across the call. */
+int32x2_t s32_6(int32_t a0, int32_t a1) {
+ int32x2_t res = { a0, a1 };
+ ext ();
+ return res;
+}
+
+/*
+** f32_1:
+** ins v0\.s\[1\], v1\.s\[0\]
+** ret
+*/
+float32x2_t f32_1(float32_t a0, float32_t a1) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (float32x2_t) { a1, a0 };
+ else
+ return (float32x2_t) { a0, a1 };
+}
+/*
+** f32_2:
+** ld1 {v0\.s}\[1\], \[x0\]
+** ret
+*/
+float32x2_t f32_2(float32_t a0, float32_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (float32x2_t) { ptr[0], a0 };
+ else
+ return (float32x2_t) { a0, ptr[0] };
+}
+/*
+** f32_3:
+** ldr s0, \[x0\]
+** ins v0\.s\[1\], v1\.s\[0\]
+** ret
+*/
+float32x2_t f32_3(float32_t a0, float32_t a1, float32_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (float32x2_t) { a1, ptr[0] };
+ else
+ return (float32x2_t) { ptr[0], a1 };
+}
+/*
+** f32_4:
+** stp s0, s1, \[x0\]
+** ret
+*/
+void f32_4(float32x2_t *res, float32_t a0, float32_t a1) {
+ res[0] = (float32x2_t) { a0, a1 };
+}
+/*
+** f32_5:
+** stp s0, s1, \[x0, #?4\]
+** ret
+*/
+void f32_5(uintptr_t res, float32_t a0, float32_t a1) {
+ *(float32x2_t *)(res + 4) = (float32x2_t) { a0, a1 };
+}
+/* Currently uses d8 to hold res across the call. */
+float32x2_t f32_6(float32_t a0, float32_t a1) {
+ float32x2_t res = { a0, a1 };
+ ext ();
+ return res;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vec-init-15.c b/gcc/testsuite/gcc.target/aarch64/vec-init-15.c
new file mode 100644
index 0000000..82f0a8f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vec-init-15.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+#include <arm_neon.h>
+
+int32x2_t f1(int32_t *x, int c) {
+ return c ? (int32x2_t) { x[0], x[2] } : (int32x2_t) { 0, 0 };
+}
+
+int32x2_t f2(int32_t *x, int i0, int i1, int c) {
+ return c ? (int32x2_t) { x[i0], x[i1] } : (int32x2_t) { 0, 0 };
+}
+
+/* { dg-final { scan-assembler-times {\t(?:ldr\ts[0-9]+|ld1\t)} 4 } } */
+/* { dg-final { scan-assembler-not {\tldr\tw} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vec-init-16.c b/gcc/testsuite/gcc.target/aarch64/vec-init-16.c
new file mode 100644
index 0000000..e00aec7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vec-init-16.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+#include <arm_neon.h>
+
+void f1(int32x2_t *res, int32_t *x, int c0, int c1) {
+ res[0] = (int32x2_t) { c0 ? x[0] : 0, c1 ? x[2] : 0 };
+}
+
+/* { dg-final { scan-assembler-times {\tldr\tw[0-9]+} 2 } } */
+/* { dg-final { scan-assembler {\tstp\tw[0-9]+, w[0-9]+} } } */
+/* { dg-final { scan-assembler-not {\tldr\ts} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vec-init-17.c b/gcc/testsuite/gcc.target/aarch64/vec-init-17.c
new file mode 100644
index 0000000..86191b3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vec-init-17.c
@@ -0,0 +1,73 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
+
+#include <arm_neon.h>
+
+/*
+** s32_1:
+** fmov s0, w0
+** ret
+*/
+int32x2_t s32_1(int32_t a0) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int32x2_t) { 0, a0 };
+ else
+ return (int32x2_t) { a0, 0 };
+}
+/*
+** s32_2:
+** ldr s0, \[x0\]
+** ret
+*/
+int32x2_t s32_2(int32_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int32x2_t) { 0, ptr[0] };
+ else
+ return (int32x2_t) { ptr[0], 0 };
+}
+/*
+** s32_3:
+** ldr s0, \[x0, #?4\]
+** ret
+*/
+int32x2_t s32_3(int32_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int32x2_t) { 0, ptr[1] };
+ else
+ return (int32x2_t) { ptr[1], 0 };
+}
+
+/*
+** f32_1:
+** fmov s0, s0
+** ret
+*/
+float32x2_t f32_1(float32_t a0) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (float32x2_t) { 0, a0 };
+ else
+ return (float32x2_t) { a0, 0 };
+}
+/*
+** f32_2:
+** ldr s0, \[x0\]
+** ret
+*/
+float32x2_t f32_2(float32_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (float32x2_t) { 0, ptr[0] };
+ else
+ return (float32x2_t) { ptr[0], 0 };
+}
+/*
+** f32_3:
+** ldr s0, \[x0, #?4\]
+** ret
+*/
+float32x2_t f32_3(float32_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (float32x2_t) { 0, ptr[1] };
+ else
+ return (float32x2_t) { ptr[1], 0 };
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vec-init-6.c b/gcc/testsuite/gcc.target/aarch64/vec-init-6.c
new file mode 100644
index 0000000..9645015
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vec-init-6.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+#include <arm_neon.h>
+
+int64_t s64[2];
+float64_t f64[2];
+
+int64x2_t test_s64() { return (int64x2_t) { s64[0], s64[1] }; }
+float64x2_t test_f64() { return (float64x2_t) { f64[0], f64[1] }; }
+
+/* { dg-final { scan-assembler-not {\tins\t} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vec-init-7.c b/gcc/testsuite/gcc.target/aarch64/vec-init-7.c
new file mode 100644
index 0000000..7958952
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vec-init-7.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O -mstrict-align" } */
+
+#include <arm_neon.h>
+
+int64_t s64[2] __attribute__((aligned(16)));
+float64_t f64[2] __attribute__((aligned(16)));
+
+int64x2_t test_s64() { return (int64x2_t) { s64[0], s64[1] }; }
+float64x2_t test_f64() { return (float64x2_t) { f64[0], f64[1] }; }
+
+/* { dg-final { scan-assembler-not {\tins\t} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vec-init-8.c b/gcc/testsuite/gcc.target/aarch64/vec-init-8.c
new file mode 100644
index 0000000..18f8afe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vec-init-8.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+#include <arm_neon.h>
+
+int64x2_t f1(int64_t *ptr) {
+ int64_t x = *ptr;
+ asm volatile ("" ::: "memory");
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int64x2_t) { 0, x };
+ else
+ return (int64x2_t) { x, 0 };
+}
+
+/* { dg-final { scan-assembler {\tldr\td0, \[x0\]\n} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vec-init-9.c b/gcc/testsuite/gcc.target/aarch64/vec-init-9.c
new file mode 100644
index 0000000..8f68e06a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vec-init-9.c
@@ -0,0 +1,267 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
+
+#include <arm_neon.h>
+
+void ext();
+
+/*
+** s64q_1:
+** fmov d0, x0
+** ins v0\.d\[1\], x1
+** ret
+*/
+int64x2_t s64q_1(int64_t a0, int64_t a1) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int64x2_t) { a1, a0 };
+ else
+ return (int64x2_t) { a0, a1 };
+}
+/*
+** s64q_2:
+** fmov d0, x0
+** ld1 {v0\.d}\[1\], \[x1\]
+** ret
+*/
+int64x2_t s64q_2(int64_t a0, int64_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int64x2_t) { ptr[0], a0 };
+ else
+ return (int64x2_t) { a0, ptr[0] };
+}
+/*
+** s64q_3:
+** ldr d0, \[x0\]
+** ins v0\.d\[1\], x1
+** ret
+*/
+int64x2_t s64q_3(int64_t *ptr, int64_t a1) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (int64x2_t) { a1, ptr[0] };
+ else
+ return (int64x2_t) { ptr[0], a1 };
+}
+/*
+** s64q_4:
+** stp x1, x2, \[x0\]
+** ret
+*/
+void s64q_4(int64x2_t *res, int64_t a0, int64_t a1) {
+ res[0] = (int64x2_t) { a0, a1 };
+}
+/*
+** s64q_5:
+** stp x1, x2, \[x0, #?8\]
+** ret
+*/
+void s64q_5(uintptr_t res, int64_t a0, int64_t a1) {
+ *(int64x2_t *)(res + 8) = (int64x2_t) { a0, a1 };
+}
+/*
+** s64q_6:
+** ...
+** stp x0, x1, .*
+** ...
+** ldr q0, .*
+** ...
+** ret
+*/
+int64x2_t s64q_6(int64_t a0, int64_t a1) {
+ int64x2_t res = { a0, a1 };
+ ext ();
+ return res;
+}
+
+/*
+** f64q_1:
+** ins v0\.d\[1\], v1\.d\[0\]
+** ret
+*/
+float64x2_t f64q_1(float64_t a0, float64_t a1) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (float64x2_t) { a1, a0 };
+ else
+ return (float64x2_t) { a0, a1 };
+}
+/*
+** f64q_2:
+** ld1 {v0\.d}\[1\], \[x0\]
+** ret
+*/
+float64x2_t f64q_2(float64_t a0, float64_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (float64x2_t) { ptr[0], a0 };
+ else
+ return (float64x2_t) { a0, ptr[0] };
+}
+/*
+** f64q_3:
+** ldr d0, \[x0\]
+** ins v0\.d\[1\], v1\.d\[0\]
+** ret
+*/
+float64x2_t f64q_3(float64_t a0, float64_t a1, float64_t *ptr) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (float64x2_t) { a1, ptr[0] };
+ else
+ return (float64x2_t) { ptr[0], a1 };
+}
+/*
+** f64q_4:
+** stp d0, d1, \[x0\]
+** ret
+*/
+void f64q_4(float64x2_t *res, float64_t a0, float64_t a1) {
+ res[0] = (float64x2_t) { a0, a1 };
+}
+/*
+** f64q_5:
+** stp d0, d1, \[x0, #?8\]
+** ret
+*/
+void f64q_5(uintptr_t res, float64_t a0, float64_t a1) {
+ *(float64x2_t *)(res + 8) = (float64x2_t) { a0, a1 };
+}
+/*
+** f64q_6:
+** ...
+** stp d0, d1, .*
+** ...
+** ldr q0, .*
+** ...
+** ret
+*/
+float64x2_t f64q_6(float64_t a0, float64_t a1) {
+ float64x2_t res = { a0, a1 };
+ ext ();
+ return res;
+}
+
+/*
+** s32q_1:
+** ins v0\.d\[1\], v1\.d\[0\]
+** ret
+*/
+int32x4_t s32q_1(int32x2_t a0, int32x2_t a1) {
+ return vcombine_s32 (a0, a1);
+}
+/*
+** s32q_2:
+** ld1 {v0\.d}\[1\], \[x0\]
+** ret
+*/
+int32x4_t s32q_2(int32x2_t a0, int32x2_t *ptr) {
+ return vcombine_s32 (a0, ptr[0]);
+}
+/*
+** s32q_3:
+** ldr d0, \[x0\]
+** ins v0\.d\[1\], v1\.d\[0\]
+** ret
+*/
+int32x4_t s32q_3(int32x2_t a0, int32x2_t a1, int32x2_t *ptr) {
+ return vcombine_s32 (ptr[0], a1);
+}
+/*
+** s32q_4:
+** stp d0, d1, \[x0\]
+** ret
+*/
+void s32q_4(int32x4_t *res, int32x2_t a0, int32x2_t a1) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ res[0] = vcombine_s32 (a1, a0);
+ else
+ res[0] = vcombine_s32 (a0, a1);
+}
+/*
+** s32q_5:
+** stp d0, d1, \[x0, #?8\]
+** ret
+*/
+void s32q_5(uintptr_t res, int32x2_t a0, int32x2_t a1) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ *(int32x4_t *)(res + 8) = vcombine_s32 (a1, a0);
+ else
+ *(int32x4_t *)(res + 8) = vcombine_s32 (a0, a1);
+}
+/*
+** s32q_6:
+** ...
+** stp d0, d1, .*
+** ...
+** ldr q0, .*
+** ...
+** ret
+*/
+int32x4_t s32q_6(int32x2_t a0, int32x2_t a1) {
+ int32x4_t res = (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ ? vcombine_s32 (a1, a0)
+ : vcombine_s32 (a0, a1));
+ ext ();
+ return res;
+}
+
+/*
+** f32q_1:
+** ins v0\.d\[1\], v1\.d\[0\]
+** ret
+*/
+float32x4_t f32q_1(float32x2_t a0, float32x2_t a1) {
+ return vcombine_f32 (a0, a1);
+}
+/*
+** f32q_2:
+** ld1 {v0\.d}\[1\], \[x0\]
+** ret
+*/
+float32x4_t f32q_2(float32x2_t a0, float32x2_t *ptr) {
+ return vcombine_f32 (a0, ptr[0]);
+}
+/*
+** f32q_3:
+** ldr d0, \[x0\]
+** ins v0\.d\[1\], v1\.d\[0\]
+** ret
+*/
+float32x4_t f32q_3(float32x2_t a0, float32x2_t a1, float32x2_t *ptr) {
+ return vcombine_f32 (ptr[0], a1);
+}
+/*
+** f32q_4:
+** stp d0, d1, \[x0\]
+** ret
+*/
+void f32q_4(float32x4_t *res, float32x2_t a0, float32x2_t a1) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ res[0] = vcombine_f32 (a1, a0);
+ else
+ res[0] = vcombine_f32 (a0, a1);
+}
+/*
+** f32q_5:
+** stp d0, d1, \[x0, #?8\]
+** ret
+*/
+void f32q_5(uintptr_t res, float32x2_t a0, float32x2_t a1) {
+ if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ *(float32x4_t *)(res + 8) = vcombine_f32 (a1, a0);
+ else
+ *(float32x4_t *)(res + 8) = vcombine_f32 (a0, a1);
+}
+/*
+** f32q_6:
+** ...
+** stp d0, d1, .*
+** ...
+** ldr q0, .*
+** ...
+** ret
+*/
+float32x4_t f32q_6(float32x2_t a0, float32x2_t a1) {
+ float32x4_t res = (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ ? vcombine_f32 (a1, a0)
+ : vcombine_f32 (a0, a1));
+ ext ();
+ return res;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-cse-codegen.c b/gcc/testsuite/gcc.target/aarch64/vect-cse-codegen.c
new file mode 100644
index 0000000..d025e98
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-cse-codegen.c
@@ -0,0 +1,97 @@
+/* { dg-do compile { target { lp64 } } } */
+/* { dg-additional-options "-O3 -march=armv8.2-a+crypto -fno-schedule-insns -fno-schedule-insns2 -mcmodel=small" } */
+/* { dg-final { check-function-bodies "**" "" "" { target { le } } } } */
+
+#include <arm_neon.h>
+
+/*
+**test1:
+** adrp x[0-9]+, .LC[0-9]+
+** ldr q[0-9]+, \[x[0-9]+, #:lo12:.LC[0-9]+\]
+** add v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d
+** str q[0-9]+, \[x[0-9]+\]
+** fmov x[0-9]+, d[0-9]+
+** orr x[0-9]+, x[0-9]+, x[0-9]+
+** ret
+*/
+
+uint64_t
+test1 (uint64_t a, uint64x2_t b, uint64x2_t* rt)
+{
+ uint64_t arr[2] = { 0x0942430810234076UL, 0x0942430810234076UL};
+ uint64_t res = a | arr[0];
+ uint64x2_t val = vld1q_u64 (arr);
+ *rt = vaddq_u64 (val, b);
+ return res;
+}
+
+/*
+**test2:
+** adrp x[0-9]+, .LC[0-1]+
+** ldr q[0-9]+, \[x[0-9]+, #:lo12:.LC[0-9]+\]
+** add v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d
+** str q[0-9]+, \[x[0-9]+\]
+** fmov x[0-9]+, d[0-9]+
+** orr x[0-9]+, x[0-9]+, x[0-9]+
+** ret
+*/
+
+uint64_t
+test2 (uint64_t a, uint64x2_t b, uint64x2_t* rt)
+{
+ uint64x2_t val = vdupq_n_u64 (0x0424303242234076UL);
+ uint64_t arr = vgetq_lane_u64 (val, 0);
+ uint64_t res = a | arr;
+ *rt = vaddq_u64 (val, b);
+ return res;
+}
+
+/*
+**test3:
+** adrp x[0-9]+, .LC[0-9]+
+** ldr q[0-9]+, \[x[0-9]+, #:lo12:.LC[0-9]+\]
+** add v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
+** str q[0-9]+, \[x1\]
+** fmov w[0-9]+, s[0-9]+
+** orr w[0-9]+, w[0-9]+, w[0-9]+
+** ret
+*/
+
+uint32_t
+test3 (uint32_t a, uint32x4_t b, uint32x4_t* rt)
+{
+ uint32_t arr[4] = { 0x094243, 0x094243, 0x094243, 0x094243 };
+ uint32_t res = a | arr[0];
+ uint32x4_t val = vld1q_u32 (arr);
+ *rt = vaddq_u32 (val, b);
+ return res;
+}
+
+/*
+**test4:
+** ushr v[0-9]+.16b, v[0-9]+.16b, 7
+** mov x[0-9]+, 16512
+** movk x[0-9]+, 0x1020, lsl 16
+** movk x[0-9]+, 0x408, lsl 32
+** movk x[0-9]+, 0x102, lsl 48
+** fmov d[0-9]+, x[0-9]+
+** pmull v[0-9]+.1q, v[0-9]+.1d, v[0-9]+.1d
+** dup v[0-9]+.2d, v[0-9]+.d\[0\]
+** pmull2 v[0-9]+.1q, v[0-9]+.2d, v[0-9]+.2d
+** trn2 v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b
+** umov w[0-9]+, v[0-9]+.h\[3\]
+** ret
+*/
+
+uint64_t
+test4 (uint8x16_t input)
+{
+ uint8x16_t bool_input = vshrq_n_u8(input, 7);
+ poly64x2_t mask = vdupq_n_p64(0x0102040810204080UL);
+ poly64_t prodL = vmull_p64((poly64_t)vgetq_lane_p64((poly64x2_t)bool_input, 0),
+ vgetq_lane_p64(mask, 0));
+ poly64_t prodH = vmull_high_p64((poly64x2_t)bool_input, mask);
+ uint8x8_t res = vtrn2_u8((uint8x8_t)prodL, (uint8x8_t)prodH);
+ return vget_lane_u16((uint16x4_t)res, 3);
+}
+
diff --git a/gcc/testsuite/gcc.target/aarch64/vector_structure_intrinsics.c b/gcc/testsuite/gcc.target/aarch64/vector_structure_intrinsics.c
index 89e9de1..100739a 100644
--- a/gcc/testsuite/gcc.target/aarch64/vector_structure_intrinsics.c
+++ b/gcc/testsuite/gcc.target/aarch64/vector_structure_intrinsics.c
@@ -17,6 +17,14 @@ TEST_TBL (vqtbl2q, int8x16_t, int8x16x2_t, uint8x16_t, s8)
TEST_TBL (vqtbl2q, uint8x16_t, uint8x16x2_t, uint8x16_t, u8)
TEST_TBL (vqtbl2q, poly8x16_t, poly8x16x2_t, uint8x16_t, p8)
+TEST_TBL (vqtbl3, int8x8_t, int8x16x3_t, uint8x8_t, s8)
+TEST_TBL (vqtbl3, uint8x8_t, uint8x16x3_t, uint8x8_t, u8)
+TEST_TBL (vqtbl3, poly8x8_t, poly8x16x3_t, uint8x8_t, p8)
+
+TEST_TBL (vqtbl3q, int8x16_t, int8x16x3_t, uint8x16_t, s8)
+TEST_TBL (vqtbl3q, uint8x16_t, uint8x16x3_t, uint8x16_t, u8)
+TEST_TBL (vqtbl3q, poly8x16_t, poly8x16x3_t, uint8x16_t, p8)
+
TEST_TBL (vqtbl4, int8x8_t, int8x16x4_t, uint8x8_t, s8)
TEST_TBL (vqtbl4, uint8x8_t, uint8x16x4_t, uint8x8_t, u8)
TEST_TBL (vqtbl4, poly8x8_t, poly8x16x4_t, uint8x8_t, p8)
@@ -25,62 +33,35 @@ TEST_TBL (vqtbl4q, int8x16_t, int8x16x4_t, uint8x16_t, s8)
TEST_TBL (vqtbl4q, uint8x16_t, uint8x16x4_t, uint8x16_t, u8)
TEST_TBL (vqtbl4q, poly8x16_t, poly8x16x4_t, uint8x16_t, p8)
-#define TEST_TBL3(name, rettype, tbltype, idxtype, ts) \
- rettype test_ ## name ## _ ## ts (idxtype a, tbltype b) \
- { \
- return name ## _ ## ts (b, a); \
- }
-
-TEST_TBL3 (vqtbl3, int8x8_t, int8x16x3_t, uint8x8_t, s8)
-TEST_TBL3 (vqtbl3, uint8x8_t, uint8x16x3_t, uint8x8_t, u8)
-TEST_TBL3 (vqtbl3, poly8x8_t, poly8x16x3_t, uint8x8_t, p8)
-
-TEST_TBL3 (vqtbl3q, int8x16_t, int8x16x3_t, uint8x16_t, s8)
-TEST_TBL3 (vqtbl3q, uint8x16_t, uint8x16x3_t, uint8x16_t, u8)
-TEST_TBL3 (vqtbl3q, poly8x16_t, poly8x16x3_t, uint8x16_t, p8)
-
-#define TEST_TBX2(name, rettype, tbltype, idxtype, ts) \
- rettype test_ ## name ## _ ## ts (rettype a, idxtype b, tbltype c) \
- { \
- return name ## _ ## ts (a, c, b); \
- }
-
-TEST_TBX2 (vqtbx2, int8x8_t, int8x16x2_t, uint8x8_t, s8)
-TEST_TBX2 (vqtbx2, uint8x8_t, uint8x16x2_t, uint8x8_t, u8)
-TEST_TBX2 (vqtbx2, poly8x8_t, poly8x16x2_t, uint8x8_t, p8)
-
-TEST_TBX2 (vqtbx2q, int8x16_t, int8x16x2_t, uint8x16_t, s8)
-TEST_TBX2 (vqtbx2q, uint8x16_t, uint8x16x2_t, uint8x16_t, u8)
-TEST_TBX2 (vqtbx2q, poly8x16_t, poly8x16x2_t, uint8x16_t, p8)
-
-#define TEST_TBX3(name, rettype, tbltype, idxtype, ts) \
+#define TEST_TBX(name, rettype, tbltype, idxtype, ts) \
rettype test_ ## name ## _ ## ts (rettype a, tbltype b, idxtype c) \
{ \
return name ## _ ## ts (a, b, c); \
}
-TEST_TBX3 (vqtbx3, int8x8_t, int8x16x3_t, uint8x8_t, s8)
-TEST_TBX3 (vqtbx3, uint8x8_t, uint8x16x3_t, uint8x8_t, u8)
-TEST_TBX3 (vqtbx3, poly8x8_t, poly8x16x3_t, uint8x8_t, p8)
+TEST_TBX (vqtbx2, int8x8_t, int8x16x2_t, uint8x8_t, s8)
+TEST_TBX (vqtbx2, uint8x8_t, uint8x16x2_t, uint8x8_t, u8)
+TEST_TBX (vqtbx2, poly8x8_t, poly8x16x2_t, uint8x8_t, p8)
-TEST_TBX3 (vqtbx3q, int8x16_t, int8x16x3_t, uint8x16_t, s8)
-TEST_TBX3 (vqtbx3q, uint8x16_t, uint8x16x3_t, uint8x16_t, u8)
-TEST_TBX3 (vqtbx3q, poly8x16_t, poly8x16x3_t, uint8x16_t, p8)
+TEST_TBX (vqtbx2q, int8x16_t, int8x16x2_t, uint8x16_t, s8)
+TEST_TBX (vqtbx2q, uint8x16_t, uint8x16x2_t, uint8x16_t, u8)
+TEST_TBX (vqtbx2q, poly8x16_t, poly8x16x2_t, uint8x16_t, p8)
-#define TEST_TBX4(name, rettype, tbltype, idxtype, ts) \
- rettype test_ ## name ## _ ## ts (rettype a, idxtype b, idxtype dummy1, \
- idxtype dummy2, tbltype c) \
- { \
- return name ## _ ## ts (a, c, b); \
- }
+TEST_TBX (vqtbx3, int8x8_t, int8x16x3_t, uint8x8_t, s8)
+TEST_TBX (vqtbx3, uint8x8_t, uint8x16x3_t, uint8x8_t, u8)
+TEST_TBX (vqtbx3, poly8x8_t, poly8x16x3_t, uint8x8_t, p8)
+
+TEST_TBX (vqtbx3q, int8x16_t, int8x16x3_t, uint8x16_t, s8)
+TEST_TBX (vqtbx3q, uint8x16_t, uint8x16x3_t, uint8x16_t, u8)
+TEST_TBX (vqtbx3q, poly8x16_t, poly8x16x3_t, uint8x16_t, p8)
-TEST_TBX4 (vqtbx4, int8x8_t, int8x16x4_t, uint8x8_t, s8)
-TEST_TBX4 (vqtbx4, uint8x8_t, uint8x16x4_t, uint8x8_t, u8)
-TEST_TBX4 (vqtbx4, poly8x8_t, poly8x16x4_t, uint8x8_t, p8)
+TEST_TBX (vqtbx4, int8x8_t, int8x16x4_t, uint8x8_t, s8)
+TEST_TBX (vqtbx4, uint8x8_t, uint8x16x4_t, uint8x8_t, u8)
+TEST_TBX (vqtbx4, poly8x8_t, poly8x16x4_t, uint8x8_t, p8)
-TEST_TBX4 (vqtbx4q, int8x16_t, int8x16x4_t, uint8x16_t, s8)
-TEST_TBX4 (vqtbx4q, uint8x16_t, uint8x16x4_t, uint8x16_t, u8)
-TEST_TBX4 (vqtbx4q, poly8x16_t, poly8x16x4_t, uint8x16_t, p8)
+TEST_TBX (vqtbx4q, int8x16_t, int8x16x4_t, uint8x16_t, s8)
+TEST_TBX (vqtbx4q, uint8x16_t, uint8x16x4_t, uint8x16_t, u8)
+TEST_TBX (vqtbx4q, poly8x16_t, poly8x16x4_t, uint8x16_t, p8)
#define TEST_STX(name, tbltype, ptrtype, ts) \
void test_ ## name ## _ ## ts (ptrtype a, tbltype b) \
@@ -88,21 +69,21 @@ TEST_TBX4 (vqtbx4q, poly8x16_t, poly8x16x4_t, uint8x16_t, p8)
name ## _ ## ts (a, b); \
}
-TEST_STX (vst4q, int8x16x4_t, int8_t*, s8);
-TEST_STX (vst4q, uint8x16x4_t, uint8_t*, u8);
-TEST_STX (vst4q, poly8x16x4_t, poly8_t*, p8);
-TEST_STX (vst4q, int16x8x4_t, int16_t*, s16);
-TEST_STX (vst4q, uint16x8x4_t, uint16_t*, u16);
-TEST_STX (vst4q, poly16x8x4_t, poly16_t*, p16);
-TEST_STX (vst4q, float16x8x4_t, float16_t*, f16);
-TEST_STX (vst4q, bfloat16x8x4_t, bfloat16_t*, bf16);
-TEST_STX (vst4q, int32x4x4_t, int32_t*, s32);
-TEST_STX (vst4q, uint32x4x4_t, uint32_t*, u32);
-TEST_STX (vst4q, float32x4x4_t, float32_t*, f32);
-TEST_STX (vst4q, int64x2x4_t, int64_t*, s64);
-TEST_STX (vst4q, uint64x2x4_t, uint64_t*, u64);
-TEST_STX (vst4q, float64x2x4_t, float64_t*, f64);
-TEST_STX (vst4q, poly64x2x4_t, poly64_t*, p64);
+TEST_STX (vst2, int8x8x2_t, int8_t*, s8);
+TEST_STX (vst2, uint8x8x2_t, uint8_t*, u8);
+TEST_STX (vst2, poly8x8x2_t, poly8_t*, p8);
+TEST_STX (vst2, int16x4x2_t, int16_t*, s16);
+TEST_STX (vst2, uint16x4x2_t, uint16_t*, u16);
+TEST_STX (vst2, poly16x4x2_t, poly16_t*, p16);
+TEST_STX (vst2, float16x4x2_t, float16_t*, f16);
+TEST_STX (vst2, bfloat16x4x2_t, bfloat16_t*, bf16);
+TEST_STX (vst2, int32x2x2_t, int32_t*, s32);
+TEST_STX (vst2, uint32x2x2_t, uint32_t*, u32);
+TEST_STX (vst2, float32x2x2_t, float32_t*, f32);
+TEST_STX (vst2, int64x1x2_t, int64_t*, s64);
+TEST_STX (vst2, uint64x1x2_t, uint64_t*, u64);
+TEST_STX (vst2, float64x1x2_t, float64_t*, f64);
+TEST_STX (vst2, poly64x1x2_t, poly64_t*, p64);
TEST_STX (vst2q, int8x16x2_t, int8_t*, s8);
TEST_STX (vst2q, uint8x16x2_t, uint8_t*, u8);
@@ -120,49 +101,193 @@ TEST_STX (vst2q, uint64x2x2_t, uint64_t*, u64);
TEST_STX (vst2q, float64x2x2_t, float64_t*, f64);
TEST_STX (vst2q, poly64x2x2_t, poly64_t*, p64);
-#define TEST_ST3(name, tbltype, ptrtype, ts) \
- void test_ ## name ## _ ## ts (ptrtype a, int8x8_t dummy, tbltype b) \
+TEST_STX (vst3, int8x8x3_t, int8_t*, s8);
+TEST_STX (vst3, uint8x8x3_t, uint8_t*, u8);
+TEST_STX (vst3, poly8x8x3_t, poly8_t*, p8);
+TEST_STX (vst3, int16x4x3_t, int16_t*, s16);
+TEST_STX (vst3, uint16x4x3_t, uint16_t*, u16);
+TEST_STX (vst3, poly16x4x3_t, poly16_t*, p16);
+TEST_STX (vst3, float16x4x3_t, float16_t*, f16);
+TEST_STX (vst3, bfloat16x4x3_t, bfloat16_t*, bf16);
+TEST_STX (vst3, int32x2x3_t, int32_t*, s32);
+TEST_STX (vst3, uint32x2x3_t, uint32_t*, u32);
+TEST_STX (vst3, float32x2x3_t, float32_t*, f32);
+TEST_STX (vst3, int64x1x3_t, int64_t*, s64);
+TEST_STX (vst3, uint64x1x3_t, uint64_t*, u64);
+TEST_STX (vst3, float64x1x3_t, float64_t*, f64);
+TEST_STX (vst3, poly64x1x3_t, poly64_t*, p64);
+
+TEST_STX (vst3q, int8x16x3_t, int8_t*, s8);
+TEST_STX (vst3q, uint8x16x3_t, uint8_t*, u8);
+TEST_STX (vst3q, poly8x16x3_t, poly8_t*, p8);
+TEST_STX (vst3q, int16x8x3_t, int16_t*, s16);
+TEST_STX (vst3q, uint16x8x3_t, uint16_t*, u16);
+TEST_STX (vst3q, poly16x8x3_t, poly16_t*, p16);
+TEST_STX (vst3q, float16x8x3_t, float16_t*, f16);
+TEST_STX (vst3q, bfloat16x8x3_t, bfloat16_t*, bf16);
+TEST_STX (vst3q, int32x4x3_t, int32_t*, s32);
+TEST_STX (vst3q, uint32x4x3_t, uint32_t*, u32);
+TEST_STX (vst3q, float32x4x3_t, float32_t*, f32);
+TEST_STX (vst3q, int64x2x3_t, int64_t*, s64);
+TEST_STX (vst3q, uint64x2x3_t, uint64_t*, u64);
+TEST_STX (vst3q, float64x2x3_t, float64_t*, f64);
+TEST_STX (vst3q, poly64x2x3_t, poly64_t*, p64);
+
+TEST_STX (vst4, int8x8x4_t, int8_t*, s8);
+TEST_STX (vst4, uint8x8x4_t, uint8_t*, u8);
+TEST_STX (vst4, poly8x8x4_t, poly8_t*, p8);
+TEST_STX (vst4, int16x4x4_t, int16_t*, s16);
+TEST_STX (vst4, uint16x4x4_t, uint16_t*, u16);
+TEST_STX (vst4, poly16x4x4_t, poly16_t*, p16);
+TEST_STX (vst4, float16x4x4_t, float16_t*, f16);
+TEST_STX (vst4, bfloat16x4x4_t, bfloat16_t*, bf16);
+TEST_STX (vst4, int32x2x4_t, int32_t*, s32);
+TEST_STX (vst4, uint32x2x4_t, uint32_t*, u32);
+TEST_STX (vst4, float32x2x4_t, float32_t*, f32);
+TEST_STX (vst4, int64x1x4_t, int64_t*, s64);
+TEST_STX (vst4, uint64x1x4_t, uint64_t*, u64);
+TEST_STX (vst4, float64x1x4_t, float64_t*, f64);
+TEST_STX (vst4, poly64x1x4_t, poly64_t*, p64);
+
+TEST_STX (vst4q, int8x16x4_t, int8_t*, s8);
+TEST_STX (vst4q, uint8x16x4_t, uint8_t*, u8);
+TEST_STX (vst4q, poly8x16x4_t, poly8_t*, p8);
+TEST_STX (vst4q, int16x8x4_t, int16_t*, s16);
+TEST_STX (vst4q, uint16x8x4_t, uint16_t*, u16);
+TEST_STX (vst4q, poly16x8x4_t, poly16_t*, p16);
+TEST_STX (vst4q, float16x8x4_t, float16_t*, f16);
+TEST_STX (vst4q, bfloat16x8x4_t, bfloat16_t*, bf16);
+TEST_STX (vst4q, int32x4x4_t, int32_t*, s32);
+TEST_STX (vst4q, uint32x4x4_t, uint32_t*, u32);
+TEST_STX (vst4q, float32x4x4_t, float32_t*, f32);
+TEST_STX (vst4q, int64x2x4_t, int64_t*, s64);
+TEST_STX (vst4q, uint64x2x4_t, uint64_t*, u64);
+TEST_STX (vst4q, float64x2x4_t, float64_t*, f64);
+TEST_STX (vst4q, poly64x2x4_t, poly64_t*, p64);
+
+#define TEST_LDX(name, rettype, ptrtype, ts) \
+ rettype test_ ## name ## _ ## ts (ptrtype a) \
{ \
- name ## _ ## ts (a, b); \
+ return name ## _ ## ts (a); \
}
-TEST_ST3 (vst3q, int8x16x3_t, int8_t*, s8);
-TEST_ST3 (vst3q, uint8x16x3_t, uint8_t*, u8);
-TEST_ST3 (vst3q, poly8x16x3_t, poly8_t*, p8);
-TEST_ST3 (vst3q, int16x8x3_t, int16_t*, s16);
-TEST_ST3 (vst3q, uint16x8x3_t, uint16_t*, u16);
-TEST_ST3 (vst3q, poly16x8x3_t, poly16_t*, p16);
-TEST_ST3 (vst3q, float16x8x3_t, float16_t*, f16);
-TEST_ST3 (vst3q, bfloat16x8x3_t, bfloat16_t*, bf16);
-TEST_ST3 (vst3q, int32x4x3_t, int32_t*, s32);
-TEST_ST3 (vst3q, uint32x4x3_t, uint32_t*, u32);
-TEST_ST3 (vst3q, float32x4x3_t, float32_t*, f32);
-TEST_ST3 (vst3q, int64x2x3_t, int64_t*, s64);
-TEST_ST3 (vst3q, uint64x2x3_t, uint64_t*, u64);
-TEST_ST3 (vst3q, float64x2x3_t, float64_t*, f64);
-TEST_ST3 (vst3q, poly64x2x3_t, poly64_t*, p64);
+TEST_LDX (vld2, int8x8x2_t, int8_t*, s8);
+TEST_LDX (vld2, uint8x8x2_t, uint8_t*, u8);
+TEST_LDX (vld2, poly8x8x2_t, poly8_t*, p8);
+TEST_LDX (vld2, int16x4x2_t, int16_t*, s16);
+TEST_LDX (vld2, uint16x4x2_t, uint16_t*, u16);
+TEST_LDX (vld2, poly16x4x2_t, poly16_t*, p16);
+TEST_LDX (vld2, float16x4x2_t, float16_t*, f16);
+TEST_LDX (vld2, bfloat16x4x2_t, bfloat16_t*, bf16);
+TEST_LDX (vld2, int32x2x2_t, int32_t*, s32);
+TEST_LDX (vld2, uint32x2x2_t, uint32_t*, u32);
+TEST_LDX (vld2, float32x2x2_t, float32_t*, f32);
+TEST_LDX (vld2, int64x1x2_t, int64_t*, s64);
+TEST_LDX (vld2, uint64x1x2_t, uint64_t*, u64);
+TEST_LDX (vld2, float64x1x2_t, float64_t*, f64);
+TEST_LDX (vld2, poly64x1x2_t, poly64_t*, p64);
+
+TEST_LDX (vld2q, int8x16x2_t, int8_t*, s8);
+TEST_LDX (vld2q, uint8x16x2_t, uint8_t*, u8);
+TEST_LDX (vld2q, poly8x16x2_t, poly8_t*, p8);
+TEST_LDX (vld2q, int16x8x2_t, int16_t*, s16);
+TEST_LDX (vld2q, uint16x8x2_t, uint16_t*, u16);
+TEST_LDX (vld2q, poly16x8x2_t, poly16_t*, p16);
+TEST_LDX (vld2q, float16x8x2_t, float16_t*, f16);
+TEST_LDX (vld2q, bfloat16x8x2_t, bfloat16_t*, bf16);
+TEST_LDX (vld2q, int32x4x2_t, int32_t*, s32);
+TEST_LDX (vld2q, uint32x4x2_t, uint32_t*, u32);
+TEST_LDX (vld2q, float32x4x2_t, float32_t*, f32);
+TEST_LDX (vld2q, int64x2x2_t, int64_t*, s64);
+TEST_LDX (vld2q, uint64x2x2_t, uint64_t*, u64);
+TEST_LDX (vld2q, float64x2x2_t, float64_t*, f64);
+TEST_LDX (vld2q, poly64x2x2_t, poly64_t*, p64);
+
+TEST_LDX (vld3, int8x8x3_t, int8_t*, s8);
+TEST_LDX (vld3, uint8x8x3_t, uint8_t*, u8);
+TEST_LDX (vld3, poly8x8x3_t, poly8_t*, p8);
+TEST_LDX (vld3, int16x4x3_t, int16_t*, s16);
+TEST_LDX (vld3, uint16x4x3_t, uint16_t*, u16);
+TEST_LDX (vld3, poly16x4x3_t, poly16_t*, p16);
+TEST_LDX (vld3, float16x4x3_t, float16_t*, f16);
+TEST_LDX (vld3, bfloat16x4x3_t, bfloat16_t*, bf16);
+TEST_LDX (vld3, int32x2x3_t, int32_t*, s32);
+TEST_LDX (vld3, uint32x2x3_t, uint32_t*, u32);
+TEST_LDX (vld3, float32x2x3_t, float32_t*, f32);
+TEST_LDX (vld3, int64x1x3_t, int64_t*, s64);
+TEST_LDX (vld3, uint64x1x3_t, uint64_t*, u64);
+TEST_LDX (vld3, float64x1x3_t, float64_t*, f64);
+TEST_LDX (vld3, poly64x1x3_t, poly64_t*, p64);
+
+TEST_LDX (vld3q, int8x16x3_t, int8_t*, s8);
+TEST_LDX (vld3q, uint8x16x3_t, uint8_t*, u8);
+TEST_LDX (vld3q, poly8x16x3_t, poly8_t*, p8);
+TEST_LDX (vld3q, int16x8x3_t, int16_t*, s16);
+TEST_LDX (vld3q, uint16x8x3_t, uint16_t*, u16);
+TEST_LDX (vld3q, poly16x8x3_t, poly16_t*, p16);
+TEST_LDX (vld3q, float16x8x3_t, float16_t*, f16);
+TEST_LDX (vld3q, bfloat16x8x3_t, bfloat16_t*, bf16);
+TEST_LDX (vld3q, int32x4x3_t, int32_t*, s32);
+TEST_LDX (vld3q, uint32x4x3_t, uint32_t*, u32);
+TEST_LDX (vld3q, float32x4x3_t, float32_t*, f32);
+TEST_LDX (vld3q, int64x2x3_t, int64_t*, s64);
+TEST_LDX (vld3q, uint64x2x3_t, uint64_t*, u64);
+TEST_LDX (vld3q, float64x2x3_t, float64_t*, f64);
+TEST_LDX (vld3q, poly64x2x3_t, poly64_t*, p64);
+
+TEST_LDX (vld4, int8x8x4_t, int8_t*, s8);
+TEST_LDX (vld4, uint8x8x4_t, uint8_t*, u8);
+TEST_LDX (vld4, poly8x8x4_t, poly8_t*, p8);
+TEST_LDX (vld4, int16x4x4_t, int16_t*, s16);
+TEST_LDX (vld4, uint16x4x4_t, uint16_t*, u16);
+TEST_LDX (vld4, poly16x4x4_t, poly16_t*, p16);
+TEST_LDX (vld4, float16x4x4_t, float16_t*, f16);
+TEST_LDX (vld4, bfloat16x4x4_t, bfloat16_t*, bf16);
+TEST_LDX (vld4, int32x2x4_t, int32_t*, s32);
+TEST_LDX (vld4, uint32x2x4_t, uint32_t*, u32);
+TEST_LDX (vld4, float32x2x4_t, float32_t*, f32);
+TEST_LDX (vld4, int64x1x4_t, int64_t*, s64);
+TEST_LDX (vld4, uint64x1x4_t, uint64_t*, u64);
+TEST_LDX (vld4, float64x1x4_t, float64_t*, f64);
+TEST_LDX (vld4, poly64x1x4_t, poly64_t*, p64);
+
+TEST_LDX (vld4q, int8x16x4_t, int8_t*, s8);
+TEST_LDX (vld4q, uint8x16x4_t, uint8_t*, u8);
+TEST_LDX (vld4q, poly8x16x4_t, poly8_t*, p8);
+TEST_LDX (vld4q, int16x8x4_t, int16_t*, s16);
+TEST_LDX (vld4q, uint16x8x4_t, uint16_t*, u16);
+TEST_LDX (vld4q, poly16x8x4_t, poly16_t*, p16);
+TEST_LDX (vld4q, float16x8x4_t, float16_t*, f16);
+TEST_LDX (vld4q, bfloat16x8x4_t, bfloat16_t*, bf16);
+TEST_LDX (vld4q, int32x4x4_t, int32_t*, s32);
+TEST_LDX (vld4q, uint32x4x4_t, uint32_t*, u32);
+TEST_LDX (vld4q, float32x4x4_t, float32_t*, f32);
+TEST_LDX (vld4q, int64x2x4_t, int64_t*, s64);
+TEST_LDX (vld4q, uint64x2x4_t, uint64_t*, u64);
+TEST_LDX (vld4q, float64x2x4_t, float64_t*, f64);
+TEST_LDX (vld4q, poly64x2x4_t, poly64_t*, p64);
#define TEST_STX_LANE(name, tbltype, ptrtype, ts) \
void test_ ## name ## _ ## ts (ptrtype a, tbltype b) \
{ \
- name ## _ ## ts (a, b, 1); \
+ name ## _ ## ts (a, b, 0); \
}
-TEST_STX_LANE (vst4q_lane, int8x16x4_t, int8_t*, s8);
-TEST_STX_LANE (vst4q_lane, uint8x16x4_t, uint8_t*, u8);
-TEST_STX_LANE (vst4q_lane, poly8x16x4_t, poly8_t*, p8);
-TEST_STX_LANE (vst4q_lane, int16x8x4_t, int16_t*, s16);
-TEST_STX_LANE (vst4q_lane, uint16x8x4_t, uint16_t*, u16);
-TEST_STX_LANE (vst4q_lane, poly16x8x4_t, poly16_t*, p16);
-TEST_STX_LANE (vst4q_lane, float16x8x4_t, float16_t*, f16);
-TEST_STX_LANE (vst4q_lane, bfloat16x8x4_t, bfloat16_t*, bf16);
-TEST_STX_LANE (vst4q_lane, int32x4x4_t, int32_t*, s32);
-TEST_STX_LANE (vst4q_lane, uint32x4x4_t, uint32_t*, u32);
-TEST_STX_LANE (vst4q_lane, float32x4x4_t, float32_t*, f32);
-TEST_STX_LANE (vst4q_lane, int64x2x4_t, int64_t*, s64);
-TEST_STX_LANE (vst4q_lane, uint64x2x4_t, uint64_t*, u64);
-TEST_STX_LANE (vst4q_lane, float64x2x4_t, float64_t*, f64);
-TEST_STX_LANE (vst4q_lane, poly64x2x4_t, poly64_t*, p64);
+TEST_STX_LANE (vst2_lane, int8x8x2_t, int8_t*, s8);
+TEST_STX_LANE (vst2_lane, uint8x8x2_t, uint8_t*, u8);
+TEST_STX_LANE (vst2_lane, poly8x8x2_t, poly8_t*, p8);
+TEST_STX_LANE (vst2_lane, int16x4x2_t, int16_t*, s16);
+TEST_STX_LANE (vst2_lane, uint16x4x2_t, uint16_t*, u16);
+TEST_STX_LANE (vst2_lane, poly16x4x2_t, poly16_t*, p16);
+TEST_STX_LANE (vst2_lane, float16x4x2_t, float16_t*, f16);
+TEST_STX_LANE (vst2_lane, bfloat16x4x2_t, bfloat16_t*, bf16);
+TEST_STX_LANE (vst2_lane, int32x2x2_t, int32_t*, s32);
+TEST_STX_LANE (vst2_lane, uint32x2x2_t, uint32_t*, u32);
+TEST_STX_LANE (vst2_lane, float32x2x2_t, float32_t*, f32);
+TEST_STX_LANE (vst2_lane, int64x1x2_t, int64_t*, s64);
+TEST_STX_LANE (vst2_lane, uint64x1x2_t, uint64_t*, u64);
+TEST_STX_LANE (vst2_lane, float64x1x2_t, float64_t*, f64);
+TEST_STX_LANE (vst2_lane, poly64x1x2_t, poly64_t*, p64);
TEST_STX_LANE (vst2q_lane, int8x16x2_t, int8_t*, s8);
TEST_STX_LANE (vst2q_lane, uint8x16x2_t, uint8_t*, u8);
@@ -180,27 +305,171 @@ TEST_STX_LANE (vst2q_lane, uint64x2x2_t, uint64_t*, u64);
TEST_STX_LANE (vst2q_lane, float64x2x2_t, float64_t*, f64);
TEST_STX_LANE (vst2q_lane, poly64x2x2_t, poly64_t*, p64);
-#define TEST_ST3_LANE(name, tbltype, ptrtype, ts) \
- void test_ ## name ## _ ## ts (ptrtype a, int8x8_t dummy, tbltype b) \
+TEST_STX_LANE (vst3_lane, int8x8x3_t, int8_t*, s8);
+TEST_STX_LANE (vst3_lane, uint8x8x3_t, uint8_t*, u8);
+TEST_STX_LANE (vst3_lane, poly8x8x3_t, poly8_t*, p8);
+TEST_STX_LANE (vst3_lane, int16x4x3_t, int16_t*, s16);
+TEST_STX_LANE (vst3_lane, uint16x4x3_t, uint16_t*, u16);
+TEST_STX_LANE (vst3_lane, poly16x4x3_t, poly16_t*, p16);
+TEST_STX_LANE (vst3_lane, float16x4x3_t, float16_t*, f16);
+TEST_STX_LANE (vst3_lane, bfloat16x4x3_t, bfloat16_t*, bf16);
+TEST_STX_LANE (vst3_lane, int32x2x3_t, int32_t*, s32);
+TEST_STX_LANE (vst3_lane, uint32x2x3_t, uint32_t*, u32);
+TEST_STX_LANE (vst3_lane, float32x2x3_t, float32_t*, f32);
+TEST_STX_LANE (vst3_lane, int64x1x3_t, int64_t*, s64);
+TEST_STX_LANE (vst3_lane, uint64x1x3_t, uint64_t*, u64);
+TEST_STX_LANE (vst3_lane, float64x1x3_t, float64_t*, f64);
+TEST_STX_LANE (vst3_lane, poly64x1x3_t, poly64_t*, p64);
+
+TEST_STX_LANE (vst3q_lane, int8x16x3_t, int8_t*, s8);
+TEST_STX_LANE (vst3q_lane, uint8x16x3_t, uint8_t*, u8);
+TEST_STX_LANE (vst3q_lane, poly8x16x3_t, poly8_t*, p8);
+TEST_STX_LANE (vst3q_lane, int16x8x3_t, int16_t*, s16);
+TEST_STX_LANE (vst3q_lane, uint16x8x3_t, uint16_t*, u16);
+TEST_STX_LANE (vst3q_lane, poly16x8x3_t, poly16_t*, p16);
+TEST_STX_LANE (vst3q_lane, float16x8x3_t, float16_t*, f16);
+TEST_STX_LANE (vst3q_lane, bfloat16x8x3_t, bfloat16_t*, bf16);
+TEST_STX_LANE (vst3q_lane, int32x4x3_t, int32_t*, s32);
+TEST_STX_LANE (vst3q_lane, uint32x4x3_t, uint32_t*, u32);
+TEST_STX_LANE (vst3q_lane, float32x4x3_t, float32_t*, f32);
+TEST_STX_LANE (vst3q_lane, int64x2x3_t, int64_t*, s64);
+TEST_STX_LANE (vst3q_lane, uint64x2x3_t, uint64_t*, u64);
+TEST_STX_LANE (vst3q_lane, float64x2x3_t, float64_t*, f64);
+TEST_STX_LANE (vst3q_lane, poly64x2x3_t, poly64_t*, p64);
+
+TEST_STX_LANE (vst4_lane, int8x8x4_t, int8_t*, s8);
+TEST_STX_LANE (vst4_lane, uint8x8x4_t, uint8_t*, u8);
+TEST_STX_LANE (vst4_lane, poly8x8x4_t, poly8_t*, p8);
+TEST_STX_LANE (vst4_lane, int16x4x4_t, int16_t*, s16);
+TEST_STX_LANE (vst4_lane, uint16x4x4_t, uint16_t*, u16);
+TEST_STX_LANE (vst4_lane, poly16x4x4_t, poly16_t*, p16);
+TEST_STX_LANE (vst4_lane, float16x4x4_t, float16_t*, f16);
+TEST_STX_LANE (vst4_lane, bfloat16x4x4_t, bfloat16_t*, bf16);
+TEST_STX_LANE (vst4_lane, int32x2x4_t, int32_t*, s32);
+TEST_STX_LANE (vst4_lane, uint32x2x4_t, uint32_t*, u32);
+TEST_STX_LANE (vst4_lane, float32x2x4_t, float32_t*, f32);
+TEST_STX_LANE (vst4_lane, int64x1x4_t, int64_t*, s64);
+TEST_STX_LANE (vst4_lane, uint64x1x4_t, uint64_t*, u64);
+TEST_STX_LANE (vst4_lane, float64x1x4_t, float64_t*, f64);
+TEST_STX_LANE (vst4_lane, poly64x1x4_t, poly64_t*, p64);
+
+TEST_STX_LANE (vst4q_lane, int8x16x4_t, int8_t*, s8);
+TEST_STX_LANE (vst4q_lane, uint8x16x4_t, uint8_t*, u8);
+TEST_STX_LANE (vst4q_lane, poly8x16x4_t, poly8_t*, p8);
+TEST_STX_LANE (vst4q_lane, int16x8x4_t, int16_t*, s16);
+TEST_STX_LANE (vst4q_lane, uint16x8x4_t, uint16_t*, u16);
+TEST_STX_LANE (vst4q_lane, poly16x8x4_t, poly16_t*, p16);
+TEST_STX_LANE (vst4q_lane, float16x8x4_t, float16_t*, f16);
+TEST_STX_LANE (vst4q_lane, bfloat16x8x4_t, bfloat16_t*, bf16);
+TEST_STX_LANE (vst4q_lane, int32x4x4_t, int32_t*, s32);
+TEST_STX_LANE (vst4q_lane, uint32x4x4_t, uint32_t*, u32);
+TEST_STX_LANE (vst4q_lane, float32x4x4_t, float32_t*, f32);
+TEST_STX_LANE (vst4q_lane, int64x2x4_t, int64_t*, s64);
+TEST_STX_LANE (vst4q_lane, uint64x2x4_t, uint64_t*, u64);
+TEST_STX_LANE (vst4q_lane, float64x2x4_t, float64_t*, f64);
+TEST_STX_LANE (vst4q_lane, poly64x2x4_t, poly64_t*, p64);
+
+#define TEST_LDX_LANE(name, rettype, ptrtype, ts) \
+ rettype test_ ## name ## _ ## ts (ptrtype a, rettype b) \
{ \
- name ## _ ## ts (a, b, 1); \
+ return name ## _ ## ts (a, b, 0); \
}
-TEST_ST3_LANE (vst3q_lane, int8x16x3_t, int8_t*, s8);
-TEST_ST3_LANE (vst3q_lane, uint8x16x3_t, uint8_t*, u8);
-TEST_ST3_LANE (vst3q_lane, poly8x16x3_t, poly8_t*, p8);
-TEST_ST3_LANE (vst3q_lane, int16x8x3_t, int16_t*, s16);
-TEST_ST3_LANE (vst3q_lane, uint16x8x3_t, uint16_t*, u16);
-TEST_ST3_LANE (vst3q_lane, poly16x8x3_t, poly16_t*, p16);
-TEST_ST3_LANE (vst3q_lane, float16x8x3_t, float16_t*, f16);
-TEST_ST3_LANE (vst3q_lane, bfloat16x8x3_t, bfloat16_t*, bf16);
-TEST_ST3_LANE (vst3q_lane, int32x4x3_t, int32_t*, s32);
-TEST_ST3_LANE (vst3q_lane, uint32x4x3_t, uint32_t*, u32);
-TEST_ST3_LANE (vst3q_lane, float32x4x3_t, float32_t*, f32);
-TEST_ST3_LANE (vst3q_lane, int64x2x3_t, int64_t*, s64);
-TEST_ST3_LANE (vst3q_lane, uint64x2x3_t, uint64_t*, u64);
-TEST_ST3_LANE (vst3q_lane, float64x2x3_t, float64_t*, f64);
-TEST_ST3_LANE (vst3q_lane, poly64x2x3_t, poly64_t*, p64);
+TEST_LDX_LANE (vld2_lane, int8x8x2_t, int8_t*, s8);
+TEST_LDX_LANE (vld2_lane, uint8x8x2_t, uint8_t*, u8);
+TEST_LDX_LANE (vld2_lane, poly8x8x2_t, poly8_t*, p8);
+TEST_LDX_LANE (vld2_lane, int16x4x2_t, int16_t*, s16);
+TEST_LDX_LANE (vld2_lane, uint16x4x2_t, uint16_t*, u16);
+TEST_LDX_LANE (vld2_lane, poly16x4x2_t, poly16_t*, p16);
+TEST_LDX_LANE (vld2_lane, float16x4x2_t, float16_t*, f16);
+TEST_LDX_LANE (vld2_lane, bfloat16x4x2_t, bfloat16_t*, bf16);
+TEST_LDX_LANE (vld2_lane, int32x2x2_t, int32_t*, s32);
+TEST_LDX_LANE (vld2_lane, uint32x2x2_t, uint32_t*, u32);
+TEST_LDX_LANE (vld2_lane, float32x2x2_t, float32_t*, f32);
+TEST_LDX_LANE (vld2_lane, int64x1x2_t, int64_t*, s64);
+TEST_LDX_LANE (vld2_lane, uint64x1x2_t, uint64_t*, u64);
+TEST_LDX_LANE (vld2_lane, float64x1x2_t, float64_t*, f64);
+TEST_LDX_LANE (vld2_lane, poly64x1x2_t, poly64_t*, p64);
+
+TEST_LDX_LANE (vld2q_lane, int8x16x2_t, int8_t*, s8);
+TEST_LDX_LANE (vld2q_lane, uint8x16x2_t, uint8_t*, u8);
+TEST_LDX_LANE (vld2q_lane, poly8x16x2_t, poly8_t*, p8);
+TEST_LDX_LANE (vld2q_lane, int16x8x2_t, int16_t*, s16);
+TEST_LDX_LANE (vld2q_lane, uint16x8x2_t, uint16_t*, u16);
+TEST_LDX_LANE (vld2q_lane, poly16x8x2_t, poly16_t*, p16);
+TEST_LDX_LANE (vld2q_lane, float16x8x2_t, float16_t*, f16);
+TEST_LDX_LANE (vld2q_lane, bfloat16x8x2_t, bfloat16_t*, bf16);
+TEST_LDX_LANE (vld2q_lane, int32x4x2_t, int32_t*, s32);
+TEST_LDX_LANE (vld2q_lane, uint32x4x2_t, uint32_t*, u32);
+TEST_LDX_LANE (vld2q_lane, float32x4x2_t, float32_t*, f32);
+TEST_LDX_LANE (vld2q_lane, int64x2x2_t, int64_t*, s64);
+TEST_LDX_LANE (vld2q_lane, uint64x2x2_t, uint64_t*, u64);
+TEST_LDX_LANE (vld2q_lane, float64x2x2_t, float64_t*, f64);
+TEST_LDX_LANE (vld2q_lane, poly64x2x2_t, poly64_t*, p64);
+
+TEST_LDX_LANE (vld3_lane, int8x8x3_t, int8_t*, s8);
+TEST_LDX_LANE (vld3_lane, uint8x8x3_t, uint8_t*, u8);
+TEST_LDX_LANE (vld3_lane, poly8x8x3_t, poly8_t*, p8);
+TEST_LDX_LANE (vld3_lane, int16x4x3_t, int16_t*, s16);
+TEST_LDX_LANE (vld3_lane, uint16x4x3_t, uint16_t*, u16);
+TEST_LDX_LANE (vld3_lane, poly16x4x3_t, poly16_t*, p16);
+TEST_LDX_LANE (vld3_lane, float16x4x3_t, float16_t*, f16);
+TEST_LDX_LANE (vld3_lane, bfloat16x4x3_t, bfloat16_t*, bf16);
+TEST_LDX_LANE (vld3_lane, int32x2x3_t, int32_t*, s32);
+TEST_LDX_LANE (vld3_lane, uint32x2x3_t, uint32_t*, u32);
+TEST_LDX_LANE (vld3_lane, float32x2x3_t, float32_t*, f32);
+TEST_LDX_LANE (vld3_lane, int64x1x3_t, int64_t*, s64);
+TEST_LDX_LANE (vld3_lane, uint64x1x3_t, uint64_t*, u64);
+TEST_LDX_LANE (vld3_lane, float64x1x3_t, float64_t*, f64);
+TEST_LDX_LANE (vld3_lane, poly64x1x3_t, poly64_t*, p64);
+
+TEST_LDX_LANE (vld3q_lane, int8x16x3_t, int8_t*, s8);
+TEST_LDX_LANE (vld3q_lane, uint8x16x3_t, uint8_t*, u8);
+TEST_LDX_LANE (vld3q_lane, poly8x16x3_t, poly8_t*, p8);
+TEST_LDX_LANE (vld3q_lane, int16x8x3_t, int16_t*, s16);
+TEST_LDX_LANE (vld3q_lane, uint16x8x3_t, uint16_t*, u16);
+TEST_LDX_LANE (vld3q_lane, poly16x8x3_t, poly16_t*, p16);
+TEST_LDX_LANE (vld3q_lane, float16x8x3_t, float16_t*, f16);
+TEST_LDX_LANE (vld3q_lane, bfloat16x8x3_t, bfloat16_t*, bf16);
+TEST_LDX_LANE (vld3q_lane, int32x4x3_t, int32_t*, s32);
+TEST_LDX_LANE (vld3q_lane, uint32x4x3_t, uint32_t*, u32);
+TEST_LDX_LANE (vld3q_lane, float32x4x3_t, float32_t*, f32);
+TEST_LDX_LANE (vld3q_lane, int64x2x3_t, int64_t*, s64);
+TEST_LDX_LANE (vld3q_lane, uint64x2x3_t, uint64_t*, u64);
+TEST_LDX_LANE (vld3q_lane, float64x2x3_t, float64_t*, f64);
+TEST_LDX_LANE (vld3q_lane, poly64x2x3_t, poly64_t*, p64);
+
+TEST_LDX_LANE (vld4_lane, int8x8x4_t, int8_t*, s8);
+TEST_LDX_LANE (vld4_lane, uint8x8x4_t, uint8_t*, u8);
+TEST_LDX_LANE (vld4_lane, poly8x8x4_t, poly8_t*, p8);
+TEST_LDX_LANE (vld4_lane, int16x4x4_t, int16_t*, s16);
+TEST_LDX_LANE (vld4_lane, uint16x4x4_t, uint16_t*, u16);
+TEST_LDX_LANE (vld4_lane, poly16x4x4_t, poly16_t*, p16);
+TEST_LDX_LANE (vld4_lane, float16x4x4_t, float16_t*, f16);
+TEST_LDX_LANE (vld4_lane, bfloat16x4x4_t, bfloat16_t*, bf16);
+TEST_LDX_LANE (vld4_lane, int32x2x4_t, int32_t*, s32);
+TEST_LDX_LANE (vld4_lane, uint32x2x4_t, uint32_t*, u32);
+TEST_LDX_LANE (vld4_lane, float32x2x4_t, float32_t*, f32);
+TEST_LDX_LANE (vld4_lane, int64x1x4_t, int64_t*, s64);
+TEST_LDX_LANE (vld4_lane, uint64x1x4_t, uint64_t*, u64);
+TEST_LDX_LANE (vld4_lane, float64x1x4_t, float64_t*, f64);
+TEST_LDX_LANE (vld4_lane, poly64x1x4_t, poly64_t*, p64);
+
+TEST_LDX_LANE (vld4q_lane, int8x16x4_t, int8_t*, s8);
+TEST_LDX_LANE (vld4q_lane, uint8x16x4_t, uint8_t*, u8);
+TEST_LDX_LANE (vld4q_lane, poly8x16x4_t, poly8_t*, p8);
+TEST_LDX_LANE (vld4q_lane, int16x8x4_t, int16_t*, s16);
+TEST_LDX_LANE (vld4q_lane, uint16x8x4_t, uint16_t*, u16);
+TEST_LDX_LANE (vld4q_lane, poly16x8x4_t, poly16_t*, p16);
+TEST_LDX_LANE (vld4q_lane, float16x8x4_t, float16_t*, f16);
+TEST_LDX_LANE (vld4q_lane, bfloat16x8x4_t, bfloat16_t*, bf16);
+TEST_LDX_LANE (vld4q_lane, int32x4x4_t, int32_t*, s32);
+TEST_LDX_LANE (vld4q_lane, uint32x4x4_t, uint32_t*, u32);
+TEST_LDX_LANE (vld4q_lane, float32x4x4_t, float32_t*, f32);
+TEST_LDX_LANE (vld4q_lane, int64x2x4_t, int64_t*, s64);
+TEST_LDX_LANE (vld4q_lane, uint64x2x4_t, uint64_t*, u64);
+TEST_LDX_LANE (vld4q_lane, float64x2x4_t, float64_t*, f64);
+TEST_LDX_LANE (vld4q_lane, poly64x2x4_t, poly64_t*, p64);
#define TEST_ST1xN(name, tbltype, ptrtype, ts, xn) \
void test_ ## name ## _ ## ts ## _ ## xn (ptrtype a, tbltype b) \
@@ -208,21 +477,21 @@ TEST_ST3_LANE (vst3q_lane, poly64x2x3_t, poly64_t*, p64);
name ## _ ## ts ## _ ## xn (a, b); \
}
-TEST_ST1xN (vst1q, int8x16x4_t, int8_t*, s8, x4);
-TEST_ST1xN (vst1q, uint8x16x4_t, uint8_t*, u8, x4);
-TEST_ST1xN (vst1q, poly8x16x4_t, poly8_t*, p8, x4);
-TEST_ST1xN (vst1q, int16x8x4_t, int16_t*, s16, x4);
-TEST_ST1xN (vst1q, uint16x8x4_t, uint16_t*, u16, x4);
-TEST_ST1xN (vst1q, poly16x8x4_t, poly16_t*, p16, x4);
-TEST_ST1xN (vst1q, float16x8x4_t, float16_t*, f16, x4);
-TEST_ST1xN (vst1q, bfloat16x8x4_t, bfloat16_t*, bf16, x4);
-TEST_ST1xN (vst1q, int32x4x4_t, int32_t*, s32, x4);
-TEST_ST1xN (vst1q, uint32x4x4_t, uint32_t*, u32, x4);
-TEST_ST1xN (vst1q, float32x4x4_t, float32_t*, f32, x4);
-TEST_ST1xN (vst1q, int64x2x4_t, int64_t*, s64, x4);
-TEST_ST1xN (vst1q, uint64x2x4_t, uint64_t*, u64, x4);
-TEST_ST1xN (vst1q, poly64x2x4_t, poly64_t*, p64, x4);
-TEST_ST1xN (vst1q, float64x2x4_t, float64_t*, f64, x4);
+TEST_ST1xN (vst1, int8x8x2_t, int8_t*, s8, x2);
+TEST_ST1xN (vst1, uint8x8x2_t, uint8_t*, u8, x2);
+TEST_ST1xN (vst1, poly8x8x2_t, poly8_t*, p8, x2);
+TEST_ST1xN (vst1, int16x4x2_t, int16_t*, s16, x2);
+TEST_ST1xN (vst1, uint16x4x2_t, uint16_t*, u16, x2);
+TEST_ST1xN (vst1, poly16x4x2_t, poly16_t*, p16, x2);
+TEST_ST1xN (vst1, float16x4x2_t, float16_t*, f16, x2);
+TEST_ST1xN (vst1, bfloat16x4x2_t, bfloat16_t*, bf16, x2);
+TEST_ST1xN (vst1, int32x2x2_t, int32_t*, s32, x2);
+TEST_ST1xN (vst1, uint32x2x2_t, uint32_t*, u32, x2);
+TEST_ST1xN (vst1, float32x2x2_t, float32_t*, f32, x2);
+TEST_ST1xN (vst1, int64x1x2_t, int64_t*, s64, x2);
+TEST_ST1xN (vst1, uint64x1x2_t, uint64_t*, u64, x2);
+TEST_ST1xN (vst1, poly64x1x2_t, poly64_t*, p64, x2);
+TEST_ST1xN (vst1, float64x1x2_t, float64_t*, f64, x2);
TEST_ST1xN (vst1q, int8x16x2_t, int8_t*, s8, x2);
TEST_ST1xN (vst1q, uint8x16x2_t, uint8_t*, u8, x2);
@@ -240,34 +509,184 @@ TEST_ST1xN (vst1q, uint64x2x2_t, uint64_t*, u64, x2);
TEST_ST1xN (vst1q, poly64x2x2_t, poly64_t*, p64, x2);
TEST_ST1xN (vst1q, float64x2x2_t, float64_t*, f64, x2);
-#define TEST_ST1x3(name, tbltype, ptrtype, ts, xn) \
- void test_ ## name ## _ ## ts ## _ ## xn (ptrtype a, int8x8_t dummy, \
- tbltype b) \
+TEST_ST1xN (vst1, int8x8x3_t, int8_t*, s8, x3);
+TEST_ST1xN (vst1, uint8x8x3_t, uint8_t*, u8, x3);
+TEST_ST1xN (vst1, poly8x8x3_t, poly8_t*, p8, x3);
+TEST_ST1xN (vst1, int16x4x3_t, int16_t*, s16, x3);
+TEST_ST1xN (vst1, uint16x4x3_t, uint16_t*, u16, x3);
+TEST_ST1xN (vst1, poly16x4x3_t, poly16_t*, p16, x3);
+TEST_ST1xN (vst1, float16x4x3_t, float16_t*, f16, x3);
+TEST_ST1xN (vst1, bfloat16x4x3_t, bfloat16_t*, bf16, x3);
+TEST_ST1xN (vst1, int32x2x3_t, int32_t*, s32, x3);
+TEST_ST1xN (vst1, uint32x2x3_t, uint32_t*, u32, x3);
+TEST_ST1xN (vst1, float32x2x3_t, float32_t*, f32, x3);
+TEST_ST1xN (vst1, int64x1x3_t, int64_t*, s64, x3);
+TEST_ST1xN (vst1, uint64x1x3_t, uint64_t*, u64, x3);
+TEST_ST1xN (vst1, poly64x1x3_t, poly64_t*, p64, x3);
+TEST_ST1xN (vst1, float64x1x3_t, float64_t*, f64, x3);
+
+TEST_ST1xN (vst1q, int8x16x3_t, int8_t*, s8, x3);
+TEST_ST1xN (vst1q, uint8x16x3_t, uint8_t*, u8, x3);
+TEST_ST1xN (vst1q, poly8x16x3_t, poly8_t*, p8, x3);
+TEST_ST1xN (vst1q, int16x8x3_t, int16_t*, s16, x3);
+TEST_ST1xN (vst1q, uint16x8x3_t, uint16_t*, u16, x3);
+TEST_ST1xN (vst1q, poly16x8x3_t, poly16_t*, p16, x3);
+TEST_ST1xN (vst1q, float16x8x3_t, float16_t*, f16, x3);
+TEST_ST1xN (vst1q, bfloat16x8x3_t, bfloat16_t*, bf16, x3);
+TEST_ST1xN (vst1q, int32x4x3_t, int32_t*, s32, x3);
+TEST_ST1xN (vst1q, uint32x4x3_t, uint32_t*, u32, x3);
+TEST_ST1xN (vst1q, float32x4x3_t, float32_t*, f32, x3);
+TEST_ST1xN (vst1q, int64x2x3_t, int64_t*, s64, x3);
+TEST_ST1xN (vst1q, uint64x2x3_t, uint64_t*, u64, x3);
+TEST_ST1xN (vst1q, poly64x2x3_t, poly64_t*, p64, x3);
+TEST_ST1xN (vst1q, float64x2x3_t, float64_t*, f64, x3);
+
+TEST_ST1xN (vst1, int8x8x4_t, int8_t*, s8, x4);
+TEST_ST1xN (vst1, uint8x8x4_t, uint8_t*, u8, x4);
+TEST_ST1xN (vst1, poly8x8x4_t, poly8_t*, p8, x4);
+TEST_ST1xN (vst1, int16x4x4_t, int16_t*, s16, x4);
+TEST_ST1xN (vst1, uint16x4x4_t, uint16_t*, u16, x4);
+TEST_ST1xN (vst1, poly16x4x4_t, poly16_t*, p16, x4);
+TEST_ST1xN (vst1, float16x4x4_t, float16_t*, f16, x4);
+TEST_ST1xN (vst1, bfloat16x4x4_t, bfloat16_t*, bf16, x4);
+TEST_ST1xN (vst1, int32x2x4_t, int32_t*, s32, x4);
+TEST_ST1xN (vst1, uint32x2x4_t, uint32_t*, u32, x4);
+TEST_ST1xN (vst1, float32x2x4_t, float32_t*, f32, x4);
+TEST_ST1xN (vst1, int64x1x4_t, int64_t*, s64, x4);
+TEST_ST1xN (vst1, uint64x1x4_t, uint64_t*, u64, x4);
+TEST_ST1xN (vst1, poly64x1x4_t, poly64_t*, p64, x4);
+TEST_ST1xN (vst1, float64x1x4_t, float64_t*, f64, x4);
+
+TEST_ST1xN (vst1q, int8x16x4_t, int8_t*, s8, x4);
+TEST_ST1xN (vst1q, uint8x16x4_t, uint8_t*, u8, x4);
+TEST_ST1xN (vst1q, poly8x16x4_t, poly8_t*, p8, x4);
+TEST_ST1xN (vst1q, int16x8x4_t, int16_t*, s16, x4);
+TEST_ST1xN (vst1q, uint16x8x4_t, uint16_t*, u16, x4);
+TEST_ST1xN (vst1q, poly16x8x4_t, poly16_t*, p16, x4);
+TEST_ST1xN (vst1q, float16x8x4_t, float16_t*, f16, x4);
+TEST_ST1xN (vst1q, bfloat16x8x4_t, bfloat16_t*, bf16, x4);
+TEST_ST1xN (vst1q, int32x4x4_t, int32_t*, s32, x4);
+TEST_ST1xN (vst1q, uint32x4x4_t, uint32_t*, u32, x4);
+TEST_ST1xN (vst1q, float32x4x4_t, float32_t*, f32, x4);
+TEST_ST1xN (vst1q, int64x2x4_t, int64_t*, s64, x4);
+TEST_ST1xN (vst1q, uint64x2x4_t, uint64_t*, u64, x4);
+TEST_ST1xN (vst1q, poly64x2x4_t, poly64_t*, p64, x4);
+TEST_ST1xN (vst1q, float64x2x4_t, float64_t*, f64, x4);
+
+#define TEST_LD1xN(name, rettype, ptrtype, ts, xn) \
+ rettype test_ ## name ## _ ## ts ## _ ## xn (ptrtype a) \
{ \
- name ## _ ## ts ## _ ## xn (a, b); \
+ return name ## _ ## ts ## _ ## xn (a); \
}
-TEST_ST1x3 (vst1q, int8x16x3_t, int8_t*, s8, x3);
-TEST_ST1x3 (vst1q, uint8x16x3_t, uint8_t*, u8, x3);
-TEST_ST1x3 (vst1q, poly8x16x3_t, poly8_t*, p8, x3);
-TEST_ST1x3 (vst1q, int16x8x3_t, int16_t*, s16, x3);
-TEST_ST1x3 (vst1q, uint16x8x3_t, uint16_t*, u16, x3);
-TEST_ST1x3 (vst1q, poly16x8x3_t, poly16_t*, p16, x3);
-TEST_ST1x3 (vst1q, float16x8x3_t, float16_t*, f16, x3);
-TEST_ST1x3 (vst1q, bfloat16x8x3_t, bfloat16_t*, bf16, x3);
-TEST_ST1x3 (vst1q, int32x4x3_t, int32_t*, s32, x3);
-TEST_ST1x3 (vst1q, uint32x4x3_t, uint32_t*, u32, x3);
-TEST_ST1x3 (vst1q, float32x4x3_t, float32_t*, f32, x3);
-TEST_ST1x3 (vst1q, int64x2x3_t, int64_t*, s64, x3);
-TEST_ST1x3 (vst1q, uint64x2x3_t, uint64_t*, u64, x3);
-TEST_ST1x3 (vst1q, poly64x2x3_t, poly64_t*, p64, x3);
-TEST_ST1x3 (vst1q, float64x2x3_t, float64_t*, f64, x3);
+TEST_LD1xN (vld1, int8x8x2_t, int8_t*, s8, x2);
+TEST_LD1xN (vld1, uint8x8x2_t, uint8_t*, u8, x2);
+TEST_LD1xN (vld1, poly8x8x2_t, poly8_t*, p8, x2);
+TEST_LD1xN (vld1, int16x4x2_t, int16_t*, s16, x2);
+TEST_LD1xN (vld1, uint16x4x2_t, uint16_t*, u16, x2);
+TEST_LD1xN (vld1, poly16x4x2_t, poly16_t*, p16, x2);
+TEST_LD1xN (vld1, float16x4x2_t, float16_t*, f16, x2);
+TEST_LD1xN (vld1, bfloat16x4x2_t, bfloat16_t*, bf16, x2);
+TEST_LD1xN (vld1, int32x2x2_t, int32_t*, s32, x2);
+TEST_LD1xN (vld1, uint32x2x2_t, uint32_t*, u32, x2);
+TEST_LD1xN (vld1, float32x2x2_t, float32_t*, f32, x2);
+TEST_LD1xN (vld1, int64x1x2_t, int64_t*, s64, x2);
+TEST_LD1xN (vld1, uint64x1x2_t, uint64_t*, u64, x2);
+TEST_LD1xN (vld1, poly64x1x2_t, poly64_t*, p64, x2);
+TEST_LD1xN (vld1, float64x1x2_t, float64_t*, f64, x2);
+
+TEST_LD1xN (vld1q, int8x16x2_t, int8_t*, s8, x2);
+TEST_LD1xN (vld1q, uint8x16x2_t, uint8_t*, u8, x2);
+TEST_LD1xN (vld1q, poly8x16x2_t, poly8_t*, p8, x2);
+TEST_LD1xN (vld1q, int16x8x2_t, int16_t*, s16, x2);
+TEST_LD1xN (vld1q, uint16x8x2_t, uint16_t*, u16, x2);
+TEST_LD1xN (vld1q, poly16x8x2_t, poly16_t*, p16, x2);
+TEST_LD1xN (vld1q, float16x8x2_t, float16_t*, f16, x2);
+TEST_LD1xN (vld1q, bfloat16x8x2_t, bfloat16_t*, bf16, x2);
+TEST_LD1xN (vld1q, int32x4x2_t, int32_t*, s32, x2);
+TEST_LD1xN (vld1q, uint32x4x2_t, uint32_t*, u32, x2);
+TEST_LD1xN (vld1q, float32x4x2_t, float32_t*, f32, x2);
+TEST_LD1xN (vld1q, int64x2x2_t, int64_t*, s64, x2);
+TEST_LD1xN (vld1q, uint64x2x2_t, uint64_t*, u64, x2);
+TEST_LD1xN (vld1q, poly64x2x2_t, poly64_t*, p64, x2);
+TEST_LD1xN (vld1q, float64x2x2_t, float64_t*, f64, x2);
+
+TEST_LD1xN (vld1, int8x8x3_t, int8_t*, s8, x3);
+TEST_LD1xN (vld1, uint8x8x3_t, uint8_t*, u8, x3);
+TEST_LD1xN (vld1, poly8x8x3_t, poly8_t*, p8, x3);
+TEST_LD1xN (vld1, int16x4x3_t, int16_t*, s16, x3);
+TEST_LD1xN (vld1, uint16x4x3_t, uint16_t*, u16, x3);
+TEST_LD1xN (vld1, poly16x4x3_t, poly16_t*, p16, x3);
+TEST_LD1xN (vld1, float16x4x3_t, float16_t*, f16, x3);
+TEST_LD1xN (vld1, bfloat16x4x3_t, bfloat16_t*, bf16, x3);
+TEST_LD1xN (vld1, int32x2x3_t, int32_t*, s32, x3);
+TEST_LD1xN (vld1, uint32x2x3_t, uint32_t*, u32, x3);
+TEST_LD1xN (vld1, float32x2x3_t, float32_t*, f32, x3);
+TEST_LD1xN (vld1, int64x1x3_t, int64_t*, s64, x3);
+TEST_LD1xN (vld1, uint64x1x3_t, uint64_t*, u64, x3);
+TEST_LD1xN (vld1, poly64x1x3_t, poly64_t*, p64, x3);
+TEST_LD1xN (vld1, float64x1x3_t, float64_t*, f64, x3);
+
+TEST_LD1xN (vld1q, int8x16x3_t, int8_t*, s8, x3);
+TEST_LD1xN (vld1q, uint8x16x3_t, uint8_t*, u8, x3);
+TEST_LD1xN (vld1q, poly8x16x3_t, poly8_t*, p8, x3);
+TEST_LD1xN (vld1q, int16x8x3_t, int16_t*, s16, x3);
+TEST_LD1xN (vld1q, uint16x8x3_t, uint16_t*, u16, x3);
+TEST_LD1xN (vld1q, poly16x8x3_t, poly16_t*, p16, x3);
+TEST_LD1xN (vld1q, float16x8x3_t, float16_t*, f16, x3);
+TEST_LD1xN (vld1q, bfloat16x8x3_t, bfloat16_t*, bf16, x3);
+TEST_LD1xN (vld1q, int32x4x3_t, int32_t*, s32, x3);
+TEST_LD1xN (vld1q, uint32x4x3_t, uint32_t*, u32, x3);
+TEST_LD1xN (vld1q, float32x4x3_t, float32_t*, f32, x3);
+TEST_LD1xN (vld1q, int64x2x3_t, int64_t*, s64, x3);
+TEST_LD1xN (vld1q, uint64x2x3_t, uint64_t*, u64, x3);
+TEST_LD1xN (vld1q, poly64x2x3_t, poly64_t*, p64, x3);
+TEST_LD1xN (vld1q, float64x2x3_t, float64_t*, f64, x3);
+
+TEST_LD1xN (vld1, int8x8x4_t, int8_t*, s8, x4);
+TEST_LD1xN (vld1, uint8x8x4_t, uint8_t*, u8, x4);
+TEST_LD1xN (vld1, poly8x8x4_t, poly8_t*, p8, x4);
+TEST_LD1xN (vld1, int16x4x4_t, int16_t*, s16, x4);
+TEST_LD1xN (vld1, uint16x4x4_t, uint16_t*, u16, x4);
+TEST_LD1xN (vld1, poly16x4x4_t, poly16_t*, p16, x4);
+TEST_LD1xN (vld1, float16x4x4_t, float16_t*, f16, x4);
+TEST_LD1xN (vld1, bfloat16x4x4_t, bfloat16_t*, bf16, x4);
+TEST_LD1xN (vld1, int32x2x4_t, int32_t*, s32, x4);
+TEST_LD1xN (vld1, uint32x2x4_t, uint32_t*, u32, x4);
+TEST_LD1xN (vld1, float32x2x4_t, float32_t*, f32, x4);
+TEST_LD1xN (vld1, int64x1x4_t, int64_t*, s64, x4);
+TEST_LD1xN (vld1, uint64x1x4_t, uint64_t*, u64, x4);
+TEST_LD1xN (vld1, poly64x1x4_t, poly64_t*, p64, x4);
+TEST_LD1xN (vld1, float64x1x4_t, float64_t*, f64, x4);
+
+TEST_LD1xN (vld1q, int8x16x4_t, int8_t*, s8, x4);
+TEST_LD1xN (vld1q, uint8x16x4_t, uint8_t*, u8, x4);
+TEST_LD1xN (vld1q, poly8x16x4_t, poly8_t*, p8, x4);
+TEST_LD1xN (vld1q, int16x8x4_t, int16_t*, s16, x4);
+TEST_LD1xN (vld1q, uint16x8x4_t, uint16_t*, u16, x4);
+TEST_LD1xN (vld1q, poly16x8x4_t, poly16_t*, p16, x4);
+TEST_LD1xN (vld1q, float16x8x4_t, float16_t*, f16, x4);
+TEST_LD1xN (vld1q, bfloat16x8x4_t, bfloat16_t*, bf16, x4);
+TEST_LD1xN (vld1q, int32x4x4_t, int32_t*, s32, x4);
+TEST_LD1xN (vld1q, uint32x4x4_t, uint32_t*, u32, x4);
+TEST_LD1xN (vld1q, float32x4x4_t, float32_t*, f32, x4);
+TEST_LD1xN (vld1q, int64x2x4_t, int64_t*, s64, x4);
+TEST_LD1xN (vld1q, uint64x2x4_t, uint64_t*, u64, x4);
+TEST_LD1xN (vld1q, poly64x2x4_t, poly64_t*, p64, x4);
+TEST_LD1xN (vld1q, float64x2x4_t, float64_t*, f64, x4);
/* { dg-final { scan-assembler-not "mov\\t" { target aarch64_little_endian } } } */
+/* { dg-final { scan-assembler-not "ldr\\t" { target aarch64_little_endian } } } */
+/* { dg-final { scan-assembler-not "str\\t" { target aarch64_little_endian } } } */
+/* { dg-final { scan-assembler-not "sp" { target aarch64_little_endian } } } */
/* { dg-final { scan-assembler-times "tbl\\t" 18} } */
/* { dg-final { scan-assembler-times "tbx\\t" 18} } */
-/* { dg-final { scan-assembler-times "st4\\t" 30} } */
-/* { dg-final { scan-assembler-times "st3\\t" 30} } */
-/* { dg-final { scan-assembler-times "st2\\t" 30} } */
-/* { dg-final { scan-assembler-times "st1\\t" 45} } */
+/* { dg-final { scan-assembler-times "st4\\t" 56} } */
+/* { dg-final { scan-assembler-times "st3\\t" 56} } */
+/* { dg-final { scan-assembler-times "st2\\t" 56} } */
+/* { dg-final { scan-assembler-times "st1\\t" 102} } */
+/* { dg-final { scan-assembler-times "ld4\\t" 56} } */
+/* { dg-final { scan-assembler-times "ld3\\t" 56} } */
+/* { dg-final { scan-assembler-times "ld2\\t" 56} } */
+/* { dg-final { scan-assembler-times "ld1\\t" 102} } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vsqrt-1.c b/gcc/testsuite/gcc.target/aarch64/vsqrt-1.c
new file mode 100644
index 0000000..e614c7d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vsqrt-1.c
@@ -0,0 +1,17 @@
+/* PR target/64821 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* Check that we constant fold sqrt(4.0) into 2.0. */
+/* { dg-final { scan-tree-dump-not " \\\.SQRT" "optimized" } } */
+/* { dg-final { scan-tree-dump " 2\\\.0e\\\+0" "optimized" } } */
+/* { dg-final { scan-assembler-not "fsqrt" } } */
+/* We should produce a fmov to d0 with 2.0 but currently don't, see PR 103959. */
+/* { dg-final { scan-assembler-times "\n\tfmov\td0, 2.0e.0" 1 { xfail *-*-* } } } */
+
+#include <arm_neon.h>
+
+float64x1_t f64(void)
+{
+ float64x1_t a = (float64x1_t){4.0};
+ return vsqrt_f64 (a);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vsqrt-2.c b/gcc/testsuite/gcc.target/aarch64/vsqrt-2.c
new file mode 100644
index 0000000..4dea4da
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vsqrt-2.c
@@ -0,0 +1,28 @@
+/* PR target/64821 */
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-optimized" } */
+#include <arm_neon.h>
+
+/* Check that we lower __builtin_aarch64_sqrt* into the internal function SQRT. */
+/* { dg-final { scan-tree-dump-times " __builtin_aarch64_sqrt" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\\.SQRT " 4 "optimized" } } */
+
+float64x1_t f64(float64x1_t a)
+{
+ return vsqrt_f64 (a);
+}
+
+float64x2_t f64q(float64x2_t a)
+{
+ return vsqrtq_f64 (a);
+}
+
+float32x2_t f32(float32x2_t a)
+{
+ return vsqrt_f32 (a);
+}
+
+float32x4_t f32q(float32x4_t a)
+{
+ return vsqrtq_f32 (a);
+}
diff --git a/gcc/testsuite/gcc.target/alpha/alpha.exp b/gcc/testsuite/gcc.target/alpha/alpha.exp
index f97b491..b2b339c 100644
--- a/gcc/testsuite/gcc.target/alpha/alpha.exp
+++ b/gcc/testsuite/gcc.target/alpha/alpha.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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/arc/add_n-combine.c b/gcc/testsuite/gcc.target/arc/add_n-combine.c
index bc400df..84e261e 100644
--- a/gcc/testsuite/gcc.target/arc/add_n-combine.c
+++ b/gcc/testsuite/gcc.target/arc/add_n-combine.c
@@ -45,6 +45,6 @@ void f() {
a(at3.bn[bu]);
}
-/* { dg-final { scan-assembler "add1" } } */
-/* { dg-final { scan-assembler "add2" } } */
+/* { dg-final { scan-assembler "@at1\\+1" } } */
+/* { dg-final { scan-assembler "@at2\\+2" } } */
/* { dg-final { scan-assembler "add3" } } */
diff --git a/gcc/testsuite/gcc.target/arc/arc.exp b/gcc/testsuite/gcc.target/arc/arc.exp
index 4116a92..f61a6f5 100644
--- a/gcc/testsuite/gcc.target/arc/arc.exp
+++ b/gcc/testsuite/gcc.target/arc/arc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2021 Free Software Foundation, Inc.
+# Copyright (C) 2007-2022 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/arc/builtin_eh.c b/gcc/testsuite/gcc.target/arc/builtin_eh.c
index 717a54b..83f4f1d 100644
--- a/gcc/testsuite/gcc.target/arc/builtin_eh.c
+++ b/gcc/testsuite/gcc.target/arc/builtin_eh.c
@@ -19,4 +19,5 @@ foo (int x)
/* { dg-final { scan-assembler "r13" } } */
/* { dg-final { scan-assembler "r0" } } */
/* { dg-final { scan-assembler "fp" } } */
-/* { dg-final { scan-assembler "fp,64" } } */
+/* { dg-final { scan-assembler "fp,64" { target { *-elf32-* } } } } */
+/* { dg-final { scan-assembler "fp,60" { target { *-linux-* } } } } */
diff --git a/gcc/testsuite/gcc.target/arc/cancel-1.c b/gcc/testsuite/gcc.target/arc/cancel-1.c
new file mode 100644
index 0000000..e050c53
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/cancel-1.c
@@ -0,0 +1,31 @@
+/* Test for cleanups with pthread_cancel. Any issue with libgcc's unwinder
+ will cause this test to spin in pthread_join. */
+
+/* { dg-do run } */
+/* { dg-require-effective-target pthread } */
+/* { dg-options "-pthread" } */
+
+#include <pthread.h>
+#include <unistd.h>
+#include <stdio.h>
+
+void *thread_loop (void *)
+{
+ while (1)
+ {
+ printf("worker: loop\n");
+ sleep(1);
+ }
+}
+
+int main ()
+{
+ pthread_t thread;
+
+ pthread_create (&thread, 0, thread_loop, 0);
+ sleep(5);
+ pthread_cancel (thread);
+ pthread_join (thread, 0);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mul64-1.c b/gcc/testsuite/gcc.target/arc/mul64-1.c
index 2543fc3..1a351fe 100644
--- a/gcc/testsuite/gcc.target/arc/mul64-1.c
+++ b/gcc/testsuite/gcc.target/arc/mul64-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-skip-if "MUL64 is ARC600 extension." { ! { clmcpu } } } */
+/* { dg-skip-if "MUL64 is ARC600 extension." { { ! { clmcpu } } || *-linux-* } } */
/* { dg-options "-O2 -mmul64 -mbig-endian -mcpu=arc600" } */
/* Check if mlo/mhi registers are correctly layout when we compile for
diff --git a/gcc/testsuite/gcc.target/arc/tls-gd.c b/gcc/testsuite/gcc.target/arc/tls-gd.c
index aa1b542..d02af95 100644
--- a/gcc/testsuite/gcc.target/arc/tls-gd.c
+++ b/gcc/testsuite/gcc.target/arc/tls-gd.c
@@ -13,5 +13,5 @@ int *ae2 (void)
return &e2;
}
-/* { dg-final { scan-assembler "add r0,pcl,@e2@tlsgd" } } */
-/* { dg-final { scan-assembler "bl @__tls_get_addr@plt" } } */
+/* { dg-final { scan-assembler "add\\s+r0,pcl,@e2@tlsgd" } } */
+/* { dg-final { scan-assembler "bl\\s+@__tls_get_addr@plt" } } */
diff --git a/gcc/testsuite/gcc.target/arc/tls-ie.c b/gcc/testsuite/gcc.target/arc/tls-ie.c
index 0c981cf..f4ad635 100644
--- a/gcc/testsuite/gcc.target/arc/tls-ie.c
+++ b/gcc/testsuite/gcc.target/arc/tls-ie.c
@@ -13,5 +13,5 @@ int *ae2 (void)
return &e2;
}
-/* { dg-final { scan-assembler "ld r0,\\\[pcl,@e2@tlsie\\\]" } } */
-/* { dg-final { scan-assembler "add_s r0,r0,r25" } } */
+/* { dg-final { scan-assembler "ld\\s+r0,\\\[pcl,@e2@tlsie\\\]" } } */
+/* { dg-final { scan-assembler "add_s\\s+r0,r0,r25" } } */
diff --git a/gcc/testsuite/gcc.target/arc/tls-ld.c b/gcc/testsuite/gcc.target/arc/tls-ld.c
index 351c3f0..68ab9bf 100644
--- a/gcc/testsuite/gcc.target/arc/tls-ld.c
+++ b/gcc/testsuite/gcc.target/arc/tls-ld.c
@@ -13,6 +13,6 @@ int *ae2 (void)
return &e2;
}
-/* { dg-final { scan-assembler "add r0,pcl,@.tbss@tlsgd" } } */
-/* { dg-final { scan-assembler "bl @__tls_get_addr@plt" } } */
-/* { dg-final { scan-assembler "add_s r0,r0,@e2@dtpoff" } } */
+/* { dg-final { scan-assembler "add\\s+r0,pcl,@.tbss@tlsgd" } } */
+/* { dg-final { scan-assembler "bl\\s+@__tls_get_addr@plt" } } */
+/* { dg-final { scan-assembler "add_s\\s+r0,r0,@e2@dtpoff" } } */
diff --git a/gcc/testsuite/gcc.target/arc/tmac-4.c b/gcc/testsuite/gcc.target/arc/tmac-4.c
new file mode 100644
index 0000000..3c6b993
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/tmac-4.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
+/* { dg-options "-O3 -mbig-endian -mcpu=hs38" } */
+
+struct a {};
+struct b {
+ int c;
+ int d;
+};
+
+struct {
+ struct a e;
+ struct b f[];
+} g;
+short h;
+
+extern void bar (int *);
+
+int foo(void)
+{
+ struct b *a;
+ for (;;)
+ {
+ a = &g.f[h];
+ bar(&a->d);
+ }
+}
+
+/* { dg-final { scan-assembler "dmach" } } */
diff --git a/gcc/testsuite/gcc.target/arc/uncached-8.c b/gcc/testsuite/gcc.target/arc/uncached-8.c
index 060229b..b5ea235 100644
--- a/gcc/testsuite/gcc.target/arc/uncached-8.c
+++ b/gcc/testsuite/gcc.target/arc/uncached-8.c
@@ -29,5 +29,6 @@ void bar (void)
x.c.b.a = 10;
}
-/* { dg-final { scan-assembler-times "st\.di" 1 } } */
-/* { dg-final { scan-assembler-times "st\.as\.di" 1 } } */
+/* { dg-final { scan-assembler-times "st\.di" 2 { target { *-linux-* } } } } */
+/* { dg-final { scan-assembler-times "st\.di" 1 { target { *-elf32-* } } } } */
+/* { dg-final { scan-assembler-times "st\.as\.di" 1 { target { *-elf32-* } } } } */
diff --git a/gcc/testsuite/gcc.target/arm/aapcs/aapcs.exp b/gcc/testsuite/gcc.target/arm/aapcs/aapcs.exp
index 6510262..ca81301 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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
index 8e0d0e2..3803517 100644
--- a/gcc/testsuite/gcc.target/arm/acle/acle.exp
+++ b/gcc/testsuite/gcc.target/arm/acle/acle.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 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/arm.exp b/gcc/testsuite/gcc.target/arm/arm.exp
index 4d7c2ad..c1fba04 100644
--- a/gcc/testsuite/gcc.target/arm/arm.exp
+++ b/gcc/testsuite/gcc.target/arm/arm.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/asm-flag-7.c b/gcc/testsuite/gcc.target/arm/asm-flag-7.c
new file mode 100644
index 0000000..ac11da0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/asm-flag-7.c
@@ -0,0 +1,23 @@
+/* Test that "=@cc*" works with MEM_P RTX */
+/* PR target/102941 */
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+/* { dg-skip-if "" { arm_thumb1 } } */
+
+#ifndef __GCC_ASM_FLAG_OUTPUTS__
+#error "missing preprocessor define"
+#endif
+int test_cmpu_x;
+
+void f(long *);
+long
+test_cmpu_y() {
+ long le;
+ f(&le);
+ __asm__("cmp %"
+ "[x], %"
+ "[y]"
+ : "=@ccls"(le)
+ : [x] ""(test_cmpu_x), [y] ""(test_cmpu_y));
+ return le;
+}
diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse.exp b/gcc/testsuite/gcc.target/arm/cmse/cmse.exp
index 4da1a46..436dd71 100644
--- a/gcc/testsuite/gcc.target/arm/cmse/cmse.exp
+++ b/gcc/testsuite/gcc.target/arm/cmse/cmse.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/crypto-vaese-erratum1.c b/gcc/testsuite/gcc.target/arm/crypto-vaese-erratum1.c
new file mode 100644
index 0000000..3f16688
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vaese-erratum1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-O2 -mfix-cortex-a57-aes-1742098 -dp" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+uint8x16_t
+foo (uint8x16_t v)
+{
+ const uint8x16_t key1 = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f};
+ const uint8x16_t key2 = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f};
+ int i;
+
+ for (i = 0; i < 16; ++i)
+ {
+ v = vaesmcq_u8 (vaeseq_u8 (v, key1));
+ v = vaesmcq_u8 (vaeseq_u8 (v, key2));
+ }
+ return v;
+}
+
+/* { dg-final { scan-assembler "aese.8\tq\[0-9\]+, q\[0-9\]+" } } */
+/* { dg-final { scan-assembler-times "aes_op_protect/2" 2} } */
+/* { dg-final { scan-assembler-times "aes_op_protect/0" 1} } */
+/* { dg-final { scan-assembler-times "(?:aesmc|aese_fused)_protected" 1} } */
diff --git a/gcc/testsuite/gcc.target/arm/lto/lto.exp b/gcc/testsuite/gcc.target/arm/lto/lto.exp
index 64ebd8d..4618aff 100644
--- a/gcc/testsuite/gcc.target/arm/lto/lto.exp
+++ b/gcc/testsuite/gcc.target/arm/lto/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp
index 4b30025..ddbb443 100644
--- a/gcc/testsuite/gcc.target/arm/multilib.exp
+++ b/gcc/testsuite/gcc.target/arm/multilib.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2021 Free Software Foundation, Inc.
+# Copyright (C) 2017-2022 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 +135,14 @@ if {[multilib_config "aprofile"] } {
{-march=armv8.6-a+simd+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
{-march=armv8.6-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
{-march=armv8.6-a+simd+nofp+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
+ {-march=armv9-a+crypto -mfloat-abi=soft} "thumb/v9-a/nofp"
+ {-march=armv9-a+simd+crypto -mfloat-abi=softfp} "thumb/v9-a+simd/softfp"
+ {-march=armv9-a+simd+crypto+nofp -mfloat-abi=softfp} "thumb/v9-a/nofp"
+ {-march=armv9-a+simd+nofp+crypto -mfloat-abi=softfp} "thumb/v9-a+simd/softfp"
+ {-march=armv9-a+fp16 -mfloat-abi=soft} "thumb/v9-a/nofp"
+ {-march=armv9-a+simd+fp16 -mfloat-abi=softfp} "thumb/v9-a+simd/softfp"
+ {-march=armv9-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v9-a/nofp"
+ {-march=armv9-a+simd+nofp+fp16 -mfloat-abi=softfp} "thumb/v9-a+simd/softfp"
{-mcpu=cortex-a53+crypto -mfloat-abi=hard} "thumb/v8-a+simd/hard"
{-mcpu=cortex-a53+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
{-march=armv8-a+crc -mfloat-abi=hard -mfpu=vfp} "thumb/v8-a+simd/hard"
diff --git a/gcc/testsuite/gcc.target/arm/mve/general-c/type_redef_1.c b/gcc/testsuite/gcc.target/arm/mve/general-c/type_redef_1.c
new file mode 100644
index 0000000..cd230f1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/mve/general-c/type_redef_1.c
@@ -0,0 +1,67 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
+/* { dg-add-options arm_v8_1m_mve_fp } */
+
+int mve_pred16_t; /* { dg-message "note: previous declaration of 'mve_pred16_t'" } */
+int int8x16_t; /* { dg-message "note: previous declaration of 'int8x16_t'" } */
+int int16x8_t; /* { dg-message "note: previous declaration of 'int16x8_t'" } */
+int int32x4_t; /* { dg-message "note: previous declaration of 'int32x4_t'" } */
+int int64x2_t; /* { dg-message "note: previous declaration of 'int64x2_t'" } */
+int uint8x16_t; /* { dg-message "note: previous declaration of 'uint8x16_t'" } */
+int uint16x8_t; /* { dg-message "note: previous declaration of 'uint16x8_t'" } */
+int uint32x4_t; /* { dg-message "note: previous declaration of 'uint32x4_t'" } */
+int uint64x2_t; /* { dg-message "note: previous declaration of 'uint64x2_t'" } */
+int float16x8_t; /* { dg-message "note: previous declaration of 'float16x8_t'" } */
+int float32x4_t; /* { dg-message "note: previous declaration of 'float32x4_t'" } */
+int int8x16x2_t; /* { dg-message "note: previous declaration of 'int8x16x2_t'" } */
+int int8x16x4_t; /* { dg-message "note: previous declaration of 'int8x16x4_t'" } */
+int int16x8x2_t; /* { dg-message "note: previous declaration of 'int16x8x2_t'" } */
+int int16x8x4_t; /* { dg-message "note: previous declaration of 'int16x8x4_t'" } */
+int int32x4x2_t; /* { dg-message "note: previous declaration of 'int32x4x2_t'" } */
+int int32x4x4_t; /* { dg-message "note: previous declaration of 'int32x4x4_t'" } */
+int int64x2x2_t; /* { dg-message "note: previous declaration of 'int64x2x2_t'" } */
+int int64x2x4_t; /* { dg-message "note: previous declaration of 'int64x2x4_t'" } */
+int uint8x16x2_t; /* { dg-message "note: previous declaration of 'uint8x16x2_t'" } */
+int uint8x16x4_t; /* { dg-message "note: previous declaration of 'uint8x16x4_t'" } */
+int uint16x8x2_t; /* { dg-message "note: previous declaration of 'uint16x8x2_t'" } */
+int uint16x8x4_t; /* { dg-message "note: previous declaration of 'uint16x8x4_t'" } */
+int uint32x4x2_t; /* { dg-message "note: previous declaration of 'uint32x4x2_t'" } */
+int uint32x4x4_t; /* { dg-message "note: previous declaration of 'uint32x4x4_t'" } */
+int uint64x2x2_t; /* { dg-message "note: previous declaration of 'uint64x2x2_t'" } */
+int uint64x2x4_t; /* { dg-message "note: previous declaration of 'uint64x2x4_t'" } */
+int float16x8x2_t; /* { dg-message "note: previous declaration of 'float16x8x2_t'" } */
+int float16x8x4_t; /* { dg-message "note: previous declaration of 'float16x8x4_t'" } */
+int float32x4x2_t; /* { dg-message "note: previous declaration of 'float32x4x2_t'" } */
+int float32x4x4_t; /* { dg-message "note: previous declaration of 'float32x4x4_t'" } */
+
+#pragma GCC arm "arm_mve_types.h" /* { dg-error {'mve_pred16_t' redeclared} } */
+ /* { dg-error {'int8x16_t' redeclared} "" {target *-*-*} .-1 } */
+ /* { dg-error {'int16x8_t' redeclared} "" {target *-*-*} .-2 } */
+ /* { dg-error {'int32x4_t' redeclared} "" {target *-*-*} .-3 } */
+ /* { dg-error {'int64x2_t' redeclared} "" {target *-*-*} .-4 } */
+ /* { dg-error {'uint8x16_t' redeclared} "" {target *-*-*} .-5 } */
+ /* { dg-error {'uint16x8_t' redeclared} "" {target *-*-*} .-6 } */
+ /* { dg-error {'uint32x4_t' redeclared} "" {target *-*-*} .-7 } */
+ /* { dg-error {'uint64x2_t' redeclared} "" {target *-*-*} .-8 } */
+ /* { dg-error {'float16x8_t' redeclared} "" {target *-*-*} .-9 } */
+ /* { dg-error {'float32x4_t' redeclared} "" {target *-*-*} .-10 } */
+ /* { dg-error {'int8x16x2_t' redeclared} "" {target *-*-*} .-11 } */
+ /* { dg-error {'int8x16x4_t' redeclared} "" {target *-*-*} .-12 } */
+ /* { dg-error {'int16x8x2_t' redeclared} "" {target *-*-*} .-13 } */
+ /* { dg-error {'int16x8x4_t' redeclared} "" {target *-*-*} .-14 } */
+ /* { dg-error {'int32x4x2_t' redeclared} "" {target *-*-*} .-15 } */
+ /* { dg-error {'int32x4x4_t' redeclared} "" {target *-*-*} .-16 } */
+ /* { dg-error {'int64x2x2_t' redeclared} "" {target *-*-*} .-17 } */
+ /* { dg-error {'int64x2x4_t' redeclared} "" {target *-*-*} .-18 } */
+ /* { dg-error {'uint8x16x2_t' redeclared} "" {target *-*-*} .-19 } */
+ /* { dg-error {'uint8x16x4_t' redeclared} "" {target *-*-*} .-20 } */
+ /* { dg-error {'uint16x8x2_t' redeclared} "" {target *-*-*} .-21 } */
+ /* { dg-error {'uint16x8x4_t' redeclared} "" {target *-*-*} .-22 } */
+ /* { dg-error {'uint32x4x2_t' redeclared} "" {target *-*-*} .-23 } */
+ /* { dg-error {'uint32x4x4_t' redeclared} "" {target *-*-*} .-24 } */
+ /* { dg-error {'uint64x2x2_t' redeclared} "" {target *-*-*} .-25 } */
+ /* { dg-error {'uint64x2x4_t' redeclared} "" {target *-*-*} .-26 } */
+ /* { dg-error {'float16x8x2_t' redeclared} "" {target *-*-*} .-27 } */
+ /* { dg-error {'float16x8x4_t' redeclared} "" {target *-*-*} .-28 } */
+ /* { dg-error {'float32x4x2_t' redeclared} "" {target *-*-*} .-29 } */
+ /* { dg-error {'float32x4x4_t' redeclared} "" {target *-*-*} .-30 } */
diff --git a/gcc/testsuite/gcc.target/arm/mve/general/double_pragmas_1.c b/gcc/testsuite/gcc.target/arm/mve/general/double_pragmas_1.c
new file mode 100644
index 0000000..58466db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/mve/general/double_pragmas_1.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_1m_mve_ok } */
+/* { dg-add-options arm_v8_1m_mve } */
+
+/* It doesn't really matter if this produces errors about redefinitions,
+ but it mustn't trigger an ICE. */
+#pragma GCC arm "arm_mve_types.h"
+#pragma GCC arm "arm_mve_types.h" /* { dg-error "duplicate definition of 'arm_mve_types.h'" } */
diff --git a/gcc/testsuite/gcc.target/arm/mve/general/nomve_1.c b/gcc/testsuite/gcc.target/arm/mve/general/nomve_1.c
new file mode 100644
index 0000000..cdfb974
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/mve/general/nomve_1.c
@@ -0,0 +1,3 @@
+/* { dg-options "-mfloat-abi=soft" } */
+
+#pragma GCC arm "arm_mve_types.h" /* { dg-error {this definition requires the MVE ISA extension} } */
diff --git a/gcc/testsuite/gcc.target/arm/mve/mve.exp b/gcc/testsuite/gcc.target/arm/mve/mve.exp
index a858e52..5a02219 100644
--- a/gcc/testsuite/gcc.target/arm/mve/mve.exp
+++ b/gcc/testsuite/gcc.target/arm/mve/mve.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2021 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 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
@@ -44,6 +44,12 @@ dg-init
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/intrinsics/*.\[cCS\]]] \
"" $DEFAULT_CFLAGS
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/general/*.\[cCS\]]] \
+ "" $DEFAULT_CFLAGS
+
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/general-c/*.\[cCS\]]] \
+ "" $DEFAULT_CFLAGS
+
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
"" $DEFAULT_CFLAGS
diff --git a/gcc/testsuite/gcc.target/arm/pr100775.c b/gcc/testsuite/gcc.target/arm/pr100775.c
new file mode 100644
index 0000000..c648cd5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr100775.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
+/* { dg-options "-mthumb -fzero-call-used-regs=used" } */
+
+int
+foo (int x)
+{
+ return x;
+}
diff --git a/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp b/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp
index 60efcd6..7d429b7 100644
--- a/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp
+++ b/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/simd/simd.exp b/gcc/testsuite/gcc.target/arm/simd/simd.exp
index 5cde329..439ede8 100644
--- a/gcc/testsuite/gcc.target/arm/simd/simd.exp
+++ b/gcc/testsuite/gcc.target/arm/simd/simd.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/simd/vdot-2-1.c b/gcc/testsuite/gcc.target/arm/simd/vdot-2-1.c
index 88b80cf..35d713f 100644
--- a/gcc/testsuite/gcc.target/arm/simd/vdot-2-1.c
+++ b/gcc/testsuite/gcc.target/arm/simd/vdot-2-1.c
@@ -2,7 +2,7 @@
/* { dg-require-effective-target arm_hard_ok } */
/* { dg-require-effective-target arm_v8_2a_i8mm_ok } */
/* { dg-add-options arm_v8_2a_i8mm } */
-/* { dg-additional-options "-O -save-temps -mfloat-abi=hard" } */
+/* { dg-additional-options "-O -save-temps -mfloat-abi=hard -mfpu=auto" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include <arm_neon.h>
@@ -21,6 +21,17 @@ int32x2_t usfoo (int32x2_t r, uint8x8_t x, int8x8_t y)
}
/*
+**usfooq:
+** ...
+** vusdot\.s8 q0, q1, q2
+** bx lr
+*/
+int32x4_t usfooq (int32x4_t r, uint8x16_t x, int8x16_t y)
+{
+ return vusdotq_s32 (r, x, y);
+}
+
+/*
**usfoo_lane:
** ...
** vusdot\.s8 d0, d1, d2\[0\]
@@ -67,6 +78,52 @@ int32x4_t sfooq_lane (int32x4_t r, int8x16_t x, uint8x8_t y)
}
/*
+**usfoo_laneq:
+** ...
+** vusdot\.s8 d0, d1, d3\[0\]
+** bx lr
+*/
+int32x2_t usfoo_laneq (int32x2_t r, uint8x8_t x, int8x16_t y)
+{
+ return vusdot_laneq_s32 (r, x, y, 2);
+}
+
+/*
+**usfooq_laneq:
+** ...
+** vusdot\.s8 q0, q1, d5\[1\]
+** bx lr
+*/
+int32x4_t usfooq_laneq (int32x4_t r, uint8x16_t x, int8x16_t y)
+{
+ return vusdotq_laneq_s32 (r, x, y, 3);
+}
+
+/* Signed-Unsigned Dot Product instructions. */
+
+/*
+**sfoo_laneq:
+** ...
+** vsudot\.u8 d0, d1, d3\[0\]
+** bx lr
+*/
+int32x2_t sfoo_laneq (int32x2_t r, int8x8_t x, uint8x16_t y)
+{
+ return vsudot_laneq_s32 (r, x, y, 2);
+}
+
+/*
+**sfooq_laneq:
+** ...
+** vsudot\.u8 q0, q1, d5\[1\]
+** bx lr
+*/
+int32x4_t sfooq_laneq (int32x4_t r, int8x16_t x, uint8x16_t y)
+{
+ return vsudotq_laneq_s32 (r, x, y, 3);
+}
+
+/*
**usfoo_untied:
** ...
** vusdot\.s8 d1, d2, d3
diff --git a/gcc/testsuite/gcc.target/arm/simd/vdot-2-2.c b/gcc/testsuite/gcc.target/arm/simd/vdot-2-2.c
index 1c74718..c57dd42 100644
--- a/gcc/testsuite/gcc.target/arm/simd/vdot-2-2.c
+++ b/gcc/testsuite/gcc.target/arm/simd/vdot-2-2.c
@@ -2,7 +2,7 @@
/* { dg-require-effective-target arm_hard_ok } */
/* { dg-require-effective-target arm_v8_2a_i8mm_ok } */
/* { dg-add-options arm_v8_2a_i8mm } */
-/* { dg-additional-options "-O -save-temps -mbig-endian -mfloat-abi=hard" } */
+/* { dg-additional-options "-O -save-temps -mfloat-abi=hard -mbig-endian -mfpu=auto" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include <arm_neon.h>
@@ -21,6 +21,17 @@ int32x2_t usfoo (int32x2_t r, uint8x8_t x, int8x8_t y)
}
/*
+**usfooq:
+** ...
+** vusdot\.s8 q0, q1, q2
+** bx lr
+*/
+int32x4_t usfooq (int32x4_t r, uint8x16_t x, int8x16_t y)
+{
+ return vusdotq_s32 (r, x, y);
+}
+
+/*
**usfoo_lane:
** ...
** vusdot\.s8 d0, d1, d2\[0\]
@@ -67,6 +78,52 @@ int32x4_t sfooq_lane (int32x4_t r, int8x16_t x, uint8x8_t y)
}
/*
+**usfoo_laneq:
+** ...
+** vusdot\.s8 d0, d1, d3\[0\]
+** bx lr
+*/
+int32x2_t usfoo_laneq (int32x2_t r, uint8x8_t x, int8x16_t y)
+{
+ return vusdot_laneq_s32 (r, x, y, 2);
+}
+
+/*
+**usfooq_laneq:
+** ...
+** vusdot\.s8 q0, q1, d5\[1\]
+** bx lr
+*/
+int32x4_t usfooq_laneq (int32x4_t r, uint8x16_t x, int8x16_t y)
+{
+ return vusdotq_laneq_s32 (r, x, y, 3);
+}
+
+/* Signed-Unsigned Dot Product instructions. */
+
+/*
+**sfoo_laneq:
+** ...
+** vsudot\.u8 d0, d1, d3\[0\]
+** bx lr
+*/
+int32x2_t sfoo_laneq (int32x2_t r, int8x8_t x, uint8x16_t y)
+{
+ return vsudot_laneq_s32 (r, x, y, 2);
+}
+
+/*
+**sfooq_laneq:
+** ...
+** vsudot\.u8 q0, q1, d5\[1\]
+** bx lr
+*/
+int32x4_t sfooq_laneq (int32x4_t r, int8x16_t x, uint8x16_t y)
+{
+ return vsudotq_laneq_s32 (r, x, y, 3);
+}
+
+/*
**usfoo_untied:
** ...
** vusdot\.s8 d1, d2, d3
@@ -89,3 +146,4 @@ int32x2_t usfoo_lane_untied (int32x2_t unused, int32x2_t r, uint8x8_t x, int8x8_
{
return vusdot_lane_s32 (r, x, y, 0);
}
+
diff --git a/gcc/testsuite/gcc.target/arm/simd/vdot-compile.c b/gcc/testsuite/gcc.target/arm/simd/vdot-compile.c
index b3bd3bf..d3541e8 100644
--- a/gcc/testsuite/gcc.target/arm/simd/vdot-compile.c
+++ b/gcc/testsuite/gcc.target/arm/simd/vdot-compile.c
@@ -49,8 +49,28 @@ int32x4_t sfooq_lane (int32x4_t r, int8x16_t x, int8x8_t y)
return vdotq_lane_s32 (r, x, y, 0);
}
-/* { dg-final { scan-assembler-times {v[us]dot\.[us]8\td[0-9]+, d[0-9]+, d[0-9]+} 4 } } */
+int32x2_t sfoo_laneq1 (int32x2_t r, int8x8_t x, int8x16_t y)
+{
+ return vdot_laneq_s32 (r, x, y, 0);
+}
+
+int32x4_t sfooq_lane1 (int32x4_t r, int8x16_t x, int8x16_t y)
+{
+ return vdotq_laneq_s32 (r, x, y, 0);
+}
+
+int32x2_t sfoo_laneq2 (int32x2_t r, int8x8_t x, int8x16_t y)
+{
+ return vdot_laneq_s32 (r, x, y, 2);
+}
+
+int32x4_t sfooq_lane2 (int32x4_t r, int8x16_t x, int8x16_t y)
+{
+ return vdotq_laneq_s32 (r, x, y, 2);
+}
+
+/* { dg-final { scan-assembler-times {v[us]dot\.[us]8\td[0-9]+, d[0-9]+, d[0-9]+} 6 } } */
/* { dg-final { scan-assembler-times {v[us]dot\.[us]8\tq[0-9]+, q[0-9]+, q[0-9]+} 2 } } */
-/* { dg-final { scan-assembler-times {v[us]dot\.[us]8\td[0-9]+, d[0-9]+, d[0-9]+\[#?[0-9]\]} 2 } } */
-/* { dg-final { scan-assembler-times {v[us]dot\.[us]8\tq[0-9]+, q[0-9]+, d[0-9]+\[#?[0-9]\]} 2 } } */
+/* { dg-final { scan-assembler-times {v[us]dot\.[us]8\td[0-9]+, d[0-9]+, d[0-9]+\[#?[0-9]\]} 4 } } */
+/* { dg-final { scan-assembler-times {v[us]dot\.[us]8\tq[0-9]+, q[0-9]+, d[0-9]+\[#?[0-9]\]} 4 } } */
diff --git a/gcc/testsuite/gcc.target/arm/simd/vdot-exec.c b/gcc/testsuite/gcc.target/arm/simd/vdot-exec.c
index 054f470..89a196e 100644
--- a/gcc/testsuite/gcc.target/arm/simd/vdot-exec.c
+++ b/gcc/testsuite/gcc.target/arm/simd/vdot-exec.c
@@ -10,7 +10,7 @@ extern void abort();
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
# define ORDER(x, y) y
#else
-# define ORDER(x, y) x - y
+# define ORDER(x, y) (x - y)
#endif
#define P(n1,n2) n1,n1,n1,n1,n2,n2,n2,n2
@@ -33,7 +33,20 @@ extern void abort();
t3 f##_##rx1 = {0}; \
f##_##rx1 = f (f##_##rx1, f##_##x, f##_##y, ORDER (1, 1)); \
if (f##_##rx1[0] != n3 || f##_##rx1[1] != n4) \
- abort (); \
+ abort ();
+
+#define P2(n1,n2) n1,n1,n1,n1,n2,n2,n2,n2,n1,n1,n1,n1,n2,n2,n2,n2
+#define TEST_LANEQ(t1, t2, t3, f, r1, r2, n1, n2, n3, n4) \
+ ARR(f, x, t1, r1); \
+ ARR(f, y, t2, r2); \
+ t3 f##_##rx = {0}; \
+ f##_##rx = f (f##_##rx, f##_##x, f##_##y, ORDER (3, 2)); \
+ if (f##_##rx[0] != n1 || f##_##rx[1] != n2) \
+ abort (); \
+ t3 f##_##rx1 = {0}; \
+ f##_##rx1 = f (f##_##rx1, f##_##x, f##_##y, ORDER (3, 3)); \
+ if (f##_##rx1[0] != n3 || f##_##rx1[1] != n4) \
+ abort ();
int
main()
@@ -45,11 +58,16 @@ main()
TEST (int8x16_t, int8x16_t, int32x4_t, vdotq_s32, P(1,2), P(-2,-3), -8, -24);
TEST_LANE (uint8x8_t, uint8x8_t, uint32x2_t, vdot_lane_u32, P(1,2), P(2,3), 8, 16, 12, 24);
-
TEST_LANE (int8x8_t, int8x8_t, int32x2_t, vdot_lane_s32, P(1,2), P(-2,-3), -8, -16, -12, -24);
TEST_LANE (uint8x16_t, uint8x8_t, uint32x4_t, vdotq_lane_u32, P(1,2), P(2,3), 8, 16, 12, 24);
TEST_LANE (int8x16_t, int8x8_t, int32x4_t, vdotq_lane_s32, P(1,2), P(-2,-3), -8, -16, -12, -24);
+ TEST_LANEQ (uint8x8_t, uint8x16_t, uint32x2_t, vdot_laneq_u32, P(1,2), P2(2,3), 8, 16, 12, 24);
+ TEST_LANEQ (int8x8_t, int8x16_t, int32x2_t, vdot_laneq_s32, P(1,2), P2(-2,-3), -8, -16, -12, -24);
+
+ TEST_LANEQ (uint8x16_t, uint8x16_t, uint32x4_t, vdotq_laneq_u32, P2(1,2), P2(2,3), 8, 16, 12, 24);
+ TEST_LANEQ (int8x16_t, int8x16_t, int32x4_t, vdotq_laneq_s32, P2(1,2), P2(-2,-3), -8, -16, -12, -24);
+
return 0;
}
diff --git a/gcc/testsuite/gcc.target/arm/stack-protector-7.c b/gcc/testsuite/gcc.target/arm/stack-protector-7.c
new file mode 100644
index 0000000..2173bc5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/stack-protector-7.c
@@ -0,0 +1,12 @@
+/* { dg-require-effective-target arm_hard_vfp_ok } */
+/* { dg-require-effective-target arm_arch_v7a_ok } */
+/* { dg-do compile } */
+/* { dg-options "-march=armv7-a -mfpu=vfp -fstack-protector-all -Os -mstack-protector-guard=tls -mstack-protector-guard-offset=1296 -mtp=cp15" } */
+
+#include "stack-protector-5.c"
+
+/* See the comment in stack-protector-5.c. */
+/* { dg-final { scan-assembler-times {\tstr\t} 1 } } */
+/* Expect two TLS register accesses and two occurrences of the offset */
+/* { dg-final { scan-assembler-times {\tmrc\t} 2 } } */
+/* { dg-final { scan-assembler-times {1296} 2 } } */
diff --git a/gcc/testsuite/gcc.target/arm/stack-protector-8.c b/gcc/testsuite/gcc.target/arm/stack-protector-8.c
new file mode 100644
index 0000000..ea5ef32
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/stack-protector-8.c
@@ -0,0 +1,7 @@
+/* { dg-require-effective-target arm_hard_vfp_ok } */
+/* { dg-require-effective-target arm_arch_v7a_ok } */
+/* { dg-do compile } */
+/* { dg-error "needs a hardware TLS register" "missing error when using TLS stack protector without hardware TLS register" { target *-*-* } 0 } */
+/* { dg-options "-fstack-protector-all -Os -mstack-protector-guard=tls -mtp=soft" } */
+
+int foo;
diff --git a/gcc/testsuite/gcc.target/avr/avr.exp b/gcc/testsuite/gcc.target/avr/avr.exp
index c8af505..ab210ad 100644
--- a/gcc/testsuite/gcc.target/avr/avr.exp
+++ b/gcc/testsuite/gcc.target/avr/avr.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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/mmcu/avr-mmcu.exp b/gcc/testsuite/gcc.target/avr/mmcu/avr-mmcu.exp
index f672a08..b05695b 100644
--- a/gcc/testsuite/gcc.target/avr/mmcu/avr-mmcu.exp
+++ b/gcc/testsuite/gcc.target/avr/mmcu/avr-mmcu.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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/avr-torture.exp b/gcc/testsuite/gcc.target/avr/torture/avr-torture.exp
index deec129..4741ab1 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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/bfin.exp b/gcc/testsuite/gcc.target/bfin/bfin.exp
index ccaab47..65f5fbf 100644
--- a/gcc/testsuite/gcc.target/bfin/bfin.exp
+++ b/gcc/testsuite/gcc.target/bfin/bfin.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2021 Free Software Foundation, Inc.
+# Copyright (C) 2007-2022 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 eecf520..be22951 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/bpf/bpf.exp b/gcc/testsuite/gcc.target/bpf/bpf.exp
index 8c293d4..02dee04 100644
--- a/gcc/testsuite/gcc.target/bpf/bpf.exp
+++ b/gcc/testsuite/gcc.target/bpf/bpf.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2021 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 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/bpf/core-section-1.c b/gcc/testsuite/gcc.target/bpf/core-section-1.c
index 031acd5..4f16b08 100644
--- a/gcc/testsuite/gcc.target/bpf/core-section-1.c
+++ b/gcc/testsuite/gcc.target/bpf/core-section-1.c
@@ -35,4 +35,4 @@ int bar_func (struct T *t)
/* { dg-final { scan-assembler-times "ascii \"foo_sec.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */
/* { dg-final { scan-assembler-times "ascii \"bar_sec.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */
/* { dg-final { scan-assembler-times "bpfcr_type" 2 } } */
-/* { dg-final { scan-assembler-times "btfext_secinfo_rec_size" 2 } } */
+/* { dg-final { scan-assembler-times "btfext_core_info_rec_size" 1 } } */
diff --git a/gcc/testsuite/gcc.target/cris/cris.exp b/gcc/testsuite/gcc.target/cris/cris.exp
index 2802c11..99d6bfd 100644
--- a/gcc/testsuite/gcc.target/cris/cris.exp
+++ b/gcc/testsuite/gcc.target/cris/cris.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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/cris-torture.exp b/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp
index 8f88077..cc6074a 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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/csky/csky.exp b/gcc/testsuite/gcc.target/csky/csky.exp
index 880cb880..7d138e8 100644
--- a/gcc/testsuite/gcc.target/csky/csky.exp
+++ b/gcc/testsuite/gcc.target/csky/csky.exp
@@ -1,5 +1,5 @@
# GCC testsuite for C-SKY targets.
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 Free Software Foundation, Inc.
# Contributed by C-SKY Microsystems and Mentor Graphics.
#
# This program is free software; you can redistribute it and/or modify
diff --git a/gcc/testsuite/gcc.target/csky/fpuv3/fpuv3.exp b/gcc/testsuite/gcc.target/csky/fpuv3/fpuv3.exp
index 68c166c..77d6fc9 100644
--- a/gcc/testsuite/gcc.target/csky/fpuv3/fpuv3.exp
+++ b/gcc/testsuite/gcc.target/csky/fpuv3/fpuv3.exp
@@ -1,5 +1,5 @@
# GCC testsuite for C-SKY targets FPUV3 instructions.
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 Free Software Foundation, Inc.
# Contributed by C-SKY Microsystems and Mentor Graphics.
#
# This program is free software; you can redistribute it and/or modify
diff --git a/gcc/testsuite/gcc.target/epiphany/epiphany.exp b/gcc/testsuite/gcc.target/epiphany/epiphany.exp
index 9a6efaf..30717b1 100644
--- a/gcc/testsuite/gcc.target/epiphany/epiphany.exp
+++ b/gcc/testsuite/gcc.target/epiphany/epiphany.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2021 Free Software Foundation, Inc.
+# Copyright (C) 2007-2022 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/frv/frv.exp b/gcc/testsuite/gcc.target/frv/frv.exp
index c4215f1..9749716 100644
--- a/gcc/testsuite/gcc.target/frv/frv.exp
+++ b/gcc/testsuite/gcc.target/frv/frv.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/gcn/gcn.exp b/gcc/testsuite/gcc.target/gcn/gcn.exp
index 9d056f3..72a58b2 100644
--- a/gcc/testsuite/gcc.target/gcn/gcn.exp
+++ b/gcc/testsuite/gcc.target/gcn/gcn.exp
@@ -1,5 +1,5 @@
# Specific regression driver for nvptx.
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 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/h8300/h8300.exp b/gcc/testsuite/gcc.target/h8300/h8300.exp
index 759cbd1..ce613b7 100644
--- a/gcc/testsuite/gcc.target/h8300/h8300.exp
+++ b/gcc/testsuite/gcc.target/h8300/h8300.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 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/hppa/hppa.exp b/gcc/testsuite/gcc.target/hppa/hppa.exp
index 45e2e2c..f0d9b17 100644
--- a/gcc/testsuite/gcc.target/hppa/hppa.exp
+++ b/gcc/testsuite/gcc.target/hppa/hppa.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/hppa/shadd-2.c b/gcc/testsuite/gcc.target/hppa/shadd-2.c
index b92f782..74d4fcd 100644
--- a/gcc/testsuite/gcc.target/hppa/shadd-2.c
+++ b/gcc/testsuite/gcc.target/hppa/shadd-2.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
-/* { dg-final { scan-assembler-times "sh.add" 4 } } */
+/* { dg-final { scan-assembler-times "sh.add" 3 } } */
typedef struct rtx_def *rtx;
typedef const struct rtx_def *const_rtx;
diff --git a/gcc/testsuite/gcc.target/hppa/shadd-3.c b/gcc/testsuite/gcc.target/hppa/shadd-3.c
index 2d0b648..a0c1f66 100644
--- a/gcc/testsuite/gcc.target/hppa/shadd-3.c
+++ b/gcc/testsuite/gcc.target/hppa/shadd-3.c
@@ -10,7 +10,7 @@
over time we'll have to revisit the combine and/or postreload
dumps. Note we have disabled delay slot filling to improve
test stability. */
-/* { dg-final { scan-assembler-times "sh.add" 4 } } */
+/* { dg-final { scan-assembler-times "sh.add" 3 } } */
extern void oof (void);
typedef struct simple_bitmap_def *sbitmap;
diff --git a/gcc/testsuite/gcc.target/i386/amx-check.h b/gcc/testsuite/gcc.target/i386/amx-check.h
index 03616ff..434b0e5 100644
--- a/gcc/testsuite/gcc.target/i386/amx-check.h
+++ b/gcc/testsuite/gcc.target/i386/amx-check.h
@@ -139,8 +139,27 @@ int check_tile_register (__tile* ref, __tile* target)
for (i = 0; i < rows; i++)
for (j = 0; j < colsb; j++)
- if (ref->buf[i * colsb + j] != target->buf[i * colsb + j])
- return 0;
+ if (ref->buf[i * colsb + j] != target->buf[i * colsb + j])
+ return 0;
+
+ return 1;
+}
+
+/* Compare float tile register value with __tile variable */
+int check_float_tile_register (__tile* ref, __tile* target)
+{
+ /* Tile register should be stored from tmm to
+ memory and compare with emulation results. */
+ int rows = target->rows;
+ int colsb = target->colsb / 4;
+ int i, j;
+ uint32_t *ref_buf = (uint32_t *) ref->buf;
+ uint32_t *target_buf = (uint32_t *) target->buf;
+
+ for (i = 0; i < rows; i++)
+ for (j = 0; j < colsb; j++)
+ if (abs(ref_buf[i * colsb + j] - target_buf[i * colsb + j]) > 1)
+ return 0;
return 1;
}
diff --git a/gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c b/gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c
index f7002ca..b00bc13 100644
--- a/gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c
+++ b/gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c
@@ -12,15 +12,25 @@ void test_amx_bf16_dpbf16ps ();
/* Transformation functions between bf16/float */
static uint16_t make_bf16 (float f)
{
- uint32_t u = (uint32_t)f;
- u = (u >> 16) & 0xffff;
- return (uint16_t)u;
+ union
+ {
+ float f;
+ uint32_t u;
+ } fu;
+ fu.f = f;
+ fu.u = (fu.u >> 16) & 0xffff;
+ return (uint16_t) fu.u;
}
static float make_f32 (uint16_t bf)
{
- uint32_t u = (uint32_t)(bf << 16);
- return (float)u;
+ union
+ {
+ float f;
+ uint32_t u;
+ } fu;
+ fu.u = (uint32_t) bf << 16;
+ return fu.f;
}
/* Init tile buffer with bf16 pairs */
@@ -54,10 +64,10 @@ void calc_matrix_dpbf16ps (__tile *dst, __tile *src1, __tile *src2)
for (t = 0; t < 2; t+=2)
{
dst_buf[i * N + k] +=
- (make_f32(src1_buf[i * 4 * N + 4 * j + t]) *
- make_f32(src2_buf[j * 4 * K + 4 * k + t])) +
- (make_f32(src1_buf[i * 4 * N + 4 * j + t + 1]) *
- make_f32(src2_buf[j * 4 * K + 4 * k + t + 1]));
+ (make_f32(src1_buf[i * 2 * N + 2 * j + t]) *
+ make_f32(src2_buf[j * 2 * K + 2 * k + t])) +
+ (make_f32(src1_buf[i * 2 * N + 2 * j + t + 1]) *
+ make_f32(src2_buf[j * 2 * K + 2 * k + t + 1]));
}
}
@@ -80,6 +90,6 @@ void test_amx_bf16_dpbf16ps ()
_tile_dpbf16ps (1, 2, 3);
_tile_stored (1, dst_ref.buf, _STRIDE);
- if (!check_tile_register (&dst_ref, &dst))
+ if (!check_float_tile_register (&dst_ref, &dst))
abort();
}
diff --git a/gcc/testsuite/gcc.target/i386/amxtile-3.c b/gcc/testsuite/gcc.target/i386/amxtile-3.c
new file mode 100644
index 0000000..26204e3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/amxtile-3.c
@@ -0,0 +1,34 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -mamx-tile " } */
+/* { dg-final { scan-assembler "tileloadd\[ \\t]+\[^\n\]*\\(%\[a-z0-9]*\,%\[a-z0-9\]*\,\[124\]\\)+\[^\n\]*%tmm\[0-9\]" } } */
+/* { dg-final { scan-assembler "tileloaddt1\[ \\t]+\[^\n\]*\\(%\[a-z0-9]*\,%\[a-z0-9\]*\,\[124\]\\)+\[^\n\]*%tmm\[0-9\]" } } */
+/* { dg-final { scan-assembler "tilestored\[ \\t]+\[^\n\]*%tmm\[0-9\]+\[^\n\]*\\(%\[a-z0-9]*\,%\[a-z0-9\]*\,\[124\]\\)" } } */
+/* { dg-final { scan-assembler "leaq\[ \\t]+4" { target lp64 } } } */
+/* { dg-final { scan-assembler "leaq\[ \\t]+8" { target lp64 } } } */
+/* { dg-final { scan-assembler "addq\[ \\t]+\\\$12" { target lp64 } } } */
+/* { dg-final { scan-assembler "leal\[ \\t]+4" { target x32 } } } */
+/* { dg-final { scan-assembler "leal\[ \\t]+8" { target x32 } } } */
+/* { dg-final { scan-assembler "addl\[ \\t]+\\\$12" { target x32 } } } */
+/* { dg-final { scan-assembler-not "leaq\[ \\t]+1" { target lp64 } } } */
+/* { dg-final { scan-assembler-not "leaq\[ \\t]+2" { target lp64 } } } */
+/* { dg-final { scan-assembler-not "addq\[ \\t]+\\\$3" { target lp64 } } } */
+/* { dg-final { scan-assembler-not "leal\[ \\t]+1" { target x32 } } } */
+/* { dg-final { scan-assembler-not "leal\[ \\t]+2" { target x32 } } } */
+/* { dg-final { scan-assembler-not "addl\[ \\t]+\\\$3" { target x32 } } } */
+#include <immintrin.h>
+
+extern int a[];
+extern const float* base;
+extern const int stride;
+
+#define TMM0 0
+#define TMM1 1
+#define TMM2 2
+#define TMM3 3
+
+void TEST ()
+{
+ _tile_loadd (TMM3, base + 1, stride);
+ _tile_stream_loadd (TMM2, base + 2, stride);
+ _tile_stored (TMM2, base + 3, stride);
+}
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-2.c b/gcc/testsuite/gcc.target/i386/auto-init-2.c
index e22930a..0c59c62 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-2.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-2.c
@@ -29,7 +29,7 @@ void foo()
return;
}
-/* { dg-final { scan-rtl-dump-times "0xfffffffffffffffe" 2 "expand" } } */
+/* { dg-final { scan-rtl-dump-times "0xfffffffffffffffe" 1 "expand" } } */
/* { dg-final { scan-rtl-dump-times "0xfffffffffffffefe" 1 "expand" } } */
/* { dg-final { scan-rtl-dump-times "0xfffffffffefefefe" 2 "expand" { target lp64 } } } */
/* { dg-final { scan-rtl-dump-times "0xfefefefefefefefe" 3 "expand" { target lp64 } } } */
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-4.c b/gcc/testsuite/gcc.target/i386/auto-init-4.c
index 7b46c74..1803dd4 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-4.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-4.c
@@ -1,6 +1,6 @@
/* Verify pattern initialization for floating point type automatic variables. */
/* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern -march=x86-64 -mtune=generic -msse" } */
long double result;
@@ -14,8 +14,6 @@ long double foo()
return result;
}
-/* { dg-final { scan-rtl-dump-times "0xfffffffffefefefe" 1 "expand" { target { ! ia32 } } } } */
-/* { dg-final { scan-rtl-dump-times "\\\[0xfefefefefefefefe\\\]" 1 "expand" { target { ! ia32 } } } } */
-/* { dg-final { scan-rtl-dump-times "0xfffffffffffffffe\\\]\\\) repeated x16" 1 "expand" { target { ! ia32 } } } } */
-/* { dg-final { scan-rtl-dump-times "0xfffffffffefefefe" 2 "expand" { target ia32 } } } */
-/* { dg-final { scan-rtl-dump-times "\\\[0xfefefefefefefefe\\\]" 2 "expand" { target ia32 } } } */
+
+/* { dg-final { scan-assembler-times "long\t-16843010" 5 { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "long\t-16843010" 3 { target { ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/auto-init-6.c b/gcc/testsuite/gcc.target/i386/auto-init-6.c
index f75081e..e53385f 100644
--- a/gcc/testsuite/gcc.target/i386/auto-init-6.c
+++ b/gcc/testsuite/gcc.target/i386/auto-init-6.c
@@ -1,6 +1,8 @@
/* Verify pattern initialization for complex type automatic variables. */
+/* Note, _Complex long double is initialized to zeroes due to the current
+ implemenation limitation. */
/* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand -march=x86-64 -mtune=generic -msse" } */
+/* { dg-options "-ftrivial-auto-var-init=pattern -march=x86-64 -mtune=generic -msse" } */
_Complex long double result;
@@ -15,5 +17,6 @@ _Complex long double foo()
return result;
}
-/* { dg-final { scan-rtl-dump-times "\\\[0xfefefefefefefefe\\\]" 1 "expand" } } */
-/* { dg-final { scan-rtl-dump-times "0xfffffffffffffffe\\\]\\\) repeated x16" 2 "expand" } } */
+/* { dg-final { scan-assembler-times "long\t0" 8 { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "long\t-16843010" 6 } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-17.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-17.c
index 6dc0dc0..d677e6f 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 -dp" } */
+/* { dg-options "-O2 -mavx -mabi=ms -dp -fno-stack-protector" } */
typedef float __m256 __attribute__ ((__vector_size__ (32), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/avx2-dest-false-dep-for-glc.c b/gcc/testsuite/gcc.target/i386/avx2-dest-false-dep-for-glc.c
new file mode 100644
index 0000000..787b1d0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx2-dest-false-dep-for-glc.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx2 -mtune=generic -mtune-ctrl=dest_false_dep_for_glc -O2" } */
+
+
+#include <immintrin.h>
+
+extern __m256i i1, i2, i3, i4;
+extern __m256d d1, d2;
+extern __m256 f1, f2;
+
+void vperm_test (void)
+{
+ i3 = _mm256_permutevar8x32_epi32 (i1, i2);
+ i4 = _mm256_permute4x64_epi64 (i1, 12);
+ d2 = _mm256_permute4x64_pd (d1, 12);
+ f2 = _mm256_permutevar8x32_ps (f1, i2);
+}
+
+/* { dg-final { scan-assembler-times "vxorps" 4 } } */
+/* { dg-final { scan-assembler-times "vpermd" 1 } } */
+/* { dg-final { scan-assembler-times "vpermq" 1 } } */
+/* { dg-final { scan-assembler-times "vpermpd" 1 } } */
+/* { dg-final { scan-assembler-times "vpermps" 1 } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/avx2-i32gatherpd256-4.c b/gcc/testsuite/gcc.target/i386/avx2-i32gatherpd256-4.c
index f24acbd..17b0c40 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-i32gatherpd256-4.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-i32gatherpd256-4.c
@@ -25,15 +25,19 @@ avx2_test (void)
int i;
union128i_d idx;
union256d res, src, mask;
- double s1[4], res_ref[4] = { 0 };
+ double s1[16], res_ref[4] = { 0 };
+ double *s1_ptr = s1 + 8;
- for (i = 0; i < 4; ++i)
+ for (i = 0; i < ARRAY_SIZE (s1); i++)
{
/* Set some stuff */
s1[i] = 2.718281828459045 * (i + 1) * (i + 2);
+ }
+ for (i = 0; i < 4; ++i)
+ {
/* Set src as something different from s1 */
- src.a[i] = -s1[i];
+ src.a[i] = -s1_ptr[i];
/* Mask out evens */
((long long *) mask.a)[i] = i % 2 ? 0 : -1;
@@ -43,9 +47,9 @@ avx2_test (void)
idx.a[i] = (16 - (i + 1) * 8) >> 1;
}
- res.x = _mm256_mask_i32gather_pd (src.x, s1, idx.x, mask.x, 2);
+ res.x = _mm256_mask_i32gather_pd (src.x, s1_ptr, idx.x, mask.x, 2);
- compute_i32gatherpd256 (src.a, s1, idx.a, mask.a, 2, res_ref);
+ compute_i32gatherpd256 (src.a, s1_ptr, idx.a, mask.a, 2, res_ref);
if (check_union256d (res, res_ref) != 0)
abort ();
diff --git a/gcc/testsuite/gcc.target/i386/avx2-i32gatherq256-4.c b/gcc/testsuite/gcc.target/i386/avx2-i32gatherq256-4.c
index 3eab9be..77ebf1f 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-i32gatherq256-4.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-i32gatherq256-4.c
@@ -25,15 +25,19 @@ avx2_test (void)
long long i;
union128i_d idx;
union256i_q res, src, mask;
- long long s1[4], res_ref[4] = { 0 };
+ long long s1[16], res_ref[4] = { 0 };
+ long long *s1_ptr = s1 + 8;
- for (i = 0; i < 4; ++i)
+ for (i = 0; i < ARRAY_SIZE (s1); i++)
{
/* Set some stuff */
s1[i] = 1983 * (i + 1) * (i + 2);
+ }
+ for (i = 0; i < 4; ++i)
+ {
/* Set src as something different from s1 */
- src.a[i] = -s1[i];
+ src.a[i] = -s1_ptr[i];
/* Mask out evens */
mask.a[i] = i % 2 ? 0 : -1;
@@ -44,10 +48,10 @@ avx2_test (void)
}
res.x = _mm256_mask_i32gather_epi64 (src.x,
- (long long int *) s1,
+ (long long int *) s1_ptr,
idx.x, mask.x, 2);
- compute_i32gatherpd256 (src.a, s1, idx.a, mask.a, 2, res_ref);
+ compute_i32gatherpd256 (src.a, s1_ptr, idx.a, mask.a, 2, res_ref);
if (check_union256i_q (res, res_ref) != 0)
abort ();
diff --git a/gcc/testsuite/gcc.target/i386/avx2-i64gatherpd256-4.c b/gcc/testsuite/gcc.target/i386/avx2-i64gatherpd256-4.c
index 09a5f8a..cf94256 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-i64gatherpd256-4.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-i64gatherpd256-4.c
@@ -25,15 +25,19 @@ avx2_test (void)
int i;
union256i_q idx;
union256d res, src, mask;
- double s1[4], res_ref[4] = { 0 };
+ double s1[16], res_ref[4] = { 0 };
+ double *s1_ptr = s1 + 8;
- for (i = 0; i < 4; ++i)
+ for (i = 0; i < ARRAY_SIZE (s1); i++)
{
/* Set some stuff */
s1[i] = 2.718281828459045 * (i + 1) * (i + 2);
+ }
+ for (i = 0; i < 4; ++i)
+ {
/* Set src as something different from s1 */
- src.a[i] = -s1[i];
+ src.a[i] = -s1_ptr[i];
/* Mask out evens */
((long long *) mask.a)[i] = i % 2 ? 0 : -1;
@@ -43,9 +47,9 @@ avx2_test (void)
idx.a[i] = (16 - (i + 1) * 8) >> 1;
}
- res.x = _mm256_mask_i64gather_pd (src.x, s1, idx.x, mask.x, 2);
+ res.x = _mm256_mask_i64gather_pd (src.x, s1_ptr, idx.x, mask.x, 2);
- compute_i64gatherpd256 (src.a, s1, idx.a, mask.a, 2, res_ref);
+ compute_i64gatherpd256 (src.a, s1_ptr, idx.a, mask.a, 2, res_ref);
if (check_union256d (res, res_ref) != 0)
abort ();
diff --git a/gcc/testsuite/gcc.target/i386/avx2-i64gatherq256-4.c b/gcc/testsuite/gcc.target/i386/avx2-i64gatherq256-4.c
index 355c8c2..396ffb4 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-i64gatherq256-4.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-i64gatherq256-4.c
@@ -26,15 +26,19 @@ avx2_test (void)
long long i;
union256i_q idx;
union256i_q res, src, mask;
- long long s1[4], res_ref[4] = { 0 };
+ long long s1[16], res_ref[4] = { 0 };
+ long long *s1_ptr = s1 + 8;
- for (i = 0; i < 4; ++i)
+ for (i = 0; i < ARRAY_SIZE (s1); i++)
{
/* Set some stuff */
s1[i] = 1983 * (i + 1) * (i + 2);
+ }
+ for (i = 0; i < 4; ++i)
+ {
/* Set src as something different from s1 */
- src.a[i] = -s1[i];
+ src.a[i] = -s1_ptr[i];
/* Mask out evens */
((long long *) mask.a)[i] = i % 2 ? 0 : -1;
@@ -45,10 +49,10 @@ avx2_test (void)
}
res.x = _mm256_mask_i64gather_epi64 (src.x,
- (long long int *) s1,
+ (long long int *) s1_ptr,
idx.x, mask.x, 2);
- compute_i64gatherq256 (src.a, s1, idx.a, mask.a, 2, res_ref);
+ compute_i64gatherq256 (src.a, s1_ptr, idx.a, mask.a, 2, res_ref);
if (check_union256i_q (res, res_ref) != 0)
abort ();
diff --git a/gcc/testsuite/gcc.target/i386/avx2-psraq-1.c b/gcc/testsuite/gcc.target/i386/avx2-psraq-1.c
index e9051bf..96e5c4c 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-psraq-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-psraq-1.c
@@ -41,7 +41,7 @@ TEST (void)
V a = (V) { 0xdeadbeefcafebabeULL, 0x123456789abcdef0ULL,
0x173a74be8a95134cULL, 0x817bae35ac0ebf12ULL };
int i;
- for (i = 0; tests[i].n; i++)
+ for (i = 0; i < ARRAY_SIZE (tests); i++)
{
V c = tests[i].fn (a);
if (c[0] != a[0] >> tests[i].n || c[1] != a[1] >> tests[i].n
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpabsb256-2.c b/gcc/testsuite/gcc.target/i386/avx2-vpabsb256-2.c
index 05db8a4..9b732af 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpabsb256-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpabsb256-2.c
@@ -28,7 +28,7 @@ avx2_test (void)
union256i_b s, d;
- for (i = 0; i < 256; ++i)
+ for (i = 0; i < 256 - 7; ++i)
{
/* Recompute the results for 256-bits */
compute_pabs256 (&vals[i], ck);
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpabsd256-2.c b/gcc/testsuite/gcc.target/i386/avx2-vpabsd256-2.c
index 4c88024..caf1a58 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpabsd256-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpabsd256-2.c
@@ -27,7 +27,7 @@ avx2_test (void)
union256i_d s, d;
- for (i = 0; i < 256; ++i)
+ for (i = 0; i < 256 - 7; ++i)
{
/* Recompute the results for 256-bits */
compute_pabs256 (&vals[i], ck);
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpabsw256-2.c b/gcc/testsuite/gcc.target/i386/avx2-vpabsw256-2.c
index fa4efd2..299323d 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpabsw256-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpabsw256-2.c
@@ -28,7 +28,7 @@ avx2_test (void)
union256i_w s, d;
- for (i = 0; i < 256; ++i)
+ for (i = 0; i < 256 - 7; ++i)
{
/* Using only first 2 bytes of int */
/* Recompute the results for 256-bits */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c
index 4c6054c..de30ddb 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c
@@ -16,10 +16,10 @@ __attribute__ ((noinline))
void
foo (void)
{
- mp = (char **) malloc (N);
- lp = (char **) malloc (N);
- ep = (char **) malloc (N);
- fp = (char **) malloc (N);
+ mp = (char **) malloc (N * sizeof (char **));
+ lp = (char **) malloc (N * sizeof (char **));
+ ep = (char **) malloc (N * sizeof (char **));
+ fp = (char **) malloc (N * sizeof (char **));
}
void
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c
index 99a0c71..2752e7f 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c
@@ -14,8 +14,8 @@ __attribute__ ((noinline))
void
foo (void)
{
- ep = (char **) malloc (N);
- fp = (char **) malloc (N);
+ ep = (char **) malloc (N * sizeof (char **));
+ fp = (char **) malloc (N * sizeof (char **));
}
void
diff --git a/gcc/testsuite/gcc.target/i386/avx512bf16-cvtsbh2ss-1.c b/gcc/testsuite/gcc.target/i386/avx512bf16-cvtsbh2ss-1.c
new file mode 100644
index 0000000..bf29a69
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512bf16-cvtsbh2ss-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512bf16 -O2" } */
+/* { dg-final { scan-assembler-times "sall\[ \\t\]+\[^\{\n\]*16" 1 } } */
+/* { dg-final { scan-assembler-times "movl" 1 } } */
+
+#include <immintrin.h>
+
+volatile __bfloat16 x1;
+volatile float res;
+
+void extern
+avx512bf16_test (void)
+{
+ res = _mm_cvtsbh_ss (x1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bf16-vcvtpbh2ps-1.c b/gcc/testsuite/gcc.target/i386/avx512bf16-vcvtpbh2ps-1.c
new file mode 100644
index 0000000..a2ae4be
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512bf16-vcvtpbh2ps-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512bf16 -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsxwd\[ \\t\]+\[^\n\]*%zmm\[0-9\](?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vpslld\[ \t]\+\\\$16, %zmm\[0-9]\+, %zmm\[0-9]\+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vpslld\[ \t]\+\\\$16, %zmm\[0-9]\+, %zmm\[0-9]\+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxwd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256bh x1;
+volatile __m512 res;
+volatile __mmask16 m16;
+
+void extern
+avx512bf16_test (void)
+{
+ res = _mm512_cvtpbh_ps (x1);
+ res = _mm512_mask_cvtpbh_ps (res, m16, x1);
+ res = _mm512_maskz_cvtpbh_ps (m16, x1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bf16vl-cvtness2sbh-1.c b/gcc/testsuite/gcc.target/i386/avx512bf16vl-cvtness2sbh-1.c
new file mode 100644
index 0000000..8f21b1b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512bf16vl-cvtness2sbh-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512bf16 -mavx512vl -O2" } */
+/* { dg-final { scan-assembler-times "vcvtneps2bf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __bfloat16 res;
+volatile float x1;
+
+void extern
+avx512bf16_test (void)
+{
+ res = _mm_cvtness_sbh (x1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bf16vl-vcvtpbh2ps-1.c b/gcc/testsuite/gcc.target/i386/avx512bf16vl-vcvtpbh2ps-1.c
new file mode 100644
index 0000000..98f458b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512bf16vl-vcvtpbh2ps-1.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512bf16 -mavx512vl -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsxwd\[ \\t\]+\[^\n\]*%ymm\[0-9\](?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vpslld\[ \t]\+\\\$16, %ymm\[0-9]\+, %ymm\[0-9]\+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vpslld\[ \t]\+\\\$16, %ymm\[0-9]\+, %ymm\[0-9]\+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxwd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxwd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vpslld\[ \t]\+\\\$16, %xmm\[0-9]\+, %xmm\[0-9]\+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vpslld\[ \t]\+\\\$16, %xmm\[0-9]\+, %xmm\[0-9]\+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxwd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128bh x1;
+volatile __m128 res1;
+volatile __m256 res2;
+volatile __mmask8 m8;
+
+void extern
+avx512bf16_test (void)
+{
+ res2 = _mm256_cvtpbh_ps (x1);
+ res2 = _mm256_mask_cvtpbh_ps (res2, m8, x1);
+ res2 = _mm256_maskz_cvtpbh_ps (m8, x1);
+
+ res1 = _mm_cvtpbh_ps (x1);
+ res1 = _mm_mask_cvtpbh_ps (res1, m8, x1);
+ res1 = _mm_maskz_cvtpbh_ps (m8, x1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr103750-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-pr103750-1.c
new file mode 100644
index 0000000..b1165f0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-pr103750-1.c
@@ -0,0 +1,154 @@
+/* PR target/103750 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512bw -mavx512vl" } */
+/* { dg-final { scan-assembler-not "kmov" { xfail ia32 } } } */
+/* xfail need to be fixed. */
+
+#include <immintrin.h>
+extern __m128i* pi128;
+extern __m256i* pi256;
+extern __m512i* pi512;
+
+unsigned char
+foo ()
+{
+ __mmask16 mask1 = _mm_cmpeq_epu8_mask (pi128[0], pi128[1]);
+ __mmask16 mask2 = _mm_cmpeq_epu8_mask (pi128[2], pi128[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+foo1 ()
+{
+ __mmask16 mask1 = _mm_cmpeq_epu8_mask (pi128[0], pi128[1]);
+ __mmask16 mask2 = _mm_cmpeq_epu8_mask (pi128[2], pi128[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+foo2 ()
+{
+ __mmask32 mask1 = _mm256_cmpeq_epu8_mask (pi256[0], pi256[1]);
+ __mmask32 mask2 = _mm256_cmpeq_epu8_mask (pi256[2], pi256[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+foo3 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu16_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu16_mask (pi128[1], pi128[2]);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+foo4 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu16_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu16_mask (pi128[1], pi128[2]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+foo5 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu16_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu16_mask (pi128[1], pi128[2]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+foo6 ()
+{
+ __mmask16 mask1 = _mm256_cmpeq_epu16_mask (pi256[0], pi256[1]);
+ __mmask16 mask2 = _mm256_cmpeq_epu16_mask (pi256[2], pi256[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+foo7 ()
+{
+ __mmask16 mask1 = _mm256_cmpeq_epu16_mask (pi256[0], pi256[1]);
+ __mmask16 mask2 = _mm256_cmpeq_epu16_mask (pi256[2], pi256[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+foo8 ()
+{
+ __mmask32 mask1 = _mm512_cmpeq_epu16_mask (pi512[0], pi512[1]);
+ __mmask32 mask2 = _mm512_cmpeq_epu16_mask (pi512[2], pi512[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo ()
+{
+ __mmask16 mask1 = _mm_cmpeq_epi8_mask (pi128[0], pi128[1]);
+ __mmask16 mask2 = _mm_cmpeq_epi8_mask (pi128[2], pi128[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo1 ()
+{
+ __mmask16 mask1 = _mm_cmpeq_epi8_mask (pi128[0], pi128[1]);
+ __mmask16 mask2 = _mm_cmpeq_epi8_mask (pi128[2], pi128[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo2 ()
+{
+ __mmask32 mask1 = _mm256_cmpeq_epi8_mask (pi256[0], pi256[1]);
+ __mmask32 mask2 = _mm256_cmpeq_epi8_mask (pi256[2], pi256[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo3 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi16_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi16_mask (pi128[1], pi128[2]);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo4 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi16_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi16_mask (pi128[1], pi128[2]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo5 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi16_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi16_mask (pi128[1], pi128[2]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo6 ()
+{
+ __mmask16 mask1 = _mm256_cmpeq_epi16_mask (pi256[0], pi256[1]);
+ __mmask16 mask2 = _mm256_cmpeq_epi16_mask (pi256[2], pi256[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo7 ()
+{
+ __mmask16 mask1 = _mm256_cmpeq_epi16_mask (pi256[0], pi256[1]);
+ __mmask16 mask2 = _mm256_cmpeq_epi16_mask (pi256[2], pi256[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo8 ()
+{
+ __mmask32 mask1 = _mm512_cmpeq_epi16_mask (pi512[0], pi512[1]);
+ __mmask32 mask2 = _mm512_cmpeq_epi16_mask (pi512[2], pi512[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-pr103750-2.c b/gcc/testsuite/gcc.target/i386/avx512bw-pr103750-2.c
new file mode 100644
index 0000000..7303f54
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-pr103750-2.c
@@ -0,0 +1,173 @@
+/* PR target/103750 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512dq -mavx512bw -mavx512vl" } */
+/* { dg-final { scan-assembler-not "kmov" { xfail ia32 } } } */
+/* xfail need to be fixed. */
+
+#include <immintrin.h>
+extern __m128i* pi128;
+extern __m256i* pi256;
+extern __m512i* pi512;
+
+extern char a, b;
+void
+foo ()
+{
+ __mmask16 mask1 = _mm_cmpeq_epu8_mask (pi128[0], pi128[1]);
+ __mmask16 mask2 = _mm_cmpeq_epu8_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+foo1 ()
+{
+ __mmask16 mask1 = _mm_cmpeq_epu8_mask (pi128[0], pi128[1]);
+ __mmask16 mask2 = _mm_cmpeq_epu8_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+foo2 ()
+{
+ __mmask32 mask1 = _mm256_cmpeq_epu8_mask (pi256[0], pi256[1]);
+ __mmask32 mask2 = _mm256_cmpeq_epu8_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask32_u8 (mask1, mask2);
+}
+
+void
+foo3 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu16_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu16_mask (pi128[1], pi128[2]);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo4 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu16_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu16_mask (pi128[1], pi128[2]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo5 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu16_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu16_mask (pi128[1], pi128[2]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo6 ()
+{
+ __mmask16 mask1 = _mm256_cmpeq_epu16_mask (pi256[0], pi256[1]);
+ __mmask16 mask2 = _mm256_cmpeq_epu16_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+foo7 ()
+{
+ __mmask16 mask1 = _mm256_cmpeq_epu16_mask (pi256[0], pi256[1]);
+ __mmask16 mask2 = _mm256_cmpeq_epu16_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+foo8 ()
+{
+ __mmask32 mask1 = _mm512_cmpeq_epu16_mask (pi512[0], pi512[1]);
+ __mmask32 mask2 = _mm512_cmpeq_epu16_mask (pi512[2], pi512[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask32_u8 (mask1, mask2);
+}
+
+void
+sign_foo ()
+{
+ __mmask16 mask1 = _mm_cmpeq_epi8_mask (pi128[0], pi128[1]);
+ __mmask16 mask2 = _mm_cmpeq_epi8_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+sign_foo1 ()
+{
+ __mmask16 mask1 = _mm_cmpeq_epi8_mask (pi128[0], pi128[1]);
+ __mmask16 mask2 = _mm_cmpeq_epi8_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+sign_foo2 ()
+{
+ __mmask32 mask1 = _mm256_cmpeq_epi8_mask (pi256[0], pi256[1]);
+ __mmask32 mask2 = _mm256_cmpeq_epi8_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask32_u8 (mask1, mask2);
+}
+
+void
+sign_foo3 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi16_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi16_mask (pi128[1], pi128[2]);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo4 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi16_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi16_mask (pi128[1], pi128[2]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo5 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi16_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi16_mask (pi128[1], pi128[2]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo6 ()
+{
+ __mmask16 mask1 = _mm256_cmpeq_epi16_mask (pi256[0], pi256[1]);
+ __mmask16 mask2 = _mm256_cmpeq_epi16_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+sign_foo7 ()
+{
+ __mmask16 mask1 = _mm256_cmpeq_epi16_mask (pi256[0], pi256[1]);
+ __mmask16 mask2 = _mm256_cmpeq_epi16_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+sign_foo8 ()
+{
+ __mmask32 mask1 = _mm512_cmpeq_epi16_mask (pi512[0], pi512[1]);
+ __mmask32 mask2 = _mm512_cmpeq_epi16_mask (pi512[2], pi512[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask32_u8 (mask1, mask2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpequb-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpequb-1.c
index 31a0afc..9a85753 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpequb-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpequb-1.c
@@ -1,11 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mavx512bw -mavx512vl -O2" } */
-/* { dg-final { scan-assembler-times "vpcmpub\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpub\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpub\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpub\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpub\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpub\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpub|vpcmpeqb)\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpub|vpcmpeqb)\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpub|vpcmpeqb)\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpub|vpcmpeqb)\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpub|vpcmpeqb)\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpub|vpcmpeqb)\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpequw-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpequw-1.c
index da5c401..a6c7776 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpequw-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpequw-1.c
@@ -1,11 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mavx512bw -mavx512vl -O2" } */
-/* { dg-final { scan-assembler-times "vpcmpuw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpuw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpuw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpuw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpuw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpuw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuw|vpcmpeqw)\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuw|vpcmpeqw)\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuw|vpcmpeqw)\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuw|vpcmpeqw)\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuw|vpcmpeqw)\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuw|vpcmpeqw)\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpub-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpub-1.c
index 120fe8f..6d8a442 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpub-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpub-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mavx512bw -mavx512vl" } */
-/* { dg-final { scan-assembler-times "vpcmpub\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpub|vpcmpeqb)\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpcmpub\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpcmpub\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpcmpub\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpuw-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpuw-1.c
index f17c73b..c0d84de 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpuw-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-vpcmpuw-1.c
@@ -5,7 +5,7 @@
/* { dg-final { scan-assembler-times "vpcmpuw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpcmpuw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpcmpuw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpuw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuw|vpcmpeqw)\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx512dq-dest-false-dep-for-glc.c b/gcc/testsuite/gcc.target/i386/avx512dq-dest-false-dep-for-glc.c
new file mode 100644
index 0000000..b334b88
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512dq-dest-false-dep-for-glc.c
@@ -0,0 +1,73 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512dq -mavx512vl -mtune=generic -mtune-ctrl=dest_false_dep_for_glc -O2" } */
+
+#include <immintrin.h>
+
+extern __m512i i1;
+extern __m256i i2;
+extern __m128i i3;
+extern __m512d d1, d11;
+extern __m256d d2;
+extern __m128d d3, d33;
+extern __m512 f1, f11;
+extern __m256 f2;
+extern __m128 f3, f33;
+
+__mmask32 m32;
+__mmask16 m16;
+__mmask8 m8;
+
+void mullo_test (void)
+{
+ i1 = _mm512_mullo_epi64 (i1, i1);
+ i1 = _mm512_mask_mullo_epi64 (i1, m8, i1, i1);
+ i1 = _mm512_maskz_mullo_epi64 (m8, i1, i1);
+ i2 = _mm256_mullo_epi64 (i2, i2);
+ i2 = _mm256_mask_mullo_epi64 (i2, m8, i2, i2);
+ i2 = _mm256_maskz_mullo_epi64 (m8, i2, i2);
+ i3 = _mm_mullo_epi64 (i3, i3);
+ i3 = _mm_mask_mullo_epi64 (i3, m8, i3, i3);
+ i3 = _mm_maskz_mullo_epi64 (m8, i3, i3);
+}
+
+void range_test (void)
+{
+ d1 = _mm512_range_pd (d1, d11, 15);
+ d11 = _mm512_range_round_pd (d11, d1, 15, 8);
+ d1 = _mm512_mask_range_pd (d1, m8, d11, d11, 15);
+ d11 = _mm512_mask_range_round_pd (d11, m8, d1, d1, 15, 8);
+ d1 = _mm512_maskz_range_pd (m8, d11, d11, 15);
+ d11 = _mm512_maskz_range_round_pd (m8, d1, d1, 15, 8);
+ d2 = _mm256_range_pd (d2, d2, 15);
+ d2 = _mm256_mask_range_pd (d2, m8, d2, d2, 15);
+ d2 = _mm256_maskz_range_pd (m8, d2, d2, 15);
+ d3 = _mm_range_pd (d3, d3, 15);
+ d3 = _mm_mask_range_pd (d3, m8, d3, d3, 15);
+ d3 = _mm_maskz_range_pd (m8, d3, d3, 15);
+ d33 = _mm_range_sd (d33, d33, 15);
+ d33 = _mm_mask_range_sd (d33, m8, d33, d33, 15);
+ d33 = _mm_maskz_range_sd (m8, d33, d33, 15);
+
+ f1 = _mm512_range_ps (f1, f11, 15);
+ f11 = _mm512_range_round_ps (f11, f1, 15, 8);
+ f1 = _mm512_mask_range_ps (f1, m16, f11, f11, 15);
+ f11 = _mm512_mask_range_round_ps (f11, m16, f1, f1, 15, 8);
+ f1 = _mm512_maskz_range_ps (m16, f11, f11, 15);
+ f11 = _mm512_maskz_range_round_ps (m16, f1, f1, 15, 8);
+ f2 = _mm256_range_ps (f2, f2, 15);
+ f2 = _mm256_mask_range_ps (f2, m8, f2, f2, 15);
+ f2 = _mm256_maskz_range_ps (m8, f2, f2, 15);
+ f3 = _mm_range_ps (f3, f3, 15);
+ f3 = _mm_mask_range_ps (f3, m8, f3, f3, 15);
+ f3 = _mm_maskz_range_ps (m8, f3, f3, 15);
+ f33 = _mm_range_ss (f33, f33, 15);
+ f33 = _mm_mask_range_ss (f33, m8, f33, f33, 15);
+ f33 = _mm_maskz_range_ss (m8, f33, f33, 15);
+}
+
+/* { dg-final { scan-assembler-times "vxorps" 26 } } */
+/* { dg-final { scan-assembler-times "vpmullq" 9 } } */
+/* { dg-final { scan-assembler-times "vrangepd" 12 } } */
+/* { dg-final { scan-assembler-times "vrangesd" 3 } } */
+/* { dg-final { scan-assembler-times "vrangeps" 12 } } */
+/* { dg-final { scan-assembler-times "vrangess" 3 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-dest-false-dep-for-glc.c b/gcc/testsuite/gcc.target/i386/avx512f-dest-false-dep-for-glc.c
new file mode 100644
index 0000000..26e4ba7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-dest-false-dep-for-glc.c
@@ -0,0 +1,103 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -mtune=generic -mtune-ctrl=dest_false_dep_for_glc -O2" } */
+
+#include <immintrin.h>
+
+extern __m512i i1, i2, i3;
+extern __m512d d1, d11, *pd1;
+extern __m128d d2;
+extern __m512 f1, *pf1;
+extern __m128 f2;
+volatile __m512d *pd11;
+
+__mmask16 m16;
+__mmask8 m8;
+
+void vperm_test (void)
+{
+ d1 = _mm512_permutex_pd (d1, 12);
+ d1 = _mm512_mask_permutex_pd (d1, m8, d1, 13);
+ d1 = _mm512_maskz_permutex_pd (m8, d1, 14);
+ d11 = _mm512_permutexvar_pd (i1, d11);
+ d11 = _mm512_mask_permutexvar_pd (d11, m8, i2, d11);
+ d11 = _mm512_maskz_permutexvar_pd (m8, i3, d11);
+
+ f1 = _mm512_permutexvar_ps (i1, f1);
+ f1 = _mm512_mask_permutexvar_ps (f1, m16, i1, f1);
+ f1 = _mm512_maskz_permutexvar_ps (m16, i1, f1);
+
+ i3 = _mm512_permutexvar_epi64 (i3, i3);
+ i3 = _mm512_mask_permutexvar_epi64 (i3, m8, i1, i1);
+ i3 = _mm512_maskz_permutexvar_epi64 (m8, i3, i1);
+ i1 = _mm512_permutex_epi64 (i3, 12);
+ i1 = _mm512_mask_permutex_epi64 (i1, m8, i1, 12);
+ i1 = _mm512_maskz_permutex_epi64 (m8, i1, 12);
+
+ i2 = _mm512_permutexvar_epi32 (i2, i2);
+ i2 = _mm512_mask_permutexvar_epi32 (i2, m16, i2, i2);
+ i3 = _mm512_maskz_permutexvar_epi32 (m16, i3, i3);
+}
+
+void getmant_test (void)
+{
+ d1 = _mm512_getmant_pd (*pd1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ d1 = _mm512_getmant_round_pd (*pd11, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, 8);
+ d1 = _mm512_mask_getmant_pd (d1, m8, *pd1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ d1 = _mm512_mask_getmant_round_pd (d1, m8, *pd1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, 8);
+ d1 = _mm512_maskz_getmant_pd (m8, *pd1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ d1 = _mm512_maskz_getmant_round_pd (m8, *pd1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, 8);
+ f1 = _mm512_getmant_ps (*pf1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ f1 = _mm512_getmant_round_ps (*pf1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, 8);
+ f1 = _mm512_mask_getmant_ps (f1, m16, *pf1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ f1 = _mm512_mask_getmant_round_ps (f1, m16, *pf1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, 8);
+ f1 = _mm512_maskz_getmant_ps (m16, *pf1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ f1 = _mm512_maskz_getmant_round_ps (m16, *pf1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, 8);
+
+ d2 = _mm_getmant_sd (d2, d2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ d2 = _mm_getmant_round_sd (d2, d2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, 8);
+ d2 = _mm_mask_getmant_sd (d2, m8, d2, d2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ d2 = _mm_mask_getmant_round_sd (d2, m8, d2, d2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, 8);
+ d2 = _mm_maskz_getmant_sd (m8, d2, d2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ d2 = _mm_maskz_getmant_round_sd (m8, d2, d2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, 8);
+ f2 = _mm_getmant_ss (f2, f2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ f2 = _mm_getmant_round_ss (f2, f2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, 8);
+ f2 = _mm_mask_getmant_ss (f2, m8, f2, f2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ f2 = _mm_mask_getmant_round_ss (f2, m8, f2, f2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, 8);
+ f2 = _mm_maskz_getmant_ss (m8, f2, f2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ f2 = _mm_maskz_getmant_round_ss (m8, f2, f2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, 8);
+
+}
+
+/* { dg-final { scan-assembler-times "vxorps" 22 } } */
+/* { dg-final { scan-assembler-times "vpermd" 3 } } */
+/* { dg-final { scan-assembler-times "vpermq" 6 } } */
+/* { dg-final { scan-assembler-times "vpermps" 3 } } */
+/* { dg-final { scan-assembler-times "vpermpd" 6 } } */
+/* { dg-final { scan-assembler-times "vgetmantpd" 6 } } */
+/* { dg-final { scan-assembler-times "vgetmantps" 6 } } */
+/* { dg-final { scan-assembler-times "vgetmantsd" 6 } } */
+/* { dg-final { scan-assembler-times "vgetmantss" 6 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr103750-1.c b/gcc/testsuite/gcc.target/i386/avx512f-pr103750-1.c
new file mode 100644
index 0000000..613efe0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr103750-1.c
@@ -0,0 +1,426 @@
+/* PR target/103750 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f -mavx512vl -mavx512bw" } */
+/* { dg-final { scan-assembler-not "kmov" { xfail ia32 } } } */
+/* xfail need to be fixed. */
+
+#include <immintrin.h>
+extern __m128i* pi128;
+extern __m256i* pi256;
+extern __m512i* pi512;
+
+extern __m128* ps128;
+extern __m256* ps256;
+extern __m512* ps512;
+
+extern __m128d* pd128;
+extern __m256d* pd256;
+extern __m512d* pd512;
+
+unsigned char
+foo ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu32_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu32_mask (pi128[2], pi128[3]);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+foo1 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu32_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu32_mask (pi128[2], pi128[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+foo2 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu32_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu32_mask (pi128[2], pi128[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+foo3 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epu32_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epu32_mask (pi256[2], pi256[3]);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+foo4 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epu32_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epu32_mask (pi256[2], pi256[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+foo5 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epu32_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epu32_mask (pi256[2], pi256[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+foo6 ()
+{
+ __mmask16 mask1 = _mm512_cmpeq_epu32_mask (pi512[0], pi512[1]);
+ __mmask16 mask2 = _mm512_cmpeq_epu32_mask (pi512[2], pi512[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+foo7 ()
+{
+ __mmask16 mask1 = _mm512_cmpeq_epu32_mask (pi512[0], pi512[1]);
+ __mmask16 mask2 = _mm512_cmpeq_epu32_mask (pi512[2], pi512[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+foo8 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu64_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu64_mask (pi128[2], pi128[3]);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+foo9 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu64_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu64_mask (pi128[2], pi128[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+foo10 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu64_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu64_mask (pi128[2], pi128[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+foo11 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epu64_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epu64_mask (pi256[2], pi256[3]);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+foo12 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epu64_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epu64_mask (pi256[2], pi256[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+foo13 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epu64_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epu64_mask (pi256[2], pi256[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+foo14 ()
+{
+ __mmask8 mask1 = _mm512_cmpeq_epu64_mask (pi512[0], pi512[1]);
+ __mmask8 mask2 = _mm512_cmpeq_epu64_mask (pi512[2], pi512[3]);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+foo15 ()
+{
+ __mmask8 mask1 = _mm512_cmpeq_epu64_mask (pi512[0], pi512[1]);
+ __mmask8 mask2 = _mm512_cmpeq_epu64_mask (pi512[2], pi512[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+foo16 ()
+{
+ __mmask8 mask1 = _mm512_cmpeq_epu64_mask (pi512[0], pi512[1]);
+ __mmask8 mask2 = _mm512_cmpeq_epu64_mask (pi512[2], pi512[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi32_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi32_mask (pi128[2], pi128[3]);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo1 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi32_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi32_mask (pi128[2], pi128[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo2 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi32_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi32_mask (pi128[2], pi128[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo3 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epi32_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epi32_mask (pi256[2], pi256[3]);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo4 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epi32_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epi32_mask (pi256[2], pi256[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo5 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epi32_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epi32_mask (pi256[2], pi256[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo6 ()
+{
+ __mmask16 mask1 = _mm512_cmpeq_epi32_mask (pi512[0], pi512[1]);
+ __mmask16 mask2 = _mm512_cmpeq_epi32_mask (pi512[2], pi512[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo7 ()
+{
+ __mmask16 mask1 = _mm512_cmpeq_epi32_mask (pi512[0], pi512[1]);
+ __mmask16 mask2 = _mm512_cmpeq_epi32_mask (pi512[2], pi512[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo8 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi64_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi64_mask (pi128[2], pi128[3]);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo9 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi64_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi64_mask (pi128[2], pi128[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo10 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi64_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi64_mask (pi128[2], pi128[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo11 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epi64_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epi64_mask (pi256[2], pi256[3]);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo12 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epi64_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epi64_mask (pi256[2], pi256[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo13 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epi64_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epi64_mask (pi256[2], pi256[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo14 ()
+{
+ __mmask8 mask1 = _mm512_cmpeq_epi64_mask (pi512[0], pi512[1]);
+ __mmask8 mask2 = _mm512_cmpeq_epi64_mask (pi512[2], pi512[3]);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo15 ()
+{
+ __mmask8 mask1 = _mm512_cmpeq_epi64_mask (pi512[0], pi512[1]);
+ __mmask8 mask2 = _mm512_cmpeq_epi64_mask (pi512[2], pi512[3]);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo16 ()
+{
+ __mmask8 mask1 = _mm512_cmpeq_epi64_mask (pi512[0], pi512[1]);
+ __mmask8 mask2 = _mm512_cmpeq_epi64_mask (pi512[2], pi512[3]);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo ()
+{
+ __mmask8 mask1 = _mm_cmp_ps_mask (ps128[0], ps128[1], 1);
+ __mmask8 mask2 = _mm_cmp_ps_mask (ps128[2], ps128[3], 1);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo1 ()
+{
+ __mmask8 mask1 = _mm_cmp_ps_mask (ps128[0], ps128[1], 1);
+ __mmask8 mask2 = _mm_cmp_ps_mask (ps128[2], ps128[3], 1);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo2 ()
+{
+ __mmask8 mask1 = _mm_cmp_ps_mask (ps128[0], ps128[1], 1);
+ __mmask8 mask2 = _mm_cmp_ps_mask (ps128[2], ps128[3], 1);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo3 ()
+{
+ __mmask8 mask1 = _mm256_cmp_ps_mask (ps256[0], ps256[1], 1);
+ __mmask8 mask2 = _mm256_cmp_ps_mask (ps256[2], ps256[3], 1);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo4 ()
+{
+ __mmask8 mask1 = _mm256_cmp_ps_mask (ps256[0], ps256[1], 1);
+ __mmask8 mask2 = _mm256_cmp_ps_mask (ps256[2], ps256[3], 1);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo5 ()
+{
+ __mmask8 mask1 = _mm256_cmp_ps_mask (ps256[0], ps256[1], 1);
+ __mmask8 mask2 = _mm256_cmp_ps_mask (ps256[2], ps256[3], 1);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo6 ()
+{
+ __mmask16 mask1 = _mm512_cmp_ps_mask (ps512[0], ps512[1], 1);
+ __mmask16 mask2 = _mm512_cmp_ps_mask (ps512[2], ps512[3], 1);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo7 ()
+{
+ __mmask16 mask1 = _mm512_cmp_ps_mask (ps512[0], ps512[1], 1);
+ __mmask16 mask2 = _mm512_cmp_ps_mask (ps512[2], ps512[3], 1);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo8 ()
+{
+ __mmask8 mask1 = _mm_cmp_pd_mask (pd128[0], pd128[1], 1);
+ __mmask8 mask2 = _mm_cmp_pd_mask (pd128[2], pd128[3], 1);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo9 ()
+{
+ __mmask8 mask1 = _mm_cmp_pd_mask (pd128[0], pd128[1], 1);
+ __mmask8 mask2 = _mm_cmp_pd_mask (pd128[2], pd128[3], 1);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo10 ()
+{
+ __mmask8 mask1 = _mm_cmp_pd_mask (pd128[0], pd128[1], 1);
+ __mmask8 mask2 = _mm_cmp_pd_mask (pd128[2], pd128[3], 1);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo11 ()
+{
+ __mmask8 mask1 = _mm256_cmp_pd_mask (pd256[0], pd256[1], 1);
+ __mmask8 mask2 = _mm256_cmp_pd_mask (pd256[2], pd256[3], 1);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo12 ()
+{
+ __mmask8 mask1 = _mm256_cmp_pd_mask (pd256[0], pd256[1], 1);
+ __mmask8 mask2 = _mm256_cmp_pd_mask (pd256[2], pd256[3], 1);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo13 ()
+{
+ __mmask8 mask1 = _mm256_cmp_pd_mask (pd256[0], pd256[1], 1);
+ __mmask8 mask2 = _mm256_cmp_pd_mask (pd256[2], pd256[3], 1);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo14 ()
+{
+ __mmask8 mask1 = _mm512_cmp_pd_mask (pd512[0], pd512[1], 1);
+ __mmask8 mask2 = _mm512_cmp_pd_mask (pd512[2], pd512[3], 1);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo15 ()
+{
+ __mmask8 mask1 = _mm512_cmp_pd_mask (pd512[0], pd512[1], 1);
+ __mmask8 mask2 = _mm512_cmp_pd_mask (pd512[2], pd512[3], 1);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+float_foo16 ()
+{
+ __mmask8 mask1 = _mm512_cmp_pd_mask (pd512[0], pd512[1], 1);
+ __mmask8 mask2 = _mm512_cmp_pd_mask (pd512[2], pd512[3], 1);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr103750-2.c b/gcc/testsuite/gcc.target/i386/avx512f-pr103750-2.c
new file mode 100644
index 0000000..a6c2b06
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr103750-2.c
@@ -0,0 +1,478 @@
+/* PR target/103750 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512dq -mavx512vl -mavx512bw" } */
+/* { dg-final { scan-assembler-not "kmov" { xfail ia32 } } } */
+/* xfail need to be fixed. */
+
+#include <immintrin.h>
+extern __m128i* pi128;
+extern __m256i* pi256;
+extern __m512i* pi512;
+
+extern __m128* ps128;
+extern __m256* ps256;
+extern __m512* ps512;
+
+extern __m128d* pd128;
+extern __m256d* pd256;
+extern __m512d* pd512;
+
+extern char a, b;
+void
+foo ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu32_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu32_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo1 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu32_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu32_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo2 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu32_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu32_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo3 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epu32_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epu32_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo4 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epu32_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epu32_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo5 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epu32_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epu32_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo6 ()
+{
+ __mmask16 mask1 = _mm512_cmpeq_epu32_mask (pi512[0], pi512[1]);
+ __mmask16 mask2 = _mm512_cmpeq_epu32_mask (pi512[2], pi512[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+foo7 ()
+{
+ __mmask16 mask1 = _mm512_cmpeq_epu32_mask (pi512[0], pi512[1]);
+ __mmask16 mask2 = _mm512_cmpeq_epu32_mask (pi512[2], pi512[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+foo8 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu64_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu64_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo9 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu64_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu64_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo10 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epu64_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epu64_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo11 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epu64_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epu64_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo12 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epu64_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epu64_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo13 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epu64_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epu64_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo14 ()
+{
+ __mmask8 mask1 = _mm512_cmpeq_epu64_mask (pi512[0], pi512[1]);
+ __mmask8 mask2 = _mm512_cmpeq_epu64_mask (pi512[2], pi512[3]);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo15 ()
+{
+ __mmask8 mask1 = _mm512_cmpeq_epu64_mask (pi512[0], pi512[1]);
+ __mmask8 mask2 = _mm512_cmpeq_epu64_mask (pi512[2], pi512[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+foo16 ()
+{
+ __mmask8 mask1 = _mm512_cmpeq_epu64_mask (pi512[0], pi512[1]);
+ __mmask8 mask2 = _mm512_cmpeq_epu64_mask (pi512[2], pi512[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi32_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi32_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo1 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi32_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi32_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo2 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi32_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi32_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo3 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epi32_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epi32_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo4 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epi32_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epi32_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo5 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epi32_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epi32_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo6 ()
+{
+ __mmask16 mask1 = _mm512_cmpeq_epi32_mask (pi512[0], pi512[1]);
+ __mmask16 mask2 = _mm512_cmpeq_epi32_mask (pi512[2], pi512[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+sign_foo7 ()
+{
+ __mmask16 mask1 = _mm512_cmpeq_epi32_mask (pi512[0], pi512[1]);
+ __mmask16 mask2 = _mm512_cmpeq_epi32_mask (pi512[2], pi512[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+sign_foo8 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi64_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi64_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo9 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi64_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi64_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo10 ()
+{
+ __mmask8 mask1 = _mm_cmpeq_epi64_mask (pi128[0], pi128[1]);
+ __mmask8 mask2 = _mm_cmpeq_epi64_mask (pi128[2], pi128[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo11 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epi64_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epi64_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo12 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epi64_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epi64_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo13 ()
+{
+ __mmask8 mask1 = _mm256_cmpeq_epi64_mask (pi256[0], pi256[1]);
+ __mmask8 mask2 = _mm256_cmpeq_epi64_mask (pi256[2], pi256[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo14 ()
+{
+ __mmask8 mask1 = _mm512_cmpeq_epi64_mask (pi512[0], pi512[1]);
+ __mmask8 mask2 = _mm512_cmpeq_epi64_mask (pi512[2], pi512[3]);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo15 ()
+{
+ __mmask8 mask1 = _mm512_cmpeq_epi64_mask (pi512[0], pi512[1]);
+ __mmask8 mask2 = _mm512_cmpeq_epi64_mask (pi512[2], pi512[3]);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo16 ()
+{
+ __mmask8 mask1 = _mm512_cmpeq_epi64_mask (pi512[0], pi512[1]);
+ __mmask8 mask2 = _mm512_cmpeq_epi64_mask (pi512[2], pi512[3]);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo ()
+{
+ __mmask8 mask1 = _mm_cmp_ps_mask (ps128[0], ps128[1], 1);
+ __mmask8 mask2 = _mm_cmp_ps_mask (ps128[2], ps128[3], 1);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo1 ()
+{
+ __mmask8 mask1 = _mm_cmp_ps_mask (ps128[0], ps128[1], 1);
+ __mmask8 mask2 = _mm_cmp_ps_mask (ps128[2], ps128[3], 1);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo2 ()
+{
+ __mmask8 mask1 = _mm_cmp_ps_mask (ps128[0], ps128[1], 1);
+ __mmask8 mask2 = _mm_cmp_ps_mask (ps128[2], ps128[3], 1);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo3 ()
+{
+ __mmask8 mask1 = _mm256_cmp_ps_mask (ps256[0], ps256[1], 1);
+ __mmask8 mask2 = _mm256_cmp_ps_mask (ps256[2], ps256[3], 1);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo4 ()
+{
+ __mmask8 mask1 = _mm256_cmp_ps_mask (ps256[0], ps256[1], 1);
+ __mmask8 mask2 = _mm256_cmp_ps_mask (ps256[2], ps256[3], 1);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo5 ()
+{
+ __mmask8 mask1 = _mm256_cmp_ps_mask (ps256[0], ps256[1], 1);
+ __mmask8 mask2 = _mm256_cmp_ps_mask (ps256[2], ps256[3], 1);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo6 ()
+{
+ __mmask16 mask1 = _mm512_cmp_ps_mask (ps512[0], ps512[1], 1);
+ __mmask16 mask2 = _mm512_cmp_ps_mask (ps512[2], ps512[3], 1);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+float_foo7 ()
+{
+ __mmask16 mask1 = _mm512_cmp_ps_mask (ps512[0], ps512[1], 1);
+ __mmask16 mask2 = _mm512_cmp_ps_mask (ps512[2], ps512[3], 1);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+float_foo8 ()
+{
+ __mmask8 mask1 = _mm_cmp_pd_mask (pd128[0], pd128[1], 1);
+ __mmask8 mask2 = _mm_cmp_pd_mask (pd128[2], pd128[3], 1);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo9 ()
+{
+ __mmask8 mask1 = _mm_cmp_pd_mask (pd128[0], pd128[1], 1);
+ __mmask8 mask2 = _mm_cmp_pd_mask (pd128[2], pd128[3], 1);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo10 ()
+{
+ __mmask8 mask1 = _mm_cmp_pd_mask (pd128[0], pd128[1], 1);
+ __mmask8 mask2 = _mm_cmp_pd_mask (pd128[2], pd128[3], 1);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo11 ()
+{
+ __mmask8 mask1 = _mm256_cmp_pd_mask (pd256[0], pd256[1], 1);
+ __mmask8 mask2 = _mm256_cmp_pd_mask (pd256[2], pd256[3], 1);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo12 ()
+{
+ __mmask8 mask1 = _mm256_cmp_pd_mask (pd256[0], pd256[1], 1);
+ __mmask8 mask2 = _mm256_cmp_pd_mask (pd256[2], pd256[3], 1);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo13 ()
+{
+ __mmask8 mask1 = _mm256_cmp_pd_mask (pd256[0], pd256[1], 1);
+ __mmask8 mask2 = _mm256_cmp_pd_mask (pd256[2], pd256[3], 1);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo14 ()
+{
+ __mmask8 mask1 = _mm512_cmp_pd_mask (pd512[0], pd512[1], 1);
+ __mmask8 mask2 = _mm512_cmp_pd_mask (pd512[2], pd512[3], 1);
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo15 ()
+{
+ __mmask8 mask1 = _mm512_cmp_pd_mask (pd512[0], pd512[1], 1);
+ __mmask8 mask2 = _mm512_cmp_pd_mask (pd512[2], pd512[3], 1);
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+float_foo16 ()
+{
+ __mmask8 mask1 = _mm512_cmp_pd_mask (pd512[0], pd512[1], 1);
+ __mmask8 mask2 = _mm512_cmp_pd_mask (pd512[2], pd512[3], 1);
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpequd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpequd-1.c
index c02f2b1..3c567c6 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpequd-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpequd-1.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
-/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[0-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpud|vpcmpeqd)\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpud|vpcmpeqd)\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[0-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpequq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpequq-1.c
index 1a443d6..f3f35ec 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpequq-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpequq-1.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
-/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[0-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuq|vpcmpeqq)\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuq|vpcmpeqq)\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[0-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-1.c
index 331f95c..be0a8fe 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mavx512f" } */
-/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpud|vpcmpeqd)\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-1c.c b/gcc/testsuite/gcc.target/i386/avx512fp16-1c.c
index b41a90b..0966886 100644
--- a/gcc/testsuite/gcc.target/i386/avx512fp16-1c.c
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-1c.c
@@ -1,8 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mavx512fp16 -O2" } */
-/* { dg-final { scan-assembler-times "vmovsh" 1 } } */
-/* { dg-final { scan-assembler-times "vpblendw" 1 } } */
-/* { dg-final { scan-assembler "vpbroadcastw" } } */
+
+/* { dg-final { scan-assembler-times "vpbroadcastw" 1 { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "vpblendw" 1 { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "vmovsh" 1 { target { ! ia32 } } } } */
+
+/* { dg-final { scan-assembler-times "vpinsrw" 2 { target ia32 } } } */
typedef _Float16 __v8hf __attribute__ ((__vector_size__ (16)));
typedef _Float16 __m128h __attribute__ ((__vector_size__ (16), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-dest-false-dep-for-glc.c b/gcc/testsuite/gcc.target/i386/avx512fp16-dest-false-dep-for-glc.c
new file mode 100644
index 0000000..990d65b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-dest-false-dep-for-glc.c
@@ -0,0 +1,45 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512fp16 -mavx512vl -mtune=generic -mtune-ctrl=dest_false_dep_for_glc -O2" } */
+
+#include <immintrin.h>
+
+extern __m512h h1;
+extern __m256h h2;
+extern __m128h h3;
+
+__mmask32 m32;
+__mmask16 m16;
+__mmask8 m8;
+
+void complex_mul_test (void)
+{
+ h1 = _mm512_fmul_pch (h1, h1);
+ h1 = _mm512_fmul_round_pch (h1, h1, 8);
+ h1 = _mm512_mask_fmul_pch (h1, m32, h1, h1);
+ h1 = _mm512_mask_fmul_round_pch (h1, m32, h1, h1, 8);
+ h1 = _mm512_maskz_fmul_pch (m32, h1, h1);
+ h1 = _mm512_maskz_fmul_round_pch (m32, h1, h1, 11);
+
+ h3 = _mm_fmul_sch (h3, h3);
+ h3 = _mm_fmul_round_sch (h3, h3, 8);
+ h3 = _mm_mask_fmul_sch (h3, m8, h3, h3);
+ h3 = _mm_mask_fmul_round_sch (h3, m8, h3, h3, 8);
+ h3 = _mm_maskz_fmul_sch (m8, h3, h3);
+ h3 = _mm_maskz_fmul_round_sch (m8, h3, h3, 11);
+}
+
+void vgetmant_test (void)
+{
+ h3 = _mm_getmant_sh (h3, h3, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ h3 = _mm_mask_getmant_sh (h3, m8, h3, h3, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ h3 = _mm_maskz_getmant_sh (m8, h3, h3, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+}
+
+/* { dg-final { scan-assembler-times "vxorps" 10 } } */
+/* { dg-final { scan-assembler-times "vfmulcph" 6 } } */
+/* { dg-final { scan-assembler-times "vfmulcsh" 6 } } */
+/* { dg-final { scan-assembler-times "vgetmantsh" 3 } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-pr103750-1.c b/gcc/testsuite/gcc.target/i386/avx512fp16-pr103750-1.c
new file mode 100644
index 0000000..eaf6d1e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-pr103750-1.c
@@ -0,0 +1,58 @@
+/* PR target/103750 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512fp16 -mavx512vl" } */
+/* { dg-final { scan-assembler-not "kmov" { xfail ia32 } } } */
+/* xfail need to be fixed. */
+
+#include <immintrin.h>
+extern __m128h* ph128;
+extern __m256h* ph256;
+extern __m512h* ph512;
+
+unsigned char
+sign_foo3 ()
+{
+ __mmask8 mask1 = _mm_cmp_ph_mask (ph128[0], ph128[1], 1);
+ __mmask8 mask2 = _mm_cmp_ph_mask (ph128[1], ph128[2], 1);
+ return _kortestz_mask16_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo4 ()
+{
+ __mmask8 mask1 = _mm_cmp_ph_mask (ph128[0], ph128[1], 1);
+ __mmask8 mask2 = _mm_cmp_ph_mask (ph128[1], ph128[2], 1);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo5 ()
+{
+ __mmask8 mask1 = _mm_cmp_ph_mask (ph128[0], ph128[1], 1);
+ __mmask8 mask2 = _mm_cmp_ph_mask (ph128[1], ph128[2], 1);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo6 ()
+{
+ __mmask16 mask1 = _mm256_cmp_ph_mask (ph256[0], ph256[1], 1);
+ __mmask16 mask2 = _mm256_cmp_ph_mask (ph256[2], ph256[3], 1);
+ return _kortestz_mask32_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo7 ()
+{
+ __mmask16 mask1 = _mm256_cmp_ph_mask (ph256[0], ph256[1], 1);
+ __mmask16 mask2 = _mm256_cmp_ph_mask (ph256[2], ph256[3], 1);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
+
+unsigned char
+sign_foo8 ()
+{
+ __mmask32 mask1 = _mm512_cmp_ph_mask (ph512[0], ph512[1], 1);
+ __mmask32 mask2 = _mm512_cmp_ph_mask (ph512[2], ph512[3], 1);
+ return _kortestz_mask64_u8 (mask1, mask2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-pr103750-2.c b/gcc/testsuite/gcc.target/i386/avx512fp16-pr103750-2.c
new file mode 100644
index 0000000..3d3a033
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-pr103750-2.c
@@ -0,0 +1,71 @@
+/* PR target/103750 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512fp16 -mavx512vl -mavx512dq" } */
+/* { dg-final { scan-assembler-not "kmov" { xfail ia32 } } } */
+/* xfail need to be fixed. */
+
+#include <immintrin.h>
+extern __m128h* ph128;
+extern __m256h* ph256;
+extern __m512h* ph512;
+
+extern char a, b;
+void
+sign_foo3 ()
+{
+ __mmask8 mask1 = _mm_cmp_ph_mask (ph128[0], ph128[1], 1);
+ __mmask8 mask2 = _mm_cmp_ph_mask (ph128[1], ph128[2], 1);
+
+ a = _kortestz_mask16_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo4 ()
+{
+ __mmask8 mask1 = _mm_cmp_ph_mask (ph128[0], ph128[1], 1);
+ __mmask8 mask2 = _mm_cmp_ph_mask (ph128[1], ph128[2], 1);
+
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo5 ()
+{
+ __mmask8 mask1 = _mm_cmp_ph_mask (ph128[0], ph128[1], 1);
+ __mmask8 mask2 = _mm_cmp_ph_mask (ph128[1], ph128[2], 1);
+
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask8_u8 (mask1, mask2);
+}
+
+void
+sign_foo6 ()
+{
+ __mmask16 mask1 = _mm256_cmp_ph_mask (ph256[0], ph256[1], 1);
+ __mmask16 mask2 = _mm256_cmp_ph_mask (ph256[2], ph256[3], 1);
+
+ a = _kortestz_mask32_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+sign_foo7 ()
+{
+ __mmask16 mask1 = _mm256_cmp_ph_mask (ph256[0], ph256[1], 1);
+ __mmask16 mask2 = _mm256_cmp_ph_mask (ph256[2], ph256[3], 1);
+
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask16_u8 (mask1, mask2);
+}
+
+void
+sign_foo8 ()
+{
+ __mmask32 mask1 = _mm512_cmp_ph_mask (ph512[0], ph512[1], 1);
+ __mmask32 mask2 = _mm512_cmp_ph_mask (ph512[2], ph512[3], 1);
+
+ a = _kortestz_mask64_u8 (mask1, mask2);
+ b = _kortestz_mask32_u8 (mask1, mask2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-recip-1.c b/gcc/testsuite/gcc.target/i386/avx512fp16-recip-1.c
new file mode 100644
index 0000000..bc7cbbc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-recip-1.c
@@ -0,0 +1,43 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -mavx512fp16 -mavx512vl -ffast-math" } */
+/* { dg-final { scan-assembler "vrcpsh.*\n.*vmulsh" } } */
+/* { dg-final { scan-assembler "vrcpph.*\n.*vmulph" } } */
+/* { dg-final { scan-assembler "vrsqrtsh.*\n.*vmulsh" } } */
+/* { dg-final { scan-assembler "vrsqrtph.*\n.*vmulph" } } */
+/* { dg-final { scan-assembler-not "vsqrtsh" } } */
+/* { dg-final { scan-assembler-not "vsqrtph" } } */
+/* { dg-final { scan-assembler-not "vdivsh" } } */
+/* { dg-final { scan-assembler-not "vdivph" } } */
+
+#define FAST_ATTR \
+ __attribute__((noinline, noclone, optimize("fast-math"), target("recip")))
+
+_Float16 FAST_ATTR
+scalar_hf_rcp_fast (_Float16 a, _Float16 b)
+{
+ return a / b;
+}
+
+_Float16 FAST_ATTR
+scalar_hf_rsqrt_fast (_Float16 a, _Float16 b)
+{
+ return a / __builtin_sqrtf16 (b);
+}
+
+void FAST_ATTR
+vector_hf_rcp_fast (_Float16 * restrict a, _Float16 * restrict b,
+ _Float16 * restrict c, int n)
+{
+ int i;
+ for (i = 0; i < n; i++)
+ c[i] = a[i] / b[i];
+}
+
+void FAST_ATTR
+vector_hf_rsqrt_fast (_Float16 * restrict a, _Float16 * restrict b,
+ _Float16 * restrict c, int n)
+{
+ int i;
+ for (i = 0; i < n; i++)
+ c[i] = a[i] / __builtin_sqrtf16(b[i]);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-recip-2.c b/gcc/testsuite/gcc.target/i386/avx512fp16-recip-2.c
new file mode 100644
index 0000000..ed7e0a2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-recip-2.c
@@ -0,0 +1,97 @@
+/* { dg-do run { target avx512fp16 } } */
+/* { dg-options "-O3 -mavx512fp16 -mavx512vl -ffast-math" } */
+
+static void recip_op_test (void);
+#define DO_TEST recip_op_test
+#define AVX512FP16
+#define AVX512VL
+#include "avx512f-check.h"
+#include "avx512fp16-recip-1.c"
+
+_Float16 a[32], b[32], vexp[32], vref[32], sa, sb, sexp, sref;
+
+#define NO_FAST_ATTR \
+ __attribute__((noinline, noclone, \
+ optimize("fast-math,trapping-math")))
+
+_Float16 NO_FAST_ATTR
+scalar_hf_rcp_no_fast (_Float16 a, _Float16 b)
+{
+ return a / b;
+}
+
+_Float16 NO_FAST_ATTR
+scalar_hf_rsqrt_no_fast (_Float16 a, _Float16 b)
+{
+ return a / __builtin_sqrtf16 (b);
+}
+
+void NO_FAST_ATTR
+vector_hf_rcp_no_fast (_Float16 * restrict a, _Float16 * restrict b,
+ _Float16 * restrict c, int n)
+{
+ int i;
+ for (i = 0; i < n; i++)
+ c[i] = a[i] / b[i];
+}
+
+void NO_FAST_ATTR
+vector_hf_rsqrt_no_fast (_Float16 * restrict a, _Float16 * restrict b,
+ _Float16 * restrict c, int n)
+{
+ int i;
+ for (i = 0; i < n; i++)
+ c[i] = a[i] / __builtin_sqrtf16 (b[i]);
+}
+
+void init()
+{
+ int i;
+ sa = 3.75;
+ sb = 6.25;
+ sexp = sref = 2.75;
+ for (i = 0; i < 32; i++)
+ {
+ a[i] = i + 0.5;
+ b[i] = i * 1.5;
+ vexp[i] = vref[i] = 2.75 * i;
+ }
+}
+
+int check_cond(void *a, void *b, int size)
+{
+ int i;
+ unsigned short *pa = (unsigned short *)a,
+ *pb = (unsigned short *)b;
+ for (i = 0; i < size; i++)
+ if (pa[i] != pb[i])
+ return 0;
+ return 1;
+}
+
+static void recip_op_test()
+{
+ init ();
+ sexp = scalar_hf_rcp_fast (sa, sb);
+ sref = scalar_hf_rcp_no_fast (sa, sb);
+ if (!check_cond (&sexp, &sref, 1))
+ abort ();
+
+ init ();
+ sexp = scalar_hf_rsqrt_fast (sa, sb);
+ sref = scalar_hf_rsqrt_no_fast (sa, sb);
+ if (!check_cond (&sexp, &sref, 1))
+ abort ();
+
+ init ();
+ vector_hf_rcp_fast (a, b, vexp, 32);
+ vector_hf_rcp_no_fast (a, b, vref, 32);
+ if (!check_cond (vexp, vref, 1))
+ abort ();
+
+ init ();
+ vector_hf_rsqrt_fast (a, b, vexp, 32);
+ vector_hf_rsqrt_no_fast (a, b, vref, 32);
+ if (!check_cond (vexp, vref, 1))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-vector-complex-float.c b/gcc/testsuite/gcc.target/i386/avx512fp16-vector-complex-float.c
new file mode 100644
index 0000000..7c579cb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-vector-complex-float.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math -mavx512fp16 -mavx512vl -mprefer-vector-width=512" } */
+/* { dg-final { scan-assembler-times "vfmaddcph\[ \\t\]" 1 } } */
+/* { dg-final { scan-assembler-not "vfmadd\[123]*ph\[ \\t\]"} } */
+/* { dg-final { scan-assembler-not "vfmadd\[123]*sh\[ \\t\]"} } */
+/* { dg-final { scan-assembler-times "vfcmaddcph\[ \\t\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]" 1 } } */
+
+#include<complex.h>
+#define TYPE _Float16
+#define N 16
+
+void fma0 (_Complex TYPE *a, _Complex TYPE *b,
+ _Complex TYPE * __restrict c)
+{
+ for (int i = 0; i < N; i++)
+ c[i] += a[i] * b[i];
+}
+
+void fmaconj (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
+ _Complex TYPE c[restrict N])
+{
+ for (int i = 0; i < N; i++)
+ c[i] += a[i] * ~b[i];
+}
+
+void fmul (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
+ _Complex TYPE c[restrict N])
+{
+ for (int i = 0; i < N; i++)
+ c[i] = a[i] * b[i];
+}
+
+void fmulconj (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
+ _Complex TYPE c[restrict N])
+{
+ for (int i = 0; i < N; i++)
+ c[i] = a[i] * ~b[i];
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-vfcmulcph-1a.c b/gcc/testsuite/gcc.target/i386/avx512fp16-vfcmulcph-1a.c
index ca2f140..e228393 100644
--- a/gcc/testsuite/gcc.target/i386/avx512fp16-vfcmulcph-1a.c
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-vfcmulcph-1a.c
@@ -1,11 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mavx512fp16 -O2" } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
@@ -22,4 +22,11 @@ avx512f_test (void)
res = _mm512_fcmul_round_pch (x1, x2, 8);
res1 = _mm512_mask_fcmul_round_pch (res1, m16, x1, x2, 8);
res2 = _mm512_maskz_fcmul_round_pch (m16, x1, x2, 11);
+
+ res = _mm512_cmul_pch (x1, x2);
+ res1 = _mm512_mask_cmul_pch (res1, m16, x1, x2);
+ res2 = _mm512_maskz_cmul_pch (m16, x1, x2);
+ res = _mm512_cmul_round_pch (x1, x2, 8);
+ res1 = _mm512_mask_cmul_round_pch (res1, m16, x1, x2, 8);
+ res2 = _mm512_maskz_cmul_round_pch (m16, x1, x2, 11);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-vfcmulcsh-1a.c b/gcc/testsuite/gcc.target/i386/avx512fp16-vfcmulcsh-1a.c
index 872d91a..92f58c5 100644
--- a/gcc/testsuite/gcc.target/i386/avx512fp16-vfcmulcsh-1a.c
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-vfcmulcsh-1a.c
@@ -1,11 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mavx512fp16 -O2" } */
-/* { dg-final { scan-assembler-times "vfcmulcsh\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcsh\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcsh\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcsh\[ \\t\]+\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcsh\[ \\t\]+\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcsh\[ \\t\]+\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vfcmulcsh\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcsh\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcsh\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcsh\[ \\t\]+\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcsh\[ \\t\]+\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcsh\[ \\t\]+\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
@@ -22,4 +22,11 @@ avx512f_test (void)
res = _mm_fcmul_round_sch (x1, x2, 8);
res1 = _mm_mask_fcmul_round_sch (res1, m8, x1, x2, 8);
res2 = _mm_maskz_fcmul_round_sch (m8, x1, x2, 11);
+
+ res = _mm_cmul_sch (x1, x2);
+ res1 = _mm_mask_cmul_sch (res1, m8, x1, x2);
+ res2 = _mm_maskz_cmul_sch (m8, x1, x2);
+ res = _mm_cmul_round_sch (x1, x2, 8);
+ res1 = _mm_mask_cmul_round_sch (res1, m8, x1, x2, 8);
+ res2 = _mm_maskz_cmul_round_sch (m8, x1, x2, 11);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-vfmulcph-1a.c b/gcc/testsuite/gcc.target/i386/avx512fp16-vfmulcph-1a.c
index f31cbca..4135cd2 100644
--- a/gcc/testsuite/gcc.target/i386/avx512fp16-vfmulcph-1a.c
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-vfmulcph-1a.c
@@ -1,11 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mavx512fp16 -O2" } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
@@ -22,4 +22,11 @@ avx512f_test (void)
res = _mm512_fmul_round_pch (x1, x2, 8);
res1 = _mm512_mask_fmul_round_pch (res1, m16, x1, x2, 8);
res2 = _mm512_maskz_fmul_round_pch (m16, x1, x2, 11);
+
+ res = _mm512_mul_pch (x1, x2);
+ res1 = _mm512_mask_mul_pch (res1, m16, x1, x2);
+ res2 = _mm512_maskz_mul_pch (m16, x1, x2);
+ res = _mm512_mul_round_pch (x1, x2, 8);
+ res1 = _mm512_mask_mul_round_pch (res1, m16, x1, x2, 8);
+ res2 = _mm512_maskz_mul_round_pch (m16, x1, x2, 11);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-vfmulcsh-1a.c b/gcc/testsuite/gcc.target/i386/avx512fp16-vfmulcsh-1a.c
index 5d48874..cdca385 100644
--- a/gcc/testsuite/gcc.target/i386/avx512fp16-vfmulcsh-1a.c
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-vfmulcsh-1a.c
@@ -1,11 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mavx512fp16 -O2" } */
-/* { dg-final { scan-assembler-times "vfmulcsh\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcsh\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcsh\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcsh\[ \\t\]+\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcsh\[ \\t\]+\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcsh\[ \\t\]+\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vfmulcsh\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcsh\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcsh\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcsh\[ \\t\]+\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcsh\[ \\t\]+\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcsh\[ \\t\]+\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
@@ -22,4 +22,11 @@ avx512f_test (void)
res = _mm_fmul_round_sch (x1, x2, 8);
res1 = _mm_mask_fmul_round_sch (res1, m8, x1, x2, 8);
res2 = _mm_maskz_fmul_round_sch (m8, x1, x2, 11);
+
+ res = _mm_mul_sch (x1, x2);
+ res1 = _mm_mask_mul_sch (res1, m8, x1, x2);
+ res2 = _mm_maskz_mul_sch (m8, x1, x2);
+ res = _mm_mul_round_sch (x1, x2, 8);
+ res1 = _mm_mask_mul_round_sch (res1, m8, x1, x2, 8);
+ res2 = _mm_maskz_mul_round_sch (m8, x1, x2, 11);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16vl-complex-broadcast-1.c b/gcc/testsuite/gcc.target/i386/avx512fp16vl-complex-broadcast-1.c
new file mode 100644
index 0000000..3c8e8423
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16vl-complex-broadcast-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512fp16 -mavx512vl" } */
+/* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to4\\\}" 2 } } */
+/* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to8\\\}" 2 } } */
+/* { dg-final { scan-assembler-times "\[^\n\]*\\\{1to16\\\}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512h res0, a0, c0;
+volatile __m256h res1, a1, c1;
+volatile __m128h res2, a2, c2;
+volatile _Float16 *b;
+
+void extern
+avx_test(void)
+{
+ res0 = _mm512_fmadd_pch (a0, _mm512_set1_pch(*(b + 2 * 6)), c0);
+ res0 = _mm512_fcmadd_pch (a0, _mm512_set1_pch(*(b + 2 * 6)), c0);
+
+ res1 = _mm256_fmadd_pch (a1, _mm256_set1_pch(*(b + 2 * 6)), c1);
+ res1 = _mm256_fcmadd_pch (a1, _mm256_set1_pch(*(b + 2 * 6)), c1);
+
+ res2 = _mm_fmadd_pch (a2, _mm_set1_pch(*(b + 2 * 6)), c2);
+ res2 = _mm_fcmadd_pch (a2, _mm_set1_pch(*(b + 2 * 6)), c2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16vl-dest-false-dep-for-glc.c b/gcc/testsuite/gcc.target/i386/avx512fp16vl-dest-false-dep-for-glc.c
new file mode 100644
index 0000000..775d88a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16vl-dest-false-dep-for-glc.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512fp16 -mavx512vl -mtune-ctrl=dest_false_dep_for_glc -O2" } */
+
+#include <immintrin.h>
+
+extern __m256h h1;
+extern __m128h h2;
+
+__mmask16 m16;
+__mmask8 m8;
+
+void complex_mul_test (void)
+{
+ h1 = _mm256_fmul_pch (h1, h1);
+ h1 = _mm256_mask_fmul_pch (h1, m16, h1, h1);
+ h1 = _mm256_maskz_fmul_pch (m16, h1, h1);
+ h2 = _mm_fmul_pch (h2, h2);
+ h2 = _mm_mask_fmul_pch (h2, m16, h2, h2);
+ h2 = _mm_maskz_fmul_pch (m16, h2, h2);
+}
+
+/* { dg-final { scan-assembler-times "vxorps" 4 } } */
+/* { dg-final { scan-assembler-times "vfmulcph" 6 } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16vl-vfcmulcph-1a.c b/gcc/testsuite/gcc.target/i386/avx512fp16vl-vfcmulcph-1a.c
index 4e48e9c..370f9ee 100644
--- a/gcc/testsuite/gcc.target/i386/avx512fp16vl-vfcmulcph-1a.c
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16vl-vfcmulcph-1a.c
@@ -1,11 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mavx512f -mavx512fp16 -mavx512vl -O2" } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
@@ -25,4 +25,12 @@ avx512f_test (void)
res2 = _mm_fcmul_pch (x4, x5);
res2 = _mm_mask_fcmul_pch (res2, m8, x4, x5);
res2 = _mm_maskz_fcmul_pch (m8, x4, x5);
+
+ res1 = _mm256_cmul_pch (x1, x2);
+ res1 = _mm256_mask_cmul_pch (res1, m8, x1, x2);
+ res1 = _mm256_maskz_cmul_pch (m8, x1, x2);
+
+ res2 = _mm_cmul_pch (x4, x5);
+ res2 = _mm_mask_cmul_pch (res2, m8, x4, x5);
+ res2 = _mm_maskz_cmul_pch (m8, x4, x5);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16vl-vfmulcph-1a.c b/gcc/testsuite/gcc.target/i386/avx512fp16vl-vfmulcph-1a.c
index 54e58c6..dce9088 100644
--- a/gcc/testsuite/gcc.target/i386/avx512fp16vl-vfmulcph-1a.c
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16vl-vfmulcph-1a.c
@@ -1,11 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-mavx512f -mavx512fp16 -mavx512vl -O2" } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
#include <immintrin.h>
@@ -25,4 +25,12 @@ avx512f_test (void)
res2 = _mm_fmul_pch (x4, x5);
res2 = _mm_mask_fmul_pch (res2, m8, x4, x5);
res2 = _mm_maskz_fmul_pch (m8, x4, x5);
+
+ res1 = _mm256_mul_pch (x1, x2);
+ res1 = _mm256_mask_mul_pch (res1, m8, x1, x2);
+ res1 = _mm256_maskz_mul_pch (m8, x1, x2);
+
+ res2 = _mm_mul_pch (x4, x5);
+ res2 = _mm_mask_mul_pch (res2, m8, x4, x5);
+ res2 = _mm_maskz_mul_pch (m8, x4, x5);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-dest-false-dep-for-glc.c b/gcc/testsuite/gcc.target/i386/avx512vl-dest-false-dep-for-glc.c
new file mode 100644
index 0000000..37d3ba5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512vl-dest-false-dep-for-glc.c
@@ -0,0 +1,76 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -mtune=generic -mavx512vl -mtune-ctrl=dest_false_dep_for_glc -O2" } */
+
+
+#include <immintrin.h>
+
+extern __m256i i1, i2, i3;
+extern __m256d d1, d11, *pd1;
+extern __m128d d2, *pd2;
+extern __m256 f1, *pf1;
+extern __m128 f2, *pf2;
+
+__mmask16 m16;
+__mmask8 m8;
+
+void vperm_test (void)
+{
+ d1 = _mm256_permutex_pd (d1, 12);
+ d1 = _mm256_mask_permutex_pd (d1, m8, d1, 12);
+ d1 = _mm256_maskz_permutex_pd (m8, d1, 12);
+ d11 = _mm256_permutexvar_pd (i1, d11);
+ d11 = _mm256_mask_permutexvar_pd (d11, m8, i1, d11);
+ d11 = _mm256_maskz_permutexvar_pd (m8, i1, d11);
+
+ f1 = _mm256_permutexvar_ps (i1, f1);
+ f1 = _mm256_mask_permutexvar_ps (f1, m8, i1, f1);
+ f1 = _mm256_maskz_permutexvar_ps (m8, i1, f1);
+
+ i1 = _mm256_permutexvar_epi64 (i1, i1);
+ i1 = _mm256_mask_permutexvar_epi64 (i1, m8, i1, i1);
+ i1 = _mm256_maskz_permutexvar_epi64 (m8, i1, i1);
+ i1 = _mm256_permutex_epi64 (i1, 12);
+ i1 = _mm256_mask_permutex_epi64 (i1, m8, i1, 12);
+ i1 = _mm256_maskz_permutex_epi64 (m8, i1, 12);
+
+ i2 = _mm256_permutexvar_epi32 (i2, i2);
+ i2 = _mm256_mask_permutexvar_epi32 (i2, m8, i2, i2);
+ i3 = _mm256_maskz_permutexvar_epi32 (m8, i3, i3);
+}
+
+void getmant_test (void)
+{
+ d1 = _mm256_getmant_pd (*pd1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ d1 = _mm256_mask_getmant_pd (d1, m8, *pd1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ d1 = _mm256_maskz_getmant_pd (m8, *pd1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ d2 = _mm_getmant_pd (*pd2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ d2 = _mm_mask_getmant_pd (d2, m8, *pd2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ d2 = _mm_maskz_getmant_pd (m8, *pd2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ f1 = _mm256_getmant_ps (*pf1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ f1 = _mm256_mask_getmant_ps (f1, m8, *pf1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ f1 = _mm256_maskz_getmant_ps (m8, *pf1, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ f2 = _mm_getmant_ps (*pf2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ f2 = _mm_mask_getmant_ps (f2, m8, *pf2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ f2 = _mm_maskz_getmant_ps (m8, *pf2, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+}
+
+/* { dg-final { scan-assembler-times "vxorps" 19 } } */
+/* { dg-final { scan-assembler-times "vpermpd" 6 } } */
+/* { dg-final { scan-assembler-times "vpermps" 3 } } */
+/* { dg-final { scan-assembler-times "vpermq" 6 } } */
+/* { dg-final { scan-assembler-times "vpermd" 3 } } */
+/* { dg-final { scan-assembler-times "vgetmantpd" 6 } } */
+/* { dg-final { scan-assembler-times "vgetmantps" 6 } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpequd-1.c b/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpequd-1.c
index 7c87035..a0bee11 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpequd-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpequd-1.c
@@ -1,9 +1,9 @@
/* { dg-do compile } */
/* { dg-options "-mavx512vl -O2" } */
-/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpud|vpcmpeqd)\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpud|vpcmpeqd)\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpud|vpcmpeqd)\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpud|vpcmpeqd)\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpequq-1.c b/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpequq-1.c
index 4d672a5..c925d32 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpequq-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpequq-1.c
@@ -1,9 +1,9 @@
/* { dg-do compile } */
/* { dg-options "-mavx512vl -O2" } */
-/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuq|vpcmpeqq)\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuq|vpcmpeqq)\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuq|vpcmpeqq)\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuq|vpcmpeqq)\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpuq-1.c b/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpuq-1.c
index a5491c9..f93fca2 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpuq-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpuq-1.c
@@ -2,7 +2,7 @@
/* { dg-options "-O2 -mavx512vl" } */
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:vpcmpuq|vpcmpeqq)\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/bmi-1.c b/gcc/testsuite/gcc.target/i386/bmi-1.c
index 738705e..141adaa 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-1.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fno-ipa-icf -mbmi " } */
-/* { dg-final { scan-assembler "andn\[^\\n]*eax" } } */
+/* { dg-final { scan-assembler-times "andn\[^\\n]*eax" 2 } } */
/* { 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 } } */
@@ -16,6 +16,12 @@ func_andn32 (unsigned int X, unsigned int Y)
}
unsigned int
+func_andn32_2 (unsigned int X, unsigned int Y)
+{
+ return _andn_u32(X, Y);
+}
+
+unsigned int
func_bextr32 (unsigned int X, unsigned int Y)
{
return __bextr_u32(X, Y);
diff --git a/gcc/testsuite/gcc.target/i386/bmi-2.c b/gcc/testsuite/gcc.target/i386/bmi-2.c
index 6b8595e..3f9052a 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-2.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-2.c
@@ -1,6 +1,6 @@
/* { dg-do compile { target { ! ia32 } } } */
/* { dg-options "-O2 -fno-ipa-icf -mbmi " } */
-/* { dg-final { scan-assembler "andn\[^\\n]*rax" } } */
+/* { dg-final { scan-assembler-times "andn\[^\\n]*rax" 2 } } */
/* { 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 } } */
@@ -16,6 +16,12 @@ func_andn64 (unsigned long long X, unsigned long long Y)
}
unsigned long long
+func_andn64_2 (unsigned long long X, unsigned long long Y)
+{
+ return _andn_u64 (X, Y);
+}
+
+unsigned long long
func_bextr64 (unsigned long long X, unsigned long long Y)
{
return __bextr_u64 (X, Y);
diff --git a/gcc/testsuite/gcc.target/i386/bmi-3.c b/gcc/testsuite/gcc.target/i386/bmi-3.c
index ddc5e0f..0b91bc2 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-3.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-3.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mbmi " } */
-/* { dg-final { scan-assembler "tzcntw\[^\\n]*(%|)ax" } } */
+/* { dg-final { scan-assembler-times "tzcntw\[^\\n]*%?ax" 2 } } */
#include <x86intrin.h>
@@ -9,3 +9,9 @@ func_tzcnt16 (unsigned short X)
{
return __tzcnt_u16(X);
}
+
+unsigned short
+func_tzcnt16_2 (unsigned short X)
+{
+ return _tzcnt_u16(X);
+}
diff --git a/gcc/testsuite/gcc.target/i386/cleanup-1.c b/gcc/testsuite/gcc.target/i386/cleanup-1.c
index dcfcc4e..6e7544c 100644
--- a/gcc/testsuite/gcc.target/i386/cleanup-1.c
+++ b/gcc/testsuite/gcc.target/i386/cleanup-1.c
@@ -1,5 +1,5 @@
/* { dg-do run { target *-*-linux* *-*-gnu* } } */
-/* { dg-options "-fexceptions -fnon-call-exceptions -fasynchronous-unwind-tables -O2" } */
+/* { dg-options "-fexceptions -fnon-call-exceptions -fasynchronous-unwind-tables -O2 -fno-stack-protector" } */
/* Test complex CFA value expressions. */
#include <unwind.h>
diff --git a/gcc/testsuite/gcc.target/i386/cleanup-2.c b/gcc/testsuite/gcc.target/i386/cleanup-2.c
index 7e603233..a24daba 100644
--- a/gcc/testsuite/gcc.target/i386/cleanup-2.c
+++ b/gcc/testsuite/gcc.target/i386/cleanup-2.c
@@ -1,5 +1,5 @@
/* { dg-do run { target { *-*-linux* && { ! ia32 } } } } */
-/* { dg-options "-fexceptions -fnon-call-exceptions -fasynchronous-unwind-tables -O2" } */
+/* { dg-options "-fexceptions -fnon-call-exceptions -fasynchronous-unwind-tables -O2 -fno-stack-protector" } */
/* Test complex CFA value expressions. */
#include <unwind.h>
diff --git a/gcc/testsuite/gcc.target/i386/cond_op_shift_w-1.c b/gcc/testsuite/gcc.target/i386/cond_op_shift_w-1.c
index 54c854f..23ab8fa 100644
--- a/gcc/testsuite/gcc.target/i386/cond_op_shift_w-1.c
+++ b/gcc/testsuite/gcc.target/i386/cond_op_shift_w-1.c
@@ -1,7 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -march=skylake-avx512 -fdump-tree-optimized -DTYPE=int16" } */
-/* { dg-final { scan-tree-dump-times ".COND_SHR" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times ".COND_SHL" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\.COND_" 4 "optimized" } } */
/* { dg-final { scan-assembler-times "vpsraw" 1 } } */
/* { dg-final { scan-assembler-times "vpsllw" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/harden-sls-1.c b/gcc/testsuite/gcc.target/i386/harden-sls-1.c
new file mode 100644
index 0000000..6f70dc9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/harden-sls-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mindirect-branch=thunk-extern -mharden-sls=all" } */
+/* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */
+
+extern void foo (void);
+
+void
+bar (void)
+{
+ foo ();
+}
+
+/* { dg-final { scan-assembler "jmp\[ \t\]+_?foo" } } */
+/* { dg-final { scan-assembler-not {int3} } } */
diff --git a/gcc/testsuite/gcc.target/i386/harden-sls-2.c b/gcc/testsuite/gcc.target/i386/harden-sls-2.c
new file mode 100644
index 0000000..a7c5907
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/harden-sls-2.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mindirect-branch=thunk-extern -mharden-sls=all" } */
+/* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */
+
+extern void (*fptr) (void);
+
+void
+foo (void)
+{
+ fptr ();
+}
+
+/* { dg-final { scan-assembler "jmp\[ \t\]+_?__x86_indirect_thunk_(r|e)ax" } } */
+/* { dg-final { scan-assembler-times "int3" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/harden-sls-3.c b/gcc/testsuite/gcc.target/i386/harden-sls-3.c
new file mode 100644
index 0000000..1a6056b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/harden-sls-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mindirect-branch=thunk -mharden-sls=all" } */
+/* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */
+
+extern void (*fptr) (void);
+
+void
+foo (void)
+{
+ fptr ();
+}
+
+/* { dg-final { scan-assembler "jmp\[ \t\]+_?__x86_indirect_thunk_(r|e)ax" } } */
+/* { dg-final { scan-assembler-times "int3" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/harden-sls-4.c b/gcc/testsuite/gcc.target/i386/harden-sls-4.c
new file mode 100644
index 0000000..f70dd13
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/harden-sls-4.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mindirect-branch=keep -mharden-sls=all" } */
+/* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */
+
+extern void (*fptr) (void);
+
+void
+foo (void)
+{
+ fptr ();
+}
+
+/* { dg-final { scan-assembler "jmp\[ \t\]+\\*_?fptr" { target { ! x32 } } } } */
+/* { dg-final { scan-assembler "movl\[ \t\]+fptr\\(%rip\\), %eax" { target x32 } } } */
+/* { dg-final { scan-assembler "jmp\[ \t\]+\\*%rax" { target x32 } } } */
+/* { dg-final { scan-assembler-times "int3" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/harden-sls-5.c b/gcc/testsuite/gcc.target/i386/harden-sls-5.c
new file mode 100644
index 0000000..613c44c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/harden-sls-5.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -mharden-sls=return" } */
+/* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */
+
+typedef void (*dispatch_t)(long offset);
+
+dispatch_t dispatch;
+
+int
+male_indirect_jump (long offset)
+{
+ dispatch(offset);
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "ret" 1 } } */
+/* { dg-final { scan-assembler-times "int3" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/harden-sls-6.c b/gcc/testsuite/gcc.target/i386/harden-sls-6.c
new file mode 100644
index 0000000..9068eb6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/harden-sls-6.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -fcf-protection -mharden-sls=indirect-jmp" } */
+
+struct _Unwind_Context _Unwind_Resume_or_Rethrow_this_context;
+
+void offset (int);
+
+struct _Unwind_Context {
+ void *reg[7];
+} _Unwind_Resume_or_Rethrow() {
+ struct _Unwind_Context cur_contextcur_context =
+ _Unwind_Resume_or_Rethrow_this_context;
+ offset(0);
+ __builtin_eh_return ((long) offset, 0);
+}
+
+/* { dg-final { scan-assembler "jmp\[ \t\]+\\*%rcx" } } */
+/* { dg-final { scan-assembler-times "int3" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp
index bc40d5a..304a902 100644
--- a/gcc/testsuite/gcc.target/i386/i386.exp
+++ b/gcc/testsuite/gcc.target/i386/i386.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/iamcu/abi-iamcu.exp b/gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp
index e5256a6..94f468a 100644
--- a/gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp
+++ b/gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2021 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 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/ifcvt-reduction-logic-op.c b/gcc/testsuite/gcc.target/i386/ifcvt-reduction-logic-op.c
new file mode 100644
index 0000000..eeb822d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/ifcvt-reduction-logic-op.c
@@ -0,0 +1,80 @@
+/* PR tree-optimization/103126. */
+/* { dg-do compile } */
+/* { dg-options "-Ofast -mavx2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-final { scan-tree-dump-times "vectorized \[1-3] loops" 3 "vect" } } */
+#include<stdint.h>
+
+void xor_bit_arr_nolcd (uint64_t *__restrict mat, uint64_t* a,uint64_t* b, uint64_t *__restrict ans,
+ int64_t n)
+{
+ int64_t i;
+ uint64_t vec1, sum1;
+ uint64_t vec2, sum2;
+
+ while (n > 0) {
+ sum1 = 0;
+ vec1 = a[n];
+ sum2 = 0;
+ vec2 = b[n];
+
+ for (i = 0; i < 64; i++) {
+ uint64_t tmp = mat[i];
+ uint64_t vec1_i = (vec1 >> i);
+ uint64_t vec2_i = (vec2 >> i);
+ sum1 ^= (vec1_i & 1) ? tmp : 0;
+ if (vec2_i&1) sum2 ^= tmp;
+ }
+ *ans++ ^= sum1; n--;
+ *ans++ ^= sum2; n--;
+ }
+}
+
+void ior_bit_arr_nolcd (uint64_t *__restrict mat, uint64_t* a,uint64_t* b, uint64_t *__restrict ans,
+ int64_t n)
+{
+ int64_t i;
+ uint64_t vec1, sum1;
+ uint64_t vec2, sum2;
+
+ while (n > 0) {
+ sum1 = 0;
+ vec1 = a[n];
+ sum2 = 0;
+ vec2 = b[n];
+
+ for (i = 0; i < 64; i++) {
+ uint64_t tmp = mat[i];
+ uint64_t vec1_i = (vec1 >> i);
+ uint64_t vec2_i = (vec2 >> i);
+ sum1 |= (vec1_i & 1) ? tmp : 0;
+ if (vec2_i&1) sum2 |= tmp;
+ }
+ *ans++ |= sum1; n--;
+ *ans++ |= sum2; n--;
+ }
+}
+
+void and_bit_arr_nolcd (uint64_t *__restrict mat, uint64_t* a,uint64_t* b, uint64_t *__restrict ans,
+ int64_t n)
+{
+ int64_t i;
+ uint64_t vec1, sum1;
+ uint64_t vec2, sum2;
+
+ while (n > 0) {
+ sum1 = -1;
+ vec1 = a[n];
+ sum2 = 0;
+ vec2 = b[n];
+
+ for (i = 0; i < 64; i++) {
+ uint64_t tmp = mat[i];
+ uint64_t vec1_i = (vec1 >> i);
+ uint64_t vec2_i = (vec2 >> i);
+ sum1 &= (vec1_i & 1) ? tmp : -1;
+ if (vec2_i&1) sum2 &= tmp;
+ }
+ *ans++ &= sum1; n--;
+ *ans++ &= sum2; n--;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-cs-prefix-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-cs-prefix-1.c
new file mode 100644
index 0000000..db2f341
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-cs-prefix-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -ffixed-rax -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rdi -ffixed-rsi -mindirect-branch-cs-prefix -mindirect-branch=thunk-extern" } */
+/* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */
+
+extern void (*fptr) (void);
+
+void
+foo (void)
+{
+ fptr ();
+}
+
+/* { dg-final { scan-assembler-times "jmp\[ \t\]+_?__x86_indirect_thunk_r\[0-9\]+" 1 } } */
+/* { dg-final { scan-assembler-times "\tcs" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-cs-prefix-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-cs-prefix-2.c
new file mode 100644
index 0000000..adfc39a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-cs-prefix-2.c
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -ffixed-rax -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rdi -ffixed-rsi -mindirect-branch-cs-prefix -mindirect-branch=thunk-extern" } */
+/* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */
+
+extern void (*bar) (void);
+
+int
+foo (void)
+{
+ bar ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "call\[ \t\]+_?__x86_indirect_thunk_r\[0-9\]+" 1 } } */
+/* { dg-final { scan-assembler-times "\tcs" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/interrupt-redzone-1.c b/gcc/testsuite/gcc.target/i386/interrupt-redzone-1.c
index 1009884..0c412db 100644
--- a/gcc/testsuite/gcc.target/i386/interrupt-redzone-1.c
+++ b/gcc/testsuite/gcc.target/i386/interrupt-redzone-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mred-zone" } */
+/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mred-zone -fno-stack-protector" } */
void
__attribute__((interrupt))
diff --git a/gcc/testsuite/gcc.target/i386/interrupt-redzone-2.c b/gcc/testsuite/gcc.target/i386/interrupt-redzone-2.c
index 2577f43..caea996 100644
--- a/gcc/testsuite/gcc.target/i386/interrupt-redzone-2.c
+++ b/gcc/testsuite/gcc.target/i386/interrupt-redzone-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mred-zone" } */
+/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mred-zone -fno-stack-protector" } */
void
__attribute__((interrupt))
diff --git a/gcc/testsuite/gcc.target/i386/m128-check.h b/gcc/testsuite/gcc.target/i386/m128-check.h
index c468eac..e90e1f0 100644
--- a/gcc/testsuite/gcc.target/i386/m128-check.h
+++ b/gcc/testsuite/gcc.target/i386/m128-check.h
@@ -1,6 +1,10 @@
#include <stdio.h>
#include <xmmintrin.h>
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(A) (sizeof (A) / sizeof ((A)[0]))
+#endif
+
#ifdef __SSE2__
#include <emmintrin.h>
@@ -66,10 +70,6 @@ typedef union
float a[4];
} union128;
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(A) (sizeof (A) / sizeof ((A)[0]))
-#endif
-
#ifdef DEBUG
#define PRINTF printf
#else
diff --git a/gcc/testsuite/gcc.target/i386/mask-pack-prefer128.c b/gcc/testsuite/gcc.target/i386/mask-pack-prefer128.c
new file mode 100644
index 0000000..c9ea37c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/mask-pack-prefer128.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-march=skylake-avx512 -O3 -fopenmp-simd -fdump-tree-vect-details -mprefer-vector-width=128" } */
+/* Disabling epilogues until we find a better way to deal with scans. */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 10 "vect" } } */
+/* { dg-final { scan-assembler-not "maskmov" } } */
+
+#include "mask-pack.c"
diff --git a/gcc/testsuite/gcc.target/i386/mask-pack-prefer256.c b/gcc/testsuite/gcc.target/i386/mask-pack-prefer256.c
new file mode 100644
index 0000000..841f51b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/mask-pack-prefer256.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-march=skylake-avx512 -O3 -fopenmp-simd -fdump-tree-vect-details -mprefer-vector-width=256" } */
+/* Disabling epilogues until we find a better way to deal with scans. */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 10 "vect" } } */
+/* { dg-final { scan-assembler-not "maskmov" } } */
+
+#include "mask-pack.c"
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 592e834..53d76c1 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/i386/mult-highpart.c b/gcc/testsuite/gcc.target/i386/mult-highpart.c
new file mode 100644
index 0000000..efde311
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/mult-highpart.c
@@ -0,0 +1,167 @@
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O2 -Wno-long-long -fdump-tree-optimized" } */
+
+typedef unsigned int __attribute ((mode(TI))) uti_t;
+typedef int __attribute ((mode(TI))) ti_t;
+
+long long stest1(long long x, long long y)
+{
+ return ((ti_t)x * (ti_t)y) >> 64;
+}
+
+long long stest2(long long x)
+{
+ return ((ti_t)x * 19065) >> 64;
+}
+
+long long stest3(long long x, long long y)
+{
+ return (uti_t)((ti_t)x * (ti_t)y) >> 64;
+}
+
+long long stest4(long long x)
+{
+ return (uti_t)((ti_t)x * 19065) >> 64;
+}
+
+ti_t stest5(long long x, long long y)
+{
+ return ((ti_t)x * (ti_t)y) >> 64;
+}
+
+ti_t stest6(long long x)
+{
+ return ((ti_t)x * 19065) >> 64;
+}
+
+uti_t stest7(long long x, long long y)
+{
+ return (uti_t)((ti_t)x * (ti_t)y) >>64;
+}
+
+uti_t stest8(long long x)
+{
+ return (uti_t)((ti_t)x * 19065) >> 64;
+}
+
+long long stest9(long long x, long long y)
+{
+ return ((ti_t)x * (ti_t)y) >> 72;
+}
+
+long long stest10(long long x)
+{
+ return ((ti_t)x * 19065) >> 72;
+}
+
+long long stest11(long long x, long long y)
+{
+ return (uti_t)((ti_t)x * (ti_t)y) >> 72;
+}
+
+long long stest12(long long x)
+{
+ return (uti_t)((ti_t)x * 19065) >> 72;
+}
+
+ti_t stest13(long long x, long long y)
+{
+ return ((ti_t)x * (ti_t)y) >> 72;
+}
+
+ti_t stest14(long long x)
+{
+ return ((ti_t)x * 19065) >> 72;
+}
+
+uti_t stest15(long long x, long long y)
+{
+ return (uti_t)((ti_t)x * (ti_t)y) >> 72;
+}
+
+uti_t stest16(long long x)
+{
+ return (uti_t)((ti_t)x * 19065) >> 72;
+}
+
+unsigned long long utest1(unsigned long long x, unsigned long long y)
+{
+ return ((uti_t)x * (uti_t)y) >> 64;
+}
+
+unsigned long long utest2(unsigned long long x)
+{
+ return ((uti_t)x * 19065) >> 64;
+}
+
+unsigned long long utest3(unsigned long long x, unsigned long long y)
+{
+ return (ti_t)((uti_t)x * (uti_t)y) >> 64;
+}
+
+unsigned long long utest4(unsigned long long x)
+{
+ return (ti_t)((uti_t)x * 19065) >> 64;
+}
+
+uti_t utest5(unsigned long long x, unsigned long long y)
+{
+ return ((uti_t)x * (uti_t)y) >> 64;
+}
+
+uti_t utest6(unsigned long long x)
+{
+ return ((uti_t)x * 19065) >> 64;
+}
+
+ti_t utest7(unsigned long long x, unsigned long long y)
+{
+ return (ti_t)((uti_t)x * (uti_t)y) >>64;
+}
+
+ti_t utest8(long long x)
+{
+ return (uti_t)((ti_t)x * 19065) >> 64;
+}
+
+unsigned long long utest9(unsigned long long x, unsigned long long y)
+{
+ return ((uti_t)x * (uti_t)y) >> 72;
+}
+
+unsigned long long utest10(unsigned long long x)
+{
+ return ((uti_t)x * 19065) >> 72;
+}
+
+unsigned long long utest11(unsigned long long x, unsigned long long y)
+{
+ return (ti_t)((uti_t)x * (uti_t)y) >> 72;
+}
+
+unsigned long long utest12(unsigned long long x)
+{
+ return (ti_t)((uti_t)x * 19065) >> 72;
+}
+
+uti_t utest13(unsigned long long x, unsigned long long y)
+{
+ return ((uti_t)x * (uti_t)y) >> 72;
+}
+
+uti_t utest14(unsigned long long x)
+{
+ return ((uti_t)x * 19065) >> 72;
+}
+
+ti_t utest15(unsigned long long x, unsigned long long y)
+{
+ return (ti_t)((uti_t)x * (uti_t)y) >> 72;
+}
+
+ti_t utest16(unsigned long long x)
+{
+ return (ti_t)((uti_t)x * 19065) >> 72;
+}
+
+/* { dg-final { scan-tree-dump-times " h\\* " 32 "optimized" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pieces-memcpy-17.c b/gcc/testsuite/gcc.target/i386/pieces-memcpy-17.c
new file mode 100644
index 0000000..28ab7a6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pieces-memcpy-17.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=x86-64 -mprefer-vector-width=256 -mavx512f -mmove-max=512" } */
+
+extern char *dst, *src;
+
+void
+foo (void)
+{
+ __builtin_memcpy (dst, src, 66);
+}
+
+/* { dg-final { scan-assembler-times "vmovdqu64\[ \\t\]+\[^\n\]*%zmm" 2 } } */
+/* 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/pieces-memcpy-18.c b/gcc/testsuite/gcc.target/i386/pieces-memcpy-18.c
new file mode 100644
index 0000000..b15a0db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pieces-memcpy-18.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=sapphirerapids" } */
+
+extern char *dst, *src;
+
+void
+foo (void)
+{
+ __builtin_memcpy (dst, src, 66);
+}
+
+/* { dg-final { scan-assembler-times "vmovdqu64\[ \\t\]+\[^\n\]*%zmm" 2 } } */
+/* 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/pieces-memcpy-19.c b/gcc/testsuite/gcc.target/i386/pieces-memcpy-19.c
new file mode 100644
index 0000000..a5b5b61
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pieces-memcpy-19.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=sapphirerapids -mmove-max=128 -mstore-max=128" } */
+
+extern char *dst, *src;
+
+void
+foo (void)
+{
+ __builtin_memcpy (dst, src, 66);
+}
+
+/* { dg-final { scan-assembler-times "vmovdqu\[ \\t\]+\[^\n\]*%xmm" 8 } } */
+/* 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/pieces-memcpy-20.c b/gcc/testsuite/gcc.target/i386/pieces-memcpy-20.c
new file mode 100644
index 0000000..1feff48
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pieces-memcpy-20.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=sapphirerapids -mmove-max=256 -mstore-max=256" } */
+
+extern char *dst, *src;
+
+void
+foo (void)
+{
+ __builtin_memcpy (dst, src, 66);
+}
+
+/* { dg-final { scan-assembler-times "vmovdqu(?:64|)\[ \\t\]+\[^\n\]*%ymm" 4 } } */
+/* 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/pieces-memcpy-21.c b/gcc/testsuite/gcc.target/i386/pieces-memcpy-21.c
new file mode 100644
index 0000000..ef439f2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pieces-memcpy-21.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mtune=sapphirerapids -march=x86-64 -mavx2" } */
+
+extern char *dst, *src;
+
+void
+foo (void)
+{
+ __builtin_memcpy (dst, src, 66);
+}
+
+/* { dg-final { scan-assembler-times "vmovdqu(?:64|)\[ \\t\]+\[^\n\]*%ymm" 4 } } */
+/* 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/pieces-memset-45.c b/gcc/testsuite/gcc.target/i386/pieces-memset-45.c
new file mode 100644
index 0000000..70c80e5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pieces-memset-45.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=x86-64 -mprefer-vector-width=256 -mavx512f -mtune-ctrl=avx512_store_by_pieces" } */
+
+extern char *dst;
+
+void
+foo (void)
+{
+ __builtin_memset (dst, 3, 66);
+}
+
+/* { dg-final { scan-assembler-times "vmovdqu64\[ \\t\]+\[^\n\]*%zmm" 1 } } */
+/* 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/pieces-memset-46.c b/gcc/testsuite/gcc.target/i386/pieces-memset-46.c
new file mode 100644
index 0000000..ab7894a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pieces-memset-46.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=sapphirerapids" } */
+
+extern char *dst;
+
+void
+foo (void)
+{
+ __builtin_memset (dst, 3, 66);
+}
+
+/* { dg-final { scan-assembler-times "vmovdqu8\[ \\t\]+\[^\n\]*%zmm" 1 } } */
+/* { dg-final { scan-assembler-times "vmovw\[ \\t\]+\[^\n\]*%xmm" 1 } } */
+/* 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/pieces-memset-47.c b/gcc/testsuite/gcc.target/i386/pieces-memset-47.c
new file mode 100644
index 0000000..8f2c254a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pieces-memset-47.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=sapphirerapids -mstore-max=128" } */
+
+extern char *dst;
+
+void
+foo (void)
+{
+ __builtin_memset (dst, 3, 66);
+}
+
+/* { dg-final { scan-assembler-times "vmovdqu(?:8|)\[ \\t\]+\[^\n\]*%xmm" 4 } } */
+/* { dg-final { scan-assembler-times "vmovw\[ \\t\]+\[^\n\]*%xmm" 1 } } */
+/* 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/pieces-memset-48.c b/gcc/testsuite/gcc.target/i386/pieces-memset-48.c
new file mode 100644
index 0000000..9a7da96
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pieces-memset-48.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=sapphirerapids -mstore-max=256" } */
+
+extern char *dst;
+
+void
+foo (void)
+{
+ __builtin_memset (dst, 3, 66);
+}
+
+/* { dg-final { scan-assembler-times "vmovdqu(?:8|)\[ \\t\]+\[^\n\]*%ymm" 2 } } */
+/* { dg-final { scan-assembler-times "vmovw\[ \\t\]+\[^\n\]*%xmm" 1 } } */
+/* 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/pieces-memset-49.c b/gcc/testsuite/gcc.target/i386/pieces-memset-49.c
new file mode 100644
index 0000000..ad43f89
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pieces-memset-49.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mtune=sapphirerapids -march=x86-64 -mavx2" } */
+
+extern char *dst;
+
+void
+foo (void)
+{
+ __builtin_memset (dst, 3, 66);
+}
+
+/* { dg-final { scan-assembler-times "vmovdqu(?:8|)\[ \\t\]+\[^\n\]*%ymm" 2 } } */
+/* 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/pr100637-1b.c b/gcc/testsuite/gcc.target/i386/pr100637-1b.c
index 3e7445a..f5b1c12 100644
--- a/gcc/testsuite/gcc.target/i386/pr100637-1b.c
+++ b/gcc/testsuite/gcc.target/i386/pr100637-1b.c
@@ -5,17 +5,14 @@
typedef char __v4qi __attribute__ ((__vector_size__ (4)));
__v4qi and (__v4qi a, __v4qi b) { return a & b; };
-/* { dg-final { scan-assembler "andv4qi3" } } */
__v4qi andn (__v4qi a, __v4qi b) { return a & ~b; };
-/* { dg-final { scan-assembler "andnotv4qi3" } } */
__v4qi or (__v4qi a, __v4qi b) { return a | b; };
-/* { dg-final { scan-assembler "iorv4qi3" } } */
__v4qi xor (__v4qi a, __v4qi b) { return a ^ b; };
+
__v4qi not (__v4qi a) { return ~a; };
-/* { dg-final { scan-assembler-times "xorv4qi3" 2 } } */
__v4qi plus (__v4qi a, __v4qi b) { return a + b; };
/* { dg-final { scan-assembler "addv4qi3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr100637-1w.c b/gcc/testsuite/gcc.target/i386/pr100637-1w.c
index fe69640..5f27988 100644
--- a/gcc/testsuite/gcc.target/i386/pr100637-1w.c
+++ b/gcc/testsuite/gcc.target/i386/pr100637-1w.c
@@ -6,17 +6,14 @@ typedef short __v2hi __attribute__ ((__vector_size__ (4)));
typedef unsigned short __v2hu __attribute__ ((__vector_size__ (4)));
__v2hi and (__v2hi a, __v2hi b) { return a & b; };
-/* { dg-final { scan-assembler "andv2hi3" } } */
__v2hi andn (__v2hi a, __v2hi b) { return a & ~b; };
-/* { dg-final { scan-assembler "andnotv2hi3" } } */
__v2hi or (__v2hi a, __v2hi b) { return a | b; };
-/* { dg-final { scan-assembler "iorv2hi3" } } */
__v2hi xor (__v2hi a, __v2hi b) { return a ^ b; };
+
__v2hi not (__v2hi a) { return ~a; };
-/* { dg-final { scan-assembler-times "xorv2hi3" 2 } } */
__v2hi plus (__v2hi a, __v2hi b) { return a + b; };
/* { dg-final { scan-assembler "addv2hi3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr100711-1.c b/gcc/testsuite/gcc.target/i386/pr100711-1.c
new file mode 100644
index 0000000..c6928f2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr100711-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse2" } */
+
+typedef int v4si __attribute__((vector_size (16)));
+typedef long long v2di __attribute__((vector_size (16)));
+
+v4si foo (int a, v4si b)
+{
+ return (__extension__ (v4si) {~a, ~a, ~a, ~a}) & b;
+}
+
+v2di bar (long long a, v2di b)
+{
+ return (__extension__ (v2di) {~a, ~a}) & b;
+}
+
+/* { dg-final { scan-assembler-times "pandn" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr100711-2.c b/gcc/testsuite/gcc.target/i386/pr100711-2.c
new file mode 100644
index 0000000..ccaf168
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr100711-2.c
@@ -0,0 +1,47 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx2" } */
+
+typedef char v16qi __attribute__ ((vector_size (16)));
+typedef short v8hi __attribute__ ((vector_size (16)));
+typedef int v4si __attribute__ ((vector_size (16)));
+
+typedef char v32qi __attribute__ ((vector_size (32)));
+typedef short v16hi __attribute__ ((vector_size (32)));
+typedef int v8si __attribute__ ((vector_size (32)));
+
+v16qi foo_v16qi (char a, v16qi b)
+{
+ return (__extension__ (v16qi) {~a, ~a, ~a, ~a, ~a, ~a, ~a, ~a,
+ ~a, ~a, ~a, ~a, ~a, ~a, ~a, ~a}) & b;
+}
+
+v8hi foo_v8hi (short a, v8hi b)
+{
+ return (__extension__ (v8hi) {~a, ~a, ~a, ~a, ~a, ~a, ~a, ~a,}) & b;
+}
+
+v4si foo_v4si (int a, v4si b)
+{
+ return (__extension__ (v4si) {~a, ~a, ~a, ~a}) & b;
+}
+
+v32qi foo_v32qi (char a, v32qi b)
+{
+ return (__extension__ (v32qi) {~a, ~a, ~a, ~a, ~a, ~a, ~a, ~a,
+ ~a, ~a, ~a, ~a, ~a, ~a, ~a, ~a,
+ ~a, ~a, ~a, ~a, ~a, ~a, ~a, ~a,
+ ~a, ~a, ~a, ~a, ~a, ~a, ~a, ~a}) & b;
+}
+
+v16hi foo_v16hi (short a, v16hi b)
+{
+ return (__extension__ (v16hi) {~a, ~a, ~a, ~a, ~a, ~a, ~a, ~a,
+ ~a, ~a, ~a, ~a, ~a, ~a, ~a, ~a}) & b;
+}
+
+v8si foo_v8si (int a, v8si b)
+{
+ return (__extension__ (v8si) {~a, ~a, ~a, ~a, ~a, ~a, ~a, ~a,}) & b;
+}
+
+/* { dg-final { scan-assembler-times "vpandn" 6 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr101180.c b/gcc/testsuite/gcc.target/i386/pr101180.c
new file mode 100644
index 0000000..1ac4cb5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr101180.c
@@ -0,0 +1,12 @@
+/* PR c++/101180 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mno-avx -mno-crc32" } */
+
+#include <x86intrin.h>
+
+__attribute__((target ("avx"))) __attribute__((target ("crc32"))) void
+foo (__m256 *p, unsigned int *q)
+{
+ __m256 c = _mm256_and_ps (p[0], p[1]);
+ *q = __crc32b (*q, 0x55);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr101346.c b/gcc/testsuite/gcc.target/i386/pr101346.c
index fefabaf..313753f 100644
--- a/gcc/testsuite/gcc.target/i386/pr101346.c
+++ b/gcc/testsuite/gcc.target/i386/pr101346.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-O0 -fprofile-generate -msse" } */
/* { dg-require-profiling "-fprofile-generate" } */
+/* { dg-require-effective-target dfp } */
_Decimal128
foo (_Decimal128 x)
diff --git a/gcc/testsuite/gcc.target/i386/pr101796-1.c b/gcc/testsuite/gcc.target/i386/pr101796-1.c
new file mode 100644
index 0000000..3a5f50d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr101796-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512bw" } */
+/* { dg-final {scan-assembler-times "vpsrlw\[ \\t\]" 1 } } */
+/* { dg-final {scan-assembler-times "vpsllw\[ \\t\]" 1 } } */
+/* { dg-final {scan-assembler-times "vpsraw\[ \\t\]" 1 } } */
+/* { dg-final {scan-assembler-not "vpbroadcastw\[ \\t\]" } } */
+/* { dg-final {scan-assembler-not "vpsrlvw\[ \\t\]" } } */
+/* { dg-final {scan-assembler-not "vpsllvw\[ \\t\]" } } */
+/* { dg-final {scan-assembler-not "vpsravw\[ \\t\]" } } */
+#include <immintrin.h>
+
+volatile __m512i a, b;
+
+void
+foo()
+{
+ b = _mm512_srlv_epi16 (a, _mm512_set1_epi16 (3));
+ b = _mm512_sllv_epi16 (a, _mm512_set1_epi16 (4));
+ b = _mm512_srav_epi16 (a, _mm512_set1_epi16 (5));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr101989-3.c b/gcc/testsuite/gcc.target/i386/pr101989-3.c
new file mode 100644
index 0000000..dfd8991
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr101989-3.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512fp16 -mavx512vl" } */
+/* { dg-final { scan-assembler-times "vpternlog" 5 } } */
+/* { dg-final { scan-assembler-not "vpxor" } } */
+/* { dg-final { scan-assembler-not "vpor" } } */
+/* { dg-final { scan-assembler-not "vpand" } } */
+
+#include<immintrin.h>
+
+extern __m256i src1, src2, src3;
+
+__m256i
+foo (void)
+{
+ return (src2 & ~src1) | (src3 & src1);
+}
+
+__m256i
+foo1 (void)
+{
+ return (src2 & src1) | (src3 & ~src1);
+}
+
+__m256i
+foo2 (void)
+{
+ return (src2 & src1) | (~src3 & src1);
+}
+
+__m256i
+foo3 (void)
+{
+ return (~src2 & src1) | (src3 & src1);
+}
+
+__m256i
+foo4 (void)
+{
+ return src3 & src2 ^ src1;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr102024.c b/gcc/testsuite/gcc.target/i386/pr102024.c
new file mode 100644
index 0000000..703195b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102024.c
@@ -0,0 +1,12 @@
+/* PR target/102024 */
+/* { dg-do compile } */
+
+struct S { float a; int : 0; float b; };
+void foo (struct S x);
+
+void
+bar (void)
+{
+ struct S s = { 0.0f, 0.0f };
+ foo (s); /* { dg-message "the ABI of passing C structures with zero-width bit-fields has changed in GCC 12.1" "" { target { ! ia32 } } } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr102327-1.c b/gcc/testsuite/gcc.target/i386/pr102327-1.c
index 4743926..bd02f53 100644
--- a/gcc/testsuite/gcc.target/i386/pr102327-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr102327-1.c
@@ -60,6 +60,11 @@ VEC_SET (v32hf, _Float16, 14);
VEC_SET (v32hf, _Float16, 16);
VEC_SET (v32hf, _Float16, 24);
VEC_SET (v32hf, _Float16, 28);
-/* { dg-final { scan-assembler-times "vpbroadcastw" 10 } } */
-/* { dg-final { scan-assembler-times "vpblendw" 4 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastw" 10 { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "vpblendw" 4 { target { ! ia32 } } } } */
+
+/* { dg-final { scan-assembler-times "vpbroadcastw" 9 { target ia32 } } } */
+/* { dg-final { scan-assembler-times "vpblendw" 3 { target ia32 } } } */
+/* { dg-final { scan-assembler-times "vpinsrw" 1 { target ia32 } } } */
+
/* { dg-final { scan-assembler-times "vpblendd" 3 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102464-copysign-1.c b/gcc/testsuite/gcc.target/i386/pr102464-copysign-1.c
new file mode 100644
index 0000000..95a3950
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102464-copysign-1.c
@@ -0,0 +1,80 @@
+/* PR target/102464. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512fp16 -mavx512vl -ftree-vectorize -mfpmath=sse -fdump-tree-optimized" } */
+
+#include<math.h>
+void foo1 (_Float16* __restrict a, _Float16* b, _Float16* c)
+{
+ for (int i = 0; i != 8; i++)
+ a[i] = copysignf (b[i], c[i]);
+}
+
+void foo2 (_Float16* __restrict a, _Float16* b, _Float16* c)
+{
+ for (int i = 0; i != 8; i++)
+ a[i] = copysign (b[i], c[i]);
+}
+
+void foo3 (_Float16* __restrict a, _Float16* b, _Float16* c)
+{
+ for (int i = 0; i != 8; i++)
+ a[i] = copysignl (b[i], c[i]);
+}
+
+void foo4 (float* __restrict a, float* b, float* c)
+{
+ for (int i = 0; i != 4; i++)
+ a[i] = copysign (b[i], c[i]);
+}
+
+void foo5 (float* __restrict a, float* b, float* c)
+{
+ for (int i = 0; i != 4; i++)
+ a[i] = copysignl (b[i], c[i]);
+}
+
+void foo6 (double* __restrict a, double* b, double* c)
+{
+ for (int i = 0; i != 4; i++)
+ a[i] = copysignl (b[i], c[i]);
+}
+
+void foo7 (_Float16* __restrict a, _Float16* b, _Float16* c)
+{
+ a[0] = copysignf (b[0], c[0]);
+}
+
+void foo8 (_Float16* __restrict a, _Float16* b, _Float16* c)
+{
+ a[0] = copysign (b[0], c[0]);
+}
+
+void foo9 (_Float16* __restrict a, _Float16* b, _Float16* c)
+{
+ a[0] = copysignl (b[0], c[0]);
+}
+
+void foo10 (float* __restrict a, float* b, float* c)
+{
+ a[0] = copysign (b[0], c[0]);
+}
+
+void foo11 (float* __restrict a, float* b, float* c)
+{
+ a[0] = copysignl (b[0], c[0]);
+}
+
+void foo12 (double* __restrict a, double* b, double* c)
+{
+ a[0] = copysignl (b[0], c[0]);
+}
+
+/* { dg-final { scan-assembler-not "vcvtsh2s\[sd\]" } } */
+/* { dg-final { scan-assembler-not "vcvtss2sd" } } */
+/* { dg-final { scan-assembler-not "fld" } } */
+/* { dg-final { scan-assembler-not "vcvtph2p\[sd\]" } } */
+/* { dg-final { scan-assembler-not "vcvtps2pd" } } */
+/* { dg-final { scan-assembler-not "extendhfxf" } } */
+/* { dg-final { scan-assembler-not "\\\{1to8\\\}" } } */
+/* { dg-final { scan-tree-dump-times "\.COPYSIGN" 12 "optimized" } } */
+/* { dg-final { scan-assembler-times "vpternlog" 12 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102464-fma.c b/gcc/testsuite/gcc.target/i386/pr102464-fma.c
new file mode 100644
index 0000000..9c70d93
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102464-fma.c
@@ -0,0 +1,32 @@
+/* PR target/102464. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512fp16 -mavx512vl -ffast-math -ftree-vectorize -mtune=generic -mfpmath=sse" } */
+/* { dg-final { scan-assembler-times "vfmadd...ph" 3 } } */
+/* { dg-final { scan-assembler-times "vfmadd...sh" 3 } } */
+/* { dg-final { scan-assembler-times "vfmadd...ps" 2 } } */
+/* { dg-final { scan-assembler-times "vfmadd...ss" 2 } } */
+/* { dg-final { scan-assembler-times "vfmadd...pd" 1 } } */
+/* { dg-final { scan-assembler-times "vfmadd...sd" 1 } } */
+
+#include<math.h>
+#define FOO(TYPE,SUFFIX) \
+ void \
+ foo_vect_##TYPE##SUFFIX (TYPE* __restrict a, TYPE* b, TYPE* c, TYPE* d) \
+ { \
+ for (int i = 0; i != 8; i++) \
+ a[i] = fma##SUFFIX (b[i], c[i], d[i]); \
+ } \
+ TYPE \
+ foo_##TYPE##SUFFIX (TYPE b, TYPE c, TYPE d) \
+ { \
+ return fma##l (b, c, d); \
+ }
+
+FOO (_Float16, f);
+FOO (_Float16,);
+FOO (_Float16, l);
+
+FOO (float,);
+FOO (float, l);
+
+FOO (double, l);
diff --git a/gcc/testsuite/gcc.target/i386/pr102464-maxmin.c b/gcc/testsuite/gcc.target/i386/pr102464-maxmin.c
new file mode 100644
index 0000000..3786723
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102464-maxmin.c
@@ -0,0 +1,44 @@
+/* PR target/102464. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512fp16 -mavx512vl -ffast-math -ftree-vectorize -mtune=generic -mfpmath=sse" } */
+/* { dg-final { scan-assembler-times "vmaxph" 3 } } */
+/* { dg-final { scan-assembler-times "vminph" 3 } } */
+/* { dg-final { scan-assembler-times "vmaxsh" 3 } } */
+/* { dg-final { scan-assembler-times "vminsh" 3 } } */
+/* { dg-final { scan-assembler-times "vmaxps" 2 } } */
+/* { dg-final { scan-assembler-times "vminps" 2 } } */
+/* { dg-final { scan-assembler-times "vmaxss" 2 } } */
+/* { dg-final { scan-assembler-times "vminss" 2 } } */
+/* { dg-final { scan-assembler-times "vmaxpd" 1 } } */
+/* { dg-final { scan-assembler-times "vminpd" 1 } } */
+/* { dg-final { scan-assembler-times "vmaxsd" 1 } } */
+/* { dg-final { scan-assembler-times "vminsd" 1 } } */
+
+#include<math.h>
+#define FOO(CODE,TYPE,SUFFIX) \
+ void \
+ foo_vect_##CODE##TYPE##SUFFIX (TYPE* __restrict a, TYPE* b, TYPE* c) \
+ { \
+ for (int i = 0; i != 8; i++) \
+ a[i] = CODE##SUFFIX (b[i], c[i]); \
+ } \
+ TYPE \
+ foo_##CODE##TYPE##SUFFIX (TYPE b, TYPE c) \
+ { \
+ return CODE##l (b, c); \
+ }
+
+FOO (fmax, _Float16, f);
+FOO (fmax, _Float16,);
+FOO (fmax, _Float16, l);
+FOO (fmin, _Float16, f);
+FOO (fmin, _Float16,);
+FOO (fmin, _Float16, l);
+
+FOO (fmax, float,);
+FOO (fmax, float, l);
+FOO (fmin, float,);
+FOO (fmin, float, l);
+
+FOO (fmax, double, l);
+FOO (fmin, double, l);
diff --git a/gcc/testsuite/gcc.target/i386/pr102464-vrndscaleph.c b/gcc/testsuite/gcc.target/i386/pr102464-vrndscaleph.c
new file mode 100644
index 0000000..a76d9e7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102464-vrndscaleph.c
@@ -0,0 +1,115 @@
+/* PR target/102464. */
+/* { dg-do compile } */
+/* { dg-options "-Ofast -mavx512fp16 -mavx512vl -mprefer-vector-width=512" } */
+#include<math.h>
+void
+foo (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 8; i++)
+ a[i] = floor (b[i]);
+}
+
+void
+foo1 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 8; i++)
+ a[i] = ceil (b[i]);
+}
+
+void
+foo2 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 8; i++)
+ a[i] = trunc (b[i]);
+}
+
+void
+foo3 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 8; i++)
+ a[i] = nearbyint (b[i]);
+}
+
+void
+foo4 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 8; i++)
+ a[i] = rint (b[i]);
+}
+
+void
+foo5 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 16; i++)
+ a[i] = floor (b[i]);
+}
+
+void
+foo6 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 16; i++)
+ a[i] = ceil (b[i]);
+}
+
+void
+foo7 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 16; i++)
+ a[i] = trunc (b[i]);
+}
+
+void
+foo8 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 16; i++)
+ a[i] = nearbyint (b[i]);
+}
+
+void
+foo9 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 16; i++)
+ a[i] = rint (b[i]);
+}
+
+void
+foo10 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 32; i++)
+ a[i] = floor (b[i]);
+}
+
+void
+foo11 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 32; i++)
+ a[i] = ceil (b[i]);
+}
+
+void
+foo12 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 32; i++)
+ a[i] = trunc (b[i]);
+}
+
+void
+foo13 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 32; i++)
+ a[i] = nearbyint (b[i]);
+}
+
+void
+foo14 (_Float16* __restrict a, _Float16* b)
+{
+ for (int i = 0; i != 32; i++)
+ a[i] = rint (b[i]);
+}
+
+/* { dg-final { scan-assembler-not "vcvtsh2s\[sd\]" } } */
+/* { dg-final { scan-assembler-not "vcvtph2p\[sd\]" } } */
+/* { dg-final { scan-assembler-not "extendhfxf" } } */
+/* { dg-final { scan-assembler-times "vrndscaleph\[^\n\r\]*xmm\[0-9\]" 5 } } */
+/* { dg-final { scan-assembler-times "vrndscaleph\[^\n\r\]*ymm\[0-9\]" 5 } } */
+/* { dg-final { scan-assembler-times "vrndscaleph\[^\n\r\]*zmm\[0-9\]" 5 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102464.c b/gcc/testsuite/gcc.target/i386/pr102464.c
index e3e060e..7e1fbdc 100644
--- a/gcc/testsuite/gcc.target/i386/pr102464.c
+++ b/gcc/testsuite/gcc.target/i386/pr102464.c
@@ -1,6 +1,6 @@
/* PR target/102464. */
/* { dg-do compile } */
-/* { dg-options "-O2 -mavx512fp16" } */
+/* { dg-options "-O2 -mavx512fp16 -fno-trapping-math" } */
#define FOO(FUNC,SUFFIX) \
_Float16 \
diff --git a/gcc/testsuite/gcc.target/i386/pr102543.c b/gcc/testsuite/gcc.target/i386/pr102543.c
new file mode 100644
index 0000000..893eb9a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102543.c
@@ -0,0 +1,35 @@
+/* PR target/102543 */
+/* { dg-do compile } */
+/* { dg-options "-Ofast -march=skylake-avx512 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-not "MEM\\\[" "optimized" } } */
+
+struct a
+{
+ int a[100];
+};
+typedef struct a misaligned_t __attribute__ ((aligned (8)));
+typedef struct a aligned_t __attribute__ ((aligned (32)));
+
+__attribute__ ((used))
+__attribute__ ((noinline))
+void
+t(void *a, int misaligned, aligned_t *d)
+{
+ int i,v;
+ for (i=0;i<100;i++)
+ {
+ if (misaligned)
+ v=((misaligned_t *)a)->a[i];
+ else
+ v=((aligned_t *)a)->a[i];
+ d->a[i]+=v;
+ }
+}
+struct b {int v; misaligned_t m;aligned_t aa;} b;
+aligned_t d;
+int
+main()
+{
+ t(&b.m, 1, &d);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-10a.c b/gcc/testsuite/gcc.target/i386/pr102566-10a.c
new file mode 100644
index 0000000..1c1f86a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-10a.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+bool
+foo (_Atomic int *v, int bit)
+{
+ int mask = 1 << bit;
+ return atomic_fetch_and_explicit (v, ~mask, memory_order_relaxed) & mask;
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btrl" 1 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-10b.c b/gcc/testsuite/gcc.target/i386/pr102566-10b.c
new file mode 100644
index 0000000..0bf3982
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-10b.c
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+bool
+foo (_Atomic long long int *v, int bit)
+{
+ long long int mask = 1ll << bit;
+ return atomic_fetch_and_explicit (v, ~mask, memory_order_relaxed) & mask;
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btrq" 1 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-11.c b/gcc/testsuite/gcc.target/i386/pr102566-11.c
new file mode 100644
index 0000000..2c8f8c4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-11.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+#define MASK 0x1234
+
+bool
+foo1 (_Atomic int *v)
+{
+ return atomic_fetch_or_explicit (v, MASK, memory_order_relaxed) & MASK;
+}
+
+bool
+foo2 (_Atomic unsigned int *v, int mask)
+{
+ return atomic_fetch_or_explicit (v, mask, memory_order_relaxed) & mask;
+}
+
+bool
+foo3 (_Atomic unsigned int *v, int mask)
+{
+ return !(atomic_fetch_or_explicit (v, mask, memory_order_relaxed) & mask);
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*cmpxchg" 3 } } */
+/* { dg-final { scan-assembler-not "bts" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-12.c b/gcc/testsuite/gcc.target/i386/pr102566-12.c
new file mode 100644
index 0000000..4603a77
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-12.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+#define MASK 0x1234
+
+bool
+foo1 (_Atomic long *v)
+{
+ return atomic_fetch_and_explicit (v, ~MASK, memory_order_relaxed) & MASK;
+}
+
+bool
+foo2 (_Atomic long *v, long mask)
+{
+ return atomic_fetch_and_explicit (v, ~mask, memory_order_relaxed) & mask;
+}
+
+bool
+foo3 (_Atomic long *v, long mask)
+{
+ return !(atomic_fetch_and_explicit (v, ~mask, memory_order_relaxed) & mask);
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*cmpxchg" 3 } } */
+/* { dg-final { scan-assembler-not "btr" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-13.c b/gcc/testsuite/gcc.target/i386/pr102566-13.c
new file mode 100644
index 0000000..2657a2f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-13.c
@@ -0,0 +1,66 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+#include <stdatomic.h>
+#include <stdbool.h>
+
+#define FOO(TYPE,MASK) \
+ __attribute__((noinline,noclone)) TYPE \
+ atomic_fetch_or_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __atomic_fetch_or (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ atomic_fetch_xor_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __atomic_fetch_xor (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ atomic_xor_fetch_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __atomic_xor_fetch (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ atomic_fetch_and_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __atomic_fetch_and (a, ~mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ sync_fetch_and_or_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __sync_fetch_and_or (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ sync_fetch_and_xor_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __sync_fetch_and_xor (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ sync_xor_and_fetch_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __sync_xor_and_fetch (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ sync_fetch_and_and_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __sync_fetch_and_and (a, ~mask) & mask; \
+ } \
+
+FOO(short, 0);
+FOO(short, 7);
+FOO(short, 15);
+FOO(int, 0);
+FOO(int, 15);
+FOO(int, 31);
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*bts" 12 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btc" 24 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btr" 12 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-14.c b/gcc/testsuite/gcc.target/i386/pr102566-14.c
new file mode 100644
index 0000000..24681c1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-14.c
@@ -0,0 +1,65 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2" } */
+#include <stdatomic.h>
+#include <stdbool.h>
+typedef long long int64;
+
+#define FOO(TYPE,MASK) \
+ __attribute__((noinline,noclone)) TYPE \
+ atomic_fetch_or_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __atomic_fetch_or (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ atomic_fetch_xor_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __atomic_fetch_xor (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ atomic_xor_fetch_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __atomic_xor_fetch (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ atomic_fetch_and_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __atomic_fetch_and (a, ~mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ sync_fetch_and_or_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __sync_fetch_and_or (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ sync_fetch_and_xor_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __sync_fetch_and_xor (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ sync_xor_and_fetch_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __sync_xor_and_fetch (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) TYPE \
+ sync_fetch_and_and_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __sync_fetch_and_and (a, ~mask) & mask; \
+ } \
+
+
+FOO(int64, 0);
+FOO(int64, 32);
+FOO(int64, 63);
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*bts" 6 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btc" 12 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btr" 6 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-1a.c b/gcc/testsuite/gcc.target/i386/pr102566-1a.c
new file mode 100644
index 0000000..a915de3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-1a.c
@@ -0,0 +1,188 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void bar (void);
+
+__attribute__((noinline, noclone)) int
+f1 (int *a, int bit)
+{
+ int mask = 1 << bit;
+ return (__sync_fetch_and_or (a, mask) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) int
+f2 (int *a, int bit)
+{
+ int mask = 1 << bit;
+ int t1 = __atomic_fetch_or (a, mask, __ATOMIC_RELAXED);
+ int t2 = t1 & mask;
+ return t2 != 0;
+}
+
+__attribute__((noinline, noclone)) long int
+f3 (long int *a, int bit)
+{
+ long int mask = 1l << bit;
+ return (__atomic_fetch_or (a, mask, __ATOMIC_SEQ_CST) & mask) == 0;
+}
+
+__attribute__((noinline, noclone)) int
+f4 (int *a)
+{
+ int mask = 1 << 7;
+ return (__sync_fetch_and_or (a, mask) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) int
+f5 (int *a)
+{
+ int mask = 1 << 13;
+ return (__atomic_fetch_or (a, mask, __ATOMIC_RELAXED) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) int
+f6 (int *a)
+{
+ int mask = 1 << 0;
+ return (__atomic_fetch_or (a, mask, __ATOMIC_SEQ_CST) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) void
+f7 (int *a, int bit)
+{
+ int mask = 1 << bit;
+ if ((__sync_fetch_and_xor (a, mask) & mask) != 0)
+ bar ();
+}
+
+__attribute__((noinline, noclone)) void
+f8 (int *a, int bit)
+{
+ int mask = 1 << bit;
+ if ((__atomic_fetch_xor (a, mask, __ATOMIC_RELAXED) & mask) == 0)
+ bar ();
+}
+
+__attribute__((noinline, noclone)) int
+f9 (int *a, int bit)
+{
+ int mask = 1 << bit;
+ return (__atomic_fetch_xor (a, mask, __ATOMIC_SEQ_CST) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) int
+f10 (int *a)
+{
+ int mask = 1 << 7;
+ return (__sync_fetch_and_xor (a, mask) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) int
+f11 (int *a)
+{
+ int mask = 1 << 13;
+ return (__atomic_fetch_xor (a, mask, __ATOMIC_RELAXED) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) int
+f12 (int *a)
+{
+ int mask = 1 << 0;
+ return (__atomic_fetch_xor (a, mask, __ATOMIC_SEQ_CST) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) int
+f13 (int *a, int bit)
+{
+ int mask = 1 << bit;
+ return (__sync_fetch_and_and (a, ~mask) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) int
+f14 (int *a, int bit)
+{
+ int mask = 1 << bit;
+ return (__atomic_fetch_and (a, ~mask, __ATOMIC_RELAXED) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) int
+f15 (int *a, int bit)
+{
+ int mask = 1 << bit;
+ return (__atomic_fetch_and (a, ~mask, __ATOMIC_SEQ_CST) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) int
+f16 (int *a)
+{
+ int mask = 1 << 7;
+ return (__sync_fetch_and_and (a, ~mask) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) int
+f17 (int *a)
+{
+ int mask = 1 << 13;
+ return (__atomic_fetch_and (a, ~mask, __ATOMIC_RELAXED) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) int
+f18 (int *a)
+{
+ int mask = 1 << 0;
+ return (__atomic_fetch_and (a, ~mask, __ATOMIC_SEQ_CST) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) long int
+f19 (long int *a, int bit)
+{
+ long int mask = 1l << bit;
+ return (__atomic_xor_fetch (a, mask, __ATOMIC_SEQ_CST) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) long int
+f20 (long int *a)
+{
+ long int mask = 1l << 7;
+ return (__atomic_xor_fetch (a, mask, __ATOMIC_SEQ_CST) & mask) == 0;
+}
+
+__attribute__((noinline, noclone)) int
+f21 (int *a, int bit)
+{
+ int mask = 1 << bit;
+ return (__sync_fetch_and_or (a, mask) & mask);
+}
+
+__attribute__((noinline, noclone)) long int
+f22 (long int *a)
+{
+ long int mask = 1l << 7;
+ return (__atomic_xor_fetch (a, mask, __ATOMIC_SEQ_CST) & mask);
+}
+
+__attribute__((noinline, noclone)) long int
+f23 (long int *a)
+{
+ long int mask = 1l << 7;
+ return (__atomic_fetch_xor (a, mask, __ATOMIC_SEQ_CST) & mask);
+}
+
+__attribute__((noinline, noclone)) short int
+f24 (short int *a)
+{
+ short int mask = 1 << 7;
+ return (__sync_fetch_and_or (a, mask) & mask) != 0;
+}
+
+__attribute__((noinline, noclone)) short int
+f25 (short int *a)
+{
+ short int mask = 1 << 7;
+ return (__atomic_fetch_or (a, mask, __ATOMIC_SEQ_CST) & mask) != 0;
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*bts" 9 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btc" 10 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btr" 6 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-1b.c b/gcc/testsuite/gcc.target/i386/pr102566-1b.c
new file mode 100644
index 0000000..c4dab81
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-1b.c
@@ -0,0 +1,107 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -g" } */
+
+int cnt;
+
+__attribute__((noinline, noclone)) void
+bar (void)
+{
+ cnt++;
+}
+
+#include "pr102566-1a.c"
+
+int a;
+long int b;
+unsigned long int c;
+unsigned short int d;
+
+int
+main ()
+{
+ __atomic_store_n (&a, 15, __ATOMIC_RELAXED);
+ if (f1 (&a, 2) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 15
+ || f1 (&a, 4) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 31)
+ __builtin_abort ();
+ if (f2 (&a, 1) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 31
+ || f2 (&a, 5) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 63)
+ __builtin_abort ();
+ __atomic_store_n (&b, 24, __ATOMIC_RELAXED);
+ if (f3 (&b, 2) != 1 || __atomic_load_n (&b, __ATOMIC_RELAXED) != 28
+ || f3 (&b, 3) != 0 || __atomic_load_n (&b, __ATOMIC_RELAXED) != 28)
+ __builtin_abort ();
+ __atomic_store_n (&a, 0, __ATOMIC_RELAXED);
+ if (f4 (&a) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 128
+ || f4 (&a) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 128)
+ __builtin_abort ();
+ if (f5 (&a) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8320
+ || f5 (&a) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8320)
+ __builtin_abort ();
+ if (f6 (&a) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8321
+ || f6 (&a) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8321)
+ __builtin_abort ();
+ if (cnt != 0
+ || (f7 (&a, 7), cnt) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8193
+ || (f7 (&a, 7), cnt) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8321)
+ __builtin_abort ();
+ if ((f8 (&a, 7), cnt) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8193
+ || (f8 (&a, 7), cnt) != 2 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8321)
+ __builtin_abort ();
+ if (f9 (&a, 13) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 129
+ || f9 (&a, 13) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8321)
+ __builtin_abort ();
+ if (f10 (&a) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8193
+ || f10 (&a) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8321)
+ __builtin_abort ();
+ if (f11 (&a) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 129
+ || f11 (&a) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8321)
+ __builtin_abort ();
+ if (f12 (&a) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8320
+ || f12 (&a) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8321)
+ __builtin_abort ();
+ if (f13 (&a, 7) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8193
+ || f13 (&a, 7) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8193)
+ __builtin_abort ();
+ if (f14 (&a, 13) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 1
+ || f14 (&a, 13) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 1)
+ __builtin_abort ();
+ if (f15 (&a, 0) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 0
+ || f15 (&a, 0) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 0)
+ __builtin_abort ();
+ __atomic_store_n (&a, 8321, __ATOMIC_RELAXED);
+ if (f16 (&a) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8193
+ || f16 (&a) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 8193)
+ __builtin_abort ();
+ if (f17 (&a) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 1
+ || f17 (&a) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 1)
+ __builtin_abort ();
+ if (f18 (&a) != 1 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 0
+ || f18 (&a) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 0)
+ __builtin_abort ();
+ if (f19 (&c, 7) != 1 || __atomic_load_n (&c, __ATOMIC_RELAXED) != 128
+ || f19 (&c, 7) != 0 || __atomic_load_n (&c, __ATOMIC_RELAXED) != 0)
+ __builtin_abort ();
+ if (f20 (&c) != 0 || __atomic_load_n (&c, __ATOMIC_RELAXED) != 128
+ || f20 (&c) != 1 || __atomic_load_n (&c, __ATOMIC_RELAXED) != 0)
+ __builtin_abort ();
+ __atomic_store_n (&a, 128, __ATOMIC_RELAXED);
+ if (f21 (&a, 4) != 0 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 144
+ || f21 (&a, 4) != 16 || __atomic_load_n (&a, __ATOMIC_RELAXED) != 144)
+ __builtin_abort ();
+ __atomic_store_n (&c, 1, __ATOMIC_RELAXED);
+ if (f22 (&c) != 128 || __atomic_load_n (&c, __ATOMIC_RELAXED) != 129
+ || f22 (&c) != 0 || __atomic_load_n (&c, __ATOMIC_RELAXED) != 1)
+ __builtin_abort ();
+ if (f23 (&c) != 0 || __atomic_load_n (&c, __ATOMIC_RELAXED) != 129
+ || f23 (&c) != 128 || __atomic_load_n (&c, __ATOMIC_RELAXED) != 1)
+ __builtin_abort ();
+ if (f24 (&d) != 0 || __atomic_load_n (&d, __ATOMIC_RELAXED) != 128
+ || f24 (&d) != 1 || __atomic_load_n (&d, __ATOMIC_RELAXED) != 128)
+ __builtin_abort ();
+ __atomic_store_n (&d, 1, __ATOMIC_RELAXED);
+ if (f25 (&d) != 0 || __atomic_load_n (&d, __ATOMIC_RELAXED) != 129
+ || f25 (&d) != 1 || __atomic_load_n (&d, __ATOMIC_RELAXED) != 129
+ || cnt != 2)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-2.c b/gcc/testsuite/gcc.target/i386/pr102566-2.c
new file mode 100644
index 0000000..00a7c34
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-2.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+bool
+foo0 (_Atomic int *v)
+{
+#define BIT (1 << 0)
+ return atomic_fetch_or_explicit (v, BIT, memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+foo30 (_Atomic int *v)
+{
+#define BIT (1 << 30)
+ return atomic_fetch_or_explicit (v, BIT, memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+foo31 (_Atomic int *v)
+{
+#define BIT (1 << 31)
+ return atomic_fetch_or_explicit (v, BIT, memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btsl" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-3a.c b/gcc/testsuite/gcc.target/i386/pr102566-3a.c
new file mode 100644
index 0000000..8bf1cd6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-3a.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+bool
+foo (_Atomic int *v, int bit)
+{
+ int mask = 1 << bit;
+ return atomic_fetch_or_explicit (v, mask, memory_order_relaxed) & mask;
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btsl" 1 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-3b.c b/gcc/testsuite/gcc.target/i386/pr102566-3b.c
new file mode 100644
index 0000000..d155ed3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-3b.c
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+bool
+foo (_Atomic long long int *v, int bit)
+{
+ long long int mask = 1ll << bit;
+ return atomic_fetch_or_explicit (v, mask, memory_order_relaxed) & mask;
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btsq" 1 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-4.c b/gcc/testsuite/gcc.target/i386/pr102566-4.c
new file mode 100644
index 0000000..2668ccf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-4.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+bool
+foo (_Atomic int *v, int bit)
+{
+ unsigned int mask = 1 << bit;
+ return atomic_fetch_or_explicit (v, mask, memory_order_relaxed) & mask;
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btsl" 1 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-5.c b/gcc/testsuite/gcc.target/i386/pr102566-5.c
new file mode 100644
index 0000000..8bf1cd6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-5.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+bool
+foo (_Atomic int *v, int bit)
+{
+ int mask = 1 << bit;
+ return atomic_fetch_or_explicit (v, mask, memory_order_relaxed) & mask;
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btsl" 1 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-6.c b/gcc/testsuite/gcc.target/i386/pr102566-6.c
new file mode 100644
index 0000000..3dfe55a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-6.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+bool
+foo0 (_Atomic int *v)
+{
+#define BIT (1 << 0)
+ return !(atomic_fetch_or_explicit (v, BIT, memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+bool
+foo30 (_Atomic int *v)
+{
+#define BIT (1 << 30)
+ return !(atomic_fetch_or_explicit (v, BIT, memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+bool
+foo31 (_Atomic int *v)
+{
+#define BIT (1 << 31)
+ return !(atomic_fetch_or_explicit (v, BIT, memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btsl" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-7.c b/gcc/testsuite/gcc.target/i386/pr102566-7.c
new file mode 100644
index 0000000..6bc0ae0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-7.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+typedef int __attribute__ ((mode (__word__))) int_type;
+
+#define BIT (1 << 0)
+
+bool
+foo0 (_Atomic int_type *v)
+{
+ return atomic_fetch_or_explicit (v, BIT, memory_order_relaxed) & ~1;
+}
+
+bool
+foo1 (_Atomic int_type *v)
+{
+ return atomic_fetch_or_explicit (v, BIT, memory_order_relaxed) & ~2;
+}
+
+bool
+foo2 (_Atomic int_type *v)
+{
+ return atomic_fetch_or_explicit (v, BIT, memory_order_relaxed) & ~3;
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*cmpxchg" 3 } } */
+/* { dg-final { scan-assembler-not "bts" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-8a.c b/gcc/testsuite/gcc.target/i386/pr102566-8a.c
new file mode 100644
index 0000000..168e3db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-8a.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+bool
+foo0 (_Atomic int *v)
+{
+#define BIT (1 << 0)
+ return atomic_fetch_and_explicit (v, ~BIT, memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+foo30 (_Atomic int *v)
+{
+#define BIT (1 << 30)
+ return atomic_fetch_and_explicit (v, ~BIT, memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+foo31 (_Atomic int *v)
+{
+#define BIT (1 << 31)
+ return atomic_fetch_and_explicit (v, ~BIT, memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btrl" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-8b.c b/gcc/testsuite/gcc.target/i386/pr102566-8b.c
new file mode 100644
index 0000000..392da30
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-8b.c
@@ -0,0 +1,32 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+bool
+foo0 (_Atomic long long *v)
+{
+#define BIT (1ll << 0)
+ return atomic_fetch_and_explicit (v, ~BIT, memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+foo30 (_Atomic long long *v)
+{
+#define BIT (1ll << 62)
+ return atomic_fetch_and_explicit (v, ~BIT, memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+bool
+foo31 (_Atomic long long *v)
+{
+#define BIT (1ll << 63)
+ return atomic_fetch_and_explicit (v, ~BIT, memory_order_relaxed) & BIT;
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btrq" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-9a.c b/gcc/testsuite/gcc.target/i386/pr102566-9a.c
new file mode 100644
index 0000000..3fa2a3e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-9a.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+bool
+foo0 (_Atomic int *v)
+{
+#define BIT (1 << 0)
+ return !(atomic_fetch_and_explicit (v, ~BIT, memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+bool
+foo30 (_Atomic int *v)
+{
+#define BIT (1 << 30)
+ return !(atomic_fetch_and_explicit (v, ~BIT, memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+bool
+foo31 (_Atomic int *v)
+{
+#define BIT (1 << 31)
+ return !(atomic_fetch_and_explicit (v, ~BIT, memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btrl" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102566-9b.c b/gcc/testsuite/gcc.target/i386/pr102566-9b.c
new file mode 100644
index 0000000..38ddbdc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102566-9b.c
@@ -0,0 +1,32 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+#include <stdbool.h>
+
+bool
+foo0 (_Atomic long long *v)
+{
+#define BIT (1ll << 0)
+ return !(atomic_fetch_and_explicit (v, ~BIT, memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+bool
+foo30 (_Atomic long long *v)
+{
+#define BIT (1ll << 62)
+ return !(atomic_fetch_and_explicit (v, ~BIT, memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+bool
+foo31 (_Atomic long long *v)
+{
+#define BIT (1ll << 63)
+ return !(atomic_fetch_and_explicit (v, ~BIT, memory_order_relaxed) & BIT);
+#undef BIT
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btrq" 3 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr102811-1.c b/gcc/testsuite/gcc.target/i386/pr102811-1.c
new file mode 100644
index 0000000..a1952d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102811-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mf16c -mno-avx512fp16" } */
+/* { dg-final { scan-assembler-times "vpxor" 1 } } */
+/* { dg-final { scan-assembler-times "vpblendw" 2 { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "vpinsrw" 2 { target ia32 } } } */
+/* { dg-final { scan-assembler-not "vpextrw"} } */
+/* { dg-final { scan-assembler-not "vpbroadcastw"} } */
+_Float16 test (_Float16 a, _Float16 b)
+{
+ return a + b;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr102811-2.c b/gcc/testsuite/gcc.target/i386/pr102811-2.c
new file mode 100644
index 0000000..97bc9b1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102811-2.c
@@ -0,0 +1,21 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -mf16c -mno-avx512fp16" } */
+/* { dg-final { scan-assembler-times "vmovd" 2 } } */
+/* { dg-final { scan-assembler-not "\\\(%rsp\\\)"} } */
+short test (_Float16 a)
+{
+ union{
+ short b;
+ _Float16 a;}u;
+ u.a = a;
+ return u.b;
+}
+
+_Float16 test1 (short a)
+{
+ union{
+ _Float16 b;
+ short a;}u;
+ u.a = a;
+ return u.b;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr102811.c b/gcc/testsuite/gcc.target/i386/pr102811.c
new file mode 100644
index 0000000..9a6c432
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr102811.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mf16c -mno-avx512fp16" } */
+/* { dg-final { scan-assembler-times "vpxor\[ \\t\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2ps\[ \\t\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtps2ph\[ \\t\]" 1 } } */
+/* { dg-final { scan-assembler-not "__truncsfhf2\[ \\t\]"} } */
+/* { dg-final { scan-assembler-not "__extendhfsf2\[ \\t\]"} } */
+_Float16 test (_Float16 a, _Float16 b)
+{
+ return a + b;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr102812.c b/gcc/testsuite/gcc.target/i386/pr102812.c
index bad4fa9..51c89a6 100644
--- a/gcc/testsuite/gcc.target/i386/pr102812.c
+++ b/gcc/testsuite/gcc.target/i386/pr102812.c
@@ -2,7 +2,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -msse4 -mno-avx" } */
/* { dg-final { scan-assembler-not "vmovdqa64\t" } } */
-/* { dg-final { scan-assembler "movdqa\t" } } */
typedef _Float16 v8hf __attribute__((__vector_size__ (16)));
diff --git a/gcc/testsuite/gcc.target/i386/pr103020.c b/gcc/testsuite/gcc.target/i386/pr103020.c
new file mode 100644
index 0000000..75253c7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103020.c
@@ -0,0 +1,11 @@
+/* PR target/103020 */
+/* { dg-do compile { target { ! int128 } } } */
+/* { dg-additional-options "-mavx512f" } */
+
+typedef int TI __attribute__((mode (TI))); /* { dg-error "unable to emulate" } */
+typedef int V1TI __attribute__((mode (V1TI))); /* { dg-error "unable to emulate" } */
+typedef int V2TI __attribute__((mode (V2TI))); /* { dg-error "unable to emulate" } */
+typedef int V4TI __attribute__((mode (V4TI))); /* { dg-error "unable to emulate" } */
+/* { dg-warning "is deprecated" "V1TI" { target *-*-* } .-3 } */
+/* { dg-warning "is deprecated" "V2TI" { target *-*-* } .-3 } */
+/* { dg-warning "is deprecated" "V4TI" { target *-*-* } .-3 } */
diff --git a/gcc/testsuite/gcc.target/i386/pr103069-1.c b/gcc/testsuite/gcc.target/i386/pr103069-1.c
new file mode 100644
index 0000000..f819af4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103069-1.c
@@ -0,0 +1,35 @@
+/* PR target/103068 */
+/* { dg-do compile } */
+/* { dg-additional-options "-O2 -march=x86-64 -mtune=generic -mrelax-cmpxchg-loop" } */
+/* { dg-final { scan-assembler-times "rep;?\[ \\t\]+nop" 32 } } */
+
+#include <stdint.h>
+
+#define FUNC_ATOMIC(TYPE, OP) \
+__attribute__ ((noinline, noclone)) \
+TYPE f_##TYPE##_##OP##_fetch (TYPE *a, TYPE b) \
+{ \
+ return __atomic_##OP##_fetch (a, b, __ATOMIC_RELAXED); \
+} \
+__attribute__ ((noinline, noclone)) \
+TYPE f_##TYPE##_fetch_##OP (TYPE *a, TYPE b) \
+{ \
+ return __atomic_fetch_##OP (a, b, __ATOMIC_RELAXED); \
+}
+
+FUNC_ATOMIC (int64_t, and)
+FUNC_ATOMIC (int64_t, nand)
+FUNC_ATOMIC (int64_t, or)
+FUNC_ATOMIC (int64_t, xor)
+FUNC_ATOMIC (int, and)
+FUNC_ATOMIC (int, nand)
+FUNC_ATOMIC (int, or)
+FUNC_ATOMIC (int, xor)
+FUNC_ATOMIC (short, and)
+FUNC_ATOMIC (short, nand)
+FUNC_ATOMIC (short, or)
+FUNC_ATOMIC (short, xor)
+FUNC_ATOMIC (char, and)
+FUNC_ATOMIC (char, nand)
+FUNC_ATOMIC (char, or)
+FUNC_ATOMIC (char, xor)
diff --git a/gcc/testsuite/gcc.target/i386/pr103069-2.c b/gcc/testsuite/gcc.target/i386/pr103069-2.c
new file mode 100644
index 0000000..b3f2235
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103069-2.c
@@ -0,0 +1,71 @@
+/* PR target/103069 */
+/* { dg-do run } */
+/* { dg-additional-options "-O2 -march=x86-64 -mtune=generic" } */
+
+#include <stdlib.h>
+#include "pr103069-1.c"
+
+#define FUNC_ATOMIC_RELAX(TYPE, OP) \
+__attribute__ ((noinline, noclone, target ("relax-cmpxchg-loop"))) \
+TYPE relax_##TYPE##_##OP##_fetch (TYPE *a, TYPE b) \
+{ \
+ return __atomic_##OP##_fetch (a, b, __ATOMIC_RELAXED); \
+} \
+__attribute__ ((noinline, noclone, target ("relax-cmpxchg-loop"))) \
+TYPE relax_##TYPE##_fetch_##OP (TYPE *a, TYPE b) \
+{ \
+ return __atomic_fetch_##OP (a, b, __ATOMIC_RELAXED); \
+}
+
+FUNC_ATOMIC_RELAX (int64_t, and)
+FUNC_ATOMIC_RELAX (int64_t, nand)
+FUNC_ATOMIC_RELAX (int64_t, or)
+FUNC_ATOMIC_RELAX (int64_t, xor)
+FUNC_ATOMIC_RELAX (int, and)
+FUNC_ATOMIC_RELAX (int, nand)
+FUNC_ATOMIC_RELAX (int, or)
+FUNC_ATOMIC_RELAX (int, xor)
+FUNC_ATOMIC_RELAX (short, and)
+FUNC_ATOMIC_RELAX (short, nand)
+FUNC_ATOMIC_RELAX (short, or)
+FUNC_ATOMIC_RELAX (short, xor)
+FUNC_ATOMIC_RELAX (char, and)
+FUNC_ATOMIC_RELAX (char, nand)
+FUNC_ATOMIC_RELAX (char, or)
+FUNC_ATOMIC_RELAX (char, xor)
+
+#define TEST_ATOMIC_FETCH_LOGIC(TYPE, OP) \
+{ \
+ TYPE a = 11, b = 101, res, exp; \
+ TYPE c = 11, d = 101; \
+ res = relax_##TYPE##_##OP##_fetch (&a, b); \
+ exp = f_##TYPE##_##OP##_fetch (&c, d); \
+ if (res != exp) \
+ abort (); \
+ a = c = 21, b = d = 92; \
+ res = relax_##TYPE##_fetch_##OP (&a, b); \
+ exp = f_##TYPE##_fetch_##OP (&c, d); \
+ if (res != exp) \
+ abort (); \
+}
+
+int main (void)
+{
+ TEST_ATOMIC_FETCH_LOGIC (int64_t, and)
+ TEST_ATOMIC_FETCH_LOGIC (int64_t, nand)
+ TEST_ATOMIC_FETCH_LOGIC (int64_t, or)
+ TEST_ATOMIC_FETCH_LOGIC (int64_t, xor)
+ TEST_ATOMIC_FETCH_LOGIC (int, and)
+ TEST_ATOMIC_FETCH_LOGIC (int, nand)
+ TEST_ATOMIC_FETCH_LOGIC (int, or)
+ TEST_ATOMIC_FETCH_LOGIC (int, xor)
+ TEST_ATOMIC_FETCH_LOGIC (short, and)
+ TEST_ATOMIC_FETCH_LOGIC (short, nand)
+ TEST_ATOMIC_FETCH_LOGIC (short, or)
+ TEST_ATOMIC_FETCH_LOGIC (short, xor)
+ TEST_ATOMIC_FETCH_LOGIC (char, and)
+ TEST_ATOMIC_FETCH_LOGIC (char, nand)
+ TEST_ATOMIC_FETCH_LOGIC (char, or)
+ TEST_ATOMIC_FETCH_LOGIC (char, xor)
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103097.c b/gcc/testsuite/gcc.target/i386/pr103097.c
new file mode 100644
index 0000000..2b7a307
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103097.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fharden-conditional-branches" } */
+
+/* This is a slightly simplified version of
+ gcc.target/s390/vector/long-double-asm-earlyclobber.c. On x86, the f
+ constraints in asm statements imposes some requirements that the testcase
+ doesn't meet. What's unusual is that -fharden-conditional-branches extends
+ the effects of the malformed asm onto a different basic blocks, which
+ reg-stack did not expect. */
+
+#include <assert.h>
+#include <stdint.h>
+
+void
+f (void)
+{
+ long double res, x = 0;
+ asm("" : "=f"(res) /* { dg-error "must specify a single register" } */
+ : "0"(x));
+ assert (res == x);
+}
+
+void
+g (void)
+{
+ long double res, x = 0;
+ asm("" : "=g"(res) /* this is ok. */
+ : "0"(x));
+ assert (res == x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103151.c b/gcc/testsuite/gcc.target/i386/pr103151.c
new file mode 100644
index 0000000..d7db255
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103151.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512fp16 -O1 -mxop" } */
+
+typedef _Float16 v16hf __attribute__((vector_size(32)));
+typedef _Float16 v8hf __attribute__((vector_size(16)));
+v8hf f1() {
+ int i;
+ v8hf z;
+ z[i] = i;
+ return z;
+}
+
+v16hf f2() {
+ int i;
+ v16hf z;
+ z[i] = i;
+ return z;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103194-2.c b/gcc/testsuite/gcc.target/i386/pr103194-2.c
new file mode 100644
index 0000000..1a991fe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103194-2.c
@@ -0,0 +1,64 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+#include <stdatomic.h>
+#include <stdbool.h>
+
+#define FOO(RTYPE,TYPE,MASK) \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_fetch_or_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __atomic_fetch_or (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_fetch_xor_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __atomic_fetch_xor (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_xor_fetch_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __atomic_xor_fetch (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_fetch_and_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __atomic_fetch_and (a, ~mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_fetch_and_or_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __sync_fetch_and_or (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_fetch_and_xor_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __sync_fetch_and_xor (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_xor_and_fetch_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __sync_xor_and_fetch (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_fetch_and_and_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __sync_fetch_and_and (a, ~mask) & mask; \
+ } \
+
+FOO(char, short, 0);
+FOO(char, short, 7);
+FOO(short, int, 0);
+FOO(short, int, 15);
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*bts" 8 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btc" 16 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btr" 8 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr103194-3.c b/gcc/testsuite/gcc.target/i386/pr103194-3.c
new file mode 100644
index 0000000..4907598
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103194-3.c
@@ -0,0 +1,64 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2" } */
+#include <stdatomic.h>
+#include <stdbool.h>
+typedef long long int64;
+
+#define FOO(RTYPE, TYPE,MASK) \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_fetch_or_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __atomic_fetch_or (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_fetch_xor_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __atomic_fetch_xor (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_xor_fetch_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __atomic_xor_fetch (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_fetch_and_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __atomic_fetch_and (a, ~mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_fetch_and_or_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __sync_fetch_and_or (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_fetch_and_xor_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __sync_fetch_and_xor (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_xor_and_fetch_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __sync_xor_and_fetch (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_fetch_and_and_##TYPE##_##MASK (_Atomic TYPE* a) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __sync_fetch_and_and (a, ~mask) & mask; \
+ } \
+
+
+FOO(int, int64, 1);
+FOO(int, int64, 31);
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*bts" 4 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btc" 8 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btr" 4 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr103194-4.c b/gcc/testsuite/gcc.target/i386/pr103194-4.c
new file mode 100644
index 0000000..8573016
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103194-4.c
@@ -0,0 +1,61 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+#include <stdatomic.h>
+#include <stdbool.h>
+
+#define FOO(RTYPE,TYPE) \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_fetch_or_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __atomic_fetch_or (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_fetch_xor_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __atomic_fetch_xor (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_xor_fetch_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __atomic_xor_fetch (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_fetch_and_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __atomic_fetch_and (a, ~mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_fetch_and_or_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __sync_fetch_and_or (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_fetch_and_xor_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __sync_fetch_and_xor (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_xor_and_fetch_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __sync_xor_and_fetch (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_fetch_and_and_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1 << MASK; \
+ return __sync_fetch_and_and (a, ~mask) & mask; \
+ } \
+
+FOO(short, int);
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*bts" 2 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btc" 4 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btr" 2 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr103194-5.c b/gcc/testsuite/gcc.target/i386/pr103194-5.c
new file mode 100644
index 0000000..2e33528
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103194-5.c
@@ -0,0 +1,62 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2" } */
+#include <stdatomic.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+#define FOO(RTYPE,TYPE) \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_fetch_or_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __atomic_fetch_or (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_fetch_xor_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __atomic_fetch_xor (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_xor_fetch_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __atomic_xor_fetch (a, mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ atomic_fetch_and_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __atomic_fetch_and (a, ~mask, __ATOMIC_RELAXED) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_fetch_and_or_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __sync_fetch_and_or (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_fetch_and_xor_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __sync_fetch_and_xor (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_xor_and_fetch_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __sync_xor_and_fetch (a, mask) & mask; \
+ } \
+ __attribute__((noinline,noclone)) RTYPE \
+ sync_fetch_and_and_##TYPE##_##MASK (_Atomic TYPE* a, TYPE MASK) \
+ { \
+ TYPE mask = 1ll << MASK; \
+ return __sync_fetch_and_and (a, ~mask) & mask; \
+ } \
+
+FOO(int, int64_t);
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*bts" 2 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btc" 4 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btr" 2 } } */
+/* { dg-final { scan-assembler-not "cmpxchg" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr103194.c b/gcc/testsuite/gcc.target/i386/pr103194.c
new file mode 100644
index 0000000..a6d8433
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103194.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+long pscc_a_2_3;
+int pscc_a_1_4;
+void pscc()
+{
+ pscc_a_1_4 = __sync_fetch_and_and(&pscc_a_2_3, 1);
+}
+
+static int si;
+long
+test_types (long n)
+{
+ unsigned int u2 = __atomic_fetch_xor (&si, 0, 5);
+ return u2;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103205-2.c b/gcc/testsuite/gcc.target/i386/pr103205-2.c
new file mode 100644
index 0000000..705081e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103205-2.c
@@ -0,0 +1,46 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mtune-ctrl=^himode_math" } */
+
+extern short foo;
+extern unsigned short bar;
+
+int
+foo1 (void)
+{
+ return __sync_fetch_and_and (&foo, ~1) & 1;
+}
+
+int
+foo2 (void)
+{
+ return __sync_fetch_and_or (&foo, 1) & 1;
+}
+
+int
+foo3 (void)
+{
+ return __sync_fetch_and_xor (&foo, 1) & 1;
+}
+
+unsigned short
+bar1 (void)
+{
+ return __sync_fetch_and_and (&bar, ~1) & 1;
+}
+
+unsigned short
+bar2 (void)
+{
+ return __sync_fetch_and_or (&bar, 1) & 1;
+}
+
+unsigned short
+bar3 (void)
+{
+ return __sync_fetch_and_xor (&bar, 1) & 1;
+}
+
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btrw" 2 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btsw" 2 } } */
+/* { dg-final { scan-assembler-times "lock;?\[ \t\]*btcw" 2 } } */
+/* { dg-final { scan-assembler-not "cmpxchgw" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr103205.c b/gcc/testsuite/gcc.target/i386/pr103205.c
new file mode 100644
index 0000000..eaeea82
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103205.c
@@ -0,0 +1,11 @@
+/* PR target/103205 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mtune-ctrl=^himode_math" } */
+
+unsigned short a;
+
+unsigned short
+foo (void)
+{
+ return __sync_fetch_and_and (&a, ~1) & 1;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103275.c b/gcc/testsuite/gcc.target/i386/pr103275.c
new file mode 100644
index 0000000..c93413f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103275.c
@@ -0,0 +1,83 @@
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -march=tigerlake -fPIC" } */
+/* { dg-final { scan-assembler-not {(?n)kmovd.*@gotntpoff} } } */
+
+typedef unsigned short uint16_t;
+typedef int int32_t;
+typedef unsigned int uint32_t;
+typedef unsigned char uint8_t;
+
+typedef uint32_t in_addr_t;
+struct in_addr { in_addr_t s_addr; };
+
+extern __thread const uint16_t * __libc_tsd_CTYPE_B __attribute__ ((tls_model ("initial-exec")));
+extern __thread int __libc_errno __attribute__ ((tls_model ("initial-exec")));
+
+extern unsigned long strtoul (const char*, char**, int);
+extern uint32_t __bswap_32 (in_addr_t);
+int
+inet_aton_end (const char *cp, struct in_addr *addr, const char **endp)
+{
+ static const in_addr_t max[4] = { 0xffffffff, 0xffffff, 0xffff, 0xff };
+ in_addr_t val;
+ char c;
+ union iaddr
+ {
+ uint8_t bytes[4];
+ uint32_t word;
+ } res;
+ uint8_t *pp = res.bytes;
+ int digit;
+
+ int saved_errno = __libc_errno;
+ __libc_errno = 0;
+ res.word = 0;
+ c = *cp;
+
+ for (;;)
+ {
+ if (c < '0' || c > '9')
+ goto ret_0;
+ {
+ char *endp;
+ unsigned long ul = strtoul (cp, &endp, 0);
+ if (ul == 0x7fffffffL && __libc_errno == 34)
+ goto ret_0;
+ if (ul > 0xfffffffful)
+ goto ret_0;
+ val = ul;
+ digit = cp != endp;
+ cp = endp;
+ }
+ c = *cp;
+ if (c == '.')
+ {
+ if (pp > res.bytes + 2 || val > 0xff)
+ goto ret_0;
+ *pp++ = val;
+ c = *++cp;
+ }
+ else
+ break;
+ }
+
+ if (!(__libc_tsd_CTYPE_B[(int)c] & 8192))
+ goto ret_0;
+
+ if (!digit)
+ goto ret_0;
+
+ if (val > max[pp - res.bytes])
+ goto ret_0;
+
+ if (addr != 0)
+ addr->s_addr = res.word | __bswap_32 (val);
+ *endp = cp;
+
+ __libc_errno = saved_errno;
+ return 1;
+
+ ret_0:
+ __libc_errno = saved_errno;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103404.c b/gcc/testsuite/gcc.target/i386/pr103404.c
new file mode 100644
index 0000000..66f3364
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103404.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-Og -fcse-follow-jumps -fno-dce -fno-early-inlining -fgcse -fharden-conditional-branches -frerun-cse-after-loop -fno-tree-ccp -mavx5124fmaps -std=c99 -w" } */
+
+typedef unsigned __attribute__((__vector_size__ (4))) U;
+typedef unsigned __attribute__((__vector_size__ (16))) V;
+typedef unsigned __attribute__((__vector_size__ (64))) W;
+
+int x, y;
+
+V v;
+W w;
+
+inline
+int bar (U a)
+{
+ a |= x;
+ W k =
+ __builtin_shufflevector (v, 5 / a,
+ 2, 4, 0, 2, 4, 1, 0, 1,
+ 1, 2, 1, 3, 0, 4, 4, 0);
+ w = k;
+ y = 0;
+}
+
+int
+foo ()
+{
+ bar ((U){0xffffffff});
+ for (unsigned i; i < sizeof (foo);)
+ ;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/pr103463-2.c b/gcc/testsuite/gcc.target/i386/pr103463-2.c
new file mode 100644
index 0000000..e1b2500
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103463-2.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O2 -fno-tree-bit-ccp" } */
+
+int foo_u64_1;
+unsigned __int128 foo_u128_1;
+
+void
+foo (void)
+{
+ foo_u128_1 <<= 127;
+ foo_u64_1 += __builtin_sub_overflow_p (0, (long) foo_u128_1, 0);
+ foo_u128_1 =
+ foo_u128_1 >> (foo_u128_1 & 127) | foo_u128_1 << (-foo_u128_1 & 127);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103463.c b/gcc/testsuite/gcc.target/i386/pr103463.c
new file mode 100644
index 0000000..6cb8d3f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103463.c
@@ -0,0 +1,13 @@
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-Os -fno-tree-dominator-opts -fno-tree-vrp" } */
+
+int bar0_u8_0, bar0_u16_0, bar0_u32_0, bar0_u16_1, bar0_u32_1;
+unsigned __int128 bar0_u128_0;
+
+int
+bar0() {
+ bar0_u16_1 *=
+ __builtin_add_overflow_p(bar0_u16_0, bar0_u32_1, (long)bar0_u8_0);
+ bar0_u128_0 = bar0_u128_0 >> bar0_u16_1 | bar0_u128_0 << (-bar0_u16_1 & 127);
+ bar0_u128_0 += __builtin_mul_overflow_p(bar0_u32_0, 20, 0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103611-1.c b/gcc/testsuite/gcc.target/i386/pr103611-1.c
new file mode 100644
index 0000000..7d8ac9d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103611-1.c
@@ -0,0 +1,30 @@
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -msse4" } */
+typedef int __v4si __attribute__ ((__vector_size__ (16)));
+
+long long ior_1(__v4si v) {
+ unsigned int loVal = (unsigned int)v[0];
+ unsigned int hiVal = (unsigned int)v[1];
+ return (long long)(loVal) | ((long long)(hiVal) << 32);
+}
+
+long long ior_2(__v4si v) {
+ unsigned int loVal = (unsigned int)v[2];
+ unsigned int hiVal = (unsigned int)v[3];
+ return (long long)(loVal) | ((long long)(hiVal) << 32);
+}
+
+long long xor_1(__v4si v) {
+ unsigned int loVal = (unsigned int)v[0];
+ unsigned int hiVal = (unsigned int)v[1];
+ return (long long)(loVal) ^ ((long long)(hiVal) << 32);
+}
+
+long long xor_2(__v4si v) {
+ unsigned int loVal = (unsigned int)v[2];
+ unsigned int hiVal = (unsigned int)v[3];
+ return (long long)(loVal) ^ ((long long)(hiVal) << 32);
+}
+/* { dg-final { scan-assembler-not "\torb\t\\\$0," } } */
+/* { dg-final { scan-assembler-not "\txorb\t\\\$0," } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr103611-2.c b/gcc/testsuite/gcc.target/i386/pr103611-2.c
new file mode 100644
index 0000000..1555e99
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103611-2.c
@@ -0,0 +1,43 @@
+/* { dg-do compile } */
+/* { dg-options "-m32 -O2 -msse4" } */
+typedef int __v4si __attribute__ ((__vector_size__ (16)));
+
+long long test1(__v4si v) {
+ unsigned int loVal = (unsigned int)v[0];
+ unsigned int hiVal = (unsigned int)v[1];
+ return (long long)(loVal) | ((long long)(hiVal) << 32);
+}
+
+long long test2(__v4si v) {
+ unsigned int loVal = (unsigned int)v[2];
+ unsigned int hiVal = (unsigned int)v[3];
+ return (long long)(loVal) | ((long long)(hiVal) << 32);
+}
+
+long long test3(__v4si v) {
+ unsigned int loVal = (unsigned int)v[0];
+ unsigned int hiVal = (unsigned int)v[1];
+ return (long long)(loVal) ^ ((long long)(hiVal) << 32);
+}
+
+long long test4(__v4si v) {
+ unsigned int loVal = (unsigned int)v[2];
+ unsigned int hiVal = (unsigned int)v[3];
+ return (long long)(loVal) ^ ((long long)(hiVal) << 32);
+}
+
+long long test5(__v4si v) {
+ unsigned int loVal = (unsigned int)v[0];
+ unsigned int hiVal = (unsigned int)v[1];
+ return (long long)(loVal) + ((long long)(hiVal) << 32);
+}
+
+long long test6(__v4si v) {
+ unsigned int loVal = (unsigned int)v[2];
+ unsigned int hiVal = (unsigned int)v[3];
+ return (long long)(loVal) + ((long long)(hiVal) << 32);
+}
+
+/* { dg-final { scan-assembler-not "\tor" } } */
+/* { dg-final { scan-assembler-not "\txor" } } */
+/* { dg-final { scan-assembler-not "\tadd" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr103753.c b/gcc/testsuite/gcc.target/i386/pr103753.c
new file mode 100644
index 0000000..4b2b3e4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103753.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx2 -mno-avx512f -O2" } */
+/* { dg-final { scan-assembler-not "vpbroadcastw" } } */
+
+typedef _Float16 __v16hf __attribute__ ((__vector_size__ (32)));
+
+__v16hf foo (_Float16 x)
+{
+ return (__v16hf) { x, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f };
+}
+
+typedef short __v16hi __attribute__ ((__vector_size__ (32)));
+
+__v16hi bar (short x)
+{
+ return (__v16hi) { x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103762-1a.c b/gcc/testsuite/gcc.target/i386/pr103762-1a.c
new file mode 100644
index 0000000..c9e75bc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103762-1a.c
@@ -0,0 +1,647 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -std=gnu11 -fgnu89-inline" } */
+/* { dg-final { scan-assembler-not ".quad\[\\t \]+tunable_list" { target lp64 } } } */
+/* { dg-final { scan-assembler-not ".long\[\\t \]+tunable_list" { target { ! lp64 } } } } */
+
+typedef unsigned long int size_t;
+typedef long long int intmax_t;
+typedef unsigned long long int uintmax_t;
+typedef unsigned long long int uint64_t;
+typedef intmax_t tunable_num_t;
+typedef union
+{
+ tunable_num_t numval;
+ const char *strval;
+} tunable_val_t;
+enum
+{
+ HWCAP_X86_SSE2 = 1 << 0,
+ HWCAP_X86_64 = 1 << 1,
+ HWCAP_X86_AVX512_1 = 1 << 2
+};
+typedef void (*tunable_callback_t) (tunable_val_t *);
+extern void *__minimal_malloc (size_t n)
+ __attribute__ ((visibility ("hidden")));
+extern int __libc_enable_secure __attribute__ ((section (".data.rel.ro")));
+extern uint64_t _dl_strtoul (const char *, char **)
+ __attribute__ ((visibility ("hidden")));
+extern void _dl_fatal_printf (const char *fmt, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2), __noreturn__));
+typedef enum
+{
+ glibc_rtld_nns,
+ glibc_elision_skip_lock_after_retries,
+ glibc_malloc_trim_threshold,
+ glibc_malloc_perturb,
+ glibc_cpu_x86_shared_cache_size,
+ glibc_pthread_rseq,
+ glibc_mem_tagging,
+ glibc_elision_tries,
+ glibc_elision_enable,
+ glibc_malloc_hugetlb,
+ glibc_cpu_x86_rep_movsb_threshold,
+ glibc_malloc_mxfast,
+ glibc_rtld_dynamic_sort,
+ glibc_elision_skip_lock_busy,
+ glibc_malloc_top_pad,
+ glibc_cpu_x86_rep_stosb_threshold,
+ glibc_cpu_x86_non_temporal_threshold,
+ glibc_cpu_x86_shstk,
+ glibc_pthread_stack_cache_size,
+ glibc_cpu_hwcap_mask,
+ glibc_malloc_mmap_max,
+ glibc_elision_skip_trylock_internal_abort,
+ glibc_malloc_tcache_unsorted_limit,
+ glibc_cpu_x86_ibt,
+ glibc_cpu_hwcaps,
+ glibc_elision_skip_lock_internal_abort,
+ glibc_malloc_arena_max,
+ glibc_malloc_mmap_threshold,
+ glibc_cpu_x86_data_cache_size,
+ glibc_malloc_tcache_count,
+ glibc_malloc_arena_test,
+ glibc_pthread_mutex_spin_count,
+ glibc_rtld_optional_static_tls,
+ glibc_malloc_tcache_max,
+ glibc_malloc_check,
+} tunable_id_t;
+typedef enum
+{
+ TUNABLE_TYPE_INT_32,
+ TUNABLE_TYPE_UINT_64,
+ TUNABLE_TYPE_SIZE_T,
+ TUNABLE_TYPE_STRING
+} tunable_type_code_t;
+typedef struct
+{
+ tunable_type_code_t type_code;
+ tunable_num_t min;
+ tunable_num_t max;
+} tunable_type_t;
+typedef enum
+{
+ TUNABLE_SECLEVEL_SXID_ERASE = 0,
+ TUNABLE_SECLEVEL_SXID_IGNORE = 1,
+ TUNABLE_SECLEVEL_NONE = 2,
+} tunable_seclevel_t;
+struct _tunable
+{
+ const char name[42];
+ tunable_type_t type;
+ tunable_val_t val;
+ _Bool initialized;
+ tunable_seclevel_t security_level;
+ const char env_alias[23];
+};
+typedef struct _tunable tunable_t;
+extern _Bool unsigned_tunable_type (tunable_type_code_t t);
+
+static tunable_t tunable_list[] __attribute__ ((section (".data.rel.ro"))) = {
+ { "glibc"
+ "."
+ "rtld"
+ "."
+ "nns",
+ { TUNABLE_TYPE_SIZE_T, 1, 16 },
+ { .numval = 4 },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "elision"
+ "."
+ "skip_lock_after_retries",
+ { TUNABLE_TYPE_INT_32, 0, (2147483647) },
+ { .numval = 3 },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "trim_threshold",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_IGNORE,
+ "MALLOC_TRIM_THRESHOLD_" },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "perturb",
+ { TUNABLE_TYPE_INT_32, 0, 0xff },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_IGNORE,
+ "MALLOC_PERTURB_" },
+ { "glibc"
+ "."
+ "cpu"
+ "."
+ "x86_shared_cache_size",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "pthread"
+ "."
+ "rseq",
+ { TUNABLE_TYPE_INT_32, 0, 1 },
+ { .numval = 1 },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "mem"
+ "."
+ "tagging",
+ { TUNABLE_TYPE_INT_32, 0, 255 },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_IGNORE,
+ { 0 } },
+ { "glibc"
+ "."
+ "elision"
+ "."
+ "tries",
+ { TUNABLE_TYPE_INT_32, 0, (2147483647) },
+ { .numval = 3 },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "elision"
+ "."
+ "enable",
+ { TUNABLE_TYPE_INT_32, 0, 1 },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "hugetlb",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "cpu"
+ "."
+ "x86_rep_movsb_threshold",
+ { TUNABLE_TYPE_SIZE_T, 1, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "mxfast",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_IGNORE,
+ { 0 } },
+ { "glibc"
+ "."
+ "rtld"
+ "."
+ "dynamic_sort",
+ { TUNABLE_TYPE_INT_32, 1, 2 },
+ { .numval = 2 },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "elision"
+ "."
+ "skip_lock_busy",
+ { TUNABLE_TYPE_INT_32, 0, (2147483647) },
+ { .numval = 3 },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "top_pad",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_IGNORE,
+ "MALLOC_TOP_PAD_" },
+ { "glibc"
+ "."
+ "cpu"
+ "."
+ "x86_rep_stosb_threshold",
+ { TUNABLE_TYPE_SIZE_T, 1, (18446744073709551615UL) },
+ { .numval = 2048 },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "cpu"
+ "."
+ "x86_non_temporal_threshold",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "cpu"
+ "."
+ "x86_shstk",
+ { TUNABLE_TYPE_STRING, 0, 0 },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "pthread"
+ "."
+ "stack_cache_size",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ { .numval = 41943040 },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "cpu"
+ "."
+ "hwcap_mask",
+ { TUNABLE_TYPE_UINT_64, 0, (18446744073709551615UL) },
+ { .numval = (HWCAP_X86_64 | HWCAP_X86_AVX512_1) },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ "LD_HWCAP_MASK" },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "mmap_max",
+ { TUNABLE_TYPE_INT_32, 0, (2147483647) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_IGNORE,
+ "MALLOC_MMAP_MAX_" },
+ { "glibc"
+ "."
+ "elision"
+ "."
+ "skip_trylock_internal_abort",
+ { TUNABLE_TYPE_INT_32, 0, (2147483647) },
+ { .numval = 3 },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "tcache_unsorted_limit",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "cpu"
+ "."
+ "x86_ibt",
+ { TUNABLE_TYPE_STRING, 0, 0 },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "cpu"
+ "."
+ "hwcaps",
+ { TUNABLE_TYPE_STRING, 0, 0 },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "elision"
+ "."
+ "skip_lock_internal_abort",
+ { TUNABLE_TYPE_INT_32, 0, (2147483647) },
+ { .numval = 3 },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "arena_max",
+ { TUNABLE_TYPE_SIZE_T, 1, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_IGNORE,
+ "MALLOC_ARENA_MAX" },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "mmap_threshold",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_IGNORE,
+ "MALLOC_MMAP_THRESHOLD_" },
+ { "glibc"
+ "."
+ "cpu"
+ "."
+ "x86_data_cache_size",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "tcache_count",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "arena_test",
+ { TUNABLE_TYPE_SIZE_T, 1, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_IGNORE,
+ "MALLOC_ARENA_TEST" },
+ { "glibc"
+ "."
+ "pthread"
+ "."
+ "mutex_spin_count",
+ { TUNABLE_TYPE_INT_32, 0, 32767 },
+ { .numval = 100 },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "rtld"
+ "."
+ "optional_static_tls",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ { .numval = 512 },
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "tcache_max",
+ { TUNABLE_TYPE_SIZE_T, 0, (18446744073709551615UL) },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ { 0 } },
+ { "glibc"
+ "."
+ "malloc"
+ "."
+ "check",
+ { TUNABLE_TYPE_INT_32, 0, 3 },
+ {},
+ ((void *)0),
+ TUNABLE_SECLEVEL_SXID_ERASE,
+ "MALLOC_CHECK_" },
+};
+extern void __tunables_init (char **);
+extern void __tunables_print (void);
+extern void __tunable_get_val (tunable_id_t, void *, tunable_callback_t);
+extern void __tunable_set_val (tunable_id_t, tunable_val_t *, tunable_num_t *,
+ tunable_num_t *);
+static __inline __attribute__ ((__always_inline__)) _Bool
+tunable_val_lt (tunable_num_t lhs, tunable_num_t rhs, _Bool unsigned_cmp)
+{
+ if (unsigned_cmp)
+ return (uintmax_t)lhs < (uintmax_t)rhs;
+ else
+ return lhs < rhs;
+}
+static __inline __attribute__ ((__always_inline__)) _Bool
+tunable_val_gt (tunable_num_t lhs, tunable_num_t rhs, _Bool unsigned_cmp)
+{
+ if (unsigned_cmp)
+ return (uintmax_t)lhs > (uintmax_t)rhs;
+ else
+ return lhs > rhs;
+}
+static __inline __attribute__ ((__always_inline__)) _Bool
+tunable_is_name (const char *orig, const char *envname)
+{
+ for (; *orig != '\0' && *envname != '\0'; envname++, orig++)
+ if (*orig != *envname)
+ break;
+ if (*orig == '\0' && *envname == '=')
+ return 1;
+ else
+ return 0;
+}
+static char *
+tunables_strdup (const char *in)
+{
+ size_t i = 0;
+ while (in[i++] != '\0')
+ ;
+ char *out = __minimal_malloc (i + 1);
+ if (out == ((void *)0))
+ _dl_fatal_printf ("failed to allocate memory to process tunables\n");
+ while (i-- > 0)
+ out[i] = in[i];
+ return out;
+}
+static char **
+get_next_env (char **envp, char **name, size_t *namelen, char **val,
+ char ***prev_envp)
+{
+ while (envp != ((void *)0) && *envp != ((void *)0))
+ {
+ char **prev = envp;
+ char *envline = *envp++;
+ int len = 0;
+ while (envline[len] != '\0' && envline[len] != '=')
+ len++;
+ if (envline[len] == '\0')
+ continue;
+ *name = envline;
+ *namelen = len;
+ *val = &envline[len + 1];
+ *prev_envp = prev;
+ return envp;
+ }
+ return ((void *)0);
+}
+static void
+do_tunable_update_val (tunable_t *cur, const tunable_val_t *valp,
+ const tunable_num_t *minp, const tunable_num_t *maxp)
+{
+ tunable_num_t val, min, max;
+ if (cur->type.type_code == TUNABLE_TYPE_STRING)
+ {
+ cur->val.strval = valp->strval;
+ cur->initialized = 1;
+ return;
+ }
+ _Bool unsigned_cmp = unsigned_tunable_type (cur->type.type_code);
+ val = valp->numval;
+ min = minp != ((void *)0) ? *minp : cur->type.min;
+ max = maxp != ((void *)0) ? *maxp : cur->type.max;
+ if (tunable_val_lt (min, cur->type.min, unsigned_cmp))
+ min = cur->type.min;
+ if (tunable_val_gt (max, cur->type.max, unsigned_cmp))
+ max = cur->type.max;
+ if (tunable_val_gt (min, max, unsigned_cmp))
+ {
+ min = cur->type.min;
+ max = cur->type.max;
+ }
+ if (tunable_val_lt (val, min, unsigned_cmp)
+ || tunable_val_lt (max, val, unsigned_cmp))
+ return;
+ cur->val.numval = val;
+ cur->type.min = min;
+ cur->type.max = max;
+ cur->initialized = 1;
+}
+static void
+tunable_initialize (tunable_t *cur, const char *strval)
+{
+ tunable_val_t val;
+ if (cur->type.type_code != TUNABLE_TYPE_STRING)
+ val.numval = (tunable_num_t)_dl_strtoul (strval, ((void *)0));
+ else
+ val.strval = strval;
+ do_tunable_update_val (cur, &val, ((void *)0), ((void *)0));
+}
+static void
+parse_tunables (char *tunestr, char *valstring)
+{
+ if (tunestr == ((void *)0) || *tunestr == '\0')
+ return;
+ char *p = tunestr;
+ size_t off = 0;
+ while (1)
+ {
+ char *name = p;
+ size_t len = 0;
+ while (p[len] != '=' && p[len] != ':' && p[len] != '\0')
+ len++;
+ if (p[len] == '\0')
+ {
+ if (__libc_enable_secure)
+ tunestr[off] = '\0';
+ return;
+ }
+ if (p[len] == ':')
+ {
+ p += len + 1;
+ continue;
+ }
+ p += len + 1;
+ char *value = &valstring[p - tunestr];
+ len = 0;
+ while (p[len] != ':' && p[len] != '\0')
+ len++;
+ for (size_t i = 0; i < sizeof (tunable_list) / sizeof (tunable_t); i++)
+ {
+ tunable_t *cur = &tunable_list[i];
+ if (tunable_is_name (cur->name, name))
+ {
+ if (__libc_enable_secure)
+ {
+ if (cur->security_level != TUNABLE_SECLEVEL_SXID_ERASE)
+ {
+ if (off > 0)
+ tunestr[off++] = ':';
+ const char *n = cur->name;
+ while (*n != '\0')
+ tunestr[off++] = *n++;
+ tunestr[off++] = '=';
+ for (size_t j = 0; j < len; j++)
+ tunestr[off++] = value[j];
+ }
+ if (cur->security_level != TUNABLE_SECLEVEL_NONE)
+ break;
+ }
+ value[len] = '\0';
+ tunable_initialize (cur, value);
+ break;
+ }
+ }
+ if (p[len] != '\0')
+ p += len + 1;
+ }
+}
+void
+__tunables_init (char **envp)
+{
+ char *envname = ((void *)0);
+ char *envval = ((void *)0);
+ size_t len = 0;
+ char **prev_envp = envp;
+ while ((envp = get_next_env (envp, &envname, &len, &envval, &prev_envp))
+ != ((void *)0))
+ {
+ if (tunable_is_name ("GLIBC_TUNABLES", envname))
+ {
+ char *new_env = tunables_strdup (envname);
+ if (new_env != ((void *)0))
+ parse_tunables (new_env + len + 1, envval);
+ *prev_envp = new_env;
+ continue;
+ }
+ for (int i = 0; i < sizeof (tunable_list) / sizeof (tunable_t); i++)
+ {
+ tunable_t *cur = &tunable_list[i];
+ const char *name = cur->env_alias;
+ if (tunable_is_name (name, envname))
+ {
+ tunable_initialize (cur, envval);
+ break;
+ }
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103762-1b.c b/gcc/testsuite/gcc.target/i386/pr103762-1b.c
new file mode 100644
index 0000000..391f51c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103762-1b.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target pie } */
+/* { dg-options "-O2 -std=gnu11 -fgnu89-inline -fpie" } */
+/* { dg-final { scan-assembler-not ".quad\[\\t \]+tunable_list" { target lp64 } } } */
+/* { dg-final { scan-assembler-not ".long\[\\t \]+tunable_list" { target { ! lp64 } } } } */
+
+#include "pr103762-1a.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103762-1c.c b/gcc/testsuite/gcc.target/i386/pr103762-1c.c
new file mode 100644
index 0000000..4667b06
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103762-1c.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -std=gnu11 -fgnu89-inline -fpic" } */
+/* { dg-final { scan-assembler-not ".quad\[\\t \]+tunable_list" { target lp64 } } } */
+/* { dg-final { scan-assembler-not ".long\[\\t \]+tunable_list" { target { ! lp64 } } } } */
+
+#include "pr103762-1a.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103771.c b/gcc/testsuite/gcc.target/i386/pr103771.c
new file mode 100644
index 0000000..a1a9952
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103771.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-march=cascadelake -O3 -fdump-tree-vect-details -mprefer-vector-width=128" } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+
+typedef unsigned char uint8_t;
+
+static uint8_t x264_clip_uint8 (int x)
+{
+ return x & (~255) ? (-x) >> 31 : x;
+}
+
+void
+mc_weight (uint8_t* __restrict dst, uint8_t* __restrict src,
+ int i_width,int i_scale)
+{
+ for(int x = 0; x < i_width; x++)
+ dst[x] = x264_clip_uint8 (src[x] * i_scale);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103773-2.c b/gcc/testsuite/gcc.target/i386/pr103773-2.c
new file mode 100644
index 0000000..9dafebd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103773-2.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-Oz" } */
+short s;
+int i;
+long long l;
+
+void s0() { s = 0; }
+void sm1() { s = -1; }
+void i0() { i = 0; }
+void im1() { i = -1; }
+void l0() { l = 0; }
+void lm1() { l = -1; }
+
+/* { dg-final { scan-assembler-not "\tmov\[wlq\]\t\\\$0," } } */
+/* { dg-final { scan-assembler-not "\tmov\[wlq\]\t\\\$-1," } } */
+/* { dg-final { scan-assembler "\tandw\t\\\$0," } } */
+/* { dg-final { scan-assembler "\torw\t\\\$-1," } } */
+/* { dg-final { scan-assembler "\torl\t\\\$-1," } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr103773.c b/gcc/testsuite/gcc.target/i386/pr103773.c
new file mode 100644
index 0000000..1e4b8ce
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103773.c
@@ -0,0 +1,12 @@
+/* { dg-do run } */
+/* { dg-options "-Oz" } */
+
+unsigned long long x;
+
+int main (void)
+{
+ __builtin_memset (&x, 0xff, 4);
+ if (x != 0xffffffff)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103774.c b/gcc/testsuite/gcc.target/i386/pr103774.c
new file mode 100644
index 0000000..0dafb1b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103774.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-march=cannonlake -O2" } */
+/* { dg-final { scan-assembler-not {(?n)vmovdq} } } */
+/* There should be no load + vpcmp, just vpcmp with memory operand. */
+
+#include<immintrin.h>
+__mmask16
+foo (__m256i* n, __m256i mch256)
+{
+ __m256i data1 = _mm256_loadu_si256(n);
+ __m256i data2 = _mm256_loadu_si256(n+1);
+ __mmask16 mask1 = _mm256_cmpeq_epu16_mask(data1, mch256);
+ __mmask16 mask2 = _mm256_cmpeq_epu16_mask(data2, mch256);
+ return mask1 + mask2;
+}
+
+__mmask16
+foo1 (__m256i* n, __m256i mch256)
+{
+ __m256i data1 = _mm256_loadu_si256(n);
+ __m256i data2 = _mm256_loadu_si256(n+1);
+ __mmask16 mask1 = _mm256_cmpeq_epu16_mask(mch256, data1);
+ __mmask16 mask2 = _mm256_cmpeq_epu16_mask(mch256, data2);
+ return mask1 + mask2;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103785.c b/gcc/testsuite/gcc.target/i386/pr103785.c
new file mode 100644
index 0000000..5503b96
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103785.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#include <stdlib.h>
+
+struct wrapper_t
+{
+ long k;
+ long e;
+};
+
+struct wrapper_t **table;
+
+__attribute__ ((weak, regparm (2)))
+void
+update (long k, long e)
+{
+ struct wrapper_t *elmt;
+
+ elmt = table[k % 3079];
+ if (elmt == 0)
+ return;
+ elmt->e = e;
+}
+
+int
+main ()
+{
+ table = (struct wrapper_t **) malloc (20 * sizeof (struct wrapper_t *));
+ for (int i = 0; i < 20; i++)
+ table[i] = (struct wrapper_t *) calloc (sizeof (struct wrapper_t), 1);
+ if (table[10]->e != 0)
+ abort ();
+ update (10, 20);
+ if (table[10]->e != 20)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103861-2.c b/gcc/testsuite/gcc.target/i386/pr103861-2.c
new file mode 100644
index 0000000..471f50c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103861-2.c
@@ -0,0 +1,21 @@
+/* PR target/103861 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse2" } */
+
+typedef char vec __attribute__((vector_size(2)));
+
+vec lt (vec a, vec b) { return a < b; }
+vec le (vec a, vec b) { return a <= b; }
+vec eq (vec a, vec b) { return a == b; }
+vec ne (vec a, vec b) { return a != b; }
+vec ge (vec a, vec b) { return a >= b; }
+vec gt (vec a, vec b) { return a > b; }
+
+typedef unsigned char uvec __attribute__((vector_size(2)));
+
+vec ltu (uvec a, uvec b) { return a < b; }
+vec leu (uvec a, uvec b) { return a <= b; }
+vec geu (uvec a, uvec b) { return a >= b; }
+vec gtu (uvec a, uvec b) { return a > b; }
+
+/* { dg-final { scan-assembler-not "cmpb" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr103861-3.c b/gcc/testsuite/gcc.target/i386/pr103861-3.c
new file mode 100644
index 0000000..02f39a9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103861-3.c
@@ -0,0 +1,66 @@
+/* PR target/103861 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -msse4 -fno-vect-cost-model" } */
+
+char r[2], a[2], b[2];
+unsigned char ur[2], ua[2], ub[2];
+
+void maxs (void)
+{
+ int i;
+
+ for (i = 0; i < 2; i++)
+ r[i] = a[i] > b[i] ? a[i] : b[i];
+}
+
+/* { dg-final { scan-assembler "pmaxsb" } } */
+
+void maxu (void)
+{
+ int i;
+
+ for (i = 0; i < 2; i++)
+ ur[i] = ua[i] > ub[i] ? ua[i] : ub[i];
+}
+
+/* { dg-final { scan-assembler "pmaxub" } } */
+
+void mins (void)
+{
+ int i;
+
+ for (i = 0; i < 2; i++)
+ r[i] = a[i] < b[i] ? a[i] : b[i];
+}
+
+/* { dg-final { scan-assembler "pminsb" } } */
+
+void minu (void)
+{
+ int i;
+
+ for (i = 0; i < 2; i++)
+ ur[i] = ua[i] < ub[i] ? ua[i] : ub[i];
+}
+
+/* { dg-final { scan-assembler "pminub" } } */
+
+void _abs (void)
+{
+ int i;
+
+ for (i = 0; i < 2; i++)
+ r[i] = a[i] < 0 ? -a[i] : a[i];
+}
+
+/* { dg-final { scan-assembler "pabsb" } } */
+
+void avgu (void)
+{
+ int i;
+
+ for (i = 0; i < 2; i++)
+ ur[i] = (ua[i] + ub[i] + 1) >> 1;
+}
+
+/* { dg-final { scan-assembler "pavgb" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr103861-4.c b/gcc/testsuite/gcc.target/i386/pr103861-4.c
new file mode 100644
index 0000000..5433369
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103861-4.c
@@ -0,0 +1,19 @@
+/* PR target/100637 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -msse2" } */
+
+typedef char T;
+
+#define M 2
+
+extern T a[M], b[M], s1[M], s2[M], r[M];
+
+void foo (void)
+{
+ int j;
+
+ for (j = 0; j < M; j++)
+ r[j] = (a[j] < b[j]) ? s1[j] : s2[j];
+}
+
+/* { dg-final { scan-assembler "pcmpgtb" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr103861.c b/gcc/testsuite/gcc.target/i386/pr103861.c
new file mode 100644
index 0000000..064b617
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103861.c
@@ -0,0 +1,30 @@
+/* PR target/103861 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -dp" } */
+
+typedef char __v2qi __attribute__ ((__vector_size__ (2)));
+typedef unsigned char __v2qu __attribute__ ((__vector_size__ (2)));
+
+__v2qi and (__v2qi a, __v2qi b) { return a & b; };
+
+__v2qi andn (__v2qi a, __v2qi b) { return a & ~b; };
+
+__v2qi or (__v2qi a, __v2qi b) { return a | b; };
+
+__v2qi xor (__v2qi a, __v2qi b) { return a ^ b; };
+
+__v2qi not (__v2qi a) { return ~a; };
+
+__v2qi plus (__v2qi a, __v2qi b) { return a + b; };
+
+__v2qi minus (__v2qi a, __v2qi b) { return a - b; };
+
+__v2qi neg (__v2qi a) { return -a; };
+
+__v2qi shl (__v2qi a, int b) { return a << b; };
+
+__v2qi ashr (__v2qi a, int b) { return a >> b; };
+
+__v2qu lshr (__v2qu a, int b) { return a >> b; };
+
+/* { dg-final { scan-assembler-not "insvhi" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr103894.c b/gcc/testsuite/gcc.target/i386/pr103894.c
new file mode 100644
index 0000000..69c81046
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103894.c
@@ -0,0 +1,13 @@
+/* PR target/103894 */
+/* { dg-do compile } */
+/* { dg-options "-msse -mno-sse2" } */
+
+typedef unsigned char __attribute__((__vector_size__ (32))) V;
+typedef unsigned char __attribute__((__vector_size__ (2))) W;
+
+V v;
+
+W foo (W w)
+{
+ return __builtin_shufflevector (v, w, 3, 4);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103895.c b/gcc/testsuite/gcc.target/i386/pr103895.c
new file mode 100644
index 0000000..e1de4ef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103895.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-Og -ffloat-store -msse2" } */
+
+#include <emmintrin.h>
+typedef float vFloat __attribute__((__vector_size__(16)));
+float bar_dr;
+vFloat bar_f1;
+void bar() {
+ static vFloat m0;
+ vFloat fa1 = _mm_andnot_ps(m0, bar_f1);
+ __attribute__((__vector_size__(2 * sizeof(double)))) double v3 =
+ _mm_cvtps_pd(fa1);
+ vFloat r1 = _mm_cvtpd_ps(v3);
+ _mm_storeu_ps(&bar_dr, r1);
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/pr103900.c b/gcc/testsuite/gcc.target/i386/pr103900.c
new file mode 100644
index 0000000..8793b49
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103900.c
@@ -0,0 +1,25 @@
+/* PR target/103900 */
+/* { dg-do compile } */
+/* { dg-options "-O -fno-tree-dce -fno-tree-dse" } */
+
+typedef unsigned char __attribute__((__vector_size__(2))) T;
+typedef unsigned char __attribute__((__vector_size__(32))) U;
+typedef int __attribute__((__vector_size__(64))) V;
+typedef int __attribute__((__vector_size__(32))) W;
+T foo0_v128u8_0;
+U foo0_v256u8_0;
+T foo0_v16u16_0;
+int foo0_v128u64_0, foo0_v512u64_0;
+
+void
+foo0() {
+ V v512u128_0;
+ T v16u8_0;
+ foo0_v128u64_0 += (short)v16u8_0;
+ T v16u8_1 = ~__builtin_shufflevector(foo0_v128u8_0, foo0_v256u8_0, 0, 5);
+ W v256u128_1;
+ V v512u8_r =
+ foo0_v512u64_0 + v512u128_0;
+ (union {U b;}){}.b + (U)v256u128_1;
+ T v16u8_r = v16u8_0 + v16u8_1 + foo0_v16u16_0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103905.c b/gcc/testsuite/gcc.target/i386/pr103905.c
new file mode 100644
index 0000000..aef9c4d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103905.c
@@ -0,0 +1,25 @@
+/* PR target/103905 */
+/* { dg-do run } */
+/* { dg-require-effective-target xop } */
+/* { dg-options "-O3 -mxop" } */
+
+#include "xop-check.h"
+
+char perm[64];
+
+void
+__attribute__((noipa))
+foo (int n)
+{
+ for (int i = 0; i < n; ++i)
+ perm[i] = i;
+}
+
+static void
+xop_test (void)
+{
+ foo (8);
+
+ if (perm[7] != 7)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103908.c b/gcc/testsuite/gcc.target/i386/pr103908.c
new file mode 100644
index 0000000..7c57e1d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103908.c
@@ -0,0 +1,24 @@
+/* PR rtl-optimization/103908 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdisable-tree-cselim -fno-tree-sink" } */
+/* { dg-final { scan-assembler "# insn 1" } } */
+/* { dg-final { scan-assembler "# insn 2" } } */
+
+int a, b;
+
+void
+foo (void)
+{
+ if (a)
+ {
+ b = 1;
+ asm goto ("# insn 1" : : : : lab1);
+ lab1:;
+ }
+ else
+ {
+ b = 1;
+ asm goto ("# insn 2" : : : : lab2);
+ lab2:;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103915.c b/gcc/testsuite/gcc.target/i386/pr103915.c
new file mode 100644
index 0000000..34f1d63
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103915.c
@@ -0,0 +1,11 @@
+/* PR target/103915 */
+/* { dg-do compile } */
+/* { dg-options "-flive-range-shrinkage" } */
+
+char __attribute__((__vector_size__ (2))) data;
+
+void
+foo (void)
+{
+ data = ~data;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-1.c b/gcc/testsuite/gcc.target/i386/pr103973-1.c
new file mode 100644
index 0000000..2857a4f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-1.c
@@ -0,0 +1,98 @@
+/* PR target/103973 */
+/* { dg-do run } */
+/* { dg-options "-O2 -save-temps" } */
+/* { dg-final { scan-assembler-not "'\t\[v\]?ucomisd" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "\t\[v\]?comisd" 4 { target { ! ia32 } } } } */
+
+__attribute__((noipa)) int m1 (void) { return -1; }
+__attribute__((noipa)) int p0 (void) { return 0; }
+__attribute__((noipa)) int p1 (void) { return 1; }
+__attribute__((noipa)) int p2 (void) { return 2; }
+
+__attribute__((noipa)) int
+foo (double a, double b)
+{
+ if (a == b)
+ return 0;
+ if (a < b)
+ return -1;
+ if (a > b)
+ return 1;
+ return 2;
+}
+
+__attribute__((noipa)) int
+bar (double a, double b)
+{
+ if (a == b)
+ return p0 ();
+ if (a < b)
+ return m1 ();
+ if (a > b)
+ return p1 ();
+ return p2 ();
+}
+
+__attribute__((noipa)) int
+baz (double a, double b)
+{
+ if (a == b)
+ return p0 ();
+ if (b < a)
+ return p1 ();
+ if (a < b)
+ return m1 ();
+ return p2 ();
+}
+
+__attribute__((noipa)) int
+qux (double a)
+{
+ if (a != 0.0f)
+ {
+ if (a <= 0.0f)
+ return -1;
+ if (a >= 0.0f)
+ return 1;
+ return 2;
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ double m5 = -5.0f;
+ double p5 = 5.0f;
+ volatile double p0 = 0.0f;
+ double nan = p0 / p0;
+ if (foo (p5, p5) != 0 || foo (m5, m5) != 0)
+ __builtin_abort ();
+ if (foo (m5, p5) != -1 || foo (p5, m5) != 1)
+ __builtin_abort ();
+ if (foo (m5, nan) != 2 || foo (nan, p5) != 2)
+ __builtin_abort ();
+ if (foo (nan, nan) != 2)
+ __builtin_abort ();
+ if (bar (p5, p5) != 0 || bar (m5, m5) != 0)
+ __builtin_abort ();
+ if (bar (m5, p5) != -1 || bar (p5, m5) != 1)
+ __builtin_abort ();
+ if (bar (m5, nan) != 2 || bar (nan, p5) != 2)
+ __builtin_abort ();
+ if (bar (nan, nan) != 2)
+ __builtin_abort ();
+ if (baz (p5, p5) != 0 || baz (m5, m5) != 0)
+ __builtin_abort ();
+ if (baz (m5, p5) != -1 || baz (p5, m5) != 1)
+ __builtin_abort ();
+ if (baz (m5, nan) != 2 || baz (nan, p5) != 2)
+ __builtin_abort ();
+ if (baz (nan, nan) != 2)
+ __builtin_abort ();
+ if (qux (p0) != 0 || qux (nan) != 2)
+ __builtin_abort ();
+ if (qux (m5) != -1 || qux (p5) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-10.c b/gcc/testsuite/gcc.target/i386/pr103973-10.c
new file mode 100644
index 0000000..afca421
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-10.c
@@ -0,0 +1,7 @@
+/* PR target/103973 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -march=i686 -mfpmath=387" } */
+/* { dg-final { scan-assembler-not "'\tfucom" } } */
+/* { dg-final { scan-assembler-times "\tfcom" 4 } } */
+
+#include "pr103973-9.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-11.c b/gcc/testsuite/gcc.target/i386/pr103973-11.c
new file mode 100644
index 0000000..343350c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-11.c
@@ -0,0 +1,8 @@
+/* PR target/103973 */
+/* { dg-do run } */
+/* { dg-options "-O2 -save-temps" } */
+/* { dg-final { scan-assembler-not "\t\[v\]?ucomiss" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "\t\[v\]?comiss" 4 { target { ! ia32 } } } } */
+
+#define double float
+#include "pr103973-9.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-12.c b/gcc/testsuite/gcc.target/i386/pr103973-12.c
new file mode 100644
index 0000000..7990f42
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-12.c
@@ -0,0 +1,8 @@
+/* PR target/103973 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -march=i686 -mfpmath=387" } */
+/* { dg-final { scan-assembler-not "'\tfucom" } } */
+/* { dg-final { scan-assembler-times "\tfcom" 4 } } */
+
+#define double float
+#include "pr103973-9.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-13.c b/gcc/testsuite/gcc.target/i386/pr103973-13.c
new file mode 100644
index 0000000..4c97612
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-13.c
@@ -0,0 +1,76 @@
+/* PR target/103973 */
+/* { dg-do run } */
+/* { dg-options "-O2 -ffast-math -save-temps" } */
+/* { dg-final { scan-assembler-not "'\t\[v\]?ucomisd" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "\t\[v\]?comisd" 4 { target { ! ia32 } } } } */
+
+__attribute__((noipa)) int m1 (void) { return -1; }
+__attribute__((noipa)) int p0 (void) { return 0; }
+__attribute__((noipa)) int p1 (void) { return 1; }
+
+__attribute__((noipa)) int
+foo (double a, double b)
+{
+ if (a == b)
+ return 0;
+ if (a < b)
+ return -1;
+ return 1;
+}
+
+__attribute__((noipa)) int
+bar (double a, double b)
+{
+ if (a == b)
+ return p0 ();
+ if (a < b)
+ return m1 ();
+ return p1 ();
+}
+
+__attribute__((noipa)) int
+baz (double a, double b)
+{
+ if (a == b)
+ return p0 ();
+ if (b < a)
+ return p1 ();
+ return m1 ();
+}
+
+__attribute__((noipa)) int
+qux (double a)
+{
+ if (a != 0.0f)
+ {
+ if (a <= 0.0f)
+ return -1;
+ return 1;
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ double m5 = -5.0f;
+ double p5 = 5.0f;
+ double p0 = 0.0f;
+ if (foo (p5, p5) != 0 || foo (m5, m5) != 0)
+ __builtin_abort ();
+ if (foo (m5, p5) != -1 || foo (p5, m5) != 1)
+ __builtin_abort ();
+ if (bar (p5, p5) != 0 || bar (m5, m5) != 0)
+ __builtin_abort ();
+ if (bar (m5, p5) != -1 || bar (p5, m5) != 1)
+ __builtin_abort ();
+ if (baz (p5, p5) != 0 || baz (m5, m5) != 0)
+ __builtin_abort ();
+ if (baz (m5, p5) != -1 || baz (p5, m5) != 1)
+ __builtin_abort ();
+ if (qux (p0) != 0)
+ __builtin_abort ();
+ if (qux (m5) != -1 || qux (p5) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-14.c b/gcc/testsuite/gcc.target/i386/pr103973-14.c
new file mode 100644
index 0000000..3d1d831
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-14.c
@@ -0,0 +1,7 @@
+/* PR target/103973 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -ffast-math -march=i686 -mfpmath=387" } */
+/* { dg-final { scan-assembler-not "'\tfucom" } } */
+/* { dg-final { scan-assembler-times "\tfcom" 4 } } */
+
+#include "pr103973-13.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-15.c b/gcc/testsuite/gcc.target/i386/pr103973-15.c
new file mode 100644
index 0000000..c455ad7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-15.c
@@ -0,0 +1,8 @@
+/* PR target/103973 */
+/* { dg-do run } */
+/* { dg-options "-O2 -ffast-math -save-temps" } */
+/* { dg-final { scan-assembler-not "'\t\[v\]?ucomiss" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "\t\[v\]?comiss" 4 { target { ! ia32 } } } } */
+
+#define double float
+#include "pr103973-13.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-16.c b/gcc/testsuite/gcc.target/i386/pr103973-16.c
new file mode 100644
index 0000000..9be4e94
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-16.c
@@ -0,0 +1,8 @@
+/* PR target/103973 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -ffast-math -march=i686 -mfpmath=387" } */
+/* { dg-final { scan-assembler-not "'\tfucom" } } */
+/* { dg-final { scan-assembler-times "\tfcom" 4 } } */
+
+#define double float
+#include "pr103973-13.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-17.c b/gcc/testsuite/gcc.target/i386/pr103973-17.c
new file mode 100644
index 0000000..1a14825
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-17.c
@@ -0,0 +1,8 @@
+/* PR target/103973 */
+/* { dg-do run { target large_long_double } } */
+/* { dg-options "-O2 -save-temps" } */
+/* { dg-final { scan-assembler-not "'\tfucom" } } */
+/* { dg-final { scan-assembler-times "\tfcom" 4 } } */
+
+#define double long double
+#include "pr103973-1.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-18.c b/gcc/testsuite/gcc.target/i386/pr103973-18.c
new file mode 100644
index 0000000..d268eaa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-18.c
@@ -0,0 +1,8 @@
+/* PR target/103973 */
+/* { dg-do run { target large_long_double } } */
+/* { dg-options "-O2 -ffast-math -save-temps" } */
+/* { dg-final { scan-assembler-not "'\tfucom" } } */
+/* { dg-final { scan-assembler-times "\tfcom" 4 } } */
+
+#define double long double
+#include "pr103973-5.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-19.c b/gcc/testsuite/gcc.target/i386/pr103973-19.c
new file mode 100644
index 0000000..ad6bddc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-19.c
@@ -0,0 +1,8 @@
+/* PR target/103973 */
+/* { dg-do run { target large_long_double } } */
+/* { dg-options "-O2 -save-temps" } */
+/* { dg-final { scan-assembler-not "'\tfucom" } } */
+/* { dg-final { scan-assembler-times "\tfcom" 4 } } */
+
+#define double long double
+#include "pr103973-9.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-2.c b/gcc/testsuite/gcc.target/i386/pr103973-2.c
new file mode 100644
index 0000000..2bd2c11
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-2.c
@@ -0,0 +1,7 @@
+/* PR target/103973 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -march=i686 -mfpmath=387" } */
+/* { dg-final { scan-assembler-not "'\tfucom" } } */
+/* { dg-final { scan-assembler-times "\tfcom" 4 } } */
+
+#include "pr103973-1.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-20.c b/gcc/testsuite/gcc.target/i386/pr103973-20.c
new file mode 100644
index 0000000..447dac3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-20.c
@@ -0,0 +1,8 @@
+/* PR target/103973 */
+/* { dg-do run { target large_long_double } } */
+/* { dg-options "-O2 -ffast-math -save-temps" } */
+/* { dg-final { scan-assembler-not "'\tfucom" } } */
+/* { dg-final { scan-assembler-times "\tfcom" 4 } } */
+
+#define double long double
+#include "pr103973-13.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-3.c b/gcc/testsuite/gcc.target/i386/pr103973-3.c
new file mode 100644
index 0000000..f7eb887
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-3.c
@@ -0,0 +1,8 @@
+/* PR target/103973 */
+/* { dg-do run } */
+/* { dg-options "-O2 -save-temps" } */
+/* { dg-final { scan-assembler-not "'\t\[v\]?ucomiss" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "\t\[v\]?comiss" 4 { target { ! ia32 } } } } */
+
+#define double float
+#include "pr103973-1.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-4.c b/gcc/testsuite/gcc.target/i386/pr103973-4.c
new file mode 100644
index 0000000..764e2e4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-4.c
@@ -0,0 +1,8 @@
+/* PR target/103973 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -march=i686 -mfpmath=387" } */
+/* { dg-final { scan-assembler-not "'\tfucom" } } */
+/* { dg-final { scan-assembler-times "\tfcom" 4 } } */
+
+#define double float
+#include "pr103973-1.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-5.c b/gcc/testsuite/gcc.target/i386/pr103973-5.c
new file mode 100644
index 0000000..2fa6be2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-5.c
@@ -0,0 +1,85 @@
+/* PR target/103973 */
+/* { dg-do run } */
+/* { dg-options "-O2 -ffast-math -save-temps" } */
+/* { dg-final { scan-assembler-not "'\t\[v\]?ucomisd" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "\t\[v\]?comisd" 4 { target { ! ia32 } } } } */
+
+__attribute__((noipa)) int m1 (void) { return -1; }
+__attribute__((noipa)) int p0 (void) { return 0; }
+__attribute__((noipa)) int p1 (void) { return 1; }
+__attribute__((noipa)) int p2 (void) { return 2; }
+
+__attribute__((noipa)) int
+foo (double a, double b)
+{
+ if (a == b)
+ return 0;
+ if (a < b)
+ return -1;
+ if (a > b)
+ return 1;
+ return 2;
+}
+
+__attribute__((noipa)) int
+bar (double a, double b)
+{
+ if (a == b)
+ return p0 ();
+ if (a < b)
+ return m1 ();
+ if (a > b)
+ return p1 ();
+ return p2 ();
+}
+
+__attribute__((noipa)) int
+baz (double a, double b)
+{
+ if (a == b)
+ return p0 ();
+ if (b < a)
+ return p1 ();
+ if (a < b)
+ return m1 ();
+ return p2 ();
+}
+
+__attribute__((noipa)) int
+qux (double a)
+{
+ if (a != 0.0f)
+ {
+ if (a <= 0.0f)
+ return -1;
+ if (a >= 0.0f)
+ return 1;
+ return 2;
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ double m5 = -5.0f;
+ double p5 = 5.0f;
+ double p0 = 0.0f;
+ if (foo (p5, p5) != 0 || foo (m5, m5) != 0)
+ __builtin_abort ();
+ if (foo (m5, p5) != -1 || foo (p5, m5) != 1)
+ __builtin_abort ();
+ if (bar (p5, p5) != 0 || bar (m5, m5) != 0)
+ __builtin_abort ();
+ if (bar (m5, p5) != -1 || bar (p5, m5) != 1)
+ __builtin_abort ();
+ if (baz (p5, p5) != 0 || baz (m5, m5) != 0)
+ __builtin_abort ();
+ if (baz (m5, p5) != -1 || baz (p5, m5) != 1)
+ __builtin_abort ();
+ if (qux (p0) != 0)
+ __builtin_abort ();
+ if (qux (m5) != -1 || qux (p5) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-6.c b/gcc/testsuite/gcc.target/i386/pr103973-6.c
new file mode 100644
index 0000000..4c14184
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-6.c
@@ -0,0 +1,7 @@
+/* PR target/103973 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -ffast-math -march=i686 -mfpmath=387" } */
+/* { dg-final { scan-assembler-not "'\tfucom" } } */
+/* { dg-final { scan-assembler-times "\tfcom" 4 } } */
+
+#include "pr103973-5.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-7.c b/gcc/testsuite/gcc.target/i386/pr103973-7.c
new file mode 100644
index 0000000..cf3759e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-7.c
@@ -0,0 +1,8 @@
+/* PR target/103973 */
+/* { dg-do run } */
+/* { dg-options "-O2 -ffast-math -save-temps" } */
+/* { dg-final { scan-assembler-not "'\t\[v\]?ucomiss" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "\t\[v\]?comiss" 4 { target { ! ia32 } } } } */
+
+#define double float
+#include "pr103973-5.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-8.c b/gcc/testsuite/gcc.target/i386/pr103973-8.c
new file mode 100644
index 0000000..5f490c8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-8.c
@@ -0,0 +1,8 @@
+/* PR target/103973 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -ffast-math -march=i686 -mfpmath=387" } */
+/* { dg-final { scan-assembler-not "'\tfucom" } } */
+/* { dg-final { scan-assembler-times "\tfcom" 4 } } */
+
+#define double float
+#include "pr103973-5.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr103973-9.c b/gcc/testsuite/gcc.target/i386/pr103973-9.c
new file mode 100644
index 0000000..5c623f5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103973-9.c
@@ -0,0 +1,89 @@
+/* PR target/103973 */
+/* { dg-do run } */
+/* { dg-options "-O2 -save-temps" } */
+/* { dg-final { scan-assembler-not "'\t\[v\]?ucomisd" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "\t\[v\]?comisd" 4 { target { ! ia32 } } } } */
+
+__attribute__((noipa)) int m1 (void) { return -1; }
+__attribute__((noipa)) int p0 (void) { return 0; }
+__attribute__((noipa)) int p1 (void) { return 1; }
+
+__attribute__((noipa)) int
+foo (double a, double b)
+{
+ if (a == b)
+ return 0;
+ if (a < b)
+ return -1;
+ return 1;
+}
+
+__attribute__((noipa)) int
+bar (double a, double b)
+{
+ if (a == b)
+ return p0 ();
+ if (a < b)
+ return m1 ();
+ return p1 ();
+}
+
+__attribute__((noipa)) int
+baz (double a, double b)
+{
+ if (a == b)
+ return p0 ();
+ if (b < a)
+ return p1 ();
+ return m1 ();
+}
+
+__attribute__((noipa)) int
+qux (double a)
+{
+ if (a != 0.0f)
+ {
+ if (a <= 0.0f)
+ return -1;
+ return 1;
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ double m5 = -5.0f;
+ double p5 = 5.0f;
+ volatile double p0 = 0.0f;
+ double nan = p0 / p0;
+ if (foo (p5, p5) != 0 || foo (m5, m5) != 0)
+ __builtin_abort ();
+ if (foo (m5, p5) != -1 || foo (p5, m5) != 1)
+ __builtin_abort ();
+ if (foo (m5, nan) != 1 || foo (nan, p5) != 1)
+ __builtin_abort ();
+ if (foo (nan, nan) != 1)
+ __builtin_abort ();
+ if (bar (p5, p5) != 0 || bar (m5, m5) != 0)
+ __builtin_abort ();
+ if (bar (m5, p5) != -1 || bar (p5, m5) != 1)
+ __builtin_abort ();
+ if (bar (m5, nan) != 1 || bar (nan, p5) != 1)
+ __builtin_abort ();
+ if (bar (nan, nan) != 1)
+ __builtin_abort ();
+ if (baz (p5, p5) != 0 || baz (m5, m5) != 0)
+ __builtin_abort ();
+ if (baz (m5, p5) != -1 || baz (p5, m5) != 1)
+ __builtin_abort ();
+ if (baz (m5, nan) != -1 || baz (nan, p5) != -1)
+ __builtin_abort ();
+ if (baz (nan, nan) != -1)
+ __builtin_abort ();
+ if (qux (p0) != 0 || qux (nan) != 1)
+ __builtin_abort ();
+ if (qux (m5) != -1 || qux (p5) != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104001.c b/gcc/testsuite/gcc.target/i386/pr104001.c
new file mode 100644
index 0000000..4efb593
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104001.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not "kandn" } } */
+/* { dg-final { scan-assembler "andn" } } */
+
+int b, c, d;
+int r;
+
+void
+__attribute__((target("bmi")))
+foo ()
+{
+ r = ((b & ~d) | (c & d));
+}
+
+void
+__attribute__((target("avx512bw")))
+bar ()
+{
+ r = ((b & ~d) | (c & d));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104059.c b/gcc/testsuite/gcc.target/i386/pr104059.c
new file mode 100644
index 0000000..4815fa3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104059.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx2 -O2 -fdump-rtl-cprop_hardreg-details" } */
+/* { dg-final { scan-rtl-dump-not {replaced reg [0-9]* with [0-9]*} "cprop_hardreg" } } */
+
+#include<stdint.h>
+int test (uint8_t *p, uint32_t t[1][1], int n) {
+
+ int sum = 0;
+ uint32_t a0;
+ for (int i = 0; i < 4; i++, p++)
+ t[i][0] = p[0];
+
+ for (int i = 0; i < 4; i++) {
+ {
+ int t0 = t[0][i] + t[0][i];
+ a0 = t0;
+ };
+ sum += a0;
+ }
+ return (((uint16_t)sum) + ((uint32_t)sum >> 16)) >> 1;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/pr104104.c b/gcc/testsuite/gcc.target/i386/pr104104.c
new file mode 100644
index 0000000..1653cae
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104104.c
@@ -0,0 +1,10 @@
+/* PR target/104104 */
+/* { dg-do assemble { target vect_simd_clones } } */
+/* { dg-require-effective-target masm_intel } */
+/* { dg-options "-march=alderlake -masm=intel -O1 -fallow-store-data-races -funroll-all-loops" } */
+
+__attribute__ ((simd)) short int
+foo (void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104188.c b/gcc/testsuite/gcc.target/i386/pr104188.c
new file mode 100644
index 0000000..3ddd3bc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104188.c
@@ -0,0 +1,71 @@
+/* { dg-do run { target avx512f } } */
+/* { dg-require-effective-target sse2_runtime } */
+/* { dg-options "-O2 -msse2 -mfpmath=sse" } */
+
+#include <x86intrin.h>
+
+union U {
+ float m[4][4];
+ __m128 r[4];
+ __m512 s;
+};
+
+__attribute__((noipa, target("avx512f")))
+void
+foo (union U *x, union U *a, union U *b)
+{
+ __m512 c = _mm512_loadu_ps (&a->s);
+ __m512 d = _mm512_broadcast_f32x4 (b->r[0]);
+ __m512 e = _mm512_broadcast_f32x4 (b->r[1]);
+ __m512 f = _mm512_broadcast_f32x4 (b->r[2]);
+ __m512 g = _mm512_broadcast_f32x4 (b->r[3]);
+ __m512 h = _mm512_mul_ps (_mm512_permute_ps (c, 0x00), d);
+ h = _mm512_fmadd_ps (_mm512_permute_ps (c, 0x55), e, h);
+ h = _mm512_fmadd_ps (_mm512_permute_ps (c, 0xaa), f, h);
+ h = _mm512_fmadd_ps (_mm512_permute_ps (c, 0xff), g, h);
+ _mm512_storeu_ps (&x->s, h);
+}
+
+__attribute__((noipa, target("avx512f")))
+void
+do_test (void)
+{
+ union U a = { .m = { { 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 } } };
+ union U b = { .m = { { 17.0f, 18.0f, 19.0f, 20.0f },
+ { 21.0f, 22.0f, 23.0f, 24.0f },
+ { 25.0f, 26.0f, 27.0f, 28.0f },
+ { 29.0f, 30.0f, 31.0f, 32.0f } } };
+ union U c;
+ foo (&c, &a, &b);
+ if (c.m[0][0] != 250.0f
+ || c.m[0][1] != 260.0f
+ || c.m[0][2] != 270.0f
+ || c.m[0][3] != 280.0f)
+ __builtin_abort ();
+ if (c.m[1][0] != 618.0f
+ || c.m[1][1] != 644.0f
+ || c.m[1][2] != 670.0f
+ || c.m[1][3] != 696.0f)
+ __builtin_abort ();
+ if (c.m[2][0] != 986.0f
+ || c.m[2][1] != 1028.0f
+ || c.m[2][2] != 1070.0f
+ || c.m[2][3] != 1112.0f)
+ __builtin_abort ();
+ if (c.m[3][0] != 1354.0f
+ || c.m[3][1] != 1412.0f
+ || c.m[3][2] != 1470.0f
+ || c.m[3][3] != 1528.0f)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ if (__builtin_cpu_supports ("avx512f"))
+ do_test ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104307.c b/gcc/testsuite/gcc.target/i386/pr104307.c
new file mode 100644
index 0000000..1301539
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104307.c
@@ -0,0 +1,6 @@
+/* PR middle-end/104307 */
+/* { dg-do compile } */
+/* { dg-require-effective-target int128 } */
+/* { dg-options "-O2 -mavx512f -fcompare-debug " } */
+
+#include "pr78669.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr104362.c b/gcc/testsuite/gcc.target/i386/pr104362.c
new file mode 100644
index 0000000..5e5422e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104362.c
@@ -0,0 +1,24 @@
+/* PR target/104362 */
+/* { dg-do compile } */
+/* { dg-options "-mavx512f" } */
+
+struct _Unwind_Context
+{
+ void *ra;
+ char array[48];
+};
+
+extern long uw_install_context_1 (struct _Unwind_Context *);
+
+void
+_Unwind_RaiseException (void)
+{
+ struct _Unwind_Context this_context, cur_context;
+ __builtin_memset(&this_context, 55, sizeof(this_context));
+ long offset = uw_install_context_1 (&this_context);
+ __builtin_memcpy (&this_context, &cur_context,
+ sizeof (struct _Unwind_Context));
+ void *handler = __builtin_frob_return_addr ((&cur_context)->ra);
+ uw_install_context_1 (&cur_context);
+ __builtin_eh_return (offset, handler);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104441-1a.c b/gcc/testsuite/gcc.target/i386/pr104441-1a.c
new file mode 100644
index 0000000..83734f7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104441-1a.c
@@ -0,0 +1,57 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=x86-64 -mtune=skylake -Wno-attributes" } */
+
+#include <x86intrin.h>
+#include <stdint.h>
+
+__attribute__((always_inline, target("avx2")))
+static __m256i
+load8bit_4x4_avx2(const uint8_t *const src, const uint32_t stride)
+{
+ __m128i src01, src23;
+ src01 = _mm_cvtsi32_si128(*(int32_t*)(src + 0 * stride));
+ src23 = _mm_insert_epi32(src23, *(int32_t *)(src + 3 * stride), 1);
+ return _mm256_setr_m128i(src01, src23);
+}
+
+__attribute__ ((noinline, noipa, target("avx2")))
+uint32_t
+compute4x_m_sad_avx2_intrin(uint8_t *src, uint32_t src_stride,
+ uint8_t *ref, uint32_t ref_stride,
+ uint32_t height)
+{
+ __m128i xmm0;
+ __m256i ymm = _mm256_setzero_si256();
+ uint32_t y;
+
+ for (y = 0; y < height; y += 4) {
+ const __m256i src0123 = load8bit_4x4_avx2(src, src_stride);
+ const __m256i ref0123 = load8bit_4x4_avx2(ref, ref_stride);
+ ymm = _mm256_add_epi32(ymm, _mm256_sad_epu8(src0123, ref0123));
+ src += src_stride << 2;
+ ref += ref_stride << 2;
+ }
+
+ xmm0 = _mm_add_epi32(_mm256_castsi256_si128(ymm),
+ _mm256_extracti128_si256(ymm, 1));
+
+ return (uint32_t)_mm_cvtsi128_si32(xmm0);
+}
+
+/* Expect assembly like:
+
+ vextracti128 $0x1, %ymm3, %xmm3
+ vpaddd %xmm3, %xmm0, %xmm0
+ vmovd %xmm0, %eax
+ vzeroupper
+
+rather than:
+
+ vzeroupper
+ vextracti128 $0x1, %ymm3, %xmm3
+ vpaddd %xmm3, %xmm0, %xmm0
+ vmovd %xmm0, %eax
+
+ */
+
+/* { dg-final { scan-assembler "\[ \t\]+vextracti128\[ \t\]+\[^\n\]+\n\[ \t\]+vpaddd\[ \t\]+\[^\n\]+\n\[ \t\]+vmovd\[ \t\]+\[^\n\]+\n\[ \t\]+vzeroupper" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr104441-1b.c b/gcc/testsuite/gcc.target/i386/pr104441-1b.c
new file mode 100644
index 0000000..325af04
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104441-1b.c
@@ -0,0 +1,32 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -march=x86-64 -mvzeroupper -Wno-attributes" } */
+
+#include "pr104441-1a.c"
+
+#define ARRAY_SIZE 255
+
+__attribute__ ((noinline, noipa))
+static void
+do_test (void)
+{
+ uint8_t src[ARRAY_SIZE];
+ uint8_t ref[ARRAY_SIZE];
+ uint32_t x;
+ uint32_t i;
+ for (i = 0; i < ARRAY_SIZE; i++)
+ {
+ src[i] = i;
+ ref[i] = i;
+ }
+ x = compute4x_m_sad_avx2_intrin(src, 64 >> 2, ref, 64, 4);
+ if (x != 0x240)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ if (__builtin_cpu_supports ("avx2"))
+ do_test ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104446.c b/gcc/testsuite/gcc.target/i386/pr104446.c
new file mode 100644
index 0000000..510cb69
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104446.c
@@ -0,0 +1,15 @@
+/* PR middle-end/104446 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -mrtd" } */
+
+register volatile int a __asm__("%esp");
+void foo (void *);
+void bar (void *);
+
+void
+baz (void)
+{
+ foo (__builtin_return_address (0));
+ a = 0;
+ bar (__builtin_return_address (0));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104451.c b/gcc/testsuite/gcc.target/i386/pr104451.c
new file mode 100644
index 0000000..8b251cc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104451.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx2 -mxop -O" } */
+
+typedef char __attribute__((__vector_size__ (16))) V;
+typedef unsigned char __attribute__((__vector_size__ (16))) UV;
+V v;
+UV uv;
+
+V
+foo (long c)
+{
+ return v << c;
+}
+
+V
+foo1 (long c)
+{
+ return v >> c;
+}
+
+UV
+foo2 (unsigned long uc)
+{
+ return uv >> uc;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104453.c b/gcc/testsuite/gcc.target/i386/pr104453.c
new file mode 100644
index 0000000..325cedf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104453.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f" } */
+
+typedef short __attribute__((__vector_size__ (32))) V;
+V g;
+
+void
+foo (void)
+{
+ __builtin_ia32_psrawi256 (g, 0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104458.c b/gcc/testsuite/gcc.target/i386/pr104458.c
new file mode 100644
index 0000000..db5999d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104458.c
@@ -0,0 +1,13 @@
+/* PR target/104458 */
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O1 -m8bit-idiv" } */
+
+typedef float __attribute__((__vector_size__ (8))) F;
+
+int i;
+
+void
+foo (F f)
+{
+ i += i % (long long) f;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104462.c b/gcc/testsuite/gcc.target/i386/pr104462.c
new file mode 100644
index 0000000..7a5ee64
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104462.c
@@ -0,0 +1,13 @@
+/* PR target/104462 */
+/* { dg-do compile } */
+/* { dg-options "-mavx512fp16 -mno-xsave" } */
+
+typedef _Float16 __attribute__((__vector_size__ (8))) F;
+
+F f;
+
+void
+foo (void)
+{
+ f *= -f;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104469.c b/gcc/testsuite/gcc.target/i386/pr104469.c
new file mode 100644
index 0000000..39cc31f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104469.c
@@ -0,0 +1,12 @@
+/* PR target/104469 */
+/* { dg-do compile } */
+/* { dg-options "-mavx512f" } */
+
+typedef double __attribute__((__vector_size__ (64))) F;
+typedef int __attribute__((__vector_size__ (32))) V;
+
+F
+foo (V v)
+{
+ return __builtin_convertvector (v, F);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104479.c b/gcc/testsuite/gcc.target/i386/pr104479.c
new file mode 100644
index 0000000..4ca4c48
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104479.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-march=icelake-server -Ofast -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-not "\.COND_SHR" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "\.COND_FMA" "optimized" } } */
+
+void
+cond_shr (unsigned int* __restrict dst,
+ unsigned int* __restrict src,
+ unsigned int* __restrict y,
+ int i_width)
+{
+ for(int x = 0; x < i_width; x++)
+ {
+ unsigned int temp = src[x] >> 3;
+ dst[x] = temp > 255 ? temp : y[x];
+ }
+}
+
+
+void
+cond_fma (float* __restrict dst,
+ float* __restrict src1,
+ float* __restrict src2,
+ float* __restrict src3,
+ unsigned int* __restrict y,
+ int i_width)
+{
+ for(int x = 0; x < i_width; x++)
+ {
+ float temp = __builtin_fmaf (src1[x], src2[x], src3[x]);
+ dst[x] = temp > 0.0f ? temp : y[x];
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr104496.c b/gcc/testsuite/gcc.target/i386/pr104496.c
new file mode 100644
index 0000000..62d3bc6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr104496.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O -mgeneral-regs-only -msse" } */
+
+typedef int __attribute__((__vector_size__ (8))) V;
+V a, b;
+int c;
+
+void
+foo (void)
+{
+ b = 0 != a | b << c;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr32803.c b/gcc/testsuite/gcc.target/i386/pr32803.c
new file mode 100644
index 0000000..f26f07a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr32803.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-Oz" } */
+
+int foo()
+{
+ return 25;
+}
+
+/* { dg-final { scan-assembler "push" } } */
+/* { dg-final { scan-assembler "pop" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-10a.c b/gcc/testsuite/gcc.target/i386/pr35513-10a.c
new file mode 100644
index 0000000..d7b5c98
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-10a.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fpic -mno-direct-extern-access" } */
+
+/* Weak common symbol with -fpic. */
+__attribute__((weak, visibility("protected")))
+int xxx;
+
+int
+foo ()
+{
+ return xxx;
+}
+
+/* { dg-final { scan-assembler "xxx\\(%rip\\)" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "xxx@GOTOFF" { target ia32 } } } */
+/* { dg-final { scan-assembler-not "xxx@GOT\\(" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-10b.c b/gcc/testsuite/gcc.target/i386/pr35513-10b.c
new file mode 100644
index 0000000..a40692e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-10b.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fpic -mdirect-extern-access" } */
+
+/* Weak common symbol with -fpic. */
+__attribute__((weak, visibility("protected"),nodirect_extern_access))
+int xxx;
+
+int
+foo ()
+{
+ return xxx;
+}
+
+/* { dg-final { scan-assembler "xxx\\(%rip\\)" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "xxx@GOTOFF" { target ia32 } } } */
+/* { dg-final { scan-assembler-not "xxx@GOT\\(" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-11a.c b/gcc/testsuite/gcc.target/i386/pr35513-11a.c
new file mode 100644
index 0000000..5489f1e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-11a.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fpic -mno-direct-extern-access" } */
+
+/* Initialized symbol with -fpic. */
+__attribute__((visibility("protected")))
+int xxx = -1;
+
+int
+foo ()
+{
+ return xxx;
+}
+
+/* { dg-final { scan-assembler "xxx\\(%rip\\)" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "xxx@GOTOFF" { target ia32 } } } */
+/* { dg-final { scan-assembler-not "xxx@GOT\\(" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-11b.c b/gcc/testsuite/gcc.target/i386/pr35513-11b.c
new file mode 100644
index 0000000..2704900
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-11b.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fpic -mdirect-extern-access" } */
+
+/* Initialized symbol with -fpic. */
+__attribute__((visibility("protected"), nodirect_extern_access))
+int xxx = -1;
+
+int
+foo ()
+{
+ return xxx;
+}
+
+/* { dg-final { scan-assembler "xxx\\(%rip\\)" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "xxx@GOTOFF" { target ia32 } } } */
+/* { dg-final { scan-assembler-not "xxx@GOT\\(" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-12a.c b/gcc/testsuite/gcc.target/i386/pr35513-12a.c
new file mode 100644
index 0000000..8b3123f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-12a.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fpic -mno-direct-extern-access" } */
+
+/* Weak initialized symbol with -fpic. */
+__attribute__((weak, visibility("protected")))
+int xxx = -1;
+
+int
+foo ()
+{
+ return xxx;
+}
+
+/* { dg-final { scan-assembler "xxx\\(%rip\\)" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "xxx@GOTOFF" { target ia32 } } } */
+/* { dg-final { scan-assembler-not "xxx@GOT\\(" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-12b.c b/gcc/testsuite/gcc.target/i386/pr35513-12b.c
new file mode 100644
index 0000000..a1b6b9e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-12b.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fpic -mdirect-extern-access" } */
+
+/* Weak initialized symbol with -fpic. */
+__attribute__((weak, visibility("protected"), nodirect_extern_access))
+int xxx = -1;
+
+int
+foo ()
+{
+ return xxx;
+}
+
+/* { dg-final { scan-assembler "xxx\\(%rip\\)" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "xxx@GOTOFF" { target ia32 } } } */
+/* { dg-final { scan-assembler-not "xxx@GOT\\(" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-1a.c b/gcc/testsuite/gcc.target/i386/pr35513-1a.c
new file mode 100644
index 0000000..9725424
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-1a.c
@@ -0,0 +1,19 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fno-pic -mno-direct-extern-access" } */
+
+extern void bar (void);
+extern void *p;
+
+void
+foo (void)
+{
+ p = &bar;
+}
+
+/* { dg-final { scan-assembler "mov\(l|q\)\[ \t\]*bar@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "movl\[ \t\]*bar@GOT," { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-1b.c b/gcc/testsuite/gcc.target/i386/pr35513-1b.c
new file mode 100644
index 0000000..54a579a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-1b.c
@@ -0,0 +1,19 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fno-pic -mdirect-extern-access" } */
+
+extern void bar (void) __attribute__ ((nodirect_extern_access));
+extern void *p;
+
+void
+foo (void)
+{
+ p = &bar;
+}
+
+/* { dg-final { scan-assembler "mov\(l|q\)\[ \t\]*bar@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "movl\[ \t\]*bar@GOT," { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-2a.c b/gcc/testsuite/gcc.target/i386/pr35513-2a.c
new file mode 100644
index 0000000..74fa8fc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-2a.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fno-pic -mno-direct-extern-access" } */
+
+extern int bar;
+
+int
+foo (void)
+{
+ return bar;
+}
+
+/* { dg-final { scan-assembler "mov\(l|q\)\[ \t\]*bar@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "movl\[ \t\]*bar@GOT," { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-2b.c b/gcc/testsuite/gcc.target/i386/pr35513-2b.c
new file mode 100644
index 0000000..ae2edff8d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-2b.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fno-pic -mdirect-extern-access" } */
+
+extern int bar __attribute__ ((nodirect_extern_access));
+
+int
+foo (void)
+{
+ return bar;
+}
+
+/* { dg-final { scan-assembler "mov\(l|q\)\[ \t\]*bar@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "movl\[ \t\]*bar@GOT," { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-3a.c b/gcc/testsuite/gcc.target/i386/pr35513-3a.c
new file mode 100644
index 0000000..4ca4332
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-3a.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fpie -mno-direct-extern-access" } */
+
+extern int bar;
+
+int
+foo (void)
+{
+ return bar;
+}
+
+/* { dg-final { scan-assembler "mov\(l|q\)\[ \t\]*bar@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "movl\[ \t\]*bar@GOT" { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-3b.c b/gcc/testsuite/gcc.target/i386/pr35513-3b.c
new file mode 100644
index 0000000..c388803
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-3b.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fpie -mdirect-extern-access" } */
+
+extern int bar __attribute__ ((nodirect_extern_access));
+
+int
+foo (void)
+{
+ return bar;
+}
+
+/* { dg-final { scan-assembler "mov\(l|q\)\[ \t\]*bar@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "movl\[ \t\]*bar@GOT" { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-4a.c b/gcc/testsuite/gcc.target/i386/pr35513-4a.c
new file mode 100644
index 0000000..9c3a199
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-4a.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fplt -fno-pic -mno-direct-extern-access" } */
+
+extern void foo (void);
+
+int
+bar (void)
+{
+ foo ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler "call\[ \t\]*foo" } } */
+/* { dg-final { scan-assembler-not "foo@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "foo@GOT" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-4b.c b/gcc/testsuite/gcc.target/i386/pr35513-4b.c
new file mode 100644
index 0000000..e1a5078
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-4b.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fplt -fno-pic -mdirect-extern-access" } */
+
+extern void foo (void) __attribute__ ((nodirect_extern_access));
+
+int
+bar (void)
+{
+ foo ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler "call\[ \t\]*foo" } } */
+/* { dg-final { scan-assembler-not "foo@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "foo@GOT" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-5a.c b/gcc/testsuite/gcc.target/i386/pr35513-5a.c
new file mode 100644
index 0000000..4d2e173
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-5a.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fplt -fpic -mno-direct-extern-access" } */
+
+extern void foo (void);
+
+int
+bar (void)
+{
+ foo ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler "call\[ \t\]*foo@PLT" } } */
+/* { dg-final { scan-assembler-not "foo@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "foo@GOT" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-5b.c b/gcc/testsuite/gcc.target/i386/pr35513-5b.c
new file mode 100644
index 0000000..81e98ed
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-5b.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fplt -fpic -mdirect-extern-access" } */
+
+extern void foo (void) __attribute__ ((nodirect_extern_access));
+
+int
+bar (void)
+{
+ foo ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler "call\[ \t\]*foo@PLT" } } */
+/* { dg-final { scan-assembler-not "foo@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "foo@GOT" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-6a.c b/gcc/testsuite/gcc.target/i386/pr35513-6a.c
new file mode 100644
index 0000000..ece878e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-6a.c
@@ -0,0 +1,17 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fplt -fno-pic -mno-direct-extern-access" } */
+
+extern void foo (void);
+
+void
+bar (void)
+{
+ foo ();
+}
+
+/* { dg-final { scan-assembler "jmp\[ \t\]*foo" } } */
+/* { dg-final { scan-assembler-not "foo@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "foo@GOT" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-6b.c b/gcc/testsuite/gcc.target/i386/pr35513-6b.c
new file mode 100644
index 0000000..3f679de
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-6b.c
@@ -0,0 +1,17 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fplt -fno-pic -mdirect-extern-access" } */
+
+extern void foo (void) __attribute__ ((nodirect_extern_access));
+
+void
+bar (void)
+{
+ foo ();
+}
+
+/* { dg-final { scan-assembler "jmp\[ \t\]*foo" } } */
+/* { dg-final { scan-assembler-not "foo@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "foo@GOT" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-7a.c b/gcc/testsuite/gcc.target/i386/pr35513-7a.c
new file mode 100644
index 0000000..1de014d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-7a.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fplt -fpic -mno-direct-extern-access" } */
+
+extern void foo (void);
+
+void
+bar (void)
+{
+ foo ();
+}
+
+/* { dg-final { scan-assembler "jmp\[ \t\]*foo@PLT" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "call\[ \t\]*foo@PLT" { target ia32 } } } */
+/* { dg-final { scan-assembler-not "foo@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "foo@GOT" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-7b.c b/gcc/testsuite/gcc.target/i386/pr35513-7b.c
new file mode 100644
index 0000000..984e2dc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-7b.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fplt -fpic -mdirect-extern-access" } */
+
+extern void foo (void) __attribute__ ((nodirect_extern_access));
+
+void
+bar (void)
+{
+ foo ();
+}
+
+/* { dg-final { scan-assembler "jmp\[ \t\]*foo@PLT" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "call\[ \t\]*foo@PLT" { target ia32 } } } */
+/* { dg-final { scan-assembler-not "foo@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "foo@GOT" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-8.c b/gcc/testsuite/gcc.target/i386/pr35513-8.c
new file mode 100644
index 0000000..7ba67de
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-8.c
@@ -0,0 +1,44 @@
+/* { dg-do assemble { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-mx32 -O2 -fno-pic -fexceptions -fasynchronous-unwind-tables -mno-direct-extern-access" } */
+
+extern int foo (int);
+extern void exit (int __status) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));
+struct __pthread_cleanup_frame
+{
+ void (*__cancel_routine) (void *);
+ void *__cancel_arg;
+ int __do_it;
+ int __cancel_type;
+};
+extern __inline void
+__pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
+{
+ if (__frame->__do_it)
+ __frame->__cancel_routine (__frame->__cancel_arg);
+}
+static int cl_called;
+
+static void
+cl (void *arg)
+{
+ ++cl_called;
+}
+
+
+void *
+tf_usleep (void *arg)
+{
+
+ do { struct __pthread_cleanup_frame __clframe __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) = { .__cancel_routine = (cl), .__cancel_arg = (
+ ((void *)0)), .__do_it = 1 };;
+
+ foo (arg == ((void *)0) ? (0x7fffffffL * 2UL + 1UL) : 0);
+
+ __clframe.__do_it = (0); } while (0);
+
+ exit (1);
+}
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-9a.c b/gcc/testsuite/gcc.target/i386/pr35513-9a.c
new file mode 100644
index 0000000..533f1d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-9a.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fpic -mno-direct-extern-access" } */
+
+/* Common symbol with -fpic. */
+__attribute__((visibility("protected")))
+int xxx;
+
+int
+foo ()
+{
+ return xxx;
+}
+
+/* { dg-final { scan-assembler "xxx\\(%rip\\)" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "xxx@GOTOFF" { target ia32 } } } */
+/* { dg-final { scan-assembler-not "xxx@GOT\\(" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr35513-9b.c b/gcc/testsuite/gcc.target/i386/pr35513-9b.c
new file mode 100644
index 0000000..b6c66f4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35513-9b.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fpic -mdirect-extern-access" } */
+
+/* Common symbol with -fpic. */
+__attribute__((visibility("protected"), nodirect_extern_access))
+int xxx;
+
+int
+foo ()
+{
+ return xxx;
+}
+
+/* { dg-final { scan-assembler "xxx\\(%rip\\)" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "xxx@GOTOFF" { target ia32 } } } */
+/* { dg-final { scan-assembler-not "xxx@GOT\\(" { target ia32 } } } */
+/* { dg-final { scan-assembler "\.section\[ \t]+.note.gnu.property," } } */
+/* { dg-final { scan-assembler "\.long\[ \t]+0xb0008000" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr53652-1.c b/gcc/testsuite/gcc.target/i386/pr53652-1.c
new file mode 100644
index 0000000..bd07ee2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr53652-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse2" } */
+/* { dg-final { scan-assembler-times "pandn\[ \\t\]" 2 } } */
+/* { dg-final { scan-assembler-not "vpternlogq\[ \\t\]" } } */
+
+typedef unsigned long long vec __attribute__((vector_size (16)));
+vec g;
+vec f1 (vec a, vec b)
+{
+ return ~a&b;
+}
+vec f2 (vec a, vec b)
+{
+ return ~g&b;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/pr64291-1.c b/gcc/testsuite/gcc.target/i386/pr64291-1.c
index 1d3a380..85f1e04 100644
--- a/gcc/testsuite/gcc.target/i386/pr64291-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr64291-1.c
@@ -24,7 +24,7 @@ int main ()
f (n);
h (d);
qp = (unsigned long*)__builtin_alloca(4099*8) + 1;
- dnp = (unsigned long*)__builtin_alloca (2049*8);
+ dnp = (unsigned long*)__builtin_alloca (2049*8) + 1;
alloc = 1;
for (test = 0; test < 1; test++)
{
diff --git a/gcc/testsuite/gcc.target/i386/pr79793-1.c b/gcc/testsuite/gcc.target/i386/pr79793-1.c
index 1cc67a8..102d63a 100644
--- a/gcc/testsuite/gcc.target/i386/pr79793-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr79793-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
-/* { dg-options "-O2 -mgeneral-regs-only -mtune=generic" } */
+/* { dg-options "-O2 -mgeneral-regs-only -mtune=generic -fno-stack-protector" } */
void
__attribute__ ((interrupt))
diff --git a/gcc/testsuite/gcc.target/i386/pr79793-2.c b/gcc/testsuite/gcc.target/i386/pr79793-2.c
index e1e6463..30f22be 100644
--- a/gcc/testsuite/gcc.target/i386/pr79793-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr79793-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
-/* { dg-options "-O2 -mgeneral-regs-only -mtune=generic" } */
+/* { dg-options "-O2 -mgeneral-regs-only -mtune=generic -fno-stack-protector" } */
typedef unsigned int uword_t __attribute__ ((mode (__word__)));
diff --git a/gcc/testsuite/gcc.target/i386/pr83782-1.c b/gcc/testsuite/gcc.target/i386/pr83782-1.c
new file mode 100644
index 0000000..ce97b12
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr83782-1.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O2 -fpic" } */
+
+static void
+my_foo (void)
+{
+}
+
+static void (*resolve_foo (void)) (void)
+{
+ return my_foo;
+}
+
+extern void foo (void) __attribute__((ifunc("resolve_foo"), visibility("hidden")));
+
+void *
+bar(void)
+{
+ return foo;
+}
+
+/* { dg-final { scan-assembler {leal[ \t]foo@GOTOFF\(%[^,]*\),[ \t]%eax} { target ia32 } } } */
+/* { dg-final { scan-assembler {lea(?:l|q)[ \t]foo\(%rip\),[ \t]%(?:e|r)ax} { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "foo@GOT\\\(" { target ia32 } } } */
+/* { dg-final { scan-assembler-not "foo@GOTPCREL\\\(" { target { ! ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr83782-2.c b/gcc/testsuite/gcc.target/i386/pr83782-2.c
new file mode 100644
index 0000000..e25d258
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr83782-2.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O2 -fpic" } */
+
+static void
+my_foo (void)
+{
+}
+
+static void (*resolve_foo (void)) (void)
+{
+ return my_foo;
+}
+
+static void foo (void) __attribute__((ifunc("resolve_foo")));
+
+void *
+bar(void)
+{
+ return foo;
+}
+
+/* { dg-final { scan-assembler {leal[ \t]foo@GOTOFF\(%[^,]*\),[ \t]%eax} { target ia32 } } } */
+/* { dg-final { scan-assembler {lea(?:l|q)[ \t]foo\(%rip\),[ \t]%(?:e|r)ax} { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "foo@GOT\\\(" { target ia32 } } } */
+/* { dg-final { scan-assembler-not "foo@GOTPCREL\\\(" { target { ! ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr87007-4.c b/gcc/testsuite/gcc.target/i386/pr87007-4.c
index 9c4b800..e91bdcb 100644
--- a/gcc/testsuite/gcc.target/i386/pr87007-4.c
+++ b/gcc/testsuite/gcc.target/i386/pr87007-4.c
@@ -15,4 +15,4 @@ foo (int n, int k)
d1 = ceil (d3);
}
-/* { dg-final { scan-assembler-times "vxorps\[^\n\r\]*xmm\[0-9\]" 0 } } */
+/* { dg-final { scan-assembler-times "vxorps\[^\n\r\]*xmm\[0-9\]" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr87007-5.c b/gcc/testsuite/gcc.target/i386/pr87007-5.c
index e4d956a..20d13cf6 100644
--- a/gcc/testsuite/gcc.target/i386/pr87007-5.c
+++ b/gcc/testsuite/gcc.target/i386/pr87007-5.c
@@ -15,4 +15,4 @@ foo (int n, int k)
d1 = sqrt (d3);
}
-/* { dg-final { scan-assembler-times "vxorps\[^\n\r\]*xmm\[0-9\]" 0 } } */
+/* { dg-final { scan-assembler-times "vxorps\[^\n\r\]*xmm\[0-9\]" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr89261.c b/gcc/testsuite/gcc.target/i386/pr89261.c
index c5c4273..b599d49 100644
--- a/gcc/testsuite/gcc.target/i386/pr89261.c
+++ b/gcc/testsuite/gcc.target/i386/pr89261.c
@@ -5,6 +5,7 @@
typedef double __v2df __attribute__ ((vector_size (16), aligned (1 << 28)));
__v2df foo = { 1.0, 2.0 };
-/* { dg-error {alignment of 'foo' is greater than maximum object file alignment 32768} "" { target *-*-darwin* } .-1 } */
+/* { dg-error {alignment of 'foo' is greater than maximum object file alignment 32768} "" { target { *-*-darwin[89]* *-*-darwin10* } } .-1 } */
/* { dg-final { scan-assembler "\.align\[ \t]+268435456" { target { ! *-*-darwin* } } } } */
+/* { dg-final { scan-assembler "\.align\[ \t]+28" { target { *-*-darwin1[1-9]* *-*-darwin2* } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr90773-21.c b/gcc/testsuite/gcc.target/i386/pr90773-21.c
index 5bbb387..0d620ff 100644
--- a/gcc/testsuite/gcc.target/i386/pr90773-21.c
+++ b/gcc/testsuite/gcc.target/i386/pr90773-21.c
@@ -10,4 +10,4 @@ foo (int c)
}
/* { dg-final { scan-assembler-times "vmovdqu\[\\t \]%ymm\[0-9\]+, \\(%\[\^,\]+\\)" 1 } } */
-/* { dg-final { scan-assembler-times "movw\[\\t \]%.*, 32\\(%\[\^,\]+\\)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:movw|pextrw)\[\\t \].*, 32\\(%\[\^,\]+\\)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr90773-23.c b/gcc/testsuite/gcc.target/i386/pr90773-23.c
index ca4a86f..b7369e8 100644
--- a/gcc/testsuite/gcc.target/i386/pr90773-23.c
+++ b/gcc/testsuite/gcc.target/i386/pr90773-23.c
@@ -10,4 +10,4 @@ foo (void)
}
/* { dg-final { scan-assembler-times "vmovdqu\[\\t \]%ymm\[0-9\]+, \\(%\[\^,\]+\\)" 1 } } */
-/* { dg-final { scan-assembler-times "movw\[\\t \]+.+, 32\\(%\[\^,\]+\\)" 1 } } */
+/* { dg-final { scan-assembler-times "(?:movw|pextrw)\[\\t \]+.+, 32\\(%\[\^,\]+\\)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c b/gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c
index ae6959e..d712922 100644
--- a/gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c
+++ b/gcc/testsuite/gcc.target/i386/pr92658-avx512vl.c
@@ -123,7 +123,7 @@ truncdb_128 (v16qi * dst, v4si * __restrict src)
/* { dg-final { scan-assembler-times "vpmovqd" 2 } } */
/* { dg-final { scan-assembler-times "vpmovqw" 2 } } */
-/* { dg-final { scan-assembler-times "vpmovqb\[ \t]*%ymm" 1 } } */
-/* { dg-final { scan-assembler-times "vpmovqb\[ \t]*%xmm" 1 { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-times "vpmovqb\[ \t]*%ymm" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovqb\[ \t]*%xmm" 1 } } */
/* { dg-final { scan-assembler-times "vpmovdw" 2 } } */
/* { dg-final { scan-assembler-times "vpmovdb" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr92658-sse4-2.c b/gcc/testsuite/gcc.target/i386/pr92658-sse4-2.c
index a1cf9e7..4a76a7d 100644
--- a/gcc/testsuite/gcc.target/i386/pr92658-sse4-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr92658-sse4-2.c
@@ -81,7 +81,7 @@ bar_s8_s64 (v2di * dst, v16qi src)
dst[0] = *(v2di *) tem;
}
-/* { dg-final { scan-assembler-times "pmovsxbq" 2 { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-times "pmovsxbq" 2 } } */
void
foo_s16_s32 (v4si * dst, v8hi * __restrict src)
diff --git a/gcc/testsuite/gcc.target/i386/pr92658-sse4.c b/gcc/testsuite/gcc.target/i386/pr92658-sse4.c
index 9fd2eee..4f655a3 100644
--- a/gcc/testsuite/gcc.target/i386/pr92658-sse4.c
+++ b/gcc/testsuite/gcc.target/i386/pr92658-sse4.c
@@ -81,7 +81,7 @@ bar_u8_u64 (v2di * dst, v16qi src)
dst[0] = *(v2di *) tem;
}
-/* { dg-final { scan-assembler-times "pmovzxbq" 2 { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-times "pmovzxbq" 2 } } */
void
foo_u16_u32 (v4si * dst, v8hi * __restrict src)
diff --git a/gcc/testsuite/gcc.target/i386/pr94790-1.c b/gcc/testsuite/gcc.target/i386/pr94790-1.c
new file mode 100644
index 0000000..1ff5fa2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr94790-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mbmi" } */
+/* { dg-final { scan-assembler-times "andn\[ \\t\]" 2 } } */
+/* { dg-final { scan-assembler-not "xorl\[ \\t\]" } } */
+
+unsigned r1(unsigned a, unsigned b, unsigned mask)
+{
+ return a ^ ((a ^ b) & mask);
+}
+
+unsigned r2(unsigned a, unsigned b, unsigned mask)
+{
+ return (~mask & a) | (b & mask);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr94790-2.c b/gcc/testsuite/gcc.target/i386/pr94790-2.c
new file mode 100644
index 0000000..ad11d94
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr94790-2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mbmi" } */
+/* { dg-final { scan-assembler-not "andn\[ \\t\]" } } */
+/* { dg-final { scan-assembler-times "xorl\[ \\t\]" 2 } } */
+
+unsigned r1(unsigned a, unsigned b, unsigned mask)
+{
+ return a ^ ((a ^ b) & mask) + (a ^ b);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr95046-1.c b/gcc/testsuite/gcc.target/i386/pr95046-1.c
index bcc8bb5..2a0e6db 100644
--- a/gcc/testsuite/gcc.target/i386/pr95046-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr95046-1.c
@@ -1,6 +1,6 @@
/* PR target/95046 */
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O3 -ffast-math -msse2" } */
+/* { dg-options "-O3 -ffast-math -msse2 -mno-recip" } */
float r[2], a[2], b[2];
@@ -33,6 +33,15 @@ test_mult (void)
/* { dg-final { scan-assembler "\tv?mulps" } } */
void
+test_div (void)
+{
+ for (int i = 0; i < 2; i++)
+ r[i] = a[i] / b[i];
+}
+
+/* { dg-final { scan-assembler "\tv?divps" } } */
+
+void
test_min (void)
{
for (int i = 0; i < 2; i++)
diff --git a/gcc/testsuite/gcc.target/i386/pr95740.c b/gcc/testsuite/gcc.target/i386/pr95740.c
new file mode 100644
index 0000000..7ecd71b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr95740.c
@@ -0,0 +1,26 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-msse2 -O2 -mtune=generic -mtune-ctrl=use_incdec -masm=att -mfpmath=sse" } */
+/* { dg-final { scan-assembler-times {(?n)movd[\t ]*%xmm0.*%eax} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)incl[\t ]*%eax} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)movq[\t ]*%xmm0.*%rax} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)incq[\t ]*%rax} 1 } } */
+
+int
+foo (float a)
+{
+ union{
+ int b;
+ float a;}u;
+ u.a = a;
+ return u.b + 1;
+}
+
+long long
+foo1 (double a)
+{
+ union{
+ long long b;
+ double a;}u;
+ u.a = a;
+ return u.b + 1;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr98468.c b/gcc/testsuite/gcc.target/i386/pr98468.c
new file mode 100644
index 0000000..ca3aa256
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr98468.c
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512dq -mavx512vl -O2" } */
+/* { dg-final { scan-assembler-not "vxorp" } } */
+/* { dg-final { scan-assembler-not "vandnp" } } */
+
+#include<immintrin.h>
+__m128 f(__m128 val)
+{
+ return _mm_andnot_ps(_mm_set_ps1(0.0f), val);
+}
+
+__m256 f2(__m256 val)
+{
+ return _mm256_andnot_ps(_mm256_set1_ps(0.0f), val);
+}
+
+__m512 f3(__m512 val)
+{
+ return _mm512_andnot_ps(_mm512_set1_ps(0.0f), val);
+}
+
+__m128d f4(__m128d val)
+{
+ return _mm_andnot_pd(_mm_set_pd1(0.0), val);
+}
+
+__m256d f5(__m256d val)
+{
+ return _mm256_andnot_pd(_mm256_set1_pd(0.0), val);
+}
+
+__m512d f6(__m512d val)
+{
+ return _mm512_andnot_pd(_mm512_set1_pd(0.0), val);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr98737-1.c b/gcc/testsuite/gcc.target/i386/pr98737-1.c
new file mode 100644
index 0000000..33c84da
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr98737-1.c
@@ -0,0 +1,207 @@
+/* PR target/98737 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -masm=att" } */
+/* { dg-additional-options "-march=i686" { target ia32 } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*subq\t" { target lp64 } } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*subl\t" } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*subw\t" } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*subb\t" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*xadd" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */
+
+long a;
+int b;
+short c;
+char d;
+
+int
+f1 (long x)
+{
+ return __atomic_sub_fetch (&a, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f2 (int x)
+{
+ return __atomic_sub_fetch (&b, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f3 (short x)
+{
+ return __atomic_sub_fetch (&c, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f4 (char x)
+{
+ return __atomic_sub_fetch (&d, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f5 (long x)
+{
+ return __atomic_sub_fetch (&a, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f6 (int x)
+{
+ return __atomic_sub_fetch (&b, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f7 (short x)
+{
+ return __atomic_sub_fetch (&c, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f8 (char x)
+{
+ return __atomic_sub_fetch (&d, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f9 (long x)
+{
+ return __atomic_sub_fetch (&a, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f10 (int x)
+{
+ return __atomic_sub_fetch (&b, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f11 (short x)
+{
+ return __atomic_sub_fetch (&c, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f12 (char x)
+{
+ return __atomic_sub_fetch (&d, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f13 (long x)
+{
+ return __atomic_sub_fetch (&a, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f14 (int x)
+{
+ return __atomic_sub_fetch (&b, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f15 (short x)
+{
+ return __atomic_sub_fetch (&c, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f16 (char x)
+{
+ return __atomic_sub_fetch (&d, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f17 (long x)
+{
+ return __sync_sub_and_fetch (&a, x) == 0;
+}
+
+int
+f18 (int x)
+{
+ return __sync_sub_and_fetch (&b, x) == 0;
+}
+
+int
+f19 (short x)
+{
+ return __sync_sub_and_fetch (&c, x) == 0;
+}
+
+int
+f20 (char x)
+{
+ return __sync_sub_and_fetch (&d, x) == 0;
+}
+
+int
+f21 (long x)
+{
+ return __sync_sub_and_fetch (&a, x) != 0;
+}
+
+int
+f22 (int x)
+{
+ return __sync_sub_and_fetch (&b, x) != 0;
+}
+
+int
+f23 (short x)
+{
+ return __sync_sub_and_fetch (&c, x) != 0;
+}
+
+int
+f24 (char x)
+{
+ return __sync_sub_and_fetch (&d, x) != 0;
+}
+
+int
+f25 (long x)
+{
+ return __sync_sub_and_fetch (&a, x) < 0;
+}
+
+int
+f26 (int x)
+{
+ return __sync_sub_and_fetch (&b, x) < 0;
+}
+
+int
+f27 (short x)
+{
+ return __sync_sub_and_fetch (&c, x) < 0;
+}
+
+int
+f28 (char x)
+{
+ return __sync_sub_and_fetch (&d, x) < 0;
+}
+
+int
+f29 (long x)
+{
+ return __sync_sub_and_fetch (&a, x) >= 0;
+}
+
+int
+f30 (int x)
+{
+ return __sync_sub_and_fetch (&b, x) >= 0;
+}
+
+int
+f31 (short x)
+{
+ return __sync_sub_and_fetch (&c, x) >= 0;
+}
+
+int
+f32 (char x)
+{
+ return __sync_sub_and_fetch (&d, x) >= 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr98737-2.c b/gcc/testsuite/gcc.target/i386/pr98737-2.c
new file mode 100644
index 0000000..53b674e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr98737-2.c
@@ -0,0 +1,111 @@
+/* PR target/98737 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -masm=att" } */
+/* { dg-additional-options "-march=i686" { target ia32 } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*subq\t" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*subl\t" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*subw\t" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*subb\t" } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*xadd" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */
+
+long a;
+int b;
+short c;
+char d;
+
+int
+f1 (long x)
+{
+ return __atomic_sub_fetch (&a, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f2 (int x)
+{
+ return __atomic_sub_fetch (&b, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f3 (short x)
+{
+ return __atomic_sub_fetch (&c, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f4 (char x)
+{
+ return __atomic_sub_fetch (&d, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f5 (long x)
+{
+ return __atomic_sub_fetch (&a, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f6 (int x)
+{
+ return __atomic_sub_fetch (&b, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f7 (short x)
+{
+ return __atomic_sub_fetch (&c, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f8 (char x)
+{
+ return __atomic_sub_fetch (&d, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f9 (long x)
+{
+ return __sync_sub_and_fetch (&a, x) <= 0;
+}
+
+int
+f10 (int x)
+{
+ return __sync_sub_and_fetch (&b, x) <= 0;
+}
+
+int
+f11 (short x)
+{
+ return __sync_sub_and_fetch (&c, x) <= 0;
+}
+
+int
+f12 (char x)
+{
+ return __sync_sub_and_fetch (&d, x) <= 0;
+}
+
+int
+f13 (long x)
+{
+ return __sync_sub_and_fetch (&a, x) > 0;
+}
+
+int
+f14 (int x)
+{
+ return __sync_sub_and_fetch (&b, x) > 0;
+}
+
+int
+f15 (short x)
+{
+ return __sync_sub_and_fetch (&c, x) > 0;
+}
+
+int
+f16 (char x)
+{
+ return __sync_sub_and_fetch (&d, x) > 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr98737-3.c b/gcc/testsuite/gcc.target/i386/pr98737-3.c
new file mode 100644
index 0000000..0e7108a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr98737-3.c
@@ -0,0 +1,207 @@
+/* PR target/98737 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -masm=att" } */
+/* { dg-additional-options "-march=i686" { target ia32 } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*addq\t" { target lp64 } } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*addl\t" } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*addw\t" } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*addb\t" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*xadd" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */
+
+long a;
+int b;
+short c;
+char d;
+
+int
+f1 (long x)
+{
+ return __atomic_add_fetch (&a, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f2 (int x)
+{
+ return __atomic_add_fetch (&b, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f3 (short x)
+{
+ return __atomic_add_fetch (&c, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f4 (char x)
+{
+ return __atomic_add_fetch (&d, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f5 (long x)
+{
+ return __atomic_add_fetch (&a, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f6 (int x)
+{
+ return __atomic_add_fetch (&b, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f7 (short x)
+{
+ return __atomic_add_fetch (&c, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f8 (char x)
+{
+ return __atomic_add_fetch (&d, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f9 (long x)
+{
+ return __atomic_add_fetch (&a, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f10 (int x)
+{
+ return __atomic_add_fetch (&b, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f11 (short x)
+{
+ return __atomic_add_fetch (&c, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f12 (char x)
+{
+ return __atomic_add_fetch (&d, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f13 (long x)
+{
+ return __atomic_add_fetch (&a, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f14 (int x)
+{
+ return __atomic_add_fetch (&b, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f15 (short x)
+{
+ return __atomic_add_fetch (&c, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f16 (char x)
+{
+ return __atomic_add_fetch (&d, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f17 (long x)
+{
+ return __sync_add_and_fetch (&a, x) == 0;
+}
+
+int
+f18 (int x)
+{
+ return __sync_add_and_fetch (&b, x) == 0;
+}
+
+int
+f19 (short x)
+{
+ return __sync_add_and_fetch (&c, x) == 0;
+}
+
+int
+f20 (char x)
+{
+ return __sync_add_and_fetch (&d, x) == 0;
+}
+
+int
+f21 (long x)
+{
+ return __sync_add_and_fetch (&a, x) != 0;
+}
+
+int
+f22 (int x)
+{
+ return __sync_add_and_fetch (&b, x) != 0;
+}
+
+int
+f23 (short x)
+{
+ return __sync_add_and_fetch (&c, x) != 0;
+}
+
+int
+f24 (char x)
+{
+ return __sync_add_and_fetch (&d, x) != 0;
+}
+
+int
+f25 (long x)
+{
+ return __sync_add_and_fetch (&a, x) < 0;
+}
+
+int
+f26 (int x)
+{
+ return __sync_add_and_fetch (&b, x) < 0;
+}
+
+int
+f27 (short x)
+{
+ return __sync_add_and_fetch (&c, x) < 0;
+}
+
+int
+f28 (char x)
+{
+ return __sync_add_and_fetch (&d, x) < 0;
+}
+
+int
+f29 (long x)
+{
+ return __sync_add_and_fetch (&a, x) >= 0;
+}
+
+int
+f30 (int x)
+{
+ return __sync_add_and_fetch (&b, x) >= 0;
+}
+
+int
+f31 (short x)
+{
+ return __sync_add_and_fetch (&c, x) >= 0;
+}
+
+int
+f32 (char x)
+{
+ return __sync_add_and_fetch (&d, x) >= 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr98737-4.c b/gcc/testsuite/gcc.target/i386/pr98737-4.c
new file mode 100644
index 0000000..8228d52
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr98737-4.c
@@ -0,0 +1,111 @@
+/* PR target/98737 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -masm=att" } */
+/* { dg-additional-options "-march=i686" { target ia32 } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\rx]\*addq\t" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\rx]\*addl\t" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\rx]\*addw\t" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\rx]\*addb\t" } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*xadd" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */
+
+long a;
+int b;
+short c;
+char d;
+
+int
+f1 (long x)
+{
+ return __atomic_add_fetch (&a, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f2 (int x)
+{
+ return __atomic_add_fetch (&b, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f3 (short x)
+{
+ return __atomic_add_fetch (&c, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f4 (char x)
+{
+ return __atomic_add_fetch (&d, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f5 (long x)
+{
+ return __atomic_add_fetch (&a, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f6 (int x)
+{
+ return __atomic_add_fetch (&b, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f7 (short x)
+{
+ return __atomic_add_fetch (&c, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f8 (char x)
+{
+ return __atomic_add_fetch (&d, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f9 (long x)
+{
+ return __sync_add_and_fetch (&a, x) <= 0;
+}
+
+int
+f10 (int x)
+{
+ return __sync_add_and_fetch (&b, x) <= 0;
+}
+
+int
+f11 (short x)
+{
+ return __sync_add_and_fetch (&c, x) <= 0;
+}
+
+int
+f12 (char x)
+{
+ return __sync_add_and_fetch (&d, x) <= 0;
+}
+
+int
+f13 (long x)
+{
+ return __sync_add_and_fetch (&a, x) > 0;
+}
+
+int
+f14 (int x)
+{
+ return __sync_add_and_fetch (&b, x) > 0;
+}
+
+int
+f15 (short x)
+{
+ return __sync_add_and_fetch (&c, x) > 0;
+}
+
+int
+f16 (char x)
+{
+ return __sync_add_and_fetch (&d, x) > 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr98737-5.c b/gcc/testsuite/gcc.target/i386/pr98737-5.c
new file mode 100644
index 0000000..6d3e063
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr98737-5.c
@@ -0,0 +1,303 @@
+/* PR target/98737 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -masm=att" } */
+/* { dg-additional-options "-march=i686" { target ia32 } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*andq\t" { target lp64 } } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*andl\t" } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*andw\t" } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*andb\t" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*xadd" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */
+
+long a;
+int b;
+short c;
+char d;
+
+int
+f1 (long x)
+{
+ return __atomic_and_fetch (&a, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f2 (int x)
+{
+ return __atomic_and_fetch (&b, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f3 (short x)
+{
+ return __atomic_and_fetch (&c, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f4 (char x)
+{
+ return __atomic_and_fetch (&d, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f5 (long x)
+{
+ return __atomic_and_fetch (&a, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f6 (int x)
+{
+ return __atomic_and_fetch (&b, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f7 (short x)
+{
+ return __atomic_and_fetch (&c, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f8 (char x)
+{
+ return __atomic_and_fetch (&d, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f9 (long x)
+{
+ return __atomic_and_fetch (&a, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f10 (int x)
+{
+ return __atomic_and_fetch (&b, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f11 (short x)
+{
+ return __atomic_and_fetch (&c, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f12 (char x)
+{
+ return __atomic_and_fetch (&d, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f13 (long x)
+{
+ return __atomic_and_fetch (&a, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f14 (int x)
+{
+ return __atomic_and_fetch (&b, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f15 (short x)
+{
+ return __atomic_and_fetch (&c, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f16 (char x)
+{
+ return __atomic_and_fetch (&d, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f17 (long x)
+{
+ return __sync_and_and_fetch (&a, x) == 0;
+}
+
+int
+f18 (int x)
+{
+ return __sync_and_and_fetch (&b, x) == 0;
+}
+
+int
+f19 (short x)
+{
+ return __sync_and_and_fetch (&c, x) == 0;
+}
+
+int
+f20 (char x)
+{
+ return __sync_and_and_fetch (&d, x) == 0;
+}
+
+int
+f21 (long x)
+{
+ return __sync_and_and_fetch (&a, x) != 0;
+}
+
+int
+f22 (int x)
+{
+ return __sync_and_and_fetch (&b, x) != 0;
+}
+
+int
+f23 (short x)
+{
+ return __sync_and_and_fetch (&c, x) != 0;
+}
+
+int
+f24 (char x)
+{
+ return __sync_and_and_fetch (&d, x) != 0;
+}
+
+int
+f25 (long x)
+{
+ return __sync_and_and_fetch (&a, x) < 0;
+}
+
+int
+f26 (int x)
+{
+ return __sync_and_and_fetch (&b, x) < 0;
+}
+
+int
+f27 (short x)
+{
+ return __sync_and_and_fetch (&c, x) < 0;
+}
+
+int
+f28 (char x)
+{
+ return __sync_and_and_fetch (&d, x) < 0;
+}
+
+int
+f29 (long x)
+{
+ return __sync_and_and_fetch (&a, x) >= 0;
+}
+
+int
+f30 (int x)
+{
+ return __sync_and_and_fetch (&b, x) >= 0;
+}
+
+int
+f31 (short x)
+{
+ return __sync_and_and_fetch (&c, x) >= 0;
+}
+
+int
+f32 (char x)
+{
+ return __sync_and_and_fetch (&d, x) >= 0;
+}
+
+int
+f33 (long x)
+{
+ return __atomic_and_fetch (&a, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f34 (int x)
+{
+ return __atomic_and_fetch (&b, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f35 (short x)
+{
+ return __atomic_and_fetch (&c, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f36 (char x)
+{
+ return __atomic_and_fetch (&d, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f37 (long x)
+{
+ return __atomic_and_fetch (&a, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f38 (int x)
+{
+ return __atomic_and_fetch (&b, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f39 (short x)
+{
+ return __atomic_and_fetch (&c, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f40 (char x)
+{
+ return __atomic_and_fetch (&d, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f41 (long x)
+{
+ return __sync_and_and_fetch (&a, x) <= 0;
+}
+
+int
+f42 (int x)
+{
+ return __sync_and_and_fetch (&b, x) <= 0;
+}
+
+int
+f43 (short x)
+{
+ return __sync_and_and_fetch (&c, x) <= 0;
+}
+
+int
+f44 (char x)
+{
+ return __sync_and_and_fetch (&d, x) <= 0;
+}
+
+int
+f45 (long x)
+{
+ return __sync_and_and_fetch (&a, x) > 0;
+}
+
+int
+f46 (int x)
+{
+ return __sync_and_and_fetch (&b, x) > 0;
+}
+
+int
+f47 (short x)
+{
+ return __sync_and_and_fetch (&c, x) > 0;
+}
+
+int
+f48 (char x)
+{
+ return __sync_and_and_fetch (&d, x) > 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr98737-6.c b/gcc/testsuite/gcc.target/i386/pr98737-6.c
new file mode 100644
index 0000000..6cc1c3a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr98737-6.c
@@ -0,0 +1,303 @@
+/* PR target/98737 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -masm=att" } */
+/* { dg-additional-options "-march=i686" { target ia32 } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*orq\t" { target lp64 } } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*orl\t" } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*orw\t" } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*orb\t" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*xadd" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */
+
+long a;
+int b;
+short c;
+char d;
+
+int
+f1 (long x)
+{
+ return __atomic_or_fetch (&a, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f2 (int x)
+{
+ return __atomic_or_fetch (&b, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f3 (short x)
+{
+ return __atomic_or_fetch (&c, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f4 (char x)
+{
+ return __atomic_or_fetch (&d, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f5 (long x)
+{
+ return __atomic_or_fetch (&a, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f6 (int x)
+{
+ return __atomic_or_fetch (&b, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f7 (short x)
+{
+ return __atomic_or_fetch (&c, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f8 (char x)
+{
+ return __atomic_or_fetch (&d, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f9 (long x)
+{
+ return __atomic_or_fetch (&a, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f10 (int x)
+{
+ return __atomic_or_fetch (&b, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f11 (short x)
+{
+ return __atomic_or_fetch (&c, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f12 (char x)
+{
+ return __atomic_or_fetch (&d, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f13 (long x)
+{
+ return __atomic_or_fetch (&a, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f14 (int x)
+{
+ return __atomic_or_fetch (&b, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f15 (short x)
+{
+ return __atomic_or_fetch (&c, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f16 (char x)
+{
+ return __atomic_or_fetch (&d, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f17 (long x)
+{
+ return __sync_or_and_fetch (&a, x) == 0;
+}
+
+int
+f18 (int x)
+{
+ return __sync_or_and_fetch (&b, x) == 0;
+}
+
+int
+f19 (short x)
+{
+ return __sync_or_and_fetch (&c, x) == 0;
+}
+
+int
+f20 (char x)
+{
+ return __sync_or_and_fetch (&d, x) == 0;
+}
+
+int
+f21 (long x)
+{
+ return __sync_or_and_fetch (&a, x) != 0;
+}
+
+int
+f22 (int x)
+{
+ return __sync_or_and_fetch (&b, x) != 0;
+}
+
+int
+f23 (short x)
+{
+ return __sync_or_and_fetch (&c, x) != 0;
+}
+
+int
+f24 (char x)
+{
+ return __sync_or_and_fetch (&d, x) != 0;
+}
+
+int
+f25 (long x)
+{
+ return __sync_or_and_fetch (&a, x) < 0;
+}
+
+int
+f26 (int x)
+{
+ return __sync_or_and_fetch (&b, x) < 0;
+}
+
+int
+f27 (short x)
+{
+ return __sync_or_and_fetch (&c, x) < 0;
+}
+
+int
+f28 (char x)
+{
+ return __sync_or_and_fetch (&d, x) < 0;
+}
+
+int
+f29 (long x)
+{
+ return __sync_or_and_fetch (&a, x) >= 0;
+}
+
+int
+f30 (int x)
+{
+ return __sync_or_and_fetch (&b, x) >= 0;
+}
+
+int
+f31 (short x)
+{
+ return __sync_or_and_fetch (&c, x) >= 0;
+}
+
+int
+f32 (char x)
+{
+ return __sync_or_and_fetch (&d, x) >= 0;
+}
+
+int
+f33 (long x)
+{
+ return __atomic_or_fetch (&a, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f34 (int x)
+{
+ return __atomic_or_fetch (&b, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f35 (short x)
+{
+ return __atomic_or_fetch (&c, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f36 (char x)
+{
+ return __atomic_or_fetch (&d, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f37 (long x)
+{
+ return __atomic_or_fetch (&a, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f38 (int x)
+{
+ return __atomic_or_fetch (&b, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f39 (short x)
+{
+ return __atomic_or_fetch (&c, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f40 (char x)
+{
+ return __atomic_or_fetch (&d, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f41 (long x)
+{
+ return __sync_or_and_fetch (&a, x) <= 0;
+}
+
+int
+f42 (int x)
+{
+ return __sync_or_and_fetch (&b, x) <= 0;
+}
+
+int
+f43 (short x)
+{
+ return __sync_or_and_fetch (&c, x) <= 0;
+}
+
+int
+f44 (char x)
+{
+ return __sync_or_and_fetch (&d, x) <= 0;
+}
+
+int
+f45 (long x)
+{
+ return __sync_or_and_fetch (&a, x) > 0;
+}
+
+int
+f46 (int x)
+{
+ return __sync_or_and_fetch (&b, x) > 0;
+}
+
+int
+f47 (short x)
+{
+ return __sync_or_and_fetch (&c, x) > 0;
+}
+
+int
+f48 (char x)
+{
+ return __sync_or_and_fetch (&d, x) > 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr98737-7.c b/gcc/testsuite/gcc.target/i386/pr98737-7.c
new file mode 100644
index 0000000..2da23c4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr98737-7.c
@@ -0,0 +1,303 @@
+/* PR target/98737 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -masm=att" } */
+/* { dg-additional-options "-march=i686" { target ia32 } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*xorq\t" { target lp64 } } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*xorl\t" } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*xorw\t" } } */
+/* { dg-final { scan-assembler "lock\[^\n\r]\*xorb\t" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*xadd" } } */
+/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */
+
+long a;
+int b;
+short c;
+char d;
+
+int
+f1 (long x)
+{
+ return __atomic_xor_fetch (&a, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f2 (int x)
+{
+ return __atomic_xor_fetch (&b, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f3 (short x)
+{
+ return __atomic_xor_fetch (&c, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f4 (char x)
+{
+ return __atomic_xor_fetch (&d, x, __ATOMIC_RELEASE) == 0;
+}
+
+int
+f5 (long x)
+{
+ return __atomic_xor_fetch (&a, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f6 (int x)
+{
+ return __atomic_xor_fetch (&b, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f7 (short x)
+{
+ return __atomic_xor_fetch (&c, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f8 (char x)
+{
+ return __atomic_xor_fetch (&d, x, __ATOMIC_RELEASE) != 0;
+}
+
+int
+f9 (long x)
+{
+ return __atomic_xor_fetch (&a, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f10 (int x)
+{
+ return __atomic_xor_fetch (&b, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f11 (short x)
+{
+ return __atomic_xor_fetch (&c, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f12 (char x)
+{
+ return __atomic_xor_fetch (&d, x, __ATOMIC_RELEASE) < 0;
+}
+
+int
+f13 (long x)
+{
+ return __atomic_xor_fetch (&a, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f14 (int x)
+{
+ return __atomic_xor_fetch (&b, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f15 (short x)
+{
+ return __atomic_xor_fetch (&c, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f16 (char x)
+{
+ return __atomic_xor_fetch (&d, x, __ATOMIC_RELEASE) >= 0;
+}
+
+int
+f17 (long x)
+{
+ return __sync_xor_and_fetch (&a, x) == 0;
+}
+
+int
+f18 (int x)
+{
+ return __sync_xor_and_fetch (&b, x) == 0;
+}
+
+int
+f19 (short x)
+{
+ return __sync_xor_and_fetch (&c, x) == 0;
+}
+
+int
+f20 (char x)
+{
+ return __sync_xor_and_fetch (&d, x) == 0;
+}
+
+int
+f21 (long x)
+{
+ return __sync_xor_and_fetch (&a, x) != 0;
+}
+
+int
+f22 (int x)
+{
+ return __sync_xor_and_fetch (&b, x) != 0;
+}
+
+int
+f23 (short x)
+{
+ return __sync_xor_and_fetch (&c, x) != 0;
+}
+
+int
+f24 (char x)
+{
+ return __sync_xor_and_fetch (&d, x) != 0;
+}
+
+int
+f25 (long x)
+{
+ return __sync_xor_and_fetch (&a, x) < 0;
+}
+
+int
+f26 (int x)
+{
+ return __sync_xor_and_fetch (&b, x) < 0;
+}
+
+int
+f27 (short x)
+{
+ return __sync_xor_and_fetch (&c, x) < 0;
+}
+
+int
+f28 (char x)
+{
+ return __sync_xor_and_fetch (&d, x) < 0;
+}
+
+int
+f29 (long x)
+{
+ return __sync_xor_and_fetch (&a, x) >= 0;
+}
+
+int
+f30 (int x)
+{
+ return __sync_xor_and_fetch (&b, x) >= 0;
+}
+
+int
+f31 (short x)
+{
+ return __sync_xor_and_fetch (&c, x) >= 0;
+}
+
+int
+f32 (char x)
+{
+ return __sync_xor_and_fetch (&d, x) >= 0;
+}
+
+int
+f33 (long x)
+{
+ return __atomic_xor_fetch (&a, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f34 (int x)
+{
+ return __atomic_xor_fetch (&b, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f35 (short x)
+{
+ return __atomic_xor_fetch (&c, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f36 (char x)
+{
+ return __atomic_xor_fetch (&d, x, __ATOMIC_RELEASE) <= 0;
+}
+
+int
+f37 (long x)
+{
+ return __atomic_xor_fetch (&a, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f38 (int x)
+{
+ return __atomic_xor_fetch (&b, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f39 (short x)
+{
+ return __atomic_xor_fetch (&c, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f40 (char x)
+{
+ return __atomic_xor_fetch (&d, x, __ATOMIC_RELEASE) > 0;
+}
+
+int
+f41 (long x)
+{
+ return __sync_xor_and_fetch (&a, x) <= 0;
+}
+
+int
+f42 (int x)
+{
+ return __sync_xor_and_fetch (&b, x) <= 0;
+}
+
+int
+f43 (short x)
+{
+ return __sync_xor_and_fetch (&c, x) <= 0;
+}
+
+int
+f44 (char x)
+{
+ return __sync_xor_and_fetch (&d, x) <= 0;
+}
+
+int
+f45 (long x)
+{
+ return __sync_xor_and_fetch (&a, x) > 0;
+}
+
+int
+f46 (int x)
+{
+ return __sync_xor_and_fetch (&b, x) > 0;
+}
+
+int
+f47 (short x)
+{
+ return __sync_xor_and_fetch (&c, x) > 0;
+}
+
+int
+f48 (char x)
+{
+ return __sync_xor_and_fetch (&d, x) > 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr99531.c b/gcc/testsuite/gcc.target/i386/pr99531.c
new file mode 100644
index 0000000..9853645
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr99531.c
@@ -0,0 +1,7 @@
+/* { dg-do compile { target { x86_64-*-linux* } } } */
+/* { dg-options "-O2" } */
+
+int func(int, int, int, int, int, int);
+int caller(int a, int b, int c, int d, int e) { return func(0, a, b, c, d, e); }
+
+/* { dg-final { scan-assembler-not "push" { target { ! ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/shrink_wrap_1.c b/gcc/testsuite/gcc.target/i386/shrink_wrap_1.c
index 94dadd6..4b28667 100644
--- a/gcc/testsuite/gcc.target/i386/shrink_wrap_1.c
+++ b/gcc/testsuite/gcc.target/i386/shrink_wrap_1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue" } */
+/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue -fno-stack-protector" } */
enum machine_mode
{
diff --git a/gcc/testsuite/gcc.target/i386/smuldi3_highpart.c b/gcc/testsuite/gcc.target/i386/smuldi3_highpart.c
new file mode 100644
index 0000000..cd8ea41
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/smuldi3_highpart.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O2" } */
+typedef int __attribute ((mode(TI))) ti_t;
+
+long long foo(long long x)
+{
+ return ((ti_t)x * 19065) >> 72;
+}
+
+/* { dg-final { scan-assembler "movl\[ \\t]+\\\$19065, %eax" } } */
+/* { dg-final { scan-assembler-times "movq" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/sse2-float16-2.c b/gcc/testsuite/gcc.target/i386/sse2-float16-2.c
index 3da7683..25e1723 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-float16-2.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-float16-2.c
@@ -13,4 +13,5 @@ foo (union flt x)
return x.flt;
}
-/* { dg-final { scan-assembler {(?n)pinsrw[\t ].*%xmm0} } } */
+/* { dg-final { scan-assembler {(?n)pinsrw[\t ].*%xmm0} { target ia32 } } } */
+/* { dg-final { scan-assembler {(?n)movd[\t ].*%xmm0} { target { ! ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/sse2-psraq-1.c b/gcc/testsuite/gcc.target/i386/sse2-psraq-1.c
index 9a08ee4..dfb0bb8 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-psraq-1.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-psraq-1.c
@@ -41,7 +41,7 @@ TEST (void)
V a = (V) { 0xdeadbeefcafebabeULL, 0x123456789abcdef0ULL };
V b = (V) { 0x173a74be8a95134cULL, 0x817bae35ac0ebf12ULL };
int i;
- for (i = 0; tests[i].n; i++)
+ for (i = 0; i < ARRAY_SIZE (tests); i++)
{
V c = tests[i].fn (a);
if (c[0] != a[0] >> tests[i].n || c[1] != a[1] >> tests[i].n)
diff --git a/gcc/testsuite/gcc.target/i386/sse2-v1ti-ashiftrt-1.c b/gcc/testsuite/gcc.target/i386/sse2-v1ti-ashiftrt-1.c
new file mode 100644
index 0000000..05869bf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse2-v1ti-ashiftrt-1.c
@@ -0,0 +1,167 @@
+/* { dg-do run { target int128 } } */
+/* { dg-options "-O2 -msse2" } */
+/* { dg-require-effective-target sse2 } */
+
+typedef __int128 v1ti __attribute__ ((__vector_size__ (16)));
+typedef __int128 ti;
+
+ti ashr(ti x, unsigned int i) { return x >> i; }
+
+v1ti ashr_1(v1ti x) { return x >> 1; }
+v1ti ashr_2(v1ti x) { return x >> 2; }
+v1ti ashr_7(v1ti x) { return x >> 7; }
+v1ti ashr_8(v1ti x) { return x >> 8; }
+v1ti ashr_9(v1ti x) { return x >> 9; }
+v1ti ashr_15(v1ti x) { return x >> 15; }
+v1ti ashr_16(v1ti x) { return x >> 16; }
+v1ti ashr_17(v1ti x) { return x >> 17; }
+v1ti ashr_23(v1ti x) { return x >> 23; }
+v1ti ashr_24(v1ti x) { return x >> 24; }
+v1ti ashr_25(v1ti x) { return x >> 25; }
+v1ti ashr_31(v1ti x) { return x >> 31; }
+v1ti ashr_32(v1ti x) { return x >> 32; }
+v1ti ashr_33(v1ti x) { return x >> 33; }
+v1ti ashr_47(v1ti x) { return x >> 47; }
+v1ti ashr_48(v1ti x) { return x >> 48; }
+v1ti ashr_49(v1ti x) { return x >> 49; }
+v1ti ashr_63(v1ti x) { return x >> 63; }
+v1ti ashr_64(v1ti x) { return x >> 64; }
+v1ti ashr_65(v1ti x) { return x >> 65; }
+v1ti ashr_72(v1ti x) { return x >> 72; }
+v1ti ashr_79(v1ti x) { return x >> 79; }
+v1ti ashr_80(v1ti x) { return x >> 80; }
+v1ti ashr_81(v1ti x) { return x >> 81; }
+v1ti ashr_95(v1ti x) { return x >> 95; }
+v1ti ashr_96(v1ti x) { return x >> 96; }
+v1ti ashr_97(v1ti x) { return x >> 97; }
+v1ti ashr_111(v1ti x) { return x >> 111; }
+v1ti ashr_112(v1ti x) { return x >> 112; }
+v1ti ashr_113(v1ti x) { return x >> 113; }
+v1ti ashr_119(v1ti x) { return x >> 119; }
+v1ti ashr_120(v1ti x) { return x >> 120; }
+v1ti ashr_121(v1ti x) { return x >> 121; }
+v1ti ashr_126(v1ti x) { return x >> 126; }
+v1ti ashr_127(v1ti x) { return x >> 127; }
+
+typedef v1ti (*fun)(v1ti);
+
+struct {
+ unsigned int i;
+ fun ashr;
+} table[35] = {
+ { 1, ashr_1 },
+ { 2, ashr_2 },
+ { 7, ashr_7 },
+ { 8, ashr_8 },
+ { 9, ashr_9 },
+ { 15, ashr_15 },
+ { 16, ashr_16 },
+ { 17, ashr_17 },
+ { 23, ashr_23 },
+ { 24, ashr_24 },
+ { 25, ashr_25 },
+ { 31, ashr_31 },
+ { 32, ashr_32 },
+ { 33, ashr_33 },
+ { 47, ashr_47 },
+ { 48, ashr_48 },
+ { 49, ashr_49 },
+ { 63, ashr_63 },
+ { 64, ashr_64 },
+ { 65, ashr_65 },
+ { 72, ashr_72 },
+ { 79, ashr_79 },
+ { 80, ashr_80 },
+ { 81, ashr_81 },
+ { 95, ashr_95 },
+ { 96, ashr_96 },
+ { 97, ashr_97 },
+ { 111, ashr_111 },
+ { 112, ashr_112 },
+ { 113, ashr_113 },
+ { 119, ashr_119 },
+ { 120, ashr_120 },
+ { 121, ashr_121 },
+ { 126, ashr_126 },
+ { 127, ashr_127 }
+};
+
+void test(ti x)
+{
+ unsigned int i;
+ v1ti t = (v1ti)x;
+
+ for (i=0; i<(sizeof(table)/sizeof(table[0])); i++) {
+ if ((ti)(*table[i].ashr)(t) != ashr(x,table[i].i))
+ __builtin_abort();
+ }
+}
+
+int main()
+{
+ ti x;
+
+ x = ((ti)0x0011223344556677ull)<<64 | 0x8899aabbccddeeffull;
+ test(x);
+ x = ((ti)0xffeeddccbbaa9988ull)<<64 | 0x7766554433221100ull;
+ test(x);
+ x = ((ti)0x0123456789abcdefull)<<64 | 0x0123456789abcdefull;
+ test(x);
+ x = ((ti)0xfedcba9876543210ull)<<64 | 0xfedcba9876543210ull;
+ test(x);
+ x = ((ti)0x0123456789abcdefull)<<64 | 0xfedcba9876543210ull;
+ test(x);
+ x = ((ti)0xfedcba9876543210ull)<<64 | 0x0123456789abcdefull;
+ test(x);
+ x = 0;
+ test(x);
+ x = 0xffffffffffffffffull;
+ test(x);
+ x = ((ti)0xffffffffffffffffull)<<64;
+ test(x);
+ x = ((ti)0xffffffffffffffffull)<<64 | 0xffffffffffffffffull;
+ test(x);
+ x = ((ti)0x5a5a5a5a5a5a5a5aull)<<64 | 0x5a5a5a5a5a5a5a5aull;
+ test(x);
+ x = ((ti)0xa5a5a5a5a5a5a5a5ull)<<64 | 0xa5a5a5a5a5a5a5a5ull;
+ test(x);
+ x = 0xffull;
+ test(x);
+ x = 0xff00ull;
+ test(x);
+ x = 0xff0000ull;
+ test(x);
+ x = 0xff000000ull;
+ test(x);
+ x = 0xff00000000ull;
+ test(x);
+ x = 0xff0000000000ull;
+ test(x);
+ x = 0xff000000000000ull;
+ test(x);
+ x = 0xff00000000000000ull;
+ test(x);
+ x = ((ti)0xffull)<<64;
+ test(x);
+ x = ((ti)0xff00ull)<<64;
+ test(x);
+ x = ((ti)0xff0000ull)<<64;
+ test(x);
+ x = ((ti)0xff000000ull)<<64;
+ test(x);
+ x = ((ti)0xff00000000ull)<<64;
+ test(x);
+ x = ((ti)0xff0000000000ull)<<64;
+ test(x);
+ x = ((ti)0xff000000000000ull)<<64;
+ test(x);
+ x = ((ti)0xff00000000000000ull)<<64;
+ test(x);
+ x = 0xdeadbeefcafebabeull;
+ test(x);
+ x = ((ti)0xdeadbeefcafebabeull)<<64;
+ test(x);
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/sse2-v1ti-ashiftrt-2.c b/gcc/testsuite/gcc.target/i386/sse2-v1ti-ashiftrt-2.c
new file mode 100644
index 0000000..b3d0aa3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse2-v1ti-ashiftrt-2.c
@@ -0,0 +1,166 @@
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O2 -msse2 -mavx2 " } */
+
+typedef __int128 v1ti __attribute__ ((__vector_size__ (16)));
+typedef __int128 ti;
+
+ti ashr(ti x, unsigned int i) { return x >> i; }
+
+v1ti ashr_1(v1ti x) { return x >> 1; }
+v1ti ashr_2(v1ti x) { return x >> 2; }
+v1ti ashr_7(v1ti x) { return x >> 7; }
+v1ti ashr_8(v1ti x) { return x >> 8; }
+v1ti ashr_9(v1ti x) { return x >> 9; }
+v1ti ashr_15(v1ti x) { return x >> 15; }
+v1ti ashr_16(v1ti x) { return x >> 16; }
+v1ti ashr_17(v1ti x) { return x >> 17; }
+v1ti ashr_23(v1ti x) { return x >> 23; }
+v1ti ashr_24(v1ti x) { return x >> 24; }
+v1ti ashr_25(v1ti x) { return x >> 25; }
+v1ti ashr_31(v1ti x) { return x >> 31; }
+v1ti ashr_32(v1ti x) { return x >> 32; }
+v1ti ashr_33(v1ti x) { return x >> 33; }
+v1ti ashr_47(v1ti x) { return x >> 47; }
+v1ti ashr_48(v1ti x) { return x >> 48; }
+v1ti ashr_49(v1ti x) { return x >> 49; }
+v1ti ashr_63(v1ti x) { return x >> 63; }
+v1ti ashr_64(v1ti x) { return x >> 64; }
+v1ti ashr_65(v1ti x) { return x >> 65; }
+v1ti ashr_72(v1ti x) { return x >> 72; }
+v1ti ashr_79(v1ti x) { return x >> 79; }
+v1ti ashr_80(v1ti x) { return x >> 80; }
+v1ti ashr_81(v1ti x) { return x >> 81; }
+v1ti ashr_95(v1ti x) { return x >> 95; }
+v1ti ashr_96(v1ti x) { return x >> 96; }
+v1ti ashr_97(v1ti x) { return x >> 97; }
+v1ti ashr_111(v1ti x) { return x >> 111; }
+v1ti ashr_112(v1ti x) { return x >> 112; }
+v1ti ashr_113(v1ti x) { return x >> 113; }
+v1ti ashr_119(v1ti x) { return x >> 119; }
+v1ti ashr_120(v1ti x) { return x >> 120; }
+v1ti ashr_121(v1ti x) { return x >> 121; }
+v1ti ashr_126(v1ti x) { return x >> 126; }
+v1ti ashr_127(v1ti x) { return x >> 127; }
+
+typedef v1ti (*fun)(v1ti);
+
+struct {
+ unsigned int i;
+ fun ashr;
+} table[35] = {
+ { 1, ashr_1 },
+ { 2, ashr_2 },
+ { 7, ashr_7 },
+ { 8, ashr_8 },
+ { 9, ashr_9 },
+ { 15, ashr_15 },
+ { 16, ashr_16 },
+ { 17, ashr_17 },
+ { 23, ashr_23 },
+ { 24, ashr_24 },
+ { 25, ashr_25 },
+ { 31, ashr_31 },
+ { 32, ashr_32 },
+ { 33, ashr_33 },
+ { 47, ashr_47 },
+ { 48, ashr_48 },
+ { 49, ashr_49 },
+ { 63, ashr_63 },
+ { 64, ashr_64 },
+ { 65, ashr_65 },
+ { 72, ashr_72 },
+ { 79, ashr_79 },
+ { 80, ashr_80 },
+ { 81, ashr_81 },
+ { 95, ashr_95 },
+ { 96, ashr_96 },
+ { 97, ashr_97 },
+ { 111, ashr_111 },
+ { 112, ashr_112 },
+ { 113, ashr_113 },
+ { 119, ashr_119 },
+ { 120, ashr_120 },
+ { 121, ashr_121 },
+ { 126, ashr_126 },
+ { 127, ashr_127 }
+};
+
+void test(ti x)
+{
+ unsigned int i;
+ v1ti t = (v1ti)x;
+
+ for (i=0; i<(sizeof(table)/sizeof(table[0])); i++) {
+ if ((ti)(*table[i].ashr)(t) != ashr(x,table[i].i))
+ __builtin_abort();
+ }
+}
+
+int main()
+{
+ ti x;
+
+ x = ((ti)0x0011223344556677ull)<<64 | 0x8899aabbccddeeffull;
+ test(x);
+ x = ((ti)0xffeeddccbbaa9988ull)<<64 | 0x7766554433221100ull;
+ test(x);
+ x = ((ti)0x0123456789abcdefull)<<64 | 0x0123456789abcdefull;
+ test(x);
+ x = ((ti)0xfedcba9876543210ull)<<64 | 0xfedcba9876543210ull;
+ test(x);
+ x = ((ti)0x0123456789abcdefull)<<64 | 0xfedcba9876543210ull;
+ test(x);
+ x = ((ti)0xfedcba9876543210ull)<<64 | 0x0123456789abcdefull;
+ test(x);
+ x = 0;
+ test(x);
+ x = 0xffffffffffffffffull;
+ test(x);
+ x = ((ti)0xffffffffffffffffull)<<64;
+ test(x);
+ x = ((ti)0xffffffffffffffffull)<<64 | 0xffffffffffffffffull;
+ test(x);
+ x = ((ti)0x5a5a5a5a5a5a5a5aull)<<64 | 0x5a5a5a5a5a5a5a5aull;
+ test(x);
+ x = ((ti)0xa5a5a5a5a5a5a5a5ull)<<64 | 0xa5a5a5a5a5a5a5a5ull;
+ test(x);
+ x = 0xffull;
+ test(x);
+ x = 0xff00ull;
+ test(x);
+ x = 0xff0000ull;
+ test(x);
+ x = 0xff000000ull;
+ test(x);
+ x = 0xff00000000ull;
+ test(x);
+ x = 0xff0000000000ull;
+ test(x);
+ x = 0xff000000000000ull;
+ test(x);
+ x = 0xff00000000000000ull;
+ test(x);
+ x = ((ti)0xffull)<<64;
+ test(x);
+ x = ((ti)0xff00ull)<<64;
+ test(x);
+ x = ((ti)0xff0000ull)<<64;
+ test(x);
+ x = ((ti)0xff000000ull)<<64;
+ test(x);
+ x = ((ti)0xff00000000ull)<<64;
+ test(x);
+ x = ((ti)0xff0000000000ull)<<64;
+ test(x);
+ x = ((ti)0xff000000000000ull)<<64;
+ test(x);
+ x = ((ti)0xff00000000000000ull)<<64;
+ test(x);
+ x = 0xdeadbeefcafebabeull;
+ test(x);
+ x = ((ti)0xdeadbeefcafebabeull)<<64;
+ test(x);
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/sse2-v1ti-ashiftrt-3.c b/gcc/testsuite/gcc.target/i386/sse2-v1ti-ashiftrt-3.c
new file mode 100644
index 0000000..61d4f4c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse2-v1ti-ashiftrt-3.c
@@ -0,0 +1,166 @@
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O2 -msse2 -msse4.1" } */
+
+typedef __int128 v1ti __attribute__ ((__vector_size__ (16)));
+typedef __int128 ti;
+
+ti ashr(ti x, unsigned int i) { return x >> i; }
+
+v1ti ashr_1(v1ti x) { return x >> 1; }
+v1ti ashr_2(v1ti x) { return x >> 2; }
+v1ti ashr_7(v1ti x) { return x >> 7; }
+v1ti ashr_8(v1ti x) { return x >> 8; }
+v1ti ashr_9(v1ti x) { return x >> 9; }
+v1ti ashr_15(v1ti x) { return x >> 15; }
+v1ti ashr_16(v1ti x) { return x >> 16; }
+v1ti ashr_17(v1ti x) { return x >> 17; }
+v1ti ashr_23(v1ti x) { return x >> 23; }
+v1ti ashr_24(v1ti x) { return x >> 24; }
+v1ti ashr_25(v1ti x) { return x >> 25; }
+v1ti ashr_31(v1ti x) { return x >> 31; }
+v1ti ashr_32(v1ti x) { return x >> 32; }
+v1ti ashr_33(v1ti x) { return x >> 33; }
+v1ti ashr_47(v1ti x) { return x >> 47; }
+v1ti ashr_48(v1ti x) { return x >> 48; }
+v1ti ashr_49(v1ti x) { return x >> 49; }
+v1ti ashr_63(v1ti x) { return x >> 63; }
+v1ti ashr_64(v1ti x) { return x >> 64; }
+v1ti ashr_65(v1ti x) { return x >> 65; }
+v1ti ashr_72(v1ti x) { return x >> 72; }
+v1ti ashr_79(v1ti x) { return x >> 79; }
+v1ti ashr_80(v1ti x) { return x >> 80; }
+v1ti ashr_81(v1ti x) { return x >> 81; }
+v1ti ashr_95(v1ti x) { return x >> 95; }
+v1ti ashr_96(v1ti x) { return x >> 96; }
+v1ti ashr_97(v1ti x) { return x >> 97; }
+v1ti ashr_111(v1ti x) { return x >> 111; }
+v1ti ashr_112(v1ti x) { return x >> 112; }
+v1ti ashr_113(v1ti x) { return x >> 113; }
+v1ti ashr_119(v1ti x) { return x >> 119; }
+v1ti ashr_120(v1ti x) { return x >> 120; }
+v1ti ashr_121(v1ti x) { return x >> 121; }
+v1ti ashr_126(v1ti x) { return x >> 126; }
+v1ti ashr_127(v1ti x) { return x >> 127; }
+
+typedef v1ti (*fun)(v1ti);
+
+struct {
+ unsigned int i;
+ fun ashr;
+} table[35] = {
+ { 1, ashr_1 },
+ { 2, ashr_2 },
+ { 7, ashr_7 },
+ { 8, ashr_8 },
+ { 9, ashr_9 },
+ { 15, ashr_15 },
+ { 16, ashr_16 },
+ { 17, ashr_17 },
+ { 23, ashr_23 },
+ { 24, ashr_24 },
+ { 25, ashr_25 },
+ { 31, ashr_31 },
+ { 32, ashr_32 },
+ { 33, ashr_33 },
+ { 47, ashr_47 },
+ { 48, ashr_48 },
+ { 49, ashr_49 },
+ { 63, ashr_63 },
+ { 64, ashr_64 },
+ { 65, ashr_65 },
+ { 72, ashr_72 },
+ { 79, ashr_79 },
+ { 80, ashr_80 },
+ { 81, ashr_81 },
+ { 95, ashr_95 },
+ { 96, ashr_96 },
+ { 97, ashr_97 },
+ { 111, ashr_111 },
+ { 112, ashr_112 },
+ { 113, ashr_113 },
+ { 119, ashr_119 },
+ { 120, ashr_120 },
+ { 121, ashr_121 },
+ { 126, ashr_126 },
+ { 127, ashr_127 }
+};
+
+void test(ti x)
+{
+ unsigned int i;
+ v1ti t = (v1ti)x;
+
+ for (i=0; i<(sizeof(table)/sizeof(table[0])); i++) {
+ if ((ti)(*table[i].ashr)(t) != ashr(x,table[i].i))
+ __builtin_abort();
+ }
+}
+
+int main()
+{
+ ti x;
+
+ x = ((ti)0x0011223344556677ull)<<64 | 0x8899aabbccddeeffull;
+ test(x);
+ x = ((ti)0xffeeddccbbaa9988ull)<<64 | 0x7766554433221100ull;
+ test(x);
+ x = ((ti)0x0123456789abcdefull)<<64 | 0x0123456789abcdefull;
+ test(x);
+ x = ((ti)0xfedcba9876543210ull)<<64 | 0xfedcba9876543210ull;
+ test(x);
+ x = ((ti)0x0123456789abcdefull)<<64 | 0xfedcba9876543210ull;
+ test(x);
+ x = ((ti)0xfedcba9876543210ull)<<64 | 0x0123456789abcdefull;
+ test(x);
+ x = 0;
+ test(x);
+ x = 0xffffffffffffffffull;
+ test(x);
+ x = ((ti)0xffffffffffffffffull)<<64;
+ test(x);
+ x = ((ti)0xffffffffffffffffull)<<64 | 0xffffffffffffffffull;
+ test(x);
+ x = ((ti)0x5a5a5a5a5a5a5a5aull)<<64 | 0x5a5a5a5a5a5a5a5aull;
+ test(x);
+ x = ((ti)0xa5a5a5a5a5a5a5a5ull)<<64 | 0xa5a5a5a5a5a5a5a5ull;
+ test(x);
+ x = 0xffull;
+ test(x);
+ x = 0xff00ull;
+ test(x);
+ x = 0xff0000ull;
+ test(x);
+ x = 0xff000000ull;
+ test(x);
+ x = 0xff00000000ull;
+ test(x);
+ x = 0xff0000000000ull;
+ test(x);
+ x = 0xff000000000000ull;
+ test(x);
+ x = 0xff00000000000000ull;
+ test(x);
+ x = ((ti)0xffull)<<64;
+ test(x);
+ x = ((ti)0xff00ull)<<64;
+ test(x);
+ x = ((ti)0xff0000ull)<<64;
+ test(x);
+ x = ((ti)0xff000000ull)<<64;
+ test(x);
+ x = ((ti)0xff00000000ull)<<64;
+ test(x);
+ x = ((ti)0xff0000000000ull)<<64;
+ test(x);
+ x = ((ti)0xff000000000000ull)<<64;
+ test(x);
+ x = ((ti)0xff00000000000000ull)<<64;
+ test(x);
+ x = 0xdeadbeefcafebabeull;
+ test(x);
+ x = ((ti)0xdeadbeefcafebabeull)<<64;
+ test(x);
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/sse2-v1ti-mov-1.c b/gcc/testsuite/gcc.target/i386/sse2-v1ti-mov-1.c
new file mode 100644
index 0000000..a1ef7b7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse2-v1ti-mov-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O2 -msse2" } */
+
+typedef unsigned __int128 uv1ti __attribute__ ((__vector_size__ (16)));
+
+uv1ti foo(__int128 x)
+{
+ return (uv1ti)x;
+}
+
+/* { dg-final { scan-assembler-not "%\[er\]sp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/sse2-v1ti-rotate.c b/gcc/testsuite/gcc.target/i386/sse2-v1ti-rotate.c
new file mode 100644
index 0000000..b4b2814
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse2-v1ti-rotate.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O2 -msse2" } */
+/* { dg-require-effective-target sse2 } */
+
+typedef unsigned __int128 uv1ti __attribute__ ((__vector_size__ (16)));
+
+uv1ti rotr(uv1ti x, unsigned int i) { return (x >> i) | (x << (128-i)); }
+uv1ti rotl(uv1ti x, unsigned int i) { return (x << i) | (x >> (128-i)); }
+
+/* { dg-final { scan-assembler-not "shrq" } } */
+/* { dg-final { scan-assembler-not "salq" } } */
diff --git a/gcc/testsuite/gcc.target/i386/sse2-v1ti-shift-2.c b/gcc/testsuite/gcc.target/i386/sse2-v1ti-shift-2.c
new file mode 100644
index 0000000..18da2ef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse2-v1ti-shift-2.c
@@ -0,0 +1,13 @@
+/* PR target/102986 */
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O2 -msse2" } */
+
+typedef unsigned __int128 uv1ti __attribute__ ((__vector_size__ (16)));
+typedef __int128 sv1ti __attribute__ ((__vector_size__ (16)));
+
+uv1ti ashl(uv1ti x, unsigned int i) { return x << i; }
+uv1ti lshr(uv1ti x, unsigned int i) { return x >> i; }
+sv1ti ashr(sv1ti x, unsigned int i) { return x >> i; }
+uv1ti rotr(uv1ti x, unsigned int i) { return (x >> i) | (x << (128-i)); }
+uv1ti rotl(uv1ti x, unsigned int i) { return (x << i) | (x >> (128-i)); }
+
diff --git a/gcc/testsuite/gcc.target/i386/sse2-v1ti-shift-3.c b/gcc/testsuite/gcc.target/i386/sse2-v1ti-shift-3.c
new file mode 100644
index 0000000..8d5c122
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse2-v1ti-shift-3.c
@@ -0,0 +1,113 @@
+/* PR target/102986 */
+/* { dg-do run { target int128 } } */
+/* { dg-options "-O2 -msse2" } */
+/* { dg-require-effective-target sse2 } */
+
+typedef unsigned __int128 uv1ti __attribute__ ((__vector_size__ (16)));
+typedef __int128 sv1ti __attribute__ ((__vector_size__ (16)));
+typedef __int128 v1ti __attribute__ ((__vector_size__ (16)));
+
+typedef unsigned __int128 uti;
+typedef __int128 sti;
+typedef __int128 ti;
+
+uv1ti ashl_v1ti(uv1ti x, unsigned int i) { return x << i; }
+uv1ti lshr_v1ti(uv1ti x, unsigned int i) { return x >> i; }
+sv1ti ashr_v1ti(sv1ti x, unsigned int i) { return x >> i; }
+uv1ti rotr_v1ti(uv1ti x, unsigned int i) { return (x >> i) | (x << (128-i)); }
+uv1ti rotl_v1ti(uv1ti x, unsigned int i) { return (x << i) | (x >> (128-i)); }
+
+uti ashl_ti(uti x, unsigned int i) { return x << i; }
+uti lshr_ti(uti x, unsigned int i) { return x >> i; }
+sti ashr_ti(sti x, unsigned int i) { return x >> i; }
+uti rotr_ti(uti x, unsigned int i) { return (x >> i) | (x << (128-i)); }
+uti rotl_ti(uti x, unsigned int i) { return (x << i) | (x >> (128-i)); }
+
+void test(ti x)
+{
+ unsigned int i;
+ uv1ti ut = (uv1ti)x;
+ sv1ti st = (sv1ti)x;
+
+ for (i=0; i<128; i++) {
+ if ((ti)ashl_v1ti(ut,i) != (ti)ashl_ti(x,i))
+ __builtin_abort();
+ if ((ti)lshr_v1ti(ut,i) != (ti)lshr_ti(x,i))
+ __builtin_abort();
+ if ((ti)ashr_v1ti(st,i) != (ti)ashr_ti(x,i))
+ __builtin_abort();
+ if ((ti)rotr_v1ti(ut,i) != (ti)rotr_ti(x,i))
+ __builtin_abort();
+ if ((ti)rotl_v1ti(ut,i) != (ti)rotl_ti(x,i))
+ __builtin_abort();
+ }
+}
+
+int main()
+{
+ ti x;
+
+ x = ((ti)0x0011223344556677ull)<<64 | 0x8899aabbccddeeffull;
+ test(x);
+ x = ((ti)0xffeeddccbbaa9988ull)<<64 | 0x7766554433221100ull;
+ test(x);
+ x = ((ti)0x0123456789abcdefull)<<64 | 0x0123456789abcdefull;
+ test(x);
+ x = ((ti)0xfedcba9876543210ull)<<64 | 0xfedcba9876543210ull;
+ test(x);
+ x = ((ti)0x0123456789abcdefull)<<64 | 0xfedcba9876543210ull;
+ test(x);
+ x = ((ti)0xfedcba9876543210ull)<<64 | 0x0123456789abcdefull;
+ test(x);
+ x = 0;
+ test(x);
+ x = 0xffffffffffffffffull;
+ test(x);
+ x = ((ti)0xffffffffffffffffull)<<64;
+ test(x);
+ x = ((ti)0xffffffffffffffffull)<<64 | 0xffffffffffffffffull;
+ test(x);
+ x = ((ti)0x5a5a5a5a5a5a5a5aull)<<64 | 0x5a5a5a5a5a5a5a5aull;
+ test(x);
+ x = ((ti)0xa5a5a5a5a5a5a5a5ull)<<64 | 0xa5a5a5a5a5a5a5a5ull;
+ test(x);
+ x = 0xffull;
+ test(x);
+ x = 0xff00ull;
+ test(x);
+ x = 0xff0000ull;
+ test(x);
+ x = 0xff000000ull;
+ test(x);
+ x = 0xff00000000ull;
+ test(x);
+ x = 0xff0000000000ull;
+ test(x);
+ x = 0xff000000000000ull;
+ test(x);
+ x = 0xff00000000000000ull;
+ test(x);
+ x = ((ti)0xffull)<<64;
+ test(x);
+ x = ((ti)0xff00ull)<<64;
+ test(x);
+ x = ((ti)0xff0000ull)<<64;
+ test(x);
+ x = ((ti)0xff000000ull)<<64;
+ test(x);
+ x = ((ti)0xff00000000ull)<<64;
+ test(x);
+ x = ((ti)0xff0000000000ull)<<64;
+ test(x);
+ x = ((ti)0xff000000000000ull)<<64;
+ test(x);
+ x = ((ti)0xff00000000000000ull)<<64;
+ test(x);
+ x = 0xdeadbeefcafebabeull;
+ test(x);
+ x = ((ti)0xdeadbeefcafebabeull)<<64;
+ test(x);
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/sse2-v1ti-zext.c b/gcc/testsuite/gcc.target/i386/sse2-v1ti-zext.c
new file mode 100644
index 0000000..4dfc655
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse2-v1ti-zext.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O2 -msse2" } */
+
+typedef unsigned __int128 uv1ti __attribute__ ((__vector_size__ (16)));
+
+uv1ti extqi(unsigned char c) { return (uv1ti)(__int128)c; }
+uv1ti exthi(unsigned short s) { return (uv1ti)(__int128)s; }
+uv1ti extsi(unsigned int i) { return (uv1ti)(__int128)i; }
+uv1ti extdi(unsigned long long l) { return (uv1ti)(__int128)l; }
+
+uv1ti pextqi(unsigned char *pc) { return (uv1ti)(__int128)(*pc); }
+uv1ti pexthi(unsigned short *ps) { return (uv1ti)(__int128)(*ps); }
+uv1ti pextsi(unsigned int *pi) { return (uv1ti)(__int128)(*pi); }
+uv1ti pextdi(unsigned long long *pl) { return (uv1ti)(__int128)(*pl); }
+
+/* { dg-final { scan-assembler-not "%\[er\]sp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/sse4_2-check.h b/gcc/testsuite/gcc.target/i386/sse4_2-check.h
index d10e6c7..c33cd1b 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_2-check.h
+++ b/gcc/testsuite/gcc.target/i386/sse4_2-check.h
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "m128-check.h"
#include "cpuid.h"
static void sse4_2_test (void);
diff --git a/gcc/testsuite/gcc.target/i386/stack-check-11.c b/gcc/testsuite/gcc.target/i386/stack-check-11.c
index 90ab602..48341ce 100644
--- a/gcc/testsuite/gcc.target/i386/stack-check-11.c
+++ b/gcc/testsuite/gcc.target/i386/stack-check-11.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fstack-clash-protection -mtune=generic" } */
+/* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fno-stack-protector" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
#include <stdint.h>
diff --git a/gcc/testsuite/gcc.target/i386/stack-check-18.c b/gcc/testsuite/gcc.target/i386/stack-check-18.c
index 1cf4bbc..a0aab4a 100644
--- a/gcc/testsuite/gcc.target/i386/stack-check-18.c
+++ b/gcc/testsuite/gcc.target/i386/stack-check-18.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand" } */
+/* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand -fno-stack-protector" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
/* { dg-skip-if "" { *-*-* } { "-fstack-protector*" } { "" } } */
diff --git a/gcc/testsuite/gcc.target/i386/stack-check-19.c b/gcc/testsuite/gcc.target/i386/stack-check-19.c
index bf6af5f..94c75dc 100644
--- a/gcc/testsuite/gcc.target/i386/stack-check-19.c
+++ b/gcc/testsuite/gcc.target/i386/stack-check-19.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand" } */
+/* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fdump-rtl-expand -fno-stack-protector" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
/* { dg-skip-if "" { *-*-* } { "-fstack-protector*" } { "" } } */
diff --git a/gcc/testsuite/gcc.target/i386/stackalign/pr88483-1.c b/gcc/testsuite/gcc.target/i386/stackalign/pr88483-1.c
index c8bb083..11ecdd5 100644
--- a/gcc/testsuite/gcc.target/i386/stackalign/pr88483-1.c
+++ b/gcc/testsuite/gcc.target/i386/stackalign/pr88483-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mavx2" } */
+/* { dg-options "-O2 -mavx2 -fno-stack-protector" } */
struct B
{
diff --git a/gcc/testsuite/gcc.target/i386/stackalign/pr88483-2.c b/gcc/testsuite/gcc.target/i386/stackalign/pr88483-2.c
index e94fa1d..33174fa 100644
--- a/gcc/testsuite/gcc.target/i386/stackalign/pr88483-2.c
+++ b/gcc/testsuite/gcc.target/i386/stackalign/pr88483-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mavx512f" } */
+/* { dg-options "-O2 -mavx512f -fno-stack-protector" } */
struct B
{
diff --git a/gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp b/gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp
index 4a5aca7..9e7ce6d 100644
--- a/gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp
+++ b/gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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 a9c89fc..b043227 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 -mtune=generic -fshrink-wrap -fdump-rtl-pro_and_epilogue" } */
+/* { dg-options "-O2 -mtune=generic -fshrink-wrap -fdump-rtl-pro_and_epilogue -fno-stack-protector" } */
/* { dg-additional-options "-mno-avx" { target ia32 } } */
/* { dg-skip-if "No shrink-wrapping preformed" { x86_64-*-mingw* } } */
diff --git a/gcc/testsuite/gcc.target/i386/vnni-auto-vectorize-1.c b/gcc/testsuite/gcc.target/i386/vnni-auto-vectorize-1.c
new file mode 100644
index 0000000..844f37d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/vnni-auto-vectorize-1.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -mavx512vnni -mavx512vl -O2" } */
+
+/* { dg-final { scan-assembler "vpdpwssd\t" } } */
+/* { dg-final { scan-assembler "vpdpbusd\t" } } */
+/* { dg-final { scan-assembler-not "vpmaddwd\t" } } */
+
+int __attribute__((noinline, noclone, optimize("tree-vectorize")))
+sdot_prod_hi (short * restrict a, short * restrict b,
+ int c, int n)
+{
+ int i;
+ for (i = 0; i < n; i++)
+ {
+ c += ((int) a[i] * (int) b[i]);
+ }
+ return c;
+}
+
+int __attribute__((noinline, noclone, optimize("tree-vectorize")))
+usdot_prod_qi (unsigned char * restrict a, char *restrict b,
+ int c, int n)
+{
+ int i;
+ for (i = 0; i < n; i++)
+ {
+ c += ((int) a[i] * (int) b[i]);
+ }
+ return c;
+}
diff --git a/gcc/testsuite/gcc.target/i386/vnni-auto-vectorize-2.c b/gcc/testsuite/gcc.target/i386/vnni-auto-vectorize-2.c
new file mode 100644
index 0000000..dc8047d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/vnni-auto-vectorize-2.c
@@ -0,0 +1,72 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512vnni -mavx512vl" } */
+/* { dg-require-effective-target avx512vnni } */
+/* { dg-require-effective-target avx512vl } */
+
+static void vnni_test (void);
+#define DO_TEST vnni_test
+#define AVX512VNNI
+#define AVX512VL
+#include "avx512f-check.h"
+#include "vnni-auto-vectorize-1.c"
+
+#define N 256
+unsigned char a_u8[N];
+char b_i8[N];
+short a_i16[N], b_i16[N];
+int i8_exp, i8_ref, i16_exp, i16_ref;
+
+int __attribute__((noinline, noclone, optimize("no-tree-vectorize")))
+sdot_prod_hi_scalar (short * restrict a, short * restrict b,
+ int c, int n)
+{
+ int i;
+ for (i = 0; i < n; i++)
+ {
+ c += ((int) a[i] * (int) b[i]);
+ }
+ return c;
+}
+
+int __attribute__((noinline, noclone, optimize("no-tree-vectorize")))
+usdot_prod_qi_scalar (unsigned char * restrict a, char *restrict b,
+ int c, int n)
+{
+ int i;
+ for (i = 0; i < n; i++)
+ {
+ c += ((int) a[i] * (int) b[i]);
+ }
+ return c;
+}
+
+void init()
+{
+ int i;
+
+ i8_exp = i8_ref = 127;
+ i16_exp = i16_ref = 65535;
+
+ for (i = 0; i < N; i++)
+ {
+ a_u8[i] = (i + 3) % 256;
+ b_i8[i] = (i + 1) % 128;
+ a_i16[i] = i * 2;
+ b_i16[i] = -i + 2;
+ }
+}
+
+static void vnni_test()
+{
+ init ();
+ i16_exp = sdot_prod_hi (a_i16, b_i16, i16_exp, N);
+ i16_ref = sdot_prod_hi_scalar (a_i16, b_i16, i16_ref, N);
+ if (i16_exp != i16_ref)
+ abort ();
+
+ init ();
+ i8_exp = usdot_prod_qi (a_u8, b_i8, i8_exp, N);
+ i8_ref = usdot_prod_qi_scalar (a_u8, b_i8, i8_ref, N);
+ if (i8_exp != i8_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/warn-vect-op-2.c b/gcc/testsuite/gcc.target/i386/warn-vect-op-2.c
index 15eb961..5e378b6 100644
--- a/gcc/testsuite/gcc.target/i386/warn-vect-op-2.c
+++ b/gcc/testsuite/gcc.target/i386/warn-vect-op-2.c
@@ -11,8 +11,8 @@ int main (int argc, char *argv[])
argc, 1, 15, 38, 12, -1, argc, 2};
vector (16, signed char) res[] =
{
- v0 + v1, /* { dg-warning "expanded in parallel" } */
- v0 - v1, /* { dg-warning "expanded in parallel" } */
+ v0 + v1, /* { dg-warning "expanded piecewise" } */
+ v0 - v1, /* { dg-warning "expanded piecewise" } */
v0 > v1, /* { dg-warning "expanded piecewise" } */
v0 & v1, /* { dg-warning "expanded in parallel" } */
__builtin_shuffle (v0, v1), /* { dg-warning "expanded piecewise" } */
diff --git a/gcc/testsuite/gcc.target/ia64/ia64.exp b/gcc/testsuite/gcc.target/ia64/ia64.exp
index 5fae842..c138295 100644
--- a/gcc/testsuite/gcc.target/ia64/ia64.exp
+++ b/gcc/testsuite/gcc.target/ia64/ia64.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/m68k.exp b/gcc/testsuite/gcc.target/m68k/m68k.exp
index 6d35e45..96eea8b 100644
--- a/gcc/testsuite/gcc.target/m68k/m68k.exp
+++ b/gcc/testsuite/gcc.target/m68k/m68k.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/microblaze/microblaze.exp b/gcc/testsuite/gcc.target/microblaze/microblaze.exp
index 86d9386..670f46b 100644
--- a/gcc/testsuite/gcc.target/microblaze/microblaze.exp
+++ b/gcc/testsuite/gcc.target/microblaze/microblaze.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/fix-r4000-2.c b/gcc/testsuite/gcc.target/mips/fix-r4000-2.c
index 4290d5f..e0e65d6 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-2.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-2.c
@@ -4,6 +4,4 @@
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; }
-/* ??? A highpart pattern would be a better choice, but we currently
- don't use them. */
-/* { dg-final { scan-assembler "[concat {\tmult\t\$[45],\$[45][^\n]+mulsidi3_32bit_r4000\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */
+/* { dg-final { scan-assembler "[concat {\tmult\t\$[45],\$[45][^\n]+smulsi3_highpart_internal\n\tmfhi\t\$2\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-3.c b/gcc/testsuite/gcc.target/mips/fix-r4000-3.c
index 5bc8fc8..ec9d655 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-3.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-3.c
@@ -1,8 +1,6 @@
-/* { dg-options "-mips1 -mfix-r4000 -dp -EB" } */
+/* { dg-options "-mips1 -mfix-r4000 -dp -EB -fexpensive-optimizations" } */
/* { 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; }
-/* ??? A highpart pattern would be a better choice, but we currently
- don't use them. */
-/* { dg-final { scan-assembler "[concat {\tmultu\t\$[45],\$[45][^\n]+umulsidi3_32bit_r4000\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */
+/* { dg-final { scan-assembler "[concat {\tmultu\t\$[45],\$[45][^\n]+umulsi3_highpart_internal\n\tmfhi\t\$2\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-7.c b/gcc/testsuite/gcc.target/mips/fix-r4000-7.c
index 25178db..9b10577 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-7.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-7.c
@@ -4,6 +4,4 @@
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; }
-/* ??? A highpart pattern would be a better choice, but we currently
- don't use them. */
-/* { dg-final { scan-assembler "[concat {\tdmult\t\$[45],\$[45][^\n]+mulditi3_r4000\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */
+/* { dg-final { scan-assembler "[concat {\tdmult\t\$[45],\$[45][^\n]+smuldi3_highpart_internal\n\tmfhi\t\$2\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-8.c b/gcc/testsuite/gcc.target/mips/fix-r4000-8.c
index eae1488..1ce35df 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-8.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-8.c
@@ -1,8 +1,6 @@
-/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -dp -EB" } */
+/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -dp -EB -fexpensive-optimizations" } */
/* { 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; }
-/* ??? A highpart pattern would be a better choice, but we currently
- don't use them. */
-/* { dg-final { scan-assembler "[concat {\tdmultu\t\$[45],\$[45][^\n]+umulditi3_r4000\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */
+/* { dg-final { scan-assembler "[concat {\tdmultu\t\$[45],\$[45][^\n]+umuldi3_highpart_internal\n\tmfhi\t\$2\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/frame-header-1.c b/gcc/testsuite/gcc.target/mips/frame-header-1.c
index 971656d..55efc0b 100644
--- a/gcc/testsuite/gcc.target/mips/frame-header-1.c
+++ b/gcc/testsuite/gcc.target/mips/frame-header-1.c
@@ -8,7 +8,7 @@
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\taddiu\t\\\$sp,\\\$sp,-24" } } */
-NOMIPS16 void __attribute__((noinline))
+NOMIPS16 void __attribute__((noinline)) __attribute__((noipa))
bar (int* a)
{
*a = 1;
diff --git a/gcc/testsuite/gcc.target/mips/frame-header-2.c b/gcc/testsuite/gcc.target/mips/frame-header-2.c
index 0e86bc9..31aa27e 100644
--- a/gcc/testsuite/gcc.target/mips/frame-header-2.c
+++ b/gcc/testsuite/gcc.target/mips/frame-header-2.c
@@ -8,7 +8,7 @@
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\taddiu\t\\\$sp,\\\$sp,-8" } } */
-NOMIPS16 void __attribute__((noinline))
+NOMIPS16 void __attribute__((noinline)) __attribute__((noipa))
bar (int* a)
{
*a = 1;
diff --git a/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp b/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp
index 6023cb0..e1b3269 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2007-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/mips/mips-nonpic/README b/gcc/testsuite/gcc.target/mips/mips-nonpic/README
index 51851a0..9ceeb71 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-2021 Free Software Foundation, Inc.
+Copyright (C) 2008-2022 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 c274fff..6065355 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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.exp b/gcc/testsuite/gcc.target/mips/mips.exp
index d4d4b90..8a62267 100644
--- a/gcc/testsuite/gcc.target/mips/mips.exp
+++ b/gcc/testsuite/gcc.target/mips/mips.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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
@@ -264,6 +264,7 @@ set mips_option_groups {
frame-header "-mframe-header-opt|-mno-frame-header-opt"
stack-protector "-fstack-protector"
stdlib "REQUIRES_STDLIB"
+ unaligned-access "-m(no-|)unaligned-access"
}
for { set option 0 } { $option < 32 } { incr option } {
diff --git a/gcc/testsuite/gcc.target/mips/octeon-bbit-1.c b/gcc/testsuite/gcc.target/mips/octeon-bbit-1.c
index f91c68b..8adbb26 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-bbit-1.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-bbit-1.c
@@ -22,7 +22,9 @@ f2 (int i)
foo ();
}
-NOMIPS16 void
+/* f3 and f4 are equivalent and may be subject to ICF. The attribute
+ is supposed to prevent that. */
+NOMIPS16 void __attribute__ ((noipa))
f3 (int i)
{
if (i % 2)
diff --git a/gcc/testsuite/gcc.target/mips/unaligned-2.c b/gcc/testsuite/gcc.target/mips/unaligned-2.c
new file mode 100644
index 0000000..8679afa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/unaligned-2.c
@@ -0,0 +1,53 @@
+/* { dg-options "isa_rev>=6 -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler-not "\tsb\t" } } */
+/* { dg-final { scan-assembler-not "\tsh\t" } } */
+/* { dg-final { scan-assembler-not "\tlb\t" } } */
+/* { dg-final { scan-assembler-not "\tlh\t" } } */
+/* { dg-final { scan-assembler-not "\tswl\t" } } */
+/* { dg-final { scan-assembler-not "\tswr\t" } } */
+/* { dg-final { scan-assembler-not "\tlwl\t" } } */
+/* { dg-final { scan-assembler-not "\tlwr\t" } } */
+/* { dg-final { scan-assembler-not "\tsdl\t" } } */
+/* { dg-final { scan-assembler-not "\tsdr\t" } } */
+/* { dg-final { scan-assembler-not "\tldl\t" } } */
+/* { dg-final { scan-assembler-not "\tldr\t" } } */
+/* { dg-final { scan-assembler-times "\tsw\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tlw\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tsd\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tld\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/unaligned-3.c b/gcc/testsuite/gcc.target/mips/unaligned-3.c
new file mode 100644
index 0000000..d0fbe19
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/unaligned-3.c
@@ -0,0 +1,53 @@
+/* { dg-options "isa_rev>=6 -mgp64 -mno-unaligned-access" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler-times "\tsb\t" 12 } } */
+/* { dg-final { scan-assembler-times "\tlbu\t" 12 } } */
+/* { dg-final { scan-assembler-not "\tsh\t" } } */
+/* { dg-final { scan-assembler-not "\tlh\t" } } */
+/* { dg-final { scan-assembler-not "\tsw\t" } } */
+/* { dg-final { scan-assembler-not "\tlw\t" } } */
+/* { dg-final { scan-assembler-not "\tsd\t" } } */
+/* { dg-final { scan-assembler-not "\tld\t" } } */
+/* { dg-final { scan-assembler-not "\tswl\t" } } */
+/* { dg-final { scan-assembler-not "\tswr\t" } } */
+/* { dg-final { scan-assembler-not "\tlwl\t" } } */
+/* { dg-final { scan-assembler-not "\tlwr\t" } } */
+/* { dg-final { scan-assembler-not "\tsdl\t" } } */
+/* { dg-final { scan-assembler-not "\tsdr\t" } } */
+/* { dg-final { scan-assembler-not "\tldl\t" } } */
+/* { dg-final { scan-assembler-not "\tldr\t" } } */
+/* { 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/msp430/msp430.exp b/gcc/testsuite/gcc.target/msp430/msp430.exp
index 8c97f63..a675cb3 100644
--- a/gcc/testsuite/gcc.target/msp430/msp430.exp
+++ b/gcc/testsuite/gcc.target/msp430/msp430.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2021 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 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/nds32/nds32.exp b/gcc/testsuite/gcc.target/nds32/nds32.exp
index 242c298..7d3feae 100644
--- a/gcc/testsuite/gcc.target/nds32/nds32.exp
+++ b/gcc/testsuite/gcc.target/nds32/nds32.exp
@@ -1,5 +1,5 @@
# Target test cases of Andes NDS32 cpu for GNU compiler
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 Free Software Foundation, Inc.
# Contributed by Andes Technology Corporation.
#
# This file is part of GCC.
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-inline-1.c b/gcc/testsuite/gcc.target/nios2/custom-fp-inline-1.c
new file mode 100644
index 0000000..43715e5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-inline-1.c
@@ -0,0 +1,33 @@
+/* Test that you can inline a function with custom insn attributes into
+ one with the same 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 <math.h>
+
+static inline
+__attribute__ ((always_inline, target ("custom-fmaxs=246,custom-fmins=247")))
+void
+custom_fp1 (float operand_a, float operand_b, float *result)
+
+{
+ result[0] = fmaxf (operand_a, operand_b);
+ result[1] = fminf (operand_a, operand_b);
+}
+
+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)
+{
+ custom_fp1 (operand_a, operand_b, result);
+}
+
+/* { dg-final { scan-assembler "custom\\t246, .* # fmaxs .*" } } */
+/* { dg-final { scan-assembler "custom\\t247, .* # fmins .*" } } */
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-inline-2.c b/gcc/testsuite/gcc.target/nios2/custom-fp-inline-2.c
new file mode 100644
index 0000000..3e35241
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-inline-2.c
@@ -0,0 +1,29 @@
+/* Test that you cannot inline a function with custom insn attributes into
+ one without 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 <math.h>
+
+static inline
+__attribute__ ((always_inline, target ("custom-fmaxs=246,custom-fmins=247")))
+void
+custom_fp1 (float operand_a, float operand_b, float *result) /* { dg-error "target specific option mismatch" } */
+{
+ result[0] = fmaxf (operand_a, operand_b);
+ result[1] = fminf (operand_a, operand_b);
+}
+
+extern void
+custom_fp (float operand_a, float operand_b, float *result);
+
+void
+custom_fp (float operand_a, float operand_b, float *result)
+{
+ custom_fp1 (operand_a, operand_b, result);
+}
+
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-inline-3.c b/gcc/testsuite/gcc.target/nios2/custom-fp-inline-3.c
new file mode 100644
index 0000000..86b1064
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-inline-3.c
@@ -0,0 +1,33 @@
+/* Test that you can inline a function without custom insn attributes into
+ one that does have custom insn 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 <math.h>
+
+static inline
+__attribute__ ((always_inline))
+void
+custom_fp1 (float operand_a, float operand_b, float *result)
+
+{
+ result[0] = fmaxf (operand_a, operand_b);
+ result[1] = fminf (operand_a, operand_b);
+}
+
+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)
+{
+ custom_fp1 (operand_a, operand_b, result);
+}
+
+/* { dg-final { scan-assembler "custom\\t246, .* # fmaxs .*" } } */
+/* { dg-final { scan-assembler "custom\\t247, .* # fmins .*" } } */
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-inline-4.c b/gcc/testsuite/gcc.target/nios2/custom-fp-inline-4.c
new file mode 100644
index 0000000..5e2c1bc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-inline-4.c
@@ -0,0 +1,29 @@
+/* Test that you cannot inline a function with custom insn attributes into
+ one with incompatible 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 <math.h>
+
+static inline
+__attribute__ ((always_inline, target ("custom-fmaxs=246,custom-fmins=247")))
+void
+custom_fp1 (float operand_a, float operand_b, float *result) /* { dg-error "target specific option mismatch" } */
+{
+ result[0] = fmaxf (operand_a, operand_b);
+ result[1] = fminf (operand_a, operand_b);
+}
+
+extern void
+custom_fp (float operand_a, float operand_b, float *result)
+ __attribute__ ((target ("custom-fmaxs=200,custom-fmins=201")));
+
+void
+custom_fp (float operand_a, float operand_b, float *result)
+{
+ custom_fp1 (operand_a, operand_b, result);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2.exp b/gcc/testsuite/gcc.target/nios2/nios2.exp
index 87673a6..3fc96eb 100644
--- a/gcc/testsuite/gcc.target/nios2/nios2.exp
+++ b/gcc/testsuite/gcc.target/nios2/nios2.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 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/nvptx/atomic-exchange-1.c b/gcc/testsuite/gcc.target/nvptx/atomic-exchange-1.c
new file mode 100644
index 0000000..c63f52b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/atomic-exchange-1.c
@@ -0,0 +1,39 @@
+/* Test the atomic exchange expansion, shared state space. */
+
+/* { dg-do compile } */
+/* { dg-options "-Wno-long-long" } */
+
+enum memmodel
+{
+ MEMMODEL_SEQ_CST = 5
+};
+
+unsigned char u8 __attribute__((shared));
+unsigned short u16 __attribute__((shared));
+unsigned int u32 __attribute__((shared));
+unsigned long long int u64 __attribute__((shared));
+
+int
+main()
+{
+ __atomic_exchange_n (&u8, 0, MEMMODEL_SEQ_CST);
+ __atomic_exchange_n (&u16, 0, MEMMODEL_SEQ_CST);
+ __atomic_exchange_n (&u32, 0, MEMMODEL_SEQ_CST);
+ __atomic_exchange_n (&u64, 0, MEMMODEL_SEQ_CST);
+
+ return 0;
+}
+
+
+/* Not ptx-native, fallback to libatomic.
+ Libatomic uses generic addressing with a global lock and membar.sys barriers.
+ We could implement these more efficiently by cloning libatomic for .shared,
+ using a per-CTA lock and membar.cta barrier. But we'd expect
+ performance-critical code to use the ptx-native atomic sizes 32 and 64 bit,
+ so that doesn't seem to be worth the trouble. */
+/* { dg-final { scan-assembler-times "(?n)call .* __atomic_exchange_1" 1 } } */
+/* { dg-final { scan-assembler-times "(?n)call .* __atomic_exchange_2" 1 } } */
+
+/* { dg-final { scan-assembler-times "atom.shared.exch.b32" 1 } } */
+/* { dg-final { scan-assembler-times "atom.shared.exch.b64" 1 } } */
+/* { dg-final { scan-assembler-times "membar.cta" 4 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/atomic-exchange-2.c b/gcc/testsuite/gcc.target/nvptx/atomic-exchange-2.c
new file mode 100644
index 0000000..4301e74
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/atomic-exchange-2.c
@@ -0,0 +1,33 @@
+/* Test the atomic exchange expansion, global state space. */
+
+/* { dg-do compile } */
+/* { dg-options "-Wno-long-long" } */
+
+enum memmodel
+{
+ MEMMODEL_SEQ_CST = 5
+};
+
+unsigned char u8;
+unsigned short u16;
+unsigned int u32;
+unsigned long long int u64;
+
+int
+main()
+{
+ __atomic_exchange_n (&u8, 0, MEMMODEL_SEQ_CST);
+ __atomic_exchange_n (&u16, 0, MEMMODEL_SEQ_CST);
+ __atomic_exchange_n (&u32, 0, MEMMODEL_SEQ_CST);
+ __atomic_exchange_n (&u64, 0, MEMMODEL_SEQ_CST);
+
+ return 0;
+}
+
+/* Not ptx-native, fallback to libatomic. */
+/* { dg-final { scan-assembler-times "(?n)call .* __atomic_exchange_1" 1 } } */
+/* { dg-final { scan-assembler-times "(?n)call .* __atomic_exchange_2" 1 } } */
+
+/* { dg-final { scan-assembler-times "atom.global.exch.b32" 1 } } */
+/* { dg-final { scan-assembler-times "atom.global.exch.b64" 1 } } */
+/* { dg-final { scan-assembler-times "membar.sys" 4 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/atomic-exchange-3.c b/gcc/testsuite/gcc.target/nvptx/atomic-exchange-3.c
new file mode 100644
index 0000000..2f8232f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/atomic-exchange-3.c
@@ -0,0 +1,33 @@
+/* Test the atomic exchange expansion, generic addressing. */
+
+/* { dg-do compile } */
+/* { dg-options "-Wno-long-long" } */
+
+enum memmodel
+{
+ MEMMODEL_SEQ_CST = 5
+};
+
+unsigned char *u8;
+unsigned short *u16;
+unsigned int *u32;
+unsigned long long int *u64;
+
+int
+main()
+{
+ __atomic_exchange_n (u8, 0, MEMMODEL_SEQ_CST);
+ __atomic_exchange_n (u16, 0, MEMMODEL_SEQ_CST);
+ __atomic_exchange_n (u32, 0, MEMMODEL_SEQ_CST);
+ __atomic_exchange_n (u64, 0, MEMMODEL_SEQ_CST);
+
+ return 0;
+}
+
+/* Not ptx-native, fallback to libatomic. */
+/* { dg-final { scan-assembler-times "(?n)call .* __atomic_exchange_1" 1 } } */
+/* { dg-final { scan-assembler-times "(?n)call .* __atomic_exchange_2" 1 } } */
+
+/* { dg-final { scan-assembler-times "atom.exch.b32" 1 } } */
+/* { dg-final { scan-assembler-times "atom.exch.b64" 1 } } */
+/* { dg-final { scan-assembler-times "membar.sys" 4 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/atomic-exchange-4.c b/gcc/testsuite/gcc.target/nvptx/atomic-exchange-4.c
new file mode 100644
index 0000000..de1d395
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/atomic-exchange-4.c
@@ -0,0 +1,74 @@
+/* Test the atomic exchange expansion, execution. */
+
+/* { dg-do run } */
+/* { dg-options "-Wno-long-long" } */
+
+/* We're trying to generate this type of store/exchange/load sequence:
+ st.global.u32 [g32], %r60;
+ atom.global.exch.b32 %r22, [g32], 2;
+ ld.global.u32 %r23, [g32];
+ with no insns inbetween.
+
+ We compile this at -O0, to keep the compiler from optimizing out the
+ "p = (P)" assignment. If the assignment is optimized out we don't test
+ the generic case, iow we generate for instance atom.global.exch.b32 instead
+ of atom.exch.b32.
+
+ Compiling at -O0 however does introduce loads and stores in the
+ store/exchange/load sequence, so we fix that by using the register
+ keyword. */
+
+enum memmodel
+{
+ MEMMODEL_RELAXED = 0,
+};
+
+unsigned int g32;
+unsigned long long int g64;
+
+unsigned int s32 __attribute__((shared));
+unsigned long long int s64 __attribute__((shared));
+
+#define TEST(P, V1, V2) \
+ { \
+ register typeof (*(P)) tmp; \
+ register typeof (*(P)) tmp2; \
+ __atomic_store_n ((P), (V1), MEMMODEL_RELAXED); \
+ tmp = __atomic_exchange_n ((P), (V2), MEMMODEL_RELAXED); \
+ tmp2 = __atomic_load_n ((P), MEMMODEL_RELAXED); \
+ if (tmp != (V1) || tmp2 != (V2)) \
+ __builtin_abort (); \
+ }
+
+#define TEST2(P, V1, V2) \
+ { \
+ register typeof (*(P)) tmp; \
+ register typeof (*(P)) tmp2; \
+ *(P) = (V1); \
+ tmp = __atomic_exchange_n ((P), (V2), MEMMODEL_RELAXED); \
+ tmp2 = *(P); \
+ if (tmp != (V1) || tmp2 != (V2)) \
+ __builtin_abort (); \
+ }
+
+#define TESTS(P) \
+ { \
+ TEST ((P), 1, 2); \
+ TEST2 ((P), 3, 4); \
+ { \
+ register typeof (*(P)) * p = (P); \
+ TEST (p, 1, 2); \
+ TEST2 (p, 3, 4); \
+ } \
+ }
+
+int
+main ()
+{
+ TESTS (&g32);
+ TESTS (&g64);
+ TESTS (&s32);
+ TESTS (&s64);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/nvptx/atomic-store-1.c b/gcc/testsuite/gcc.target/nvptx/atomic-store-1.c
new file mode 100644
index 0000000..cee3815
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/atomic-store-1.c
@@ -0,0 +1,26 @@
+/* Test the atomic store expansion for sm <= sm_6x targets,
+ shared state space. */
+
+/* { dg-do compile } */
+/* { dg-options "-misa=sm_53" } */
+
+enum memmodel
+{
+ MEMMODEL_SEQ_CST = 5
+};
+
+unsigned int u32 __attribute__((shared));
+unsigned long long int u64 __attribute__((shared));
+
+int
+main()
+{
+ __atomic_store_n (&u32, 0, MEMMODEL_SEQ_CST);
+ __atomic_store_n (&u64, 0, MEMMODEL_SEQ_CST);
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "atom.shared.exch.b32" 1 } } */
+/* { dg-final { scan-assembler-times "atom.shared.exch.b64" 1 } } */
+/* { dg-final { scan-assembler-times "membar.cta" 4 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/atomic-store-2.c b/gcc/testsuite/gcc.target/nvptx/atomic-store-2.c
new file mode 100644
index 0000000..cd5e4c3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/atomic-store-2.c
@@ -0,0 +1,26 @@
+/* Test the atomic store expansion for sm > sm_6x targets,
+ shared state space. */
+
+/* { dg-do compile } */
+/* { dg-options "-misa=sm_75" } */
+
+enum memmodel
+{
+ MEMMODEL_SEQ_CST = 5
+};
+
+unsigned int u32 __attribute__((shared));
+unsigned long long int u64 __attribute__((shared));
+
+int
+main()
+{
+ __atomic_store_n (&u32, 0, MEMMODEL_SEQ_CST);
+ __atomic_store_n (&u64, 0, MEMMODEL_SEQ_CST);
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "st.shared.b32" 1 } } */
+/* { dg-final { scan-assembler-times "st.shared.b64" 1 } } */
+/* { dg-final { scan-assembler-times "membar.cta" 4 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/atomic-store-3.c b/gcc/testsuite/gcc.target/nvptx/atomic-store-3.c
new file mode 100644
index 0000000..cc0264f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/atomic-store-3.c
@@ -0,0 +1,25 @@
+/* Test the atomic store expansion, global state space. */
+
+/* { dg-do compile } */
+/* { dg-additional-options "-Wno-long-long" } */
+
+enum memmodel
+{
+ MEMMODEL_SEQ_CST = 5
+};
+
+unsigned int u32;
+unsigned long long int u64;
+
+int
+main()
+{
+ __atomic_store_n (&u32, 0, MEMMODEL_SEQ_CST);
+ __atomic_store_n (&u64, 0, MEMMODEL_SEQ_CST);
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "st.global.u32" 1 } } */
+/* { dg-final { scan-assembler-times "st.global.u64" 1 } } */
+/* { dg-final { scan-assembler-times "membar.sys" 4 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/atomic_fetch-1.c b/gcc/testsuite/gcc.target/nvptx/atomic_fetch-1.c
index c637caa..941cf3a 100644
--- a/gcc/testsuite/gcc.target/nvptx/atomic_fetch-1.c
+++ b/gcc/testsuite/gcc.target/nvptx/atomic_fetch-1.c
@@ -4,21 +4,97 @@
/* { dg-do compile } */
/* { dg-options "-O2 -misa=sm_35" } */
+enum memmodel
+{
+ MEMMODEL_RELAXED = 0
+};
+
+unsigned long long int *p64;
+unsigned int *p32;
+
+unsigned long long int g64;
+unsigned int g32;
+
+unsigned int s32 __attribute__((shared));
+unsigned long long int s64 __attribute__((shared));
+
+unsigned long long int v64;
+unsigned int v32;
+
int
main()
{
- unsigned long long a = ~0;
- unsigned b = 0xa;
+ /* Generic. */
- __atomic_fetch_add (&a, b, 0);
- __atomic_fetch_and (&a, b, 0);
- __atomic_fetch_or (&a, b, 0);
- __atomic_fetch_xor (&a, b, 0);
+ __atomic_fetch_add (p64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_and (p64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_or (p64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_xor (p64, v64, MEMMODEL_RELAXED);
- return a;
+ __atomic_fetch_add (p32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_and (p32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_or (p32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_xor (p32, v32, MEMMODEL_RELAXED);
+
+ /* Global. */
+
+ __atomic_fetch_add (&g64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_and (&g64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_or (&g64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_xor (&g64, v64, MEMMODEL_RELAXED);
+
+ __atomic_fetch_add (&g32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_and (&g32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_or (&g32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_xor (&g32, v32, MEMMODEL_RELAXED);
+
+ /* Shared. */
+
+ __atomic_fetch_add (&s64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_and (&s64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_or (&s64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_xor (&s64, v64, MEMMODEL_RELAXED);
+
+ __atomic_fetch_add (&s32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_and (&s32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_or (&s32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_xor (&s32, v32, MEMMODEL_RELAXED);
+
+ return 0;
}
-/* { dg-final { scan-assembler "atom.add.u64" } } */
-/* { dg-final { scan-assembler "atom.b64.and" } } */
-/* { dg-final { scan-assembler "atom.b64.or" } } */
-/* { dg-final { scan-assembler "atom.b64.xor" } } */
+/* Generic. */
+
+/* { dg-final { scan-assembler-times "atom.add.u64" 1 } } */
+/* { dg-final { scan-assembler-times "atom.b64.and" 1 } } */
+/* { dg-final { scan-assembler-times "atom.b64.or" 1 } } */
+/* { dg-final { scan-assembler-times "atom.b64.xor" 1 } } */
+
+/* { dg-final { scan-assembler-times "atom.add.u32" 1 } } */
+/* { dg-final { scan-assembler-times "atom.b32.and" 1 } } */
+/* { dg-final { scan-assembler-times "atom.b32.or" 1 } } */
+/* { dg-final { scan-assembler-times "atom.b32.xor" 1 } } */
+
+/* Global. */
+
+/* { dg-final { scan-assembler-times "atom.global.add.u64" 1 } } */
+/* { dg-final { scan-assembler-times "atom.global.b64.and" 1 } } */
+/* { dg-final { scan-assembler-times "atom.global.b64.or" 1 } } */
+/* { dg-final { scan-assembler-times "atom.global.b64.xor" 1 } } */
+
+/* { dg-final { scan-assembler-times "atom.global.add.u32" 1 } } */
+/* { dg-final { scan-assembler-times "atom.global.b32.and" 1 } } */
+/* { dg-final { scan-assembler-times "atom.global.b32.or" 1 } } */
+/* { dg-final { scan-assembler-times "atom.global.b32.xor" 1 } } */
+
+/* Shared. */
+
+/* { dg-final { scan-assembler-times "atom.shared.add.u64" 1 } } */
+/* { dg-final { scan-assembler-times "atom.shared.b64.and" 1 } } */
+/* { dg-final { scan-assembler-times "atom.shared.b64.or" 1 } } */
+/* { dg-final { scan-assembler-times "atom.shared.b64.xor" 1 } } */
+
+/* { dg-final { scan-assembler-times "atom.shared.add.u32" 1 } } */
+/* { dg-final { scan-assembler-times "atom.shared.b32.and" 1 } } */
+/* { dg-final { scan-assembler-times "atom.shared.b32.or" 1 } } */
+/* { dg-final { scan-assembler-times "atom.shared.b32.xor" 1 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/atomic_fetch-2.c b/gcc/testsuite/gcc.target/nvptx/atomic_fetch-2.c
index 1d35a17..f5131fc 100644
--- a/gcc/testsuite/gcc.target/nvptx/atomic_fetch-2.c
+++ b/gcc/testsuite/gcc.target/nvptx/atomic_fetch-2.c
@@ -4,21 +4,91 @@
/* { dg-do compile } */
/* { dg-options "-O2 -misa=sm_30" } */
+enum memmodel
+{
+ MEMMODEL_RELAXED = 0
+};
+
+unsigned long long int *p64;
+unsigned int *p32;
+
+unsigned long long int g64;
+unsigned int g32;
+
+unsigned int s32 __attribute__((shared));
+unsigned long long int s64 __attribute__((shared));
+
+unsigned long long int v64;
+unsigned int v32;
+
int
main()
{
- unsigned long long a = ~0;
- unsigned b = 0xa;
+ /* Generic. */
- __atomic_fetch_add (&a, b, 0);
- __atomic_fetch_and (&a, b, 0);
- __atomic_fetch_or (&a, b, 0);
- __atomic_fetch_xor (&a, b, 0);
+ __atomic_fetch_add (p64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_and (p64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_or (p64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_xor (p64, v64, MEMMODEL_RELAXED);
- return a;
+ __atomic_fetch_add (p32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_and (p32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_or (p32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_xor (p32, v32, MEMMODEL_RELAXED);
+
+ /* Global. */
+
+ __atomic_fetch_add (&g64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_and (&g64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_or (&g64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_xor (&g64, v64, MEMMODEL_RELAXED);
+
+ __atomic_fetch_add (&g32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_and (&g32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_or (&g32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_xor (&g32, v32, MEMMODEL_RELAXED);
+
+ /* Shared. */
+
+ __atomic_fetch_add (&s64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_and (&s64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_or (&s64, v64, MEMMODEL_RELAXED);
+ __atomic_fetch_xor (&s64, v64, MEMMODEL_RELAXED);
+
+ __atomic_fetch_add (&s32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_and (&s32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_or (&s32, v32, MEMMODEL_RELAXED);
+ __atomic_fetch_xor (&s32, v32, MEMMODEL_RELAXED);
+
+ return 0;
}
-/* { dg-final { scan-assembler-not "atom.b64.add" } } */
-/* { dg-final { scan-assembler-not "atom.b64.and" } } */
-/* { dg-final { scan-assembler-not "atom.b64.or" } } */
-/* { dg-final { scan-assembler-not "atom.b64.xor" } } */
+/* Generic. */
+
+/* { dg-final { scan-assembler-times "atom.add.u64" 1 } } */
+/* { dg-final { scan-assembler-times "atom.cas.b64" 3 } } */
+
+/* { dg-final { scan-assembler-times "atom.add.u32" 1 } } */
+/* { dg-final { scan-assembler-times "atom.b32.and" 1 } } */
+/* { dg-final { scan-assembler-times "atom.b32.or" 1 } } */
+/* { dg-final { scan-assembler-times "atom.b32.xor" 1 } } */
+
+/* Global. */
+
+/* { dg-final { scan-assembler-times "atom.global.add.u64" 1 } } */
+/* { dg-final { scan-assembler-times "atom.global.cas.b64" 3 } } */
+
+/* { dg-final { scan-assembler-times "atom.global.add.u32" 1 } } */
+/* { dg-final { scan-assembler-times "atom.global.b32.and" 1 } } */
+/* { dg-final { scan-assembler-times "atom.global.b32.or" 1 } } */
+/* { dg-final { scan-assembler-times "atom.global.b32.xor" 1 } } */
+
+/* Shared. */
+
+/* { dg-final { scan-assembler-times "atom.shared.add.u64" 1 } } */
+/* { dg-final { scan-assembler-times "atom.shared.cas.b64" 3 } } */
+
+/* { dg-final { scan-assembler-times "atom.shared.add.u32" 1 } } */
+/* { dg-final { scan-assembler-times "atom.shared.b32.and" 1 } } */
+/* { dg-final { scan-assembler-times "atom.shared.b32.or" 1 } } */
+/* { dg-final { scan-assembler-times "atom.shared.b32.xor" 1 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/bool-1.c b/gcc/testsuite/gcc.target/nvptx/bool-1.c
new file mode 100644
index 0000000..9b8a2d4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/bool-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+foo (int x, int y)
+{
+ return (x == 21) && (y == 69);
+}
+
+/* { dg-final { scan-assembler-not "cvt.u16.u8" } } */
+/* { dg-final { scan-assembler-not "cvt.u32.u16" } } */
+/* { dg-final { scan-assembler-not "cvt.u32.u8" } } */
+
+/* { dg-final { scan-assembler-times "setp.eq.u32" 2 } } */
+/* { dg-final { scan-assembler-times "selp.u32" 1 } } */
+/* { dg-final { scan-assembler-times "and.pred" 1 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/bool-2.c b/gcc/testsuite/gcc.target/nvptx/bool-2.c
new file mode 100644
index 0000000..b779248
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/bool-2.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int foo(int x, int y)
+{
+ return (x==21) && (y==69);
+}
+
+int bar(int x, int y)
+{
+ return (x==21) & (y==69);
+}
+
+/* { dg-final { scan-assembler-times "and.pred" 2 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/bool-3.c b/gcc/testsuite/gcc.target/nvptx/bool-3.c
new file mode 100644
index 0000000..ab4206a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/bool-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int foo(int x, int y)
+{
+ return (x==21) || (y==69);
+}
+
+int bar(int x, int y)
+{
+ return (x==21) | (y==69);
+}
+
+/* { dg-final { scan-assembler-times "or.pred" 2 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/bool-4.c b/gcc/testsuite/gcc.target/nvptx/bool-4.c
new file mode 100644
index 0000000..b588574
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/bool-4.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int foo(int x, int y)
+{
+ return (x==21) ^ (y==69);
+}
+
+/* { dg-final { scan-assembler "xor.pred" } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/cnot-1.c b/gcc/testsuite/gcc.target/nvptx/cnot-1.c
new file mode 100644
index 0000000..d0bdccd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/cnot-1.c
@@ -0,0 +1,94 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int test1(int x)
+{
+ return !x;
+}
+
+int test2(int x)
+{
+ return x ? 0 : 1;
+}
+
+int test3(int x)
+{
+ return (x == 0) ? 1 : 0;
+}
+
+unsigned int test4(unsigned int x)
+{
+ return !x;
+}
+
+unsigned int test5(unsigned int x)
+{
+ return x ? 0 : 1;
+}
+
+unsigned int test6(unsigned int x)
+{
+ return (x == 0) ? 1 : 0;
+}
+
+short test7(short x)
+{
+ return !x;
+}
+
+short test8(short x)
+{
+ return x ? 0 : 1;
+}
+
+short test9(short x)
+{
+ return (x == 0) ? 1 : 0;
+}
+
+unsigned short test10(unsigned short x)
+{
+ return !x;
+}
+
+unsigned short test11(unsigned short x)
+{
+ return x ? 0 : 1;
+}
+
+unsigned short test12(unsigned short x)
+{
+ return (x == 0) ? 1 : 0;
+}
+
+long test13(long x)
+{
+ return !x;
+}
+
+long test14(long x)
+{
+ return x ? 0 : 1;
+}
+
+long test15(long x)
+{
+ return (x == 0) ? 1: 0;
+}
+
+unsigned long test16(unsigned long x)
+{
+ return !x;
+}
+
+unsigned long test17(unsigned long x)
+{
+ return x ? 0 : 1;
+}
+
+unsigned long test18(unsigned long x)
+{
+ return (x == 0) ? 1 : 0;
+}
+
+/* { dg-final { scan-assembler-times "cnot.b" 18 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/exttrunc-1.c b/gcc/testsuite/gcc.target/nvptx/exttrunc-1.c
new file mode 100644
index 0000000..ed9ceee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/exttrunc-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+short exttrunc_hi2_qi(short x)
+{
+ return (char)x;
+}
+
+/* Match:
+ mov.u32 %r24, %ar0;
+ cvt.u32.u32 %r26, %r24;
+ cvt.s32.s8 %value, %r26;
+ Todo: Remove cvt.u32.u32. */
+
+/* { dg-final { scan-assembler-times "mov\.u32\t%r\[0-9\]*, %ar0" 1 } } */
+/* { dg-final { scan-assembler-times "mov\." 1 } } */
+
+/* { dg-final { scan-assembler-times "cvt\.u32\.u32" 1 } } */
+/* { dg-final { scan-assembler-times "cvt\.s32\.s8" 1 } } */
+/* { dg-final { scan-assembler-times "cvt\." 2 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/exttrunc-2.c b/gcc/testsuite/gcc.target/nvptx/exttrunc-2.c
new file mode 100644
index 0000000..b108b55
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/exttrunc-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int exttrunc_si2_qi(int x)
+{
+ return (char)x;
+}
+
+/* Match:
+ mov.u32 %r24, %ar0;
+ cvt.s32.s8 %value, %r24; */
+
+/* { dg-final { scan-assembler-times "mov\.u32\t%r\[0-9\]*, %ar0" 1 } } */
+/* { dg-final { scan-assembler-times "mov\." 1 } } */
+
+/* { dg-final { scan-assembler-times "cvt\.s32\.s8" 1 } } */
+/* { dg-final { scan-assembler-times "cvt\." 1 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/exttrunc-3.c b/gcc/testsuite/gcc.target/nvptx/exttrunc-3.c
new file mode 100644
index 0000000..69e42fa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/exttrunc-3.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+long exttrunc_di2_qi(long x)
+{
+ return (char)x;
+}
+
+/* Match:
+ mov.u64 %r24, %ar0;
+ cvt.s64.s8 %value, %r24; */
+
+/* { dg-final { scan-assembler-times "mov\.u64\t%r\[0-9\]*, %ar0" 1 } } */
+/* { dg-final { scan-assembler-times "mov\." 1 } } */
+
+/* { dg-final { scan-assembler-times "cvt\.s64\.s8" 1 } } */
+/* { dg-final { scan-assembler-times "cvt\." 1 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/exttrunc-4.c b/gcc/testsuite/gcc.target/nvptx/exttrunc-4.c
new file mode 100644
index 0000000..09009db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/exttrunc-4.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int exttrunc_si2_hi(int x)
+{
+ return (short)x;
+}
+
+/* Match:
+ mov.u32 %r24, %ar0;
+ cvt.s32.s16 %value, %r24;
+
+/* { dg-final { scan-assembler-times "mov\.u32\t%r\[0-9\]*, %ar0" 1 } } */
+/* { dg-final { scan-assembler-times "mov\." 1 } } */
+
+/* { dg-final { scan-assembler-times "cvt\.s32\.s16" 1 } } */
+/* { dg-final { scan-assembler-times "cvt\." 1 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/exttrunc-5.c b/gcc/testsuite/gcc.target/nvptx/exttrunc-5.c
new file mode 100644
index 0000000..5445850
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/exttrunc-5.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+long exttrunc_di2_hi(long x)
+{
+ return (short)x;
+}
+
+/* Match:
+ mov.u64 %r24, %ar0;
+ cvt.s64.s16 %value, %r24; */
+
+/* { dg-final { scan-assembler-times "mov\.u64\t%r\[0-9\]*, %ar0" 1 } } */
+/* { dg-final { scan-assembler-times "mov\." 1 } } */
+
+/* { dg-final { scan-assembler-times "cvt\.s64\.s16" 1 } } */
+/* { dg-final { scan-assembler-times "cvt\." 1 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/exttrunc-6.c b/gcc/testsuite/gcc.target/nvptx/exttrunc-6.c
new file mode 100644
index 0000000..74f050f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/exttrunc-6.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+long exttrunc_di2_si(long x)
+{
+ return (int)x;
+}
+
+/* Match:
+ mov.u64 %r24, %ar0;
+ cvt.s64.s32 %value, %r24; */
+
+/* { dg-final { scan-assembler-times "mov\.u64\t%r\[0-9\]*, %ar0" 1 } } */
+/* { dg-final { scan-assembler-times "mov\." 1 } } */
+
+/* { dg-final { scan-assembler-times "cvt\.s64\.s32" 1 } } */
+/* { dg-final { scan-assembler-times "cvt\." 1 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/float16-1.c b/gcc/testsuite/gcc.target/nvptx/float16-1.c
new file mode 100644
index 0000000..3a0324d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/float16-1.c
@@ -0,0 +1,53 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -misa=sm_53 -mptx=6.3 -ffast-math" } */
+
+_Float16 var;
+
+float load()
+{
+ return var;
+}
+
+void store(float x)
+{
+ var = x;
+}
+
+void move(_Float16 *dst, _Float16 *src)
+{
+ *dst = *src;
+}
+
+double plus(double x, double y)
+{
+ _Float16 hx = x;
+ _Float16 hy = y;
+ _Float16 hz = hx + hy;
+ return hz;
+}
+
+double minus(double x, double y)
+{
+ _Float16 hx = x;
+ _Float16 hy = y;
+ _Float16 hz = hx - hy;
+ return hz;
+}
+
+double mult(double x, double y)
+{
+ _Float16 hx = x;
+ _Float16 hy = y;
+ _Float16 hz = hx * hy;
+ return hz;
+}
+
+/* { dg-final { scan-assembler-times "ld.b16" 2 } } */
+/* { dg-final { scan-assembler-times "cvt.f32.f16" 1 } } */
+/* { dg-final { scan-assembler-times "cvt.rn.f16.f32" 1 } } */
+/* { dg-final { scan-assembler-times "st.b16" 2 } } */
+/* { dg-final { scan-assembler-times "add.f16" 1 } } */
+/* { dg-final { scan-assembler-times "sub.f16" 1 } } */
+/* { dg-final { scan-assembler-times "mul.f16" 1 } } */
+/* { dg-final { scan-assembler-times "cvt.rn.f16.f64" 6 } } */
+/* { dg-final { scan-assembler-times "cvt.f64.f16" 3 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/float16-2.c b/gcc/testsuite/gcc.target/nvptx/float16-2.c
new file mode 100644
index 0000000..5748a9c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/float16-2.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math -misa=sm_80 -mptx=7.0" } */
+
+_Float16 x;
+_Float16 y;
+_Float16 t;
+
+void foo()
+{
+ t = x < y ? x : y;
+}
+
+void bar()
+{
+ t = x > y ? x : y;
+}
+
+/* { dg-final { scan-assembler "min.f16" } } */
+/* { dg-final { scan-assembler "max.f16" } } */
+
diff --git a/gcc/testsuite/gcc.target/nvptx/float16-3.c b/gcc/testsuite/gcc.target/nvptx/float16-3.c
new file mode 100644
index 0000000..914282a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/float16-3.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -misa=sm_53 -mptx=6.3" } */
+
+_Float16 var;
+
+void neg()
+{
+ var = -var;
+}
+
+/* { dg-final { scan-assembler "xor.b16" } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/float16-4.c b/gcc/testsuite/gcc.target/nvptx/float16-4.c
new file mode 100644
index 0000000..b11f17a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/float16-4.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -misa=sm_53 -mptx=6.3 -ffast-math" } */
+
+_Float16 var;
+
+void foo()
+{
+ var = (var < (_Float16)0.0) ? -var : var;
+}
+
+/* { dg-final { scan-assembler "and.b16" } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/float16-5.c b/gcc/testsuite/gcc.target/nvptx/float16-5.c
new file mode 100644
index 0000000..5fe15ec
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/float16-5.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -misa=sm_53 -mptx=6.3 -ffast-math" } */
+
+_Float16 a;
+_Float16 b;
+_Float16 c;
+_Float16 d;
+
+void foo()
+{
+ a = (_Float16)(b*c) + d;
+}
+
+/* { dg-final { scan-assembler "fma.rn.f16" } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/float16-6.c b/gcc/testsuite/gcc.target/nvptx/float16-6.c
new file mode 100644
index 0000000..8fe4fa3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/float16-6.c
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -misa=sm_53 -mptx=6.3" } */
+
+_Float16 x;
+_Float16 y;
+
+_Bool eq()
+{
+ return x == y;
+}
+
+_Bool ne()
+{
+ return x != y;
+}
+
+_Bool lt()
+{
+ return x < y;
+}
+
+_Bool le()
+{
+ return x <= y;
+}
+
+_Bool gt()
+{
+ return x < y;
+}
+
+_Bool ge()
+{
+ return x >= y;
+}
+
+/* { dg-final { scan-assembler-times "setp\.\[a-z\]*\.f16" 6 } } */
+/* { dg-final { scan-assembler-not "cvt.f32.f16" } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/isinf.c b/gcc/testsuite/gcc.target/nvptx/isinf.c
new file mode 100644
index 0000000..c433612
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/isinf.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int foo(double x)
+{
+ return __builtin_isinf(x);
+}
+
+/* { dg-final { scan-assembler-times "testp.infinite.f64" 1 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/mul-hi64.c b/gcc/testsuite/gcc.target/nvptx/mul-hi64.c
new file mode 100644
index 0000000..a45a0e3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/mul-hi64.c
@@ -0,0 +1,47 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wno-long-long" } */
+
+typedef unsigned int __attribute ((mode(TI))) uti_t;
+typedef int __attribute ((mode(TI))) ti_t;
+
+long test1(long x, long y)
+{
+ return ((ti_t)x * (ti_t)y) >> 64;
+}
+
+long test2(long x)
+{
+ return ((ti_t)x * 19065) >> 64;
+}
+
+long test3(long x, long y)
+{
+ return (uti_t)((ti_t)x * (ti_t)y) >> 64;
+}
+
+long test4(long x)
+{
+ return (uti_t)((ti_t)x * 19065) >> 64;
+}
+
+ti_t test5(long x, long y)
+{
+ return ((ti_t)x * (ti_t)y) >> 64;
+}
+
+ti_t test6(long x)
+{
+ return ((ti_t)x * 19065) >> 64;
+}
+
+uti_t test7(long x, long y)
+{
+ return (uti_t)((ti_t)x * (ti_t)y) >> 64;
+}
+
+uti_t test8(long x)
+{
+ return (uti_t)((ti_t)x * 19065) >> 64;
+}
+
+/* { dg-final { scan-assembler-times "mul.hi.s64" 8 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/mul-wide64.c b/gcc/testsuite/gcc.target/nvptx/mul-wide64.c
new file mode 100644
index 0000000..a273c66
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/mul-wide64.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef int __attribute ((mode(TI))) ti_t;
+
+ti_t foo(long x, long y)
+{
+ return (ti_t)x * (ti_t)y;
+}
+
+/* { dg-final { scan-assembler-times "mul.lo.u64" 1 } } */
+/* { dg-final { scan-assembler-times "mul.hi.s64" 1 } } */
+
diff --git a/gcc/testsuite/gcc.target/nvptx/neg-selp.c b/gcc/testsuite/gcc.target/nvptx/neg-selp.c
new file mode 100644
index 0000000..a8f0118
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/neg-selp.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int neg(int x, int y)
+{
+ int t = (x == y) ? 1 : 0;
+ return -t;
+}
+
+int not(int x, int y)
+{
+ int t = (x == y) ? 1 : 0;
+ return ~t;
+}
+
+/* { dg-final { scan-assembler-not "neg.s32" } } */
+/* { dg-final { scan-assembler-not "not.b32" } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/nvptx.exp b/gcc/testsuite/gcc.target/nvptx/nvptx.exp
index 166939f..284ba41 100644
--- a/gcc/testsuite/gcc.target/nvptx/nvptx.exp
+++ b/gcc/testsuite/gcc.target/nvptx/nvptx.exp
@@ -1,5 +1,5 @@
# Specific regression driver for nvptx.
-# Copyright (C) 2015-2021 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 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/nvptx/softstack-2.c b/gcc/testsuite/gcc.target/nvptx/softstack-2.c
new file mode 100644
index 0000000..cccfda9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/softstack-2.c
@@ -0,0 +1,11 @@
+/* { dg-options "-O2 -msoft-stack" } */
+
+int
+f (void)
+{
+ int a = 0;
+ return __sync_lock_test_and_set (&a, 1);
+}
+
+/* { dg-final { scan-assembler-times "atom.exch" 1 } } */
+
diff --git a/gcc/testsuite/gcc.target/nvptx/stack-atomics-run.c b/gcc/testsuite/gcc.target/nvptx/stack-atomics-run.c
new file mode 100644
index 0000000..cd04596
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/stack-atomics-run.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+
+enum memmodel {
+ MEMMODEL_RELAXED = 0
+};
+
+int
+main (void)
+{
+ int a, b;
+
+ a = 1;
+ __atomic_fetch_add (&a, 1, MEMMODEL_RELAXED);
+ if (a != 2)
+ __builtin_abort ();
+
+ a = 0;
+ __atomic_fetch_or (&a, 1, MEMMODEL_RELAXED);
+ if (a != 1)
+ __builtin_abort ();
+
+ a = 1;
+ b = -1;
+ b = __atomic_exchange_n (&a, 0, MEMMODEL_RELAXED);
+ if (a != 0)
+ __builtin_abort ();
+ if (b != 1)
+ __builtin_abort ();
+
+ a = 1;
+ b = -1;
+ {
+ int expected = a;
+ b = __atomic_compare_exchange_n (&a, &expected, 0, 0, MEMMODEL_RELAXED,
+ MEMMODEL_RELAXED);
+ }
+ if (a != 0)
+ __builtin_abort ();
+ if (b != 1)
+ __builtin_abort ();
+
+ a = 1;
+ __atomic_store_n (&a, 0, MEMMODEL_RELAXED);
+ if (a != 0)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/nvptx/tanh-1.c b/gcc/testsuite/gcc.target/nvptx/tanh-1.c
new file mode 100644
index 0000000..56a0e5a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/tanh-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math -misa=sm_75 -mptx=7.0" } */
+
+float foo(float x)
+{
+ return __builtin_tanhf(x);
+}
+
+/* { dg-final { scan-assembler "tanh.approx.f32" } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/umul-hi64.c b/gcc/testsuite/gcc.target/nvptx/umul-hi64.c
new file mode 100644
index 0000000..6e09b74
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/umul-hi64.c
@@ -0,0 +1,47 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wno-long-long" } */
+
+typedef unsigned int __attribute ((mode(TI))) uti_t;
+typedef int __attribute ((mode(TI))) ti_t;
+
+unsigned long test1(unsigned long x, unsigned long y)
+{
+ return ((uti_t)x * (uti_t)y) >> 64;
+}
+
+unsigned long test2(unsigned long x)
+{
+ return ((uti_t)x * 19065) >> 64;
+}
+
+unsigned long test3(unsigned long x, unsigned long y)
+{
+ return (ti_t)((uti_t)x * (uti_t)y) >> 64;
+}
+
+unsigned long test4(unsigned long x)
+{
+ return (ti_t)((uti_t)x * 19065) >> 64;
+}
+
+uti_t test5(unsigned long x, unsigned long y)
+{
+ return ((uti_t)x * (uti_t)y) >> 64;
+}
+
+uti_t test6(unsigned long x)
+{
+ return ((uti_t)x * 19065) >> 64;
+}
+
+ti_t test7(unsigned long x, unsigned long y)
+{
+ return (ti_t)((uti_t)x * (uti_t)y) >> 64;
+}
+
+ti_t test8(unsigned long x)
+{
+ return (ti_t)((uti_t)x * 19065) >> 64;
+}
+
+/* { dg-final { scan-assembler-times "mul.hi.u64" 8 } } */
diff --git a/gcc/testsuite/gcc.target/nvptx/umul-wide64.c b/gcc/testsuite/gcc.target/nvptx/umul-wide64.c
new file mode 100644
index 0000000..4cbdf0b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/umul-wide64.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef unsigned int __attribute ((mode(TI))) uti_t;
+
+uti_t foo(unsigned long x, unsigned long y)
+{
+ return (uti_t)x * (uti_t)y;
+}
+
+/* { dg-final { scan-assembler-times "mul.lo.u64" 1 } } */
+/* { dg-final { scan-assembler-times "mul.hi.u64" 1 } } */
+
diff --git a/gcc/testsuite/gcc.target/nvptx/uniform-simt-1.c b/gcc/testsuite/gcc.target/nvptx/uniform-simt-1.c
new file mode 100644
index 0000000..1bc0ada
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/uniform-simt-1.c
@@ -0,0 +1,18 @@
+/* { dg-options "-O2 -muniform-simt" } */
+
+enum memmodel
+{
+ MEMMODEL_RELAXED = 0,
+};
+
+int a = 0;
+
+int
+f (void)
+{
+ int expected = 1;
+ return __atomic_compare_exchange_n (&a, &expected, 0, 0, MEMMODEL_RELAXED,
+ MEMMODEL_RELAXED);
+}
+
+/* { dg-final { scan-assembler-times "@%r\[0-9\]*\tatom.global.cas" 1 } } */
diff --git a/gcc/testsuite/gcc.target/or1k/or1k.exp b/gcc/testsuite/gcc.target/or1k/or1k.exp
index fef2d1c..0b4a7f6 100644
--- a/gcc/testsuite/gcc.target/or1k/or1k.exp
+++ b/gcc/testsuite/gcc.target/or1k/or1k.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2021 Free Software Foundation, Inc.
+# Copyright (C) 2017-2022 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/powerpc/bfp/bfp.exp b/gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp
index d83e0ab..0b20a08 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2021 Free Software Foundation, Inc.
+# Copyright (C) 2014-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c
index 9221806..53b67c9 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-2.c
@@ -14,7 +14,7 @@ get_exponent (double *p)
{
double source = *p;
- return scalar_extract_exp (source); /* { dg-error "'__builtin_vec_scalar_extract_exp' is not supported in this compiler configuration" } */
+ return scalar_extract_exp (source); /* { dg-error "'__builtin_vsx_scalar_extract_exp' requires the" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-5.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-5.c
index 34184812..8cbb319 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-5.c
@@ -14,7 +14,7 @@ get_exponent (__ieee128 *p)
{
__ieee128 source = *p;
- return scalar_extract_exp (source); /* { dg-error "requires ISA 3.0 IEEE 128-bit floating point" } */
+ return scalar_extract_exp (source); /* { dg-error "requires quad-precision floating-point arithmetic" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-2.c
index e24d4bd..39ee74c 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-2.c
@@ -12,5 +12,5 @@ get_significand (double *p)
{
double source = *p;
- return __builtin_vec_scalar_extract_sig (source); /* { dg-error "'__builtin_vec_scalar_extract_sig' is not supported in this compiler configuration" } */
+ return __builtin_vec_scalar_extract_sig (source); /* { dg-error "'__builtin_vsx_scalar_extract_sig' requires the" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-5.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-5.c
index 13c64fc..f3b6473 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-5.c
@@ -12,5 +12,5 @@ get_significand (__ieee128 *p)
{
__ieee128 source = *p;
- return (long long int) __builtin_vec_scalar_extract_sig (source); /* { dg-error "requires ISA 3.0 IEEE 128-bit floating point" } */
+ return (long long int) __builtin_vec_scalar_extract_sig (source); /* { dg-error "requires quad-precision floating-point arithmetic" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-11.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-11.c
index a5dd852..bee5460 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-11.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-11.c
@@ -16,5 +16,5 @@ insert_exponent (__ieee128 *significand_p,
__ieee128 significand = *significand_p;
unsigned long long int exponent = *exponent_p;
- return scalar_insert_exp (significand, exponent); /* { dg-error "requires ISA 3.0 IEEE 128-bit floating point" } */
+ return scalar_insert_exp (significand, exponent); /* { dg-error "requires quad-precision floating-point arithmetic" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c
index feb9431..efd6972 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-2.c
@@ -16,5 +16,5 @@ insert_exponent (unsigned long long int *significand_p,
unsigned long long int significand = *significand_p;
unsigned long long int exponent = *exponent_p;
- return scalar_insert_exp (significand, exponent); /* { dg-error "'__builtin_vec_scalar_insert_exp' is not supported in this compiler configuration" } */
+ return scalar_insert_exp (significand, exponent); /* { dg-error "'__builtin_vsx_scalar_insert_exp' requires the" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c
index 0e5683d..f85966a 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-5.c
@@ -16,5 +16,5 @@ insert_exponent (double *significand_p,
double significand = *significand_p;
unsigned long long int exponent = *exponent_p;
- return scalar_insert_exp (significand, exponent); /* { dg-error "'__builtin_vec_scalar_insert_exp' is not supported in this compiler configuration" } */
+ return scalar_insert_exp (significand, exponent); /* { dg-error "'__builtin_vsx_scalar_insert_exp_dp' requires the" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-8.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-8.c
index bd68f77..b1be828 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-8.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-8.c
@@ -16,5 +16,5 @@ insert_exponent (unsigned __int128 *significand_p, /* { dg-error "'__int128' is
unsigned __int128 significand = *significand_p; /* { dg-error "'__int128' is not supported on this target" } */
unsigned long long int exponent = *exponent_p;
- return scalar_insert_exp (significand, exponent); /* { dg-error "'__builtin_vec_scalar_insert_exp' is not supported in this compiler configuration" } */
+ return scalar_insert_exp (significand, exponent); /* { dg-error "'__builtin_vsx_scalar_insert_exp' requires the" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-10.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-10.c
index 2e3643c..fcf6a9d 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-10.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-10.c
@@ -13,6 +13,6 @@ test_data_class (__ieee128 *p, const int condition_flag)
{
__ieee128 source = *p;
- return scalar_test_data_class (source, condition_flag); /* { dg-error "argument 2 must be a 7-bit unsigned literal" } */
+ return scalar_test_data_class (source, condition_flag); /* { dg-error "argument 2 must be a literal between 0 and 127, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-2.c
index 59f03a3..9130c97 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-2.c
@@ -10,6 +10,6 @@ test_data_class (double *p)
{
double source = *p;
- return scalar_test_data_class (source, 256); /* { dg-error "argument 2 must be a 7-bit unsigned literal" } */
+ return scalar_test_data_class (source, 256); /* { dg-error "argument 2 must be a literal between 0 and 127, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-3.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-3.c
index d3d9426..b863bb2 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-3.c
@@ -10,6 +10,6 @@ test_data_class (float *p)
{
float source = *p;
- return scalar_test_data_class (source, 256); /* { dg-error "argument 2 must be a 7-bit unsigned literal" } */
+ return scalar_test_data_class (source, 256); /* { dg-error "argument 2 must be a literal between 0 and 127, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-4.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-4.c
index 210fa41..83ddffa 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-4.c
@@ -10,6 +10,6 @@ test_data_class (double *p, const int condition_flag)
{
double source = *p;
- return scalar_test_data_class (source, condition_flag); /* { dg-error "argument 2 must be a 7-bit unsigned literal" } */
+ return scalar_test_data_class (source, condition_flag); /* { dg-error "argument 2 must be a literal between 0 and 127, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-5.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-5.c
index b66f0a2..101a919 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-5.c
@@ -10,6 +10,6 @@ test_data_class (float *p, const int condition_flag)
{
float source = *p;
- return scalar_test_data_class (source, condition_flag); /* { dg-error "argument 2 must be a 7-bit unsigned literal" } */
+ return scalar_test_data_class (source, condition_flag); /* { dg-error "argument 2 must be a literal between 0 and 127, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-9.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-9.c
index cfa9a9c..f87851c 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-9.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-9.c
@@ -13,6 +13,6 @@ test_data_class (__ieee128 *p)
/* IEEE 128-bit floating point operations are only supported
on 64-bit targets. */
- return scalar_test_data_class (source, 256); /* { dg-error "argument 2 must be a 7-bit unsigned literal" } */
+ return scalar_test_data_class (source, 256); /* { dg-error "argument 2 must be a literal between 0 and 127, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-2.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-2.c
index 7d2b4de..46d743a 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-2.c
@@ -10,5 +10,5 @@ test_neg (float *p)
{
float source = *p;
- return __builtin_vec_scalar_test_neg_sp (source); /* { dg-error "'__builtin_vsx_scalar_test_neg_sp' requires" } */
+ return __builtin_vec_scalar_test_neg (source); /* { dg-error "'__builtin_vsx_scalar_test_neg_sp' requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-3.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-3.c
index b503dfa..bfc892b 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-3.c
@@ -10,5 +10,5 @@ test_neg (double *p)
{
double source = *p;
- return __builtin_vec_scalar_test_neg_dp (source); /* { dg-error "'__builtin_vsx_scalar_test_neg_dp' requires" } */
+ return __builtin_vec_scalar_test_neg (source); /* { dg-error "'__builtin_vsx_scalar_test_neg_dp' requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c
index bab8604..8c55c1c 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c
@@ -10,5 +10,5 @@ test_neg (__ieee128 *p)
{
__ieee128 source = *p;
- return __builtin_vec_scalar_test_neg_qp (source); /* { dg-error "'__builtin_vsx_scalar_test_neg_qp' requires" } */
+ return __builtin_vec_scalar_test_neg (source); /* { dg-error "'__builtin_vsx_scalar_test_neg_qp' requires" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-4.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-4.c
index 56ce5f9..448406c 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-4.c
@@ -9,5 +9,5 @@ get_data_class_flags (__vector float *p)
{
__vector float source = *p;
- return vec_test_data_class (source, 256); /* { dg-error "argument 2 must be a 7-bit unsigned literal" } */
+ return vec_test_data_class (source, 256); /* { dg-error "argument 2 must be a literal between 0 and 127, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-5.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-5.c
index 11624c9..64a52a1 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-5.c
@@ -9,5 +9,5 @@ get_data_class_flags (__vector double *p)
{
__vector double source = *p;
- return vec_test_data_class (source, 256); /* { dg-error "argument 2 must be a 7-bit unsigned literal" } */
+ return vec_test_data_class (source, 256); /* { dg-error "argument 2 must be a literal between 0 and 127, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-6.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-6.c
index 2c7e9de..5f35e0e 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-6.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-6.c
@@ -9,5 +9,5 @@ get_data_class_flags (__vector float *p, int condition_flag)
{
__vector float source = *p;
- return vec_test_data_class (source, condition_flag); /* { dg-error "argument 2 must be a 7-bit unsigned literal" } */
+ return vec_test_data_class (source, condition_flag); /* { dg-error "argument 2 must be a literal between 0 and 127, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-7.c b/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-7.c
index 86eff8d..bda2c6d 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/vec-test-data-class-7.c
@@ -9,5 +9,5 @@ get_data_class_flags (__vector double *p, int condition_flag)
{
__vector double source = *p;
- return vec_test_data_class (source, condition_flag); /* { dg-error "argument 2 must be a 7-bit unsigned literal" } */
+ return vec_test_data_class (source, condition_flag); /* { dg-error "argument 2 must be a literal between 0 and 127, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/builtin-feclearexcept-feraiseexcept-1.c b/gcc/testsuite/gcc.target/powerpc/builtin-feclearexcept-feraiseexcept-1.c
new file mode 100644
index 0000000..4482e89
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/builtin-feclearexcept-feraiseexcept-1.c
@@ -0,0 +1,76 @@
+/* { dg-do run } */
+/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-options "-lm -fno-builtin" } */
+
+/* This testcase ensures that the builtins expand with the matching arguments
+ or otherwise fallback gracefully to a function call, and don't ICE during
+ compilation.
+ "-fno-builtin" option is used to enable calls to libc implementation of the
+ gcc builtins tested when not using __builtin_ prefix. */
+
+#include <fenv.h>
+
+int
+main ()
+{
+ int rsi = 0;
+ long rsl = 0;
+ short rss = 0;
+ char rsc = 0;
+
+ unsigned int rui = 0;
+ unsigned long rul = 0;
+ unsigned short rus = 0;
+ unsigned char ruc = 0;
+
+ int e = FE_DIVBYZERO;
+
+ __builtin_feclearexcept(e); // CALL
+ __builtin_feclearexcept(FE_ALL_EXCEPT); // CALL
+ __builtin_feclearexcept(FE_INVALID); // CALL
+ __builtin_feclearexcept(FE_INVALID | FE_INEXACT); // CALL
+
+ __builtin_feclearexcept(FE_INEXACT | FE_DIVBYZERO |
+ FE_UNDERFLOW | FE_OVERFLOW); // EXPAND
+ __builtin_feclearexcept(FE_INEXACT | FE_OVERFLOW); // EXPAND
+ __builtin_feclearexcept(FE_INEXACT); // EXPAND
+ __builtin_feclearexcept(FE_DIVBYZERO); // EXPAND
+ __builtin_feclearexcept(FE_UNDERFLOW); // EXPAND
+ __builtin_feclearexcept(FE_OVERFLOW); // EXPAND
+ __builtin_feclearexcept(0); // EXPAND
+
+ rsi = __builtin_feclearexcept(FE_DIVBYZERO); // EXPAND
+ rsl = __builtin_feclearexcept(FE_DIVBYZERO); // EXPAND
+ rss = __builtin_feclearexcept(FE_DIVBYZERO); // EXPAND
+ rsc = __builtin_feclearexcept(FE_DIVBYZERO); // EXPAND
+ rui = __builtin_feclearexcept(FE_DIVBYZERO); // EXPAND
+ rul = __builtin_feclearexcept(FE_DIVBYZERO); // EXPAND
+ rus = __builtin_feclearexcept(FE_DIVBYZERO); // EXPAND
+ ruc = __builtin_feclearexcept(FE_DIVBYZERO); // EXPAND
+
+
+ __builtin_feraiseexcept(e); // CALL
+ __builtin_feraiseexcept(FE_ALL_EXCEPT); // CALL
+ __builtin_feraiseexcept(FE_INVALID); // CALL
+ __builtin_feraiseexcept(FE_INVALID | FE_INEXACT); // CALL
+
+ __builtin_feraiseexcept(FE_INEXACT | FE_DIVBYZERO |
+ FE_UNDERFLOW | FE_OVERFLOW); // EXPAND
+ __builtin_feraiseexcept(FE_INEXACT | FE_OVERFLOW); // EXPAND
+ __builtin_feraiseexcept(FE_INEXACT); // EXPAND
+ __builtin_feraiseexcept(FE_DIVBYZERO); // EXPAND
+ __builtin_feraiseexcept(FE_UNDERFLOW); // EXPAND
+ __builtin_feraiseexcept(FE_OVERFLOW); // EXPAND
+ __builtin_feraiseexcept(0); // EXPAND
+
+ rsi = __builtin_feraiseexcept(FE_DIVBYZERO); // EXPAND
+ rsl = __builtin_feraiseexcept(FE_DIVBYZERO); // EXPAND
+ rss = __builtin_feraiseexcept(FE_DIVBYZERO); // EXPAND
+ rsc = __builtin_feraiseexcept(FE_DIVBYZERO); // EXPAND
+ rui = __builtin_feraiseexcept(FE_DIVBYZERO); // EXPAND
+ rul = __builtin_feraiseexcept(FE_DIVBYZERO); // EXPAND
+ rus = __builtin_feraiseexcept(FE_DIVBYZERO); // EXPAND
+ ruc = __builtin_feraiseexcept(FE_DIVBYZERO); // EXPAND
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/builtin-feclearexcept-feraiseexcept-2.c b/gcc/testsuite/gcc.target/powerpc/builtin-feclearexcept-feraiseexcept-2.c
new file mode 100644
index 0000000..28c2a00
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/builtin-feclearexcept-feraiseexcept-2.c
@@ -0,0 +1,91 @@
+/* { dg-do run } */
+/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-options "-lm -fno-builtin" } */
+
+/* This testcase ensures that the builtins are correctly expanded and match the
+ expected result.
+ "-fno-builtin" option is used to enable calls to libc implementation of the
+ gcc builtins tested when not using __builtin_ prefix.
+ The excepts parameter needs to be passed as constant to
+ __builtin_feclearexcept and __builtin_feraiseexcept because some bultins only
+ expand on constant input. */
+
+#include <fenv.h>
+
+#ifdef DEBUG
+#include <stdio.h>
+#define INFO(...) printf(__VA_ARGS__)
+#define FAIL(ret, raised, expected, excepts, excepts_str, func) \
+ printf("ERROR [l %d] testing %s (%x): %s returned %d." \
+ " Raised except bits %x, expecected %x\n", \
+ __LINE__, excepts_str, excepts, func, ret, raised, expected)
+#else
+void abort (void);
+#define INFO(...)
+#define FAIL(ret, raised, expected, excepts, excepts_str, func) abort()
+#endif
+
+#define TEST(excepts) \
+ do { \
+ int ret = 0; \
+ int raised = 0; \
+ \
+ INFO("test: %s (%x)\n", #excepts, excepts); \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ ret = __builtin_feraiseexcept(excepts); \
+ raised = fetestexcept(FE_ALL_EXCEPT); \
+ if (ret != 0 || raised != (excepts)) \
+ FAIL(ret, raised, excepts, excepts, #excepts, \
+ "__builtin_feraiseexcept"); \
+ \
+ feraiseexcept(FE_ALL_EXCEPT); \
+ ret = __builtin_feclearexcept(excepts); \
+ raised = fetestexcept(FE_ALL_EXCEPT); \
+ if (ret != 0 || raised != (FE_ALL_EXCEPT & ~(excepts))) \
+ FAIL(ret, raised, FE_ALL_EXCEPT & ~(excepts), excepts, #excepts, \
+ "__builtin_feclearexcept"); \
+ } while (0)
+
+int
+main ()
+{
+ TEST(0);
+ TEST(FE_ALL_EXCEPT);
+
+ TEST(FE_INVALID);
+ TEST(FE_DIVBYZERO);
+ TEST(FE_INEXACT);
+ TEST(FE_OVERFLOW);
+ TEST(FE_UNDERFLOW);
+
+ TEST(FE_INVALID | FE_DIVBYZERO);
+ TEST(FE_INVALID | FE_INEXACT);
+ TEST(FE_INVALID | FE_OVERFLOW);
+ TEST(FE_INVALID | FE_UNDERFLOW);
+ TEST(FE_DIVBYZERO | FE_INEXACT);
+ TEST(FE_DIVBYZERO | FE_OVERFLOW);
+ TEST(FE_DIVBYZERO | FE_UNDERFLOW);
+ TEST(FE_INEXACT | FE_OVERFLOW);
+ TEST(FE_INEXACT | FE_UNDERFLOW);
+ TEST(FE_OVERFLOW | FE_UNDERFLOW);
+
+ TEST(FE_INVALID | FE_DIVBYZERO | FE_INEXACT);
+ TEST(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
+ TEST(FE_INVALID | FE_DIVBYZERO | FE_UNDERFLOW);
+ TEST(FE_INVALID | FE_INEXACT | FE_OVERFLOW);
+ TEST(FE_INVALID | FE_INEXACT | FE_UNDERFLOW);
+ TEST(FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW);
+ TEST(FE_DIVBYZERO | FE_INEXACT | FE_OVERFLOW);
+ TEST(FE_DIVBYZERO | FE_INEXACT | FE_UNDERFLOW);
+ TEST(FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW);
+ TEST(FE_INEXACT | FE_OVERFLOW | FE_UNDERFLOW);
+
+ TEST(FE_INVALID | FE_DIVBYZERO | FE_INEXACT | FE_UNDERFLOW);
+ TEST(FE_INVALID | FE_DIVBYZERO | FE_INEXACT | FE_OVERFLOW);
+ TEST(FE_INVALID | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW);
+ TEST(FE_INVALID | FE_INEXACT | FE_UNDERFLOW | FE_OVERFLOW);
+ TEST(FE_DIVBYZERO | FE_INEXACT | FE_UNDERFLOW | FE_OVERFLOW);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/builtin-fegetround.c b/gcc/testsuite/gcc.target/powerpc/builtin-fegetround.c
new file mode 100644
index 0000000..56ffc50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/builtin-fegetround.c
@@ -0,0 +1,36 @@
+/* { dg-do run } */
+/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-options "-lm -fno-builtin" } */
+
+/* This testcase ensures that the builtins is correctly expanded and match the
+ expected result from the standard function.
+ "-fno-builtin" option is used to enable calls to libc implementation of the
+ gcc builtins tested when not using __builtin_ prefix. */
+
+#include <fenv.h>
+
+#ifdef DEBUG
+#include <stdio.h>
+#define FAIL(v, e) printf("ERROR, __builtin_fegetround() returned %d," \
+ " not the expecected value %d\n", v, e);
+#else
+void abort (void);
+#define FAIL(v, e) abort()
+#endif
+
+int
+main ()
+{
+ int i, rounding, expected;
+ const int rm[] = {FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD};
+ for (i = 0; i < sizeof rm / sizeof rm[0]; i++)
+ {
+ fesetround(rm[i]);
+ rounding = __builtin_fegetround();
+ expected = fegetround();
+ if (rounding != expected)
+ FAIL(rounding, expected);
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-1-be-folded.c b/gcc/testsuite/gcc.target/powerpc/builtins-1-be-folded.c
index 26d10a7..3cc487d 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-1-be-folded.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-1-be-folded.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { powerpc-*-* } } } */
-/* { dg-options "-mdejagnu-cpu=power8 -O2 -mfold-gimple" } */
+/* { dg-options "-mdejagnu-cpu=power8 -O2" } */
/* Based on builtins-1-le.c ; ensure that the power8 builtins are accepted by
the compiler, at O2 with gimple folding enabled. */
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-1-le-folded.c b/gcc/testsuite/gcc.target/powerpc/builtins-1-le-folded.c
index 55a0c30..7193cd5 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-1-le-folded.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-1-le-folded.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { powerpc64le-*-* } } } */
-/* { dg-options "-mdejagnu-cpu=power8 -O2 -mfold-gimple" } */
+/* { dg-options "-mdejagnu-cpu=power8 -O2" } */
/* Based on builtins-1-le.c ; ensure that the power8 builtins are accepted by
the compiler, at O2 with gimple folding enabled. */
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-1.c b/gcc/testsuite/gcc.target/powerpc/builtins-1.c
index 2dafa90..28cd1aa 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-1.c
@@ -1,265 +1,954 @@
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power8 -O0 -mno-fold-gimple -dp" } */
-/* { dg-prune-output "gimple folding of rs6000 builtins has been disabled." } */
+/* { dg-options "-mdejagnu-cpu=power8 -O2" } */
+/* { dg-additional-options "-mbig" { target powerpc64le-*-* } } */
#include <altivec.h>
-vector double y = { 2.0, 4.0 };
-vector double z;
+vector float
+foo0 (vector float fa, vector float fb)
+{
+ return vec_and (fa, fb);
+}
+
+vector float
+foo1 (vector float fa, vector float fb)
+{
+ return vec_cpsgn (fa, fb);
+}
+
+vector float
+foo2 (vector float fa, vector float fb)
+{
+ return vec_mergeh (fa, fb);
+}
+
+vector float
+foo3 (vector float fa, vector float fb)
+{
+ return vec_mergel (fa, fb);
+}
+
+vector double
+foo4 (vector double da, vector double db)
+{
+ return vec_and (da, db);
+}
+
+vector long long
+foo5 (vector long long la, vector long long lb)
+{
+ return vec_and (la, lb);
+}
+
+vector long long
+foo6 (vector long long la, vector bool long long ld)
+{
+ return vec_and (la, ld);
+}
+
+vector long long
+foo7 (vector bool long long ld, vector long long lb)
+{
+ return vec_and (ld, lb);
+}
+
+vector unsigned long long
+foo8 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_and (ua, ub);
+}
+
+vector unsigned long long
+foo9 (vector unsigned long long ua, vector bool long long ud)
+{
+ return vec_and (ua, ud);
+}
+
+vector unsigned long long
+foo10 (vector bool long long ud, vector unsigned long long ub)
+{
+ return vec_and (ud, ub);
+}
+
+vector long long
+foo11 (vector long long la, vector long long lb)
+{
+ return vec_andc (la, lb);
+}
+
+vector long long
+foo12 (vector long long la, vector bool long long ld)
+{
+ return vec_andc (la, ld);
+}
+
+vector long long
+foo13 (vector bool long long ld, vector long long lb)
+{
+ return vec_andc (ld, lb);
+}
+
+vector unsigned long long
+foo14 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_andc (ua, ub);
+}
+
+vector unsigned long long
+foo15 (vector unsigned long long ua, vector bool long long ud)
+{
+ return vec_andc (ua, ud);
+}
+
+vector unsigned long long
+foo16 (vector bool long long ud, vector unsigned long long ub)
+{
+ return vec_andc (ud, ub);
+}
+
+vector double
+foo17 (vector double de, vector double df)
+{
+ return vec_cpsgn (de, df);
+}
+
+vector double
+foo18 (vector double de, vector double df)
+{
+ return vec_mergeh (de, df);
+}
+
+vector double
+foo19 (vector double de, vector double df)
+{
+ return vec_mergel (de, df);
+}
+
+vector long long
+foo20 (vector long long la, vector long long lb)
+{
+ return vec_mergeh (la, lb);
+}
+
+vector long long
+foo21 (vector long long la, vector bool long long ld)
+{
+ return vec_mergeh (la, ld);
+}
+
+vector long long
+foo22 (vector bool long long ld, vector long long lb)
+{
+ return vec_mergeh (ld, lb);
+}
+
+vector unsigned long long
+foo23 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_mergeh (ua, ub);
+}
+
+vector unsigned long long
+foo24 (vector unsigned long long ua, vector bool long long ud)
+{
+ return vec_mergeh (ua, ud);
+}
+
+vector unsigned long long
+foo25 (vector bool long long ud, vector unsigned long long ub)
+{
+ return vec_mergeh (ud, ub);
+}
+
+vector pixel
+foo26 (vector pixel pa, vector pixel pb)
+{
+ return vec_mergeh (pa, pb);
+}
+
+vector pixel
+foo27 (vector pixel pa, vector pixel pb)
+{
+ return vec_mergel (pa, pb);
+}
+
+vector long long
+foo28 (vector long long la, vector long long lb)
+{
+ return vec_mergel (la, lb);
+}
+
+vector long long
+foo29 (vector long long la, vector bool long long ld)
+{
+ return vec_mergel (la, ld);
+}
+
+vector long long
+foo30 (vector bool long long ld, vector long long lb)
+{
+ return vec_mergel (ld, lb);
+}
+
+vector unsigned long long
+foo31 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_mergel (ua, ub);
+}
+
+vector unsigned long long
+foo32 (vector unsigned long long ua, vector bool long long ud)
+{
+ return vec_mergel (ua, ud);
+}
+
+vector unsigned long long
+foo33 (vector bool long long ud, vector unsigned long long ub)
+{
+ return vec_mergel (ud, ub);
+}
+
+vector long long
+foo34 (vector long long la, vector long long lb)
+{
+ return vec_nor (la, lb);
+}
+
+vector long long
+foo35 (vector long long la, vector bool long long ld)
+{
+ return vec_nor (la, ld);
+}
+
+vector long long
+foo36 (vector bool long long ld, vector long long lb)
+{
+ return vec_nor (ld, lb);
+}
+
+vector unsigned long long
+foo37 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_nor (ua, ub);
+}
+
+vector unsigned long long
+foo38 (vector unsigned long long ua, vector bool long long ud)
+{
+ return vec_nor (ua, ud);
+}
+
+vector unsigned long long
+foo39 (vector bool long long ud, vector unsigned long long ub)
+{
+ return vec_nor (ud, ub);
+}
+
+vector long long
+foo40 (vector long long la, vector long long lb, vector unsigned char ca)
+{
+ return vec_perm (la, lb, ca);
+}
+
+vector unsigned char
+foo41 (vector unsigned char ca, vector unsigned char cbb)
+{
+ return vec_and (ca, cbb);
+}
+
+vector unsigned char
+foo42 (vector unsigned char ca, vector unsigned char cbb)
+{
+ return vec_andc (ca, cbb);
+}
+
+vector unsigned char
+foo43 (vector unsigned char ca, vector unsigned char cbb)
+{
+ return vec_mergel (ca, cbb);
+}
+
+vector unsigned long long
+foo44 (vector unsigned long long ua, vector unsigned long long ub,
+ vector unsigned char ca)
+{
+ return vec_perm (ua, ub, ca);
+}
+
+vector long long
+foo45 (vector long long la, vector long long lb, vector unsigned long long uc)
+{
+ return vec_sel (la, lb, uc);
+}
+
+vector long long
+foo46 (vector long long la, vector long long lb, vector bool long long ld)
+{
+ return vec_sel (la, lb, ld);
+}
+
+vector unsigned long long
+foo47 (vector unsigned long long ua, vector unsigned long long ub,
+ vector long long lc)
+{
+ return vec_sel (ua, ub, lc);
+}
+
+vector unsigned long long
+foo48 (vector unsigned long long ua, vector unsigned long long ub,
+ vector unsigned long long uc)
+{
+ return vec_sel (ua, ub, uc);
+}
+
+vector unsigned long long
+foo49 (vector unsigned long long ua, vector unsigned long long ub,
+ vector bool long long ld)
+{
+ return vec_sel (ua, ub, ld);
+}
+
+vector long long
+foo50 (vector long long la, vector long long lb)
+{
+ return vec_xor (la, lb);
+}
+
+vector long long
+foo51 (vector long long la, vector bool long long ld)
+{
+ return vec_xor (la, ld);
+}
+
+vector long long
+foo52 (vector bool long long ld, vector long long la)
+{
+ return vec_xor (ld, la);
+}
+
+vector unsigned long long
+foo53 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_xor (ua, ub);
+}
+
+vector unsigned long long
+foo54 (vector unsigned long long ua, vector bool long long ud)
+{
+ return vec_xor (ua, ud);
+}
+
+vector unsigned long long
+foo55 (vector bool long long ud, vector unsigned long long ua)
+{
+ return vec_xor (ud, ua);
+}
+
+int
+foo56 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_all_eq (ua, ub);
+}
+
+int
+foo57 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_all_ge (ua, ub);
+}
+
+int
+foo58 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_all_gt (ua, ub);
+}
+
+int
+foo59 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_all_le (ua, ub);
+}
+
+int
+foo60 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_all_lt (ua, ub);
+}
+
+int
+foo61 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_all_ne (ua, ub);
+}
+
+int
+foo62 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_any_eq (ua, ub);
+}
+
+int
+foo63 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_any_ge (ua, ub);
+}
+
+int
+foo64 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_any_gt (ua, ub);
+}
+
+int
+foo65 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_any_le (ua, ub);
+}
+
+int
+foo66 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_any_lt (ua, ub);
+}
+
+int
+foo67 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_any_ne (ua, ub);
+}
+
+vector short
+foo68 (vector short ssa, vector short ssb)
+{
+ return vec_and (ssa, ssb);
+}
+
+vector short
+foo69 (vector short ssa, vector short ssb)
+{
+ return vec_mergeh (ssa, ssb);
+}
+
+vector short
+foo70 (vector short ssa, vector short ssb)
+{
+ return vec_mergel (ssa, ssb);
+}
+
+vector int
+foo71 (vector int sia, vector int sib)
+{
+ return vec_and (sia, sib);
+}
+
+vector int
+foo72 (vector int sia, vector int sib)
+{
+ return vec_andc (sia, sib);
+}
+
+vector int
+foo73 (vector int sia, vector int sib)
+{
+ return vec_mergel (sia, sib);
+}
+
+vector unsigned int
+foo74 (vector unsigned int uia, vector unsigned int uib)
+{
+ return vec_and (uia, uib);
+}
+
+vector unsigned int
+foo75 (vector unsigned int uia, vector unsigned int uib)
+{
+ return vec_andc (uia, uib);
+}
+
+vector unsigned int
+foo76 (vector unsigned int uia, vector unsigned int uib)
+{
+ return vec_mergel (uia, uib);
+}
+
+vector bool char
+foo77 (vector bool char bca, vector bool char bcb)
+{
+ return vec_and (bca, bcb);
+}
+
+vector bool char
+foo78 (vector bool char bca, vector bool char bcb)
+{
+ return vec_andc (bca, bcb);
+}
+
+vector bool char
+foo79 (vector bool char bca, vector bool char bcb)
+{
+ return vec_mergel (bca, bcb);
+}
+
+vector bool short
+foo80 (vector bool short bsa, vector bool short bsb)
+{
+ return vec_and (bsa, bsb);
+}
+
+vector bool short
+foo81 (vector bool short bsa, vector bool short bsb)
+{
+ return vec_andc (bsa, bsb);
+}
+
+vector bool short
+foo82 (vector bool short bsa, vector bool short bsb)
+{
+ return vec_mergel (bsa, bsb);
+}
+
+vector bool int
+foo83 (vector bool int bia, vector bool int bib)
+{
+ return vec_and (bia, bib);
+}
+
+vector bool int
+foo84 (vector bool int bia, vector bool int bib)
+{
+ return vec_andc (bia, bib);
+}
+
+vector bool int
+foo85 (vector bool int bia, vector bool int bib)
+{
+ return vec_mergel (bia, bib);
+}
+
+vector unsigned int
+foo86 (vector unsigned long long ua, vector unsigned long long ub)
+{
+ return vec_packsu (ua, ub);
+}
+
+vector long long
+foo87 (vector long long la)
+{
+ return vec_cntlz (la);
+}
+
+vector unsigned long long
+foo88 (vector unsigned long long ua)
+{
+ return vec_cntlz (ua);
+}
+
+vector int
+foo89 (vector int sia)
+{
+ return vec_cntlz (sia);
+}
+
+vector unsigned int
+foo90 (vector unsigned int uia)
+{
+ return vec_cntlz (uia);
+}
+
+vector short
+foo91 (vector short ssa)
+{
+ return vec_cntlz (ssa);
+}
+
+vector unsigned short
+foo92 (vector unsigned short usa, vector unsigned short usb)
+{
+ return vec_and (usa, usb);
+}
+
+vector unsigned short
+foo93 (vector unsigned short usa, vector unsigned short usb)
+{
+ return vec_andc (usa, usb);
+}
+
+vector unsigned short
+foo94 (vector unsigned short usa)
+{
+ return vec_cntlz (usa);
+}
+
+vector unsigned short
+foo95 (vector unsigned short usa, vector unsigned short usb)
+{
+ return vec_mergeh (usa, usb);
+}
+
+vector unsigned short
+foo96 (vector unsigned short usa, vector unsigned short usb)
+{
+ return vec_mergel (usa, usb);
+}
+
+vector signed char
+foo97 (vector signed char sca)
+{
+ return vec_cntlz (sca);
+}
+
+vector signed char
+foo98 (vector signed char sca, vector signed char scb)
+{
+ return vec_mergel (sca, scb);
+}
+
+vector unsigned char
+foo99 (vector unsigned char ca)
+{
+ return vec_cntlz (ca);
+}
+
+vector double
+foo100 (vector double *y)
+{
+ return vec_xl (0, y);
+}
+
+void
+foo101 (vector double dd, vector double *z)
+{
+ vec_xst (dd, 0, z);
+}
+
+vector double
+foo102 (vector double dd)
+{
+ return vec_round (dd);
+}
+
+vector double
+foo103 (vector double dd)
+{
+ return vec_rsqrt (dd);
+}
+
+vector double
+foo104 (vector double dd)
+{
+ return vec_rsqrte (dd);
+}
+
+vector float
+foo105 (vector float fa)
+{
+ return vec_round (fa);
+}
+
+vector float
+foo106 (vector float fa)
+{
+ return vec_rsqrt (fa);
+}
+
+vector float
+foo107 (vector float fa)
+{
+ return vec_rsqrte (fa);
+}
+
+vector double
+foo108 (vector double de)
+{
+ return vec_splat (de, 0);
+}
+
+vector double
+foo109 (vector double de)
+{
+ return vec_splat (de, 1);
+}
+
+vector long long
+foo110 (vector long long l2)
+{
+ return vec_splat (l2, 0);
+}
+
+vector long long
+foo111 (vector long long l2)
+{
+ return vec_splat (l2, 1);
+}
+
+vector unsigned long long
+foo112 (vector unsigned long long u2)
+{
+ return vec_splat (u2, 0);
+}
+
+vector unsigned long long
+foo113 (vector unsigned long long u2)
+{
+ return vec_splat (u2, 1);
+}
+
+vector bool long long
+foo114 (vector bool long long ld)
+{
+ return vec_splat (ld, 0);
+}
+
+vector bool long long
+foo115 (vector bool long long ld)
+{
+ return vec_splat (ld, 1);
+}
+
+vector bool long long
+foo116 (vector bool long long la, vector bool long long lb)
+{
+ return vec_mergee (la, lb);
+}
+
+vector bool long long
+foo117 (vector bool long long la, vector bool long long lb)
+{
+ return vec_mergeo (la, lb);
+}
-int main ()
+vector bool long long
+foo118 (vector bool long long la, vector bool long long lb)
{
- vector float fa = {1.0, 2.0, 3.0, -4.0};
- vector float fb = {-2.0, -3.0, -4.0, -5.0};
- vector float fd = vec_and (fa, fb);
- vector float fc = vec_cpsgn (fa, fb);
- vector float fe = vec_mergeh (fa, fb);
- vector float ff = vec_mergel (fa, fb);
-
- vector double da = {1.0, 2.0};
- vector double db = {-2.0, -3.0};
- vector double dz = vec_and (da, db);
-
- vector signed int si_a = {1, 2, 3, 4};
- vector unsigned int ui_a = {1, 2, 3, 4};
-
- vector long long la = {5L, 14L};
- vector long long lb = {3L, 86L};
- vector long long lc = vec_and (la, lb);
- vector bool long long ld = {0, -1};
- vector long long le = vec_and (la, ld);
- vector long long lf = vec_and (ld, lb);
-
- vector unsigned long long ua = {5L, 14L};
- vector unsigned long long ub = {3L, 86L};
- vector unsigned long long uc = vec_and (ua, ub);
- vector bool long long ud = {0, -1};
- vector unsigned long long ue = vec_and (ua, ud);
- vector unsigned long long uf = vec_and (ud, ub);
-
- vector long long lg = vec_andc (la, lb);
- vector long long lh = vec_andc (la, ld);
- vector long long li = vec_andc (ld, lb);
-
- vector unsigned long long ug = vec_andc (ua, ub);
- vector unsigned long long uh = vec_andc (ua, ud);
- vector unsigned long long ui = vec_andc (ud, ub);
-
- vector double de = {1.0, -4.0};
- vector double df = {-2.0, 5.0};
- vector double dg = vec_cpsgn (de, df);
- vector double dzw = vec_mergeh (de, df);
- vector double dze = vec_mergel (de, df);
-
- vector long long lj = vec_mergeh (la, lb);
- vector long long lk = vec_mergeh (la, ld);
- vector long long ll = vec_mergeh (ld, la);
-
- vector unsigned long long uj = vec_mergeh (ua, ub);
- vector unsigned long long uk = vec_mergeh (ua, ud);
- vector unsigned long long ul = vec_mergeh (ud, ua);
-
- vector pixel pa = {9, 16, 25, 36, 1, 2, 3, 4};
- vector pixel pb = {25, 36, 1, 2, 45, 3, 4, 99};
- vector pixel pc = vec_mergeh (pa, pb);
- vector pixel pd = vec_mergel (pa, pb);
-
- vector long long lm = vec_mergel (la, lb);
- vector long long ln = vec_mergel (la, ld);
- vector long long lo = vec_mergel (ld, la);
-
- vector unsigned long long um = vec_mergel (ua, ub);
- vector unsigned long long un = vec_mergel (ua, ud);
- vector unsigned long long uo = vec_mergel (ud, ua);
-
- vector long long lp = vec_nor (la, lb);
- vector long long lq = vec_nor (la, ld);
- vector long long lr = vec_nor (ld, la);
-
- vector unsigned long long up = vec_nor (ua, ub);
- vector unsigned long long uq = vec_nor (ua, ud);
- vector unsigned long long ur = vec_nor (ud, ua);
-
- vector unsigned char ca = {0,4,8,1,5,9,2,6,10,3,7,11,15,12,14,13};
- vector unsigned char cbb = {5,4,8,3,1,9,2,6,10,3,7,11,15,12,14,13};
-
- vector unsigned char ucba = {5,4,8,3,1,9,2,6,10,3,7,11,15,12,14,13};
- vector unsigned char ucbb = {5,4,8,3,1,9,2,6,10,3,7,11,15,12,14,13};
- vector unsigned char ucbc = {5,4,8,3,1,9,2,6,10,3,7,11,15,12,14,13};
-
- vector long long lv = vec_perm (la, lb, ca);
-
- vector unsigned char ucm = vec_and (ca, cbb);
- vector unsigned char ucn = vec_andc (ca, cbb);
- vector unsigned char uco = vec_mergel (ca, cbb);
-
- vector unsigned long long uv = vec_perm (ua, ub, ca);
-
- vector long long lx = vec_sel (la, lb, uc);
- vector long long ly = vec_sel (la, lb, ld);
-
- vector unsigned long long uw = vec_sel (ua, ub, lc);
- vector unsigned long long ux = vec_sel (ua, ub, uc);
- vector unsigned long long uy = vec_sel (ua, ub, ld);
-
- vector long long lz = vec_xor (la, lb);
- vector long long l0 = vec_xor (la, ld);
- vector long long l1 = vec_xor (ld, la);
-
- vector unsigned long long uz = vec_xor (ua, ub);
- vector unsigned long long u0 = vec_xor (ua, ud);
- vector unsigned long long u1 = vec_xor (ud, ua);
-
- int ia = vec_all_eq (ua, ub);
- int ib = vec_all_ge (ua, ub);
- int ic = vec_all_gt (ua, ub);
- int id = vec_all_le (ua, ub);
- int ie = vec_all_lt (ua, ub);
- int ig = vec_all_ne (ua, ub);
-
- int ih = vec_any_eq (ua, ub);
- int ii = vec_any_ge (ua, ub);
- int ij = vec_any_gt (ua, ub);
- int ik = vec_any_le (ua, ub);
- int il = vec_any_lt (ua, ub);
- int im = vec_any_ne (ua, ub);
-
- vector short ssa = {9, 16, 25, 36, 1, 2, 3, 4};
- vector short ssb = {-8, -27, -64, -125, 2, 3, 5, 3};
- vector short sscc = vec_and (ssa, ssb);
- vector short sscd = vec_mergeh (ssa, ssb);
- vector short ssce = vec_mergel (ssa, ssb);
-
- vector int sia = {9, 16, 25, 36};
- vector int sib = {-8, -27, -64, -125};
- vector int sicc = vec_and (sia, sib);
- vector int sicd = vec_andc (sia, sib);
- vector int sig = vec_mergel (sia, sib);
-
- vector unsigned int uia = {9, 16, 25, 36};
- vector unsigned int uib = {8, 27, 64, 125};
- vector unsigned int uicc = vec_and (uia, uib);
- vector unsigned int uidd = vec_andc (uia, uib);
- vector unsigned int uig = vec_mergel (uia, uib);
-
- vector bool char bca = {0, 1, 4, 7};
- vector bool char bcb = {-8, 9, 2, 9};
- vector bool char bcc = vec_and (bca, bcb);
- vector bool char bcd = vec_andc (bca, bcb);
- vector bool char bce = vec_mergel (bca, bcb);
-
- vector bool short bsa = {0, -1, -1, 0, 3, 4, 6, 7};
- vector bool short bsb = {-1, -1, 0, -1, 0, 0, 0, 0};
- vector bool short bscc = vec_and (bsa, bsb);
- vector bool short bscd = vec_andc (bsa, bsb);
- vector bool short bsce = vec_mergel (bsa, bsb);
-
- vector bool int bia = {0, -1, -1, 0};
- vector bool int bib = {-1, -1, 0, -1};
- vector bool int bicc = vec_and (bia, bib);
- vector bool int bicd = vec_andc (bia, bib);
- vector bool int bide = vec_mergel (bia, bib);
-
- vector unsigned int uie = vec_packsu (ua, ub);
-
- vector long long l2 = vec_cntlz (la);
- vector unsigned long long u2 = vec_cntlz (ua);
- vector int sie = vec_cntlz (sia);
- vector unsigned int uif = vec_cntlz (uia);
- vector short sszz = vec_cntlz (ssa);
-
- vector unsigned short usa = {81, 72, 63, 54, 45, 36, 27, 18};
- vector unsigned short usb = {81, 72, 63, 54, 45, 36, 27, 18};
- vector unsigned short usd = vec_and (usa, usb);
- vector unsigned short use = vec_andc (usa, usb);
- vector unsigned short usc = vec_cntlz (usa);
- vector unsigned short uscd = vec_mergeh (usa, usb);
- vector unsigned short usce = vec_mergel (usa, usb);
-
- vector signed char sca = {-4, 3, -9, 15, -31, 31, 0, 0,
- 1, 117, -36, 99, 98, 97, 96, 95};
- vector signed char scb = vec_cntlz (sca);
- vector signed char scc = vec_mergel (sca, scb);
-
- vector unsigned char uca = {4, 3, 9, 15, 30, 31, 0, 0,
- 1, 117, 36, 99, 98, 97, 96, 95};
- vector unsigned char cb = vec_cntlz (ca);
-
- vector double dd = vec_xl (0, &y);
- vec_xst (dd, 0, &z);
-
- vector double dzz = vec_round (dd);
- vector double dzz1 = vec_rsqrt (dd);
- vector double dzz2 = vec_rsqrte (dd);
-
- vector float ff1 = vec_round (fa);
- vector float ff2 = vec_rsqrt (fa);
- vector float ff3 = vec_rsqrte (fa);
-
- vector double dff = vec_splat (de, 0);
- vector double dgg = vec_splat (de, 1);
- vector long long l3 = vec_splat (l2, 0);
- vector long long l4 = vec_splat (l2, 1);
- vector unsigned long long u3 = vec_splat (u2, 0);
- vector unsigned long long u4 = vec_splat (u2, 1);
- vector bool long long l5 = vec_splat (ld, 0);
- vector bool long long l6 = vec_splat (ld, 1);
- vector bool long long l10 = vec_mergee (ld, ld);
- vector bool long long l11 = vec_mergeo (ld, ld);
- vector bool long long l15 = vec_and (ld, ld);
-
- vector long long l7 = vec_div (l3, l4);
- vector unsigned long long u5 = vec_div (u3, u4);
- vector long long l12 = vec_mergee (la, lb);
- vector long long l13 = vec_mergeo (la, lb);
- vector unsigned long long u8 = vec_mergee (u3, u4);
- vector unsigned long long u9 = vec_mergeo (u3, u4);
-
- vector long long l8 = vec_mul (l3, l4);
- vector unsigned long long u6 = vec_mul (u3, u4);
-
- vector int sz = vec_cts (fa, 0x1F);
- vector unsigned int usz = vec_ctu (fa, 0x1F);
-
- vector float f1 = vec_mergee (fa, fb);
- vector float f2 = vec_mergeo (fa, fb);
-
- vector double d1 = vec_mergee (da, db);
- vector double d2 = vec_mergeo (da, db);
-
- vector float f3 = vec_ctf (si_a, 1);
- vector float f4 = vec_ctf (ui_a, 2);
-
- vector bool char z_vbc2 = vec_splat (bca, 0);
- vector signed char z_vsc1 = vec_splat (sca, 1);
- vector unsigned char z_vuc1 = vec_splat (ucbc, 2);
-
- vector bool int z_vbi1 = vec_splat (bia, 3);
- vector signed int z_vsi1 = vec_splat (sia, 1);
- vector unsigned int z_vui1 = vec_splat (uia, 2);
-
- vector bool int z_bi2 = vec_mergee (bia, bib);
- vector signed int z_si2 = vec_mergee (sia, sib);
- vector unsigned int z_ui2 = vec_mergee (uia, uib);
-
- vector bool char z_bc2 = vec_mergeh (bca, bcb);
- vector signed char z_sc2 = vec_mergeh (sca, scb);
- vector bool int z_bi3 = vec_mergeh (bia, bib);
- vector signed int z_si3 = vec_mergeh (sia, sib);
- vector unsigned int z_ui3 = vec_mergeh (uia, uib);
- vector bool short z_bs1 = vec_mergeh (bsa, bsb);
-
- vector bool int z_bi4 = vec_mergeo (bia, bib);
- vector signed int z_si4 = vec_mergeo (sia, sib);
- vector unsigned int z_ui4 = vec_mergeo (uia, uib);
-
- vector pixel int z_vp1 = vec_splat (pa, 1);
- vector bool short z_bs2 = vec_splat (bsa, 0);
- vector short signed int z_vss1 = vec_splat (ssa, 2);
- vector unsigned short int z_vuss1 = vec_splat (usa, 1);
-
- return 0;
+ return vec_and (la, lb);
+}
+
+vector long long
+foo119 (vector long long l3, vector long long l4)
+{
+ return vec_div (l3, l4);
+}
+
+vector unsigned long long
+foo120 (vector unsigned long long u3, vector unsigned long long u4)
+{
+ return vec_div (u3, u4);
+}
+
+vector long long
+foo121 (vector long long la, vector long long lb)
+{
+ return vec_mergee (la, lb);
+}
+
+vector long long
+foo122 (vector long long la, vector long long lb)
+{
+ return vec_mergeo (la, lb);
+}
+
+vector unsigned long long
+foo123 (vector unsigned long long u3, vector unsigned long long u4)
+{
+ return vec_mergee (u3, u4);
+}
+
+vector unsigned long long
+foo124 (vector unsigned long long u3, vector unsigned long long u4)
+{
+ return vec_mergeo (u3, u4);
+}
+
+vector long long
+foo125 (vector long long l3, vector long long l4)
+{
+ return vec_mul (l3, l4);
+}
+
+vector unsigned long long
+foo126 (vector unsigned long long u3, vector unsigned long long u4)
+{
+ return vec_mul (u3, u4);
+}
+
+vector int
+foo127 (vector float fa)
+{
+ return vec_cts (fa, 0x1F);
+}
+
+vector unsigned int
+foo128 (vector float fa)
+{
+ return vec_ctu (fa, 0x1F);
+}
+
+vector float
+foo129 (vector float fa, vector float fb)
+{
+ return vec_mergee (fa, fb);
+}
+
+vector float
+foo130 (vector float fa, vector float fb)
+{
+ return vec_mergeo (fa, fb);
+}
+
+vector double
+foo131 (vector double da, vector double db)
+{
+ return vec_mergee (da, db);
+}
+
+vector double
+foo132 (vector double da, vector double db)
+{
+ return vec_mergeo (da, db);
+}
+
+vector float
+foo133 (vector signed int si_a)
+{
+ return vec_ctf (si_a, 1);
+}
+
+vector float
+foo134 (vector unsigned int ui_a)
+{
+ return vec_ctf (ui_a, 2);
+}
+
+vector bool char
+foo135 (vector bool char bca)
+{
+ return vec_splat (bca, 0);
+}
+
+vector signed char
+foo136 (vector signed char sca)
+{
+ return vec_splat (sca, 1);
+}
+
+vector unsigned char
+foo137 (vector unsigned char ucbc)
+{
+ return vec_splat (ucbc, 2);
+}
+
+vector bool int
+foo138 (vector bool int bia)
+{
+ return vec_splat (bia, 3);
+}
+
+vector signed int
+foo139 (vector signed int sia)
+{
+ return vec_splat (sia, 1);
+}
+
+vector unsigned int
+foo140 (vector unsigned int uia)
+{
+ return vec_splat (uia, 2);
+}
+
+vector bool int
+foo141 (vector bool int bia, vector bool int bib)
+{
+ return vec_mergee (bia, bib);
+}
+
+vector signed int
+foo142 (vector signed int sia, vector signed int sib)
+{
+ return vec_mergee (sia, sib);
+}
+
+vector unsigned int
+foo143 (vector unsigned int uia, vector unsigned int uib)
+{
+ return vec_mergee (uia, uib);
+}
+
+vector bool char
+foo144 (vector bool char bca, vector bool char bcb)
+{
+ return vec_mergeh (bca, bcb);
+}
+
+vector signed char
+foo145 (vector signed char sca, vector signed char scb)
+{
+ return vec_mergeh (sca, scb);
+}
+
+vector bool int
+foo146 (vector bool int bia, vector bool int bib)
+{
+ return vec_mergeh (bia, bib);
+}
+
+vector signed int
+foo147 (vector signed int sia, vector signed int sib)
+{
+ return vec_mergeh (sia, sib);
+}
+
+vector unsigned int
+foo148 (vector unsigned int uia, vector unsigned int uib)
+{
+ return vec_mergeh (uia, uib);
+}
+
+vector bool short
+foo149 (vector bool short bsa, vector bool short bsb)
+{
+ return vec_mergeh (bsa, bsb);
+}
+
+vector bool int
+foo150 (vector bool int bia, vector bool int bib)
+{
+ return vec_mergeo (bia, bib);
+}
+
+vector signed int
+foo151 (vector signed int sia, vector signed int sib)
+{
+ return vec_mergeo (sia, sib);
+}
+
+vector unsigned int
+foo152 (vector unsigned int uia, vector unsigned int uib)
+{
+ return vec_mergeo (uia, uib);
+}
+
+vector pixel
+foo153 (vector pixel pa)
+{
+ return vec_splat (pa, 1);
+}
+
+vector bool short
+foo154 (vector bool short bsa)
+{
+ return vec_splat (bsa, 0);
+}
+
+vector signed short
+foo155 (vector signed short ssa)
+{
+ return vec_splat (ssa, 2);
+}
+
+vector unsigned short
+foo156 (vector unsigned short usa)
+{
+ return vec_splat (usa, 1);
}
/* Expected results:
@@ -278,13 +967,13 @@ int main ()
vec_and xxland
vec_andc xxlandc
vec_cntlz vclzd, vclzb, vclzw, vclzh
- vec_cpsgn xvcpsgnsp
- vec_ctf xvmuldp
+ vec_cpsgn xvcpsgnsp, xvcpsgndp
+ vec_ctf vcfux, vcfsx
vec_cts vctsxs
vec_ctu vctuxs
- vec_div divd, divdu | __divdi3(), __udivdi3()
- vec_mergel vmrghb, vmrghh, xxmrghw
- vec_mergeh xxmrglw, vmrglh, vmrglb
+ vec_div divd, divdu | __divdi3, __udivdi3
+ vec_mergel vmrglb, vmrglh, xxmrglw, xxpermdi
+ vec_mergeh xxmrghw, vmrghh, vmrghb, xxpermdi
vec_mul mulld | mullw, mulhwu
vec_nor xxlnor
vec_packsu vpkudus
@@ -292,66 +981,58 @@ int main ()
vec_round xvrdpi
vec_sel xxsel
vec_xor xxlxor
- vec_rsqrt xvrsqrtesp
- vec_rsqrte xvrsqrtesp
+ vec_rsqrt xvrsqrtesp, xvrsqrtedp
+ vec_rsqrte xvrsqrtesp, xvrsqrtedp
vec_xl lxvd2x
vec_xst stxvd2x
- vec_splat xxspltb, xxspltw, vsplth
- vec_mergee xxmrgld, vmrgow
- vec_mergeo xxmrghd, vmrgew */
-
-/* { dg-final { scan-assembler-times "vcmpequd" 8 } } */
-/* { dg-final { scan-assembler-times "vcmpgtud" 16 } } */
-/* { dg-final { scan-assembler-times "xxland" 30 } } */
-/* { dg-final { scan-assembler-times "xxlandc" 13 } } */
-/* { dg-final { scan-assembler-times "vclzb" 2 } } */
-/* { dg-final { scan-assembler-times "vclzd" 2 } } */
-/* { dg-final { scan-assembler-times "vclzw" 2 } } */
-/* { dg-final { scan-assembler-times "vclzh" 2 } } */
-/* { dg-final { scan-assembler-times "xvcpsgnsp" 1 } } */
-/* { dg-final { scan-assembler-times "xvcpsgndp" 1 } } */
-/* { dg-final { scan-assembler-times "xvmuldp" 2 } } */
-/* { dg-final { scan-assembler-times "xvcvdpsxds" 0 } } */
-/* { dg-final { scan-assembler-times "vctsxs" 2 } } */
-/* { dg-final { scan-assembler-times "xvcvdpuxds" 0 } } */
-/* { dg-final { scan-assembler-times "vctuxs" 2 } } */
-
-/* { dg-final { scan-assembler-times "vmrghb" 4 { target be } } } */
-/* { dg-final { scan-assembler-times "vmrghb" 6 { target le } } } */
-/* { dg-final { scan-assembler-times "vmrghh" 8 } } */
-/* { dg-final { scan-assembler-times "xxmrghw" 4 } } */
-/* { dg-final { scan-assembler-times "xxmrglw" 4 } } */
-/* { dg-final { scan-assembler-times "vmrglh" 8 } } */
-/* { dg-final { scan-assembler-times "xxlnor" 6 } } */
+ vec_splat xxspltb | vspltb, xxspltw | vspltw, xxsplth | vsplth,
+ xxpermdi
+ vec_mergee xxpermdi, vmrgew
+ vec_mergeo xxpermdi, vmrgow */
+
+/* { dg-final { scan-assembler-times {\mvcmpequd\.} 4 } } */
+/* { dg-final { scan-assembler-times {\mvcmpgtud\.} 8 } } */
+/* { dg-final { scan-assembler-times {\mxxland\M} 17 } } */
+/* { dg-final { scan-assembler-times {\mxxlandc\M} 13 } } */
+/* { dg-final { scan-assembler-times {\mvclzb\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mvclzd\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mvclzw\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mvclzh\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mxvcpsgnsp\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mxvcpsgndp\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mvcfsx\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mvcfux\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mvctsxs\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mvctuxs\M} 1 } } */
+
+/* { dg-final { scan-assembler-times {\mvmrghb\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mvmrghh\M} 4 } } */
+/* { dg-final { scan-assembler-times {\mxxmrghw\M} 4 } } */
+/* { dg-final { scan-assembler-times {\mxxmrglw\M} 4 } } */
+/* { dg-final { scan-assembler-times {\mvmrglh\M} 4 } } */
+/* { dg-final { scan-assembler-times {\mxxlnor\M} 6 } } */
/* { dg-final { scan-assembler-times {\mvpkudus\M} 1 } } */
-/* { dg-final { scan-assembler-times "vperm" 4 } } */
-/* { dg-final { scan-assembler-times "xvrdpi" 2 } } */
-/* { dg-final { scan-assembler-times "xxsel" 10 } } */
-/* { dg-final { scan-assembler-times "xxlxor" 6 } } */
-/* { dg-final { scan-assembler-times "divd" 8 { target lp64 } } } */
-/* { dg-final { scan-assembler-times "divdu" 2 { target lp64 } } } */
-/* { dg-final { scan-assembler-times "mulld" 4 { target lp64 } } } */
+/* { dg-final { scan-assembler-times {\mvperm\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mxvrdpi\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mvrfin\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mxxsel\M} 5 } } */
+/* { dg-final { scan-assembler-times {\mxxlxor\M} 6 } } */
+/* { dg-final { scan-assembler-times {\mdivd\M} 2 { target lp64 } } } */
+/* { dg-final { scan-assembler-times {\mdivdu\M} 2 { target lp64 } } } */
+/* { dg-final { scan-assembler-times {\mmulld\M} 4 { target lp64 } } } */
/* check for .__divdi3 (AIX), __divdi3 (Linux) and ___divdi3 (Darwin) */
/* { dg-final { scan-assembler-times {\mbl \.?_?__divdi3\M} 2 { target { ilp32 } } } } */
/* check for both .__udivdi3 (AIX), __udivdi3 (Linux) and ___udivdi3 (Darwin) */
/* { dg-final { scan-assembler-times {\mbl \.?_?__udivdi3\M} 2 { target { ilp32 } } } } */
-/* { dg-final { scan-assembler-times "mullw" 12 { target ilp32 } } } */
-/* { dg-final { scan-assembler-times "mulhwu" 4 { target ilp32 } } } */
-/* { dg-final { scan-assembler-times "xxmrgld" 0 } } */
-/* { dg-final { scan-assembler-times "xxmrghd" 0 } } */
-/* { dg-final { scan-assembler-times "xvrsqrtesp" 2 } } */
-/* { dg-final { scan-assembler-times "xvrsqrtedp" 2 } } */
-/* { dg-final { scan-assembler-times "xxspltd" 8 } } */
-/* { dg-final { scan-assembler-times "vcfsx" 2 } } */
-/* { dg-final { scan-assembler-times "vcfux" 2 } } */
-/* { dg-final { scan-assembler-times "vspltb" 6 } } */
-/* { dg-final { scan-assembler-times "vspltw" 0 } } */
-/* { dg-final { scan-assembler-times "vmrgow" 8 } } */
-/* { dg-final { scan-assembler-times "vmrglb" 4 { target le } } } */
-/* { dg-final { scan-assembler-times "vmrglb" 6 { target be } } } */
-/* { dg-final { scan-assembler-times "vmrgew" 8 } } */
-/* { dg-final { scan-assembler-times "vsplth" 8 } } */
-/* { dg-final { scan-assembler-times "vcmpequd." 8 } } */
-/* { dg-final { scan-assembler-times "vcmpgtud." 16 } } */
-/* { dg-final { scan-assembler-times "vrfin" 2 } } */
-
+/* { dg-final { scan-assembler-times {\mmullw\M} 12 { target ilp32 } } } */
+/* { dg-final { scan-assembler-times {\mxvrsqrtesp\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mxvrsqrtedp\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mvcfsx\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mvcfux\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mvspltb|xxspltb\M} 3 } } */
+/* { dg-final { scan-assembler-times {\mvspltw|xxspltw\M} 3 } } */
+/* { dg-final { scan-assembler-times {\mvmrgow\M} 4 } } */
+/* { dg-final { scan-assembler-times {\mvmrglb\M} 3 } } */
+/* { dg-final { scan-assembler-times {\mvmrgew\M} 4 } } */
+/* { dg-final { scan-assembler-times {\mvsplth|xxsplth\M} 4 } } */
+/* { dg-final { scan-assembler-times {\mxxpermdi\M} 44 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-4.c b/gcc/testsuite/gcc.target/powerpc/builtins-4.c
index 4e3b543..f65e582 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-4.c
@@ -119,6 +119,18 @@ test_vul_sldw_vul_vul (vector unsigned long long x,
return vec_sldw (x, y, 3);
}
+vector float
+test_vf_sldw_vf_vf (vector float x, vector float y)
+{
+ return vec_sldw (x, y, 3);
+}
+
+vector double
+test_vd_sldw_vd_vd (vector double x, vector double y)
+{
+ return vec_sldw (x, y, 1);
+}
+
vector signed int long long
test_sll_vsill_vsill_vuc (vector signed long long int x,
vector unsigned char y)
@@ -146,14 +158,16 @@ test_sll_vuill_vuill_vuc (vector unsigned long long int x,
test_slo_vsll_slo_vsll_vuc 1 vslo
test_slo_vull_slo_vull_vsc 1 vslo
test_slo_vull_slo_vull_vuc 1 vslo
- test_vsc_sldw_vsc_vsc 1 xxlor
- test_vuc_sldw_vuc_vuc 1 xxlor
- test_vssi_sldw_vssi_vssi 1 xxlor
- test_vusi_sldw_vusi_vusi 1 xxlor
- test_vsi_sldw_vsi_vsi 1 xxlor
- test_vui_sldw_vui_vui 1 xxlor
- test_vsl_sldw_vsl_vsl 1 xxlor
- test_vul_sldw_vul_vul 1 xxlor
+ test_vsc_sldw_vsc_vsc 1 xxlor, 1 xxsldwi
+ test_vuc_sldw_vuc_vuc 1 xxlor, 1 xxsldwi
+ test_vssi_sldw_vssi_vssi 1 xxlor, 1 xxsldwi
+ test_vusi_sldw_vusi_vusi 1 xxlor, 1 xxsldwi
+ test_vsi_sldw_vsi_vsi 1 xxlor, 1 xxsldwi
+ test_vui_sldw_vui_vui 1 xxlor, 1 xxsldwi
+ test_vsl_sldw_vsl_vsl 1 xxlor, 1 xxsldwi
+ test_vul_sldw_vul_vul 1 xxlor, 1 xxsldwi
+ test_vf_sldw_vf_vf 1 xxlor, 1 xxsldwi
+ test_vd_sldw_vd_vd 1 xxlor, 1 xxsldwi
test_sll_vsill_vsill_vuc 1 vsl
test_sll_vuill_vuill_vuc 1 vsl */
@@ -161,6 +175,6 @@ test_sll_vuill_vuill_vuc (vector unsigned long long int x,
/* { dg-final { scan-assembler-times "xvnabssp" 1 } } */
/* { dg-final { scan-assembler-times "xvnabsdp" 1 } } */
/* { dg-final { scan-assembler-times "vslo" 4 } } */
-/* { dg-final { scan-assembler-times "xxlor" 30 } } */
+/* { dg-final { scan-assembler-times "xxlor" 32 } } */
/* { dg-final { scan-assembler-times {\mvsl\M} 5 } } */
-
+/* { dg-final { scan-assembler-times {\mxxsldwi\M} 10 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-5.c b/gcc/testsuite/gcc.target/powerpc/builtins-5.c
index 9c25329..c6c7ebf 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-5.c
@@ -1,7 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power8 -O0 -mno-fold-gimple -dp" } */
-/* { dg-prune-output "gimple folding of rs6000 builtins has been disabled." } */
+/* { dg-options "-mdejagnu-cpu=power8 -O0 -dp" } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c b/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c
index 44cc778..4c676ba 100644
--- a/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c
@@ -10,5 +10,5 @@
int
test_byte_in_set (unsigned char b, unsigned long long set_members)
{
- return __builtin_byte_in_set (b, set_members); /* { dg-warning "implicit declaration of function" } */
+ return __builtin_byte_in_set (b, set_members); /* { dg-error "'__builtin_scalar_byte_in_set' requires the" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/cmpb-2.c b/gcc/testsuite/gcc.target/powerpc/cmpb-2.c
index 113ab6a..02b84d0 100644
--- a/gcc/testsuite/gcc.target/powerpc/cmpb-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/cmpb-2.c
@@ -8,7 +8,7 @@ void abort ();
unsigned long long int
do_compare (unsigned long long int a, unsigned long long int b)
{
- return __builtin_cmpb (a, b); /* { dg-warning "implicit declaration of function '__builtin_cmpb'" } */
+ return __builtin_cmpb (a, b); /* { dg-error "'__builtin_p6_cmpb' requires the '-mcpu=power6' option" } */
}
void
diff --git a/gcc/testsuite/gcc.target/powerpc/cmpb-3.c b/gcc/testsuite/gcc.target/powerpc/cmpb-3.c
index de111a8..75641bd 100644
--- a/gcc/testsuite/gcc.target/powerpc/cmpb-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/cmpb-3.c
@@ -8,7 +8,7 @@ void abort ();
long long int
do_compare (long long int a, long long int b)
{
- return __builtin_cmpb (a, b); /* { dg-error "'__builtin_cmpb' is not supported in this compiler configuration" } */
+ return __builtin_cmpb (a, b); /* { dg-error "'__builtin_p6_cmpb' requires the '-mcpu=power6' option and either the '-m64' or '-mpowerpc64' option" } */
}
void expect (long long int pattern, long long int value)
diff --git a/gcc/testsuite/gcc.target/powerpc/cmpb32-2.c b/gcc/testsuite/gcc.target/powerpc/cmpb32-2.c
index 37b5474..d4264ab 100644
--- a/gcc/testsuite/gcc.target/powerpc/cmpb32-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/cmpb32-2.c
@@ -7,7 +7,7 @@ void abort ();
unsigned int
do_compare (unsigned int a, unsigned int b)
{
- return __builtin_cmpb (a, b); /* { dg-warning "implicit declaration of function '__builtin_cmpb'" } */
+ return __builtin_cmpb (a, b); /* { dg-error "'__builtin_p6_cmpb_32' requires the '-mcpu=power6' option" } */
}
void
diff --git a/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c b/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c
index 4066b12..b3a6c73 100644
--- a/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c
@@ -5,21 +5,21 @@
void use_builtins_d (__vector unsigned long long *p, __vector unsigned long long *q, __vector unsigned long long *r, __vector unsigned long long *s)
{
- p[0] = __builtin_crypto_vcipher (q[0], r[0]); /* { dg-error "'__builtin_crypto_vcipher' is not supported with the current options" } */
- p[1] = __builtin_crypto_vcipherlast (q[1], r[1]); /* { dg-error "'__builtin_crypto_vcipherlast' is not supported with the current options" } */
- p[2] = __builtin_crypto_vncipher (q[2], r[2]); /* { dg-error "'__builtin_crypto_vncipher' is not supported with the current options" } */
- p[3] = __builtin_crypto_vncipherlast (q[3], r[3]); /* { dg-error "'__builtin_crypto_vncipherlast' is not supported with the current options" } */
+ p[0] = __builtin_crypto_vcipher (q[0], r[0]); /* { dg-error "'__builtin_crypto_vcipher' requires the '-mcrypto' option" } */
+ p[1] = __builtin_crypto_vcipherlast (q[1], r[1]); /* { dg-error "'__builtin_crypto_vcipherlast' requires the '-mcrypto' option" } */
+ p[2] = __builtin_crypto_vncipher (q[2], r[2]); /* { dg-error "'__builtin_crypto_vncipher' requires the '-mcrypto' option" } */
+ p[3] = __builtin_crypto_vncipherlast (q[3], r[3]); /* { dg-error "'__builtin_crypto_vncipherlast' requires the '-mcrypto' option" } */
p[4] = __builtin_crypto_vpermxor (q[4], r[4], s[4]);
p[5] = __builtin_crypto_vpmsumd (q[5], r[5]);
- p[6] = __builtin_crypto_vshasigmad (q[6], 1, 15); /* { dg-error "'__builtin_crypto_vshasigmad' is not supported with the current options" } */
- p[7] = __builtin_crypto_vsbox (q[7]); /* { dg-error "'__builtin_crypto_vsbox' is not supported with the current options" } */
+ p[6] = __builtin_crypto_vshasigmad (q[6], 1, 15); /* { dg-error "'__builtin_crypto_vshasigmad' requires the '-mcrypto' option" } */
+ p[7] = __builtin_crypto_vsbox (q[7]); /* { dg-error "'__builtin_crypto_vsbox' requires the '-mcrypto' option" } */
}
void use_builtins_w (__vector unsigned int *p, __vector unsigned int *q, __vector unsigned int *r, __vector unsigned int *s)
{
p[0] = __builtin_crypto_vpermxor (q[0], r[0], s[0]);
p[1] = __builtin_crypto_vpmsumw (q[1], r[1]);
- p[2] = __builtin_crypto_vshasigmaw (q[2], 1, 15); /* { dg-error "'__builtin_crypto_vshasigmaw' is not supported with the current options" } */
+ p[2] = __builtin_crypto_vshasigmaw (q[2], 1, 15); /* { dg-error "'__builtin_crypto_vshasigmaw' requires the '-mcrypto' option" } */
}
void use_builtins_h (__vector unsigned short *p, __vector unsigned short *q, __vector unsigned short *r, __vector unsigned short *s)
diff --git a/gcc/testsuite/gcc.target/powerpc/darn-0.c b/gcc/testsuite/gcc.target/powerpc/darn-0.c
index f446f49..64d98f5 100644
--- a/gcc/testsuite/gcc.target/powerpc/darn-0.c
+++ b/gcc/testsuite/gcc.target/powerpc/darn-0.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-skip-if "" { powerpc*-*-aix* } } */
/* { dg-options "-mdejagnu-cpu=power9" } */
diff --git a/gcc/testsuite/gcc.target/powerpc/darn-1.c b/gcc/testsuite/gcc.target/powerpc/darn-1.c
index 0938718..f483a89 100644
--- a/gcc/testsuite/gcc.target/powerpc/darn-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/darn-1.c
@@ -1,12 +1,11 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-require-effective-target lp64 } */
/* { dg-skip-if "" { powerpc*-*-aix* } } */
/* { dg-options "-mdejagnu-cpu=power9" } */
#include <altivec.h>
-long long get_conditioned_random ()
+long get_conditioned_random ()
{
return __builtin_darn ();
}
diff --git a/gcc/testsuite/gcc.target/powerpc/darn-2.c b/gcc/testsuite/gcc.target/powerpc/darn-2.c
index 64e44b2..56a9ffb 100644
--- a/gcc/testsuite/gcc.target/powerpc/darn-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/darn-2.c
@@ -1,12 +1,11 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-require-effective-target lp64 } */
/* { dg-skip-if "" { powerpc*-*-aix* } } */
/* { dg-options "-mdejagnu-cpu=power9" } */
#include <altivec.h>
-long long get_raw_random ()
+long get_raw_random ()
{
return __builtin_darn_raw ();
}
diff --git a/gcc/testsuite/gcc.target/powerpc/darn-3.c b/gcc/testsuite/gcc.target/powerpc/darn-3.c
index 477901f..4c68fad 100644
--- a/gcc/testsuite/gcc.target/powerpc/darn-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/darn-3.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile } */
/* { dg-skip-if "" { powerpc*-*-aix* } } */
/* { dg-options "-O2 -mdejagnu-cpu=power9" } */
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp b/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp
index b76dd56..7811e57 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2021 Free Software Foundation, Inc.
+# Copyright (C) 2014-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-12.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-12.c
index 350b4c1..4feb391 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-12.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-12.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_lt_dd (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_lt_dd (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-14.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-14.c
index 011d200..ef4d6ad 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-14.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-14.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_lt_dd (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_lt_dd (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-17.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-17.c
index 28033db..5a9ab51 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-17.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-17.c
@@ -8,7 +8,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_lt_td (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_lt_td (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-19.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-19.c
index 092b9c0..f1918a2 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-19.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-19.c
@@ -8,5 +8,5 @@ int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_lt_td (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_lt_td (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-2.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-2.c
index 4b72fa8..b353d63 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-2.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_lt (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_lt (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-22.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-22.c
index 15d7a35..464dc66 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-22.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-22.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_gt (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_gt (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-24.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-24.c
index f6ed00a..6e5e07b 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-24.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-24.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_gt (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_gt (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-27.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-27.c
index 8e3954d..d8760ce 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-27.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-27.c
@@ -8,7 +8,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_gt (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_gt (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-29.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-29.c
index f6c0ede..fed06bb 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-29.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-29.c
@@ -8,5 +8,5 @@ int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_gt (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_gt (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-32.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-32.c
index d24f398..868146c 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-32.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-32.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_gt_dd (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_gt_dd (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-34.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-34.c
index b6620c5..de17499 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-34.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-34.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_gt_dd (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_gt_dd (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-37.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-37.c
index dc4c8ec..1e5ff35 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-37.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-37.c
@@ -8,7 +8,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_gt_td (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_gt_td (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-39.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-39.c
index 1aee9ef..b5f886d 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-39.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-39.c
@@ -8,5 +8,5 @@ int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_gt_td (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_gt_td (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-4.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-4.c
index 6397aae..ad840bf 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-4.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_lt (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_lt (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-42.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-42.c
index fc6b356..586c86f 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-42.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-42.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_eq (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_eq (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-44.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-44.c
index b896865..dc01b7f 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-44.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-44.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_eq (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_eq (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-47.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-47.c
index edfac68..9ff4126 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-47.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-47.c
@@ -8,7 +8,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_eq (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_eq (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-49.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-49.c
index e7b50dc1..5040ac8 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-49.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-49.c
@@ -8,5 +8,5 @@ int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_eq (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_eq (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-52.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-52.c
index c9431b5..a79e6b5 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-52.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-52.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_eq_dd (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_eq_dd (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-54.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-54.c
index 2fdb58f..5e9a93f 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-54.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-54.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_eq_dd (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_eq_dd (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-57.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-57.c
index 275bf8d..ec2abc6 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-57.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-57.c
@@ -8,7 +8,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_eq_td (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_eq_td (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-59.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-59.c
index e1da3d8..6f63d0f 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-59.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-59.c
@@ -8,5 +8,5 @@ int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_eq_td (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_eq_td (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-62.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-62.c
index 44aaab2..4786be7 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-62.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-62.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_ov (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_ov (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-64.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-64.c
index fb33311..c406d4d 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-64.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-64.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_ov (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_ov (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-67.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-67.c
index 59471cf..d7b3b6f 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-67.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-67.c
@@ -8,7 +8,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_ov (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_ov (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-69.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-69.c
index c9e1721..bc9ced3 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-69.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-69.c
@@ -8,5 +8,5 @@ int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_ov (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_ov (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-7.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-7.c
index d0d3f23..dcfe162 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-7.c
@@ -8,5 +8,5 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_lt (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_lt (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-72.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-72.c
index 725cc54..04d950e 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-72.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-72.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_ov_dd (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_ov_dd (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-74.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-74.c
index c6ffd51..369312d 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-74.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-74.c
@@ -8,6 +8,6 @@ int doTestBCDSignificance (_Decimal64 *p, unsigned int significance)
{
_Decimal64 source = *p;
- return __builtin_dfp_dtstsfi_ov_dd (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_ov_dd (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-77.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-77.c
index d279bfb..ca6c739 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-77.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-77.c
@@ -8,7 +8,7 @@ int doTestBCDSignificance (_Decimal128 *p)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_ov_td (65, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_ov_td (65, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-79.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-79.c
index b88b5a8..9ee60cf 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-79.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-79.c
@@ -8,5 +8,5 @@ int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_ov_td (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_ov_td (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-9.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-9.c
index b2073f5..9a9ff38 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-9.c
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-9.c
@@ -8,5 +8,5 @@ int doTestBCDSignificance (_Decimal128 *p, unsigned int significance)
{
_Decimal128 source = *p;
- return __builtin_dfp_dtstsfi_lt (significance, source); /* { dg-error "argument 1 must be a 6-bit unsigned literal" } */
+ return __builtin_dfp_dtstsfi_lt (significance, source); /* { dg-error "argument 1 must be a literal between 0 and 63, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/float128-constant.c b/gcc/testsuite/gcc.target/powerpc/float128-constant.c
new file mode 100644
index 0000000..e3286a7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/float128-constant.c
@@ -0,0 +1,160 @@
+/* { dg-require-effective-target ppc_float128_hw } */
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+
+/* Test whether the LXVKQ instruction is generated to load special IEEE 128-bit
+ constants. */
+
+_Float128
+return_0 (void)
+{
+ return 0.0f128; /* XXSPLTIB 34,0. */
+}
+
+_Float128
+return_1 (void)
+{
+ return 1.0f128; /* LXVKQ 34,1. */
+}
+
+_Float128
+return_2 (void)
+{
+ return 2.0f128; /* LXVKQ 34,2. */
+}
+
+_Float128
+return_3 (void)
+{
+ return 3.0f128; /* LXVKQ 34,3. */
+}
+
+_Float128
+return_4 (void)
+{
+ return 4.0f128; /* LXVKQ 34,4. */
+}
+
+_Float128
+return_5 (void)
+{
+ return 5.0f128; /* LXVKQ 34,5. */
+}
+
+_Float128
+return_6 (void)
+{
+ return 6.0f128; /* LXVKQ 34,6. */
+}
+
+_Float128
+return_7 (void)
+{
+ return 7.0f128; /* LXVKQ 34,7. */
+}
+
+_Float128
+return_m0 (void)
+{
+ return -0.0f128; /* LXVKQ 34,16. */
+}
+
+_Float128
+return_m1 (void)
+{
+ return -1.0f128; /* LXVKQ 34,17. */
+}
+
+_Float128
+return_m2 (void)
+{
+ return -2.0f128; /* LXVKQ 34,18. */
+}
+
+_Float128
+return_m3 (void)
+{
+ return -3.0f128; /* LXVKQ 34,19. */
+}
+
+_Float128
+return_m4 (void)
+{
+ return -4.0f128; /* LXVKQ 34,20. */
+}
+
+_Float128
+return_m5 (void)
+{
+ return -5.0f128; /* LXVKQ 34,21. */
+}
+
+_Float128
+return_m6 (void)
+{
+ return -6.0f128; /* LXVKQ 34,22. */
+}
+
+_Float128
+return_m7 (void)
+{
+ return -7.0f128; /* LXVKQ 34,23. */
+}
+
+_Float128
+return_inf (void)
+{
+ return __builtin_inff128 (); /* LXVKQ 34,8. */
+}
+
+_Float128
+return_minf (void)
+{
+ return - __builtin_inff128 (); /* LXVKQ 34,24. */
+}
+
+_Float128
+return_nan (void)
+{
+ return __builtin_nanf128 (""); /* LXVKQ 34,9. */
+}
+
+/* Note, the following NaNs should not generate a LXVKQ instruction. */
+_Float128
+return_mnan (void)
+{
+ return - __builtin_nanf128 (""); /* PLXV 34,... */
+}
+
+_Float128
+return_nan2 (void)
+{
+ return __builtin_nanf128 ("1"); /* PLXV 34,... */
+}
+
+_Float128
+return_nans (void)
+{
+ return __builtin_nansf128 (""); /* PLXV 34,... */
+}
+
+vector long long
+return_longlong_neg_0 (void)
+{
+ /* This vector is the same pattern as -0.0F128. */
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define FIRST 0x8000000000000000
+#define SECOND 0x0000000000000000
+
+#else
+#define FIRST 0x0000000000000000
+#define SECOND 0x8000000000000000
+#endif
+
+ return (vector long long) { FIRST, SECOND }; /* LXVKQ 34,16. */
+}
+
+/* { dg-final { scan-assembler-times {\mlxvkq\M} 19 } } */
+/* { dg-final { scan-assembler-times {\mplxv\M} 3 } } */
+/* { dg-final { scan-assembler-times {\mxxspltib\M} 1 } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-insert-float-p9.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-insert-float-p9.c
index 4541768..1c57672 100644
--- a/gcc/testsuite/gcc.target/powerpc/fold-vec-insert-float-p9.c
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-insert-float-p9.c
@@ -31,5 +31,5 @@ testf_cst (float f, vector float vf)
/* { dg-final { scan-assembler-times {\mstfs\M} 2 { target ilp32 } } } */
/* { dg-final { scan-assembler-times {\mlxv\M} 2 { target ilp32 } } } */
/* { dg-final { scan-assembler-times {\mlvewx\M} 1 { target ilp32 } } } */
-/* { dg-final { scan-assembler-times {\mvperm\M} 2 { target ilp32 } } } */
-/* { dg-final { scan-assembler-times {\mxxperm\M} 1 { target ilp32 } } } */
+/* { dg-final { scan-assembler-times {\mvperm\M} 1 { target ilp32 } } } */
+/* { dg-final { scan-assembler-times {\mxxperm\M} 2 { target ilp32 } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-floatdouble.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-floatdouble.c
index 7661917..01f1b0d 100644
--- a/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-floatdouble.c
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-floatdouble.c
@@ -18,15 +18,14 @@ vector float test_fc ()
vector double testd_00 (vector double x) { return vec_splat (x, 0b00000); }
vector double testd_01 (vector double x) { return vec_splat (x, 0b00001); }
vector double test_dc ()
-{ const vector double y = { 3.0, 5.0 }; return vec_splat (y, 0b00010); }
+{ const vector double y = { 3.0, 5.0 }; return vec_splat (y, 0b00001); }
/* If the source vector is a known constant, we will generate a load or possibly
- XXSPLTIW. */
-/* { dg-final { scan-assembler-times {\mlvx\M|\mlxvd2x\M|\mlxv\M|\mplxv\M|\mxxspltiw\M} 2 } } */
+ XXSPLTIW/XXSPLTIDP. */
+/* { dg-final { scan-assembler-times {\mlvx\M|\mlxvd2x\M|\mlxv\M|\mplxv\M|\mxxspltiw\M|\mxxspltidp\M} 2 } } */
/* For float types, we generate a splat. */
/* { dg-final { scan-assembler-times {\mvspltw\M|\mxxspltw\M} 3 } } */
/* For double types, we will generate xxpermdi instructions. */
-/* { dg-final { scan-assembler-times "xxpermdi" 3 } } */
-
+/* { dg-final { scan-assembler-times "xxpermdi" 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-longlong.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-longlong.c
index b95b987..3fa1f05 100644
--- a/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-longlong.c
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-longlong.c
@@ -9,23 +9,19 @@
vector bool long long testb_00 (vector bool long long x) { return vec_splat (x, 0b00000); }
vector bool long long testb_01 (vector bool long long x) { return vec_splat (x, 0b00001); }
-vector bool long long testb_02 (vector bool long long x) { return vec_splat (x, 0b00010); }
vector signed long long tests_00 (vector signed long long x) { return vec_splat (x, 0b00000); }
vector signed long long tests_01 (vector signed long long x) { return vec_splat (x, 0b00001); }
-vector signed long long tests_02 (vector signed long long x) { return vec_splat (x, 0b00010); }
vector unsigned long long testu_00 (vector unsigned long long x) { return vec_splat (x, 0b00000); }
vector unsigned long long testu_01 (vector unsigned long long x) { return vec_splat (x, 0b00001); }
-vector unsigned long long testu_02 (vector unsigned long long x) { return vec_splat (x, 0b00010); }
/* Similar test as above, but the source vector is a known constant. */
-vector bool long long test_bll () { const vector bool long long y = {12, 23}; return vec_splat (y, 0b00010); }
-vector signed long long test_sll () { const vector signed long long y = {34, 45}; return vec_splat (y, 0b00010); }
-vector unsigned long long test_ull () { const vector unsigned long long y = {56, 67}; return vec_splat (y, 0b00010); }
+vector bool long long test_bll () { const vector bool long long y = {12, 23}; return vec_splat (y, 0b00001); }
+vector signed long long test_sll () { const vector signed long long y = {34, 45}; return vec_splat (y, 0b00001); }
/* Assorted load instructions for the initialization with known constants. */
-/* { dg-final { scan-assembler-times {\mlvx\M|\mlxvd2x\M|\mlxv\M|\mplxv\M} 3 } } */
+/* { dg-final { scan-assembler-times {\mlvx\M|\mlxvd2x\M|\mlxv\M|\mplxv\M|\mxxspltib\M} 2 } } */
/* xxpermdi for vec_splat of long long vectors.
At the time of this writing, the number of xxpermdi instructions
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-misc-invalid.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-misc-invalid.c
index 20f5b05..263a172 100644
--- a/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-misc-invalid.c
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-misc-invalid.c
@@ -10,24 +10,24 @@
vector signed short
testss_1 (unsigned int ui)
{
- return vec_splat_s16 (ui);/* { dg-error "argument 1 must be a 5-bit signed literal" } */
+ return vec_splat_s16 (ui);/* { dg-error "argument 1 must be a literal between -16 and 15, inclusive" } */
}
vector unsigned short
testss_2 (signed int si)
{
- return vec_splat_u16 (si);/* { dg-error "argument 1 must be a 5-bit signed literal" } */
+ return vec_splat_u16 (si);/* { dg-error "argument 1 must be a literal between -16 and 15, inclusive" } */
}
vector signed char
testsc_1 (unsigned int ui)
{
- return vec_splat_s8 (ui); /* { dg-error "argument 1 must be a 5-bit signed literal" } */
+ return vec_splat_s8 (ui); /* { dg-error "argument 1 must be a literal between -16 and 15, inclusive" } */
}
vector unsigned char
testsc_2 (signed int si)
{
- return vec_splat_u8 (si);/* { dg-error "argument 1 must be a 5-bit signed literal" } */
+ return vec_splat_u8 (si);/* { dg-error "argument 1 must be a literal between -16 and 15, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/int_128bit-runnable.c b/gcc/testsuite/gcc.target/powerpc/int_128bit-runnable.c
index 1255ee9..1356793 100644
--- a/gcc/testsuite/gcc.target/powerpc/int_128bit-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/int_128bit-runnable.c
@@ -11,9 +11,9 @@
/* { dg-final { scan-assembler-times {\mvrlq\M} 2 } } */
/* { dg-final { scan-assembler-times {\mvrlqnm\M} 2 } } */
/* { dg-final { scan-assembler-times {\mvrlqmi\M} 2 } } */
-/* { dg-final { scan-assembler-times {\mvcmpequq\M} 16 } } */
-/* { dg-final { scan-assembler-times {\mvcmpgtsq\M} 16 } } */
-/* { dg-final { scan-assembler-times {\mvcmpgtuq\M} 16 } } */
+/* { dg-final { scan-assembler-times {\mvcmpequq\M} 24 } } */
+/* { dg-final { scan-assembler-times {\mvcmpgtsq\M} 26 } } */
+/* { dg-final { scan-assembler-times {\mvcmpgtuq\M} 26 } } */
/* { dg-final { scan-assembler-times {\mvmuloud\M} 1 } } */
/* { dg-final { scan-assembler-times {\mvmulesd\M} 1 } } */
/* { dg-final { scan-assembler-times {\mvmulosd\M} 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c b/gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c
new file mode 100644
index 0000000..d97c6db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/mffscrni_p9.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mdejagnu-cpu=power9" } */
+/* { dg-final { scan-assembler-times {\mmffscrni\M} 1 } } */
+
+void foo ()
+{
+ int val = 2;
+ __builtin_set_fpscr_rn (val);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/mma-builtin-10-pair.c b/gcc/testsuite/gcc.target/powerpc/mma-builtin-10-pair.c
new file mode 100644
index 0000000..d8748d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/mma-builtin-10-pair.c
@@ -0,0 +1,21 @@
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+
+typedef unsigned char vec_t __attribute__((vector_size(16)));
+
+void
+foo (__vector_pair *dst, vec_t *src)
+{
+ __vector_pair pair0, pair1;
+ /* Adjacent loads should be combined into one lxvp instruction
+ and identical build pairs should be combined. */
+ __builtin_vsx_build_pair (&pair0, src[0], src[1]);
+ __builtin_vsx_build_pair (&pair1, src[0], src[1]);
+ dst[0] = pair0;
+ dst[2] = pair1;
+}
+
+/* { dg-final { scan-assembler-not {\mlxv\M} } } */
+/* { dg-final { scan-assembler-not {\mstxv\M} } } */
+/* { dg-final { scan-assembler-times {\mlxvp\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mstxvp\M} 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/mma-builtin-10-quad.c b/gcc/testsuite/gcc.target/powerpc/mma-builtin-10-quad.c
new file mode 100644
index 0000000..02342c7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/mma-builtin-10-quad.c
@@ -0,0 +1,23 @@
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+
+typedef unsigned char vec_t __attribute__((vector_size(16)));
+
+void
+foo (__vector_quad *dst, vec_t *src)
+{
+ __vector_quad quad0, quad1;
+ /* Adjacent loads should be combined into two lxvp instructions.
+ and identical build accs should not be combined. */
+ __builtin_mma_build_acc (&quad0, src[0], src[1], src[2], src[3]);
+ __builtin_mma_build_acc (&quad1, src[0], src[1], src[2], src[3]);
+ dst[0] = quad0;
+ dst[2] = quad1;
+}
+
+/* { dg-final { scan-assembler-not {\mlxv\M} } } */
+/* { dg-final { scan-assembler-not {\mstxv\M} } } */
+/* { dg-final { scan-assembler-times {\mlxvp\M} 4 } } */
+/* { dg-final { scan-assembler-times {\mxxmtacc\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mxxmfacc\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mstxvp\M} 4 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/mma-double-test.c b/gcc/testsuite/gcc.target/powerpc/mma-double-test.c
index 254af7f..254af7f 100755..100644
--- a/gcc/testsuite/gcc.target/powerpc/mma-double-test.c
+++ b/gcc/testsuite/gcc.target/powerpc/mma-double-test.c
diff --git a/gcc/testsuite/gcc.target/powerpc/mma-single-test.c b/gcc/testsuite/gcc.target/powerpc/mma-single-test.c
index ebbc5ae..ebbc5ae 100755..100644
--- a/gcc/testsuite/gcc.target/powerpc/mma-single-test.c
+++ b/gcc/testsuite/gcc.target/powerpc/mma-single-test.c
diff --git a/gcc/testsuite/gcc.target/powerpc/p10_vec_xl_sext.c b/gcc/testsuite/gcc.target/powerpc/p10_vec_xl_sext.c
index 78e72ac..67d52ad 100644
--- a/gcc/testsuite/gcc.target/powerpc/p10_vec_xl_sext.c
+++ b/gcc/testsuite/gcc.target/powerpc/p10_vec_xl_sext.c
@@ -24,7 +24,7 @@ foo3 (signed long a, signed int *b)
}
vector signed __int128
-foo4 (signed long a, signed long *b)
+foo4 (signed long a, signed long long *b)
{
return vec_xl_sext (a, b);
}
diff --git a/gcc/testsuite/gcc.target/powerpc/p8-vec-xl-xst.c b/gcc/testsuite/gcc.target/powerpc/p8-vec-xl-xst.c
index 75340b0..ed31e60 100644
--- a/gcc/testsuite/gcc.target/powerpc/p8-vec-xl-xst.c
+++ b/gcc/testsuite/gcc.target/powerpc/p8-vec-xl-xst.c
@@ -1,8 +1,7 @@
/* { dg-do compile { target { le } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power8 -O2 -mno-fold-gimple" } */
-/* { dg-prune-output "gimple folding of rs6000 builtins has been disabled." } */
+/* { dg-options "-mdejagnu-cpu=power8 -O2" } */
/* Verify fix for problem where vec_xl and vec_xst are not recognized
for the vector char and vector short cases on P8 only. */
diff --git a/gcc/testsuite/gcc.target/powerpc/powerpc.exp b/gcc/testsuite/gcc.target/powerpc/powerpc.exp
index 4b7441e..c66d860 100644
--- a/gcc/testsuite/gcc.target/powerpc/powerpc.exp
+++ b/gcc/testsuite/gcc.target/powerpc/powerpc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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/powerpc/ppc-fortran/ppc-fortran.exp b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp
index 0668981..bd7ad95 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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/powerpc/ppc-fortran/pr102767.f90 b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/pr102767.f90
new file mode 100644
index 0000000..6853cfe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/pr102767.f90
@@ -0,0 +1,21 @@
+! { dg-require-effective-target powerpc_vsx_ok }
+! { dg-options "-mvsx -O2 -ftree-vectorize -mno-efficient-unaligned-vsx" }
+
+INTERFACE
+ FUNCTION elemental_mult (a, b, c)
+ type(*), DIMENSION(..) :: a, b, c
+ END
+END INTERFACE
+
+allocatable z
+integer, dimension(2,2) :: a, b
+call test_CFI_address
+contains
+ subroutine test_CFI_address
+ if (elemental_mult (z, x, y) .ne. 0) stop
+ a = reshape ([4,3,2,1], [2,2])
+ b = reshape ([2,3,4,5], [2,2])
+ if (elemental_mult (i, a, b) .ne. 0) stop
+ end
+end
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr101324.c b/gcc/testsuite/gcc.target/powerpc/pr101324.c
new file mode 100644
index 0000000..ca0fca8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr101324.c
@@ -0,0 +1,17 @@
+/* { dg-require-effective-target rop_ok } */
+/* { dg-options "-O1 -mrop-protect -mdejagnu-cpu=power10" } */
+
+extern void foo (void);
+
+long int
+__attribute__ ((__optimize__ ("no-inline")))
+func (long int cond)
+{
+ if (cond)
+ foo ();
+ return cond;
+}
+
+/* Ensure hashst comes after mflr and hashchk comes after ld 0,16(1). */
+/* { dg-final { scan-assembler {(?p)\mmflr 0.*\n.*\n.*\mhashst 0,} } } */
+/* { dg-final { scan-assembler {(?p)ld 0,.*\n.*\n.*\n.*\mhashchk 0,} } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr101384-1.c b/gcc/testsuite/gcc.target/powerpc/pr101384-1.c
index 627d7d7..41cf84b 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr101384-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr101384-1.c
@@ -2,7 +2,7 @@
/* { dg-do compile { target le } } */
/* { dg-options "-O2 -maltivec" } */
/* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-final { scan-assembler-times {\mvspltis[whb] [^\n\r]*,-1\M} 9 } } */
+/* { dg-final { scan-assembler-times {\mvspltis[whb] [^\n\r]*,-1\M|\mxxspltib[^\n\r]*,255\M} 9 } } */
/* { dg-final { scan-assembler-times {\mvslw\M} 3 } } */
/* { dg-final { scan-assembler-times {\mvslh\M} 3 } } */
/* { dg-final { scan-assembler-times {\mvslb\M} 3 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr102059-1.c b/gcc/testsuite/gcc.target/powerpc/pr102059-1.c
new file mode 100644
index 0000000..b969c4c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr102059-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* -Wno-attributes suppresses always_inline warnings. */
+/* { dg-options "-O2 -mdejagnu-cpu=power8 -Wno-attributes" } */
+
+/* Verify the reduced case from PR102059 won't fail. */
+
+__attribute__ ((always_inline)) int
+foo (int *b)
+{
+ *b += 10;
+ return *b;
+}
+
+#pragma GCC target "cpu=power10"
+int
+bar (int *a)
+{
+ *a = foo (a);
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr102059-2.c b/gcc/testsuite/gcc.target/powerpc/pr102059-2.c
new file mode 100644
index 0000000..52e0092
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr102059-2.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mdejagnu-cpu=power8 -mno-htm" } */
+
+/* Verify target info for inlining still works even if callee
+ disables HTM explicitly while caller enables it. */
+
+static inline int __attribute__ ((always_inline))
+foo (int *b)
+{
+ *b += 10;
+ return *b;
+}
+
+#pragma GCC target "htm"
+int
+bar (int *a)
+{
+ *a = foo (a);
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr102059-3.c b/gcc/testsuite/gcc.target/powerpc/pr102059-3.c
new file mode 100644
index 0000000..21c982d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr102059-3.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mdejagnu-cpu=power8 -mno-power8-fusion -fdump-tree-einline-optimized" } */
+
+/* Like pr102059-1.c, to verify the inlining still happens
+ even without always_inline attribute. */
+
+int foo (int *b)
+{
+ *b += 10;
+ return *b;
+}
+
+#pragma GCC target "cpu=power10"
+int
+bar (int *a)
+{
+ *a = foo (a);
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times {Inlining foo/[0-9]* } 1 "einline"} } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr102239.c b/gcc/testsuite/gcc.target/powerpc/pr102239.c
new file mode 100644
index 0000000..2ff72b7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr102239.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O2" } */
+
+void foo(long arg)
+{
+ if (arg & ((1UL << 33) | (1UL << 34)))
+ asm volatile("# if");
+ else
+ asm volatile("# else");
+}
+
+/* { dg-final { scan-assembler-times {\mrldicr\.} 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr102347.c b/gcc/testsuite/gcc.target/powerpc/pr102347.c
new file mode 100644
index 0000000..05c439a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr102347.c
@@ -0,0 +1,15 @@
+/* { dg-do link } */
+/* { dg-require-effective-target power10_ok } */
+/* { dg-require-effective-target lto } */
+/* { dg-options "-flto -mdejagnu-cpu=power9" } */
+
+/* Verify there are no error messages in LTO mode. */
+
+#pragma GCC target "cpu=power10"
+int main ()
+{
+ float *b;
+ __vector_quad c;
+ __builtin_mma_disassemble_acc (b, &c);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr102868.c b/gcc/testsuite/gcc.target/powerpc/pr102868.c
new file mode 100644
index 0000000..eb45d19
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr102868.c
@@ -0,0 +1,53 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O2 -mvsx" } */
+
+#include <altivec.h>
+vector float b = {0.0f, 0.0f, 0.0f, 0.0f};
+
+
+vector float foo1 (vector float x)
+{
+ vector int c = {0, 1, 4, 5};
+ return __builtin_shuffle (x, b, c);
+}
+
+vector float foo2 (vector float x)
+{
+ vector int c = {2, 3, 4, 5};
+ return __builtin_shuffle (x, b, c);
+}
+
+vector float foo3 (vector float x)
+{
+ vector int c = {0, 1, 6, 7};
+ return __builtin_shuffle (x, b, c);
+}
+
+vector float foo4 (vector float x)
+{
+ vector int c = {2, 3, 6, 7};
+ return __builtin_shuffle (x, b, c);
+}
+
+vector unsigned char foo5 (vector unsigned char x)
+{
+ vector unsigned char c = {0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7};
+ return __builtin_shuffle (x, c);
+}
+
+vector unsigned char foo6 (vector unsigned char x)
+{
+ vector unsigned char c = {8, 9, 10, 11, 12, 13, 14, 15, 8, 9, 10, 11, 12, 13, 14, 15};
+ return __builtin_shuffle (x, c);
+}
+
+vector unsigned char foo7 (vector unsigned char x)
+{
+ vector unsigned char c = {8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7};
+ return __builtin_shuffle (x, c);
+}
+
+/* { dg-final { scan-assembler-times {\mxxpermdi\M} 7 { target has_arch_pwr9 } } } */
+/* { dg-final { scan-assembler-times {\mxxpermdi\M} 7 { target { {! has_arch_pwr9} && be } } } } */
+/* { dg-final { scan-assembler-times {\mxxpermdi\M} 11 { target { {! has_arch_pwr9} && le } } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr102976.c b/gcc/testsuite/gcc.target/powerpc/pr102976.c
new file mode 100644
index 0000000..5a4320f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr102976.c
@@ -0,0 +1,14 @@
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-O2 -mdejagnu-cpu=power10" } */
+
+#include <altivec.h>
+void
+bug (__vector_pair *dst)
+{
+ register vector unsigned char vec0 asm ("vs44");
+ register vector unsigned char vec1 asm ("vs32");
+ __builtin_vsx_build_pair (dst, vec0, vec1);
+}
+
+/* { dg-final { scan-assembler-times {(?p)\mxxlor \d+,44,44\M} 1 } } */
+/* { dg-final { scan-assembler-times {(?p)\mxxlor \d+,32,32\M} 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr103124.c b/gcc/testsuite/gcc.target/powerpc/pr103124.c
new file mode 100644
index 0000000..dc7bb9c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr103124.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-require-effective-target int128 } */
+/* { dg-options "-O2 -mdejagnu-cpu=power9" } */
+/* { dg-final { scan-assembler-not {\mmr\M} } } */
+
+vector __int128 add (long long a)
+{
+ vector __int128 b;
+ b = (vector __int128) {a};
+ return b;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr103127.c b/gcc/testsuite/gcc.target/powerpc/pr103127.c
new file mode 100644
index 0000000..801fc0a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr103127.c
@@ -0,0 +1,19 @@
+/* PR target/103127 */
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-O2 -mdejagnu-cpu=power10 -ftrivial-auto-var-init=zero" } */
+
+/* Verify we do not ICE on the following tests. */
+
+void
+foo (__vector_quad *dst)
+{
+ __vector_quad acc;
+ *dst = acc;
+}
+
+void
+bar (__vector_pair *dst)
+{
+ __vector_pair pair;
+ *dst = pair;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr103515.c b/gcc/testsuite/gcc.target/powerpc/pr103515.c
new file mode 100644
index 0000000..698b9a9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr103515.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-loop2_unroll-optimized" } */
+
+/* The pragma specified for foo2 should not affect foo1.
+ Verify compiler won't perform unrolling for foo1. */
+
+#define N 1024
+extern int a1[N], b1[N], c1[N];
+extern int a2[N], b2[N], c2[N];
+extern int n;
+
+void
+foo1 ()
+{
+ int i;
+ for (i = 0; i < n; i++)
+ c1[i] += a1[i] + b1[i];
+}
+
+#pragma GCC optimize("O3,unroll-loops")
+void
+foo2 ()
+{
+ int i;
+ for (i = 0; i < n; i++)
+ c2[i] += a2[i] + b2[i];
+}
+
+/* { dg-final { scan-rtl-dump-times "optimized: loop unrolled" 1 "loop2_unroll" } } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr103627-1.c b/gcc/testsuite/gcc.target/powerpc/pr103627-1.c
new file mode 100644
index 0000000..5cecf515
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr103627-1.c
@@ -0,0 +1,16 @@
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -mno-vsx" } */
+
+/* Verify compiler emits error message instead of ICE. */
+
+extern float *dest;
+extern __vector_quad src;
+
+int
+foo ()
+{
+ __builtin_mma_disassemble_acc (dest, &src);
+ /* { dg-error "'__builtin_mma_disassemble_acc' requires the '-mmma' option" "" { target *-*-* } .-1 } */
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr103627-2.c b/gcc/testsuite/gcc.target/powerpc/pr103627-2.c
new file mode 100644
index 0000000..89ae4f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr103627-2.c
@@ -0,0 +1,16 @@
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -mmma -mno-vsx" } */
+
+/* Verify the emitted error message. */
+
+extern float *dest;
+extern __vector_quad src;
+
+int
+foo ()
+{
+ __builtin_mma_disassemble_acc (dest, &src);
+ /* { dg-error "'-mmma' requires '-mvsx'" "mma" { target *-*-* } 0 } */
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr103627-3.c b/gcc/testsuite/gcc.target/powerpc/pr103627-3.c
new file mode 100644
index 0000000..5a4d5ba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr103627-3.c
@@ -0,0 +1,20 @@
+/* There are no error messages for either LE or BE 64bit. */
+/* { dg-require-effective-target be } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-mdejagnu-cpu=power6" } */
+
+/* Verify compiler emits error message instead of ICE. */
+
+/* Option -mno-avoid-indexed-addresses is to disable the unexpected
+ warning on indexed addressing which can affect dg checks. */
+#pragma GCC target "cpu=power10,no-avoid-indexed-addresses"
+int
+main ()
+{
+ float *b;
+ __vector_quad c;
+ __builtin_mma_disassemble_acc (b, &c);
+ /* { dg-error "'__builtin_mma_disassemble_acc' requires the '-mmma' option" "" { target *-*-* } .-1 } */
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr103702.c b/gcc/testsuite/gcc.target/powerpc/pr103702.c
new file mode 100644
index 0000000..585946f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr103702.c
@@ -0,0 +1,24 @@
+/* We don't have one powerpc.*_ok for Power6, use altivec_ok conservatively. */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-mdejagnu-cpu=power6 -O2 -ftree-loop-vectorize -fno-tree-scev-cprop" } */
+
+/* Verify there is no ICE. */
+
+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.target/powerpc/pr104015-1.c b/gcc/testsuite/gcc.target/powerpc/pr104015-1.c
new file mode 100644
index 0000000..895c243
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr104015-1.c
@@ -0,0 +1,28 @@
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-mdejagnu-cpu=power9 -O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
+
+/* As PR104015, we don't expect vectorizer will re-try some vector modes
+ for epilogues on Power9, since Power9 doesn't support partial vector
+ by defaut. */
+
+#include <stdarg.h>
+#define N 200
+
+void __attribute__((noinline))
+foo (unsigned short *__restrict__ pInput, unsigned short *__restrict__ pOutput)
+{
+ unsigned short i, a, b, c;
+
+ for (i = 0; i < N / 3; i++)
+ {
+ a = *pInput++;
+ b = *pInput++;
+ c = *pInput++;
+
+ *pOutput++ = a + b + c + 3;
+ *pOutput++ = a + b + c + 12;
+ *pOutput++ = a + b + c + 1;
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "Re-trying epilogue analysis with vector mode" "vect" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr104015-2.c b/gcc/testsuite/gcc.target/powerpc/pr104015-2.c
new file mode 100644
index 0000000..ab482b1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr104015-2.c
@@ -0,0 +1,29 @@
+/* { dg-require-effective-target power10_ok } */
+/* Vector with length instructions lxvl/stxvl are only enabled for 64 bit. */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
+
+/* Power10 support partial vector for epilogue by default, it's expected
+ vectorizer would re-try for it once. */
+
+#include <stdarg.h>
+#define N 200
+
+void __attribute__((noinline))
+foo (unsigned short *__restrict__ pInput, unsigned short *__restrict__ pOutput)
+{
+ unsigned short i, a, b, c;
+
+ for (i = 0; i < N / 3; i++)
+ {
+ a = *pInput++;
+ b = *pInput++;
+ c = *pInput++;
+
+ *pOutput++ = a + b + c + 3;
+ *pOutput++ = a + b + c + 12;
+ *pOutput++ = a + b + c + 1;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "Re-trying epilogue analysis with vector mode" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr104239-1.c b/gcc/testsuite/gcc.target/powerpc/pr104239-1.c
new file mode 100644
index 0000000..eacdedd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr104239-1.c
@@ -0,0 +1,10 @@
+/* PR target/104239 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mdejagnu-cpu=power8 -DNO_WARN_X86_INTRINSICS" } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+
+#if __has_include(<immintrin.h>)
+#include <immintrin.h>
+#endif
+
+int i;
diff --git a/gcc/testsuite/gcc.target/powerpc/pr104239-2.c b/gcc/testsuite/gcc.target/powerpc/pr104239-2.c
new file mode 100644
index 0000000..1bf316f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr104239-2.c
@@ -0,0 +1,10 @@
+/* PR target/104239 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mdejagnu-cpu=power8 -DNO_WARN_X86_INTRINSICS" } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+
+#if __has_include(<x86gprintrin.h>)
+#include <x86gprintrin.h>
+#endif
+
+int i;
diff --git a/gcc/testsuite/gcc.target/powerpc/pr104239-3.c b/gcc/testsuite/gcc.target/powerpc/pr104239-3.c
new file mode 100644
index 0000000..6d64e5d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr104239-3.c
@@ -0,0 +1,8 @@
+/* PR target/104239 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mdejagnu-cpu=power8 -DNO_WARN_X86_INTRINSICS -std=c89" } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+
+#include <x86intrin.h>
+
+int i;
diff --git a/gcc/testsuite/gcc.target/powerpc/pr80315-1.c b/gcc/testsuite/gcc.target/powerpc/pr80315-1.c
index e2db0ff..7198611 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr80315-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr80315-1.c
@@ -10,6 +10,6 @@ main()
int mask;
/* Argument 2 must be 0 or 1. Argument 3 must be in range 0..15. */
- res = __builtin_crypto_vshasigmaw (test, 1, 0xff); /* { dg-error {argument 3 must be in the range \[0, 15\]} } */
+ res = __builtin_crypto_vshasigmaw (test, 1, 0xff); /* { dg-error {argument 3 must be a literal between 0 and 15, inclusive} } */
return 0;
}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr80315-2.c b/gcc/testsuite/gcc.target/powerpc/pr80315-2.c
index 144b705..0f77f77 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr80315-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr80315-2.c
@@ -10,6 +10,6 @@ main ()
int mask;
/* Argument 2 must be 0 or 1. Argument 3 must be in range 0..15. */
- res = __builtin_crypto_vshasigmad (test, 1, 0xff); /* { dg-error {argument 3 must be in the range \[0, 15\]} } */
+ res = __builtin_crypto_vshasigmad (test, 1, 0xff); /* { dg-error {argument 3 must be a literal between 0 and 15, inclusive} } */
return 0;
}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr80315-3.c b/gcc/testsuite/gcc.target/powerpc/pr80315-3.c
index 99a3e24..398c512 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr80315-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr80315-3.c
@@ -12,6 +12,6 @@ main ()
int mask;
/* Argument 2 must be 0 or 1. Argument 3 must be in range 0..15. */
- res = vec_shasigma_be (test, 1, 0xff); /* { dg-error {argument 3 must be in the range \[0, 15\]} } */
+ res = vec_shasigma_be (test, 1, 0xff); /* { dg-error {argument 3 must be a literal between 0 and 15, inclusive} } */
return res;
}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr80315-4.c b/gcc/testsuite/gcc.target/powerpc/pr80315-4.c
index 7f5f6f7..4326ff6 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr80315-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr80315-4.c
@@ -12,6 +12,6 @@ main ()
int mask;
/* Argument 2 must be 0 or 1. Argument 3 must be in range 0..15. */
- res = vec_shasigma_be (test, 1, 0xff); /* { dg-error {argument 3 must be in the range \[0, 15\]} } */
+ res = vec_shasigma_be (test, 1, 0xff); /* { dg-error {argument 3 must be a literal between 0 and 15, inclusive} } */
return res;
}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr82015.c b/gcc/testsuite/gcc.target/powerpc/pr82015.c
index ec939e9..40f1c7d 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr82015.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr82015.c
@@ -5,10 +5,10 @@
unsigned long foo_11(__vector __int128_t *p)
{
- return __builtin_unpack_vector_int128(*p, 11); /* { dg-error "argument 2 must be a 1-bit unsigned literal" } */
+ return __builtin_unpack_vector_int128(*p, 11); /* { dg-error "argument 2 must be a literal between 0 and 1, inclusive" } */
}
unsigned long foo_n(__vector __int128_t *p, unsigned long n)
{
- return __builtin_unpack_vector_int128(*p, n); /* { dg-error "argument 2 must be a 1-bit unsigned literal" } */
+ return __builtin_unpack_vector_int128(*p, n); /* { dg-error "argument 2 must be a literal between 0 and 1, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr83926.c b/gcc/testsuite/gcc.target/powerpc/pr83926.c
index 2490e1d..038238d 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr83926.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr83926.c
@@ -1,6 +1,5 @@
/* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-options "-O2 -mdejagnu-cpu=power8 -mno-fold-gimple" } */
-/* { dg-prune-output "gimple folding of rs6000 builtins has been disabled." } */
+/* { dg-options "-O2 -mdejagnu-cpu=power8" } */
__attribute__ ((altivec(vector__))) long long
sdiv (__attribute__ ((altivec(vector__))) long long a,
diff --git a/gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c b/gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c
index bd1502b..dcb30e1 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr86731-fwrapv-longlong.c
@@ -24,11 +24,12 @@ vector signed long long splats4(void)
return (vector signed long long) vec_sl(mzero, mzero);
}
-/* Codegen will consist of splat and shift instructions for most types.
- If folding is enabled, the vec_sl tests using vector long long type will
- generate a lvx instead of a vspltisw+vsld pair. */
+/* Codegen will consist of splat and shift instructions for most types. If
+ folding is enabled, the vec_sl tests using vector long long type will
+ generate a lvx instead of a vspltisw+vsld pair. On power10, it will
+ generate a xxspltidp instruction instead of the lvx. */
/* { dg-final { scan-assembler-times {\mvspltis[bhw]\M} 0 } } */
/* { dg-final { scan-assembler-times {\mvsl[bhwd]\M} 0 } } */
-/* { dg-final { scan-assembler-times {\mp?lxv\M|\mlxv\M|\mlxvd2x\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mp?lxv\M|\mlxv\M|\mlxvd2x\M|\mxxspltidp\M} 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr86731-nogimplefold-longlong.c b/gcc/testsuite/gcc.target/powerpc/pr86731-nogimplefold-longlong.c
deleted file mode 100644
index 2c46312..0000000
--- a/gcc/testsuite/gcc.target/powerpc/pr86731-nogimplefold-longlong.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* PR86731. Verify that the rs6000 gimple-folding code handles the
- left shift operation properly. This is a testcase variation that
- explicitly disables gimple folding. */
-
-/* { dg-do compile } */
-/* { dg-require-effective-target powerpc_p8vector_ok } */
-/* { dg-require-effective-target lp64 } */
-/* { dg-options "-maltivec -O3 -fwrapv -mno-fold-gimple -mpower8-vector " } */
-/* { dg-prune-output "gimple folding of rs6000 builtins has been disabled." } */
-
-
-#include <altivec.h>
-
-vector unsigned long long splatu4(void)
-{
- vector unsigned long long mzero = {-1,-1};
- return (vector unsigned long long) vec_sl(mzero, mzero);
-}
-
-vector signed long long splats4(void)
-{
- vector unsigned long long mzero = {-1,-1};
- return (vector signed long long) vec_sl(mzero, mzero);
-}
-
-/* Codegen will consist of splat and shift instructions for most types.
- Noted variations: if gimple folding is disabled, or if -fwrapv is not specified, the
- long long tests will generate a vspltisw+vsld pair, versus generating a lvx. */
-/* { dg-final { scan-assembler-times {\mvspltis[bhw]\M|\mxxspltib\M} 2 } } */
-/* { dg-final { scan-assembler-times {\mvsl[bhwd]\M} 2 } } */
-/* { dg-final { scan-assembler-times {\mlvx\M} 0 } } */
-
diff --git a/gcc/testsuite/gcc.target/powerpc/pr86731-nogimplefold.c b/gcc/testsuite/gcc.target/powerpc/pr86731-nogimplefold.c
deleted file mode 100644
index d424b0c..0000000
--- a/gcc/testsuite/gcc.target/powerpc/pr86731-nogimplefold.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* PR86731. Verify that the rs6000 gimple-folding code handles the
- left shift operation properly. This is a testcase variation that
- explicitly disables gimple folding. */
-
-/* { dg-do compile } */
-/* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-require-effective-target lp64 } */
-/* { dg-options "-maltivec -O3 -fwrapv -mno-fold-gimple" } */
-/* { dg-prune-output "gimple folding of rs6000 builtins has been disabled." } */
-
-
-#include <altivec.h>
-/* original test as reported. */
-vector unsigned int splat(void)
-{
- vector unsigned int mzero = vec_splat_u32(-1);
- return (vector unsigned int) vec_sl(mzero, mzero);
-}
-
-/* more testcase variations. */
-vector unsigned char splatu1(void)
-{
- vector unsigned char mzero = vec_splat_u8(-1);
- return (vector unsigned char) vec_sl(mzero, mzero);
-}
-
-vector unsigned short splatu2(void)
-{
- vector unsigned short mzero = vec_splat_u16(-1);
- return (vector unsigned short) vec_sl(mzero, mzero);
-}
-
-vector unsigned int splatu3(void)
-{
- vector unsigned int mzero = vec_splat_u32(-1);
- return (vector unsigned int) vec_sl(mzero, mzero);
-}
-
-vector signed char splats1(void)
-{
- vector unsigned char mzero = vec_splat_u8(-1);
- return (vector signed char) vec_sl(mzero, mzero);
-}
-
-vector signed short splats2(void)
-{
- vector unsigned short mzero = vec_splat_u16(-1);
- return (vector signed short) vec_sl(mzero, mzero);
-}
-
-vector signed int splats3(void)
-{
- vector unsigned int mzero = vec_splat_u32(-1);
- return (vector signed int) vec_sl(mzero, mzero);
-}
-
-/* Codegen will consist of splat and shift instructions for most types.
- Noted variations: if gimple folding is disabled, or if -fwrapv is not specified, the
- long long tests will generate a vspltisw+vsld pair, versus generating a lvx. */
-/* { dg-final { scan-assembler-times {\mvspltis[bhw]\M|\mxxspltib\M} 7 } } */
-/* { dg-final { scan-assembler-times {\mvsl[bhwd]\M} 7 } } */
-/* { dg-final { scan-assembler-times {\mlvx\M} 0 } } */
-
diff --git a/gcc/testsuite/gcc.target/powerpc/pr88100.c b/gcc/testsuite/gcc.target/powerpc/pr88100.c
index 4452145..764c897 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr88100.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr88100.c
@@ -10,35 +10,35 @@
vector unsigned char
splatu1 (void)
{
- return vec_splat_u8(0x100);/* { dg-error "argument 1 must be a 5-bit signed literal" } */
+ return vec_splat_u8(0x100);/* { dg-error "argument 1 must be a literal between -16 and 15, inclusive" } */
}
vector unsigned short
splatu2 (void)
{
- return vec_splat_u16(0x10000);/* { dg-error "argument 1 must be a 5-bit signed literal" } */
+ return vec_splat_u16(0x10000);/* { dg-error "argument 1 must be a literal between -16 and 15, inclusive" } */
}
vector unsigned int
splatu3 (void)
{
- return vec_splat_u32(0x10000000);/* { dg-error "argument 1 must be a 5-bit signed literal" } */
+ return vec_splat_u32(0x10000000);/* { dg-error "argument 1 must be a literal between -16 and 15, inclusive" } */
}
vector signed char
splats1 (void)
{
- return vec_splat_s8(0x100);/* { dg-error "argument 1 must be a 5-bit signed literal" } */
+ return vec_splat_s8(0x100);/* { dg-error "argument 1 must be a literal between -16 and 15, inclusive" } */
}
vector signed short
splats2 (void)
{
- return vec_splat_s16(0x10000);/* { dg-error "argument 1 must be a 5-bit signed literal" } */
+ return vec_splat_s16(0x10000);/* { dg-error "argument 1 must be a literal between -16 and 15, inclusive" } */
}
vector signed int
splats3 (void)
{
- return vec_splat_s32(0x10000000);/* { dg-error "argument 1 must be a 5-bit signed literal" } */
+ return vec_splat_s32(0x10000000);/* { dg-error "argument 1 must be a literal between -16 and 15, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr91903.c b/gcc/testsuite/gcc.target/powerpc/pr91903.c
index 3045d07..7f9470e 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr91903.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr91903.c
@@ -12,62 +12,62 @@ vector signed int retsi;
void test_int(vector signed int a, const int b)
{
- retf = vec_ctf(a,b); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retf = vec_ctf(a,-1); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retf = vec_ctf(a,-31); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retf = vec_ctf(a,-32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
+ retf = vec_ctf(a,b); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retf = vec_ctf(a,-1); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retf = vec_ctf(a,-31); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retf = vec_ctf(a,-32); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
retf = vec_ctf(a,1);
retf = vec_ctf(a,31);
- retf = vec_ctf(a,32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retf = vec_ctf(a,42); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
+ retf = vec_ctf(a,32); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retf = vec_ctf(a,42); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
}
void test_uint(vector unsigned int a, const int b)
{
- retf = vec_ctf(a,b); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retf = vec_ctf(a,-1); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retf = vec_ctf(a,-31); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retf = vec_ctf(a,-32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
+ retf = vec_ctf(a,b); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retf = vec_ctf(a,-1); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retf = vec_ctf(a,-31); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retf = vec_ctf(a,-32); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
retf = vec_ctf(a,1);
retf = vec_ctf(a,31);
- retf = vec_ctf(a,32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retf = vec_ctf(a,42); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
+ retf = vec_ctf(a,32); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retf = vec_ctf(a,42); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
}
void test_longlong(vector signed long long a, const int b,int x)
{
- retd = vec_ctf(a,b); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retd = vec_ctf(a,-1); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retd = vec_ctf(a,-31); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retd = vec_ctf(a,-32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
+ retd = vec_ctf(a,b); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retd = vec_ctf(a,-1); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retd = vec_ctf(a,-31); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retd = vec_ctf(a,-32); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
retd = vec_ctf(a,1);
retd = vec_ctf(a,31);
- retd = vec_ctf(a,32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retd = vec_ctf(a,42); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
+ retd = vec_ctf(a,32); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retd = vec_ctf(a,42); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
}
void test_ulonglong(vector unsigned long long a, const int b,int x)
{
- retd = vec_ctf(a,b); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retd = vec_ctf(a,-1); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retd = vec_ctf(a,-31); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retd = vec_ctf(a,-32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
+ retd = vec_ctf(a,b); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retd = vec_ctf(a,-1); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retd = vec_ctf(a,-31); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retd = vec_ctf(a,-32); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
retd = vec_ctf(a,1);
retd = vec_ctf(a,31);
- retd = vec_ctf(a,32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retd = vec_ctf(a,42); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
+ retd = vec_ctf(a,32); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retd = vec_ctf(a,42); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
}
void test_cts_1(vector float a, const int b)
{
- retsi = vec_cts(a,b); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retsi = vec_cts(a,-1); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retsi = vec_cts(a,-31); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retsi = vec_cts(a,-32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
+ retsi = vec_cts(a,b); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retsi = vec_cts(a,-1); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retsi = vec_cts(a,-31); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retsi = vec_cts(a,-32); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
retsi = vec_cts(a,1);
retsi = vec_cts(a,31);
- retsi = vec_cts(a,32); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
- retsi = vec_cts(a,42); /* { dg-error "argument 2 must be a 5-bit unsigned literal" } */
+ retsi = vec_cts(a,32); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
+ retsi = vec_cts(a,42); /* { dg-error "argument 2 must be a literal between 0 and 31, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr94613.c b/gcc/testsuite/gcc.target/powerpc/pr94613.c
new file mode 100644
index 0000000..13cab13
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr94613.c
@@ -0,0 +1,47 @@
+/* { dg-do run } */
+/* { dg-require-effective-target vmx_hw } */
+/* { dg-options "-O2 -maltivec" } */
+
+#include <altivec.h>
+
+/* The initial implementation of vec_sel used an IF_THEN_ELSE rtx.
+ This did NOT match what the vsel instruction does. vsel is a
+ bit-wise operation. Using IF_THEN_ELSE made the + operation to be
+ simplified away in combine. A plus operation affects other bits in
+ the same element. Hence per-element simplifications are wrong for
+ vsel. */
+vector unsigned char __attribute__((noinline))
+foo (vector unsigned char a, vector unsigned char b, vector unsigned char c)
+{
+ return vec_sel (a + b, c, a);
+}
+
+vector unsigned char __attribute__((noinline))
+foor (vector unsigned char a, vector unsigned char b, vector unsigned char c)
+{
+ return vec_sel (c, a + b, ~a);
+}
+
+vector unsigned char __attribute__((noinline))
+bar (vector unsigned char a, vector unsigned char b, vector unsigned char c)
+{
+ return vec_sel (a | b, c, a);
+}
+
+int
+main ()
+{
+ vector unsigned char v = (vector unsigned char){ 1 };
+
+ if (foo (v, v, v)[0] != 3)
+ __builtin_abort ();
+
+ if (bar (v, v, v)[0] != 1)
+ __builtin_abort ();
+
+ if (foor (v, v, v)[0] != 3)
+ __builtin_abort ();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr97142.c b/gcc/testsuite/gcc.target/powerpc/pr97142.c
index 0e5f1c1..dd10b06 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr97142.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr97142.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Ofast" } */
+/* { dg-options "-Ofast -mdejagnu-cpu=power7" } */
#include <math.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/pragma-optimize.c b/gcc/testsuite/gcc.target/powerpc/pragma-optimize.c
index e8ba63a..3b1fc6d 100644
--- a/gcc/testsuite/gcc.target/powerpc/pragma-optimize.c
+++ b/gcc/testsuite/gcc.target/powerpc/pragma-optimize.c
@@ -1,3 +1,4 @@
+/* { dg-require-ifunc "" } */
/* { dg-options "-O2 -mlong-double-128 -mabi=ibmlongdouble" } */
extern unsigned long int x;
diff --git a/gcc/testsuite/gcc.target/powerpc/pragma_misc9.c b/gcc/testsuite/gcc.target/powerpc/pragma_misc9.c
index e03099b..c1667d9 100644
--- a/gcc/testsuite/gcc.target/powerpc/pragma_misc9.c
+++ b/gcc/testsuite/gcc.target/powerpc/pragma_misc9.c
@@ -20,7 +20,7 @@ vector bool int
test2 (vector signed int a, vector signed int b)
{
return vec_cmpnez (a, b);
- /* { dg-error "'__builtin_altivec_vcmpnezw' requires the '-mcpu=power9' option" "" { target *-*-* } .-1 } */
+ /* { dg-error "'__builtin_altivec_vcmpnezw' requires the '-mcpu=power9' and '-mvsx' options" "" { target *-*-* } .-1 } */
}
#pragma GCC target ("cpu=power7")
@@ -28,7 +28,7 @@ vector signed int
test3 (vector signed int a, vector signed int b)
{
return vec_mergee (a, b);
- /* { dg-error "'__builtin_altivec_vmrgew_v4si' requires the '-mpower8-vector' option" "" { target *-*-* } .-1 } */
+ /* { dg-error "'__builtin_altivec_vmrgew_v4si' requires the '-mcpu=power8' and '-mvsx' options" "" { target *-*-* } .-1 } */
}
#pragma GCC target ("cpu=power6")
diff --git a/gcc/testsuite/gcc.target/powerpc/pragma_power8.c b/gcc/testsuite/gcc.target/powerpc/pragma_power8.c
index c8d2cdd..cb0f308 100644
--- a/gcc/testsuite/gcc.target/powerpc/pragma_power8.c
+++ b/gcc/testsuite/gcc.target/powerpc/pragma_power8.c
@@ -19,6 +19,7 @@ test1 (vector int a, vector int b)
#pragma GCC target ("cpu=power7")
/* Force a re-read of altivec.h with new cpu target. */
#undef _ALTIVEC_H
+#undef _RS6000_VECDEFINES_H
#include <altivec.h>
#ifdef _ARCH_PWR7
vector signed int
@@ -33,6 +34,7 @@ test2 (vector signed int a, vector signed int b)
#pragma GCC target ("cpu=power8")
/* Force a re-read of altivec.h with new cpu target. */
#undef _ALTIVEC_H
+#undef _RS6000_VECDEFINES_H
#include <altivec.h>
#ifdef _ARCH_PWR8
vector int
diff --git a/gcc/testsuite/gcc.target/powerpc/pragma_power9.c b/gcc/testsuite/gcc.target/powerpc/pragma_power9.c
index e33aad1..e05f1f4 100644
--- a/gcc/testsuite/gcc.target/powerpc/pragma_power9.c
+++ b/gcc/testsuite/gcc.target/powerpc/pragma_power9.c
@@ -17,6 +17,7 @@ test1 (vector int a, vector int b)
#pragma GCC target ("cpu=power7")
#undef _ALTIVEC_H
+#undef _RS6000_VECDEFINES_H
#include <altivec.h>
#ifdef _ARCH_PWR7
vector signed int
@@ -30,6 +31,7 @@ test2 (vector signed int a, vector signed int b)
#pragma GCC target ("cpu=power8")
#undef _ALTIVEC_H
+#undef _RS6000_VECDEFINES_H
#include <altivec.h>
#ifdef _ARCH_PWR8
vector int
@@ -50,6 +52,7 @@ test3b (vec_t a, vec_t b)
#pragma GCC target ("cpu=power9,power9-vector")
#undef _ALTIVEC_H
+#undef _RS6000_VECDEFINES_H
#include <altivec.h>
#ifdef _ARCH_PWR9
vector bool int
diff --git a/gcc/testsuite/gcc.target/powerpc/rop-1.c b/gcc/testsuite/gcc.target/powerpc/rop-1.c
index 8cedcb6..12893de 100644
--- a/gcc/testsuite/gcc.target/powerpc/rop-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/rop-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect" } */
-/* { dg-require-effective-target powerpc_elfv2 } */
+/* { dg-require-effective-target rop_ok } */
/* Verify that ROP-protect instructions are inserted when a
call is present. */
diff --git a/gcc/testsuite/gcc.target/powerpc/rop-2.c b/gcc/testsuite/gcc.target/powerpc/rop-2.c
index c556952..5f1d7c3 100644
--- a/gcc/testsuite/gcc.target/powerpc/rop-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/rop-2.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect -mprivileged" } */
-/* { dg-require-effective-target powerpc_elfv2 } */
+/* { dg-require-effective-target rop_ok } */
/* Verify that privileged ROP-protect instructions are inserted when a
call is present. */
diff --git a/gcc/testsuite/gcc.target/powerpc/rop-3.c b/gcc/testsuite/gcc.target/powerpc/rop-3.c
index 8d03792..d2ef3bf 100644
--- a/gcc/testsuite/gcc.target/powerpc/rop-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/rop-3.c
@@ -1,5 +1,5 @@
/* { dg-do run { target { power10_hw } } } */
-/* { dg-require-effective-target powerpc_elfv2 } */
+/* { dg-require-effective-target rop_ok } */
/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect" } */
/* Verify that ROP-protect instructions execute correctly when a
diff --git a/gcc/testsuite/gcc.target/powerpc/rop-4.c b/gcc/testsuite/gcc.target/powerpc/rop-4.c
index dcf47c6..80faa9b 100644
--- a/gcc/testsuite/gcc.target/powerpc/rop-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/rop-4.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect" } */
-/* { dg-require-effective-target powerpc_elfv2 } */
+/* { dg-require-effective-target rop_ok } */
/* Verify that no ROP-protect instructions are inserted when no
call is present. */
diff --git a/gcc/testsuite/gcc.target/powerpc/rop-5.c b/gcc/testsuite/gcc.target/powerpc/rop-5.c
index f2594df..f7970f1 100644
--- a/gcc/testsuite/gcc.target/powerpc/rop-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/rop-5.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-require-effective-target powerpc_elfv2 } */
+/* { dg-require-effective-target rop_ok } */
/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect" } */
/* Verify that __ROP_PROTECT__ is predefined for -mrop-protect. */
diff --git a/gcc/testsuite/gcc.target/powerpc/sldoi_to_mov.c b/gcc/testsuite/gcc.target/powerpc/sldoi_to_mov.c
new file mode 100644
index 0000000..1310007
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/sldoi_to_mov.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O2 -mvsx" } */
+
+#include <altivec.h>
+vector signed int foo1 (vector signed int a) {
+ vector signed int b = {0};
+ return vec_sum2s(a, b);
+}
+
+vector signed int foo2 (vector signed int a) {
+ vector signed int b = {0};
+ return vec_sld(b, b, 4);
+}
+
+/* { dg-final { scan-assembler-times {\mvsldoi\M} 1 {target le} } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/sse4_1-blendvps.c b/gcc/testsuite/gcc.target/powerpc/sse4_1-blendvps.c
new file mode 100644
index 0000000..8fcb553
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/sse4_1-blendvps.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-require-effective-target p8vector_hw } */
+/* { dg-options "-O2 -mpower8-vector -Wno-psabi" } */
+
+#include "sse4_1-check.h"
+
+#include <smmintrin.h>
+#include <string.h>
+
+#define NUM 20
+
+static void
+init_blendvps (float *src1, float *src2, float *mask)
+{
+ int i, msk, sign = 1;
+
+ msk = -1;
+ for (i = 0; i < NUM * 4; i++)
+ {
+ if((i % 4) == 0)
+ msk++;
+ src1[i] = i* (i + 1) * sign;
+ src2[i] = (i + 20) * sign;
+ mask[i] = (i + 120) * i;
+ if( (msk & (1 << (i % 4))))
+ mask[i] = -mask[i];
+ sign = -sign;
+ }
+}
+
+static int
+check_blendvps (__m128 *dst, float *src1, float *src2,
+ float *mask)
+{
+ float tmp[4];
+ int j;
+
+ memcpy (&tmp[0], src1, sizeof (tmp));
+ for (j = 0; j < 4; j++)
+ if (mask [j] < 0.0)
+ tmp[j] = src2[j];
+
+ return memcmp (dst, &tmp[0], sizeof (tmp));
+}
+
+static void
+sse4_1_test (void)
+{
+ union
+ {
+ __m128 x[NUM];
+ float f[NUM * 4];
+ } dst, src1, src2, mask;
+ int i;
+
+ init_blendvps (src1.f, src2.f, mask.f);
+
+ for (i = 0; i < NUM; i++)
+ {
+ dst.x[i] = _mm_blendv_ps (src1.x[i], src2.x[i], mask.x[i]);
+ if (check_blendvps (&dst.x[i], &src1.f[i * 4], &src2.f[i * 4],
+ &mask.f[i * 4]))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/sse4_1-round3.h b/gcc/testsuite/gcc.target/powerpc/sse4_1-round3.h
new file mode 100644
index 0000000..de6cbf7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/sse4_1-round3.h
@@ -0,0 +1,81 @@
+#include <smmintrin.h>
+#include <fenv.h>
+#include "sse4_1-check.h"
+
+#define DIM(a) (sizeof (a) / sizeof (a)[0])
+
+static int roundings[] =
+ {
+ _MM_FROUND_TO_NEAREST_INT,
+ _MM_FROUND_TO_NEG_INF,
+ _MM_FROUND_TO_POS_INF,
+ _MM_FROUND_TO_ZERO,
+ _MM_FROUND_CUR_DIRECTION
+ };
+
+static int modes[] =
+ {
+ FE_TONEAREST,
+ FE_UPWARD,
+ FE_DOWNWARD,
+ FE_TOWARDZERO
+ };
+
+static void
+TEST (void)
+{
+ int i, j, ri, mi, round_save;
+
+ round_save = fegetround ();
+ for (mi = 0; mi < DIM (modes); mi++) {
+ fesetround (modes[mi]);
+ for (i = 0; i < DIM (data); i++) {
+ for (ri = 0; ri < DIM (roundings); ri++) {
+ union value guess;
+ union value *current_answers = answers[ri];
+ switch ( roundings[ri] ) {
+ case _MM_FROUND_TO_NEAREST_INT:
+ guess.x = ROUND_INTRIN (data[i].value1.x, data[i].value2.x,
+ _MM_FROUND_TO_NEAREST_INT);
+ break;
+ case _MM_FROUND_TO_NEG_INF:
+ guess.x = ROUND_INTRIN (data[i].value1.x, data[i].value2.x,
+ _MM_FROUND_TO_NEG_INF);
+ break;
+ case _MM_FROUND_TO_POS_INF:
+ guess.x = ROUND_INTRIN (data[i].value1.x, data[i].value2.x,
+ _MM_FROUND_TO_POS_INF);
+ break;
+ case _MM_FROUND_TO_ZERO:
+ guess.x = ROUND_INTRIN (data[i].value1.x, data[i].value2.x,
+ _MM_FROUND_TO_ZERO);
+ break;
+ case _MM_FROUND_CUR_DIRECTION:
+ guess.x = ROUND_INTRIN (data[i].value1.x, data[i].value2.x,
+ _MM_FROUND_CUR_DIRECTION);
+ switch ( modes[mi] ) {
+ case FE_TONEAREST:
+ current_answers = answers_NEAREST_INT;
+ break;
+ case FE_UPWARD:
+ current_answers = answers_POS_INF;
+ break;
+ case FE_DOWNWARD:
+ current_answers = answers_NEG_INF;
+ break;
+ case FE_TOWARDZERO:
+ current_answers = answers_ZERO;
+ break;
+ }
+ break;
+ default:
+ abort ();
+ }
+ for (j = 0; j < DIM (guess.f); j++)
+ if (guess.f[j] != current_answers[i].f[j])
+ abort ();
+ }
+ }
+ }
+ fesetround (round_save);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/sse4_1-roundpd.c b/gcc/testsuite/gcc.target/powerpc/sse4_1-roundpd.c
new file mode 100644
index 0000000..58d9cc5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/sse4_1-roundpd.c
@@ -0,0 +1,143 @@
+/* { dg-do run } */
+/* { dg-require-effective-target vsx_hw } */
+/* { dg-options "-O2 -mvsx" } */
+
+#define NO_WARN_X86_INTRINSICS 1
+#include <smmintrin.h>
+
+#define VEC_T __m128d
+#define FP_T double
+
+#define ROUND_INTRIN(x, ignored, mode) _mm_round_pd (x, mode)
+
+#include "sse4_1-round-data.h"
+
+struct data2 data[] = {
+ { .value1 = { .f = { 0.00, 0.25 } } },
+ { .value1 = { .f = { 0.50, 0.75 } } },
+
+ { .value1 = { .f = { 0x1.ffffffffffffcp+50, 0x1.ffffffffffffdp+50 } } },
+ { .value1 = { .f = { 0x1.ffffffffffffep+50, 0x1.fffffffffffffp+50 } } },
+ { .value1 = { .f = { 0x1.0000000000000p+51, 0x1.0000000000001p+51 } } },
+ { .value1 = { .f = { 0x1.0000000000002p+51, 0x1.0000000000003p+51 } } },
+
+ { .value1 = { .f = { 0x1.ffffffffffffep+51, 0x1.fffffffffffffp+51 } } },
+ { .value1 = { .f = { 0x1.0000000000000p+52, 0x1.0000000000001p+52 } } },
+
+ { .value1 = { .f = { -0x1.0000000000001p+52, -0x1.0000000000000p+52 } } },
+ { .value1 = { .f = { -0x1.fffffffffffffp+51, -0x1.ffffffffffffep+51 } } },
+
+ { .value1 = { .f = { -0x1.0000000000004p+51, -0x1.0000000000002p+51 } } },
+ { .value1 = { .f = { -0x1.0000000000001p+51, -0x1.0000000000000p+51 } } },
+ { .value1 = { .f = { -0x1.ffffffffffffcp+50, -0x1.ffffffffffffep+50 } } },
+ { .value1 = { .f = { -0x1.ffffffffffffdp+50, -0x1.ffffffffffffcp+50 } } },
+
+ { .value1 = { .f = { -1.00, -0.75 } } },
+ { .value1 = { .f = { -0.50, -0.25 } } }
+};
+
+union value answers_NEAREST_INT[] = {
+ { .f = { 0.00, 0.00 } },
+ { .f = { 0.00, 1.00 } },
+
+ { .f = { 0x1.ffffffffffffcp+50, 0x1.ffffffffffffcp+50 } },
+ { .f = { 0x1.0000000000000p+51, 0x1.0000000000000p+51 } },
+ { .f = { 0x1.0000000000000p+51, 0x1.0000000000000p+51 } },
+ { .f = { 0x1.0000000000002p+51, 0x1.0000000000004p+51 } },
+
+ { .f = { 0x1.ffffffffffffep+51, 0x1.0000000000000p+52 } },
+ { .f = { 0x1.0000000000000p+52, 0x1.0000000000001p+52 } },
+
+ { .f = { -0x1.0000000000001p+52, -0x1.0000000000000p+52 } },
+ { .f = { -0x1.0000000000000p+52, -0x1.ffffffffffffep+51 } },
+
+ { .f = { -0x1.0000000000004p+51, -0x1.0000000000002p+51 } },
+ { .f = { -0x1.0000000000000p+51, -0x1.0000000000000p+51 } },
+ { .f = { -0x1.ffffffffffffcp+50, -0x1.0000000000000p+51 } },
+ { .f = { -0x1.ffffffffffffcp+50, -0x1.ffffffffffffcp+50 } },
+
+ { .f = { -1.00, -1.00 } },
+ { .f = { 0.00, 0.00 } }
+};
+
+union value answers_NEG_INF[] = {
+ { .f = { 0.00, 0.00 } },
+ { .f = { 0.00, 0.00 } },
+
+ { .f = { 0x1.ffffffffffffcp+50, 0x1.ffffffffffffcp+50 } },
+ { .f = { 0x1.ffffffffffffcp+50, 0x1.ffffffffffffcp+50 } },
+ { .f = { 0x1.0000000000000p+51, 0x1.0000000000000p+51 } },
+ { .f = { 0x1.0000000000002p+51, 0x1.0000000000002p+51 } },
+
+ { .f = { 0x1.ffffffffffffep+51, 0x1.ffffffffffffep+51 } },
+ { .f = { 0x1.0000000000000p+52, 0x1.0000000000001p+52 } },
+
+ { .f = { -0x1.0000000000001p+52, -0x1.0000000000000p+52 } },
+ { .f = { -0x1.0000000000000p+52, -0x1.ffffffffffffep+51 } },
+
+ { .f = { -0x1.0000000000004p+51, -0x1.0000000000002p+51 } },
+ { .f = { -0x1.0000000000002p+51, -0x1.0000000000000p+51 } },
+ { .f = { -0x1.ffffffffffffcp+50, -0x1.0000000000000p+51 } },
+ { .f = { -0x1.0000000000000p+51, -0x1.ffffffffffffcp+50 } },
+
+ { .f = { -1.00, -1.00 } },
+ { .f = { -1.00, -1.00 } }
+};
+
+union value answers_POS_INF[] = {
+ { .f = { 0.00, 1.00 } },
+ { .f = { 1.00, 1.00 } },
+
+ { .f = { 0x1.ffffffffffffcp+50, 0x1.0000000000000p+51 } },
+ { .f = { 0x1.0000000000000p+51, 0x1.0000000000000p+51 } },
+ { .f = { 0x1.0000000000000p+51, 0x1.0000000000002p+51 } },
+ { .f = { 0x1.0000000000002p+51, 0x1.0000000000004p+51 } },
+
+ { .f = { 0x1.ffffffffffffep+51, 0x1.0000000000000p+52 } },
+ { .f = { 0x1.0000000000000p+52, 0x1.0000000000001p+52 } },
+
+ { .f = { -0x1.0000000000001p+52, -0x1.0000000000000p+52 } },
+ { .f = { -0x1.ffffffffffffep+51, -0x1.ffffffffffffep+51 } },
+
+ { .f = { -0x1.0000000000004p+51, -0x1.0000000000002p+51 } },
+ { .f = { -0x1.0000000000000p+51, -0x1.0000000000000p+51 } },
+ { .f = { -0x1.ffffffffffffcp+50, -0x1.ffffffffffffcp+50 } },
+ { .f = { -0x1.ffffffffffffcp+50, -0x1.ffffffffffffcp+50 } },
+
+ { .f = { -1.00, 0.00 } },
+ { .f = { 0.00, 0.00 } }
+};
+
+union value answers_ZERO[] = {
+ { .f = { 0.00, 0.00 } },
+ { .f = { 0.00, 0.00 } },
+
+ { .f = { 0x1.ffffffffffffcp+50, 0x1.ffffffffffffcp+50 } },
+ { .f = { 0x1.ffffffffffffcp+50, 0x1.ffffffffffffcp+50 } },
+ { .f = { 0x1.0000000000000p+51, 0x1.0000000000000p+51 } },
+ { .f = { 0x1.0000000000002p+51, 0x1.0000000000002p+51 } },
+
+ { .f = { 0x1.ffffffffffffep+51, 0x1.ffffffffffffep+51 } },
+ { .f = { 0x1.0000000000000p+52, 0x1.0000000000001p+52 } },
+
+ { .f = { -0x1.0000000000001p+52, -0x1.0000000000000p+52 } },
+ { .f = { -0x1.ffffffffffffep+51, -0x1.ffffffffffffep+51 } },
+
+ { .f = { -0x1.0000000000004p+51, -0x1.0000000000002p+51 } },
+ { .f = { -0x1.0000000000000p+51, -0x1.0000000000000p+51 } },
+ { .f = { -0x1.ffffffffffffcp+50, -0x1.ffffffffffffcp+50 } },
+ { .f = { -0x1.ffffffffffffcp+50, -0x1.ffffffffffffcp+50 } },
+
+ { .f = { -1.00, 0.00 } },
+ { .f = { 0.00, 0.00 } }
+};
+
+union value *answers[] = {
+ answers_NEAREST_INT,
+ answers_NEG_INF,
+ answers_POS_INF,
+ answers_ZERO,
+ 0 /* CUR_DIRECTION answers depend on current rounding mode. */
+};
+
+#include "sse4_1-round3.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/sse4_1-roundps.c b/gcc/testsuite/gcc.target/powerpc/sse4_1-roundps.c
new file mode 100644
index 0000000..4b0366d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/sse4_1-roundps.c
@@ -0,0 +1,98 @@
+/* { dg-do run } */
+/* { dg-require-effective-target vsx_hw } */
+/* { dg-options "-O2 -mvsx" } */
+
+#define NO_WARN_X86_INTRINSICS 1
+#include <smmintrin.h>
+
+#define VEC_T __m128
+#define FP_T float
+
+#define ROUND_INTRIN(x, ignored, mode) _mm_round_ps (x, mode)
+
+#include "sse4_1-round-data.h"
+
+struct data2 data[] = {
+ { .value1 = { .f = { 0.00, 0.25, 0.50, 0.75 } } },
+
+ { .value1 = { .f = { 0x1.fffff8p+21, 0x1.fffffap+21,
+ 0x1.fffffcp+21, 0x1.fffffep+21 } } },
+ { .value1 = { .f = { 0x1.fffffap+22, 0x1.fffffcp+22,
+ 0x1.fffffep+22, 0x1.fffffep+23 } } },
+ { .value1 = { .f = { -0x1.fffffep+23, -0x1.fffffep+22,
+ -0x1.fffffcp+22, -0x1.fffffap+22 } } },
+ { .value1 = { .f = { -0x1.fffffep+21, -0x1.fffffcp+21,
+ -0x1.fffffap+21, -0x1.fffff8p+21 } } },
+
+ { .value1 = { .f = { -1.00, -0.75, -0.50, -0.25 } } }
+};
+
+union value answers_NEAREST_INT[] = {
+ { .f = { 0.00, 0.00, 0.00, 1.00 } },
+
+ { .f = { 0x1.fffff8p+21, 0x1.fffff8p+21,
+ 0x1.000000p+22, 0x1.000000p+22 } },
+ { .f = { 0x1.fffff8p+22, 0x1.fffffcp+22,
+ 0x1.000000p+23, 0x1.fffffep+23 } },
+ { .f = { -0x1.fffffep+23, -0x1.000000p+23,
+ -0x1.fffffcp+22, -0x1.fffff8p+22 } },
+ { .f = { -0x1.000000p+22, -0x1.000000p+22,
+ -0x1.fffff8p+21, -0x1.fffff8p+21 } },
+
+ { .f = { -1.00, -1.00, 0.00, 0.00 } }
+};
+
+union value answers_NEG_INF[] = {
+ { .f = { 0.00, 0.00, 0.00, 0.00 } },
+
+ { .f = { 0x1.fffff8p+21, 0x1.fffff8p+21,
+ 0x1.fffff8p+21, 0x1.fffff8p+21 } },
+ { .f = { 0x1.fffff8p+22, 0x1.fffffcp+22,
+ 0x1.fffffcp+22, 0x1.fffffep+23 } },
+ { .f = { -0x1.fffffep+23, -0x1.000000p+23,
+ -0x1.fffffcp+22, -0x1.fffffcp+22 } },
+ { .f = { -0x1.000000p+22, -0x1.000000p+22,
+ -0x1.000000p+22, -0x1.fffff8p+21 } },
+
+ { .f = { -1.00, -1.00, -1.00, -1.00 } }
+};
+
+union value answers_POS_INF[] = {
+ { .f = { 0.00, 1.00, 1.00, 1.00 } },
+
+ { .f = { 0x1.fffff8p+21, 0x1.000000p+22,
+ 0x1.000000p+22, 0x1.000000p+22 } },
+ { .f = { 0x1.fffffcp+22, 0x1.fffffcp+22,
+ 0x1.000000p+23, 0x1.fffffep+23 } },
+ { .f = { -0x1.fffffep+23, -0x1.fffffcp+22,
+ -0x1.fffffcp+22, -0x1.fffff8p+22 } },
+ { .f = { -0x1.fffff8p+21, -0x1.fffff8p+21,
+ -0x1.fffff8p+21, -0x1.fffff8p+21 } },
+
+ { .f = { -1.00, 0.00, 0.00, 0.00 } }
+};
+
+union value answers_ZERO[] = {
+ { .f = { 0.00, 0.00, 0.00, 0.00 } },
+
+ { .f = { 0x1.fffff8p+21, 0x1.fffff8p+21,
+ 0x1.fffff8p+21, 0x1.fffff8p+21 } },
+ { .f = { 0x1.fffff8p+22, 0x1.fffffcp+22,
+ 0x1.fffffcp+22, 0x1.fffffep+23 } },
+ { .f = { -0x1.fffffep+23, -0x1.fffffcp+22,
+ -0x1.fffffcp+22, -0x1.fffff8p+22 } },
+ { .f = { -0x1.fffff8p+21, -0x1.fffff8p+21,
+ -0x1.fffff8p+21, -0x1.fffff8p+21 } },
+
+ { .f = { -1.00, 0.00, 0.00, 0.00 } }
+};
+
+union value *answers[] = {
+ answers_NEAREST_INT,
+ answers_NEG_INF,
+ answers_POS_INF,
+ answers_ZERO,
+ 0 /* CUR_DIRECTION answers depend on current rounding mode. */
+};
+
+#include "sse4_1-round3.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/sse4_1-roundsd.c b/gcc/testsuite/gcc.target/powerpc/sse4_1-roundsd.c
new file mode 100644
index 0000000..4f8d9e0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/sse4_1-roundsd.c
@@ -0,0 +1,256 @@
+/* { dg-do run } */
+/* { dg-require-effective-target vsx_hw } */
+/* { dg-options "-O2 -mvsx" } */
+
+#include <stdio.h>
+#define NO_WARN_X86_INTRINSICS 1
+#include <smmintrin.h>
+
+#define VEC_T __m128d
+#define FP_T double
+
+#define ROUND_INTRIN(x, y, mode) _mm_round_sd (x, y, mode)
+
+#include "sse4_1-round-data.h"
+
+static struct data2 data[] = {
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0.00, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0.25, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0.50, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0.75, IGNORED } } },
+
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.ffffffffffffcp+50, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.ffffffffffffdp+50, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.ffffffffffffep+50, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.fffffffffffffp+50, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.0000000000000p+51, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.0000000000001p+51, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.0000000000002p+51, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.0000000000003p+51, IGNORED } } },
+
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.ffffffffffffep+51, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.fffffffffffffp+51, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.0000000000000p+52, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.0000000000001p+52, IGNORED } } },
+
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.0000000000001p+52, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.0000000000000p+52, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.fffffffffffffp+51, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.ffffffffffffep+51, IGNORED } } },
+
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.0000000000004p+51, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.0000000000002p+51, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.0000000000001p+51, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.0000000000000p+51, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.ffffffffffffcp+50, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.ffffffffffffep+50, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.ffffffffffffdp+50, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.ffffffffffffcp+50, IGNORED } } },
+
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -1.00, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0.75, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0.50, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH } },
+ .value2 = { .f = { -0.25, IGNORED } } }
+};
+
+static union value answers_NEAREST_INT[] = {
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 1.00, PASSTHROUGH } },
+
+ { .f = { 0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { 0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000002p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000004p+51, PASSTHROUGH } },
+
+ { .f = { 0x1.ffffffffffffep+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+52, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+52, PASSTHROUGH } },
+ { .f = { 0x1.0000000000001p+52, PASSTHROUGH } },
+
+ { .f = { -0x1.0000000000001p+52, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+52, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+52, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffep+51, PASSTHROUGH } },
+
+ { .f = { -0x1.0000000000004p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000002p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+
+ { .f = { -1.00, PASSTHROUGH } },
+ { .f = { -1.00, PASSTHROUGH } },
+ { .f = { -0.00, PASSTHROUGH } },
+ { .f = { -0.00, PASSTHROUGH } }
+};
+
+static union value answers_NEG_INF[] = {
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } },
+
+ { .f = { 0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { 0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { 0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { 0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000002p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000002p+51, PASSTHROUGH } },
+
+ { .f = { 0x1.ffffffffffffep+51, PASSTHROUGH } },
+ { .f = { 0x1.ffffffffffffep+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+52, PASSTHROUGH } },
+ { .f = { 0x1.0000000000001p+52, PASSTHROUGH } },
+
+ { .f = { -0x1.0000000000001p+52, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+52, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+52, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffep+51, PASSTHROUGH } },
+
+ { .f = { -0x1.0000000000004p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000002p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000002p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+
+ { .f = { -1.00, PASSTHROUGH } },
+ { .f = { -1.00, PASSTHROUGH } },
+ { .f = { -1.00, PASSTHROUGH } },
+ { .f = { -1.00, PASSTHROUGH } }
+};
+
+static union value answers_POS_INF[] = {
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 1.00, PASSTHROUGH } },
+ { .f = { 1.00, PASSTHROUGH } },
+ { .f = { 1.00, PASSTHROUGH } },
+
+ { .f = { 0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000002p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000002p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000004p+51, PASSTHROUGH } },
+
+ { .f = { 0x1.ffffffffffffep+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+52, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+52, PASSTHROUGH } },
+ { .f = { 0x1.0000000000001p+52, PASSTHROUGH } },
+
+ { .f = { -0x1.0000000000001p+52, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+52, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffep+51, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffep+51, PASSTHROUGH } },
+
+ { .f = { -0x1.0000000000004p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000002p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+
+ { .f = { -1.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } }
+};
+
+static union value answers_ZERO[] = {
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } },
+
+ { .f = { 0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { 0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { 0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { 0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000002p+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000002p+51, PASSTHROUGH } },
+
+ { .f = { 0x1.ffffffffffffep+51, PASSTHROUGH } },
+ { .f = { 0x1.ffffffffffffep+51, PASSTHROUGH } },
+ { .f = { 0x1.0000000000000p+52, PASSTHROUGH } },
+ { .f = { 0x1.0000000000001p+52, PASSTHROUGH } },
+
+ { .f = { -0x1.0000000000001p+52, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+52, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffep+51, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffep+51, PASSTHROUGH } },
+
+ { .f = { -0x1.0000000000004p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000002p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { -0x1.0000000000000p+51, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+ { .f = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
+
+ { .f = { -1.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH } }
+};
+
+union value *answers[] = {
+ answers_NEAREST_INT,
+ answers_NEG_INF,
+ answers_POS_INF,
+ answers_ZERO,
+ 0 /* CUR_DIRECTION answers depend on current rounding mode. */
+};
+
+#include "sse4_1-round3.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/sse4_1-roundss.c b/gcc/testsuite/gcc.target/powerpc/sse4_1-roundss.c
new file mode 100644
index 0000000..d788ebd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/sse4_1-roundss.c
@@ -0,0 +1,208 @@
+/* { dg-do run } */
+/* { dg-require-effective-target vsx_hw } */
+/* { dg-options "-O2 -mvsx" } */
+
+#include <stdio.h>
+#define NO_WARN_X86_INTRINSICS 1
+#include <smmintrin.h>
+
+#define VEC_T __m128
+#define FP_T float
+
+#define ROUND_INTRIN(x, y, mode) _mm_round_ss (x, y, mode)
+
+#include "sse4_1-round-data.h"
+
+static struct data2 data[] = {
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { 0.00, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { 0.25, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { 0.50, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { 0.75, IGNORED, IGNORED, IGNORED } } },
+
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.fffff8p+21, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.fffffap+21, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.fffffcp+21, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.fffffep+21, IGNORED, IGNORED, IGNORED } } },
+
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.fffffap+22, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.fffffcp+22, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.fffffep+22, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { 0x1.fffffep+23, IGNORED, IGNORED, IGNORED } } },
+
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.fffffep+23, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.fffffep+22, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.fffffcp+22, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.fffffap+22, IGNORED, IGNORED, IGNORED } } },
+
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.fffffep+21, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.fffffcp+21, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.fffffap+21, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { -0x1.fffff8p+21, IGNORED, IGNORED, IGNORED } } },
+
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { -1.00, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { -0.75, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { -0.50, IGNORED, IGNORED, IGNORED } } },
+ { .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ .value2 = { .f = { -0.25, IGNORED, IGNORED, IGNORED } } }
+};
+
+static union value answers_NEAREST_INT[] = {
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 1.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { 0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { 0x1.fffff8p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.000000p+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffffep+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { -0x1.fffffep+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.000000p+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffff8p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { -0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { -1.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -1.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } }
+};
+
+static union value answers_NEG_INF[] = {
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { 0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { 0x1.fffff8p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffffep+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { -0x1.fffffep+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.000000p+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { -0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { -1.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -1.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -1.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -1.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } }
+};
+
+static union value answers_POS_INF[] = {
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 1.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 1.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 1.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { 0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { 0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.000000p+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffffep+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { -0x1.fffffep+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffff8p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { -1.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } }
+};
+
+static union value answers_ZERO[] = {
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { 0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { 0x1.fffff8p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0x1.fffffep+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { -0x1.fffffep+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffff8p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+
+ { .f = { -1.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
+ { .f = { 0.00, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } }
+};
+
+union value *answers[] = {
+ answers_NEAREST_INT,
+ answers_NEG_INF,
+ answers_POS_INF,
+ answers_ZERO,
+ 0 /* CUR_DIRECTION answers depend on current rounding mode. */
+};
+
+#include "sse4_1-round3.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/swaps-p8-17.c b/gcc/testsuite/gcc.target/powerpc/swaps-p8-17.c
index 5edbca4..342ccd6 100644
--- a/gcc/testsuite/gcc.target/powerpc/swaps-p8-17.c
+++ b/gcc/testsuite/gcc.target/powerpc/swaps-p8-17.c
@@ -1,7 +1,6 @@
/* { dg-do compile { target { le } } } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power8 -O1 -mno-fold-gimple" } */
-/* { dg-prune-output "gimple folding of rs6000 builtins has been disabled." } */
+/* { dg-options "-mdejagnu-cpu=power8 -O1" } */
/* { dg-final { scan-assembler "lxvd2x" } } */
/* { dg-final { scan-assembler "xxpermdi" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/test_fpscr_drn_builtin_error.c b/gcc/testsuite/gcc.target/powerpc/test_fpscr_drn_builtin_error.c
index 028ab0b..4f9d9e0 100644
--- a/gcc/testsuite/gcc.target/powerpc/test_fpscr_drn_builtin_error.c
+++ b/gcc/testsuite/gcc.target/powerpc/test_fpscr_drn_builtin_error.c
@@ -9,8 +9,8 @@ int main ()
__builtin_set_fpscr_drn() also support a variable as an argument but
can't test variable value at compile time. */
- __builtin_set_fpscr_drn(-1); /* { dg-error "Argument must be a value between 0 and 7" } */
- __builtin_set_fpscr_drn(8); /* { dg-error "Argument must be a value between 0 and 7" } */
+ __builtin_set_fpscr_drn(-1); /* { dg-error "argument 1 must be a variable or a literal between 0 and 7, inclusive" } */
+ __builtin_set_fpscr_drn(8); /* { dg-error "argument 1 must be a variable or a literal between 0 and 7, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin.c b/gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin.c
index 0d0d3f0..04707ad 100644
--- a/gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin.c
+++ b/gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin.c
@@ -8,6 +8,10 @@
#define RN_MASK 0x3LL /* RN field mask */
void abort (void);
+void __attribute__ ((noipa)) wrap_set_fpscr_rn (int val)
+{
+ __builtin_set_fpscr_rn (val);
+}
int main ()
{
@@ -43,7 +47,8 @@ int main ()
}
/* Test float rounding mode builtin with const value argument. */
- __builtin_set_fpscr_rn(3);
+ val = 3;
+ __builtin_set_fpscr_rn (val);
conv_val.d = __builtin_mffs();
ll_value = conv_val.ll & RN_MASK;
@@ -58,7 +63,7 @@ int main ()
}
val = 2;
- __builtin_set_fpscr_rn(val);
+ __builtin_set_fpscr_rn (val);
conv_val.d = __builtin_mffs();
ll_value = conv_val.ll & RN_MASK;
@@ -74,7 +79,7 @@ int main ()
/* Reset to 0 for testing */
val = 0;
- __builtin_set_fpscr_rn(val);
+ __builtin_set_fpscr_rn (val);
__builtin_mtfsb1(31);
conv_val.d = __builtin_mffs();
@@ -157,7 +162,7 @@ int main ()
/* Test builtin float rounding mode with variable as argument. */
val = 0;
- __builtin_set_fpscr_rn(val);
+ wrap_set_fpscr_rn (val);
conv_val.d = __builtin_mffs();
ll_value = conv_val.ll & RN_MASK;
@@ -172,7 +177,7 @@ int main ()
}
val = 3;
- __builtin_set_fpscr_rn(val);
+ wrap_set_fpscr_rn (val);
conv_val.d = __builtin_mffs();
ll_value = conv_val.ll & RN_MASK;
diff --git a/gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin_error.c b/gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin_error.c
index aea6509..62152c6 100644
--- a/gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin_error.c
+++ b/gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin_error.c
@@ -8,13 +8,13 @@ int main ()
int arguments. The builtins __builtin_set_fpscr_rn() also supports a
variable as an argument but can't test variable value at compile time. */
- __builtin_mtfsb0(-1); /* { dg-error "Argument must be a constant between 0 and 31" } */
- __builtin_mtfsb0(32); /* { dg-error "Argument must be a constant between 0 and 31" } */
+ __builtin_mtfsb0(-1); /* { dg-error "argument 1 must be a literal between 0 and 31, inclusive" } */
+ __builtin_mtfsb0(32); /* { dg-error "argument 1 must be a literal between 0 and 31, inclusive" } */
- __builtin_mtfsb1(-1); /* { dg-error "Argument must be a constant between 0 and 31" } */
- __builtin_mtfsb1(32); /* { dg-error "Argument must be a constant between 0 and 31" } */
+ __builtin_mtfsb1(-1); /* { dg-error "argument 1 must be a literal between 0 and 31, inclusive" } */
+ __builtin_mtfsb1(32); /* { dg-error "argument 1 must be a literal between 0 and 31, inclusive" } */
- __builtin_set_fpscr_rn(-1); /* { dg-error "Argument must be a value between 0 and 3" } */
- __builtin_set_fpscr_rn(4); /* { dg-error "Argument must be a value between 0 and 3" } */
+ __builtin_set_fpscr_rn(-1); /* { dg-error "argument 1 must be a variable or a literal between 0 and 3, inclusive" } */
+ __builtin_set_fpscr_rn(4); /* { dg-error "argument 1 must be a variable or a literal between 0 and 3, inclusive" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/test_mffsl.c b/gcc/testsuite/gcc.target/powerpc/test_mffsl.c
index 41377ef..f1f960c 100644
--- a/gcc/testsuite/gcc.target/powerpc/test_mffsl.c
+++ b/gcc/testsuite/gcc.target/powerpc/test_mffsl.c
@@ -1,5 +1,6 @@
/* { dg-do run { target { powerpc*-*-* } } } */
-/* { dg-options "-O2 -std=c99" } */
+/* { dg-options "-O2 -std=c99 -mcpu=power9" } */
+/* { dg-require-effective-target p9vector_hw } */
#ifdef DEBUG
#include <stdio.h>
@@ -27,7 +28,7 @@ int main ()
if (mffs_val.ll != mffsl_val.ll)
{
#ifdef DEBUG
- printf("ERROR, __builtin_mffsl() returned 0x%llx, not the expecected value 0x%llx\n",
+ printf("ERROR, __builtin_mffsl() returned 0x%llx, not the expected value 0x%llx\n",
mffsl_val.ll, mffs_val.ll);
#else
abort();
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-gnb-2.c b/gcc/testsuite/gcc.target/powerpc/vec-gnb-2.c
index 895bb95..4e59cbf 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-gnb-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-gnb-2.c
@@ -20,7 +20,7 @@ do_vec_gnb (vector unsigned __int128 source, int stride)
case 5:
return vec_gnb (source, 1); /* { dg-error "between 2 and 7" } */
case 6:
- return vec_gnb (source, stride); /* { dg-error "unsigned literal" } */
+ return vec_gnb (source, stride); /* { dg-error "literal" } */
case 7:
return vec_gnb (source, 7);
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-minmax-1.c b/gcc/testsuite/gcc.target/powerpc/vec-minmax-1.c
new file mode 100644
index 0000000..3f6e376
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-minmax-1.c
@@ -0,0 +1,53 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-O2 -mdejagnu-cpu=power9" } */
+/* { dg-final { scan-assembler-times {\mxvmaxdp\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mxvmaxsp\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mxvmindp\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mxvminsp\M} 1 } } */
+
+/* This test verifies that float or double vec_min/max are bound to
+ xv[min|max][d|s]p instructions when fast-math is not set. */
+
+
+#include <altivec.h>
+
+#ifdef _BIG_ENDIAN
+ const int PREF_D = 0;
+#else
+ const int PREF_D = 1;
+#endif
+
+double vmaxd (double a, double b)
+{
+ vector double va = vec_promote (a, PREF_D);
+ vector double vb = vec_promote (b, PREF_D);
+ return vec_extract (vec_max (va, vb), PREF_D);
+}
+
+double vmind (double a, double b)
+{
+ vector double va = vec_promote (a, PREF_D);
+ vector double vb = vec_promote (b, PREF_D);
+ return vec_extract (vec_min (va, vb), PREF_D);
+}
+
+#ifdef _BIG_ENDIAN
+ const int PREF_F = 0;
+#else
+ const int PREF_F = 3;
+#endif
+
+float vmaxf (float a, float b)
+{
+ vector float va = vec_promote (a, PREF_F);
+ vector float vb = vec_promote (b, PREF_F);
+ return vec_extract (vec_max (va, vb), PREF_F);
+}
+
+float vminf (float a, float b)
+{
+ vector float va = vec_promote (a, PREF_F);
+ vector float vb = vec_promote (b, PREF_F);
+ return vec_extract (vec_min (va, vb), PREF_F);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-minmax-2.c b/gcc/testsuite/gcc.target/powerpc/vec-minmax-2.c
new file mode 100644
index 0000000..b27bebb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-minmax-2.c
@@ -0,0 +1,51 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-O2 -mdejagnu-cpu=power9 -ffast-math" } */
+/* { dg-final { scan-assembler-times {\mxsmaxcdp\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mxsmincdp\M} 2 } } */
+
+/* This test verifies that float or double vec_min/max can be converted
+ to scalar comparison when fast-math is set. */
+
+
+#include <altivec.h>
+
+#ifdef _BIG_ENDIAN
+ const int PREF_D = 0;
+#else
+ const int PREF_D = 1;
+#endif
+
+double vmaxd (double a, double b)
+{
+ vector double va = vec_promote (a, PREF_D);
+ vector double vb = vec_promote (b, PREF_D);
+ return vec_extract (vec_max (va, vb), PREF_D);
+}
+
+double vmind (double a, double b)
+{
+ vector double va = vec_promote (a, PREF_D);
+ vector double vb = vec_promote (b, PREF_D);
+ return vec_extract (vec_min (va, vb), PREF_D);
+}
+
+#ifdef _BIG_ENDIAN
+ const int PREF_F = 0;
+#else
+ const int PREF_F = 3;
+#endif
+
+float vmaxf (float a, float b)
+{
+ vector float va = vec_promote (a, PREF_F);
+ vector float vb = vec_promote (b, PREF_F);
+ return vec_extract (vec_max (va, vb), PREF_F);
+}
+
+float vminf (float a, float b)
+{
+ vector float va = vec_promote (a, PREF_F);
+ vector float vb = vec_promote (b, PREF_F);
+ return vec_extract (vec_min (va, vb), PREF_F);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-msumc.c b/gcc/testsuite/gcc.target/powerpc/vec-msumc.c
new file mode 100644
index 0000000..524a222
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-msumc.c
@@ -0,0 +1,39 @@
+/* { dg-do run { target { power10_hw } } } */
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+#include <altivec.h>
+
+#define DEBUG 0
+
+#if DEBUG
+#include <stdio.h>
+#endif
+
+extern void abort (void);
+
+int
+main ()
+{
+ vector unsigned long long arg1, arg2;
+ vector unsigned __int128 arg3, result, expected;
+ unsigned __int128 c = (unsigned __int128) (-1); /* 2^128 - 1 */
+
+ arg1 = (vector unsigned long long) { 111ULL, 300ULL };
+ arg2 = (vector unsigned long long) { 700ULL, 222ULL };
+ arg3 = (vector unsigned __int128) { c };
+ expected = (vector unsigned __int128) { 1 };
+
+ result = vec_msumc (arg1, arg2, arg3);
+ if (result[0] != expected[0])
+ {
+#if DEBUG
+ printf ("ERROR, expected %d, result %d\n",
+ (unsigned int) expected[0],
+ (unsigned int) result[0]);
+#else
+ abort ();
+#endif
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c b/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c
index 9497cbf..2731882 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c
@@ -54,6 +54,8 @@ main (int argc, char *argv [])
vector double src_va_double;
double src_a_double;
+ vector unsigned char vresult_uchar;
+
/* Vector replace 32-bit element */
src_a_uint = 345;
src_va_uint = (vector unsigned int) { 0, 1, 2, 3 };
@@ -172,7 +174,8 @@ main (int argc, char *argv [])
/* Byte index 7 will overwrite part of elements 2 and 3 */
expected_vresult_uint = (vector unsigned int) { 1, 2, 345*256, 0 };
- vresult_uint = vec_replace_unaligned (src_va_uint, src_a_uint, 3);
+ vresult_uchar = vec_replace_unaligned (src_va_uint, src_a_uint, 3);
+ vresult_uint = (vector unsigned int) vresult_uchar;
if (!vec_all_eq (vresult_uint, expected_vresult_uint)) {
#if DEBUG
@@ -191,7 +194,8 @@ main (int argc, char *argv [])
/* Byte index 7 will over write part of elements 1 and 2 */
expected_vresult_int = (vector int) { 1, 234*256, 0, 4 };
- vresult_int = vec_replace_unaligned (src_va_int, src_a_int, 7);
+ vresult_uchar = vec_replace_unaligned (src_va_int, src_a_int, 7);
+ vresult_int = (vector signed int) vresult_uchar;
if (!vec_all_eq (vresult_int, expected_vresult_int)) {
#if DEBUG
@@ -209,7 +213,8 @@ main (int argc, char *argv [])
vresult_float = (vector float) { 0.0, 0.0, 0.0, 0.0 };
expected_vresult_float = (vector float) { 0.0, 34.0, 20.0, 30.0 };
- vresult_float = vec_replace_unaligned (src_va_float, src_a_float, 8);
+ vresult_uchar = vec_replace_unaligned (src_va_float, src_a_float, 8);
+ vresult_float = (vector float) vresult_uchar;
if (!vec_all_eq (vresult_float, expected_vresult_float)) {
#if DEBUG
@@ -231,7 +236,8 @@ main (int argc, char *argv [])
0x200 };
/* Byte index 7 will over write least significant byte of element 0 */
- vresult_ullint = vec_replace_unaligned (src_va_ullint, src_a_ullint, 7);
+ vresult_uchar = vec_replace_unaligned (src_va_ullint, src_a_ullint, 7);
+ vresult_ullint = (vector unsigned long long) vresult_uchar;
if (!vec_all_eq (vresult_ullint, expected_vresult_ullint)) {
#if DEBUG
@@ -251,7 +257,8 @@ main (int argc, char *argv [])
/* Byte index 7 will over write least significant byte of element 0 */
expected_vresult_llint = (vector long long int) { 678*256, 0x100 };
- vresult_llint = vec_replace_unaligned (src_va_llint, src_a_llint, 7);
+ vresult_uchar = vec_replace_unaligned (src_va_llint, src_a_llint, 7);
+ vresult_llint = (vector signed long long) vresult_uchar;
if (!vec_all_eq (vresult_llint, expected_vresult_llint)) {
#if DEBUG
@@ -270,7 +277,8 @@ main (int argc, char *argv [])
vresult_double = (vector double) { 0.0, 0.0 };
expected_vresult_double = (vector double) { 0.0, 678.0 };
- vresult_double = vec_replace_unaligned (src_va_double, src_a_double, 0);
+ vresult_uchar = vec_replace_unaligned (src_va_double, src_a_double, 0);
+ vresult_double = (vector double) vresult_uchar;
if (!vec_all_eq (vresult_double, expected_vresult_double)) {
#if DEBUG
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-df.c b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-df.c
new file mode 100644
index 0000000..8f6e176
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-df.c
@@ -0,0 +1,60 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+
+#include <math.h>
+
+/* Test generating DFmode constants with the ISA 3.1 (power10) XXSPLTIDP
+ instruction. */
+
+double
+scalar_double_0 (void)
+{
+ return 0.0; /* XXSPLTIB or XXLXOR. */
+}
+
+double
+scalar_double_1 (void)
+{
+ return 1.0; /* XXSPLTIDP. */
+}
+
+#ifndef __FAST_MATH__
+double
+scalar_double_m0 (void)
+{
+ return -0.0; /* XXSPLTIDP. */
+}
+
+double
+scalar_double_nan (void)
+{
+ return __builtin_nan (""); /* XXSPLTIDP. */
+}
+
+double
+scalar_double_inf (void)
+{
+ return __builtin_inf (); /* XXSPLTIDP. */
+}
+
+double
+scalar_double_m_inf (void) /* XXSPLTIDP. */
+{
+ return - __builtin_inf ();
+}
+#endif
+
+double
+scalar_double_pi (void)
+{
+ return M_PI; /* PLFD. */
+}
+
+double
+scalar_double_denorm (void)
+{
+ return 0x1p-149f; /* PLFD. */
+}
+
+/* { dg-final { scan-assembler-times {\mxxspltidp\M} 5 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-sf.c b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-sf.c
new file mode 100644
index 0000000..72504bd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-sf.c
@@ -0,0 +1,60 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+
+#include <math.h>
+
+/* Test generating SFmode constants with the ISA 3.1 (power10) XXSPLTIDP
+ instruction. */
+
+float
+scalar_float_0 (void)
+{
+ return 0.0f; /* XXSPLTIB or XXLXOR. */
+}
+
+float
+scalar_float_1 (void)
+{
+ return 1.0f; /* XXSPLTIDP. */
+}
+
+#ifndef __FAST_MATH__
+float
+scalar_float_m0 (void)
+{
+ return -0.0f; /* XXSPLTIDP. */
+}
+
+float
+scalar_float_nan (void)
+{
+ return __builtin_nanf (""); /* XXSPLTIDP. */
+}
+
+float
+scalar_float_inf (void)
+{
+ return __builtin_inff (); /* XXSPLTIDP. */
+}
+
+float
+scalar_float_m_inf (void) /* XXSPLTIDP. */
+{
+ return - __builtin_inff ();
+}
+#endif
+
+float
+scalar_float_pi (void)
+{
+ return (float)M_PI; /* XXSPLTIDP. */
+}
+
+float
+scalar_float_denorm (void)
+{
+ return 0x1p-149f; /* PLFS. */
+}
+
+/* { dg-final { scan-assembler-times {\mxxspltidp\M} 6 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v16qi.c b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v16qi.c
new file mode 100644
index 0000000..27764dd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v16qi.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+
+#include <altivec.h>
+
+/* Test whether XXSPLTIW is generated for V16HI vector constants where the
+ first 4 elements are the same as the next 4 elements, etc. */
+
+vector unsigned char
+v16qi_const_1 (void)
+{
+ return (vector unsigned char) { 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, }; /* VSLTPISB. */
+}
+
+vector unsigned char
+v16qi_const_2 (void)
+{
+ return (vector unsigned char) { 1, 2, 3, 4, 1, 2, 3, 4,
+ 1, 2, 3, 4, 1, 2, 3, 4, }; /* XXSPLTIW. */
+}
+
+/* { dg-final { scan-assembler-times {\mxxspltiw\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mvspltisb\M|\mxxspltib\M} 1 } } */
+/* { dg-final { scan-assembler-not {\mlxvx?\M} } } */
+/* { dg-final { scan-assembler-not {\mplxv\M} } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v2df.c b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v2df.c
new file mode 100644
index 0000000..82ffc86
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v2df.c
@@ -0,0 +1,64 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+
+#include <math.h>
+
+/* Test generating V2DFmode constants with the ISA 3.1 (power10) XXSPLTIDP
+ instruction. */
+
+vector double
+v2df_double_0 (void)
+{
+ return (vector double) { 0.0, 0.0 }; /* XXSPLTIB or XXLXOR. */
+}
+
+vector double
+v2df_double_1 (void)
+{
+ return (vector double) { 1.0, 1.0 }; /* XXSPLTIDP. */
+}
+
+#ifndef __FAST_MATH__
+vector double
+v2df_double_m0 (void)
+{
+ return (vector double) { -0.0, -0.0 }; /* XXSPLTIDP. */
+}
+
+vector double
+v2df_double_nan (void)
+{
+ return (vector double) { __builtin_nan (""),
+ __builtin_nan ("") }; /* XXSPLTIDP. */
+}
+
+vector double
+v2df_double_inf (void)
+{
+ return (vector double) { __builtin_inf (),
+ __builtin_inf () }; /* XXSPLTIDP. */
+}
+
+vector double
+v2df_double_m_inf (void)
+{
+ return (vector double) { - __builtin_inf (),
+ - __builtin_inf () }; /* XXSPLTIDP. */
+}
+#endif
+
+vector double
+v2df_double_pi (void)
+{
+ return (vector double) { M_PI, M_PI }; /* PLVX. */
+}
+
+vector double
+v2df_double_denorm (void)
+{
+ return (vector double) { (double)0x1p-149f,
+ (double)0x1p-149f }; /* PLVX. */
+}
+
+/* { dg-final { scan-assembler-times {\mxxspltidp\M} 5 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v2di.c b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v2di.c
new file mode 100644
index 0000000..4d44f94
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v2di.c
@@ -0,0 +1,50 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+
+/* Test generating V2DImode constants that have the same bit pattern as
+ V2DFmode constants that can be loaded with the XXSPLTIDP instruction with
+ the ISA 3.1 (power10). */
+
+vector long long
+vector_0 (void)
+{
+ /* XXSPLTIB or XXLXOR. */
+ return (vector long long) { 0LL, 0LL };
+}
+
+vector long long
+vector_1 (void)
+{
+ /* XXSPLTIB and VEXTSB2D. */
+ return (vector long long) { 1LL, 1LL };
+}
+
+/* 0x8000000000000000LL is the bit pattern for -0.0, which can be generated
+ with XXSPLTISDP. */
+vector long long
+vector_float_neg_0 (void)
+{
+ /* XXSPLTIDP. */
+ return (vector long long) { 0x8000000000000000LL, 0x8000000000000000LL };
+}
+
+/* 0x3ff0000000000000LL is the bit pattern for 1.0 which can be generated with
+ XXSPLTISDP. */
+vector long long
+vector_float_1_0 (void)
+{
+ /* XXSPLTIDP. */
+ return (vector long long) { 0x3ff0000000000000LL, 0x3ff0000000000000LL };
+}
+
+/* 0x400921fb54442d18LL is the bit pattern for PI, which cannot be generated
+ with XXSPLTIDP. */
+vector long long
+scalar_pi (void)
+{
+ /* PLXV. */
+ return (vector long long) { 0x400921fb54442d18LL, 0x400921fb54442d18LL };
+}
+
+/* { dg-final { scan-assembler-times {\mxxspltidp\M} 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v4sf.c b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v4sf.c
new file mode 100644
index 0000000..1f0475c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v4sf.c
@@ -0,0 +1,67 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+
+#include <altivec.h>
+
+/* Test whether XXSPLTIW is generated for V4SF vector constants. */
+
+vector float
+v4sf_const_1 (void)
+{
+ return (vector float) { 1.0f, 1.0f, 1.0f, 1.0f }; /* XXSPLTIW. */
+}
+
+vector float
+v4sf_const_nan (void)
+{
+ return (vector float) { __builtin_nanf (""),
+ __builtin_nanf (""),
+ __builtin_nanf (""),
+ __builtin_nanf ("") }; /* XXSPLTIW. */
+}
+
+vector float
+v4sf_const_inf (void)
+{
+ return (vector float) { __builtin_inff (),
+ __builtin_inff (),
+ __builtin_inff (),
+ __builtin_inff () }; /* XXSPLTIW. */
+}
+
+vector float
+v4sf_const_m0 (void)
+{
+ return (vector float) { -0.0f, -0.0f, -0.0f, -0.0f }; /* XXSPLTIB/VSLW. */
+}
+
+vector float
+v4sf_splats_1 (void)
+{
+ return vec_splats (1.0f); /* XXSPLTIW. */
+}
+
+vector float
+v4sf_splats_nan (void)
+{
+ return vec_splats (__builtin_nanf ("")); /* XXSPLTIW. */
+}
+
+vector float
+v4sf_splats_inf (void)
+{
+ return vec_splats (__builtin_inff ()); /* XXSPLTIW. */
+}
+
+vector float
+v8hi_splats_m0 (void)
+{
+ return vec_splats (-0.0f); /* XXSPLTIB/VSLW. */
+}
+
+/* { dg-final { scan-assembler-times {\mxxspltiw\M} 6 } } */
+/* { dg-final { scan-assembler-times {\mxxspltib\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mvslw\M} 2 } } */
+/* { dg-final { scan-assembler-not {\mlxvx?\M} } } */
+/* { dg-final { scan-assembler-not {\mplxv\M} } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v4si.c b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v4si.c
new file mode 100644
index 0000000..02d0c6d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v4si.c
@@ -0,0 +1,51 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+
+#include <altivec.h>
+
+/* Test whether XXSPLTIW is generated for V4SI vector constants. We make sure
+ the power9 support (XXSPLTIB/VEXTSB2W) is not done. */
+
+vector int
+v4si_const_1 (void)
+{
+ return (vector int) { 1, 1, 1, 1 }; /* VSLTPISW. */
+}
+
+vector int
+v4si_const_126 (void)
+{
+ return (vector int) { 126, 126, 126, 126 }; /* XXSPLTIW. */
+}
+
+vector int
+v4si_const_1023 (void)
+{
+ return (vector int) { 1023, 1023, 1023, 1023 }; /* XXSPLTIW. */
+}
+
+vector int
+v4si_splats_1 (void)
+{
+ return vec_splats (1); /* VSLTPISW. */
+}
+
+vector int
+v4si_splats_126 (void)
+{
+ return vec_splats (126); /* XXSPLTIW. */
+}
+
+vector int
+v8hi_splats_1023 (void)
+{
+ return vec_splats (1023); /* XXSPLTIW. */
+}
+
+/* { dg-final { scan-assembler-times {\mxxspltiw\M} 4 } } */
+/* { dg-final { scan-assembler-times {\mvspltisw\M} 2 } } */
+/* { dg-final { scan-assembler-not {\mxxspltib\M} } } */
+/* { dg-final { scan-assembler-not {\mvextsb2w\M} } } */
+/* { dg-final { scan-assembler-not {\mlxvx?\M} } } */
+/* { dg-final { scan-assembler-not {\mplxv\M} } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v8hi.c b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v8hi.c
new file mode 100644
index 0000000..59418d3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec-splat-constant-v8hi.c
@@ -0,0 +1,62 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target power10_ok } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+
+#include <altivec.h>
+
+/* Test whether XXSPLTIW is generated for V8HI vector constants. We make sure
+ the power9 support (XXSPLTIB/VUPKLSB) is not done. */
+
+vector short
+v8hi_const_1 (void)
+{
+ return (vector short) { 1, 1, 1, 1, 1, 1, 1, 1 }; /* VSLTPISH. */
+}
+
+vector short
+v8hi_const_126 (void)
+{
+ return (vector short) { 126, 126, 126, 126,
+ 126, 126, 126, 126 }; /* XXSPLTIW. */
+}
+
+vector short
+v8hi_const_1023 (void)
+{
+ return (vector short) { 1023, 1023, 1023, 1023,
+ 1023, 1023, 1023, 1023 }; /* XXSPLTIW. */
+}
+
+vector short
+v8hi_splats_1 (void)
+{
+ return vec_splats ((short)1); /* VSLTPISH. */
+}
+
+vector short
+v8hi_splats_126 (void)
+{
+ return vec_splats ((short)126); /* XXSPLTIW. */
+}
+
+vector short
+v8hi_splats_1023 (void)
+{
+ return vec_splats ((short)1023); /* XXSPLTIW. */
+}
+
+/* Test that we can optimiza V8HI where all of the even elements are the same
+ and all of the odd elements are the same. */
+vector short
+v8hi_const_1023_1000 (void)
+{
+ return (vector short) { 1023, 1000, 1023, 1000,
+ 1023, 1000, 1023, 1000 }; /* XXSPLTIW. */
+}
+
+/* { dg-final { scan-assembler-times {\mxxspltiw\M} 5 } } */
+/* { dg-final { scan-assembler-times {\mvspltish\M} 2 } } */
+/* { dg-final { scan-assembler-not {\mxxspltib\M} } } */
+/* { dg-final { scan-assembler-not {\mvupklsb\M} } } */
+/* { dg-final { scan-assembler-not {\mlxvx?\M} } } */
+/* { dg-final { scan-assembler-not {\mplxv\M} } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c b/gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c
index a135279..6c01666 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c
@@ -149,8 +149,8 @@ main (int argc, char *argv [])
return 0;
}
-/* { dg-final { scan-assembler-times {\mxxspltiw\M} 2 } } */
-/* { dg-final { scan-assembler-times {\mxxspltidp\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mxxspltiw\M} 3 } } */
+/* { dg-final { scan-assembler-times {\mxxspltidp\M} 3 } } */
/* { dg-final { scan-assembler-times {\mxxsplti32dx\M} 3 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-10.c b/gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-10.c
index 35700fc..d5ec14c 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-10.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-10.c
@@ -28,7 +28,7 @@ doTests00000001 (vector unsigned __int128 a_sources [],
vector unsigned __int128 b = b_sources [j];
vector unsigned __int128 c = c_sources [k];
vector unsigned __int128 result;
- result = vec_ternarylogic (a, b, c, 0xfff); /* { dg-error "8-bit unsigned literal" } */
+ result = vec_ternarylogic (a, b, c, 0xfff); /* { dg-error "literal between 0 and 255, inclusive" } */
vector unsigned __int128 intended = (a & b & c);
if (!vector_equal (result, intended))
abort ();
@@ -47,7 +47,7 @@ doTests11100101 (vector unsigned __int128 a_sources [],
vector unsigned __int128 b = b_sources [j];
vector unsigned __int128 c = c_sources [k];
vector unsigned __int128 result;
- result = vec_ternarylogic (a, b, c, -1); /* { dg-error "8-bit unsigned literal" } */
+ result = vec_ternarylogic (a, b, c, -1); /* { dg-error "literal between 0 and 255, inclusive" } */
vector unsigned __int128 intended = { 0 };
// Supposed to be a ? c: nand (b,c)
for (int l = 0; l < 1; l++)
@@ -80,7 +80,7 @@ doTests11110011 (vector unsigned __int128 a_sources [],
vector unsigned __int128 b = b_sources [j];
vector unsigned __int128 c = c_sources [k];
vector unsigned __int128 result;
- result = vec_ternarylogic (a, b, c, i); /* { dg-error "8-bit unsigned literal" } */
+ result = vec_ternarylogic (a, b, c, i); /* { dg-error "literal between 0 and 255, inclusive" } */
vector unsigned __int128 intended = { 0 };
for (int i = 0; i < 1; i++)
intended [i] = b [i] | ~(a [i] & c [i]);
diff --git a/gcc/testsuite/gcc.target/powerpc/vec_reve_1.c b/gcc/testsuite/gcc.target/powerpc/vec_reve_1.c
new file mode 100644
index 0000000..95751d5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec_reve_1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O2 -mvsx" } */
+
+#include <altivec.h>
+
+vector double foo1 (vector double a)
+{
+ return vec_reve (a);
+}
+
+vector long long foo2 (vector long long a)
+{
+ return vec_reve (a);
+}
+
+/* { dg-final { scan-assembler-times {\mxxpermdi\M} 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec_reve_2.c b/gcc/testsuite/gcc.target/powerpc/vec_reve_2.c
new file mode 100644
index 0000000..9661939
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vec_reve_2.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-mdejagnu-cpu=power9 -O2" } */
+
+#include <altivec.h>
+
+vector int foo1 (vector int a)
+{
+ return vec_reve (a);
+}
+
+vector float foo2 (vector float a)
+{
+ return vec_reve (a);
+}
+
+vector short foo3 (vector short a)
+{
+ return vec_reve (a);
+}
+
+vector char foo4 (vector char a)
+{
+ return vec_reve (a);
+}
+
+/* { dg-final { scan-assembler-times {\mxxbrq\M} 4 } } */
+/* { dg-final { scan-assembler-times {\mxxbrw\M} 2 } } */
+/* { dg-final { scan-assembler-times {\mxxbrh\M} 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vect-gather-1.c b/gcc/testsuite/gcc.target/powerpc/vect-gather-1.c
new file mode 100644
index 0000000..bf98045
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vect-gather-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* Profitable from Power8 since it supports efficient unaligned load. */
+/* { dg-options "-Ofast -mdejagnu-cpu=power8 -fdump-tree-vect-details -fdump-tree-forwprop4" } */
+
+#ifndef INDEXTYPE
+#define INDEXTYPE unsigned int
+#endif
+double vmul(INDEXTYPE *rowstart, INDEXTYPE *rowend,
+ double *luval, double *dst)
+{
+ double res = 0;
+ for (const INDEXTYPE * col = rowstart; col != rowend; ++col, ++luval)
+ res += *luval * dst[*col];
+ return res;
+}
+
+/* With gather emulation this should be profitable to vectorize from Power8. */
+/* { dg-final { scan-tree-dump "loop vectorized" "vect" } } */
+/* The index vector loads and promotions should be scalar after forwprop. */
+/* { dg-final { scan-tree-dump-not "vec_unpack" "forwprop4" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-all-nez-7.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-all-nez-7.c
index f53c6dc..a41e82e 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-all-nez-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-all-nez-7.c
@@ -12,5 +12,5 @@ test_all_not_equal_and_not_zero (vector unsigned short *arg1_p,
vector unsigned short arg_2 = *arg2_p;
return __builtin_vec_vcmpnez_p (__CR6_LT, arg_1, arg_2);
- /* { dg-error "'__builtin_altivec_vcmpnezh_p' requires the '-mcpu=power9' option" "" { target *-*-* } .-1 } */
+ /* { dg-error "'__builtin_altivec_vcmpnezh_p' requires the '-mcpu=power9' and '-mvsx' options" "" { target *-*-* } .-1 } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-any-eqz-7.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-any-eqz-7.c
index 757acd9..3bf8a32 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-any-eqz-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-any-eqz-7.c
@@ -11,5 +11,5 @@ test_any_equal (vector unsigned int *arg1_p, vector unsigned int *arg2_p)
vector unsigned int arg_2 = *arg2_p;
return __builtin_vec_vcmpnez_p (__CR6_LT_REV, arg_1, arg_2);
- /* { dg-error "'__builtin_altivec_vcmpnezw_p' requires the '-mcpu=power9' option" "" { target *-*-* } .-1 } */
+ /* { dg-error "'__builtin_altivec_vcmpnezw_p' requires the '-mcpu=power9' and '-mvsx' options" "" { target *-*-* } .-1 } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpnez-7.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpnez-7.c
index 811b32f..52110af 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpnez-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cmpnez-7.c
@@ -10,5 +10,5 @@ fetch_data (vector unsigned int *arg1_p, vector unsigned int *arg2_p)
vector unsigned int arg_1 = *arg1_p;
vector unsigned int arg_2 = *arg2_p;
- return __builtin_vec_vcmpnez (arg_1, arg_2); /* { dg-error "'__builtin_altivec_vcmpnezw' requires the '-mcpu=power9' option" } */
+ return __builtin_vec_vcmpnez (arg_1, arg_2); /* { dg-error "'__builtin_altivec_vcmpnezw' requires the '-mcpu=power9' and '-mvsx' options" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-0.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-0.c
index 0faf233..f430152 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-0.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-0.c
@@ -1,6 +1,7 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mdejagnu-cpu=power9" } */
+/* { dg-additional-options "-mbig" { target powerpc64le-*-* } } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-1.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-1.c
index 201ed17..b0e4bee 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-1.c
@@ -1,6 +1,7 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mdejagnu-cpu=power9" } */
+/* { dg-additional-options "-mbig" { target powerpc64le-*-* } } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c
index 6ee066d..892a078 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mdejagnu-cpu=power8" } */
@@ -9,5 +9,5 @@ count_leading_zero_byte_bits (vector unsigned char *arg1_p)
{
vector unsigned char arg_1 = *arg1_p;
- return __builtin_vec_vclzlsbb (arg_1); /* { dg-error "'__builtin_altivec_vclzlsbb_v16qi' requires the '-mcpu=power9' option" } */
+ return __builtin_vec_vclzlsbb (arg_1); /* { dg-error "'__builtin_altivec_vclzlsbb_v16qi' requires the '-mcpu=power9' and '-mvsx' options" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-3.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-3.c
new file mode 100644
index 0000000..c817118
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-3.c
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-linux* } } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-mdejagnu-cpu=power9 -mlittle" } */
+
+#include <altivec.h>
+
+int
+count_leading_zero_byte_bits (vector signed char *arg1_p)
+{
+ vector signed char arg_1 = *arg1_p;
+
+ return vec_cntlz_lsbb (arg_1);
+}
+
+/* { dg-final { scan-assembler "vctzlsbb" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-4.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-4.c
new file mode 100644
index 0000000..c45048e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-4.c
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-linux* } } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-mdejagnu-cpu=power9 -mlittle" } */
+
+#include <altivec.h>
+
+int
+count_leading_zero_byte_bits (vector unsigned char *arg1_p)
+{
+ vector unsigned char arg_1 = *arg1_p;
+
+ return vec_cntlz_lsbb (arg_1);
+}
+
+/* { dg-final { scan-assembler "vctzlsbb" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-0.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-0.c
index 70a398a..9f30719 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-0.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-0.c
@@ -1,6 +1,7 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mdejagnu-cpu=power9" } */
+/* { dg-additional-options "-mbig" { target powerpc64le-*-* } } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-1.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-1.c
index f6d41e3..703f8fe 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-1.c
@@ -1,6 +1,7 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mdejagnu-cpu=power9" } */
+/* { dg-additional-options "-mbig" { target powerpc64le-*-* } } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c
index ecd0add..f0c380d 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mdejagnu-cpu=power8" } */
@@ -9,5 +9,5 @@ count_trailing_zero_byte_bits (vector unsigned char *arg1_p)
{
vector unsigned char arg_1 = *arg1_p;
- return __builtin_vec_vctzlsbb (arg_1); /* { dg-error "'__builtin_altivec_vctzlsbb_v16qi' requires the '-mcpu=power9' option" } */
+ return __builtin_vec_vctzlsbb (arg_1); /* { dg-error "'__builtin_altivec_vctzlsbb_v16qi' requires the '-mcpu=power9' and '-mvsx' options" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-3.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-3.c
new file mode 100644
index 0000000..844fb5d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-3.c
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-linux* } } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-mdejagnu-cpu=power9 -mlittle" } */
+
+#include <altivec.h>
+
+int
+count_trailing_zero_byte_bits (vector signed char *arg1_p)
+{
+ vector signed char arg_1 = *arg1_p;
+
+ return vec_cnttz_lsbb (arg_1);
+}
+
+/* { dg-final { scan-assembler "vclzlsbb" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-4.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-4.c
new file mode 100644
index 0000000..7b05f77
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-cnttz-lsbb-4.c
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { powerpc*-*-linux* } } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-mdejagnu-cpu=power9 -mlittle" } */
+
+#include <altivec.h>
+
+int
+count_trailing_zero_byte_bits (vector unsigned char *arg1_p)
+{
+ vector unsigned char arg_1 = *arg1_p;
+
+ return vec_cnttz_lsbb (arg_1);
+}
+
+/* { dg-final { scan-assembler "vclzlsbb" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-13.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-13.c
index 1cfed57..0f601fb 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-13.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xl-len-13.c
@@ -13,5 +13,5 @@
int
fetch_data (float *address, size_t length)
{
- return __builtin_vec_lxvl (address, length); /* { dg-warning "'__builtin_vec_lxvl'" } */
+ return __builtin_vec_lxvl (address, length); /* { dg-error "'__builtin_vsx_lxvl' requires the" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-12.c b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-12.c
index 3a51132..f30d49c 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-12.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vec-xst-len-12.c
@@ -13,5 +13,5 @@ store_data (vector double *datap, double *address, size_t length)
{
vector double data = *datap;
- __builtin_vec_stxvl (data, address, length); /* { dg-error "'__builtin_vec_stxvl' is not supported in this compiler configuration" } */
+ __builtin_vec_stxvl (data, address, length); /* { dg-error "'__builtin_altivec_stxvl' requires the" } */
}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsu/vsu.exp b/gcc/testsuite/gcc.target/powerpc/vsu/vsu.exp
index 5fa4870..8818017 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsu/vsu.exp
+++ b/gcc/testsuite/gcc.target/powerpc/vsu/vsu.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2021 Free Software Foundation, Inc.
+# Copyright (C) 2014-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/pru/pru.exp b/gcc/testsuite/gcc.target/pru/pru.exp
index 9fb7cf4..238329c 100644
--- a/gcc/testsuite/gcc.target/pru/pru.exp
+++ b/gcc/testsuite/gcc.target/pru/pru.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2021 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 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/pru/pru_irq_map.c b/gcc/testsuite/gcc.target/pru/pru_irq_map.c
new file mode 100644
index 0000000..4f9a5e7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/pru/pru_irq_map.c
@@ -0,0 +1,8 @@
+/* Test the special handling of .pru_irq_map section. */
+
+/* { dg-do compile } */
+
+int my_int_map __attribute__((section(".pru_irq_map")));
+
+/* Section must not have the allocated flag. */
+/* { dg-final { scan-assembler "\.section\[ \t\]+.pru_irq_map,\[ \]*\"\",[ ]*@progbits" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/arch-1.c b/gcc/testsuite/gcc.target/riscv/arch-1.c
index 9458977..c271811 100644
--- a/gcc/testsuite/gcc.target/riscv/arch-1.c
+++ b/gcc/testsuite/gcc.target/riscv/arch-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=rv32i -march=rv32I -mabi=ilp32" } */
+/* { dg-options "-march=rv32i -march=rv32I -mabi=ilp32" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/arch-10.c b/gcc/testsuite/gcc.target/riscv/arch-10.c
index 47dbda3..6124055 100644
--- a/gcc/testsuite/gcc.target/riscv/arch-10.c
+++ b/gcc/testsuite/gcc.target/riscv/arch-10.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv32gf2 -mabi=ilp32" } */
+/* { dg-options "-march=rv32gf2 -mabi=ilp32" } */
int foo()
{
}
-/* { dg-error "Extension `f' appear more than one time." "" { target *-*-* } 0 } */
+/* { dg-error "extension 'f' appear more than one time" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.target/riscv/arch-11.c b/gcc/testsuite/gcc.target/riscv/arch-11.c
index 129d8f7..d840a43 100644
--- a/gcc/testsuite/gcc.target/riscv/arch-11.c
+++ b/gcc/testsuite/gcc.target/riscv/arch-11.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv32g_zicsr2 -mabi=ilp32" } */
+/* { dg-options "-march=rv32g_zicsr2 -mabi=ilp32" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/arch-12.c b/gcc/testsuite/gcc.target/riscv/arch-12.c
index 29e16c3..e22df50 100644
--- a/gcc/testsuite/gcc.target/riscv/arch-12.c
+++ b/gcc/testsuite/gcc.target/riscv/arch-12.c
@@ -1,4 +1,4 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv64im1p2p3 -mabi=lp64" } */
+/* { dg-options "-march=rv64im1p2p3 -mabi=lp64" } */
int foo() {}
-/* { dg-error "'-march=rv64im1p2p3': For 'm1p2p\\?', version number with more than 2 level is not supported." "" { target *-*-* } 0 } */
+/* { dg-error "'-march=rv64im1p2p3': for 'm1p2p\\?', version number with more than 2 level is not supported" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.target/riscv/arch-2.c b/gcc/testsuite/gcc.target/riscv/arch-2.c
index 36b7850..8908b4b 100644
--- a/gcc/testsuite/gcc.target/riscv/arch-2.c
+++ b/gcc/testsuite/gcc.target/riscv/arch-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=rv32ixabc_xfoo -mabi=ilp32" } */
+/* { dg-options "-march=rv32ixabc_xfoo -mabi=ilp32" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/arch-3.c b/gcc/testsuite/gcc.target/riscv/arch-3.c
index 1246994..7aa945e 100644
--- a/gcc/testsuite/gcc.target/riscv/arch-3.c
+++ b/gcc/testsuite/gcc.target/riscv/arch-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=rv32isabc_xbar -mabi=ilp32" } */
+/* { dg-options "-march=rv32isabc_xbar -mabi=ilp32" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/arch-4.c b/gcc/testsuite/gcc.target/riscv/arch-4.c
index 6e55a7e..a125192 100644
--- a/gcc/testsuite/gcc.target/riscv/arch-4.c
+++ b/gcc/testsuite/gcc.target/riscv/arch-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=rv32i2p3_m4p2 -mabi=ilp32" } */
+/* { dg-options "-march=rv32i2p3_m4p2 -mabi=ilp32" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/arch-5.c b/gcc/testsuite/gcc.target/riscv/arch-5.c
index b0a1bd4..2a0f3b7 100644
--- a/gcc/testsuite/gcc.target/riscv/arch-5.c
+++ b/gcc/testsuite/gcc.target/riscv/arch-5.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=rv32isabc_hghi_zfoo_xbar -mabi=ilp32" } */
+/* { dg-options "-march=rv32isabc_hghi_zfoo_xbar -mabi=ilp32" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/arch-6.c b/gcc/testsuite/gcc.target/riscv/arch-6.c
index b36dccb..606c9df 100644
--- a/gcc/testsuite/gcc.target/riscv/arch-6.c
+++ b/gcc/testsuite/gcc.target/riscv/arch-6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=rv32id -mabi=ilp32" } */
+/* { dg-options "-march=rv32id -mabi=ilp32" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/arch-7.c b/gcc/testsuite/gcc.target/riscv/arch-7.c
index 74ab248..f7026f5 100644
--- a/gcc/testsuite/gcc.target/riscv/arch-7.c
+++ b/gcc/testsuite/gcc.target/riscv/arch-7.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv32i -march=rv32im_s -mabi=ilp32" } */
+/* { dg-options "-march=rv32i -march=rv32im_s -mabi=ilp32" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/arch-8.c b/gcc/testsuite/gcc.target/riscv/arch-8.c
index d7760fc..1b9e51b 100644
--- a/gcc/testsuite/gcc.target/riscv/arch-8.c
+++ b/gcc/testsuite/gcc.target/riscv/arch-8.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=rv32id_zicsr_zifence -mabi=ilp32" } */
+/* { dg-options "-march=rv32id_zicsr_zifence -mabi=ilp32" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/arch-9.c b/gcc/testsuite/gcc.target/riscv/arch-9.c
index 74e6410..133a42c 100644
--- a/gcc/testsuite/gcc.target/riscv/arch-9.c
+++ b/gcc/testsuite/gcc.target/riscv/arch-9.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv32g2 -mabi=ilp32" } */
+/* { dg-options "-march=rv32g2 -mabi=ilp32" } */
int foo()
{
}
-/* { dg-warning "version of `g` will be omitted, please specify version for individual extension." "" { target *-*-* } 0 } */
+/* { dg-warning "version of 'g' will be omitted, please specify version for individual extension" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-1.c b/gcc/testsuite/gcc.target/riscv/attribute-1.c
index 7150f49..bc919c5 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-1.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute" } */
+/* { dg-options "-mriscv-attribute" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-10.c b/gcc/testsuite/gcc.target/riscv/attribute-10.c
index 26fdd08..1e121a1 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-10.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-10.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv32i -march=rv32im_sx_unexpectedstring -mabi=ilp32" } */
+/* { dg-options "-march=rv32i -march=rv32im_sx_unexpectedstring -mabi=ilp32" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-11.c b/gcc/testsuite/gcc.target/riscv/attribute-11.c
index 98bd8d4..ad88813 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-11.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-11.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -march=rv32id -mabi=ilp32 -misa-spec=2.2" } */
+/* { dg-options "-mriscv-attribute -march=rv32id -mabi=ilp32 -misa-spec=2.2" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-12.c b/gcc/testsuite/gcc.target/riscv/attribute-12.c
index 44fccad..c5e5048 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-12.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-12.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -march=rv32ifd -mabi=ilp32 -misa-spec=2.2" } */
+/* { dg-options "-mriscv-attribute -march=rv32ifd -mabi=ilp32 -misa-spec=2.2" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-13.c b/gcc/testsuite/gcc.target/riscv/attribute-13.c
index 1b8f93c..f35b725 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-13.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-13.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -march=rv32if3d -mabi=ilp32 -misa-spec=2.2" } */
+/* { dg-options "-mriscv-attribute -march=rv32if3d -mabi=ilp32 -misa-spec=2.2" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-14.c b/gcc/testsuite/gcc.target/riscv/attribute-14.c
index 2591c1f..a5fa089 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-14.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-14.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -march=rv32if -mabi=ilp32 -misa-spec=20190608" } */
+/* { dg-options "-mriscv-attribute -march=rv32if -mabi=ilp32 -misa-spec=20190608" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-15.c b/gcc/testsuite/gcc.target/riscv/attribute-15.c
index 9cae1a2..59efeb6 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-15.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-15.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -march=rv32gc -mabi=ilp32 -misa-spec=2.2" } */
+/* { dg-options "-mriscv-attribute -march=rv32gc -mabi=ilp32 -misa-spec=2.2" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-16.c b/gcc/testsuite/gcc.target/riscv/attribute-16.c
index f090363..26f961e 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-16.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-16.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -march=rv32gc -mabi=ilp32 -misa-spec=20190608" } */
+/* { dg-options "-mriscv-attribute -march=rv32gc -mabi=ilp32 -misa-spec=20190608" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-17.c b/gcc/testsuite/gcc.target/riscv/attribute-17.c
index 19ef540..0abff37 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-17.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-17.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -march=rv32gc -mabi=ilp32 -misa-spec=20191213" } */
+/* { dg-options "-mriscv-attribute -march=rv32gc -mabi=ilp32 -misa-spec=20191213" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-19.c b/gcc/testsuite/gcc.target/riscv/attribute-19.c
index 18f68d9..562f808 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-19.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-19.c
@@ -1,4 +1,4 @@
/* { dg-do compile } */
-/* { dg-options "-mriscv-attribute -march=rv64imp0p9 -mabi=lp64" } */
+/* { dg-options "-mriscv-attribute -march=rv64imp0p9 -mabi=lp64 -misa-spec=2.2" } */
int foo() {}
/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p0_m2p0_p0p9\"" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-2.c b/gcc/testsuite/gcc.target/riscv/attribute-2.c
index 3636a1a..b8cacae 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-2.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mno-riscv-attribute" } */
+/* { dg-options "-mno-riscv-attribute" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-3.c b/gcc/testsuite/gcc.target/riscv/attribute-3.c
index 735992d..613f3c3 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-3.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -mpreferred-stack-boundary=8" } */
+/* { dg-options "-mriscv-attribute -mpreferred-stack-boundary=8" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-4.c b/gcc/testsuite/gcc.target/riscv/attribute-4.c
index 404faad..7c565c4 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-4.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -mstrict-align" } */
+/* { dg-options "-mriscv-attribute -mstrict-align" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-5.c b/gcc/testsuite/gcc.target/riscv/attribute-5.c
index de89094..ee9cf69 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-5.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-5.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -mno-strict-align" } */
+/* { dg-options "-mriscv-attribute -mno-strict-align" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-7.c b/gcc/testsuite/gcc.target/riscv/attribute-7.c
index 3d03393..185730f 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-7.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-7.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -march=rv32e1p9 -mabi=ilp32e" } */
+/* { dg-options "-mriscv-attribute -march=rv32e1p9 -mabi=ilp32e" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-8.c b/gcc/testsuite/gcc.target/riscv/attribute-8.c
index 90f5a40..4c91b9e 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-8.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-8.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -march=rv32i2p0xabc_xv5 -mabi=ilp32" } */
+/* { dg-options "-mriscv-attribute -march=rv32i2p0xabc_xv5 -mabi=ilp32" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/attribute-9.c b/gcc/testsuite/gcc.target/riscv/attribute-9.c
index 4598872..7e3741a 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-9.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-9.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mriscv-attribute -march=rv32i2p0sabc_xbar -mabi=ilp32e" } */
+/* { dg-options "-mriscv-attribute -march=rv32i2p0sabc_xbar -mabi=ilp32e" } */
int foo()
{
}
diff --git a/gcc/testsuite/gcc.target/riscv/interrupt-1.c b/gcc/testsuite/gcc.target/riscv/interrupt-1.c
index 666b29a..d85eb98 100644
--- a/gcc/testsuite/gcc.target/riscv/interrupt-1.c
+++ b/gcc/testsuite/gcc.target/riscv/interrupt-1.c
@@ -1,6 +1,6 @@
/* Verify the return instruction is mret. */
/* { dg-do compile } */
-/* { dg-options "-O" } */
+/* { dg-options "" } */
void __attribute__ ((interrupt))
foo (void)
{
diff --git a/gcc/testsuite/gcc.target/riscv/interrupt-2.c b/gcc/testsuite/gcc.target/riscv/interrupt-2.c
index 82e3fb2..ef50498 100644
--- a/gcc/testsuite/gcc.target/riscv/interrupt-2.c
+++ b/gcc/testsuite/gcc.target/riscv/interrupt-2.c
@@ -1,6 +1,6 @@
/* Verify that arg regs used as temporaries get saved. */
/* { dg-do compile } */
-/* { dg-options "-O" } */
+/* { dg-options "" } */
void __attribute__ ((interrupt))
foo2 (void)
{
diff --git a/gcc/testsuite/gcc.target/riscv/interrupt-3.c b/gcc/testsuite/gcc.target/riscv/interrupt-3.c
index 3d1d44d..edd2fb6 100644
--- a/gcc/testsuite/gcc.target/riscv/interrupt-3.c
+++ b/gcc/testsuite/gcc.target/riscv/interrupt-3.c
@@ -1,6 +1,7 @@
/* Verify t0 is saved before use. */
/* { dg-do compile } */
-/* { dg-options "-O0 -fomit-frame-pointer" } */
+/* { dg-options "-fomit-frame-pointer" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
void __attribute__ ((interrupt))
foo (void)
{
diff --git a/gcc/testsuite/gcc.target/riscv/interrupt-4.c b/gcc/testsuite/gcc.target/riscv/interrupt-4.c
index 658aa17..fc53f08 100644
--- a/gcc/testsuite/gcc.target/riscv/interrupt-4.c
+++ b/gcc/testsuite/gcc.target/riscv/interrupt-4.c
@@ -1,6 +1,7 @@
/* Verify t0 is saved before use. */
/* { dg-do compile } */
-/* { dg-options "-O0 -fomit-frame-pointer" } */
+/* { dg-options "-fomit-frame-pointer" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
void __attribute__ ((interrupt))
foo2 (void)
{
diff --git a/gcc/testsuite/gcc.target/riscv/interrupt-conflict-mode.c b/gcc/testsuite/gcc.target/riscv/interrupt-conflict-mode.c
index e9f1452..81ebf5f 100644
--- a/gcc/testsuite/gcc.target/riscv/interrupt-conflict-mode.c
+++ b/gcc/testsuite/gcc.target/riscv/interrupt-conflict-mode.c
@@ -1,6 +1,6 @@
/* Verify proper errors are generated for conflicted interrupt type. */
/* { dg-do compile } */
-/* { dg-options "-O" } */
+/* { dg-options "" } */
void __attribute__ ((interrupt ("user")))
foo(void);
diff --git a/gcc/testsuite/gcc.target/riscv/interrupt-debug.c b/gcc/testsuite/gcc.target/riscv/interrupt-debug.c
index a1b6dac..4ad7510 100644
--- a/gcc/testsuite/gcc.target/riscv/interrupt-debug.c
+++ b/gcc/testsuite/gcc.target/riscv/interrupt-debug.c
@@ -1,6 +1,7 @@
/* Verify that we can compile with debug info. */
/* { dg-do compile } */
-/* { dg-options "-Og -g" } */
+/* { dg-options "" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-g" } } */
extern int var1;
extern int var2;
extern void sub2 (void);
diff --git a/gcc/testsuite/gcc.target/riscv/interrupt-mmode.c b/gcc/testsuite/gcc.target/riscv/interrupt-mmode.c
index fd7a7a1..50d54a0 100644
--- a/gcc/testsuite/gcc.target/riscv/interrupt-mmode.c
+++ b/gcc/testsuite/gcc.target/riscv/interrupt-mmode.c
@@ -1,6 +1,6 @@
/* Verify the return instruction is mret. */
/* { dg-do compile } */
-/* { dg-options "-O" } */
+/* { dg-options "" } */
void __attribute__ ((interrupt ("machine")))
foo (void)
{
diff --git a/gcc/testsuite/gcc.target/riscv/interrupt-smode.c b/gcc/testsuite/gcc.target/riscv/interrupt-smode.c
index 2f696d3..973a9b1 100644
--- a/gcc/testsuite/gcc.target/riscv/interrupt-smode.c
+++ b/gcc/testsuite/gcc.target/riscv/interrupt-smode.c
@@ -1,6 +1,6 @@
/* Verify the return instruction is mret. */
/* { dg-do compile } */
-/* { dg-options "-O" } */
+/* { dg-options "" } */
void __attribute__ ((interrupt ("supervisor")))
foo (void)
{
diff --git a/gcc/testsuite/gcc.target/riscv/interrupt-umode.c b/gcc/testsuite/gcc.target/riscv/interrupt-umode.c
index cd120e4..7fcef755 100644
--- a/gcc/testsuite/gcc.target/riscv/interrupt-umode.c
+++ b/gcc/testsuite/gcc.target/riscv/interrupt-umode.c
@@ -1,6 +1,6 @@
/* Verify the return instruction is mret. */
/* { dg-do compile } */
-/* { dg-options "-O" } */
+/* { dg-options "" } */
void __attribute__ ((interrupt ("user")))
foo (void)
{
diff --git a/gcc/testsuite/gcc.target/riscv/li.c b/gcc/testsuite/gcc.target/riscv/li.c
index fa5c02c..2ade06d 100644
--- a/gcc/testsuite/gcc.target/riscv/li.c
+++ b/gcc/testsuite/gcc.target/riscv/li.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O1" } */
+/* { dg-options "" } */
#include <stdlib.h>
#define LOAD_IMM(var, val) \
asm ("li %0, %1\n": "=r"(var): "i" (val))
diff --git a/gcc/testsuite/gcc.target/riscv/load-immediate.c b/gcc/testsuite/gcc.target/riscv/load-immediate.c
index f8fe747..6f644d1 100644
--- a/gcc/testsuite/gcc.target/riscv/load-immediate.c
+++ b/gcc/testsuite/gcc.target/riscv/load-immediate.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc -mabi=lp64d -O2" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* Check that we don't have unnecessary load immediate instructions. */
void
diff --git a/gcc/testsuite/gcc.target/riscv/losum-overflow.c b/gcc/testsuite/gcc.target/riscv/losum-overflow.c
index 9c01c7f..843abb6 100644
--- a/gcc/testsuite/gcc.target/riscv/losum-overflow.c
+++ b/gcc/testsuite/gcc.target/riscv/losum-overflow.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32gc -mabi=ilp32 -O2 -fno-section-anchors" } */
+/* { dg-options "-march=rv32gc -mabi=ilp32 -fno-section-anchors" } */
/* Check for %lo overflow. Adding an offset larger than the alignment can
overflow if the data is allocated to an address mod 4KB that is between
diff --git a/gcc/testsuite/gcc.target/riscv/mcpu-6.c b/gcc/testsuite/gcc.target/riscv/mcpu-6.c
index 57e3345..96faa01 100644
--- a/gcc/testsuite/gcc.target/riscv/mcpu-6.c
+++ b/gcc/testsuite/gcc.target/riscv/mcpu-6.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* Verify -mtune has higher priority than -mcpu for pipeline model . */
-/* { dg-options "-mcpu=sifive-u74 -mtune=rocket -fdump-rtl-sched2-details -O3 -march=rv32i -mabi=ilp32" } */
+/* { dg-options "-mcpu=sifive-u74 -mtune=rocket -fdump-rtl-sched2-details -march=rv32i -mabi=ilp32" } */
/* { dg-final { scan-rtl-dump "simple_return\[ \]+:alu" "sched2" } } */
int main()
diff --git a/gcc/testsuite/gcc.target/riscv/mcpu-7.c b/gcc/testsuite/gcc.target/riscv/mcpu-7.c
index fe3c04b..6832323 100644
--- a/gcc/testsuite/gcc.target/riscv/mcpu-7.c
+++ b/gcc/testsuite/gcc.target/riscv/mcpu-7.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* Verify -mtune has higher priority than -mcpu for pipeline model . */
-/* { dg-options "-mcpu=sifive-s21 -mtune=sifive-u74 -fdump-rtl-sched2-details -O3 -march=rv32i -mabi=ilp32" } */
+/* { dg-options "-mcpu=sifive-s21 -mtune=sifive-u74 -fdump-rtl-sched2-details -march=rv32i -mabi=ilp32" } */
/* { dg-final { scan-rtl-dump "simple_return\[ \]+:sifive_7_B" "sched2" } } */
int main()
diff --git a/gcc/testsuite/gcc.target/riscv/pr102957.c b/gcc/testsuite/gcc.target/riscv/pr102957.c
new file mode 100644
index 0000000..9747dde
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/pr102957.c
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gzb -mabi=lp64" } */
+int foo()
+{
+}
diff --git a/gcc/testsuite/gcc.target/riscv/pr103302.c b/gcc/testsuite/gcc.target/riscv/pr103302.c
new file mode 100644
index 0000000..87ee630
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/pr103302.c
@@ -0,0 +1,48 @@
+/* { dg-do run { target int128 } } */
+/* { dg-options "-fharden-compares -fno-tree-dce -fno-tree-fre" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
+
+typedef unsigned char u8;
+typedef unsigned char __attribute__((__vector_size__ (32))) v256u8;
+typedef unsigned short __attribute__((__vector_size__ (32))) v256u16;
+typedef unsigned short __attribute__((__vector_size__ (64))) v512u16;
+typedef unsigned int u32;
+typedef unsigned int __attribute__((__vector_size__ (4))) v512u32;
+typedef unsigned long long __attribute__((__vector_size__ (32))) v256u64;
+typedef unsigned long long __attribute__((__vector_size__ (64))) v512u64;
+typedef unsigned __int128 __attribute__((__vector_size__ (32))) v256u128;
+typedef unsigned __int128 __attribute__((__vector_size__ (64))) v512u128;
+
+v512u16 g;
+
+void
+foo0 (u8 u8_0, v256u16 v256u16_0, v512u16 v512u16_0, u32 u32_0, v512u32,
+ v256u64 v256u64_0, v512u64 v512u64_0, v256u128 v256u128_0,
+ v512u128 v512u128_0)
+{
+ u32_0 <= (v512u128) (v512u128_0 != u8_0);
+ v512u64 v512u64_1 =
+ __builtin_shufflevector (v256u64_0, v512u64_0, 7, 8, 0, 9, 5, 0, 3, 1);
+ g = v512u16_0;
+ (v256u8) v256u16_0 + (v256u8) v256u128_0;
+}
+
+int
+main (void)
+{
+ foo0 (40, (v256u16)
+ {
+ }, (v512u16)
+ {
+ }, 0, (v512u32)
+ {
+ }, (v256u64)
+ {
+ }, (v512u64)
+ {
+ }, (v256u128)
+ {
+ }, (v512u128)
+ {
+ });
+}
diff --git a/gcc/testsuite/gcc.target/riscv/pr104140.c b/gcc/testsuite/gcc.target/riscv/pr104140.c
new file mode 100644
index 0000000..61705f4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/pr104140.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv32im -mabi=ilp32" } */
+int x;
+unsigned u, v;
+void f (void)
+{
+ long long y = x;
+ u = y * v >> 32;
+}
+void g (void) { f (); }
+
diff --git a/gcc/testsuite/gcc.target/riscv/pr84660.c b/gcc/testsuite/gcc.target/riscv/pr84660.c
index a87fa0a..b6d19f3 100644
--- a/gcc/testsuite/gcc.target/riscv/pr84660.c
+++ b/gcc/testsuite/gcc.target/riscv/pr84660.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2" } */
+/* { dg-options "" } */
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/riscv/pr93202.c b/gcc/testsuite/gcc.target/riscv/pr93202.c
index d8091b9..5501191 100644
--- a/gcc/testsuite/gcc.target/riscv/pr93202.c
+++ b/gcc/testsuite/gcc.target/riscv/pr93202.c
@@ -1,6 +1,7 @@
/* PR inline-asm/93202 */
/* { dg-do compile { target fpic } } */
/* { dg-options "-fpic" } */
+/* { dg-skip-if "" { *-*-* } { "-flto -fno-fat-lto-objects" } } */
void
foo (void)
diff --git a/gcc/testsuite/gcc.target/riscv/pr93304.c b/gcc/testsuite/gcc.target/riscv/pr93304.c
index 248f205..ce2dc4d 100644
--- a/gcc/testsuite/gcc.target/riscv/pr93304.c
+++ b/gcc/testsuite/gcc.target/riscv/pr93304.c
@@ -1,7 +1,8 @@
/* Verify the regrename won't rename registers to register which never used
before. */
/* { dg-do compile } */
-/* { dg-options "-O -frename-registers" } */
+/* { dg-options "-frename-registers" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
static unsigned _t = 0;
diff --git a/gcc/testsuite/gcc.target/riscv/pr95252.c b/gcc/testsuite/gcc.target/riscv/pr95252.c
index 0366c08..92fef59 100644
--- a/gcc/testsuite/gcc.target/riscv/pr95252.c
+++ b/gcc/testsuite/gcc.target/riscv/pr95252.c
@@ -1,6 +1,7 @@
/* PR target/95252 */
-/* { dg-options "-O3 -funroll-loops -msave-restore" } */
+/* { dg-options "-funroll-loops -msave-restore" } */
/* { dg-do run } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
int a[6], b = 1, d, e;
long long c;
diff --git a/gcc/testsuite/gcc.target/riscv/pr95683.c b/gcc/testsuite/gcc.target/riscv/pr95683.c
index 00cfbdc..5049c04 100644
--- a/gcc/testsuite/gcc.target/riscv/pr95683.c
+++ b/gcc/testsuite/gcc.target/riscv/pr95683.c
@@ -1,5 +1,5 @@
/* PR target/95683 */
-/* { dg-options "-Os" } */
+/* { dg-options "" } */
/* { dg-do compile } */
void a() {
asm(""
diff --git a/gcc/testsuite/gcc.target/riscv/pr98777.c b/gcc/testsuite/gcc.target/riscv/pr98777.c
index ea2c2f9..0be734b 100644
--- a/gcc/testsuite/gcc.target/riscv/pr98777.c
+++ b/gcc/testsuite/gcc.target/riscv/pr98777.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-fstrict-aliasing -O" } */
+/* { dg-options "-fstrict-aliasing" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
typedef struct {
_Complex e;
diff --git a/gcc/testsuite/gcc.target/riscv/pr99702.c b/gcc/testsuite/gcc.target/riscv/pr99702.c
index a28724c..b7db184 100644
--- a/gcc/testsuite/gcc.target/riscv/pr99702.c
+++ b/gcc/testsuite/gcc.target/riscv/pr99702.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O" } */
+/* { dg-options "" } */
char n;
void *i, *j;
void foo(void) {
diff --git a/gcc/testsuite/gcc.target/riscv/predef-1.c b/gcc/testsuite/gcc.target/riscv/predef-1.c
index 70f121f..2e57ce6 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-1.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv32i -mabi=ilp32 -mcmodel=medlow" } */
+/* { dg-options "-march=rv32i -mabi=ilp32 -mcmodel=medlow" } */
int main () {
#if !defined(__riscv)
diff --git a/gcc/testsuite/gcc.target/riscv/predef-10.c b/gcc/testsuite/gcc.target/riscv/predef-10.c
index 7c447bf..c1a39b6 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-10.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-10.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv32i2p0 -mabi=ilp32 -mcmodel=medlow -misa-spec=2.2" } */
+/* { dg-options "-march=rv32i2p0 -mabi=ilp32 -mcmodel=medlow -misa-spec=2.2" } */
int main () {
diff --git a/gcc/testsuite/gcc.target/riscv/predef-11.c b/gcc/testsuite/gcc.target/riscv/predef-11.c
index 80f4811..ef6beca 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-11.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-11.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv64gc -mabi=lp64 -mcmodel=medlow -misa-spec=2.2" } */
+/* { dg-options "-march=rv64gc -mabi=lp64 -mcmodel=medlow -misa-spec=2.2" } */
int main () {
diff --git a/gcc/testsuite/gcc.target/riscv/predef-12.c b/gcc/testsuite/gcc.target/riscv/predef-12.c
index dd35dbd..eed5fc8 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-12.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-12.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv64gc -mabi=lp64 -mcmodel=medlow -misa-spec=20191213" } */
+/* { dg-options "-march=rv64gc -mabi=lp64 -mcmodel=medlow -misa-spec=20191213" } */
int main () {
diff --git a/gcc/testsuite/gcc.target/riscv/predef-13.c b/gcc/testsuite/gcc.target/riscv/predef-13.c
index 95cf001..3836255 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-13.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-13.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv32e -mabi=ilp32e -mcmodel=medlow -misa-spec=2.2" } */
+/* { dg-options "-march=rv32e -mabi=ilp32e -mcmodel=medlow -misa-spec=2.2" } */
int main () {
diff --git a/gcc/testsuite/gcc.target/riscv/predef-14.c b/gcc/testsuite/gcc.target/riscv/predef-14.c
new file mode 100644
index 0000000..4815150
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/predef-14.c
@@ -0,0 +1,83 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv32iv -mabi=ilp32 -mcmodel=medlow -misa-spec=2.2" } */
+
+int main () {
+
+#ifndef __riscv_arch_test
+#error "__riscv_arch_test"
+#endif
+
+#if __riscv_xlen != 32
+#error "__riscv_xlen"
+#endif
+
+#if !defined(__riscv_i)
+#error "__riscv_i"
+#endif
+
+#if defined(__riscv_c)
+#error "__riscv_c"
+#endif
+
+#if defined(__riscv_e)
+#error "__riscv_e"
+#endif
+
+#if defined(__riscv_a)
+#error "__riscv_a"
+#endif
+
+#if defined(__riscv_m)
+#error "__riscv_m"
+#endif
+
+#if !defined(__riscv_f)
+#error "__riscv_f"
+#endif
+
+#if !defined(__riscv_d)
+#error "__riscv_d"
+#endif
+
+#if !defined(__riscv_v)
+#error "__riscv_v"
+#endif
+
+#if !defined(__riscv_zvl32b)
+#error "__riscv_zvl32b"
+#endif
+
+#if !defined(__riscv_zvl64b)
+#error "__riscv_zvl64b"
+#endif
+
+#if !defined(__riscv_zvl128b)
+#error "__riscv_zvl128b"
+#endif
+
+#if defined(__riscv_zvl256b)
+#error "__riscv_zvl256b"
+#endif
+
+#if !defined(__riscv_zve32x)
+#error "__riscv_zve32x"
+#endif
+
+#if !defined(__riscv_zve32f)
+#error "__riscv_zve32f"
+#endif
+
+#if !defined(__riscv_zve64x)
+#error "__riscv_zve64x"
+#endif
+
+#if !defined(__riscv_zve64f)
+#error "__riscv_zve64f"
+#endif
+
+#if !defined(__riscv_zve64d)
+#error "__riscv_zve64d"
+#endif
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/riscv/predef-15.c b/gcc/testsuite/gcc.target/riscv/predef-15.c
new file mode 100644
index 0000000..dad1495
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/predef-15.c
@@ -0,0 +1,91 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64iv_zvl512b -mabi=lp64 -mcmodel=medlow -misa-spec=2.2" } */
+
+int main () {
+
+#ifndef __riscv_arch_test
+#error "__riscv_arch_test"
+#endif
+
+#if __riscv_xlen != 64
+#error "__riscv_xlen"
+#endif
+
+#if !defined(__riscv_i)
+#error "__riscv_i"
+#endif
+
+#if defined(__riscv_c)
+#error "__riscv_c"
+#endif
+
+#if defined(__riscv_e)
+#error "__riscv_e"
+#endif
+
+#if defined(__riscv_a)
+#error "__riscv_a"
+#endif
+
+#if defined(__riscv_m)
+#error "__riscv_m"
+#endif
+
+#if !defined(__riscv_f)
+#error "__riscv_f"
+#endif
+
+#if !defined(__riscv_d)
+#error "__riscv_d"
+#endif
+
+#if !defined(__riscv_v)
+#error "__riscv_v"
+#endif
+
+#if !defined(__riscv_zvl32b)
+#error "__riscv_zvl32b"
+#endif
+
+#if !defined(__riscv_zvl64b)
+#error "__riscv_zvl64b"
+#endif
+
+#if !defined(__riscv_zvl128b)
+#error "__riscv_zvl128b"
+#endif
+
+#if !defined(__riscv_zvl256b)
+#error "__riscv_zvl256b"
+#endif
+
+#if !defined(__riscv_zvl512b)
+#error "__riscv_zvl512b"
+#endif
+
+#if defined(__riscv_zvl1024b)
+#error "__riscv_zvl1024b"
+#endif
+
+#if !defined(__riscv_zve32x)
+#error "__riscv_zve32x"
+#endif
+
+#if !defined(__riscv_zve32f)
+#error "__riscv_zve32f"
+#endif
+
+#if !defined(__riscv_zve64x)
+#error "__riscv_zve64x"
+#endif
+
+#if !defined(__riscv_zve64f)
+#error "__riscv_zve64f"
+#endif
+
+#if !defined(__riscv_zve64d)
+#error "__riscv_zve64d"
+#endif
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/riscv/predef-16.c b/gcc/testsuite/gcc.target/riscv/predef-16.c
new file mode 100644
index 0000000..faebc1ab4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/predef-16.c
@@ -0,0 +1,91 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64i_zve64f -mabi=lp64 -mcmodel=medlow -misa-spec=2.2" } */
+
+int main () {
+
+#ifndef __riscv_arch_test
+#error "__riscv_arch_test"
+#endif
+
+#if __riscv_xlen != 64
+#error "__riscv_xlen"
+#endif
+
+#if !defined(__riscv_i)
+#error "__riscv_i"
+#endif
+
+#if defined(__riscv_c)
+#error "__riscv_c"
+#endif
+
+#if defined(__riscv_e)
+#error "__riscv_e"
+#endif
+
+#if defined(__riscv_a)
+#error "__riscv_a"
+#endif
+
+#if defined(__riscv_m)
+#error "__riscv_m"
+#endif
+
+#if !defined(__riscv_f)
+#error "__riscv_f"
+#endif
+
+#if defined(__riscv_d)
+#error "__riscv_d"
+#endif
+
+#if defined(__riscv_v)
+#error "__riscv_v"
+#endif
+
+#if !defined(__riscv_zvl32b)
+#error "__riscv_zvl32b"
+#endif
+
+#if !defined(__riscv_zvl64b)
+#error "__riscv_zvl64b"
+#endif
+
+#if defined(__riscv_zvl128b)
+#error "__riscv_zvl128b"
+#endif
+
+#if defined(__riscv_zvl256b)
+#error "__riscv_zvl256b"
+#endif
+
+#if defined(__riscv_zvl512b)
+#error "__riscv_zvl512b"
+#endif
+
+#if defined(__riscv_zvl1024b)
+#error "__riscv_zvl1024b"
+#endif
+
+#if !defined(__riscv_zve32x)
+#error "__riscv_zve32x"
+#endif
+
+#if !defined(__riscv_zve32f)
+#error "__riscv_zve32f"
+#endif
+
+#if !defined(__riscv_zve64x)
+#error "__riscv_zve64x"
+#endif
+
+#if !defined(__riscv_zve64f)
+#error "__riscv_zve64f"
+#endif
+
+#if defined(__riscv_zve64d)
+#error "__riscv_zve64d"
+#endif
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/riscv/predef-2.c b/gcc/testsuite/gcc.target/riscv/predef-2.c
index 6f3c8c38..c85b3c9 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-2.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv32imaf -mabi=ilp32f -mcmodel=medany" } */
+/* { dg-options "-march=rv32imaf -mabi=ilp32f -mcmodel=medany" } */
int main () {
#if !defined(__riscv)
diff --git a/gcc/testsuite/gcc.target/riscv/predef-3.c b/gcc/testsuite/gcc.target/riscv/predef-3.c
index d7c9793..82a89d4 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-3.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv32imafdc -mabi=ilp32d -fpic" } */
+/* { dg-options "-march=rv32imafdc -mabi=ilp32d -fpic" } */
int main () {
#if !defined(__riscv)
diff --git a/gcc/testsuite/gcc.target/riscv/predef-4.c b/gcc/testsuite/gcc.target/riscv/predef-4.c
index 822f617..5868d39 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-4.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv64ia -mabi=lp64 -mcmodel=medlow" } */
+/* { dg-options "-march=rv64ia -mabi=lp64 -mcmodel=medlow" } */
int main () {
#if !defined(__riscv)
diff --git a/gcc/testsuite/gcc.target/riscv/predef-5.c b/gcc/testsuite/gcc.target/riscv/predef-5.c
index 6649049..4b2bd38 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-5.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-5.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv64imf -mabi=lp64f -mcmodel=medany" } */
+/* { dg-options "-march=rv64imf -mabi=lp64f -mcmodel=medany" } */
int main () {
#if !defined(__riscv)
diff --git a/gcc/testsuite/gcc.target/riscv/predef-6.c b/gcc/testsuite/gcc.target/riscv/predef-6.c
index 7530f95..8e5ea36 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-6.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv64gc -mabi=lp64d -fpic" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d -fpic" } */
int main () {
#if !defined(__riscv)
diff --git a/gcc/testsuite/gcc.target/riscv/predef-7.c b/gcc/testsuite/gcc.target/riscv/predef-7.c
index 0358f32..0bde299 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-7.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-7.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv32em -mabi=ilp32e -mno-div -mcmodel=medlow" } */
+/* { dg-options "-march=rv32em -mabi=ilp32e -mno-div -mcmodel=medlow" } */
int main () {
#if !defined(__riscv)
diff --git a/gcc/testsuite/gcc.target/riscv/predef-8.c b/gcc/testsuite/gcc.target/riscv/predef-8.c
index 41cd9fe..18aa591 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-8.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-8.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=rv32if -mabi=ilp32f -mno-fdiv -mcmodel=medany" } */
+/* { dg-options "-march=rv32if -mabi=ilp32f -mno-fdiv -mcmodel=medany" } */
int main () {
#if !defined(__riscv)
diff --git a/gcc/testsuite/gcc.target/riscv/promote-type-for-libcall.c b/gcc/testsuite/gcc.target/riscv/promote-type-for-libcall.c
index bdbcbc0..cd313ea 100644
--- a/gcc/testsuite/gcc.target/riscv/promote-type-for-libcall.c
+++ b/gcc/testsuite/gcc.target/riscv/promote-type-for-libcall.c
@@ -1,5 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O1 -ftree-slp-vectorize -funroll-loops" } */
+/* { dg-options "-ftree-slp-vectorize -funroll-loops" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
#include <stdio.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/riscv/riscv.exp b/gcc/testsuite/gcc.target/riscv/riscv.exp
index 2b83bf9..9b7ec56 100644
--- a/gcc/testsuite/gcc.target/riscv/riscv.exp
+++ b/gcc/testsuite/gcc.target/riscv/riscv.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2021 Free Software Foundation, Inc.
+# Copyright (C) 2017-2022 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,8 @@ if ![istarget riscv*-*-*] then {
return
}
+lappend ADDITIONAL_TORTURE_OPTIONS {-Og -g} {-Oz}
+
# Load support procs.
load_lib gcc-dg.exp
@@ -34,7 +36,7 @@ if ![info exists DEFAULT_CFLAGS] then {
dg-init
# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
"" $DEFAULT_CFLAGS
# All done.
diff --git a/gcc/testsuite/gcc.target/riscv/save-restore-1.c b/gcc/testsuite/gcc.target/riscv/save-restore-1.c
index 35b08b9..7e3737d 100644
--- a/gcc/testsuite/gcc.target/riscv/save-restore-1.c
+++ b/gcc/testsuite/gcc.target/riscv/save-restore-1.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -msave-restore -fomit-frame-pointer" } */
+/* { dg-options "-msave-restore -fomit-frame-pointer" } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/riscv/save-restore-2.c b/gcc/testsuite/gcc.target/riscv/save-restore-2.c
index 204bf67..eef8964 100644
--- a/gcc/testsuite/gcc.target/riscv/save-restore-2.c
+++ b/gcc/testsuite/gcc.target/riscv/save-restore-2.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -msave-restore" } */
+/* { dg-options "-msave-restore" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* With -msave-restore in use it should not be possible to remove the calls
to the save and restore stubs in this case (in current GCC). */
diff --git a/gcc/testsuite/gcc.target/riscv/save-restore-3.c b/gcc/testsuite/gcc.target/riscv/save-restore-3.c
index 6bf9fb0..d5304b6 100644
--- a/gcc/testsuite/gcc.target/riscv/save-restore-3.c
+++ b/gcc/testsuite/gcc.target/riscv/save-restore-3.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -msave-restore" } */
+/* { dg-options "-msave-restore" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Og" } } */
/* With -msave-restore in use GCC should be able to remove the calls to the
save and restore stubs in this case, replacing them with a tail call to
diff --git a/gcc/testsuite/gcc.target/riscv/save-restore-4.c b/gcc/testsuite/gcc.target/riscv/save-restore-4.c
index 9a0313f..eefce60 100644
--- a/gcc/testsuite/gcc.target/riscv/save-restore-4.c
+++ b/gcc/testsuite/gcc.target/riscv/save-restore-4.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -msave-restore" } */
+/* { dg-options "-msave-restore" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Og" } } */
/* This test covers a case where we can't (currently) remove the calls to
the save/restore stubs. The cast of the return value from BAR requires
diff --git a/gcc/testsuite/gcc.target/riscv/save-restore-6.c b/gcc/testsuite/gcc.target/riscv/save-restore-6.c
index 5308654..31c6774 100644
--- a/gcc/testsuite/gcc.target/riscv/save-restore-6.c
+++ b/gcc/testsuite/gcc.target/riscv/save-restore-6.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -msave-restore" } */
+/* { dg-options "-msave-restore" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* With -msave-restore in use GCC should be able to remove the calls to the
save and restore stubs in this case, replacing them with a tail call to
diff --git a/gcc/testsuite/gcc.target/riscv/save-restore-7.c b/gcc/testsuite/gcc.target/riscv/save-restore-7.c
index 06719c4..8ef38b0 100644
--- a/gcc/testsuite/gcc.target/riscv/save-restore-7.c
+++ b/gcc/testsuite/gcc.target/riscv/save-restore-7.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -msave-restore" } */
+/* { dg-options "-msave-restore" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Og" } } */
/* With -msave-restore in use it should not be possible to remove the calls
to the save and restore stubs in this case (in current GCC). */
diff --git a/gcc/testsuite/gcc.target/riscv/save-restore-8.c b/gcc/testsuite/gcc.target/riscv/save-restore-8.c
index 8880cd2..3794173 100644
--- a/gcc/testsuite/gcc.target/riscv/save-restore-8.c
+++ b/gcc/testsuite/gcc.target/riscv/save-restore-8.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -msave-restore" } */
+/* { dg-options "-msave-restore" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* As a leaf function this should never have the calls to the save and
restore stubs added, but lets check anyway. */
diff --git a/gcc/testsuite/gcc.target/riscv/save-restore-9.c b/gcc/testsuite/gcc.target/riscv/save-restore-9.c
index 2567dae..dc90137 100644
--- a/gcc/testsuite/gcc.target/riscv/save-restore-9.c
+++ b/gcc/testsuite/gcc.target/riscv/save-restore-9.c
@@ -1,5 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -msave-restore" } */
+/* { dg-options "-msave-restore" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
int
__attribute__((noinline,noclone))
diff --git a/gcc/testsuite/gcc.target/riscv/shift-and-1.c b/gcc/testsuite/gcc.target/riscv/shift-and-1.c
index d1f3a05..429ab84f 100644
--- a/gcc/testsuite/gcc.target/riscv/shift-and-1.c
+++ b/gcc/testsuite/gcc.target/riscv/shift-and-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32gc -mabi=ilp32 -O" } */
+/* { dg-options "-march=rv32gc -mabi=ilp32" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* Test for <optab>si3_mask. */
int
diff --git a/gcc/testsuite/gcc.target/riscv/shift-and-2.c b/gcc/testsuite/gcc.target/riscv/shift-and-2.c
index 2c98e50..360d841 100644
--- a/gcc/testsuite/gcc.target/riscv/shift-and-2.c
+++ b/gcc/testsuite/gcc.target/riscv/shift-and-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target { riscv64*-*-* } } } */
-/* { dg-options "-march=rv64gc -mabi=lp64 -O" } */
+/* { dg-options "-march=rv64gc -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* Test for <optab>si3_mask_1. */
extern int k;
diff --git a/gcc/testsuite/gcc.target/riscv/shift-shift-1.c b/gcc/testsuite/gcc.target/riscv/shift-shift-1.c
index a5343a3..462e532 100644
--- a/gcc/testsuite/gcc.target/riscv/shift-shift-1.c
+++ b/gcc/testsuite/gcc.target/riscv/shift-shift-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32gc -mabi=ilp32 -O" } */
+/* { dg-options "-march=rv32gc -mabi=ilp32" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */
/* Test for lshrsi3_zero_extend_3+1 pattern that uses p2m1_shift_operand. */
unsigned int
diff --git a/gcc/testsuite/gcc.target/riscv/shift-shift-2.c b/gcc/testsuite/gcc.target/riscv/shift-shift-2.c
index 10a5bb7..5f93be1 100644
--- a/gcc/testsuite/gcc.target/riscv/shift-shift-2.c
+++ b/gcc/testsuite/gcc.target/riscv/shift-shift-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc -mabi=lp64 -O" } */
+/* { dg-options "-march=rv64gc -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */
/* Test for lshrsi3_zero_extend_3+1 pattern that uses p2m1_shift_operand. */
unsigned int
diff --git a/gcc/testsuite/gcc.target/riscv/shift-shift-3.c b/gcc/testsuite/gcc.target/riscv/shift-shift-3.c
index c974e75..16999b0 100644
--- a/gcc/testsuite/gcc.target/riscv/shift-shift-3.c
+++ b/gcc/testsuite/gcc.target/riscv/shift-shift-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc -mabi=lp64 -O" } */
+/* { dg-options "-march=rv64gc -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */
/* Test for lshrsi3_zero_extend_3+2 pattern that uses
high_mask_shift_operand. */
diff --git a/gcc/testsuite/gcc.target/riscv/shift-shift-4.c b/gcc/testsuite/gcc.target/riscv/shift-shift-4.c
index 72a45ee..bc7bca1 100644
--- a/gcc/testsuite/gcc.target/riscv/shift-shift-4.c
+++ b/gcc/testsuite/gcc.target/riscv/shift-shift-4.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32i -mabi=ilp32 -O2" } */
+/* { dg-options "-march=rv32i -mabi=ilp32" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Og" } } */
/* One zero-extend shift can be eliminated by modifying the constant in the
greater than test. Started working after modifying the splitter
diff --git a/gcc/testsuite/gcc.target/riscv/shift-shift-5.c b/gcc/testsuite/gcc.target/riscv/shift-shift-5.c
index 0ecab97..ed8e7b3 100644
--- a/gcc/testsuite/gcc.target/riscv/shift-shift-5.c
+++ b/gcc/testsuite/gcc.target/riscv/shift-shift-5.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc -mabi=lp64d -O2" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */
/* Fails if lshrsi3_zero_extend_3+1 uses a temp reg which has no REG_DEST
note. */
diff --git a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-1.c b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-1.c
index 958942a..f0222f4 100644
--- a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-1.c
+++ b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-1.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -march=rv32imc -mabi=ilp32" } */
+/* { dg-options "-march=rv32imc -mabi=ilp32" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-g" } } */
/* These stores cannot be compressed because x0 is not a compressed reg.
Therefore the shorten_memrefs pass should not attempt to rewrite them into a
diff --git a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-2.c b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-2.c
index 2c2f415..ec39104 100644
--- a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-2.c
+++ b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-2.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -march=rv32imc -mabi=ilp32" } */
+/* { dg-options "-march=rv32imc -mabi=ilp32" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-Os" } } */
/* shorten_memrefs should rewrite these load/stores into a compressible
format. */
diff --git a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-3.c b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-3.c
index 2001fe8..5031628 100644
--- a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-3.c
+++ b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-3.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -march=rv32imc -mabi=ilp32" } */
+/* { dg-options "-march=rv32imc -mabi=ilp32" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-Os" } } */
/* These loads cannot be compressed because only one compressed reg is
available (since args are passed in a0-a4, that leaves a5-a7 available, of
diff --git a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-4.c b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-4.c
index cd47849..d985512 100644
--- a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-4.c
+++ b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-4.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -march=rv64imc -mabi=lp64" } */
+/* { dg-options "-march=rv64imc -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-g" } } */
/* These stores cannot be compressed because x0 is not a compressed reg.
Therefore the shorten_memrefs pass should not attempt to rewrite them into a
diff --git a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-5.c b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-5.c
index 80b3897..9217922 100644
--- a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-5.c
+++ b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-5.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -march=rv64imc -mabi=lp64" } */
+/* { dg-options "-march=rv64imc -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-Os" } } */
/* shorten_memrefs should rewrite these load/stores into a compressible
format. */
diff --git a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-6.c b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-6.c
index 3403c70..c36af6d 100644
--- a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-6.c
+++ b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-6.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -march=rv64imc -mabi=lp64" } */
+/* { dg-options "-march=rv64imc -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-Os" } } */
/* These loads cannot be compressed because only one compressed reg is
available (since args are passed in a0-a4, that leaves a5-a7 available, of
diff --git a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-7.c b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-7.c
index a5833fd..476d079 100644
--- a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-7.c
+++ b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-7.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -march=rv32imc -mabi=ilp32 -mno-shorten-memrefs" } */
+/* { dg-options "-march=rv32imc -mabi=ilp32 -mno-shorten-memrefs" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* Check that these load/stores do not get rewritten into a compressible format
when shorten_memrefs is disabled. */
diff --git a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-8.c b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-8.c
index a9128ca..6dfc015 100644
--- a/gcc/testsuite/gcc.target/riscv/shorten-memrefs-8.c
+++ b/gcc/testsuite/gcc.target/riscv/shorten-memrefs-8.c
@@ -1,4 +1,5 @@
-/* { dg-options "-Os -march=rv32imc -mabi=ilp32" } */
+/* { dg-options "-march=rv32imc -mabi=ilp32" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-Os" } } */
/* shorten_memrefs should use a correct base address*/
diff --git a/gcc/testsuite/gcc.target/riscv/switch-qi.c b/gcc/testsuite/gcc.target/riscv/switch-qi.c
index 973d09a..e39219b 100644
--- a/gcc/testsuite/gcc.target/riscv/switch-qi.c
+++ b/gcc/testsuite/gcc.target/riscv/switch-qi.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { riscv64*-*-* } } } */
-/* { dg-options "-march=rv64gc -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc -mabi=lp64" } */
/* Test for riscv_extend_comparands patch. */
extern void asdf(int);
diff --git a/gcc/testsuite/gcc.target/riscv/switch-si.c b/gcc/testsuite/gcc.target/riscv/switch-si.c
index de4d68f..c68f98d 100644
--- a/gcc/testsuite/gcc.target/riscv/switch-si.c
+++ b/gcc/testsuite/gcc.target/riscv/switch-si.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "" } */
/* Test for do_tablejump patch. */
extern void asdf(int);
diff --git a/gcc/testsuite/gcc.target/riscv/weak-1.c b/gcc/testsuite/gcc.target/riscv/weak-1.c
index 0f20501..cc89fa2 100644
--- a/gcc/testsuite/gcc.target/riscv/weak-1.c
+++ b/gcc/testsuite/gcc.target/riscv/weak-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-mcmodel=medany -mexplicit-relocs -O" } */
+/* { dg-options "-mcmodel=medany -mexplicit-relocs" } */
/* Verify that the branch doesn't get optimized away. */
extern int weak_func(void) __attribute__ ((weak));
diff --git a/gcc/testsuite/gcc.target/riscv/zba-adduw.c b/gcc/testsuite/gcc.target/riscv/zba-adduw.c
index cac1e84..2ae03ae 100644
--- a/gcc/testsuite/gcc.target/riscv/zba-adduw.c
+++ b/gcc/testsuite/gcc.target/riscv/zba-adduw.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zba_zbs -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zba_zbs -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
int foo(int n, unsigned char *arr, unsigned y){
int s = 0;
diff --git a/gcc/testsuite/gcc.target/riscv/zba-shNadd-01.c b/gcc/testsuite/gcc.target/riscv/zba-shNadd-01.c
index aaabaf5..bc97bc7 100644
--- a/gcc/testsuite/gcc.target/riscv/zba-shNadd-01.c
+++ b/gcc/testsuite/gcc.target/riscv/zba-shNadd-01.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zba -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zba -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
long test_1(long a, long b)
{
diff --git a/gcc/testsuite/gcc.target/riscv/zba-shNadd-02.c b/gcc/testsuite/gcc.target/riscv/zba-shNadd-02.c
index 8dfea4a..5f4b65f 100644
--- a/gcc/testsuite/gcc.target/riscv/zba-shNadd-02.c
+++ b/gcc/testsuite/gcc.target/riscv/zba-shNadd-02.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32gc_zba -mabi=ilp32 -O2" } */
+/* { dg-options "-march=rv32gc_zba -mabi=ilp32" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
long test_1(long a, long b)
{
diff --git a/gcc/testsuite/gcc.target/riscv/zba-shNadd-03.c b/gcc/testsuite/gcc.target/riscv/zba-shNadd-03.c
index b2ea231..8352274 100644
--- a/gcc/testsuite/gcc.target/riscv/zba-shNadd-03.c
+++ b/gcc/testsuite/gcc.target/riscv/zba-shNadd-03.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zba -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zba -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* RV64 only. */
int foos(short *x, int n){
diff --git a/gcc/testsuite/gcc.target/riscv/zba-slliuw.c b/gcc/testsuite/gcc.target/riscv/zba-slliuw.c
index a7a3dc7..cd3cf0e 100644
--- a/gcc/testsuite/gcc.target/riscv/zba-slliuw.c
+++ b/gcc/testsuite/gcc.target/riscv/zba-slliuw.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zba_zbs -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zba_zbs -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" } } */
long
foo (long i)
diff --git a/gcc/testsuite/gcc.target/riscv/zba-zextw.c b/gcc/testsuite/gcc.target/riscv/zba-zextw.c
index 26fd64d..271c186 100644
--- a/gcc/testsuite/gcc.target/riscv/zba-zextw.c
+++ b/gcc/testsuite/gcc.target/riscv/zba-zextw.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zba_zbs -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zba_zbs -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
long
foo (long i)
diff --git a/gcc/testsuite/gcc.target/riscv/zbb-andn-orn-xnor-01.c b/gcc/testsuite/gcc.target/riscv/zbb-andn-orn-xnor-01.c
index 0037dea..89a3043 100644
--- a/gcc/testsuite/gcc.target/riscv/zbb-andn-orn-xnor-01.c
+++ b/gcc/testsuite/gcc.target/riscv/zbb-andn-orn-xnor-01.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zbb -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zbb -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-g" } } */
unsigned long long foo1(unsigned long long rs1, unsigned long long rs2)
{
diff --git a/gcc/testsuite/gcc.target/riscv/zbb-andn-orn-xnor-02.c b/gcc/testsuite/gcc.target/riscv/zbb-andn-orn-xnor-02.c
index b0c1e40..ef0dade 100644
--- a/gcc/testsuite/gcc.target/riscv/zbb-andn-orn-xnor-02.c
+++ b/gcc/testsuite/gcc.target/riscv/zbb-andn-orn-xnor-02.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32gc_zbb -mabi=ilp32 -O2" } */
+/* { dg-options "-march=rv32gc_zbb -mabi=ilp32" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-g" } } */
unsigned int foo1(unsigned int rs1, unsigned int rs2)
{
diff --git a/gcc/testsuite/gcc.target/riscv/zbb-li-rotr.c b/gcc/testsuite/gcc.target/riscv/zbb-li-rotr.c
index 03254ed..500264a 100644
--- a/gcc/testsuite/gcc.target/riscv/zbb-li-rotr.c
+++ b/gcc/testsuite/gcc.target/riscv/zbb-li-rotr.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zbb -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zbb -mabi=lp64" } */
long
li_rori (void)
diff --git a/gcc/testsuite/gcc.target/riscv/zbb-min-max.c b/gcc/testsuite/gcc.target/riscv/zbb-min-max.c
index f44c398..ce054dd 100644
--- a/gcc/testsuite/gcc.target/riscv/zbb-min-max.c
+++ b/gcc/testsuite/gcc.target/riscv/zbb-min-max.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zbb -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zbb -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-g" } } */
long
foo1 (long i, long j)
diff --git a/gcc/testsuite/gcc.target/riscv/zbb-rol-ror-01.c b/gcc/testsuite/gcc.target/riscv/zbb-rol-ror-01.c
index 9589662..20c1b28 100644
--- a/gcc/testsuite/gcc.target/riscv/zbb-rol-ror-01.c
+++ b/gcc/testsuite/gcc.target/riscv/zbb-rol-ror-01.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zbb -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zbb -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-g" } } */
unsigned long foo1(unsigned long rs1, unsigned long rs2)
{
diff --git a/gcc/testsuite/gcc.target/riscv/zbb-rol-ror-02.c b/gcc/testsuite/gcc.target/riscv/zbb-rol-ror-02.c
index 24b482f..14196c1 100644
--- a/gcc/testsuite/gcc.target/riscv/zbb-rol-ror-02.c
+++ b/gcc/testsuite/gcc.target/riscv/zbb-rol-ror-02.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32gc_zbb -mabi=ilp32 -O2" } */
+/* { dg-options "-march=rv32gc_zbb -mabi=ilp32" } */
+/* { dg-skip-if "" { *-*-* } { "-g" } } */
unsigned int foo1(unsigned int rs1, unsigned int rs2)
{
diff --git a/gcc/testsuite/gcc.target/riscv/zbb-rol-ror-03.c b/gcc/testsuite/gcc.target/riscv/zbb-rol-ror-03.c
index ffde7c9..ed4685d 100644
--- a/gcc/testsuite/gcc.target/riscv/zbb-rol-ror-03.c
+++ b/gcc/testsuite/gcc.target/riscv/zbb-rol-ror-03.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zbb -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zbb -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* RV64 only*/
unsigned int rol(unsigned int rs1, unsigned int rs2)
diff --git a/gcc/testsuite/gcc.target/riscv/zbbw.c b/gcc/testsuite/gcc.target/riscv/zbbw.c
index 236ddf7..709743c 100644
--- a/gcc/testsuite/gcc.target/riscv/zbbw.c
+++ b/gcc/testsuite/gcc.target/riscv/zbbw.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zbb -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zbb -mabi=lp64" } */
int
clz (int i)
diff --git a/gcc/testsuite/gcc.target/riscv/zbs-bclr.c b/gcc/testsuite/gcc.target/riscv/zbs-bclr.c
index 4a3c2f1..5d7daa3 100644
--- a/gcc/testsuite/gcc.target/riscv/zbs-bclr.c
+++ b/gcc/testsuite/gcc.target/riscv/zbs-bclr.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zbs -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zbs -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */
/* bclr */
long
diff --git a/gcc/testsuite/gcc.target/riscv/zbs-bext.c b/gcc/testsuite/gcc.target/riscv/zbs-bext.c
index a093cdc..4798239 100644
--- a/gcc/testsuite/gcc.target/riscv/zbs-bext.c
+++ b/gcc/testsuite/gcc.target/riscv/zbs-bext.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zbs -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zbs -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* bext */
long
diff --git a/gcc/testsuite/gcc.target/riscv/zbs-binv.c b/gcc/testsuite/gcc.target/riscv/zbs-binv.c
index e4e48b9..d8d6e47 100644
--- a/gcc/testsuite/gcc.target/riscv/zbs-binv.c
+++ b/gcc/testsuite/gcc.target/riscv/zbs-binv.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zbs -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zbs -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* binv */
long
diff --git a/gcc/testsuite/gcc.target/riscv/zbs-bset.c b/gcc/testsuite/gcc.target/riscv/zbs-bset.c
index 733d427..cea2b64 100644
--- a/gcc/testsuite/gcc.target/riscv/zbs-bset.c
+++ b/gcc/testsuite/gcc.target/riscv/zbs-bset.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv64gc_zbs -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc_zbs -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* bset */
long
diff --git a/gcc/testsuite/gcc.target/riscv/zero-extend-1.c b/gcc/testsuite/gcc.target/riscv/zero-extend-1.c
index 8a7d84d..b61ea8e 100644
--- a/gcc/testsuite/gcc.target/riscv/zero-extend-1.c
+++ b/gcc/testsuite/gcc.target/riscv/zero-extend-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { riscv64*-*-* } } } */
-/* { dg-options "-march=rv64gc -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc -mabi=lp64" } */
unsigned long
sub1 (unsigned int i)
{
diff --git a/gcc/testsuite/gcc.target/riscv/zero-extend-2.c b/gcc/testsuite/gcc.target/riscv/zero-extend-2.c
index 9d30ae2..c3d6eeb 100644
--- a/gcc/testsuite/gcc.target/riscv/zero-extend-2.c
+++ b/gcc/testsuite/gcc.target/riscv/zero-extend-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { riscv64*-*-* } } } */
-/* { dg-options "-march=rv64gc -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc -mabi=lp64" } */
void
sub (unsigned int wc, unsigned long step, unsigned char *start)
{
diff --git a/gcc/testsuite/gcc.target/riscv/zero-extend-3.c b/gcc/testsuite/gcc.target/riscv/zero-extend-3.c
index eb3b8d4..6485ebd 100644
--- a/gcc/testsuite/gcc.target/riscv/zero-extend-3.c
+++ b/gcc/testsuite/gcc.target/riscv/zero-extend-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { riscv64*-*-* } } } */
-/* { dg-options "-march=rv64gc -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc -mabi=lp64" } */
extern int e (void);
enum { a, b }
c (void)
diff --git a/gcc/testsuite/gcc.target/riscv/zero-extend-4.c b/gcc/testsuite/gcc.target/riscv/zero-extend-4.c
index d7703a6..e1a8922 100644
--- a/gcc/testsuite/gcc.target/riscv/zero-extend-4.c
+++ b/gcc/testsuite/gcc.target/riscv/zero-extend-4.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target { riscv64*-*-* } } } */
-/* { dg-options "-march=rv64gc -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
int a, b, e;
struct c *d;
struct c
diff --git a/gcc/testsuite/gcc.target/riscv/zero-extend-5.c b/gcc/testsuite/gcc.target/riscv/zero-extend-5.c
index 1a135b8..4e58a15 100644
--- a/gcc/testsuite/gcc.target/riscv/zero-extend-5.c
+++ b/gcc/testsuite/gcc.target/riscv/zero-extend-5.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { riscv64*-*-* } } } */
-/* { dg-options "-march=rv64gc -mabi=lp64 -O2" } */
+/* { dg-options "-march=rv64gc -mabi=lp64" } */
int
sub (unsigned int i, unsigned int j, unsigned int k, int *array)
{
diff --git a/gcc/testsuite/gcc.target/rl78/rl78.exp b/gcc/testsuite/gcc.target/rl78/rl78.exp
index 9548b7e..2b03d43 100644
--- a/gcc/testsuite/gcc.target/rl78/rl78.exp
+++ b/gcc/testsuite/gcc.target/rl78/rl78.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2021 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 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/rx/rx.exp b/gcc/testsuite/gcc.target/rx/rx.exp
index a66f7b1..d95e581 100644
--- a/gcc/testsuite/gcc.target/rx/rx.exp
+++ b/gcc/testsuite/gcc.target/rx/rx.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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/20150826-1.c b/gcc/testsuite/gcc.target/s390/20150826-1.c
index 1567ced..67a285f 100644
--- a/gcc/testsuite/gcc.target/s390/20150826-1.c
+++ b/gcc/testsuite/gcc.target/s390/20150826-1.c
@@ -9,4 +9,4 @@ int foo(void)
{
char b[100];
return bar(b);
-} /* { dg-warning "An unconditional trap is added" } */
+} /* { dg-warning "an unconditional trap is added" } */
diff --git a/gcc/testsuite/gcc.target/s390/20211119.c b/gcc/testsuite/gcc.target/s390/20211119.c
new file mode 100644
index 0000000..b9d2163
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/20211119.c
@@ -0,0 +1,12 @@
+/* { dg-do run { target { s390_useable_hw } } } */
+/* { dg-options "-Os -march=z10" } */
+signed char a;
+int b = -925974181, c;
+unsigned *d = &b;
+int *e = &c;
+int main() {
+ *e = ((217 ^ a) > 585) < *d;
+ if (c != 1)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-bool.c b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-bool.c
new file mode 100644
index 0000000..d2f18f58
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-bool.c
@@ -0,0 +1,39 @@
+/* Check if conversion for two instructions. */
+
+/* { dg-do run } */
+/* { dg-options "-O2 -march=z13 --save-temps" } */
+
+/* { dg-final { scan-assembler "lochinle\t%r.?,1" } } */
+/* { dg-final { scan-assembler "locrnle\t.*" } } */
+#include <stdbool.h>
+#include <limits.h>
+#include <stdio.h>
+#include <assert.h>
+
+__attribute__ ((noinline))
+int foo (int *a, unsigned int n)
+{
+ int min = 999999;
+ bool bla = false;
+ for (int i = 0; i < n; i++)
+ {
+ if (a[i] < min)
+ {
+ min = a[i];
+ bla = true;
+ }
+ }
+
+ if (bla)
+ min += 1;
+ return min;
+}
+
+int main()
+{
+ int a[] = {2, 1, -13, INT_MAX, INT_MIN, 0};
+
+ int res = foo (a, sizeof (a));
+
+ assert (res == (INT_MIN + 1));
+}
diff --git a/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c
new file mode 100644
index 0000000..031cc43
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-int.c
@@ -0,0 +1,38 @@
+/* Check if conversion for two instructions. */
+
+/* { dg-do run } */
+/* { dg-options "-O2 -march=z13 --save-temps" } */
+
+/* { dg-final { scan-assembler "lochinle\t%r.?,1" } } */
+/* { dg-final { scan-assembler "locrnle\t.*" } } */
+#include <limits.h>
+#include <stdio.h>
+#include <assert.h>
+
+__attribute__ ((noinline))
+int foo (int *a, unsigned int n)
+{
+ int min = 999999;
+ int bla = 0;
+ for (int i = 0; i < n; i++)
+ {
+ if (a[i] < min)
+ {
+ min = a[i];
+ bla = 1;
+ }
+ }
+
+ if (bla)
+ min += 1;
+ return min;
+}
+
+int main()
+{
+ int a[] = {2, 1, -13, INT_MAX, INT_MIN, 0};
+
+ int res = foo (a, sizeof (a) / sizeof (a[0]));
+
+ assert (res == (INT_MIN + 1));
+}
diff --git a/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-long.c b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-long.c
new file mode 100644
index 0000000..cd04d2a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/ifcvt-two-insns-long.c
@@ -0,0 +1,38 @@
+/* Check if conversion for two instructions. */
+
+/* { dg-do run } */
+/* { dg-options "-O2 -march=z13 --save-temps" } */
+
+/* { dg-final { scan-assembler "locghinle\t%r.?,1" } } */
+/* { dg-final { scan-assembler "locgrnle\t.*" } } */
+#include <limits.h>
+#include <stdio.h>
+#include <assert.h>
+
+__attribute__ ((noinline))
+long foo (long *a, unsigned long n)
+{
+ long min = 999999;
+ long bla = 0;
+ for (int i = 0; i < n; i++)
+ {
+ if (a[i] < min)
+ {
+ min = a[i];
+ bla = 1;
+ }
+ }
+
+ if (bla)
+ min += 1;
+ return min;
+}
+
+int main()
+{
+ long a[] = {2, 1, -13, LONG_MAX, LONG_MIN, 0};
+
+ long res = foo (a, sizeof (a) / sizeof (a[0]));
+
+ assert (res == (LONG_MIN + 1));
+}
diff --git a/gcc/testsuite/gcc.target/s390/mul-wide.c b/gcc/testsuite/gcc.target/s390/mul-wide.c
new file mode 100644
index 0000000..8a2092e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/mul-wide.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -m64 -fdump-tree-optimized" } */
+
+__int128 foo(long long a, long long b)
+{
+ return (__int128)a * (__int128)b;
+}
+
+/* { dg-final { scan-tree-dump " w\\* " "optimized" } } */
diff --git a/gcc/testsuite/gcc.target/s390/nobp-section-type-conflict.c b/gcc/testsuite/gcc.target/s390/nobp-section-type-conflict.c
new file mode 100644
index 0000000..5d78bc9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/nobp-section-type-conflict.c
@@ -0,0 +1,22 @@
+/* Checks that we don't get error: section type conflict with ‘put_page’. */
+
+/* { dg-do compile } */
+/* { dg-options "-mindirect-branch=thunk-extern -mfunction-return=thunk-extern -mindirect-branch-table -O2" } */
+
+int a;
+int b (void);
+void c (int);
+
+static void
+put_page (void)
+{
+ if (b ())
+ c (a);
+}
+
+__attribute__ ((__section__ (".init.text"), __cold__)) void
+d (void)
+{
+ put_page ();
+ put_page ();
+}
diff --git a/gcc/testsuite/gcc.target/s390/pr101260.c b/gcc/testsuite/gcc.target/s390/pr101260.c
new file mode 100644
index 0000000..d7571aa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/pr101260.c
@@ -0,0 +1,63 @@
+/* PR rtl-optimization/101260 */
+/* { dg-do run { target s390_useable_hw } } */
+/* { dg-options "-O1 -march=z14" } */
+
+/* This used to fail with commit: 5dc1390b41d */
+
+struct a
+{
+ unsigned b:7;
+ int c;
+ int d;
+ short e;
+} p, *q = &p;
+int f, g, h, i, r, s;
+static short j[8][1][6] = { };
+
+char k[7];
+short l, m;
+int *n;
+int **o = &n;
+void
+t ()
+{
+ for (; f;)
+ ;
+}
+
+static struct a
+u (int x)
+{
+ struct a a = { 4, 8, 5, 4 };
+ for (; i <= 6; i++)
+ {
+ struct a v = { };
+ for (; l; l++)
+ h = 0;
+ for (; h >= 0; h--)
+ {
+ j[i];
+ struct a *w = &p;
+ s = 0;
+ for (; s < 3; s++)
+ {
+ r ^= x;
+ m = j[i][g][h] == (k[g] = g);
+ *w = v;
+ }
+ r = 2;
+ for (; r; r--)
+ *o = &r;
+ }
+ }
+ t ();
+ return a;
+}
+
+int
+main ()
+{
+ *q = u (636);
+ if (p.b != 4)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.target/s390/s390.exp b/gcc/testsuite/gcc.target/s390/s390.exp
index df46060..0c44070 100644
--- a/gcc/testsuite/gcc.target/s390/s390.exp
+++ b/gcc/testsuite/gcc.target/s390/s390.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2021 Free Software Foundation, Inc.
+# Copyright (C) 2007-2022 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/umul-wide.c b/gcc/testsuite/gcc.target/s390/umul-wide.c
new file mode 100644
index 0000000..33a74e5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/umul-wide.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -m64 -fdump-tree-optimized" } */
+
+unsigned __int128 foo(unsigned long long a, unsigned long long b)
+{
+ return (unsigned __int128)a * (unsigned __int128)b;
+}
+
+/* { dg-final { scan-tree-dump " w\\* " "optimized" } } */
diff --git a/gcc/testsuite/gcc.target/s390/zvector/imm-range-error-1.c b/gcc/testsuite/gcc.target/s390/zvector/imm-range-error-1.c
index 021c8d2..a627b54 100644
--- a/gcc/testsuite/gcc.target/s390/zvector/imm-range-error-1.c
+++ b/gcc/testsuite/gcc.target/s390/zvector/imm-range-error-1.c
@@ -17,10 +17,10 @@ main ()
triggered from s390_expand_builtin. Otherwise they would come
from the parser already preventing other errors from showing
up. */
- __builtin_s390_vrepb (q, 17); /* { dg-error "constant argument 2 for builtin '__builtin_s390_vrepb' is out of range \\(0..15\\)" } */
- __builtin_s390_vreph (h, 8); /* { dg-error "constant argument 2 for builtin '__builtin_s390_vreph' is out of range \\(0..7\\)" } */
- __builtin_s390_vrepf (s, 4); /* { dg-error "constant argument 2 for builtin '__builtin_s390_vrepf' is out of range \\(0..3\\)" } */
- __builtin_s390_vrepg (d, 2); /* { dg-error "constant argument 2 for builtin '__builtin_s390_vrepg' is out of range \\(0..1\\)" } */
+ __builtin_s390_vrepb (q, 17); /* { dg-error "constant argument 2 for builtin '__builtin_s390_vrepb' is out of range \\(0-15\\)" } */
+ __builtin_s390_vreph (h, 8); /* { dg-error "constant argument 2 for builtin '__builtin_s390_vreph' is out of range \\(0-7\\)" } */
+ __builtin_s390_vrepf (s, 4); /* { dg-error "constant argument 2 for builtin '__builtin_s390_vrepf' is out of range \\(0-3\\)" } */
+ __builtin_s390_vrepg (d, 2); /* { dg-error "constant argument 2 for builtin '__builtin_s390_vrepg' is out of range \\(0-1\\)" } */
- __builtin_s390_vpdi (d, d, 4); /* { dg-error "constant argument 3 for builtin '__builtin_s390_vpdi' is out of range \\(0..3\\)" } */
+ __builtin_s390_vpdi (d, d, 4); /* { dg-error "constant argument 3 for builtin '__builtin_s390_vpdi' is out of range \\(0-3\\)" } */
}
diff --git a/gcc/testsuite/gcc.target/sh/sh.exp b/gcc/testsuite/gcc.target/sh/sh.exp
index e39d11c..cbecb73 100644
--- a/gcc/testsuite/gcc.target/sh/sh.exp
+++ b/gcc/testsuite/gcc.target/sh/sh.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2021 Free Software Foundation, Inc.
+# Copyright (C) 2007-2022 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/torture/sh-torture.exp b/gcc/testsuite/gcc.target/sh/torture/sh-torture.exp
index 71a581d..5e707e5 100644
--- a/gcc/testsuite/gcc.target/sh/torture/sh-torture.exp
+++ b/gcc/testsuite/gcc.target/sh/torture/sh-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 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/sparc.exp b/gcc/testsuite/gcc.target/sparc/sparc.exp
index fab1399..5165bb3 100644
--- a/gcc/testsuite/gcc.target/sparc/sparc.exp
+++ b/gcc/testsuite/gcc.target/sparc/sparc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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 cd3b04a..c4383a3 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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 8cbd66f..4ec8eef 100644
--- a/gcc/testsuite/gcc.target/tic6x/tic6x.exp
+++ b/gcc/testsuite/gcc.target/tic6x/tic6x.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2021 Free Software Foundation, Inc.
+# Copyright (C) 2010-2022 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/v850/pr104400.c b/gcc/testsuite/gcc.target/v850/pr104400.c
new file mode 100644
index 0000000..5d78a77
--- /dev/null
+++ b/gcc/testsuite/gcc.target/v850/pr104400.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mv850e3v5" } */
+
+double frob (double r)
+{
+ r = -r;
+ return r;
+}
diff --git a/gcc/testsuite/gcc.target/v850/v850.exp b/gcc/testsuite/gcc.target/v850/v850.exp
new file mode 100644
index 0000000..4e8c745
--- /dev/null
+++ b/gcc/testsuite/gcc.target/v850/v850.exp
@@ -0,0 +1,41 @@
+# Copyright (C) 2022 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 v850 target.
+if ![istarget v850*-*-*] 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/vax/setmem.c b/gcc/testsuite/gcc.target/vax/setmem.c
new file mode 100644
index 0000000..6c60cfc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/vax/setmem.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+#include <stddef.h>
+
+void *
+memset8 (void *block, int c, size_t size)
+{
+ unsigned char s8 = size;
+ return __builtin_memset (block, c, s8);
+}
+
+/* Expect assembly like:
+
+ movl 4(%ap),%r6
+ movzbl 12(%ap),%r7
+ movc5 $0,(%ap),8(%ap),%r7,(%r6)
+ movl %r6,%r0
+
+ */
+
+/* { dg-final { scan-assembler "\tmovc5 \\\$0,\\\(%ap\\\)," } } */
diff --git a/gcc/testsuite/gcc.target/vax/vax.exp b/gcc/testsuite/gcc.target/vax/vax.exp
index c1262c6..45d0027 100644
--- a/gcc/testsuite/gcc.target/vax/vax.exp
+++ b/gcc/testsuite/gcc.target/vax/vax.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 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/visium/visium.exp b/gcc/testsuite/gcc.target/visium/visium.exp
index 43973a2..8480f99 100644
--- a/gcc/testsuite/gcc.target/visium/visium.exp
+++ b/gcc/testsuite/gcc.target/visium/visium.exp
@@ -1,5 +1,5 @@
# Specific regression driver for Visium.
-# Copyright (C) 2015-2021 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/README.gcc b/gcc/testsuite/gcc.target/x86_64/abi/README.gcc
index 5a2ede7..95ee150 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-2021 Free Software Foundation, Inc.
+Copyright (C) 2005-2022 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 eeca20b..e5c7336 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 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 0f2f455..cbfc1f9 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/avx512f/abi-avx512f.exp b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp
index c20d96f..eaad344 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/avx512fp16/abi-avx512fp16-xmm.exp b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/abi-avx512fp16-xmm.exp
index 33d2476..b268246 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/abi-avx512fp16-xmm.exp
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/abi-avx512fp16-xmm.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 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/avx512fp16/m256h/abi-avx512fp16-ymm.exp b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m256h/abi-avx512fp16-ymm.exp
index ecf673b..9efa7bb 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m256h/abi-avx512fp16-ymm.exp
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m256h/abi-avx512fp16-ymm.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 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/avx512fp16/m512h/abi-avx512fp16-zmm.exp b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m512h/abi-avx512fp16-zmm.exp
index 33d2476..b268246 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m512h/abi-avx512fp16-zmm.exp
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m512h/abi-avx512fp16-zmm.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 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/callabi.exp b/gcc/testsuite/gcc.target/x86_64/abi/callabi/callabi.exp
index ac9aab5..2cd0fda 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/ms-sysv/do-test.S b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
index 1d6cd95..7b891a1 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
+++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
@@ -1,5 +1,5 @@
/* Assembly proxy functions for ms_abi tests.
- Copyright (C) 2016-2021 Free Software Foundation, Inc.
+ Copyright (C) 2016-2022 Free Software Foundation, Inc.
Contributed by Daniel Santos <daniel.santos@pobox.com>
This file is part of GCC.
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
index f1a65f6..ca48a26 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
+++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
@@ -1,5 +1,5 @@
# Tests for ms_abi to sysv_abi calls.
-# Copyright (C) 2016-2021 Free Software Foundation, Inc.
+# Copyright (C) 2016-2022 Free Software Foundation, Inc.
# Contributed by Daniel Santos <daniel.santos@pobox.com>
#
# This file is part of GCC.
diff --git a/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp b/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp
index c8a0495..0c5c673 100644
--- a/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp
+++ b/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/xtensa/xtensa.exp b/gcc/testsuite/gcc.target/xtensa/xtensa.exp
index b65fa0d..cf2e935 100644
--- a/gcc/testsuite/gcc.target/xtensa/xtensa.exp
+++ b/gcc/testsuite/gcc.target/xtensa/xtensa.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2021 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 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.test-framework/README b/gcc/testsuite/gcc.test-framework/README
index f7783a0..2823ffc 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-2021 Free Software Foundation, Inc.
+Copyright (C) 2005-2022 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 40e22d6..bd66600 100644
--- 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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 b207790..302c092 100644
--- a/gcc/testsuite/gcc.test-framework/test-framework.awk
+++ b/gcc/testsuite/gcc.test-framework/test-framework.awk
@@ -3,7 +3,7 @@
# of passing tests.
#
#
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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 fb53176..d7cf8c0 100644
--- a/gcc/testsuite/gcc.test-framework/test-framework.exp
+++ b/gcc/testsuite/gcc.test-framework/test-framework.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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/gdc.dg/Wcastresult2.d b/gcc/testsuite/gdc.dg/Wcastresult2.d
index 56d2dd2..83d189a 100644
--- a/gcc/testsuite/gdc.dg/Wcastresult2.d
+++ b/gcc/testsuite/gdc.dg/Wcastresult2.d
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-Wcast-result" }
+// { dg-options "-Wcast-result -Wno-deprecated" }
void test()
{
diff --git a/gcc/testsuite/gdc.dg/asan/asan.exp b/gcc/testsuite/gdc.dg/asan/asan.exp
index 13569bd..29025cb 100644
--- a/gcc/testsuite/gdc.dg/asan/asan.exp
+++ b/gcc/testsuite/gdc.dg/asan/asan.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2021 Free Software Foundation, Inc.
+# Copyright (C) 2017-2022 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/gdc.dg/asm1.d b/gcc/testsuite/gdc.dg/asm1.d
index dce3676..1b249ee 100644
--- a/gcc/testsuite/gdc.dg/asm1.d
+++ b/gcc/testsuite/gdc.dg/asm1.d
@@ -24,9 +24,9 @@ void parse3()
{
asm { "" [; }
// { dg-error "expression expected, not ';'" "" { target *-*-* } .-1 }
- // { dg-error "found 'EOF' when expecting ','" "" { target *-*-* } .-2 }
- // { dg-error "found 'EOF' when expecting ']'" "" { target *-*-* } .-3 }
- // { dg-error "found 'EOF' when expecting ';'" "" { target *-*-* } .-4 }
+ // { dg-error "found 'End of File' when expecting ','" "" { target *-*-* } .-2 }
+ // { dg-error "found 'End of File' when expecting ']'" "" { target *-*-* } .-3 }
+ // { dg-error "found 'End of File' when expecting ';'" "" { target *-*-* } .-4 }
}
void parse4()
@@ -46,8 +46,8 @@ void semantic1()
;
}
asm { "" : : : : L1, L2; }
- // { dg-error "goto skips declaration of variable asm1.semantic1.one" "" { target *-*-* } .-1 }
- // { dg-error "goto skips declaration of variable asm1.semantic1.two" "" { target *-*-* } .-2 }
+ // { dg-error "'goto' skips declaration of variable 'asm1.semantic1.one'" "" { target *-*-* } .-1 }
+ // { dg-error "'goto' skips declaration of variable 'asm1.semantic1.two'" "" { target *-*-* } .-2 }
{
int two;
L2:
@@ -58,19 +58,19 @@ void semantic1()
void semantic2a(X...)(X expr)
{
alias X[0] var1;
- asm { "%0" : "=m" (var1); } // { dg-error "double 'double' is a type, not an lvalue" }
+ asm { "%0" : "=m" (var1); } // { dg-error "double' is a 'double' definition and cannot be modified" }
}
void semantic2()
{
- semantic2a(3.6); // { dg-error "template instance asm1.semantic2a!double error instantiating" }
+ semantic2a(3.6); // { dg-error "template instance 'asm1.semantic2a!double' error instantiating" }
}
void semantic3()
{
asm
{
- unknown; // { dg-error "undefined identifier" }
+ unknown; // { dg-error "undefined identifier 'unknown'" }
}
}
@@ -86,6 +86,6 @@ void semantic4()
{
asm
{
- "%0" : : "m" (S4.foo); // { dg-error "template instance opDispatch!\"foo\" has no value" }
+ "%0" : : "m" (S4.foo); // { dg-error "template instance 'opDispatch!\"foo\"' has no value" }
}
}
diff --git a/gcc/testsuite/gdc.dg/asm2.d b/gcc/testsuite/gdc.dg/asm2.d
index bce0e41..5b86e35 100644
--- a/gcc/testsuite/gdc.dg/asm2.d
+++ b/gcc/testsuite/gdc.dg/asm2.d
@@ -3,6 +3,6 @@ module asm2;
void test()
{
- asm const shared { } // { dg-error "const/immutable/shared/inout attributes are not allowed on asm blocks" }
+ asm const shared { } // { dg-error "'const'/'immutable'/'shared'/'inout' attributes are not allowed on 'asm' blocks" }
}
diff --git a/gcc/testsuite/gdc.dg/asm3.d b/gcc/testsuite/gdc.dg/asm3.d
index 333d83e..d792b24 100644
--- a/gcc/testsuite/gdc.dg/asm3.d
+++ b/gcc/testsuite/gdc.dg/asm3.d
@@ -2,23 +2,23 @@
// { dg-options "-Wall -Wdeprecated -Werror" }
module asm3;
-void test1() nothrow // { dg-error "nothrow function 'asm3.test1' may throw" }
+void test1() nothrow
{
- asm { } // { dg-error "asm statement is assumed to throw - mark it with 'nothrow' if it does not" }
+ asm { } // { dg-error "'asm' statement is assumed to throw - mark it with 'nothrow' if it does not" }
}
void test2() pure
{
- asm { } // { dg-error "asm statement is assumed to be impure - mark it with 'pure' if it is not" }
+ asm { } // { dg-error "'asm' statement is assumed to be impure - mark it with 'pure' if it is not" }
}
void test3() @nogc
{
- asm { } // { dg-error "asm statement is assumed to use the GC - mark it with '@nogc' if it does not" }
+ asm { } // { dg-error "'asm' statement is assumed to use the GC - mark it with '@nogc' if it does not" }
}
void test4() @safe
{
- asm { } // { dg-error "asm statement is assumed to be @system - mark it with '@trusted' if it is not" }
+ asm { } // { dg-error "'asm' statement is assumed to be '@system' - mark it with '@trusted' if it is not" }
}
diff --git a/gcc/testsuite/gdc.dg/debug/debug.exp b/gcc/testsuite/gdc.dg/debug/debug.exp
index adcdf57..d553649 100644
--- a/gcc/testsuite/gdc.dg/debug/debug.exp
+++ b/gcc/testsuite/gdc.dg/debug/debug.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 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/gdc.dg/debug/dwarf2/dwarf2.exp b/gcc/testsuite/gdc.dg/debug/dwarf2/dwarf2.exp
index f97e6a0..9f3862c 100644
--- a/gcc/testsuite/gdc.dg/debug/dwarf2/dwarf2.exp
+++ b/gcc/testsuite/gdc.dg/debug/dwarf2/dwarf2.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 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/gdc.dg/dg.exp b/gcc/testsuite/gdc.dg/dg.exp
index 0fcb2b7..f4bfa0e 100644
--- a/gcc/testsuite/gdc.dg/dg.exp
+++ b/gcc/testsuite/gdc.dg/dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2021 Free Software Foundation, Inc.
+# Copyright (C) 2017-2022 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/gdc.dg/extern-c++/extern-c++.exp b/gcc/testsuite/gdc.dg/extern-c++/extern-c++.exp
index d38f993..9c55bd4 100644
--- a/gcc/testsuite/gdc.dg/extern-c++/extern-c++.exp
+++ b/gcc/testsuite/gdc.dg/extern-c++/extern-c++.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2021 Free Software Foundation, Inc.
+# Copyright (C) 2021-2022 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/gdc.dg/gdc282.d b/gcc/testsuite/gdc.dg/gdc282.d
index ce84050..93e11fa 100644
--- a/gcc/testsuite/gdc.dg/gdc282.d
+++ b/gcc/testsuite/gdc.dg/gdc282.d
@@ -12,7 +12,7 @@ class C282a
{
}
- void f282() // { dg-error "conflicts with gdc282.C282a.f282" }
+ void f282() // { dg-error "conflicts with previous declaration" }
{
}
}
@@ -27,7 +27,7 @@ class C282b
{
}
- void f282() // { dg-error "conflicts with gdc282.C282b.f282" }
+ void f282() // { dg-error "conflicts with previous declaration" }
{
}
}
@@ -42,7 +42,7 @@ class C282c
{
}
- void f282() // { dg-error "conflicts with gdc282.C282c.f282" }
+ void f282() // { dg-error "conflicts with previous declaration" }
{
}
}
diff --git a/gcc/testsuite/gdc.dg/imports/gdc170.d b/gcc/testsuite/gdc.dg/imports/gdc170.d
index f9fea1f..aedef60 100644
--- a/gcc/testsuite/gdc.dg/imports/gdc170.d
+++ b/gcc/testsuite/gdc.dg/imports/gdc170.d
@@ -7,12 +7,12 @@ class bar(T)
template foo(T)
{
- bar!T foo1(T2)() if (true) body { return null; }
+ bar!T foo1(T2)() if (true) do { return null; }
bar!T foo2(T2)() { return null; }
- bar!T foo3(T2 = void)() if (true) body { return null; }
+ bar!T foo3(T2 = void)() if (true) do { return null; }
bar!T foo4(T2 = void)() { return null; }
- void foo5(T2)(bar!T x) if (true) body {}
+ void foo5(T2)(bar!T x) if (true) do {}
void foo6(T2)(bar!T x) {}
- void foo7(T2 = void)(bar!T x) if (true) body {}
+ void foo7(T2 = void)(bar!T x) if (true) do {}
void foo8(T2 = void)(bar!T x) {}
}
diff --git a/gcc/testsuite/gdc.dg/intrinsics.d b/gcc/testsuite/gdc.dg/intrinsics.d
index d9ccc0e..dca40d2 100644
--- a/gcc/testsuite/gdc.dg/intrinsics.d
+++ b/gcc/testsuite/gdc.dg/intrinsics.d
@@ -35,22 +35,6 @@ ulong test_bswap(ulong a) { return bswap(a); }
int test_popcnt(uint a) { return popcnt(a); }
// { dg-final { scan-tree-dump " __builtin_popcount(l|ll) " "original" } }
int test_popcnt(ulong a) { return popcnt(a); }
-// { dg-final { scan-tree-dump "\\(volatile ubyte \\*\\) a;" "original" } }
-ubyte test_volatileLoad(ubyte *a) { return volatileLoad(a); }
-// { dg-final { scan-tree-dump "\\(volatile ushort \\*\\) a;" "original" } }
-ushort test_volatileLoad(ushort *a) { return volatileLoad(a); }
-// { dg-final { scan-tree-dump "\\(volatile uint \\*\\) a;" "original" } }
-uint test_volatileLoad(uint *a) { return volatileLoad(a); }
-// { dg-final { scan-tree-dump "\\(volatile ulong \\*\\) a;" "original" } }
-ulong test_volatileLoad(ulong *a) { return volatileLoad(a); }
-// { dg-final { scan-tree-dump "\\(volatile ubyte \\*\\) a = b" "original" } }
-void test_volatileStore(ubyte *a, ubyte b) { return volatileStore(a, b); }
-// { dg-final { scan-tree-dump "\\(volatile ushort \\*\\) a = b" "original" } }
-void test_volatileStore(ushort *a, ushort b) { return volatileStore(a, b); }
-// { dg-final { scan-tree-dump "\\(volatile uint \\*\\) a = b" "original" } }
-void test_volatileStore(uint *a, uint b) { return volatileStore(a, b); }
-// { dg-final { scan-tree-dump "\\(volatile ulong \\*\\) a = b" "original" } }
-void test_volatileStore(ulong *a, ulong b) { return volatileStore(a, b); }
// { dg-final { scan-tree-dump " a r<< b;" "original" } }
ubyte test_rol(ubyte a, uint b) { return rol!ubyte(a, b); }
// { dg-final { scan-tree-dump " a r>> 31;" "original" } }
@@ -141,6 +125,26 @@ real test_toPrecl(double a) { return toPrec!real(a); }
real test_toPrecl(real a) { return toPrec!real(a); }
//////////////////////////////////////////////////////
+// core.volatile
+
+// { dg-final { scan-tree-dump "\\(volatile ubyte \\*\\) a;" "original" } }
+ubyte test_volatileLoad(ubyte *a) { return volatileLoad(a); }
+// { dg-final { scan-tree-dump "\\(volatile ushort \\*\\) a;" "original" } }
+ushort test_volatileLoad(ushort *a) { return volatileLoad(a); }
+// { dg-final { scan-tree-dump "\\(volatile uint \\*\\) a;" "original" } }
+uint test_volatileLoad(uint *a) { return volatileLoad(a); }
+// { dg-final { scan-tree-dump "\\(volatile ulong \\*\\) a;" "original" } }
+ulong test_volatileLoad(ulong *a) { return volatileLoad(a); }
+// { dg-final { scan-tree-dump "\\(volatile ubyte \\*\\) a = b" "original" } }
+void test_volatileStore(ubyte *a, ubyte b) { return volatileStore(a, b); }
+// { dg-final { scan-tree-dump "\\(volatile ushort \\*\\) a = b" "original" } }
+void test_volatileStore(ushort *a, ushort b) { return volatileStore(a, b); }
+// { dg-final { scan-tree-dump "\\(volatile uint \\*\\) a = b" "original" } }
+void test_volatileStore(uint *a, uint b) { return volatileStore(a, b); }
+// { dg-final { scan-tree-dump "\\(volatile ulong \\*\\) a = b" "original" } }
+void test_volatileStore(ulong *a, ulong b) { return volatileStore(a, b); }
+
+//////////////////////////////////////////////////////
// core.stdc.stdarg
// { dg-final { scan-tree-dump-not " va_arg " "original" } }
diff --git a/gcc/testsuite/gdc.dg/lto/lto.exp b/gcc/testsuite/gdc.dg/lto/lto.exp
index 30fe787..20f363b 100644
--- a/gcc/testsuite/gdc.dg/lto/lto.exp
+++ b/gcc/testsuite/gdc.dg/lto/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2021 Free Software Foundation, Inc.
+# Copyright (C) 2017-2022 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/gdc.dg/pr101672.d b/gcc/testsuite/gdc.dg/pr101672.d
index 292fd76..8b337a4 100644
--- a/gcc/testsuite/gdc.dg/pr101672.d
+++ b/gcc/testsuite/gdc.dg/pr101672.d
@@ -8,7 +8,7 @@ interface I101672
static int i101672;
}
-class A101672 : I101672 // { dg-error "class object.A101672 missing or corrupt object.d" }
+class A101672 : I101672
{
static int a101672;
}
diff --git a/gcc/testsuite/gdc.dg/pr90650a.d b/gcc/testsuite/gdc.dg/pr90650a.d
index 57228ca..62b7994 100644
--- a/gcc/testsuite/gdc.dg/pr90650a.d
+++ b/gcc/testsuite/gdc.dg/pr90650a.d
@@ -10,5 +10,5 @@ class c
void g ()
{
- if (0 & [0] & c.f()) {} // { dg-error "array operation \\\[0\\\] & 0 & f\\(\\) without destination memory not allowed" }
+ if (0 & [0] & c.f()) {} // { dg-error "array operation .\\\[0\\\] & 0 & f\\(\\). without destination memory not allowed" }
}
diff --git a/gcc/testsuite/gdc.dg/pr90650b.d b/gcc/testsuite/gdc.dg/pr90650b.d
index 2b3192e..11a0225 100644
--- a/gcc/testsuite/gdc.dg/pr90650b.d
+++ b/gcc/testsuite/gdc.dg/pr90650b.d
@@ -9,5 +9,5 @@ class c
}
void g ()
{
- if ([0] & c.f()) {} // { dg-error "array operation \\\[0\\\] & f\\(\\) without destination memory not allowed" }
+ if ([0] & c.f()) {} // { dg-error "array operation .\\\[0\\\] & f\\(\\). without destination memory not allowed" }
}
diff --git a/gcc/testsuite/gdc.dg/pr94777a.d b/gcc/testsuite/gdc.dg/pr94777a.d
index a58fa55..d0cb556 100644
--- a/gcc/testsuite/gdc.dg/pr94777a.d
+++ b/gcc/testsuite/gdc.dg/pr94777a.d
@@ -11,5 +11,5 @@ void f94777()
this(this) { }
}
auto var = S94777(0);
- variadic(var, S94777(1));
+ variadic(var, S94777(1)); // { dg-error "cannot pass types with postblits or copy constructors as variadic arguments" }
}
diff --git a/gcc/testsuite/gdc.dg/pr94777c.d b/gcc/testsuite/gdc.dg/pr94777c.d
new file mode 100644
index 0000000..9b725c0
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/pr94777c.d
@@ -0,0 +1,62 @@
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94777
+// { dg-additional-options "-funittest" }
+// { dg-do compile }
+
+void testVariadic(T)(int nargs, ...)
+{
+ import core.stdc.stdarg;
+ foreach(i; 0 .. nargs)
+ {
+ auto arg = va_arg!T(_argptr);
+ static if (__traits(compiles, arg.value))
+ {
+ assert(arg.value == i);
+ }
+ else static if (__traits(compiles, arg[0]))
+ {
+ foreach (value; arg)
+ assert(value == i);
+ }
+ else
+ {
+ assert(arg == T.init);
+ }
+ }
+}
+
+/******************************************/
+
+struct Postblit
+{
+ static int count = 0;
+ int value;
+ this(this) { count++; }
+}
+
+unittest
+{
+ auto a0 = Postblit(0);
+ auto a1 = Postblit(1);
+ auto a2 = Postblit(2);
+ testVariadic!Postblit(3, a0, a1, a2); // { dg-error "cannot pass types with postblits or copy constructors as variadic arguments" }
+ assert(Postblit.count == 3);
+}
+
+/******************************************/
+
+struct CopyConstructor
+{
+ static int count = 0;
+ int value;
+ this(int v) { this.value = v; }
+ this(ref typeof(this) other) { count++; this.value = other.value; }
+}
+
+unittest
+{
+ auto a0 = CopyConstructor(0);
+ auto a1 = CopyConstructor(1);
+ auto a2 = CopyConstructor(2);
+ testVariadic!CopyConstructor(3, a0, a1, a2); // { dg-error "cannot pass types with postblits or copy constructors as variadic arguments" }
+ assert(CopyConstructor.count == 3);
+}
diff --git a/gcc/testsuite/gdc.dg/pr95250.d b/gcc/testsuite/gdc.dg/pr95250.d
index dfb8abb..ba0adea 100644
--- a/gcc/testsuite/gdc.dg/pr95250.d
+++ b/gcc/testsuite/gdc.dg/pr95250.d
@@ -15,4 +15,4 @@ void* f(T)(T a, T b)
}
static assert(is(typeof(f!(void*)(null, null)) == void*));
-// { dg-error "static assert \(.*\) is false" "" { target *-*-* } .-1 }
+// { dg-error "static assert: \(.*\) is false" "" { target *-*-* } .-1 }
diff --git a/gcc/testsuite/gdc.dg/pr96156b.d b/gcc/testsuite/gdc.dg/pr96156b.d
new file mode 100644
index 0000000..ae79d56
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/pr96156b.d
@@ -0,0 +1,17 @@
+@safe unittest
+{
+ struct CustomString
+ {
+ @safe:
+ string _impl;
+ @property bool empty() const { return !_impl.length; }
+ }
+
+ CustomString find(CustomString a, CustomString b)
+ {
+ return CustomString.init;
+ }
+
+ auto r = find(CustomString("a"), CustomString("b"));
+ assert(r.empty);
+}
diff --git a/gcc/testsuite/gdc.dg/pr96157c.d b/gcc/testsuite/gdc.dg/pr96157c.d
new file mode 100644
index 0000000..8f48cbd
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/pr96157c.d
@@ -0,0 +1,40 @@
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96157
+// { dg-options "-fno-moduleinfo -fno-rtti" }
+// { dg-do compile }
+
+struct CodepointSet
+{
+ CowArray!string data;
+}
+
+struct CowArray(SP)
+{
+ ~this()
+ {
+ if (data.length)
+ refCount;
+ }
+ @property refCount() { return data[$-1]; }
+
+ uint[] data;
+}
+
+int ucmp() { return 1; }
+
+bool loadProperty () {
+
+ CodepointSet target;
+ if (ucmp)
+ CodepointSet();
+ else if (ucmp|| ucmp)
+ target = CodepointSet();
+ else if (ucmp|| ucmp)
+ target = CodepointSet();
+ else if (ucmp|| ucmp)
+ target = CodepointSet();
+ else if (ucmp)
+ target = CodepointSet();
+ else if (ucmp)
+ target = CodepointSet();
+ return true;
+}
diff --git a/gcc/testsuite/gdc.dg/pr96869.d b/gcc/testsuite/gdc.dg/pr96869.d
index c4ace30..348da1b 100644
--- a/gcc/testsuite/gdc.dg/pr96869.d
+++ b/gcc/testsuite/gdc.dg/pr96869.d
@@ -2,31 +2,31 @@
// { dg-do compile }
__vector(float[0]) var01;
-// { dg-error "0 byte vector type __vector\\\(float\\\[0\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "0 byte vector type '__vector\\\(float\\\[0\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
__vector(float[3]) var02;
-// { dg-error "12 byte vector type __vector\\\(float\\\[3\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "12 byte vector type '__vector\\\(float\\\[3\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
__vector(float[][4]) var03;
-// { dg-error "vector type __vector\\\(float\\\[\\\]\\\[4\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "vector type '__vector\\\(float\\\[\\\]\\\[4\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
__vector(float[4][4]) var04;
-// { dg-error "vector type __vector\\\(float\\\[4\\\]\\\[4\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "vector type '__vector\\\(float\\\[4\\\]\\\[4\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
__vector(float[float][4]) var05;
-// { dg-error "vector type __vector\\\(float\\\[float\\\]\\\[4\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "vector type '__vector\\\(float\\\[float\\\]\\\[4\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
__vector(float function()[4]) var06;
-// { dg-error "vector type __vector\\\(float function\\\(\\\)\\\[4\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "vector type '__vector\\\(float function\\\(\\\)\\\[4\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
__vector(float delegate()[4]) var07;
-// { dg-error "vector type __vector\\\(float delegate\\\(\\\)\\\[4\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "vector type '__vector\\\(float delegate\\\(\\\)\\\[4\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
enum E { a, b, c }
__vector(E[4]) var08;
-// { dg-error "vector type __vector\\\(E\\\[4\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "vector type '__vector\\\(E\\\[4\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
struct S { float a; }
__vector(S[4]) var09;
-// { dg-error "vector type __vector\\\(S\\\[4\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "vector type '__vector\\\(S\\\[4\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
class C { float a; }
__vector(C[4]) var10;
-// { dg-error "vector type __vector\\\(C\\\[4\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "vector type '__vector\\\(C\\\[4\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
__vector(cfloat[4]) var11;
-// { dg-error "vector type __vector\\\(cfloat\\\[4\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "vector type '__vector\\\(cfloat\\\[4\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
__vector(bool[4]) var12;
-// { dg-error "vector type __vector\\\(bool\\\[4\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "vector type '__vector\\\(bool\\\[4\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
__vector(real[128]) var13;
-// { dg-error "vector type __vector\\\(real\\\[128\\\]\\\) is not supported on this platform" "" { target *-*-* } .-1 }
+// { dg-error "vector type '__vector\\\(real\\\[128\\\]\\\)' is not supported on this platform" "" { target *-*-* } .-1 }
diff --git a/gcc/testsuite/gdc.dg/pr98277.d b/gcc/testsuite/gdc.dg/pr98277.d
index d3b859f..0dff142 100644
--- a/gcc/testsuite/gdc.dg/pr98277.d
+++ b/gcc/testsuite/gdc.dg/pr98277.d
@@ -7,7 +7,7 @@ enum Side
right
}
-ref int getSide(Side side, ref int left, ref int right)
+ref int getSide(Side side, return ref int left, return ref int right)
{
return side == Side.left ? left : right;
}
diff --git a/gcc/testsuite/gdc.dg/pr98457.d b/gcc/testsuite/gdc.dg/pr98457.d
index bc0d8af..0cc83ac 100644
--- a/gcc/testsuite/gdc.dg/pr98457.d
+++ b/gcc/testsuite/gdc.dg/pr98457.d
@@ -3,7 +3,7 @@
void main()
{
- writef!"%s"; // { dg-error "template instance writef!\"%s\" template .writef. is not defined" }
- writef!"`%s"; // { dg-error "template instance writef!\"`%s\" template .writef. is not defined" }
- writef!"%%s`"; // { dg-error "template instance writef!\"%%s`\" template .writef. is not defined" }
+ writef!"%s"; // { dg-error "template instance .writef!\"%s\". template .writef. is not defined" }
+ writef!"`%s"; // { dg-error "template instance .writef!\"`%s\". template .writef. is not defined" }
+ writef!"%%s`"; // { dg-error "template instance .writef!\"%%s`\". template .writef. is not defined" }
}
diff --git a/gcc/testsuite/gdc.dg/simd1.d b/gcc/testsuite/gdc.dg/simd1.d
index 374dcae..b25b99e 100644
--- a/gcc/testsuite/gdc.dg/simd1.d
+++ b/gcc/testsuite/gdc.dg/simd1.d
@@ -26,14 +26,6 @@ void test1()
static assert(!__traits(compiles, v1 > v2));
static assert(!__traits(compiles, v1 <= v2));
static assert(!__traits(compiles, v1 >= v2));
- static assert(!__traits(compiles, v1 <> v2));
- static assert(!__traits(compiles, v1 !< v2));
- static assert(!__traits(compiles, v1 !> v2));
- static assert(!__traits(compiles, v1 !<> v2));
- static assert(!__traits(compiles, v1 <>= v2));
- static assert(!__traits(compiles, v1 !<= v2));
- static assert(!__traits(compiles, v1 !>= v2));
- static assert(!__traits(compiles, v1 !<>= v2));
static assert(!__traits(compiles, v1 << 1));
static assert(!__traits(compiles, v1 >> 1));
static assert(!__traits(compiles, v1 >>> 1));
diff --git a/gcc/testsuite/gdc.dg/simd2a.d b/gcc/testsuite/gdc.dg/simd2a.d
index b630a47..0fb391c 100644
--- a/gcc/testsuite/gdc.dg/simd2a.d
+++ b/gcc/testsuite/gdc.dg/simd2a.d
@@ -24,14 +24,6 @@ void test2a()
static assert(!__traits(compiles, v1 > v2));
static assert(!__traits(compiles, v1 <= v2));
static assert(!__traits(compiles, v1 >= v2));
- static assert(!__traits(compiles, v1 <> v2));
- static assert(!__traits(compiles, v1 !< v2));
- static assert(!__traits(compiles, v1 !> v2));
- static assert(!__traits(compiles, v1 !<> v2));
- static assert(!__traits(compiles, v1 <>= v2));
- static assert(!__traits(compiles, v1 !<= v2));
- static assert(!__traits(compiles, v1 !>= v2));
- static assert(!__traits(compiles, v1 !<>= v2));
v1 = v2 << 1;
v1 = v2 >> 1;
v1 = v2 >>> 1;
diff --git a/gcc/testsuite/gdc.dg/simd2b.d b/gcc/testsuite/gdc.dg/simd2b.d
index 35c4288..41a4eb3 100644
--- a/gcc/testsuite/gdc.dg/simd2b.d
+++ b/gcc/testsuite/gdc.dg/simd2b.d
@@ -24,14 +24,6 @@ void test2b()
static assert(!__traits(compiles, v1 > v2));
static assert(!__traits(compiles, v1 <= v2));
static assert(!__traits(compiles, v1 >= v2));
- static assert(!__traits(compiles, v1 <> v2));
- static assert(!__traits(compiles, v1 !< v2));
- static assert(!__traits(compiles, v1 !> v2));
- static assert(!__traits(compiles, v1 !<> v2));
- static assert(!__traits(compiles, v1 <>= v2));
- static assert(!__traits(compiles, v1 !<= v2));
- static assert(!__traits(compiles, v1 !>= v2));
- static assert(!__traits(compiles, v1 !<>= v2));
v1 = v2 << 1;
v1 = v2 >> 1;
v1 = v2 >>> 1;
diff --git a/gcc/testsuite/gdc.dg/simd2c.d b/gcc/testsuite/gdc.dg/simd2c.d
index 2f19e75..a995709 100644
--- a/gcc/testsuite/gdc.dg/simd2c.d
+++ b/gcc/testsuite/gdc.dg/simd2c.d
@@ -24,14 +24,6 @@ void test2c()
static assert(!__traits(compiles, v1 > v2));
static assert(!__traits(compiles, v1 <= v2));
static assert(!__traits(compiles, v1 >= v2));
- static assert(!__traits(compiles, v1 <> v2));
- static assert(!__traits(compiles, v1 !< v2));
- static assert(!__traits(compiles, v1 !> v2));
- static assert(!__traits(compiles, v1 !<> v2));
- static assert(!__traits(compiles, v1 <>= v2));
- static assert(!__traits(compiles, v1 !<= v2));
- static assert(!__traits(compiles, v1 !>= v2));
- static assert(!__traits(compiles, v1 !<>= v2));
v1 = v2 << 1;
v1 = v2 >> 1;
v1 = v2 >>> 1;
diff --git a/gcc/testsuite/gdc.dg/simd2d.d b/gcc/testsuite/gdc.dg/simd2d.d
index 9d378e4..d578734 100644
--- a/gcc/testsuite/gdc.dg/simd2d.d
+++ b/gcc/testsuite/gdc.dg/simd2d.d
@@ -24,14 +24,6 @@ void test2d()
static assert(!__traits(compiles, v1 > v2));
static assert(!__traits(compiles, v1 <= v2));
static assert(!__traits(compiles, v1 >= v2));
- static assert(!__traits(compiles, v1 <> v2));
- static assert(!__traits(compiles, v1 !< v2));
- static assert(!__traits(compiles, v1 !> v2));
- static assert(!__traits(compiles, v1 !<> v2));
- static assert(!__traits(compiles, v1 <>= v2));
- static assert(!__traits(compiles, v1 !<= v2));
- static assert(!__traits(compiles, v1 !>= v2));
- static assert(!__traits(compiles, v1 !<>= v2));
v1 = v2 << 1;
v1 = v2 >> 1;
v1 = v2 >>> 1;
diff --git a/gcc/testsuite/gdc.dg/simd2e.d b/gcc/testsuite/gdc.dg/simd2e.d
index 30d7c1a..d33574a 100644
--- a/gcc/testsuite/gdc.dg/simd2e.d
+++ b/gcc/testsuite/gdc.dg/simd2e.d
@@ -24,14 +24,6 @@ void test2e()
static assert(!__traits(compiles, v1 > v2));
static assert(!__traits(compiles, v1 <= v2));
static assert(!__traits(compiles, v1 >= v2));
- static assert(!__traits(compiles, v1 <> v2));
- static assert(!__traits(compiles, v1 !< v2));
- static assert(!__traits(compiles, v1 !> v2));
- static assert(!__traits(compiles, v1 !<> v2));
- static assert(!__traits(compiles, v1 <>= v2));
- static assert(!__traits(compiles, v1 !<= v2));
- static assert(!__traits(compiles, v1 !>= v2));
- static assert(!__traits(compiles, v1 !<>= v2));
v1 = v2 << 1;
v1 = v2 >> 1;
v1 = v2 >>> 1;
diff --git a/gcc/testsuite/gdc.dg/simd2f.d b/gcc/testsuite/gdc.dg/simd2f.d
index f844880..5845249 100644
--- a/gcc/testsuite/gdc.dg/simd2f.d
+++ b/gcc/testsuite/gdc.dg/simd2f.d
@@ -24,14 +24,6 @@ void test2f()
static assert(!__traits(compiles, v1 > v2));
static assert(!__traits(compiles, v1 <= v2));
static assert(!__traits(compiles, v1 >= v2));
- static assert(!__traits(compiles, v1 <> v2));
- static assert(!__traits(compiles, v1 !< v2));
- static assert(!__traits(compiles, v1 !> v2));
- static assert(!__traits(compiles, v1 !<> v2));
- static assert(!__traits(compiles, v1 <>= v2));
- static assert(!__traits(compiles, v1 !<= v2));
- static assert(!__traits(compiles, v1 !>= v2));
- static assert(!__traits(compiles, v1 !<>= v2));
v1 = v2 << 1;
v1 = v2 >> 1;
v1 = v2 >>> 1;
diff --git a/gcc/testsuite/gdc.dg/simd2g.d b/gcc/testsuite/gdc.dg/simd2g.d
index 8e8bc15..ce438f2 100644
--- a/gcc/testsuite/gdc.dg/simd2g.d
+++ b/gcc/testsuite/gdc.dg/simd2g.d
@@ -24,14 +24,6 @@ void test2g()
static assert(!__traits(compiles, v1 > v2));
static assert(!__traits(compiles, v1 <= v2));
static assert(!__traits(compiles, v1 >= v2));
- static assert(!__traits(compiles, v1 <> v2));
- static assert(!__traits(compiles, v1 !< v2));
- static assert(!__traits(compiles, v1 !> v2));
- static assert(!__traits(compiles, v1 !<> v2));
- static assert(!__traits(compiles, v1 <>= v2));
- static assert(!__traits(compiles, v1 !<= v2));
- static assert(!__traits(compiles, v1 !>= v2));
- static assert(!__traits(compiles, v1 !<>= v2));
v1 = v2 << 1;
v1 = v2 >> 1;
v1 = v2 >>> 1;
diff --git a/gcc/testsuite/gdc.dg/simd2h.d b/gcc/testsuite/gdc.dg/simd2h.d
index f7542e8..c631c76 100644
--- a/gcc/testsuite/gdc.dg/simd2h.d
+++ b/gcc/testsuite/gdc.dg/simd2h.d
@@ -24,14 +24,6 @@ void test2h()
static assert(!__traits(compiles, v1 > v2));
static assert(!__traits(compiles, v1 <= v2));
static assert(!__traits(compiles, v1 >= v2));
- static assert(!__traits(compiles, v1 <> v2));
- static assert(!__traits(compiles, v1 !< v2));
- static assert(!__traits(compiles, v1 !> v2));
- static assert(!__traits(compiles, v1 !<> v2));
- static assert(!__traits(compiles, v1 <>= v2));
- static assert(!__traits(compiles, v1 !<= v2));
- static assert(!__traits(compiles, v1 !>= v2));
- static assert(!__traits(compiles, v1 !<>= v2));
v1 = v2 << 1;
v1 = v2 >> 1;
v1 = v2 >>> 1;
diff --git a/gcc/testsuite/gdc.dg/simd2i.d b/gcc/testsuite/gdc.dg/simd2i.d
index 2e3587d..6946c79 100644
--- a/gcc/testsuite/gdc.dg/simd2i.d
+++ b/gcc/testsuite/gdc.dg/simd2i.d
@@ -24,14 +24,6 @@ void test2i()
static assert(!__traits(compiles, v1 > v2));
static assert(!__traits(compiles, v1 <= v2));
static assert(!__traits(compiles, v1 >= v2));
- static assert(!__traits(compiles, v1 <> v2));
- static assert(!__traits(compiles, v1 !< v2));
- static assert(!__traits(compiles, v1 !> v2));
- static assert(!__traits(compiles, v1 !<> v2));
- static assert(!__traits(compiles, v1 <>= v2));
- static assert(!__traits(compiles, v1 !<= v2));
- static assert(!__traits(compiles, v1 !>= v2));
- static assert(!__traits(compiles, v1 !<>= v2));
static assert(!__traits(compiles, v1 << 1));
static assert(!__traits(compiles, v1 >> 1));
static assert(!__traits(compiles, v1 >>> 1));
diff --git a/gcc/testsuite/gdc.dg/simd2j.d b/gcc/testsuite/gdc.dg/simd2j.d
index 7b60784..ecfdbf3 100644
--- a/gcc/testsuite/gdc.dg/simd2j.d
+++ b/gcc/testsuite/gdc.dg/simd2j.d
@@ -24,14 +24,6 @@ void test2j()
static assert(!__traits(compiles, v1 > v2));
static assert(!__traits(compiles, v1 <= v2));
static assert(!__traits(compiles, v1 >= v2));
- static assert(!__traits(compiles, v1 <> v2));
- static assert(!__traits(compiles, v1 !< v2));
- static assert(!__traits(compiles, v1 !> v2));
- static assert(!__traits(compiles, v1 !<> v2));
- static assert(!__traits(compiles, v1 <>= v2));
- static assert(!__traits(compiles, v1 !<= v2));
- static assert(!__traits(compiles, v1 !>= v2));
- static assert(!__traits(compiles, v1 !<>= v2));
static assert(!__traits(compiles, v1 << 1));
static assert(!__traits(compiles, v1 >> 1));
static assert(!__traits(compiles, v1 >>> 1));
diff --git a/gcc/testsuite/gdc.dg/simd7951.d b/gcc/testsuite/gdc.dg/simd7951.d
index 99ce151..4e467ef 100644
--- a/gcc/testsuite/gdc.dg/simd7951.d
+++ b/gcc/testsuite/gdc.dg/simd7951.d
@@ -19,4 +19,5 @@ void test7951_2()
f1.array = v1;
f2.array = v2;
f3 = f1 + f2;
+ assert((cast(float[4])f3)[2] == 6);
}
diff --git a/gcc/testsuite/gdc.dg/simd_ctfe.d b/gcc/testsuite/gdc.dg/simd_ctfe.d
new file mode 100644
index 0000000..b254cf3
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/simd_ctfe.d
@@ -0,0 +1,87 @@
+// { dg-do compile }
+import core.simd;
+
+// https://issues.dlang.org/show_bug.cgi?id=19627
+enum int[4] fail19627 = cast(int[4])int4(0);
+
+// https://issues.dlang.org/show_bug.cgi?id=19628
+enum ice19628a = int4.init[0];
+enum ice19628b = int4.init.array[0];
+enum ice19628c = (cast(int[4])int4.init.array)[0];
+enum ice19628d = (cast(int[4])int4.init)[0];
+
+// https://issues.dlang.org/show_bug.cgi?id=19629
+enum fail19629a = int4(0)[0];
+enum fail19629b = int4(0).array[0];
+enum fail19629c = (cast(int[4])int4(0).array)[0];
+enum fail19628d = (cast(int[4])int4(0))[0];
+
+// https://issues.dlang.org/show_bug.cgi?id=19630
+enum fail19630a = int4.init[1..2];
+enum fail19630b = int4.init.array[1..2];
+enum fail19630c = (cast(int[4])int4.init.array)[1..2];
+enum fail19630d = int4(0)[1..2];
+enum fail19630e = int4(0).array[1..2];
+enum fail19630f = (cast(int[4])int4(0).array)[1..2];
+enum fail19630g = (cast(int[4])int4.init)[1..2];
+enum fail19630h = (cast(int[4])int4(0))[1..2];
+
+// Same tests as above, but use access via enum.
+enum int4 V1 = int4.init;
+enum int[4] V2 = int4.init.array;
+enum int[4] V3 = cast(int[4])int4.init;
+enum int[4] V4 = cast(int[4])int4.init.array;
+enum int4 V5 = int4(0);
+enum int[4] V6 = int4(0).array;
+enum int[4] V7 = cast(int[4])int4(0);
+enum int[4] V8 = cast(int[4])int4(0).array;
+
+// CTFE index tests
+enum I1 = V1[0]; static assert(I1 == 0);
+enum I2 = V2[0]; static assert(I2 == 0);
+enum I3 = V3[0]; static assert(I3 == 0);
+enum I4 = V4[0]; static assert(I4 == 0);
+enum I5 = V5[0]; static assert(I5 == 0);
+enum I6 = V6[0]; static assert(I6 == 0);
+enum I7 = V7[0]; static assert(I7 == 0);
+enum I8 = V8[0]; static assert(I8 == 0);
+
+// CTFE slice tests
+enum S1 = V1[1..2]; static assert(S1 == [0]);
+enum S2 = V2[1..2]; static assert(S2 == [0]);
+enum S3 = V3[1..2]; static assert(S3 == [0]);
+enum S4 = V4[1..2]; static assert(S4 == [0]);
+enum S5 = V5[1..2]; static assert(S5 == [0]);
+enum S6 = V6[1..2]; static assert(S6 == [0]);
+enum S7 = V7[1..2]; static assert(S7 == [0]);
+enum S8 = V8[1..2]; static assert(S8 == [0]);
+
+// Same tests as above, but use access via immutable.
+//immutable int4 v1 = int4.init; // Cannot cast to immutable at compile time
+immutable int[4] v2 = int4.init.array;
+immutable int[4] v3 = cast(int[4])int4.init;
+immutable int[4] v4 = cast(int[4])int4.init.array;
+//immutable int4 v5 = int4(0); // Cannot cast to immutable at compile time
+immutable int[4] v6 = int4(0).array;
+immutable int[4] v7 = cast(int[4])int4(0);
+immutable int[4] v8 = cast(int[4])int4(0).array;
+
+// CTFE index tests
+//immutable i1 = v1[0]; static assert(i1 == 0);
+immutable i2 = v2[0]; static assert(i2 == 0);
+immutable i3 = v3[0]; static assert(i3 == 0);
+immutable i4 = v4[0]; static assert(i4 == 0);
+//immutable i5 = v5[0]; static assert(i5 == 0);
+immutable i6 = v6[0]; static assert(i6 == 0);
+immutable i7 = v7[0]; static assert(i7 == 0);
+immutable i8 = v8[0]; static assert(i8 == 0);
+
+// CTFE slice tests
+//immutable s1 = v1[1..2]; static assert(s1 == [0]);
+immutable s2 = v2[1..2]; static assert(s2 == [0]);
+immutable s3 = v3[1..2]; static assert(s3 == [0]);
+immutable s4 = v4[1..2]; static assert(s4 == [0]);
+//immutable s5 = v5[1..2]; static assert(s5 == [0]);
+immutable s6 = v6[1..2]; static assert(s6 == [0]);
+immutable s7 = v7[1..2]; static assert(s7 == [0]);
+immutable s8 = v8[1..2]; static assert(s8 == [0]);
diff --git a/gcc/testsuite/gdc.dg/torture/gdc309.d b/gcc/testsuite/gdc.dg/torture/gdc309.d
index d14634a..acda2bb 100644
--- a/gcc/testsuite/gdc.dg/torture/gdc309.d
+++ b/gcc/testsuite/gdc.dg/torture/gdc309.d
@@ -1,4 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=309
+// { dg-additional-options "-Wno-deprecated" }
// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
diff --git a/gcc/testsuite/gdc.dg/torture/pr94424.d b/gcc/testsuite/gdc.dg/torture/pr94424.d
index 2910c9a..dc30639 100644
--- a/gcc/testsuite/gdc.dg/torture/pr94424.d
+++ b/gcc/testsuite/gdc.dg/torture/pr94424.d
@@ -17,3 +17,19 @@
assert(__cmp([c2, c2], [c1, c1]) > 0);
assert(__cmp([c2, c2], [c2, c1]) > 0);
}
+
+@safe unittest
+{
+ struct C
+ {
+ char i;
+ this(char i) { this.i = i; }
+ }
+
+ auto c1 = C(1);
+ auto c2 = C(2);
+
+ assert(__cmp([c1, c1][], [c2, c2][]) < 0);
+ assert(__cmp([c2, c2], [c1, c1]) > 0);
+ assert(__cmp([c2, c2], [c2, c1]) > 0);
+}
diff --git a/gcc/testsuite/gdc.dg/torture/pr94777b.d b/gcc/testsuite/gdc.dg/torture/pr94777b.d
index 2f0f9d9..e9da63f 100644
--- a/gcc/testsuite/gdc.dg/torture/pr94777b.d
+++ b/gcc/testsuite/gdc.dg/torture/pr94777b.d
@@ -27,42 +27,6 @@ void testVariadic(T)(int nargs, ...)
/******************************************/
-struct Constructor
-{
- static int count;
- int value;
- this(int v) { count++; this.value = v; }
-}
-
-unittest
-{
- auto a0 = Constructor(0);
- auto a1 = Constructor(1);
- auto a2 = Constructor(2);
- testVariadic!Constructor(3, a0, a1, a2);
- assert(Constructor.count == 3);
-}
-
-/******************************************/
-
-struct Postblit
-{
- static int count = 0;
- int value;
- this(this) { count++; }
-}
-
-unittest
-{
- auto a0 = Postblit(0);
- auto a1 = Postblit(1);
- auto a2 = Postblit(2);
- testVariadic!Postblit(3, a0, a1, a2);
- assert(Postblit.count == 3);
-}
-
-/******************************************/
-
struct Destructor
{
static int count = 0;
@@ -80,102 +44,3 @@ unittest
}
assert(Destructor.count == 3);
}
-
-/******************************************/
-
-struct CopyConstructor
-{
- static int count = 0;
- int value;
- this(int v) { this.value = v; }
- this(ref typeof(this) other) { count++; this.value = other.value; }
-}
-
-unittest
-{
- auto a0 = CopyConstructor(0);
- auto a1 = CopyConstructor(1);
- auto a2 = CopyConstructor(2);
- testVariadic!CopyConstructor(3, a0, a1, a2);
- // NOTE: Cpctors are not implemented yet.
- assert(CopyConstructor.count == 0 || CopyConstructor.count == 3);
-}
-
-/******************************************/
-
-unittest
-{
- struct Nested
- {
- int value;
- }
-
- auto a0 = Nested(0);
- auto a1 = Nested(1);
- auto a2 = Nested(2);
- testVariadic!Nested(3, a0, a1, a2);
-}
-
-/******************************************/
-
-unittest
-{
- struct Nested2
- {
- int value;
- }
-
- void testVariadic2(int nargs, ...)
- {
- import core.stdc.stdarg;
- foreach(i; 0 .. nargs)
- {
- auto arg = va_arg!Nested2(_argptr);
- assert(arg.value == i);
- }
- }
-
- auto a0 = Nested2(0);
- auto a1 = Nested2(1);
- auto a2 = Nested2(2);
- testVariadic2(3, a0, a1, a2);
-}
-
-/******************************************/
-
-struct EmptyStruct
-{
-}
-
-unittest
-{
- auto a0 = EmptyStruct();
- auto a1 = EmptyStruct();
- auto a2 = EmptyStruct();
- testVariadic!EmptyStruct(3, a0, a1, a2);
-}
-
-/******************************************/
-
-alias StaticArray = int[4];
-
-unittest
-{
- StaticArray a0 = 0;
- StaticArray a1 = 1;
- StaticArray a2 = 2;
- // XBUG: Front-end rewrites static arrays as dynamic arrays.
- //testVariadic!StaticArray(3, a0, a1, a2);
-}
-
-/******************************************/
-
-alias EmptyArray = void[0];
-
-unittest
-{
- auto a0 = EmptyArray.init;
- auto a1 = EmptyArray.init;
- auto a2 = EmptyArray.init;
- testVariadic!EmptyArray(3, a0, a1, a2);
-}
diff --git a/gcc/testsuite/gdc.dg/torture/pr96435.d b/gcc/testsuite/gdc.dg/torture/pr96435.d
index c6d8785..896b25f 100644
--- a/gcc/testsuite/gdc.dg/torture/pr96435.d
+++ b/gcc/testsuite/gdc.dg/torture/pr96435.d
@@ -6,7 +6,7 @@
int[2] array = [16, 678];
union U { int i; bool b; }
U u;
- u.i = 0xDEADBEEF;
+ u.i = 0x81818181;
assert(array[u.b] == 678);
return u.b;
}
diff --git a/gcc/testsuite/gdc.dg/torture/simd17344.d b/gcc/testsuite/gdc.dg/torture/simd17344.d
new file mode 100644
index 0000000..fd5ffbe
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/torture/simd17344.d
@@ -0,0 +1,11 @@
+// https://issues.dlang.org/show_bug.cgi?id=17344
+// { dg-additional-options "-mavx" { target avx_runtime } }
+// { dg-do run { target { avx_runtime || vect_sizes_16B_8B } } }
+// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
+
+void main()
+{
+ __vector(int[4]) vec1 = 2, vec2 = vec1++;
+ assert(cast(int[4])vec1 == [3, 3, 3, 3]);
+ assert(cast(int[4])vec2 == [2, 2, 2, 2]);
+}
diff --git a/gcc/testsuite/gdc.dg/torture/simd20052.d b/gcc/testsuite/gdc.dg/torture/simd20052.d
new file mode 100644
index 0000000..4587351
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/torture/simd20052.d
@@ -0,0 +1,17 @@
+// { dg-additional-options "-mavx2" { target avx2_runtime } }
+// { dg-do run { target { avx2_runtime || vect_sizes_32B_16B } } }
+// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
+import core.simd;
+
+auto test20052()
+{
+ struct S { long4 v; }
+ S s;
+ return s;
+}
+
+void main()
+{
+ test20052();
+}
+
diff --git a/gcc/testsuite/gdc.dg/torture/simd6.d b/gcc/testsuite/gdc.dg/torture/simd6.d
new file mode 100644
index 0000000..d8de02e
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/torture/simd6.d
@@ -0,0 +1,26 @@
+// { dg-additional-options "-mavx2" { target avx2_runtime } }
+// { dg-do run { target { avx2_runtime || vect_sizes_32B_16B } } }
+// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
+import core.simd;
+
+void test6a()
+{
+ // stack occasionally misaligned
+ float f = 0;
+ long4 v;
+ assert((cast(size_t)&v) % 32 == 0);
+ v += 1;
+}
+
+void test6b()
+{
+ struct S {long4 v;}
+ S s;
+ assert((cast(size_t)&s) % 32 == 0);
+}
+
+void main()
+{
+ test6a();
+ test6b();
+}
diff --git a/gcc/testsuite/gdc.dg/torture/simd7.d b/gcc/testsuite/gdc.dg/torture/simd7.d
new file mode 100644
index 0000000..6e890de
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/torture/simd7.d
@@ -0,0 +1,18 @@
+// { dg-additional-options "-mavx2" { target avx2_runtime } }
+// { dg-do run { target { avx2_runtime || vect_sizes_32B_16B } } }
+// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
+import core.simd;
+
+double4 test7r(double4 v)
+{
+ return v;
+}
+
+void main()
+{
+ // 32 bytes sliced down to 16 bytes
+ double4 v = 1;
+ double4 r = test7r(v);
+ assert(v[2] == r[2]);
+ assert(v[3] == r[3]);
+}
diff --git a/gcc/testsuite/gdc.dg/torture/torture.exp b/gcc/testsuite/gdc.dg/torture/torture.exp
index da3297b..f7d00b1 100644
--- a/gcc/testsuite/gdc.dg/torture/torture.exp
+++ b/gcc/testsuite/gdc.dg/torture/torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 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/gdc.dg/ubsan/ubsan.exp b/gcc/testsuite/gdc.dg/ubsan/ubsan.exp
index 8df06da..82fe6c3 100644
--- a/gcc/testsuite/gdc.dg/ubsan/ubsan.exp
+++ b/gcc/testsuite/gdc.dg/ubsan/ubsan.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2021 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 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/gdc.test/compilable/99bottles.d b/gcc/testsuite/gdc.test/compilable/99bottles.d
index 09360a8..5341a49 100644
--- a/gcc/testsuite/gdc.test/compilable/99bottles.d
+++ b/gcc/testsuite/gdc.test/compilable/99bottles.d
@@ -1,5 +1,5 @@
// written by Don Clugston:
-// http://www.digitalmars.com/d/archives/digitalmars/D/announce/4374.html
+// https://www.digitalmars.com/d/archives/digitalmars/D/announce/4374.html
// http://www.99-bottles-of-beer.net/language-d-1212.html
// Generates the "99 bottles of beer" song at compile time,
diff --git a/gcc/testsuite/gdc.test/compilable/a3682.d b/gcc/testsuite/gdc.test/compilable/a3682.d
index 69191ec..4be63a35 100644
--- a/gcc/testsuite/gdc.test/compilable/a3682.d
+++ b/gcc/testsuite/gdc.test/compilable/a3682.d
@@ -1,7 +1,7 @@
-// EXTRA_SOURCES: imports/b3682.d
+// COMPILED_IMPORTS: imports/b3682.d
// PERMUTE_ARGS:
-// 3682
+// https://issues.dlang.org/show_bug.cgi?id=3682
struct Tuple(Types...)
{
diff --git a/gcc/testsuite/gdc.test/compilable/aliasassign.d b/gcc/testsuite/gdc.test/compilable/aliasassign.d
new file mode 100644
index 0000000..e355e49
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/aliasassign.d
@@ -0,0 +1,41 @@
+template AliasSeq(T...) { alias AliasSeq = T; }
+
+template Unqual(T)
+{
+ static if (is(T U == const U))
+ alias Unqual = U;
+ else static if (is(T U == immutable U))
+ alias Unqual = U;
+ else
+ alias Unqual = T;
+}
+
+template staticMap(alias F, T...)
+{
+ alias A = AliasSeq!();
+ static foreach (t; T)
+ A = AliasSeq!(A, F!t); // what's tested
+ alias staticMap = A;
+}
+
+alias TK = staticMap!(Unqual, int, const uint);
+//pragma(msg, TK);
+static assert(is(TK == AliasSeq!(int, uint)));
+
+/**************************************************/
+
+template reverse(T...)
+{
+ alias A = AliasSeq!();
+ static foreach (t; T)
+ A = AliasSeq!(t, A); // what's tested
+ alias reverse = A;
+}
+
+enum X2 = 3;
+alias TK2 = reverse!(int, const uint, X2);
+//pragma(msg, TK2);
+static assert(TK2[0] == 3);
+static assert(is(TK2[1] == const(uint)));
+static assert(is(TK2[2] == int));
+
diff --git a/gcc/testsuite/gdc.test/compilable/aliasdecl.d b/gcc/testsuite/gdc.test/compilable/aliasdecl.d
index 90e21ef..5bacbc6 100644
--- a/gcc/testsuite/gdc.test/compilable/aliasdecl.d
+++ b/gcc/testsuite/gdc.test/compilable/aliasdecl.d
@@ -29,6 +29,13 @@ void main()
static assert(is(Y4 == void delegate() const));
static assert(is(Y5.Type == int));
+ // https://issues.dlang.org/show_bug.cgi?id=18429
+ struct S
+ {
+ alias a this;
+ enum a = 1;
+ }
+
/+ struct S
{
int value;
diff --git a/gcc/testsuite/gdc.test/compilable/art4769.d b/gcc/testsuite/gdc.test/compilable/art4769.d
index b962058..dfffe77 100644
--- a/gcc/testsuite/gdc.test/compilable/art4769.d
+++ b/gcc/testsuite/gdc.test/compilable/art4769.d
@@ -1,6 +1,6 @@
-// http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.bugs&article_id=4769
+// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/4769.html
-// EXTRA_SOURCES: imports/art4769a.d imports/art4769b.d
+// COMPILED_IMPORTS: imports/art4769a.d imports/art4769b.d
// PERMUTE_ARGS:
module art4769;
diff --git a/gcc/testsuite/gdc.test/compilable/b1215.d b/gcc/testsuite/gdc.test/compilable/b1215.d
index d3b0ccd..6828819 100644
--- a/gcc/testsuite/gdc.test/compilable/b1215.d
+++ b/gcc/testsuite/gdc.test/compilable/b1215.d
@@ -70,7 +70,7 @@ struct C(Args...)
alias Z = A!(B,B,C!(B,B));
/***************************************************/
-// 14889
+// https://issues.dlang.org/show_bug.cgi?id=14889
struct A14889(alias Exc)
{
@@ -85,7 +85,7 @@ alias X14889b = TT14889!(A14889!Throwable);
alias Y14889b = X14889b[0].ExceptionType;
/***************************************************/
-// 14889
+// https://issues.dlang.org/show_bug.cgi?id=14889
alias TypeTuple14900(T...) = T;
@@ -107,7 +107,7 @@ void test14900()
}
/***************************************************/
-// 14911
+// https://issues.dlang.org/show_bug.cgi?id=14911
void test14911()
{
@@ -119,7 +119,7 @@ void test14911()
}
/***************************************************/
-// 14986
+// https://issues.dlang.org/show_bug.cgi?id=14986
alias Id14986(alias a) = a;
diff --git a/gcc/testsuite/gdc.test/compilable/b12504.d b/gcc/testsuite/gdc.test/compilable/b12504.d
new file mode 100644
index 0000000..944ff6e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b12504.d
@@ -0,0 +1,44 @@
+// https://issues.dlang.org/show_bug.cgi?id=12504
+void main()
+{
+ {
+ int[0xFF + 1] sta;
+ foreach (ubyte i; 0 .. sta.length) {}
+ foreach (ubyte i, x; sta) {}
+ }
+ {
+ int[0x7F + 1] sta;
+ foreach (byte i; 0 .. sta.length) {}
+ foreach (byte i, x; sta) {}
+ }
+ {
+ int[0xFFFF + 1] sta;
+ foreach (ushort i; 0 .. sta.length) {}
+ foreach (ushort i, x; sta) {}
+ }
+ {
+ int[0x7FFF + 1] sta;
+ foreach (short i; 0 .. sta.length) {}
+ foreach (short i, x; sta) {}
+ }
+ {
+ immutable int[0xFF + 1] sta;
+ static foreach (ubyte i; 0 .. sta.length) {}
+ static foreach (ubyte i, x; sta) {}
+ }
+ {
+ immutable int[0x7F + 1] sta;
+ static foreach (byte i; 0 .. sta.length) {}
+ static foreach (byte i, x; sta) {}
+ }
+ {
+ immutable int[0xFFFF + 1] sta;
+ static foreach (ushort i; 0 .. sta.length) {}
+ static foreach (ushort i, x; sta) {}
+ }
+ {
+ immutable int[0x7FFF + 1] sta;
+ static foreach (short i; 0 .. sta.length) {}
+ static foreach (short i, x; sta) {}
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/b15206.d b/gcc/testsuite/gdc.test/compilable/b15206.d
new file mode 100644
index 0000000..13e7c00
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b15206.d
@@ -0,0 +1,19 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -O
+
+void main()
+{
+}
+
+struct Line
+{
+ double slope;
+ double intercept;
+}
+
+Line nLineProjection(double[] historicData)
+{
+ Line projLine;
+ projLine.intercept = historicData[$-1] + projLine.slope;
+ return projLine;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/b16360.d b/gcc/testsuite/gdc.test/compilable/b16360.d
new file mode 100644
index 0000000..1141579
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b16360.d
@@ -0,0 +1,39 @@
+/*
+REQUIRED_ARGS: -inline -wi
+
+TEST_OUTPUT:
+---
+compilable/b16360.d(12): Warning: cannot inline function `b16360.foo`
+compilable/b16360.d(25): Warning: cannot inline function `b16360.bar`
+---
+*/
+
+pragma(inline, true)
+auto foo()
+{
+ static struct U
+ {
+ int a = 42;
+ float b;
+ ~this(){} // __dtor: inline not allowed
+ }
+ U u;
+ return u.a;
+}
+
+pragma(inline, true)
+auto bar()
+{
+ class U // class : inline not allowed
+ {
+ int a = 42;
+ float b;
+ }
+ return (new U).a;
+}
+
+void main()
+{
+ auto f = foo();
+ auto b = bar();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/b16697.d b/gcc/testsuite/gdc.test/compilable/b16697.d
index 78c9a2b..680a9d4 100644
--- a/gcc/testsuite/gdc.test/compilable/b16697.d
+++ b/gcc/testsuite/gdc.test/compilable/b16697.d
@@ -1,13 +1,18 @@
-version(D_SIMD)
+static assert(!is( float == __vector));
+static assert(!is( float[1] == __vector));
+static assert(!is( float[4] == __vector));
+static assert(!is(__vector(float[3]) == __vector));
+static assert(!is(__vector(float[5]) == __vector));
+
+static if (__traits(compiles, __vector(float[4])))
{
- static assert(!is( float == __vector));
- static assert(!is( float[1] == __vector));
- static assert(!is( float[4] == __vector));
- static assert( is(__vector(float[4]) == __vector));
- static assert(!is(__vector(float[3]) == __vector));
- static assert(!is(__vector(float[5]) == __vector));
- static assert( is(__vector(float[4]) X == __vector) &&
- is(X == float[4]));
- static assert( is(__vector(byte[16]) X == __vector) &&
- is(X == byte[16]));
+ static assert(is(__vector(float[4]) == __vector));
+ static assert(is(__vector(float[4]) X == __vector) &&
+ is(X == float[4]));
+}
+
+static if (__traits(compiles, __vector(byte[16])))
+{
+ static assert(is(__vector(byte[16]) X == __vector) &&
+ is(X == byte[16]));
}
diff --git a/gcc/testsuite/gdc.test/compilable/b16967.d b/gcc/testsuite/gdc.test/compilable/b16967.d
index 2b02fc3..57bc1c1 100644
--- a/gcc/testsuite/gdc.test/compilable/b16967.d
+++ b/gcc/testsuite/gdc.test/compilable/b16967.d
@@ -1,4 +1,4 @@
-/*
+/*
* REQUIRED_ARGS: -c
* TEST_OUTPUT:
---
@@ -27,7 +27,7 @@ out(v)
break;
}
}
-body
+do
{
return 42;
}
diff --git a/gcc/testsuite/gdc.test/compilable/b17111.d b/gcc/testsuite/gdc.test/compilable/b17111.d
index 6bf5da9..9e79a20 100644
--- a/gcc/testsuite/gdc.test/compilable/b17111.d
+++ b/gcc/testsuite/gdc.test/compilable/b17111.d
@@ -1,16 +1,7 @@
-/*
-TEST_OUTPUT:
----
-compilable/b17111.d(16): Deprecation: `case` variables have to be `const` or `immutable`
-compilable/b17111.d(17): Deprecation: `case` variables have to be `const` or `immutable`
----
-*/
alias TestType = ubyte;
-void test()
+void test(immutable TestType a, immutable TestType b, TestType c)
{
- TestType a,b,c;
-
switch(c)
{
case a: break;
diff --git a/gcc/testsuite/gdc.test/compilable/b17651.d b/gcc/testsuite/gdc.test/compilable/b17651.d
new file mode 100644
index 0000000..9b41b9e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b17651.d
@@ -0,0 +1,6 @@
+// REQUIRED_ARGS: -c -D -Ddtest_results/compilable
+/**
+Macros:
+Escapes=/a/b/
+*/
+void foo() {}
diff --git a/gcc/testsuite/gdc.test/compilable/b18197.d b/gcc/testsuite/gdc.test/compilable/b18197.d
new file mode 100644
index 0000000..c6f92e1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b18197.d
@@ -0,0 +1,17 @@
+// REQUIRED_ARGS: -c -m32 -O -inline
+
+struct A
+{
+ double a;
+}
+
+A makeA(double value)
+{
+ return A(value);
+}
+
+double test(double x)
+{
+ ulong p = *cast(ulong *)&x;
+ return makeA(x).a;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/b18242.d b/gcc/testsuite/gdc.test/compilable/b18242.d
new file mode 100644
index 0000000..5dcaeca
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b18242.d
@@ -0,0 +1,19 @@
+// REQUIRED_ARGS: -c
+// PERMUTE_ARGS:
+module object;
+
+class Object { }
+
+class TypeInfo { }
+class TypeInfo_Class : TypeInfo
+{
+ version(D_LP64) { ubyte[136] _x; } else { ubyte[68] _x; }
+}
+
+class Throwable { }
+
+int _d_run_main()
+{
+ try { } catch(Throwable e) { return 1; }
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/b18489.d b/gcc/testsuite/gdc.test/compilable/b18489.d
new file mode 100644
index 0000000..2cc386f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b18489.d
@@ -0,0 +1,8 @@
+// REQUIRED_ARGS: -O -m64
+import core.simd;
+
+double dot (double2 a) {
+ return a.ptr[0] * a.ptr[1];
+}
+
+void main () { }
diff --git a/gcc/testsuite/gdc.test/compilable/b19294.d b/gcc/testsuite/gdc.test/compilable/b19294.d
new file mode 100644
index 0000000..063a9df
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b19294.d
@@ -0,0 +1,69 @@
+alias MT = MyStruct!int;
+
+struct MyStruct(T)
+{
+ T x;
+
+ this(T y)
+ {
+ x = y;
+ }
+
+ MyStruct!T opBinary(string op)(MyStruct!T y) const
+ {
+ alias C = typeof(return);
+ auto w = C(this.x);
+ return w.opOpAssign!(op)(y);
+ }
+
+ MyStruct!T opBinaryRight(string op)(MyStruct!T y) const
+ {
+ return opBinary!(op)(y);
+ }
+
+ ref MyStruct opOpAssign(string op, T)(const MyStruct!T z)
+ {
+ mixin ("x "~op~"= z.x;");
+ return this;
+ }
+
+ MyStruct!T opBinary(string op)(T y) const
+ {
+ alias C = typeof(return);
+ auto w = C(this.x);
+ return w.opOpAssign!(op)(y);
+ }
+
+ MyStruct!T opBinaryRight(string op)(T y) const
+ {
+ return opBinary!(op)(y);
+ }
+
+ ref MyStruct opOpAssign(string op, T)(const T z)
+ {
+ mixin ("x "~op~"= z;");
+ return this;
+ }
+}
+
+void test()
+{
+ MT s = MyStruct!int(1);
+ MT[] arr = [s, 2 * s, 3 * s, 4 * s, 5 * s, 6 * s];
+ MT[] result = new MT[arr.length];
+
+ result[] = arr[] + s;
+ result[] = s + arr[];
+
+ result[] = arr[] - s;
+ result[] = s - arr[];
+
+ result[] = arr[] * s;
+ result[] = s * arr[];
+
+ result[] = arr[] / s;
+ result[] = s / arr[];
+
+ result[] = arr[] ^^ s;
+ result[] = s ^^ arr[];
+}
diff --git a/gcc/testsuite/gdc.test/compilable/b19432.d b/gcc/testsuite/gdc.test/compilable/b19432.d
new file mode 100644
index 0000000..cf0dd87
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b19432.d
@@ -0,0 +1,5 @@
+
+void main(){
+ enum a = 18446744073709551615; // 2^^64 - 1
+ ulong b = 18446744073709551615; // 2^^64 - 1
+}
diff --git a/gcc/testsuite/gdc.test/compilable/b19442.d b/gcc/testsuite/gdc.test/compilable/b19442.d
new file mode 100644
index 0000000..4e7e933
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b19442.d
@@ -0,0 +1,11 @@
+// https://issues.dlang.org/show_bug.cgi?id=19442
+enum x1 = 42;
+enum x2 = mixin('x', 1);
+enum x3 = mixin(wchar('x'), 2);
+enum x4 = mixin(dchar('x'), 3);
+static assert(x2 == 42);
+static assert(x3 == 42);
+static assert(x4 == 42);
+
+mixin(`enum string s = "`, wchar('ö'), dchar('ðŸº'), `";`);
+static assert(s == "öðŸº");
diff --git a/gcc/testsuite/gdc.test/compilable/b19775.d b/gcc/testsuite/gdc.test/compilable/b19775.d
new file mode 100644
index 0000000..ec504d4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b19775.d
@@ -0,0 +1,14 @@
+// https://issues.dlang.org/show_bug.cgi?id=19775
+enum x1 = 42;
+enum ident(alias a, args...) = mixin(a, args);
+
+//enum x2 = ident!("x1"); //FIXME - empty args
+enum x2 = x1;
+enum x3 = ident!("x", 2);
+enum x4 = ident!('x', "", 3);
+enum x5 = ident!("", 'x', 4);
+
+//static assert(x2 == 42);
+static assert(x3 == 42);
+static assert(x4 == 42);
+static assert(x5 == 42);
diff --git a/gcc/testsuite/gdc.test/compilable/b19829.d b/gcc/testsuite/gdc.test/compilable/b19829.d
new file mode 100644
index 0000000..7f4b282
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b19829.d
@@ -0,0 +1,4 @@
+static assert(!__traits(isSame, (i){ return i,x.value; }, a => a.value));
+static assert(!__traits(isSame, i => x[i].value, a => a.value));
+static assert(!__traits(isSame, i => [i].value, a => a.value));
+static assert(__traits(isSame, i => i.value, a => a.value));
diff --git a/gcc/testsuite/gdc.test/compilable/b20045.d b/gcc/testsuite/gdc.test/compilable/b20045.d
new file mode 100644
index 0000000..988bbca5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b20045.d
@@ -0,0 +1,2 @@
+alias U = const ubyte[uint.sizeof]*;
+static assert (is(U == const(ubyte[4]*)));
diff --git a/gcc/testsuite/gdc.test/compilable/b20067.d b/gcc/testsuite/gdc.test/compilable/b20067.d
new file mode 100644
index 0000000..af79cab
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b20067.d
@@ -0,0 +1,23 @@
+struct S1
+{
+ int i;
+ @property int ii(){return 0;}
+ @property bool b(){return true;}
+ alias empty = b;
+ alias front = ii;
+ void popFront(){}
+}
+struct S2
+{
+ int i;
+ bool b;
+ alias empty = b;
+ alias front = i;
+ void popFront(){}
+}
+
+void main()
+{
+ foreach(n; S1()) { } // 2.086: Error: cannot infer argument types
+ foreach(n; S2()) { } // 2.086: Error: cannot infer argument types
+}
diff --git a/gcc/testsuite/gdc.test/compilable/b20758.d b/gcc/testsuite/gdc.test/compilable/b20758.d
new file mode 100644
index 0000000..58b30b1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b20758.d
@@ -0,0 +1,15 @@
+module b20758;
+
+template foo(A...) { }
+
+int attr() {return 1;}
+@attr int y;
+
+alias A = __traits(getAttributes, y);
+alias B = __traits(getOverloads, b20758, "attr");
+static assert(__traits(isSame, foo!(A[0]), foo!(attr)));
+static assert(__traits(isSame, foo!(A), foo!(attr)));
+static assert(__traits(isSame, foo!(attr), foo!(B[0])));
+static assert(__traits(isSame, foo!(attr), foo!(B)));
+
+void main() { }
diff --git a/gcc/testsuite/gdc.test/compilable/b20780.d b/gcc/testsuite/gdc.test/compilable/b20780.d
new file mode 100644
index 0000000..366a2d9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b20780.d
@@ -0,0 +1,13 @@
+void main()
+{
+ struct A;
+ struct B { struct CD;}
+ alias V = void;
+ alias I = int;
+ V test0(@A I) {}
+ V test1(@A I p) {}
+ V test2(@A @(B) I) {}
+ V test3(@(B.CD) @B I) {}
+ V test4(@A I, @B @A I) {}
+ V test5(@A I p, @(B.CD) @A I ) {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/b20833.d b/gcc/testsuite/gdc.test/compilable/b20833.d
new file mode 100644
index 0000000..429d1f5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b20833.d
@@ -0,0 +1,20 @@
+struct A
+{
+ void foo(T)(T t) {}
+ void foo(long l) {}
+
+ void bar(long l) {}
+ void bar(T)(T t) {}
+}
+
+static assert(__traits(getOverloads, A, "foo").length == 1);
+static assert(__traits(getOverloads, A.init, "foo").length == 1);
+
+static assert(__traits(getOverloads, A, "foo", true).length == 2);
+static assert(__traits(getOverloads, A.init, "foo", true).length == 2);
+
+static assert(__traits(getOverloads, A, "bar").length == 1);
+static assert(__traits(getOverloads, A.init, "bar").length == 1);
+
+static assert(__traits(getOverloads, A, "bar", true).length == 2);
+static assert(__traits(getOverloads, A.init, "bar", true).length == 2);
diff --git a/gcc/testsuite/gdc.test/compilable/b20885.d b/gcc/testsuite/gdc.test/compilable/b20885.d
new file mode 100644
index 0000000..6e87184
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b20885.d
@@ -0,0 +1,16 @@
+module b20885;
+
+struct S
+{
+ alias P = void*;
+}
+
+void main()
+{
+ alias P = void*;
+ alias PP = void**;
+ PP[1] a = null;
+ if (const void** b = a[0]){} // OK
+ if (const P* b = a[0]){} // NG
+ if (const S.P* b = a[0]){} // NG
+}
diff --git a/gcc/testsuite/gdc.test/compilable/b20938.d b/gcc/testsuite/gdc.test/compilable/b20938.d
new file mode 100644
index 0000000..efcf4aa
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b20938.d
@@ -0,0 +1,22 @@
+// issue 20938 - Cannot create const arrays mixing immutable and mutable structs with indirections
+struct S { int[] a; }
+enum A { a }
+enum B { b }
+
+void fun() {
+ int* pi;
+ immutable int* ipi;
+ int[] ai;
+ immutable int[] iai;
+ S s;
+ immutable S _is;
+ Object o;
+ immutable Object io;
+
+ auto a = [pi, ipi];
+ auto b = [ai, iai];
+ auto c = [s, _is];
+ auto d = [o, io];
+
+ auto e = [A.a, B.b];
+}
diff --git a/gcc/testsuite/gdc.test/compilable/b21285.d b/gcc/testsuite/gdc.test/compilable/b21285.d
new file mode 100644
index 0000000..11eea74
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/b21285.d
@@ -0,0 +1,27 @@
+// REQUIRED_ARGS: -unittest
+// Issue 21285 - Delegate covariance broken between 2.092 and 2.094 (git master).
+unittest
+{
+ string path;
+ int bank;
+ static string path2;
+ static int bank2;
+
+ // delegates
+ auto a = [
+ (string arg) { path = arg; },
+ (string arg) { bank = 1; throw new Exception(""); }
+ ];
+
+ // functions
+ auto ab = [
+ (string arg) { path2 = arg; },
+ (string arg) { bank2 = 1; throw new Exception(""); }
+ ];
+
+ alias dg = void delegate(string) pure @safe;
+ alias fn = void function(string) @safe;
+
+ static assert(is(typeof(a[0]) == dg));
+ static assert(is(typeof(ab[0]) == fn));
+}
diff --git a/gcc/testsuite/gdc.test/compilable/b33.d b/gcc/testsuite/gdc.test/compilable/b33.d
index d422959..cba6fe2 100644
--- a/gcc/testsuite/gdc.test/compilable/b33.d
+++ b/gcc/testsuite/gdc.test/compilable/b33.d
@@ -1,4 +1,4 @@
-// EXTRA_SOURCES: imports/b33a.d
+// COMPILED_IMPORTS: imports/b33a.d
// PERMUTE_ARGS:
module b33;
diff --git a/gcc/testsuite/gdc.test/compilable/b6227.d b/gcc/testsuite/gdc.test/compilable/b6227.d
index 6ec2dd0..2a7700a 100644
--- a/gcc/testsuite/gdc.test/compilable/b6227.d
+++ b/gcc/testsuite/gdc.test/compilable/b6227.d
@@ -1,9 +1,3 @@
-/* TEST_OUTPUT:
----
-compilable/b6227.d(17): Deprecation: Comparison between different enumeration types `X` and `Y`; If this behavior is intended consider using `std.conv.asOriginalType`
-compilable/b6227.d(18): Deprecation: Comparison between different enumeration types `X` and `Y`; If this behavior is intended consider using `std.conv.asOriginalType`
----
-*/
enum X {
O,
R
@@ -14,5 +8,3 @@ enum Y {
static assert( (X.O == cast(const)X.O));
static assert( (X.O == X.O));
static assert( (X.O != X.R));
-static assert(!(X.O != Y.U));
-static assert( (X.O == Y.U));
diff --git a/gcc/testsuite/gdc.test/compilable/b6395.d b/gcc/testsuite/gdc.test/compilable/b6395.d
index afbe3f1..94f4bc3 100644
--- a/gcc/testsuite/gdc.test/compilable/b6395.d
+++ b/gcc/testsuite/gdc.test/compilable/b6395.d
@@ -1,7 +1,7 @@
// REQUIRED_ARGS: -Icompilable/extra-files
// EXTRA_FILES: extra-files/c6395.d
-// 6395
+// https://issues.dlang.org/show_bug.cgi?id=6395
import c6395;
diff --git a/gcc/testsuite/gdc.test/compilable/b6400.d b/gcc/testsuite/gdc.test/compilable/b6400.d
deleted file mode 100644
index 2c71107..0000000
--- a/gcc/testsuite/gdc.test/compilable/b6400.d
+++ /dev/null
@@ -1,37 +0,0 @@
-/* TEST_OUTPUT:
----
-Foo
-Bar
----
-*/
-class Foo
-{
- void opDispatch(string name)() { pragma(msg, "Foo"); }
-}
-class Bar
-{
- void opDispatch(string name)() { pragma(msg, "Bar"); }
-}
-class Baz
-{
-}
-
-void main()
-{
- auto foo = new Foo;
- auto bar = new Bar;
- auto baz = new Baz;
-
- with (foo)
- {
- f0();
- with (bar)
- {
- f1();
- }
- with (baz)
- {
- static assert(!__traits(compiles, f2()));
- }
- }
-}
diff --git a/gcc/testsuite/gdc.test/compilable/betterc.d b/gcc/testsuite/gdc.test/compilable/betterc.d
new file mode 100644
index 0000000..7df9bc2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/betterc.d
@@ -0,0 +1,27 @@
+/* REQUIRED_ARGS: -betterC
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=17787
+version (D_BetterC)
+{
+}
+else
+{
+ static assert(0);
+}
+
+// -betterC does not support `ModuleInfo`, `TypeInfo`, or exception handling
+version (D_ModuleInfo)
+{
+ static assert(0);
+}
+
+version (D_Exceptions)
+{
+ static assert(0);
+}
+
+version (D_TypeInfo)
+{
+ static assert(0);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/bug21196.d b/gcc/testsuite/gdc.test/compilable/bug21196.d
new file mode 100644
index 0000000..c2f9a43
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/bug21196.d
@@ -0,0 +1,31 @@
+/*
+REQUIRED_ARGS: -de
+*/
+
+// This test can be removed once the deprecation period is over
+deprecated void appendSlices ( Types ... ) ( ref void[][] slices, ref Types x )
+{
+ foreach (i, T; Types)
+ {
+ static if (is(T Element: Element[]))
+ {
+ static if (is(T == Element[]))
+ {
+ slices ~= (cast(void*)(&x[i]))[0 .. size_t.sizeof];
+ }
+ // Append a slice to the array content.
+ slices ~= x[i];
+ }
+ else
+ {
+ slices ~= (cast(void*)(&x[i]))[0 .. x[i].sizeof];
+ }
+ }
+}
+
+deprecated void myTest()
+{
+ void[][] slices;
+ char[] str = "Hello World!".dup;
+ appendSlices(slices, str);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/callconv.d b/gcc/testsuite/gdc.test/compilable/callconv.d
index 145ebb1..42c47d8 100644
--- a/gcc/testsuite/gdc.test/compilable/callconv.d
+++ b/gcc/testsuite/gdc.test/compilable/callconv.d
@@ -1,10 +1,9 @@
// PERMUTE_ARGS:
-
import core.stdc.stdarg;
struct ABC
{
- int x[4];
+ int[4] x;
}
ABC abc;
diff --git a/gcc/testsuite/gdc.test/compilable/ccompile.d b/gcc/testsuite/gdc.test/compilable/ccompile.d
new file mode 100644
index 0000000..22c749c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ccompile.d
@@ -0,0 +1,36 @@
+
+/* REQUIRED_ARGS: -O
+ */
+
+// Adapted from DMC++ test file test3/ccompile.c
+
+
+ struct HDS {
+ char state;
+ uint done;
+ uint retry;
+ uint[15] tests;
+ }
+
+void funchds(char *p_adults)
+{
+ int cupx, chemx;
+ HDS *p_cup;
+
+ for (cupx = 1, p_cup = null; cupx <= 48 ; cupx ++, p_cup ++)
+ {
+ for (chemx = 0; chemx < 15 ; chemx++)
+ {
+ if (p_cup.done) {
+ if (p_cup.tests [chemx]) {
+ *p_adults++ = 3;
+ }
+ if (p_cup.done && (p_cup.tests [chemx])) {
+ *p_adults++ = 4;
+ }
+ }
+ }
+ }
+}
+
+
diff --git a/gcc/testsuite/gdc.test/compilable/cdcmp.d b/gcc/testsuite/gdc.test/compilable/cdcmp.d
new file mode 100644
index 0000000..4248818
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/cdcmp.d
@@ -0,0 +1,148 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -O
+// POST_SCRIPT: compilable/extra-files/objdump-postscript.sh
+// only testing on SYSV-ABI, but backend code is identical across platforms
+// DISABLED: win32 win64 osx linux32 freebsd32 freebsd64 openbsd32 openbsd64
+
+bool test_ltz(ubyte x) { return x < 0; }
+bool test_lez(ubyte x) { return x <= 0; }
+bool test_eqz(ubyte x) { return x == 0; }
+bool test_nez(ubyte x) { return x != 0; }
+bool test_gez(ubyte x) { return x >= 0; }
+bool test_gtz(ubyte x) { return x > 0; }
+
+bool test_ltz(byte x) { return x < 0; }
+bool test_lez(byte x) { return x <= 0; }
+bool test_eqz(byte x) { return x == 0; }
+bool test_nez(byte x) { return x != 0; }
+bool test_gez(byte x) { return x >= 0; }
+bool test_gtz(byte x) { return x > 0; }
+
+bool test_ltz(ushort x) { return x < 0; }
+bool test_lez(ushort x) { return x <= 0; }
+bool test_eqz(ushort x) { return x == 0; }
+bool test_nez(ushort x) { return x != 0; }
+bool test_gez(ushort x) { return x >= 0; }
+bool test_gtz(ushort x) { return x > 0; }
+
+bool test_ltz(short x) { return x < 0; }
+bool test_lez(short x) { return x <= 0; }
+bool test_eqz(short x) { return x == 0; }
+bool test_nez(short x) { return x != 0; }
+bool test_gez(short x) { return x >= 0; }
+bool test_gtz(short x) { return x > 0; }
+
+bool test_ltz(uint x) { return x < 0; }
+bool test_lez(uint x) { return x <= 0; }
+bool test_eqz(uint x) { return x == 0; }
+bool test_nez(uint x) { return x != 0; }
+bool test_gez(uint x) { return x >= 0; }
+bool test_gtz(uint x) { return x > 0; }
+
+bool test_ltz(int x) { return x < 0; }
+bool test_lez(int x) { return x <= 0; }
+bool test_eqz(int x) { return x == 0; }
+bool test_nez(int x) { return x != 0; }
+bool test_gez(int x) { return x >= 0; }
+bool test_gtz(int x) { return x > 0; }
+
+bool test_ltz(ulong x) { return x < 0; }
+bool test_lez(ulong x) { return x <= 0; }
+bool test_eqz(ulong x) { return x == 0; }
+bool test_nez(ulong x) { return x != 0; }
+bool test_gez(ulong x) { return x >= 0; }
+bool test_gtz(ulong x) { return x > 0; }
+
+bool test_ltz(long x) { return x < 0; }
+bool test_lez(long x) { return x <= 0; }
+bool test_eqz(long x) { return x == 0; }
+bool test_nez(long x) { return x != 0; }
+bool test_gez(long x) { return x >= 0; }
+bool test_gtz(long x) { return x > 0; }
+
+bool test_ltz(float x) { return x < 0; }
+bool test_lez(float x) { return x <= 0; }
+bool test_eqz(float x) { return x == 0; }
+bool test_nez(float x) { return x != 0; }
+bool test_gez(float x) { return x >= 0; }
+bool test_gtz(float x) { return x > 0; }
+
+bool test_ltz(double x) { return x < 0; }
+bool test_lez(double x) { return x <= 0; }
+bool test_eqz(double x) { return x == 0; }
+bool test_nez(double x) { return x != 0; }
+bool test_gez(double x) { return x >= 0; }
+bool test_gtz(double x) { return x > 0; }
+
+/* ----------------------------------- */
+
+bool test_lt(ubyte x, ubyte y) { return x < y; }
+bool test_le(ubyte x, ubyte y) { return x <= y; }
+bool test_eq(ubyte x, ubyte y) { return x == y; }
+bool test_ne(ubyte x, ubyte y) { return x != y; }
+bool test_ge(ubyte x, ubyte y) { return x >= y; }
+bool test_gt(ubyte x, ubyte y) { return x > y; }
+
+bool test_lt(byte x, byte y) { return x < y; }
+bool test_le(byte x, byte y) { return x <= y; }
+bool test_eq(byte x, byte y) { return x == y; }
+bool test_ne(byte x, byte y) { return x != y; }
+bool test_ge(byte x, byte y) { return x >= y; }
+bool test_gt(byte x, byte y) { return x > y; }
+
+bool test_lt(ushort x, ushort y) { return x < y; }
+bool test_le(ushort x, ushort y) { return x <= y; }
+bool test_eq(ushort x, ushort y) { return x == y; }
+bool test_ne(ushort x, ushort y) { return x != y; }
+bool test_ge(ushort x, ushort y) { return x >= y; }
+bool test_gt(ushort x, ushort y) { return x > y; }
+
+bool test_lt(short x, short y) { return x < y; }
+bool test_le(short x, short y) { return x <= y; }
+bool test_eq(short x, short y) { return x == y; }
+bool test_ne(short x, short y) { return x != y; }
+bool test_ge(short x, short y) { return x >= y; }
+bool test_gt(short x, short y) { return x > y; }
+
+bool test_lt(uint x, uint y) { return x < y; }
+bool test_le(uint x, uint y) { return x <= y; }
+bool test_eq(uint x, uint y) { return x == y; }
+bool test_ne(uint x, uint y) { return x != y; }
+bool test_ge(uint x, uint y) { return x >= y; }
+bool test_gt(uint x, uint y) { return x > y; }
+
+bool test_lt(int x, int y) { return x < y; }
+bool test_le(int x, int y) { return x <= y; }
+bool test_eq(int x, int y) { return x == y; }
+bool test_ne(int x, int y) { return x != y; }
+bool test_ge(int x, int y) { return x >= y; }
+bool test_gt(int x, int y) { return x > y; }
+
+bool test_lt(ulong x, ulong y) { return x < y; }
+bool test_le(ulong x, ulong y) { return x <= y; }
+bool test_eq(ulong x, ulong y) { return x == y; }
+bool test_ne(ulong x, ulong y) { return x != y; }
+bool test_ge(ulong x, ulong y) { return x >= y; }
+bool test_gt(ulong x, ulong y) { return x > y; }
+
+bool test_lt(long x, long y) { return x < y; }
+bool test_le(long x, long y) { return x <= y; }
+bool test_eq(long x, long y) { return x == y; }
+bool test_ne(long x, long y) { return x != y; }
+bool test_ge(long x, long y) { return x >= y; }
+bool test_gt(long x, long y) { return x > y; }
+
+bool test_lt(float x, float y) { return x < y; }
+bool test_le(float x, float y) { return x <= y; }
+bool test_eq(float x, float y) { return x == y; }
+bool test_ne(float x, float y) { return x != y; }
+bool test_ge(float x, float y) { return x >= y; }
+bool test_gt(float x, float y) { return x > y; }
+
+bool test_lt(double x, double y) { return x < y; }
+bool test_le(double x, double y) { return x <= y; }
+bool test_eq(double x, double y) { return x == y; }
+bool test_ne(double x, double y) { return x != y; }
+bool test_ge(double x, double y) { return x >= y; }
+bool test_gt(double x, double y) { return x > y; }
+
diff --git a/gcc/testsuite/gdc.test/compilable/chkformat.d b/gcc/testsuite/gdc.test/compilable/chkformat.d
new file mode 100644
index 0000000..ccbe974
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/chkformat.d
@@ -0,0 +1,27 @@
+// https://issues.dlang.org/show_bug.cgi?id=20643
+// https://issues.dlang.org/show_bug.cgi?id=20644
+/*
+TEST_OUTPUT:
+----
+compilable/chkformat.d(14): Deprecation: more format specifiers than 0 arguments
+----
+*/
+import core.stdc.stdio;
+
+void main()
+{
+ // b20643
+ printf("%d \n");
+
+ // b20644
+ ubyte b;
+ printf("%hhu \n", b);
+
+ char c = '-';
+ printf("%c", c);
+
+ short s;
+ printf("%hd", s);
+
+ printf("%hn", &s);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/commontype.d b/gcc/testsuite/gdc.test/compilable/commontype.d
new file mode 100644
index 0000000..076e29b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/commontype.d
@@ -0,0 +1,486 @@
+// REQUIRED_ARGS: -mcpu=avx2
+
+import core.simd;
+
+
+version = CondExp;
+//version = ReturnInfer;
+
+T rvalueOf(T)();
+
+version (CondExp)
+{
+ alias X(T, U) = typeof(0 ? rvalueOf!T : rvalueOf!U);
+}
+else version (ReturnInfer)
+{
+ alias X(T, U) = typeof({ if (0) return rvalueOf!T; else return rvalueOf!U;}());
+}
+else
+ static assert(0);
+
+enum Error(T, U) = !__traits(compiles, X!(T, U));
+
+
+interface I {}
+class B {}
+class C : B, I {}
+class D : B {}
+class K {}
+struct SI { I o; alias o this; }
+struct SC { C o; alias o this; }
+struct SB { B o; alias o this; }
+struct SD { D o; alias o this; }
+struct SK { K o; alias o this; }
+struct SiC { immutable(C) o; alias o this; }
+
+struct S { int a; }
+struct Si { int a; alias a this; }
+struct Si2 { int a; alias a this; }
+struct Sl { long a; alias a this; }
+
+/******************************
+ * Basic types
+ */
+
+static assert(is( X!( byte, byte ) == byte ));
+static assert(is( X!( ubyte, ubyte ) == ubyte ));
+static assert(is( X!( byte, ubyte ) == int ));
+static assert(is( X!( byte, short ) == int ));
+static assert(is( X!( byte, ushort ) == int ));
+static assert(is( X!( byte, const(byte) ) == int ));
+static assert(is( X!( ubyte, const(ubyte) ) == int ));
+
+static assert(is( X!( short, short ) == short ));
+static assert(is( X!( ushort, ushort ) == ushort ));
+static assert(is( X!( short, ushort ) == int ));
+static assert(is( X!( short, const(short) ) == int ));
+static assert(is( X!( ushort, const(ushort) ) == int ));
+
+static assert(is( X!( int, int ) == int ));
+static assert(is( X!( int, uint ) == uint ));
+static assert(is( X!( uint, uint ) == uint ));
+
+static assert(is( X!( int, long ) == long ));
+static assert(is( X!( int, ulong ) == ulong ));
+
+static assert(is( X!( float, float ) == float ));
+static assert(is( X!( float, int ) == float ));
+static assert(is( X!( float, uint ) == float ));
+static assert(is( X!( float, long ) == float ));
+static assert(is( X!( float, ulong ) == float ));
+static assert(is( X!( float, double ) == double ));
+static assert(is( X!( float, real ) == real ));
+
+static assert(is( X!( char, char ) == char ));
+static assert(is( X!( char, byte ) == int ));
+static assert(is( X!( char, ubyte ) == int ));
+static assert(is( X!( char, wchar ) == dchar ));
+static assert(is( X!( char, dchar ) == dchar ));
+static assert(is( X!( char, const(char) ) == const(char) ));
+static assert(is( X!( wchar, const(wchar) ) == const(wchar) ));
+static assert(is( X!( dchar, const(dchar) ) == const(dchar) ));
+static assert(is( X!( char, immutable(char) ) == const(char) ));
+static assert(Error!( char, shared(char) ));
+
+static assert(is( X!( char, float ) == float ));
+
+static assert(is( X!( immutable(int), int ) == int ));
+static assert(is( X!( const(int), int ) == int ));
+static assert(is( X!( shared(int), int ) == int ));
+static assert(is( X!( immutable(int), const(shared(int)) ) == int ));
+static assert(is( X!( shared(int), const(int) ) == int ));
+
+/******************************
+ * Strings
+ */
+
+static assert(is( X!( string, string ) == string ));
+static assert(Error!( wstring, string ));
+static assert(Error!( dstring, string ));
+static assert(Error!( dstring, wstring ));
+static assert(is( X!( const(char)[], string ) == const(char)[] ));
+static assert(is( X!( char[], string ) == const(char)[] ));
+static assert(is( X!( string, immutable(string) ) == immutable(string) )); // `const`
+static assert(is( X!( immutable(string), string ) == string )); // not commutative
+
+/******************************
+ * Enums
+ */
+
+enum Ei : int { a, }
+enum Eb : byte { a, }
+enum Ec : char { a, }
+enum Ew : wchar { a, }
+
+static assert(is( X!( Ei, Ei ) == Ei ));
+static assert(is( X!( Ei, const(Ei) ) == const(Ei) ));
+static assert(is( X!( Ei, immutable(Ei) ) == const(Ei) ));
+static assert(is( X!( Eb, Eb ) == Eb ));
+static assert(is( X!( Eb, const(Eb) ) == int ));
+static assert(is( X!( Eb, immutable(Eb) ) == int ));
+static assert(is( X!( Ei, Eb ) == int ));
+static assert(is( X!( Ei, const(Eb) ) == int ));
+static assert(is( X!( Ei, immutable(Eb) ) == int ));
+
+static assert(is( X!( Ec, Ec ) == Ec ));
+static assert(is( X!( Ec, const(Ec) ) == const(char) ));
+static assert(is( X!( Ec, immutable(Ec) ) == const(char) ));
+static assert(is( X!( Ew, Ew ) == Ew ));
+static assert(is( X!( Ew, const(Ew) ) == const(wchar) ));
+static assert(is( X!( Ew, immutable(Ew) ) == const(wchar) ));
+static assert(is( X!( Ew, Ec ) == dchar ));
+static assert(is( X!( Ew, const(Ec) ) == dchar ));
+static assert(is( X!( Ew, immutable(Ec) ) == dchar ));
+
+/******************************
+ * Tuple
+ */
+
+alias Tuple(Args...) = Args;
+static assert(!__traits(compiles ,typeof(0 ? Tuple!1 : Tuple!1)));
+
+/******************************
+ * Pointers
+ */
+
+static assert(is( X!( int*, int* ) == int* ));
+static assert(is( X!( const(int*), const(int)* ) == const(int*) ));
+static assert(is( X!( const(int)*, const(int*) ) == const(int)* )); // not commutative
+static assert(Error!( uint*, int* ));
+static assert(is( X!( int function(), int function() ) == int function() ));
+
+// void pointer
+static assert(is( X!( void*, int* ) == int* ));
+static assert(is( X!( int*, void* ) == int* ));
+static assert(is( X!( const(int)*, void* ) == const(int)* ));
+static assert(is( X!( const(int*), void* ) == const(int*) ));
+static assert(is( X!( int*, const(void)* ) == int* )); // `const`
+static assert(is( X!( int*, const(void*) ) == int* )); // `const`
+static assert(is( X!( int*, shared(void*) ) == int* )); // should fail
+static assert(is( X!( int*, shared(void)* ) == int* )); // should fail
+
+static assert(Error!( int**, void** )); // should work
+
+static assert(is( X!( void*, int function() ) == int function() ));
+static assert(is( X!( immutable(void*), int function() ) == int function() )); // `const`
+
+// implicit conversion
+static assert(is( X!( int*, const(int*) ) == const(int*) ));
+static assert(is( X!( int*, const(int)* ) == const(int)* ));
+static assert(is( X!( int***, const(int)*** ) == const(int**)* ));
+static assert(is( X!( immutable(int)***, const(int)*** ) == const(int**)* ));
+static assert(is( X!( immutable(int)***, const(shared(int))*** ) == const(shared(int)**)* ));
+
+// common modifier
+static assert(is( X!( immutable(int)*, int* ) == const(int)* ));
+static assert(is( X!( immutable(int*), int* ) == const(int)* ));
+static assert(is( X!( immutable(int)*, shared(int)* ) == shared(const(int))* ));
+static assert(Error!( shared(int)*, int* ));
+
+static assert(is( X!( immutable(int)***, int*** ) == const(int**)* )); // `const(int)***`
+static assert(is( X!( shared(const(int)***), shared(int***) ) == const(shared(int*)*)* )); // `shared(const(int)***)`
+static assert(is( X!( shared(const(int)***), shared(int**)* ) == const(shared(int*)*)* ));
+static assert(Error!( shared(const(int)***), shared(int*)** ));
+
+
+// class pointer
+static assert(is( X!( C*, B* ) == B* ));
+static assert(is( X!( const(C)*, B* ) == const(B)* ));
+static assert(Error!( shared(C)*, B* ));
+static assert(is( X!( immutable(C)*, B* ) == const(B)* ));
+static assert(is( X!( immutable(C*), B* ) == const(B)* ));
+static assert(is( X!( C**, B** ) == const(B*)* )); // `B**`
+static assert(is( X!( B**, C** ) == const(B*)* )); // `B**`
+static assert(is( X!( C***, B*** ) == const(B**)* )); // `B***`
+
+static assert(is( X!( C*, I* ) == I* ));
+static assert(is( X!( I*, C* ) == I* ));
+static assert(Error!( C**, I** ));
+
+static assert(Error!( C*, D* )); // should work
+
+// function pointer
+static assert(is( X!( immutable(int function()), int function() ) == immutable(int function()) ));
+static assert(is( X!( int function(), immutable(int function()) ) == int function() )); // not commutative
+static assert(is( X!( int function(), shared(int function()) ) == int function() ));
+
+static assert(is( X!( int function(), const(int) function() ) == const(int) function() ));
+static assert(is( X!( int function(), immutable(int) function() ) == immutable(int) function() )); // `const`
+static assert(is( X!( immutable(int) function(), int function() ) == int function() )); // not commutative
+
+static assert(Error!( uint function(), int function() ));
+
+static assert(is( X!( C function(), B function() ) == B function() ));
+static assert(is( X!( B function(), C function() ) == B function() ));
+static assert(is( X!( C function(), const(B) function() ) == const(B) function() ));
+static assert(Error!( const(C) function(), B function() )); // should work
+static assert(Error!( C* function(), B* function() )); // should work
+static assert(Error!( C function(), I function() ));
+static assert(Error!( C* function(), I* function() ));
+
+static assert(is( X!( C delegate(), B delegate() ) == B delegate() ));
+static assert(Error!( C delegate(), I delegate() ));
+
+static assert(Error!( C function(), D function() )); // should work
+
+static assert(Error!( void function(int), void function(const(int)) )); // should work
+
+static assert(Error!( void function(C), void function(B) ));
+static assert(Error!( void function(C*), void function(B*) ));
+static assert(Error!( void function(const(C)*), void function(B*) ));
+static assert(is( X!( void function(C*), void function(const(B*)) ) == void function(C*) )); // !?
+
+static assert(is( X!( void function(C), void function(const(C)) ) == void function(C) ));
+static assert(is( X!( void function(C), void function(const(C)) ) == void function(C) ));
+
+static assert(is( X!( void function() pure nothrow @nogc @safe, void function() ) == void function() ));
+static assert(is( X!( void function() pure @safe, void function() @nogc ) == void function() ));
+static assert(is( X!( void function() pure @trusted, void function() nothrow @safe ) == void function() @trusted ));
+static assert(is( X!( void function() @trusted, void function() ) == void function()));
+static assert(is( X!( void function() @trusted, void function() @trusted ) == void function() @trusted ));
+static assert(is( X!( void function() @safe, void function() @trusted ) == void function() @trusted ));
+static assert(is( X!( void function() @trusted, void function() @safe ) == void function() @safe )); // not commutative
+
+static assert(is( X!( const(int function())*, int function()* ) == const(int function())* ));
+static assert(is( X!( immutable(int function())*, int function()* ) == const(int function())* ));
+static assert(Error!( shared(int function())*, int function()* ));
+static assert(is( X!( shared(int function())*, immutable(int function())* ) == shared(const(int function()))* ));
+
+
+/******************************
+ * Arrays
+ */
+
+static assert(is( X!( int[4], int[4] ) == int[4] ));
+static assert(is( X!( int[], int[] ) == int[] ));
+
+// static array modifier conversion
+static assert(is( X!( const(int)[4], int[4] ) == int[4] ));
+static assert(is( X!( int[4], const(int)[4] ) == const(int)[4] )); // not commutative
+static assert(is( X!( const(int)[4], immutable(int)[4] ) == immutable(int)[4] ));
+static assert(is( X!( immutable(int)[4], const(int)[4] ) == const(int)[4] )); // not commutative
+static assert(is( X!( int[4], immutable(int)[4] ) == immutable(int)[4] ));
+static assert(is( X!( immutable(int)[4], int[4] ) == int[4] )); // not commutative
+static assert(Error!( shared(int)[4], int[4] )); // should work
+static assert(Error!( int[4], shared(int)[4] )); // should work
+static assert(Error!( shared(int)[4], const(int)[4] )); // should work
+static assert(Error!( const(int)[4] , shared(int)[4])); // should work
+static assert(is( X!( shared(const(int))[4], shared(int)[4] ) == shared(int)[4] ));
+static assert(is( X!( shared(int)[4], shared(const(int))[4] ) == shared(const(int))[4] )); // not commutative
+static assert(is( X!( shared(const(int))[4], immutable(int)[4] ) == shared(const(int))[4] ));
+static assert(is( X!( immutable(int)[4], shared(const(int))[4] ) == shared(const(int))[4] ));
+
+static assert(is( X!( immutable(int)[4], shared(int)[4] ) == shared(const(int))[] )); // `[4]`
+static assert(is( X!( shared(int)[4], immutable(int)[4] ) == shared(const(int))[] )); // `[4]`
+
+static assert(is( X!( int*[4], const(int)*[4] ) == const(int)*[4]));
+static assert(is( X!( const(int)*[4], int*[4] ) == const(int)*[4]));
+static assert(is( X!( immutable(int)*[4], const(int)*[4] ) == const(int)*[4]));
+static assert(is( X!( const(int)*[4], immutable(int)*[4] ) == const(int)*[4]));
+static assert(Error!( int*[4], immutable(int)*[4] )); // should work
+static assert(Error!( immutable(int)*[4], int*[4] )); // should work
+static assert(Error!( int*[4], shared(int)*[4] ));
+static assert(Error!( shared(int)*[4], int*[4] ));
+static assert(Error!( shared(int)*[4], immutable(int)*[4] )); // should work
+static assert(Error!( immutable(int)*[4], shared(int)*[4] )); // should work
+static assert(is( X!( shared(const(int))*[4], shared(int)*[4] ) == shared(const(int))*[4] ));
+static assert(is( X!( shared(int)*[4], shared(const(int))*[4] ) == shared(const(int))*[4] ));
+
+static assert(is( X!( C[4], const(C)[4] ) == const(C)[4] ));
+static assert(is( X!( const(C)[4], C[4] ) == const(C)[4] ));
+static assert(is( X!( C[4], immutable(C)[4] ) == const(C)[] )); // `[4]`
+static assert(is( X!( immutable(C)[4], C[4] ) == const(C)[] )); // `[4]`
+static assert(Error!( shared(C)[4], C[4] ));
+static assert(Error!( C[4], shared(C)[4] ));
+static assert(is( X!( shared(C)[4], immutable(C)[4] ) == shared(const(C))[] )); // `[4]`
+static assert(is( X!( immutable(C)[4], shared(C)[4] ) == shared(const(C))[] )); // `[4]`
+static assert(is( X!( shared(const(C))[4], shared(C)[4] ) == shared(const(C))[4] ));
+static assert(is( X!( shared(C)[4], shared(const(C))[4] ) == shared(const(C))[4] ));
+
+// base class conversion
+static assert(is( X!(C[4], B[4]) ));
+static assert(Error!( C[4], I[4] ));
+static assert(Error!( C[4], D[4] ));
+static assert(is( X!( C[4], const(B)[4] ) == const(B)[4] ));
+static assert(Error!( C[4], const(I)[4] ));
+static assert(Error!( C[4], const(D)[4] ));
+static assert(Error!( C*[4], B*[4] ));
+static assert(Error!( C*[4], I*[4] ));
+static assert(Error!( C*[4], D*[4] ));
+static assert(is( X!( C*[4], const(B*)[4] ) == const(B*)[] )); // !?
+static assert(Error!( C*[4], const(I*)[4] ));
+static assert(Error!( C*[4], const(D*)[4] ));
+static assert(Error!( C*[4], B**[4] ));
+static assert(Error!( C*[4], const(B*)*[4] ));
+static assert(Error!( C*[4], const(B**)[4] ));
+
+// static to dynamic
+static assert(is( X!( int[4], void[4] ) == void[] ));
+static assert(is( X!( void[4], int[4] ) == void[] ));
+static assert(is( X!( int[4], int[3] ) == int[] ));
+static assert(is( X!( int[4], const(int)[3] ) == const(int)[] ));
+static assert(is( X!( int[4], int[] ) == int[] ));
+static assert(is( X!( const(int)[4], int[] ) == const(int)[] ));
+static assert(is( X!( int[4], const(int)[] ) == const(int)[] ));
+static assert(is( X!( int[4], void[] ) == void[] ));
+static assert(is( X!( const(int)[4], void[] ) == const(void)[] ));
+static assert(Error!( int*[4], void*[4] )); // should work
+static assert(Error!( int*[4], void*[] )); // should work
+static assert(is( X!( int*[4], int*[] ) == int*[] ));
+static assert(is( X!( const(int*)[4], int*[] ) == const(int*)[] ));
+static assert(is( X!( int*[4], const(int*)[] ) == const(int*)[] ));
+static assert(Error!( const(int)*[4], int*[] )); // should work
+static assert(Error!( int*[4], const(int)*[] )); // should work
+static assert(Error!( int[4], long[] ));
+static assert(Error!( int[4], uint[] ));
+static assert(Error!( int[4], short[] ));
+static assert(Error!( C[4], B[] ));
+static assert(Error!( C[4], I[] ));
+static assert(Error!( C[4], D[] ));
+static assert(Error!( C*[4], B*[] ));
+static assert(Error!( C*[4], I*[] ));
+static assert(Error!( C*[4], D*[] ));
+
+// dynamic arrays
+static assert(is( X!( int[], int[] ) == int[] ));
+static assert(is( X!( int[], const(int)[] ) == const(int)[] ));
+static assert(is( X!( const(int)[], int[] ) == const(int)[] ));
+static assert(is( X!( int[], immutable(int)[] ) == const(int)[] ));
+static assert(is( X!( immutable(int)[], int[] ) == const(int)[] ));
+static assert(Error!( int[], shared(int)[] ));
+static assert(Error!( shared(int)[], int[] ));
+static assert(is( X!( shared(int)[], immutable(int)[] ) == shared(const(int))[] ));
+static assert(is( X!( immutable(int)[], shared(int)[] ) == shared(const(int))[] ));
+static assert(Error!( const(int)[], shared(int)[] ));
+static assert(Error!( shared(int)[], const(int)[] ));
+
+static assert(is( X!( int[], void[] ) == void[] ));
+static assert(is( X!( void[], int[] ) == void[] ));
+static assert(is( X!( int[], const(void)[] ) == const(void)[] ));
+static assert(is( X!( const(int)[], void[] ) == const(void)[] ));
+
+static assert(is( X!( int*[], const(int*)[] ) == const(int*)[] ));
+static assert(is( X!( const(int*)[], int*[] ) == const(int*)[] ));
+static assert(Error!( int*[], const(int)*[] )); // should work
+static assert(Error!( const(int)*[], int*[] )); // should work
+
+static assert(is( X!( C[], const(C)[] ) == const(C)[] ));
+static assert(is( X!( const(C)[], C[] ) == const(C)[] ));
+
+static assert(Error!( int[], long[] ));
+static assert(Error!( int[], uint[] ));
+static assert(Error!( int[], short[] ));
+
+static assert(Error!( C[], B[] ));
+static assert(Error!( C[], I[] ));
+static assert(Error!( C[], D[] ));
+static assert(Error!( C*[], B*[] ));
+static assert(Error!( C*[], I*[] ));
+static assert(Error!( C*[], D*[] ));
+
+/******************************
+ * Associative arrays
+ */
+
+static assert(is( X!( int[int], int[int] ) == int[int] ));
+static assert(Error!( const(int[int]), int[int] )); // should work
+static assert(Error!( immutable(int[int]), int[int] )); // should work
+static assert(Error!( shared(int[int]), int[int] ));
+
+/******************************
+ * Classes
+ */
+
+static assert(Error!( C, void* ));
+static assert(Error!( void*, C ));
+
+static assert(is( X!( C, C ) == C ));
+static assert(is( X!( C, B ) == B ));
+static assert(is( X!( C, I ) == I ));
+static assert(is( X!( C, D ) == B ));
+static assert(is( X!( C, K ) == Object ));
+
+static assert(is( X!( C, SC ) == C ));
+static assert(is( X!( C, SB ) == B ));
+static assert(is( X!( C, SI ) == I ));
+static assert(is( X!( C, SD ) == B ));
+static assert(is( X!( C, SK ) == Object ));
+
+static assert(is( X!( C, immutable(C) ) == const(C) ));
+static assert(is( X!( C, immutable(I) ) == const(I) ));
+static assert(is( X!( C, immutable(B) ) == const(B) ));
+static assert(is( X!( C, immutable(D) ) == const(B) ));
+static assert(is( X!( C, immutable(K) ) == const(Object) ));
+
+static assert(Error!( C, immutable(SC) )); // should work
+static assert(Error!( C, immutable(SI) )); // should work
+static assert(Error!( immutable(SI), C )); // should work
+static assert(Error!( C, immutable(SB) )); // should work
+static assert(Error!( C, immutable(SD) )); // should work
+static assert(Error!( C, immutable(SK) )); // should work
+
+static assert(is( X!( const(C), C ) == const(C) ));
+static assert(is( X!( const(C), I ) == const(I) ));
+static assert(is( X!( const(C), B ) == const(B) ));
+static assert(is( X!( const(C), D ) == const(B) ));
+static assert(is( X!( const(C), K ) == const(Object) ));
+
+static assert(is( X!( const(C), SC ) == const(C)));
+static assert(Error!( const(C), SI )); // should work
+static assert(is( X!( const(SI), const(C) ) == const(I) )); // should work
+static assert(is( X!( const(C), SB ) == const(B)));
+static assert(is( X!( const(C), SD ) == const(B)));
+static assert(is( X!( const(C), SK ) == Object)); // `const`
+
+static assert(is( X!( SiC, SC ) == const(C) ));
+
+/******************************
+ * Structs
+ */
+
+static assert(is( X!( S, S ) == S ));
+static assert(is( X!( S, immutable(S) ) == const(S) ));
+static assert(Error!( S, shared(S) ));
+static assert(is( X!( Si, Si ) == Si ));
+static assert(is( X!( Si, int ) == int ));
+static assert(is( X!( int, Si ) == int ));
+static assert(is( X!( Si, Si2 ) == int ));
+
+static assert(is( X!( int, Sl ) == long ));
+static assert(is( X!( Si, Sl ) == long ));
+
+
+/******************************
+ * Vectors
+ */
+
+static if (__traits(compiles, int4))
+{
+ static assert(is( X!( int4, int4 ) == int4));
+ static assert(is( X!( int4, const(int4) ) == const(int4)));
+ static assert(is( X!( int4, immutable(int4) ) == const(int4)));
+ static assert(is( X!( __vector(const(int)[4]), int4 ) == int4));
+ static assert(is( X!( int4, __vector(const(int)[4]) ) == int4));
+
+ static assert(Error!( int[4], int4 ));
+ static assert(Error!( int4, int[4] ));
+}
+
+static if (__traits(compiles, { byte16 a; void16 b; })) static assert(Error!( byte16, void16 ));
+static if (__traits(compiles, { int4 a; void16 b; })) static assert(Error!( int4, void16 ));
+static if (__traits(compiles, { float4 a; void16 b; })) static assert(Error!( float4, void16 ));
+static if (__traits(compiles, { byte16 a; ubyte16 b; })) static assert(Error!( byte16, ubyte16 ));
+static if (__traits(compiles, { short8 a; ushort8 b; })) static assert(Error!( short8, ushort8 ));
+static if (__traits(compiles, { int4 a; uint4 b; })) static assert(Error!( int4, uint4 ));
+static if (__traits(compiles, { int4 a; float4 b; })) static assert(Error!( int4, float4 ));
+static if (__traits(compiles, { long4 a; ulong4 b; })) static assert(Error!( long4, ulong4 ));
+static if (__traits(compiles, { double4 a; float8 b; })) static assert(Error!( double4, float8 ));
+
+/******************************
+ * Null
+ */
+
+static assert(is( X!( typeof(null), int* ) == int*));
+static assert(is( X!( typeof(null), int[] ) == int[]));
+static assert(is( X!( typeof(null), int[int] ) == int[int]));
diff --git a/gcc/testsuite/gdc.test/compilable/compilable.exp b/gcc/testsuite/gdc.test/compilable/compilable.exp
index 4f3100a..53912ea 100644
--- a/gcc/testsuite/gdc.test/compilable/compilable.exp
+++ b/gcc/testsuite/gdc.test/compilable/compilable.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 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/gdc.test/compilable/compile1.d b/gcc/testsuite/gdc.test/compilable/compile1.d
index 86d84af..40fba48 100644
--- a/gcc/testsuite/gdc.test/compilable/compile1.d
+++ b/gcc/testsuite/gdc.test/compilable/compile1.d
@@ -1,8 +1,15 @@
+// COMPILABLE_MATH_TEST
// PERMUTE_ARGS:
+// EXTRA_FILES: imports/a12506.d
+/* TEST_OUTPUT:
+---
+compilable/compile1.d(229): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead
+---
+*/
-/**************************************************
- 1748 class template with stringof
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=1748
+// class template with stringof
struct S1748(T) {}
static assert(S1748!int.stringof == "S1748!int");
@@ -10,18 +17,17 @@ static assert(S1748!int.stringof == "S1748!int");
class C1748(T) {}
static assert(C1748!int.stringof == "C1748!int");
-/**************************************************
- 2354 pragma + single semicolon DeclarationBlock
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=2354
+// pragma + single semicolon DeclarationBlock
version(all)
pragma(inline, true);
else
pragma(inline, false);
-/**************************************************
- 2438
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=2438
alias void delegate() Dg2438;
@@ -35,9 +41,8 @@ alias typeof(Dg2438.init.funcptr) FP2438b;
static assert(is(CP2438b == void*));
static assert(is(FP2438b == void function()));
-/**************************************************
- 4225
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=4225
struct Foo4225
{
@@ -49,9 +54,9 @@ struct Foo4225
}
}
-/**************************************************
- 5996 ICE(expression.c)
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5996
+// ICE(expression.c)
template T5996(T)
{
@@ -62,17 +67,19 @@ template T5996(T)
}
static assert(!is(typeof(T5996!(int).bug5996())));
-/**************************************************
- 8532 segfault(mtype.c) - type inference + pure
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8532
+// segfault(mtype.c) - type inference + pure
+
auto segfault8532(Y, R ...)(R r, Y val) pure
{ return segfault8532(r, val); }
static assert(!is(typeof( segfault8532(1,2,3))));
-/**************************************************
- 8982 ICE(ctfeexpr.c) __parameters with error in default value
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8982
+// ICE(ctfeexpr.c) __parameters with error in default value
+
template ice8982(T)
{
void bug8982(ref const int v = 7){}
@@ -85,16 +92,17 @@ template ice8982(T)
static assert(!is(ice8982!(int)));
-/**************************************************
- 8801 ICE assigning to __ctfe
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8801
+// ICE assigning to __ctfe
+
static assert(!is(typeof( { bool __ctfe= true; })));
static assert(!is(typeof( { __ctfe |= true; })));
-/**************************************************
- 5932 ICE(s2ir.c)
- 6675 ICE(glue.c)
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5932
+// https://issues.dlang.org/show_bug.cgi?id=6675
+// ICE(s2ir.c), ICE(glue.c)
void bug3932(T)() {
static assert( 0 );
@@ -113,9 +121,9 @@ static assert(!is(typeof(
}()
)));
-/**************************************************
- 6650 ICE(glue.c) or wrong-code
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6650
+// ICE(glue.c) or wrong-code
auto bug6650(X)(X y)
{
@@ -127,9 +135,9 @@ auto bug6650(X)(X y)
static assert(!is(typeof(bug6650!(int)(6))));
static assert(!is(typeof(bug6650!(int)(18))));
-/**************************************************
- 14710 VC-built DMD crashes on templated variadic function IFTI
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=14710
+// VC-built DMD crashes on templated variadic function IFTI
void bug14710a(T)(T val, T[] arr...)
{
@@ -140,9 +148,9 @@ void bug14710b()
bug14710a("", "");
}
-/**************************************************
- 6661 Templates instantiated only through is(typeof()) shouldn't cause errors
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6661
+// Templates instantiated only through is(typeof()) shouldn't cause errors
template bug6661(Q)
{
@@ -168,9 +176,9 @@ template bug6661x(Q)
// should pass, but doesn't in current
//static assert(!is(typeof(bug6661x!(int))));
-/**************************************************
- 6599 ICE(constfold.c) or segfault
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6599
+// ICE(constfold.c) or segfault
string bug6599extraTest(string x) { return x ~ "abc"; }
@@ -191,9 +199,9 @@ template Bug6599(X)
static assert(!is(typeof(Bug6599!int)));
-/**************************************************
- 8422 TypeTuple of tuples can't be read at compile time
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8422
+// TypeTuple of tuples can't be read at compile time
template TypeTuple8422(TList...)
{
@@ -215,9 +223,9 @@ void test8422()
}
}
-/**************************************************
- 6096 ICE(el.c) with -O
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6096
+// ICE(el.c) with -O
cdouble c6096;
@@ -227,35 +235,35 @@ int bug6096()
return 1;
}
-/**************************************************
- 7681 Segfault
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7681
+// Segfault
static assert( !is(typeof( (){
undefined ~= delegate(){}; return 7;
}())));
-/**************************************************
- 8639 Buffer overflow
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8639
+// Buffer overflow
void t8639(alias a)() {}
void bug8639() {
t8639!({auto r = -real.max;})();
}
-/**************************************************
- 7751 Segfault
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7751
+// Segfault
static assert( !is(typeof( (){
bar[]r; r ~= [];
return 7;
}())));
-/**************************************************
- 7639 Segfault
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7639
+// Segfault
static assert( !is(typeof( (){
enum foo =
@@ -264,9 +272,8 @@ static assert( !is(typeof( (){
];
})));
-/**************************************************
- 11991
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11991
void main()
{
@@ -280,9 +287,8 @@ void main()
}
}
-/**************************************************
- 11939
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11939
void test11939()
{
@@ -293,9 +299,8 @@ void test11939()
throw new Exception("");
}
-/**************************************************
- 5796
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5796
template A(B) {
pragma(lib, "missing ;")
@@ -304,18 +309,17 @@ template A(B) {
static assert(!is(typeof(A!(int))));
-/**************************************************
- 6720
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6720
+
void bug6720() { }
static assert(!is(typeof(
cast(bool)bug6720()
)));
-/**************************************************
- 1099
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=1099
template Mix1099(int a) {
alias typeof(this) ThisType;
@@ -331,9 +335,9 @@ struct Foo1099 {
mixin Mix1099!(2);
}
-/**************************************************
- 8788 - super() and return
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8788
+// super() and return
class B8788 {
this ( ) { }
@@ -435,9 +439,9 @@ static assert(!is(typeof( { new C8788!(7)(0); } )));
static assert(!is(typeof( { new C8788!(8)(0); } )));
static assert(!is(typeof( { new C8788!(9)(0); } )));
-/**************************************************
- 4967, 7058
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=4967
+// https://issues.dlang.org/show_bug.cgi?id=7058
enum Bug7058 bug7058 = { 1.5f, 2};
static assert(bug7058.z == 99);
@@ -498,7 +502,7 @@ alias test8163!(ubyte, ubyte, ushort, float) _BBSf;
/***************************************************/
-// 4757
+// https://issues.dlang.org/show_bug.cgi?id=4757
auto foo4757(T)(T)
{
@@ -518,7 +522,7 @@ void test4757()
}
/***************************************************/
-// 9348
+// https://issues.dlang.org/show_bug.cgi?id=9348
void test9348()
{
@@ -529,7 +533,7 @@ void test9348()
}
/***************************************************/
-// 9690
+// https://issues.dlang.org/show_bug.cgi?id=9690
@disable
{
@@ -545,7 +549,7 @@ void test9348()
}
/***************************************************/
-// 9987
+// https://issues.dlang.org/show_bug.cgi?id=9987
static if (is(object.ModuleInfo == struct))
{
@@ -564,7 +568,7 @@ static if (is(object.ModuleInfo == class))
}
/***************************************************/
-// 10158
+// https://issues.dlang.org/show_bug.cgi?id=10158
class Outer10158
{
@@ -586,7 +590,7 @@ void test10158()
}
/***************************************************/
-// 10326
+// https://issues.dlang.org/show_bug.cgi?id=10326
class C10326
{
@@ -596,7 +600,7 @@ class C10326
}
/***************************************************/
-// 11042
+// https://issues.dlang.org/show_bug.cgi?id=11042
static if ((true || error) == true ) {} else { static assert(0); }
static if ((false && error) == false) {} else { static assert(0); }
@@ -620,7 +624,7 @@ int f11042a3()() if (__traits(compiles, true || error) == false) { return 0; }
int f11042b3()() if (__traits(compiles, false && error) == false) { return 0; } enum x11042b3 = f11042b3();
/***************************************************/
-// 11554
+// https://issues.dlang.org/show_bug.cgi?id=11554
enum E11554;
static assert(is(E11554 == enum));
@@ -629,7 +633,7 @@ struct Bro11554(N...) {}
static assert(!is(E11554 unused : Bro11554!M, M...));
/***************************************************/
-// 12302
+// https://issues.dlang.org/show_bug.cgi?id=12302
template isCallable12302(T...)
if (T.length == 1)
@@ -657,7 +661,7 @@ A12302 func12302() { return null; }
enum b12302 = isCallable12302!func12302;
/***************************************************/
-// 12476
+// https://issues.dlang.org/show_bug.cgi?id=12476
template A12476(T) { }
@@ -686,14 +690,14 @@ static assert(__traits(isSame, sb12476, A12476!int));
static assert(__traits(isSame, cb12476, A12476!int));
/***************************************************/
-// 12506
+// https://issues.dlang.org/show_bug.cgi?id=12506
import imports.a12506;
private bool[9] r12506a = f12506!(i => true)(); // OK
private immutable bool[9] r12506b = f12506!(i => true)(); // OK <- error
/***************************************************/
-// 12555
+// https://issues.dlang.org/show_bug.cgi?id=12555
class A12555(T)
{
@@ -705,7 +709,7 @@ static assert(!__traits(compiles, {
}));
/***************************************************/
-// 11622
+// https://issues.dlang.org/show_bug.cgi?id=11622
class A11622(T)
{
@@ -724,7 +728,7 @@ static assert(!__traits(compiles, {
}));
/***************************************************/
-// 12688
+// https://issues.dlang.org/show_bug.cgi?id=12688
void writeln12688(A...)(A) {}
@@ -741,7 +745,7 @@ void test12688()
}
/***************************************************/
-// 12703
+// https://issues.dlang.org/show_bug.cgi?id=12703
struct S12703
{
@@ -754,7 +758,7 @@ final class C12703
}
/***************************************************/
-// 12799
+// https://issues.dlang.org/show_bug.cgi?id=12799
struct A12799
{
@@ -764,12 +768,12 @@ struct A12799
}
/***************************************************/
-// 13236
+// https://issues.dlang.org/show_bug.cgi?id=13236
enum bug13286 = is(typeof({ struct S { S x; } }));
/***************************************************/
-// 13280
+// https://issues.dlang.org/show_bug.cgi?id=13280
struct S13280
{
@@ -780,7 +784,7 @@ struct S13280
}
/***************************************************/
-// 13481
+// https://issues.dlang.org/show_bug.cgi?id=13481
mixin template Mix13481(void function() callback)
{
@@ -791,7 +795,7 @@ mixin template Mix13481(void function() callback)
}
/***************************************************/
-// 13564
+// https://issues.dlang.org/show_bug.cgi?id=13564
class E13564(T)
{
@@ -818,7 +822,7 @@ void test13564()
}
/***************************************************/
-// 14166
+// https://issues.dlang.org/show_bug.cgi?id=14166
struct Proxy14166(T)
{
@@ -868,7 +872,7 @@ static assert(is(typeof(makeAA14166()[0] = 1) == X14166)); // ok <- error
static assert(is(typeof(tup14166.field = makeTup14166()) == TT14166!(int, int))); // ok <- error
/***************************************************/
-// 14388
+// https://issues.dlang.org/show_bug.cgi?id=14388
@property immutable(T)[] idup14388(T)(T[] a)
{
@@ -913,7 +917,7 @@ void test14388()
}
/***************************************************/
-// 15163
+// https://issues.dlang.org/show_bug.cgi?id=15163
void function() func15164(int[] arr)
{
@@ -926,9 +930,9 @@ void test15163()
func15164(arr[0])();
}
-/**************************************************
- 3438
-**************************************************/
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=3438
+
import core.vararg;
struct S3438_1 { this(int x, int y = 1) { } }
struct S3438_2 { this(int x, ...) { } }
@@ -937,7 +941,7 @@ struct S3438_4 { this(...) { } }
struct S3438_5 { this(int[] arr...) { } }
/***************************************************/
-// 15362
+// https://issues.dlang.org/show_bug.cgi?id=15362
void func15362()
{
@@ -952,7 +956,7 @@ void func15362()
}
/***************************************************/
-// 15799
+// https://issues.dlang.org/show_bug.cgi?id=15799
interface I15799
{
@@ -963,3 +967,28 @@ interface I15799
assert(n);
}; // Semicolon is not a part of function declaration. It's an empty declaration.
}
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=21163
+
+struct B21163
+{
+ void function(scope int) fp;
+}
+
+B21163 b21163 = {
+ (scope int x){}
+};
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11624
+
+interface I11624
+{
+ void foo();
+}
+
+static assert(!__traits(compiles,
+{
+ static class C11624 : I11624 { }
+}));
diff --git a/gcc/testsuite/gdc.test/compilable/covariant_override.d b/gcc/testsuite/gdc.test/compilable/covariant_override.d
new file mode 100644
index 0000000..1afe0a2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/covariant_override.d
@@ -0,0 +1,34 @@
+// https://issues.dlang.org/show_bug.cgi?id=21538
+// REQUIRED_ARGS: -preview=dip1000
+
+interface I
+{
+ void f(void delegate() @safe dg) @safe;
+}
+
+class CI : I
+{
+ override void f(void delegate() @system dg) @safe { }
+}
+
+abstract class A
+{
+ void f(void delegate() @safe dg) @safe;
+}
+
+class CA : A
+{
+ override void f(void delegate() @system dg) @safe { }
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20904
+auto blah(void delegate())
+{
+}
+
+void delegate()[string] r;
+void main()
+{
+ void delegate() nothrow a;
+ r["v"] = a;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/cpp_abi_tag_unused.d b/gcc/testsuite/gdc.test/compilable/cpp_abi_tag_unused.d
new file mode 100644
index 0000000..bac39cb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/cpp_abi_tag_unused.d
@@ -0,0 +1,21 @@
+/* DISABLED: win32 win64
+REQUIRED_ARGS: -extern-std=c++11
+*/
+
+#line 100
+
+// Make sure that bad things don't happen if the user isn't using
+// `core.attribute`'s definition
+struct gnuAbiTag
+{
+ string[] args;
+}
+
+extern(C++):
+
+@gnuAbiTag(["42"])
+struct A {}
+
+__gshared A a;
+
+static assert(a.mangleof == "a");
diff --git a/gcc/testsuite/gdc.test/compilable/cppmangle.d b/gcc/testsuite/gdc.test/compilable/cppmangle.d
index 954a9be..8c112d1 100644
--- a/gcc/testsuite/gdc.test/compilable/cppmangle.d
+++ b/gcc/testsuite/gdc.test/compilable/cppmangle.d
@@ -1,10 +1,18 @@
-
+// EXTRA_FILES: cppmangle2.d
// Test C++ name mangling.
-// See Bugs 4059, 5148, 7024, 10058
-
+// https://issues.dlang.org/show_bug.cgi?id=4059
+// https://issues.dlang.org/show_bug.cgi?id=5148
+// https://issues.dlang.org/show_bug.cgi?id=7024
+// https://issues.dlang.org/show_bug.cgi?id=10058
import core.stdc.stdio;
+version (CppRuntime_Clang) version = CppMangle_Itanium;
+version (CppRuntime_DigitalMars) version = CppMangle_MSVC;
+version (CppRuntime_Gcc) version = CppMangle_Itanium;
+version (CppRuntime_Microsoft) version = CppMangle_MSVC;
+version (CppRuntime_Sun) version = CppMangle_Itanium;
+
extern (C++) int foob(int i, int j, int k);
class C
@@ -43,23 +51,26 @@ void test1()
c.bar(4, 5, 6);
}
-version (linux)
+version (CppMangle_Itanium)
{
static assert(foo.mangleof == "_Z3fooiii");
static assert(foob.mangleof == "_Z4foobiii");
static assert(C.bar.mangleof == "_ZN1C3barEiii");
}
-version (Win32)
-{
- static assert(foo.mangleof == "?foo@@YAHHHH@Z");
- static assert(foob.mangleof == "?foob@@YAHHHH@Z");
- static assert(C.bar.mangleof == "?bar@C@@UAEHHHH@Z");
-}
-version (Win64)
+version (CppMangle_MSVC)
{
- static assert(foo.mangleof == "?foo@@YAHHHH@Z");
- static assert(foob.mangleof == "?foob@@YAHHHH@Z");
- static assert(C.bar.mangleof == "?bar@C@@UEAAHHHH@Z");
+ version (Win32)
+ {
+ static assert(foo.mangleof == "?foo@@YAHHHH@Z");
+ static assert(foob.mangleof == "?foob@@YAHHHH@Z");
+ static assert(C.bar.mangleof == "?bar@C@@UAEHHHH@Z");
+ }
+ version (Win64)
+ {
+ static assert(foo.mangleof == "?foo@@YAHHHH@Z");
+ static assert(foob.mangleof == "?foob@@YAHHHH@Z");
+ static assert(C.bar.mangleof == "?bar@C@@UEAAHHHH@Z");
+ }
}
/****************************************/
@@ -79,7 +90,7 @@ void test2()
assert(i == 8);
}
-version (linux)
+version (CppMangle_Itanium)
{
static assert (getD.mangleof == "_Z4getDv");
static assert (D.bar.mangleof == "_ZN1D3barEiii");
@@ -116,7 +127,7 @@ void test3()
assert(i == 8);
}
-version (linux)
+version (CppMangle_Itanium)
{
static assert (callE.mangleof == "_Z5callEP1E");
static assert (E.bar.mangleof == "_ZN1E3barEiii");
@@ -132,7 +143,7 @@ void test4()
foo4(null);
}
-version (linux)
+version (CppMangle_Itanium)
{
static assert(foo4.mangleof == "_Z4foo4Pc");
}
@@ -158,7 +169,7 @@ void test5()
assert(f.p == cast(void*)b);
}
-version (linux)
+version (CppMangle_Itanium)
{
static assert(bar5.getFoo.mangleof == "_ZN4bar56getFooEi");
static assert (newBar.mangleof == "_Z6newBarv");
@@ -181,14 +192,14 @@ extern (C) int foosize6();
void test6()
{
S6 f = foo6();
- printf("%d %d\n", foosize6(), S6.sizeof);
+ printf("%d %d\n", foosize6(), cast(int)S6.sizeof);
assert(foosize6() == S6.sizeof);
assert(f.i == 42);
printf("f.d = %g\n", f.d);
assert(f.d == 2.5);
}
-version (linux)
+version (CppMangle_Itanium)
{
static assert (foo6.mangleof == "_Z4foo6v");
}
@@ -205,7 +216,7 @@ struct S
void test7()
{
- printf("%d %d\n", foo7(), S.sizeof);
+ printf("%d %d\n", foo7(), cast(int)S.sizeof);
assert(foo7() == S.sizeof);
}
@@ -219,13 +230,13 @@ void test8()
foo8(&c);
}
-version (linux)
+version (CppMangle_Itanium)
{
static assert(foo8.mangleof == "_Z4foo8PKc");
}
/****************************************/
-// 4059
+// https://issues.dlang.org/show_bug.cgi?id=4059
struct elem9 { }
@@ -237,13 +248,13 @@ void test9()
foobar9(a, a);
}
-version (linux)
+version (CppMangle_Itanium)
{
static assert(foobar9.mangleof == "_Z7foobar9P5elem9S0_");
}
/****************************************/
-// 5148
+// https://issues.dlang.org/show_bug.cgi?id=5148
extern (C++)
{
@@ -270,8 +281,15 @@ void test10()
foo10(e,e);
}
+// https://issues.dlang.org/show_bug.cgi?id=19504
+extern(C++) struct Class19504 {
+ pragma(mangle, "HOHOHO")
+ ~this();
+}
+static assert(Class19504.__xdtor.mangleof == "HOHOHO");
+
/**************************************/
-// 10058
+// https://issues.dlang.org/show_bug.cgi?id=10058
extern (C++)
{
@@ -289,7 +307,7 @@ extern (C++)
void test10058l(void* function(void*), void* function(const (void)*), const(void)* function(void*)) { }
}
-version (linux)
+version (CppMangle_Itanium)
{
static assert(test10058a.mangleof == "_Z10test10058aPv");
static assert(test10058b.mangleof == "_Z10test10058bPFvPvE");
@@ -306,7 +324,7 @@ version (linux)
}
/**************************************/
-// 11696
+// https://issues.dlang.org/show_bug.cgi?id=11696
class Expression;
struct Loc {}
@@ -320,7 +338,7 @@ class CallExp
static void test11696d(Loc, Expression*, Expression*);
}
-version (linux)
+version (CppMangle_Itanium)
{
static assert(CallExp.test11696a.mangleof == "_ZN7CallExp10test11696aE3LocP10ExpressionS2_");
static assert(CallExp.test11696b.mangleof == "_ZN7CallExp10test11696bE3LocP10ExpressionPS2_");
@@ -329,7 +347,7 @@ version (linux)
}
/**************************************/
-// 13337
+// https://issues.dlang.org/show_bug.cgi?id=13337
extern(C++, N13337a.N13337b.N13337c)
{
@@ -337,13 +355,22 @@ extern(C++, N13337a.N13337b.N13337c)
void foo13337(S13337 s);
}
-version (linux)
+extern(C++, `N13337a`, `N13337b`, `N13337c`)
+{
+ struct S13337_2{}
+ void foo13337_2(S13337 s);
+ void foo13337_3(S13337_2 s);
+}
+
+version (CppMangle_Itanium)
{
static assert(foo13337.mangleof == "_ZN7N13337a7N13337b7N13337c8foo13337ENS1_6S13337E");
+ static assert(foo13337_2.mangleof == "_ZN7N13337a7N13337b7N13337c10foo13337_2ENS1_6S13337E");
+ static assert(foo13337_3.mangleof == "_ZN7N13337a7N13337b7N13337c10foo13337_3ENS1_8S13337_2E");
}
/**************************************/
-// 15789
+// https://issues.dlang.org/show_bug.cgi?id=15789
extern (C++) void test15789a(T...)(T args);
@@ -353,11 +380,11 @@ void test15789()
}
/**************************************/
-// 7030
+// https://issues.dlang.org/show_bug.cgi?id=7030
extern(C++)
{
- struct T
+ struct Struct7030
{
void foo(int) const;
void bar(int);
@@ -365,11 +392,918 @@ extern(C++)
}
}
+version (CppMangle_Itanium)
+{
+ static assert(Struct7030.foo.mangleof == "_ZNK10Struct70303fooEi");
+ static assert(Struct7030.bar.mangleof == "_ZN10Struct70303barEi");
+ static assert(Struct7030.boo.mangleof == "_ZN10Struct70303booE");
+}
+
+/****************************************/
+
+// Special cases of Itanium mangling
+
+extern (C++, std)
+{
+ struct pair(T1, T2)
+ {
+ void swap(ref pair other);
+ }
+
+ struct allocator(T)
+ {
+ uint fooa() const;
+ uint foob();
+ }
+
+ struct basic_string(T1, T2, T3)
+ {
+ uint fooa();
+ }
+
+ struct basic_istream(T1, T2)
+ {
+ uint fooc();
+ }
+
+ struct basic_ostream(T1, T2)
+ {
+ uint food();
+ }
+
+ struct basic_iostream(T1, T2)
+ {
+ uint fooe();
+ }
+
+ struct char_traits(T)
+ {
+ uint foof();
+ }
+
+ struct vector (T);
+
+ struct test18957 {}
+}
+
+extern (C++, `std`)
+{
+ struct pair(T1, T2)
+ {
+ void swap(ref pair other);
+ }
+
+ struct allocator(T)
+ {
+ uint fooa() const;
+ uint foob();
+ }
+
+ struct basic_string(T1, T2, T3)
+ {
+ uint fooa();
+ }
+
+ struct basic_istream(T1, T2)
+ {
+ uint fooc();
+ }
+
+ struct basic_ostream(T1, T2)
+ {
+ uint food();
+ }
+
+ struct basic_iostream(T1, T2)
+ {
+ uint fooe();
+ }
+
+ struct char_traits(T)
+ {
+ uint foof();
+ }
+
+ struct vector (T);
+
+ struct Struct18957 {}
+}
+
+extern(C++)
+{
+ // Nspace
+ std.allocator!int func_18957_1(std.allocator!(int)* v);
+ // CPPNamespaceAttribute
+ allocator!int func_18957_2(allocator!(int)* v);
+ X func_18957_2(X)(X* v);
+}
+
+extern (C++)
+{
+ void func_20413(pair!(int, float), pair!(float, int));
+}
+
+version (CppMangle_Itanium)
+{
+ // https://issues.dlang.org/show_bug.cgi?id=17947
+ static assert(std.pair!(void*, void*).swap.mangleof == "_ZNSt4pairIPvS0_E4swapERS1_");
+ static assert(std.allocator!int.fooa.mangleof == "_ZNKSaIiE4fooaEv");
+ static assert(std.allocator!int.foob.mangleof == "_ZNSaIiE4foobEv");
+ static assert(std.basic_string!(char,int,uint).fooa.mangleof == "_ZNSbIcijE4fooaEv");
+ static assert(std.basic_string!(char, std.char_traits!char, std.allocator!char).fooa.mangleof == "_ZNSs4fooaEv");
+ static assert(std.basic_istream!(char, std.char_traits!char).fooc.mangleof == "_ZNSi4foocEv");
+ static assert(std.basic_ostream!(char, std.char_traits!char).food.mangleof == "_ZNSo4foodEv");
+ static assert(std.basic_iostream!(char, std.char_traits!char).fooe.mangleof == "_ZNSd4fooeEv");
+
+ static assert(func_18957_1.mangleof == `_Z12func_18957_1PSaIiE`);
+ static assert(func_18957_2!(std.allocator!int).mangleof == `_Z12func_18957_2ISaIiEET_PS1_`);
+
+
+ static assert(pair!(void*, void*).swap.mangleof == "_ZNSt4pairIPvS0_E4swapERS1_");
+ static assert(allocator!int.fooa.mangleof == "_ZNKSaIiE4fooaEv");
+ static assert(allocator!int.foob.mangleof == "_ZNSaIiE4foobEv");
+ static assert(basic_string!(char,int,uint).fooa.mangleof == "_ZNSbIcijE4fooaEv");
+ static assert(basic_string!(char, char_traits!char, allocator!char).fooa.mangleof == "_ZNSs4fooaEv");
+ static assert(basic_istream!(char, char_traits!char).fooc.mangleof == "_ZNSi4foocEv");
+ static assert(basic_ostream!(char, char_traits!char).food.mangleof == "_ZNSo4foodEv");
+ static assert(basic_iostream!(char, char_traits!char).fooe.mangleof == "_ZNSd4fooeEv");
+
+ static assert(func_18957_2.mangleof == `_Z12func_18957_2PSaIiE`);
+ static assert(func_18957_2!(allocator!int).mangleof == `_Z12func_18957_2ISaIiEET_PS1_`);
+
+ static assert(func_20413.mangleof == `_Z10func_20413St4pairIifES_IfiE`);
+}
+
+/**************************************/
+
+alias T36 = int ********** ********** ********** **********;
+
+extern (C++) void test36(T36, T36*) { }
+
+version (CppMangle_Itanium)
+{
+ static assert(test36.mangleof == "_Z6test36PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPiPS12_");
+}
+
+/*****************************************/
+// https://issues.dlang.org/show_bug.cgi?id=17772
+
+extern(C++, SPACE)
+int test37(T)(){ return 0;}
+
+extern(C++, `SPACE`)
+int test37(T)(){ return 0;}
+
+version (CppMangle_Itanium) // all non-Windows machines
+{
+ static assert(SPACE.test37!int.mangleof == "_ZN5SPACE6test37IiEEiv");
+ static assert(test37!int.mangleof == "_ZN5SPACE6test37IiEEiv");
+}
+
+/**************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15388
+
+extern (C++) void test15388(typeof(null));
+
+version (CppMangle_Itanium)
+{
+ static assert(test15388.mangleof == "_Z9test15388Dn");
+}
+version (CppMangle_MSVC)
+{
+ static assert(test15388.mangleof == "?test15388@@YAX$$T@Z");
+}
+
+/**************************************/
+// https://issues.dlang.org/show_bug.cgi?id=14086
+
+extern (C++) class Test14086
+{
+ this();
+ ~this();
+}
+extern (C++) class Test14086_2
+{
+ final ~this();
+}
+extern (C++) struct Test14086_S
+{
+ this(int);
+ ~this();
+}
+
+version (CppMangle_Itanium)
+{
+ static assert(Test14086.__ctor.mangleof == "_ZN9Test14086C1Ev");
+ static assert(Test14086.__dtor.mangleof == "_ZN9Test14086D1Ev");
+ static assert(Test14086_2.__dtor.mangleof == "_ZN11Test14086_2D1Ev");
+ static assert(Test14086_S.__ctor.mangleof == "_ZN11Test14086_SC1Ei");
+ static assert(Test14086_S.__dtor.mangleof == "_ZN11Test14086_SD1Ev");
+}
+version (CppMangle_MSVC)
+{
+ version (Win32)
+ {
+ static assert(Test14086.__ctor.mangleof == "??0Test14086@@QAE@XZ");
+ static assert(Test14086.__dtor.mangleof == "??1Test14086@@UAE@XZ");
+ static assert(Test14086_2.__dtor.mangleof == "??1Test14086_2@@QAE@XZ");
+ static assert(Test14086_S.__ctor.mangleof == "??0Test14086_S@@QAE@H@Z");
+ static assert(Test14086_S.__dtor.mangleof == "??1Test14086_S@@QAE@XZ");
+ }
+ version (Win64)
+ {
+ static assert(Test14086.__ctor.mangleof == "??0Test14086@@QEAA@XZ");
+ static assert(Test14086.__dtor.mangleof == "??1Test14086@@UEAA@XZ");
+ static assert(Test14086_2.__dtor.mangleof == "??1Test14086_2@@QEAA@XZ");
+ static assert(Test14086_S.__ctor.mangleof == "??0Test14086_S@@QEAA@H@Z");
+ static assert(Test14086_S.__dtor.mangleof == "??1Test14086_S@@QEAA@XZ");
+ }
+}
+
+/**************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18888
+
+extern (C++)
+struct T18888(T)
+{
+ void fun();
+}
+
+extern (C++)
+struct S18888(alias arg = T18888)
+{
+ alias I = T18888!(arg!int);
+}
+
+version (CppMangle_Itanium)
+{
+ static assert(S18888!().I.fun.mangleof == "_ZN6T18888IS_IiEE3funEv");
+}
+version (CppMangle_MSVC)
+{
+ version (Win32)
+ {
+ static assert(S18888!().I.fun.mangleof == "?fun@?$T18888@U?$T18888@H@@@@QAEXXZ");
+ }
+ version (Win64)
+ {
+ static assert(S18888!().I.fun.mangleof == "?fun@?$T18888@U?$T18888@H@@@@QEAAXXZ");
+ }
+}
+
+/**************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18890
+
+extern (C++) class C18890
+{
+ ~this() {}
+}
+extern (C++) class C18890_2
+{
+ ~this() {}
+ extern (C++) struct Agg
+ {
+ ~this() {}
+ }
+ Agg s;
+}
+
+version (CppMangle_Itanium)
+{
+ static assert(C18890.__dtor.mangleof == "_ZN6C18890D1Ev");
+ static assert(C18890.__xdtor.mangleof == "_ZN6C18890D1Ev");
+ static assert(C18890_2.__dtor.mangleof == "_ZN8C18890_26__dtorEv");
+ static assert(C18890_2.__xdtor.mangleof == "_ZN8C18890_2D1Ev");
+}
+version (CppMangle_MSVC)
+{
+ version (Win32)
+ {
+ static assert(C18890.__dtor.mangleof == "??1C18890@@UAE@XZ");
+ static assert(C18890.__xdtor.mangleof == "??_GC18890@@UAEPAXI@Z");
+ static assert(C18890_2.__dtor.mangleof == "?__dtor@C18890_2@@UAEXXZ");
+ static assert(C18890_2.__xdtor.mangleof == "??_GC18890_2@@UAEPAXI@Z");
+ }
+ version (Win64)
+ {
+ static assert(C18890.__dtor.mangleof == "??1C18890@@UEAA@XZ");
+ static assert(C18890.__xdtor.mangleof == "??_GC18890@@UEAAPEAXI@Z");
+ static assert(C18890_2.__dtor.mangleof == "?__dtor@C18890_2@@UEAAXXZ");
+ static assert(C18890_2.__xdtor.mangleof == "??_GC18890_2@@UEAAPEAXI@Z");
+ }
+}
+
+/**************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18891
+
+extern (C++) class C18891
+{
+ ~this();
+ extern (C++) struct Agg
+ {
+ ~this() {}
+ }
+ Agg s;
+}
+
+version (CppMangle_Itanium)
+{
+ static assert(C18891.__dtor.mangleof == "_ZN6C18891D1Ev");
+ static assert(C18891.__xdtor.mangleof == "_ZN6C18891D1Ev");
+}
+version (CppMangle_MSVC)
+{
+ version (Win32)
+ {
+ static assert(C18891.__dtor.mangleof == "??1C18891@@UAE@XZ");
+ static assert(C18891.__xdtor.mangleof == "??_GC18891@@UAEPAXI@Z");
+ }
+ version (Win64)
+ {
+ static assert(C18891.__dtor.mangleof == "??1C18891@@UEAA@XZ");
+ static assert(C18891.__xdtor.mangleof == "??_GC18891@@UEAAPEAXI@Z");
+ }
+}
+
+/**************************************/
+// Test C++ operator mangling
+
+extern (C++) struct TestOperators
+{
+ int opCast(T)();
+ int opBinary(string op)(int x);
+ int opUnary(string op)();
+ int opOpAssign(string op)(int x);
+ int opIndex(int x);
+ bool opEquals(int x);
+ int opCall(int, float);
+ int opAssign(int);
+}
+
+version (CppMangle_Itanium)
+{
+ static assert(TestOperators.opUnary!"*".mangleof == "_ZN13TestOperatorsdeEv");
+ static assert(TestOperators.opUnary!"++".mangleof == "_ZN13TestOperatorsppEv");
+ static assert(TestOperators.opUnary!"--".mangleof == "_ZN13TestOperatorsmmEv");
+ static assert(TestOperators.opUnary!"-".mangleof == "_ZN13TestOperatorsngEv");
+ static assert(TestOperators.opUnary!"+".mangleof == "_ZN13TestOperatorspsEv");
+ static assert(TestOperators.opUnary!"~".mangleof == "_ZN13TestOperatorscoEv");
+ static assert(TestOperators.opBinary!">>".mangleof == "_ZN13TestOperatorsrsEi");
+ static assert(TestOperators.opBinary!"<<".mangleof == "_ZN13TestOperatorslsEi");
+ static assert(TestOperators.opBinary!"*".mangleof == "_ZN13TestOperatorsmlEi");
+ static assert(TestOperators.opBinary!"-".mangleof == "_ZN13TestOperatorsmiEi");
+ static assert(TestOperators.opBinary!"+".mangleof == "_ZN13TestOperatorsplEi");
+ static assert(TestOperators.opBinary!"&".mangleof == "_ZN13TestOperatorsanEi");
+ static assert(TestOperators.opBinary!"/".mangleof == "_ZN13TestOperatorsdvEi");
+ static assert(TestOperators.opBinary!"%".mangleof == "_ZN13TestOperatorsrmEi");
+ static assert(TestOperators.opBinary!"^".mangleof == "_ZN13TestOperatorseoEi");
+ static assert(TestOperators.opBinary!"|".mangleof == "_ZN13TestOperatorsorEi");
+ static assert(TestOperators.opOpAssign!"*".mangleof == "_ZN13TestOperatorsmLEi");
+ static assert(TestOperators.opOpAssign!"+".mangleof == "_ZN13TestOperatorspLEi");
+ static assert(TestOperators.opOpAssign!"-".mangleof == "_ZN13TestOperatorsmIEi");
+ static assert(TestOperators.opOpAssign!"/".mangleof == "_ZN13TestOperatorsdVEi");
+ static assert(TestOperators.opOpAssign!"%".mangleof == "_ZN13TestOperatorsrMEi");
+ static assert(TestOperators.opOpAssign!">>".mangleof == "_ZN13TestOperatorsrSEi");
+ static assert(TestOperators.opOpAssign!"<<".mangleof == "_ZN13TestOperatorslSEi");
+ static assert(TestOperators.opOpAssign!"&".mangleof == "_ZN13TestOperatorsaNEi");
+ static assert(TestOperators.opOpAssign!"|".mangleof == "_ZN13TestOperatorsoREi");
+ static assert(TestOperators.opOpAssign!"^".mangleof == "_ZN13TestOperatorseOEi");
+ static assert(TestOperators.opCast!int.mangleof == "_ZN13TestOperatorscviEv");
+ static assert(TestOperators.opAssign.mangleof == "_ZN13TestOperatorsaSEi");
+ static assert(TestOperators.opEquals.mangleof == "_ZN13TestOperatorseqEi");
+ static assert(TestOperators.opIndex.mangleof == "_ZN13TestOperatorsixEi");
+ static assert(TestOperators.opCall.mangleof == "_ZN13TestOperatorsclEif");
+}
+version (CppMangle_MSVC)
+{
+ version (Win32)
+ {
+ static assert(TestOperators.opUnary!"*".mangleof == "??DTestOperators@@QAEHXZ");
+ static assert(TestOperators.opUnary!"++".mangleof == "??ETestOperators@@QAEHXZ");
+ static assert(TestOperators.opUnary!"--".mangleof == "??FTestOperators@@QAEHXZ");
+ static assert(TestOperators.opUnary!"-".mangleof == "??GTestOperators@@QAEHXZ");
+ static assert(TestOperators.opUnary!"+".mangleof == "??HTestOperators@@QAEHXZ");
+ static assert(TestOperators.opUnary!"~".mangleof == "??STestOperators@@QAEHXZ");
+ static assert(TestOperators.opBinary!">>".mangleof == "??5TestOperators@@QAEHH@Z");
+ static assert(TestOperators.opBinary!"<<".mangleof == "??6TestOperators@@QAEHH@Z");
+ static assert(TestOperators.opBinary!"*".mangleof == "??DTestOperators@@QAEHH@Z");
+ static assert(TestOperators.opBinary!"-".mangleof == "??GTestOperators@@QAEHH@Z");
+ static assert(TestOperators.opBinary!"+".mangleof == "??HTestOperators@@QAEHH@Z");
+ static assert(TestOperators.opBinary!"&".mangleof == "??ITestOperators@@QAEHH@Z");
+ static assert(TestOperators.opBinary!"/".mangleof == "??KTestOperators@@QAEHH@Z");
+ static assert(TestOperators.opBinary!"%".mangleof == "??LTestOperators@@QAEHH@Z");
+ static assert(TestOperators.opBinary!"^".mangleof == "??TTestOperators@@QAEHH@Z");
+ static assert(TestOperators.opBinary!"|".mangleof == "??UTestOperators@@QAEHH@Z");
+ static assert(TestOperators.opOpAssign!"*".mangleof == "??XTestOperators@@QAEHH@Z");
+ static assert(TestOperators.opOpAssign!"+".mangleof == "??YTestOperators@@QAEHH@Z");
+ static assert(TestOperators.opOpAssign!"-".mangleof == "??ZTestOperators@@QAEHH@Z");
+ static assert(TestOperators.opOpAssign!"/".mangleof == "??_0TestOperators@@QAEHH@Z");
+ static assert(TestOperators.opOpAssign!"%".mangleof == "??_1TestOperators@@QAEHH@Z");
+ static assert(TestOperators.opOpAssign!">>".mangleof == "??_2TestOperators@@QAEHH@Z");
+ static assert(TestOperators.opOpAssign!"<<".mangleof == "??_3TestOperators@@QAEHH@Z");
+ static assert(TestOperators.opOpAssign!"&".mangleof == "??_4TestOperators@@QAEHH@Z");
+ static assert(TestOperators.opOpAssign!"|".mangleof == "??_5TestOperators@@QAEHH@Z");
+ static assert(TestOperators.opOpAssign!"^".mangleof == "??_6TestOperators@@QAEHH@Z");
+ static assert(TestOperators.opCast!int.mangleof == "??BTestOperators@@QAEHXZ");
+ static assert(TestOperators.opAssign.mangleof == "??4TestOperators@@QAEHH@Z");
+ static assert(TestOperators.opEquals.mangleof == "??8TestOperators@@QAE_NH@Z");
+ static assert(TestOperators.opIndex.mangleof == "??ATestOperators@@QAEHH@Z");
+ static assert(TestOperators.opCall.mangleof == "??RTestOperators@@QAEHHM@Z");
+ }
+ version (Win64)
+ {
+ static assert(TestOperators.opUnary!"*".mangleof == "??DTestOperators@@QEAAHXZ");
+ static assert(TestOperators.opUnary!"++".mangleof == "??ETestOperators@@QEAAHXZ");
+ static assert(TestOperators.opUnary!"--".mangleof == "??FTestOperators@@QEAAHXZ");
+ static assert(TestOperators.opUnary!"-".mangleof == "??GTestOperators@@QEAAHXZ");
+ static assert(TestOperators.opUnary!"+".mangleof == "??HTestOperators@@QEAAHXZ");
+ static assert(TestOperators.opUnary!"~".mangleof == "??STestOperators@@QEAAHXZ");
+ static assert(TestOperators.opBinary!">>".mangleof == "??5TestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opBinary!"<<".mangleof == "??6TestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opBinary!"*".mangleof == "??DTestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opBinary!"-".mangleof == "??GTestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opBinary!"+".mangleof == "??HTestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opBinary!"&".mangleof == "??ITestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opBinary!"/".mangleof == "??KTestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opBinary!"%".mangleof == "??LTestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opBinary!"^".mangleof == "??TTestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opBinary!"|".mangleof == "??UTestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opOpAssign!"*".mangleof == "??XTestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opOpAssign!"+".mangleof == "??YTestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opOpAssign!"-".mangleof == "??ZTestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opOpAssign!"/".mangleof == "??_0TestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opOpAssign!"%".mangleof == "??_1TestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opOpAssign!">>".mangleof == "??_2TestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opOpAssign!"<<".mangleof == "??_3TestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opOpAssign!"&".mangleof == "??_4TestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opOpAssign!"|".mangleof == "??_5TestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opOpAssign!"^".mangleof == "??_6TestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opCast!int.mangleof == "??BTestOperators@@QEAAHXZ");
+ static assert(TestOperators.opAssign.mangleof == "??4TestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opEquals.mangleof == "??8TestOperators@@QEAA_NH@Z");
+ static assert(TestOperators.opIndex.mangleof == "??ATestOperators@@QEAAHH@Z");
+ static assert(TestOperators.opCall.mangleof == "??RTestOperators@@QEAAHHM@Z");
+ }
+}
+
+import cppmangle2;
+extern(C++, Namespace18922)
+{
+ // Nspace
+ void func18922(cppmangle2.Namespace18922.Struct18922) {}
+ // CPPNamespaceAttribute
+ void func18922_1(Struct18922) {}
+}
+
+extern(C++, `Namespace18922`)
+{
+ // Nspace
+ void func18922_2(cppmangle2.Namespace18922.Struct18922) {}
+ // CPPNamespaceAttribute
+ void func18922_3(Struct18922) {}
+}
+
+version (CppMangle_Itanium)
+{
+ static assert(func18922.mangleof == "_ZN14Namespace189229func18922ENS_11Struct18922E");
+ static assert(func18922_1.mangleof == "_ZN14Namespace1892211func18922_1ENS_11Struct18922E");
+ static assert(func18922_2.mangleof == "_ZN14Namespace1892211func18922_2ENS_11Struct18922E");
+ static assert(func18922_3.mangleof == "_ZN14Namespace1892211func18922_3ENS_11Struct18922E");
+}
+else version (CppMangle_MSVC)
+{
+ static assert(func18922.mangleof == "?func18922@Namespace18922@@YAXUStruct18922@1@@Z");
+ static assert(func18922_1.mangleof == "?func18922_1@Namespace18922@@YAXUStruct18922@1@@Z");
+ static assert(func18922_2.mangleof == "?func18922_2@Namespace18922@@YAXUStruct18922@1@@Z");
+ static assert(func18922_3.mangleof == "?func18922_3@Namespace18922@@YAXUStruct18922@1@@Z");
+}
+
+/**************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18957
+// extern(C++) doesn't mangle 'std' correctly on posix systems
+
+version (CppMangle_Itanium)
+{
+ // https://godbolt.org/z/C5T2LQ
+ /+
+ namespace std
+ {
+ struct test18957 {};
+ }
+ void test18957(const std::test18957& t) {}
+ +/
+ extern (C++) void test18957(ref const(Struct18957) t) {}
+
+ static assert(test18957.mangleof == "_Z9test18957RKSt11Struct18957");
+}
+
+/**************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19043
+// Incorrect mangling for extern(C++) const template parameter on windows
+
+extern(C++) struct test19043(T) {}
+
+extern(C++) void test19043a(test19043!(const(char)) a) {}
+extern(C++) void test19043b(T)(T a) {}
+version (CppMangle_MSVC)
+{
+ static assert(test19043a.mangleof == "?test19043a@@YAXU?$test19043@$$CBD@@@Z");
+ static assert(test19043b!(test19043!(const(char))).mangleof ==
+ "??$test19043b@U?$test19043@$$CBD@@@@YAXU?$test19043@$$CBD@@@Z");
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=16479
+// Missing substitution while mangling C++ template parameter for functions
+version (CppMangle_Itanium) extern (C++)
+{
+ // Make sure aliases are still resolved
+ alias Alias16479 = int;
+ Alias16479 func16479_0 (FuncT1) (FuncT1, Alias16479);
+ static assert(func16479_0!(int).mangleof == `_Z11func16479_0IiEiT_i`);
+
+ // Simple substitution on return type
+ FuncT1* func16479_1 (FuncT1) ();
+ static assert(func16479_1!(int).mangleof == `_Z11func16479_1IiEPT_v`);
+
+ // Simple substitution on parameter
+ void func16479_2 (FuncT1) (FuncT1);
+ static assert(func16479_2!(int).mangleof == `_Z11func16479_2IiEvT_`);
+
+ // Make sure component substition is prefered over template parameter
+ FuncT1* func16479_3 (FuncT1) (FuncT1);
+ static assert(func16479_3!(int).mangleof == `_Z11func16479_3IiEPT_S0_`);
+
+ struct Array16479 (Arg) { Arg* data; }
+ struct Array16479_2 (Arg, int Size) { Arg[Size] data; }
+ struct Value16479 (int Value1, int Value2) { int data; }
+
+ // Make sure template parameter substitution happens on templated return
+ Array16479!(FuncT2) func16479_4 (FuncT1, FuncT2) (FuncT1);
+ static assert(func16479_4!(int, float).mangleof
+ == `_Z11func16479_4IifE10Array16479IT0_ET_`);
+
+ // Make sure template parameter substitution happens with values
+ Value16479!(Value2, Value1)* func16479_5 (int Value1, int Value2) ();
+ static assert(func16479_5!(1, 1).mangleof
+ == `_Z11func16479_5ILi1ELi1EEP10Value16479IXT0_EXT_EEv`);
+
+ // But make sure it's not substituting *too many* values
+ Value16479!(1, 1)* func16479_6 (int Value1, int Value2) ();
+ static assert(func16479_6!(1, 1).mangleof
+ == `_Z11func16479_6ILi1ELi1EEP10Value16479ILi1ELi1EEv`);
+
+ // Or too many types
+ Array16479!(int) func16479_7 (FuncT1, FuncT2) (FuncT1);
+ static assert(func16479_7!(int, int).mangleof
+ == `_Z11func16479_7IiiE10Array16479IiET_`);
+
+ // Also must check the parameters for template param substitution
+ void func16479_8 (FuncT1) (Array16479!(FuncT1));
+ static assert(func16479_8!(int).mangleof
+ == `_Z11func16479_8IiEv10Array16479IT_E`);
+
+ // And non-substitution
+ void func16479_9 (FuncT1) (Array16479!(int));
+ static assert(func16479_9!(int).mangleof
+ == `_Z11func16479_9IiEv10Array16479IiE`);
+
+ // Now let's have a bit of fun with alias parameters,
+ // starting with C functions
+ // TODO: Why is this mangled by g++:
+ /*
+ extern "C"
+ {
+ void externC16479 (int);
+ }
+
+ template<void (*Print)(int)>
+ void func16479_10 ();
+
+ void foo () { func16479_10<externC16479>(); }
+ */
+ extern (C) void externC16479 (int);
+ void func16479_10 (alias Print) ();
+ static assert(func16479_10!(externC16479).mangleof
+ == `_Z12func16479_10IXadL_Z12externC16479EEEvv`);
+
+ /**
+ * Let's not exclude C++ functions
+ * Note:
+ * Passing a function as template parameter has an implicit
+ * `&` operator prepended to it, so the following code:
+ * ---
+ * void CPPPrinter16479(const char*);
+ * template<void (*Print)(const char*)> void func16479_11 ();
+ * void foo () { func16479_11<CPPPrinter16479>(); }
+ * ---
+ * Gets mangled as `func16479_11<&CPPPrinter16479>()` would,
+ * which means the expression part of the template argument is
+ * mangled as `XadL_Z[...]E` not `XL_Z[...]E`
+ * (expressions always begin with a code anyway).
+ */
+ extern(C++) void CPPPrinter16479(const(char)*);
+ extern(C++, Namespace16479) void CPPPrinterNS16479(const(char)*);
+ extern(C++, `Namespace16479`) void CPPPrinterNS16479_1(const(char)*);
+ void func16479_11 (alias Print) ();
+ static assert(func16479_11!(CPPPrinter16479).mangleof
+ == `_Z12func16479_11IXadL_Z15CPPPrinter16479PKcEEEvv`);
+ static assert(func16479_11!(CPPPrinterNS16479).mangleof
+ == `_Z12func16479_11IXadL_ZN14Namespace1647917CPPPrinterNS16479EPKcEEEvv`);
+ static assert(func16479_11!(CPPPrinterNS16479_1).mangleof
+ == `_Z12func16479_11IXadL_ZN14Namespace1647919CPPPrinterNS16479_1EPKcEEEvv`);
+
+ // Functions are fine, but templates are finer
+ // ---
+ // template<template<typename, int> class Container, typename T, int Val>
+ // Container<T, Val> func16479_12 ();
+ // ---
+ Container!(T, Val) func16479_12 (alias Container, T, int Val) ();
+ static assert(func16479_12!(Array16479_2, int, 42).mangleof
+ == `_Z12func16479_12I12Array16479_2iLi42EET_IT0_XT1_EEv`);
+
+ // Substitution needs to happen on the most specialized type
+ // Iow, `ref T identity (T) (ref T v);` should be mangled as
+ // `_Z8identityIiET_*S1_*`, not as `_Z8identityIiET_*RS0_*`
+ ref FuncT1 func16479_13_1 (FuncT1) (ref FuncT1);
+ FuncT1* func16479_13_2 (FuncT1) (FuncT1*);
+ void func16479_13_3 (FuncT1) (FuncT1*, FuncT1*);
+ FuncT1** func16479_13_4 (FuncT1) (FuncT1*, FuncT1);
+ FuncT1 func16479_13_5 (FuncT1) (FuncT1*, FuncT1**);
+ static assert(func16479_13_1!(int).mangleof == `_Z14func16479_13_1IiERT_S1_`);
+ static assert(func16479_13_2!(float).mangleof == `_Z14func16479_13_2IfEPT_S1_`);
+ static assert(func16479_13_3!(int).mangleof == `_Z14func16479_13_3IiEvPT_S1_`);
+ static assert(func16479_13_4!(int).mangleof == `_Z14func16479_13_4IiEPPT_S1_S0_`);
+ static assert(func16479_13_5!(int).mangleof == `_Z14func16479_13_5IiET_PS0_PS1_`);
+
+ // Opaque types result in a slightly different AST
+ vector!T* func16479_14 (T) (T v);
+ static assert(func16479_14!(int).mangleof == `_Z12func16479_14IiEPSt6vectorIT_ES1_`);
+
+ struct Foo16479_15 (T);
+ struct Baguette16479_15 (T);
+ struct Bar16479_15 (T);
+ struct FooBar16479_15 (A, B);
+ void inst16479_15_2 (A, B) ();
+ void inst16479_15_3 (A, B, C) ();
+
+ static assert(inst16479_15_2!(Bar16479_15!int, int).mangleof
+ == `_Z14inst16479_15_2I11Bar16479_15IiEiEvv`);
+ static assert(inst16479_15_2!(int, Bar16479_15!int).mangleof
+ == `_Z14inst16479_15_2Ii11Bar16479_15IiEEvv`);
+ static assert(inst16479_15_2!(Bar16479_15!int, FooBar16479_15!(Bar16479_15!int, Foo16479_15!(Bar16479_15!(Foo16479_15!int)))).mangleof
+ == `_Z14inst16479_15_2I11Bar16479_15IiE14FooBar16479_15IS1_11Foo16479_15IS0_IS3_IiEEEEEvv`);
+ static assert(inst16479_15_3!(int, Bar16479_15!int, FooBar16479_15!(Bar16479_15!int, Foo16479_15!(Bar16479_15!(Foo16479_15!int)))).mangleof
+ == `_Z14inst16479_15_3Ii11Bar16479_15IiE14FooBar16479_15IS1_11Foo16479_15IS0_IS3_IiEEEEEvv`);
+
+ static import cppmangle2;
+ cppmangle2.Struct18922* func16479_16_1 (T) (T*);
+ static assert(func16479_16_1!int.mangleof == `_Z14func16479_16_1IiEPN14Namespace1892211Struct18922EPT_`);
+ T* func16479_16_2 (T) (T*);
+ static assert(func16479_16_2!int.mangleof == `_Z14func16479_16_2IiEPT_S1_`);
+ static assert(func16479_16_2!(cppmangle2.vector!int).mangleof == `_Z14func16479_16_2ISt6vectorIiEEPT_S3_`);
+ static assert(func16479_16_2!(cppmangle2.vector!int).mangleof
+ == func16479_16_2!(cppmangle2.vector!int).mangleof);
+ cppmangle2.vector!T* func16479_16_3 (T) (T*);
+ static assert(func16479_16_3!int.mangleof == `_Z14func16479_16_3IiEPSt6vectorIiEPT_`);
+
+ extern(C++, `fakestd`) {
+ extern (C++, `__1`) {
+ struct allocator16479 (T);
+ struct vector16479(T, alloc = allocator16479!T);
+ }
+ }
+ vector16479!(T, allocator16479!T)* func16479_17_1(T)();
+ vector16479!(T)* func16479_17_2(T)();
+ static assert(func16479_17_1!int.mangleof == `_Z14func16479_17_1IiEPN7fakestd3__111vector16479IT_NS1_14allocator16479IS3_EEEEv`);
+ static assert(func16479_17_2!int.mangleof == `_Z14func16479_17_2IiEPN7fakestd3__111vector16479IT_NS1_14allocator16479IS3_EEEEv`);
+
+ // Make sure substitution takes place everywhere in template arg list
+ extern(C++, "ns") void func16479_18_1(T, X)(int, X, T, float);
+ extern(C++, "ns") void func16479_18_2(T, X)(X, int, T, float);
+ static assert(func16479_18_1!(double, char).mangleof == `_ZN2ns14func16479_18_1IdcEEviT0_T_f`);
+ static assert(func16479_18_2!(double, char).mangleof == `_ZN2ns14func16479_18_2IdcEEvT0_iT_f`);
+}
+
+/**************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19278
+// extern(C++, "name") doesn't accept expressions
+
+extern(C++, "hello" ~ "world")
+{
+ void test19278();
+}
+enum NS = "lookup";
+extern(C++, (NS))
+{
+ void test19278_2();
+}
+alias AliasSeq(Args...) = Args;
+alias Tup = AliasSeq!("hello", "world");
+extern(C++, (Tup))
+{
+ void test19278_3();
+ __gshared size_t test19278_var;
+}
+extern(C++, (AliasSeq!(Tup, "yay")))
+{
+ void test19278_4();
+}
+version (CppMangle_MSVC)
+{
+ version (Win64)
+ {
+ static assert(test19278.mangleof == "?test19278@helloworld@@YAXXZ");
+ static assert(test19278_2.mangleof == "?test19278_2@lookup@@YAXXZ");
+ static assert(test19278_3.mangleof == "?test19278_3@world@hello@@YAXXZ");
+ static assert(test19278_4.mangleof == "?test19278_4@yay@world@hello@@YAXXZ");
+ static assert(test19278_var.mangleof == "?test19278_var@world@hello@@3_KA");
+ }
+}
+else version (CppMangle_Itanium)
+{
+ static assert(test19278.mangleof == "_ZN10helloworld9test19278Ev");
+ static assert(test19278_2.mangleof == "_ZN6lookup11test19278_2Ev");
+ static assert(test19278_3.mangleof == "_ZN5hello5world11test19278_3Ev");
+ static assert(test19278_4.mangleof == "_ZN5hello5world3yay11test19278_4Ev");
+ static assert(test19278_var.mangleof == "_ZN5hello5world13test19278_varE");
+}
+
+/**************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18958
+// Issue 18958 - extern(C++) wchar, dchar mangling not correct
+
version (Posix)
+ enum __c_wchar_t : dchar;
+else version (Windows)
+ enum __c_wchar_t : wchar;
+alias wchar_t = __c_wchar_t;
+extern (C++) void test_char_mangling(char, wchar, dchar, wchar_t);
+version (CppMangle_Itanium)
{
- static assert(T.foo.mangleof == "_ZNK1T3fooEi");
- static assert(T.bar.mangleof == "_ZN1T3barEi");
- static assert(T.boo.mangleof == "_ZN1T3booE");
+ static assert(test_char_mangling.mangleof == "_Z18test_char_manglingcDsDiw");
+}
+version (CppMangle_MSVC)
+{
+ version (Win64)
+ {
+ static assert(test_char_mangling.mangleof == "?test_char_mangling@@YAXD_S_U_W@Z");
+ }
+}
+
+// https://github.com/dlang/dmd/pull/10021/files#r294055424
+version (CppMangle_Itanium)
+{
+ extern(C++, PR10021_NS) struct PR10021_Struct(T){}
+ extern(C++) void PR10021_fun(int i)(PR10021_Struct!int);
+ static assert(PR10021_fun!0.mangleof == `_Z11PR10021_funILi0EEvN10PR10021_NS14PR10021_StructIiEE`);
+}
+
+// https://github.com/dlang/dmd/pull/10021#discussion_r294095749
+version (CppMangle_Itanium)
+{
+ extern(C++, "a", "b")
+ struct PR10021_Struct2
+ {
+ void func();
+ void func2(PR10021_Struct2*);
+ }
+ static assert(PR10021_Struct2.func.mangleof == `_ZN1a1b15PR10021_Struct24funcEv`);
+ static assert(PR10021_Struct2.func2.mangleof == `_ZN1a1b15PR10021_Struct25func2EPS1_`);
+}
+
+/// https://issues.dlang.org/show_bug.cgi?id=20022
+version (CppMangle_Itanium)
+{
+ extern(C++, `ns20022`) enum Enum20022_1 { A = 1, }
+ extern(C++) void fun20022_1(Enum20022_1);
+ extern(C++, `ns20022`) void fun20022_2(Enum20022_1);
+
+ extern(C++, ns20022)
+ {
+ enum Enum20022_2 { A = 1, }
+ void fun20022_5(Enum20022_1);
+ void fun20022_6(Enum20022_2);
+ }
+ extern(C++) void fun20022_3(Enum20022_2);
+ extern(C++, `ns20022`) void fun20022_4(Enum20022_2);
+
+ static assert(fun20022_1.mangleof == `_Z10fun20022_1N7ns2002211Enum20022_1E`);
+ static assert(fun20022_2.mangleof == `_ZN7ns2002210fun20022_2ENS_11Enum20022_1E`);
+
+ static assert(fun20022_3.mangleof == `_Z10fun20022_3N7ns2002211Enum20022_2E`);
+ static assert(fun20022_4.mangleof == `_ZN7ns2002210fun20022_4ENS_11Enum20022_2E`);
+ static assert(fun20022_5.mangleof == `_ZN7ns2002210fun20022_5ENS_11Enum20022_1E`);
+ static assert(fun20022_6.mangleof == `_ZN7ns2002210fun20022_6ENS_11Enum20022_2E`);
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20094
+version (CppMangle_Itanium)
+{
+ extern(C++, "ns20094")
+ {
+ struct xvector20094 (T) {}
+ alias V20094 = xvector20094!(ubyte);
+ }
+
+ extern(C++) void test20094(xvector20094!(V20094)* v);
+ static assert(test20094.mangleof == `_Z9test20094PN7ns2009412xvector20094INS0_IhEEEE`);
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20223
+version (CppMangle_Itanium)
+{
+ extern(C++)
+ {
+ int test20223_1(T)(int function(const(T)* value));
+ int test20223_2(T)(int function(ref const(T) value));
+
+ struct Struct20223_1 {}
+ struct Struct20223_2 {}
+ int test20223_3(ref const Struct20223_1, Struct20223_2*, Struct20223_2*);
+ int test20223_4(ref const Struct20223_1, const ref Struct20223_2, Struct20223_2*);
+
+ struct Struct20223_3 (T) {}
+ void test20223_5(ref Struct20223_1, ref Struct20223_3!(const(char)*),
+ ref Struct20223_3!(const(char)*));
+ }
+ static assert(test20223_1!int.mangleof == `_Z11test20223_1IiEiPFiPKT_E`);
+ static assert(test20223_2!int.mangleof == `_Z11test20223_2IiEiPFiRKT_E`);
+ static assert(test20223_1!(int*).mangleof == `_Z11test20223_1IPiEiPFiPKT_E`);
+ static assert(test20223_2!(int*).mangleof == `_Z11test20223_2IPiEiPFiRKT_E`);
+ static assert(test20223_3.mangleof == `_Z11test20223_3RK13Struct20223_1P13Struct20223_2S3_`);
+ static assert(test20223_4.mangleof == `_Z11test20223_4RK13Struct20223_1RK13Struct20223_2PS2_`);
+ static assert(test20223_5.mangleof == `_Z11test20223_5R13Struct20223_1R13Struct20223_3IPKcES5_`);
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20224
+version (CppMangle_Itanium)
+{
+ extern(C++) public int test20224_1(T)(set20224!T set); // ok
+ extern(C++) public int test20224_2(T)(ref set20224!T set); // segfault
+
+ extern(C++) struct set20224 (T)
+ {
+ void test ()
+ {
+ test20224_1!T(this);
+ test20224_2!T(this); // segfaults
+ }
+ }
+
+ extern(D) void func20224 ()
+ {
+ set20224!int x;
+ }
+}
+
+/**************************************/
+
+version (CppMangle_Itanium)
+{
+ extern (C++) struct Loc2 {};
+ extern (C++) class FuncDeclaration
+ {
+ static FuncDeclaration create(ref const Loc2, ref const Loc2);
+ };
+ extern (C++) FuncDeclaration FuncDeclaration_create(ref const Loc2, ref const Loc2);
+
+ static assert(FuncDeclaration_create.mangleof == `_Z22FuncDeclaration_createRK4Loc2S1_`);
+ static assert(FuncDeclaration.create.mangleof == `_ZN15FuncDeclaration6createERK4Loc2S2_`);
+}
+
+enum Enum19542 = func19542!(int).mangleof;
+
+extern(C++, `bar`)
+{
+ void func19542(T)();
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20700
+// Only testing on WIn64 because the mangling includes 'E',
+// and the bug can be tested on either platform
+version (CppMangle_MSVC) version (Win64) extern(C++)
+{
+ void test20700_1(Struct20700);
+ extern(C++, class) struct Struct20700 {}
+ void test20700_2(Struct20700);
+
+ // Note: Needs to be `V` (`class`), not `U` (`struct`)
+ static assert(test20700_1.mangleof == `?test20700_1@@YAXVStruct20700@@@Z`);
+ static assert(test20700_2.mangleof == `?test20700_2@@YAXVStruct20700@@@Z`);
+
+ // Test that the scope is not "sticky" on the arguments
+ void test20700_3(TStruct20700_1!DefaultClass20700_1);
+ extern(C++, class) struct TStruct20700_1 (T1, T2 = DefaultStruct20700_1) {}
+ extern(C++, class) struct DefaultStruct20700_1 {}
+ extern(C++, struct) class DefaultClass20700_1 {}
+ static assert(test20700_3.mangleof == `?test20700_3@@YAXV?$TStruct20700_1@PEAUDefaultClass20700_1@@VDefaultStruct20700_1@@@@@Z`);
+
+ // Each test needs to be independent symbol to trigger a new semantic pass
+ void test20700_4(TStruct20700_2!(DefaultClass20700_2, DefaultStruct20700_2));
+ extern(C++, struct) class TStruct20700_2 (T1, T2 = DefaultClass20700_2) {}
+ extern(C++, class) struct DefaultStruct20700_2 {}
+ extern(C++, struct) class DefaultClass20700_2 {}
+ static assert(test20700_4.mangleof == `?test20700_4@@YAXPEAU?$TStruct20700_2@PEAUDefaultClass20700_2@@VDefaultStruct20700_2@@@@@Z`);
}
/*****************************************/
@@ -381,12 +1315,15 @@ extern (C++)
alias fpcpp = noreturn function();
int funccpp(fpcpp);
- version (Posix)
+ version (CppMangle_Itanium)
static assert(funccpp.mangleof == "_Z7funccppPFvvE");
- version (Win32)
- static assert(funccpp.mangleof == "?funccpp@@YAHP6AXXZ@Z");
+ version (CppMangle_MSVC)
+ {
+ version (Win32)
+ static assert(funccpp.mangleof == "?funccpp@@YAHP6AXXZ@Z");
- version (Win64)
- static assert(funccpp.mangleof == "?funccpp@@YAHP6AXXZ@Z");
+ version (Win64)
+ static assert(funccpp.mangleof == "?funccpp@@YAHP6AXXZ@Z");
+ }
}
diff --git a/gcc/testsuite/gdc.test/compilable/cppmangle2.d b/gcc/testsuite/gdc.test/compilable/cppmangle2.d
new file mode 100644
index 0000000..d507d36
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/cppmangle2.d
@@ -0,0 +1,21 @@
+module cppmangle2;
+
+extern(C++, Namespace18922)
+{
+ struct Struct18922 { int i; }
+}
+
+extern(C++, std)
+{
+ struct vector (T);
+}
+
+extern(C++, `Namespace18922`)
+{
+ struct Struct18922 { int i; }
+}
+
+extern(C++, `std`)
+{
+ struct vector (T);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/cppmangle3.d b/gcc/testsuite/gdc.test/compilable/cppmangle3.d
index 4c48012..93e49c7 100644
--- a/gcc/testsuite/gdc.test/compilable/cppmangle3.d
+++ b/gcc/testsuite/gdc.test/compilable/cppmangle3.d
@@ -1,5 +1,13 @@
+// https://issues.dlang.org/show_bug.cgi?id=15512
+// https://issues.dlang.org/show_bug.cgi?id=19893
+// https://issues.dlang.org/show_bug.cgi?id=19920
module cppmangle3;
+version (CppRuntime_Clang) version = CppMangle_Itanium;
+version (CppRuntime_DigitalMars) version = CppMangle_MSVC;
+version (CppRuntime_Gcc) version = CppMangle_Itanium;
+version (CppRuntime_Microsoft) version = CppMangle_MSVC;
+version (CppRuntime_Sun) version = CppMangle_Itanium;
extern(C++, "true")
{
@@ -20,8 +28,8 @@ extern(C++, "std", "chrono")
void func();
}
-version(Windows) static assert(func.mangleof == "?func@chrono@std@@YAXXZ");
-else static assert(func.mangleof == "_ZNSt6chrono4funcEv");
+version(CppMangle_MSVC) static assert(func.mangleof == "?func@chrono@std@@YAXXZ");
+else static assert(func.mangleof == "_ZNSt6chrono4funcEv");
struct Foo
{
@@ -34,4 +42,22 @@ struct Foo
alias Alias(alias a) = a;
alias Alias(T) = T;
-static assert(is(Alias!(__traits(parent, bar)) == Foo));
+static assert(is(Alias!(__traits(parent, Foo.bar)) == Foo));
+
+extern(C++, "std"):
+debug = 456;
+debug = def;
+version = 456;
+version = def;
+
+extern(C++, "std")
+{
+ debug = 456;
+ debug = def;
+ version = 456;
+ version = def;
+}
+
+extern(C++, "foo")
+extern(C++, "bar")
+version = baz;
diff --git a/gcc/testsuite/gdc.test/compilable/cppmangle_abitag.d b/gcc/testsuite/gdc.test/compilable/cppmangle_abitag.d
new file mode 100644
index 0000000..f681174
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/cppmangle_abitag.d
@@ -0,0 +1,106 @@
+// DISABLED: win32 win64
+// REQUIRED_ARGS: -extern-std=c++11
+/*
+ * Test C++ abi-tag name mangling.
+ * https://issues.dlang.org/show_bug.cgi?id=19949
+ */
+
+import core.attribute;
+
+extern(C++):
+
+alias Tuple(A...) = A;
+enum foo_bar = gnuAbiTag("foo", "bar");
+
+@foo_bar
+struct S
+{
+ int i;
+ this(int);
+}
+
+@foo_bar
+extern __gshared int a;
+static assert(a.mangleof == "_Z1aB3barB3foo");
+
+extern __gshared S b;
+static assert(b.mangleof == "_Z1bB3barB3foo");
+
+@foo_bar
+int f();
+static assert(f.mangleof == "_Z1fB3barB3foov");
+
+S gs(int);
+S gss(S, int);
+static assert(gs.mangleof == "_Z2gsB3barB3fooi");
+static assert(gss.mangleof == "_Z3gss1SB3barB3fooi");
+
+@foo_bar
+S fss(S, int);
+static assert(gs.mangleof == "_Z2gsB3barB3fooi");
+
+T gt(T)(int);
+T gtt(T)(T, int);
+static assert(gt!S.mangleof == "_Z2gtI1SB3barB3fooET_i");
+static assert(gtt!S.mangleof == "_Z3gttI1SB3barB3fooET_S1_i");
+
+@foo_bar
+T ft(T)(int);
+// matches Clang and GCC <= 6
+static assert(ft!S.mangleof == "_Z2ftB3barB3fooI1SB3barB3fooET_i");
+
+@foo_bar
+T ftt(T)(T, int);
+// matches Clang and GCC <= 6
+static assert(ftt!S.mangleof == "_Z3fttB3barB3fooI1SB3barB3fooET_S1_i");
+
+// GCC >= 6 only
+@gnuAbiTag("ENN")
+enum E0 { a = 0xa, }
+E0 fe();
+E0 fei(int i)();
+static assert(fe.mangleof == "_Z2feB3ENNv");
+static assert(fei!0.mangleof == "_Z3feiILi0EE2E0B3ENNv");
+
+// Linux std::string
+// https://issues.dlang.org/show_bug.cgi?id=14956#c13
+extern(C++, "std")
+{
+ struct allocator(T);
+ struct char_traits(CharT);
+
+ extern(C++, "__cxx11")
+ {
+ @gnuAbiTag("cxx11")
+ struct basic_string(CharT, Traits=char_traits!CharT, Allocator=allocator!CharT)
+ {
+ const char* data();
+ size_t length() const;
+ }
+ }
+ alias string_ = basic_string!char;
+}
+string_* toString(const char*);
+static assert(toString.mangleof == "_Z8toStringB5cxx11PKc");
+
+@gnuAbiTag("A", "B")
+{
+ void fun0();
+ static assert(fun0.mangleof == "_Z4fun0B1AB1Bv");
+}
+
+@gnuAbiTag("C", "D"):
+
+void fun1();
+static assert(fun1.mangleof == "_Z4fun1B1CB1Dv");
+
+void fun2();
+static assert(fun2.mangleof == "_Z4fun2B1CB1Dv");
+
+auto fun3()
+{
+ @gnuAbiTag("Nested")
+ extern(C++) struct T {}
+ return T();
+}
+static assert(fun3.mangleof == "_Z4fun3B1CB1DB6Nestedv");
diff --git a/gcc/testsuite/gdc.test/compilable/ctfe_math.d b/gcc/testsuite/gdc.test/compilable/ctfe_math.d
index 334b75a..65c9985 100644
--- a/gcc/testsuite/gdc.test/compilable/ctfe_math.d
+++ b/gcc/testsuite/gdc.test/compilable/ctfe_math.d
@@ -5,10 +5,10 @@ import std.math;
void main()
{
- static assert(approxEqual(sin(2.0L), 0.9092974L));
- static assert(approxEqual(cos(2.0), -0.4161468));
- static assert(approxEqual(tan(2.0f), -2.185040f));
- static assert(approxEqual(sqrt(2.0L), 1.414214L));
+ static assert(isClose(sin(2.0L), 0.9092974268));
+ static assert(isClose(cos(2.0), -0.4161468365));
+ static assert(isClose(tan(2.0f), -2.185040f, 1e-5));
+ static assert(isClose(sqrt(2.0L), 1.4142135623));
static assert(fabs(-2.0) == 2.0);
static assert(ldexp(2.5f, 3) == 20.0f);
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc1.d b/gcc/testsuite/gdc.test/compilable/ddoc1.d
index fa5042a..23e721d 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc1.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc1.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 1
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
// REQUIRED_ARGS: -d
/** This module is for ABC
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc10.d b/gcc/testsuite/gdc.test/compilable/ddoc10.d
index 90ab5a1..6a7a481 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc10.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc10.d
@@ -1,8 +1,8 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 10
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
-// 294
+// https://issues.dlang.org/show_bug.cgi?id=294
/// The foo
struct Foo(T) { }
@@ -142,7 +142,7 @@ struct S
/****
*/
- const pure nothrow this(this) { }
+ pure nothrow this(this) { }
/****
*/
@@ -177,7 +177,7 @@ struct T
}
-// 14547
+// https://issues.dlang.org/show_bug.cgi?id=14547
/// doc-comment
int x14547 = 1;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc10236.d b/gcc/testsuite/gdc.test/compilable/ddoc10236.d
index 1c54761..c272894 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc10236.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc10236.d
@@ -4,10 +4,12 @@
/*
TEST_OUTPUT:
---
-compilable/ddoc10236.d(33): Warning: Ddoc: parameter count mismatch
-compilable/ddoc10236.d(45): Warning: Ddoc: function declaration has no parameter 'y'
-compilable/ddoc10236.d(57): Warning: Ddoc: function declaration has no parameter 'y'
-compilable/ddoc10236.d(57): Warning: Ddoc: parameter count mismatch
+compilable/ddoc10236.d(35): Warning: Ddoc: parameter count mismatch, expected 2, got 1
+compilable/ddoc10236.d(47): Warning: Ddoc: function declaration has no parameter 'y'
+compilable/ddoc10236.d(59): Warning: Ddoc: function declaration has no parameter 'y'
+compilable/ddoc10236.d(59): Warning: Ddoc: parameter count mismatch, expected 1, got 2
+compilable/ddoc10236.d(71): Warning: Ddoc: parameter count mismatch, expected 2, got 0
+compilable/ddoc10236.d(71): Note that the format is `param = description`
---
*/
@@ -57,3 +59,15 @@ void foo_no_param_y(int x, int z) // Warning: Ddoc: function declaration has no
void foo_count_mismatch_no_param_y(int x)
{
}
+
+/***********************************
+ * foo_count_mismatch_wrong_format does this.
+ * Params:
+ * x : is for this
+ * and not for that
+ * y : is for that
+ */
+
+void foo_count_mismatch_wrong_format(int x, int y)
+{
+}
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc10236b.d b/gcc/testsuite/gdc.test/compilable/ddoc10236b.d
index 065ced0..85783e8 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc10236b.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc10236b.d
@@ -4,10 +4,11 @@
/*
TEST_OUTPUT:
---
-compilable/ddoc10236b.d(43): Warning: Ddoc: parameter count mismatch
-compilable/ddoc10236b.d(55): Warning: Ddoc: function declaration has no parameter 'y'
-compilable/ddoc10236b.d(67): Warning: Ddoc: function declaration has no parameter 'y'
-compilable/ddoc10236b.d(67): Warning: Ddoc: parameter count mismatch
+compilable/ddoc10236b.d(44): Warning: Ddoc: parameter count mismatch, expected 1, got 0
+compilable/ddoc10236b.d(44): Note that the format is `param = description`
+compilable/ddoc10236b.d(56): Warning: Ddoc: function declaration has no parameter 'y'
+compilable/ddoc10236b.d(68): Warning: Ddoc: function declaration has no parameter 'y'
+compilable/ddoc10236b.d(68): Warning: Ddoc: parameter count mismatch, expected 0, got 1
---
*/
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc10325.d b/gcc/testsuite/gdc.test/compilable/ddoc10325.d
index 4f0068a..a976f5a 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc10325.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc10325.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 10325
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc10325;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc10334.d b/gcc/testsuite/gdc.test/compilable/ddoc10334.d
index 3ff148d..dd7a0f4 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc10334.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc10334.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 10334
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc10334;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc10366.d b/gcc/testsuite/gdc.test/compilable/ddoc10366.d
index 5bc5f64..a5fc9b2 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc10366.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc10366.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 10366
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
///
struct S(T)
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc10367.d b/gcc/testsuite/gdc.test/compilable/ddoc10367.d
index 836c7d0..7e2dedb 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc10367.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc10367.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 10367
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
// REQUIRED_ARGS: -m32
// EXTRA_SOURCES: extra-files/ddoc10367.ddoc
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc10869.d b/gcc/testsuite/gdc.test/compilable/ddoc10869.d
index 11b4854..8745fbd 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc10869.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc10869.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 10869
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc10869;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc10870.d b/gcc/testsuite/gdc.test/compilable/ddoc10870.d
index 95a82ed..ad16837 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc10870.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc10870.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 10870
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
///
interface I
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc11.d b/gcc/testsuite/gdc.test/compilable/ddoc11.d
index cf6070e..3fcf2ca 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc11.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc11.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 11
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/// The various floating point exceptions
enum
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc11479.d b/gcc/testsuite/gdc.test/compilable/ddoc11479.d
index d2ddb19..5b00dc8 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc11479.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc11479.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 11479
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc11479;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc11511.d b/gcc/testsuite/gdc.test/compilable/ddoc11511.d
index ba5829e..117eba4 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc11511.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc11511.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -w -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 11511
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc11511;
/**
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc11823.d b/gcc/testsuite/gdc.test/compilable/ddoc11823.d
index dfde4b6..c9af38f 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc11823.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc11823.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 11823
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc11823;
/// file function name is _file, arg defaults to __FILE__ but not __something__
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc12.d b/gcc/testsuite/gdc.test/compilable/ddoc12.d
index 4fdf9cf..337f37a 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc12.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc12.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 12
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
int ruhred; /// This documents correctly.
int rühred; /// This should too
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc12706.d b/gcc/testsuite/gdc.test/compilable/ddoc12706.d
index 399583c..a19ba21 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc12706.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc12706.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 12706
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
///
void test()(string[] args) if (args[$])
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc12745.d b/gcc/testsuite/gdc.test/compilable/ddoc12745.d
index 2bfaee6..a2cf74b 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc12745.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc12745.d
@@ -1,7 +1,7 @@
// EXTRA_SOURCES:
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 12745
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
i underlined $(BR)
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc13.d b/gcc/testsuite/gdc.test/compilable/ddoc13.d
index eafc8b2..9985bb0 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc13.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc13.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 13
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/// struct doc
struct Bug4107(T)
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc13270.d b/gcc/testsuite/gdc.test/compilable/ddoc13270.d
index 6b04922..3d2f47e 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc13270.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc13270.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS: -w
// REQUIRED_ARGS: -o- -D -Dd${RESULTS_DIR}/compilable
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 13270
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc13270;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc13645.d b/gcc/testsuite/gdc.test/compilable/ddoc13645.d
index f12b376..35bb7f0 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc13645.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc13645.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 13645
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
Documentation comment on module
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc14.d b/gcc/testsuite/gdc.test/compilable/ddoc14.d
index fe1fcc1..a8b6d4d 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc14.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc14.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 14
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
alias void V;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc14383.d b/gcc/testsuite/gdc.test/compilable/ddoc14383.d
index 273b058..0f8d51c 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc14383.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc14383.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 14383
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
* Module docs.
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc14413.d b/gcc/testsuite/gdc.test/compilable/ddoc14413.d
index dace15f..3586476 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc14413.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc14413.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 14413
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc14413;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc14778.d b/gcc/testsuite/gdc.test/compilable/ddoc14778.d
index 6bb2353..a3c1728 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc14778.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc14778.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 14778
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc14778;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc15475.d b/gcc/testsuite/gdc.test/compilable/ddoc15475.d
index f192352..64c07ff 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc15475.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc15475.d
@@ -1,6 +1,7 @@
-// PERMUTE_ARGS:
-// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 15475
+/* PERMUTE_ARGS:
+REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
+*/
/**
My module
@@ -8,5 +9,25 @@ My module
// Computes the interval [x,y)
auto interval = computeInterval(x, y);
----
+
+Backslash-escape parentheses with `\(` and `\)`.
+
+---
+(
+---
+
+---
+)
+---
+
+---
+ Here are some nested `backticks`
+ // Another interval [x,y)
+---
+
+---
+ This won't end the code block: --- )
+ // Yet another interval [x,y)
+---
*/
module ddoc15475;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc17697.d b/gcc/testsuite/gdc.test/compilable/ddoc17697.d
index 3d97c2c..8edff32 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc17697.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc17697.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 17697
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/***
* See:
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc18361.d b/gcc/testsuite/gdc.test/compilable/ddoc18361.d
new file mode 100644
index 0000000..584b995
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc18361.d
@@ -0,0 +1,27 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
+// REQUIRED_ARGS: -d
+
+// Test notes: 'main' is the symbol being documented (DDOC_AUTO_PSYMBOL),
+// 'arguments' is a parameter (DDOC_AUTO_PARAM), and 'false' is a keyword
+// (DDOC_AUTO_KEYWORD).
+/**
+ * The main thing this program does is nothing, and I do _not want to hear any
+ * false arguments about that!
+ *
+ * Macros:
+ * DDOC_AUTO_PSYMBOL = $0
+ * DDOC_AUTO_KEYWORD = $0
+ * DDOC_AUTO_PARAM = $0
+ * DDOC_AUTO_PSYMBOL_SUPPRESS = HALPIMBEINGSUPPRESSED $0
+ *
+ * DDOC = $(BODY)
+ * DDOC_DECL = $0
+ * DDOC_MEMBER_HEADER =
+ * DDOC_MODULE_MEMBERS = $0
+ * DDOC_MEMBER = $0
+ */
+void main(string[] arguments)
+{
+}
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc198.d b/gcc/testsuite/gdc.test/compilable/ddoc198.d
index 16485b7..d5bc848 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc198.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc198.d
@@ -1,7 +1,7 @@
// EXTRA_SOURCES: extra-files/ddoc198.ddoc
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 198
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc198;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc19814.d b/gcc/testsuite/gdc.test/compilable/ddoc19814.d
new file mode 100644
index 0000000..b1fd15e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc19814.d
@@ -0,0 +1,23 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
+
+/*
+TEST_OUTPUT:
+----
+----
+*/
+
+/++
+ + Nested Code
+ +
+ + ------------------------------------
+ + /**
+ + * Examples:
+ + * --------------------
+ + * writeln("3"); // writes '3' to stdout
+ + * --------------------
+ + */
+ + ------------------------------------
+ +/
+module test.compilable.ddoc_markdown_nested_code;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc2.d b/gcc/testsuite/gdc.test/compilable/ddoc2.d
index 54e492f..2a7e457 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc2.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc2.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 2
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
* Summary
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc2273.d b/gcc/testsuite/gdc.test/compilable/ddoc2273.d
index 413ba71..ec3b74a 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc2273.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc2273.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 2273
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
// REQUIRED_ARGS: -m32
module ddoc2273;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc4.d b/gcc/testsuite/gdc.test/compilable/ddoc4.d
index d067736..e52067b 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc4.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc4.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 4
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
a
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc4162.d b/gcc/testsuite/gdc.test/compilable/ddoc4162.d
index 3946eca..dd24475 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc4162.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc4162.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 4162
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
///
interface A
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc5.d b/gcc/testsuite/gdc.test/compilable/ddoc5.d
index 4a8c396..4ddc123 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc5.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc5.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 5
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc5446.d b/gcc/testsuite/gdc.test/compilable/ddoc5446.d
index 2e33617..0596088 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc5446.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc5446.d
@@ -1,6 +1,7 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 5446
+// EXTRA_FILES: ddoc5446a.d ddoc5446b.d
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc5446;
import ddoc5446a;
private import ddoc5446b;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc6.d b/gcc/testsuite/gdc.test/compilable/ddoc6.d
index 6d13090..69bd64a 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc6.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc6.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 6
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
*
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc648.d b/gcc/testsuite/gdc.test/compilable/ddoc648.d
index 49c9097..ce86543 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc648.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc648.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 648
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc648;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc6491.d b/gcc/testsuite/gdc.test/compilable/ddoc6491.d
index 028792a..5fe37a3 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc6491.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc6491.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 6491
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc6491;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc7.d b/gcc/testsuite/gdc.test/compilable/ddoc7.d
index 8185183..9c28d1b 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc7.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc7.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 7
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
//-----------------------------------------------
/// my enum
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc7555.d b/gcc/testsuite/gdc.test/compilable/ddoc7555.d
index efbb547..ec3001c 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc7555.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc7555.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 7555
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc7555;
/**
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc7656.d b/gcc/testsuite/gdc.test/compilable/ddoc7656.d
index 7a0ef0d..82766dc 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc7656.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc7656.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 7656
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc7656;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc7715.d b/gcc/testsuite/gdc.test/compilable/ddoc7715.d
index ee33b28..ddffaf2 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc7715.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc7715.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 7715
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc7656;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc7795.d b/gcc/testsuite/gdc.test/compilable/ddoc7795.d
index c100f5d..2a6ba02 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc7795.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc7795.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 7795
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc7795;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc8.d b/gcc/testsuite/gdc.test/compilable/ddoc8.d
index 6683b1b..f3da3c0 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc8.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc8.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 8
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/** foo */
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc8271.d b/gcc/testsuite/gdc.test/compilable/ddoc8271.d
index 45aca90..983c0ca 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc8271.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc8271.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 8271
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc8271;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc8739.d b/gcc/testsuite/gdc.test/compilable/ddoc8739.d
index cf7da98..005f93d 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc8739.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc8739.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 8739
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc8739;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9.d b/gcc/testsuite/gdc.test/compilable/ddoc9.d
index 21f312d..09d54ef 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9.d
@@ -1,8 +1,8 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
-// 273
+// https://issues.dlang.org/show_bug.cgi?id=273
/// Template Documentation (OK)
template Template(T) { }
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9037.d b/gcc/testsuite/gdc.test/compilable/ddoc9037.d
index ac4ace2..7f113ea 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9037.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9037.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9037
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc9037;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9155.d b/gcc/testsuite/gdc.test/compilable/ddoc9155.d
index 82b7f63..9f5a59a 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9155.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9155.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9155
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc9155;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9305.d b/gcc/testsuite/gdc.test/compilable/ddoc9305.d
index 9c9b890..a28fe10 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9305.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9305.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9305
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc9305;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9369.d b/gcc/testsuite/gdc.test/compilable/ddoc9369.d
index 13bce82..ba44891 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9369.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9369.d
@@ -1,7 +1,7 @@
// PERMUTE_ARGS:
// EXTRA_SOURCES: extra-files/ddoc9369.ddoc
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9369
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
Sample:
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9475.d b/gcc/testsuite/gdc.test/compilable/ddoc9475.d
index 460269c..262fa7d 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9475.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9475.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -w -o- -c -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9475
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc9475;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9497a.d b/gcc/testsuite/gdc.test/compilable/ddoc9497a.d
index 6617434..422ed08 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9497a.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9497a.d
@@ -1,7 +1,7 @@
// EXTRA_SOURCES: extra-files/ddoc9497a.ddoc
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9497a
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
foo function.
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9497b.d b/gcc/testsuite/gdc.test/compilable/ddoc9497b.d
index 62ab44c..d059af8 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9497b.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9497b.d
@@ -1,7 +1,7 @@
// EXTRA_SOURCES: extra-files/ddoc9497b.ddoc
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9497b
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
foo function.
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9497c.d b/gcc/testsuite/gdc.test/compilable/ddoc9497c.d
index da9e3df..fb32aef 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9497c.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9497c.d
@@ -1,7 +1,7 @@
// EXTRA_SOURCES: extra-files/ddoc9497c.ddoc
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9497c
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
foo function.
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9497d.d b/gcc/testsuite/gdc.test/compilable/ddoc9497d.d
index c42f013..a8aa26b 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9497d.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9497d.d
@@ -1,7 +1,7 @@
// EXTRA_SOURCES: extra-files/ddoc9497d.ddoc
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9497d
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
foo function.
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9676a.d b/gcc/testsuite/gdc.test/compilable/ddoc9676a.d
index 326c2cf..c5f0f79 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9676a.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9676a.d
@@ -1,7 +1,7 @@
// PERMUTE_ARGS:
// EXTRA_SOURCES: extra-files/ddoc9676a.ddoc
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9676a
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc9676a;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9676b.d b/gcc/testsuite/gdc.test/compilable/ddoc9676b.d
index 6314549..433ec71 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9676b.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9676b.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9676b
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc9676b;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9727.d b/gcc/testsuite/gdc.test/compilable/ddoc9727.d
index 14e5fd2..d15a3bf 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9727.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9727.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9727
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc9727;
/** The function foo. */
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9789.d b/gcc/testsuite/gdc.test/compilable/ddoc9789.d
index b220c7f..ddbb763 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9789.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9789.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
-// REQUIRED_ARGS: -D -w -o- -c -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9789
+// REQUIRED_ARGS: -D -w -o- -Dd${RESULTS_DIR}/compilable -o-
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddoc9789;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9903.d b/gcc/testsuite/gdc.test/compilable/ddoc9903.d
index 00b6a79..2e0d1ae 100644
--- a/gcc/testsuite/gdc.test/compilable/ddoc9903.d
+++ b/gcc/testsuite/gdc.test/compilable/ddoc9903.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9903
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/// sss
struct S9903X {}
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_breaks.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_breaks.d
new file mode 100644
index 0000000..8242b98
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_breaks.d
@@ -0,0 +1,30 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_breaks.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_breaks.html
+
+/++
+# Thematic Breaks
+
+Some text before
+***
+Some text in between
+____________________
+Some text after
+
+---
+This is a code block
+---
+
+But this is a thematic break:
+
+- - -
+
+## Not Thematic Breaks
+
+- -
+__
+**
+
++/
+module ddoc_markdown_lists;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_breaks_verbose.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_breaks_verbose.d
new file mode 100644
index 0000000..1ff26b0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_breaks_verbose.d
@@ -0,0 +1,13 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -wi -o- -transition=vmarkdown
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_breaks_verbose.html
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_breaks_verbose.html
+
+/++
+Thematic Breaks
+
+___
+- - -
+***
++/
+module ddoc_markdown_breaks;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_code.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_code.d
new file mode 100644
index 0000000..56e6be3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_code.d
@@ -0,0 +1,46 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_code.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_code.html
+
+/++
+# Code Blocks
+
+---
+A regular ol' code block (note the uneven delimiter lengths)
+----
+
+```
+A backtick-fenced code block
+```
+
+~~~
+A tilde-fenced code block
+~~~
+
+--- d
+A hyphen-fenced D code block
+---
+
+--- d delish
+A backtick-fenced D code block
+---
+
+~~~ d
+A tilde-fenced D code block
+~~~
+
+--- ruby
+A hyphen-fenced ruby code block
+---
+
+--- ruby delish
+A backtick-fenced ruby code block
+---
+
+~~~ ruby
+A tilde-fenced ruby code block
+~~~
+
++/
+module test.compilable.ddoc_markdown_code;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_code_verbose.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_code_verbose.d
new file mode 100644
index 0000000..eb64c04
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_code_verbose.d
@@ -0,0 +1,13 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o- -transition=vmarkdown
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_code_verbose.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_code_verbose.html
+
+/++
+Code:
+
+``` ruby red
+RWBY
+```
++/
+module test.compilable.ddoc_markdown_code_verbose;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_emphasis.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_emphasis.d
new file mode 100644
index 0000000..8bbcbdf
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_emphasis.d
@@ -0,0 +1,45 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_emphasis.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_emphasis.html
+
+/++
+Markdown Emphasis:
+
+*emphasized text*
+
+*emphasized text
+on more than one line*
+
+**strongly emphasized text**
+
+*in*seperable
+
+***tricky** emphasis*
+
+*more **tricky emphasis***
+
+*tricky**unspaced***
+
+*more**tricky**unspaced*
+
+*highly **nested *emphasis* in this** line*
+
+$(B *inside a macro*)
+
+*$(B outside a macro)*
+
+**The following aren't Markdown emphasis:**
+
+a * not emphasis*
+
+a*"not either"*
+
+*nor this *
+
+*jumping $(B into a macro*)
+
+$(B *jumping) out of a macro*
+
++/
+module ddoc_markdown_emphasis;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_emphasis_verbose.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_emphasis_verbose.d
new file mode 100644
index 0000000..07904c1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_emphasis_verbose.d
@@ -0,0 +1,13 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -wi -o- -transition=vmarkdown
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_emphasis_verbose.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_emphasis_verbose.html
+
+/++
+Markdown Emphasis:
+
+*emphasized text*
+
+**strongly emphasized text**
++/
+module ddoc_markdown_emphasis;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_escapes.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_escapes.d
new file mode 100644
index 0000000..4d8c8ae
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_escapes.d
@@ -0,0 +1,27 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_escapes.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_escapes.html
+
+/++
+Backslash Escapes:
+
+\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}
+
+But not in code:
+
+---
+\{\}
+---
+
+`\{\}`
+
+Nor in HTML:
+
+<tag attr="\{\}"></tag>
+
+Nor before things that aren't punctuation:
+
+C:\dlang\dmd
++/
+module ddoc_markdown_escapes;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_headings.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_headings.d
new file mode 100644
index 0000000..e7191f8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_headings.d
@@ -0,0 +1,40 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_headings.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_headings.html
+
+/++
+# ATX-Style Headings
+
+# H1
+## H2
+### H3
+#### H4
+##### H5
+###### H6
+
+ ### headings
+ ## with initial
+ # spaces
+
+## heading with *emphasis*
+
+## heading with trailing `#`'s #######
+## heading with trailing literal ##'s
+## heading with another trailing literal#
+## heading with backslash-escaped trailing #\##
+
+## Some empty headers:
+##
+#
+### ###
+
+# Not Headings
+
+#hashtag not a heading because there's no space after the `#`
+
+####### Not a heading because it has more than 6 `#`'s
+
+\## Not a heading because of the preceeding backslash
++/
+module ddoc_markdown_headings;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_headings_verbose.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_headings_verbose.d
new file mode 100644
index 0000000..6448463
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_headings_verbose.d
@@ -0,0 +1,9 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o- -transition=vmarkdown
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_headings_verbose.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_headings_verbose.html
+
+/++
+# Heading
++/
+module ddoc_markdown_headings_verbose;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_links.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_links.d
new file mode 100644
index 0000000..349175b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_links.d
@@ -0,0 +1,42 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_links.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_links.html
+
+/++
+# Links
+
+[D Site]: https://dlang.org 'D lives here'
+[unused reference]: https://nowhere.com
+
+A link to [printf].
+
+A link to [the base object][Object].
+
+Not a link because it's an associative array: int[Object].
+
+An inline link to [the D homepage](https://dlang.org).
+
+A reference link to [the **D** homepage][d site].
+
+Not a reference link because it [links to nothing][nonexistent].
+
+A simple link to [dub].
+
+A slightly less simple link to [dub][].
+
+An image: ![D-Man](https://dlang.org/images/d3.png)
+Another image: ![D-Man again][dman-error]
+
+[dub]: <https://code.dlang.org>
+[dman-error]: https://dlang.org/images/dman-error.jpg
+
+$(P
+ [tour]: https://tour.dlang.org
+
+ Here's a [reference to the tour][tour] inside a macro.
+)
++/
+module test.compilable.ddoc_markdown_links;
+
+import core.stdc.stdio;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_links_verbose.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_links_verbose.d
new file mode 100644
index 0000000..435b426
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_links_verbose.d
@@ -0,0 +1,17 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o- -transition=vmarkdown
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_links_verbose.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_links_verbose.html
+
+/++
+Links:
+
+A link to [Object].
+An inline link to [the D homepage](https://dlang.org).
+A simple link to [dub].
+A slightly less simple link to [dub][].
+An image: ![D-Man](https://dlang.org/images/d3.png)
+
+[dub]: https://code.dlang.org
++/
+module test.compilable.ddoc_markdown_links_verbose;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_lists.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_lists.d
new file mode 100644
index 0000000..1e5ff56
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_lists.d
@@ -0,0 +1,68 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_lists.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_lists.html
+
+/++
+# Lists
+
+## Unordered
+
+- item one
+
+ *part of* item one
+
+ ---
+ // code in item one
+ ---
+
+ **not** part of item one
+
++ + three
+- different
+* lists
+
+- list with
+-
+- empty item
+
+- parent item
+ - child item
+
+- sibling item
+ - sibling item
+
+After text:
+- ### heading
+- and item
+
+## Ordered
+
+0. zero
+1. one
+
+List separator text
+
+3. list that starts with three
+
+1. parent item
+ 1. child item
+
+1. sibling item
+ 2. sibling item
+
+## Not Lists
+
+-no initial space
+
+2.no initial space
+
+1234567890. too many numbers
+
+-1. negative
+
+New lists must start with 1, not
+6. So this isn't a list.
+
++/
+module ddoc_markdown_lists;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_lists_verbose.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_lists_verbose.d
new file mode 100644
index 0000000..4fd1a80
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_lists_verbose.d
@@ -0,0 +1,9 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o- -transition=vmarkdown
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_lists_verbose.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_lists_verbose.html
+
+/++
+- list item
++/
+module ddoc_markdown_lists_verbose;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_quote.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_quote.d
new file mode 100644
index 0000000..27cfc43
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_quote.d
@@ -0,0 +1,53 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_quote.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_quote.html
+
+/++
+# Quote Blocks
+
+> “It seems to me that most of the ‘new’ programming languages fall into one of
+two categories: Those from academia with radical new paradigms and those from
+large corporations with a focus on RAD and the web. Maybe it’s time for a new
+language born out of practical experience implementing compilers.†-- Michael
+
+> Great, just what I need.. another D in programming. -- Segfault
+
+> To D, or not to D. -- Willeam NerdSpeare
+
+> "What I am going to tell you about is what we teach our programming students in the third or fourth year of graduate school... It is my task to convince you not to turn away because you don't understand it. You see my programming students don't understand it... That is because I don't understand it. Nobody does."
+-- Richard Deeman
+
+Here's a bit of text between quotes.
+
+> This is a quote
+> > And this is a nested quote
+
+> This is a quote with a > symbol in it
+
+> This is a quote
+with a continuation
+
+> This quote
+- is ended by this list
+
+> This quote
+### is ended by this heading
+
+> This quote is ended by a thematic break:
+____
+
+> This quote
+```
+is ended by this code
+```
+
+> ### Some things inside a quote block:
+> ___
+> ---
+> Some code
+> ---
+> - a list
+
++/
+module test.compilable.ddoc_markdown_code;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_quote_verbose.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_quote_verbose.d
new file mode 100644
index 0000000..f16e539
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_quote_verbose.d
@@ -0,0 +1,11 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o- -transition=vmarkdown
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_quote_verbose.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_quote_verbose.html
+
+/++
+Quote Block:
+
+> Great, just what I need.. another D in programming. -- Segfault
++/
+module test.compilable.ddoc_markdown_code_verbose;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_tables.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_tables.d
new file mode 100644
index 0000000..231364a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_tables.d
@@ -0,0 +1,42 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_tables.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_tables.html
+
+/++
+# Tables
+
+| Rounding mode | rndint(4.5) | rndint(5.5) | rndint(-4.5) | Notes |
+| ------------- | ----------: | ----------: | -----------: | ----- |
+| Round to nearest | 4 | 6 | -4 | Ties round to an even number |
+| Round down | 4 | 5 | -5 | &nbsp; |
+| Round up | 5 | 6 | -4 | &nbsp; |
+| Round to zero | 4 | 5 | -4 | &nbsp; |
+
+ this|that
+ ----|----
+ cell|cell<br>sell
+
+| abc | def |
+| --- | --- |
+| bar |
+| *bar* | baz | boo |
+
+> | quote |
+> | ----- |
+> | table |
+
+* | list |
+ | ---- |
+ | table |
+
+| default | left | center | right |
+| --- | :-- | :--: | --: |
+
+Look Ma, a table without a body!
+
+| not | a | table |
+| -- |
+| wrong number of header columns |
++/
+module test.compilable.ddoc_markdown_tables;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_tables_22285.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_tables_22285.d
new file mode 100644
index 0000000..5e8836d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_tables_22285.d
@@ -0,0 +1,15 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_tables_22285.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_tables_22285.html
+
+module test.compilable.ddoc_markdown_tables_22285;
+
+/**
+| A | B | C |
+|---|---|---|
+| a | 0 | |
+| b | 1 1 1 | |
+| c | 2 | |
+*/
+enum _ = 0;
diff --git a/gcc/testsuite/gdc.test/compilable/ddoc_markdown_tables_verbose.d b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_tables_verbose.d
new file mode 100644
index 0000000..d1aac1c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ddoc_markdown_tables_verbose.d
@@ -0,0 +1,13 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o- -transition=vmarkdown
+// TEST_OUTPUT_FILE: extra-files/ddoc_markdown_tables_verbose.html
+// OUTPUT_FILES: ${RESULTS_DIR}/compilable/ddoc_markdown_tables_verbose.html
+
+/++
+Table:
+
+| this | that |
+| ---- | ---- |
+| cell | cell |
++/
+module test.compilable.ddoc_markdown_tables_verbose;
diff --git a/gcc/testsuite/gdc.test/compilable/ddocbackticks.d b/gcc/testsuite/gdc.test/compilable/ddocbackticks.d
index 8249c4b..533ff0c 100644
--- a/gcc/testsuite/gdc.test/compilable/ddocbackticks.d
+++ b/gcc/testsuite/gdc.test/compilable/ddocbackticks.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh backticks
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/++
Closely related to std.datetime is <a href="core_time.html">`core.time`</a>,
diff --git a/gcc/testsuite/gdc.test/compilable/ddocunittest.d b/gcc/testsuite/gdc.test/compilable/ddocunittest.d
index 8c691b6..2762064 100644
--- a/gcc/testsuite/gdc.test/compilable/ddocunittest.d
+++ b/gcc/testsuite/gdc.test/compilable/ddocunittest.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS: -unittest
-// REQUIRED_ARGS: -D -w -o- -c -Dd${RESULTS_DIR}/compilable -o-
-// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh unittest
+// REQUIRED_ARGS: -D -w -o- -Dd${RESULTS_DIR}/compilable -o-
+// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
module ddocunittest;
@@ -189,12 +189,6 @@ static import core.stdc.stdlib;
unittest { fooStaticImport(); }
///
-void fooPublicImport() {}
-public import core.stdc.string;
-/// test
-unittest { fooPublicImport(); }
-
-///
void fooSelectiveImport() {}
import core.stdc.ctype : isalpha;
/// test
@@ -206,6 +200,32 @@ import io = core.stdc.stdio;
/// test
unittest { fooRenamedImport(); }
+/// This is a public import
+public import core.stdc.string;
+
+/// This is a mutiple public import
+public import core.stdc.stdarg, core.stdc.stdlib;
+
+/// This is a public selective import
+public import core.stdc.string : memcpy;
+
+/// This is a public selective renamed import
+public import core.stdc.string : copy = memcpy;
+
+/// This is a public multiple selective import
+public import core.stdc.string : memcpy, memcmp;
+
+/// This is a public multiple selective renamed import
+public import core.stdc.string : copy = memcpy, compare = memcmp;
+
+/// This is a public renamed import
+public import str = core.stdc.string;
+
+// This is a public import without a DDoc comment.
+// It should not be emitted to the documentation file.
+public import core.stdc.stdlib;
+
+
// ------------------------------------
// documented unittest after conditional declarations
@@ -276,7 +296,7 @@ else
unittest { int x6b; }
// ------------------------------------
-// 9474
+// https://issues.dlang.org/show_bug.cgi?id=9474
///
void foo9474() { }
@@ -323,7 +343,7 @@ template Template9474()
unittest { alias Template9474!() T; }
// ------------------------------------
-// 9713
+// https://issues.dlang.org/show_bug.cgi?id=9713
///
void fooNoDescription() {}
@@ -334,7 +354,7 @@ unittest { if (true) {fooNoDescription(); } /* comment */ }
// ------------------------------------
-/// test for bugzilla 9757
+/// test for https://issues.dlang.org/show_bug.cgi?id=9757
void foo9757() {}
/// ditto
void bar9757() {}
@@ -371,7 +391,7 @@ unittest
}
// ------------------------------------
-// Issue 9758
+// https://issues.dlang.org/show_bug.cgi?id=9758
/// test
void foo(){}
@@ -380,7 +400,7 @@ void foo(){}
unittest { }
// ------------------------------------
-// Issue 10519
+// https://issues.dlang.org/show_bug.cgi?id=10519
///
bool balancedParens10519(string, char, char) { return true; }
@@ -392,7 +412,7 @@ unittest
}
// ------------------------------------
-// Issue 12097
+// https://issues.dlang.org/show_bug.cgi?id=12097
/// declaration
struct S12097
@@ -420,7 +440,7 @@ unittest
}
// ------------------------------------
-// 14594
+// https://issues.dlang.org/show_bug.cgi?id=14594
/*******************
* testA
diff --git a/gcc/testsuite/gdc.test/compilable/debugInference.d b/gcc/testsuite/gdc.test/compilable/debugInference.d
new file mode 100644
index 0000000..1d4f157
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/debugInference.d
@@ -0,0 +1,55 @@
+/*
+REQUIRED_ARGS: -debug
+TEST_OUTPUT:
+---
+compilable/debugInference.d(35): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+---
+https://issues.dlang.org/show_bug.cgi?id=20507
+*/
+
+
+void main() pure nothrow @safe @nogc
+{
+ debug foo();
+ bar!()();
+}
+
+void foo() @system
+{
+ // Just to be sure its neither @nogc, pure or nothrow
+ __gshared int counter = 0;
+
+ if (counter++)
+ throw new Exception(new immutable(char)[counter]);
+}
+
+void bar()()
+{
+ debug {
+ foo();
+
+ auto fPtr = &S.f;
+ auto f2Ptr = &f2;
+
+ S s;
+ delete s;
+
+ int* ptr = cast(int*) 0;
+ int[] slice = ptr[0 .. 4];
+ int val = ptr[1];
+
+ void[] bytes = slice;
+ bytes[] = bytes[];
+
+ scope int n;
+ int* pn = &n;
+ }
+}
+
+class S {
+ void f() @safe {}
+}
+
+ref int f2(return ref int i) {
+ return i;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/defa.d b/gcc/testsuite/gdc.test/compilable/defa.d
index 4fb700b..a922207 100644
--- a/gcc/testsuite/gdc.test/compilable/defa.d
+++ b/gcc/testsuite/gdc.test/compilable/defa.d
@@ -1,5 +1,5 @@
// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/defaa.d imports/defab.d imports/defac.d imports/defad.d
module defa;
private import imports.defaa;
diff --git a/gcc/testsuite/gdc.test/compilable/depmsg.d b/gcc/testsuite/gdc.test/compilable/depmsg.d
index c841916..9b005d8 100644
--- a/gcc/testsuite/gdc.test/compilable/depmsg.d
+++ b/gcc/testsuite/gdc.test/compilable/depmsg.d
@@ -1,6 +1,22 @@
-// REQUIRED_ARGS: -d
-// PERMUTE_ARGS: -dw
-
+/*
+REQUIRED_ARGS: -dw
+TEST_OUTPUT:
+---
+compilable/depmsg.d(39): Deprecation: struct `depmsg.main.Inner.A` is deprecated - With message!
+compilable/depmsg.d(39): Deprecation: struct `depmsg.main.Inner.A` is deprecated - With message!
+compilable/depmsg.d(40): Deprecation: class `depmsg.main.Inner.B` is deprecated - With message!
+compilable/depmsg.d(40): Deprecation: class `depmsg.main.Inner.B` is deprecated - With message!
+compilable/depmsg.d(41): Deprecation: interface `depmsg.main.Inner.C` is deprecated - With message!
+compilable/depmsg.d(41): Deprecation: interface `depmsg.main.Inner.C` is deprecated - With message!
+compilable/depmsg.d(42): Deprecation: union `depmsg.main.Inner.D` is deprecated - With message!
+compilable/depmsg.d(42): Deprecation: union `depmsg.main.Inner.D` is deprecated - With message!
+compilable/depmsg.d(43): Deprecation: enum `depmsg.main.Inner.E` is deprecated - With message!
+compilable/depmsg.d(43): Deprecation: enum `depmsg.main.Inner.E` is deprecated - With message!
+compilable/depmsg.d(45): Deprecation: alias `depmsg.main.Inner.G` is deprecated - With message!
+compilable/depmsg.d(46): Deprecation: variable `depmsg.main.Inner.H` is deprecated - With message!
+compilable/depmsg.d(47): Deprecation: class `depmsg.main.Inner.I()` is deprecated - With message!
+---
+*/
void main()
{
class Inner
diff --git a/gcc/testsuite/gdc.test/compilable/depsOutput9948.d b/gcc/testsuite/gdc.test/compilable/depsOutput9948.d
deleted file mode 100644
index 0876094..0000000
--- a/gcc/testsuite/gdc.test/compilable/depsOutput9948.d
+++ /dev/null
@@ -1,12 +0,0 @@
-// PERMUTE_ARGS:
-// REQUIRED_ARGS: -deps=${RESULTS_DIR}/compilable/depsOutput9948.deps
-// POST_SCRIPT: compilable/extra-files/depsOutput.sh
-// EXTRA_SOURCES: extra-files/depsOutput9948a.d
-
-module depsOutput9948;
-import depsOutput9948a;
-
-void main()
-{
- templateFunc!("import std.string;")();
-}
diff --git a/gcc/testsuite/gdc.test/compilable/dip22.d b/gcc/testsuite/gdc.test/compilable/dip22.d
index 5c0201a..0471218 100644
--- a/gcc/testsuite/gdc.test/compilable/dip22.d
+++ b/gcc/testsuite/gdc.test/compilable/dip22.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/dip22.d
import imports.dip22;
class Foo : Base1, Base2
diff --git a/gcc/testsuite/gdc.test/compilable/dip22d.d b/gcc/testsuite/gdc.test/compilable/dip22d.d
index 1becf0c..cfb27fa 100644
--- a/gcc/testsuite/gdc.test/compilable/dip22d.d
+++ b/gcc/testsuite/gdc.test/compilable/dip22d.d
@@ -1,6 +1,5 @@
-/*
-REQUIRED_ARGS:
-*/
+// REQUIRED_ARGS:
+// EXTRA_FILES: imports/dip22d.d imports/dip22e.d
// https://github.com/dlang/DIPs/blob/master/DIPs/archive/DIP22.md
diff --git a/gcc/testsuite/gdc.test/compilable/disable_new.d b/gcc/testsuite/gdc.test/compilable/disable_new.d
new file mode 100644
index 0000000..647d47f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/disable_new.d
@@ -0,0 +1,11 @@
+class C
+{
+ // force user of a type to use an external allocation strategy
+ @disable new();
+}
+
+struct S
+{
+ // force user of a type to use an external allocation strategy
+ @disable new();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_21217.d b/gcc/testsuite/gdc.test/compilable/dtoh_21217.d
new file mode 100644
index 0000000..8836ad1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_21217.d
@@ -0,0 +1,91 @@
+/*
+REQUIRED_ARGS: -HC=verbose -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler v$n$
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+struct Foo final
+{
+ int32_t a;
+ enum : int32_t { b = 2 };
+
+ // Ignored enum `dtoh_21217.Foo.c` because it is `private`.
+protected:
+ enum : int32_t { d = 4 };
+
+ enum : int32_t { e = 5 };
+
+public:
+ enum : int32_t { f = 6 };
+
+ enum : int32_t { g = 7 };
+
+private:
+ enum class Bar
+ {
+ a = 1,
+ b = 2,
+ };
+
+ // Ignored enum `dtoh_21217.Foo.h` because it is `private`.
+public:
+ Foo() :
+ a(1)
+ {
+ }
+ Foo(int32_t a) :
+ a(a)
+ {}
+};
+
+---
+*/
+
+
+extern(C++) struct Foo {
+ int a = 1;
+ enum b = 2;
+ private enum c = 3;
+ protected enum d = 4;
+ package enum e = 5;
+ public enum f = 6;
+ export enum g = 7;
+
+ private enum Bar { a = 1, b = 2 }
+ private enum h = Bar.a;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_AliasDeclaration.d b/gcc/testsuite/gdc.test/compilable/dtoh_AliasDeclaration.d
new file mode 100644
index 0000000..e0a96d4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_AliasDeclaration.d
@@ -0,0 +1,217 @@
+/+
+REQUIRED_ARGS: -HC=silent -c -o- -Icompilable/extra-files
+PERMUTE_ARGS:
+EXTRA_FILES: extra-files/dtoh_imports.d extra-files/dtoh_imports2.d
+
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+class C;
+
+extern void importFunc();
+
+class ImportsC
+{
+};
+
+typedef int32_t MyStdcInt;
+
+enum
+{
+ IgnoreErrors = 0,
+};
+
+typedef int32_t T;
+
+extern "C" int32_t x;
+
+extern "C" int32_t foo(int32_t x);
+
+extern int32_t foo2(int32_t x);
+
+struct S;
+
+typedef S aliasS;
+
+struct S2;
+
+typedef S2 aliasS2;
+
+typedef C* aliasC;
+
+class C2;
+
+typedef C2* aliasC2;
+
+typedef size_t(*F)(size_t x);
+
+template <typename T, typename U>
+struct TS final
+{
+ TS()
+ {
+ }
+};
+
+template <typename T, typename U>
+using TSD = TS<T, U>;
+typedef TSD<int32_t, int16_t > TSI;
+
+using aliasName = ImportsC;
+
+using MyStdc = MyStdcInt;
+
+struct FullImport final
+{
+ using ImportsC = ::ImportsC;
+ using MyStdcInt = ::MyStdcInt;
+ FullImport()
+ {
+ }
+};
+
+struct SelectiveImports final
+{
+ using aliasName = ::ImportsC;
+ SelectiveImports()
+ {
+ }
+};
+
+struct PrivateImport final
+{
+ PrivateImport()
+ {
+ }
+};
+
+typedef /* noreturn */ char Impossible[0];
+
+template <typename T>
+struct Array final
+{
+ // Ignoring var length alignment 0
+ uint32_t length;
+ Array()
+ {
+ }
+};
+
+typedef Array<char > DString;
+---
++/
+
+extern (C++):
+
+alias T = int;
+
+extern (C) int x;
+
+alias u = x;
+
+extern (C) int foo(int x)
+{
+ return x * 42;
+}
+
+alias fun = foo;
+
+extern (C++) int foo2(int x)
+{
+ return x * 42;
+}
+
+alias fun2 = foo2;
+
+extern (C) struct S;
+
+alias aliasS = S;
+
+extern (C++) struct S2;
+
+alias aliasS2 = S2;
+
+extern (C) class C;
+
+alias aliasC = C;
+
+extern (C++) class C2;
+
+alias aliasC2 = C2;
+
+alias F = size_t function (size_t x);
+
+extern(C++) struct TS(T, U) {}
+alias TSD = TS;
+alias TSI = TSD!(int, short);
+
+public import dtoh_imports :
+ importFunc,
+ aliasName = ImportsC,
+ MyStdc = MyStdcInt;
+
+struct FullImport
+{
+ public import dtoh_imports;
+
+}
+
+struct SelectiveImports
+{
+ public import dtoh_imports :
+ importFunc,
+ aliasName = ImportsC;
+
+ public static import dtoh_imports;
+}
+
+struct PrivateImport
+{
+ import dtoh_imports;
+
+}
+
+alias Impossible = noreturn;
+
+struct Array(T)
+{
+ uint length;
+ alias opDollar = length;
+ alias dim = length;
+}
+alias DString = Array!(char);
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_AliasDeclaration_98.d b/gcc/testsuite/gdc.test/compilable/dtoh_AliasDeclaration_98.d
new file mode 100644
index 0000000..1499d04
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_AliasDeclaration_98.d
@@ -0,0 +1,56 @@
+/*
+REQUIRED_ARGS: -HC=verbose -extern-std=c++98 -o-
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler v$n$
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+template <typename T, typename U>
+struct TS final
+{
+ TS()
+ {
+ }
+};
+
+// Ignored dtoh_AliasDeclaration_98.TSD because `using` declarations require C++ 11
+---
+*/
+
+extern(C++):
+
+struct TS(T, U) {}
+alias TSD = TS;
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_AnonDeclaration.d b/gcc/testsuite/gdc.test/compilable/dtoh_AnonDeclaration.d
new file mode 100644
index 0000000..bcf5558
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_AnonDeclaration.d
@@ -0,0 +1,106 @@
+/*
+REQUIRED_ARGS: -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+struct S final
+{
+ union
+ {
+ int32_t x;
+ char c[4$?:32=u|64=LLU$];
+ };
+ struct
+ {
+ int32_t y;
+ double z;
+ extern "C" void foo();
+ void bar();
+ };
+ struct
+ {
+ int32_t outerPrivate;
+ };
+ struct
+ {
+ int32_t innerPrivate;
+ int32_t innerBar;
+ };
+ S()
+ {
+ }
+};
+
+extern void foo();
+---
+*/
+
+extern (C++) struct S
+{
+ union
+ {
+ int x;
+ char[4] c;
+ }
+
+ struct
+ {
+ int y;
+ double z;
+ extern(C) void foo() {}
+ extern(C++) void bar() {}
+ }
+
+ // Private not emitted because AnonDeclaration has no protection
+ private struct
+ {
+ int outerPrivate;
+ }
+
+ public struct {
+ // Private cannot be exported to C++
+ private int innerPrivate;
+ int innerBar;
+ }
+}
+
+extern (D)
+{
+ extern(C++) void foo() {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_CPPNamespaceDeclaration.d b/gcc/testsuite/gdc.test/compilable/dtoh_CPPNamespaceDeclaration.d
new file mode 100644
index 0000000..6995a67
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_CPPNamespaceDeclaration.d
@@ -0,0 +1,67 @@
+/*
+REQUIRED_ARGS: -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+namespace nameSpace
+{
+ extern void fn();
+
+ namespace nameSpace2
+ {
+ extern void fn2();
+
+ }
+ extern double identity(double _param_0);
+
+}
+---
+*/
+
+extern(C++, "nameSpace")
+{
+ void fn() {}
+
+ extern(C++, nameSpace2)
+ {
+ void fn2() {}
+ }
+
+ double identity(double) { return _param_0; }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_ClassDeclaration.d b/gcc/testsuite/gdc.test/compilable/dtoh_ClassDeclaration.d
new file mode 100644
index 0000000..6274e9f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_ClassDeclaration.d
@@ -0,0 +1,347 @@
+/++
+REQUIRED_ARGS: -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+class ForwardClass;
+
+class BaseClass
+{
+public:
+ virtual void memberFun(ForwardClass* sds);
+};
+
+class C
+{
+public:
+ int8_t a;
+ int32_t b;
+ int64_t c;
+};
+
+class C2
+{
+public:
+ int32_t a;
+ int32_t b;
+ int64_t c;
+ C2(int32_t a);
+ virtual const C* const constRet();
+ virtual void constPar(const C* const c);
+ virtual void constThis() const;
+};
+
+class Aligned
+{
+public:
+ int8_t a;
+ int32_t b;
+ int64_t c;
+ Aligned(int32_t a);
+};
+
+class A
+{
+public:
+ int32_t a;
+ C* c;
+ virtual void foo();
+ extern "C" virtual void bar();
+ virtual void baz(int32_t x = 42);
+ struct
+ {
+ int32_t x;
+ int32_t y;
+ };
+ union
+ {
+ int32_t u1;
+ char u2[4$?:32=u|64=LLU$];
+ };
+ struct Inner final
+ {
+ int32_t x;
+ Inner() :
+ x()
+ {
+ }
+ Inner(int32_t x) :
+ x(x)
+ {}
+ };
+
+ class InnerC
+ {
+ public:
+ int32_t x;
+ };
+
+ class NonStaticInnerC
+ {
+ public:
+ int32_t x;
+ A* this;
+ };
+
+ typedef Inner I;
+ class CC;
+
+};
+
+class I1
+{
+public:
+ virtual void foo() = 0;
+};
+
+class I2 : public I1
+{
+public:
+ virtual void bar() = 0;
+};
+
+class B : public A, public I1, public I2
+{
+public:
+ using A::bar;
+ void foo();
+ void bar();
+};
+
+class Parent
+{
+ virtual void __vtable_slot_0();
+ virtual void __vtable_slot_1();
+public:
+ virtual void foo();
+};
+
+class Child final : public Parent
+{
+public:
+ void foo() /* const */;
+};
+
+class VisitorBase
+{
+public:
+ virtual void vir();
+ void stat();
+};
+
+class VisitorInter : public VisitorBase
+{
+public:
+ using VisitorBase::vir;
+ virtual void vir(int32_t i);
+ using VisitorBase::stat;
+ void stat(int32_t i);
+};
+
+class Visitor : public VisitorInter
+{
+public:
+ using VisitorInter::vir;
+ using VisitorInter::stat;
+ virtual void vir(bool b);
+ virtual void vir(char d);
+};
+
+class ForwardClass : public BaseClass
+{
+};
+---
++/
+
+/*
+ClassDeclaration has the following issues:
+ * align(n) does nothing. You can use align on classes in C++, though It is generally regarded as bad practice and should be avoided
+*/
+
+extern (C++) class C
+{
+ byte a;
+ int b;
+ long c;
+}
+
+extern (C++) class C2
+{
+ int a = 42;
+ int b;
+ long c;
+
+ this(int a) {}
+
+ const(C) constRet() { return null; }
+ void constPar(const C c) {}
+ void constThis() const {}
+}
+
+extern (C) class C3
+{
+ int a = 42;
+ int b;
+ long c;
+
+ this(int a) {}
+}
+
+extern (C++) align(1) class Aligned
+{
+ byte a;
+ int b;
+ long c;
+
+ this(int a) {}
+}
+
+extern (C++) class A
+{
+ int a;
+ C c;
+
+ void foo();
+ extern (C) void bar() {}
+ extern (C++) void baz(int x = 42) {}
+
+ struct
+ {
+ int x;
+ int y;
+ }
+
+ union
+ {
+ int u1;
+ char[4] u2;
+ }
+
+ struct Inner
+ {
+ int x;
+ }
+
+ static extern(C++) class InnerC
+ {
+ int x;
+ }
+
+ class NonStaticInnerC
+ {
+ int x;
+ }
+
+ alias I = Inner;
+
+ extern(C++) class CC;
+
+}
+
+extern(C++):
+interface I1
+{
+ void foo();
+}
+interface I2 : I1
+{
+ void bar();
+}
+
+class B : A, I1, I2
+{
+ alias bar = A.bar;
+ override void foo() {}
+ override void bar() {}
+}
+
+class Parent
+{
+ extern(D) void over() {}
+ extern(D) void over(int) {}
+ void foo() {}
+}
+
+final class Child : Parent
+{
+ extern(D) override void over() {}
+ override void foo() const {}
+}
+
+class VisitorBase
+{
+ void vir() {}
+
+ final void stat() {}
+}
+
+class VisitorInter : VisitorBase
+{
+ alias vir = VisitorBase.vir;
+ void vir(int i) {}
+
+ alias stat = VisitorBase.stat;
+ final void stat(int i) {}
+}
+
+class Visitor : VisitorInter
+{
+ alias vir = VisitorInter.vir;
+
+ alias stat = VisitorInter.stat;
+
+ mixin Methods!() m;
+ alias vir = m.vir;
+}
+
+mixin template Methods()
+{
+ extern(C++) void vir(bool b) {}
+
+ extern(C++) void vir(char d) {}
+}
+
+class ForwardClass : BaseClass
+{
+}
+
+class BaseClass
+{
+ void memberFun(ForwardClass sds);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_StructDeclaration.d b/gcc/testsuite/gdc.test/compilable/dtoh_StructDeclaration.d
new file mode 100644
index 0000000..1bfc25b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_StructDeclaration.d
@@ -0,0 +1,286 @@
+/*
+REQUIRED_ARGS: -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+struct S final
+{
+ int8_t a;
+ int32_t b;
+ int64_t c;
+ _d_dynamicArray< int32_t > arr;
+ S() :
+ a(),
+ b(),
+ c(),
+ arr()
+ {
+ }
+ S(int8_t a, int32_t b = 0, int64_t c = 0LL, _d_dynamicArray< int32_t > arr = {}) :
+ a(a),
+ b(b),
+ c(c),
+ arr(arr)
+ {}
+};
+
+struct S2 final
+{
+ int32_t a;
+ int32_t b;
+ int64_t c;
+ S d;
+ S2(int32_t a);
+ S2(char ) = delete;
+ S2() :
+ a(42),
+ b(),
+ c()
+ {
+ }
+};
+
+struct S3 final
+{
+ int32_t a;
+ int32_t b;
+ int64_t c;
+ extern "C" S3(int32_t a);
+ S3() :
+ a(42),
+ b(),
+ c()
+ {
+ }
+};
+
+struct S4 final
+{
+ int32_t a;
+ int64_t b;
+ int32_t c;
+ int8_t d;
+ S4() :
+ a(),
+ b(),
+ c(),
+ d()
+ {
+ }
+ S4(int32_t a, int64_t b = 0LL, int32_t c = 0, int8_t d = 0) :
+ a(a),
+ b(b),
+ c(c),
+ d(d)
+ {}
+};
+
+#pragma pack(push, 1)
+struct Aligned final
+{
+ int8_t a;
+ int32_t b;
+ int64_t c;
+ Aligned(int32_t a);
+ Aligned() :
+ a(),
+ b(),
+ c()
+ {
+ }
+};
+#pragma pack(pop)
+
+struct Null final
+{
+ void* field;
+ Null() :
+ field(nullptr)
+ {
+ }
+ Null(void* field) :
+ field(field)
+ {}
+};
+
+struct A final
+{
+ int32_t a;
+ S s;
+ extern "C" void bar();
+ void baz(int32_t x = 42);
+ struct
+ {
+ int32_t x;
+ int32_t y;
+ };
+ union
+ {
+ int32_t u1;
+ char u2[4$?:32=u|64=LLU$];
+ };
+ struct Inner final
+ {
+ int32_t x;
+ Inner() :
+ x()
+ {
+ }
+ Inner(int32_t x) :
+ x(x)
+ {}
+ };
+
+ typedef Inner I;
+ class C;
+
+ A() :
+ a(),
+ s()
+ {
+ }
+ A(int32_t a, S s = S(0, 0, 0LL, {})) :
+ a(a),
+ s(s)
+ {}
+};
+
+union U
+{
+ int32_t i;
+ char c;
+};
+---
+*/
+
+/*
+StructDeclaration has the following issues:
+ * align different than 1 does nothing; we should support align(n), where `n` in [1, 2, 4, 8, 16]
+ * align(n): inside struct definition doesn’t add alignment, but breaks generation of default ctors
+*/
+
+extern (C++) struct S
+{
+ byte a;
+ int b;
+ long c;
+ int[] arr;
+}
+
+extern (C++) struct S2
+{
+ int a = 42;
+ int b;
+ long c;
+ S d = void;
+
+ this(int a) {}
+ extern(D) this(int, int, long) {}
+ @disable this(char);
+}
+
+extern (C) struct S3
+{
+ int a = 42;
+ int b;
+ long c;
+
+ this(int a) {}
+}
+
+extern (C) struct S4
+{
+ int a;
+ long b;
+ int c;
+ byte d;
+}
+
+extern (C++) align(1) struct Aligned
+{
+ //align(1):
+ byte a;
+ int b;
+ long c;
+
+ this(int a) {}
+}
+
+extern (C++) struct Null
+{
+ void* field = null;
+}
+
+extern (C++) struct A
+{
+ int a;
+ S s;
+
+ extern (D) void foo();
+ extern (C) void bar() {}
+ extern (C++) void baz(int x = 42) {}
+
+ struct
+ {
+ int x;
+ int y;
+ }
+
+ union
+ {
+ int u1;
+ char[4] u2;
+ }
+
+ struct Inner
+ {
+ int x;
+ }
+
+ alias I = Inner;
+
+ extern(C++) class C;
+
+}
+
+extern(C++) union U
+{
+ int i;
+ char c;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_TemplateDeclaration.d b/gcc/testsuite/gdc.test/compilable/dtoh_TemplateDeclaration.d
new file mode 100644
index 0000000..5f747fd
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_TemplateDeclaration.d
@@ -0,0 +1,401 @@
+/*
+REQUIRED_ARGS: -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+typedef uint$?:32=32|64=64$_t size_t;
+
+struct Outer final
+{
+ int32_t a;
+ struct Member final
+ {
+ typedef int32_t Nested;
+ Member()
+ {
+ }
+ };
+
+ Outer() :
+ a()
+ {
+ }
+ Outer(int32_t a) :
+ a(a)
+ {}
+};
+
+enum : int32_t { SomeOtherLength = 1 };
+
+struct ActualBuffer final
+{
+ ActualBuffer()
+ {
+ }
+};
+
+template <typename T>
+struct A final
+{
+ // Ignoring var x alignment 0
+ T x;
+ // Ignoring var Enum alignment 0
+ enum : int32_t { Enum = 42 };
+
+ // Ignoring var GsharedNum alignment 0
+ static int32_t GsharedNum;
+ // Ignoring var MemNum alignment 0
+ const int32_t MemNum;
+ void foo();
+ A()
+ {
+ }
+};
+
+template <typename T>
+struct NotInstantiated final
+{
+ // Ignoring var noInit alignment 0
+ // Ignoring var missingSem alignment 0
+ NotInstantiated()
+ {
+ }
+};
+
+struct B final
+{
+ A<int32_t > x;
+ B() :
+ x()
+ {
+ }
+ B(A<int32_t > x) :
+ x(x)
+ {}
+};
+
+template <typename T>
+struct Foo final
+{
+ // Ignoring var val alignment 0
+ T val;
+ Foo()
+ {
+ }
+};
+
+template <typename T>
+struct Bar final
+{
+ // Ignoring var v alignment 0
+ Foo<T > v;
+ Bar()
+ {
+ }
+};
+
+template <typename T>
+struct Array final
+{
+ typedef Array This;
+ typedef typeof(1 + 2) Int;
+ typedef typeof(T::a) IC;
+ Array(size_t dim);
+ ~Array();
+ void get() const;
+ template <typename T>
+ bool opCast() const;
+ // Ignoring var i alignment 0
+ typename T::Member i;
+ // Ignoring var j alignment 0
+ typename Outer::Member::Nested j;
+ void visit(typename T::Member::Nested i);
+ Array()
+ {
+ }
+};
+
+template <typename T, typename U>
+extern T foo(U u);
+
+extern A<A<int32_t > > aaint;
+
+template <typename T>
+class Parent
+{
+ // Ignoring var parentMember alignment 0
+public:
+ T parentMember;
+ void parentFinal();
+ virtual void parentVirtual();
+};
+
+template <typename T>
+class Child final : public Parent<T >
+{
+ // Ignoring var childMember alignment 0
+public:
+ T childMember;
+ void parentVirtual();
+ T childFinal();
+};
+
+extern void withDefTempl(A<int32_t > a = A<int32_t >(2, 13));
+
+template <typename T>
+extern void withDefTempl2(A<T > a = static_cast<A<T >>(A<T >(2)));
+
+class ChildInt : public Parent<int32_t >
+{
+};
+
+struct HasMixins final
+{
+ void foo(int32_t t);
+ HasMixins()
+ {
+ }
+};
+
+template <typename T>
+struct HasMixinsTemplate final
+{
+ void foo(T t);
+ HasMixinsTemplate()
+ {
+ }
+};
+
+extern HasMixinsTemplate<bool > hmti;
+
+template <typename T>
+struct NotAA final
+{
+ // Ignoring var length alignment 0
+ enum : int32_t { length = 12 };
+
+ // Ignoring var buffer alignment 0
+ T buffer[length];
+ // Ignoring var otherBuffer alignment 0
+ T otherBuffer[SomeOtherLength];
+ // Ignoring var calcBuffer alignment 0
+ T calcBuffer[foo(1)];
+ NotAA()
+ {
+ }
+};
+
+template <typename Buffer>
+struct BufferTmpl final
+{
+ // Ignoring var buffer alignment 0
+ Buffer buffer;
+ // Ignoring var buffer2 alignment 0
+ Buffer buffer2;
+ BufferTmpl()
+ {
+ }
+};
+
+struct ImportedBuffer final
+{
+ typedef ActualBuffer Buffer;
+ ActualBuffer buffer2;
+ ImportedBuffer()
+ {
+ }
+};
+---
+*/
+
+extern (C++) struct A(T)
+{
+ T x;
+ enum Enum = 42;
+ __gshared GsharedNum = 43;
+ immutable MemNum = 13;
+ void foo() {}
+}
+
+// Invalid declarations accepted because it's not instantiated
+extern (C++) struct NotInstantiated(T)
+{
+ enum T noInit;
+ enum missingSem = T.init;
+}
+
+extern (C++) struct B
+{
+ A!int x;
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20604
+extern(C++)
+{
+ struct Foo (T)
+ {
+ T val;
+ }
+
+ struct Bar (T)
+ {
+ Foo!T v;
+ }
+}
+
+extern (C++) struct Array(T)
+{
+ alias This = typeof(this);
+ alias Int = typeof(1 + 2);
+ alias IC = typeof(T.a);
+
+ this(size_t dim) pure nothrow {}
+ @disable this(this);
+ ~this() {}
+ void get() const {}
+
+ bool opCast(T)() const pure nothrow @nogc @safe
+ if (is(T == bool))
+ {
+ return str.ptr !is null;
+ }
+
+ T.Member i;
+ Outer.Member.Nested j;
+ void visit(T.Member.Nested i) {}
+}
+
+struct Outer
+{
+ int a;
+ static struct Member
+ {
+ alias Nested = int;
+ }
+}
+
+// alias AO = Array!Outer;
+
+extern(C++) T foo(T, U)(U u) { return T.init; }
+
+extern(C++) __gshared A!(A!int) aaint;
+
+extern(C++) class Parent(T)
+{
+ T parentMember;
+ final void parentFinal() {}
+ void parentVirtual() {}
+}
+
+extern(C++) final class Child(T) : Parent!T
+{
+ T childMember;
+ override void parentVirtual() {}
+ T childFinal() { return T.init; }
+}
+
+extern(C++) void withDefTempl(A!int a = A!int(2)) {}
+
+extern(C++) void withDefTempl2(T)(A!T a = A!T(2)) {}
+
+extern(C++) alias withDefTempl2Inst = withDefTempl2!int;
+
+extern(C++) class ChildInt : Parent!int {}
+
+/******************************************************
+ * Mixins
+ */
+
+extern (C++):
+
+mixin template MixinA(T)
+{
+ void foo(T t) {}
+}
+
+mixin template MixinB() {}
+
+struct HasMixins
+{
+ mixin MixinA!int;
+ mixin MixinB;
+}
+
+struct HasMixinsTemplate(T)
+{
+ mixin MixinA!T;
+ mixin MixinB;
+}
+
+__gshared HasMixinsTemplate!bool hmti;
+
+/// Declarations that look like associative arrays
+
+extern(D) enum SomeOtherLength = 1;
+
+struct NotAA(T)
+{
+ private:
+ enum length = 12;
+ public:
+ T[length] buffer;
+ T[SomeOtherLength] otherBuffer;
+ T[foo(1)] calcBuffer;
+}
+
+// Same name but hidden by the template paramter
+extern (D) struct Buffer {}
+extern (D) struct ActualBuffer {}
+
+struct BufferTmpl(Buffer)
+{
+ Buffer buffer;
+ mixin BufferMixin!();
+}
+
+struct ImportedBuffer
+{
+ alias Buffer = ActualBuffer;
+ mixin BufferMixin!();
+}
+
+mixin template BufferMixin()
+{
+ Buffer buffer2;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_UnionDeclaration.d b/gcc/testsuite/gdc.test/compilable/dtoh_UnionDeclaration.d
new file mode 100644
index 0000000..b609cc2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_UnionDeclaration.d
@@ -0,0 +1,93 @@
+/+
+REQUIRED_ARGS: -o- -HC
+
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+union U1
+{
+ int32_t a;
+ double d;
+};
+
+union U2
+{
+ double d;
+ char* ptr;
+};
+
+struct S final
+{
+ int32_t i;
+ U1 u1;
+ U2 u2;
+ S() :
+ i(),
+ u1(),
+ u2()
+ {
+ }
+ S(int32_t i, U1 u1 = U1(0), U2 u2 = U2(NAN)) :
+ i(i),
+ u1(u1),
+ u2(u2)
+ {}
+};
+---
++/
+
+extern (C++):
+
+union U1
+{
+ int a;
+ double d;
+}
+
+union U2
+{
+ double d;
+ char* ptr;
+}
+
+struct S
+{
+ int i;
+ U1 u1;
+ U2 u2;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_VarDeclaration.d b/gcc/testsuite/gdc.test/compilable/dtoh_VarDeclaration.d
new file mode 100644
index 0000000..f9e57f9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_VarDeclaration.d
@@ -0,0 +1,116 @@
+/*
+REQUIRED_ARGS: -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+#if !defined(_d_real)
+# define _d_real long double
+#endif
+
+extern "C" int32_t z;
+
+extern int32_t t;
+
+struct S;
+
+struct S2;
+
+class C2;
+
+union U;
+
+union U2;
+
+extern "C" size_t v;
+
+extern nullptr_t typeof_null;
+
+extern nullptr_t inferred_null;
+
+extern int32_t i;
+
+extern _d_real r;
+
+extern int32_t si[4$?:32=u|64=LLU$];
+
+extern const _d_dynamicArray< const int32_t > di;
+
+extern void* ii;
+
+extern const int32_t* const pi;
+
+extern int16_t(*func)(float , bool , ...);
+---
+*/
+
+int x = 42;
+
+extern int y;
+
+extern (C) int z;
+
+extern (C++) __gshared int t;
+
+extern (C) struct S;
+
+extern (C++) struct S2;
+
+extern (C) class C;
+
+extern (C++) class C2;
+
+extern (C) union U;
+
+extern (C++) union U2;
+
+extern (C) size_t v;
+
+extern (C++) __gshared typeof(null) typeof_null = null;
+extern (C++) __gshared inferred_null = null;
+
+extern(C++):
+__gshared
+{
+ int i;
+ real r;
+ int[4] si;
+ const int[] di;
+ int[int] ii;
+ const int* pi;
+ short function(float, bool, ...) func;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_cpp98_compat.d b/gcc/testsuite/gdc.test/compilable/dtoh_cpp98_compat.d
new file mode 100644
index 0000000..b291cf6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_cpp98_compat.d
@@ -0,0 +1,142 @@
+/*
+REQUIRED_ARGS: -extern-std=c++98 -HC -c -o- -Icompilable/extra-files
+PERMUTE_ARGS:
+EXTRA_FILES: extra-files/dtoh_imports.d extra-files/dtoh_imports2.d
+
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+class ImportsC
+{
+};
+
+struct Null final
+{
+ void* field;
+ _d_dynamicArray< const char > null_;
+private:
+ Null(int32_t );
+public:
+ Null() :
+ field(NULL),
+ null_()
+ {
+ }
+ Null(void* field, _d_dynamicArray< const char > null_ = _d_dynamicArray< const char >()) :
+ field(field),
+ null_(null_)
+ {}
+};
+
+extern void* typeof_null;
+
+extern void* inferred_null;
+
+struct MyString final
+{
+ _d_dynamicArray< const char > str;
+ MyString() :
+ str()
+ {
+ }
+ MyString(_d_dynamicArray< const char > str) :
+ str(str)
+ {}
+};
+
+struct Wrapper final
+{
+ MyString s1;
+ MyString s2;
+ Wrapper() :
+ s1(MyString(_d_dynamicArray< const char >( 5, "Hello" ))),
+ s2(MyString(_d_dynamicArray< const char >()))
+ {
+ }
+ Wrapper(MyString s1, MyString s2 = MyString(_d_dynamicArray< const char >())) :
+ s1(s1),
+ s2(s2)
+ {}
+};
+
+class UsingBase
+{
+public:
+ virtual void foo();
+};
+
+class UsingChild : public UsingBase
+{
+public:
+};
+---
+*/
+
+extern (C++) struct Null
+{
+ void* field = null;
+ string null_ = null;
+
+ @disable this(int);
+}
+
+extern (C++) __gshared typeof(null) typeof_null = null;
+extern (C++) __gshared inferred_null = null;
+
+extern (C++) struct MyString
+{
+ string str;
+}
+
+extern (C++) struct Wrapper
+{
+ MyString s1 = MyString("Hello");
+ MyString s2 = MyString(null);
+}
+
+extern (C++) class UsingBase
+{
+ void foo() {}
+}
+
+extern (C++) class UsingChild : UsingBase
+{
+ alias foo = UsingBase.foo;
+}
+
+public import dtoh_imports : aliasName = ImportsC;
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_enum.d b/gcc/testsuite/gdc.test/compilable/dtoh_enum.d
new file mode 100644
index 0000000..6a0dfd9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_enum.d
@@ -0,0 +1,271 @@
+/+
+REQUIRED_ARGS: -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+enum : int32_t { Anon = 10 };
+
+enum : bool { Anon2 = true };
+
+static const char* const Anon3 = "wow";
+
+enum class Enum
+{
+ One = 0,
+ Two = 1,
+};
+
+extern const Enum constEnum;
+
+enum class EnumDefaultType
+{
+ One = 1,
+ Two = 2,
+};
+
+enum class EnumWithType : int8_t
+{
+ One = 1,
+ Two = 2,
+};
+
+enum
+{
+ AnonOne = 1,
+ AnonTwo = 2,
+};
+
+enum : int64_t
+{
+ AnonWithTypeOne = 1LL,
+ AnonWithTypeTwo = 2LL,
+};
+
+namespace EnumWithStringType
+{
+ static const char* const One = "1";
+ static const char* const Two = "2";
+};
+
+namespace EnumWStringType
+{
+ static const char16_t* const One = u"1";
+};
+
+namespace EnumDStringType
+{
+ static const char32_t* const One = U"1";
+};
+
+namespace EnumWithImplicitType
+{
+ static const char* const One = "1";
+ static const char* const Two = "2";
+};
+
+namespace
+{
+ static const char* const AnonWithStringOne = "1";
+ static const char* const AnonWithStringTwo = "2";
+};
+
+enum : int32_t { AnonMixedOne = 1 };
+enum : int64_t { AnonMixedTwo = 2LL };
+static const char* const AnonMixedA = "a";
+
+
+enum class STC
+{
+ a = 1,
+ b = 2,
+};
+
+static STC const STC_D = (STC)3;
+
+struct Foo final
+{
+ int32_t i;
+ Foo() :
+ i()
+ {
+ }
+ Foo(int32_t i) :
+ i(i)
+ {}
+};
+
+namespace MyEnum
+{
+ static Foo const A = Foo(42);
+ static Foo const B = Foo(84);
+};
+
+static /* MyEnum */ Foo const test = Foo(42);
+
+struct FooCpp final
+{
+ int32_t i;
+ FooCpp() :
+ i()
+ {
+ }
+ FooCpp(int32_t i) :
+ i(i)
+ {}
+};
+
+namespace MyEnumCpp
+{
+ static FooCpp const A = FooCpp(42);
+ static FooCpp const B = FooCpp(84);
+};
+
+static /* MyEnum */ Foo const testCpp = Foo(42);
+
+extern const bool e_b;
+
+enum class opaque;
+enum class typedOpaque : int64_t;
+---
++/
+
+extern(C++):
+
+enum Anon = 10;
+extern(C++) enum Anon2 = true;
+extern(C++) enum Anon3 = "wow";
+
+enum Enum
+{
+ One,
+ Two
+}
+
+extern(C++) __gshared const(Enum) constEnum;
+
+enum EnumDefaultType : int
+{
+ One = 1,
+ Two = 2
+}
+
+enum EnumWithType : byte
+{
+ One = 1,
+ Two = 2
+}
+
+enum
+{
+ AnonOne = 1,
+ AnonTwo = 2
+}
+
+enum : long
+{
+ AnonWithTypeOne = 1,
+ AnonWithTypeTwo = 2
+}
+
+enum EnumWithStringType : string
+{
+ One = "1",
+ Two = "2"
+}
+
+enum EnumWStringType : wstring
+{
+ One = "1"
+}
+
+enum EnumDStringType : dstring
+{
+ One = "1"
+}
+
+enum EnumWithImplicitType
+{
+ One = "1",
+ Two = "2"
+}
+
+enum : string
+{
+ AnonWithStringOne = "1",
+ AnonWithStringTwo = "2"
+}
+
+enum
+{
+ AnonMixedOne = 1,
+ long AnonMixedTwo = 2,
+ string AnonMixedA = "a"
+}
+
+enum STC
+{
+ a = 1,
+ b = 2,
+}
+
+extern(C++) enum STC_D = STC.a | STC.b;
+
+struct Foo { int i; }
+enum MyEnum { A = Foo(42), B = Foo(84) }
+extern(C++) enum test = MyEnum.A;
+
+extern(C++) struct FooCpp { int i; }
+enum MyEnumCpp { A = FooCpp(42), B = FooCpp(84) }
+extern(C++) enum testCpp = MyEnum.A;
+
+// currently unsupported enums
+extern(C++) enum b = [1, 2, 3];
+extern(C++) enum c = [2: 3];
+
+extern(C) void foo();
+extern(C++) enum d = &foo;
+
+__gshared immutable bool e_b;
+extern(C++) enum e = &e_b;
+
+enum opaque;
+enum typedOpaque : long;
+enum arrayOpaque : int[4]; // Cannot be exported to C++
+
+extern(D) enum hidden_d = 42; // Linkage prevents being exported to C++
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_enum_cpp98.d b/gcc/testsuite/gdc.test/compilable/dtoh_enum_cpp98.d
new file mode 100644
index 0000000..2330d76
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_enum_cpp98.d
@@ -0,0 +1,244 @@
+/+
+REQUIRED_ARGS: -extern-std=c++98 -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+static int32_t const Anon = 10;
+
+static bool const Anon2 = true;
+
+static const char* const Anon3 = "wow";
+
+enum Enum
+{
+ Enum_One = 0,
+ Enum_Two = 1,
+};
+
+enum EnumDefaultType
+{
+ EnumDefaultType_One = 1,
+ EnumDefaultType_Two = 2,
+};
+
+enum EnumWithType
+{
+ EnumWithType_One = 1,
+ EnumWithType_Two = 2,
+};
+
+enum
+{
+ AnonOne = 1,
+ AnonTwo = 2,
+};
+
+enum
+{
+ AnonWithTypeOne = 1LL,
+ AnonWithTypeTwo = 2LL,
+};
+
+namespace EnumWithStringType
+{
+ static const char* const One = "1";
+ static const char* const Two = "2";
+};
+
+namespace EnumWithImplicitType
+{
+ static const char* const One = "1";
+ static const char* const Two = "2";
+};
+
+namespace
+{
+ static const char* const AnonWithStringOne = "1";
+ static const char* const AnonWithStringTwo = "2";
+};
+
+static int32_t const AnonMixedOne = 1;
+static int64_t const AnonMixedTwo = 2LL;
+static const char* const AnonMixedA = "a";
+
+
+enum STC
+{
+ STC_a = 1,
+ STC_b = 2,
+};
+
+static STC const STC_D = (STC)3;
+
+struct Foo final
+{
+ int32_t i;
+ Foo() :
+ i()
+ {
+ }
+ Foo(int32_t i) :
+ i(i)
+ {}
+};
+
+namespace MyEnum
+{
+ static Foo const A = Foo(42);
+ static Foo const B = Foo(84);
+};
+
+static /* MyEnum */ Foo const test = Foo(42);
+
+struct FooCpp final
+{
+ int32_t i;
+ FooCpp() :
+ i()
+ {
+ }
+ FooCpp(int32_t i) :
+ i(i)
+ {}
+};
+
+namespace MyEnumCpp
+{
+ static FooCpp const A = FooCpp(42);
+ static FooCpp const B = FooCpp(84);
+};
+
+static /* MyEnum */ Foo const testCpp = Foo(42);
+
+extern const bool e_b;
+---
++/
+
+extern(C++):
+enum Anon = 10;
+extern(C++) enum Anon2 = true;
+extern(C++) enum Anon3 = "wow";
+
+enum Enum
+{
+ One,
+ Two
+}
+
+enum EnumDefaultType : int
+{
+ One = 1,
+ Two = 2
+}
+
+enum EnumWithType : byte
+{
+ One = 1,
+ Two = 2
+}
+
+enum
+{
+ AnonOne = 1,
+ AnonTwo = 2
+}
+
+enum : long
+{
+ AnonWithTypeOne = 1,
+ AnonWithTypeTwo = 2
+}
+
+enum EnumWithStringType : string
+{
+ One = "1",
+ Two = "2"
+}
+
+enum EnumWithImplicitType
+{
+ One = "1",
+ Two = "2"
+}
+
+enum : string
+{
+ AnonWithStringOne = "1",
+ AnonWithStringTwo = "2"
+}
+
+enum
+{
+ AnonMixedOne = 1,
+ long AnonMixedTwo = 2,
+ string AnonMixedA = "a"
+}
+
+enum STC
+{
+ a = 1,
+ b = 2,
+}
+
+extern(C++) enum STC_D = STC.a | STC.b;
+
+struct Foo { int i; }
+enum MyEnum { A = Foo(42), B = Foo(84) }
+extern(C++) enum test = MyEnum.A;
+
+extern(C++) struct FooCpp { int i; }
+enum MyEnumCpp { A = FooCpp(42), B = FooCpp(84) }
+extern(C++) enum testCpp = MyEnum.A;
+
+// currently unsupported enums
+extern(C++) enum b = [1, 2, 3];
+extern(C++) enum c = [2: 3];
+
+extern(C) void foo();
+extern(C++) enum d = &foo;
+
+__gshared immutable bool e_b;
+extern(C++) enum e = &e_b;
+
+// Opaque enums require C++ 11
+enum opaque;
+enum typedOpaque : long;
+enum arrayOpaque : int[4];
+
+extern(D) enum hidden_d = 42; // Linkage prevents being exported to C++
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_expressions.d b/gcc/testsuite/gdc.test/compilable/dtoh_expressions.d
new file mode 100644
index 0000000..7919c67
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_expressions.d
@@ -0,0 +1,127 @@
+/+
+REQUIRED_ARGS: -o- -HC
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+extern int32_t foo();
+
+extern int32_t* somePtr;
+
+extern void insertedCast(double a = (double) foo());
+
+extern void explicitCast(int32_t b = foo());
+
+extern void requiredCast(void* ptr = (void*) foo());
+
+extern void stcCast(const int32_t* const ci = (const int32_t* const) somePtr);
+
+---
++/
+
+extern (C++):
+
+int foo() { return 0; }
+
+__gshared int* somePtr;
+
+void insertedCast(double a = foo()) {}
+
+void explicitCast(int b = cast(int) foo()) {}
+
+void requiredCast(void* ptr = cast(void*) foo()) {}
+
+void stcCast(const int* ci = cast(immutable) somePtr) {}
+
+/+
+TEST_OUTPUT:
+---
+template <typename T>
+extern T insertedTmpl(double a = static_cast<double>(foo()));
+
+template <typename T>
+extern T explicitTmpl(int32_t b = (int32_t) foo());
+
+template <typename T>
+extern T requiredTmpl(void* ptr = (void*) foo());
+
+template <typename T>
+extern T stcCastTmpl(int32_t* ci = (int32_t*) somePtr);
+
+template <typename T>
+extern T paramCastTmpl(int32_t* ci = (T) somePtr);
+---
++/
+
+T insertedTmpl(T)(double a = foo()) {}
+
+T explicitTmpl(T)(int b = cast(int) foo()) {}
+
+T requiredTmpl(T)(void* ptr = cast(void*) foo()) {}
+
+T stcCastTmpl(T)(const int* ci = cast(immutable) somePtr) {}
+
+T paramCastTmpl(T)(const int* ci = cast(T) somePtr) {}
+
+/+
+TEST_OUTPUT:
+---
+
+struct Data final
+{
+ static Data* pt;
+ static int32_t* bar();
+ Data()
+ {
+ }
+};
+
+extern void useData(bool a = !Data::pt, bool b = Data::bar() == nullptr, bool c = Data::bar() != nullptr);
+---
++/
+
+struct Data
+{
+ __gshared Data* pt;
+ static int* bar() { return null; }
+}
+
+void useData(
+ bool a = !Data.pt,
+ bool b = Data.bar() is null,
+ bool c = Data.bar() !is null
+) {}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_extern_type.d b/gcc/testsuite/gdc.test/compilable/dtoh_extern_type.d
new file mode 100644
index 0000000..91641a6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_extern_type.d
@@ -0,0 +1,174 @@
+/*
+https://issues.dlang.org/show_bug.cgi?id=21219
+
+REQUIRED_ARGS: -o- -HC
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+#if !defined(_d_real)
+# define _d_real long double
+#endif
+
+class ClassFromStruct final
+{
+public:
+ void foo();
+ ClassFromStruct()
+ {
+ }
+};
+
+class ClassFromClass
+{
+public:
+ virtual void foo();
+};
+
+struct StructFromStruct final
+{
+ void foo();
+ StructFromStruct()
+ {
+ }
+};
+
+struct StructFromClass
+{
+ virtual void foo();
+};
+
+struct Floats final
+{
+ float f;
+ double d;
+ _d_real r;
+ double nan;
+ double inf;
+ double nInf;
+ Floats() :
+ f(1.23F),
+ d(4.56),
+ r(7.89L),
+ nan(NAN),
+ inf(INFINITY),
+ nInf(-INFINITY)
+ {
+ }
+ Floats(float f, double d = 4.56, _d_real r = 7.89L, double nan = NAN, double inf = INFINITY, double nInf = -INFINITY) :
+ f(f),
+ d(d),
+ r(r),
+ nan(nan),
+ inf(inf),
+ nInf(nInf)
+ {}
+};
+
+struct Null final
+{
+ _d_dynamicArray< const char > null_;
+ Null() :
+ null_()
+ {
+ }
+ Null(_d_dynamicArray< const char > null_) :
+ null_(null_)
+ {}
+};
+
+struct Wrapper final
+{
+ Null n1;
+ Null n2;
+ Wrapper() :
+ n1(Null({ 5, "Hello" })),
+ n2(Null({}))
+ {
+ }
+ Wrapper(Null n1, Null n2 = Null({})) :
+ n1(n1),
+ n2(n2)
+ {}
+};
+
+extern const _d_dynamicArray< const char > helloWorld;
+---
+*/
+
+extern (C++, class) struct ClassFromStruct
+{
+ void foo() {}
+}
+
+extern (C++, class) class ClassFromClass
+{
+ void foo() {}
+}
+
+extern (C++, struct) struct StructFromStruct
+{
+ void foo() {}
+}
+
+extern (C++, struct) class StructFromClass
+{
+ void foo() {}
+}
+
+extern(C++) struct Floats
+{
+ float f = 1.23f;
+ double d = 4.56;
+ real r = 7.89L;
+
+ double nan = double.nan;
+ double inf = double.infinity;
+ double nInf = -double.infinity;
+}
+
+extern (C++) struct Null
+{
+ string null_ = null;
+}
+
+extern (C++) struct Wrapper
+{
+ Null n1 = Null("Hello");
+ Null n2 = Null(null);
+}
+
+extern(C++) __gshared immutable string helloWorld = `"Hello\World!"`;
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_forwarding.d b/gcc/testsuite/gdc.test/compilable/dtoh_forwarding.d
new file mode 100644
index 0000000..483e58f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_forwarding.d
@@ -0,0 +1,265 @@
+/*
+REQUIRED_ARGS: -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+struct Child;
+class Struct;
+enum class Enum;
+class ExternDClass;
+struct ExternDStruct;
+template <typename T>
+class TemplClass;
+template <typename T>
+class TemplStruct;
+template <typename T>
+class ExternDTemplClass;
+struct OnlyByRef;
+
+struct Parent
+{
+ virtual void bar();
+};
+
+struct OuterStruct final
+{
+ struct NestedStruct final
+ {
+ NestedStruct()
+ {
+ }
+ };
+
+ OuterStruct()
+ {
+ }
+};
+
+struct ExternDStructRequired final
+{
+ int32_t member;
+ ExternDStructRequired() :
+ member()
+ {
+ }
+ ExternDStructRequired(int32_t member) :
+ member(member)
+ {}
+};
+
+template <typename T>
+struct ExternDTemplStruct final
+{
+ // Ignoring var member alignment 0
+ T member;
+ ExternDTemplStruct()
+ {
+ }
+};
+
+extern Child* child;
+
+struct Child : public Parent
+{
+};
+
+extern Struct* strPtr;
+
+class Struct final
+{
+public:
+ Struct()
+ {
+ }
+};
+
+extern Enum* enumPtr;
+
+enum class Enum
+{
+ foo = 0,
+};
+
+extern OuterStruct::NestedStruct* nestedStrPtr;
+
+extern ExternDClass* externDClassPtr;
+
+extern ExternDStruct* externDStrPtr;
+
+extern ExternDStructRequired externDStr2;
+
+extern TemplClass<int32_t >* templClass;
+
+template <typename T>
+class TemplClass
+{
+ // Ignoring var member alignment 0
+public:
+ T member;
+};
+
+extern TemplStruct<int32_t >* templStruct;
+
+template <typename T>
+class TemplStruct
+{
+ // Ignoring var member alignment 0
+public:
+ T member;
+};
+
+extern ExternDTemplClass<int32_t >* externTemplClass;
+
+extern ExternDTemplStruct<int32_t > externTemplStruct;
+
+extern void foo(OnlyByRef& obr);
+
+---
+*/
+
+extern (C++):
+
+__gshared Child child;
+
+extern (C++, struct)
+class Child : Parent {}
+
+extern (C++, struct)
+class Parent {
+ void bar() {}
+}
+
+//******************************************************
+
+__gshared Struct* strPtr;
+
+extern (C++, class)
+struct Struct {}
+
+//******************************************************
+
+__gshared Enum* enumPtr;
+
+enum Enum
+{
+ foo
+}
+
+//******************************************************
+
+__gshared OuterStruct.NestedStruct* nestedStrPtr;
+
+struct OuterStruct
+{
+ static struct NestedStruct {}
+}
+
+//******************************************************
+
+__gshared ExternDClass externDClassPtr;
+
+// Not emitted because the forward declaration suffices
+extern(D) class ExternDClass
+{
+ int member;
+}
+
+//******************************************************
+
+__gshared ExternDStruct* externDStrPtr;
+
+// Not emitted because the forward declaration suffices
+extern(D) struct ExternDStruct
+{
+ int member;
+}
+
+//******************************************************
+
+__gshared ExternDStructRequired externDStr2;
+
+// Emitted because the forward declaration is not sufficient when declaring an instance
+extern(D) struct ExternDStructRequired
+{
+ int member;
+}
+
+//******************************************************
+
+__gshared TemplClass!int templClass;
+
+class TemplClass(T)
+{
+ T member;
+}
+
+//******************************************************
+
+__gshared TemplStruct!int templStruct;
+
+class TemplStruct(T)
+{
+ T member;
+}
+
+//******************************************************
+
+__gshared ExternDTemplClass!int externTemplClass;
+
+// Not emitted because the forward declaration suffices
+extern(D) class ExternDTemplClass(T)
+{
+ T member;
+}
+
+//******************************************************
+
+__gshared ExternDTemplStruct!int externTemplStruct;
+
+// Required
+extern(D) struct ExternDTemplStruct(T)
+{
+ T member;
+}
+
+//******************************************************
+
+extern(D) struct OnlyByRef {}
+
+void foo(ref OnlyByRef obr) {}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_functions.d b/gcc/testsuite/gdc.test/compilable/dtoh_functions.d
new file mode 100644
index 0000000..1ee6ce6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_functions.d
@@ -0,0 +1,276 @@
+/+
+REQUIRED_ARGS: -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+struct S final
+{
+ int32_t i;
+ int32_t get(int32_t , int32_t );
+ static int32_t get();
+ static const int32_t staticVar;
+ void useVars(int32_t pi = i, int32_t psv = staticVar);
+ struct Nested final
+ {
+ void useStaticVar(int32_t i = staticVar);
+ Nested()
+ {
+ }
+ };
+
+ S() :
+ i()
+ {
+ }
+ S(int32_t i) :
+ i(i)
+ {}
+};
+
+extern "C" int32_t bar(int32_t x);
+
+extern "C" int32_t bar2(int32_t x);
+
+extern "C" int32_t bar4(int32_t x = 42);
+
+extern int32_t baz(int32_t x);
+
+extern int32_t baz2(int32_t x);
+
+extern int32_t baz4(int32_t x = 42);
+
+extern size_t baz5(size_t x = 42);
+
+extern size_t& bazRef(size_t& x);
+
+enum class E : int64_t
+{
+ m = 1LL,
+};
+
+enum class MS : uint8_t
+{
+ dm = 0u,
+};
+
+namespace MSN
+{
+ static S const s = S(42);
+};
+
+struct W1 final
+{
+ MS ms;
+ /* MSN */ S msn;
+ W1()
+ {
+ }
+ W1(MS ms, /* MSN */ S msn = S(42)) :
+ ms(ms),
+ msn(msn)
+ {}
+};
+
+struct W2 final
+{
+ W1 w1;
+ W2() :
+ w1()
+ {
+ }
+ W2(W1 w1) :
+ w1(w1)
+ {}
+};
+
+extern W2 w2;
+
+extern void enums(uint64_t e = $?:32=1LLU|64=static_cast<uint64_t>(E::m)$, uint8_t e2 = static_cast<uint8_t>(w2.w1.ms), S s = static_cast<S>(w2.w1.msn));
+
+extern S s;
+
+extern void aggregates(int32_t a = s.i, int32_t b = s.get(1, 2), int32_t c = S::get(), int32_t d = S::staticVar);
+
+struct S2 final
+{
+ S s;
+ struct S3 final
+ {
+ static int32_t i;
+ S3()
+ {
+ }
+ };
+
+ S2() :
+ s()
+ {
+ }
+ S2(S s) :
+ s(s)
+ {}
+};
+
+extern S2 s2;
+
+extern void chains(int32_t a = s2.s.i, int32_t b = S2::S3::i);
+
+extern S* ptr;
+
+extern int32_t(*f)(int32_t );
+
+extern void special(int32_t a = ptr->i, int32_t b = ptr->get(1, 2), int32_t j = (*f)(1));
+
+extern void variadic(int32_t _param_0, ...);
+---
++/
+
+int foo(int x)
+{
+ return x * 42;
+}
+
+extern (C) int fun();
+extern (C++) int fun2();
+
+extern (C) int bar(int x)
+{
+ return x * 42;
+}
+
+extern (C) static int bar2(int x)
+{
+ return x * 42;
+}
+
+extern (C) private int bar3(int x)
+{
+ return x * 42;
+}
+
+extern (C) int bar4(int x = 42)
+{
+ return x * 42;
+}
+
+extern (C++) int baz(int x)
+{
+ return x * 42;
+}
+
+extern (C++) static int baz2(int x)
+{
+ return x * 42;
+}
+
+extern (C++) private int baz3(int x)
+{
+ return x * 42;
+}
+
+extern (C++) int baz4(int x = 42)
+{
+ return x * 42;
+}
+
+extern (C++) size_t baz5(size_t x = 42)
+{
+ return x * 42;
+}
+
+extern (C++) ref size_t bazRef(return ref size_t x)
+{
+ return x;
+}
+
+extern (C++):
+
+enum E : long
+{
+ m = 1
+}
+
+enum MS : ubyte { dm }
+enum MSN : S { s = S(42) }
+struct W1 { MS ms; MSN msn; }
+struct W2 { W1 w1; }
+__gshared W2 w2;
+
+void enums(ulong e = E.m, ubyte e2 = w2.w1.ms, S s = w2.w1.msn) {}
+
+struct S
+{
+ int i;
+ int get(int, int);
+ static int get();
+ __gshared const int staticVar;
+
+ void useVars(int pi = i, int psv = staticVar) {}
+
+ struct Nested
+ {
+ void useStaticVar(int i = staticVar) {}
+ }
+}
+
+__gshared S s;
+
+void aggregates(int a = s.i, int b = s.get(1, 2), int c = S.get(), int d = S.staticVar) {}
+
+struct S2
+{
+
+ S s;
+ static struct S3
+ {
+ __gshared int i = 3;
+ }
+}
+
+__gshared S2 s2;
+
+void chains(int a = s2.s.i, int b = S2.S3.i) {}
+
+__gshared S* ptr;
+__gshared int function(int) f;
+
+void special(int a = ptr.i, int b = ptr.get(1, 2), int j = f(1)) {}
+
+import core.stdc.stdarg;
+void variadic(int, ...) {}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_ignored.d b/gcc/testsuite/gdc.test/compilable/dtoh_ignored.d
new file mode 100644
index 0000000..47c0172
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_ignored.d
@@ -0,0 +1,150 @@
+/++
+REQUIRED_ARGS: -HC=verbose -c -o- -d
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler v$n$
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+#if !defined(_d_real)
+# define _d_real long double
+#endif
+
+class WithImaginary
+{
+public:
+ float memberIf;
+ double memberId;
+ _d_real memberIr;
+ _Complex float memberCf;
+ _Complex double memberCd;
+ _Complex _d_real memberCr;
+ _d_dynamicArray< float > nested;
+ // Ignored function dtoh_ignored.WithImaginary.onReturn because its return type cannot be mapped to C++
+private:
+ virtual void __vtable_slot_0();
+ // Ignored function dtoh_ignored.WithImaginary.onParam because one of its parameters has type `ifloat` which cannot be mapped to C++
+ virtual void __vtable_slot_1();
+};
+
+template <typename T>
+struct WithImaginaryTemplate final
+{
+ // Ignoring var member alignment 0
+ float member;
+ // Ignored function onReturn because its return type cannot be mapped to C++
+ // Ignored function onParam because one of its parameters has type `ifloat` which cannot be mapped to C++
+ // Ignoring var onVariable alignment 0
+ // Ignored variable onVariable because its type cannot be mapped to C++
+ WithImaginaryTemplate()
+ {
+ }
+};
+
+extern WithImaginaryTemplate<int32_t > instance;
+
+// Ignored variable dtoh_ignored.onVariable because its type cannot be mapped to C++
+// Ignored variable dtoh_ignored.onVariablePointer because its type cannot be mapped to C++
+// Ignored variable dtoh_ignored.onVariableSlice because its type cannot be mapped to C++
+// Ignored variable dtoh_ignored.onVariableArray because its type cannot be mapped to C++
+extern void* onVariableAssocArray;
+
+// Ignored variable dtoh_ignored.onVariableFunction because its type cannot be mapped to C++
+// Ignored variable dtoh_ignored.onVariableFunctionParam because its type cannot be mapped to C++
+// Ignored variable dtoh_ignored.onVariableDelegate because its type cannot be mapped to C++
+// Ignored function dtoh_ignored.myExit because its return type cannot be mapped to C++
+---
++/
+
+extern (C++):
+
+class WithImaginary
+{
+ ifloat memberIf;
+ idouble memberId;
+ ireal memberIr;
+
+ cfloat memberCf;
+ cdouble memberCd;
+ creal memberCr;
+
+ ifloat[] nested;
+
+ ifloat onReturn()
+ {
+ return 0i;
+ }
+
+ void onParam(ifloat) {}
+}
+
+struct WithImaginaryTemplate(T)
+{
+ ifloat member;
+
+ ifloat onReturn()
+ {
+ return 0i;
+ }
+
+ void onParam(ifloat)
+ {
+ }
+
+ __gshared ifloat onVariable;
+}
+
+__gshared WithImaginaryTemplate!int instance;
+
+__gshared ifloat onVariable;
+
+__gshared ifloat** onVariablePointer;
+
+__gshared ifloat[] onVariableSlice;
+
+__gshared ifloat[2] onVariableArray;
+
+__gshared ifloat[int] onVariableAssocArray;
+
+__gshared ifloat function() onVariableFunction;
+
+__gshared void function(ifloat) onVariableFunctionParam;
+
+__gshared ifloat delegate() onVariableDelegate;
+
+noreturn myExit()
+{
+ assert(false);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_invalid_identifiers.d b/gcc/testsuite/gdc.test/compilable/dtoh_invalid_identifiers.d
new file mode 100644
index 0000000..821c37c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_invalid_identifiers.d
@@ -0,0 +1,170 @@
+/+
+REQUIRED_ARGS: -HC -c -o- -wi -extern-std=c++20
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+compilable/dtoh_invalid_identifiers.d(103): Warning: function `register` is a keyword in C++
+compilable/dtoh_invalid_identifiers.d(103): The generated C++ header will contain identifiers that are keywords in C++
+compilable/dtoh_invalid_identifiers.d(105): Warning: namespace `const_cast` is a keyword in C++
+compilable/dtoh_invalid_identifiers.d(116): Warning: function `and` is a special operator in C++
+compilable/dtoh_invalid_identifiers.d(121): Warning: enum `mutable` is a keyword in C++
+compilable/dtoh_invalid_identifiers.d(123): Warning: alias `char8_t` is a keyword in C++20
+compilable/dtoh_invalid_identifiers.d(141): Warning: function `offsetof` is a default macro in C++
+compilable/dtoh_invalid_identifiers.d(143): Warning: function `wchar_t` is a keyword in C++11
+compilable/dtoh_invalid_identifiers.d(145): Warning: function `__attribute__` is a reserved identifier in C++
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+extern void register(int32_t* ptr);
+
+namespace const_cast
+{
+ extern void bar();
+
+}
+template <typename register_>
+struct S final
+{
+ // Ignoring var x alignment 0
+ register_ x;
+ S()
+ {
+ }
+};
+
+struct S2 final
+{
+ int32_t register_;
+ void and();
+ S2() :
+ register_()
+ {
+ }
+ S2(int32_t register_) :
+ register_(register_)
+ {}
+};
+
+extern void f(int32_t alignas_);
+
+enum class mutable
+{
+ yes = 0,
+ no = 1,
+};
+
+typedef S<char > char8_t;
+
+class Base
+{
+public:
+ virtual void foo();
+};
+
+template <typename typename_>
+class Alias : public typename_
+{
+};
+
+extern void user(Alias<Base* >* i);
+
+template <typename typename_>
+struct InvalidNames final
+{
+ // Ignoring var register alignment 0
+ typename_ register_;
+ void foo(typename_ and_);
+ InvalidNames()
+ {
+ }
+};
+
+extern void useInvalid(InvalidNames<int32_t > _param_0);
+
+extern size_t offsetof();
+
+extern void wchar_t();
+
+extern void __attribute__();
+---
++/
+#line 100
+extern(C++):
+
+__gshared bool and;
+void register(int* ptr) {}
+
+extern(C++, const_cast)
+void bar() {}
+
+struct S(register)
+{
+ register x;
+}
+
+struct S2
+{
+ int register;
+ void and() {}
+}
+
+void f(int alignas) {}
+
+enum mutable { yes, no }
+
+alias char8_t = S!char;
+
+class Base {
+ void foo() {}
+}
+class Alias(typename) : typename {}
+
+void user(Alias!Base i) {}
+
+struct InvalidNames(typename)
+{
+ typename register;
+
+ void foo(typename and) {}
+}
+
+void useInvalid(InvalidNames!int) {}
+
+size_t offsetof() { return 0; }
+
+void wchar_t() {}
+
+void __attribute__() {}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_names.d b/gcc/testsuite/gdc.test/compilable/dtoh_names.d
new file mode 100644
index 0000000..068fc68
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_names.d
@@ -0,0 +1,260 @@
+/+
+REQUIRED_ARGS: -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+struct Outer final
+{
+ static Outer* outerPtr;
+ static Middle::Inner* outerToInnerPtr;
+ static Middle::InnerTmpl<int32_t >* outerToInnerTmplPtr;
+ struct Middle final
+ {
+ static Outer* middleOuterPtr;
+ static Middle* middlePtr;
+ static Inner* middleInnerPtr;
+ struct Inner final
+ {
+ static Outer* innerOuterPtr;
+ static Middle* innerPtr;
+ static Inner* innerInnerPtr;
+ static InnerTmpl<int32_t >* innerInnerTmplPtr;
+ Inner()
+ {
+ }
+ };
+
+ template <typename U>
+ struct InnerTmpl final
+ {
+ // Ignoring var innerTmplOuterPtr alignment 0
+ static Outer* innerTmplOuterPtr;
+ // Ignoring var innerTmplPtr alignment 0
+ static Middle* innerTmplPtr;
+ // Ignoring var innerTmplInnerPtr alignment 0
+ static Inner* innerTmplInnerPtr;
+ // Ignoring var innerTmplInnerTmplPtr alignment 0
+ static InnerTmpl* innerTmplInnerTmplPtr;
+ InnerTmpl()
+ {
+ }
+ };
+
+ Middle()
+ {
+ }
+ };
+
+ template <typename T>
+ struct MiddleTmpl final
+ {
+ // Ignoring var middleTmplPtr alignment 0
+ static MiddleTmpl<T >* middleTmplPtr;
+ // Ignoring var middleTmplInnerTmplPtr alignment 0
+ static MiddleTmpl<T >* middleTmplInnerTmplPtr;
+ struct Inner final
+ {
+ // Ignoring var ptr alignment 0
+ static Inner* ptr;
+ // Ignoring var ptr2 alignment 0
+ static MiddleTmpl<T >* ptr2;
+ Inner()
+ {
+ }
+ };
+
+ template <typename U>
+ struct InnerTmpl final
+ {
+ // Ignoring var innerTmplPtr alignment 0
+ static InnerTmpl* innerTmplPtr;
+ // Ignoring var innerTmplPtrDiff alignment 0
+ static InnerTmpl<char >* innerTmplPtrDiff;
+ // Ignoring var middleTmplInnerTmplPtr alignment 0
+ static MiddleTmpl<T >* middleTmplInnerTmplPtr;
+ // Ignoring var a alignment 0
+ static T a;
+ static U bar();
+ InnerTmpl()
+ {
+ }
+ };
+
+ MiddleTmpl()
+ {
+ }
+ };
+
+ Outer()
+ {
+ }
+};
+
+---
++/
+
+extern(C++):
+
+struct Outer
+{
+ __gshared Outer* outerPtr;
+ __gshared Middle.Inner* outerToInnerPtr;
+ __gshared Middle.InnerTmpl!int* outerToInnerTmplPtr;
+
+ static struct Middle
+ {
+ __gshared Outer* middleOuterPtr;
+ __gshared Middle* middlePtr;
+ __gshared Inner* middleInnerPtr;
+
+ static struct Inner
+ {
+ __gshared Outer* innerOuterPtr;
+ __gshared Middle* innerPtr;
+ __gshared Inner* innerInnerPtr;
+ __gshared InnerTmpl!int* innerInnerTmplPtr;
+ }
+
+ static struct InnerTmpl(U)
+ {
+ __gshared Outer* innerTmplOuterPtr;
+ __gshared Middle* innerTmplPtr;
+ __gshared Inner* innerTmplInnerPtr;
+ __gshared InnerTmpl* innerTmplInnerTmplPtr;
+ }
+ }
+
+ static struct MiddleTmpl(T)
+ {
+ __gshared MiddleTmpl!T* middleTmplPtr;
+ __gshared MiddleTmpl!T.Inner* middleTmplInnerTmplPtr;
+
+ static struct Inner
+ {
+ __gshared Inner* ptr;
+ __gshared MiddleTmpl!T.Inner* ptr2;
+ }
+
+ static struct InnerTmpl(U)
+ {
+ __gshared InnerTmpl* innerTmplPtr;
+ __gshared InnerTmpl!char* innerTmplPtrDiff;
+ __gshared MiddleTmpl!T.Inner* middleTmplInnerTmplPtr;
+
+ __gshared T a;
+ static U bar() { return U.init; }
+ }
+ }
+}
+
+/+
+TEST_OUTPUT:
+---
+extern Outer::Middle::Inner inner;
+
+extern Outer::Middle::InnerTmpl<int32_t > innerTmpl;
+
+extern Outer::MiddleTmpl<int32_t >::Inner middleTmpl;
+
+extern Outer::MiddleTmpl<int32_t >::InnerTmpl<double > bothTmpl;
+
+---
++/
+
+__gshared Outer.Middle.Inner inner;
+
+__gshared Outer.Middle.InnerTmpl!int innerTmpl;
+
+__gshared Outer.MiddleTmpl!int.Inner middleTmpl;
+
+__gshared Outer.MiddleTmpl!int.InnerTmpl!double bothTmpl;
+
+/+
+TEST_OUTPUT:
+---
+typedef Outer::MiddleTmpl<int32_t >::InnerTmpl<double > FullTmplInst;
+
+template <typename U>
+using FullTmpl = Outer::MiddleTmpl<int32_t >::InnerTmpl<U>;
+---
++/
+
+alias FullTmplInst = Outer.MiddleTmpl!int.InnerTmpl!double;
+
+alias FullTmpl = Outer.MiddleTmpl!int.InnerTmpl;
+
+/+
+TEST_OUTPUT:
+---
+extern void dotId(int32_t a = Outer::MiddleTmpl<int32_t >::InnerTmpl<double >::a);
+
+---
++/
+
+void dotId( int a = Outer.MiddleTmpl!int.InnerTmpl!double.a ) {}
+
+/+
+TEST_OUTPUT:
+---
+extern void castExp(double a = (double) Outer::MiddleTmpl<int32_t >::InnerTmpl<double >::a);
+
+---
++/
+
+void castExp( double a = Outer.MiddleTmpl!int.InnerTmpl!double.a ) {}
+
+/+
+TEST_OUTPUT:
+---
+extern void structLit(Outer::MiddleTmpl<int32_t >::InnerTmpl<double > a = Outer::MiddleTmpl<int32_t >::InnerTmpl<double >());
+
+---
++/
+
+void structLit( Outer.MiddleTmpl!int.InnerTmpl!double a = Outer.MiddleTmpl!int.InnerTmpl!double() ) {}
+
+/+
+TEST_OUTPUT:
+---
+extern void callExp(double a = Outer::MiddleTmpl<int32_t >::InnerTmpl<double >::bar());
+
+---
++/
+
+void callExp( double a = Outer.MiddleTmpl!int.InnerTmpl!double.bar() ) {}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_protection.d b/gcc/testsuite/gdc.test/compilable/dtoh_protection.d
new file mode 100644
index 0000000..2180c41
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_protection.d
@@ -0,0 +1,218 @@
+/**
+https://issues.dlang.org/show_bug.cgi?id=21218
+
+REQUIRED_ARGS: -HC -o-
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+struct S1 final
+{
+ int32_t a;
+protected:
+ int32_t b;
+ int32_t c;
+ int32_t d;
+private:
+ int32_t e;
+public:
+ S1()
+ {
+ }
+};
+
+class S2 final
+{
+public:
+ int32_t af();
+protected:
+ int32_t bf();
+ int32_t cf();
+ int32_t df();
+public:
+ S2()
+ {
+ }
+};
+
+class C1
+{
+public:
+ int32_t a;
+protected:
+ int32_t b;
+ int32_t c;
+ int32_t d;
+private:
+ int32_t e;
+};
+
+struct C2
+{
+ virtual int32_t af();
+protected:
+ virtual int32_t bf();
+ int32_t cf();
+ int32_t df();
+};
+
+struct Outer final
+{
+private:
+ int32_t privateOuter;
+public:
+ struct PublicInnerStruct final
+ {
+ private:
+ int32_t privateInner;
+ public:
+ int32_t publicInner;
+ PublicInnerStruct() :
+ publicInner()
+ {
+ }
+ PublicInnerStruct(int32_t publicInner) :
+ publicInner(publicInner)
+ {}
+ };
+
+private:
+ struct PrivateInnerClass final
+ {
+ private:
+ int32_t privateInner;
+ public:
+ int32_t publicInner;
+ PrivateInnerClass() :
+ publicInner()
+ {
+ }
+ PrivateInnerClass(int32_t publicInner) :
+ publicInner(publicInner)
+ {}
+ };
+
+public:
+ class PublicInnerInterface
+ {
+ public:
+ virtual void foo() = 0;
+ };
+
+private:
+ enum class PrivateInnerEnum
+ {
+ A = 0,
+ B = 1,
+ };
+
+public:
+ typedef PrivateInnerEnum PublicAlias;
+ Outer()
+ {
+ }
+};
+---
+*/
+
+module compilable.dtoh_protection;
+
+extern(C++) struct S1
+{
+ public int a;
+ protected int b;
+ package int c;
+ package(compilable) int d;
+ private int e;
+}
+
+extern(C++, class) struct S2
+{
+ public int af();
+ protected int bf();
+ package int cf();
+ package(compilable) int df();
+ private int ef();
+}
+
+extern(C++) class C1
+{
+ public int a;
+ protected int b;
+ package int c;
+ package(compilable) int d;
+ private int e;
+}
+
+extern(C++, struct) class C2
+{
+ public int af();
+ protected int bf();
+ package int cf();
+ package(compilable) int df();
+ private int ef();
+}
+
+extern(C++) struct Outer
+{
+ private int privateOuter;
+
+ static struct PublicInnerStruct
+ {
+ private int privateInner;
+ int publicInner;
+ }
+
+ private static struct PrivateInnerClass
+ {
+ private int privateInner;
+ int publicInner;
+ }
+
+ static interface PublicInnerInterface
+ {
+ void foo();
+ }
+
+ private static enum PrivateInnerEnum
+ {
+ A,
+ B
+ }
+
+ public alias PublicAlias = PrivateInnerEnum;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_required_symbols.d b/gcc/testsuite/gdc.test/compilable/dtoh_required_symbols.d
new file mode 100644
index 0000000..6e2d2f1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_required_symbols.d
@@ -0,0 +1,225 @@
+/+
+REQUIRED_ARGS: -o- -HC
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+class ExternDClass;
+struct ExternDStruct2;
+struct ExternDStruct3;
+
+struct ExternDStruct final
+{
+ int32_t i;
+ double d;
+ ExternDStruct() :
+ i(),
+ d()
+ {
+ }
+ ExternDStruct(int32_t i, double d = NAN) :
+ i(i),
+ d(d)
+ {}
+};
+
+enum class ExternDEnum
+{
+ A = 0,
+};
+
+template <>
+struct ExternDStructTemplate final
+{
+ // Ignoring var i alignment 0
+ int32_t i;
+ // Ignoring var d alignment 0
+ double d;
+ ExternDStructTemplate()
+ {
+ }
+};
+
+class Object
+{
+ virtual void __vtable_slot_0();
+ virtual void __vtable_slot_1();
+ virtual void __vtable_slot_2();
+ virtual void __vtable_slot_3();
+public:
+ class Monitor
+ {
+ virtual void __vtable_slot_4();
+ virtual void __vtable_slot_5();
+ };
+
+};
+
+class ExternDClass : public Object
+{
+public:
+ int32_t i;
+ double d;
+};
+
+struct ExternDStruct2 final
+{
+ int32_t doStuff();
+ ExternDStruct2()
+ {
+ }
+};
+
+struct ExternDStruct3 final
+{
+ int32_t a;
+ ExternDStruct3() :
+ a()
+ {
+ }
+ ExternDStruct3(int32_t a) :
+ a(a)
+ {}
+};
+
+namespace ExternDEnum2
+{
+ static ExternDStruct3 const A = ExternDStruct3(1);
+};
+
+struct ExternCppStruct final
+{
+ ExternDStruct s;
+ ExternDEnum e;
+ ExternDStructTemplate< > st;
+ ExternCppStruct() :
+ s(),
+ st()
+ {
+ }
+ ExternCppStruct(ExternDStruct s, ExternDEnum e = (ExternDEnum)0, ExternDStructTemplate< > st = ExternDStructTemplate< >(0, NAN)) :
+ s(s),
+ e(e),
+ st(st)
+ {}
+};
+
+extern ExternDClass* globalC;
+
+extern void foo(int32_t arg = globalC.i);
+
+extern ExternDStruct2* globalS2;
+
+extern void bar(int32_t arg = globalS2->doStuff());
+
+extern /* ExternDEnum2 */ ExternDStruct3* globalE2;
+
+extern void baz(int32_t arg = globalE2->a);
+---
+
+Known issues:
+- class declarations must be emitted on member access
++/
+
+// extern(D) symbols are ignored upon first visit but required later
+
+struct ExternDStruct
+{
+ int i;
+ double d;
+
+ // None of these can be emitted due to the mismatched mangling
+ static double staticDouble;
+ static shared double staticSharedDouble;
+ __gshared double sharedDouble;
+}
+
+struct ExternDStruct2
+{
+ extern(C++) int doStuff()
+ {
+ return 1;
+ }
+}
+
+struct ExternDStruct3
+{
+ int a;
+}
+
+class ExternDClass
+{
+ int i;
+ double d;
+}
+
+enum ExternDEnum
+{
+ A
+}
+
+enum ExternDEnum2 : ExternDStruct3
+{
+ A = ExternDStruct3(1)
+}
+
+struct ExternDStructTemplate()
+{
+ int i;
+ double d;
+}
+
+extern (C++):
+
+struct ExternCppStruct
+{
+ ExternDStruct s;
+ ExternDEnum e;
+ ExternDStructTemplate!() st;
+}
+
+__gshared ExternDClass globalC;
+
+void foo(int arg = globalC.i) {}
+
+__gshared ExternDStruct2* globalS2;
+
+void bar(int arg = globalS2.doStuff()) {}
+
+__gshared ExternDEnum2* globalE2;
+
+void baz(int arg = globalE2.a) {}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_special_enum.d b/gcc/testsuite/gdc.test/compilable/dtoh_special_enum.d
new file mode 100644
index 0000000..a7c0a0d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_special_enum.d
@@ -0,0 +1,90 @@
+/+
+REQUIRED_ARGS: -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+enum class __c_not_special;
+extern "C" void fn_long(long _param_0);
+
+extern "C" void fn_ulong(unsigned long _param_0);
+
+extern "C" void fn_longlong(long long _param_0);
+
+extern "C" void fn_ulonglong(unsigned long long _param_0);
+
+extern "C" void fn_long_double(long double _param_0);
+
+extern "C" void fn_wchar_t(wchar_t _param_0);
+
+extern "C" void fn_complex_float(_Complex float _param_0);
+
+extern "C" void fn_complex_double(_Complex double _param_0);
+
+extern "C" void fn_complex_real(_Complex long double _param_0);
+
+extern "C" void fn_not_special(__c_not_special _param_0);
+
+---
++/
+
+enum __c_long : int;
+enum __c_ulong : int;
+enum __c_longlong : int;
+enum __c_ulonglong : int;
+enum __c_long_double : int;
+enum __c_wchar_t : int;
+enum __c_complex_float : int;
+enum __c_complex_double : int;
+enum __c_complex_real : int;
+enum __c_not_special : int;
+
+extern(C) void fn_long(__c_long) {}
+extern(C) void fn_ulong(__c_ulong) {}
+extern(C) void fn_longlong(__c_longlong) {}
+extern(C) void fn_ulonglong(__c_ulonglong) {}
+
+extern(C) void fn_long_double(__c_long_double) {}
+
+extern(C) void fn_wchar_t(__c_wchar_t) {}
+
+extern(C) void fn_complex_float(__c_complex_float) {}
+extern(C) void fn_complex_double(__c_complex_double) {}
+extern(C) void fn_complex_real(__c_complex_real) {}
+
+extern(C) void fn_not_special(__c_not_special) {}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_unittest_block.d b/gcc/testsuite/gdc.test/compilable/dtoh_unittest_block.d
new file mode 100644
index 0000000..ac58d0e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_unittest_block.d
@@ -0,0 +1,52 @@
+/*
+REQUIRED_ARGS: -HC -c -o-
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+
+---
+*/
+
+unittest
+{
+ extern (C++) int foo(int x)
+ {
+ return x * 42;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_verbose.d b/gcc/testsuite/gdc.test/compilable/dtoh_verbose.d
new file mode 100644
index 0000000..505ffdc
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtoh_verbose.d
@@ -0,0 +1,172 @@
+/*
+REQUIRED_ARGS: -HC=verbose -o- -Icompilable/extra-files
+PERMUTE_ARGS:
+EXTRA_FILES: extra-files/dtoh_imports.d extra-files/dtoh_imports2.d
+
+TEST_OUTPUT:
+---
+// Automatically generated by Digital Mars D Compiler v$n$
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <math.h>
+
+#ifdef CUSTOM_D_ARRAY_TYPE
+#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
+#else
+/// Represents a D [] array
+template<typename T>
+struct _d_dynamicArray final
+{
+ size_t length;
+ T *ptr;
+
+ _d_dynamicArray() : length(0), ptr(NULL) { }
+
+ _d_dynamicArray(size_t length_in, T *ptr_in)
+ : length(length_in), ptr(ptr_in) { }
+
+ T& operator[](const size_t idx) {
+ assert(idx < length);
+ return ptr[idx];
+ }
+
+ const T& operator[](const size_t idx) const {
+ assert(idx < length);
+ return ptr[idx];
+ }
+};
+#endif
+
+extern void importFunc();
+
+// Ignored function dtoh_verbose.foo because of linkage
+// Ignored variable dtoh_verbose.i because of linkage
+// Ignored function dtoh_verbose.bar because of linkage
+// Ignored struct dtoh_verbose.S because of linkage
+// Ignored class dtoh_verbose.C because of linkage
+// Ignored function dtoh_verbose.bar because it is extern
+// Ignored variable dtoh_verbose.i1 because of linkage
+// Ignored template dtoh_verbose.templ(T)(T t) because of linkage
+// Ignored alias dtoh_verbose.inst because of linkage
+// Ignored enum dtoh_verbose.arrayOpaque because of its base type
+// Ignored renamed import `myFunc = importFunc` because `using` only supports types
+struct A final
+{
+ // Ignored renamed import `myFunc = importFunc` because `using` only supports types
+ A()
+ {
+ }
+};
+
+struct Hidden final
+{
+ // Ignored function dtoh_verbose.Hidden.hidden because it is private
+ Hidden()
+ {
+ }
+};
+
+// Ignored alias dtoh_verbose.D because of linkage
+class Visitor
+{
+public:
+ virtual void stat();
+ // Ignored dtoh_verbose.Visitor.bar because `using` cannot rename functions in aggregates
+ // Ignored dtoh_verbose.Visitor.unused because free functions cannot be aliased in C++
+};
+
+extern void unused();
+
+// Ignored variable dtoh_verbose.and because its name is a special operator in C++
+template <typename T>
+struct FullImportTmpl final
+{
+ // Ignored `dtoh_imports` because it's inside of a template declaration
+ FullImportTmpl()
+ {
+ }
+};
+
+template <typename T>
+struct SelectiveImportsTmpl final
+{
+ // Ignored `__anonymous` because it's inside of a template declaration
+ SelectiveImportsTmpl()
+ {
+ }
+};
+---
+*/
+
+void foo() {}
+
+extern (D) {
+ int i;
+}
+
+void bar();
+
+struct S {}
+
+class C {}
+
+extern(C++) void bar();
+
+int i1;
+
+void templ(T)(T t) {}
+
+alias inst = templ!int;
+
+extern(C++)
+enum arrayOpaque : int[4];
+
+public import dtoh_imports : myFunc = importFunc;
+
+extern(C++) struct A
+{
+ public import dtoh_imports : myFunc = importFunc;
+}
+
+extern(C++) struct Hidden
+{
+ private void hidden() {}
+}
+
+private {
+ enum PI = 4;
+}
+
+alias D = size_t delegate (size_t x);
+
+extern(C++) T foo(T) = T.init;
+
+extern(C++) class Visitor
+{
+ void stat() {}
+
+ // Ignored because those cannot be represented in C++
+ alias bar = stat;
+ alias unused = .unused;
+}
+
+extern(C++) void unused() {}
+
+extern(C++) __gshared bool and;
+
+extern(C++) struct FullImportTmpl(T)
+{
+ public import dtoh_imports;
+
+}
+
+extern(C++) struct SelectiveImportsTmpl(T)
+{
+ public import dtoh_imports :
+ importFunc,
+ aliasName = ImportsC;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtorfields.d b/gcc/testsuite/gdc.test/compilable/dtorfields.d
new file mode 100644
index 0000000..1622f3e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtorfields.d
@@ -0,0 +1,52 @@
+// REQUIRED_ARGS: -preview=dtorfields
+//
+// https://issues.dlang.org/show_bug.cgi?id=21709
+// PERMUTE_ARGS: -betterC
+
+/******************************************
+ * https://issues.dlang.org/show_bug.cgi?id=20934
+ */
+struct HasDtor
+{
+ ~this() {}
+}
+
+struct Disable
+{
+ HasDtor member;
+ this() @disable;
+}
+
+extern(C++) class Extern
+{
+ HasDtor member;
+ this();
+}
+
+/******************************************
+ * https://issues.dlang.org/show_bug.cgi?id=21213
+ */
+class Parent
+{
+ this() nothrow pure @nogc @safe {}
+}
+
+class Child : Parent
+{
+ HasDtor member;
+}
+
+/******************************************
+ * https://issues.dlang.org/show_bug.cgi?id=21225
+ */
+
+struct NothrowConstructed
+{
+ ~this() {}
+}
+
+struct NothrowConstructor
+{
+ NothrowConstructed member;
+ this(int) pure nothrow {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/dtorfields_deprecation.d b/gcc/testsuite/gdc.test/compilable/dtorfields_deprecation.d
new file mode 100644
index 0000000..83014e3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/dtorfields_deprecation.d
@@ -0,0 +1,49 @@
+/**
+Checks that code still compiles when -preview=dtorfields is enabled by default
+but issues an appropriate deprecation message.
+
+Remove this test when the deprecations period ends, see visit(CtorDeclaration)
+in semantic3.d
+
+TEST_OUTPUT:
+---
+compilable/dtorfields_deprecation.d(30): Deprecation: `dtorfields_deprecation.Pure.this` has stricter attributes than its destructor (`pure`)
+compilable/dtorfields_deprecation.d(30): The destructor will be called if an exception is thrown
+compilable/dtorfields_deprecation.d(30): Either make the constructor `nothrow` or adjust the field destructors
+compilable/dtorfields_deprecation.d(42): Deprecation: `dtorfields_deprecation.NoGC.this` has stricter attributes than its destructor (`@nogc`)
+compilable/dtorfields_deprecation.d(42): The destructor will be called if an exception is thrown
+compilable/dtorfields_deprecation.d(42): Either make the constructor `nothrow` or adjust the field destructors
+compilable/dtorfields_deprecation.d(48): Deprecation: `dtorfields_deprecation.Safe.this` has stricter attributes than its destructor (`@system`)
+compilable/dtorfields_deprecation.d(48): The destructor will be called if an exception is thrown
+compilable/dtorfields_deprecation.d(48): Either make the constructor `nothrow` or adjust the field destructors
+---
+**/
+
+struct HasDtor
+{
+ ~this() {}
+}
+
+struct Pure
+{
+ HasDtor member;
+ this(int) pure {}
+}
+
+struct Nothrow
+{
+ HasDtor member;
+ this(int) nothrow {}
+}
+
+struct NoGC
+{
+ HasDtor member;
+ this(int) @nogc {}
+}
+
+struct Safe
+{
+ HasDtor member;
+ this(int) @safe {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/emptygenmain.d b/gcc/testsuite/gdc.test/compilable/emptygenmain.d
new file mode 100644
index 0000000..be7bee8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/emptygenmain.d
@@ -0,0 +1,3 @@
+// REQUIRED_ARGS: -main -c
+
+void foo() { }
diff --git a/gcc/testsuite/gdc.test/compilable/extra-files/c6395.d b/gcc/testsuite/gdc.test/compilable/extra-files/c6395.d
index 47e9c9c..58c76bc 100644
--- a/gcc/testsuite/gdc.test/compilable/extra-files/c6395.d
+++ b/gcc/testsuite/gdc.test/compilable/extra-files/c6395.d
@@ -1,4 +1,4 @@
-// 6395
+// https://issues.dlang.org/show_bug.cgi?id=6395
template map(alias fun) {
auto map(Range)(Range r) {
diff --git a/gcc/testsuite/gdc.test/compilable/extra-files/depsOutput9948a.d b/gcc/testsuite/gdc.test/compilable/extra-files/depsOutput9948a.d
deleted file mode 100644
index 3f4e3a3..0000000
--- a/gcc/testsuite/gdc.test/compilable/extra-files/depsOutput9948a.d
+++ /dev/null
@@ -1,6 +0,0 @@
-module depsOutput9948a;
-
-void templateFunc(string myImport)()
-{
- mixin(myImport);
-} \ No newline at end of file
diff --git a/gcc/testsuite/gdc.test/compilable/extra-files/dtoh_imports.d b/gcc/testsuite/gdc.test/compilable/extra-files/dtoh_imports.d
new file mode 100644
index 0000000..917ac29
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/extra-files/dtoh_imports.d
@@ -0,0 +1,13 @@
+extern(C++):
+
+public import dtoh_imports2 : MyStdcInt = customInt;
+
+class ImportsC {}
+
+void importFunc() {}
+
+private struct HiddenData {}
+
+enum : int {
+ IgnoreErrors
+}
diff --git a/gcc/testsuite/gdc.test/compilable/extra-files/dtoh_imports2.d b/gcc/testsuite/gdc.test/compilable/extra-files/dtoh_imports2.d
new file mode 100644
index 0000000..6ff5d8e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/extra-files/dtoh_imports2.d
@@ -0,0 +1,3 @@
+extern(C++):
+
+alias customInt = int;
diff --git a/gcc/testsuite/gdc.test/compilable/extra-files/emptymain.d b/gcc/testsuite/gdc.test/compilable/extra-files/emptymain.d
new file mode 100644
index 0000000..5d1cc79
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/extra-files/emptymain.d
@@ -0,0 +1 @@
+void main() { } \ No newline at end of file
diff --git a/gcc/testsuite/gdc.test/compilable/extra-files/header1.d b/gcc/testsuite/gdc.test/compilable/extra-files/header1.d
index 5eb6afd..209d4a0 100644
--- a/gcc/testsuite/gdc.test/compilable/extra-files/header1.d
+++ b/gcc/testsuite/gdc.test/compilable/extra-files/header1.d
@@ -1,10 +1,14 @@
+// REQUIRED_ARGS: -ignore
module foo.bar;
import core.vararg;
-import std.stdio;
+
+// Only compilable, declare inline
+void writeln(T...)(T) {}
pragma(lib, "test");
pragma(msg, "Hello World");
+pragma(linkerDirective, "/DEFAULTLIB:test2");
static assert(true, "message");
@@ -43,11 +47,11 @@ out (result)
{
assert(result == 0);
}
-body
+do
{
float f = float.infinity;
int i = cast(int) f;
- writeln((i,1),2);
+ writeln(i,1,2);
writeln(cast(int)float.max);
assert(i == cast(int)float.max);
assert(i == 0x80000000);
@@ -60,7 +64,7 @@ template Foo(T, int V)
{
void foo(...)
{
- static if (is(Object _ : X!TL, alias X, TL...)) {} // Bugzilla 10044
+ static if (is(Object _ : X!TL, alias X, TL...)) {} // https://issues.dlang.org/show_bug.cgi?id=10044
auto x = __traits(hasMember, Object, "noMember");
auto y = is(Object : X!TL, alias X, TL...);
@@ -82,7 +86,7 @@ template Foo(T, int V)
d--;
asm
- { naked ;
+ { naked ;
mov EAX, 3;
}
@@ -157,11 +161,11 @@ template Foo(T, int V)
}
try
- bar(1, 2);
+ bar(1, 2);
catch(Object o)
- x++;
+ x++;
finally
- x--;
+ x--;
Object o;
synchronized (o)
@@ -269,9 +273,6 @@ class Test
pure nothrow @safe @nogc unittest {}
pure nothrow @safe @nogc invariant {}
pure nothrow @safe @nogc invariant (true);
-
- pure nothrow @safe @nogc new (size_t sz) { return null; }
- pure nothrow @safe @nogc delete (void* p) { }
}
template templ( T )
@@ -410,16 +411,16 @@ struct T12
}
-// 6591
-import std.stdio : writeln, F = File;
+// https://issues.dlang.org/show_bug.cgi?id=6591
+import core.stdc.stdio : printf, F = FILE;
void foo6591()()
{
- import std.stdio : writeln, F = File;
+ import core.stdc.stdio : printf, F = FILE;
}
-// 8081
+// https://issues.dlang.org/show_bug.cgi?id=8081
version(unittest) {
pure nothrow unittest {}
pure nothrow unittest {}
@@ -430,7 +431,7 @@ version(unittest) {
}
-// 10334
+// https://issues.dlang.org/show_bug.cgi?id=10334
template Foo10334(T) if (Bar10334!()) {} ///
template Foo10334(T) if (Bar10334!100) {} ///
@@ -459,7 +460,7 @@ mixin Test10334!int a; ///
mixin Test10334!(int,long) b; ///
mixin Test10334!"str" c; ///
-// 12266
+// https://issues.dlang.org/show_bug.cgi?id=12266
auto clamp12266a(T1, T2, T3)(T1 x, T2 min_val, T3 max_val)
{
return 0;
@@ -473,10 +474,10 @@ pure clamp12266b(T1, T2, T3)(T1 x, T2 min_val, T3 max_val)
return 0;
}
-// 13832
+// https://issues.dlang.org/show_bug.cgi?id=13832
alias Dg13832 = ref int delegate();
-// 16590
+// https://issues.dlang.org/show_bug.cgi?id=16590
class TestClass {
int aa;
int b1, b2;
@@ -538,13 +539,50 @@ class Foo2A {
}
-// bugzilla 15676
+// https://issues.dlang.org/show_bug.cgi?id=15676
struct Foo3A(T)
{
@disable this(this);
@disable this();
}
+// return ref, return scope, return ref scope
+ref int foo(return ref int a) @safe
+{
+ return a;
+}
+
+int* foo(return scope int* a) @safe
+{
+ return a;
+}
+
+ref int* foo(scope return ref int* a) @safe
+{
+ return a;
+}
+
+struct SafeS
+{
+@safe:
+ ref SafeS foo() return
+ {
+ return this;
+ }
+
+ SafeS foo2() return scope
+ {
+ return this;
+ }
+
+ ref SafeS foo3() return scope
+ {
+ return this;
+ }
+
+ int* p;
+}
+
void test13x(@(10) int a, @(20) int, @(30) @(40) int[] arr...) {}
enum Test14UDA1;
diff --git a/gcc/testsuite/gdc.test/compilable/extra-files/header17125.d b/gcc/testsuite/gdc.test/compilable/extra-files/header17125.d
new file mode 100644
index 0000000..1b979ab
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/extra-files/header17125.d
@@ -0,0 +1,5 @@
+void func1(real value = 10.35e4L);
+void func2(real value = 520.199e3F);
+void func3(real value = 9.70e5);
+void func4(real value = 1024.5e2F);
+void func5(real value = 41250.2e1L);
diff --git a/gcc/testsuite/gdc.test/compilable/extra-files/header18365.d b/gcc/testsuite/gdc.test/compilable/extra-files/header18365.d
new file mode 100644
index 0000000..64d8ad0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/extra-files/header18365.d
@@ -0,0 +1,6 @@
+module foo.bar.ba;
+nothrow pure @nogc @safe package(foo)
+{
+ void foo();
+ nothrow pure @nogc @safe package(foo.bar) void foo2();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/extra-files/header2.d b/gcc/testsuite/gdc.test/compilable/extra-files/header2.d
index f8c52ff..7dc4659 100644
--- a/gcc/testsuite/gdc.test/compilable/extra-files/header2.d
+++ b/gcc/testsuite/gdc.test/compilable/extra-files/header2.d
@@ -18,7 +18,7 @@ void foo2(const C2 c);
struct Foo3
{
int k;
- ~this() @trusted @disable @nogc { k = 1; }
+ ~this() @trusted @disable @nogc @live { k = 1; }
this(this) { k = 2; }
}
@@ -91,7 +91,7 @@ template templateVariableBar(T) if (is(T == int))
auto flit = 3 / 2.0;
-// 11217
+// https://issues.dlang.org/show_bug.cgi?id=11217
void foo11217()( const int[] arr) {}
void foo11217()(immutable int[] arr) {}
void foo11217()( ref int[] arr) {}
@@ -101,7 +101,7 @@ void foo11217()( scope int[] arr) {}
void foo11217()( in int[] arr) {}
void foo11217()( inout int[] arr) {}
-// 13275
+// https://issues.dlang.org/show_bug.cgi?id=13275
void test13275()
{
if ( auto n = 1) {}
@@ -141,12 +141,69 @@ void test13275()
foreach (shared const(int) e; [1,2]) {}
}
-// 9766
+// https://issues.dlang.org/show_bug.cgi?id=9766
align (1) struct S9766
{
+align {}
align (true ? 2 : 3):
int var1;
align:
int var2;
}
+
+align(2) struct S12200_1
+{
+align:
+}
+
+align(2) struct S12200_2
+{
+align(1):
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=16140
+void gun()()
+{
+ int[] res;
+ while (auto va = fun()) {} // expression expected, not 'auto'
+
+ while (true)
+ if (auto va = fun()) {}
+ else break;
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=16649
+void leFoo()()
+{
+ sign = a == 2 ? false : (y < 0) ^ sign;
+ sign = a == 2 ? false : sign ^ (y < 0);
+ sign = 2 + 3 | 7 + 5;
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=17371
+interface LeInterface
+{}
+class LeClass
+{
+ this()
+ {
+ auto foo = new class () LeInterface {};
+ }
+}
+const levar = new class LeClass, LeInterface {};
+
+// https://issues.dlang.org/show_bug.cgi?id=20074
+class CC
+{
+ void fun()() @safe
+ {
+ () @trusted pure
+ {
+ } ();
+ }
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=17663
+private:
+public struct Export {}
diff --git a/gcc/testsuite/gdc.test/compilable/fail137.d b/gcc/testsuite/gdc.test/compilable/fail137.d
new file mode 100644
index 0000000..c6876d1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/fail137.d
@@ -0,0 +1,26 @@
+// https://issues.dlang.org/show_bug.cgi?id=751
+// Compiler segfault on template expansion
+
+extern(C) int printf(const char*, ...);
+
+template TypeTuple( TList... )
+{
+ alias TList TypeTuple;
+}
+
+template IndexOf( T, TList... )
+{
+ static if( TList.length == 0 )
+ const size_t IndexOf = 1;
+ else static if( is( T == typeof( TList[0] ) ) )
+ const size_t IndexOf = 0;
+ else
+ const size_t IndexOf = 1 + IndexOf!( T, (TList[1 .. $]) );
+}
+
+void main()
+{
+ TypeTuple!(int, long) T;
+ printf( "%u\n", cast(uint)IndexOf!(long, T) );
+}
+
diff --git a/gcc/testsuite/gdc.test/compilable/fieldwise.d b/gcc/testsuite/gdc.test/compilable/fieldwise.d
new file mode 100644
index 0000000..dfa76b4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/fieldwise.d
@@ -0,0 +1,11 @@
+// REQUIRED_ARGS: -preview=dip1000 -preview=fieldwise
+// EXTRA_FILES: imports/impfieldwise.d
+
+import imports.impfieldwise;
+
+@safe:
+
+bool test(S s, S t)
+{
+ return s == t; // comparison can access fields for ==
+}
diff --git a/gcc/testsuite/gdc.test/compilable/filefullpath_18911.d b/gcc/testsuite/gdc.test/compilable/filefullpath_18911.d
new file mode 100644
index 0000000..3d88ac2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/filefullpath_18911.d
@@ -0,0 +1,9 @@
+// REQUIRED_ARGS: -Icompilable/imports -c -o-
+// EXTRA_FILES: imports/a18911.d
+
+import a18911;
+
+enum THIS_FILE = __FILE_FULL_PATH__;
+enum suffix_this = "filefullpath_18911.d";
+
+static assert(THIS_FILE[0..$-suffix_this.length-1] == A_FILE[0..$-suffix_a.length-1]);
diff --git a/gcc/testsuite/gdc.test/compilable/fix13165.d b/gcc/testsuite/gdc.test/compilable/fix13165.d
new file mode 100644
index 0000000..a26cfd6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/fix13165.d
@@ -0,0 +1,12 @@
+/* REQUIRED_ARGS: -w -profile
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=13165
+
+void main()
+{
+ int i;
+ if (!i)
+ throw new Exception("Error");
+ assert(0);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/fix17145.d b/gcc/testsuite/gdc.test/compilable/fix17145.d
new file mode 100644
index 0000000..ab34c71
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/fix17145.d
@@ -0,0 +1,13 @@
+// https://issues.dlang.org/show_bug.cgi?id=17145
+
+auto tuple(T...)(T t) {
+ struct Result {
+ T expand;
+ }
+ return Result(t);
+}
+
+void baz()
+{
+ enum zoo = tuple(1, 2).expand; // Error: value of __tup1847 is not known at compile time
+}
diff --git a/gcc/testsuite/gdc.test/compilable/fix17349.d b/gcc/testsuite/gdc.test/compilable/fix17349.d
deleted file mode 100644
index 2222c35..0000000
--- a/gcc/testsuite/gdc.test/compilable/fix17349.d
+++ /dev/null
@@ -1,40 +0,0 @@
-/* REQUIRED_ARGS: -dw
- * PERMUTE_ARGS:
- * TEST_OUTPUT:
----
-compilable/fix17349.d(37): Deprecation: cannot implicitly override base class method `fix17349.E.foo` with `fix17349.F.foo`; add `override` attribute
----
- */
-
-// https://issues.dlang.org/show_bug.cgi?id=17349
-
-struct S { }
-
-class C {
- void bar();
- void foo(void* p);
- void abc(Object);
- void def(S);
-}
-
-class D : C {
- override void bar() const;
- override void foo(const void*);
- override void abc(const Object);
- override void def(const S);
-}
-
-alias fp_t = void function(int*);
-@safe void abc(const int*);
-fp_t fp = &abc;
-
-
-class E {
- void foo(void*);
-}
-
-class F : E {
- void foo(const void*);
-}
-
-
diff --git a/gcc/testsuite/gdc.test/compilable/fix20416.d b/gcc/testsuite/gdc.test/compilable/fix20416.d
new file mode 100644
index 0000000..19ad74d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/fix20416.d
@@ -0,0 +1,36 @@
+/* REQUIRED_ARGS: -preview=dip1000
+*/
+
+/********************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=20416
+
+alias P = int*;
+
+ref P foo(return ref P);
+
+P bar()
+{
+ P result;
+ return foo(result);
+}
+
+
+/********************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=20416
+
+
+struct S
+{
+ string x;
+ ref S foo() return;
+}
+
+
+S bar2()
+{
+ S result;
+ return result.foo();
+}
+
diff --git a/gcc/testsuite/gdc.test/compilable/fix21647.d b/gcc/testsuite/gdc.test/compilable/fix21647.d
index c129fa0..c1e1c48 100644
--- a/gcc/testsuite/gdc.test/compilable/fix21647.d
+++ b/gcc/testsuite/gdc.test/compilable/fix21647.d
@@ -1,5 +1,5 @@
/*
-REQUIRED_ARGS:
+REQUIRED_ARGS: -preview=rvaluerefparam
TEST_OUTPUT:
---
cast(void)0
@@ -28,3 +28,11 @@ void test3() { pragma(msg, V); }
pragma(msg, foo());
pragma(msg, main());
pragma(msg, V);
+
+/*************************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8255
+
+struct G {}
+struct F(T) { void f(ref T) {} }
+pragma(msg, F!G().f(G.init));
+
diff --git a/gcc/testsuite/gdc.test/compilable/fix21684.d b/gcc/testsuite/gdc.test/compilable/fix21684.d
new file mode 100644
index 0000000..116f1e4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/fix21684.d
@@ -0,0 +1,7 @@
+// https://issues.dlang.org/show_bug.cgi?id=21684
+
+
+struct S
+{
+ int[100_000] a;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/fix22180.d b/gcc/testsuite/gdc.test/compilable/fix22180.d
new file mode 100644
index 0000000..a4c32e0d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/fix22180.d
@@ -0,0 +1,5 @@
+// https://issues.dlang.org/show_bug.cgi?id=22180
+
+align(8) { int x; }
+//pragma(msg, x.alignof);
+static assert(x.alignof == 8);
diff --git a/gcc/testsuite/gdc.test/compilable/forward1.d b/gcc/testsuite/gdc.test/compilable/forward1.d
index 7417b03..7c5f76d 100644
--- a/gcc/testsuite/gdc.test/compilable/forward1.d
+++ b/gcc/testsuite/gdc.test/compilable/forward1.d
@@ -1,6 +1,7 @@
// REQUIRED_ARGS: -g
-// 104. fails only with -g
+// https://issues.dlang.org/show_bug.cgi?id=104
+// fails only with -g
Foofunc f;
alias int Foo;
diff --git a/gcc/testsuite/gdc.test/compilable/future.d b/gcc/testsuite/gdc.test/compilable/future.d
index 89a1396..3043984 100644
--- a/gcc/testsuite/gdc.test/compilable/future.d
+++ b/gcc/testsuite/gdc.test/compilable/future.d
@@ -1,7 +1,7 @@
/* PERMUTE_ARGS:
* TEST_OUTPUT:
---
-compilable/future.d(15): Deprecation: @future base class method future.A.msg is being overridden by future.B.msg; rename the latter
+compilable/future.d(15): Deprecation: `@__future` base class method `future.A.msg` is being overridden by `future.B.msg`; rename the latter
---
*/
diff --git a/gcc/testsuite/gdc.test/compilable/futurexf.d b/gcc/testsuite/gdc.test/compilable/futurexf.d
index c550b68..0a2df69 100644
--- a/gcc/testsuite/gdc.test/compilable/futurexf.d
+++ b/gcc/testsuite/gdc.test/compilable/futurexf.d
@@ -1,5 +1,5 @@
/* PERMUTE_ARGS:
- REQUIRED_ARGS: -Xffuture.json
+ REQUIRED_ARGS: -Xf${RESULTS_DIR}/compilable/futurexf.json
*/
class A
diff --git a/gcc/testsuite/gdc.test/compilable/fwdref21063.d b/gcc/testsuite/gdc.test/compilable/fwdref21063.d
new file mode 100644
index 0000000..2d0ca7f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/fwdref21063.d
@@ -0,0 +1,14 @@
+template Info(T, int line) {
+ static assert(__traits(getLinkage, T) == "C++");
+ alias Info = void;
+}
+
+// Forward reference
+static assert(__traits(getLinkage, Klass) == "C++");
+alias info1 = Info!(Klass, __LINE__);
+
+extern (C++) class Klass { void derp() {} }
+
+// Backward reference
+static assert(__traits(getLinkage, Klass) == "C++");
+alias info2 = Info!(Klass, __LINE__);
diff --git a/gcc/testsuite/gdc.test/compilable/header18364.d b/gcc/testsuite/gdc.test/compilable/header18364.d
new file mode 100644
index 0000000..c7e1e67
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/header18364.d
@@ -0,0 +1,24 @@
+/*
+REQUIRED_ARGS: -o- -Hf${RESULTS_DIR}/compilable/header18364.di
+PERMUTE_ARGS:
+OUTPUT_FILES: ${RESULTS_DIR}/compilable/header18364.di
+
+TEST_OUTPUT:
+---
+=== ${RESULTS_DIR}/compilable/header18364.di
+// D import file generated from 'compilable/header18364.d'
+module foo.bar.ba;
+nothrow pure @nogc @safe package(foo)
+{
+ void foo();
+ nothrow pure @nogc @safe package(foo.bar) void foo2();
+}
+---
+*/
+
+module foo.bar.ba;
+@safe pure nothrow @nogc package(foo):
+void foo();
+
+@safe pure nothrow @nogc package(foo.bar):
+void foo2();
diff --git a/gcc/testsuite/gdc.test/compilable/header18365.d b/gcc/testsuite/gdc.test/compilable/header18365.d
new file mode 100644
index 0000000..7e51fb2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/header18365.d
@@ -0,0 +1,34 @@
+/*
+REQUIRED_ARGS: -c -o- -Hf${RESULTS_DIR}/compilable/header18365.di
+PERMUTE_ARGS:
+OUTPUT_FILES: ${RESULTS_DIR}/compilable/header18365.di
+
+TEST_OUTPUT:
+---
+=== ${RESULTS_DIR}/compilable/header18365.di
+// D import file generated from 'compilable/header18365.d'
+struct FullCaseEntry
+{
+ dchar[3] seq;
+ ubyte n;
+ ubyte size;
+ ubyte entry_len;
+ auto const pure nothrow @nogc @property @trusted value() return
+ {
+ return seq[0..entry_len];
+ }
+}
+---
+*/
+
+struct FullCaseEntry
+{
+ dchar[3] seq;
+ ubyte n, size;
+ ubyte entry_len;
+
+ @property auto value() const @trusted pure nothrow @nogc return
+ {
+ return seq[0 .. entry_len];
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/ice11054.d b/gcc/testsuite/gdc.test/compilable/ice11054.d
index 1b8c63bd..5e35d5c 100644
--- a/gcc/testsuite/gdc.test/compilable/ice11054.d
+++ b/gcc/testsuite/gdc.test/compilable/ice11054.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/ice11054a.d
import imports.ice11054a;
static assert(!__traits(compiles, tuple()));
diff --git a/gcc/testsuite/gdc.test/compilable/ice11300.d b/gcc/testsuite/gdc.test/compilable/ice11300.d
index 473a1c2..6fccb15 100644
--- a/gcc/testsuite/gdc.test/compilable/ice11300.d
+++ b/gcc/testsuite/gdc.test/compilable/ice11300.d
@@ -1,5 +1,5 @@
// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/ice11300a.d
module ice11300;
import imports.ice11300a;
enum value = 42;
diff --git a/gcc/testsuite/gdc.test/compilable/ice11925.d b/gcc/testsuite/gdc.test/compilable/ice11925.d
deleted file mode 100644
index 630af42..0000000
--- a/gcc/testsuite/gdc.test/compilable/ice11925.d
+++ /dev/null
@@ -1,38 +0,0 @@
-void test11925a()
-{
- try
- {
- try
- {
- L1: {}
- }
- finally
- {
- }
- }
- finally
- {
- }
- goto L1;
-}
-
-void test11925b()
-{
- switch (1)
- {
- case 1:
- goto L1;
- break;
-
- default:
- break;
- }
-
- try
- {
- L1: { }
- }
- finally
- {
- }
-}
diff --git a/gcc/testsuite/gdc.test/compilable/ice13403.d b/gcc/testsuite/gdc.test/compilable/ice13403.d
index bb7c4e5..e452896 100644
--- a/gcc/testsuite/gdc.test/compilable/ice13403.d
+++ b/gcc/testsuite/gdc.test/compilable/ice13403.d
@@ -1,5 +1,6 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS: -o-
+// EXTRA_FILES: imports/ice13403a.d
import imports.ice13403a;
void main() {}
diff --git a/gcc/testsuite/gdc.test/compilable/ice13819.d b/gcc/testsuite/gdc.test/compilable/ice13819.d
new file mode 100644
index 0000000..88e93c6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ice13819.d
@@ -0,0 +1,7 @@
+// REQUIRED_ARGS: -O
+auto f (double a)
+{
+ return a % 2 != 0;
+}
+
+void main() {}
diff --git a/gcc/testsuite/gdc.test/compilable/ice1524.d b/gcc/testsuite/gdc.test/compilable/ice1524.d
index ffcf81b..6e59366 100644
--- a/gcc/testsuite/gdc.test/compilable/ice1524.d
+++ b/gcc/testsuite/gdc.test/compilable/ice1524.d
@@ -1,4 +1,5 @@
-// Issue 1524 - ICE(constfold.c) on using "is" with strings in CTFE
+// https://issues.dlang.org/show_bug.cgi?id=1524
+// ICE(constfold.c) on using "is" with strings in CTFE
/* 1524 PATCH Assertion failure: '0' on line 863 in file 'constfold.c'
constfold.c
diff --git a/gcc/testsuite/gdc.test/compilable/ice20044.d b/gcc/testsuite/gdc.test/compilable/ice20044.d
new file mode 100644
index 0000000..f85342c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ice20044.d
@@ -0,0 +1,10 @@
+struct Algebraic(T...)
+{
+ T t;
+}
+
+struct This;
+
+struct While(T) { T[] body; }
+
+alias Stmt = Algebraic!(While!(This));
diff --git a/gcc/testsuite/gdc.test/compilable/ice20415.d b/gcc/testsuite/gdc.test/compilable/ice20415.d
new file mode 100644
index 0000000..5eaafec
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ice20415.d
@@ -0,0 +1,16 @@
+// REQUIRED_ARGS: -O
+void t()
+{
+ auto a = A(false ? B().p : null);
+}
+
+struct A
+{
+ void* p;
+}
+
+struct B
+{
+ void* p;
+ ~this() {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/ice6538.d b/gcc/testsuite/gdc.test/compilable/ice6538.d
index 12d1ed0..2329f16 100644
--- a/gcc/testsuite/gdc.test/compilable/ice6538.d
+++ b/gcc/testsuite/gdc.test/compilable/ice6538.d
@@ -1,7 +1,7 @@
/**************************************/
-// 6538
+// https://issues.dlang.org/show_bug.cgi?id=6538
template allSatisfy(alias F, T...) { enum bool allSatisfy = true; }
template isIntegral(T) { enum bool isIntegral = true; }
@@ -23,7 +23,7 @@ void test6538b()
}
/**************************************/
-// 9361
+// https://issues.dlang.org/show_bug.cgi?id=9361
template Sym(alias A)
{
diff --git a/gcc/testsuite/gdc.test/compilable/ice854.d b/gcc/testsuite/gdc.test/compilable/ice854.d
index 3ede52e..13a5aff 100644
--- a/gcc/testsuite/gdc.test/compilable/ice854.d
+++ b/gcc/testsuite/gdc.test/compilable/ice854.d
@@ -1,4 +1,5 @@
-// Issue 854 - TypeTuple in anonymous delegate causes ice in glue.c
+// https://issues.dlang.org/show_bug.cgi?id=854
+// TypeTuple in anonymous delegate causes ice in glue.c
/* 854 VOTE PATCH (=2863, =2251?) Assertion failure: '0' on line 935 in file 'glue.c'
I haven't checked this patch myself.
diff --git a/gcc/testsuite/gdc.test/compilable/implicitconv.d b/gcc/testsuite/gdc.test/compilable/implicitconv.d
new file mode 100644
index 0000000..6fc7abf
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/implicitconv.d
@@ -0,0 +1,33 @@
+enum __c_wchar_t : wchar;
+
+alias wchar_t = __c_wchar_t;
+
+immutable(wchar_t)[] a = "somestring";
+const(wchar_t)[] b = "somestring";
+immutable(wchar_t)* c = "somestring";
+const(wchar_t)* d = "somestring";
+
+string foo = "foo";
+
+static assert(!__traits(compiles, { immutable(wchar_t)[] bar = foo; } ));
+static assert(!__traits(compiles, { const(wchar_t)[] bar = foo; } ));
+static assert(!__traits(compiles, { immutable(wchar_t)* bar = foo; } ));
+static assert(!__traits(compiles, { const(wchar_t)* bar = foo; } ));
+
+// https://issues.dlang.org/show_bug.cgi?id=17141
+static assert(is(typeof(true ? char.init : char.init) == char));
+static assert(is(typeof(true ? char.init : wchar.init) == dchar));
+static assert(is(typeof(true ? char.init : dchar.init) == dchar));
+static assert(is(typeof(true ? wchar.init : wchar.init) == wchar));
+static assert(is(typeof(true ? wchar.init : dchar.init) == dchar));
+static assert(is(typeof(true ? dchar.init : dchar.init) == dchar));
+
+enum cenum : char { a }
+enum wenum : wchar{ b }
+enum denum : dchar{ c }
+
+static assert(is(typeof(true ? char.init : cenum.init) == char));
+static assert(is(typeof(true ? wchar.init : cenum.init) == dchar));
+static assert(is(typeof(true ? char.init : wenum.init) == dchar));
+static assert(is(typeof(true ? dchar.init : wenum.init) == dchar));
+static assert(is(typeof(true ? cenum.init : wenum.init) == dchar));
diff --git a/gcc/testsuite/gdc.test/compilable/imports/a12511.d b/gcc/testsuite/gdc.test/compilable/imports/a12511.d
new file mode 100644
index 0000000..262bb61
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/a12511.d
@@ -0,0 +1,7 @@
+module a12511;
+
+public class A
+{
+ private static void foo() {}
+ public static void foo(int) {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/a18911.d b/gcc/testsuite/gdc.test/compilable/imports/a18911.d
new file mode 100644
index 0000000..81b46e0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/a18911.d
@@ -0,0 +1,2 @@
+enum A_FILE = __FILE_FULL_PATH__;
+enum suffix_a = "imports/a18911.d";
diff --git a/gcc/testsuite/gdc.test/compilable/imports/g313.d b/gcc/testsuite/gdc.test/compilable/imports/g313.d
index 92e703a..0a9d26b 100644
--- a/gcc/testsuite/gdc.test/compilable/imports/g313.d
+++ b/gcc/testsuite/gdc.test/compilable/imports/g313.d
@@ -1,6 +1,6 @@
module imports.g313;
-// adds public package imports (see Bugzilla 15900)
+// adds public package imports (see https://issues.dlang.org/show_bug.cgi?id=15900)
public import imports.g313public;
// same w/ deferred semantics
static if (true)
diff --git a/gcc/testsuite/gdc.test/compilable/imports/imp16088.d b/gcc/testsuite/gdc.test/compilable/imports/imp16088.d
new file mode 100644
index 0000000..5c5bc5e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/imp16088.d
@@ -0,0 +1 @@
+module imports.imp16088;
diff --git a/gcc/testsuite/gdc.test/compilable/imports/imp21832.d b/gcc/testsuite/gdc.test/compilable/imports/imp21832.d
new file mode 100644
index 0000000..ee4a1d6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/imp21832.d
@@ -0,0 +1,24 @@
+module imports.imp21832;
+static if(1)
+{
+ int fun(int a)
+ {
+ return a;
+ }
+ int tpl()(int a)
+ {
+ return a;
+ }
+}
+
+deprecated
+{
+ int fun(char a)
+ {
+ return a;
+ }
+ int tpl()(char a)
+ {
+ return a;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/imp22122.d b/gcc/testsuite/gdc.test/compilable/imports/imp22122.d
new file mode 100644
index 0000000..b29bae0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/imp22122.d
@@ -0,0 +1,5 @@
+module imports.imp22122;
+
+package struct Imp22122
+{
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/impfieldwise.d b/gcc/testsuite/gdc.test/compilable/imports/impfieldwise.d
new file mode 100644
index 0000000..df9b987
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/impfieldwise.d
@@ -0,0 +1,8 @@
+@safe:
+
+struct S
+{
+ private:
+ @safe:
+ int a, b;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/pkg11847/mod11847.d b/gcc/testsuite/gdc.test/compilable/imports/pkg11847/mod11847.d
new file mode 100644
index 0000000..5f8ef76
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/pkg11847/mod11847.d
@@ -0,0 +1,3 @@
+module pkg11847.mod11847;
+
+int func() { return 2; }
diff --git a/gcc/testsuite/gdc.test/compilable/imports/pkg11847/package.d b/gcc/testsuite/gdc.test/compilable/imports/pkg11847/package.d
new file mode 100644
index 0000000..0a6c1ec
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/pkg11847/package.d
@@ -0,0 +1,3 @@
+module pkg11847;
+
+int func() { return 1; }
diff --git a/gcc/testsuite/gdc.test/compilable/imports/protectionimp.d b/gcc/testsuite/gdc.test/compilable/imports/protectionimp.d
index 6c99cf3..2f3c711 100644
--- a/gcc/testsuite/gdc.test/compilable/imports/protectionimp.d
+++ b/gcc/testsuite/gdc.test/compilable/imports/protectionimp.d
@@ -22,7 +22,7 @@ private alias privC privA;
public mixin template publMT() {}
/***************************************************/
-// 14169
+// https://issues.dlang.org/show_bug.cgi?id=14169
template GetName14169(TemplateParam)
{
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test11563std_traits.d b/gcc/testsuite/gdc.test/compilable/imports/test11563std_traits.d
index 983fd11..0ee4643 100644
--- a/gcc/testsuite/gdc.test/compilable/imports/test11563std_traits.d
+++ b/gcc/testsuite/gdc.test/compilable/imports/test11563std_traits.d
@@ -16,7 +16,7 @@ template moduleName(alias T)
}
else
{
- pragma(msg, "--error--");
+ enum moduleName = "--error--";
}
}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test13582.d b/gcc/testsuite/gdc.test/compilable/imports/test13582.d
new file mode 100644
index 0000000..493dbc3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test13582.d
@@ -0,0 +1 @@
+deprecated module imports.test13582;
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test16709a.d b/gcc/testsuite/gdc.test/compilable/imports/test16709a.d
new file mode 100644
index 0000000..99d1fef
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test16709a.d
@@ -0,0 +1,2 @@
+module test16709a;
+public import imports.test16709b:to;
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test16709b.d b/gcc/testsuite/gdc.test/compilable/imports/test16709b.d
new file mode 100644
index 0000000..8fa00ab
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test16709b.d
@@ -0,0 +1,5 @@
+module test16709b;
+public:
+
+import imports.test16709c;
+import imports.test16709d;
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test16709c.d b/gcc/testsuite/gdc.test/compilable/imports/test16709c.d
new file mode 100644
index 0000000..1b45163
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test16709c.d
@@ -0,0 +1,2 @@
+void to(string units, D)(D td) { }
+
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test16709d.d b/gcc/testsuite/gdc.test/compilable/imports/test16709d.d
new file mode 100644
index 0000000..9f928af
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test16709d.d
@@ -0,0 +1,2 @@
+void to(T, D)(D td) { }
+
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test17441foo/bar.d b/gcc/testsuite/gdc.test/compilable/imports/test17441foo/bar.d
new file mode 100644
index 0000000..5b46b9e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test17441foo/bar.d
@@ -0,0 +1 @@
+module imports.test17441foo.bar;
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test17441foo/package.d b/gcc/testsuite/gdc.test/compilable/imports/test17441foo/package.d
new file mode 100644
index 0000000..d795f45
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test17441foo/package.d
@@ -0,0 +1 @@
+module imports.test17441foo;
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test17541_2.d b/gcc/testsuite/gdc.test/compilable/imports/test17541_2.d
new file mode 100644
index 0000000..4554bf2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test17541_2.d
@@ -0,0 +1,20 @@
+module two;
+
+import one;
+
+struct ET(bool a)
+{
+ enum e = BB.MAX_NUM_FIBERS;
+}
+
+alias Event = ET!false;
+
+struct TWOR(size_t M)
+{
+ Event e;
+
+ void open()
+ {
+ bb.foo();
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test17541_3.d b/gcc/testsuite/gdc.test/compilable/imports/test17541_3.d
new file mode 100644
index 0000000..5ddec9e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test17541_3.d
@@ -0,0 +1,15 @@
+module three;
+
+void aaa() @nogc
+{
+
+}
+
+struct TT(T)
+{
+ void insertabcdefg(T) // @nogc <-- deduction problem
+ {
+ //static assert(insertabcdefg.mangleof == "_D5three__T2TTTiZQg13insertabcdefgMFiZv");
+ aaa();
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test18651/algorithm.d b/gcc/testsuite/gdc.test/compilable/imports/test18651/algorithm.d
new file mode 100644
index 0000000..970f072
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test18651/algorithm.d
@@ -0,0 +1,14 @@
+struct SortedRange(Range)
+{
+ Range _input;
+}
+
+auto sort(Range)(Range)
+{
+ return SortedRange!Range();
+}
+
+auto uniq(Range)(Range)
+{
+ return SortedRange!Range();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test18651/b.d b/gcc/testsuite/gdc.test/compilable/imports/test18651/b.d
new file mode 100644
index 0000000..8ca3ca2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test18651/b.d
@@ -0,0 +1 @@
+import imports.test18651.c;
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test18651/c.d b/gcc/testsuite/gdc.test/compilable/imports/test18651/c.d
new file mode 100644
index 0000000..93b1d95
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test18651/c.d
@@ -0,0 +1,4 @@
+module imports.test18651.c;
+import imports.test18651.algorithm;
+
+const var = sort(string[].init);
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test18651/datetime.d b/gcc/testsuite/gdc.test/compilable/imports/test18651/datetime.d
new file mode 100644
index 0000000..43d5d66
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test18651/datetime.d
@@ -0,0 +1,7 @@
+void parseTZConversions()
+{
+ import imports.test18651.algorithm;
+
+ string[] value;
+ value.sort.uniq;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test18771a.d b/gcc/testsuite/gdc.test/compilable/imports/test18771a.d
new file mode 100644
index 0000000..7527c31
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test18771a.d
@@ -0,0 +1,3 @@
+module imports.test18771a;
+
+void foo(int) {}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test18771b.d b/gcc/testsuite/gdc.test/compilable/imports/test18771b.d
new file mode 100644
index 0000000..f48dc5f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test18771b.d
@@ -0,0 +1,3 @@
+module imports.test18771b;
+
+void foo(string) {}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test18771c.d b/gcc/testsuite/gdc.test/compilable/imports/test18771c.d
new file mode 100644
index 0000000..dc986d2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test18771c.d
@@ -0,0 +1,4 @@
+module imports.test18771c;
+
+import imports.test18771a, imports.test18771b;
+alias fooC = foo;
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test18771d.d b/gcc/testsuite/gdc.test/compilable/imports/test18771d.d
new file mode 100644
index 0000000..fbf2034
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test18771d.d
@@ -0,0 +1,4 @@
+module imports.test18771d;
+
+import imports.test18771b, imports.test18771a;
+alias fooD = foo;
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19187.d b/gcc/testsuite/gdc.test/compilable/imports/test19187.d
new file mode 100644
index 0000000..3bf435e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19187.d
@@ -0,0 +1,4 @@
+module imports.test19187;
+void test()() { }
+alias foo = test;
+alias foo = test;
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19344.d b/gcc/testsuite/gdc.test/compilable/imports/test19344.d
new file mode 100644
index 0000000..437968a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19344.d
@@ -0,0 +1,6 @@
+module imports.test19344;
+
+template getUDAs(alias symbol, alias attribute)
+{
+ alias getUDAs = __traits(getAttributes, symbol);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19656a.d b/gcc/testsuite/gdc.test/compilable/imports/test19656a.d
new file mode 100644
index 0000000..14642eaa
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19656a.d
@@ -0,0 +1,3 @@
+import test19656;
+
+class Corge: Foo { }
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19656b.d b/gcc/testsuite/gdc.test/compilable/imports/test19656b.d
new file mode 100644
index 0000000..ffcf17a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19656b.d
@@ -0,0 +1,13 @@
+import test19656;
+
+class Bar { }
+
+class Qux(T): Foo
+{
+ override void thunk() { }
+}
+
+class Fred
+{
+ Qux!Bar _q;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19656c.d b/gcc/testsuite/gdc.test/compilable/imports/test19656c.d
new file mode 100644
index 0000000..e4ccfee
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19656c.d
@@ -0,0 +1,3 @@
+import imports.test19656b;
+
+class Thud { }
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19657b.d b/gcc/testsuite/gdc.test/compilable/imports/test19657b.d
new file mode 100644
index 0000000..406cf6d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19657b.d
@@ -0,0 +1,6 @@
+import test19657g;
+import test19657a;
+import test19657e;
+class Frop: Seq {
+ override bool func(Foo rhs, Bar bee) { return false; }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19657c.d b/gcc/testsuite/gdc.test/compilable/imports/test19657c.d
new file mode 100644
index 0000000..e715ef0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19657c.d
@@ -0,0 +1,2 @@
+import test19657a;
+class Pol: Foo {}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19657d.d b/gcc/testsuite/gdc.test/compilable/imports/test19657d.d
new file mode 100644
index 0000000..59c9a54
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19657d.d
@@ -0,0 +1,2 @@
+import test19657a;
+class Trump: Foo {}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19657e.d b/gcc/testsuite/gdc.test/compilable/imports/test19657e.d
new file mode 100644
index 0000000..9707b2b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19657e.d
@@ -0,0 +1,2 @@
+import test19657f;
+class Bar { }
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19657f.d b/gcc/testsuite/gdc.test/compilable/imports/test19657f.d
new file mode 100644
index 0000000..b291018
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19657f.d
@@ -0,0 +1,3 @@
+class Baz {
+ import test19657d;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19657g.d b/gcc/testsuite/gdc.test/compilable/imports/test19657g.d
new file mode 100644
index 0000000..d641b20
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19657g.d
@@ -0,0 +1,2 @@
+import test19657d;
+class Seq: Trump {}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19746a.d b/gcc/testsuite/gdc.test/compilable/imports/test19746a.d
new file mode 100644
index 0000000..d0c6a8f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19746a.d
@@ -0,0 +1,2 @@
+import test19746;
+class Bar: Foo { }
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19746b.d b/gcc/testsuite/gdc.test/compilable/imports/test19746b.d
new file mode 100644
index 0000000..1ceacb4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19746b.d
@@ -0,0 +1,2 @@
+import test19746d;
+class Frop { }
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19746c.d b/gcc/testsuite/gdc.test/compilable/imports/test19746c.d
new file mode 100644
index 0000000..a90b048
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19746c.d
@@ -0,0 +1,2 @@
+import test19746a;
+class Qux: Bar { }
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19746d.d b/gcc/testsuite/gdc.test/compilable/imports/test19746d.d
new file mode 100644
index 0000000..36a3f82
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19746d.d
@@ -0,0 +1,10 @@
+import test19746;
+class Baz(T): Foo { }
+class Dap(T): Baz!T
+{
+ override void thunk() {}
+}
+class Zoo
+{
+ Dap!int _dap;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19750a.d b/gcc/testsuite/gdc.test/compilable/imports/test19750a.d
new file mode 100644
index 0000000..6677e2a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19750a.d
@@ -0,0 +1,2 @@
+import test19750c;
+class Bar {}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19750b.d b/gcc/testsuite/gdc.test/compilable/imports/test19750b.d
new file mode 100644
index 0000000..f0d8f90
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19750b.d
@@ -0,0 +1,2 @@
+import test19750d;
+class Frop {}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19750c.d b/gcc/testsuite/gdc.test/compilable/imports/test19750c.d
new file mode 100644
index 0000000..8de5797
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19750c.d
@@ -0,0 +1,4 @@
+import test19750d;
+class Qux: Thud {
+ override void thunk() {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19750d.d b/gcc/testsuite/gdc.test/compilable/imports/test19750d.d
new file mode 100644
index 0000000..06cf58b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test19750d.d
@@ -0,0 +1,6 @@
+import test19750;
+class Dap(T) {}
+class Thud: Foo {
+ Dap!int _dap;
+ void thunk() { }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test21227/..foo/a.txt b/gcc/testsuite/gdc.test/compilable/imports/test21227/..foo/a.txt
new file mode 100644
index 0000000..ce01362
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test21227/..foo/a.txt
@@ -0,0 +1 @@
+hello
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test21227/a..b.txt b/gcc/testsuite/gdc.test/compilable/imports/test21227/a..b.txt
new file mode 100644
index 0000000..ce01362
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test21227/a..b.txt
@@ -0,0 +1 @@
+hello
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test21227/a.txt b/gcc/testsuite/gdc.test/compilable/imports/test21227/a.txt
new file mode 100644
index 0000000..ce01362
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test21227/a.txt
@@ -0,0 +1 @@
+hello
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test21464a.d b/gcc/testsuite/gdc.test/compilable/imports/test21464a.d
new file mode 100644
index 0000000..e3468f8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/test21464a.d
@@ -0,0 +1,4 @@
+struct Mallocator
+{
+ static shared Mallocator instance;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/test63a.d b/gcc/testsuite/gdc.test/compilable/imports/test63a.d
index a8edbd8..d53b034 100644
--- a/gcc/testsuite/gdc.test/compilable/imports/test63a.d
+++ b/gcc/testsuite/gdc.test/compilable/imports/test63a.d
@@ -4,7 +4,7 @@ private import test63;
struct s {
- char a[ SIZE ];
+ char[SIZE] a;
}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/testcontracts.d b/gcc/testsuite/gdc.test/compilable/imports/testcontracts.d
index f7414ce..5d30965 100644
--- a/gcc/testsuite/gdc.test/compilable/imports/testcontracts.d
+++ b/gcc/testsuite/gdc.test/compilable/imports/testcontracts.d
@@ -11,7 +11,7 @@ class Base3602
assert(x > 0);
assert(y > 0);
}
- body
+ do
{
}
}
@@ -25,7 +25,7 @@ class Base5230
out (res)
{
}
- body
+ do
{
return 42;
}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/testlambda1.d b/gcc/testsuite/gdc.test/compilable/imports/testlambda1.d
new file mode 100644
index 0000000..c0a9696
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/testlambda1.d
@@ -0,0 +1,3 @@
+module imports.testlambda1;
+
+int bar() { return 7; }
diff --git a/gcc/testsuite/gdc.test/compilable/imports/testlambda2.d b/gcc/testsuite/gdc.test/compilable/imports/testlambda2.d
new file mode 100644
index 0000000..e96ef9f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/testlambda2.d
@@ -0,0 +1,3 @@
+module imports.testlambda2;
+
+int bar() { return 7; }
diff --git a/gcc/testsuite/gdc.test/compilable/imports/u20958.d b/gcc/testsuite/gdc.test/compilable/imports/u20958.d
new file mode 100644
index 0000000..df67583
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/u20958.d
@@ -0,0 +1,6 @@
+struct W()
+{
+ int[] J;
+}
+
+typeof(typeid(W!())) OB;
diff --git a/gcc/testsuite/gdc.test/compilable/interpret3.d b/gcc/testsuite/gdc.test/compilable/interpret3.d
index a2830ea..ff85856 100644
--- a/gcc/testsuite/gdc.test/compilable/interpret3.d
+++ b/gcc/testsuite/gdc.test/compilable/interpret3.d
@@ -2,8 +2,7 @@
/*
TEST_OUTPUT:
---
-compilable/interpret3.d(2914): Deprecation: `case` variables have to be `const` or `immutable`
-compilable/interpret3.d(6351): Deprecation: identity comparison of static arrays implicitly coerces them to slices, which are compared by reference
+compilable/interpret3.d(6350): Deprecation: identity comparison of static arrays implicitly coerces them to slices, which are compared by reference
---
*/
@@ -14,9 +13,9 @@ template compiles(int T)
alias TypeTuple(T...) = T;
-/**************************************************
- 3901 Arbitrary struct assignment, ref return
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=3901
+// Arbitrary struct assignment, ref return
struct ArrayRet
{
@@ -31,7 +30,7 @@ int arrayRetTest(int z)
}
static assert(arrayRetTest(51) == 51);
-// Bugzilla 3842 -- must not segfault
+// https://issues.dlang.org/show_bug.cgi?id=3842 -- must not segfault
int ice3842(int z)
{
ArrayRet w;
@@ -85,24 +84,24 @@ struct RetRefStruct
// Return value reference tests, for D2 only.
-ref RetRefStruct reffunc1(ref RetRefStruct a)
+ref RetRefStruct reffunc1(return ref RetRefStruct a)
{
int y = a.x;
return a;
}
-ref RetRefStruct reffunc2(ref RetRefStruct a)
+ref RetRefStruct reffunc2(return ref RetRefStruct a)
{
RetRefStruct z = a;
return reffunc1(a);
}
-ref int reffunc7(ref RetRefStruct aa)
+ref int reffunc7(return ref RetRefStruct aa)
{
return reffunc1(aa).x;
}
-ref int reffunc3(ref int a)
+ref int reffunc3(return ref int a)
{
return a;
}
@@ -111,18 +110,18 @@ struct RefTestStruct
{
RetRefStruct r;
- ref RefTestStruct reffunc4(ref RetRefStruct[3] a)
+ ref RefTestStruct reffunc4(ref RetRefStruct[3] a) return
{
return this;
}
- ref int reffunc6()
+ ref int reffunc6() return
{
return this.r.x;
}
}
-ref RetRefStruct reffunc5(ref RetRefStruct[3] a)
+ref RetRefStruct reffunc5(return ref RetRefStruct[3] a)
{
int t = 1;
for (int i = 0; i < 10; ++i)
@@ -189,9 +188,9 @@ static assert(retRefTest2() == 2);
static assert(retRefTest3() == 26);
static assert(retRefTest4() == 218);
-/**************************************************
- Bug 7887 assign to returned reference
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7887
+// assign to returned reference
bool test7887()
{
@@ -202,9 +201,9 @@ bool test7887()
}
static assert(test7887());
-/**************************************************
- Bug 7473 struct non-ref
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7473
+// struct non-ref
struct S7473
{
@@ -242,9 +241,8 @@ void bug7473b(S7473b s)
s.m.i = 2;
}
-/**************************************************
- Bug 4389
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=4389
int bug4389()
{
@@ -296,7 +294,8 @@ string ice4390()
static assert(mixin(ice4390()) == ``);
-// bug 5248 (D1 + D2)
+// https://issues.dlang.org/show_bug.cgi?id=5248
+// (D1 + D2)
struct Leaf5248
{
string Compile_not_ovloaded()
@@ -316,9 +315,9 @@ struct Matrix5248
static assert(Matrix5248().Compile());
-/**************************************************
- 4837 >>>=
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=4837
+// >>>=
bool bug4837()
{
@@ -333,9 +332,9 @@ bool bug4837()
static assert(bug4837());
-/**************************************************
- 10252 shift out of range
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10252
+// shift out of range
int lshr10252(int shift)
{
@@ -362,9 +361,9 @@ static assert(!is(typeof(compiles!(rshr10252(80)))));
static assert( is(typeof(compiles!(ushr10252( 2)))));
static assert(!is(typeof(compiles!(ushr10252(60)))));
-/**************************************************
- 1982 CTFE null problems
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=1982
+// CTFE null problems
enum a1982 = [1, 2, 3];
static assert(a1982 !is null);
@@ -375,16 +374,16 @@ static assert(!foo1982().length);
static assert(null is null);
-/**************************************************
- 7988 CTFE return values should be allowed in compile-time expressions
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7988
+// CTFE return values should be allowed in compile-time expressions
class X7988 { int y; this() { y = 2; } }
static assert((new X7988).y == 2);
-/**************************************************
- 8253 ICE: calling of member function of non-CTFE class variable
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8253
+// ICE: calling of member function of non-CTFE class variable
class Bug8253
{
@@ -396,9 +395,9 @@ class Bug8253
Bug8253 m8253;
static assert(!is(typeof(compiles!(m8253.j()))));
-/**************************************************
- 8285 Issue with slice returned from CTFE function
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8285
+// Issue with slice returned from CTFE function
string foo8285()
{
@@ -475,9 +474,9 @@ int thisbug2()
static assert(thisbug2());
-/**************************************************
- 6972 ICE with cast()cast()assign
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6972
+// ICE with cast()cast()assign
int bug6972()
{
@@ -487,9 +486,8 @@ int bug6972()
}
static assert(bug6972() == 3);
-/**************************************************
- Bug 6164
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6164
size_t bug6164()
{
@@ -641,7 +639,7 @@ size_t bug5524(int x, int[] more...)
static assert(bug5524(3) == 10);
-// 5722
+// https://issues.dlang.org/show_bug.cgi?id=5722
static assert(("" ~ "\&copy;"[0]).length == 1);
const char[] null5722 = null;
@@ -650,8 +648,13 @@ static assert(("\&copy;"[0] ~ null5722).length == 1);
/*******************************************
* Tests for CTFE Array support.
- * Including bugs 1330, 3801, 3835, 4050,
- * 4051, 5147, and major functionality
+ * https://issues.dlang.org/show_bug.cgi?id=1330
+ * https://issues.dlang.org/show_bug.cgi?id=3801
+ * https://issues.dlang.org/show_bug.cgi?id=3835
+ * https://issues.dlang.org/show_bug.cgi?id=4050
+ * https://issues.dlang.org/show_bug.cgi?id=4051
+ * https://issues.dlang.org/show_bug.cgi?id=5147
+ * and major functionality
*******************************************/
char[] bug1330StringIndex()
@@ -971,7 +974,7 @@ auto bug5852(const(string) s)
}
static assert(bug5852("abc") == 3);
-// 7217
+// https://issues.dlang.org/show_bug.cgi?id=7217
struct S7217 { int[] arr; }
@@ -998,7 +1001,8 @@ static assert(
return true;
}());
-// 7185 char[].length = n
+// https://issues.dlang.org/show_bug.cgi?id=7185
+// char[].length = n
bool bug7185()
{
@@ -1021,9 +1025,8 @@ bool bug9908()
}
static assert(bug9908());
-/*******************************************
- 6934
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6934
struct Struct6934
{
@@ -1049,15 +1052,13 @@ int bug6934()
}
static assert(bug6934());
-/*******************************************
- Bug 5671
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5671
static assert(['a', 'b'] ~ "c" == "abc");
-/*******************************************
- 8624
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8624
int evil8624()
{
@@ -1070,9 +1071,9 @@ int evil8624()
}
static assert(evil8624());
-/*******************************************
- 8644 array literal >,<
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8644
+// array literal >,<
int bug8644()
{
@@ -1090,18 +1091,16 @@ int bug8644()
}
static assert(bug8644());
-/*******************************************
- Bug 6159
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6159
struct A6159 {}
static assert({ return A6159.init is A6159.init; }());
static assert({ return [1] is [1]; }());
-/*******************************************
- Bug 5685
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5685
string bug5685()
{
@@ -1115,9 +1114,9 @@ struct Bug5865
}
}
-/*******************************************
- 6235 - Regression ICE on $ in template
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6235
+// Regression ICE on $ in template
struct Bug6235(R)
{
@@ -1126,15 +1125,14 @@ struct Bug6235(R)
Bug6235!(ubyte[]) bug6235;
-/*******************************************
- 8673 ICE
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8673
+// ICE
enum dollar8673 = [0][(() => $ - 1)()];
-/*******************************************
- Bug 5840
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5840
struct Bug5840
{
@@ -1164,9 +1162,8 @@ int bug5840(int u)
}
static assert(bug5840(1) == 56);
-/*******************************************
- 7810
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7810
int bug7810()
{
@@ -1207,9 +1204,8 @@ public:
}
const testTODsThrownZ = TimeOfDayZ(0);
-/*******************************************
- Bug 5954
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5954
struct Bug5954
{
@@ -1225,9 +1221,8 @@ void bug5954()
static assert(f.x == 10);
}
-/*******************************************
- Bug 5972
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5972
int bug5972()
{
@@ -1258,16 +1253,16 @@ int wconcat(wstring replace)
}
static assert(wconcat("X"w));
-/*******************************************
- 10397 string concat
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10397
+// string concat
static assert(!is(typeof(compiles!("abc" ~ undefined))));
static assert(!is(typeof(compiles!(otherundefined ~ "abc"))));
-/*******************************************
- 9634 struct concat
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=9634
+// struct concat
struct Bug9634
{
@@ -1292,9 +1287,8 @@ bool bug9634()
static assert(bug9634());
-/*******************************************
- Bug 4001: A Space Oddity
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=4001: A Space Oddity
int space() { return 4001; }
@@ -1305,15 +1299,14 @@ void oddity4001(int q)
static assert(bowie == 4001);
}
-/*******************************************
- Bug 3779
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=3779
static const bug3779 = ["123"][0][$ - 1];
-/*******************************************
- Bug 8893 ICE with bad struct literal
-*******************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8893
+// ICE with bad struct literal
struct Foo8893
{
@@ -1333,7 +1326,7 @@ struct Zadok
{
int[3] z;
char[4] s = void;
- ref int[] fog(ref int[] q) { return q; }
+ ref int[] fog(return ref int[] q) { return q; }
int bfg()
{
z[0] = 56;
@@ -1394,9 +1387,9 @@ int quop()
static assert(quop() == 8);
static assert(quop() == 8); // check for clobbering
-/**************************************************
- Bug 5676 tuple assign of struct that has void opAssign
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5676
+// tuple assign of struct that has void opAssign
struct S5676
{
@@ -1420,9 +1413,9 @@ bool ice5676()
static assert(ice5676());
-/**************************************************
- Bug 5682 Wrong CTFE with operator overloading
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5682
+// Wrong CTFE with operator overloading
struct A
{
@@ -1555,9 +1548,9 @@ int sdfgasf()
}
static assert(sdfgasf() == 1);
-/**************************************************
- 8830 slice of slice.ptr
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8830
+// slice of slice.ptr
string bug8830(string s)
{
@@ -1566,9 +1559,9 @@ string bug8830(string s)
}
static assert(bug8830("hello") == "el");
-/**************************************************
- 8608 ICE
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8608
+// ICE
void bug8608(ref int m) {}
void test8608()
@@ -1584,9 +1577,8 @@ void test8608()
static assert(!is(typeof(compiles!(foo(true) ))));
}
-/**************************************************
- Bug 7770
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7770
immutable char[] foo7770 = "abcde";
@@ -1609,9 +1601,9 @@ void baz7770()
static assert(bug7770b(foo7770[$ - 2]));
}
-/**************************************************
- 8601 ICE
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8601
+// ICE
dchar bug8601(dstring s)
{
@@ -1622,9 +1614,8 @@ dchar bug8601(dstring s)
enum dstring e8601 = [cast(dchar)'o', 'n'];
static assert(bug8601(e8601) == 'n');
-/**************************************************
- Bug 6015
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6015
struct Foo6015
{
@@ -1644,9 +1635,8 @@ bool func6015(string input)
static assert(func6015("test"));
-/**************************************************
- Bug 6001
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6001
void bug6001e(ref int[] s)
{
@@ -1694,10 +1684,11 @@ bool bug6001h()
}
static assert(bug6001h());
-/**************************************************
- 10243 wrong code *&arr as ref parameter
- 10551 wrong code (&arr)[0] as ref parameter
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10243
+// wrong code *&arr as ref parameter
+// https://issues.dlang.org/show_bug.cgi?id=10551
+// wrong code (&arr)[0] as ref parameter
void bug10243(ref int n)
{
@@ -1725,9 +1716,8 @@ bool test10243()
static assert(test10243());
-/**************************************************
- Bug 4910
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=4910
int bug4910(int a)
{
@@ -1739,9 +1729,9 @@ static assert(!is(typeof(Compiles!(bug4910(var4910)))));
static assert(bug4910(123));
-/**************************************************
- Bug 5845 - Regression(2.041)
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5845
+// Regression(2.041)
void test5845(ulong cols) {}
@@ -1762,9 +1752,8 @@ ulong nqueen(int n)
static assert(nqueen(2) == 65);
-/**************************************************
- Bug 5258
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5258
struct Foo5258 { int x; }
void bar5258(int n, ref Foo5258 fong)
@@ -1819,9 +1808,8 @@ size_t bug5258c()
}
static assert(bug5258c() == 20);
-/**************************************************
- Bug 6049
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6049
struct Bug6049
{
@@ -1834,9 +1822,8 @@ const Bug6049[] foo6049 = [Bug6049(6), Bug6049(17)];
static assert(foo6049[0].m == 6);
-/**************************************************
- Bug 6052
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6052
struct Bug6052
{
@@ -1939,9 +1926,8 @@ static assert({
return true;
}());
-/**************************************************
- Bug 6749
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6749
struct CtState
{
@@ -1989,9 +1975,9 @@ int keyAssign()
}
static assert(keyAssign() == 5);
-/**************************************************
- Bug 6054 -- AA literals
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6054
+// AA literals
enum x6054 = {
auto p = {
@@ -2002,9 +1988,8 @@ enum x6054 = {
return p;
}();
-/**************************************************
- Bug 6077
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6077
enum bug6077 = {
string s;
@@ -2012,9 +1997,9 @@ enum bug6077 = {
return s ~ t;
}();
-/**************************************************
- Bug 6078 -- Pass null array by ref
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6078
+// Pass null array by ref
struct Foo6078
{
@@ -2042,9 +2027,9 @@ static assert({
return bug6078(f.bar);
}() == 2);
-/**************************************************
- Bug 6079 -- Array bounds checking
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6079
+// Array bounds checking
static assert(!is(typeof(compiles!({
int[] x = [1, 2, 3, 4];
@@ -2053,9 +2038,8 @@ static assert(!is(typeof(compiles!({
}()
))));
-/**************************************************
- Bug 6100
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6100
struct S6100
{
@@ -2071,9 +2055,9 @@ S6100 init6100(int x)
static const S6100[2] s6100a = [init6100(1), init6100(2)];
static assert(s6100a[0].a == 1);
-/**************************************************
- Bug 4825 -- failed with -inline
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=4825
+// failed with -inline
int a4825()
{
@@ -2095,9 +2079,9 @@ void c4825()
static const int f = b4825();
}
-/**************************************************
- Bug 5708 -- failed with -inline
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5708
+// failed with -inline
string b5708(string s) { return s; }
string a5708(string s) { return b5708(s); }
@@ -2109,9 +2093,9 @@ void bug5708()
static assert(a5708("bar") == "bar");
}
-/**************************************************
- Bug 6120 -- failed with -inline
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6120
+// failed with -inline
struct Bug6120(T)
{
@@ -2122,9 +2106,9 @@ static assert({
return true;
}());
-/**************************************************
- Bug 6123 -- failed with -inline
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6123
+// failed with -inline
struct Bug6123(T)
{
@@ -2137,9 +2121,9 @@ static assert({
return true;
}());
-/**************************************************
- Bug 6053 -- ICE involving pointers
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6053
+// ICE involving pointers
static assert({
int* a = null;
@@ -2328,9 +2312,9 @@ bool nullptrcmp()
}
static assert(nullptrcmp());
-/**************************************************
- 10840 null pointer in dotvar
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10840
+// null pointer in dotvar
struct Data10840
{
@@ -2357,9 +2341,9 @@ bool bug10840(int n)
static assert(bug10840(0));
static assert(!is(typeof(Compileable!(bug10840(1)))));
-/**************************************************
- 8216 ptr inside a pointer range
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8216
+// ptr inside a pointer range
// Four-pointer relations. Return true if [p1 .. p2] points inside [q1 .. q2]
// (where the end points don't coincide).
@@ -2405,9 +2389,9 @@ bool bug8216()
}
static assert(bug8216());
-/**************************************************
- 6517 ptr++, ptr--
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6517
+// ptr++, ptr--
int bug6517()
{
@@ -2468,16 +2452,15 @@ static assert({
return 6;
}() == 6);
-/**************************************************
- Reduced version of bug 5615
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5615
const(char)[] passthrough(const(char)[] x)
{
return x;
}
-sizediff_t checkPass(Char1)(const(Char1)[] s)
+ptrdiff_t checkPass(Char1)(const(Char1)[] s)
{
const(Char1)[] balance = s[1 .. $];
return passthrough(balance).ptr - s.ptr;
@@ -2588,9 +2571,9 @@ struct AList
static assert(AList.checkList() == 2);
-/**************************************************
- 7194 pointers as struct members
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7194
+// pointers as struct members
struct S7194 { int* p, p2; }
@@ -2620,9 +2603,9 @@ int g7194()
static assert(f7194() == 0);
static assert(!is(typeof(compiles!(g7194()))));
-/**************************************************
- 7248 recursive struct pointers in array
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7248
+// recursive struct pointers in array
struct S7248 { S7248* ptr; }
@@ -2636,9 +2619,9 @@ bool bug7248()
}
static assert(bug7248());
-/**************************************************
- 7216 calling a struct pointer member
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7216
+// calling a struct pointer member
struct S7216
{
@@ -2662,9 +2645,9 @@ bool bug7216()
static assert(bug7216());
-/**************************************************
- 10858 Wrong code with array of pointers
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10858
+// Wrong code with array of pointers
bool bug10858()
{
@@ -2675,9 +2658,9 @@ bool bug10858()
}
static assert(bug10858());
-/**************************************************
- 12528 - painting inout type for value type literals
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12528
+// painting inout type for value type literals
inout(T)[] dup12528(T)(inout(T)[] a)
{
@@ -2692,9 +2675,9 @@ enum arr12528V2 = dup12528([0, 1]);
static assert(arr12528V1 == [0]);
static assert(arr12528V2 == [0, 1]);
-/**************************************************
- 9745 Allow pointers to static variables
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=9745
+// Allow pointers to static variables
shared int x9745;
shared int[5] y9745;
@@ -2751,9 +2734,9 @@ bool test9745b()
}
static assert(test9745b());
-/**************************************************
- 9364 ICE with pointer to local struct
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=9364
+// ICE with pointer to local struct
struct S9364
{
@@ -2769,9 +2752,9 @@ bool bug9364()
static assert(bug9364());
-/**************************************************
- 10251 Pointers to const globals
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10251
+// Pointers to const globals
static const int glob10251 = 7;
@@ -2783,9 +2766,9 @@ const(int)* bug10251()
static a10251 = &glob10251; // OK
static b10251 = bug10251();
-/**************************************************
- 4065 [CTFE] AA "in" operator doesn't work
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=4065
+// [CTFE] AA "in" operator doesn't work
bool bug4065(string s)
{
@@ -2807,9 +2790,9 @@ static assert(!bug4065("xx"));
static assert( bug4065("aa"));
static assert( bug4065("bb"));
-/**************************************************
- 12689 - assigning via pointer from 'in' expression
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12689
+// assigning via pointer from 'in' expression
int g12689()
{
@@ -2855,9 +2838,9 @@ int ptrSlice()
}
static assert(ptrSlice() == 2);
-/**************************************************
- 6344 - create empty slice from null pointer
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6344
+// create empty slice from null pointer
static assert({
char* c = null;
@@ -2865,18 +2848,18 @@ static assert({
return true;
}());
-/**************************************************
- 8365 - block assignment of enum arrays
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8365
+// block assignment of enum arrays
enum E8365 { first = 7, second, third, fourth }
static assert({ E8365[2] x; return x[0]; }() == E8365.first);
static assert({ E8365[2][2] x; return x[0][0]; }() == E8365.first);
static assert({ E8365[2][2][2] x; return x[0][0][0]; }() == E8365.first);
-/**************************************************
- 4448 - labelled break + continue
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=4448
+// labelled break + continue
int bug4448()
{
@@ -2918,27 +2901,27 @@ L1:
}
static assert(bug4448b() == 3);
-/**************************************************
- 6985 - non-constant case
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6985
+// Formerly, non-constant case, but switch cases with mutable cases now error
+// Currently: run-time constant variable case
int bug6985(int z)
{
- int q = z * 2 - 6;
+ const int q = z * 2 - 6;
switch(z)
{
case q:
- q = 87;
- break;
+ return 87;
default:
}
return q;
}
static assert(bug6985(6) == 87);
-/**************************************************
- 6281 - [CTFE] A null pointer '!is null' returns 'true'
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6281
+// [CTFE] A null pointer '!is null' returns 'true'
static assert(!{
auto p = null;
@@ -2950,9 +2933,9 @@ static assert(!{
return p != null;
}());
-/**************************************************
- 6331 - evaluate SliceExp on if condition
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6331
+// evaluate SliceExp on if condition
bool bug6331(string s)
{
@@ -2962,9 +2945,9 @@ bool bug6331(string s)
}
static assert(bug6331("str"));
-/**************************************************
- 6283 - assign to AA with slice as index
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6283
+// assign to AA with slice as index
static assert({
immutable p = "pp";
@@ -2992,9 +2975,9 @@ static assert({
return true;
}());
-/**************************************************
- 6282 - dereference 'in' of an AA
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6282
+// dereference 'in' of an AA
static assert({
int[] w = new int[4];
@@ -3008,9 +2991,9 @@ static assert({
return n;
}() == "1");
-/**************************************************
- 6337 - member function call on struct literal
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6337
+// member function call on struct literal
struct Bug6337
{
@@ -3027,17 +3010,16 @@ struct Bug6337
}
static assert(Bug6337().ctfe() == 6);
-/**************************************************
- 6603 call manifest function pointer
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6603
+// call manifest function pointer
int f6603(int a) { return a + 5; }
enum bug6603 = &f6603;
static assert(bug6603(6) == 11);
-/**************************************************
- 6375
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6375
struct D6375
{
@@ -3067,9 +3049,9 @@ static assert({
return true;
}());
-/**************************************************
- 6280 Converting pointers to bool
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6280
+// Converting pointers to bool
static assert({
if ((0 in [0:0])) {}
@@ -3077,9 +3059,9 @@ static assert({
return true;
}());
-/**************************************************
- 6276 ~=
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6276
+// ~=
struct Bug6276
{
@@ -3092,9 +3074,9 @@ static assert({
return true;
}());
-/**************************************************
- 6374 ptr[n] = x, x = ptr[n]
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6374
+// ptr[n] = x, x = ptr[n]
static assert({
int[] arr = [1];
@@ -3104,9 +3086,9 @@ static assert({
return arr[0];
}() == 2);
-/**************************************************
- 6306 recursion and local variables
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6306
+// recursion and local variables
void recurse6306()
{
@@ -3124,9 +3106,9 @@ bool bug6306(bool b)
}
static assert(bug6306(true));
-/**************************************************
- 6386 ICE on unsafe pointer cast
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6386
+// ICE on unsafe pointer cast
static assert(!is(typeof(compiles!({
int x = 123;
@@ -3145,9 +3127,9 @@ static assert({
return *q;
}());
-/**************************************************
- 6420 ICE on dereference of invalid pointer
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6420
+// ICE on dereference of invalid pointer
static assert({
// Should compile, but pointer can't be dereferenced
@@ -3202,9 +3184,9 @@ static assert(!is(typeof(compiles!({
}()
))));
-/**************************************************
- 6250 deref pointers to array
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6250
+// deref pointers to array
int[]* simple6250(int[]* x) { return x; }
@@ -3280,9 +3262,9 @@ long ctfeSort6250b()
static assert(ctfeSort6250b() == 57);
-/**************************************************
- 6672 circular references in array
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6672
+// circular references in array
void bug6672(ref string lhs, ref string rhs)
{
@@ -3334,9 +3316,9 @@ static assert({
return true;
}());
-/**************************************************
- 6399 (*p).length = n
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6399
+// (*p).length = n
struct A6399
{
@@ -3354,9 +3336,9 @@ static assert({
return a.subLen();
}() == 4);
-/**************************************************
- 7789 (*p).length++ where *p is null
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7789
+// (*p).length++ where *p is null
struct S7789
{
@@ -3371,9 +3353,9 @@ struct S7789
static assert(S7789().foo());
-/**************************************************
- 6418 member named 'length'
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6418
+// member named 'length'
struct Bug6418
{
@@ -3381,9 +3363,9 @@ struct Bug6418
}
static assert(Bug6418.init.length == 189);
-/**************************************************
- 4021 rehash
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=4021
+// rehash
bool bug4021()
{
@@ -3393,9 +3375,9 @@ bool bug4021()
}
static assert(bug4021());
-/**************************************************
- 11629 crash on AA.rehash
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11629
+// crash on AA.rehash
struct Base11629
{
@@ -3413,10 +3395,11 @@ struct Base11629
}
enum ct11629 = Base11629(4);
-/**************************************************
- 3512 foreach (dchar; string)
- 6558 foreach (int, dchar; string)
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=3512
+// foreach (dchar; string)
+// https://issues.dlang.org/show_bug.cgi?id=6558
+// foreach (int, dchar; string)
bool test3512()
{
@@ -3552,9 +3535,9 @@ bool test3512()
}
static assert(test3512());
-/**************************************************
- 6510 ICE only with -inline
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6510
+// ICE only with -inline
struct Stack6510
{
@@ -3585,9 +3568,9 @@ void test6510()
static assert(bug6510() == 3);
}
-/**************************************************
- 6511 arr[] shouldn't make a copy
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6511
+// arr[] shouldn't make a copy
T bug6511(T)()
{
@@ -3598,9 +3581,9 @@ T bug6511(T)()
static assert(bug6511!ulong() == 2);
static assert(bug6511!long() == 2);
-/**************************************************
- 6512 new T[][]
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6512
+// new T[][]
bool bug6512(int m)
{
@@ -3620,9 +3603,9 @@ bool bug6512(int m)
}
static assert(bug6512(3));
-/**************************************************
- 6516 ICE(constfold.c)
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6516
+// ICE(constfold.c)
dstring bug6516()
{
@@ -3631,9 +3614,9 @@ dstring bug6516()
static assert(bug6516() == ""d);
-/**************************************************
- 6727 ICE(interpret.c)
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6727
+// ICE(interpret.c)
const(char)* ice6727(const(char)* z) { return z; }
static assert({
@@ -3641,9 +3624,9 @@ static assert({
return true;
}());
-/**************************************************
- 6721 Cannot get pointer to start of char[]
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6721
+// Cannot get pointer to start of char[]
static assert({
char[] c1 = "".dup;
@@ -3653,9 +3636,9 @@ static assert({
return 6;
}() == 6);
-/**************************************************
- 6693 Assign to null AA
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6693
+// Assign to null AA
struct S6693
{
@@ -3672,9 +3655,9 @@ static assert({
return 6693;
}() == 6693);
-/**************************************************
- 7602 Segfault AA.keys on null AA
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7602
+// Segfault AA.keys on null AA
string[] test7602()
{
@@ -3684,9 +3667,9 @@ string[] test7602()
enum bug7602 = test7602();
-/**************************************************
- 6739 Nested AA assignment
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6739
+// Nested AA assignment
static assert({
int[int][int][int] aaa;
@@ -3703,9 +3686,9 @@ static assert({
return kk;
}() == 9);
-/**************************************************
- 6751 ref AA assignment
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6751
+// ref AA assignment
void bug6751(ref int[int] aa)
{
@@ -3763,9 +3746,9 @@ void bug6751c(ref int[int][int] aa)
aa = [38: [56 : 77]];
}
-/**************************************************
- 7790 AA foreach ref
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7790
+// AA foreach ref
struct S7790
{
@@ -3781,18 +3764,18 @@ size_t bug7790(S7790[string] tree)
static assert(bug7790(["a":S7790(0)]) == 1);
-/**************************************************
- 6765 null AA.length
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6765
+// null AA.length
static assert({
int[int] w;
return w.length;
}() == 0);
-/**************************************************
- 6769 AA.keys, AA.values with -inline
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6769
+// AA.keys, AA.values with -inline
static assert({
double[char[3]] w = ["abc" : 2.3];
@@ -3800,9 +3783,9 @@ static assert({
return w.keys.length;
}() == 1);
-/**************************************************
- 4022 AA.get
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=4022
+// AA.get
static assert({
int[int] aa = [58: 13];
@@ -3812,9 +3795,9 @@ static assert({
return r;
}() == 1000);
-/**************************************************
- 6775 AA.opApply
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6775
+// AA.opApply
static assert({
int[int] aa = [58: 17, 45:6];
@@ -3844,9 +3827,9 @@ static assert({
return true;
}());
-/**************************************************
- 7890 segfault struct with AA field
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7890
+// segfault struct with AA field
struct S7890
{
@@ -3907,9 +3890,9 @@ static assert({
return true;
}());
-/**************************************************
- 6800 bad pointer casts
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6800
+// bad pointer casts
bool badpointer(int k)
{
@@ -3974,9 +3957,9 @@ static assert(!is(typeof(compiles!(badpointer(6)))));
static assert(!is(typeof(compiles!(badpointer(7)))));
static assert(!is(typeof(compiles!(badpointer(8)))));
-/**************************************************
- 10211 Allow casts S**->D**, when S*->D* is OK
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10211
+// Allow casts S**->D**, when S*->D* is OK
int bug10211()
{
@@ -3991,9 +3974,9 @@ int bug10211()
static assert(bug10211());
-/**************************************************
- 10568 CTFE rejects function pointer safety casts
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10568
+// CTFE rejects function pointer safety casts
@safe void safetyDance() {}
@@ -4006,9 +3989,9 @@ int isItSafeToDance()
static assert(isItSafeToDance());
-/**************************************************
- 12296 CTFE rejects const compatible AA pointer cast
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12296
+// CTFE rejects const compatible AA pointer cast
int test12296()
{
@@ -4019,9 +4002,9 @@ int test12296()
}
static assert(test12296());
-/**************************************************
- 9170 Allow reinterpret casts float<->int
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=9170
+// Allow reinterpret casts float<->int
int f9170(float x)
{
@@ -4077,9 +4060,9 @@ bool bug9170()
static assert(bug9170());
-/**************************************************
- 6792 ICE with pointer cast of indexed array
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6792
+// ICE with pointer cast of indexed array
struct S6792
{
@@ -4139,9 +4122,9 @@ static assert({
return true;
}());
-/**************************************************
- 7780 array cast
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7780
+// array cast
int bug7780(int testnum)
{
@@ -4164,9 +4147,9 @@ static assert( is(typeof(compiles!(bug7780(0)))));
static assert(!is(typeof(compiles!(bug7780(1)))));
static assert(!is(typeof(compiles!(bug7780(2)))));
-/**************************************************
- 14028 - static array pointer that refers existing array elements.
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=14028
+// static array pointer that refers existing array elements.
int test14028a(size_t ofs)(bool ct)
{
@@ -4244,9 +4227,9 @@ static assert(!is(typeof(compiles!(test14028b(3)))));
static assert(test14028b(4));
static assert(!is(typeof(compiles!(test14028b(5)))));
-/**************************************************
- 10275 cast struct literals to immutable
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10275
+// cast struct literals to immutable
struct Bug10275
{
@@ -4266,9 +4249,9 @@ int test10275()
static assert(test10275());
-/**************************************************
- 6851 passing pointer by argument
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6851
+// passing pointer by argument
void set6851(int* pn)
{
@@ -4284,9 +4267,8 @@ void bug6851()
}
static assert({ bug6851(); return true; }());
-/**************************************************
- 7876
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7876
int* bug7876(int n) @system
{
@@ -4328,9 +4310,8 @@ static assert(!is(typeof(compiles!(test7876(0)))));
static assert( is(typeof(compiles!(test7876(11)))));
static assert(!is(typeof(compiles!(test7876(10)))));
-/**************************************************
- 11824
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11824
int f11824(T)()
{
@@ -4345,9 +4326,9 @@ int f11824(T)()
static assert(f11824!int()); // OK
static assert(f11824!(int[])()); // OK <- NG
-/**************************************************
- 6817 if converted to &&, only with -inline
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6817
+// if converted to &&, only with -inline
static assert({
void toggle()
@@ -4369,9 +4350,9 @@ static assert({
return true;
}());
-/**************************************************
- 6816 nested function can't access this
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6816
+// nested function can't access this
struct S6816
{
@@ -4384,9 +4365,9 @@ struct S6816
enum s6816 = S6816().foo();
-/**************************************************
- 7277 ICE nestedstruct.init.tupleof
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7277
+// ICE nestedstruct.init.tupleof
struct Foo7277
{
@@ -4406,9 +4387,9 @@ struct Foo7277
static assert(Foo7277().func() == 17);
-/**************************************************
- 10217 ICE. CTFE version of 9315
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10217
+// ICE. CTFE version of 9315
bool bug10217()
{
@@ -4424,9 +4405,9 @@ bool bug10217()
static assert(bug10217());
-/**************************************************
- 8276 ICE
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8276
+// ICE
void bug8676(int n)
{
@@ -4525,7 +4506,7 @@ auto classtest1(int n)
}
static assert(classtest1(1));
static assert(classtest1(2));
-static assert(classtest1(7)); // bug 7154
+static assert(classtest1(7)); // https://issues.dlang.org/show_bug.cgi?id=7154
// can't initialize enum with not null class
SomeClass classtest2(int n)
@@ -4555,9 +4536,9 @@ int classtest3()
static assert(classtest3());
-/**************************************************
- 12016 class cast and qualifier reinterpret
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12016
+// class cast and qualifier reinterpret
class B12016 { }
@@ -4571,9 +4552,9 @@ bool f12016(immutable B12016 b)
static assert(f12016(new immutable C12016));
-/**************************************************
- 10610 ice immutable implicit conversion
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10610
+// ice immutable implicit conversion
class Bug10610(T)
{
@@ -4590,9 +4571,9 @@ void ice10610()
static assert (T10610.min.baz());
}
-/**************************************************
- 13141 regression fix caused by 10610
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=13141
+// regression fix caused by 10610
struct MapResult13141(alias pred)
{
@@ -4613,24 +4594,24 @@ string[] array13141(R)(R r)
//immutable string[] splitterNames = [4].map!(e => "4").array();
immutable string[] splitterNames13141 = MapResult13141!(e => "4")([4]).array13141();
-/**************************************************
- 11587 AA compare
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11587
+// AA compare
static assert([1:2, 3:4] == [3:4, 1:2]);
-/**************************************************
- 14325 more AA comparisons
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=14325
+// more AA comparisons
static assert([1:1] != [1:2, 2:1]); // OK
static assert([1:1] != [1:2]); // OK
static assert([1:1] != [2:1]); // OK <- Error
static assert([1:1, 2:2] != [3:3, 4:4]); // OK <- Error
-/**************************************************
- 7147 typeid()
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7147
+// typeid()
static assert({
TypeInfo xxx = typeid(Object);
@@ -4650,9 +4631,9 @@ static assert(!is(typeof(compiles!(bug7147(0)))));
static assert( is(typeof(compiles!(bug7147(1)))));
-/**************************************************
- 14123 - identity TypeInfo objects
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=14123
+// identity TypeInfo objects
static assert({
bool eq(TypeInfo t1, TypeInfo t2)
@@ -4679,9 +4660,9 @@ static assert({
return 1;
}());
-/**************************************************
- 6885 wrong code with new array
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6885
+// wrong code with new array
struct S6885
{
@@ -4704,9 +4685,9 @@ int bug6885()
static assert(bug6885());
-/**************************************************
- 6886 ICE with new array of dynamic arrays
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6886
+// ICE with new array of dynamic arrays
int bug6886()
{
@@ -4719,13 +4700,13 @@ int bug6886()
static assert(bug6886());
-/**************************************************
- 10198 Multidimensional struct block initializer
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10198
+// Multidimensional struct block initializer
struct Block10198
{
- int val[3][4];
+ int[4][3] val;
}
int bug10198()
@@ -4737,9 +4718,9 @@ int bug10198()
}
static assert(bug10198());
-/**************************************************
- 14440 Multidimensional block initialization should create distinct arrays for each elements
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=14440
+// Multidimensional block initialization should create distinct arrays for each elements
struct Matrix14440(E, size_t row, size_t col)
{
@@ -5112,9 +5093,9 @@ int testsFromEH()
}
static assert(testsFromEH());
-/**************************************************
- With + synchronized statements + bug 6901
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6901
+// With + synchronized statements
struct With1
{
@@ -5197,9 +5178,9 @@ int testwith()
static assert(testwith());
-/**************************************************
- 9236 ICE switch with(EnumType)
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=9236
+// ICE switch with(EnumType)
enum Command9236
{
@@ -5231,9 +5212,9 @@ bool bug9236(Command9236 cmd)
static assert(bug9236(Command9236.Any));
-/**************************************************
- 6416 static struct declaration
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6416
+// static struct declaration
static assert({
static struct S { int y = 7; }
@@ -5243,18 +5224,18 @@ static assert({
return true;
}());
-/**************************************************
- 10499 static template struct declaration
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10499
+// static template struct declaration
static assert({
static struct Result() {}
return true;
}());
-/**************************************************
- 13757 extern(C) alias declaration
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=13757
+// extern(C) alias declaration
static assert({
alias FP1 = extern(C) int function();
@@ -5262,9 +5243,9 @@ static assert({
return true;
}());
-/**************************************************
- 6522 opAssign + foreach ref
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6522
+// opAssign + foreach ref
struct Foo6522
{
@@ -5285,9 +5266,9 @@ bool foo6522()
static assert(foo6522());
-/**************************************************
- 7245 pointers + foreach ref
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7245
+// pointers + foreach ref
int bug7245(int testnum)
{
@@ -5311,11 +5292,13 @@ int bug7245(int testnum)
static assert(bug7245(0) == 6);
static assert(bug7245(1) == 5);
-/**************************************************
- 8498 modifying foreach
- 7658 foreach ref
- 8539 nested funcs, ref param, -inline
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8498
+// modifying foreach
+// https://issues.dlang.org/show_bug.cgi?id=7658
+// foreach ref
+// https://issues.dlang.org/show_bug.cgi?id=8539
+// nested funcs, ref param, -inline
int bug8498()
{
@@ -5356,9 +5339,11 @@ int bug8539()
static assert(bug8539());
-/**************************************************
- 7874, 13297, 13740 - better lvalue handling
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7874
+// https://issues.dlang.org/show_bug.cgi?id=13297
+// https://issues.dlang.org/show_bug.cgi?id=13740
+// better lvalue handling
int bug7874(int x){ return ++x = 1; }
static assert(bug7874(0) == 1);
@@ -5399,9 +5384,8 @@ static assert({
return true;
}());
-/**************************************************
- 6919
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6919
void bug6919(int* val)
{
@@ -5428,9 +5412,8 @@ void test6919b()
}
static assert({ test6919b(); return true; }());
-/**************************************************
- 6995
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6995
struct Foo6995
{
@@ -5442,9 +5425,9 @@ struct Foo6995
static assert(Foo6995.index!(27)() == 27);
-/**************************************************
- 7043 ref with -inline
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7043
+// ref with -inline
int bug7043(S)(ref int x)
{
@@ -5456,9 +5439,9 @@ static assert({
return bug7043!(char)(i);
}() == 416);
-/**************************************************
- 6037 recursive ref
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6037
+// recursive ref
void bug6037(ref int x, bool b)
{
@@ -5484,9 +5467,9 @@ int bug6037outer()
static assert(bug6037outer() == 401);
-/**************************************************
- 14299 - [REG2.067a], more than one depth of recursive call with ref
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=14299
+// [REG2.067a], more than one depth of recursive call with ref
string gen14299(int max, int idx, ref string name)
{
@@ -5512,9 +5495,9 @@ static assert(test14299(3) == "01233210");
static assert(test14299(4) == "0123443210");
static assert(test14299(5) == "012345543210");
-/**************************************************
- 7940 wrong code for complicated assign
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7940
+// wrong code for complicated assign
struct Bug7940
{
@@ -5539,9 +5522,9 @@ int bug7940()
static assert(bug7940());
-/**************************************************
- 10298 wrong code for struct array literal init
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10298
+// wrong code for struct array literal init
struct Bug10298
{
@@ -5563,9 +5546,9 @@ int bug10298()
static assert(bug10298());
-/**************************************************
- 7266 dotvar ref parameters
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7266
+// dotvar ref parameters
struct S7266 { int a; }
@@ -5594,9 +5577,9 @@ void out7266(out int b)
static assert(bug7266());
-/**************************************************
- 9982 dotvar assign through pointer
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=9982
+// dotvar assign through pointer
struct Bug9982
{
@@ -5614,7 +5597,8 @@ int test9982()
static assert(test9982());
-// 9982, rejects-valid case
+// https://issues.dlang.org/show_bug.cgi?id=9982
+// rejects-valid case
struct SS9982
{
@@ -5635,9 +5619,9 @@ void emplace9982(Bug9982* chunk, Bug9982 arg)
enum s9982 = Bug9982(3);
enum p9982 = SS9982(s9982);
-/**************************************************
- 11618 dotvar assign through casted pointer
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11618
+// dotvar assign through casted pointer
struct Tuple11618(T...)
{
@@ -5652,9 +5636,9 @@ static assert({
return (result[0] == dchar.init);
}());
-/**************************************************
- 7143 'is' for classes
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7143
+// 'is' for classes
class C7143
{
@@ -5708,9 +5692,9 @@ static assert(bug7143(4) == 48);
static assert(bug7143(5) == 48);
static assert(bug7143(6) == 188);
-/**************************************************
- 7147 virtual function calls from base class
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7147
+// virtual function calls from base class
class A7147
{
@@ -5735,9 +5719,8 @@ int test7147()
static assert(test7147() == 1);
-/**************************************************
- 7158
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7158
class C7158
{
@@ -5755,9 +5738,8 @@ bool test7158()
}
static assert(test7158());
-/**************************************************
- 8484
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8484
class C8484
{
@@ -5783,9 +5765,8 @@ int test8484()
}
static assert(test8484() == 7);
-/**************************************************
- 7419
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7419
struct X7419
{
@@ -5805,9 +5786,9 @@ void bug7419()
static assert(x == 3);
}
-/**************************************************
- 9445 ice
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=9445
+// ice
template c9445(T...) { }
@@ -5817,9 +5798,9 @@ void ice9445(void delegate() expr, void function() f2)
static assert(!is(typeof(c9445!(expr()))));
}
-/**************************************************
- 10452 delegate ==
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10452
+// delegate ==
struct S10452
{
@@ -5836,7 +5817,7 @@ class C10452
bool func() { return true; }
}
-bool delegate() ref10452(ref S10452 s)
+bool delegate() ref10452(return ref S10452 s)
{
return &s.func;
}
@@ -5884,9 +5865,9 @@ bool test10452()
}
static assert(test10452());
-/**************************************************
- 7162 and 4711
-**************************************************/
+/**************************************************/
+//https://issues.dlang.org/show_bug.cgi?id=7162
+// https://issues.dlang.org/show_bug.cgi?id=4711
void f7162() { }
@@ -5894,16 +5875,16 @@ bool ice7162()
{
false && f7162();
false || f7162();
- false && f7162(); // bug 4711
+ false && f7162(); // https://issues.dlang.org/show_bug.cgi?id=4711
true && f7162();
return true;
}
static assert(ice7162());
-/**************************************************
- 8857, only with -inline (creates an &&)
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8857
+// only with -inline (creates an &&)
struct Result8857 { char[] next; }
@@ -5921,9 +5902,8 @@ static assert({
return true;
}());
-/**************************************************
- 7527
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7527
struct Bug7527
{
@@ -5940,9 +5920,8 @@ int bug7527()
static assert(!is(typeof(compiles!(bug7527()))));
-/**************************************************
- 7527
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7527
int bug7380;
@@ -5952,9 +5931,8 @@ static assert(!is(typeof( compiles!(
}()
))));
-/**************************************************
- 7165
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7165
struct S7165
{
@@ -5964,9 +5942,8 @@ struct S7165
static assert(!S7165().f());
-/**************************************************
- 7187
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7187
int[] f7187() { return [0]; }
int[] f7187b(int n) { return [0]; }
@@ -5997,9 +5974,9 @@ bool g7187c(const(int)[] r)
static assert(g7187c(f7187c()));
-/**************************************************
- 6933 struct destructors
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6933
+// struct destructors
struct Bug6933
{
@@ -6016,9 +5993,8 @@ int test6933()
static assert(test6933());
-/**************************************************
- 7197
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7197
int foo7197(int[] x...)
{
@@ -6046,9 +6022,8 @@ bool testEScmp()
static assert(testEScmp());
-/**************************************************
- 7667
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7667
bool baz7667(int[] vars...)
{
@@ -6071,9 +6046,8 @@ bool bug7667()
}
enum e7667 = bug7667();
-/**************************************************
- 7536
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7536
bool bug7536(string expr)
{
@@ -6086,9 +6060,9 @@ void vop()
static assert(bug7536(x7536));
}
-/**************************************************
- 6681 unions
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6681
+// unions
struct S6681
{
@@ -6130,9 +6104,9 @@ static assert(!is(typeof(compiles!(bug6681(1)))));
static assert(!is(typeof(compiles!(bug6681(3)))));
static assert(!is(typeof(compiles!(bug6681(4)))));
-/**************************************************
- 9113 ICE with struct in union
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=9113
+// ICE with struct in union
union U9113
{
@@ -6170,9 +6144,9 @@ int uniontest1()
static assert(uniontest1());
-/**************************************************
- 6438 void
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=6438
+// void
struct S6438
{
@@ -6209,9 +6183,9 @@ static assert( is(typeof(compiles!(bug6438(1)))));
static assert(!is(typeof(compiles!(bug6438(2)))));
static assert(!is(typeof(compiles!(bug6438(3)))));
-/**************************************************
- 10994 void static array members
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10994
+// void static array members
struct Bug10994
{
@@ -6220,9 +6194,9 @@ struct Bug10994
static bug10994 = Bug10994.init;
-/**************************************************
- 10937 struct inside union
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10937
+// struct inside union
struct S10937
{
@@ -6247,9 +6221,8 @@ struct S10937
enum test10937 = S10937(7);
enum west10937 = S10937(2);
-/**************************************************
- 13831
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=13831
struct Vector13831()
{
@@ -6276,9 +6249,8 @@ struct Chunk13831
static const Chunk13831* unknownChunk = new Chunk13831(Coord13831());
}
-/**************************************************
- 7732
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7732
struct AssociativeArray
{
@@ -6299,9 +6271,8 @@ int test7732()
static assert(test7732());
-/**************************************************
- 7784
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7784
struct Foo7784
{
void bug()
@@ -6329,15 +6300,13 @@ bool ctfe7784()
static assert(ctfe7784());
-/**************************************************
- 7781
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7781
-static assert(({ return; }(), true));
+static assert(({ return true; }()));
-/**************************************************
- 7785
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7785
bool bug7785(int n)
{
@@ -6359,9 +6328,8 @@ static assert(bug7785(1));
static assert(!is(typeof(compiles!(bug7785(2)))));
static assert(!is(typeof(compiles!(bug7785(3)))));
-/**************************************************
- 7987
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7987
class C7987
{
@@ -6400,9 +6368,9 @@ bool bug7987()
static assert(bug7987());
-/**************************************************
- 10579 typeinfo.func() must not segfault
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10579
+// typeinfo.func() must not segfault
static assert(!is(typeof(compiles!(typeid(int).toString.length))));
@@ -6414,9 +6382,9 @@ Bug10579 uninitialized10579;
static assert(!is(typeof(compiles!(uninitialized10579.foo()))));
-/**************************************************
- 10804 mixin ArrayLiteralExp typed string
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10804
+// mixin ArrayLiteralExp typed string
void test10804()
{
@@ -6476,7 +6444,7 @@ C73 test73 = func73();
struct S74
{
- int n[1];
+ int[1] n;
static S74 test(){ S74 ret = void; ret.n[0] = 0; return ret; }
}
@@ -6509,7 +6477,7 @@ label:
break label; // doesn't work.
}
}
-body
+do
{
int x = 0;
label:
@@ -6526,7 +6494,8 @@ label:
static assert(bug8865());
/******************************************************/
-// 15450 labeled foreach + continue/break
+// https://issues.dlang.org/show_bug.cgi?id=15450
+// labeled foreach + continue/break
static assert({
L1:
@@ -6590,7 +6559,8 @@ static assert( __traits(compiles, { static const Test76 t76 = new const(Test
static assert( __traits(compiles, { static immutable Test76 t76 = new immutable Test76(0); return t76; }));
static assert(!__traits(compiles, { static Test76 t76 = new Test76(0); return t76; }));
-/***** Bug 5678 *********************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5678
struct Bug5678
{
@@ -6599,9 +6569,9 @@ struct Bug5678
static assert(!__traits(compiles, { enum const(Bug5678)* b5678 = new const(Bug5678)(0); return b5678; }));
-/**************************************************
- 10782 run semantic2 for class field
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10782
+// run semantic2 for class field
enum e10782 = 0;
class C10782 { int x = e10782; }
@@ -6612,9 +6582,9 @@ string f10782()
}
mixin(f10782());
-/**************************************************
- 10929 NRVO support in CTFE
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10929
+// NRVO support in CTFE
struct S10929
{
@@ -6646,9 +6616,9 @@ bool test10929()
};
static assert(test10929());
-/**************************************************
- 9245 - support postblit call on array assignments
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=9245
+// support postblit call on array assignments
bool test9245()
{
@@ -6712,9 +6682,9 @@ bool test9245()
}
static assert(test9245());
-/**************************************************
- 12906 don't call postblit on blit initializing
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12906
+// don't call postblit on blit initializing
struct S12906 { this(this) { assert(0); } }
@@ -6723,9 +6693,9 @@ static assert({
return true;
}());
-/**************************************************
- 11510 support overlapped field access in CTFE
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11510
+// support overlapped field access in CTFE
struct S11510
{
@@ -6750,9 +6720,9 @@ bool test11510()
}
static assert(test11510());
-/**************************************************
- 11534 - subtitude inout
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11534
+// subtitude inout
struct MultiArray11534
{
@@ -6776,9 +6746,9 @@ enum test11534 = () {
return 0;
}();
-/**************************************************
- 11941 - Regression of 11534 fix
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11941
+// Regression of 11534 fix
void takeConst11941(const string[]) {}
string[] identity11941(string[] x) { return x; }
@@ -6808,9 +6778,9 @@ bool test11941b()
}
static assert(test11941b());
-/**************************************************
- 11535 - element-wise assignment from string to ubyte array literal
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11535
+// element-wise assignment from string to ubyte array literal
struct Hash11535
{
@@ -6834,33 +6804,12 @@ auto md5_digest11535(T...)(scope const T data)
static assert(md5_digest11535(`TEST`) == [84, 69, 83, 84, 0, 0]);
-/**************************************************
- 11540 - goto label + try-catch-finally / with statement
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11540
+// goto label + try-catch-finally / with statement
static assert(()
{
- // enter to TryCatchStatement.body
- {
- bool c = false;
- try
- {
- if (c) // need to bypass front-end optimization
- throw new Exception("");
- else
- {
- goto Lx;
- L1:
- c = true;
- }
- }
- catch (Exception e) {}
-
- Lx:
- if (!c)
- goto L1;
- }
-
// jump inside TryCatchStatement.body
{
bool c = false;
@@ -6952,37 +6901,6 @@ static assert(()
static assert(()
{
- // enter forward to TryFinallyStatement.body
- {
- bool c = false;
- goto L0;
- c = true;
- try
- {
- L0:
- ;
- }
- finally {}
- assert(!c);
- }
-
- // enter back to TryFinallyStatement.body
- {
- bool c = false;
- try
- {
- goto Lx;
- L1:
- c = true;
- }
- finally {
- }
-
- Lx:
- if (!c)
- goto L1;
- }
-
// jump inside TryFinallyStatement.body
{
try
@@ -7055,9 +6973,9 @@ static assert(()
return 1;
}());
-/**************************************************
- 11627 - cast dchar to char at compile time on AA assignment
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11627
+//cast dchar to char at compile time on AA assignment
bool test11627()
{
@@ -7071,9 +6989,9 @@ bool test11627()
}
static assert(test11627());
-/**************************************************
- 11664 - ignore function local static variables
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11664
+// ignore function local static variables
bool test11664()
{
@@ -7083,9 +7001,9 @@ bool test11664()
}
static assert(test11664());
-/**************************************************
- 12110 - operand of dereferencing does not need to be an lvalue
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12110
+// operand of dereferencing does not need to be an lvalue
struct SliceOverIndexed12110
{
@@ -7117,9 +7035,9 @@ struct Uint24Array12110
static m12110 = Uint24Array12110([0x80]);
-/**************************************************
- 12310 - heap allocation for built-in sclar types
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12310
+// heap allocation for built-in sclar types
bool test12310()
{
@@ -7141,9 +7059,9 @@ bool test12310()
}
static assert(test12310());
-/**************************************************
- 12499 - initialize TupleDeclaraion in CTFE
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12499
+// initialize TupleDeclaraion in CTFE
auto f12499()
{
@@ -7153,9 +7071,9 @@ auto f12499()
}
static assert(f12499() == 5);
-/**************************************************
- 12602 - slice in struct literal members
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12602
+// slice in struct literal members
struct Result12602
{
@@ -7251,9 +7169,9 @@ static assert(testWrap12602b() == [1,2,1,2]);
static assert(testWrap12602c() == [1,2,1,2]);
static assert(testWrap12602d() == [1,2,1,2]);
-/**************************************************
- 12677 - class type initializing from DotVarExp
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12677
+// class type initializing from DotVarExp
final class C12677
{
@@ -7272,9 +7190,9 @@ struct S12677
auto f = new C12677();
}
-/**************************************************
- 12851 - interpret function local const static array
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12851
+// interpret function local const static array
void test12851()
{
@@ -7282,9 +7200,9 @@ void test12851()
alias staticZip = TypeTuple!(arr[0]);
}
-/**************************************************
- 13630 - indexing and setting array element via pointer
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=13630
+// indexing and setting array element via pointer
struct S13630(T)
{
@@ -7303,15 +7221,14 @@ struct S13630(T)
enum s13630 = S13630!float(1);
-/**************************************************
- 13827
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=13827
struct Matrix13827(T, uint N)
{
private static defaultMatrix()
{
- T arr[N];
+ T[N] arr;
return arr;
}
@@ -7331,9 +7248,9 @@ struct Matrix13827(T, uint N)
}
enum m13827 = Matrix13827!(int, 3)(1, 2, 3);
-/**************************************************
- 13847 - support DotTypeExp
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=13847
+// support DotTypeExp
class B13847
{
@@ -7378,9 +7295,9 @@ static assert({
return true;
}());
-/**************************************************
- 12495 - cast from string to immutable(ubyte)[]
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12495
+// cast from string to immutable(ubyte)[]
string getStr12495()
{
@@ -7401,9 +7318,9 @@ auto indexOf12495(string s)
}
static assert(indexOf12495(getStr12495()) == 0);
-/**************************************************
- 13992 - Repainting pointer arithmetic result
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=13992
+// Repainting pointer arithmetic result
enum hash13992 = hashOf13992("abcd".ptr);
@@ -7416,9 +7333,9 @@ enum hash13992 = hashOf13992("abcd".ptr);
return hash;
}
-/**************************************************
- 13739 - Precise copy for ArrayLiteralExp elements
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=13739
+// Precise copy for ArrayLiteralExp elements
static assert(
{
@@ -7436,9 +7353,9 @@ static assert(
return 1;
}());
-/**************************************************
- 14463 - ICE on slice assignment without postblit
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=14463
+// ICE on slice assignment without postblit
struct Boo14463
{
@@ -7450,9 +7367,9 @@ struct Boo14463
}
immutable Boo14463 a14463 = Boo14463([1]);
-/**************************************************
- 13295 - Don't copy struct literal in VarExp::interpret()
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=13295
+// Don't copy struct literal in VarExp::interpret()
struct S13295
{
@@ -7483,9 +7400,9 @@ int foo14061(int[] a)
}
static assert(foo14061([1]));
-/**************************************************
- 14024 - CTFE version
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=14024
+// CTFE version
bool test14024()
{
@@ -7535,9 +7452,9 @@ bool test14024()
}
static assert(test14024());
-/**************************************************
- 14304 - cache of static immutable value
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=14304
+// cache of static immutable value
immutable struct Bug14304
{
@@ -7565,9 +7482,9 @@ void test14304()
static assert(bt == "fun");
}
-/**************************************************
- 14371 - evaluate BinAssignExp as lvalue
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=14371
+// evaluate BinAssignExp as lvalue
int test14371()
{
@@ -7577,9 +7494,9 @@ int test14371()
}
static assert(test14371() == 2);
-/**************************************************
- 7151 - [CTFE] cannot compare classes with ==
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7151
+// [CTFE] cannot compare classes with ==
bool test7151()
{
@@ -7589,9 +7506,9 @@ bool test7151()
static assert(test7151());
-/**************************************************
- 12603 - [CTFE] goto does not correctly call dtors
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12603
+// [CTFE] goto does not correctly call dtors
struct S12603
{
@@ -7702,9 +7619,9 @@ auto structInCaseScope()
static assert(!structInCaseScope());
-/**************************************************
- 15233 - ICE in TupleExp, Copy On Write bug
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15233
+// ICE in TupleExp, Copy On Write bug
alias TT15233(stuff ...) = stuff;
@@ -7713,23 +7630,23 @@ enum tup15233 = TT15233!(Tok15233(), "foo");
static assert(tup15233[0] == Tok15233());
static assert(tup15233[1] == "foo");
-/**************************************************
- 15251 - void cast in ForStatement.increment
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15251
+// void cast in ForStatement.increment
int test15251()
{
for (ubyte lwr = 19;
lwr != 20;
- cast(void)++lwr) // have to to be evaluated with ctfeNeedNothing
+ cast(void)++lwr) // have to to be evaluated with CTFEGoal.Nothing
{}
return 1;
}
static assert(test15251());
-/**************************************************
- 15998 - Sagfault caused by memory corruption
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15998
+// Sagfault caused by memory corruption
immutable string[2] foo15998 = ["",""];
immutable string[2][] bar15998a = foo15998 ~ baz15998;
@@ -7744,9 +7661,9 @@ auto baz15998()
static assert(bar15998a == [["", ""]]);
static assert(bar15998b == [["", ""]]);
-/**************************************************
- 16094 - Non-overlapped slice assignment on an aggregate
-**************************************************/
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=16094
+// Non-overlapped slice assignment on an aggregate
char[] f16094a()
{
@@ -7787,6 +7704,94 @@ struct RBNode(T)
static assert(!__traits(compiles, { alias bug18057 = RBNode!int; }));
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19140
+
+void test19140()
+{
+ real f19140();
+ static if (__traits(compiles, (){ enum real r = f19140(); })) {}
+}
+
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19074
+
+struct S19074a { }
+
+struct S19074b
+{
+ S19074a field;
+ this(S19074a) { }
+
+ static const S19074b* data = new S19074b(S19074a());
+}
+
+void test19074()
+{
+ auto var = S19074b.data;
+}
+
+/************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19447
+
+bool f19447()
+{
+ int[3] c=1;
+ assert(c[0]==1);
+ g19447(c[0..2]);
+ assert(c[0]!=1); //fails
+ assert(c[0]==2);
+ return true;
+}
+void g19447(ref int[2] a)
+{
+ int[2] b=2;
+ a=b;
+ //a[]=b; // works
+ //a[] = b[]; // works
+ assert(a[0]==2);
+}
+static assert(f19447());
+
+/***/
+
+char[] mangle19447(char[] dst)
+{
+ dst.length = 10;
+ size_t i = "_D".length;
+ dst[0 .. i] = "_D";
+ return dst;
+}
+
+static char[] x19447 = mangle19447(null);
+
+/***/
+enum KindEnum
+{
+ integer,
+ arrayOf
+}
+
+struct FullKind
+{
+ KindEnum[] contents;
+
+ this(KindEnum ) { opAssign; }
+
+ this(KindEnum , FullKind contentKind)
+ {
+ contents = contentKind.contents;
+ }
+
+ void opAssign()
+ {
+ contents = [];
+ }
+}
+
+enum fk = FullKind(KindEnum.integer);
+enum fk2 = FullKind(KindEnum.arrayOf, fk);
+
/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=9937
diff --git a/gcc/testsuite/gdc.test/compilable/interpret4.d b/gcc/testsuite/gdc.test/compilable/interpret4.d
new file mode 100644
index 0000000..019ff22
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/interpret4.d
@@ -0,0 +1,31 @@
+// https://issues.dlang.org/show_bug.cgi?id=11717
+
+enum int[4] A = [1,2,3,4];
+enum int[4] B = [1,2,3,4];
+enum int[4] C = A[] + B[];
+static assert(C == [2, 4, 6, 8]);
+
+enum int[2] D1 = A[1..3] * B[2..4];
+static assert(D1 == [6, 12]);
+
+enum int[2] D2 = A[1..3] * 6;
+static assert(D2 == [12, 18]);
+
+enum int[2] D3 = 5 - A[1..3];
+static assert(D3 == [3, 2]);
+
+enum int[2][2] D4 = [D1, D2] + [D2, D3];
+static assert(D4 == [[18, 30], [15, 20]]);
+
+enum int[2][2] D5 = [[18, 30], [15, 20]] + [12, 18];
+static assert(D5 == [[30, 48], [27, 38]]);
+
+import core.simd;
+
+static if (__traits(compiles, int4))
+{
+ enum int4 D = [1,2,3,4];
+ enum int4 E = [1,2,3,4];
+ enum int4 F = D * E;
+ static assert(F.array == [1, 4, 9, 16]);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/isZeroInit.d b/gcc/testsuite/gdc.test/compilable/isZeroInit.d
index b5423cf..a64420f 100644
--- a/gcc/testsuite/gdc.test/compilable/isZeroInit.d
+++ b/gcc/testsuite/gdc.test/compilable/isZeroInit.d
@@ -72,7 +72,9 @@ struct S5
}
static assert(__traits(isZeroInit, S5));
-version(D_SIMD):
-import core.simd : int4;
-static assert(__traits(isZeroInit, Holder!(int4, 0)));
-static assert(!__traits(isZeroInit, Holder!(int4, 1)));
+template Vector(T) { alias __vector(T) Vector; }
+static if (is(Vector!(int[4])))
+{
+ static assert(__traits(isZeroInit, Holder!(Vector!(int[4]), 0)));
+ static assert(!__traits(isZeroInit, Holder!(Vector!(int[4]), 1)));
+}
diff --git a/gcc/testsuite/gdc.test/compilable/isreturnonstack.d b/gcc/testsuite/gdc.test/compilable/isreturnonstack.d
index 8bdb97d..920f0ec 100644
--- a/gcc/testsuite/gdc.test/compilable/isreturnonstack.d
+++ b/gcc/testsuite/gdc.test/compilable/isreturnonstack.d
@@ -1,3 +1,4 @@
+
struct S { int[10] a; }
int test1();
S test2();
diff --git a/gcc/testsuite/gdc.test/compilable/issue12520.d b/gcc/testsuite/gdc.test/compilable/issue12520.d
new file mode 100644
index 0000000..9007724
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue12520.d
@@ -0,0 +1,21 @@
+module issue12520;
+
+// https://issues.dlang.org/show_bug.cgi?id=12520
+
+alias Seq(T...) = T;
+
+static assert( Seq!() == Seq!() );
+static assert( Seq!(1) == Seq!(1) );
+
+static assert((Seq!() != Seq!()) == false);
+static assert((Seq!(1) != Seq!(1)) == false);
+
+static assert( Seq!() != Seq!(1) );
+static assert( Seq!(1) != Seq!() );
+static assert( Seq!(0) != Seq!(1) );
+static assert( Seq!(0,1) != Seq!() );
+
+static assert((Seq!() == Seq!(1)) == false);
+static assert((Seq!(1) == Seq!()) == false);
+static assert((Seq!(0) == Seq!(1)) == false);
+static assert((Seq!(0,1) == Seq!()) == false);
diff --git a/gcc/testsuite/gdc.test/compilable/issue15478.d b/gcc/testsuite/gdc.test/compilable/issue15478.d
new file mode 100644
index 0000000..ad24e7f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue15478.d
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=15478
+
+void test15478_1()
+{
+ struct Foo(N)
+ {
+ this(N value) { }
+ static int bug() { return 0; }
+ }
+ enum Foo!int foo = 0;
+ Foo!int[foo.bug] bar;
+}
+
+void test15478_2()
+{
+ int getLength() { return 42; }
+ struct Get {static int length() { return 42; }}
+
+ int[getLength] i1;
+ int[Get.length] i2;
+ static assert (is(typeof(i1) == int[42]));
+ static assert (is(typeof(i2) == int[42]));
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=21870
+struct S21870
+{
+ @property size_t count() const
+ {
+ return 1;
+ }
+}
+
+int[S21870.init.count()] x; // OK
+int[S21870.init.count ] y; // error
+
+////////////////////////////////////////////////////////////////////////////////
+
+struct Foo15478(N)
+{
+ this(N value) { }
+ auto bug() { return 0; }
+}
+
+void test15478_3()
+{
+ enum Foo15478!int foo = 0;
+ Foo15478!int[foo.bug] bar; // Error: integer constant expression expected instead of Foo().bug
+
+ enum foo_bug = foo.bug;
+ Foo15478!int[foo_bug] baz; // OK
+}
+
diff --git a/gcc/testsuite/gdc.test/compilable/issue15795.d b/gcc/testsuite/gdc.test/compilable/issue15795.d
new file mode 100644
index 0000000..08ed495
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue15795.d
@@ -0,0 +1,9 @@
+module issue15795;
+
+template Foo(T : int) {}
+template Bar(T) {}
+alias Bar = Foo;
+
+alias bi = Bar!int;
+alias fi = Foo!int;
+static assert(__traits(isSame, bi, fi));
diff --git a/gcc/testsuite/gdc.test/compilable/issue15818.d b/gcc/testsuite/gdc.test/compilable/issue15818.d
new file mode 100644
index 0000000..4aed650
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue15818.d
@@ -0,0 +1,15 @@
+module issue15818;
+
+void f(int);
+void f(int);
+void f(int);
+void f(int);
+void f(int);
+
+pragma(mangle, "_D10issue158181fFiZv")
+void theVeritableF(int){}
+
+void main()
+{
+ f(1);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/issue18097.d b/gcc/testsuite/gdc.test/compilable/issue18097.d
new file mode 100644
index 0000000..0bc1613
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue18097.d
@@ -0,0 +1,12 @@
+// REQUIRED_ARGS: -unittest
+module issue18097;
+
+unittest // this first unittest is needed to trigger the bug
+{
+}
+
+unittest // second unittest
+{
+ auto a = &mixin(__traits(identifier, __traits(parent, { })));
+ auto b = &__traits(parent, { });
+}
diff --git a/gcc/testsuite/gdc.test/compilable/issue19925.d b/gcc/testsuite/gdc.test/compilable/issue19925.d
new file mode 100644
index 0000000..aed1688
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue19925.d
@@ -0,0 +1,14 @@
+// REQUIRED_ARGS: -unittest
+module issue19925;
+
+unittest {
+ with (S) {
+ a(); // Compiles!
+ b(); // Fails!
+ }
+}
+
+struct S {
+ static void a() {}
+ static void opDispatch(string name)() {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/issue20362.d b/gcc/testsuite/gdc.test/compilable/issue20362.d
new file mode 100644
index 0000000..b24bb8d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue20362.d
@@ -0,0 +1,8 @@
+void main() {
+ string str;
+ stringify((chars) {str ~= chars; });
+}
+
+void stringify(scope void delegate(scope const char[]) sink) {
+ sink("oops");
+}
diff --git a/gcc/testsuite/gdc.test/compilable/issue20599.d b/gcc/testsuite/gdc.test/compilable/issue20599.d
new file mode 100644
index 0000000..d3b614a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue20599.d
@@ -0,0 +1,10 @@
+import core.stdc.config;
+
+enum A : cpp_long;
+enum B : cpp_longlong;
+
+enum C : cpp_long { a,b,c };
+enum D : cpp_longlong { a,b,c };
+
+enum : cpp_long { a,b,c };
+enum : cpp_longlong { d,e,f };
diff --git a/gcc/testsuite/gdc.test/compilable/issue20704.d b/gcc/testsuite/gdc.test/compilable/issue20704.d
new file mode 100644
index 0000000..ec95828
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue20704.d
@@ -0,0 +1,29 @@
+/*
+https://issues.dlang.org/show_bug.cgi?id=20704
+REQUIRED_ARGS: -preview=rvaluerefparam
+ */
+
+void f1(T)(const auto ref T arg = T.init) {}
+void f2(T)(const ref T arg = T.init) {}
+void f3(T)(const auto ref T arg = 0) {}
+void f4(T)(const ref T arg = 0) {}
+
+struct S { int _; }
+class C { int _; }
+
+void main ()
+{
+ int i;
+ f1!int(i);
+ f2!int(i);
+ f3!int(i);
+ f4!int(i);
+ f1!int();
+ f2!int();
+ f3!int();
+ f4!int();
+ f1!S();
+ f2!S();
+ f1!C();
+ f2!C();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/issue20705.d b/gcc/testsuite/gdc.test/compilable/issue20705.d
new file mode 100644
index 0000000..76a364e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue20705.d
@@ -0,0 +1,16 @@
+// REQUIRED_ARGS: -preview=rvaluerefparam
+struct Foo
+{
+ int[] a;
+}
+
+void bar (T) (const ref T arg) {}
+T foo (T) (ref T arg) { return arg; }
+void goo()(ref long x) { x = 1; }
+void main ()
+{
+ bar(Foo([42]));
+ auto x = foo(Foo([42]));
+ int y;
+ static assert(!__traits(compiles, goo(y)));
+}
diff --git a/gcc/testsuite/gdc.test/compilable/issue20995.d b/gcc/testsuite/gdc.test/compilable/issue20995.d
new file mode 100644
index 0000000..7b29587
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue20995.d
@@ -0,0 +1,12 @@
+/*
+REQUIRED_ARGS: -preview=dip1021
+
+https://issues.dlang.org/show_bug.cgi?id=20995
+*/
+
+void foo() @live
+{
+ throw new Exception("");
+}
+
+void main () {}
diff --git a/gcc/testsuite/gdc.test/compilable/issue21203.d b/gcc/testsuite/gdc.test/compilable/issue21203.d
new file mode 100644
index 0000000..30291a3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue21203.d
@@ -0,0 +1,210 @@
+version (CppRuntime_Clang) version = CppMangle_Itanium;
+version (CppRuntime_Gcc) version = CppMangle_Itanium;
+version (CppRuntime_Sun) version = CppMangle_Itanium;
+
+template ScopeClass(C , string name = C.stringof)
+//if (is(C == class) && __traits(getLinkage, C) == "C++")
+{
+ //enum name = C.stringof;
+ enum ns = __traits(getCppNamespaces,C);
+ extern(C++, class)
+ {
+ extern(C++,(ns))
+ {
+ pragma(mangle, C, name)
+ struct ScopeClass
+ {
+ char[__traits(classInstanceSize, C)] buffer;
+ //... all the things ...
+ }
+ }
+ }
+}
+
+// Basic tests
+extern(C++)
+{
+ class MyClassA {}
+ void funa(ScopeClass!MyClassA); // mangles MyClass
+ void funb(const ScopeClass!MyClassA); // mangles const MyClass
+ void func(ref ScopeClass!MyClassA); // mangles MyClass&
+ void fund(ref const ScopeClass!MyClassA); // mangles const MyClass&
+ void fune(const(ScopeClass!MyClassA)*);
+}
+
+version (CppMangle_Itanium)
+{
+ static assert(funa.mangleof == "_Z4funa8MyClassA");
+ static assert(funb.mangleof == "_Z4funb8MyClassA");
+ static assert(func.mangleof == "_Z4funcR8MyClassA");
+ static assert(fund.mangleof == "_Z4fundRK8MyClassA");
+ static assert(fune.mangleof == "_Z4funePK8MyClassA");
+}
+else version (CppRuntime_Microsoft)
+{
+ static assert(funa.mangleof == "?funa@@YAXVMyClassA@@@Z");
+ static assert(funb.mangleof == "?funb@@YAXVMyClassA@@@Z");
+ static if (size_t.sizeof == ulong.sizeof)
+ {
+ static assert(func.mangleof == "?func@@YAXAEAVMyClassA@@@Z");
+ static assert(fund.mangleof == "?fund@@YAXAEBVMyClassA@@@Z");
+ static assert(fune.mangleof == "?fune@@YAXPEBVMyClassA@@@Z");
+ }
+ else
+ {
+ static assert(func.mangleof == "?func@@YAXAAVMyClassA@@@Z");
+ static assert(fund.mangleof == "?fund@@YAXABVMyClassA@@@Z");
+ static assert(fune.mangleof == "?fune@@YAXPBVMyClassA@@@Z");
+ }
+}
+
+//Basic tests with a namespace
+extern(C++, "ns")
+{
+ class MyClassB {}
+ void funf(ScopeClass!MyClassB); // mangles MyClass
+ void fung(const ScopeClass!MyClassB); // mangles const MyClass
+ void funh(ref ScopeClass!MyClassB); // mangles MyClass&
+ void funi(ref const ScopeClass!MyClassB); // mangles const MyClass&
+ void funj(const(ScopeClass!MyClassB)*);
+}
+
+version (CppMangle_Itanium)
+{
+ static assert(funf.mangleof == "_ZN2ns4funfENS_8MyClassBE");
+ static assert(fung.mangleof == "_ZN2ns4fungENS_8MyClassBE");
+ static assert(funh.mangleof == "_ZN2ns4funhERNS_8MyClassBE");
+ static assert(funi.mangleof == "_ZN2ns4funiERKNS_8MyClassBE");
+ static assert(funj.mangleof == "_ZN2ns4funjEPKNS_8MyClassBE");
+}
+else version (CppRuntime_Microsoft)
+{
+ static assert(funf.mangleof == "?funf@ns@@YAXVMyClassB@1@@Z");
+ static assert(fung.mangleof == "?fung@ns@@YAXVMyClassB@1@@Z");
+ static if (size_t.sizeof == ulong.sizeof)
+ {
+ static assert(funh.mangleof == "?funh@ns@@YAXAEAVMyClassB@1@@Z");
+ static assert(funi.mangleof == "?funi@ns@@YAXAEBVMyClassB@1@@Z");
+ static assert(funj.mangleof == "?funj@ns@@YAXPEBVMyClassB@1@@Z");
+ }
+ else
+ {
+ static assert(funh.mangleof == "?funh@ns@@YAXAAVMyClassB@1@@Z");
+ static assert(funi.mangleof == "?funi@ns@@YAXABVMyClassB@1@@Z");
+ static assert(funj.mangleof == "?funj@ns@@YAXPBVMyClassB@1@@Z");
+ }
+}
+
+//Templates
+extern(C++)
+{
+ void funTempl(T)();
+ class MyClassC {}
+ alias funTemplA = funTempl!(ScopeClass!MyClassC);
+ alias funTemplB = funTempl!(const ScopeClass!MyClassC);
+ alias funTemplC = funTempl!(const(ScopeClass!MyClassC)*);
+ // N.B funTempl!([const] ref ScopeClass!MyClassC) is not permissable in D
+}
+version (CppMangle_Itanium)
+{
+ static assert(funTemplA.mangleof == "_Z8funTemplI8MyClassCEvv");
+ static assert(funTemplB.mangleof == "_Z8funTemplIK8MyClassCEvv");
+ static assert(funTemplC.mangleof == "_Z8funTemplIPK8MyClassCEvv");
+}
+else version (CppRuntime_Microsoft)
+{
+ static assert(funTemplA.mangleof == "??$funTempl@VMyClassC@@@@YAXXZ");
+ static assert(funTemplB.mangleof == "??$funTempl@$$CBVMyClassC@@@@YAXXZ");
+ static if (size_t.sizeof == ulong.sizeof)
+ static assert(funTemplC.mangleof == "??$funTempl@PEBVMyClassC@@@@YAXXZ");
+ else
+ static assert(funTemplC.mangleof == "??$funTempl@PBVMyClassC@@@@YAXXZ");
+}
+
+template _function(F)
+{
+extern(C++, "std")
+{
+ extern(C++, struct)
+ pragma(mangle, "function")
+ class _function
+ {
+ }
+}
+}
+template FunctionOf(F)
+{
+ F f;
+ alias FunctionOf = typeof(*f);
+}
+extern(C++) void funk(ScopeClass!(_function!(FunctionOf!(void function(int))),"function") a ){ }
+
+version (CppMangle_Itanium)
+{
+ static assert(funk.mangleof == "_Z4funkSt8functionIFviEE");
+}
+else version (CppRuntime_Microsoft)
+{
+ static assert(funk.mangleof == "?funk@@YAXV?$function@$$A6AXH@Z@std@@@Z");
+}
+
+extern(C++, "ns")
+{
+ pragma(mangle, "function")
+ class _function2
+ {
+ public final void test();
+ }
+}
+
+version (CppMangle_Itanium)
+{
+ static assert(_function2.test.mangleof == "_ZN2ns8function4testEv");
+}
+else version (CppRuntime_Microsoft)
+{
+ static if (size_t.sizeof == ulong.sizeof)
+ static assert(_function2.test.mangleof == "?test@function@ns@@QEAAXXZ");
+ else
+ static assert(_function2.test.mangleof == "?test@function@ns@@QAEXXZ");
+}
+
+extern(C++, "ns")
+{
+ template _function3(T)
+ {
+ pragma(mangle, _function3, "function")
+ class _function3
+ {
+ public final void test();
+ }
+ }
+}
+
+version (CppMangle_Itanium)
+{
+ static assert(_function3!(int).test.mangleof == "_ZN2ns8functionIiE4testEv");
+}
+else version (CppRuntime_Microsoft)
+{
+ static if (size_t.sizeof == ulong.sizeof)
+ static assert(_function3!(int).test.mangleof == "?test@?$function@H@ns@@QEAAXXZ");
+ else
+ static assert(_function3!(int).test.mangleof == "?test@?$function@H@ns@@QAEXXZ");
+}
+
+extern(C++)
+{
+ struct Foo {}
+ pragma(mangle, Foo) struct Foo_Doppelganger {}
+
+ void funl(Foo_Doppelganger f);
+}
+version (CppMangle_Itanium)
+{
+ static assert(funl.mangleof == "_Z4funl3Foo");
+}
+else version (CppRuntime_Microsoft)
+{
+ static assert(funl.mangleof == "?funl@@YAXUFoo@@@Z");
+}
diff --git a/gcc/testsuite/gdc.test/compilable/issue21328.d b/gcc/testsuite/gdc.test/compilable/issue21328.d
new file mode 100644
index 0000000..91dc0ba
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue21328.d
@@ -0,0 +1,8 @@
+
+static foreach(i; 1 .. 5)
+void foo(float[i] arr)
+{
+ () {
+ float x = arr[0];
+ } ();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/issue21340.d b/gcc/testsuite/gdc.test/compilable/issue21340.d
new file mode 100644
index 0000000..22eda6e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue21340.d
@@ -0,0 +1,38 @@
+version (CppRuntime_Clang) version = CppMangle_Itanium;
+version (CppRuntime_Gcc) version = CppMangle_Itanium;
+version (CppRuntime_Sun) version = CppMangle_Itanium;
+
+template ScopeClass(C)
+if (is(C == class) && __traits(getLinkage, C) == "C++")
+{
+
+ extern(C++, class)
+ extern(C++, __traits(getCppNamespaces,C))
+ extern(C++, (ns))
+ class ScopeClass { }
+}
+extern(C++) class Foo {}
+extern(C++) void test(ScopeClass!Foo)
+{
+}
+version(CppMangle_Itanium)
+{
+ static assert (test.mangleof == "_Z4testP10ScopeClassIP3FooE");
+}
+else version (CppRuntime_Microsoft)
+{
+ version (Win32)
+ {
+ static assert (test.mangleof == "?test@@YAXPAV?$ScopeClass@PAVFoo@@@@@Z");
+ }
+ version (Win64)
+ {
+ static assert (test.mangleof == "?test@@YAXPEAV?$ScopeClass@PEAVFoo@@@@@Z");
+ }
+}
+alias AliasSeq(T...) = T;
+alias ns = AliasSeq!();
+immutable ns2 = AliasSeq!();
+extern(C++,(ns)) class Bar {}
+extern(C++,) class Baz {}
+extern(C++, (ns2)) class Quux {}
diff --git a/gcc/testsuite/gdc.test/compilable/issue21378.d b/gcc/testsuite/gdc.test/compilable/issue21378.d
new file mode 100644
index 0000000..007f39b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue21378.d
@@ -0,0 +1,33 @@
+// https://issues.dlang.org/show_bug.cgi?id=21378
+
+version(all)
+ enum do_inline = true;
+
+pragma(inline, do_inline)
+void stuff(){}
+
+void stuff2()
+{
+ pragma(inline, do_inline);
+}
+
+pragma(inline, canInline(1))
+void stuff3(){}
+
+void stuff4()
+{
+ pragma(inline, canInline(1));
+}
+
+void main()
+{
+ stuff();
+ stuff2();
+ stuff3();
+ stuff4();
+}
+
+int canInline(int x)
+{
+ return x*x;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/issue21662.d b/gcc/testsuite/gdc.test/compilable/issue21662.d
new file mode 100644
index 0000000..bb2e741
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue21662.d
@@ -0,0 +1,4 @@
+struct S { @disable this(); }
+extern __gshared S a;
+extern S[2] b;
+void main() {}
diff --git a/gcc/testsuite/gdc.test/compilable/issue21726.d b/gcc/testsuite/gdc.test/compilable/issue21726.d
index c8a8675..f687751 100644
--- a/gcc/testsuite/gdc.test/compilable/issue21726.d
+++ b/gcc/testsuite/gdc.test/compilable/issue21726.d
@@ -1,2 +1,3 @@
// EXTRA_SOURCES: protection/issue21726/typecons.d
+// EXTRA_FILES: protection/issue21726/format/package.d protection/issue21726/package.d
// https://issues.dlang.org/show_bug.cgi?id=21726
diff --git a/gcc/testsuite/gdc.test/compilable/issue21880.d b/gcc/testsuite/gdc.test/compilable/issue21880.d
new file mode 100644
index 0000000..183f349
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue21880.d
@@ -0,0 +1,23 @@
+// REQUIRED_ARGS: -preview=dip1000
+// https://issues.dlang.org/show_bug.cgi?id=21880
+extern(C++):
+void spawnProcess(scope const(char*)*, File = File()) @safe
+{
+}
+
+void pipeProcess(scope const(char*)* args) @safe
+{
+ pipeProcessImpl!spawnProcess(args);
+}
+
+void pipeProcessImpl(alias spawnFunc, Cmd)(Cmd command) @trusted
+{
+ spawnFunc(command);
+}
+
+struct File
+{
+ ~this() @safe
+ {
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/issue21882.d b/gcc/testsuite/gdc.test/compilable/issue21882.d
new file mode 100644
index 0000000..87a166a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue21882.d
@@ -0,0 +1,14 @@
+// REQUIRED_ARGS: -preview=dip1021
+// https://issues.dlang.org/show_bug.cgi?id=21882
+bool buildPath()
+{
+ struct ByCodeUnitImpl
+ {
+ auto opIndex(size_t) { }
+ }
+ return isRandomAccessRange!ByCodeUnitImpl;
+}
+
+enum isRandomAccessRange(R) = is(typeof(lvalueOf!R[1]));
+
+ref T lvalueOf(T)();
diff --git a/gcc/testsuite/gdc.test/compilable/issue21905.d b/gcc/testsuite/gdc.test/compilable/issue21905.d
new file mode 100644
index 0000000..76a04d8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue21905.d
@@ -0,0 +1,24 @@
+module issue21905;
+
+struct Conv
+{
+ StaticIterable b;
+ alias b this;
+}
+
+struct StaticIterable
+{
+ static Conv b;
+ alias b this;
+}
+
+void each(ref StaticIterable r)
+{
+ return ;
+}
+
+void main()
+{
+ StaticIterable s;
+ each(s);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/issue9884.d b/gcc/testsuite/gdc.test/compilable/issue9884.d
new file mode 100644
index 0000000..e799c49
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/issue9884.d
@@ -0,0 +1,25 @@
+// https://issues.dlang.org/show_bug.cgi?id=9884
+module issue9884;
+
+const(int)[] data;
+
+static this()
+{
+ data = new int[10];
+ foreach (ref x; data) x = 1;
+ data[] = 1;
+}
+
+struct Foo
+{
+ static const(int)[] data;
+
+ static this()
+ {
+ this.data = new int[10];
+ foreach (ref x; this.data) x = 1;
+ this.data[] = 1;
+ }
+}
+
+void main() {}
diff --git a/gcc/testsuite/gdc.test/compilable/json.d b/gcc/testsuite/gdc.test/compilable/json.d
index e2b0860..f79639d 100644
--- a/gcc/testsuite/gdc.test/compilable/json.d
+++ b/gcc/testsuite/gdc.test/compilable/json.d
@@ -1,28 +1,47 @@
// PERMUTE_ARGS:
-// REQUIRED_ARGS: -o- -X -Xf${RESULTS_DIR}/compilable/json.out
-// POST_SCRIPT: compilable/extra-files/json-postscript.sh
+// REQUIRED_ARGS: -d -preview=dip1000 -o- -X -Xf-
// EXTRA_FILES: imports/jsonimport1.d imports/jsonimport2.d imports/jsonimport3.d imports/jsonimport4.d
-
+// TRANSFORM_OUTPUT: sanitize_json
+// TEST_OUTPUT_FILE: extra-files/json.json
module json;
-
+shared static this() {}
static this() {}
-
+shared static ~this() {}
static ~this() {}
+template X(T)
+{
+ shared static this() {}
+ static this() {}
+ shared static ~this() {}
+ static ~this() {}
+}
+
+alias SSCDX = X!int;
+
+class SSCDClass
+{
+ shared static this() {}
+ static this() {}
+ shared static ~this() {}
+ static ~this() {}
+}
+
+#line 17
alias int myInt;
-myInt x; // bug 3404
+myInt x; // https://issues.dlang.org/show_bug.cgi?id=3404
struct Foo(T) { T t; }
class Bar(int T) { int t = T; }
-interface Baz(T...) { T[0] t() const; } // bug 3466
+interface Baz(T...) { T[0] t() const; } // https://issues.dlang.org/show_bug.cgi?id=3466
template P(alias T) {}
class Bar2 : Bar!1, Baz!(int, 2, null) {
this() {}
- ~this() {} // bug 4178
+ ~this() {} // https://issues.dlang.org/show_bug.cgi?id=4178
static foo() {}
protected abstract Foo!int baz();
@@ -30,48 +49,65 @@ class Bar2 : Bar!1, Baz!(int, 2, null) {
}
class Bar3 : Bar2 {
- private int val;
+ private int val;
this(int i) { val = i; }
protected override Foo!int baz() { return Foo!int(val); }
}
struct Foo2 {
- Bar2 bar2;
- union U {
- struct {
- short s;
- int i;
- }
- Object o;
- }
+ Bar2 bar2;
+ union U {
+ struct {
+ short s;
+ int i;
+ }
+ Object o;
+ }
+}
+
+struct Foo3(bool b) {
+ version(D_Ddoc) {
+ /// Doc 1
+ void method1();
+ }
+ static if (b) {
+ /// Doc 2
+ void method2();
+ } else {
+ /// Doc 3
+ void method3();
+ }
+
+ /// Doc 4
+ void method4();
}
/++
+ Documentation test
+/
-@trusted myInt bar(ref uint blah, Bar2 foo = new Bar3(7)) // bug 4477
+@trusted myInt bar(ref uint blah, Bar2 foo = new Bar3(7)) // https://issues.dlang.org/show_bug.cgi?id=4477
{
- return -1;
+ return -1;
}
@property int outer() nothrow
in {
- assert(true);
+ assert(true);
}
out(result) {
- assert(result == 18);
+ assert(result == 18);
}
-body {
- int x = 8;
- int inner(void* v) nothrow
- {
- int y = 2;
- assert(true);
- return x + y;
- }
- int z = inner(null);
- return x + z;
+do {
+ int x = 8;
+ int inner(void* v) nothrow
+ {
+ int y = 2;
+ assert(true);
+ return x + y;
+ }
+ int z = inner(null);
+ return x + z;
}
/** Issue 9484 - selective and renamed imports */
@@ -121,9 +157,60 @@ alias Seq(T...) = T;
static foreach(int i, alias a; Seq!(a0, a1, a2))
{
- mixin("alias b" ~ i.stringof ~ " = a;");
+ mixin("alias b" ~ i.stringof ~ " = a;");
+}
+
+// return ref, return scope, return ref scope
+ref int foo(return ref int a) @safe
+{
+ return a;
}
+int* foo(return scope int* a) @safe
+{
+ return a;
+}
+
+ref int* foo(scope return ref int* a) @safe
+{
+ return a;
+}
+
+struct SafeS
+{
+@safe:
+ ref SafeS foo() return
+ {
+ return this;
+ }
+
+ SafeS foo2() return scope
+ {
+ return this;
+ }
+
+ ref SafeS foo3() return scope
+ {
+ return this;
+ }
+
+ int* p;
+}
+
+extern int vlinkageDefault;
+extern(D) int vlinkageD;
+extern(C) int vlinakgeC;
+extern(C++) __gshared int vlinkageCpp;
+extern(Windows) int vlinkageWindows;
+extern(Objective-C) int vlinkageObjc;
+
+extern int flinkageDefault();
+extern(D) int flinkageD();
+extern(C) int linakgeC();
+extern(C++) int flinkageCpp();
+extern(Windows) int flinkageWindows();
+extern(Objective-C) int flinkageObjc();
+
mixin template test18211(int n)
{
static foreach (i; 0 .. n>10 ? 10 : n)
@@ -132,3 +219,5 @@ mixin template test18211(int n)
}
static if (true) {}
}
+
+alias F = size_t function (size_t a);
diff --git a/gcc/testsuite/gdc.test/compilable/json20742.d b/gcc/testsuite/gdc.test/compilable/json20742.d
new file mode 100644
index 0000000..3e91dee
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/json20742.d
@@ -0,0 +1,69 @@
+/*
+REQUIRED_ARGS: -Xf- -o- -version=Showme
+PERMUTE_ARGS:
+TEST_OUTPUT:
+----
+[
+ {
+ "kind" : "module",
+ "file" : "compilable$?:windows=\\|/$json20742.d",
+ "members" : [
+ {
+ "name" : "X1",
+ "kind" : "struct",
+ "protection" : "private",
+ "line" : 52,
+ "char" : 13,
+ "members" : []
+ },
+ {
+ "name" : "Y2",
+ "kind" : "struct",
+ "protection" : "private",
+ "line" : 59,
+ "char" : 13,
+ "members" : []
+ },
+ {
+ "name" : "A1",
+ "kind" : "struct",
+ "protection" : "private",
+ "line" : 62,
+ "char" : 13,
+ "members" : []
+ },
+ {
+ "name" : "B2",
+ "kind" : "struct",
+ "protection" : "private",
+ "line" : 69,
+ "char" : 13,
+ "members" : []
+ }
+ ]
+ }
+]
+----
+
+https://issues.dlang.org/show_bug.cgi?id=20742
+*/
+
+version(Showme)
+ private struct X1 {}
+else
+ private struct X2 {}
+
+version(Hideme)
+ private struct Y1 {}
+else
+ private struct Y2 {}
+
+static if (true)
+ private struct A1 {}
+else
+ private struct A2 {}
+
+static if (false)
+ private struct B1 {}
+else
+ private struct B2 {}
diff --git a/gcc/testsuite/gdc.test/compilable/minimal.d b/gcc/testsuite/gdc.test/compilable/minimal.d
new file mode 100644
index 0000000..6398328
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/minimal.d
@@ -0,0 +1,19 @@
+// DFLAGS:
+// PERMUTE_ARGS:
+// POST_SCRIPT: compilable/extra-files/minimal/verify_symbols.sh
+// REQUIRED_ARGS: -defaultlib=
+// EXTRA_SOURCES: extra-files/minimal/object.d
+
+// This test ensures an empty main with a struct and enum, built with a minimal
+// runtime, does not generate ModuleInfo or exception handling code, and does not
+// require TypeInfo
+
+struct S { }
+
+enum E
+{
+ e0 = 0,
+ e1 = 1
+}
+
+void main() { }
diff --git a/gcc/testsuite/gdc.test/compilable/minimal2.d b/gcc/testsuite/gdc.test/compilable/minimal2.d
new file mode 100644
index 0000000..d69eb92
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/minimal2.d
@@ -0,0 +1,31 @@
+// DFLAGS:
+// REQUIRED_ARGS: -defaultlib=
+// EXTRA_SOURCES: extra-files/minimal/object.d
+
+// This test ensures that interfaces and classes can be used in a minimal
+// runtime as long as they only contain static members.
+
+// This should compile, but will not link and run properly without
+// a thread-local storage (TLS) implementation.
+
+interface I
+{
+ static int i;
+}
+
+class A : I
+{
+ static int a;
+}
+
+class B : A
+{
+ static int b;
+}
+
+void main()
+{
+ B.i = 32;
+ B.a = 42;
+ B.b = 52;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/mixin.d b/gcc/testsuite/gdc.test/compilable/mixin.d
new file mode 100644
index 0000000..d96eae1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/mixin.d
@@ -0,0 +1,38 @@
+/*
+REQUIRED_ARGS: -mixin=${RESULTS_DIR}/runnable/mixin.mixin -o-
+OUTPUT_FILES: ${RESULTS_DIR}/runnable/mixin.mixin
+
+TEST_OUTPUT:
+----
+=== ${RESULTS_DIR}/runnable/mixin.mixin
+// expansion at compilable/mixin.d(14)
+int x =
+ 123;
+
+ int y;
+
+
+
+ int z = x + y;
+----
+
+https://issues.dlang.org/show_bug.cgi?id=1870
+https://issues.dlang.org/show_bug.cgi?id=12790
+*/
+
+#line 1
+string get()
+{
+ return "int x =\n 123;\r\n" ~
+ q{
+ int y;
+
+
+
+ int z = x + y;};
+}
+
+void main()
+{
+ mixin(get());
+}
diff --git a/gcc/testsuite/gdc.test/compilable/mixinTemplateMangling.d b/gcc/testsuite/gdc.test/compilable/mixinTemplateMangling.d
new file mode 100644
index 0000000..3596a95
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/mixinTemplateMangling.d
@@ -0,0 +1,35 @@
+// https://issues.dlang.org/show_bug.cgi?id=20012
+
+mixin template mixinFoo() {
+
+ extern(C) void cFoo() {}
+
+ extern(C) int cVar;
+ extern(D) int dVar;
+
+ void dFoo() {}
+
+ mixin(`mixin mixinBar;`); // test nesting and interaction with string mixins
+}
+
+mixin mixinFoo;
+
+mixin template mixinBar() {
+ extern(C) void cBar() {}
+ void dBar() {}
+}
+
+static assert(cFoo.mangleof == "cFoo");
+static assert(dFoo.mangleof == "_D21mixinTemplateMangling8__mixin54dFooFZv");
+static assert(cVar.mangleof == "cVar");
+static assert(dVar.mangleof == "_D21mixinTemplateMangling8__mixin54dVari");
+static assert(cBar.mangleof == "cBar");
+static assert(dBar.mangleof == "_D21mixinTemplateMangling8__mixin5Qj4dBarFZv");
+
+struct S {
+ mixin mixinFoo;
+ static assert(cFoo.mangleof == "_D21mixinTemplateMangling1S8__mixin14cFooMUZv");
+ static assert(cBar.mangleof == "_D21mixinTemplateMangling1S8__mixin18__mixin54cBarMUZv");
+ static assert(dBar.mangleof == "_D21mixinTemplateMangling1S8__mixin18__mixin54dBarMFZv");
+ static assert(dFoo.mangleof == "_D21mixinTemplateMangling1S8__mixin14dFooMFZv");
+}
diff --git a/gcc/testsuite/gdc.test/compilable/mixintempl.d b/gcc/testsuite/gdc.test/compilable/mixintempl.d
new file mode 100644
index 0000000..d897a17
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/mixintempl.d
@@ -0,0 +1,22 @@
+
+struct TypeObj
+{
+ alias This = typeof(this);
+
+ mixin template MixinTempl()
+ {
+ int value;
+ }
+}
+
+ref TypeObj Obj()
+{
+ static TypeObj a;
+ return a;
+}
+
+void func()
+{
+ mixin Obj.This.MixinTempl; // ok
+ mixin Obj.MixinTempl; // fixed: "MixinTempl!()" is not defined
+}
diff --git a/gcc/testsuite/gdc.test/compilable/mixintype2.d b/gcc/testsuite/gdc.test/compilable/mixintype2.d
index 43803df..d160bd4 100644
--- a/gcc/testsuite/gdc.test/compilable/mixintype2.d
+++ b/gcc/testsuite/gdc.test/compilable/mixintype2.d
@@ -66,3 +66,52 @@ static assert(is(T8 == const(ubyte*)));
alias T8 = mixin(q{immutable(__traits(getMember, S, "T"))})*;
static assert(is(T8 == immutable(float*)*));
*/
+
+/**************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=22356
+
+mixin("void") func22356(int) { }
+static assert(is(typeof(&func22356) == void function(int)));
+
+static mixin("void") func22356_s(char) { }
+static assert(is(typeof(&func22356_s) == void function(char)));
+
+mixin("int")[2] func22356_2(int) { return [1, 2]; }
+static assert(is(typeof(&func22356_2) == int[2] function(int)));
+
+mixin("int") func22356tp(S, T)(S, T) { return 1; }
+static assert(is(typeof(&func22356tp!(char, float)) == int function(char, float) pure nothrow @nogc @safe));
+
+mixin("int") x22356;
+static assert(is(typeof(x22356) == int));
+
+mixin("int")** xpp22356;
+static assert(is(typeof(xpp22356) == int**));
+
+mixin("int") y22356, z22356;
+static assert(is(typeof(y22356) == int) && is(typeof(z22356) == int));
+
+// Already working but for completeness
+void test_statements_22356()
+{
+ mixin("void") func22356(int) { }
+ static assert(is(typeof(&func22356) == void delegate(int) pure nothrow @nogc @safe));
+
+ static mixin("void") func22356_s(char) { }
+ static assert(is(typeof(&func22356_s) == void function(char) pure nothrow @nogc @safe));
+
+ mixin("int")[2] func22356_2(int) { return [1, 2]; }
+ static assert(is(typeof(&func22356_2) == int[2] delegate(int) pure nothrow @nogc @safe));
+
+ mixin("int") func22356tp(S, T)(S, T) { return 1; }
+ static assert(is(typeof(&func22356tp!(char, float)) == int delegate(char, float) pure nothrow @nogc @safe));
+
+ mixin("int") x22356;
+ static assert(is(typeof(x22356) == int));
+
+ mixin("int")** xpp22356;
+ static assert(is(typeof(xpp22356) == int**));
+
+ mixin("int") y22356, z22356;
+ static assert(is(typeof(y22356) == int) && is(typeof(z22356) == int));
+}
diff --git a/gcc/testsuite/gdc.test/compilable/nestedtempl0.d b/gcc/testsuite/gdc.test/compilable/nestedtempl0.d
new file mode 100644
index 0000000..aa6826b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/nestedtempl0.d
@@ -0,0 +1,13 @@
+class C2
+{
+ class N(alias a) {}
+}
+
+void test2()
+{
+ int a;
+ static assert(__traits(isSame, __traits(parent, C2.N!0), C2));
+ static assert(__traits(isSame, __traits(parent, C2.N!a), C2));
+ static assert(__traits(classInstanceSize, C2.N!0) == size_t.sizeof * 3);
+ static assert(__traits(classInstanceSize, C2.N!a) == size_t.sizeof * 4);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/nestedtempl1.d b/gcc/testsuite/gdc.test/compilable/nestedtempl1.d
new file mode 100644
index 0000000..ecb8e83
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/nestedtempl1.d
@@ -0,0 +1,25 @@
+class K
+{
+ class B(alias a)
+ {
+
+ }
+
+ class D(alias a) : B!a
+ {
+
+ }
+
+ class E(alias a) : B!1
+ {
+
+ }
+}
+
+void main()
+{
+ int a;
+ auto k = new K;
+ auto d = k.new K.D!a;
+ auto e = k.new K.E!a;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/nogc.d b/gcc/testsuite/gdc.test/compilable/nogc.d
index c2581da..2751801 100644
--- a/gcc/testsuite/gdc.test/compilable/nogc.d
+++ b/gcc/testsuite/gdc.test/compilable/nogc.d
@@ -52,7 +52,7 @@ void foo_compiles() {}
}
/******************************************/
-// 12630
+// https://issues.dlang.org/show_bug.cgi?id=12630
void test12630() @nogc
{
@@ -86,7 +86,7 @@ void test12630() @nogc
}
/******************************************/
-// 12642
+// https://issues.dlang.org/show_bug.cgi?id=12642
static if (is(__vector(ulong[2])))
{
@@ -99,7 +99,7 @@ static if (is(__vector(ulong[2])))
}
/******************************************/
-// 13550
+// https://issues.dlang.org/show_bug.cgi?id=13550
auto foo13550() @nogc
{
diff --git a/gcc/testsuite/gdc.test/compilable/noreturn1.d b/gcc/testsuite/gdc.test/compilable/noreturn1.d
index e21adc4..22734cf 100644
--- a/gcc/testsuite/gdc.test/compilable/noreturn1.d
+++ b/gcc/testsuite/gdc.test/compilable/noreturn1.d
@@ -1,17 +1,93 @@
/*
+REQUIRED_ARGS: -w
TEST_OUTPUT:
---
noreturn
---
+
+Basic properties and usage mentioned in the DIP:
+https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1034.md
*/
alias noreturn = typeof(*null);
pragma(msg, noreturn);
-noreturn exits(int* p) { *p = 3; }
+static assert(!is(noreturn == void));
+
+// Fails
+// static assert(is( typeof([]) == noreturn[] ));
+// static assert(is( typeof([][0]) == noreturn ));
+
+static assert(is( typeof(assert(0)) == noreturn ));
+
+// Does not parse yet
+// static assert(is( typeof(throw new Exception()) == noreturn ));
+
+static assert(is(noreturn == noreturn));
+static assert(!is(noreturn == const noreturn));
+static assert(is(noreturn : const noreturn));
+
+static assert(!is(noreturn == int));
+static assert(is(noreturn : int));
+
+// Covariance
+static assert(is(noreturn[] : int[]));
+static assert(is(noreturn* : int*));
+static assert(is(noreturn function() : int function()));
+static assert(is(noreturn delegate() : int delegate()));
+
+// Reject inverse conversions
+static assert(!is(int[] : noreturn[]));
+static assert(!is(int* : noreturn*));
+static assert(!is(int function() : noreturn function()));
+static assert(!is(int delegate() : noreturn delegate()));
+
+static assert(noreturn.mangleof == "Nn"); // Changed from b due to conflicts with bool
+static assert(noreturn.sizeof == 0);
+static assert(noreturn.alignof == 0);
+
+static assert((noreturn*).sizeof == (int*).sizeof);
+static assert((noreturn[]).sizeof == (int[]).sizeof);
+
+static assert(is(typeof(noreturn.init) == noreturn));
+static assert(is(typeof((const noreturn).init) == const noreturn));
+static assert(is(typeof((immutable noreturn).init) == immutable noreturn));
+static assert(is(typeof((shared noreturn).init) == shared noreturn));
+
+version (DigitalMars)
+ noreturn exits(int* p)
+ {
+ *p = 3;
+ assert(false); // *p could be valid
+ }
noreturn exit();
+noreturn pureexits() @nogc nothrow pure @safe { assert(0); }
+
+noreturn callpureexits() { pureexits(); }
+
+noreturn returnExits()
+{
+ return pureexits();
+}
+
+void alsoExits()
+{
+ return assert(0);
+}
+
+int thisAlsoExits()
+{
+ return assert(0);
+}
+
+void cast_()
+{
+ noreturn n;
+ int i = n;
+}
+
int test1(int i)
{
if (exit())
@@ -19,3 +95,31 @@ int test1(int i)
return i - 1;
}
+noreturn tlsNoreturn;
+__gshared noreturn globalNoreturn;
+
+template CreateTLS(A)
+{
+ A a;
+}
+
+void* useTls()
+{
+ alias Tnr = CreateTLS!noreturn;
+ void* a1 = &Tnr.a;
+ void* a2 = &tlsNoreturn;
+ void* a3 = &globalNoreturn;
+ return a1 < a2 ? a2 : a3;
+}
+
+/***************************************************/
+
+noreturn testfn(noreturn function() fn)
+{
+ fn();
+}
+
+noreturn testdg(noreturn delegate() dg)
+{
+ dg();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/ob1.d b/gcc/testsuite/gdc.test/compilable/ob1.d
new file mode 100644
index 0000000..720c765
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/ob1.d
@@ -0,0 +1,149 @@
+// REQUIRED_ARGS: -preview=dip1021
+
+/* Should compile successfully
+ */
+
+
+struct Allocation {
+ int* ptr;
+ size_t length;
+}
+
+void canFind(scope Allocation);
+
+int* malloc();
+void free(int*);
+void pitcher();
+void borrow(scope int*);
+void borrow2c(const scope int*, const scope int*);
+void out1(out int*);
+
+
+/*****************************/
+
+@live int* foo1(int* p)
+{
+ return p; // consumes owner
+}
+
+@live int* foo2()
+{
+ int* p = null;
+ return p; // consumes owner
+}
+
+@live int* foo3(int* p)
+{
+ scope int* q = p; // borrows from p
+ return p; // use of p ends borrow in q
+}
+
+@live int* foo4(int* p)
+{
+ scope int* bq = p; // borrow
+ scope const int* cq = p; // const borrow
+ return p; // ends both borrows
+}
+
+/*******************************/
+
+@live void foo5()
+{
+ auto p = malloc();
+ scope(exit) free(p);
+ pitcher();
+}
+
+/*******************************/
+
+void deallocate(int* ptr, size_t length) @live
+{
+ canFind(Allocation(ptr, length)); // canFind() borrows ptr
+ free(ptr);
+}
+
+
+/*******************************/
+
+
+@live int* test1()
+{
+ auto p = malloc();
+ scope b = p;
+ return p;
+}
+
+@live int* test2()
+{
+ auto p = malloc();
+ auto q = p;
+ return q;
+}
+
+@live void test3()
+{
+ auto p = malloc();
+ free(p);
+}
+
+@live void test4()
+{
+ auto p = malloc();
+ borrow(p);
+ free(p);
+}
+
+@live void test5()
+{
+ auto p = malloc();
+ scope q = p;
+ borrow2c(p, p);
+ free(p);
+}
+
+@live void test6()
+{
+ int* p = void;
+ out1(p); // initialize
+ free(p); // consume
+}
+
+
+/*******************************/
+
+void zoo1(int);
+
+@live void zoo2() {
+ int* p = malloc();
+ zoo1(*p); // does not consume p
+ free(p);
+}
+
+@live void zoo3() {
+ int** p = cast(int**)malloc();
+ free(*p); // consumes p
+}
+
+@live void zoo4() {
+ int[] a = malloc()[0 .. 1];
+ zoo1(a[0]); // does not consume a
+ free(a.ptr); // consumes a
+}
+
+@live void zoo5() {
+ int*[] a = (cast(int**)malloc())[0 .. 1];
+ free(a[0]); // consumes a
+}
+
+struct S { int i; int* p; }
+
+@live void zoo6() {
+ S* s = cast(S*)malloc();
+ zoo1(s.i); // does not consume s
+ free(cast(int*)s);
+}
+
+@live void zoo7() {
+ S* s = cast(S*)malloc();
+ free(s.p); // consumes s
+}
diff --git a/gcc/testsuite/gdc.test/compilable/pr9374.d b/gcc/testsuite/gdc.test/compilable/pr9374.d
new file mode 100644
index 0000000..912639d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/pr9374.d
@@ -0,0 +1,19 @@
+// REQUIRED_ARGS: -preview=dip1000
+
+// https://github.com/dlang/dmd/pull/9374
+
+struct OnlyResult
+{
+ this(return scope ref int v2);
+
+ void* data;
+}
+
+OnlyResult foo(return scope ref int v2);
+
+OnlyResult only(int y)
+{
+ if (y)
+ return OnlyResult(y);
+ return foo(y);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/pr9383.d b/gcc/testsuite/gdc.test/compilable/pr9383.d
new file mode 100644
index 0000000..ca6d70f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/pr9383.d
@@ -0,0 +1,25 @@
+// REQUIRED_ARGS: -preview=dip1000
+// https://github.com/dlang/dmd/pull/9383
+
+void test() @safe
+{
+ int[1] a = [1];
+ cartesianProduct(a[]);
+}
+
+auto cartesianProduct(RR...)(RR ranges)
+{
+ static struct Result
+ {
+ RR current;
+
+ void popFront() scope @safe
+ {
+ foreach (ref r; current)
+ {
+ }
+ }
+ }
+
+ return Result(ranges);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/previewin.d b/gcc/testsuite/gdc.test/compilable/previewin.d
new file mode 100644
index 0000000..8926fbd
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/previewin.d
@@ -0,0 +1,116 @@
+/* REQUIRED_ARGS: -preview=dip1000 -preview=in -mcpu=native
+ */
+
+import core.stdc.time;
+
+void fun(in int* inParam) @safe;
+static assert([__traits(getParameterStorageClasses, fun, 0)] == ["in"]);
+static assert (is(typeof(fun) P == __parameters) && is(P[0] == const int*));
+
+struct Foo
+{
+ int a;
+ double[100] b;
+}
+void fun2(in Foo inParam) @safe;
+static assert([__traits(getParameterStorageClasses, fun2, 0)] == ["in"]);
+static assert (is(typeof(fun2) P == __parameters) && is(P[0] == const Foo));
+
+void test()
+{
+ withDefaultValue(42);
+ withDefaultValue();
+ withDefaultRef(TimeRef.init);
+ withDefaultRef();
+
+ withInitDefaultValue();
+ withInitDefaultRef();
+}
+
+struct FooBar
+{
+ string toString() const
+ {
+ string result;
+ // Type is const
+ this.toString((in char[] buf) {
+ static assert(is(typeof(buf) == const(char[])));
+ result ~= buf;
+ });
+ // Type inference works
+ this.toString((in buf) { result ~= buf; });
+ return result;
+ }
+
+ void toString(scope void delegate(in char[]) sink) const
+ {
+ sink("Hello world");
+ }
+}
+
+// Ensure that default parameter works even if non CTFEable
+void withDefaultValue(in time_t currTime = time(null)) {}
+struct TimeRef { time_t now; ulong[4] bloat; }
+void withDefaultRef(in TimeRef currTime = TimeRef(time(null))) {}
+
+// Ensure that default parameters work with `.init`
+void withInitDefaultValue(in size_t defVal = size_t.init) {}
+void withInitDefaultRef(in TimeRef defVal = TimeRef.init) {}
+
+// Ensure that temporary aren't needlessly created
+// (if they are, it'll trigger the "goto skips declaration" error)
+void checkNotIdentity(in void* p1, in void* p2) { assert(p1 !is p2); }
+void checkTemporary()
+{
+ int* p = new int;
+ if (p is null)
+ goto LError;
+ // Should not generate temporary, pass the pointers by value
+ checkNotIdentity(/*lvalue*/ p, /*rvalue*/ null);
+ checkNotIdentity(new int, null);
+LError:
+ assert(0);
+}
+
+
+// Some ABI-specific tests:
+
+version (Win64)
+{
+ void checkReal(in real p)
+ {
+ // ref for x87 real, value for double-precision real
+ static assert(__traits(isRef, p) == (real.sizeof > 8));
+ }
+
+ struct RGB { ubyte r, g, b; }
+ void checkNonPowerOf2(in RGB p)
+ {
+ static assert(__traits(isRef, p));
+ }
+}
+else version (X86_64) // Posix x86_64
+{
+ struct Empty {} // 1 dummy byte passed on the stack
+ void checkEmptyStruct(in Empty p)
+ {
+ static assert(!__traits(isRef, p));
+ }
+
+ static if (is(__vector(double[4])))
+ {
+ struct AvxVectorWrapper { __vector(double[4]) a; } // 256 bits
+ void checkAvxVector(in AvxVectorWrapper p)
+ {
+ static assert(!__traits(isRef, p));
+ }
+ }
+}
+else version (AArch64)
+{
+ alias HVA = __vector(float[4])[4]; // can be passed in 4 vector registers
+ void checkHVA(in HVA p)
+ {
+ static assert(!__traits(isRef, p));
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/protattr.d b/gcc/testsuite/gdc.test/compilable/protattr.d
index ca53a5e..5922a79 100644
--- a/gcc/testsuite/gdc.test/compilable/protattr.d
+++ b/gcc/testsuite/gdc.test/compilable/protattr.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -o-
+// EXTRA_FILES: protection/basic/mod1.d protection/basic/tests.d protection/subpkg/explicit.d protection/subpkg/tests.d protection/subpkg2/tests.d
// PERMUTE_ARGS:
import protection.basic.tests;
import protection.subpkg.tests;
diff --git a/gcc/testsuite/gdc.test/compilable/protection.d b/gcc/testsuite/gdc.test/compilable/protection.d
index 3d6198d..bf906eb 100644
--- a/gcc/testsuite/gdc.test/compilable/protection.d
+++ b/gcc/testsuite/gdc.test/compilable/protection.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/protectionimp.d
import imports.protectionimp;
alias TypeTuple(T...) = T;
@@ -76,7 +77,7 @@ void main()
}
/***************************************************/
-// 14169
+// https://issues.dlang.org/show_bug.cgi?id=14169
template staticMap14169(alias fun, T...)
{
diff --git a/gcc/testsuite/gdc.test/compilable/quadratic.d b/gcc/testsuite/gdc.test/compilable/quadratic.d
new file mode 100644
index 0000000..4619e82
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/quadratic.d
@@ -0,0 +1,42 @@
+/* PERMUTE_ARGS: -O
+ * If not careful, this can produce exponential tree traversal times
+ * when compiling the generated opEquals() function.
+ */
+
+struct Param
+{
+ bool verbose;
+ bool vcg_ast;
+ bool showColumns;
+ bool vtls;
+ bool vtemplates;
+ bool vgc;
+ bool vfield;
+ bool vcomplex;
+ int useDeprecated;
+ bool stackstomp;
+ bool useUnitTests;
+ bool useInline;
+ bool useDIP25;
+ bool noDIP25;
+ bool useDIP1021;
+ bool release;
+ bool 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;
+ uint debuglevel;
+ void* debugids;
+
+ uint versionlevel;
+ void* versionids;
+
+ const(char)[] defaultlibname;
+ const(char)[] debuglibname;
+ const(char) mscrtlib;
+
+ void* moduleDeps;
+ int messageStyle = 1;
+}
+
+struct Global
+{
+ Param params;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/readmodify_structclass.d b/gcc/testsuite/gdc.test/compilable/readmodify_structclass.d
new file mode 100644
index 0000000..ba55e54
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/readmodify_structclass.d
@@ -0,0 +1,30 @@
+// REQUIRED_ARGS:
+shared struct S
+{
+ int x = 0;
+
+ int opUnary(string s)() if (s == "++")
+ {
+ import core.atomic : atomicOp;
+ return atomicOp!"+="(x, 1);
+ }
+}
+
+shared class C
+{
+ int x = 0;
+
+ int opUnary(string s)() if (s == "++")
+ {
+ import core.atomic : atomicOp;
+ return atomicOp!"+="(x, 1);
+ }
+}
+
+void main()
+{
+ S s;
+ s++;
+ shared(C) c = new C();
+ c++;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/reinterpretctfe.d b/gcc/testsuite/gdc.test/compilable/reinterpretctfe.d
new file mode 100644
index 0000000..9a4db35
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/reinterpretctfe.d
@@ -0,0 +1,48 @@
+// https://issues.dlang.org/show_bug.cgi?id=21997
+
+struct Strukt
+{
+ int i;
+ string s;
+}
+
+int nonPureFunc(int i)
+{
+ return 2 * i;
+}
+
+int mainCtfe()
+{
+ auto pureFunc = cast(int function(int) pure) &nonPureFunc;
+ assert(pureFunc(2) == 4);
+
+ auto baseFunc = cast(int function(int)) pureFunc;
+ assert(baseFunc(3) == 6);
+
+ /*
+ Still missing delegates: https://issues.dlang.org/show_bug.cgi?id=17487
+
+ static struct S {
+ int i;
+ int f(int j) { return i * j; }
+ }
+
+ S s = S(5);
+ auto pureDel = cast(int delegate(int) pure) &s.f;
+ assert(pureDel(3) == 15);
+
+ auto baseDel = cast(int delegate(int)) pureDel;
+ assert(baseDel(4) == 20);
+ */
+
+ {
+ shared Strukt shStr;
+ Strukt str = *cast(Strukt*) &shStr;
+
+ shared(Strukt)* ptr = cast(shared(Strukt)*) &str;
+ }
+
+ return 0;
+}
+
+enum forceCTFE = mainCtfe();
diff --git a/gcc/testsuite/gdc.test/compilable/riia_ctor.d b/gcc/testsuite/gdc.test/compilable/riia_ctor.d
index 1c8e142..459ca53 100644
--- a/gcc/testsuite/gdc.test/compilable/riia_ctor.d
+++ b/gcc/testsuite/gdc.test/compilable/riia_ctor.d
@@ -1,4 +1,5 @@
// https://issues.dlang.org/show_bug.cgi?id=17494
+// REQUIRED_ARGS: -revert=dtorfields
struct S
{
~this() {}
diff --git a/gcc/testsuite/gdc.test/compilable/rvalueref.d b/gcc/testsuite/gdc.test/compilable/rvalueref.d
new file mode 100644
index 0000000..1c96c36
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/rvalueref.d
@@ -0,0 +1,13 @@
+/* REQUIRED_ARGS: -preview=rvaluerefparam
+ */
+
+struct AS
+{
+ string get() @safe @nogc pure nothrow { return _s; }
+ alias get this;
+ @disable this(this);
+ string _s;
+}
+
+void popFront(ref string) { }
+static assert(!is(typeof((R r) => r.popFront)));
diff --git a/gcc/testsuite/gdc.test/compilable/scope.d b/gcc/testsuite/gdc.test/compilable/scope.d
index 4f53730..7e81028 100644
--- a/gcc/testsuite/gdc.test/compilable/scope.d
+++ b/gcc/testsuite/gdc.test/compilable/scope.d
@@ -1,14 +1,255 @@
/*
- currently fails with extra safety checks
- PERMUTE_FIXME_ARGS: -dip1000
+REQUIRED_ARGS: -preview=dip1000
*/
struct Cache
{
ubyte[1] v;
- ubyte[] set(ubyte[1] v)
+ ubyte[] set(ubyte[1] v) return
{
return this.v[] = v[];
}
}
+
+/*********************************/
+
+// https://github.com/dlang/dmd/pull/9220
+
+@safe:
+
+struct OnlyResult
+{
+ private this(Values)(scope ref Values values)
+ {
+ this.s = values;
+ }
+
+ string s;
+}
+
+auto only(Values)(Values vv)
+{
+ return OnlyResult(vv);
+}
+
+
+void test() @nogc @safe pure
+{
+ only(null);
+}
+
+/************************************/
+
+// https://github.com/dlang/dmd/pull/9220
+
+auto callWrappedOops(scope string dArgs) {
+
+ string callWrappedImpl() {
+ return dArgs;
+ }
+}
+
+/************************************/
+
+struct Constant
+{
+ int* member;
+
+ this(Repeat!(int*) grid) @safe
+ {
+ foreach(ref x; grid)
+ member = x;
+
+ foreach(ref x; grid)
+ x = member;
+ }
+
+ int* foo(return scope Repeat!(int*) grid) @safe
+ {
+ foreach(ref x; grid)
+ x = member;
+
+ foreach(ref x; grid)
+ return x;
+
+ return null;
+ }
+
+ alias Repeat(T...) = T;
+}
+
+
+/************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=19387
+
+struct C
+{
+ void* u;
+ this(this) @safe
+ {
+ }
+}
+
+struct S
+{
+ C c;
+}
+
+void foo(scope S s) @safe
+{
+}
+
+void bar(scope S s) @safe
+{
+ foo(s);
+}
+
+/************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=20675
+
+struct D
+{
+ int pos;
+ char* p;
+}
+
+void test(scope ref D d) @safe
+{
+ D[] da;
+ da ~= D(d.pos, null);
+}
+
+/************************************/
+
+void withEscapes()
+{
+ static D get() @safe;
+
+ with (get())
+ {
+ }
+}
+
+/************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=20682
+
+int f1_20682(return scope ref D d) @safe
+{
+ return d.pos;
+}
+
+ref int f2_20682(return scope ref D d) @safe
+{
+ return d.pos;
+}
+
+void test_20682(scope ref D d) @safe
+{
+ int[] a;
+ a ~= f1_20682(d);
+ a ~= f2_20682(d);
+ a ~= cast(int) d.p;
+}
+
+// Phobos failure
+void formattedWrite(immutable char[2] args) @safe
+{
+ scope immutable char[] val = args;
+}
+
+void ctfeRead(const ubyte[2] array) @safe
+{
+ short result;
+
+ foreach_reverse (b; array)
+ result = cast(short) ((result << 8) | b);
+
+ foreach (b; array)
+ result = cast(short) ((result << 8) | b);
+}
+
+void demangle() @safe
+{
+ static struct DotSplitter
+ {
+ const(char)[] s;
+
+ @safe:
+ @property bool empty() const { return !s.length; }
+
+ @property const(char)[] front() const return
+ {
+ immutable i = indexOfDot();
+ return s;
+ }
+
+ void popFront() {}
+
+ private ptrdiff_t indexOfDot() const
+ {
+ return -1;
+ }
+ }
+
+ foreach (comp; DotSplitter(""))
+ {
+ const copy = comp;
+ }
+}
+
+void fileCtor() @safe
+{
+ static struct S
+ {
+ int i;
+ }
+
+ // static S get()
+ // {
+ // return S();
+ // }
+
+ with (S())
+ {
+ int* ptr = &i;
+ }
+}
+
+// Missing test coverage
+int*[4] testArray() @safe
+{
+ return typeof(return).init;
+}
+
+/************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=21209
+void testForeach(T)(const(T)[] ts)
+{
+ static int g;
+ g++; // force impure for https://issues.dlang.org/show_bug.cgi?id=20150
+ foreach (c; ts)
+ {
+
+ }
+ foreach_reverse(c0; ts)
+ {
+ foreach(c1; ts)
+ {
+
+ }
+ }
+}
+
+@safe
+void main21209()
+{
+ char[10] cs;
+ float[10] fs;
+ testForeach(cs);
+ testForeach(fs);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/scopeinfer.d b/gcc/testsuite/gdc.test/compilable/scopeinfer.d
new file mode 100644
index 0000000..1ed4c6a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/scopeinfer.d
@@ -0,0 +1,30 @@
+// PERMUTE_ARGS: -preview=dip1000
+
+// Mangling should be the same with or without inference of `return scope`
+
+@safe:
+
+auto foo(void* p) { return 0; }
+static assert(typeof(foo).mangleof == "FNaNbNiNfPvZi");
+
+auto bar(void* p) { return p; }
+static assert(typeof(bar).mangleof == "FNaNbNiNfPvZQd");
+
+// https://issues.dlang.org/show_bug.cgi?id=19857
+
+struct Stack()
+{
+@safe:
+ int** data;
+ ref int* top()
+ {
+ return *data;
+ }
+}
+
+alias S = Stack!();
+
+//pragma(msg, S.top.mangleof);
+
+version (Win32)
+static assert(S.top.mangleof == "_D10scopeinfer__T5StackZQh3topMFNaNbNcNiNfZPi");
diff --git a/gcc/testsuite/gdc.test/compilable/shared.d b/gcc/testsuite/gdc.test/compilable/shared.d
new file mode 100644
index 0000000..bfa8422
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/shared.d
@@ -0,0 +1,125 @@
+/* REQUIRED_ARGS: -preview=nosharedaccess
+TEST_OUTPUT:
+---
+pure nothrow @nogc ref @safe shared(C1)(return ref shared(C1) c)
+pure nothrow @nogc ref @safe shared(int)(return ref shared(C3) c)
+---
+*/
+ref shared(int) f(return shared ref int y)
+{
+ return y;
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20908
+void test20908()
+{
+ // shared locals (or struct members) should be able to be initialised:
+ shared int x;
+
+ ref shared(int) fun()
+ {
+ static shared(int) val;
+
+ // return by reference
+ return val;
+ }
+
+ ref shared(int) fun2()
+ {
+ static shared(int)* val;
+
+ // transfer pointer to reference
+ return *val;
+ }
+
+ ref shared(int) fun3()
+ {
+ static shared(int)*** val;
+
+ // Multiple indirections
+ return ***val;
+ }
+}
+
+// Simple tests for `DotVarExp`
+// A `DotVarExp` is `a.b`. If `a` is a `shared ref`,
+// it is of type `shared(T)*` (as opposed to `shared(T*)`).
+// We should allow arbitrarily nested `DotVarExp` as long
+// as no shared memory is read, as in the case above
+// (we're just offsetting a pointer).
+struct C1
+{
+ int value;
+}
+
+struct C2
+{
+ C1 c1;
+}
+
+struct C3
+{
+ C2 c1;
+ C2 c2;
+}
+
+ref shared(int) test_dotvarexp_1(return ref shared C1 c)
+{
+ return c.value;
+}
+
+shared(int)* test_dotvarexp_2(return ref shared C1 c)
+{
+ return &c.value;
+}
+
+shared(C2)* test_dotvarexp_3(return ref shared C3 c)
+{
+ return &c.c1;
+}
+
+shared(C2)* test_dotvarexp_4(return ref shared C3 c)
+{
+ return &c.c2;
+}
+
+ref shared(int) test_dotvarexp_5(return shared ref C3 c)
+{
+ return c.c1.c1.value;
+}
+
+ref shared(int) test_dotvarexp_5(return ref shared(C3)[] c)
+{
+ return c[0].c1.c1.value;
+}
+
+// Test `auto` inference
+auto ref test_inference_1(return ref shared C1 c)
+{
+ return c;
+}
+
+pragma(msg, typeof(test_inference_1));
+
+auto ref test_inference_2(return ref shared C3 c)
+{
+ return c.c2.c1.value;
+}
+
+pragma(msg, typeof(test_inference_2));
+
+// https://issues.dlang.org/show_bug.cgi?id=21793
+
+struct Child
+{
+ this(int) shared {}
+}
+
+struct Parent
+{
+ shared Child ch;
+ this(int i) shared
+ {
+ ch = shared Child(i);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/sharedopt.d b/gcc/testsuite/gdc.test/compilable/sharedopt.d
new file mode 100644
index 0000000..bac0ce0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/sharedopt.d
@@ -0,0 +1,19 @@
+// REQUIRED_ARGS: -O
+
+void _d_critical_term()
+{
+ for (auto p = head; p; p = p.next)
+ destroyMutex(p.i);
+}
+
+shared S* head;
+
+struct S
+{
+ S* next;
+ int i;
+}
+
+void destroyMutex(int i);
+
+struct Mutex { int i; }
diff --git a/gcc/testsuite/gdc.test/compilable/shortened_methods.d b/gcc/testsuite/gdc.test/compilable/shortened_methods.d
new file mode 100644
index 0000000..5a7ac87
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/shortened_methods.d
@@ -0,0 +1,33 @@
+// REQUIRED_ARGS: -preview=shortenedMethods
+class A {
+ int _x = 34;
+ // short syntax works in all contexts
+ @property x() => _x;
+ @property x(int v) => _x = v;
+
+ // including with contracts
+ @property y() in(true) => _x;
+
+ // or other auto returns
+ auto foo() @safe => assert(0);
+
+ // or normal method defintions
+ bool isNull() => this is null;
+}
+
+class B : A{
+ // short syntax also overrides the same as long syntax
+ override bool isNull() => this !is null;
+}
+
+static assert((new A).x == 34);
+
+string test() => "hello"; // works at any scope
+
+static assert(test() == "hello"); // works normally
+static assert(is(typeof(&test) == string function())); // same normal type
+
+void func() {
+ int a;
+ int nested() => a; // and at nested scopes too
+}
diff --git a/gcc/testsuite/gdc.test/compilable/sroa.d b/gcc/testsuite/gdc.test/compilable/sroa.d
new file mode 100644
index 0000000..8ea515c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/sroa.d
@@ -0,0 +1,55 @@
+/* REQUIRED_ARGS: -O -release -inline
+This compares two different ways to do a for loop. The range
+version should SROA the VecRange struct into two register variables.
+*/
+
+extern (C):
+
+nothrow:
+@nogc:
+@safe:
+
+alias vec_base_t = size_t; // base type of vector
+alias vec_t = vec_base_t*;
+
+@trusted
+pure
+size_t vec_index(size_t b, const vec_t vec);
+
+@trusted
+pure ref inout(vec_base_t) vec_numbits(inout vec_t v) { return v[-1]; }
+@trusted
+pure ref inout(vec_base_t) vec_dim(inout vec_t v) { return v[-2]; }
+
+struct VecRange
+{
+ size_t i;
+ const vec_t v;
+
+ @nogc @safe nothrow pure:
+ this(const vec_t v) { this.v = v; i = vec_index(0, v); }
+ bool empty() const { return i == vec_numbits(v); }
+ size_t front() const { return i; }
+ void popFront() { i = vec_index(i + 1, v); }
+}
+
+@safe
+pure
+uint vec_numBitsSet(const vec_t vec)
+{
+ uint n = 0;
+ size_t length = vec_numbits(vec);
+ for (size_t i = 0; (i = vec_index(i, vec)) < length; ++i)
+ ++n;
+ return n;
+}
+
+@safe
+pure
+uint vec_numBitsSet2(const vec_t vec)
+{
+ uint n = 0;
+ foreach (j; VecRange(vec))
+ ++n;
+ return n;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/staticforeach.d b/gcc/testsuite/gdc.test/compilable/staticforeach.d
index 8a54f32..ce9eb74 100644
--- a/gcc/testsuite/gdc.test/compilable/staticforeach.d
+++ b/gcc/testsuite/gdc.test/compilable/staticforeach.d
@@ -1,6 +1,6 @@
// REQUIRED_ARGS: -o-
-// PERMUTE_ARGS:
// EXTRA_FILES: imports/imp12242a1.d imports/imp12242a2.d
+// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
diff --git a/gcc/testsuite/gdc.test/compilable/stc_traits.d b/gcc/testsuite/gdc.test/compilable/stc_traits.d
new file mode 100644
index 0000000..c5c4e5f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/stc_traits.d
@@ -0,0 +1,172 @@
+// REQUIRED_ARGS: -preview=dip1000 -preview=in
+/*
+TEST_OUTPUT:
+---
+100 tuple()
+101 tuple("return", "ref")
+102 tuple("ref")
+103 tuple()
+104 tuple("ref")
+105 tuple()
+106 tuple()
+107 tuple("ref")
+108 tuple("ref")
+109 tuple("ref")
+110 tuple("ref")
+111 tuple()
+112 tuple("ref")
+113 tuple("ref")
+114 tuple("ref")
+115 tuple("ref")
+116 tuple()
+117 tuple("ref")
+118 tuple("ref")
+119 tuple()
+120 tuple("ref")
+121 tuple()
+122 tuple("ref")
+123 tuple("in")
+124 tuple("in")
+m tuple("ref")
+m-mixin tuple("ref")
+m tuple("ref")
+m-mixin tuple("ref")
+m tuple("ref")
+m-mixin tuple("ref")
+m tuple("return", "ref")
+m-mixin tuple("return", "ref")
+m tuple("ref")
+m-mixin tuple("ref")
+m tuple("ref")
+m-mixin tuple("ref")
+m tuple()
+m-mixin tuple()
+m tuple("ref")
+m-mixin tuple("ref")
+m tuple("ref")
+m-mixin tuple("ref")
+m tuple("ref")
+m-mixin tuple("ref")
+m tuple("ref")
+m-mixin tuple("ref")
+m tuple("ref")
+m-mixin tuple("ref")
+m tuple("ref")
+m-mixin tuple("ref")
+m tuple("in")
+m-mixin tuple("in")
+---
+*/
+
+void func(int i) {}
+void func(return ref bool i) {}
+void func(ref float a, int b) {}
+void get(T : int)(ref T t) {}
+void get()(float t) {}
+void get(T)(ref T[] t) {}
+void funcautoi()(auto ref int i) {}
+void funcauto(T)(auto ref T a) {}
+void funcin(in int i) {}
+
+struct Foo {
+ void foo(int i) {}
+ void foo(ref bool i) {}
+ static void sfoo(ref int i) {}
+}
+
+struct FooT(T) {
+ void foo(ref T i) {}
+ static void sfoo(ref T i) {}
+}
+
+class Bar {
+ void bar(int i) {}
+ void bar(ref bool i) {}
+ static void sbar(ref int i) {}
+}
+
+class BarT(T) {
+ void bar(ref T i) {}
+ static void sbar(ref T i) {}
+}
+
+int i;
+
+template match(handlers...)
+{
+ static foreach(h; handlers)
+ {
+ // should give the same result
+ pragma(msg, "m ", __traits(getParameterStorageClasses, h(i), 0));
+ pragma(msg, "m-mixin ", __traits(getParameterStorageClasses, mixin("h(i)"), 0));
+ }
+
+ enum match = (){};
+}
+
+void funcT(T)(ref T t) {}
+
+void main() {
+ int i;
+ bool b;
+ float f;
+ int[] ia;
+ Foo foo;
+ FooT!int foot;
+ Bar bar = new Bar;
+ BarT!int bart = new BarT!int;
+
+ ref int _foo(return ref const int* p, scope int* a, out int b, lazy int c);
+
+ // From SPEC_RUNNABLE_EXAMPLE_COMPILE:
+ int* p, a;
+ int _b, c;
+
+ static assert(__traits(getParameterStorageClasses, _foo(p, a, _b, c), 1)[0] == "scope");
+ static assert(__traits(getParameterStorageClasses, _foo(p, a, _b, c), 2)[0] == "out");
+ static assert(__traits(getParameterStorageClasses, _foo(p, a, _b, c), 3)[0] == "lazy");
+
+#line 100
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, func(0), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, func(b), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, func(f, i), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, func(f, i), 1));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, get(i), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, get(0.0), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, get(f), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, get(ia), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, mixin("get(i)"), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, Foo.sfoo(i), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, FooT!int.sfoo(i), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, foo.foo(0), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, foo.foo(b), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, foot.foo(i), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, Bar.sbar(i), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, BarT!int.sbar(i), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, bar.bar(0), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, bar.bar(b), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, bart.bar(i), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, funcautoi(10), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, funcautoi(i), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, funcauto(10), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, funcauto(i), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, funcin(1), 0));
+ pragma(msg, __LINE__, " ", __traits(getParameterStorageClasses, funcin(i), 0));
+
+ cast(void) match!(
+ function(ref int i) => true,
+ delegate(ref int i) => true,
+ (ref int i) => true,
+ (return ref int i) => &i,
+ get,
+ funcT,
+ (int i) => true,
+ FooT!int.sfoo,
+ Foo.sfoo,
+ BarT!int.sbar,
+ Bar.sbar,
+ funcautoi,
+ funcauto,
+ funcin,
+ );
+}
diff --git a/gcc/testsuite/gdc.test/compilable/sw_transition_complex.d b/gcc/testsuite/gdc.test/compilable/sw_transition_complex.d
index f034c69e..b6dbc8a 100644
--- a/gcc/testsuite/gdc.test/compilable/sw_transition_complex.d
+++ b/gcc/testsuite/gdc.test/compilable/sw_transition_complex.d
@@ -1,15 +1,15 @@
// PERMUTE_ARGS:
-// REQUIRED_ARGS: -c -transition=complex
+// REQUIRED_ARGS: -unittest
/*
TEST_OUTPUT:
---
-compilable/sw_transition_complex.d(15): use of complex type 'creal' is scheduled for deprecation, use 'std.complex.Complex!(real)' instead
-compilable/sw_transition_complex.d(16): use of complex type 'cdouble' is scheduled for deprecation, use 'std.complex.Complex!(double)' instead
-compilable/sw_transition_complex.d(17): use of complex type 'cfloat' is scheduled for deprecation, use 'std.complex.Complex!(float)' instead
-compilable/sw_transition_complex.d(19): use of imaginary type 'ireal' is scheduled for deprecation, use 'real' instead
-compilable/sw_transition_complex.d(20): use of imaginary type 'idouble' is scheduled for deprecation, use 'double' instead
-compilable/sw_transition_complex.d(21): use of imaginary type 'ifloat' is scheduled for deprecation, use 'float' instead
+compilable/sw_transition_complex.d(15): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead
+compilable/sw_transition_complex.d(16): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead
+compilable/sw_transition_complex.d(17): Deprecation: use of complex type `cfloat` is deprecated, use `std.complex.Complex!(float)` instead
+compilable/sw_transition_complex.d(19): Deprecation: use of imaginary type `ireal` is deprecated, use `real` instead
+compilable/sw_transition_complex.d(20): Deprecation: use of imaginary type `idouble` is deprecated, use `double` instead
+compilable/sw_transition_complex.d(21): Deprecation: use of imaginary type `ifloat` is deprecated, use `float` instead
---
*/
creal c80value;
@@ -23,12 +23,12 @@ ifloat i32value;
/*
TEST_OUTPUT:
---
-compilable/sw_transition_complex.d(34): use of complex type 'creal*' is scheduled for deprecation, use 'std.complex.Complex!(real)' instead
-compilable/sw_transition_complex.d(35): use of complex type 'cdouble*' is scheduled for deprecation, use 'std.complex.Complex!(double)' instead
-compilable/sw_transition_complex.d(36): use of complex type 'cfloat*' is scheduled for deprecation, use 'std.complex.Complex!(float)' instead
-compilable/sw_transition_complex.d(38): use of imaginary type 'ireal*' is scheduled for deprecation, use 'real' instead
-compilable/sw_transition_complex.d(39): use of imaginary type 'idouble*' is scheduled for deprecation, use 'double' instead
-compilable/sw_transition_complex.d(40): use of imaginary type 'ifloat*' is scheduled for deprecation, use 'float' instead
+compilable/sw_transition_complex.d(34): Deprecation: use of complex type `creal*` is deprecated, use `std.complex.Complex!(real)` instead
+compilable/sw_transition_complex.d(35): Deprecation: use of complex type `cdouble*` is deprecated, use `std.complex.Complex!(double)` instead
+compilable/sw_transition_complex.d(36): Deprecation: use of complex type `cfloat*` is deprecated, use `std.complex.Complex!(float)` instead
+compilable/sw_transition_complex.d(38): Deprecation: use of imaginary type `ireal*` is deprecated, use `real` instead
+compilable/sw_transition_complex.d(39): Deprecation: use of imaginary type `idouble*` is deprecated, use `double` instead
+compilable/sw_transition_complex.d(40): Deprecation: use of imaginary type `ifloat*` is deprecated, use `float` instead
---
*/
creal* c80pointer;
@@ -42,12 +42,12 @@ ifloat* i32pointer;
/*
TEST_OUTPUT:
---
-compilable/sw_transition_complex.d(53): use of complex type 'creal[]*' is scheduled for deprecation, use 'std.complex.Complex!(real)' instead
-compilable/sw_transition_complex.d(54): use of complex type 'cdouble[]*' is scheduled for deprecation, use 'std.complex.Complex!(double)' instead
-compilable/sw_transition_complex.d(55): use of complex type 'cfloat[]*' is scheduled for deprecation, use 'std.complex.Complex!(float)' instead
-compilable/sw_transition_complex.d(57): use of imaginary type 'ireal[]*' is scheduled for deprecation, use 'real' instead
-compilable/sw_transition_complex.d(58): use of imaginary type 'idouble[]*' is scheduled for deprecation, use 'double' instead
-compilable/sw_transition_complex.d(59): use of imaginary type 'ifloat[]*' is scheduled for deprecation, use 'float' instead
+compilable/sw_transition_complex.d(53): Deprecation: use of complex type `creal[]*` is deprecated, use `std.complex.Complex!(real)` instead
+compilable/sw_transition_complex.d(54): Deprecation: use of complex type `cdouble[]*` is deprecated, use `std.complex.Complex!(double)` instead
+compilable/sw_transition_complex.d(55): Deprecation: use of complex type `cfloat[]*` is deprecated, use `std.complex.Complex!(float)` instead
+compilable/sw_transition_complex.d(57): Deprecation: use of imaginary type `ireal[]*` is deprecated, use `real` instead
+compilable/sw_transition_complex.d(58): Deprecation: use of imaginary type `idouble[]*` is deprecated, use `double` instead
+compilable/sw_transition_complex.d(59): Deprecation: use of imaginary type `ifloat[]*` is deprecated, use `float` instead
---
*/
creal[]* c80arrayp;
@@ -61,12 +61,12 @@ ifloat[]* i32arrayp;
/*
TEST_OUTPUT:
---
-compilable/sw_transition_complex.d(72): use of complex type 'creal[4][]*' is scheduled for deprecation, use 'std.complex.Complex!(real)' instead
-compilable/sw_transition_complex.d(73): use of complex type 'cdouble[4][]*' is scheduled for deprecation, use 'std.complex.Complex!(double)' instead
-compilable/sw_transition_complex.d(74): use of complex type 'cfloat[4][]*' is scheduled for deprecation, use 'std.complex.Complex!(float)' instead
-compilable/sw_transition_complex.d(76): use of imaginary type 'ireal[4][]*' is scheduled for deprecation, use 'real' instead
-compilable/sw_transition_complex.d(77): use of imaginary type 'idouble[4][]*' is scheduled for deprecation, use 'double' instead
-compilable/sw_transition_complex.d(78): use of imaginary type 'ifloat[4][]*' is scheduled for deprecation, use 'float' instead
+compilable/sw_transition_complex.d(72): Deprecation: use of complex type `creal[4][]*` is deprecated, use `std.complex.Complex!(real)` instead
+compilable/sw_transition_complex.d(73): Deprecation: use of complex type `cdouble[4][]*` is deprecated, use `std.complex.Complex!(double)` instead
+compilable/sw_transition_complex.d(74): Deprecation: use of complex type `cfloat[4][]*` is deprecated, use `std.complex.Complex!(float)` instead
+compilable/sw_transition_complex.d(76): Deprecation: use of imaginary type `ireal[4][]*` is deprecated, use `real` instead
+compilable/sw_transition_complex.d(77): Deprecation: use of imaginary type `idouble[4][]*` is deprecated, use `double` instead
+compilable/sw_transition_complex.d(78): Deprecation: use of imaginary type `ifloat[4][]*` is deprecated, use `float` instead
---
*/
creal[4][]* c80sarrayp;
@@ -80,14 +80,14 @@ ifloat[4][]* i32sarrayp;
/*
TEST_OUTPUT:
---
-compilable/sw_transition_complex.d(96): use of complex type 'creal' is scheduled for deprecation, use 'std.complex.Complex!(real)' instead
-compilable/sw_transition_complex.d(97): use of complex type 'creal*' is scheduled for deprecation, use 'std.complex.Complex!(real)' instead
-compilable/sw_transition_complex.d(98): use of complex type 'creal[]' is scheduled for deprecation, use 'std.complex.Complex!(real)' instead
-compilable/sw_transition_complex.d(99): use of complex type 'creal[4]' is scheduled for deprecation, use 'std.complex.Complex!(real)' instead
-compilable/sw_transition_complex.d(101): use of imaginary type 'ireal' is scheduled for deprecation, use 'real' instead
-compilable/sw_transition_complex.d(102): use of imaginary type 'ireal*' is scheduled for deprecation, use 'real' instead
-compilable/sw_transition_complex.d(103): use of imaginary type 'ireal[]' is scheduled for deprecation, use 'real' instead
-compilable/sw_transition_complex.d(104): use of imaginary type 'ireal[4]' is scheduled for deprecation, use 'real' instead
+compilable/sw_transition_complex.d(96): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead
+compilable/sw_transition_complex.d(97): Deprecation: use of complex type `creal*` is deprecated, use `std.complex.Complex!(real)` instead
+compilable/sw_transition_complex.d(98): Deprecation: use of complex type `creal[]` is deprecated, use `std.complex.Complex!(real)` instead
+compilable/sw_transition_complex.d(99): Deprecation: use of complex type `creal[4]` is deprecated, use `std.complex.Complex!(real)` instead
+compilable/sw_transition_complex.d(101): Deprecation: use of imaginary type `ireal` is deprecated, use `real` instead
+compilable/sw_transition_complex.d(102): Deprecation: use of imaginary type `ireal*` is deprecated, use `real` instead
+compilable/sw_transition_complex.d(103): Deprecation: use of imaginary type `ireal[]` is deprecated, use `real` instead
+compilable/sw_transition_complex.d(104): Deprecation: use of imaginary type `ireal[4]` is deprecated, use `real` instead
---
*/
alias C14488 = creal;
@@ -106,10 +106,10 @@ I14488[4] ialias4;
/*
TEST_OUTPUT:
---
-compilable/sw_transition_complex.d(115): use of complex type 'cdouble' is scheduled for deprecation, use 'std.complex.Complex!(double)' instead
-compilable/sw_transition_complex.d(116): use of imaginary type 'idouble' is scheduled for deprecation, use 'double' instead
-compilable/sw_transition_complex.d(117): use of complex type 'cdouble' is scheduled for deprecation, use 'std.complex.Complex!(double)' instead
-compilable/sw_transition_complex.d(118): use of complex type 'cdouble[]' is scheduled for deprecation, use 'std.complex.Complex!(double)' instead
+compilable/sw_transition_complex.d(115): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead
+compilable/sw_transition_complex.d(116): Deprecation: use of imaginary type `idouble` is deprecated, use `double` instead
+compilable/sw_transition_complex.d(117): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead
+compilable/sw_transition_complex.d(118): Deprecation: use of complex type `cdouble[]` is deprecated, use `std.complex.Complex!(double)` instead
---
*/
auto cauto = 1 + 0i;
@@ -120,9 +120,9 @@ TypeInfo c64ti = typeid(cdouble[]);
/*
TEST_OUTPUT:
---
-compilable/sw_transition_complex.d(128): use of complex type 'creal*' is scheduled for deprecation, use 'std.complex.Complex!(real)' instead
-compilable/sw_transition_complex.d(128): use of imaginary type 'ireal' is scheduled for deprecation, use 'real' instead
-compilable/sw_transition_complex.d(132): use of complex type 'creal' is scheduled for deprecation, use 'std.complex.Complex!(real)' instead
+compilable/sw_transition_complex.d(128): Deprecation: use of complex type `creal*` is deprecated, use `std.complex.Complex!(real)` instead
+compilable/sw_transition_complex.d(128): Deprecation: use of imaginary type `ireal` is deprecated, use `real` instead
+compilable/sw_transition_complex.d(132): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead
---
*/
void test14488a(creal *p, real r, ireal i)
@@ -134,3 +134,41 @@ creal test14488b()
return 1 + 0i;
}
+// Forward referenced types shouldn't cause errors during test for complex or imaginary.
+enum E;
+struct S;
+
+void test14488c(E *e, S *s)
+{
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=18212
+// Usage of cfloat,cdouble,cfloat,ifloat,idouble,ireal shouldn't trigger an error in deprecated code
+deprecated void test18212(creal c){}
+deprecated unittest
+{
+ ireal a = 2i;
+ creal b = 2 + 3i;
+}
+deprecated struct Foo
+{
+ ifloat a = 2i;
+ cfloat b = 2f + 2i;
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=18218
+static assert(__traits(isDeprecated, cfloat));
+static assert(__traits(isDeprecated, cdouble));
+static assert(__traits(isDeprecated, creal));
+static assert(__traits(isDeprecated, ifloat));
+static assert(__traits(isDeprecated, idouble));
+static assert(__traits(isDeprecated, ireal));
+static assert(!__traits(isDeprecated, float));
+static assert(!__traits(isDeprecated, double));
+static assert(!__traits(isDeprecated, real));
+static assert(!__traits(isDeprecated, int));
+static assert(!__traits(isDeprecated, long));
+static assert(!__traits(isDeprecated, ubyte));
+static assert(!__traits(isDeprecated, char));
+static assert(!__traits(isDeprecated, bool));
+static assert(!__traits(isDeprecated, S));
diff --git a/gcc/testsuite/gdc.test/compilable/sw_transition_field.d b/gcc/testsuite/gdc.test/compilable/sw_transition_field.d
index 83dd261..97c8ee5 100644
--- a/gcc/testsuite/gdc.test/compilable/sw_transition_field.d
+++ b/gcc/testsuite/gdc.test/compilable/sw_transition_field.d
@@ -1,12 +1,12 @@
// PERMUTE_ARGS:
-// REQUIRED_ARGS: -c -transition=field
+// REQUIRED_ARGS: -transition=field
/*
TEST_OUTPUT:
---
-compilable/sw_transition_field.d(15): sw_transition_field.S1.ix is immutable field
-compilable/sw_transition_field.d(16): sw_transition_field.S1.cx is const field
-compilable/sw_transition_field.d(21): sw_transition_field.S2!(immutable(int)).S2.f is immutable field
-compilable/sw_transition_field.d(21): sw_transition_field.S2!(const(int)).S2.f is const field
+compilable/sw_transition_field.d(15): `sw_transition_field.S1.ix` is `immutable` field
+compilable/sw_transition_field.d(16): `sw_transition_field.S1.cx` is `const` field
+compilable/sw_transition_field.d(21): `sw_transition_field.S2!(immutable(int)).S2.f` is `immutable` field
+compilable/sw_transition_field.d(21): `sw_transition_field.S2!(const(int)).S2.f` is `const` field
---
*/
diff --git a/gcc/testsuite/gdc.test/compilable/sw_transition_tls.d b/gcc/testsuite/gdc.test/compilable/sw_transition_tls.d
index 1085e80..7954d50 100644
--- a/gcc/testsuite/gdc.test/compilable/sw_transition_tls.d
+++ b/gcc/testsuite/gdc.test/compilable/sw_transition_tls.d
@@ -1,10 +1,10 @@
// PERMUTE_ARGS:
-// REQUIRED_ARGS: -c -transition=tls
+// REQUIRED_ARGS: -transition=tls
/*
TEST_OUTPUT:
---
-compilable/sw_transition_tls.d(11): x is thread local
-compilable/sw_transition_tls.d(15): y is thread local
+compilable/sw_transition_tls.d(11): `x` is thread local
+compilable/sw_transition_tls.d(15): `y` is thread local
---
*/
diff --git a/gcc/testsuite/gdc.test/compilable/test1.d b/gcc/testsuite/gdc.test/compilable/test1.d
index 80c382b..d20d0a9 100644
--- a/gcc/testsuite/gdc.test/compilable/test1.d
+++ b/gcc/testsuite/gdc.test/compilable/test1.d
@@ -1,5 +1,5 @@
// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/test1imp.d
class File
{
import imports.test1imp;
diff --git a/gcc/testsuite/gdc.test/compilable/test10028.d b/gcc/testsuite/gdc.test/compilable/test10028.d
new file mode 100644
index 0000000..4dc5523
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test10028.d
@@ -0,0 +1,7 @@
+enum E:char[4]{ str = "abcd" }
+enum x = {
+ int[char[4]] aa;
+ aa[E.str] = 1;
+ foreach(key,val; aa) {}
+ return aa["abcd"];
+}();
diff --git a/gcc/testsuite/gdc.test/compilable/test10312.d b/gcc/testsuite/gdc.test/compilable/test10312.d
index db56bc2..7cb50f2 100644
--- a/gcc/testsuite/gdc.test/compilable/test10312.d
+++ b/gcc/testsuite/gdc.test/compilable/test10312.d
@@ -1,5 +1,5 @@
-version(D_SIMD)
+static if (__traits(compiles, __vector(float[4])))
{
const __vector(float[4]) si = [1f, 1f, 1f, 1f];
diff --git a/gcc/testsuite/gdc.test/compilable/test10375.d b/gcc/testsuite/gdc.test/compilable/test10375.d
index b9704f6..ba90fa5 100644
--- a/gcc/testsuite/gdc.test/compilable/test10375.d
+++ b/gcc/testsuite/gdc.test/compilable/test10375.d
@@ -1,5 +1,5 @@
// REQUIRED_ARGS: -o-
-
+// EXTRA_FILES: imports/test10375a.d
import imports.test10375a;
void packIt(Pack)(Pack p){ } //3
diff --git a/gcc/testsuite/gdc.test/compilable/test10520.d b/gcc/testsuite/gdc.test/compilable/test10520.d
index 9a24d84..d03b903 100644
--- a/gcc/testsuite/gdc.test/compilable/test10520.d
+++ b/gcc/testsuite/gdc.test/compilable/test10520.d
@@ -1,11 +1,12 @@
// REQUIRED_ARGS: -debug -profile
-// Issue 10520 [profile+nothrow] Building with profiler results in "is not nothrow" error on some contracts
+// https://issues.dlang.org/show_bug.cgi?id=10520
+// [profile+nothrow] Building with profiler results in "is not nothrow" error on some contracts
void f() { }
void g()()
in { f(); } // OK <- Error: 'main.f' is not nothrow
-body { }
+do { }
alias gi = g!();
diff --git a/gcc/testsuite/gdc.test/compilable/test10752.d b/gcc/testsuite/gdc.test/compilable/test10752.d
index 449377e..1017e0f 100644
--- a/gcc/testsuite/gdc.test/compilable/test10752.d
+++ b/gcc/testsuite/gdc.test/compilable/test10752.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/test10752.d
import imports.test10752;
void main()
{
diff --git a/gcc/testsuite/gdc.test/compilable/test10981.d b/gcc/testsuite/gdc.test/compilable/test10981.d
index f0a6820..961e07d 100644
--- a/gcc/testsuite/gdc.test/compilable/test10981.d
+++ b/gcc/testsuite/gdc.test/compilable/test10981.d
@@ -6,7 +6,7 @@ in
void in_nested() pure
in { assert(i); } // OK <- NG
out { assert(i); } // OK <- NG
- body {}
+ do {}
}
}
out
@@ -16,9 +16,9 @@ out
void out_nested() pure
in { assert(i); } // OK <- NG
out { assert(i); } // OK <- NG
- body {}
+ do {}
}
}
-body
+do
{
}
diff --git a/gcc/testsuite/gdc.test/compilable/test10993.d b/gcc/testsuite/gdc.test/compilable/test10993.d
index e5a1b84..a69d0c6 100644
--- a/gcc/testsuite/gdc.test/compilable/test10993.d
+++ b/gcc/testsuite/gdc.test/compilable/test10993.d
@@ -1,5 +1,7 @@
module test10993;
+import core.demangle : demangleType;
+
auto foo(T)(T a)
{
static immutable typeof(a) q;
@@ -29,5 +31,7 @@ void main()
auto y = cast()x;
enum mangle_y = typeof(y).mangleof;
// pragma(msg, "y : " ~ mangle_y);
- static assert (mangle_y == mangle_x[1..$]);
+ enum demangle_x = demangleType(mangle_x);
+ enum demangle_y = demangleType(mangle_y);
+ static assert ("immutable(" ~ demangle_y ~ ")" == demangle_x);
}
diff --git a/gcc/testsuite/gdc.test/compilable/test11169.d b/gcc/testsuite/gdc.test/compilable/test11169.d
index 79863e1..edf1376 100644
--- a/gcc/testsuite/gdc.test/compilable/test11169.d
+++ b/gcc/testsuite/gdc.test/compilable/test11169.d
@@ -47,7 +47,7 @@ void main()
class B : A
{
// __traits(isAbstractClass) is not usable in static if condition.
- static assert (!__traits(isAbstractClass, typeof(this)));
+ static assert (!__traits(isAbstractClass, typeof(this)));
override void foo()
{
diff --git a/gcc/testsuite/gdc.test/compilable/test11225a.d b/gcc/testsuite/gdc.test/compilable/test11225a.d
index 58df827..3333945 100644
--- a/gcc/testsuite/gdc.test/compilable/test11225a.d
+++ b/gcc/testsuite/gdc.test/compilable/test11225a.d
@@ -1,4 +1,5 @@
/*
+EXTRA_FILES: imports/test11225b.d imports/test11225c.d
TEST_OUTPUT:
---
WORKS
diff --git a/gcc/testsuite/gdc.test/compilable/test11237.d b/gcc/testsuite/gdc.test/compilable/test11237.d
deleted file mode 100644
index 1700af4..0000000
--- a/gcc/testsuite/gdc.test/compilable/test11237.d
+++ /dev/null
@@ -1,4 +0,0 @@
-// PERMUTE_ARGS:
-// POST_SCRIPT: compilable/extra-files/test11237.sh
-
-struct Buffer { ubyte[64 * 1024] buffer; }
diff --git a/gcc/testsuite/gdc.test/compilable/test11259.d b/gcc/testsuite/gdc.test/compilable/test11259.d
new file mode 100644
index 0000000..209d5e1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test11259.d
@@ -0,0 +1,25 @@
+// https://issues.dlang.org/show_bug.cgi?id=11259
+
+version (Posix)
+{
+ // smallest druntime module without imports on posix
+ import core.sys.posix.libgen;
+ static assert(__traits(isSame, __traits(parent, core.sys.posix.libgen), core.sys.posix));
+ static assert(__traits(isSame, core.sys.posix, __traits(parent, core.sys.posix.libgen)));
+
+ static assert(__traits(isSame, __traits(parent, core.sys.posix), core.sys));
+ static assert(__traits(isSame, core.sys, __traits(parent, core.sys.posix)));
+}
+else
+{
+ // smallest module without imports for windows
+ import core.sys.windows.lmuseflg;
+ static assert(__traits(isSame, __traits(parent, core.sys.windows.lmuseflg), core.sys.windows));
+ static assert(__traits(isSame, core.sys.windows, __traits(parent, core.sys.windows.lmuseflg)));
+
+ static assert(__traits(isSame, __traits(parent, core.sys.windows), core.sys));
+ static assert(__traits(isSame, core.sys, __traits(parent, core.sys.windows)));
+}
+
+static assert(__traits(isSame, __traits(parent, core.sys), core));
+static assert(__traits(isSame, core, __traits(parent, core.sys)));
diff --git a/gcc/testsuite/gdc.test/compilable/test11371.d b/gcc/testsuite/gdc.test/compilable/test11371.d
index c522929..97ca2b5 100644
--- a/gcc/testsuite/gdc.test/compilable/test11371.d
+++ b/gcc/testsuite/gdc.test/compilable/test11371.d
@@ -1,5 +1,5 @@
-version(D_SIMD)
+static if (__traits(compiles, __vector(long[2])))
{
__vector(long[2]) f()
{
diff --git a/gcc/testsuite/gdc.test/compilable/test11563.d b/gcc/testsuite/gdc.test/compilable/test11563.d
index 6fb39fe..3b4af9a 100644
--- a/gcc/testsuite/gdc.test/compilable/test11563.d
+++ b/gcc/testsuite/gdc.test/compilable/test11563.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/test11563core_bitop.d imports/test11563std_array.d imports/test11563std_range.d imports/test11563std_traits.d
import imports.test11563std_traits;
interface J : I {} // comment out to let compilation succeed
diff --git a/gcc/testsuite/gdc.test/compilable/test11656.d b/gcc/testsuite/gdc.test/compilable/test11656.d
index 4de3065..226144f 100644
--- a/gcc/testsuite/gdc.test/compilable/test11656.d
+++ b/gcc/testsuite/gdc.test/compilable/test11656.d
@@ -1,5 +1,5 @@
-version(D_SIMD)
+static if (__traits(compiles, __vector(float[4])))
{
struct Foo
{
diff --git a/gcc/testsuite/gdc.test/compilable/test1170.d b/gcc/testsuite/gdc.test/compilable/test1170.d
new file mode 100644
index 0000000..767101fa
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test1170.d
@@ -0,0 +1,11 @@
+// https://issues.dlang.org/show_bug.cgi?id=1170
+type x;
+mixin("alias int type;");
+
+// https://issues.dlang.org/show_bug.cgi?id=10739
+template DECLARE_HANDLE() {
+ struct HINTERNET { int h; }
+}
+const INTERNET_INVALID_STATUS_CALLBACK = cast(INTERNET_STATUS_CALLBACK) -1;
+mixin DECLARE_HANDLE;
+alias void function(HINTERNET) INTERNET_STATUS_CALLBACK;
diff --git a/gcc/testsuite/gdc.test/compilable/test11847.d b/gcc/testsuite/gdc.test/compilable/test11847.d
new file mode 100644
index 0000000..d07d995
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test11847.d
@@ -0,0 +1,14 @@
+// REQUIRED_ARGS: -Icompilable/imports
+// EXTRA_FILES: imports/pkg11847/mod11847.d imports/pkg11847/package.d
+import pkg11847;
+import pkg11847.mod11847;
+
+void main() {
+ static assert(pkg11847.func() == 1);
+ static assert(pkg11847.mod11847.func() == 2);
+
+ // This correctly won't compile.
+ // Error: pkg11847.mod11847.func at imports/pkg11847/mod11847.d(3) conflicts with pkg11847.func at imports/pkg11847/package.d(3)
+ static assert(!__traits(compiles, func()));
+
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test1238.d b/gcc/testsuite/gdc.test/compilable/test1238.d
index fa19d61..0cbd84d 100644
--- a/gcc/testsuite/gdc.test/compilable/test1238.d
+++ b/gcc/testsuite/gdc.test/compilable/test1238.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/test1238a.d imports/test1238b.d
module test1238;
import imports.test1238a;
diff --git a/gcc/testsuite/gdc.test/compilable/test12496.d b/gcc/testsuite/gdc.test/compilable/test12496.d
new file mode 100644
index 0000000..4de2b71
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test12496.d
@@ -0,0 +1,13 @@
+// https://issues.dlang.org/show_bug.cgi?id=12496
+
+final abstract class T1
+{
+ final abstract class C(uint value) { }
+
+ alias Child = C!2;
+}
+
+void main()
+{
+ static assert(__traits(isSame, __traits(parent, T1.Child), T1));
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test12511.d b/gcc/testsuite/gdc.test/compilable/test12511.d
new file mode 100644
index 0000000..0a2fc75
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test12511.d
@@ -0,0 +1,15 @@
+// EXTRA_FILES: imports/a12511.d
+module test12511;
+
+import imports.a12511;
+
+public class B
+{
+ static void bar()
+ {
+ A.foo(0);
+ }
+}
+
+void main()
+{}
diff --git a/gcc/testsuite/gdc.test/compilable/test12558.d b/gcc/testsuite/gdc.test/compilable/test12558.d
deleted file mode 100644
index 580cf60..0000000
--- a/gcc/testsuite/gdc.test/compilable/test12558.d
+++ /dev/null
@@ -1,39 +0,0 @@
-// REQUIRED_ARGS:
-/*
-TEST_OUTPUT:
----
-compilable/test12558.d(16): Deprecation: catch statement without an exception specification is deprecated; use catch(Throwable) for old behavior
-compilable/test12558.d(21): Deprecation: catch statement without an exception specification is deprecated; use catch(Throwable) for old behavior
----
-*/
-
-void main()
-{
- auto handler = () { };
-
- try {
- assert(0);
- } catch
- handler();
-
- try {
- assert(0);
- } catch {
- handler();
- }
-
- // ensure diagnostics are not emitted for verioned-out blocks
- version (none)
- {
- try {
- assert(0);
- } catch // should not emit diagnostics
- handler();
-
- try {
- assert(0);
- } catch { // ditto
- handler();
- }
- }
-}
diff --git a/gcc/testsuite/gdc.test/compilable/test12567c.d b/gcc/testsuite/gdc.test/compilable/test12567c.d
index cadc375..9a686df 100644
--- a/gcc/testsuite/gdc.test/compilable/test12567c.d
+++ b/gcc/testsuite/gdc.test/compilable/test12567c.d
@@ -1,9 +1,10 @@
// REQUIRED_ARGS:
+// EXTRA_FILES: imports/a12567.d
// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-compilable/test12567c.d(9): Deprecation: module imports.a12567 is deprecated - This module will be removed in future release.
+compilable/test12567c.d(10): Deprecation: module `imports.a12567` is deprecated - This module will be removed in future release.
---
*/
import imports.a12567;
diff --git a/gcc/testsuite/gdc.test/compilable/test12567d.d b/gcc/testsuite/gdc.test/compilable/test12567d.d
index ee7bc29..5ad9b5c 100644
--- a/gcc/testsuite/gdc.test/compilable/test12567d.d
+++ b/gcc/testsuite/gdc.test/compilable/test12567d.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -d
+// EXTRA_FILES: imports/a12567.d
// PERMUTE_ARGS:
import imports.a12567;
diff --git a/gcc/testsuite/gdc.test/compilable/test12807.d b/gcc/testsuite/gdc.test/compilable/test12807.d
new file mode 100644
index 0000000..72de658
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test12807.d
@@ -0,0 +1,16 @@
+void foo(T)(ref T t)
+{
+}
+
+struct S
+{
+ int impure() {assert(0);}
+ alias impure this;
+}
+
+void main() pure
+{
+ S s;
+ foo(s);
+ s.foo(); // triggering alias this violates purity, but ufcs matches
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test13226.d b/gcc/testsuite/gdc.test/compilable/test13226.d
index 65bf335..10407bd 100644
--- a/gcc/testsuite/gdc.test/compilable/test13226.d
+++ b/gcc/testsuite/gdc.test/compilable/test13226.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -o-
+// EXTRA_FILES: imports/a13226.d
// PERMUTE_ARGS: -version=bug
import imports.a13226;
diff --git a/gcc/testsuite/gdc.test/compilable/test13242.d b/gcc/testsuite/gdc.test/compilable/test13242.d
index 0d6ef27..86f763f 100644
--- a/gcc/testsuite/gdc.test/compilable/test13242.d
+++ b/gcc/testsuite/gdc.test/compilable/test13242.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -o-
+// EXTRA_FILES: imports/test13242a.d imports/test13242b.d
/*
TEST_OUTPUT:
---
diff --git a/gcc/testsuite/gdc.test/compilable/test13512.d b/gcc/testsuite/gdc.test/compilable/test13512.d
index bc78bd4..6484188 100644
--- a/gcc/testsuite/gdc.test/compilable/test13512.d
+++ b/gcc/testsuite/gdc.test/compilable/test13512.d
@@ -1,8 +1,8 @@
#!/opt/dmd/ÐÒÏÂÙ/rdmd
-import std.stdio;
+import core.stdc.stdio;
void main () {
- writeln("we are here!");
+ printf("we are here!\n");
}
diff --git a/gcc/testsuite/gdc.test/compilable/test13582a.d b/gcc/testsuite/gdc.test/compilable/test13582a.d
new file mode 100644
index 0000000..4e3f2bb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test13582a.d
@@ -0,0 +1,7 @@
+// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/test13582.d
+deprecated module test13582a;
+
+import imports.test13582;
+
+void main() { }
diff --git a/gcc/testsuite/gdc.test/compilable/test13582b.d b/gcc/testsuite/gdc.test/compilable/test13582b.d
new file mode 100644
index 0000000..89ec251
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test13582b.d
@@ -0,0 +1,15 @@
+// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/test13582.d
+module test13582b;
+
+deprecated void foo()
+{
+ import imports.test13582;
+}
+
+deprecated struct S
+{
+ import imports.test13582;
+}
+
+void main() { }
diff --git a/gcc/testsuite/gdc.test/compilable/test13858.d b/gcc/testsuite/gdc.test/compilable/test13858.d
index 5a0432c..98b0796 100644
--- a/gcc/testsuite/gdc.test/compilable/test13858.d
+++ b/gcc/testsuite/gdc.test/compilable/test13858.d
@@ -1,5 +1,5 @@
// REQUIRED_ARGS: -w
-// 13858
+// https://issues.dlang.org/show_bug.cgi?id=13858
void foo() { assert(0); }
diff --git a/gcc/testsuite/gdc.test/compilable/test13953.d b/gcc/testsuite/gdc.test/compilable/test13953.d
new file mode 100644
index 0000000..cde7d91
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test13953.d
@@ -0,0 +1,14 @@
+// https://issues.dlang.org/show_bug.cgi?id=13953
+
+struct S
+{
+ string[string] aa;
+ alias aa this;
+}
+
+void main()
+{
+ S s;
+ s["foo"] = "bar";
+ s.remove("foo");
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test14114.d b/gcc/testsuite/gdc.test/compilable/test14114.d
new file mode 100644
index 0000000..246277b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test14114.d
@@ -0,0 +1,10 @@
+// REQUIRED_ARGS: -O
+
+// https://issues.dlang.org/show_bug.cgi?id=14114
+
+import core.volatile;
+
+struct Ports {
+ static ubyte B() { return volatileLoad(cast(ubyte *)0x0025); }
+ static void B(ubyte value) { volatileStore(cast(ubyte *)0x0025, value); }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test14275.d b/gcc/testsuite/gdc.test/compilable/test14275.d
index 66f899c..7ce66aa 100644
--- a/gcc/testsuite/gdc.test/compilable/test14275.d
+++ b/gcc/testsuite/gdc.test/compilable/test14275.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -o-
+// EXTRA_FILES: protection/bug/bug14275.d protection/aggregate/mod14275.d
// PERMUTE_ARGS:
import protection.bug.bug14275;
diff --git a/gcc/testsuite/gdc.test/compilable/test14528.d b/gcc/testsuite/gdc.test/compilable/test14528.d
index badab92..32d99db 100644
--- a/gcc/testsuite/gdc.test/compilable/test14528.d
+++ b/gcc/testsuite/gdc.test/compilable/test14528.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -o-
+// EXTRA_FILES: imports/a14528.d
// PERMTE_ARGS:
import imports.a14528;
diff --git a/gcc/testsuite/gdc.test/compilable/test14666.d b/gcc/testsuite/gdc.test/compilable/test14666.d
index 6162dd9..198b717 100644
--- a/gcc/testsuite/gdc.test/compilable/test14666.d
+++ b/gcc/testsuite/gdc.test/compilable/test14666.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -o-
+// EXTRA_FILES: imports/test14666a.d imports/test14666b.d
// PERMUTE_ARGS:
module test14666;
diff --git a/gcc/testsuite/gdc.test/compilable/test14740.d b/gcc/testsuite/gdc.test/compilable/test14740.d
new file mode 100644
index 0000000..29c3459
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test14740.d
@@ -0,0 +1,10 @@
+// https://issues.dlang.org/show_bug.cgi?id=14740
+
+void test()
+{
+ struct S
+ {
+ void fun() {}
+ }
+ static assert([__traits(allMembers, S)] == ["fun"]);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test14831.d b/gcc/testsuite/gdc.test/compilable/test14831.d
new file mode 100644
index 0000000..c825e69
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test14831.d
@@ -0,0 +1,60 @@
+// https://issues.dlang.org/show_bug.cgi?id=14831
+
+void main()
+{
+ {
+ int x;
+ static assert(x.mangleof == "_D9test148314mainFZ1xi");
+ }
+ {
+ int x;
+ static assert(x.mangleof == "_D9test148314mainFZ4__S11xi");
+ }
+
+ {
+ static int y = 0;
+ static assert(y.mangleof == "_D9test148314mainFZ1yi");
+ }
+ {
+ static int y = 0;
+ static assert(y.mangleof == "_D9test148314mainFZ4__S11yi");
+ }
+
+ {
+ void f() {}
+ static assert(f.mangleof == "_D9test148314mainFZ1fMFNaNbNiNfZv");
+ }
+ {
+ void f() {}
+ static assert(f.mangleof == "_D9test148314mainFZ4__S11fMFNaNbNiNfZv");
+ }
+
+ {
+ struct S {}
+ static assert(S.mangleof == "S9test148314mainFZ1S");
+ }
+ {
+ struct S {}
+ static assert(S.mangleof == "S9test148314mainFZ4__S11S");
+ }
+
+ {
+ class C {}
+ static assert(C.mangleof == "C9test148314mainFZ1C");
+ }
+ {
+ class C {}
+ static assert(C.mangleof == "C9test148314mainFZ4__S11C");
+ }
+
+ {
+ enum E { a }
+ static assert(E.mangleof == "E9test148314mainFZ1E");
+ static assert(E.a.mangleof == "_D9test148314mainFZ1E1aEQwQoFZQl");
+ }
+ {
+ enum E { a }
+ static assert(E.mangleof == "E9test148314mainFZ4__S11E");
+ static assert(E.a.mangleof == "_D9test148314mainFZ4__S11E1aEQBbQuFZ4__S1Qr");
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test14929.d b/gcc/testsuite/gdc.test/compilable/test14929.d
new file mode 100644
index 0000000..1b794a6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test14929.d
@@ -0,0 +1,85 @@
+struct HashMap(K, V)
+{
+ V* opBinaryRight(string op)(K key) const if (op == "in")
+ {
+ size_t index;
+ foreach (ref node; buckets[index].range)
+ {
+ return &(node.value);
+ }
+ return null;
+ }
+
+ struct Node
+ {
+ K key;
+ V value;
+ }
+
+ alias Bucket = UnrolledList!(Node);
+ Bucket[] buckets;
+}
+
+struct UnrolledList(T)
+{
+ Range range() const pure
+ {
+ return Range(_front);
+ }
+
+ static struct Range
+ {
+ ref T front() const @property
+ {
+ return cast(T) current.items[index];
+ }
+ void popFront() pure
+ {
+ }
+ bool empty() const pure @property
+ {
+ return true;
+ }
+ const(Node)* current;
+ size_t index;
+ }
+
+ Node* _front;
+
+ static struct Node
+ {
+ ContainerStorageType!T[10] items;
+ }
+}
+
+template ContainerStorageType(T)
+{
+ alias ContainerStorageType = T;
+}
+
+template isComponentStorage(CS, C)
+{
+ enum bool isComponentStorage = is(typeof(
+ (inout int = 0)
+ {
+ CS cs = CS.init;
+ ulong eid;
+ cs.add(eid, C.init);
+ }));
+}
+
+struct HashmapComponentStorage(ComponentType)
+{
+ private HashMap!(ulong, ComponentType) components;
+
+ void add(ulong eid, ComponentType component)
+ {
+ assert(eid !in components);
+ }
+}
+
+static assert(isComponentStorage!(HashmapComponentStorage!int, int));
+
+void main()
+{
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test15019.d b/gcc/testsuite/gdc.test/compilable/test15019.d
index 963dba8..41444ce 100644
--- a/gcc/testsuite/gdc.test/compilable/test15019.d
+++ b/gcc/testsuite/gdc.test/compilable/test15019.d
@@ -1,3 +1,4 @@
+// COMPILABLE_MATH_TEST
// https://issues.dlang.org/show_bug.cgi?id=15019
// dmd -m32 -c all.d
@@ -24,7 +25,7 @@ struct Matrix(T, int R, int C)
{
try
return format("%s", v);
- catch
+ catch (Throwable)
assert(false); // should not happen since format is right
}
}
@@ -67,7 +68,7 @@ struct Vector(T, int N)
{
try
return format("%s", v);
- catch
+ catch (Throwable)
assert(false);
}
}
diff --git a/gcc/testsuite/gdc.test/compilable/test15150.d b/gcc/testsuite/gdc.test/compilable/test15150.d
index 3a00b80..5c2d421 100644
--- a/gcc/testsuite/gdc.test/compilable/test15150.d
+++ b/gcc/testsuite/gdc.test/compilable/test15150.d
@@ -1,5 +1,5 @@
// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/test15150a.d imports/test15150b.d
module test15150;
import imports.test15150a;
diff --git a/gcc/testsuite/gdc.test/compilable/test15225.d b/gcc/testsuite/gdc.test/compilable/test15225.d
new file mode 100644
index 0000000..d60fba1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test15225.d
@@ -0,0 +1,9 @@
+// https://issues.dlang.org/show_bug.cgi?id=15225
+
+alias foo = (int x) => x + 1;
+alias foo = (string x) => x ~ x;
+alias foo = (float x) => x - x;
+
+static assert( foo(1) == 2 );
+static assert( foo("a") == "aa");
+static assert(foo(2.0f) == 0.0f);
diff --git a/gcc/testsuite/gdc.test/compilable/test15292.d b/gcc/testsuite/gdc.test/compilable/test15292.d
new file mode 100644
index 0000000..38c727b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test15292.d
@@ -0,0 +1,20 @@
+struct NullableRef15292(T)
+{
+ inout(T) get() inout
+ {
+ assert(false);
+ }
+
+ alias get this;
+}
+
+struct S15292
+{
+ NullableRef15292!S15292 n;
+}
+
+void main()
+{
+ S15292 s;
+ assert(s == s);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test1537.d b/gcc/testsuite/gdc.test/compilable/test1537.d
index a1717ab..0878b97 100644
--- a/gcc/testsuite/gdc.test/compilable/test1537.d
+++ b/gcc/testsuite/gdc.test/compilable/test1537.d
@@ -1,4 +1,4 @@
-// 1537
+// https://issues.dlang.org/show_bug.cgi?id=1537
void foo(char[] s)
{
@@ -56,10 +56,10 @@ int bug5245d(U)()
}
-static assert(!is(typeof(Compileable!(bug5245a!(int)()).OK)));
-static assert(!is(typeof(Compileable!(bug5245b!(int)()).OK)));
-static assert(!is(typeof(Compileable!(bug5245c!(int)()).OK)));
-static assert(!is(typeof(Compileable!(bug5245d!(int)()).OK)));
+static assert(is(typeof(Compileable!(bug5245a!(int)()).OK)));
+static assert(is(typeof(Compileable!(bug5245b!(int)()).OK)));
+static assert(is(typeof(Compileable!(bug5245c!(int)()).OK)));
+static assert(is(typeof(Compileable!(bug5245d!(int)()).OK)));
/**************************************/
diff --git a/gcc/testsuite/gdc.test/compilable/test15389_x.d b/gcc/testsuite/gdc.test/compilable/test15389_x.d
index 896f81a..4cfabac 100644
--- a/gcc/testsuite/gdc.test/compilable/test15389_x.d
+++ b/gcc/testsuite/gdc.test/compilable/test15389_x.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: test15389_y.d
import test15389_y;
//struct ns
diff --git a/gcc/testsuite/gdc.test/compilable/test15389_y.d b/gcc/testsuite/gdc.test/compilable/test15389_y.d
index 35e6a25..78f4779 100644
--- a/gcc/testsuite/gdc.test/compilable/test15389_y.d
+++ b/gcc/testsuite/gdc.test/compilable/test15389_y.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: test15389_x.d
import test15389_x;
//struct ns
diff --git a/gcc/testsuite/gdc.test/compilable/test1547.d b/gcc/testsuite/gdc.test/compilable/test1547.d
new file mode 100644
index 0000000..30c6564
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test1547.d
@@ -0,0 +1,20 @@
+// https://issues.dlang.org/show_bug.cgi?id=1547
+
+struct A
+{
+ int b;
+ static A opCall(int k)
+ {
+ A a;
+ a.b = k;
+ return a;
+ }
+}
+
+void fun(A k = 2) {}
+
+void main()
+{
+ A a = 7;
+ fun();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test15490.d b/gcc/testsuite/gdc.test/compilable/test15490.d
index eab5c61..bd8e668 100644
--- a/gcc/testsuite/gdc.test/compilable/test15490.d
+++ b/gcc/testsuite/gdc.test/compilable/test15490.d
@@ -1,5 +1,6 @@
// REQUIRED_ARGS: -o- -inline
// PERMUTE_ARGS:
+// EXTRA_FILES: imports/imp15490a.d imports/imp15490b.d
module test15490;
import imports.imp15490a;
diff --git a/gcc/testsuite/gdc.test/compilable/test15519_x.d b/gcc/testsuite/gdc.test/compilable/test15519_x.d
index 53cfe92..d647b04 100644
--- a/gcc/testsuite/gdc.test/compilable/test15519_x.d
+++ b/gcc/testsuite/gdc.test/compilable/test15519_x.d
@@ -1,4 +1,4 @@
-
+// EXTRA_FILES: test15519_y.d
import test15519_y;
extern(C++, ns)
diff --git a/gcc/testsuite/gdc.test/compilable/test15519_y.d b/gcc/testsuite/gdc.test/compilable/test15519_y.d
index 58db30b..e87a4e1 100644
--- a/gcc/testsuite/gdc.test/compilable/test15519_y.d
+++ b/gcc/testsuite/gdc.test/compilable/test15519_y.d
@@ -1,4 +1,4 @@
-
+// EXTRA_FILES: test15519_x.d
import test15519_x: NS = ns; // fails
//import test15519_x; alias test15519_x.ns NS; // works
diff --git a/gcc/testsuite/gdc.test/compilable/test15711.d b/gcc/testsuite/gdc.test/compilable/test15711.d
new file mode 100644
index 0000000..ba7a93d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test15711.d
@@ -0,0 +1,31 @@
+// https://issues.dlang.org/show_bug.cgi?id=15711
+
+struct Quu {
+ string val;
+}
+
+string[] result = foo!(0, [Quu(['z']), Quu("")]);
+
+template foo(size_t i, Quu[] data, string[] results = []) {
+ static if (i < data.length) {
+ enum def = data[i];
+ enum foo = foo!(i+1, data, results ~ def.val);
+ }
+ else {
+ enum foo = results;
+ }
+}
+
+// Run-time version already works
+
+string[] result_rt = foo_rt(0, [Quu(['z']), Quu("")]);
+
+string[] foo_rt(size_t i, Quu[] data, string[] results = []) {
+ if (i < data.length) {
+ auto def = data[i];
+ return foo_rt(i+1, data, results ~ def.val);
+ }
+ else {
+ return results;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test15780.d b/gcc/testsuite/gdc.test/compilable/test15780.d
index 25c64cd..047d5f6 100644
--- a/gcc/testsuite/gdc.test/compilable/test15780.d
+++ b/gcc/testsuite/gdc.test/compilable/test15780.d
@@ -1,17 +1,24 @@
// PERMUTE_ARGS:
// https://issues.dlang.org/show_bug.cgi?id=15780
-import std.typecons;
-//import std.stdio;
-
void foo(alias fields)() {
foreach(i, field; fields) {
enum string a = fields[i]; // OK
enum string b = field; // not OK with 2.069.2 ???
- //writeln(field);
}
}
void main() {
foo!(tuple("H", "I"))();
}
+
+Tuple!T tuple(T...)(T values)
+{
+ return Tuple!T(values);
+}
+
+struct Tuple(T...)
+{
+ T values;
+ alias values this;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test15785.d b/gcc/testsuite/gdc.test/compilable/test15785.d
index 483c080..e7c6617 100644
--- a/gcc/testsuite/gdc.test/compilable/test15785.d
+++ b/gcc/testsuite/gdc.test/compilable/test15785.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/test15785.d
// PERMUTE_ARGS:
import imports.test15785;
@@ -13,5 +14,5 @@ class Derived : Base, IBase2
// IBase2.faz(); // doesn't work yet due to a bug in checkAccess
}
- super.T t;
+ typeof(super).T t;
}
diff --git a/gcc/testsuite/gdc.test/compilable/test15856.d b/gcc/testsuite/gdc.test/compilable/test15856.d
index 8a5c425..3fc1752 100644
--- a/gcc/testsuite/gdc.test/compilable/test15856.d
+++ b/gcc/testsuite/gdc.test/compilable/test15856.d
@@ -1,11 +1,6 @@
// REQUIRED_ARGS: -de
// PERMUTE_ARGS:
-/*
-TEST_PUTPUT:
----
----
-*/
-
+// EXTRA_FILES: imports/a15856.d
class Foo
{
import imports.a15856;
diff --git a/gcc/testsuite/gdc.test/compilable/test15907.d b/gcc/testsuite/gdc.test/compilable/test15907.d
index c362e04..aae4b4d 100644
--- a/gcc/testsuite/gdc.test/compilable/test15907.d
+++ b/gcc/testsuite/gdc.test/compilable/test15907.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/imp15907.d
// PERMUTE_ARGS:
import imports.imp15907;
diff --git a/gcc/testsuite/gdc.test/compilable/test16002.d b/gcc/testsuite/gdc.test/compilable/test16002.d
index f7b4c2e..51c7338 100644
--- a/gcc/testsuite/gdc.test/compilable/test16002.d
+++ b/gcc/testsuite/gdc.test/compilable/test16002.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/plainpackage/plainmodule.d imports/pkgmodule/package.d imports/pkgmodule/plainmodule.d
module test.compilable.test16002;
import imports.plainpackage.plainmodule;
diff --git a/gcc/testsuite/gdc.test/compilable/test16013a.d b/gcc/testsuite/gdc.test/compilable/test16013a.d
new file mode 100644
index 0000000..15eda38
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16013a.d
@@ -0,0 +1,13 @@
+// https://issues.dlang.org/show_bug.cgi?id=16013
+
+struct Impl { S _payload; } /* Only this line has changed from above. */
+
+struct RefCounted
+{
+ void opAssign(RefCounted rhs) {}
+ void opAssign(S rhs) {}
+ S refCountedPayload() { return S.init; }
+ alias refCountedPayload this;
+}
+
+struct S { RefCounted s; }
diff --git a/gcc/testsuite/gdc.test/compilable/test16013b.d b/gcc/testsuite/gdc.test/compilable/test16013b.d
new file mode 100644
index 0000000..97a58e3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16013b.d
@@ -0,0 +1,13 @@
+// https://issues.dlang.org/show_bug.cgi?id=16013
+
+S s; /* Only this line has changed from above. */
+
+struct RefCounted
+{
+ void opAssign(RefCounted rhs) {}
+ void opAssign(S rhs) {}
+ S refCountedPayload() { return S.init; }
+ alias refCountedPayload this;
+}
+
+struct S { RefCounted s; }
diff --git a/gcc/testsuite/gdc.test/compilable/test16037.d b/gcc/testsuite/gdc.test/compilable/test16037.d
new file mode 100644
index 0000000..12c672a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16037.d
@@ -0,0 +1,23 @@
+/* REQUIRED_ARGS: -preview=dip1000
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=16037
+
+@safe:
+
+void testXXX () @nogc
+{
+ Object o;
+ scope bool delegate (Object) alwaysFalse = (Object y) { return false; };
+ scope c1 = o !is null ? (Object y) { return o is y; } : alwaysFalse;
+}
+
+auto f() @nogc
+{
+ int a;
+ void g(){ a=1; }
+ scope h=&g;
+ h();
+}
+
+
diff --git a/gcc/testsuite/gdc.test/compilable/test16085.d b/gcc/testsuite/gdc.test/compilable/test16085.d
index 936a1fb..4f6d801 100644
--- a/gcc/testsuite/gdc.test/compilable/test16085.d
+++ b/gcc/testsuite/gdc.test/compilable/test16085.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/imp16085.d imports/imp16085b.d
// PERMUTE_ARGS:
import imports.imp16085;
diff --git a/gcc/testsuite/gdc.test/compilable/test16088.d b/gcc/testsuite/gdc.test/compilable/test16088.d
new file mode 100644
index 0000000..97326f1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16088.d
@@ -0,0 +1,10 @@
+// REQUIRED_ARGS: -Jcompilable/imports/
+// EXTRA_FILES: imports/imp16088.d
+
+// https://issues.dlang.org/show_bug.cgi?id=16088
+
+void bar(string x) {}
+auto foo()
+{
+ import("imp16088.d").bar;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test16107.d b/gcc/testsuite/gdc.test/compilable/test16107.d
new file mode 100644
index 0000000..2267be3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16107.d
@@ -0,0 +1,14 @@
+// https://issues.dlang.org/show_bug.cgi?id=16107
+
+bool check()
+{
+ bool result = false;
+
+ result |= false;
+ if (result) goto ret;
+
+ result |= false;
+ if (result) {}
+
+ ret: return true;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test16183.d b/gcc/testsuite/gdc.test/compilable/test16183.d
new file mode 100644
index 0000000..ba74110
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16183.d
@@ -0,0 +1,7 @@
+// https://issues.dlang.org/show_bug.cgi?id=16183
+
+void main()
+{
+ const string g(const string s) { return s; }
+ enum string y = ['f'] ~ g("g");
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test16214a.d b/gcc/testsuite/gdc.test/compilable/test16214a.d
index 2ea64d9..f29c5d2 100644
--- a/gcc/testsuite/gdc.test/compilable/test16214a.d
+++ b/gcc/testsuite/gdc.test/compilable/test16214a.d
@@ -1,5 +1,5 @@
-// EXTRA_SOURCES: imports/test16214b.d
// REQUIRED_ARGS: -Icompilable/imports
+// EXTRA_FILES: imports/test16214b.d
module test16214a;
import test16214b;
diff --git a/gcc/testsuite/gdc.test/compilable/test16273.d b/gcc/testsuite/gdc.test/compilable/test16273.d
new file mode 100644
index 0000000..c079f0a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16273.d
@@ -0,0 +1,22 @@
+// https://issues.dlang.org/show_bug.cgi?id=16273
+
+class A()
+{
+ alias MyD = D!();
+}
+
+class B
+{
+ void f() {}
+ alias MyA = A!();
+}
+
+class C : B
+{
+ override void f() {}
+}
+
+class D() : A!()
+{
+ void g() { new C; }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test16460.d b/gcc/testsuite/gdc.test/compilable/test16460.d
index 868e7ec..77193a4 100644
--- a/gcc/testsuite/gdc.test/compilable/test16460.d
+++ b/gcc/testsuite/gdc.test/compilable/test16460.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/imp16460.d
module imports.test16460;
void bug()
diff --git a/gcc/testsuite/gdc.test/compilable/test16570.d b/gcc/testsuite/gdc.test/compilable/test16570.d
index 20b8485..de8b78f 100644
--- a/gcc/testsuite/gdc.test/compilable/test16570.d
+++ b/gcc/testsuite/gdc.test/compilable/test16570.d
@@ -5,4 +5,4 @@ enum Regression
a = _a,
}
-static assert(is(typeof(Regression.a) == Regression));
+static assert(is(typeof(Regression.a) == immutable(Regression)));
diff --git a/gcc/testsuite/gdc.test/compilable/test16578a.d b/gcc/testsuite/gdc.test/compilable/test16578a.d
new file mode 100644
index 0000000..f781fee
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16578a.d
@@ -0,0 +1,16 @@
+// REQUIRED_ARGS: -debug
+
+// https://issues.dlang.org/show_bug.cgi?id=16578
+
+string[string] opts;
+
+void main()
+{
+ string arg;
+ switch (arg)
+ {
+ case "-f": opts["fore"] = ""; break;
+ debug { case "-throw": opts["throw"] = ""; break; }
+ default:
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test16578b.d b/gcc/testsuite/gdc.test/compilable/test16578b.d
new file mode 100644
index 0000000..eccc949
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16578b.d
@@ -0,0 +1,16 @@
+// https://issues.dlang.org/show_bug.cgi?id=16578
+
+void main()
+{
+ string[string] opts;
+ switch (2)
+ {
+ case 0:
+ opts["a"] = "";
+ {
+ case 1:
+ break;
+ }
+ default:
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test16621.d b/gcc/testsuite/gdc.test/compilable/test16621.d
new file mode 100644
index 0000000..d5800b1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16621.d
@@ -0,0 +1,23 @@
+// https://issues.dlang.org/show_bug.cgi?id=16621
+
+template xxx()
+{
+ Vector2f xxx()
+ {
+ return this;
+ }
+}
+
+struct Vector2f
+{
+ mixin xxx!();
+ alias xxx this;
+}
+
+void foo(ref Vector2f pos);
+
+void test()
+{
+ Vector2f v;
+ foo(v);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test16635.d b/gcc/testsuite/gdc.test/compilable/test16635.d
new file mode 100644
index 0000000..5f3d0ba
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16635.d
@@ -0,0 +1,56 @@
+// https://issues.dlang.org/show_bug.cgi?id=16635
+
+struct A
+{
+ alias get this;
+
+ const(A) get() const
+ {
+ return A();
+ }
+}
+
+static assert(!__traits(compiles, A() + A()));
+
+// Original test (covers another path)
+
+struct Vector2
+{
+ float x;
+ float y;
+
+ alias byRef this;
+
+ ref const(Vector2) byRef() const
+ {
+ static Vector2 v;
+ return v;
+ }
+
+ Vector2 opBinary(string op : "+")(ref const(Vector2) a) const
+ {
+ return Vector2(x + a.x, y + a.y);
+ }
+}
+
+void test16635_1()
+{
+ Vector2 a = Vector2(1, 2);
+ Vector2 b = Vector2(3, 4);
+
+ // this line causes application to run infinitely
+ // Already fixed. It was issue 16621
+ Vector2 c = a + b;
+
+ // OK <- this line seg faults without the above line
+ Vector2 d = a + Vector2(5, 6);
+}
+
+void test16635_2()
+{
+ Vector2 a = Vector2(1, 2);
+ Vector2 b = Vector2(3, 4);
+
+ // just this line alone
+ Vector2 d = a + Vector2(5, 6);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test16657.d b/gcc/testsuite/gdc.test/compilable/test16657.d
new file mode 100644
index 0000000..3143ecd
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16657.d
@@ -0,0 +1,17 @@
+struct A
+{
+ int x;
+}
+
+struct B
+{
+ A a, b;
+}
+static assert(B(A(1), A(1)) != B(A(1), A(2))); // Works
+
+struct C
+{
+ A a, b;
+ alias a this;
+}
+static assert(C(A(1), A(1)) != C(A(1), A(2))); // Fails!
diff --git a/gcc/testsuite/gdc.test/compilable/test16685.d b/gcc/testsuite/gdc.test/compilable/test16685.d
new file mode 100644
index 0000000..0be2367
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16685.d
@@ -0,0 +1,6 @@
+// https://issues.dlang.org/show_bug.cgi?id=16685
+
+struct Id { ushort value; }
+enum Id x = Id(5);
+struct S(ushort A) {}
+alias CannotCreateFromValue = S!(x.value);
diff --git a/gcc/testsuite/gdc.test/compilable/test16709.d b/gcc/testsuite/gdc.test/compilable/test16709.d
new file mode 100644
index 0000000..695c92e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test16709.d
@@ -0,0 +1,9 @@
+// EXTRA_FILES: imports/test16709a.d imports/test16709b.d imports/test16709c.d imports/test16709d.d
+// https://issues.dlang.org/show_bug.cgi?id=16709
+
+import imports.test16709a;
+import imports.test16709b;
+
+void test(){
+ 1.to!int;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test16798.d b/gcc/testsuite/gdc.test/compilable/test16798.d
index 41e09e0..fe0f128 100644
--- a/gcc/testsuite/gdc.test/compilable/test16798.d
+++ b/gcc/testsuite/gdc.test/compilable/test16798.d
@@ -1,5 +1,6 @@
/*
REQUIRED_ARGS: -mv=its.a.dessert.topping=imports/imp16798.d -mv=its.a.floorwax=imports/
+EXTRA_FILES: imports/imp16798.d imports/wax16798.d
PERMUTE_ARGS:
TEST_OUTPUT:
---
diff --git a/gcc/testsuite/gdc.test/compilable/test17057.d b/gcc/testsuite/gdc.test/compilable/test17057.d
index c90e35f..677fe38 100644
--- a/gcc/testsuite/gdc.test/compilable/test17057.d
+++ b/gcc/testsuite/gdc.test/compilable/test17057.d
@@ -2,7 +2,7 @@
// PERMUTE_ARGS:
class LeClass {
- import std.stdio;
+ import core.stdc.stdio;
}
void main()
diff --git a/gcc/testsuite/gdc.test/compilable/test17143.d b/gcc/testsuite/gdc.test/compilable/test17143.d
index 98e31f4..4ec0295 100644
--- a/gcc/testsuite/gdc.test/compilable/test17143.d
+++ b/gcc/testsuite/gdc.test/compilable/test17143.d
@@ -1,4 +1,16 @@
-import std.typecons : tuple;
+// https://issues.dlang.org/show_bug.cgi?id=17143
+
+struct Tuple(T...)
+{
+ T values;
+ alias expand = values;
+}
+
+Tuple!T tuple(T...)(T args)
+{
+ return Tuple!T(args);
+}
+
enum foo = tuple(1, 2).expand;
static assert(typeof(foo).stringof == "(int, int)");
static assert(foo.stringof == "tuple(1, 2)");
diff --git a/gcc/testsuite/gdc.test/compilable/test17146.d b/gcc/testsuite/gdc.test/compilable/test17146.d
new file mode 100644
index 0000000..098bfe4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17146.d
@@ -0,0 +1,13 @@
+// REQUIRED_ARGS: -O -inline
+
+// https://issues.dlang.org/show_bug.cgi?id=17146
+
+struct S { int[] a; int b; }
+
+void foo()
+{
+ S[] s;
+ if (s[$-1] == S.init) {}
+}
+
+void bar() { foo(); }
diff --git a/gcc/testsuite/gdc.test/compilable/test17351.d b/gcc/testsuite/gdc.test/compilable/test17351.d
new file mode 100644
index 0000000..fffe92c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17351.d
@@ -0,0 +1,17 @@
+bool fun(S)(ref S[3] a) { assert(a == [42, 84, 169]); return true; }
+bool fun2(S)(ref S a) { return true; }
+void main()
+{
+ static const int[3] sa = [42, 84, 169];
+ static const double sa2 = 42.42;
+ static assert(fun(sa));
+ static assert(fun2(sa2));
+}
+
+int f1(ref const int p) { return p; }
+int f2(ref const int[2] p) { return p[0] + p[1]; }
+void test2()
+{
+ static immutable int[2] P = [ 0, 1 ];
+ static assert(f2(P) == 1);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test17373.d b/gcc/testsuite/gdc.test/compilable/test17373.d
new file mode 100644
index 0000000..9a5ee64
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17373.d
@@ -0,0 +1,32 @@
+// https://issues.dlang.org/show_bug.cgi?id=17373
+interface Foo { void visit (int); }
+interface Bar { void visit(double); }
+interface FooBar : Foo, Bar {}
+static assert(__traits(getOverloads, FooBar, "visit").length == 2);
+
+interface Fbar { void visit(char); void visit(double); }
+interface Triple : Foo, Bar, Fbar {}
+static assert(__traits(getOverloads, Triple, "visit").length == 3);
+
+interface InheritanceMadness : FooBar, Triple {}
+static assert(__traits(getOverloads, Triple, "visit").length == 3);
+
+interface Simple
+{
+ int square(int);
+ real square(real);
+}
+static assert(__traits(getOverloads, Simple, "square").length == 2);
+
+// https://issues.dlang.org/show_bug.cgi?id=19064
+interface InputStream {}
+interface OutputStream{}
+interface Stream : InputStream, OutputStream{}
+interface ConnectionStream : Stream
+{
+ @property bool connected() const;
+ void close();
+}
+
+static assert(__traits(getOverloads, ConnectionStream, "connected").stringof == "tuple(connected)");
+static assert(__traits(getOverloads, ConnectionStream, "close").stringof == "tuple(close)");
diff --git a/gcc/testsuite/gdc.test/compilable/test17419.d b/gcc/testsuite/gdc.test/compilable/test17419.d
index 295c563..e34e7da 100644
--- a/gcc/testsuite/gdc.test/compilable/test17419.d
+++ b/gcc/testsuite/gdc.test/compilable/test17419.d
@@ -1,6 +1,6 @@
+// REQUIRED_ARGS: -d
// https://issues.dlang.org/show_bug.cgi?id=17419
-
extern (C) int fooc();
alias aliasc = fooc;
diff --git a/gcc/testsuite/gdc.test/compilable/test17441.d b/gcc/testsuite/gdc.test/compilable/test17441.d
new file mode 100644
index 0000000..2c356fd
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17441.d
@@ -0,0 +1,9 @@
+// EXTRA_FILES: imports/test17441foo/package.d imports/test17441foo/bar.d
+import m1 = imports.test17441foo.bar;
+import m2 = imports.test17441foo;
+alias p = __traits(parent, m1);
+enum e(alias thing) = thing.stringof;
+
+static assert(e!m1 == m1.stringof);
+static assert(e!m2 == m2.stringof);
+static assert( e!p == p.stringof );
diff --git a/gcc/testsuite/gdc.test/compilable/test17512.d b/gcc/testsuite/gdc.test/compilable/test17512.d
new file mode 100644
index 0000000..4bf96b7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17512.d
@@ -0,0 +1,26 @@
+// https://issues.dlang.org/show_bug.cgi?id=17512
+
+struct A
+{
+ int _value;
+
+ bool _hasValue;
+
+ auto ref getOr(int alternativeValue)
+ {
+ return _hasValue ? _value : alternativeValue;
+ }
+}
+
+A a;
+
+// https://issues.dlang.org/show_bug.cgi?id=18661
+
+struct S0(T)
+{
+ int a;
+ auto ref immutable(int) getA() { return a; }
+}
+
+alias B = S0!int;
+
diff --git a/gcc/testsuite/gdc.test/compilable/test1754.d b/gcc/testsuite/gdc.test/compilable/test1754.d
index 3193477..c2d8ebb 100644
--- a/gcc/testsuite/gdc.test/compilable/test1754.d
+++ b/gcc/testsuite/gdc.test/compilable/test1754.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/test1754a.d imports/test1754b.d
module test1754;
import imports.test1754a;
diff --git a/gcc/testsuite/gdc.test/compilable/test17541.d b/gcc/testsuite/gdc.test/compilable/test17541.d
new file mode 100644
index 0000000..2fe4343
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17541.d
@@ -0,0 +1,28 @@
+/* EXTRA_SOURCES: imports/test17541_2.d imports/test17541_3.d
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=17541
+
+module one;
+
+import two;
+import three;
+
+struct BB
+{
+ enum MAX_NUM_FIBERS = 4096;
+
+ TWOR!1 t;
+ TT!(int) tt;
+ auto foo()
+ {
+ tt.insertabcdefg(1);
+ }
+}
+
+BB bb;
+
+@nogc bar()
+{
+ bb.foo();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test17548.d b/gcc/testsuite/gdc.test/compilable/test17548.d
index 67b32d7..8e2a390 100644
--- a/gcc/testsuite/gdc.test/compilable/test17548.d
+++ b/gcc/testsuite/gdc.test/compilable/test17548.d
@@ -1,5 +1,5 @@
// REQUIRED_ARGS: -c
-
+// EXTRA_FILES: imports/fwdref2_test17548.d
module test17548;
struct S1 {
diff --git a/gcc/testsuite/gdc.test/compilable/test17752.d b/gcc/testsuite/gdc.test/compilable/test17752.d
new file mode 100644
index 0000000..71f324c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17752.d
@@ -0,0 +1,12 @@
+// https://issues.dlang.org/show_bug.cgi?id=17752
+// REQUIRED_ARGS: -de
+void main (string[] args)
+{
+ switch (args.length)
+ {
+ // initialization not done on purpose is allowed
+ int x = void;
+ default:
+ break;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test17782.d b/gcc/testsuite/gdc.test/compilable/test17782.d
new file mode 100644
index 0000000..588bc27
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17782.d
@@ -0,0 +1,6 @@
+void main() {
+ string str = q"_DLANG
+123
+_DLANG";
+ assert( str == "123\n" );
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test17793.d b/gcc/testsuite/gdc.test/compilable/test17793.d
new file mode 100644
index 0000000..43c992b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17793.d
@@ -0,0 +1,13 @@
+// REQUIRED_ARGS: -mcpu=avx2
+import core.simd;
+
+static if (__traits(compiles, double4))
+{
+ double4 foo();
+ void test(double[4]);
+
+ void main()
+ {
+ test(foo().array);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test17807.d b/gcc/testsuite/gdc.test/compilable/test17807.d
new file mode 100644
index 0000000..b8c5518
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17807.d
@@ -0,0 +1,17 @@
+// REQUIRED_ARGS: -o- -w
+
+int bug17807(){
+ int y=0;
+ Lswitch: switch(2){
+ { case 0: break; }
+ enum x=0;
+ struct S{ enum x=0; }
+ int foo(){
+ return 0;
+ }
+ default: y=x+S.x+foo();
+ static foreach(i;1..5)
+ case i: break Lswitch;
+ }
+ return y;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test17853.d b/gcc/testsuite/gdc.test/compilable/test17853.d
new file mode 100644
index 0000000..d0e6025
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17853.d
@@ -0,0 +1,11 @@
+// Switch with no braces & empty case should compile
+
+int main() {
+ int ob = 1;
+
+ final switch (ob)
+ case 0: case 1:
+ break;
+
+ return ob;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test17870.d b/gcc/testsuite/gdc.test/compilable/test17870.d
new file mode 100644
index 0000000..2329b60
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17870.d
@@ -0,0 +1,26 @@
+alias AliasSeq(T...) = T;
+
+class A
+{
+ int z = 3;
+}
+
+class B : A
+{
+ int a = 1;
+}
+
+class C : B
+{
+ int b = 2;
+ alias tup = AliasSeq!(b, a, z);
+}
+
+void main()
+{
+ static const ins = new C;
+ static assert(&ins.tup[0] == &ins.b);
+ static assert(&ins.tup[1] == &ins.a);
+ static assert(&ins.tup[2] == &ins.z);
+ static assert(ins.tup == AliasSeq!(2,1,3));
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test17906.d b/gcc/testsuite/gdc.test/compilable/test17906.d
new file mode 100644
index 0000000..9c4a547
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17906.d
@@ -0,0 +1,7 @@
+// REQUIRED_ARGS: -de
+// https://issues.dlang.org/show_bug.cgi?id=18647
+deprecated void main ()
+{
+ Object o = new Object;
+ delete o;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test17942.d b/gcc/testsuite/gdc.test/compilable/test17942.d
new file mode 100644
index 0000000..8fbc169
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17942.d
@@ -0,0 +1,15 @@
+// https://issues.dlang.org/show_bug.cgi?id=17942
+
+alias AliasSeq(TList...) = TList;
+
+void test()
+{
+ enum A = AliasSeq!(1);
+ static assert(A[0] == 1);
+ static assert(B[0] == 2);
+}
+
+enum B = AliasSeq!(2);
+
+enum C = AliasSeq!();
+
diff --git a/gcc/testsuite/gdc.test/compilable/test17970.d b/gcc/testsuite/gdc.test/compilable/test17970.d
new file mode 100644
index 0000000..b7880e2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test17970.d
@@ -0,0 +1,28 @@
+shared struct Shared
+{
+ static Shared make()
+ {
+ return Shared();
+ }
+
+ ~this()
+ {
+ }
+}
+
+shared struct Foo
+{
+ ~this()
+ {
+ }
+}
+
+struct Inner { ~this() {} }
+struct Outer { shared(Inner) inner; }
+
+void main()
+{
+ Foo x = Foo();
+ auto s = Shared.make();
+ Outer _;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18000.d b/gcc/testsuite/gdc.test/compilable/test18000.d
new file mode 100644
index 0000000..9de3324
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18000.d
@@ -0,0 +1,19 @@
+// REQUIRED_ARGS: -preview=dip1000
+
+// https://issues.dlang.org/show_bug.cgi?id=18000
+
+struct File
+{
+@safe @nogc:
+ ~this() scope
+ {
+ }
+
+ void* f;
+}
+
+void test() @safe @nogc
+{
+ scope File x;
+ x = File();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18020.d b/gcc/testsuite/gdc.test/compilable/test18020.d
new file mode 100644
index 0000000..d599920
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18020.d
@@ -0,0 +1,8 @@
+// https://issues.dlang.org/show_bug.cgi?id=18020
+
+void bug(T)(T t)
+{
+ t.opCmp(t);
+}
+
+alias bugi = bug!(typeof(new class{})); \ No newline at end of file
diff --git a/gcc/testsuite/gdc.test/compilable/test18030.d b/gcc/testsuite/gdc.test/compilable/test18030.d
new file mode 100644
index 0000000..f742a40
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18030.d
@@ -0,0 +1,14 @@
+// https://issues.dlang.org/show_bug.cgi?id=18030
+
+struct S(T)
+{
+ T var;
+ static assert(__traits(getProtection, __traits(getMember, T, "func")) == "public");
+}
+
+class C
+{
+ alias Al = S!C;
+
+ static void func(U)(U var) { }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18099.d b/gcc/testsuite/gdc.test/compilable/test18099.d
new file mode 100644
index 0000000..860f6a0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18099.d
@@ -0,0 +1,19 @@
+
+/* REQUIRED_ARGS: -betterC
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=18099
+
+struct D
+{
+ static struct V
+ {
+ ~this() { }
+ }
+
+ V get()
+ {
+ V v;
+ return v;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18115.d b/gcc/testsuite/gdc.test/compilable/test18115.d
new file mode 100644
index 0000000..3ad5b48
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18115.d
@@ -0,0 +1,10 @@
+// https://issues.dlang.org/show_bug.cgi?id=18115
+
+int test()
+{
+ if (test.stringof.length > 6 &&
+ test.stringof[$-7..$] == "1234567") {}
+ return 0;
+}
+
+enum a = test();
diff --git a/gcc/testsuite/gdc.test/compilable/test18199.d b/gcc/testsuite/gdc.test/compilable/test18199.d
new file mode 100644
index 0000000..a3a0885
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18199.d
@@ -0,0 +1,87 @@
+// https://issues.dlang.org/show_bug.cgi?id=18199
+
+//
+// struct initializer cases
+//
+
+// original error report
+struct Bla
+{
+ int delegate(int, int) fun;
+}
+Bla bla1 = Bla((int a, int b) { return a + b; });
+Bla bla2 = {(int a, int b) { return a + b; }}; // yielded error
+
+// additional error report with memberName:expression syntax
+struct Foo
+{
+ int function(int) bar;
+ int function(int) bar2;
+}
+Foo foo =
+{
+ bar : function(x) { return 2 * x; }, // yielded error
+ bar2 : (x) => 2 * x,
+};
+
+struct MyStruct
+{
+ int function() f;
+ int delegate() d;
+}
+
+// confirm that ambiguous cases assume struct initializer
+MyStruct ambiguous_1 = {};
+MyStruct ambiguous_2 =
+{
+ { return 1 + 1; }
+};
+
+// statement-holding function literal variants not covered above
+static MyStruct function_and_delegate_keywords =
+{
+ function () { return 1 + 1; },
+ delegate () { return 1 + 1; }
+};
+
+//
+// function literal initializer cases
+//
+
+alias IntFun = int function();
+alias VoidFun = void function();
+
+IntFun colon_at_top_level =
+{
+ return 1 + 1;
+};
+
+IntFun block_statement_only_with_nested_statement =
+{
+ if (true)
+ {
+ return 1 + 1;
+ }
+};
+
+struct SomeStruct {}
+
+// previously these cases were incorrectly parsed as struct initializer
+VoidFun[] no_semicolon_statements = [
+ { asm {} },
+ { class Foo {} },
+ { debug(foo) {} },
+ { enum Foo { A } },
+ { final switch(5) {} },
+ { if (true) {} },
+ { interface Foo {} },
+ { pragma(inline) {} },
+ { scope(exit) {} },
+ { struct Foo {} },
+ { synchronized {} },
+ { try {} finally {} },
+ { union Foo {} },
+ { version(foo) {} },
+ { while (false) {} },
+ { with (SomeStruct) {} },
+];
diff --git a/gcc/testsuite/gdc.test/compilable/test18251.d b/gcc/testsuite/gdc.test/compilable/test18251.d
new file mode 100644
index 0000000..7940850
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18251.d
@@ -0,0 +1,23 @@
+// REQUIRED_ARGS: -unittest -de
+
+auto test18251(T)(T t)
+if (!__traits(isDeprecated, T))
+{
+ return T.init;
+}
+
+unittest
+{
+ auto b = test18251(2);
+}
+
+deprecated auto test18251(T)(T t) // deprecated storage class got lost when expanding.
+if (__traits(isDeprecated, T))
+{
+ return T.init;
+}
+
+deprecated unittest
+{
+ auto b = test18251(2 + 2i);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18385b.d b/gcc/testsuite/gdc.test/compilable/test18385b.d
new file mode 100644
index 0000000..cf0fedc
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18385b.d
@@ -0,0 +1,29 @@
+/*
+Previous implementation raised errors because it was not
+aware of the special treatment for extern(C) member funtions:
+
+Member functions receive D name mangling...
+Some arguments in favour of this inconsistencies
+- static => useful for callbacks
+- non-static => doesn't exists in C anyways
+*/
+
+extern(C) struct ExternC
+{
+ void foo() {}
+ void foo(int) {}
+
+ static void bar() {}
+ static void bar(int) {}
+}
+
+#line 100
+void main()
+{
+ ExternC.bar();
+ ExternC.bar(1);
+
+ ExternC c;
+ c.foo();
+ c.foo(1);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18430.d b/gcc/testsuite/gdc.test/compilable/test18430.d
new file mode 100644
index 0000000..381ceeb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18430.d
@@ -0,0 +1,11 @@
+template Alias(alias a)
+{
+ alias Alias = a;
+}
+
+void main()
+{
+ auto scale = 4;
+ alias edentity = a => a * scale;
+ static assert(__traits(isSame, Alias!edentity, edentity)); // fails in dmd-nightly
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18468.d b/gcc/testsuite/gdc.test/compilable/test18468.d
new file mode 100644
index 0000000..8febc9b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18468.d
@@ -0,0 +1,5 @@
+// https://issues.dlang.org/show_bug.cgi?id=18468
+@safe void main()
+{
+ synchronized {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18474.d b/gcc/testsuite/gdc.test/compilable/test18474.d
new file mode 100644
index 0000000..454e9c5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18474.d
@@ -0,0 +1,15 @@
+shared struct A
+{
+ this(this);
+}
+
+struct B
+{
+ A a;
+}
+
+void main()
+{
+ shared B b1;
+ auto b2 = b1;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18572.d b/gcc/testsuite/gdc.test/compilable/test18572.d
new file mode 100644
index 0000000..5edc1a7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18572.d
@@ -0,0 +1,16 @@
+// https://issues.dlang.org/show_bug.cgi?id=18572
+
+alias Seq(T...) = T;
+void func(Seq!(int, int, int) args = Seq!(1, 2, 3)) {}
+void func2(Seq!(int, int, int) args = Seq!(1,2,3), Seq!(int, int) args2 = Seq!(4, 5)) {}
+
+void main(){
+ Seq!(int,int,int) args = Seq!(1, 2, 3); // ok
+ func(); // error
+ func(args); // ok
+
+ Seq!(int, int) args2 = Seq!(4, 5);
+ func2();
+ func2(args);
+ func2(args, args2);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18578.d b/gcc/testsuite/gdc.test/compilable/test18578.d
new file mode 100644
index 0000000..d75a063
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18578.d
@@ -0,0 +1,5 @@
+enum Foo { foo1 }
+enum Bar : Foo { bar }
+
+void main()
+{}
diff --git a/gcc/testsuite/gdc.test/compilable/test18584.d b/gcc/testsuite/gdc.test/compilable/test18584.d
new file mode 100644
index 0000000..e447cc2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18584.d
@@ -0,0 +1,11 @@
+// https://issues.dlang.org/show_bug.cgi?id=18584
+
+struct S {
+ int n;
+ auto fun() { return tmp!(a => n)(); }
+}
+
+struct tmp(alias fns) {
+ alias fun = fns!int;
+}
+
diff --git a/gcc/testsuite/gdc.test/compilable/test18645.d b/gcc/testsuite/gdc.test/compilable/test18645.d
new file mode 100644
index 0000000..acb5586
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18645.d
@@ -0,0 +1,9 @@
+// https://issues.dlang.org/show_bug.cgi?id=18645
+
+immutable INIT = 42;
+
+enum A
+{
+ x = INIT,
+ y
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18651a.d b/gcc/testsuite/gdc.test/compilable/test18651a.d
new file mode 100644
index 0000000..a5ab938
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18651a.d
@@ -0,0 +1,5 @@
+// REQUIRED_ARGS: -deps=${RESULTS_DIR}/compilable/test18651a.deps
+// EXTRA_SOURCES: imports/test18651/b.d
+// EXTRA_FILES: imports/test18651/c.d imports/test18651/algorithm.d imports/test18651/datetime.d
+
+import imports.test18651.datetime;
diff --git a/gcc/testsuite/gdc.test/compilable/test18670.d b/gcc/testsuite/gdc.test/compilable/test18670.d
new file mode 100644
index 0000000..602396c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18670.d
@@ -0,0 +1,12 @@
+// REQUIRED_ARGS: -preview=dip1000
+
+// https://issues.dlang.org/show_bug.cgi?id=18670
+
+void foo() {
+ new OVERLAPPED;
+}
+
+union OVERLAPPED {
+ uint OffsetHigh;
+ uint Pointer;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18694.d b/gcc/testsuite/gdc.test/compilable/test18694.d
new file mode 100644
index 0000000..9b2018b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18694.d
@@ -0,0 +1,9 @@
+struct S { enum int x = 42; }
+static S dummy;
+pure int fun(int x)
+{
+ return dummy.x + x;
+}
+
+void main()
+{}
diff --git a/gcc/testsuite/gdc.test/compilable/test18737.d b/gcc/testsuite/gdc.test/compilable/test18737.d
new file mode 100644
index 0000000..17a27df
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18737.d
@@ -0,0 +1,32 @@
+/* REQUIRED_ARGS:
+ * PERMUTE_ARGS:
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=18737
+
+struct S
+{
+ this(char);
+
+ this(int j)
+ {
+ this('a');
+ assert(0);
+ this('b');
+ }
+
+ this(long j)
+ {
+ if (j)
+ {
+ this('c');
+ assert(0);
+ }
+ else if (j + 1)
+ {
+ this('d');
+ return;
+ }
+ this('e');
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18771.d b/gcc/testsuite/gdc.test/compilable/test18771.d
new file mode 100644
index 0000000..a71361f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18771.d
@@ -0,0 +1,7 @@
+// REQUIRED_ARGS : -c
+// EXTRA_FILES: imports/test18771a.d imports/test18771b.d imports/test18771c.d imports/test18771d.d
+// https://issues.dlang.org/show_bug.cgi?id=18771
+
+import imports.test18771c, imports.test18771d;
+
+static assert(__traits(isSame, fooC, fooD));
diff --git a/gcc/testsuite/gdc.test/compilable/test18775.d b/gcc/testsuite/gdc.test/compilable/test18775.d
new file mode 100644
index 0000000..9cf1b3e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18775.d
@@ -0,0 +1,20 @@
+// REQUIRED_ARGS: -de
+
+struct Foo { }
+
+struct Bar {
+ deprecated
+ @property Foo foo() { return Foo.init; }
+
+ alias foo this;
+}
+
+void test(Bar bar) { }
+
+void main()
+{
+ Bar bar;
+
+ // test lookup will be satisfied via ufcs, not alias, so it must not deprecation warn foo!
+ bar.test;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18821.d b/gcc/testsuite/gdc.test/compilable/test18821.d
new file mode 100644
index 0000000..28bdeca
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18821.d
@@ -0,0 +1,10 @@
+// https://issues.dlang.org/show_bug.cgi?id=18821
+
+align(1) struct epoll_event
+{
+ void* ptr;
+}
+template isAllZeroBits(epoll_event value) {}
+alias isInitAllZeroBits = isAllZeroBits!(epoll_event.init);
+
+epoll_event e = { null };
diff --git a/gcc/testsuite/gdc.test/compilable/test18905.d b/gcc/testsuite/gdc.test/compilable/test18905.d
new file mode 100644
index 0000000..c54c60c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18905.d
@@ -0,0 +1,6 @@
+/* REQUIRED_ARGS: -betterC
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=18905
+
+extern (C++) class C { } // Error: TypeInfo cannot be used with -betterC
diff --git a/gcc/testsuite/gdc.test/compilable/test18936.d b/gcc/testsuite/gdc.test/compilable/test18936.d
new file mode 100644
index 0000000..12f4b4b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18936.d
@@ -0,0 +1,31 @@
+// REQUIRED_ARGS: -fPIC -O -release -inline -m64 -betterC
+// DISABLED: win32 win64
+
+// https://issues.dlang.org/show_bug.cgi?id=18936
+// produces assert failure cgxmm.c line 684
+
+import core.stdc.math;
+
+struct S
+{
+ double re, im;
+
+
+ static S sqrtcx(S* z)
+ {
+ S c;
+ real x,y,w,r;
+
+ {
+ x = fabs(z.re);
+ y = fabs(z.im);
+ if (z.re >= 0)
+ {
+ c.im = (z.im >= 0) ? w : -w;
+ c.re = z.im / (c.im + c.im);
+ }
+ }
+ return c;
+ }
+}
+
diff --git a/gcc/testsuite/gdc.test/compilable/test18951a.d b/gcc/testsuite/gdc.test/compilable/test18951a.d
new file mode 100644
index 0000000..8aedc8d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18951a.d
@@ -0,0 +1,7 @@
+module compilable.test18951a;
+
+public class A
+{
+ package static void foo(Object) {}
+ public static void foo() {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18951b.d b/gcc/testsuite/gdc.test/compilable/test18951b.d
new file mode 100644
index 0000000..fbf6b1d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18951b.d
@@ -0,0 +1,9 @@
+// EXTRA_FILES: test18951a.d
+module compilable.test18951b;
+
+import test18951a;
+
+void test()
+{
+ A.foo(new Object);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test18976.d b/gcc/testsuite/gdc.test/compilable/test18976.d
new file mode 100644
index 0000000..57a531f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test18976.d
@@ -0,0 +1,32 @@
+// https://issues.dlang.org/show_bug.cgi?id=18976
+
+class Expression : Statement {}
+class Statement {}
+
+class AssertSemanticVisitor
+{
+ void visit (const Statement node) { }
+}
+
+class ExpressionVisitor : AssertSemanticVisitor
+{
+ public void visit (Expression) { }
+
+ alias visit = typeof(super).visit;
+}
+
+class ExpressionVisitor2 : AssertSemanticVisitor
+{
+ public void visit (Expression) { }
+
+ alias visit = AssertSemanticVisitor.visit;
+}
+
+void main ()
+{
+ scope x1 = new ExpressionVisitor;
+ scope x2 = new ExpressionVisitor;
+ scope y = new Statement;
+ x1.visit(y);
+ x2.visit(y);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19014.d b/gcc/testsuite/gdc.test/compilable/test19014.d
new file mode 100644
index 0000000..7bbbc94
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19014.d
@@ -0,0 +1,12 @@
+// https://issues.dlang.org/show_bug.cgi?id=19014
+
+import core.stdc.config;
+
+void main()
+{
+ if (true)
+ {
+ static import core.stdc.math;
+ }
+ static assert(!__traits(compiles, core.stdc.math.cos(0)));
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19066.d b/gcc/testsuite/gdc.test/compilable/test19066.d
new file mode 100644
index 0000000..53d5005
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19066.d
@@ -0,0 +1,13 @@
+class C {}
+
+int Object;
+
+struct S
+{
+ int object;
+ C Object;
+}
+
+void main()
+{
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19081.d b/gcc/testsuite/gdc.test/compilable/test19081.d
new file mode 100644
index 0000000..ba5fd9c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19081.d
@@ -0,0 +1,14 @@
+void main() {
+ @(1) enum { A }
+ /// comment
+ @(1) enum X { A }
+ @(2) enum Y;
+ @(1) @(2) enum Z { A }
+
+ struct Test { int test; }
+ @Test(1) enum W { A }
+ @(1) enum V: int { A }
+ X a;
+ static assert(__traits(getAttributes, X).length == 1);
+ static assert(__traits(getAttributes, X)[0] == 1);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19097.d b/gcc/testsuite/gdc.test/compilable/test19097.d
new file mode 100644
index 0000000..19e189c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19097.d
@@ -0,0 +1,23 @@
+/* REQUIRED_ARGS: -preview=dip1000
+ */
+
+// Related to: https://github.com/dlang/dmd/pull/8504
+
+@safe:
+
+void betty()(ref int* r, return scope int* p)
+{
+ r = p; // infer `scope` for r
+}
+
+void boop()(ref int* r, scope int* p)
+{
+ r = p; // infer `scope` for r, `return` for p
+}
+
+void foo(scope int* pf)
+{
+ scope int* rf;
+ betty(rf, pf);
+ boop(rf, pf);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19108.d b/gcc/testsuite/gdc.test/compilable/test19108.d
new file mode 100644
index 0000000..4620750
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19108.d
@@ -0,0 +1,9 @@
+// REQUIRED_ARGS: -ignore
+
+// https://issues.dlang.org/show_bug.cgi?id=19108
+
+pragma(unknown_global);
+void main()
+{
+ pragma(unknown_local); // Error: unrecognized pragma
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19187.d b/gcc/testsuite/gdc.test/compilable/test19187.d
new file mode 100644
index 0000000..9d0630a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19187.d
@@ -0,0 +1,6 @@
+// EXTRA_FILES: imports/test19187.d
+import imports.test19187;
+void main()
+{
+ enum test = __traits(compiles, imports.test19187.foo);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19203.d b/gcc/testsuite/gdc.test/compilable/test19203.d
new file mode 100644
index 0000000..206d662
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19203.d
@@ -0,0 +1,27 @@
+//https://issues.dlang.org/show_bug.cgi?id=19203
+struct BoolWithErr {
+ bool b;
+ string error;
+ alias b this;
+}
+
+struct Foo {
+ int popBack() { return 0; }
+}
+
+struct Bar {}
+
+template hasPopBack(T) {
+ static if (!is(typeof(T.init.popBack)))
+ enum hasPopBack = BoolWithErr(false, T.stringof~" does not have popBack");
+ else
+ enum hasPopBack = BoolWithErr(true,"");
+}
+
+void test()
+{
+ static assert( hasPopBack!Foo);
+ static assert(!hasPopBack!Bar);
+ static assert( hasPopBack!Foo && !hasPopBack!Bar);
+}
+
diff --git a/gcc/testsuite/gdc.test/compilable/test19224.d b/gcc/testsuite/gdc.test/compilable/test19224.d
new file mode 100644
index 0000000..4020e0d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19224.d
@@ -0,0 +1,18 @@
+// https://issues.dlang.org/show_bug.cgi?id=19224
+static if (__traits(compiles, __vector(float[4])))
+{
+ float sum(const float[4] val)
+ {
+ float sum = 0;
+ foreach (x; val) sum += x;
+ return sum;
+ }
+
+ alias float4 = __vector(float[4]);
+
+ enum x = sum(float4.init.array);
+ static assert(x is float.nan);
+
+ enum y = sum(float4(1).array);
+ static assert(y == 4);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19227.d b/gcc/testsuite/gdc.test/compilable/test19227.d
new file mode 100644
index 0000000..27dab9e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19227.d
@@ -0,0 +1,29 @@
+// https://issues.dlang.org/show_bug.cgi?id=19227
+/* TEST_OUTPUT:
+---
+compilable/test19227.d(18): Deprecation: use of complex type `cfloat` is deprecated, use `std.complex.Complex!(float)` instead
+Deprecation: use of complex type `const(cfloat)` is deprecated, use `std.complex.Complex!(float)` instead
+Deprecation: use of complex type `const(cfloat)` is deprecated, use `std.complex.Complex!(float)` instead
+Deprecation: use of complex type `const(cfloat)` is deprecated, use `std.complex.Complex!(float)` instead
+---
+*/
+
+struct S
+{
+ float f;
+}
+
+struct T
+{
+ cfloat cf;
+}
+
+void main()
+{
+ static assert(S.init is S.init);
+ static assert(S.init != S.init);
+
+ static assert(T.init is T.init);
+ static assert(T.init != T.init);
+}
+
diff --git a/gcc/testsuite/gdc.test/compilable/test19315.d b/gcc/testsuite/gdc.test/compilable/test19315.d
new file mode 100644
index 0000000..0c31ab8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19315.d
@@ -0,0 +1,20 @@
+//https://issues.dlang.org/show_bug.cgi?id=19315
+void main()
+{
+ #line 100 "file.d"
+ enum code = q{
+ #line 10
+ };
+ static assert(__LINE__ == 103);
+ static assert(__FILE__ == "file.d");
+
+ #line 200 "file2.d"
+ enum code2 = q{
+ q{
+ #line 5
+ }
+ #line 9 "foo.d"
+ };
+ static assert(__LINE__ == 206);
+ static assert(__FILE__ == "file2.d");
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19409.d b/gcc/testsuite/gdc.test/compilable/test19409.d
new file mode 100644
index 0000000..94915e8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19409.d
@@ -0,0 +1,6 @@
+// https://issues.dlang.org/show_bug.cgi?id=19409
+
+module test.foo;
+
+static if (__traits(compiles, __traits(identifier, test.foo))) {} // fails
+else { static assert(0); }
diff --git a/gcc/testsuite/gdc.test/compilable/test19464.d b/gcc/testsuite/gdc.test/compilable/test19464.d
new file mode 100644
index 0000000..d0d3895
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19464.d
@@ -0,0 +1,5 @@
+// https://issues.dlang.org/show_bug.cgi?id=19464
+
+typeof(a0) b0 = 3;
+immutable int a0 = 4;
+static assert(is(typeof(b0) == immutable(int)));
diff --git a/gcc/testsuite/gdc.test/compilable/test19482.d b/gcc/testsuite/gdc.test/compilable/test19482.d
new file mode 100644
index 0000000..09485a3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19482.d
@@ -0,0 +1,68 @@
+// https://issues.dlang.org/show_bug.cgi?id=19482
+
+alias AliasSeq(T...) = T;
+
+extern (C++, "cppns")
+@("asd", 123)
+private
+deprecated
+immutable
+static foreach (i; 0 .. 1)
+{
+ static assert(is(typeof(i) == int));
+ static assert(__traits(getLinkage, i) == "D");
+ static assert(__traits(isDeprecated, i) == false);
+ static assert(__traits(getAttributes, i).length == 0);
+ static assert(__traits(getCppNamespaces, i).length == 0);
+ static assert(__traits(getVisibility, i) == "public");
+
+ extern int x;
+ static assert(is(typeof(x) == immutable int));
+ static assert(__traits(getLinkage, x) == "C++");
+ static assert(__traits(isDeprecated, x) == true);
+ static assert(__traits(getAttributes, x) == AliasSeq!("asd", 123));
+ static assert(__traits(getCppNamespaces, x) == AliasSeq!("cppns"));
+ static assert(__traits(getVisibility, x) == "private");
+}
+
+struct S
+{
+ @disable static foreach (j; 0 .. 1)
+ {
+ int y;
+ static assert(__traits(isDisabled, j) == false);
+ static assert(__traits(isDisabled, S.y) == true);
+ }
+}
+
+const
+static foreach (i, v; ['a'])
+{
+ static assert(is(typeof(i) == size_t));
+ static assert(is(typeof(v) == char));
+}
+
+const
+static foreach (i, s, f; Range())
+{
+ static assert(is(typeof(i) == int));
+ static assert(is(typeof(s) == string));
+ static assert(is(typeof(f) == float));
+}
+
+struct Range
+{
+ int i;
+ auto front()
+ {
+ return Tup!(int, string, float)(123, "asd", 3.14f);
+ }
+ bool empty() { return i > 0; }
+ void popFront() { ++i; }
+}
+
+struct Tup(T...)
+{
+ T fields;
+ alias fields this;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19491.d b/gcc/testsuite/gdc.test/compilable/test19491.d
new file mode 100644
index 0000000..3a341b3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19491.d
@@ -0,0 +1,11 @@
+// https://issues.dlang.org/show_bug.cgi?id=19491
+
+class Foo
+{
+ shared this();
+}
+
+void test()
+{
+ scope foo = new shared Foo();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19499.d b/gcc/testsuite/gdc.test/compilable/test19499.d
new file mode 100644
index 0000000..c3ff73e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19499.d
@@ -0,0 +1,6 @@
+// https://issues.dlang.org/show_bug.cgi?id=19499
+
+enum __c_long_double : double;
+enum A(T : double) = true;
+enum A(T : __c_long_double) = false;
+static assert(A!double == true);
diff --git a/gcc/testsuite/gdc.test/compilable/test19519.d b/gcc/testsuite/gdc.test/compilable/test19519.d
new file mode 100644
index 0000000..3799966
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19519.d
@@ -0,0 +1,15 @@
+struct S { char[1] e = void; }
+
+void init(ref char[1] e)
+{
+ e[0 .. 1] = "A";
+}
+
+int foo()
+{
+ auto s = S();
+ init(s.e);
+ return __ctfe;
+}
+
+static assert(foo() == 1);
diff --git a/gcc/testsuite/gdc.test/compilable/test19540.d b/gcc/testsuite/gdc.test/compilable/test19540.d
new file mode 100644
index 0000000..5132897
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19540.d
@@ -0,0 +1,2 @@
+alias inst = templ!();
+template templ(T = typeof(new class {})) {}
diff --git a/gcc/testsuite/gdc.test/compilable/test19557.d b/gcc/testsuite/gdc.test/compilable/test19557.d
new file mode 100644
index 0000000..f107e22
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19557.d
@@ -0,0 +1,10 @@
+// https://issues.dlang.org/show_bug.cgi?id=19557
+// Error: redundant linkage `extern (C++)`
+
+extern(C++, "ns")
+extern(C++, class)
+struct test {}
+
+extern(C++, class)
+extern(C++, "ns")
+struct test2 {}
diff --git a/gcc/testsuite/gdc.test/compilable/test19609.d b/gcc/testsuite/gdc.test/compilable/test19609.d
index a3d6923..2646bd4 100644
--- a/gcc/testsuite/gdc.test/compilable/test19609.d
+++ b/gcc/testsuite/gdc.test/compilable/test19609.d
@@ -1,10 +1,11 @@
// https://issues.dlang.org/show_bug.cgi?id=19609
+// EXTRA_FILES: imports/test19609a.d imports/test19609b.d imports/test19609c.d
/*
TEST_OUTPUT
---
-compilable/test19609.d(10): Deprecation: module `imports.test19609a` is deprecated -
-compilable/test19609.d(11): Deprecation: module `imports.test19609b` is deprecated - hello
-compilable/test19609.d(12): Deprecation: module `imports.test19609c` is deprecated -
+compilable/test19609.d(11): Deprecation: module `imports.test19609a` is deprecated -
+compilable/test19609.d(12): Deprecation: module `imports.test19609b` is deprecated - hello
+compilable/test19609.d(13): Deprecation: module `imports.test19609c` is deprecated -
---
*/
import imports.test19609a;
diff --git a/gcc/testsuite/gdc.test/compilable/test19631.d b/gcc/testsuite/gdc.test/compilable/test19631.d
new file mode 100644
index 0000000..3a4dd8e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19631.d
@@ -0,0 +1,11 @@
+struct Field(int _w, int _h)
+{
+ bool[_h][_w] s;
+}
+
+struct Life(int w, int h)
+{
+ auto a = new Field!(w, h); // ICE
+}
+
+alias T = Life!(100, 100);
diff --git a/gcc/testsuite/gdc.test/compilable/test19652.d b/gcc/testsuite/gdc.test/compilable/test19652.d
new file mode 100644
index 0000000..193c717
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19652.d
@@ -0,0 +1,22 @@
+struct Base {
+ int i;
+}
+
+struct A {
+ Base base;
+ alias base this;
+}
+
+struct B {
+ A a;
+ alias a this;
+}
+
+auto asGeneric(inout ref Base block) @nogc {
+ return &block;
+}
+
+B* thingie;
+auto foo() {
+ return asGeneric(*thingie);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19656.d b/gcc/testsuite/gdc.test/compilable/test19656.d
new file mode 100644
index 0000000..bcfd36e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19656.d
@@ -0,0 +1,14 @@
+/*
+PERMUTE_ARGS:
+EXTRA_FILES: imports/test19656a.d imports/test19656b.d imports/test19656c.d
+*/
+
+import imports.test19656a;
+import imports.test19656c: Thud;
+
+class Foo
+{
+ Foo[Foo] _map;
+ void func (Thud ) { }
+ void thunk () { }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19657a.d b/gcc/testsuite/gdc.test/compilable/test19657a.d
new file mode 100644
index 0000000..1aefb5e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19657a.d
@@ -0,0 +1,11 @@
+/*
+REQUIRED_ARGS: -Icompilable/imports
+EXTRA_SOURCES: imports/test19657b.d imports/test19657c.d imports/test19657d.d imports/test19657e.d imports/test19657f.d imports/test19657g.d
+*/
+
+import test19657c;
+import test19657e: Bar;
+class Foo {
+ int[Foo] _map;
+ bool func (Foo rhs, Bar bee) { return true; }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19713.d b/gcc/testsuite/gdc.test/compilable/test19713.d
new file mode 100644
index 0000000..5201404
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19713.d
@@ -0,0 +1,14 @@
+extern (C++)
+{
+ double twice(double d)
+ {
+ return d * 2;
+ }
+
+ void* createFunction(R)(R function(double));
+}
+
+void main()
+{
+ const f = createFunction(&twice);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19728.d b/gcc/testsuite/gdc.test/compilable/test19728.d
new file mode 100644
index 0000000..551ac0f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19728.d
@@ -0,0 +1,52 @@
+/*
+TEST_OUTPUT:
+---
+tuple((A), (B))
+tuple((A), (B), 0)
+tuple((A), (B), (A))
+tuple((A), (B), (A), (B))
+tuple((A), (B), (A), (B))
+tuple((A), (B), (A), (B), (A), (B), (A), (B))
+tuple((Attr))
+---
+*/
+
+// Issue 19728
+enum A; enum B; enum Dummy = 0;
+
+alias Seq(T...) = T;
+
+@Seq!(A,B) struct Foo1 {}
+@Seq!(A,B, Dummy) struct Foo2 {}
+@Seq!(A,B,A) struct Foo3 {}
+@Seq!(Seq!(A,B,A,B)) struct Foo4 {}
+@Seq!(A,Seq!(B,A),B) struct Foo5 {}
+@Seq!(A,Seq!(B,A),B) @Seq!(A,B,A,B) struct Foo6 {}
+
+pragma(msg, __traits(getAttributes, Foo1));
+pragma(msg, __traits(getAttributes, Foo2));
+pragma(msg, __traits(getAttributes, Foo3));
+pragma(msg, __traits(getAttributes, Foo4));
+pragma(msg, __traits(getAttributes, Foo5));
+pragma(msg, __traits(getAttributes, Foo6));
+
+struct S(T...) {}
+static assert(is( S!(A,B) == S!(__traits(getAttributes, Foo1))));
+static assert(is( S!(A,B,Dummy) == S!(__traits(getAttributes, Foo2))));
+static assert(is( S!(A,B,A) == S!(__traits(getAttributes, Foo3))));
+static assert(is( S!(A,B,A,B) == S!(__traits(getAttributes, Foo4))));
+static assert(is( S!(A,B,A,B) == S!(__traits(getAttributes, Foo5))));
+static assert(is(S!(A,B,A,B,A,B,A,B) == S!(__traits(getAttributes, Foo6))));
+
+// Issue 20093
+mixin template MakeProperty(Attributes...) {
+ @(Attributes) void bug() {}
+}
+
+struct Attr { }
+
+struct Test {
+ mixin MakeProperty!(Attr);
+}
+
+pragma(msg, __traits(getAttributes, Test.bug));
diff --git a/gcc/testsuite/gdc.test/compilable/test19731.d b/gcc/testsuite/gdc.test/compilable/test19731.d
new file mode 100644
index 0000000..09c5102
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19731.d
@@ -0,0 +1,78 @@
+// https://issues.dlang.org/show_bug.cgi?id=19731
+
+class Out19731
+{
+ static struct State
+ {
+ int flags_;
+ }
+ Object obj_;
+
+ invariant (obj_ !is null);
+
+ auto obj7(out State state)
+ {
+ return this.obj_;
+ }
+
+ enum compiles = __traits(compiles, &Out19731.init.obj7);
+}
+
+class Arguments19731
+{
+ Object obj_;
+
+ invariant (obj_ !is null);
+
+ import core.stdc.stdarg;
+ auto obj7(...)
+ {
+ return this.obj_;
+ }
+
+ enum compiles = __traits(compiles, &Arguments19731.init.obj7);
+}
+
+class Require19731
+{
+ Object obj_;
+
+ invariant (obj_ !is null);
+
+ auto obj7(int a)
+ in(a != 0)
+ {
+ return this.obj_;
+ }
+
+ enum compiles = __traits(compiles, &Require19731.init.obj7);
+}
+
+class Ensure19731
+{
+ Object obj_;
+
+ invariant (obj_ !is null);
+
+ auto obj7(int a)
+ out(result; result is obj_)
+ {
+ return this.obj_;
+ }
+
+ enum compiles = __traits(compiles, &Ensure19731.init.obj7);
+}
+
+class Sync19731
+{
+ Object obj_;
+
+ invariant (obj_ !is null);
+
+ synchronized auto obj7()
+ {
+ return this.obj_;
+ }
+
+ enum compiles = __traits(compiles, &Sync19731.init.obj7);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19746.d b/gcc/testsuite/gdc.test/compilable/test19746.d
new file mode 100644
index 0000000..28677b0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19746.d
@@ -0,0 +1,16 @@
+// REQUIRED_ARGS: -Icompilable/imports
+// EXTRA_FILES: imports/test19746a.d imports/test19746b.d imports/test19746c.d imports/test19746d.d
+import test19746c;
+import test19746b: Frop;
+
+template Base(T)
+{
+ static if (is(T == super)) alias Base = Object;
+}
+
+class Foo
+{
+ class Nested: Base!Foo { }
+ void func(Frop) { }
+ void thunk() { }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19750.d b/gcc/testsuite/gdc.test/compilable/test19750.d
new file mode 100644
index 0000000..0d57749
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19750.d
@@ -0,0 +1,7 @@
+// REQUIRED_ARGS: -Icompilable/imports
+// EXTRA_FILES: imports/test19750a.d imports/test19750b.d imports/test19750c.d imports/test19750d.d
+import test19750b;
+class Foo {
+ import test19750a;
+ void func (Bar ) {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19754.d b/gcc/testsuite/gdc.test/compilable/test19754.d
new file mode 100644
index 0000000..a7ad4ac
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19754.d
@@ -0,0 +1,45 @@
+// https://issues.dlang.org/show_bug.cgi?id=19754
+
+void test19754()
+{
+ shared int x;
+ static assert((cast(int*) &x) == &(cast() x));
+ (cast() x) = 5;
+ (cast() x) += 3;
+
+ const int x1;
+ static assert(&x1 == &(cast() x1));
+ (cast() x1) = 5;
+ (cast() x1) *= 3;
+
+ immutable int x2;
+ static assert(&x2 == &(cast() x2));
+ (cast() x2) = 5;
+ (cast() x2) &= 3;
+
+ int[4] a;
+ (cast(long[2]) a)[0] = 5;
+ (cast(long[2]) a)[0] += 3;
+
+ static if (is(__vector(int[4])))
+ {
+ __vector(int[4]) v;
+ (cast(int[4]) v)[0] = 5;
+ (cast(int[4]) v)[0] += 3;
+ }
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20608
+
+void foo(T...)(auto ref T args) {}
+
+struct Tuple
+{
+ int expand;
+}
+
+void test20608()
+{
+ enum tup = Tuple();
+ foo(tup.expand);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19804.d b/gcc/testsuite/gdc.test/compilable/test19804.d
new file mode 100644
index 0000000..136e89f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19804.d
@@ -0,0 +1,9 @@
+// https://issues.dlang.org/show_bug.cgi?id=19804
+
+struct A { float e; }
+
+void foo(A[1] a)
+{
+ void bar(A[1] a) { a[] = null; }
+ bar(a);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19809.d b/gcc/testsuite/gdc.test/compilable/test19809.d
new file mode 100644
index 0000000..3344ef1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19809.d
@@ -0,0 +1,14 @@
+// https://issues.dlang.org/show_bug.cgi?id=19809
+mixin template Impl(M...)
+{
+ int opCmp(Object o) { return 0; }
+}
+
+class C
+{
+ override
+ {
+ int function(int) fp = ((int x) => x);
+ mixin Impl!("x", "y", ((int x) => x));
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19833.d b/gcc/testsuite/gdc.test/compilable/test19833.d
new file mode 100644
index 0000000..6ffa5c4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19833.d
@@ -0,0 +1,27 @@
+struct S
+{
+ template Temp(int x)
+ {
+ enum xxx = x;
+ }
+}
+
+alias TT = __traits(getMember, S, "Temp");
+enum x = TT!2.xxx;
+static assert(x == 2);
+
+class A
+{
+ mixin temp!("uint");
+ mixin temp!("float");
+
+ mixin template temp(string source)
+ {
+ private enum inner(string s) = s;
+ }
+}
+
+class B
+{
+ alias member = __traits(getMember, A, __traits(allMembers, A)[0]);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19840.d b/gcc/testsuite/gdc.test/compilable/test19840.d
new file mode 100644
index 0000000..e0c7b28
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19840.d
@@ -0,0 +1,21 @@
+// https://issues.dlang.org/show_bug.cgi?id=19840
+struct G
+{
+ ubyte[] I;
+ alias I this;
+}
+
+auto M(ubyte[])
+{
+ G N;
+ return N;
+}
+
+struct U { int V; }
+
+void X()
+{
+ func((cast(U[])[].M));
+}
+
+void func(U[]) {}
diff --git a/gcc/testsuite/gdc.test/compilable/test19873.d b/gcc/testsuite/gdc.test/compilable/test19873.d
new file mode 100644
index 0000000..7252edd
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19873.d
@@ -0,0 +1,37 @@
+// PERMUTE_ARGS -preview=dip1000
+// https://issues.dlang.org/show_bug.cgi?id=19873
+int* ed(scope int* x)
+{
+ auto y = x;
+ return y;
+}
+
+int* et(scope int* x) @trusted
+{
+ auto y = x;
+ return y;
+}
+
+int* es(scope int* x) @system
+{
+ auto y = x;
+ return y;
+}
+
+auto ad(scope int* x)
+{
+ auto y = x;
+ return y;
+}
+
+auto at(scope int* x) @trusted
+{
+ auto y = x;
+ return y;
+}
+
+auto as(scope int* x) @system
+{
+ auto y = x;
+ return y;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19895.d b/gcc/testsuite/gdc.test/compilable/test19895.d
new file mode 100644
index 0000000..b2d8e68
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19895.d
@@ -0,0 +1,7 @@
+// https://issues.dlang.org/show_bug.cgi?id=19895
+
+void fn()
+{
+ void[] a;
+ auto b = cast(byte[0][]) a;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19936.d b/gcc/testsuite/gdc.test/compilable/test19936.d
new file mode 100644
index 0000000..248e28a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19936.d
@@ -0,0 +1,17 @@
+// REQUIRED_ARGS: -de
+
+struct Bla
+{
+ deprecated("bla")
+ int get() { return 5; }
+
+ alias get this;
+}
+
+void main()
+{
+ Bla[] blaArray;
+ // ~= should not try to call `.get`, because there's no indication that
+ // `blaArray` has any kind of opAppendAssign related overload in the first place.
+ blaArray ~= Bla();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19954.d b/gcc/testsuite/gdc.test/compilable/test19954.d
new file mode 100644
index 0000000..6ccc8be
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19954.d
@@ -0,0 +1,14 @@
+// https://issues.dlang.org/show_bug.cgi?id=19954
+
+template AliasSeq(TList...)
+{
+ alias AliasSeq = TList;
+}
+
+void fun(string[]){}
+
+void main()
+{
+ fun(cast(string[])AliasSeq!"");
+ auto a = cast(char[][])"";
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test19970.d b/gcc/testsuite/gdc.test/compilable/test19970.d
new file mode 100644
index 0000000..52f8e0c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test19970.d
@@ -0,0 +1,16 @@
+// https://issues.dlang.org/show_bug.cgi?id=19970
+
+enum void* p = cast(void*)0;
+static assert(p is null);
+static assert(ctfeLocal(p));
+static assert(ctfeGlobal());
+
+bool ctfeGlobal ()
+{
+ return p is null;
+}
+
+bool ctfeLocal (const void* ptr) pure
+{
+ return ptr is null;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20000.d b/gcc/testsuite/gdc.test/compilable/test20000.d
new file mode 100644
index 0000000..11548cb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20000.d
@@ -0,0 +1,9 @@
+// https://issues.dlang.org/show_bug.cgi?id=20000
+
+interface A { int a(); }
+interface B { int b(); }
+class C {}
+
+bool isA(Object x) @safe { return cast(A) x !is null; }
+bool isA(B x) @safe { return cast(A) x !is null; }
+bool isA(C x) @safe { return cast(A) x !is null; }
diff --git a/gcc/testsuite/gdc.test/compilable/test20021.d b/gcc/testsuite/gdc.test/compilable/test20021.d
new file mode 100644
index 0000000..26ed1ac
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20021.d
@@ -0,0 +1,22 @@
+// https://issues.dlang.org/show_bug.cgi?id=20021
+struct S
+{
+ bool opCast(T : bool)() { return true; }
+ S prop() {return this;}
+ S prop(S newThis) {return this;}
+}
+
+struct T
+{
+ bool opCast(T : bool)() { return false; }
+}
+
+void test20021()
+{
+ static if (T.init)
+ static assert(false);
+
+ // ensure properties are resolved
+ static if (!(true && T.init || (S.init.prop = S.init).prop))
+ static assert(false);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20039.d b/gcc/testsuite/gdc.test/compilable/test20039.d
new file mode 100644
index 0000000..d912139
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20039.d
@@ -0,0 +1,13 @@
+void foo()() { }
+class bar { }
+
+alias bug = foo;
+alias bug = bar;
+
+template Identity(T...) { }
+
+void main()
+{
+ alias member1 = Identity!(__traits(getMember, mixin(__MODULE__), "bug"));
+ alias member2 = Identity!(__traits(getMember, mixin(__MODULE__), "bug"));
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20051.d b/gcc/testsuite/gdc.test/compilable/test20051.d
new file mode 100644
index 0000000..20c1188
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20051.d
@@ -0,0 +1,18 @@
+// https://issues.dlang.org/show_bug.cgi?id=20051
+struct Templ2(Args...)
+{
+}
+
+struct WillAlsoWork(alias T : Templ!Args, Args...)
+{
+ alias A = Args[0];
+}
+
+void main()
+{
+ alias C2 = Templ2!int;
+ static assert(!__traits(compiles, {
+ alias B2 = WillAlsoWork!C2;
+ B2.A a2;
+ }));
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20065.d b/gcc/testsuite/gdc.test/compilable/test20065.d
new file mode 100644
index 0000000..c1be44d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20065.d
@@ -0,0 +1,12 @@
+alias AliasSeq(T...) = T;
+
+void main()
+{
+ enum string[] array1 = [AliasSeq!("foo")];
+
+ static assert(array1 == ["foo"]);
+
+ enum string[] array2 = [AliasSeq!()];
+
+ static assert(array2 == []);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20100.d b/gcc/testsuite/gdc.test/compilable/test20100.d
new file mode 100644
index 0000000..bc8ad2c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20100.d
@@ -0,0 +1,50 @@
+// REQUIRED_ARGS: -checkaction=context
+struct STuple {
+ bool opEquals(STuple) { return false; }
+}
+
+class CTuple {
+}
+
+void testStruct() {
+ STuple t1;
+ assert(t1 == t1);
+}
+
+void testClass() {
+ CTuple t1 = new CTuple();
+ assert(t1 == t1);
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20331
+void testAnonymousFunction()
+{
+ bool function() check = () => true;
+ assert(check());
+
+ bool result = true;
+ assert((() => result)());
+}
+
+void main() {
+ testStruct();
+ testClass();
+ testAnonymousFunction();
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20989
+ void test20989() @safe
+{
+ uint[] arr = [1, 2, 3];
+ assert(arr.ptr);
+ assert(!arr.ptr);
+ assert(arr.ptr is arr.ptr);
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=21765
+ref int func21765(int);
+void test21765()
+{
+ assert((func21765(1) = 2) == 2);
+ assert((1.func21765 = 2) == 2);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20136.d b/gcc/testsuite/gdc.test/compilable/test20136.d
new file mode 100644
index 0000000..a5fb8e3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20136.d
@@ -0,0 +1,18 @@
+// https://issues.dlang.org/show_bug.cgi?id=20136
+class Context
+{
+ size_t[const(Key)] aa;
+ bool checkAll;
+}
+
+struct Key
+{
+ Context context;
+ int i;
+ bool opEquals(ref const Key other) const
+ {
+ if(context.checkAll && i != other.i)
+ return false;
+ return true;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20138.d b/gcc/testsuite/gdc.test/compilable/test20138.d
new file mode 100644
index 0000000..f4626ae
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20138.d
@@ -0,0 +1,16 @@
+alias C = const int;
+static assert(is(shared(C) U == shared U) && is(U == C));
+static assert(is(shared(C) == shared U, U) && is(U == C));
+
+alias I = inout int;
+static assert(is(shared(I) U == shared U) && is(U == I));
+static assert(is(shared(I) == shared U, U) && is(U == I));
+
+alias IC = inout const int;
+static assert(is(shared(IC) U == shared U) && is(U == IC));
+static assert(is(shared(IC) == shared U, U) && is(U == IC));
+
+alias S = shared int;
+static assert(is(const(S) U == const U) && is(U == shared int));
+static assert(is(inout(S) U == inout U) && is(U == shared int));
+static assert(is(inout(const S) U == inout(const U)) && is(U == shared int));
diff --git a/gcc/testsuite/gdc.test/compilable/test20181.d b/gcc/testsuite/gdc.test/compilable/test20181.d
new file mode 100644
index 0000000..e71b478
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20181.d
@@ -0,0 +1,11 @@
+module test20181;
+
+struct InversionList
+{
+ ubyte[] byCodepoint() { return null; }
+}
+
+void main()
+{
+ static foreach (ch; InversionList().byCodepoint) { }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20236.d b/gcc/testsuite/gdc.test/compilable/test20236.d
new file mode 100644
index 0000000..d50c874
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20236.d
@@ -0,0 +1,22 @@
+// https://issues.dlang.org/show_bug.cgi?id=20236
+
+/*
+TEST_OUTPUT:
+---
+---
+*/
+
+struct X
+{
+ alias y this;
+ deprecated int y() { return 5; }
+ int x() { return 5; }
+}
+
+void main()
+{
+ static void func(int) {}
+ with(X.init) {
+ func(x);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20296.d b/gcc/testsuite/gdc.test/compilable/test20296.d
new file mode 100644
index 0000000..2b16fa5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20296.d
@@ -0,0 +1,8 @@
+// https://issues.dlang.org/show_bug.cgi?id=20296
+
+extern (C++)
+void foo(T...)(T args)
+{
+}
+
+alias F = foo!(char*);
diff --git a/gcc/testsuite/gdc.test/compilable/test20318.d b/gcc/testsuite/gdc.test/compilable/test20318.d
new file mode 100644
index 0000000..58d3969
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20318.d
@@ -0,0 +1,7 @@
+// https://issues.dlang.org/show_bug.cgi?id=20318
+// REQUIRED_ARGS: -dip1008 -profile=gc
+
+void main()
+{
+ throw new Exception("msg");
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20326.d b/gcc/testsuite/gdc.test/compilable/test20326.d
new file mode 100644
index 0000000..1da3eb6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20326.d
@@ -0,0 +1,11 @@
+class C;
+static assert(C.stringof == "C");
+
+interface I;
+static assert(I.stringof == "I");
+
+union U;
+static assert(U.stringof == "U");
+
+struct S;
+static assert(S.stringof == "S");
diff --git a/gcc/testsuite/gdc.test/compilable/test20367.d b/gcc/testsuite/gdc.test/compilable/test20367.d
new file mode 100644
index 0000000..ebdf9ee
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20367.d
@@ -0,0 +1,14 @@
+// https://issues.dlang.org/show_bug.cgi?id=20367
+
+struct A
+{
+ int x;
+ this(ref return scope A rhs) {}
+ @disable this(this) {}
+}
+
+void main()
+{
+ A a;
+ A b = a; // copy constructor gets called
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20388.d b/gcc/testsuite/gdc.test/compilable/test20388.d
new file mode 100644
index 0000000..e0beac9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20388.d
@@ -0,0 +1,10 @@
+// https://issues.dlang.org/show_bug.cgi?id=20388
+
+void main() {
+ foo!(mixin("(int a) { return a; }"))();
+ foo!(mixin("1+1"))();
+ foo!(mixin(0))();
+}
+
+void foo(alias t)() {
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20406.d b/gcc/testsuite/gdc.test/compilable/test20406.d
new file mode 100644
index 0000000..c3d494f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20406.d
@@ -0,0 +1,15 @@
+// https://issues.dlang.org/show_bug.cgi?id=20406
+struct S
+{
+ @disable this();
+ this(int) {}
+ this(ref S other) {}
+}
+
+void foo(S s) {}
+
+void main()
+{
+ S s = S(3);
+ foo(s);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20410.d b/gcc/testsuite/gdc.test/compilable/test20410.d
new file mode 100644
index 0000000..bed8017
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20410.d
@@ -0,0 +1,8 @@
+// https://issues.dlang.org/show_bug.cgi?id=20410
+
+enum E : string { foo = "foo" }
+
+static assert( is(E : string));
+static assert( is(E : T[], T));
+static assert(!is(E == string));
+static assert(!is(E == T[], T));
diff --git a/gcc/testsuite/gdc.test/compilable/test20417.d b/gcc/testsuite/gdc.test/compilable/test20417.d
new file mode 100644
index 0000000..230ad31
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20417.d
@@ -0,0 +1,12 @@
+// https://issues.dlang.org/show_bug.cgi?id=20417
+
+struct A { ~this(); }
+void f(A, int);
+A a();
+int i();
+
+static assert(__traits(compiles, { f(a, i); }));
+static assert(__traits(compiles, f(a, i)));
+
+static assert(is(typeof({ f(a, i); })));
+static assert(is(typeof(f(a, i))));
diff --git a/gcc/testsuite/gdc.test/compilable/test20420.d b/gcc/testsuite/gdc.test/compilable/test20420.d
new file mode 100644
index 0000000..5d99e9c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20420.d
@@ -0,0 +1,22 @@
+// REQUIRED_ARGS: -inline
+
+// https://issues.dlang.org/show_bug.cgi?id=20420
+
+struct S { ~this(); }
+
+class C
+{
+ this(S, int) {}
+}
+
+int i();
+
+C create()
+{
+ return new C(S(), i());
+}
+
+auto test()
+{
+ auto c = create();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20488.d b/gcc/testsuite/gdc.test/compilable/test20488.d
new file mode 100644
index 0000000..7b15ee1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20488.d
@@ -0,0 +1,11 @@
+module test20488;
+
+// https://issues.dlang.org/show_bug.cgi?id=20488
+struct Bar {
+ void opDispatch(string s, Args...) (Args args) {
+ }
+ void fun() {
+ (bool[int]).init.length;
+ this.f((int[int]).init.length);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20596.d b/gcc/testsuite/gdc.test/compilable/test20596.d
new file mode 100644
index 0000000..cd059c9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20596.d
@@ -0,0 +1,31 @@
+// PERMUTE_ARGS: -preview=dip1000
+
+// https://issues.dlang.org/show_bug.cgi?id=20596
+
+struct S(T)
+{
+ void delegate() dg;
+
+ this(scope void delegate() dg)
+ {
+ this.dg = dg;
+ }
+}
+
+@nogc void fooTemplate()
+{
+ int num;
+
+ void foo() { int dummy = num; }
+
+ scope s = S!int(&foo);
+}
+
+void test3032() @nogc
+{
+ int n = 1;
+ scope fp = (){ n = 10; }; // no closure
+ fp();
+}
+
+
diff --git a/gcc/testsuite/gdc.test/compilable/test20653.d b/gcc/testsuite/gdc.test/compilable/test20653.d
new file mode 100644
index 0000000..c7f329d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20653.d
@@ -0,0 +1,20 @@
+// LINK:
+enum x = 10;
+enum Thing { A, B }
+enum IsThing(T) = is(T == enum) || (__traits(getLinkage, T) == "C++");
+enum Is = IsThing!Thing;
+
+static assert(Is);
+
+enum Another(T) = is(T == int) && (__traits(getLinkage, T) == "C++");
+
+static assert(!Another!Thing);
+
+T myFunc(T)() { return T.init; }
+enum Foo(T) = is(T == int) || myFunc!T();
+
+void main ()
+{
+ assert(myFunc!int() == 0);
+}
+
diff --git a/gcc/testsuite/gdc.test/compilable/test20656.d b/gcc/testsuite/gdc.test/compilable/test20656.d
new file mode 100644
index 0000000..f68d654
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20656.d
@@ -0,0 +1,11 @@
+// https://issues.dlang.org/show_bug.cgi?id=20656
+
+import core.stdc.stdlib : free, malloc;
+
+@live
+void main()
+{
+ auto p = malloc(1);
+ free(p);
+ free(p);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20661.d b/gcc/testsuite/gdc.test/compilable/test20661.d
new file mode 100644
index 0000000..c755fa8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20661.d
@@ -0,0 +1,17 @@
+// https://issues.dlang.org/show_bug.cgi?id=20661
+
+class Context
+{
+ size_t[const(Key)] aa; /* Error: AA key type Key does not have bool opEquals(ref const Key) const */
+ bool* checkAll;
+}
+
+struct Key
+{
+ Context context;
+ bool opEquals(ref const Key other) @safe const
+ {
+ auto c = context.checkAll;
+ return true;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20695.d b/gcc/testsuite/gdc.test/compilable/test20695.d
new file mode 100644
index 0000000..fe4074b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20695.d
@@ -0,0 +1,35 @@
+// https://issues.dlang.org/show_bug.cgi?id=20695
+struct Bar
+{
+ this(const ref Bar o) {}
+
+ string a;
+ uint b;
+}
+
+struct Bar1
+{
+ @disable this(int a);
+ this(const ref Bar1 o) {}
+
+ string a;
+ uint b;
+}
+
+struct Bar2
+{
+ this(const ref Bar2 o) {}
+ @disable this(T)(T a) {}
+
+ string a;
+ uint b;
+}
+void main ()
+{
+ Bar b = { a: "Hello", b: 42 };
+ Bar c = Bar("Hello", 42);
+
+ Bar1 b1 = { a: "Hello", b: 42 };
+
+ Bar2 b2 = { a: "Hello", b: 42 };
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20710.d b/gcc/testsuite/gdc.test/compilable/test20710.d
new file mode 100644
index 0000000..277a3e5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20710.d
@@ -0,0 +1,24 @@
+// https://issues.dlang.org/show_bug.cgi?id=20710
+
+// with empty array literal
+immutable A a = A(B([]));
+immutable B b = a.b;
+
+struct A {
+ B b;
+}
+
+struct B {
+ int[] c;
+}
+
+// with empty struct literal
+immutable C c = C(D());
+immutable D d = c.d;
+
+struct C {
+ D d;
+}
+
+struct D {
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20744.d b/gcc/testsuite/gdc.test/compilable/test20744.d
new file mode 100644
index 0000000..ab9a9c8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20744.d
@@ -0,0 +1,13 @@
+// https://issues.dlang.org/show_bug.cgi?id=20744
+
+struct A {
+ struct S {}
+ void f(@S int = 3);
+ alias fun = Issue20744!f;
+}
+
+template Issue20744(func...) {
+ static if (is(typeof(func[0]) PT == __parameters)) {
+ alias Issue20744 = (PT args) {};
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20789.d b/gcc/testsuite/gdc.test/compilable/test20789.d
new file mode 100644
index 0000000..185042e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20789.d
@@ -0,0 +1,34 @@
+// REQUIRED_ARGS: -de
+module compilable.test20789;
+
+struct S(bool deprecateFunction, bool deprecateAlias)
+{
+ static if (deprecateFunction)
+ deprecated string get() { return "foo"; }
+ else
+ string get() { return "foo"; }
+
+ static if (deprecateAlias)
+ deprecated alias get this;
+ else
+ alias get this;
+}
+
+void main()
+{
+ void normalFun()
+ {
+ static assert( is(S!(false, false) : string));
+ static assert(!is(S!(false, true ) : string));
+ static assert(!is(S!(true , false) : string));
+ static assert(!is(S!(true , true ) : string));
+ }
+ deprecated void deprecatedFun()
+ {
+ // deprecations are allowed in a deprecated scope.
+ static assert(is(S!(false, false) : string));
+ static assert(is(S!(false, true ) : string));
+ static assert(is(S!(true , false) : string));
+ static assert(is(S!(true , true ) : string));
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20795.d b/gcc/testsuite/gdc.test/compilable/test20795.d
new file mode 100644
index 0000000..4b5cb17
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20795.d
@@ -0,0 +1,35 @@
+// https://issues.dlang.org/show_bug.cgi?id=20795
+
+// REQUIRED_ARGS: -preview=dip1000
+
+struct Foo
+{
+ void opEquals(T)(T rhs) if (T.init.opCast!string) {}
+}
+
+struct Bar
+{
+ void opEquals()(Bar)
+ {
+ Gun() == Foo();
+ }
+}
+
+class Baz
+{
+ void opCast(T)() {}
+}
+
+struct Gun
+{
+ void[24] buff;
+
+ auto underlying()
+ {
+ return cast(Baz) buff.ptr;
+ }
+
+ alias underlying this;
+
+ void opEquals(R)(R) if (Bar.init == R.init) {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20821.d b/gcc/testsuite/gdc.test/compilable/test20821.d
new file mode 100644
index 0000000..c018297
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20821.d
@@ -0,0 +1,17 @@
+// https://issues.dlang.org/show_bug.cgi?id=20821
+
+struct S
+{
+ int gun()(int i) { return 0; }
+ alias fun = gun;
+ int fun() { return 1; }
+
+ static int sgun()(int i) { return 0; }
+ alias sfun = sgun;
+ static int sfun() { return 1; }
+}
+
+static assert(S().fun == 1); // expressionsem.d changes
+static assert(S.sfun == 1); // ditto
+
+static assert(__traits(getOverloads, S, "fun", true).length == 2); // traits.d changes
diff --git a/gcc/testsuite/gdc.test/compilable/test20835.d b/gcc/testsuite/gdc.test/compilable/test20835.d
new file mode 100644
index 0000000..d1c0139
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20835.d
@@ -0,0 +1,59 @@
+// EXTRA_FILES: imports/test19344.d
+
+// https://issues.dlang.org/show_bug.cgi?id=20835
+
+template T(E) {
+ alias T = __traits(getAttributes, E.a);
+}
+
+void main()
+{
+ class C {}
+ enum E {
+ @C a
+ }
+
+ alias b = T!E;
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=19344
+
+import imports.test19344;
+
+struct Struct {
+ int value;
+}
+
+enum Enum {
+ @Struct(42) first,
+}
+
+static assert(getUDAs!(Enum.first, Struct)[0] == Struct(42));
+static assert(__traits(getAttributes, Enum.first)[0] == Struct(42));
+
+// https://issues.dlang.org/show_bug.cgi?id=21122
+
+void test21122()
+{
+ enum A;
+ enum E { @A a }
+
+ static assert(is(getAllUDAs!(E.a)[0] == A));
+}
+
+alias getAllUDAs(A...) = __traits(getAttributes, A);
+
+// https://issues.dlang.org/show_bug.cgi?id=21352
+
+@("aaa") enum Hoge {
+ @("bbb") foo, // tuple("aaa", "bbb") -> should be only tuple("bbb")
+ bar, // tuple()
+}
+@("aaa") struct Fuga {
+ @("bbb") int foo; // tuple("bbb")
+ int bar; // tuple()
+}
+static assert([__traits(getAttributes, Hoge.foo)] == ["bbb"]); //NG -> fixed
+static assert([__traits(getAttributes, Hoge.bar)] == []);
+static assert([__traits(getAttributes, Fuga.foo)] == ["bbb"]);
+static assert([__traits(getAttributes, Fuga.bar)] == []);
diff --git a/gcc/testsuite/gdc.test/compilable/test20842.d b/gcc/testsuite/gdc.test/compilable/test20842.d
new file mode 100644
index 0000000..86049e6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20842.d
@@ -0,0 +1,33 @@
+// https://issues.dlang.org/show_bug.cgi?id=20842
+
+struct A
+{
+ int i;
+ @disable this(ref A);
+}
+
+A a = { i: 123 };
+
+struct B
+{
+ int i;
+ @disable this();
+}
+
+B b = { i: 123 };
+
+union C
+{
+ int i;
+ @disable this(ref C);
+}
+
+C c = { i: 123 };
+
+union D
+{
+ int i;
+ @disable this();
+}
+
+D d = { i: 123 };
diff --git a/gcc/testsuite/gdc.test/compilable/test20860.d b/gcc/testsuite/gdc.test/compilable/test20860.d
new file mode 100644
index 0000000..78b9ddd
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20860.d
@@ -0,0 +1,16 @@
+// https://issues.dlang.org/show_bug.cgi?id=20860
+
+struct A
+{
+ this(int a) {}
+ ///
+ void opDispatch(string methodName, Params...)(Params params) {
+ }
+
+ ~this() {}
+}
+
+void main()
+{
+ A(3).test();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20868.d b/gcc/testsuite/gdc.test/compilable/test20868.d
new file mode 100644
index 0000000..90c3d32
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20868.d
@@ -0,0 +1,8 @@
+// https://issues.dlang.org/show_bug.cgi?id=20868
+// REQUIRED_ARGS: -preview=dip1000
+
+void scoped (scope void delegate() dg)
+{
+ static void delegate()[] dgs;
+ dgs ~= dg; // error
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20906.d b/gcc/testsuite/gdc.test/compilable/test20906.d
new file mode 100644
index 0000000..86ffeda
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20906.d
@@ -0,0 +1,15 @@
+/* REQUIRED_ARGS: -O
+ * No divide-by-zero constant folding errors
+ * https://issues.dlang.org/show_bug.cgi?id=20906
+ */
+
+int test12()
+{
+ int x = 0;
+ int a = x && 1 / x;
+ int b = !x || 1 / x;
+ int c = x ? 1 / x : 1;
+ int d = !x ? 1 : 1 / x;
+ return a | b | c;
+}
+
diff --git a/gcc/testsuite/gdc.test/compilable/test20909.d b/gcc/testsuite/gdc.test/compilable/test20909.d
new file mode 100644
index 0000000..743c979
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20909.d
@@ -0,0 +1,10 @@
+// https://issues.dlang.org/show_bug.cgi?id=20909
+
+struct S
+{
+ long a;
+ static assert(x.sizeof == 4);
+ enum offset = x.offsetof;
+ static assert(offset == 8); // OK now
+ int x;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20923.d b/gcc/testsuite/gdc.test/compilable/test20923.d
new file mode 100644
index 0000000..bae1eb3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20923.d
@@ -0,0 +1,13 @@
+version (D_LP64)
+{
+ alias size_t = uint;
+}
+else
+{
+ alias size_t = ulong;
+}
+
+struct S
+{
+ real not_reproduceable_without_this_variable;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test20958.d b/gcc/testsuite/gdc.test/compilable/test20958.d
new file mode 100644
index 0000000..d4ea92f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20958.d
@@ -0,0 +1,2 @@
+// EXTRA_FILES: imports/u20958.d
+import imports.u20958;
diff --git a/gcc/testsuite/gdc.test/compilable/test20990.d b/gcc/testsuite/gdc.test/compilable/test20990.d
new file mode 100644
index 0000000..aeae11d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test20990.d
@@ -0,0 +1,19 @@
+// REQUIRED_ARGS: -O
+// https://issues.dlang.org/show_bug.cgi?id=20990
+
+// foo() and bar() should produce the same code when
+// optimized.
+
+void foo(int* ptr)
+{
+ if (ptr is null)
+ assert(false);
+ *ptr = 42;
+}
+
+void bar(int* ptr)
+{
+ assert(ptr);
+ *ptr = 42;
+}
+
diff --git a/gcc/testsuite/gdc.test/compilable/test21050.d b/gcc/testsuite/gdc.test/compilable/test21050.d
new file mode 100644
index 0000000..5e81d23
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21050.d
@@ -0,0 +1,24 @@
+/*
+TEST_OUTPUT:
+----
+instantiated:long
+instantiated:int
+----
+*/
+struct S {
+ static int foo(T)(int i) { pragma(msg, "instantiated:", T.stringof); return 0; }
+ static int foo(T)(string s) { return 1; }
+}
+
+alias foo0 = __traits(getOverloads, S, "foo", true)[0];
+alias bar0 = foo0!long; // prints "instantiated:long"
+enum x = S.foo!long(0); // should not print "instantiated:long" again.
+static assert(bar0(3) == 0);
+alias bar0int = foo0!int; // prints "instantiated:int"
+enum y = S.foo!int(0); // should not print "instantiated:int" again.
+static assert(!__traits(compiles, bar0("hi")));
+
+alias foo1 = __traits(getOverloads, S, "foo", true)[1];
+alias bar1 = foo1!long;
+static assert(bar1("hi") == 1);
+static assert(!__traits(compiles, bar1(3)));
diff --git a/gcc/testsuite/gdc.test/compilable/test21058.d b/gcc/testsuite/gdc.test/compilable/test21058.d
new file mode 100644
index 0000000..8da9346
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21058.d
@@ -0,0 +1,25 @@
+struct A {
+ int foo(string s) { return 0; }
+}
+
+static assert(__traits(getOverloads, A.init, "foo")[0]("hi") == 0);
+static assert(__traits(getOverloads, A.init, "foo", true)[0]("hi") == 0);
+
+struct B {
+ int foo()(int i) { return 1; }
+ int foo(string s) { return 0; }
+}
+
+alias a = __traits(getOverloads, B.init, "foo", true);
+
+static assert(__traits(getOverloads, B.init, "foo")[0]("hi") == 0);
+static assert(__traits(getOverloads, B.init, "foo", true)[0]("hi") == 0);
+
+struct C {
+ static int foo()(int i) { return 1; }
+ int foo(string s) { return 0; }
+}
+
+static assert(__traits(getOverloads, C.init, "foo")[0]("hi") == 0);
+static assert(__traits(getOverloads, C.init, "foo", true)[0]("hi") == 0);
+static assert(__traits(getOverloads, C.init, "foo", true)[1](7) == 1);
diff --git a/gcc/testsuite/gdc.test/compilable/test21073.d b/gcc/testsuite/gdc.test/compilable/test21073.d
new file mode 100644
index 0000000..47d7881
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21073.d
@@ -0,0 +1,16 @@
+// https://issues.dlang.org/show_bug.cgi?id=21073
+
+class C
+{
+ auto internal() const
+ {
+ return 5;
+ }
+ alias internal this;
+}
+
+void main() pure
+{
+ const c = new C;
+ auto r = cast(C)c;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21227.d b/gcc/testsuite/gdc.test/compilable/test21227.d
new file mode 100644
index 0000000..29dd2af
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21227.d
@@ -0,0 +1,19 @@
+// REQUIRED_ARGS: -Jcompilable/imports
+// EXTRA_FILES: imports/test21227/a..b.txt imports/test21227/a.txt imports/test21227/..foo/a.txt
+
+// https://issues.dlang.org/show_bug.cgi?id=21227
+
+void bar(string x) {}
+void test21227()
+{
+ import("./test21227/a.txt").bar;
+ import("test21227//a..b.txt").bar;
+ import("test21227/..foo/a.txt").bar;
+
+ version(Windows)
+ {
+ import(r".\test21227\a.txt").bar;
+ import(r"test21227\\a..b.txt").bar;
+ import(r"test21227\..foo\a.txt").bar;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21255.d b/gcc/testsuite/gdc.test/compilable/test21255.d
new file mode 100644
index 0000000..99a4dfb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21255.d
@@ -0,0 +1,11 @@
+module test21255;
+
+void decodeA()(int i) { }
+void decodeB()(string s) { }
+
+alias decode = decodeA;
+alias decode = decodeB;
+
+void foo(alias A)() { A(1); A("hello"); }
+
+void main() { foo!decode; }
diff --git a/gcc/testsuite/gdc.test/compilable/test21282.d b/gcc/testsuite/gdc.test/compilable/test21282.d
new file mode 100644
index 0000000..761a6a6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21282.d
@@ -0,0 +1,15 @@
+/*
+TEST_OUTPUT:
+---
+tuple(func)
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=21282
+
+template I(T...) { alias I = T; }
+
+template Bug(T...) {
+ alias Bug = mixin("I!(T[0])");
+}
+void func() {}
+pragma(msg, Bug!func);
diff --git a/gcc/testsuite/gdc.test/compilable/test21299a.d b/gcc/testsuite/gdc.test/compilable/test21299a.d
index 049ee6a..3c6d8ec 100644
--- a/gcc/testsuite/gdc.test/compilable/test21299a.d
+++ b/gcc/testsuite/gdc.test/compilable/test21299a.d
@@ -1,4 +1,4 @@
-// EXTRA_SOURCES: imports/test21299/mtype.d imports/test21299/rootstringtable.d
+// EXTRA_SOURCES: imports/test21299/mtype.d imports/test21299/func.d imports/test21299/rootstringtable.d
// REQUIRED_ARGS: -main
// LINK
module test21299a;
diff --git a/gcc/testsuite/gdc.test/compilable/test21299b.d b/gcc/testsuite/gdc.test/compilable/test21299b.d
index b9d992a..9291c48 100644
--- a/gcc/testsuite/gdc.test/compilable/test21299b.d
+++ b/gcc/testsuite/gdc.test/compilable/test21299b.d
@@ -1,4 +1,4 @@
-// EXTRA_SOURCES: imports/test21299/func.d imports/test21299/rootstringtable.d
+// EXTRA_SOURCES: imports/test21299/mtype.d imports/test21299/func.d imports/test21299/rootstringtable.d
// REQUIRED_ARGS: -main
// LINK:
module test21299b;
diff --git a/gcc/testsuite/gdc.test/compilable/test21330.d b/gcc/testsuite/gdc.test/compilable/test21330.d
new file mode 100644
index 0000000..4abf367
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21330.d
@@ -0,0 +1,22 @@
+/*
+REQUIRED_ARGS: -unittest
+TEST_OUTPUT:
+---
+tuple(__unittest_L14_C5_1, __unittest_L14_C5_2)
+tuple(__unittest_L14_C5_2)
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=21330
+
+module test21330;
+
+mixin template Test() {
+ unittest {
+ }
+}
+
+mixin Test;
+mixin Test tm;
+
+pragma(msg, __traits(getUnitTests, test21330));
+pragma(msg, __traits(getUnitTests, tm));
diff --git a/gcc/testsuite/gdc.test/compilable/test21372.d b/gcc/testsuite/gdc.test/compilable/test21372.d
new file mode 100644
index 0000000..8d86721
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21372.d
@@ -0,0 +1,24 @@
+// REQUIRED_ARGS: -de
+struct S
+{
+ deprecated void foo(T)(int) { }
+ void foo(T)(string) { }
+}
+
+// just to be safe, check this order too
+// (there were some issues where naive checks of overloads were order dependent)
+struct T
+{
+ void foo(T)(string) { }
+ deprecated void foo(T)(int) { }
+}
+
+void main()
+{
+ // this should not hit the deprecation
+ // because the parameter type doesn't match it
+ S().foo!int("hi");
+
+ // likewise
+ T().foo!int("hi");
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21398.d b/gcc/testsuite/gdc.test/compilable/test21398.d
new file mode 100644
index 0000000..951bd91
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21398.d
@@ -0,0 +1,31 @@
+// https://issues.dlang.org/show_bug.cgi?id=21398
+
+module test21398;
+
+void free(void* ptr);
+
+class MAlloc(T)
+{
+ import test21398: free;
+
+ void free(T)(T* value)
+ {
+ free(value);
+ }
+}
+
+struct Box(T)
+{
+ private T* __ptr;
+ alias A = MAlloc!T;
+
+ ~this()
+ {
+ A.free(__ptr);
+ }
+}
+
+void main()
+{
+ auto b = Box!(char)();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21414.d b/gcc/testsuite/gdc.test/compilable/test21414.d
new file mode 100644
index 0000000..e8a201c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21414.d
@@ -0,0 +1,13 @@
+// https://issues.dlang.org/show_bug.cgi?id=21414
+
+struct State
+{
+ string s;
+
+ immutable this(string s)
+ {
+ this.s = s;
+ }
+}
+
+immutable rootState = new immutable State("b");
diff --git a/gcc/testsuite/gdc.test/compilable/test21438.d b/gcc/testsuite/gdc.test/compilable/test21438.d
new file mode 100644
index 0000000..02e2d8d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21438.d
@@ -0,0 +1,15 @@
+// https://issues.dlang.org/show_bug.cgi?id=21438
+
+int genGBPLookup() {
+ static struct Table {
+ int[1] entries;
+ }
+
+ auto table = new Table;
+ auto x = table.entries[0];
+
+ static assert(is(typeof(x) == int));
+ return 0;
+}
+
+enum x = genGBPLookup;
diff --git a/gcc/testsuite/gdc.test/compilable/test21464.d b/gcc/testsuite/gdc.test/compilable/test21464.d
new file mode 100644
index 0000000..752cb57
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21464.d
@@ -0,0 +1,7 @@
+// https://issues.dlang.org/show_bug.cgi?id=21464
+// EXTRA_FILES: imports/test21464a.d
+void foo() pure
+{
+ import imports.test21464a : Mallocator;
+ auto a = Mallocator.instance; // mutable static, but empty struct
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21514.d b/gcc/testsuite/gdc.test/compilable/test21514.d
new file mode 100644
index 0000000..4eb8050
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21514.d
@@ -0,0 +1,20 @@
+// https://issues.dlang.org/show_bug.cgi?id=21514
+// DISABLED: win32 win64
+/* TEST_OUTPUT:
+---
+compilable/test21514.d(16): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead
+compilable/test21514.d(16): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead
+compilable/test21514.d(17): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead
+compilable/test21514.d(17): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead
+compilable/test21514.d(19): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead
+compilable/test21514.d(19): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead
+compilable/test21514.d(20): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead
+compilable/test21514.d(20): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead
+---
+*/
+
+extern(C++) cdouble cpp_cadd1(cdouble c) { return c + 1; }
+extern(C++) creal cpp_cadd1l(creal c) { return c + 1; }
+
+cdouble cadd1(cdouble c) { return cpp_cadd1(c); }
+creal cadd1(creal c) { return cpp_cadd1l(c); }
diff --git a/gcc/testsuite/gdc.test/compilable/test21543.d b/gcc/testsuite/gdc.test/compilable/test21543.d
new file mode 100644
index 0000000..4914264
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21543.d
@@ -0,0 +1,116 @@
+// https://issues.dlang.org/show_bug.cgi?id=21543
+
+class B
+{
+ Nullable!B data;
+ alias data this;
+}
+
+void test1()
+{
+ B b;
+ Nullable!B n;
+}
+
+struct Nullable(T)
+{
+ T payload;
+
+ void opAssign()(T)
+ {
+ move(payload);
+ }
+
+ inout(T) get_() inout
+ {
+ return payload;
+ }
+
+ alias get_ this;
+}
+
+// another version with chain of 3 alias this
+
+struct C
+{
+ Nullable2 data;
+ alias data this;
+}
+
+void test2()
+{
+ C c;
+ Nullable2 n2 = &c;
+ Nullable3 n3 = &c;
+
+ // these are to check a sane -vcg-ast output
+ fn1(c);
+ fn1(n2);
+ fn1(n3);
+ fn2(c);
+ fn2(n2);
+ fn2(n3);
+ fn3(c);
+ fn3(n2);
+ fn3(n3);
+}
+
+void fn1(C x) {}
+
+void fn2(Nullable2 x) {}
+
+void fn3(Nullable3 x) {}
+
+struct Nullable2
+{
+ Nullable3 payload;
+
+ this(C* c)
+ {
+ payload = Nullable3(c);
+ }
+
+ void opAssign()(Nullable3)
+ {
+ move(payload);
+ }
+
+ inout(Nullable3) get_() inout
+ {
+ return payload;
+ }
+
+ alias get_ this;
+}
+
+struct Nullable3
+{
+ C* payload;
+
+ this(C* c)
+ {
+ payload = c;
+ }
+
+ void opAssign()(C)
+ {
+ move(payload);
+ }
+
+ inout(C) get_() inout
+ {
+ return *payload;
+ }
+
+ alias get_ this;
+}
+
+T move(T)(ref T source)
+{
+ return source;
+}
+
+T move(T)(T source)
+{
+ return source;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21591.d b/gcc/testsuite/gdc.test/compilable/test21591.d
new file mode 100644
index 0000000..54ffd15
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21591.d
@@ -0,0 +1,46 @@
+// https://issues.dlang.org/show_bug.cgi?id=21591
+
+alias F = void function();
+
+void fn1(void function(), void function());
+void fr1(F, F);
+static assert(fn1.mangleof == "_D9test215913fn1FPFZvQeZv");
+static assert(fr1.mangleof == "_D9test215913fr1FPFZvQeZv");
+
+void fn2(void function()*, void function()*);
+void fr2(F*, F*);
+static assert(fn2.mangleof == "_D9test215913fn2FPPFZvQfZv");
+static assert(fr2.mangleof == "_D9test215913fr2FPPFZvQfZv");
+
+void function() fn3(void function()**, void function()*);
+F fr3(F**, F*);
+static assert(fn3.mangleof == "_D9test215913fn3FPPPFZvQfZQh");
+static assert(fr3.mangleof == "_D9test215913fr3FPPPFZvQfZQh");
+
+void function()** fn4(ref void function(), ref void function()*);
+F** fr4(ref F, ref F*);
+static assert(fn4.mangleof == "_D9test215913fn4FKPFZvKPQgZPQf");
+static assert(fr4.mangleof == "_D9test215913fr4FKPFZvKPQgZPQf");
+
+
+alias D = void delegate();
+
+void dg1(void delegate(), void delegate());
+void dr1(D, D);
+static assert(dg1.mangleof == "_D9test215913dg1FDFZvQeZv");
+static assert(dr1.mangleof == "_D9test215913dr1FDFZvQeZv");
+
+void dg2(void delegate()*, void delegate()*);
+void dr2(D*, D*);
+static assert(dg2.mangleof == "_D9test215913dg2FPDFZvQfZv");
+static assert(dr2.mangleof == "_D9test215913dr2FPDFZvQfZv");
+
+void delegate() dg3(void delegate()**, void delegate()*);
+D dr3(D**, D*);
+static assert(dg3.mangleof == "_D9test215913dg3FPPDFZvQfZQh");
+static assert(dr3.mangleof == "_D9test215913dr3FPPDFZvQfZQh");
+
+void delegate()** dg4(ref void delegate(), ref void delegate()*);
+D** dr4(ref D, ref D*);
+static assert(dg4.mangleof == "_D9test215913dg4FKDFZvKPQgZPQf");
+static assert(dr4.mangleof == "_D9test215913dr4FKDFZvKPQgZPQf");
diff --git a/gcc/testsuite/gdc.test/compilable/test21659.d b/gcc/testsuite/gdc.test/compilable/test21659.d
new file mode 100644
index 0000000..28dfbca
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21659.d
@@ -0,0 +1,16 @@
+// https://issues.dlang.org/show_bug.cgi?id=21659
+
+// Compiler-recognized ident
+enum __c_ulonglong : ulong;
+
+private union EndianSwapper(T)
+{
+ T value;
+ ubyte[T.sizeof] array;
+ static assert(T.sizeof == ulong.sizeof);
+}
+
+void main ()
+{
+ EndianSwapper!(__c_ulonglong) val;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21661.d b/gcc/testsuite/gdc.test/compilable/test21661.d
new file mode 100644
index 0000000..f982d44
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21661.d
@@ -0,0 +1,24 @@
+// https://issues.dlang.org/show_bug.cgi?id=21661
+
+module pkg.pkg2.mod;
+
+immutable x = 1;
+enum e = pkg.pkg2.mod.x;
+
+// Some checks
+static assert( pkg.stringof == "package pkg" );
+static assert( pkg.pkg2.stringof == "package pkg2");
+static assert( pkg.pkg2.mod.stringof == "module mod" );
+static assert(pkg.pkg2.mod.x.stringof == "x" );
+
+alias p1 = pkg;
+alias p2 = pkg.pkg2;
+alias m = pkg.pkg2.mod;
+alias v = pkg.pkg2.mod.x;
+
+static assert( p1.stringof == "package pkg" );
+static assert( p2.stringof == "package pkg2");
+static assert( m.stringof == "module mod" );
+static assert(p1.pkg2.mod.stringof == "module mod" );
+static assert( p2.mod.stringof == "module mod" );
+static assert( v.stringof == "x" );
diff --git a/gcc/testsuite/gdc.test/compilable/test21668.d b/gcc/testsuite/gdc.test/compilable/test21668.d
new file mode 100644
index 0000000..a7c301a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21668.d
@@ -0,0 +1,7 @@
+// https://issues.dlang.org/show_bug.cgi?id=21668
+
+struct Opaque;
+
+void byPtr(Opaque*) {}
+void byRef(ref Opaque) {} // Fails
+void bySlice(Opaque[]) {}
diff --git a/gcc/testsuite/gdc.test/compilable/test21680.d b/gcc/testsuite/gdc.test/compilable/test21680.d
new file mode 100644
index 0000000..caa4df4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21680.d
@@ -0,0 +1,9 @@
+// https://issues.dlang.org/show_bug.cgi?id=21680
+
+struct Unique
+{
+ alias ValueType = typeof({ return field; }()); /* Error: need `this` for
+`field` of type `int` */
+ int field;
+ static assert(is(ValueType == int));
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21719.d b/gcc/testsuite/gdc.test/compilable/test21719.d
new file mode 100644
index 0000000..9d444e1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21719.d
@@ -0,0 +1,21 @@
+// https://issues.dlang.org/show_bug.cgi?id=21719
+
+struct S
+{
+ auto f()
+ {
+ } // inferred to be @safe @nogc pure nothrow
+}
+
+class C
+{
+ auto f() // should also infer the same attributes
+ {
+ }
+}
+
+pure @nogc nothrow @safe void test(S s, C c)
+{
+ s.f;
+ c.f;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21743.d b/gcc/testsuite/gdc.test/compilable/test21743.d
new file mode 100644
index 0000000..dc3b709
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21743.d
@@ -0,0 +1,16 @@
+// https://issues.dlang.org/show_bug.cgi?id=21743
+
+struct A
+{
+ int foo(int a) { return a; }
+ string foo()(string b) { return b; }
+}
+
+alias ov = __traits(getOverloads, A.init, "foo", true);
+
+// member function works
+static assert(ov[0](1) == 1);
+
+// member template used to fail with the gagged error:
+// 'need this for foo of type pure nothrow @nogc @safe string(string b)'
+static assert(ov[1]("a") == "a");
diff --git a/gcc/testsuite/gdc.test/compilable/test21753.d b/gcc/testsuite/gdc.test/compilable/test21753.d
new file mode 100644
index 0000000..91ccc20
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21753.d
@@ -0,0 +1,21 @@
+// https://issues.dlang.org/show_bug.cgi?id=21753
+
+struct Sample {
+ int function() func1;
+ int function() func2;
+}
+
+void noth(Sample smpl)() {
+ static assert(smpl.func1() == 0);
+ static assert(smpl.func2() == 1);
+}
+
+void main() {
+ enum s = Sample(
+ { return 0; },
+ { return 1; }
+ );
+ static assert(s.func1() == 0);
+ static assert(s.func2() == 1);
+ noth!(s)();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21794.d b/gcc/testsuite/gdc.test/compilable/test21794.d
new file mode 100644
index 0000000..68e504b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21794.d
@@ -0,0 +1,52 @@
+// https://issues.dlang.org/show_bug.cgi?id=21794
+/*
+TEST_OUTPUT:
+---
+0
+0u
+0L
+0LU
+0.0F
+0.0
+0.0L
+---
+*/
+
+bool fun(void* p) {
+ const x = cast(ulong)p;
+ return 1;
+}
+
+static assert(fun(null));
+
+T fun2(T)(void* p) {
+ const x = cast(T)p;
+ return x;
+}
+
+// These were an error before, they were returning a NullExp instead of IntegerExp/RealExp
+
+static assert(fun2!int(null) == 0);
+static assert(fun2!uint(null) == 0);
+static assert(fun2!long(null) == 0);
+static assert(fun2!ulong(null) == 0);
+static assert(fun2!float(null) == 0);
+static assert(fun2!double(null) == 0);
+static assert(fun2!real(null) == 0);
+
+// These were printing 'null' instead of the corresponding number
+
+const i = cast(int)null;
+const ui = cast(uint)null;
+const l = cast(long)null;
+const ul = cast(ulong)null;
+const f = cast(float)null;
+const d = cast(double)null;
+const r = cast(real)null;
+pragma(msg, i);
+pragma(msg, ui);
+pragma(msg, l);
+pragma(msg, ul);
+pragma(msg, f);
+pragma(msg, d);
+pragma(msg, r);
diff --git a/gcc/testsuite/gdc.test/compilable/test21802.d b/gcc/testsuite/gdc.test/compilable/test21802.d
new file mode 100644
index 0000000..dc65a14
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21802.d
@@ -0,0 +1,38 @@
+// https://issues.dlang.org/show_bug.cgi?id=21802
+
+struct A
+{
+ auto opAssign(lazy void foo)
+ {
+ foo();
+ }
+ auto opOpAssign(string op)(lazy void foo)
+ {
+ foo();
+ }
+}
+
+class C
+{
+ auto opAssign(lazy void foo)
+ {
+ foo();
+ }
+ auto opOpAssign(string op)(lazy void foo)
+ {
+ foo();
+ }
+}
+
+void bar(int x) { }
+
+void main ()
+{
+ A a;
+ a ~= bar (1); // OK
+ a = bar (1); // Error: expression bar(1) is void and has no value
+
+ C c = new C;
+ c ~= bar(1);
+ c = bar(1);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21806.d b/gcc/testsuite/gdc.test/compilable/test21806.d
new file mode 100644
index 0000000..4b7a159
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21806.d
@@ -0,0 +1,24 @@
+// https://issues.dlang.org/show_bug.cgi?id=21806
+
+void main()
+{
+ ubyte[16] arr;
+ static assert(is(typeof( fun(arr[])) == char));
+ static assert(is(typeof(funtp(arr[])) == char));
+ static assert(is(typeof( bar(arr[])) == char));
+}
+
+// functions
+char fun(ubyte[] arr) { return 'X'; }
+
+int fun(ubyte[16] arr) { return 123; }
+
+// function templates
+char funtp()(ubyte[] arr) { return 'X'; }
+
+int funtp(size_t N)(ubyte[N] arr) { return 123; }
+
+// original case with 'in'
+char bar()(in ubyte[] arr) { return 'X'; }
+
+int bar(size_t N)(in ubyte[N] arr) { return 123; }
diff --git a/gcc/testsuite/gdc.test/compilable/test21828.d b/gcc/testsuite/gdc.test/compilable/test21828.d
new file mode 100644
index 0000000..06a67ca
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21828.d
@@ -0,0 +1,27 @@
+// https://issues.dlang.org/show_bug.cgi?id=21828
+
+struct S
+{
+ enum E
+ {
+ e1 = 0,
+ }
+ E e;
+ enum S s1 = S(E.e1);
+}
+
+SE se;
+
+enum SE
+{
+ e1 = S.s1
+}
+
+// reduced case, forward references just assume int value
+
+E e;
+
+enum E
+{
+ a = "x"
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21830.d b/gcc/testsuite/gdc.test/compilable/test21830.d
new file mode 100644
index 0000000..d1ead01
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21830.d
@@ -0,0 +1,25 @@
+// REQUIRED_ARGS: -de -unittest
+
+deprecated struct OldS21830 { }
+
+struct NewS21830 { }
+
+static if (1)
+{
+ auto test21830(T)(T t)
+ if (is(T == NewS21830))
+ {
+ return T.init;
+ }
+}
+
+deprecated auto test21830(T)(T t)
+if (is(T == OldS21830))
+{
+ return T.init;
+}
+
+unittest
+{
+ auto b = test21830(NewS21830()); // error here about using test21830!OldS21830
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21831.d b/gcc/testsuite/gdc.test/compilable/test21831.d
new file mode 100644
index 0000000..aaae135
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21831.d
@@ -0,0 +1,20 @@
+// REQUIRED_ARGS: -de -unittest
+
+deprecated struct S21831 { }
+
+auto test21831(T)(T t) // error: struct `S21831` is deprecated
+if (!__traits(isDeprecated, T))
+{
+ return T.init;
+}
+
+deprecated auto test21831(T)(T t)
+if (__traits(isDeprecated, T))
+{
+ return T.init;
+}
+
+deprecated unittest
+{
+ auto b = test21831(S21831()); // instantiated from here
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21832.d b/gcc/testsuite/gdc.test/compilable/test21832.d
new file mode 100644
index 0000000..e034f2c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21832.d
@@ -0,0 +1,13 @@
+// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/imp21832.d
+int test21832a()
+{
+ import imports.imp21832 : fun; // function 'fun' is deprecated
+ return fun(0);
+}
+
+int test21832b()
+{
+ import imports.imp21832 : tpl; // template 'tpl' is deprecated
+ return tpl(0);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21850.d b/gcc/testsuite/gdc.test/compilable/test21850.d
new file mode 100644
index 0000000..e7fe2d4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21850.d
@@ -0,0 +1,35 @@
+// https://issues.dlang.org/show_bug.cgi?id=21850
+
+struct Strukt2 {
+ this(int* _block) { }
+}
+
+struct Strukt {
+ int* block;
+ Strukt2 foo() { return Strukt2(null); }
+ alias foo this;
+}
+
+bool wrapper(T)(ref T a, ref T b)
+{
+ return doesPointTo(a, b);
+}
+
+void johan() pure {
+ Strukt a;
+ Strukt b;
+ assert(wrapper(a, b)); // error wrapper is not pure
+ assert(doesPointTo(a, b)); // fine
+}
+
+bool doesPointTo(S, T)(S , T) {
+ return false;
+}
+
+bool doesPointTo(S)(shared S) {
+ return false;
+}
+
+bool mayPointTo(){
+ return false;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test21861.d b/gcc/testsuite/gdc.test/compilable/test21861.d
new file mode 100644
index 0000000..875636b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21861.d
@@ -0,0 +1,38 @@
+// https://issues.dlang.org/show_bug.cgi?id=21861
+
+int f() {
+ @("S")
+ struct S {}
+
+ @("U")
+ union U {}
+
+ @("C")
+ class C {}
+
+ // OK <- CTFE fails on this:
+ @("E")
+ enum E { X }
+
+ // OK <- CTFE fails on this:
+ @("f")
+ int f(int x) { return x + 2; }
+
+ // OK <- CTFE fails on this:
+ @(&f) int a;
+ @(1) @(2) int b = 4, c;
+ @(3) extern(C) int d = 3;
+
+ enum uda1 = __traits(getAttributes, a);
+ enum uda2 = __traits(getAttributes, b);
+ enum uda3 = __traits(getAttributes, c);
+
+ // These are to trigger a compiler assert if parser is updated in the future
+ static assert(!__traits(compiles, mixin("{ @(1) { int x; int y; } }")));
+ static assert(!__traits(compiles, mixin("{ @(1): int x; int y; }")));
+
+ // 3+2 1 2 4 1 3
+ return uda1[0](3) + uda2[0] + uda2[1] + b + uda3[0] + d;
+}
+
+static assert(f() == 16);
diff --git a/gcc/testsuite/gdc.test/compilable/test21876.d b/gcc/testsuite/gdc.test/compilable/test21876.d
new file mode 100644
index 0000000..a0cef99
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test21876.d
@@ -0,0 +1,17 @@
+// https://issues.dlang.org/show_bug.cgi?id=21876
+
+auto test1()
+{
+ int[0] a;
+ return a;
+}
+
+auto test2()
+{
+ static int[0] a;
+ return a;
+}
+
+enum x = test1();
+enum y = test2();
+static assert(x == y && y == []);
diff --git a/gcc/testsuite/gdc.test/compilable/test22122.d b/gcc/testsuite/gdc.test/compilable/test22122.d
new file mode 100644
index 0000000..a06d06c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22122.d
@@ -0,0 +1,53 @@
+// EXTRA_FILES: imports/imp22122.d
+module imports.test22122;
+
+struct S22122
+{
+ import imports.imp22122;
+ Variant!(Imp22122)[] array;
+}
+
+void test22122_catch(S22122 s)
+{
+ try
+ {
+ foreach(elem; s.array)
+ {
+ import imports.imp22122;
+ with(elem.get!Imp22122)
+ {
+ }
+ }
+ }
+ catch (Exception)
+ {
+ }
+}
+
+void test22122_finally(S22122 s)
+{
+ try
+ {
+ foreach(elem; s.array)
+ {
+ import imports.imp22122;
+ with(elem.get!Imp22122)
+ {
+ }
+ }
+ }
+ finally
+ {
+ }
+}
+
+private struct Variant(T)
+{
+ union Impl
+ {
+ }
+ auto get(E)()
+ {
+ return Impl();
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test22214.d b/gcc/testsuite/gdc.test/compilable/test22214.d
new file mode 100644
index 0000000..d218125
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22214.d
@@ -0,0 +1,16 @@
+// https://issues.dlang.org/show_bug.cgi?id=22214
+
+struct S
+{
+ struct T
+ {
+ }
+}
+
+void main() {
+ const S s;
+ static if (__traits(compiles, { auto t = s.T; }))
+ {
+ auto t = s.T;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test22224.d b/gcc/testsuite/gdc.test/compilable/test22224.d
new file mode 100644
index 0000000..d16b2f40
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22224.d
@@ -0,0 +1,4 @@
+// REQUIRED_ARGS: -profile -c
+
+import core.stdc.stdarg;
+void error(...) { }
diff --git a/gcc/testsuite/gdc.test/compilable/test22226.d b/gcc/testsuite/gdc.test/compilable/test22226.d
new file mode 100644
index 0000000..77b3797
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22226.d
@@ -0,0 +1,15 @@
+// https://issues.dlang.org/show_bug.cgi?id=22226
+
+struct A {}
+
+A move(A a) { return A.init; }
+
+struct SumType
+{
+ A a;
+
+ this(A value)
+ {
+ a = __ctfe ? value : move(value);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test22228.d b/gcc/testsuite/gdc.test/compilable/test22228.d
new file mode 100644
index 0000000..ef31b4b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22228.d
@@ -0,0 +1,11 @@
+// https://issues.dlang.org/show_bug.cgi?id=22228
+// Note: fixed by reverting pull #11545
+
+auto f()
+{ immutable int i;
+ auto p = (() => &i)();
+
+ return 0;
+}
+
+enum ctfeInvocation = f;
diff --git a/gcc/testsuite/gdc.test/compilable/test22254.d b/gcc/testsuite/gdc.test/compilable/test22254.d
new file mode 100644
index 0000000..94f6596a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22254.d
@@ -0,0 +1,19 @@
+// https://issues.dlang.org/show_bug.cgi?id=22254
+
+struct Template(T) { T t; }
+
+Template!Bar a;
+Template!Bar b;
+
+immutable struct Bar { }
+
+static assert(is(typeof(a) == typeof(b)));
+static assert(is(typeof(a) == Template!(immutable Bar)));
+
+Template!C c1;
+Template!C c2;
+
+immutable class C { }
+
+static assert(is(typeof(c1) == typeof(c2)));
+static assert(is(typeof(c1) == Template!(immutable C)));
diff --git a/gcc/testsuite/gdc.test/compilable/test22292.d b/gcc/testsuite/gdc.test/compilable/test22292.d
new file mode 100644
index 0000000..945dffb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22292.d
@@ -0,0 +1,155 @@
+// https://issues.dlang.org/show_bug.cgi?id=22292
+
+// Original case
+
+class C1
+{
+ C1 c1;
+ this () pure
+ {
+ c1 = this;
+ }
+}
+immutable x = cast(immutable)r;
+
+auto r()
+{
+ C1 c1 = new C1;
+ return c1;
+}
+
+// Reference stored in another class
+
+template Test2()
+{
+ class C1
+ {
+ C2 c2;
+ this () pure
+ {
+ C1 a = this;
+ c2 = new C2(a);
+ }
+ }
+ class C2
+ {
+ C1 c1;
+ this (C1 c) pure
+ {
+ c1 = c;
+ }
+ }
+ immutable x = cast(immutable)r;
+
+ auto r()
+ {
+ C1 c1 = new C1();
+ return c1;
+ }
+}
+
+alias test2 = Test2!();
+
+// Ditto but using a struct in the middle
+
+template Test3()
+{
+ class C0
+ {
+ S1 s1;
+
+ this()
+ {
+ s1 = S1(this);
+ }
+ }
+ struct S1
+ {
+ C1 c1;
+ this (C0 c)
+ {
+ c1 = new C1(c);
+ }
+ }
+ class C1
+ {
+ C0 c0;
+ this(C0 c)
+ {
+ c0 = c;
+ }
+ }
+ immutable x = cast(immutable)r;
+
+ auto r()
+ {
+ C0 c0 = new C0();
+ return c0;
+ }
+}
+
+alias test3 = Test3!();
+
+// From https://issues.dlang.org/show_bug.cgi?id=22114
+
+template Test4()
+{
+ public class Test1(T)
+ {
+ private Test2!T val;
+
+ this()
+ {
+ val = new Test2!T(this);
+ }
+
+ private class Test2(T)
+ {
+ private Test1!(T) m_source;
+
+ this(Test1!T source)
+ {
+ m_source = source;
+ }
+ }
+ }
+
+ public class Demo
+ {
+ auto val = new Test1!int();
+ }
+}
+
+alias test4 = Test4!();
+
+// ditto
+
+template Test5()
+{
+ public @nogc class TestA(T)
+ {
+ private TestB!T valA;
+ private TestB!T valB;
+ this()
+ {
+ valB = valA = new TestB!T(this);
+ }
+
+ private @nogc class TestB(T)
+ {
+ private TestA!(T) m_source;
+
+ this(TestA!T source)
+ {
+ m_source = source;
+ }
+ }
+ }
+
+ public class Demo
+ {
+ auto val = new TestA!int();
+ }
+}
+
+alias test5 = Test5!();
diff --git a/gcc/testsuite/gdc.test/compilable/test22388.d b/gcc/testsuite/gdc.test/compilable/test22388.d
new file mode 100644
index 0000000..cf8c3fc
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22388.d
@@ -0,0 +1,22 @@
+// https://issues.dlang.org/show_bug.cgi?id=22388
+
+void setTimer(void delegate()) @system;
+void setTimer(void delegate() @safe) @safe;
+
+void setTimer2(void delegate() @safe) @safe;
+void setTimer2(void delegate()) @system;
+
+void main() @safe
+{
+ setTimer(() => assert(false));
+
+ alias lambda = () => assert(false);
+ setTimer(lambda);
+
+ // Reversed order
+
+ setTimer2(() => assert(false));
+
+ alias lambda2 = () => assert(false);
+ setTimer2(lambda2);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test22410.d b/gcc/testsuite/gdc.test/compilable/test22410.d
new file mode 100644
index 0000000..7e631b7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22410.d
@@ -0,0 +1,59 @@
+// https://issues.dlang.org/show_bug.cgi?id=22410
+
+alias A(T...) = T;
+
+void fun0(const A!(int, string) x = A!(1, "asdf"))
+{
+ static assert(is(typeof(x) == A!(const int, const string)));
+}
+
+void fun1(const A!(immutable int, string) x = A!(1, "asdf"))
+{
+ static assert(is(typeof(x) == A!(immutable int, const string)));
+}
+
+void fun2(shared A!(int, string) x = A!(1, "asdf"))
+{
+ static assert(is(typeof(x) == A!(shared int, shared string)));
+}
+
+void fun3(shared const A!(int, string) x = A!(1, "asdf"))
+{
+ static assert(is(typeof(x) == A!(shared const int, shared const string)));
+}
+
+void fun4(inout A!(int, const string) x = A!(1, "asdf"))
+{
+ static assert(is(typeof(x) == A!(inout int, inout const string)));
+}
+
+void fun5(ref const A!(int, string) x = A!(1, "asdf"))
+{
+ static assert(is(typeof(x) == A!(const int, const string)));
+ static assert(__traits(isRef, x[0]) && __traits(isRef, x[1]));
+}
+
+// Implicitly conversion is also fixed, for example:
+// from (ulong, double) to (int, float)
+
+// Integral narrowing here, ulong(uint.max + 1UL) would fail.
+void fun10(A!(uint, float) x = A!(ulong(uint.max), 3.14))
+{
+ static assert(is(typeof(x) == A!(uint, float)));
+}
+
+void fun11(A!(int, double) x = A!(byte(1), 2.5f))
+{
+ static assert(is(typeof(x) == A!(int, double)));
+}
+
+void fun12(A!(byte, float) x = A!(1, 'a'))
+{
+ static assert(is(typeof(x) == A!(byte, float)));
+}
+
+A!(const int, shared char) tup = A!(1, 'a');
+void fun13(A!(byte, float) x = tup)
+{
+ static assert(is(typeof(x) == A!(byte, float)));
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test22420.d b/gcc/testsuite/gdc.test/compilable/test22420.d
new file mode 100644
index 0000000..c18d0a9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22420.d
@@ -0,0 +1,88 @@
+// https://issues.dlang.org/show_bug.cgi?id=22420
+
+struct File
+{
+ ~this()
+ {
+ }
+ File impl()
+ {
+ return File.init;
+ }
+ alias impl this;
+}
+struct Variable
+{
+ this(File)(File) { }
+ this(File)(File[]) { }
+}
+Variable wrapFunctionReturn(alias handler)(Variable params)
+{
+ return Variable(handler(params));
+}
+void registerFile()
+{
+ wrapFunctionReturn!((Variable) {
+ return File.init;
+ })(Variable.init);
+}
+
+// Reduction from an 'automem' test
+
+struct Issue156 {}
+
+void test2()
+{
+ RefCounted!Issue156 s;
+ auto r1 = repeat(s);
+ zip(r1);
+}
+
+struct RefCounted(RefCountedType)
+{
+ ~this() {}
+ alias _impl this;
+
+ struct Impl {}
+ alias ImplType = Impl;
+
+ private ImplType* _impl;
+
+}
+template Tuple(Specs)
+{
+ struct Tuple
+ {
+ this(U)(U) {}
+ this()(int) {}
+ }
+}
+
+template ElementType(R)
+{
+ static if (is(typeof(R.init) T))
+ alias ElementType = T;
+}
+
+struct Repeat(T)
+{
+ inout(T) front() inout {assert(0);}
+}
+
+Repeat!T repeat(T)(T ) {assert(0);}
+
+auto zip(Ranges)(Ranges )
+{
+ return ZipShortest!Ranges();
+}
+
+struct ZipShortest(Ranges...)
+{
+ Ranges ranges;
+ alias ElementType = Tuple!(.ElementType!(Ranges[0]));
+
+ ElementType front()
+ {
+ return typeof(return)(ranges[0].front);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test22421.d b/gcc/testsuite/gdc.test/compilable/test22421.d
new file mode 100644
index 0000000..902646d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22421.d
@@ -0,0 +1,19 @@
+// https://issues.dlang.org/show_bug.cgi?id=22421
+
+alias AliasSeq(T...) = T;
+
+template staticMap(alias fun, args...)
+{
+ alias staticMap = AliasSeq!();
+ static foreach(arg; args)
+ staticMap = AliasSeq!(staticMap, fun!arg);
+}
+
+template id(alias what)
+{
+ enum id = __traits(identifier, what);
+}
+
+enum A { a }
+
+static assert(staticMap!(id, A.a) == AliasSeq!("a"));
diff --git a/gcc/testsuite/gdc.test/compilable/test22510.d b/gcc/testsuite/gdc.test/compilable/test22510.d
new file mode 100644
index 0000000..af5d0a4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22510.d
@@ -0,0 +1,18 @@
+// https://issues.dlang.org/show_bug.cgi?id=22510
+
+struct S
+{
+ int b;
+
+ @disable this(this);
+ this (scope ref inout S) inout
+ {
+ this.b = b;
+ }
+}
+
+void main()
+{
+ auto scoped_s = S(4);
+ auto heap_s = new S(42);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test22593.d b/gcc/testsuite/gdc.test/compilable/test22593.d
new file mode 100644
index 0000000..2091294
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22593.d
@@ -0,0 +1,13 @@
+// https://issues.dlang.org/show_bug.cgi?id=22593
+
+struct Foo(T){
+ this(Rhs, this This)(scope Rhs rhs){
+ }
+
+ this(ref scope typeof(this) rhs){
+ }
+}
+
+struct Bar{
+ Foo!int foo;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test25.d b/gcc/testsuite/gdc.test/compilable/test25.d
index 42fc814..449159c 100644
--- a/gcc/testsuite/gdc.test/compilable/test25.d
+++ b/gcc/testsuite/gdc.test/compilable/test25.d
@@ -1,10 +1,10 @@
// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/test25a.d imports/test25b.d
import imports.test25a, imports.test25b;
-import std.stdio;
+import core.stdc.stdio;
void main()
{
- std.stdio.writefln("hello");
+ printf("hello\n");
}
diff --git a/gcc/testsuite/gdc.test/compilable/test2991.d b/gcc/testsuite/gdc.test/compilable/test2991.d
index 61281b8..12cdb2f8 100644
--- a/gcc/testsuite/gdc.test/compilable/test2991.d
+++ b/gcc/testsuite/gdc.test/compilable/test2991.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/test2991.d
module test2991;
void foo()
diff --git a/gcc/testsuite/gdc.test/compilable/test3004.d b/gcc/testsuite/gdc.test/compilable/test3004.d
new file mode 100644
index 0000000..baa0cd7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test3004.d
@@ -0,0 +1,19 @@
+// https://issues.dlang.org/show_bug.cgi?id=3004
+/*
+REQUIRED_ARGS: -ignore -v
+TRANSFORM_OUTPUT: remove_lines("^(predefs|binary|version|config|DFLAG|parse|import|semantic|entry|function object|\s*$)")
+TEST_OUTPUT:
+---
+pragma GNU_attribute (__error)
+pragma GNU_attribute (__error)
+code test3004
+function test3004.test
+---
+*/
+
+extern(C) int printf(char*, ...);
+
+pragma(GNU_attribute, flatten)
+void test() { printf("Hello GNU world!\n".dup.ptr); }
+
+pragma(GNU_attribute, flatten);
diff --git a/gcc/testsuite/gdc.test/compilable/test313a.d b/gcc/testsuite/gdc.test/compilable/test313a.d
index daa6afb..5ec0211 100644
--- a/gcc/testsuite/gdc.test/compilable/test313a.d
+++ b/gcc/testsuite/gdc.test/compilable/test313a.d
@@ -1,5 +1,6 @@
/*
REQUIRED_ARGS: -de
+EXTRA_FILES: imports/a313.d imports/a313templatemixin1.d imports/a313templatemixin2.d imports/b313.d imports/pkg313/c313.d
*/
module test313;
diff --git a/gcc/testsuite/gdc.test/compilable/test313c.d b/gcc/testsuite/gdc.test/compilable/test313c.d
index 3b075bd..0110f62 100644
--- a/gcc/testsuite/gdc.test/compilable/test313c.d
+++ b/gcc/testsuite/gdc.test/compilable/test313c.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/pkgmod313/mod.d imports/pkgmod313/package.d
import imports.pkgmod313;
void test()
diff --git a/gcc/testsuite/gdc.test/compilable/test313d.d b/gcc/testsuite/gdc.test/compilable/test313d.d
index 7545d80..903cedf 100644
--- a/gcc/testsuite/gdc.test/compilable/test313d.d
+++ b/gcc/testsuite/gdc.test/compilable/test313d.d
@@ -1,5 +1,6 @@
// first imported as package
-// EXTRA_SOURCES: imports/pkgmod313/mod.d
+// COMPILED_IMPORTS: imports/pkgmod313/mod.d
+// EXTRA_FILES: imports/pkgmod313/package.d
// REQUIRED_ARGS: -de
import imports.pkgmod313; // then as package module
diff --git a/gcc/testsuite/gdc.test/compilable/test313e.d b/gcc/testsuite/gdc.test/compilable/test313e.d
index b24f24e..9ed8992 100644
--- a/gcc/testsuite/gdc.test/compilable/test313e.d
+++ b/gcc/testsuite/gdc.test/compilable/test313e.d
@@ -1,5 +1,5 @@
// first resolved as package, then created as module (with name package)
-// EXTRA_SOURCES: imports/pkgmod313/mod.d imports/pkgmod313/package.d
+// COMPILED_IMPORTS: imports/pkgmod313/mod.d imports/pkgmod313/package.d
// REQUIRED_ARGS: -de
import imports.pkgmod313; // then imported as package module
diff --git a/gcc/testsuite/gdc.test/compilable/test313f.d b/gcc/testsuite/gdc.test/compilable/test313f.d
index e758e37..c8ec63d 100644
--- a/gcc/testsuite/gdc.test/compilable/test313f.d
+++ b/gcc/testsuite/gdc.test/compilable/test313f.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/f313.d
import imports.f313;
void test()
diff --git a/gcc/testsuite/gdc.test/compilable/test313g.d b/gcc/testsuite/gdc.test/compilable/test313g.d
index f205214..91e320d 100644
--- a/gcc/testsuite/gdc.test/compilable/test313g.d
+++ b/gcc/testsuite/gdc.test/compilable/test313g.d
@@ -1,5 +1,6 @@
// REQUIRED_ARGS: -de
-// EXTRA_SOURCES: imports/g313.d
+// COMPILED_IMPORTS: imports/g313.d
+// EXTRA_FILES: imports/g313public.d imports/g313staticif.d imports/g313stringmixin.d imports/g313templatemixin.d
import imports.g313;
void test15900()
diff --git a/gcc/testsuite/gdc.test/compilable/test314.d b/gcc/testsuite/gdc.test/compilable/test314.d
index b7c15e3..0435228 100644
--- a/gcc/testsuite/gdc.test/compilable/test314.d
+++ b/gcc/testsuite/gdc.test/compilable/test314.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/a314.d imports/c314.d
module imports.test314; // package imports
import imports.a314;
diff --git a/gcc/testsuite/gdc.test/compilable/test318.d b/gcc/testsuite/gdc.test/compilable/test318.d
new file mode 100644
index 0000000..fd3cabe
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test318.d
@@ -0,0 +1,19 @@
+// LINK:
+// PERMUTE_ARGS: -version=C_Main
+
+version (C_Main)
+{
+ // Fine, infers int
+ extern(C) auto main(int argc, const char** argv)
+ {
+ return argc;
+ }
+}
+else
+{
+ // Fine, infers void
+ auto main()
+ {
+
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test3775.d b/gcc/testsuite/gdc.test/compilable/test3775.d
index 47b9b88..a34b329 100644
--- a/gcc/testsuite/gdc.test/compilable/test3775.d
+++ b/gcc/testsuite/gdc.test/compilable/test3775.d
@@ -1,4 +1,4 @@
-// 3775
+// https://issues.dlang.org/show_bug.cgi?id=3775
struct Bug3775 {
static int byLine()() { return 1; }
diff --git a/gcc/testsuite/gdc.test/compilable/test4003.d b/gcc/testsuite/gdc.test/compilable/test4003.d
index 8a401f2..f51310e 100644
--- a/gcc/testsuite/gdc.test/compilable/test4003.d
+++ b/gcc/testsuite/gdc.test/compilable/test4003.d
@@ -1,4 +1,5 @@
-// EXTRA_SOURCES: imports/test4003a.d
+// COMPILED_IMPORTS: imports/test4003a.d
+// EXTRA_FILES: imports/stdio4003.d imports/typecons4003.d
// PERMUTE_ARGS:
import imports.stdio4003;
diff --git a/gcc/testsuite/gdc.test/compilable/test4090.d b/gcc/testsuite/gdc.test/compilable/test4090.d
index 8f8f7c9..0e785cf 100644
--- a/gcc/testsuite/gdc.test/compilable/test4090.d
+++ b/gcc/testsuite/gdc.test/compilable/test4090.d
@@ -12,9 +12,6 @@ void test4090a()
// inference + qualifier + ref
foreach ( ref x; arr) static assert(is(typeof(x) == int));
foreach ( const ref x; arr) static assert(is(typeof(x) == const int));
- static assert(!__traits(compiles, {
- foreach (immutable ref x; arr) {}
- }));
// with exact type + qualifier
foreach ( int x; arr) static assert(is(typeof(x) == int));
@@ -24,25 +21,11 @@ void test4090a()
// with exact type + qualifier + ref
foreach ( ref int x; arr) static assert(is(typeof(x) == int));
foreach ( const ref int x; arr) static assert(is(typeof(x) == const int));
- static assert(!__traits(compiles, {
- foreach (immutable ref int x; arr) {}
- }));
// convertible type + qualifier
foreach ( double x; arr) static assert(is(typeof(x) == double));
foreach ( const double x; arr) static assert(is(typeof(x) == const double));
foreach (immutable double x; arr) static assert(is(typeof(x) == immutable double));
-
- // convertible type + qualifier + ref
- static assert(!__traits(compiles, {
- foreach ( ref double x; arr) {}
- }));
- static assert(!__traits(compiles, {
- foreach ( const ref double x; arr) {}
- }));
- static assert(!__traits(compiles, {
- foreach (immutable ref double x; arr) {}
- }));
}
// for the immutable elements
{
diff --git a/gcc/testsuite/gdc.test/compilable/test4375.d b/gcc/testsuite/gdc.test/compilable/test4375.d
index 234895e..f5c4e4a 100644
--- a/gcc/testsuite/gdc.test/compilable/test4375.d
+++ b/gcc/testsuite/gdc.test/compilable/test4375.d
@@ -1,5 +1,6 @@
// REQUIRED_ARGS: -unittest
-// 4375: disallow dangling else
+// https://issues.dlang.org/show_bug.cgi?id=4375
+// disallow dangling else
void main() {
@@ -368,7 +369,7 @@ class C {
else
assert(63);
}
- body {
+ do {
if (true)
assert(64);
else
diff --git a/gcc/testsuite/gdc.test/compilable/test50.d b/gcc/testsuite/gdc.test/compilable/test50.d
index f05c3e4..a5dfac0 100644
--- a/gcc/testsuite/gdc.test/compilable/test50.d
+++ b/gcc/testsuite/gdc.test/compilable/test50.d
@@ -1,4 +1,4 @@
-// EXTRA_SOURCES: imports/test50a.d
+// COMPILED_IMPORTS: imports/test50a.d
// PERMUTE_ARGS:
import imports.test50a;
diff --git a/gcc/testsuite/gdc.test/compilable/test5227.d b/gcc/testsuite/gdc.test/compilable/test5227.d
index 63ca752..b713191 100644
--- a/gcc/testsuite/gdc.test/compilable/test5227.d
+++ b/gcc/testsuite/gdc.test/compilable/test5227.d
@@ -11,17 +11,19 @@ log2()
log10()
0.740363L
round()
-6.00000L
+6.0L
floor()
-5.00000F
-5.00000
-5.00000L
+5.0F
+5.0
+5.0L
ceil()
-6.00000F
-6.00000
-6.00000L
+6.0F
+6.0
+6.0L
trunc()
-5.00000L
+5.0L
+exp()
+244.692L
expm1()
243.692L
exp2()
@@ -83,6 +85,11 @@ enum truncf = trunc(5.5f); //pragma(msg, truncf);
enum truncd = trunc(5.5 ); //pragma(msg, truncd);
enum truncr = trunc(5.5L); pragma(msg, truncr);
+pragma(msg, "exp()");
+enum expf = exp(5.5f); //pragma(msg, expf);
+enum expd = exp(5.5 ); //pragma(msg, expd);
+enum expr = exp(5.5L); pragma(msg, expr);
+
pragma(msg, "expm1()");
enum expm1f = expm1(5.5f); //pragma(msg, expm1f);
enum expm1d = expm1(5.5 ); //pragma(msg, expm1d);
diff --git a/gcc/testsuite/gdc.test/compilable/test55.d b/gcc/testsuite/gdc.test/compilable/test55.d
index 0dd7b7b..6dfc665 100644
--- a/gcc/testsuite/gdc.test/compilable/test55.d
+++ b/gcc/testsuite/gdc.test/compilable/test55.d
@@ -1,5 +1,5 @@
// COMPILE_SEPARATELY
-// EXTRA_SOURCES: imports/test55a.d
+// COMPILED_IMPORTS: imports/test55a.d
// PERMUTE_ARGS: -dw
// REQUIRED_ARGS: -d
diff --git a/gcc/testsuite/gdc.test/compilable/test59.d b/gcc/testsuite/gdc.test/compilable/test59.d
index c9f4edf..de10c91 100644
--- a/gcc/testsuite/gdc.test/compilable/test59.d
+++ b/gcc/testsuite/gdc.test/compilable/test59.d
@@ -1,4 +1,4 @@
// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/test59a.d imports/test59b.d
public import imports.test59a;
public import imports.test59b;
diff --git a/gcc/testsuite/gdc.test/compilable/test5973.d b/gcc/testsuite/gdc.test/compilable/test5973.d
new file mode 100644
index 0000000..a54b0ae
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test5973.d
@@ -0,0 +1,41 @@
+// https://issues.dlang.org/show_bug.cgi?id=5973
+
+class A { int a = 1; }
+class B { int b = 2; }
+class C : A
+{
+ B obj;
+ alias obj this;
+ this(){ obj = new B(); }
+}
+class X : C {}
+
+class D
+{
+ int i;
+}
+
+class E
+{
+ D x;
+ alias x this;
+}
+
+class F : E
+{
+ void test()
+ {
+ i = 5;
+ }
+}
+
+void main()
+{
+ auto c = new C();
+ assert(c.a == 1); // lookup C -> A, OK
+ assert(c.b == 2); // lookup C => B, OK
+
+ auto x = new X();
+ assert(x.a == 1); // lookup X -> C -> A, OK
+ assert(x.b == 2); // lookup X -> C => B, NG (Line 17)
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test6013.d b/gcc/testsuite/gdc.test/compilable/test6013.d
index 5824c91..2856eeb 100644
--- a/gcc/testsuite/gdc.test/compilable/test6013.d
+++ b/gcc/testsuite/gdc.test/compilable/test6013.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/test6013.d
import imports.test6013;
static assert(__traits(compiles, public_alias_value));
diff --git a/gcc/testsuite/gdc.test/compilable/test602.d b/gcc/testsuite/gdc.test/compilable/test602.d
index 979af91..a17aa16 100644
--- a/gcc/testsuite/gdc.test/compilable/test602.d
+++ b/gcc/testsuite/gdc.test/compilable/test602.d
@@ -42,7 +42,7 @@ static assert(!__traits(compiles, (bool b)
label: {}
assert(!x);
}
- catch
+ catch(Throwable)
{
}
}));
@@ -54,7 +54,7 @@ static assert(!__traits(compiles, (bool b)
try
{
}
- catch
+ catch(Throwable)
{
int x;
label: {}
@@ -383,7 +383,7 @@ static assert(!__traits(compiles, (bool b)
}));
/***************************************************/
-// 11659
+// https://issues.dlang.org/show_bug.cgi?id=11659
int test11659()
{
@@ -394,7 +394,7 @@ int test11659()
}
/***************************************************/
-// 13321
+// https://issues.dlang.org/show_bug.cgi?id=13321
void test13321(bool b)
{
diff --git a/gcc/testsuite/gdc.test/compilable/test61.d b/gcc/testsuite/gdc.test/compilable/test61.d
index e4d3d65..e2700d6 100644
--- a/gcc/testsuite/gdc.test/compilable/test61.d
+++ b/gcc/testsuite/gdc.test/compilable/test61.d
@@ -1,5 +1,5 @@
// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/test61a.d
import imports.test61a;
alias imports.test61a.bar bar;
diff --git a/gcc/testsuite/gdc.test/compilable/test62.d b/gcc/testsuite/gdc.test/compilable/test62.d
index c723a96..fa42145 100644
--- a/gcc/testsuite/gdc.test/compilable/test62.d
+++ b/gcc/testsuite/gdc.test/compilable/test62.d
@@ -1,5 +1,5 @@
// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/test62a.d
import imports.test62a;
struct S { }
diff --git a/gcc/testsuite/gdc.test/compilable/test63.d b/gcc/testsuite/gdc.test/compilable/test63.d
index 70d4964..9cf986d 100644
--- a/gcc/testsuite/gdc.test/compilable/test63.d
+++ b/gcc/testsuite/gdc.test/compilable/test63.d
@@ -1,4 +1,4 @@
-// EXTRA_SOURCES: imports/test63a.d
+// COMPILED_IMPORTS: imports/test63a.d
// PERMUTE_ARGS:
private import imports.test63a;
diff --git a/gcc/testsuite/gdc.test/compilable/test6395.d b/gcc/testsuite/gdc.test/compilable/test6395.d
index a1bac8e..3b80203 100644
--- a/gcc/testsuite/gdc.test/compilable/test6395.d
+++ b/gcc/testsuite/gdc.test/compilable/test6395.d
@@ -2,7 +2,7 @@
// EXTRA_SOURCES: b6395.d
// EXTRA_FILES: extra-files/c6395.d
-// 6395
+// https://issues.dlang.org/show_bug.cgi?id=6395
import c6395;
diff --git a/gcc/testsuite/gdc.test/compilable/test6541.d b/gcc/testsuite/gdc.test/compilable/test6541.d
new file mode 100644
index 0000000..b492215
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test6541.d
@@ -0,0 +1,10 @@
+class C
+{
+ static synchronized func(alias a)() {}
+}
+
+void main()
+{
+ int a;
+ C.func!a();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test66.d b/gcc/testsuite/gdc.test/compilable/test66.d
index 1213884..9db082e 100644
--- a/gcc/testsuite/gdc.test/compilable/test66.d
+++ b/gcc/testsuite/gdc.test/compilable/test66.d
@@ -1,5 +1,5 @@
// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/test66a.d
import imports.test66a;
alias int TOK;
@@ -11,7 +11,7 @@ enum
struct Token
{
- static char[] tochars[TOKmax];
+ static char[][TOKmax] tochars;
}
class Lexer
diff --git a/gcc/testsuite/gdc.test/compilable/test67.d b/gcc/testsuite/gdc.test/compilable/test67.d
index bcd48b2..9f45c64 100644
--- a/gcc/testsuite/gdc.test/compilable/test67.d
+++ b/gcc/testsuite/gdc.test/compilable/test67.d
@@ -1,5 +1,5 @@
// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/test67a.d
import imports.test67a;
interface I
diff --git a/gcc/testsuite/gdc.test/compilable/test6777.d b/gcc/testsuite/gdc.test/compilable/test6777.d
new file mode 100644
index 0000000..161a94a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test6777.d
@@ -0,0 +1,11 @@
+struct S {}
+
+class C {
+ S s;
+ alias s this;
+}
+
+void main() {
+ auto c = new C;
+ auto p = cast(void*) c;
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test68.d b/gcc/testsuite/gdc.test/compilable/test68.d
index bfac489..55a7995 100644
--- a/gcc/testsuite/gdc.test/compilable/test68.d
+++ b/gcc/testsuite/gdc.test/compilable/test68.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
-
-// Bugzilla 4278
+// EXTRA_FILES: imports/test68a.d
+// https://issues.dlang.org/show_bug.cgi?id=4278
import imports.test68a;
diff --git a/gcc/testsuite/gdc.test/compilable/test69.d b/gcc/testsuite/gdc.test/compilable/test69.d
index fb8e1ba..395a49f 100644
--- a/gcc/testsuite/gdc.test/compilable/test69.d
+++ b/gcc/testsuite/gdc.test/compilable/test69.d
@@ -1,7 +1,7 @@
// PERMUTE_ARGS:
// ICE(expression.c) DMD 0.110
-// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/2966.html
+// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/2966.html
string str255() { return "\255"; }
void fromFail49()
@@ -16,7 +16,7 @@ void fromFail49()
}
}
-// Bugzilla 5735
+// https://issues.dlang.org/show_bug.cgi?id=5735
struct A {}
void b() {}
diff --git a/gcc/testsuite/gdc.test/compilable/test6999.d b/gcc/testsuite/gdc.test/compilable/test6999.d
index c4e916f..c9f414f 100644
--- a/gcc/testsuite/gdc.test/compilable/test6999.d
+++ b/gcc/testsuite/gdc.test/compilable/test6999.d
@@ -1,4 +1,4 @@
-// 6999: inout in front of return type
+// https://issues.dlang.org/show_bug.cgi?id=6999: inout in front of return type
struct A
{
diff --git a/gcc/testsuite/gdc.test/compilable/test70.d b/gcc/testsuite/gdc.test/compilable/test70.d
index 9a821b2..f4aa900 100644
--- a/gcc/testsuite/gdc.test/compilable/test70.d
+++ b/gcc/testsuite/gdc.test/compilable/test70.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/test70.d
import imports.test70 : foo;
void foo(int) // overloads with selective import
diff --git a/gcc/testsuite/gdc.test/compilable/test71.d b/gcc/testsuite/gdc.test/compilable/test71.d
index 83b24a0..bc26f76 100644
--- a/gcc/testsuite/gdc.test/compilable/test71.d
+++ b/gcc/testsuite/gdc.test/compilable/test71.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/test71.d
import imports.test71;
void bar()
diff --git a/gcc/testsuite/gdc.test/compilable/test7172.d b/gcc/testsuite/gdc.test/compilable/test7172.d
index a4cf663..859f29a 100644
--- a/gcc/testsuite/gdc.test/compilable/test7172.d
+++ b/gcc/testsuite/gdc.test/compilable/test7172.d
@@ -7,7 +7,7 @@ void main()
static assert(!__traits(compiles, { class D : FinalC{} }));
scope class ScopeC{}
- static assert(!__traits(compiles, { auto sc = new ScopeC(); }));
+// static assert(!__traits(compiles, { auto sc = new ScopeC(); }));
static assert( __traits(compiles, { scope sc = new ScopeC(); }));
synchronized class SyncC{ void f(){} }
diff --git a/gcc/testsuite/gdc.test/compilable/test72.d b/gcc/testsuite/gdc.test/compilable/test72.d
index 5de9d42..6e6890f 100644
--- a/gcc/testsuite/gdc.test/compilable/test72.d
+++ b/gcc/testsuite/gdc.test/compilable/test72.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/test72a.d imports/test72b.d imports/test72c.d
module test72;
import imports.test72a, imports.test72c;
diff --git a/gcc/testsuite/gdc.test/compilable/test7399.d b/gcc/testsuite/gdc.test/compilable/test7399.d
index 76ac920..dba0741 100644
--- a/gcc/testsuite/gdc.test/compilable/test7399.d
+++ b/gcc/testsuite/gdc.test/compilable/test7399.d
@@ -1,6 +1,6 @@
-// 7399
+// https://issues.dlang.org/show_bug.cgi?id=7399
static assert(!__traits(compiles, { import non.existing.file; }));
-// 7400
+// https://issues.dlang.org/show_bug.cgi?id=7400
static assert(!is(typeof({import non_existing_file;})));
diff --git a/gcc/testsuite/gdc.test/compilable/test7491.d b/gcc/testsuite/gdc.test/compilable/test7491.d
index eb742e2..ce0e5e4 100644
--- a/gcc/testsuite/gdc.test/compilable/test7491.d
+++ b/gcc/testsuite/gdc.test/compilable/test7491.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/test7491a.d imports/test7491b.d
struct Struct
{
import object;
diff --git a/gcc/testsuite/gdc.test/compilable/test7524.d b/gcc/testsuite/gdc.test/compilable/test7524.d
index 6ff491a..a0bb918 100644
--- a/gcc/testsuite/gdc.test/compilable/test7524.d
+++ b/gcc/testsuite/gdc.test/compilable/test7524.d
@@ -1,3 +1,3 @@
-// 7524
+// https://issues.dlang.org/show_bug.cgi?id=7524
#line __LINE__ "y.d"
diff --git a/gcc/testsuite/gdc.test/compilable/test7754.d b/gcc/testsuite/gdc.test/compilable/test7754.d
index 1ce9b44..724dce4 100644
--- a/gcc/testsuite/gdc.test/compilable/test7754.d
+++ b/gcc/testsuite/gdc.test/compilable/test7754.d
@@ -1,6 +1,23 @@
-// REQUIRED_ARGS: -H -Hd${RESULTS_DIR}/compilable
-// POST_SCRIPT: compilable/extra-files/test7754-postscript.sh
-// PERMUTE_ARGS: -d -dw
+/*
+REQUIRED_ARGS: -H -Hd${RESULTS_DIR}/compilable
+PERMUTE_ARGS: -d -dw
+
+OUTPUT_FILES: ${RESULTS_DIR}/compilable/test7754.di
+TEST_OUTPUT:
+---
+=== ${RESULTS_DIR}/compilable/test7754.di
+// D import file generated from 'compilable/test7754.d'
+struct Foo(T)
+{
+ shared static this()
+ {
+ }
+ static this()
+ {
+ }
+}
+---
+*/
struct Foo(T)
{
diff --git a/gcc/testsuite/gdc.test/compilable/test8509.d b/gcc/testsuite/gdc.test/compilable/test8509.d
index a907223..5790223 100644
--- a/gcc/testsuite/gdc.test/compilable/test8509.d
+++ b/gcc/testsuite/gdc.test/compilable/test8509.d
@@ -1,6 +1,10 @@
module test8509;
enum E : string { a = "hello", b = "world" }
-struct S { E opCat(S s) { return E.a; } E opCat(string s) { return E.a; } }
+struct S
+{
+ E opBinary(string s : "~")(S s) { return E.a; }
+ E opBinary(string s : "~")(string s) { return E.a; }
+}
void main()
{
diff --git a/gcc/testsuite/gdc.test/compilable/test8543.d b/gcc/testsuite/gdc.test/compilable/test8543.d
index 4b29542..c72b0d92 100644
--- a/gcc/testsuite/gdc.test/compilable/test8543.d
+++ b/gcc/testsuite/gdc.test/compilable/test8543.d
@@ -1,5 +1,5 @@
-version (D_SIMD)
+static if (__traits(compiles, __vector(float[4])))
{
struct vfloat
{
diff --git a/gcc/testsuite/gdc.test/compilable/test8696.d b/gcc/testsuite/gdc.test/compilable/test8696.d
index 755d529..dd58c8f 100644
--- a/gcc/testsuite/gdc.test/compilable/test8696.d
+++ b/gcc/testsuite/gdc.test/compilable/test8696.d
@@ -1,6 +1,7 @@
// REQUIRED_ARGS: -w
-// 8696: incorrect dangling else with version():
+// https://issues.dlang.org/show_bug.cgi?id=8696
+// incorrect dangling else with version():
version (all):
version (linux)
diff --git a/gcc/testsuite/gdc.test/compilable/test8922a.d b/gcc/testsuite/gdc.test/compilable/test8922a.d
index e2f3d5c..8980c93 100644
--- a/gcc/testsuite/gdc.test/compilable/test8922a.d
+++ b/gcc/testsuite/gdc.test/compilable/test8922a.d
@@ -1,4 +1,5 @@
// PERMUTE_ARGS:
+// EXTRA_FILES: imports/bug8922.d
import imports.bug8922;
void test()
diff --git a/gcc/testsuite/gdc.test/compilable/test8922b.d b/gcc/testsuite/gdc.test/compilable/test8922b.d
index a91601b..007f9b6 100644
--- a/gcc/testsuite/gdc.test/compilable/test8922b.d
+++ b/gcc/testsuite/gdc.test/compilable/test8922b.d
@@ -1,4 +1,5 @@
// PERMUTE_ARGS:
+// EXTRA_FILES: imports/bug8922.d
void test()
{
import imports.bug8922;
diff --git a/gcc/testsuite/gdc.test/compilable/test8922c.d b/gcc/testsuite/gdc.test/compilable/test8922c.d
index da5ad3a..fa208a0 100644
--- a/gcc/testsuite/gdc.test/compilable/test8922c.d
+++ b/gcc/testsuite/gdc.test/compilable/test8922c.d
@@ -1,4 +1,5 @@
// PERMUTE_ARGS:
+// EXTRA_FILES: imports/bug8922.d
static import imports.bug8922;
void test()
diff --git a/gcc/testsuite/gdc.test/compilable/test8922d.d b/gcc/testsuite/gdc.test/compilable/test8922d.d
index 4a56dd7..4898cf6 100644
--- a/gcc/testsuite/gdc.test/compilable/test8922d.d
+++ b/gcc/testsuite/gdc.test/compilable/test8922d.d
@@ -1,4 +1,5 @@
// PERMUTE_ARGS:
+// EXTRA_FILES: imports/bug8922.d
void test()
{
static import imports.bug8922;
diff --git a/gcc/testsuite/gdc.test/compilable/test8922e.d b/gcc/testsuite/gdc.test/compilable/test8922e.d
index 3c52d00..b6d2d92 100644
--- a/gcc/testsuite/gdc.test/compilable/test8922e.d
+++ b/gcc/testsuite/gdc.test/compilable/test8922e.d
@@ -1,4 +1,5 @@
// PERMUTE_ARGS:
+// EXTRA_FILES: imports/bug8922.d
import renamed = imports.bug8922;
void test()
diff --git a/gcc/testsuite/gdc.test/compilable/test8922f.d b/gcc/testsuite/gdc.test/compilable/test8922f.d
index 2b2eb0f..2008e89 100644
--- a/gcc/testsuite/gdc.test/compilable/test8922f.d
+++ b/gcc/testsuite/gdc.test/compilable/test8922f.d
@@ -1,4 +1,5 @@
// PERMUTE_ARGS:
+// EXTRA_FILES: imports/bug8922.d
void test()
{
import renamed = imports.bug8922;
diff --git a/gcc/testsuite/gdc.test/compilable/test9209.d b/gcc/testsuite/gdc.test/compilable/test9209.d
index 03c2b79..8eca799 100644
--- a/gcc/testsuite/gdc.test/compilable/test9209.d
+++ b/gcc/testsuite/gdc.test/compilable/test9209.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
-// 9209
+// https://issues.dlang.org/show_bug.cgi?id=9209
auto array(T)(T t){ return t; }
diff --git a/gcc/testsuite/gdc.test/compilable/test9274.d b/gcc/testsuite/gdc.test/compilable/test9274.d
new file mode 100644
index 0000000..7ad5cda
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test9274.d
@@ -0,0 +1,26 @@
+// https://issues.dlang.org/show_bug.cgi?id=9274
+struct S
+{
+ float[] arr;
+ alias arr this;
+}
+
+static assert(!is(S == float[])); // ok
+static assert(!is(S == T[], T)); // fails
+static assert(is(S : float[]));
+static assert(is(S : T[], T));
+
+//https://issues.dlang.org/show_bug.cgi?id=9274
+struct A(T)
+{}
+
+struct B
+{
+ A!int _a;
+ alias _a this;
+}
+
+static assert(!is(B == A!int)); // OK
+static assert(!is(B == A!X, X)); // assertion fails
+static assert(is(B : A!int));
+static assert(is(B : A!X, X));
diff --git a/gcc/testsuite/gdc.test/compilable/test9276.d b/gcc/testsuite/gdc.test/compilable/test9276.d
index f6cefa5..14857a8 100644
--- a/gcc/testsuite/gdc.test/compilable/test9276.d
+++ b/gcc/testsuite/gdc.test/compilable/test9276.d
@@ -1,6 +1,6 @@
+// EXTRA_FILES: imports/test9276decl.d imports/test9276expr.d imports/test9276hash.d imports/test9276sem.d imports/test9276type.d imports/test9276util.d imports/test9276visitors.d
// EXTRA_SOURCES: imports/test9276parser.d
-
// This is a dummy module for compilable test
void main()
{}
diff --git a/gcc/testsuite/gdc.test/compilable/test9278a.d b/gcc/testsuite/gdc.test/compilable/test9278a.d
index 932411f..e0f483b 100644
--- a/gcc/testsuite/gdc.test/compilable/test9278a.d
+++ b/gcc/testsuite/gdc.test/compilable/test9278a.d
@@ -1,4 +1,4 @@
-// PREMUTE_ARGS:
+// PERMUTE_ARGS:
// Works fine here
struct datum { float num = 0.0; }
diff --git a/gcc/testsuite/gdc.test/compilable/test9278b.d b/gcc/testsuite/gdc.test/compilable/test9278b.d
index 0b4fee2..cca9000 100644
--- a/gcc/testsuite/gdc.test/compilable/test9278b.d
+++ b/gcc/testsuite/gdc.test/compilable/test9278b.d
@@ -1,4 +1,4 @@
-// PREMUTE_ARGS:
+// PERMUTE_ARGS:
// Works fine here
//struct datum { float num = 0.0; }
diff --git a/gcc/testsuite/gdc.test/compilable/test930.d b/gcc/testsuite/gdc.test/compilable/test930.d
new file mode 100644
index 0000000..fa444af
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test930.d
@@ -0,0 +1,22 @@
+// https://issues.dlang.org/show_bug.cgi?id=930
+template ATemplate(T)
+{
+ template ATemplate()
+ {
+ auto foo()
+ {
+ T x = 2; // this line causes an error
+ }
+ }
+}
+
+class TheClass(alias MixIt)
+{
+ mixin MixIt!();
+}
+
+void main()
+{
+ auto val = new TheClass!(ATemplate!(int));
+ val.foo();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test9434.d b/gcc/testsuite/gdc.test/compilable/test9434.d
index 26c7117..a03b391 100644
--- a/gcc/testsuite/gdc.test/compilable/test9434.d
+++ b/gcc/testsuite/gdc.test/compilable/test9434.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: test9435.d
import test9435;//semantic;
template Visitors()
diff --git a/gcc/testsuite/gdc.test/compilable/test9435.d b/gcc/testsuite/gdc.test/compilable/test9435.d
index 7046fdd..5ef5079 100644
--- a/gcc/testsuite/gdc.test/compilable/test9435.d
+++ b/gcc/testsuite/gdc.test/compilable/test9435.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: test9434.d
import test9434;//expression;
enum TokenType { Dot }
diff --git a/gcc/testsuite/gdc.test/compilable/test9436.d b/gcc/testsuite/gdc.test/compilable/test9436.d
index 2baee7c..5b650bd 100644
--- a/gcc/testsuite/gdc.test/compilable/test9436.d
+++ b/gcc/testsuite/gdc.test/compilable/test9436.d
@@ -1,4 +1,4 @@
// EXTRA_SOURCES: imports/test9436interp.d
-
+// EXTRA_FILES: imports/test9436aggr.d imports/test9436node.d imports/test9436type.d
// this is a dummy module for test 9436.
diff --git a/gcc/testsuite/gdc.test/compilable/test9613.d b/gcc/testsuite/gdc.test/compilable/test9613.d
index c49c293..6bf8793 100644
--- a/gcc/testsuite/gdc.test/compilable/test9613.d
+++ b/gcc/testsuite/gdc.test/compilable/test9613.d
@@ -1,4 +1,4 @@
-// PREMUTE_ARGS:
+// PERMUTE_ARGS:
struct S9613
{
int f(
diff --git a/gcc/testsuite/gdc.test/compilable/test9672.d b/gcc/testsuite/gdc.test/compilable/test9672.d
index bb10e3a..8bcd92f 100644
--- a/gcc/testsuite/gdc.test/compilable/test9672.d
+++ b/gcc/testsuite/gdc.test/compilable/test9672.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/test9672a.d
module test9672; // node
import imports.test9672a; // interpret
diff --git a/gcc/testsuite/gdc.test/compilable/test9692.d b/gcc/testsuite/gdc.test/compilable/test9692.d
index 765b657..57131b8 100644
--- a/gcc/testsuite/gdc.test/compilable/test9692.d
+++ b/gcc/testsuite/gdc.test/compilable/test9692.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: test9692a.d imports/test9692b.d
module test9692;
import test9692a;
diff --git a/gcc/testsuite/gdc.test/compilable/test9701.d b/gcc/testsuite/gdc.test/compilable/test9701.d
index 8f822ad..68055c4 100644
--- a/gcc/testsuite/gdc.test/compilable/test9701.d
+++ b/gcc/testsuite/gdc.test/compilable/test9701.d
@@ -1,4 +1,11 @@
// https://issues.dlang.org/show_bug.cgi?id=9701
+/*
+TEST_OUTPUT:
+---
+compilable/test9701.d(68): Deprecation: enum member `test9701.Enum.value7` is deprecated
+compilable/test9701.d(68): Deprecation: enum member `test9701.Enum.value8` is deprecated - message
+---
+*/
template AliasSeq(TList...)
{
@@ -56,3 +63,6 @@ static assert(__traits(getAttributes, value3) == AliasSeq!("uda0", uda4));
static assert(__traits(getAttributes, value4) == AliasSeq!("uda0", uda5, uda6));
static assert(__traits(getAttributes, value5) == AliasSeq!("uda0", "uda7", uda8));
static assert(__traits(getAttributes, value6) == AliasSeq!("uda0", uda9, "uda10"));
+
+// Test that messages are correctly displayed
+static assert(Enum.value7 != Enum.value8);
diff --git a/gcc/testsuite/gdc.test/compilable/test9766.d b/gcc/testsuite/gdc.test/compilable/test9766.d
index 3cfc22f..aaceb7d 100644
--- a/gcc/testsuite/gdc.test/compilable/test9766.d
+++ b/gcc/testsuite/gdc.test/compilable/test9766.d
@@ -69,9 +69,9 @@ static assert(U9766.var4.offsetof == 40);
struct TestMaxAlign
{
-align(1u << 31):
+align(1u << 15):
ubyte a;
ubyte b;
}
-static assert(TestMaxAlign.b.offsetof == 2147483648u);
+static assert(TestMaxAlign.b.offsetof == (1 << 15));
diff --git a/gcc/testsuite/gdc.test/compilable/test9818.d b/gcc/testsuite/gdc.test/compilable/test9818.d
index 779b1cf..dbf1901 100644
--- a/gcc/testsuite/gdc.test/compilable/test9818.d
+++ b/gcc/testsuite/gdc.test/compilable/test9818.d
@@ -1,5 +1,5 @@
/************************************/
-// 9818
+// https://issues.dlang.org/show_bug.cgi?id=9818
/*
TEST_OUTPUT:
diff --git a/gcc/testsuite/gdc.test/compilable/test9919.d b/gcc/testsuite/gdc.test/compilable/test9919.d
index 5cf8bc9..06f41d8 100644
--- a/gcc/testsuite/gdc.test/compilable/test9919.d
+++ b/gcc/testsuite/gdc.test/compilable/test9919.d
@@ -1,5 +1,5 @@
// REQUIRED_ARGS: -o-
-
+// EXTRA_FILES: imports/test9919a.d imports/test9919b.d imports/test9919c.d
module test9919;
public
diff --git a/gcc/testsuite/gdc.test/compilable/testAliasLookup.d b/gcc/testsuite/gdc.test/compilable/testAliasLookup.d
new file mode 100644
index 0000000..786c2f4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/testAliasLookup.d
@@ -0,0 +1,60 @@
+// REQUIRED_ARGS: -preview=fixAliasThis
+
+// https://issues.dlang.org/show_bug.cgi?id=16086
+struct A
+{
+ void tail() {}
+}
+
+struct S16086
+{
+ struct Inner2
+ {
+ Inner a;
+ alias a this;
+ }
+
+ struct Inner
+ {
+ int unique_identifier_name;
+ int tail = 2;
+ }
+
+ Inner2 inner;
+ alias inner this;
+
+ auto works()
+ {
+ return unique_identifier_name;
+ }
+
+ auto fails()
+ {
+ int a = tail;
+ return tail; // Line 22
+ // The workaround: return this.tail;
+ }
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=16082
+struct S16082
+{
+ struct Inner
+ {
+ int any_name_but_modulename;
+ int aliasthis = 5;
+ }
+
+ Inner inner;
+ alias inner this;
+
+ auto works()
+ {
+ return any_name_but_modulename;
+ }
+ auto fails()
+ {
+ return aliasthis; // Line 20
+ }
+}
+
diff --git a/gcc/testsuite/gdc.test/compilable/testCpCtor.d b/gcc/testsuite/gdc.test/compilable/testCpCtor.d
new file mode 100644
index 0000000..847c0f4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/testCpCtor.d
@@ -0,0 +1,21 @@
+// https://issues.dlang.org/show_bug.cgi?id=19870
+struct T
+{
+ int i;
+ this(ref return scope inout typeof(this) src)
+ inout @safe pure nothrow @nogc
+ {
+ i = src.i;
+ }
+}
+
+struct S
+{
+ T t;
+}
+
+void main()
+{
+ T a;
+ S b = S(a);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/testDIP37a.d b/gcc/testsuite/gdc.test/compilable/testDIP37a.d
index 8bd8b2d..5aa67f2 100644
--- a/gcc/testsuite/gdc.test/compilable/testDIP37a.d
+++ b/gcc/testsuite/gdc.test/compilable/testDIP37a.d
@@ -1,7 +1,7 @@
// PERMUTE_ARGS:
-// REQUIRED_ARGS: -c -Icompilable/extra-files
-// EXTRA_SOURCES: extra-files/pkgDIP37/datetime/package.d
-// EXTRA_SOURCES: extra-files/pkgDIP37/datetime/common.d
+// REQUIRED_ARGS: -Icompilable/extra-files
+// COMPILED_IMPORTS: extra-files/pkgDIP37/datetime/package.d
+// COMPILED_IMPORTS: extra-files/pkgDIP37/datetime/common.d
void main()
{
diff --git a/gcc/testsuite/gdc.test/compilable/testInference.d b/gcc/testsuite/gdc.test/compilable/testInference.d
index 3248f3e..9ffecc1 100644
--- a/gcc/testsuite/gdc.test/compilable/testInference.d
+++ b/gcc/testsuite/gdc.test/compilable/testInference.d
@@ -1,6 +1,6 @@
/***************************************************/
-// 6265.
+// https://issues.dlang.org/show_bug.cgi?id=6265
pure nothrow @safe int h6265() {
return 1;
@@ -63,7 +63,7 @@ void fECPb() {
}
/***************************************************/
-// 5635
+// https://issues.dlang.org/show_bug.cgi?id=5635
pure bool foo5635(R = int)(string x)
{
@@ -79,7 +79,7 @@ void test5635()
}
/***************************************************/
-// 5936
+// https://issues.dlang.org/show_bug.cgi?id=5936
auto bug5936c(R)(R i) @safe pure nothrow {
return true;
@@ -87,7 +87,7 @@ auto bug5936c(R)(R i) @safe pure nothrow {
static assert( bug5936c(0) );
/***************************************************/
-// 6351
+// https://issues.dlang.org/show_bug.cgi?id=6351
void bug6351(alias dg)()
{
@@ -101,7 +101,7 @@ void test6351()
}
/***************************************************/
-// 6359
+// https://issues.dlang.org/show_bug.cgi?id=6359
void impure6359() nothrow @safe @nogc {}
void throwable6359() pure @safe @nogc {}
@@ -164,7 +164,7 @@ void test6359() pure nothrow @safe @nogc
}
/***************************************************/
-// 7017
+// https://issues.dlang.org/show_bug.cgi?id=7017
template map7017(fun...) if (fun.length >= 1)
{
@@ -190,7 +190,7 @@ void test7017a() pure
}
/***************************************************/
-// 7017 (little simpler cases)
+// https://issues.dlang.org/show_bug.cgi?id=7017 (little simpler cases)
auto map7017a(alias fun)() { return fun(); } // depends on purity of fun
auto map7017b(alias fun)() { return; } // always pure
@@ -239,7 +239,7 @@ pure string escapeShellArguments()
}
/***************************************************/
-// 8234
+// https://issues.dlang.org/show_bug.cgi?id=8234
void test8234()
{
@@ -259,7 +259,7 @@ void test8234()
}
/***************************************************/
-// 8504
+// https://issues.dlang.org/show_bug.cgi?id=8504
import core.demangle : demangle;
@@ -267,7 +267,7 @@ void foo8504()()
{
static assert(typeof(foo8504!()).stringof == "void()");
static assert(typeof(foo8504!()).mangleof == "FZv");
- static assert(demangle(foo8504!().mangleof) == "void testInference.foo8504!().foo8504()");
+// static assert(demangle(foo8504!().mangleof) == "void testInference.foo8504!().foo8504()");
}
auto toDelegate8504a(F)(auto ref F fp) { return fp; }
@@ -291,7 +291,7 @@ void test8504()
}
/***************************************************/
-// 8751
+// https://issues.dlang.org/show_bug.cgi?id=8751
alias bool delegate(in int) pure Bar8751;
Bar8751 foo8751a(immutable int x) pure
@@ -304,7 +304,7 @@ Bar8751 foo8751b(const int x) pure
}
/***************************************************/
-// 8793
+// https://issues.dlang.org/show_bug.cgi?id=8793
alias bool delegate(in int) pure Dg8793;
alias bool function(in int) pure Fp8793;
@@ -327,7 +327,7 @@ Dg8793 foo8793ptr1(immutable int* p) pure { return x => *p == x; } // OK
Dg8793 foo8793ptr2(const int* p) pure { return x => *p == x; } // OK <- error
/***************************************************/
-// 9072
+// https://issues.dlang.org/show_bug.cgi?id=9072
struct A9072(T)
{
@@ -340,7 +340,9 @@ void test9072()
}
/***************************************************/
-// 5933 + Issue 8504 - Template attribute inferrence doesn't work
+// https://issues.dlang.org/show_bug.cgi?id=5933
+// https://issues.dlang.org/show_bug.cgi?id=8504
+// Template attribute inferrence doesn't work
int foo5933()(int a) { return a*a; }
struct S5933
@@ -359,7 +361,7 @@ void test5933()
}
/***************************************************/
-// 9148
+// https://issues.dlang.org/show_bug.cgi?id=9148
void test9148a() pure
{
@@ -517,7 +519,7 @@ void test9148e()
}
/***************************************************/
-// 12912
+// https://issues.dlang.org/show_bug.cgi?id=12912
struct S12912(alias fun)
{
@@ -539,7 +541,7 @@ class C12912
}
/***************************************************/
-// 10002
+// https://issues.dlang.org/show_bug.cgi?id=10002
void impure10002() {}
void remove10002(alias pred, bool impure = false, Range)(Range range)
@@ -568,7 +570,7 @@ class Node10002
}
/***************************************************/
-// 10148
+// https://issues.dlang.org/show_bug.cgi?id=10148
void fa10148() {} // fa is @system
@@ -604,7 +606,7 @@ void test10148()
}
/***************************************************/
-// 10289
+// https://issues.dlang.org/show_bug.cgi?id=10289
void test10289()
{
@@ -645,7 +647,7 @@ void test10289()
}
/***************************************************/
-// 10296
+// https://issues.dlang.org/show_bug.cgi?id=10296
void foo10296()()
{
@@ -661,7 +663,7 @@ pure void test10296()
}
/***************************************************/
-// 12025
+// https://issues.dlang.org/show_bug.cgi?id=12025
struct Foo12025
{
@@ -689,7 +691,7 @@ void test12025b() pure
}
/***************************************************/
-// 12542
+// https://issues.dlang.org/show_bug.cgi?id=12542
int logOf12542(T)(T n)
{
@@ -704,14 +706,14 @@ void test12542() @safe nothrow pure
}
/***************************************************/
-// 12704
+// https://issues.dlang.org/show_bug.cgi?id=12704
void foo12704() @system;
alias FP12704 = typeof(function() { foo12704(); });
static assert(is(FP12704 == void function() @system));
/***************************************************/
-// 12970
+// https://issues.dlang.org/show_bug.cgi?id=12970
@system { @safe void f12970a() {} }
@system { void f12970b() @safe {} }
@@ -769,7 +771,7 @@ static assert(AliasDecl_FP2.stringof == "void function()");
static assert(AliasDecl_FP3.stringof == "void function() @safe");
/***************************************************/
-// 13217
+// https://issues.dlang.org/show_bug.cgi?id=13217
void writeln13217(string) {}
@@ -788,7 +790,7 @@ void test13217()
}
/***************************************************/
-// 13840
+// https://issues.dlang.org/show_bug.cgi?id=13840
struct Foo13840
{
diff --git a/gcc/testsuite/gdc.test/compilable/testVRP.d b/gcc/testsuite/gdc.test/compilable/testVRP.d
index 954b501..bdd72d0 100644
--- a/gcc/testsuite/gdc.test/compilable/testVRP.d
+++ b/gcc/testsuite/gdc.test/compilable/testVRP.d
@@ -371,7 +371,7 @@ void bug1977_comment20()
}
/******************************************/
-// 9617
+// https://issues.dlang.org/show_bug.cgi?id=9617
void test9617()
{
diff --git a/gcc/testsuite/gdc.test/compilable/testcontracts.d b/gcc/testsuite/gdc.test/compilable/testcontracts.d
index 21c0e4b..6a36190 100644
--- a/gcc/testsuite/gdc.test/compilable/testcontracts.d
+++ b/gcc/testsuite/gdc.test/compilable/testcontracts.d
@@ -1,4 +1,4 @@
-// EXTRA_SOURCES: imports/testcontracts.d
+// COMPILED_IMPORTS: imports/testcontracts.d
import imports.testcontracts;
@@ -13,7 +13,7 @@ class Derived3602 : Base3602
assert(x > 0);
assert(y > 0);
}
- body
+ do
{
}
}
@@ -35,31 +35,31 @@ class Foo17502
{
auto foo()
out {}
- body {}
+ do {}
auto bar()
out { assert (__result > 5); }
- body { return 6; }
+ do { return 6; }
auto bar_2()
out (res) { assert (res > 5); }
- body { return 6; }
+ do { return 6; }
int concrete()
out { assert(__result > 5); }
- body { return 6; }
+ do { return 6; }
int concrete_2()
out(res) { assert (res > 5); }
- body { return 6; }
+ do { return 6; }
void void_foo()
out {}
- body {}
+ do {}
auto void_auto()
out {}
- body {}
+ do {}
}
/***************************************************/
@@ -76,7 +76,7 @@ class A17502
{
assert(res > 5);
}
- body
+ do
{
return p;
}
@@ -89,7 +89,7 @@ class C17502 : B17502
{
assert(p > 3);
}
- body
+ do
{
return p * 2;
}
@@ -102,7 +102,7 @@ class B17502 : A17502
{
assert(p > 2);
}
- body
+ do
{
return p * 3;
}
@@ -118,7 +118,7 @@ class X17502 : Y17502
{
assert(p > 3);
}
- body
+ do
{
return p * 2;
}
@@ -131,7 +131,7 @@ class Y17502 : Z17502
{
assert(p > 2);
}
- body
+ do
{
return p * 3;
}
@@ -148,7 +148,7 @@ class Z17502
{
assert(res > 5);
}
- body
+ do
{
return p;
}
@@ -166,9 +166,21 @@ final class Foo17893(T)
{
maythrow();
}
- body
+ do
{
}
}
Foo17893!int foo17893;
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15984
+
+alias Bar15984 = extern (C) void function(void*);
+
+final class C15984
+{
+ void foo(Bar15984 bar)
+ in { assert(bar); }
+ do {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/testdip1008.d b/gcc/testsuite/gdc.test/compilable/testdip1008.d
new file mode 100644
index 0000000..5e024fe
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/testdip1008.d
@@ -0,0 +1,21 @@
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -preview=dip1008
+
+int bar()
+{
+ try
+ {
+ throw new Exception("message");
+ }
+ catch (Exception e)
+ {
+ return 7;
+ }
+}
+
+
+void foo()
+{
+ enum r = bar();
+ static assert(r == 7);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/testexpression.d b/gcc/testsuite/gdc.test/compilable/testexpression.d
index b581df7..df49132 100644
--- a/gcc/testsuite/gdc.test/compilable/testexpression.d
+++ b/gcc/testsuite/gdc.test/compilable/testexpression.d
@@ -54,8 +54,6 @@ void TestOpAndAssign(Tx, Ux, ops)()
struct boolean { alias TT!(bool) x; }
struct integral { alias TT!(byte, ubyte, short, ushort, int, uint, long, ulong) x; }
struct floating { alias TT!(float, double, real) x; }
-struct imaginary { alias TT!(ifloat, idouble, ireal) x; }
-struct complex { alias TT!(cfloat, cdouble, creal) x; }
struct all { alias TT!("+=", "-=", "*=", "/=", "%=", "&=", "|=", "^=", "<<=", ">>=", ">>>=") x; }
struct arith { alias TT!("+=", "-=", "*=", "/=", "%=") x; }
@@ -76,17 +74,6 @@ void OpAssignCases(alias X)()
X!(floating, boolean, arith)();
X!(floating, integral, arith)();
X!(floating, floating, arith)();
-
- X!(imaginary, boolean, muldivmod)();
- X!(imaginary, integral, muldivmod)();
- X!(imaginary, floating, muldivmod)();
- X!(imaginary, imaginary, addsub)();
-
- X!(complex, boolean, arith)();
- X!(complex, integral, arith)();
- X!(complex, floating, arith)();
- X!(complex, imaginary, arith)();
- X!(complex, complex, nomod)();
}
void OpReAssignCases(alias X)()
@@ -99,23 +86,12 @@ void OpReAssignCases(alias X)()
X!(floating, boolean, arith)();
X!(floating, integral, arith)();
X!(floating, floating, arith)();
-
- X!(imaginary, boolean, muldivmod)();
- X!(imaginary, integral, muldivmod)();
- X!(imaginary, floating, muldivmod)();
- X!(imaginary, imaginary, addsub)();
-
- X!(complex, boolean, arith)();
- X!(complex, integral, arith)();
- X!(complex, floating, arith)();
- X!(complex, imaginary, arith)();
- X!(complex, complex, nomod)();
}
void main()
{
OpAssignCases!TestOpAssign();
OpAssignCases!TestOpAssignAssign(); // was once disabled due to bug 7436
- OpAssignCases!TestOpAssignAuto(); // 5181
+ OpAssignCases!TestOpAssignAuto(); // https://issues.dlang.org/show_bug.cgi?id=5181
OpReAssignCases!TestOpAndAssign();
}
diff --git a/gcc/testsuite/gdc.test/compilable/testfwdref.d b/gcc/testsuite/gdc.test/compilable/testfwdref.d
index 12b5cc8..d5ad5fa 100644
--- a/gcc/testsuite/gdc.test/compilable/testfwdref.d
+++ b/gcc/testsuite/gdc.test/compilable/testfwdref.d
@@ -1,7 +1,8 @@
// PERMUTE_ARGS:
+// EXTRA_FILES: imports/fwdref9514.d imports/fwdref12201a.d
/***************************************************/
-// 6766
+// https://issues.dlang.org/show_bug.cgi?id=6766
class Foo6766
{
@@ -16,7 +17,7 @@ struct Bar6766
}
/***************************************************/
-// 8609
+// https://issues.dlang.org/show_bug.cgi?id=8609
struct Tuple8609(T)
{
@@ -48,7 +49,7 @@ struct Bar8609b
}
/***************************************************/
-// 8698
+// https://issues.dlang.org/show_bug.cgi?id=8698
interface IRoot8698a {}
interface IClass8698a : IRoot8698a { }
@@ -67,7 +68,7 @@ void test8698b(Class8698b.Value) { }
interface IRoot8698b {}
/***************************************************/
-// 9514
+// https://issues.dlang.org/show_bug.cgi?id=9514
template TStructHelpers9514a()
{
@@ -112,7 +113,7 @@ template FieldNames9514b()
}
/***************************************************/
-// 10015
+// https://issues.dlang.org/show_bug.cgi?id=10015
struct S10015(T) { alias X = int; }
@@ -120,7 +121,7 @@ alias Y10015 = s10015.X;
S10015!int s10015;
/***************************************************/
-// 10101
+// https://issues.dlang.org/show_bug.cgi?id=10101
int front10101(int);
@@ -147,7 +148,7 @@ void test10101()
}
/***************************************************/
-// 11019
+// https://issues.dlang.org/show_bug.cgi?id=11019
class A11019
{
@@ -162,7 +163,7 @@ class B11019 : A11019
class D11019 : B11019 {}
/***************************************************/
-// 11166
+// https://issues.dlang.org/show_bug.cgi?id=11166
template Tup11166(T...) { alias Tup11166 = T; }
@@ -193,7 +194,7 @@ struct S11166b
}
/***************************************************/
-// 12152
+// https://issues.dlang.org/show_bug.cgi?id=12152
class A12152
{
@@ -208,7 +209,7 @@ class B12152 : A12152
static assert(is(A12152.Y == int));
/***************************************************/
-// 12201
+// https://issues.dlang.org/show_bug.cgi?id=12201
template T12201()
{
@@ -258,7 +259,7 @@ struct S12201b
}
/***************************************************/
-// 12531
+// https://issues.dlang.org/show_bug.cgi?id=12531
struct Node12531(T)
{
@@ -274,7 +275,7 @@ void test12531()
}
/***************************************************/
-// 12543
+// https://issues.dlang.org/show_bug.cgi?id=12543
class C12543;
static assert(C12543.sizeof == (void*).sizeof);
@@ -282,7 +283,7 @@ static assert(C12543.alignof == (void*).sizeof);
static assert(C12543.mangleof == "C10testfwdref6C12543");
/***************************************************/
-// 14010
+// https://issues.dlang.org/show_bug.cgi?id=14010
enum E14010;
static assert(E14010.mangleof == "E10testfwdref6E14010");
@@ -291,7 +292,7 @@ struct S14010;
static assert(S14010.mangleof == "S10testfwdref6S14010");
/***************************************************/
-// 12983
+// https://issues.dlang.org/show_bug.cgi?id=12983
alias I12983 = int;
class B12983(T) { alias MyC = C12983!string; }
@@ -307,7 +308,7 @@ void f12983();
void f12983(I12983);
/***************************************************/
-// 12984
+// https://issues.dlang.org/show_bug.cgi?id=12984
class B12984a { alias MyD = D12984a!int; }
class C12984a : B12984a { }
@@ -343,7 +344,7 @@ static assert(__traits(classInstanceSize, B12984b) == (void*).sizeof * 2 + int.s
static assert(__traits(classInstanceSize, C12984b) == (void*).sizeof * 2 + int.sizeof * 2);
/***************************************************/
-// 14390
+// https://issues.dlang.org/show_bug.cgi?id=14390
class B14390a { alias MyD = D14390a!int; }
class C14390a : B14390a { void f(int) {} }
@@ -356,7 +357,7 @@ class D14390b(T) { alias MyE = E14390b!float; }
class E14390b(T) : D14390b!int { void m() { auto c = new C14390b(); } }
/***************************************************/
-// 13860
+// https://issues.dlang.org/show_bug.cgi?id=13860
/*
TEST_OUTPUT:
@@ -386,7 +387,7 @@ void test13860()
}
/***************************************************/
-// 14083
+// https://issues.dlang.org/show_bug.cgi?id=14083
class NBase14083
{
@@ -436,7 +437,7 @@ static assert(
}());
/***************************************************/
-// 14549
+// https://issues.dlang.org/show_bug.cgi?id=14549
string foo14549(T)()
{
@@ -480,7 +481,8 @@ class Bar14549
}
// ----
-// 14609 - regression case
+// https://issues.dlang.org/show_bug.cgi?id=14609
+// regression case
interface Foo14609(T)
{
@@ -651,7 +653,7 @@ void test15726y()
}
/***************************************************/
-// 15726
+// https://issues.dlang.org/show_bug.cgi?id=15726
struct RC15726(T)
{
diff --git a/gcc/testsuite/gdc.test/compilable/testheader1.d b/gcc/testsuite/gdc.test/compilable/testheader1.d
index 256a1fe..9b14f7b 100644
--- a/gcc/testsuite/gdc.test/compilable/testheader1.d
+++ b/gcc/testsuite/gdc.test/compilable/testheader1.d
@@ -1,12 +1,9 @@
-// EXTRA_SOURCES: extra-files/header1.d
-// REQUIRED_ARGS: -o- -unittest -H -Hf${RESULTS_DIR}/compilable/header1.di
-// PERMUTE_ARGS: -d -dw
-// POST_SCRIPT: compilable/extra-files/header-postscript.sh
/*
-TEST_OUTPUT:
----
-Hello World
----
+EXTRA_SOURCES: extra-files/header1.d
+REQUIRED_ARGS: -o- -unittest -H -Hf${RESULTS_DIR}/compilable/testheader1.di -ignore
+PERMUTE_ARGS: -d -dw
+OUTPUT_FILES: ${RESULTS_DIR}/compilable/testheader1.di
+TEST_OUTPUT_FILE: extra-files/header1.di
*/
void main() {}
diff --git a/gcc/testsuite/gdc.test/compilable/testheader12567a.d b/gcc/testsuite/gdc.test/compilable/testheader12567a.d
index 27c1475..3372d87 100644
--- a/gcc/testsuite/gdc.test/compilable/testheader12567a.d
+++ b/gcc/testsuite/gdc.test/compilable/testheader12567a.d
@@ -1,6 +1,16 @@
-// REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/header12567a.di
-// PERMUTE_ARGS:
-// POST_SCRIPT: compilable/extra-files/header-postscript.sh header12567a
+/*
+REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/testheader12567a.di
+PERMUTE_ARGS:
+OUTPUT_FILES: ${RESULTS_DIR}/compilable/testheader12567a.di
+
+TEST_OUTPUT:
+---
+=== ${RESULTS_DIR}/compilable/testheader12567a.di
+// D import file generated from 'compilable/testheader12567a.d'
+deprecated module header12567a;
+void main();
+---
+*/
deprecated module header12567a;
diff --git a/gcc/testsuite/gdc.test/compilable/testheader12567b.d b/gcc/testsuite/gdc.test/compilable/testheader12567b.d
index 93393c5..f17a37e 100644
--- a/gcc/testsuite/gdc.test/compilable/testheader12567b.d
+++ b/gcc/testsuite/gdc.test/compilable/testheader12567b.d
@@ -1,6 +1,16 @@
-// REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/header12567b.di
-// PERMUTE_ARGS:
-// POST_SCRIPT: compilable/extra-files/header-postscript.sh header12567b
+/*
+REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/testheader12567b.di
+PERMUTE_ARGS:
+OUTPUT_FILES: ${RESULTS_DIR}/compilable/testheader12567b.di
+
+TEST_OUTPUT:
+---
+=== ${RESULTS_DIR}/compilable/testheader12567b.di
+// D import file generated from 'compilable/testheader12567b.d'
+deprecated("message") module header12567b;
+void main();
+---
+*/
deprecated("message") module header12567b;
diff --git a/gcc/testsuite/gdc.test/compilable/testheader17125.d b/gcc/testsuite/gdc.test/compilable/testheader17125.d
new file mode 100644
index 0000000..7549f61
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/testheader17125.d
@@ -0,0 +1,19 @@
+/*
+EXTRA_SOURCES: extra-files/header17125.d
+PERMUTE_ARGS:
+REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/testheader17125.di
+OUTPUT_FILES: ${RESULTS_DIR}/compilable/testheader17125.di
+
+TEST_OUTPUT:
+---
+=== ${RESULTS_DIR}/compilable/testheader17125.di
+// D import file generated from 'compilable/extra-files/header17125.d'
+void func1(real value = 103500.0L);
+void func2(real value = 520199.0F);
+void func3(real value = 970000.0);
+void func4(real value = 102450.0F);
+void func5(real value = 412502.0L);
+---
+*/
+
+void main() {}
diff --git a/gcc/testsuite/gdc.test/compilable/testheader1i.d b/gcc/testsuite/gdc.test/compilable/testheader1i.d
index 0eca3c4..f79a1af 100644
--- a/gcc/testsuite/gdc.test/compilable/testheader1i.d
+++ b/gcc/testsuite/gdc.test/compilable/testheader1i.d
@@ -1,12 +1,9 @@
-// EXTRA_SOURCES: extra-files/header1.d
-// REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/header1i.di -inline
-// PERMUTE_ARGS: -d -dw
-// POST_SCRIPT: compilable/extra-files/header-postscript.sh
/*
-TEST_OUTPUT:
----
-Hello World
----
+EXTRA_SOURCES: extra-files/header1.d
+REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/testheader1i.di -inline -ignore
+PERMUTE_ARGS: -d -dw
+OUTPUT_FILES: ${RESULTS_DIR}/compilable/testheader1i.di
+TEST_OUTPUT_FILE: extra-files/header1i.di
*/
void main() {}
diff --git a/gcc/testsuite/gdc.test/compilable/testheader2.d b/gcc/testsuite/gdc.test/compilable/testheader2.d
index 003d564..25cc3c9 100644
--- a/gcc/testsuite/gdc.test/compilable/testheader2.d
+++ b/gcc/testsuite/gdc.test/compilable/testheader2.d
@@ -1,6 +1,9 @@
-// EXTRA_SOURCES: extra-files/header2.d
-// REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/header2.di
-// PERMUTE_ARGS:
-// POST_SCRIPT: compilable/extra-files/header-postscript.sh header2
+/*
+EXTRA_SOURCES: extra-files/header2.d
+REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/testheader2.di
+PERMUTE_ARGS:
+OUTPUT_FILES: ${RESULTS_DIR}/compilable/testheader2.di
+TEST_OUTPUT_FILE: extra-files/header2.di
+*/
void main() {}
diff --git a/gcc/testsuite/gdc.test/compilable/testheader2i.d b/gcc/testsuite/gdc.test/compilable/testheader2i.d
index 79662ed..517fae4 100644
--- a/gcc/testsuite/gdc.test/compilable/testheader2i.d
+++ b/gcc/testsuite/gdc.test/compilable/testheader2i.d
@@ -1,6 +1,9 @@
-// EXTRA_SOURCES: extra-files/header2.d
-// REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/header2i.di -inline
-// PERMUTE_ARGS:
-// POST_SCRIPT: compilable/extra-files/header-postscript.sh header2i
+/*
+EXTRA_SOURCES: extra-files/header2.d
+REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/testheader2i.di -inline
+PERMUTE_ARGS:
+OUTPUT_FILES: ${RESULTS_DIR}/compilable/testheader2i.di
+TEST_OUTPUT_FILE: extra-files/header2i.di
+*/
void main() {}
diff --git a/gcc/testsuite/gdc.test/compilable/testheader3.d b/gcc/testsuite/gdc.test/compilable/testheader3.d
index f5fdbc1..be38d7c 100644
--- a/gcc/testsuite/gdc.test/compilable/testheader3.d
+++ b/gcc/testsuite/gdc.test/compilable/testheader3.d
@@ -1,8 +1,27 @@
-// EXTRA_SOURCES: extra-files/header3.d
-// REQUIRED_ARGS: -o- -unittest -H -Hf${RESULTS_DIR}/compilable/header3.di
-// PERMUTE_ARGS: -d -dw
-// POST_SCRIPT: compilable/extra-files/header-postscript.sh header3
-
-void main() {}
+/*
+EXTRA_SOURCES: extra-files/header3.d
+REQUIRED_ARGS: -o- -unittest -H -Hf${RESULTS_DIR}/compilable/testheader3.di
+PERMUTE_ARGS: -d -dw
+OUTPUT_FILES: ${RESULTS_DIR}/compilable/testheader3.di
+TEST_OUTPUT:
+---
+=== ${RESULTS_DIR}/compilable/testheader3.di
+// D import file generated from 'compilable/extra-files/header3.d'
+auto elseifchain()
+{
+ bool a, b, c;
+ if (a)
+ {
+ }
+ else if (b)
+ {
+ }
+ else if (c)
+ {
+ }
+}
+---
+*/
+void main() {}
diff --git a/gcc/testsuite/gdc.test/compilable/testheaderudamodule.d b/gcc/testsuite/gdc.test/compilable/testheaderudamodule.d
index 5ee9486..b6b0ed1 100644
--- a/gcc/testsuite/gdc.test/compilable/testheaderudamodule.d
+++ b/gcc/testsuite/gdc.test/compilable/testheaderudamodule.d
@@ -1,6 +1,22 @@
-// REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/testheaderudamodule.di
-// PERMUTE_ARGS:
-// POST_SCRIPT: compilable/extra-files/header-postscript.sh testheaderudamodule
+/*
+REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/testheaderudamodule.di
+PERMUTE_ARGS:
+OUTPUT_FILES: ${RESULTS_DIR}/compilable/testheaderudamodule.di
+
+TEST_OUTPUT:
+---
+=== ${RESULTS_DIR}/compilable/testheaderudamodule.di
+// D import file generated from 'compilable/testheaderudamodule.d'
+@(1, UDA(2))
+module testheaderudamodule;
+struct UDA
+{
+ int a;
+}
+void main();
+void foo(@(1) int bar, @UDA(2) string bebe);
+---
+*/
@(1, UDA(2))
module testheaderudamodule;
@@ -12,4 +28,4 @@ struct UDA
void main() {}
-void foo(@(1) int bar, @UDA(2) string bebe);
+void foo(@(1) int bar, @UDA(2) string bebe) {}
diff --git a/gcc/testsuite/gdc.test/compilable/testimport12242.d b/gcc/testsuite/gdc.test/compilable/testimport12242.d
index 1d1cccd..39e0c16 100644
--- a/gcc/testsuite/gdc.test/compilable/testimport12242.d
+++ b/gcc/testsuite/gdc.test/compilable/testimport12242.d
@@ -1,5 +1,5 @@
// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/imp12242a.d imports/imp12242a1.d imports/imp12242a2.d imports/imp12242b.d imports/imp12242b1.d imports/imp12242b2.d
module testimport12242;
import imports.imp12242a; // test // stripA == OverloadSet
diff --git a/gcc/testsuite/gdc.test/compilable/testlambdacomp.d b/gcc/testsuite/gdc.test/compilable/testlambdacomp.d
new file mode 100644
index 0000000..e2efdb0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/testlambdacomp.d
@@ -0,0 +1,216 @@
+// EXTRA_FILES: imports/testlambda1.d imports/testlambda2.d
+module testlambdacomp;
+
+void test1()
+{
+ static assert(__traits(isSame, (a, b) => a + b, (c, d) => c + d));
+ static assert(__traits(isSame, a => ++a, b => ++b));
+ static assert(!__traits(isSame, (int a, int b) => a + b, (a, b) => a + b));
+ static assert(__traits(isSame, (a, b) => a + b + 10, (c, d) => c + d + 10));
+}
+
+class Y
+{
+ static int r = 5;
+ int x;
+ this(int x)
+ {
+ this.x = x;
+ }
+}
+
+class A
+{
+ Y a;
+ this(Y a)
+ {
+ this.a = a;
+ }
+}
+
+void foo3(alias pred)()
+{
+ static assert(!__traits(isSame, pred, (A x, A y) => ++x.a.x + (--y.a.x)));
+}
+
+void test2()
+{
+
+ int b;
+ static assert(!__traits(isSame, a => a + b, a => a + b));
+
+ int f() { return 3;}
+ static assert(__traits(isSame, a => a + f(), a => a + f()));
+
+ class A
+ {
+ Y a;
+ this(Y a)
+ {
+ this.a = a;
+ }
+ }
+
+ class B
+ {
+ int a;
+ this(int a)
+ {
+ this.a = a;
+ }
+ }
+
+ B q = new B(7);
+ alias pred = (A a, A b) => ++a.a.x + (--b.a.x);
+ foo3!pred();
+ static assert(!__traits(isSame, (A a) => ++a.a.x + 2, (A b) => ++b.a.x + 3));
+ static assert(__traits(isSame, pred, (A x, A y) => ++x.a.x + (--y.a.x)));
+ static assert(!__traits(isSame, (B a) => ++a.a + 2, (B b) => ++b.a + 3));
+ static assert(__traits(isSame, (B a) => ++a.a, (B a) => ++a.a));
+
+ B cl = new B(7);
+ static assert(!__traits(isSame, a => a + q.a, c => c + cl.a));
+
+ class C(G)
+ {
+ G a;
+ this(int a)
+ {
+ this.a = a;
+ }
+ }
+ static assert(!__traits(isSame, (C!int a) => ++a.a, (C!int a) => ++a.a));
+
+ struct X
+ {
+ int a;
+ }
+ static assert(__traits(isSame, (X a) => a.a + 2, (X b) => b.a + 2));
+
+ struct T(G)
+ {
+ G a;
+ }
+ static assert(!__traits(isSame, (T!int a) => ++a.a, (T!int a) => ++a.a));
+
+}
+
+void test3()
+{
+ enum q = 10;
+ static assert(__traits(isSame, (a, b) => a + b + q, (c, d) => c + d + 10));
+
+ struct Bar
+ {
+ int a;
+ }
+ enum r1 = Bar(1);
+ enum r2 = Bar(1);
+ static assert(__traits(isSame, a => a + r1.a, b => b + r2.a));
+
+ enum X { A, B, C}
+ static assert(__traits(isSame, a => a + X.A, a => a + 0));
+}
+
+void foo(alias pred)()
+{
+ static assert(__traits(isSame, pred, (c, d) => c + d));
+ static assert(__traits(isSame, (c, d) => c + d, pred));
+}
+
+void bar(alias pred)()
+{
+ static assert(__traits(isSame, pred, (c, d) => c < d + 7));
+
+ enum q = 7;
+ static assert(__traits(isSame, pred, (c, d) => c < d + q));
+
+ int r = 7;
+ static assert(!__traits(isSame, pred, (c, d) => c < d + r));
+}
+void test4()
+{
+ foo!((a, b) => a + b)();
+ bar!((a, b) => a < b + 7);
+}
+
+int bar()
+{
+ return 2;
+}
+
+void testImportedFunctions(alias pred)()
+{
+ // imports.testalambda1.bar != imports.testlambda2.bar
+ import imports.testlambda2 : bar;
+ static assert(!__traits(isSame, pred, (int a) => a + bar()));
+}
+
+void testLocalGlobalFunctionScopes(alias pred)()
+{
+ // testlambdacomp.bar != testlambdacomp.test5.bar
+ static assert(!__traits(isSame, pred, (int a) => a + bar()));
+
+ // imports.testlambda1.bar != testlambdacomp.test5.bar
+ import imports.testlambda1 : bar;
+ static assert(!__traits(isSame, pred, (int a) => a + bar()));
+
+ // functions imported from different modules are not equal
+ testImportedFunctions!((int a) => a + bar())();
+}
+
+// lambda functions which contain function calls
+void test5()
+{
+
+ int bar()
+ {
+ return 3;
+ }
+
+ // functions in the same scope
+ alias pred = a => a + bar();
+ alias pred2 = b => b + bar();
+ static assert(__traits(isSame, pred, pred2));
+
+ // functions in different scopes
+ testLocalGlobalFunctionScopes!((int a) => a + bar())();
+
+ int foo(int a, int b)
+ {
+ return 2 + a + b;
+ }
+
+ // functions with different kind of parameters
+ alias preda23 = a => a + foo(2, 3);
+ alias predb23 = b => b + foo(2, 3);
+ alias predc24 = c => c + foo(2, 4);
+ alias predd23 = (int d) => d + foo(2, 3);
+ alias prede23 = (int e) => e + foo(2, 3);
+ alias predf24 = (int f) => f + foo(2, 4);
+ static assert(__traits(isSame, preda23, predb23));
+ static assert(!__traits(isSame, predc24, predd23));
+ static assert(__traits(isSame, predd23, prede23));
+ static assert(!__traits(isSame, prede23, predf24));
+
+ // functions with function calls as parameters
+ static assert(!__traits(isSame, (int a, int b) => foo(foo(1, a), foo(1, b)), (int a, int b) => foo(foo(1, a), foo(2, b))));
+ static assert(!__traits(isSame, (a, b) => foo(foo(1, a), foo(1, b)), (int a, int b) => foo(foo(1, a), foo(2, b))));
+
+ float floatFunc(float a, float b)
+ {
+ return a + b;
+ }
+
+ static assert(__traits(isSame, a => floatFunc(a, 1.0), b => floatFunc(b, 1.0)));
+ static assert(!__traits(isSame, a => floatFunc(a, 1.0), b => floatFunc(b, 2.0)));
+}
+
+void main()
+{
+ test1();
+ test2();
+ test3();
+ test4();
+ test5();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/testparse.d b/gcc/testsuite/gdc.test/compilable/testparse.d
index f514146..99378a9 100644
--- a/gcc/testsuite/gdc.test/compilable/testparse.d
+++ b/gcc/testsuite/gdc.test/compilable/testparse.d
@@ -2,12 +2,12 @@
// REQUIRED_ARGS: -o-
/***************************************************/
-// 6719
+// https://issues.dlang.org/show_bug.cgi?id=6719
static assert(__traits(compiles, mixin("(const(A))[0..0]")) == false);
/***************************************************/
-// 9232
+// https://issues.dlang.org/show_bug.cgi?id=9232
struct Foo9232
{
@@ -25,7 +25,7 @@ void test9232()
}
/***************************************************/
-// 9401
+// https://issues.dlang.org/show_bug.cgi?id=9401
struct S9401a
{
@@ -44,7 +44,7 @@ void test9401() nothrow pure @safe
}
/***************************************************/
-// 9649
+// https://issues.dlang.org/show_bug.cgi?id=9649
class Outer9649
{
@@ -60,7 +60,7 @@ void test9649()
}
/***************************************************/
-// 9679
+// https://issues.dlang.org/show_bug.cgi?id=9679
void test9679(inout int = 0)
{
@@ -90,7 +90,7 @@ void test9679(inout int = 0)
}
/***************************************************/
-// 9901
+// https://issues.dlang.org/show_bug.cgi?id=9901
template isGood9901(T)
{
@@ -106,7 +106,7 @@ void test9901()
}
/***************************************************/
-// 10199
+// https://issues.dlang.org/show_bug.cgi?id=10199
void test10199()
{
@@ -115,7 +115,7 @@ label:
}
/***************************************************/
-// 12460
+// https://issues.dlang.org/show_bug.cgi?id=12460
void f12460(T)()
{
@@ -132,7 +132,7 @@ void test12460()
}
/***************************************************/
-// 11689
+// https://issues.dlang.org/show_bug.cgi?id=11689
void test11689()
{
@@ -140,12 +140,12 @@ void test11689()
}
/***************************************************/
-// 11751
+// https://issues.dlang.org/show_bug.cgi?id=11751
static assert(is(float == typeof(0x0.1p1F)));
/***************************************************/
-// 11957
+// https://issues.dlang.org/show_bug.cgi?id=11957
extern(C++) class C11957
{
@@ -161,8 +161,33 @@ void test11957()
}
/***************************************************/
-// 13049
+// https://issues.dlang.org/show_bug.cgi?id=13049
enum mangle13049(T) = T.mangleof;
alias FP13049 = void function(scope int); // OK
static assert(mangle13049!FP13049 == mangle13049!(void function(scope int))); // OK <- NG
+
+/***************************************************/
+// was not covered until the **12th of March 2019**
+void testIfConditionWithSTCandType()
+{
+ auto call(){return 0;}
+ if (const size_t i = call()) {}
+}
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=20791
+extern(C++, "foo", )
+struct S {}
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=22019
+void test22019()
+{
+ final switch (1)
+ {
+ case 1,:
+ case 2,3,:
+ break;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/testsctreturn.d b/gcc/testsuite/gdc.test/compilable/testsctreturn.d
new file mode 100644
index 0000000..96b82da
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/testsctreturn.d
@@ -0,0 +1,19 @@
+/* REQUIRED_ARGS: -preview=dip1000
+ * This case winds up calling buildScopeRef() with stc having only STC.return_ set.
+ */
+
+struct PackedPtrImpl(size_t bits)
+{
+pure nothrow:
+ this(inout(size_t)* ptr) inout @safe @nogc
+ {
+ origin = ptr;
+ }
+ size_t* origin;
+}
+
+void test()
+{
+ size_t* p;
+ const ppi = const(PackedPtrImpl!(3))(p);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/testtempl2.d b/gcc/testsuite/gdc.test/compilable/testtempl2.d
new file mode 100644
index 0000000..57832d9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/testtempl2.d
@@ -0,0 +1,24 @@
+class C
+{
+ int m;
+ auto fun()
+ {
+ inc!m();
+ new N!m;
+ }
+}
+
+auto inc(alias m)()
+{
+ ++m;
+}
+
+class N(alias m)
+{
+}
+
+void main()
+{
+ auto c = new C;
+ c.new N!(c.m);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/traits.d b/gcc/testsuite/gdc.test/compilable/traits.d
index 4d8a5e1..3c65dac 100644
--- a/gcc/testsuite/gdc.test/compilable/traits.d
+++ b/gcc/testsuite/gdc.test/compilable/traits.d
@@ -1,4 +1,4 @@
-// REQUIRED_ARGS:
+// REQUIRED_ARGS: -extern-std=c++98
// EXTRA_FILES: imports/plainpackage/plainmodule.d imports/pkgmodule/package.d imports/pkgmodule/plainmodule.d
// This file is intended to contain all compilable traits-related tests in an
@@ -19,9 +19,22 @@ class C19152
static assert(is(typeof(__traits(getTargetInfo, "cppRuntimeLibrary")) == string));
version (CppRuntime_Microsoft)
{
- static assert(__traits(getTargetInfo, "cppRuntimeLibrary") == "libcmt");
+ static assert(__traits(getTargetInfo, "cppRuntimeLibrary") == "libcmt" ||
+ __traits(getTargetInfo, "cppRuntimeLibrary")[0..6] == "msvcrt"); // includes mingw import libs
}
+version (D_HardFloat)
+ static assert(__traits(getTargetInfo, "floatAbi") == "hard");
+
+version (Win64)
+ static assert(__traits(getTargetInfo, "objectFormat") == "coff");
+version (OSX)
+ static assert(__traits(getTargetInfo, "objectFormat") == "macho");
+version (linux)
+ static assert(__traits(getTargetInfo, "objectFormat") == "elf");
+
+static assert(__traits(getTargetInfo, "cppStd") == 199711);
+
import imports.plainpackage.plainmodule;
import imports.pkgmodule.plainmodule;
@@ -103,6 +116,7 @@ void foo(T)()
{
this (ref S rhs) {}
}
+ static assert (__traits(hasCopyConstructor, S!int));
}
struct U(T)
@@ -123,18 +137,182 @@ struct DisabledPostblit
struct NoCpCtor { }
class C19902 { }
+static assert(__traits(hasCopyConstructor, S));
+static assert(__traits(hasCopyConstructor, OuterS.S));
+static assert(__traits(hasCopyConstructor, OuterS));
static assert(__traits(compiles, foo!int));
static assert(__traits(compiles, foo!S));
+static assert(__traits(hasCopyConstructor, U!int));
+static assert(__traits(hasCopyConstructor, U!S));
static assert(!__traits(hasPostblit, U!S));
static assert(__traits(hasPostblit, SPostblit));
+static assert(!__traits(hasCopyConstructor, SPostblit));
+static assert(!__traits(hasCopyConstructor, NoCpCtor));
+static assert(!__traits(hasCopyConstructor, C19902));
+static assert(!__traits(hasCopyConstructor, int));
static assert(!__traits(hasPostblit, NoCpCtor));
static assert(!__traits(hasPostblit, C19902));
static assert(!__traits(hasPostblit, int));
-// Check that invalid use cases don't compile
-static assert(!__traits(compiles, __traits(hasPostblit)));
-static assert(!__traits(compiles, __traits(hasPostblit, S())));
-
static assert(__traits(isCopyable, int));
static assert(!__traits(isCopyable, DisabledPostblit));
+struct S1 {} // Fine. Can be copied
+struct S2 { this(this) {} } // Fine. Can be copied
+struct S3 { @disable this(this); } // Not fine. Copying is disabled.
+struct S4 { S3 s; } // Not fine. A field has copying disabled.
+class C1 {}
+static assert( __traits(isCopyable, S1));
+static assert( __traits(isCopyable, S2));
+static assert(!__traits(isCopyable, S3));
+static assert(!__traits(isCopyable, S4));
+static assert(__traits(isCopyable, C1));
+static assert(__traits(isCopyable, int));
+static assert(__traits(isCopyable, int[]));
+
+enum E1 : S1 { a = S1(), }
+enum E2 : S2 { a = S2(), }
+enum E3 : S3 { a = S3(), }
+enum E4 : S4 { a = S4(), }
+
+static assert(__traits(isCopyable, E1));
+static assert(__traits(isCopyable, E2));
+static assert(!__traits(isCopyable, E3));
+static assert(!__traits(isCopyable, E4));
+
+struct S5
+{
+ @disable this(ref S5);
+}
+static assert(!__traits(isCopyable, S5));
+
+/******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=20884
+
+struct S20884
+{
+ int x;
+}
+
+alias T20884 = immutable(S20884);
+enum m20884 = "x";
+
+static assert(is(typeof(__traits(getMember, T20884, m20884)) == immutable(int))); // OK now
+static assert(is( typeof(mixin("T20884." ~ m20884)) == immutable(int)));
+static assert(is( typeof(T20884.x) == immutable(int)));
+
+/******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=20761
+
+alias Seq(T...) = T;
+
+static assert(__traits(isSame, Seq!(1, 2), Seq!(1, 2)));
+static assert(!__traits(isSame, Seq!(1, 1), Seq!(2, 2)));
+static assert(!__traits(isSame, Seq!(1, 1, 2), Seq!(1, 1)));
+static assert(!__traits(isSame, Seq!(1, 1), Seq!(1, 1, 2)));
+
+static assert(__traits(isSame,
+ Seq!(string, wstring),
+ Seq!(immutable(char)[], immutable(wchar)[]))
+);
+
+static assert(__traits(isSame,
+ Seq!(i => i.value, (a, b) => a + b),
+ Seq!(a => a.value, (x, y) => x + y)
+));
+
+static assert(__traits(isSame,
+ Seq!(float, Seq!(double, Seq!real)),
+ Seq!(Seq!(Seq!float, double), real)
+));
+
+static assert(!__traits(isSame,
+ Seq!(int, Seq!(a => a + a)),
+ Seq!(int, Seq!(a => a * a))
+));
+
+// Do these out of order to ensure there are no forward refencing bugs
+
+extern(C++, __traits(getCppNamespaces,GetNamespaceTest1)) struct GetNamespaceTest4 {}
+static assert (__traits(getCppNamespaces,GetNamespaceTest1) ==
+ __traits(getCppNamespaces,GetNamespaceTest4));
+
+extern(C++, "ns") struct GetNamespaceTest1 {}
+extern(C++, "multiple", "namespaces") struct GetNamespaceTest2 {}
+extern(C++, mixin("Seq!(`ns`, `nt`)")) struct GetNamespaceTest3 {}
+static assert(__traits(getCppNamespaces,GetNamespaceTest1)[0] == "ns");
+static assert(__traits(getCppNamespaces,GetNamespaceTest2) == Seq!("multiple","namespaces"));
+static assert(__traits(getCppNamespaces,GetNamespaceTest3) == Seq!("ns", "nt"));
+
+extern(C++, __traits(getCppNamespaces,GetNamespaceTest5)) struct GetNamespaceTest8 {}
+static assert (__traits(getCppNamespaces,GetNamespaceTest5) ==
+ __traits(getCppNamespaces,GetNamespaceTest8));
+
+extern(C++, ns) struct GetNamespaceTest5 {}
+extern(C++, multiple) extern(C++, namespaces) struct GetNamespaceTest6 {}
+static assert(__traits(getCppNamespaces,GetNamespaceTest5)[0] == "ns");
+static assert(__traits(getCppNamespaces,GetNamespaceTest6) == Seq!("multiple","namespaces"));
+
+extern(C++, NS)
+{
+ struct GetNamespaceTest9 {}
+ extern(C++, nested)
+ {
+ struct GetNamespaceTest10 {}
+ extern(C++,"nested2")
+ struct GetNamespaceTest11 {}
+ }
+ extern (C++, "nested3")
+ {
+ extern(C++, nested4)
+ struct GetNamespaceTest12 {}
+ }
+}
+static assert (__traits(getCppNamespaces,NS.GetNamespaceTest9)[0] == "NS");
+static assert (__traits(getCppNamespaces,NS.GetNamespaceTest10) == Seq!("NS", "nested"));
+static assert (__traits(getCppNamespaces,NS.GetNamespaceTest11) == Seq!("NS", "nested", "nested2"));
+static assert (__traits(getCppNamespaces,NS.GetNamespaceTest12) == Seq!("NS", "nested4", "nested3"));
+
+extern(C++, `ns`) struct GetNamespaceTestTemplated(T) {}
+extern(C++, `ns`)
+template GetNamespaceTestTemplated2(T)
+{
+ struct GetNamespaceTestTemplated2 {}
+}
+
+template GetNamespaceTestTemplated3(T)
+{
+ extern(C++, `ns`)
+ struct GetNamespaceTestTemplated3 {}
+}
+
+static assert (__traits(getCppNamespaces,GetNamespaceTestTemplated!int) == Seq!("ns"));
+static assert (__traits(getCppNamespaces,GetNamespaceTestTemplated2!int) == Seq!("ns"));
+static assert (__traits(getCppNamespaces,GetNamespaceTestTemplated3!int) == Seq!("ns"));
+extern(C++, `ns2`)
+template GetNamespaceTestTemplated4(T)
+{
+ extern(C++, `ns`)
+ struct GetNamespaceTestTemplated4
+ {
+ struct GetNamespaceTestTemplated5 {}
+ struct GetNamespaceTestTemplated6(T) {}
+ }
+}
+
+static assert (__traits(getCppNamespaces,GetNamespaceTestTemplated4!int) == Seq!("ns2","ns"));
+static assert (__traits(getCppNamespaces,GetNamespaceTestTemplated4!int.GetNamespaceTestTemplated5) == Seq!("ns2","ns"));
+static assert (__traits(getCppNamespaces,GetNamespaceTestTemplated4!int.GetNamespaceTestTemplated6!int) == Seq!("ns2","ns"));
+
+// Currently ignored due to https://issues.dlang.org/show_bug.cgi?id=21373
+extern(C++, `decl`)
+mixin template GetNamespaceTestTemplatedMixin()
+{
+ extern(C++, `f`)
+ void foo() {}
+}
+
+extern(C++, `inst`)
+mixin GetNamespaceTestTemplatedMixin!() GNTT;
+
+static assert (__traits(getCppNamespaces, GNTT.foo) == Seq!(`inst`,/*`decl`,*/ `f`));
diff --git a/gcc/testsuite/gdc.test/compilable/traits_getFunctionAttributes.d b/gcc/testsuite/gdc.test/compilable/traits_getFunctionAttributes.d
new file mode 100644
index 0000000..1f25b26
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/traits_getFunctionAttributes.d
@@ -0,0 +1,120 @@
+
+module traits_getFunctionAttributes;
+
+void test_getFunctionAttributes()
+{
+ alias tuple(T...) = T;
+
+ struct S
+ {
+ int noF() { return 0; }
+ int constF() const { return 0; }
+ int immutableF() immutable { return 0; }
+ int inoutF() inout { return 0; }
+ int sharedF() shared { return 0; }
+
+ int x;
+ ref int refF() return { return x; }
+ int propertyF() @property { return 0; }
+ int nothrowF() nothrow { return 0; }
+ int nogcF() @nogc { return 0; }
+
+ int systemF() @system { return 0; }
+ int trustedF() @trusted { return 0; }
+ int safeF() @safe { return 0; }
+
+ int pureF() pure { return 0; }
+
+ int liveF() @live { return 0; }
+ }
+
+ static assert(__traits(getFunctionAttributes, S.noF) == tuple!("@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S.noF)) == tuple!("@system"));
+
+ static assert(__traits(getFunctionAttributes, S.constF) == tuple!("const", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S.constF)) == tuple!("const", "@system"));
+
+ static assert(__traits(getFunctionAttributes, S.immutableF) == tuple!("immutable", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S.immutableF)) == tuple!("immutable", "@system"));
+
+ static assert(__traits(getFunctionAttributes, S.inoutF) == tuple!("inout", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S.inoutF)) == tuple!("inout", "@system"));
+
+ static assert(__traits(getFunctionAttributes, S.sharedF) == tuple!("shared", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S.sharedF)) == tuple!("shared", "@system"));
+
+ static assert(__traits(getFunctionAttributes, S.refF) == tuple!("ref", "return", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S.refF)) == tuple!("ref", "return", "@system"));
+
+ static assert(__traits(getFunctionAttributes, S.propertyF) == tuple!("@property", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(&S.propertyF)) == tuple!("@property", "@system"));
+
+ static assert(__traits(getFunctionAttributes, S.nothrowF) == tuple!("nothrow", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S.nothrowF)) == tuple!("nothrow", "@system"));
+
+ static assert(__traits(getFunctionAttributes, S.nogcF) == tuple!("@nogc", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S.nogcF)) == tuple!("@nogc", "@system"));
+
+ static assert(__traits(getFunctionAttributes, S.systemF) == tuple!("@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S.systemF)) == tuple!("@system"));
+
+ static assert(__traits(getFunctionAttributes, S.trustedF) == tuple!("@trusted"));
+ static assert(__traits(getFunctionAttributes, typeof(S.trustedF)) == tuple!("@trusted"));
+
+ static assert(__traits(getFunctionAttributes, S.safeF) == tuple!("@safe"));
+ static assert(__traits(getFunctionAttributes, typeof(S.safeF)) == tuple!("@safe"));
+
+ static assert(__traits(getFunctionAttributes, S.pureF) == tuple!("pure", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S.pureF)) == tuple!("pure", "@system"));
+
+ static assert(__traits(getFunctionAttributes, S.liveF) == tuple!("@live", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S.liveF)) == tuple!("@live", "@system"));
+
+ int pure_nothrow() nothrow pure { return 0; }
+ static ref int static_ref_property() @property { return *(new int); }
+ ref int ref_property() @property { return *(new int); }
+ void safe_nothrow() @safe nothrow { }
+ void live_nothrow() nothrow @live { }
+
+ static assert(__traits(getFunctionAttributes, pure_nothrow) == tuple!("pure", "nothrow", "@nogc", "@safe"));
+ static assert(__traits(getFunctionAttributes, typeof(pure_nothrow)) == tuple!("pure", "nothrow", "@nogc", "@safe"));
+
+ static assert(__traits(getFunctionAttributes, static_ref_property) == tuple!("pure", "nothrow", "@property", "ref", "@safe"));
+ static assert(__traits(getFunctionAttributes, typeof(&static_ref_property)) == tuple!("pure", "nothrow", "@property", "ref", "@safe"));
+
+ static assert(__traits(getFunctionAttributes, ref_property) == tuple!("pure", "nothrow", "@property", "ref", "@safe"));
+ static assert(__traits(getFunctionAttributes, typeof(&ref_property)) == tuple!("pure", "nothrow", "@property", "ref", "@safe"));
+
+ static assert(__traits(getFunctionAttributes, safe_nothrow) == tuple!("pure", "nothrow", "@nogc", "@safe"));
+ static assert(__traits(getFunctionAttributes, typeof(safe_nothrow)) == tuple!("pure", "nothrow", "@nogc", "@safe"));
+
+ static assert(__traits(getFunctionAttributes, live_nothrow) == tuple!("pure", "nothrow", "@nogc", "@live", "@safe"));
+ static assert(__traits(getFunctionAttributes, typeof(live_nothrow)) == tuple!("pure", "nothrow", "@nogc", "@live", "@safe"));
+
+ struct S2
+ {
+ int pure_const() const pure { return 0; }
+ int pure_sharedconst() const shared pure { return 0; }
+ }
+
+ static assert(__traits(getFunctionAttributes, S2.pure_const) == tuple!("const", "pure", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S2.pure_const)) == tuple!("const", "pure", "@system"));
+
+ static assert(__traits(getFunctionAttributes, S2.pure_sharedconst) == tuple!("const", "shared", "pure", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(S2.pure_sharedconst)) == tuple!("const", "shared", "pure", "@system"));
+
+ static assert(__traits(getFunctionAttributes, (int a) { }) == tuple!("pure", "nothrow", "@nogc", "@safe"));
+ static assert(__traits(getFunctionAttributes, typeof((int a) { })) == tuple!("pure", "nothrow", "@nogc", "@safe"));
+
+ auto safeDel = delegate() @safe { };
+ static assert(__traits(getFunctionAttributes, safeDel) == tuple!("pure", "nothrow", "@nogc", "@safe"));
+ static assert(__traits(getFunctionAttributes, typeof(safeDel)) == tuple!("pure", "nothrow", "@nogc", "@safe"));
+
+ auto trustedDel = delegate() @trusted { };
+ static assert(__traits(getFunctionAttributes, trustedDel) == tuple!("pure", "nothrow", "@nogc", "@trusted"));
+ static assert(__traits(getFunctionAttributes, typeof(trustedDel)) == tuple!("pure", "nothrow", "@nogc", "@trusted"));
+
+ auto systemDel = delegate() @system { };
+ static assert(__traits(getFunctionAttributes, systemDel) == tuple!("pure", "nothrow", "@nogc", "@system"));
+ static assert(__traits(getFunctionAttributes, typeof(systemDel)) == tuple!("pure", "nothrow", "@nogc", "@system"));
+}
diff --git a/gcc/testsuite/gdc.test/compilable/transition_in.d b/gcc/testsuite/gdc.test/compilable/transition_in.d
new file mode 100644
index 0000000..cc492a7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/transition_in.d
@@ -0,0 +1,26 @@
+// REQUIRED_ARGS: -transition=in
+/*
+TRANSFORM_OUTPUT: remove_lines(druntime)
+TEST_OUTPUT:
+---
+compilable/transition_in.d(3): Usage of 'in' on parameter
+compilable/transition_in.d(3): Usage of 'in' on parameter
+compilable/transition_in.d(8): Usage of 'in' on parameter
+compilable/transition_in.d(13): Usage of 'in' on parameter
+---
+*/
+#line 1
+struct Foobar
+{
+ void bar (in int a, in Object c);
+}
+
+version (none)
+{
+ void barfoo (in string arg);
+}
+
+void main ()
+{
+ void nested (in char c) {}
+}
diff --git a/gcc/testsuite/gdc.test/compilable/typeid_name.d b/gcc/testsuite/gdc.test/compilable/typeid_name.d
new file mode 100644
index 0000000..e77d5c8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/typeid_name.d
@@ -0,0 +1,14 @@
+
+
+string classname(Object o)
+{
+ return typeid(o).name;
+}
+
+class Panzer {}
+class Tiger : Panzer {}
+
+static assert (() {
+ Panzer p = new Tiger(); return classname(p);
+} () == "Tiger");
+
diff --git a/gcc/testsuite/gdc.test/compilable/uda.d b/gcc/testsuite/gdc.test/compilable/uda.d
index cb9413b..ac66c2f 100644
--- a/gcc/testsuite/gdc.test/compilable/uda.d
+++ b/gcc/testsuite/gdc.test/compilable/uda.d
@@ -1,5 +1,6 @@
/************************************************/
-// 15180: [REG2.069.0-b1] Segfault with empty struct used as UDA
+// https://issues.dlang.org/show_bug.cgi?id=15180
+// [REG2.069.0-b1] Segfault with empty struct used as UDA
struct foo { }
@foo bar () { }
diff --git a/gcc/testsuite/gdc.test/compilable/udamodule1.d b/gcc/testsuite/gdc.test/compilable/udamodule1.d
index 4631642..434cf51 100644
--- a/gcc/testsuite/gdc.test/compilable/udamodule1.d
+++ b/gcc/testsuite/gdc.test/compilable/udamodule1.d
@@ -1,9 +1,10 @@
// REQUIRED_ARGS:
// PERMUTE_ARGS:
+// EXTRA_FILES: imports/udamodule1.d
/*
TEST_OUTPUT:
---
-compilable/udamodule1.d(9): Deprecation: module imports.udamodule1 is deprecated - This module will be removed.
+compilable/udamodule1.d(10): Deprecation: module `imports.udamodule1` is deprecated - This module will be removed.
---
*/
import imports.udamodule1;
diff --git a/gcc/testsuite/gdc.test/compilable/udamodule2.d b/gcc/testsuite/gdc.test/compilable/udamodule2.d
index f2c0794..5002ae0 100644
--- a/gcc/testsuite/gdc.test/compilable/udamodule2.d
+++ b/gcc/testsuite/gdc.test/compilable/udamodule2.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/udamodule2.d imports/udamodule2a.d
import imports.udamodule2;
import imports.udamodule2a;
diff --git a/gcc/testsuite/gdc.test/compilable/union_initialization.d b/gcc/testsuite/gdc.test/compilable/union_initialization.d
new file mode 100644
index 0000000..96c2bf4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/union_initialization.d
@@ -0,0 +1,43 @@
+// https://issues.dlang.org/show_bug.cgi?id=20068
+
+union B
+{
+ int i;
+ int* p;
+ @safe this(int* p)
+ {
+ // Error: cannot access pointers in @safe code that overlap other fields
+ this.p = p;
+ }
+}
+
+/**************************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=21229
+
+struct NeedsInit
+{
+ int var;
+ @disable this();
+}
+
+union Union
+{
+ NeedsInit ni;
+}
+
+union Proxy
+{
+ Union union_;
+}
+
+struct S
+{
+ Union union_;
+ Proxy proxy;
+
+ this(NeedsInit arg)
+ {
+ union_.ni = arg;
+ proxy.union_.ni = arg;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/compilable/vcg-ast.d b/gcc/testsuite/gdc.test/compilable/vcg-ast.d
index 7cc376f..61767cc 100644
--- a/gcc/testsuite/gdc.test/compilable/vcg-ast.d
+++ b/gcc/testsuite/gdc.test/compilable/vcg-ast.d
@@ -1,6 +1,11 @@
+/*
+REQUIRED_ARGS: -vcg-ast -o-
+PERMUTE_ARGS:
+OUTPUT_FILES: compilable/vcg-ast.d.cg
+TEST_OUTPUT_FILE: extra-files/vcg-ast.d.cg
+*/
+
module vcg;
-// REQUIRED_ARGS: -vcg-ast -o-
-// PERMUTE_ARGS:
template Seq(A...)
{
@@ -41,3 +46,19 @@ class C
return 2;
}
}
+
+enum __c_wchar_t : dchar;
+alias wchar_t = __c_wchar_t;
+
+T[] values(T)()
+{
+ T[] values;
+ values ~= T();
+ return values;
+}
+
+void main()
+{
+ values!wchar_t;
+}
+
diff --git a/gcc/testsuite/gdc.test/compilable/version.d b/gcc/testsuite/gdc.test/compilable/version.d
new file mode 100644
index 0000000..00c5c80
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/version.d
@@ -0,0 +1,23 @@
+/* REQUIRED_ARGS:
+*/
+
+version (D_ModuleInfo)
+{ }
+else
+{
+ static assert(0);
+}
+
+version (D_Exceptions)
+{ }
+else
+{
+ static assert(0);
+}
+
+version (D_TypeInfo)
+{ }
+else
+{
+ static assert(0);
+} \ No newline at end of file
diff --git a/gcc/testsuite/gdc.test/compilable/vgc1.d b/gcc/testsuite/gdc.test/compilable/vgc1.d
index 87b35a4..8a11657 100644
--- a/gcc/testsuite/gdc.test/compilable/vgc1.d
+++ b/gcc/testsuite/gdc.test/compilable/vgc1.d
@@ -6,19 +6,17 @@
struct S1 { }
struct S2 { this(int); }
struct S3 { this(int) @nogc; }
-struct S4 { new(size_t); }
-struct S5 { @nogc new(size_t); }
/*
TEST_OUTPUT:
---
-compilable/vgc1.d(27): vgc: 'new' causes GC allocation
-compilable/vgc1.d(29): vgc: 'new' causes GC allocation
-compilable/vgc1.d(30): vgc: 'new' causes GC allocation
-compilable/vgc1.d(32): vgc: 'new' causes GC allocation
-compilable/vgc1.d(33): vgc: 'new' causes GC allocation
-compilable/vgc1.d(34): vgc: 'new' causes GC allocation
-compilable/vgc1.d(38): vgc: 'new' causes GC allocation
+compilable/vgc1.d(25): vgc: `new` causes a GC allocation
+compilable/vgc1.d(27): vgc: `new` causes a GC allocation
+compilable/vgc1.d(28): vgc: `new` causes a GC allocation
+compilable/vgc1.d(30): vgc: `new` causes a GC allocation
+compilable/vgc1.d(31): vgc: `new` causes a GC allocation
+compilable/vgc1.d(32): vgc: `new` causes a GC allocation
+compilable/vgc1.d(34): vgc: `new` causes a GC allocation
---
*/
@@ -32,8 +30,6 @@ void testNew()
S1* ps1 = new S1();
S2* ps2 = new S2(1);
S3* ps3 = new S3(1);
- S4* ps4 = new S4; // no error
- S5* ps5 = new S5; // no error
Object o1 = new Object();
}
@@ -41,12 +37,12 @@ void testNew()
/*
TEST_OUTPUT:
---
-compilable/vgc1.d(55): vgc: 'new' causes GC allocation
-compilable/vgc1.d(57): vgc: 'new' causes GC allocation
-compilable/vgc1.d(58): vgc: 'new' causes GC allocation
-compilable/vgc1.d(60): vgc: 'new' causes GC allocation
-compilable/vgc1.d(61): vgc: 'new' causes GC allocation
-compilable/vgc1.d(62): vgc: 'new' causes GC allocation
+compilable/vgc1.d(51): vgc: `new` causes a GC allocation
+compilable/vgc1.d(53): vgc: `new` causes a GC allocation
+compilable/vgc1.d(54): vgc: `new` causes a GC allocation
+compilable/vgc1.d(56): vgc: `new` causes a GC allocation
+compilable/vgc1.d(57): vgc: `new` causes a GC allocation
+compilable/vgc1.d(58): vgc: `new` causes a GC allocation
---
*/
@@ -60,8 +56,6 @@ void testNewScope()
scope S1* ps1 = new S1();
scope S2* ps2 = new S2(1);
scope S3* ps3 = new S3(1);
- scope S4* ps4 = new S4; // no error
- scope S5* ps5 = new S5; // no error
scope Object o1 = new Object(); // no error
scope o2 = new Object(); // no error
@@ -74,9 +68,12 @@ void testNewScope()
/*
TEST_OUTPUT:
---
-compilable/vgc1.d(84): vgc: 'delete' requires GC
-compilable/vgc1.d(85): vgc: 'delete' requires GC
-compilable/vgc1.d(86): vgc: 'delete' requires GC
+compilable/vgc1.d(81): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+compilable/vgc1.d(81): vgc: `delete` requires the GC
+compilable/vgc1.d(82): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+compilable/vgc1.d(82): vgc: `delete` requires the GC
+compilable/vgc1.d(83): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+compilable/vgc1.d(83): vgc: `delete` requires the GC
---
*/
void testDelete(int* p, Object o, S1* s)
diff --git a/gcc/testsuite/gdc.test/compilable/vgc2.d b/gcc/testsuite/gdc.test/compilable/vgc2.d
index b1a7f18..c895914 100644
--- a/gcc/testsuite/gdc.test/compilable/vgc2.d
+++ b/gcc/testsuite/gdc.test/compilable/vgc2.d
@@ -6,14 +6,14 @@
/*
TEST_OUTPUT:
---
-compilable/vgc2.d(21): vgc: operator ~ may cause GC allocation
-compilable/vgc2.d(22): vgc: operator ~ may cause GC allocation
-compilable/vgc2.d(23): vgc: operator ~ may cause GC allocation
-compilable/vgc2.d(25): vgc: operator ~ may cause GC allocation
-compilable/vgc2.d(26): vgc: operator ~ may cause GC allocation
-compilable/vgc2.d(27): vgc: operator ~ may cause GC allocation
-compilable/vgc2.d(28): vgc: operator ~ may cause GC allocation
-compilable/vgc2.d(29): vgc: operator ~ may cause GC allocation
+compilable/vgc2.d(21): vgc: operator `~` may cause a GC allocation
+compilable/vgc2.d(22): vgc: operator `~` may cause a GC allocation
+compilable/vgc2.d(23): vgc: operator `~` may cause a GC allocation
+compilable/vgc2.d(25): vgc: operator `~` may cause a GC allocation
+compilable/vgc2.d(26): vgc: operator `~` may cause a GC allocation
+compilable/vgc2.d(27): vgc: operator `~` may cause a GC allocation
+compilable/vgc2.d(28): vgc: operator `~` may cause a GC allocation
+compilable/vgc2.d(29): vgc: operator `~` may cause a GC allocation
---
*/
void testCat(int[] a, string s)
@@ -38,9 +38,9 @@ void testCat(int[] a, string s)
/*
TEST_OUTPUT:
---
-compilable/vgc2.d(48): vgc: operator ~= may cause GC allocation
-compilable/vgc2.d(50): vgc: operator ~= may cause GC allocation
-compilable/vgc2.d(51): vgc: operator ~= may cause GC allocation
+compilable/vgc2.d(48): vgc: operator `~=` may cause a GC allocation
+compilable/vgc2.d(50): vgc: operator `~=` may cause a GC allocation
+compilable/vgc2.d(51): vgc: operator `~=` may cause a GC allocation
---
*/
void testCatAssign(int[] a, string s)
@@ -58,8 +58,8 @@ int* barA();
/*
TEST_OUTPUT:
---
-compilable/vgc2.d(70): vgc: array literal may cause GC allocation
-compilable/vgc2.d(71): vgc: array literal may cause GC allocation
+compilable/vgc2.d(70): vgc: array literal may cause a GC allocation
+compilable/vgc2.d(71): vgc: array literal may cause a GC allocation
---
*/
void testArray()
@@ -76,8 +76,8 @@ void testArray()
/*
TEST_OUTPUT:
---
-compilable/vgc2.d(87): vgc: associative array literal may cause GC allocation
-compilable/vgc2.d(88): vgc: associative array literal may cause GC allocation
+compilable/vgc2.d(87): vgc: associative array literal may cause a GC allocation
+compilable/vgc2.d(88): vgc: associative array literal may cause a GC allocation
---
*/
void testAssocArray()
@@ -93,8 +93,8 @@ void testAssocArray()
/*
TEST_OUTPUT:
---
-compilable/vgc2.d(102): vgc: indexing an associative array may cause GC allocation
-compilable/vgc2.d(103): vgc: indexing an associative array may cause GC allocation
+compilable/vgc2.d(102): vgc: indexing an associative array may cause a GC allocation
+compilable/vgc2.d(103): vgc: indexing an associative array may cause a GC allocation
---
*/
void testIndex(int[int] aa)
diff --git a/gcc/testsuite/gdc.test/compilable/vgc3.d b/gcc/testsuite/gdc.test/compilable/vgc3.d
index 4bf889c..efdc5cd 100644
--- a/gcc/testsuite/gdc.test/compilable/vgc3.d
+++ b/gcc/testsuite/gdc.test/compilable/vgc3.d
@@ -6,9 +6,9 @@
/*
TEST_OUTPUT:
---
-compilable/vgc3.d(16): vgc: setting 'length' may cause GC allocation
-compilable/vgc3.d(17): vgc: setting 'length' may cause GC allocation
-compilable/vgc3.d(18): vgc: setting 'length' may cause GC allocation
+compilable/vgc3.d(16): vgc: setting `length` may cause a GC allocation
+compilable/vgc3.d(17): vgc: setting `length` may cause a GC allocation
+compilable/vgc3.d(18): vgc: setting `length` may cause a GC allocation
---
*/
void testArrayLength(int[] a)
diff --git a/gcc/testsuite/gdc.test/compilable/vtemplates.d b/gcc/testsuite/gdc.test/compilable/vtemplates.d
new file mode 100644
index 0000000..578d6c0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/vtemplates.d
@@ -0,0 +1,28 @@
+/* REQUIRED_ARGS: -vtemplates
+TEST_OUTPUT:
+---
+compilable/vtemplates.d(10): vtemplate: 4 (3 distinct) instantiation(s) of template `foo(int I)()` found
+compilable/vtemplates.d(11): vtemplate: 5 (2 distinct) instantiation(s) of template `goo1(int I)()` found
+compilable/vtemplates.d(12): vtemplate: 3 (2 distinct) instantiation(s) of template `goo2(int I)()` found
+---
+*/
+
+void foo(int I)() { }
+void goo1(int I)() { }
+void goo2(int I)() { goo1!(I); }
+
+void test()
+{
+ foo!(1)();
+ foo!(1)();
+ foo!(2)();
+ foo!(3)();
+
+ goo1!(1)();
+ goo1!(1)();
+ goo1!(2)();
+
+ goo2!(1)();
+ goo2!(2)();
+ goo2!(2)();
+}
diff --git a/gcc/testsuite/gdc.test/compilable/vtemplates_list.d b/gcc/testsuite/gdc.test/compilable/vtemplates_list.d
new file mode 100644
index 0000000..dd02e63
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/vtemplates_list.d
@@ -0,0 +1,46 @@
+/* REQUIRED_ARGS: -vtemplates=list-instances
+TEST_OUTPUT:
+---
+compilable/vtemplates_list.d(19): vtemplate: 4 (3 distinct) instantiation(s) of template `foo(int I)()` found, they are:
+compilable/vtemplates_list.d(25): vtemplate: explicit instance `foo!1`
+compilable/vtemplates_list.d(26): vtemplate: explicit instance `foo!1`
+compilable/vtemplates_list.d(27): vtemplate: explicit instance `foo!2`
+compilable/vtemplates_list.d(28): vtemplate: explicit instance `foo!3`
+compilable/vtemplates_list.d(20): vtemplate: 3 (1 distinct) instantiation(s) of template `goo1(int I)()` found, they are:
+compilable/vtemplates_list.d(30): vtemplate: explicit instance `goo1!1`
+compilable/vtemplates_list.d(31): vtemplate: explicit instance `goo1!1`
+compilable/vtemplates_list.d(21): vtemplate: implicit instance `goo1!1`
+compilable/vtemplates_list.d(21): vtemplate: 2 (1 distinct) instantiation(s) of template `goo2(int I)()` found, they are:
+compilable/vtemplates_list.d(33): vtemplate: explicit instance `goo2!1`
+compilable/vtemplates_list.d(34): vtemplate: explicit instance `goo2!1`
+compilable/vtemplates_list.d(52): vtemplate: 1 (1 distinct) instantiation(s) of template `A()` found, they are:
+compilable/vtemplates_list.d-mixin-53(53): vtemplate: explicit instance `A!()`
+---
+*/
+
+#line 19
+void foo(int I)() { }
+void goo1(int I)() { }
+void goo2(int I)() { goo1!(I); }
+
+void test()
+{
+ foo!(1)();
+ foo!(1)();
+ foo!(2)();
+ foo!(3)();
+
+ goo1!(1)();
+ goo1!(1)();
+
+ goo2!(1)();
+ goo2!(1)();
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=21489
+#line 50
+void test2()
+{
+ template A() {}
+ alias ta = mixin("A!()");
+}
diff --git a/gcc/testsuite/gdc.test/compilable/warn3882.d b/gcc/testsuite/gdc.test/compilable/warn3882.d
index d981a47..f02a87b 100644
--- a/gcc/testsuite/gdc.test/compilable/warn3882.d
+++ b/gcc/testsuite/gdc.test/compilable/warn3882.d
@@ -10,7 +10,7 @@ void test3882()
}
/******************************************/
-// 12619
+// https://issues.dlang.org/show_bug.cgi?id=12619
extern (C) @system nothrow pure void* memcpy(void* s1, in void* s2, size_t n);
// -> weakly pure
@@ -22,7 +22,7 @@ void test12619() pure
}
/******************************************/
-// 12760
+// https://issues.dlang.org/show_bug.cgi?id=12760
struct S12760(T)
{
@@ -41,11 +41,11 @@ struct K12760
}
/******************************************/
-// 12909
+// https://issues.dlang.org/show_bug.cgi?id=12909
int f12909(immutable(int[])[int] aa) pure nothrow
{
- //aa[0] = []; // fix for issue 13701
+ //aa[0] = []; // fix for https://issues.dlang.org/show_bug.cgi?id=13701
return 0;
}
@@ -60,7 +60,7 @@ void test12909()
}
/******************************************/
-// 13899
+// https://issues.dlang.org/show_bug.cgi?id=13899
const struct Foo13899
{
diff --git a/gcc/testsuite/gdc.test/compilable/zerosize.d b/gcc/testsuite/gdc.test/compilable/zerosize.d
new file mode 100644
index 0000000..6e26deb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/zerosize.d
@@ -0,0 +1,17 @@
+
+extern (C) struct S { }
+
+version (CRuntime_Microsoft)
+ static assert(S.sizeof == 4);
+else
+ static assert(S.sizeof == 0);
+
+version (CRuntime_DigitalMars)
+ static assert(S.alignof == 0);
+else
+ static assert(S.alignof == 1);
+
+extern (C++) struct T { }
+
+static assert(T.sizeof == 1);
+static assert(T.alignof == 1);
diff --git a/gcc/testsuite/gdc.test/fail_compilation/aacmp10381.d b/gcc/testsuite/gdc.test/fail_compilation/aacmp10381.d
index 397f36d..b088891 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/aacmp10381.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/aacmp10381.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/aacmp10381.d(12): Error: > is not defined for associative arrays
+fail_compilation/aacmp10381.d(12): Error: `>` is not defined for associative arrays
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/aliasassign.d b/gcc/testsuite/gdc.test/fail_compilation/aliasassign.d
new file mode 100644
index 0000000..499bef1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/aliasassign.d
@@ -0,0 +1,21 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/aliasassign.d(13): Error: `B` must have same parent `Swap!(int, string)` as alias `B`
+fail_compilation/aliasassign.d(14): Error: `A` must have same parent `Swap!(int, string)` as alias `A`
+fail_compilation/aliasassign.d(21): Error: template instance `aliasassign.Swap!(int, string)` error instantiating
+fail_compilation/aliasassign.d(21): while evaluating: `static assert(Swap!(int, string))`
+---
+*/
+
+template Swap (alias A, alias B)
+{
+ alias C = A;
+ B = A;
+ A = B;
+ enum Swap = true;
+}
+
+alias A = int;
+alias B = string;
+
+static assert(Swap!(A, B));
diff --git a/gcc/testsuite/gdc.test/fail_compilation/aliasassign1.d b/gcc/testsuite/gdc.test/fail_compilation/aliasassign1.d
new file mode 100644
index 0000000..df3f43a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/aliasassign1.d
@@ -0,0 +1,34 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/aliasassign1.d(106): Error: A was read, so cannot reassign
+fail_compilation/aliasassign1.d(110): Error: template instance `aliasassign1.staticMap!(Unqual, int, const(uint))` error instantiating
+fail_compilation/aliasassign1.d(112): Error: static assert: `is(TK == AliasSeq!(int, uint))` is false
+---
+ */
+
+template AliasSeq(T...) { alias AliasSeq = T; }
+
+template Unqual(T)
+{
+ static if (is(T U == const U))
+ alias Unqual = U;
+ else static if (is(T U == immutable U))
+ alias Unqual = U;
+ else
+ alias Unqual = T;
+}
+
+#line 100
+
+template staticMap(alias F, T...)
+{
+ alias A = AliasSeq!();
+ alias B = A;
+ static foreach (t; T)
+ A = AliasSeq!(A, F!t); // what's tested
+ alias staticMap = A;
+}
+
+alias TK = staticMap!(Unqual, int, const uint);
+//pragma(msg, TK);
+static assert(is(TK == AliasSeq!(int, uint)));
diff --git a/gcc/testsuite/gdc.test/fail_compilation/already_defined.d b/gcc/testsuite/gdc.test/fail_compilation/already_defined.d
new file mode 100644
index 0000000..7a97e09
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/already_defined.d
@@ -0,0 +1,76 @@
+/**
+TEST_OUTPUT:
+---
+fail_compilation/already_defined.d(4): Error: declaration `already_defined.func1.a` is already defined
+fail_compilation/already_defined.d(3): `variable` `a` is defined here
+fail_compilation/already_defined.d(10): Error: declaration `already_defined.func2.core` is already defined
+fail_compilation/already_defined.d(9): `import` `core` is defined here
+fail_compilation/already_defined.d(28): Error: declaration `Ident(T)` is already defined
+fail_compilation/already_defined.d(27): `template` `Ident(T)` is defined here
+fail_compilation/already_defined.d(36): Error: declaration `Tstring` is already defined
+fail_compilation/already_defined.d(35): `alias` `Tstring` is defined here
+fail_compilation/already_defined.d(42): Error: declaration `T` is already defined
+fail_compilation/already_defined.d(41): `alias` `T` is defined here
+fail_compilation/already_defined.d(48): Error: declaration `core` is already defined
+fail_compilation/already_defined.d(47): `import` `core` is defined here
+fail_compilation/already_defined.d(54): Error: declaration `core` is already defined
+fail_compilation/already_defined.d(53): `import` `core` is defined here
+---
+*/
+
+#line 1
+void func1 ()
+{
+ int a;
+ bool a;
+}
+
+void func2 ()
+{
+ import core.stdc.stdio;
+ string core;
+}
+
+void func3 ()
+{
+ {
+ import core.stdc.stdio;
+ }
+
+ {
+ // No conflict
+ string core;
+ }
+}
+
+void func4 ()
+{
+ template Ident (T) { alias Ident = T; }
+ template Ident (T) { alias Ident = T; }
+}
+
+void func5 ()
+{
+ template Ident (T) { alias Ident = T; }
+
+ alias Tstring = Ident!string;
+ alias Tstring = Ident!string;
+}
+
+void func6 ()
+{
+ static if (is(int T == int)) {}
+ static if (is(int T == int)) {}
+}
+
+void func7 ()
+{
+ import core.stdc.stdio;
+ static if (is(int core == int)) {}
+}
+
+void func8 ()
+{
+ import core.stdc.stdio;
+ static if (is(string : core[], core)) {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b15069.d b/gcc/testsuite/gdc.test/fail_compilation/b15069.d
new file mode 100644
index 0000000..4ff4266
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/b15069.d
@@ -0,0 +1,21 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/b15069.d(15): Error: template instance `T!int` `T` is not a template declaration, it is a alias
+fail_compilation/b15069.d(10): Error: template instance `b15069.Stuff!(Thing!float)` error instantiating
+---
+*/
+void main()
+{
+ Stuff!(Thing!(float)) s;
+}
+
+struct Stuff(T)
+{
+ T!(int) var;
+}
+
+struct Thing(T)
+{
+ T varling;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b15875.d b/gcc/testsuite/gdc.test/fail_compilation/b15875.d
index daa79b7..15f362b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/b15875.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/b15875.d
@@ -1,6 +1,6 @@
/* TEST_OUTPUT:
---
-fail_compilation/b15875.d(9): Error: circular reference to variable `a`
+fail_compilation/b15875.d(9): Error: undefined identifier `a`
fail_compilation/b15875.d(10): Error: circular reference to `b15875.f`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b15909.d b/gcc/testsuite/gdc.test/fail_compilation/b15909.d
new file mode 100644
index 0000000..22c58da
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/b15909.d
@@ -0,0 +1,15 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/b15909.d(12): Error: duplicate `case 'a'` in `switch` statement
+---
+*/
+
+void main()
+{
+ switch ('a')
+ {
+ case 'a':
+ case 'a':
+ break;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b17918.d b/gcc/testsuite/gdc.test/fail_compilation/b17918.d
new file mode 100644
index 0000000..00f2b76
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/b17918.d
@@ -0,0 +1,13 @@
+/*
+EXTRA_FILES: imports/b17918a.d
+TEST_OUTPUT:
+---
+fail_compilation/imports/b17918a.d(7): Error: undefined identifier `_listMap`
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=17918
+import imports.b17918a;
+
+class Derived : Base
+{
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b19523.d b/gcc/testsuite/gdc.test/fail_compilation/b19523.d
new file mode 100644
index 0000000..3626666
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/b19523.d
@@ -0,0 +1,18 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/b19523.d(12): Error: undefined identifier `SomeStruct`
+fail_compilation/b19523.d(13): Error: function `b19523.foo(int delegate() arg)` is not callable using argument types `(_error_)`
+fail_compilation/b19523.d(13): cannot pass argument `__lambda2` of type `_error_` to parameter `int delegate() arg`
+---
+*/
+module b19523;
+
+void bar () {
+ SomeStruct s;
+ foo({
+ return s;
+ });
+}
+
+void foo (int delegate() arg) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b19685.d b/gcc/testsuite/gdc.test/fail_compilation/b19685.d
new file mode 100644
index 0000000..99addd8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/b19685.d
@@ -0,0 +1,19 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/b19685.d(6): Error: overlapping default initialization for field `b` and `a`
+---
+*/
+struct S
+{
+ union
+ {
+ struct { int a = 123; }
+ struct { int b = 456; }
+ }
+}
+
+void main()
+{
+ S s;
+ assert(s.b == 123);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b19691.d b/gcc/testsuite/gdc.test/fail_compilation/b19691.d
index 8663512..d01c764 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/b19691.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/b19691.d
@@ -1,8 +1,7 @@
// REQUIRED_ARGS: -de
/* TEST_OUTPUT:
---
-fail_compilation/b19691.d(13): Error: forward reference to template `this`
-fail_compilation/b19691.d(19): Deprecation: constructor `b19691.S2.this` all parameters have default arguments, but structs cannot have default constructors.
+fail_compilation/b19691.d(12): Error: forward reference to template `this`
---
*/
// https://issues.dlang.org/show_bug.cgi?id=19691
@@ -10,11 +9,11 @@ module b19691;
struct S1 {
this(T...)(T) {
- S2("");
+ S2(42, "");
}
}
struct S2 {
- this(string) {}
- this(S1 s = null) {}
+ this(int a, string) {}
+ this(int a, S1 s = null) {}
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b19691e.d b/gcc/testsuite/gdc.test/fail_compilation/b19691e.d
index 21d0e90..1b8aa1c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/b19691e.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/b19691e.d
@@ -1,10 +1,9 @@
// REQUIRED_ARGS: -de
/* TEST_OUTPUT:
---
-fail_compilation/b19691e.d(17): Error: forward reference to template `this`
-fail_compilation/b19691e.d(17): Error: constructor `b19691e.S2.this(S1 s = "")` is not callable using argument types `(string)`
-fail_compilation/b19691e.d(17): Error: forward reference to template `this`
-fail_compilation/b19691e.d(23): Deprecation: constructor `b19691e.S2.this` all parameters have default arguments, but structs cannot have default constructors.
+fail_compilation/b19691e.d(16): Error: forward reference to template `this`
+fail_compilation/b19691e.d(16): Error: constructor `b19691e.S2.this(int a, S1 s = "")` is not callable using argument types `(int, string)`
+fail_compilation/b19691e.d(16): Error: forward reference to template `this`
---
*/
// https://issues.dlang.org/show_bug.cgi?id=19691
@@ -14,11 +13,11 @@ struct S1
{
this(T)(T)
{
- S2("");
+ S2(42, "");
}
}
struct S2
{
- this(S1 s = ""){}
+ this(int a, S1 s = ""){}
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b19717a.d b/gcc/testsuite/gdc.test/fail_compilation/b19717a.d
index 79a9de0..d10b3f9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/b19717a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/b19717a.d
@@ -3,9 +3,9 @@
---
fail_compilation/b19717a.d(14): Error: forward reference to template `a`
fail_compilation/b19717a.d(14): Error: forward reference to template `a`
-fail_compilation/b19717a.d(14): Error: none of the overloads of `a` are callable using argument types `()`, candidates are:
-fail_compilation/b19717a.d(13): `b19717a.a(int b)`
-fail_compilation/b19717a.d(14): `b19717a.a(int b = a)`
+fail_compilation/b19717a.d(14): Error: none of the overloads of `a` are callable using argument types `()`
+fail_compilation/b19717a.d(13): Candidates are: `b19717a.a(int b)`
+fail_compilation/b19717a.d(14): `b19717a.a(int b = a)`
---
*/
module b19717a;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b19730.d b/gcc/testsuite/gdc.test/fail_compilation/b19730.d
new file mode 100644
index 0000000..903d629
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/b19730.d
@@ -0,0 +1,12 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/b19730.d(10): Error: found `)` while expecting `=` or identifier
+fail_compilation/b19730.d(11): Error: found `)` while expecting `=` or identifier
+---
+*/
+void func() {
+ bool x;
+ if (const x) {}
+ if (auto x) {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b20011.d b/gcc/testsuite/gdc.test/fail_compilation/b20011.d
new file mode 100644
index 0000000..669dd10
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/b20011.d
@@ -0,0 +1,40 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/b20011.d(25): Error: `S1(cast(ubyte)0u).member` is not an lvalue and cannot be modified
+fail_compilation/b20011.d(28): Error: `S2(null).member` is not an lvalue and cannot be modified
+fail_compilation/b20011.d(29): Error: `S2(null).member` is not an lvalue and cannot be modified
+fail_compilation/b20011.d(32): Error: `U1(cast(ubyte)0u, ).m2` is not an lvalue and cannot be modified
+fail_compilation/b20011.d(37): Error: function `b20011.main.assignableByRef(ref ubyte p)` is not callable using argument types `(ubyte)`
+fail_compilation/b20011.d(37): cannot pass rvalue argument `S1(cast(ubyte)0u).member` of type `ubyte` to parameter `ref ubyte p`
+fail_compilation/b20011.d(38): Error: function `b20011.main.assignableByOut(out ubyte p)` is not callable using argument types `(ubyte)`
+fail_compilation/b20011.d(38): cannot pass rvalue argument `S1(cast(ubyte)0u).member` of type `ubyte` to parameter `out ubyte p`
+fail_compilation/b20011.d(39): Error: function `b20011.main.assignableByConstRef(ref const(ubyte) p)` is not callable using argument types `(ubyte)`
+fail_compilation/b20011.d(39): cannot pass rvalue argument `S1(cast(ubyte)0u).member` of type `ubyte` to parameter `ref const(ubyte) p`
+---
+*/
+module b20011;
+
+struct S1 { ubyte member; }
+struct S2 { ubyte[] member; }
+union U1 { ubyte m1; int m2; }
+
+void main()
+{
+ enum S1 s1 = {};
+ s1.member = 42;
+
+ enum S2 s2 = {};
+ s2.member = [];
+ s2.member ~= [];
+
+ enum U1 u1 = {m1 : 0};
+ u1.m2 = 42;
+
+ void assignableByRef(ref ubyte p){ p = 42; }
+ void assignableByOut(out ubyte p){ p = 42; }
+ void assignableByConstRef(ref const ubyte p){}
+ assignableByRef(s1.member);
+ assignableByOut(s1.member);
+ assignableByConstRef(s1.member);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b20780.d b/gcc/testsuite/gdc.test/fail_compilation/b20780.d
new file mode 100644
index 0000000..ec6917b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/b20780.d
@@ -0,0 +1,11 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/b20780.d(10): Error: `@identifier` or `@(ArgumentList)` expected, not `@)`
+fail_compilation/b20780.d(11): Error: `@identifier` or `@(ArgumentList)` expected, not `@,`
+fail_compilation/b20780.d(11): Error: basic type expected, not `,`
+---
+*/
+
+void f(@){}
+void g(@,){}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b20875.d b/gcc/testsuite/gdc.test/fail_compilation/b20875.d
new file mode 100644
index 0000000..8fd8505
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/b20875.d
@@ -0,0 +1,27 @@
+module b20875;
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/b20875.d(10): Error: template instance `Foo!int` does not match template declaration `Foo(alias T : None!U, U...)`
+fail_compilation/b20875.d(10): while evaluating: `static assert(Foo!int)`
+fail_compilation/b20875.d(11): Error: template instance `Bar!int` does not match template declaration `Bar(alias T : None!U, U...)`
+fail_compilation/b20875.d(11): while evaluating: `static assert(!Bar!int)`
+fail_compilation/b20875.d(14): Error: template parameter specialization for a type must be a type and not `NotAType()`
+fail_compilation/b20875.d(15): while looking for match for `Baz!int`
+fail_compilation/b20875.d(15): while evaluating: `static assert(!Baz!int)`
+---
+*/
+
+#line 7
+
+enum Foo(alias T : None!U, U...) = true;
+enum Bar(alias T : None!U, U...) = false;
+static assert( Foo!(int));
+static assert(!Bar!(int));
+
+template NotAType(){}
+enum Baz(alias T : NotAType) = false;
+static assert(!Baz!(int));
+
+void main(){}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b3841.d b/gcc/testsuite/gdc.test/fail_compilation/b3841.d
index 4a99e9a..ceddc87 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/b3841.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/b3841.d
@@ -1,24 +1,25 @@
-// PERMUTE_ARGS:
// REQUIRED_ARGS: -w -o-
/*
TEST_OUTPUT:
---
-fail_compilation/b3841.d-mixin-31(31): Warning: char += float is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: int += float is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: long += double is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: char -= float is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: int -= float is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: long -= double is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: char *= float is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: int *= float is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: long *= double is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: char /= float is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: int /= float is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: long /= double is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: char %= float is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: int %= float is performing truncating conversion
-fail_compilation/b3841.d-mixin-31(31): Warning: long %= double is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `char += float` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `int += float` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `long += double` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `char -= float` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `int -= float` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `long -= double` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `char *= float` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `int *= float` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `long *= double` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `char /= float` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `int /= float` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `long /= double` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `char %= float` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `int %= float` is performing truncating conversion
+fail_compilation/b3841.d-mixin-32(32): Warning: `long %= double` is performing truncating conversion
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
@@ -45,7 +46,6 @@ void main()
f!(op, long, int)();
f!(op, long, short)();
f!(op, float, long)();
- f!(op, cfloat, long)();
f!(op, double, float)();
// Should that really be OK ?
@@ -58,15 +58,6 @@ void main()
f!(op, long, double)();
}
- foreach (string op; Ops!("+=", "-="))
- {
- // OK
- f!(op, idouble, ifloat)();
-
- // Should that really be OK ?
- f!(op, ifloat, idouble)();
- }
-
// OK
f!("^^=", int, int)();
f!("^^=", long, int)();
@@ -75,4 +66,4 @@ void main()
f!("^^=", double, float)();
// Should that really be OK ?
f!("^^=", float, double)();
-} \ No newline at end of file
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/b6227.d b/gcc/testsuite/gdc.test/fail_compilation/b6227.d
new file mode 100644
index 0000000..a9b2a50
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/b6227.d
@@ -0,0 +1,17 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/b6227.d(16): Error: Comparison between different enumeration types `X` and `Y`; If this behavior is intended consider using `std.conv.asOriginalType`
+fail_compilation/b6227.d(16): while evaluating: `static assert(!(X.O != Y.U))`
+fail_compilation/b6227.d(17): Error: Comparison between different enumeration types `X` and `Y`; If this behavior is intended consider using `std.conv.asOriginalType`
+fail_compilation/b6227.d(17): while evaluating: `static assert(X.O == Y.U)`
+---
+*/
+enum X {
+ O,
+ R
+}
+enum Y {
+ U
+}
+static assert(!(X.O != Y.U));
+static assert( (X.O == Y.U));
diff --git a/gcc/testsuite/gdc.test/fail_compilation/betterc.d b/gcc/testsuite/gdc.test/fail_compilation/betterc.d
new file mode 100644
index 0000000..e1cc4cf
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/betterc.d
@@ -0,0 +1,30 @@
+/* REQUIRED_ARGS: -betterC
+ * TEST_OUTPUT:
+---
+fail_compilation/betterc.d(12): Error: Cannot use `throw` statements with -betterC
+fail_compilation/betterc.d(17): Error: Cannot use try-catch statements with -betterC
+fail_compilation/betterc.d(29): Error: `TypeInfo` cannot be used with -betterC
+---
+*/
+
+void test()
+{
+ throw new Exception("msg");
+}
+
+void test2()
+{
+ try
+ {
+ test();
+ }
+ catch (Exception e)
+ {
+ }
+}
+
+void test3()
+{
+ int i;
+ auto ti = typeid(i);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/bug15613.d b/gcc/testsuite/gdc.test/fail_compilation/bug15613.d
index e8072fd..5b16f72 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/bug15613.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/bug15613.d
@@ -16,3 +16,18 @@ void main()
f(null);
g(8);
}
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/bug15613.d(32): Error: function `bug15613.h(int[]...)` is not callable using argument types `(int, void function(int[]...))`
+fail_compilation/bug15613.d(32): cannot pass argument `& h` of type `void function(int[]...)` to parameter `int[]...`
+---
+*/
+
+void h(int[]...);
+
+void test()
+{
+ h(7, &h);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/bug16165.d b/gcc/testsuite/gdc.test/fail_compilation/bug16165.d
index fdfbf73..1818e0d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/bug16165.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/bug16165.d
@@ -2,9 +2,9 @@ void f(int x, Object y);
void g()
{
- Object o;
- f(o, o, 404);
- f(5, 6, 404);
+ Object o;
+ f(o, o, 404);
+ f(5, 6, 404);
}
/*
diff --git a/gcc/testsuite/gdc.test/fail_compilation/bug18743.d b/gcc/testsuite/gdc.test/fail_compilation/bug18743.d
new file mode 100644
index 0000000..9d2f888
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/bug18743.d
@@ -0,0 +1,22 @@
+// REQUIRED_ARGS:
+/*
+TEST_OUTPUT:
+---
+fail_compilation/bug18743.d(18): Error: `a ? a = 4 : a` must be surrounded by parentheses when next to operator `=`
+fail_compilation/bug18743.d(19): Error: `a ? --a : a` must be surrounded by parentheses when next to operator `+=`
+---
+*/
+
+void main()
+{
+ int a;
+
+ // ok
+ (a ? a = 4 : a) = 5;
+ a ? a = 4 : (a = 5);
+
+ a ? a = 4 : a = 5;
+ a ? --a : a += 1;
+
+ a ? a = 4 : a++; // ok
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/bug19569.d b/gcc/testsuite/gdc.test/fail_compilation/bug19569.d
new file mode 100644
index 0000000..a314142
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/bug19569.d
@@ -0,0 +1,90 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/bug19569.d(70): Error: `bug19569.test0` called with argument types `()` matches both:
+fail_compilation/bug19569.d(56): `bug19569.test0()`
+and:
+fail_compilation/bug19569.d(57): `bug19569.test0()`
+fail_compilation/bug19569.d(71): Error: `bug19569.test1` called with argument types `()` matches both:
+fail_compilation/bug19569.d(59): `bug19569.test1()`
+and:
+fail_compilation/bug19569.d(60): `bug19569.test1()`
+fail_compilation/bug19569.d(72): Error: `bug19569.test2` called with argument types `()` matches both:
+fail_compilation/bug19569.d(62): `bug19569.test2!().test2()`
+and:
+fail_compilation/bug19569.d(63): `bug19569.test2!().test2()`
+fail_compilation/bug19569.d(73): Error: `bug19569.test3` called with argument types `()` matches both:
+fail_compilation/bug19569.d(65): `bug19569.test3!().test3()`
+and:
+fail_compilation/bug19569.d(66): `bug19569.test3!().test3()`
+fail_compilation/bug19569.d(78): Error: `bug19569.test0` called with argument types `()` matches both:
+fail_compilation/bug19569.d(56): `bug19569.test0()`
+and:
+fail_compilation/bug19569.d(57): `bug19569.test0()`
+fail_compilation/bug19569.d(79): Error: `bug19569.test1` called with argument types `()` matches both:
+fail_compilation/bug19569.d(59): `bug19569.test1()`
+and:
+fail_compilation/bug19569.d(60): `bug19569.test1()`
+fail_compilation/bug19569.d(80): Error: `bug19569.test2` called with argument types `()` matches both:
+fail_compilation/bug19569.d(62): `bug19569.test2!().test2()`
+and:
+fail_compilation/bug19569.d(63): `bug19569.test2!().test2()`
+fail_compilation/bug19569.d(81): Error: `bug19569.test3` called with argument types `()` matches both:
+fail_compilation/bug19569.d(65): `bug19569.test3!().test3()`
+and:
+fail_compilation/bug19569.d(66): `bug19569.test3!().test3()`
+fail_compilation/bug19569.d(86): Error: `bug19569.test0` called with argument types `()` matches both:
+fail_compilation/bug19569.d(56): `bug19569.test0()`
+and:
+fail_compilation/bug19569.d(57): `bug19569.test0()`
+fail_compilation/bug19569.d(87): Error: `bug19569.test1` called with argument types `()` matches both:
+fail_compilation/bug19569.d(59): `bug19569.test1()`
+and:
+fail_compilation/bug19569.d(60): `bug19569.test1()`
+fail_compilation/bug19569.d(88): Error: `bug19569.test2` called with argument types `()` matches both:
+fail_compilation/bug19569.d(62): `bug19569.test2!().test2()`
+and:
+fail_compilation/bug19569.d(63): `bug19569.test2!().test2()`
+fail_compilation/bug19569.d(89): Error: `bug19569.test3` called with argument types `()` matches both:
+fail_compilation/bug19569.d(65): `bug19569.test3!().test3()`
+and:
+fail_compilation/bug19569.d(66): `bug19569.test3!().test3()`
+---
+*/
+
+
+void test0();
+void test0() nothrow;
+
+void test1();
+void test1() @nogc;
+
+void test2()();
+void test2()() nothrow;
+
+void test3()();
+void test3()() @nogc;
+
+void attr0()
+{
+ test0();
+ test1();
+ test2();
+ test3();
+}
+
+void attr1() @nogc
+{
+ test0();
+ test1();
+ test2();
+ test3();
+}
+
+void attr3() nothrow @nogc
+{
+ test0();
+ test1();
+ test2();
+ test3();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/bug8891.d b/gcc/testsuite/gdc.test/fail_compilation/bug8891.d
index b58256e..e7316c3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/bug8891.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/bug8891.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/bug8891.d(21): Error: need 'this' for 'opCall' of type 'S(int n)'
+fail_compilation/bug8891.d(21): Error: need `this` for `opCall` of type `S(int n)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/bug9631.d b/gcc/testsuite/gdc.test/fail_compilation/bug9631.d
index 852eaae..33ea0cd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/bug9631.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/bug9631.d
@@ -23,8 +23,7 @@ void main()
/*
TEST_OUTPUT:
---
-fail_compilation/bug9631.d(41): Error: incompatible types for ((x) == (y)): 'bug9631.S' and 'bug9631.tem!
-).S'
+fail_compilation/bug9631.d(41): Error: incompatible types for `(x) == (y)`: `bug9631.S` and `bug9631.tem!().S`
---
*/
@@ -45,18 +44,30 @@ void equal()
/*
TEST_OUTPUT:
---
-fail_compilation/bug9631.d(79): Error: function `bug9631.arg.f(int i, S s)` is not callable using argumen
- types `(int, S)`
-fail_compilation/bug9631.d(79): cannot pass argument `y` of type `bug9631.tem!().S` to parameter `
-ug9631.S s`
-fail_compilation/bug9631.d(80): Error: function literal `__lambda2(S s)` is not callable using argument t
-pes `(S)`
-fail_compilation/bug9631.d(80): cannot pass argument `x` of type `bug9631.S` to parameter `bug9631
-tem!().S s`
-fail_compilation/bug9631.d(86): Error: constructor `bug9631.arg.A.this(S _param_0)` is not callable using
-argument types `(S)`
-fail_compilation/bug9631.d(86): cannot pass argument `S(0)` of type `bug9631.tem!().S` to paramete
- `bug9631.S _param_0`
+fail_compilation/bug9631.d(55): Error: cannot cast expression `x` of type `bug9631.S` to `bug9631.tem!().S` because of different sizes
+fail_compilation/bug9631.d(58): Error: cannot cast expression `ta` of type `bug9631.tem!().S[1]` to `bug9631.S[1]` because of different sizes
+fail_compilation/bug9631.d(59): Error: cannot cast expression `sa` of type `S[1]` to `S[]` since sizes don't line up
+---
+*/
+void test3()
+{
+ S x;
+ auto y = cast(tem!().S)x;
+
+ tem!().S[1] ta;
+ S[1] sa = cast(S[1])ta;
+ auto t2 = cast(tem!().S[])sa;
+}
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/bug9631.d(79): Error: function `bug9631.arg.f(int i, S s)` is not callable using argument types `(int, S)`
+fail_compilation/bug9631.d(79): cannot pass argument `y` of type `bug9631.tem!().S` to parameter `bug9631.S s`
+fail_compilation/bug9631.d(80): Error: function literal `__lambda4(S s)` is not callable using argument types `(S)`
+fail_compilation/bug9631.d(80): cannot pass argument `x` of type `bug9631.S` to parameter `bug9631.tem!().S s`
+fail_compilation/bug9631.d(86): Error: constructor `bug9631.arg.A.this(S _param_0)` is not callable using argument types `(S)`
+fail_compilation/bug9631.d(86): cannot pass argument `S(0)` of type `bug9631.tem!().S` to parameter `bug9631.S _param_0`
---
*/
void arg()
@@ -80,10 +91,10 @@ TEST_OUTPUT:
---
fail_compilation/bug9631.d(106): Error: function `bug9631.targ.ft!().ft(S _param_0)` is not callable using argument types `(S)`
fail_compilation/bug9631.d(106): cannot pass argument `x` of type `bug9631.S` to parameter `bug9631.tem!().S _param_0`
-fail_compilation/bug9631.d(107): Error: template `bug9631.targ.ft` cannot deduce function from argument types `!()(S)`, candidates are:
-fail_compilation/bug9631.d(105): `bug9631.targ.ft()(tem!().S)`
-fail_compilation/bug9631.d(109): Error: template `bug9631.targ.ft2` cannot deduce function from argument types `!()(S, int)`, candidates are:
-fail_compilation/bug9631.d(108): `bug9631.targ.ft2(T)(S, T)`
+fail_compilation/bug9631.d(107): Error: template `bug9631.targ.ft` cannot deduce function from argument types `!()(S)`
+fail_compilation/bug9631.d(105): Candidate is: `ft()(tem!().S)`
+fail_compilation/bug9631.d(109): Error: template `bug9631.targ.ft2` cannot deduce function from argument types `!()(S, int)`
+fail_compilation/bug9631.d(108): Candidate is: `ft2(T)(S, T)`
---
*/
void targ()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ccast.d b/gcc/testsuite/gdc.test/fail_compilation/ccast.d
new file mode 100644
index 0000000..b4897d4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ccast.d
@@ -0,0 +1,9 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ccast.d(9): Error: C style cast illegal, use `cast(byte)i`
+---
+*/
+
+int i;
+byte b = (byte)i;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/checkimports2.d b/gcc/testsuite/gdc.test/fail_compilation/checkimports2.d
new file mode 100644
index 0000000..44c237f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/checkimports2.d
@@ -0,0 +1,30 @@
+// EXTRA_FILES: imports/imp1.d imports/imp2.d
+/*
+TEST_OUTPUT:
+---
+fail_compilation/checkimports2.d(25): Error: no property `X` for type `checkimports2.B`, did you mean `imports.imp2.X`?
+fail_compilation/checkimports2.d(25): while evaluating: `static assert((B).X == 0)`
+fail_compilation/checkimports2.d(26): Error: no property `Y` for type `checkimports2.B`, did you mean `imports.imp2.Y`?
+fail_compilation/checkimports2.d(26): while evaluating: `static assert((B).Y == 2)`
+---
+*/
+
+import imports.imp1;
+
+enum X = 0;
+
+class B
+{
+ import imports.imp2;
+ static assert(X == 0); // imp2.X --> .X
+ int[Y] aa; // imp2.Y
+}
+
+class C : B
+{
+ static assert(B.X == 0); // imp2.X --> error
+ static assert(B.Y == 2); // imp2.Y --> error
+
+ static assert(X == 0); // imp2.X --> .X
+ static assert(Y == 1); // imp2.Y --> imp1.Y
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/checkimports2a.d b/gcc/testsuite/gdc.test/fail_compilation/checkimports2a.d
deleted file mode 100644
index abec424..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/checkimports2a.d
+++ /dev/null
@@ -1,32 +0,0 @@
-// REQUIRED_ARGS:
-/*
-TEST_OUTPUT:
----
-fail_compilation/checkimports2a.d(27): Error: no property `X` for type `checkimports2a.B`, did you mean `imports.imp2.X`?
-fail_compilation/checkimports2a.d(27): while evaluating: `static assert((B).X == 0)`
-fail_compilation/checkimports2a.d(28): Error: no property `Y` for type `checkimports2a.B`, did you mean `imports.imp2.Y`?
-fail_compilation/checkimports2a.d(28): while evaluating: `static assert((B).Y == 2)`
----
-*/
-
-// new lookup + information
-
-import imports.imp1;
-
-enum X = 0;
-
-class B
-{
- import imports.imp2;
- static assert(X == 0); // imp2.X --> .X
- int[Y] aa; // imp2.Y
-}
-
-class C : B
-{
- static assert(B.X == 0); // imp2.X --> error
- static assert(B.Y == 2); // imp2.Y --> error
-
- static assert(X == 0); // imp2.X --> .X
- static assert(Y == 1); // imp2.Y --> imp1.Y
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/checkimports2b.d b/gcc/testsuite/gdc.test/fail_compilation/checkimports2b.d
deleted file mode 100644
index 8b99fdc..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/checkimports2b.d
+++ /dev/null
@@ -1,29 +0,0 @@
-// REQUIRED_ARGS:
-/*
-TEST_OUTPUT:
----
-fail_compilation/checkimports2b.d(18): Error: static assert: `0 == 2` is false
----
-*/
-
-// old lookup + information
-
-import imports.imp1;
-
-enum X = 0;
-
-class B
-{
- import imports.imp2;
- static assert(X == 2); // imp2.X --> .X (information)
- int[Y] aa; // imp2.Y
-}
-
-class C : B
-{
- static assert(B.X == 2); // imp2.X --> error (keep old lookup rule)
- static assert(B.Y == 2); // imp2.Y --> error (keep old lookup rule)
-
- static assert(X == 2); // imp2.X --> .X (information)
- static assert(Y == 2); // imp2.Y --> imp1.Y (information)
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/checkimports2c.d b/gcc/testsuite/gdc.test/fail_compilation/checkimports2c.d
deleted file mode 100644
index 4208dcdf..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/checkimports2c.d
+++ /dev/null
@@ -1,29 +0,0 @@
-// REQUIRED_ARGS:
-/*
-TEST_OUTPUT:
----
-fail_compilation/checkimports2c.d(18): Error: static assert: `0 == 2` is false
----
-*/
-
-// old lookup + information (the order of switches is reverse)
-
-import imports.imp1;
-
-enum X = 0;
-
-class B
-{
- import imports.imp2;
- static assert(X == 2); // imp2.X --> .X (information)
- int[Y] aa; // imp2.Y
-}
-
-class C : B
-{
- static assert(B.X == 2); // imp2.X --> error (keep old lookup rule)
- static assert(B.Y == 2); // imp2.Y --> error (keep old lookup rule)
-
- static assert(X == 2); // imp2.X --> .X (information)
- static assert(Y == 2); // imp2.Y --> imp1.Y (information)
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/circ10280.d b/gcc/testsuite/gdc.test/fail_compilation/circ10280.d
index b839b9f..76a7764 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/circ10280.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/circ10280.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/circ10280.d(11): Error: circular initialization of variable 'circ10280.q10280'
-fail_compilation/circ10280.d(10): called from here: foo10280()
+fail_compilation/circ10280.d(11): Error: circular initialization of variable `circ10280.q10280`
+fail_compilation/circ10280.d(10): called from here: `foo10280()`
---
*/
-// 10280
+// https://issues.dlang.org/show_bug.cgi?id=10280
const int q10280 = foo10280();
int foo10280() { return q10280; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/class1.d b/gcc/testsuite/gdc.test/fail_compilation/class1.d
index 261652c..a8907ef 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/class1.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/class1.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/class1.d(11): Error: class class1.C identity assignment operator overload is illegal
+fail_compilation/class1.d(11): Error: class `class1.C` identity assignment operator overload is illegal
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/class2.d b/gcc/testsuite/gdc.test/fail_compilation/class2.d
index f4894ee..a355917 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/class2.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/class2.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/class2.d(11): Error: class class2.C identity assignment operator overload is illegal
+fail_compilation/class2.d(11): Error: class `class2.C` identity assignment operator overload is illegal
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/commaexp.d b/gcc/testsuite/gdc.test/fail_compilation/commaexp.d
index 3296046..7d50223 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/commaexp.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/commaexp.d
@@ -1,13 +1,16 @@
-/* REQUIRED_ARGS: -o- -de
+/* REQUIRED_ARGS: -o-
TEST_OUTPUT:
---
-fail_compilation/commaexp.d(24): Deprecation: Using the result of a comma expression is deprecated
-fail_compilation/commaexp.d(36): Deprecation: Using the result of a comma expression is deprecated
-fail_compilation/commaexp.d(37): Deprecation: Using the result of a comma expression is deprecated
-fail_compilation/commaexp.d(38): Deprecation: Using the result of a comma expression is deprecated
-fail_compilation/commaexp.d(39): Deprecation: Using the result of a comma expression is deprecated
-fail_compilation/commaexp.d(41): Deprecation: Using the result of a comma expression is deprecated
-fail_compilation/commaexp.d(42): Deprecation: Using the result of a comma expression is deprecated
+fail_compilation/commaexp.d(27): Error: Using the result of a comma expression is not allowed
+fail_compilation/commaexp.d(39): Error: Using the result of a comma expression is not allowed
+fail_compilation/commaexp.d(40): Error: Using the result of a comma expression is not allowed
+fail_compilation/commaexp.d(41): Error: Using the result of a comma expression is not allowed
+fail_compilation/commaexp.d(42): Error: Using the result of a comma expression is not allowed
+fail_compilation/commaexp.d(44): Error: Using the result of a comma expression is not allowed
+fail_compilation/commaexp.d(45): Error: Using the result of a comma expression is not allowed
+fail_compilation/commaexp.d(56): Error: Using the result of a comma expression is not allowed
+fail_compilation/commaexp.d(69): Error: Using the result of a comma expression is not allowed
+fail_compilation/commaexp.d(81): Error: Using the result of a comma expression is not allowed
---
*/
@@ -19,7 +22,7 @@ int main () {
size_t aggr;
MyContainerClass mc;
- // Bug 15997
+ // https://issues.dlang.org/show_bug.cgi?id=15997
enum WINHTTP_ERROR_BASE = 4200;
enum ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED = (WINHTTP_ERROR_BASE, + 44);
@@ -41,3 +44,39 @@ int main () {
ok = true, (ok = (true, false));
return 42, 0;
}
+
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=16022
+
+bool test16022()
+{
+ enum Type { Colon, Comma }
+ Type type;
+ return type == Type.Colon, type == Type.Comma;
+}
+
+bool test16022_structs()
+{
+ struct A
+ {
+ int i;
+ string s;
+ }
+
+ enum Type { Colon = A(0, "zero"), Comma = A(1, "one") }
+ Type type;
+ return type == Type.Colon, type == Type.Comma;
+}
+
+/********************************************/
+
+
+void bar11(int*, int*) { }
+
+void test11()
+{
+ static int* p;
+ static int i;
+ bar11((i,p), &i);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/constraints_aggr.d b/gcc/testsuite/gdc.test/fail_compilation/constraints_aggr.d
new file mode 100644
index 0000000..a60ea8c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/constraints_aggr.d
@@ -0,0 +1,45 @@
+/*
+EXTRA_FILES: imports/constraints.d
+TEST_OUTPUT:
+---
+fail_compilation/constraints_aggr.d(32): Error: template `imports.constraints.C.f` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(60): Candidate is: `f(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` !P!T`
+fail_compilation/constraints_aggr.d(33): Error: template `imports.constraints.C.g` cannot deduce function from argument types `!()()`
+fail_compilation/imports/constraints.d(63): Candidate is: `g(this T)()`
+ with `T = imports.constraints.C`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_aggr.d(35): Error: template instance `imports.constraints.S!int` does not match template declaration `S(T)`
+ with `T = int`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_aggr.d(44): Error: template instance `imports.constraints.BitFlags!(Enum)` does not match template declaration `BitFlags(E, bool unsafe = false)`
+ with `E = Enum`
+ must satisfy one of the following constraints:
+` unsafe
+ N!E`
+---
+*/
+
+void main()
+{
+ import imports.constraints;
+
+ C c = new C;
+ c.f(0);
+ c.g();
+
+ S!int;
+
+ enum Enum
+ {
+ A = 1,
+ B = 2,
+ C = 4,
+ BC = B|C
+ }
+ BitFlags!Enum flags;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/constraints_defs.d b/gcc/testsuite/gdc.test/fail_compilation/constraints_defs.d
new file mode 100644
index 0000000..7515208
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/constraints_defs.d
@@ -0,0 +1,56 @@
+/*
+EXTRA_FILES: imports/constraints.d
+TEST_OUTPUT:
+---
+fail_compilation/constraints_defs.d(49): Error: template instance `constraints_defs.main.def!(int, 0, (a) => a)` does not match template declaration `def(T, int i = 5, alias R)()`
+ with `T = int,
+ i = 0,
+ R = __lambda1`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_defs.d(50): Error: template instance `imports.constraints.defa!int` does not match template declaration `defa(T, U = int)()`
+ with `T = int`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_defs.d(51): Error: template instance `imports.constraints.defv!()` does not match template declaration `defv(T = bool, int i = 5, Ts...)()`
+ with `Ts = ()`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_defs.d(52): Error: template instance `imports.constraints.defv!int` does not match template declaration `defv(T = bool, int i = 5, Ts...)()`
+ with `T = int,
+ Ts = ()`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_defs.d(53): Error: template instance `imports.constraints.defv!(int, 0)` does not match template declaration `defv(T = bool, int i = 5, Ts...)()`
+ with `T = int,
+ i = 0,
+ Ts = ()`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_defs.d(54): Error: template instance `imports.constraints.defv!(int, 0, bool)` does not match template declaration `defv(T = bool, int i = 5, Ts...)()`
+ with `T = int,
+ i = 0,
+ Ts = (bool)`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_defs.d(55): Error: template instance `imports.constraints.defv!(int, 0, bool, float)` does not match template declaration `defv(T = bool, int i = 5, Ts...)()`
+ with `T = int,
+ i = 0,
+ Ts = (bool, float)`
+ must satisfy the following constraint:
+` N!T`
+---
+*/
+
+void main()
+{
+ import imports.constraints;
+
+ def!(int, 0, a => a)();
+ defa!(int)();
+ defv!()();
+ defv!(int)();
+ defv!(int, 0)();
+ defv!(int, 0, bool)();
+ defv!(int, 0, bool, float)();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/constraints_func1.d b/gcc/testsuite/gdc.test/fail_compilation/constraints_func1.d
new file mode 100644
index 0000000..91dd405
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/constraints_func1.d
@@ -0,0 +1,93 @@
+/*
+EXTRA_FILES: imports/constraints.d
+TEST_OUTPUT:
+---
+fail_compilation/constraints_func1.d(79): Error: template `imports.constraints.test1` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(9): Candidate is: `test1(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_func1.d(80): Error: template `imports.constraints.test2` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(10): Candidate is: `test2(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` !P!T`
+fail_compilation/constraints_func1.d(81): Error: template `imports.constraints.test3` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(11): Candidate is: `test3(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_func1.d(82): Error: template `imports.constraints.test4` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(12): Candidate is: `test4(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_func1.d(83): Error: template `imports.constraints.test5` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(13): Candidate is: `test5(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` N!T
+ N!T`
+fail_compilation/constraints_func1.d(84): Error: template `imports.constraints.test6` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(14): Candidate is: `test6(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` N!T
+ N!T
+ !P!T`
+fail_compilation/constraints_func1.d(85): Error: template `imports.constraints.test7` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(15): Candidate is: `test7(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` N!T
+ N!T`
+fail_compilation/constraints_func1.d(86): Error: template `imports.constraints.test8` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(16): Candidate is: `test8(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_func1.d(87): Error: template `imports.constraints.test9` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(17): Candidate is: `test9(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` !P!T`
+fail_compilation/constraints_func1.d(88): Error: template `imports.constraints.test10` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(18): Candidate is: `test10(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` !P!T`
+fail_compilation/constraints_func1.d(89): Error: template `imports.constraints.test11` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(19): Candidate is: `test11(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` N!T
+ !P!T`
+fail_compilation/constraints_func1.d(90): Error: template `imports.constraints.test12` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(20): Candidate is: `test12(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` !P!T`
+fail_compilation/constraints_func1.d(92): Error: template `imports.constraints.test1` cannot deduce function from argument types `!()(int, int)`
+fail_compilation/imports/constraints.d(9): Candidate is: `test1(T)(T v)`
+---
+*/
+
+void main()
+{
+ import imports.constraints;
+
+ test1(0);
+ test2(0);
+ test3(0);
+ test4(0);
+ test5(0);
+ test6(0);
+ test7(0);
+ test8(0);
+ test9(0);
+ test10(0);
+ test11(0);
+ test12(0);
+
+ test1(0, 0);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/constraints_func2.d b/gcc/testsuite/gdc.test/fail_compilation/constraints_func2.d
new file mode 100644
index 0000000..67aa78c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/constraints_func2.d
@@ -0,0 +1,108 @@
+/*
+EXTRA_FILES: imports/constraints.d
+TEST_OUTPUT:
+---
+fail_compilation/constraints_func2.d(94): Error: template `imports.constraints.test13` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(23): Candidate is: `test13(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` N!T
+ !P!T`
+fail_compilation/constraints_func2.d(95): Error: template `imports.constraints.test14` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(24): Candidate is: `test14(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` !P!T
+ N!T`
+fail_compilation/constraints_func2.d(96): Error: template `imports.constraints.test15` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(25): Candidate is: `test15(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` !P!T
+ !P!T`
+fail_compilation/constraints_func2.d(97): Error: template `imports.constraints.test16` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(26): Candidate is: `test16(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` N!T
+ N!T`
+fail_compilation/constraints_func2.d(98): Error: template `imports.constraints.test17` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(27): Candidate is: `test17(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_func2.d(99): Error: template `imports.constraints.test18` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(28): Candidate is: `test18(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` N!T
+ N!T`
+fail_compilation/constraints_func2.d(100): Error: template `imports.constraints.test19` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(29): Candidate is: `test19(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` N!T
+ !P!T
+ N!T`
+fail_compilation/constraints_func2.d(101): Error: template `imports.constraints.test20` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(30): Candidate is: `test20(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_func2.d(102): Error: template `imports.constraints.test21` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(31): Candidate is: `test21(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` N!T
+ N!T`
+fail_compilation/constraints_func2.d(103): Error: template `imports.constraints.test22` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(32): Candidate is: `test22(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` !P!T
+ !P!T`
+fail_compilation/constraints_func2.d(104): Error: template `imports.constraints.test23` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(33): Candidate is: `test23(T)(T v)`
+ with `T = int`
+ must satisfy one of the following constraints:
+` !P!T
+ N!T
+ !P!T`
+fail_compilation/constraints_func2.d(105): Error: template `imports.constraints.test24` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(34): Candidate is: `test24(R)(R r)`
+ with `R = int`
+ must satisfy the following constraint:
+` __traits(hasMember, R, "stuff")`
+fail_compilation/constraints_func2.d(106): Error: template `imports.constraints.test25` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(35): Candidate is: `test25(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_func2.d(107): Error: template `imports.constraints.test26` cannot deduce function from argument types `!(float)(int)`
+fail_compilation/imports/constraints.d(36): Candidate is: `test26(T, U)(U u)`
+ with `T = float,
+ U = int`
+ must satisfy the following constraint:
+` N!U`
+---
+*/
+
+void main()
+{
+ import imports.constraints;
+
+ test13(0);
+ test14(0);
+ test15(0);
+ test16(0);
+ test17(0);
+ test18(0);
+ test19(0);
+ test20(0);
+ test21(0);
+ test22(0);
+ test23(0);
+ test24(0);
+ test25(0);
+ test26!float(5);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/constraints_func3.d b/gcc/testsuite/gdc.test/fail_compilation/constraints_func3.d
new file mode 100644
index 0000000..f0a5099
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/constraints_func3.d
@@ -0,0 +1,60 @@
+/*
+EXTRA_FILES: imports/constraints.d
+TEST_OUTPUT:
+---
+fail_compilation/constraints_func3.d(53): Error: template `imports.constraints.overload` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(39): Candidates are: `overload(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/imports/constraints.d(40): `overload(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` !P!T`
+fail_compilation/imports/constraints.d(41): `overload(T)(T v1, T v2)`
+fail_compilation/imports/constraints.d(42): `overload(T, V)(T v1, V v2)`
+fail_compilation/constraints_func3.d(54): Error: template `imports.constraints.overload` cannot deduce function from argument types `!()(int, string)`
+fail_compilation/imports/constraints.d(39): Candidates are: `overload(T)(T v)`
+fail_compilation/imports/constraints.d(40): `overload(T)(T v)`
+fail_compilation/imports/constraints.d(41): `overload(T)(T v1, T v2)`
+fail_compilation/imports/constraints.d(42): `overload(T, V)(T v1, V v2)`
+ with `T = int,
+ V = string`
+ must satisfy one of the following constraints:
+` N!T
+ N!V`
+fail_compilation/constraints_func3.d(56): Error: template `imports.constraints.variadic` cannot deduce function from argument types `!()()`
+fail_compilation/imports/constraints.d(43): Candidate is: `variadic(A, T...)(A a, T v)`
+fail_compilation/constraints_func3.d(57): Error: template `imports.constraints.variadic` cannot deduce function from argument types `!()(int)`
+fail_compilation/imports/constraints.d(43): Candidate is: `variadic(A, T...)(A a, T v)`
+ with `A = int,
+ T = ()`
+ must satisfy the following constraint:
+` N!int`
+fail_compilation/constraints_func3.d(58): Error: template `imports.constraints.variadic` cannot deduce function from argument types `!()(int, int)`
+fail_compilation/imports/constraints.d(43): Candidate is: `variadic(A, T...)(A a, T v)`
+ with `A = int,
+ T = (int)`
+ must satisfy the following constraint:
+` N!int`
+fail_compilation/constraints_func3.d(59): Error: template `imports.constraints.variadic` cannot deduce function from argument types `!()(int, int, int)`
+fail_compilation/imports/constraints.d(43): Candidate is: `variadic(A, T...)(A a, T v)`
+ with `A = int,
+ T = (int, int)`
+ must satisfy the following constraint:
+` N!int`
+---
+*/
+
+void main()
+{
+ import imports.constraints;
+
+ overload(0);
+ overload(0, "");
+
+ variadic();
+ variadic(0);
+ variadic(0, 1);
+ variadic(0, 1, 2);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/constraints_func4.d b/gcc/testsuite/gdc.test/fail_compilation/constraints_func4.d
new file mode 100644
index 0000000..751e618
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/constraints_func4.d
@@ -0,0 +1,97 @@
+/*
+EXTRA_FILES: imports/constraints.d
+REQUIRED_ARGS: -verrors=context
+TEST_OUTPUT:
+---
+fail_compilation/constraints_func4.d(90): Error: template `imports.constraints.overload` cannot deduce function from argument types `!()(int)`
+ overload(0);
+ ^
+fail_compilation/imports/constraints.d(39): Candidates are: `overload(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` N!T`
+void overload(T)(T v) if (N!T);
+ ^
+fail_compilation/imports/constraints.d(40): `overload(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` !P!T`
+void overload(T)(T v) if (!P!T);
+ ^
+fail_compilation/imports/constraints.d(41): `overload(T)(T v1, T v2)`
+void overload(T)(T v1, T v2) if (N!T);
+ ^
+fail_compilation/imports/constraints.d(42): `overload(T, V)(T v1, V v2)`
+void overload(T, V)(T v1, V v2) if (N!T || N!V);
+ ^
+fail_compilation/constraints_func4.d(91): Error: template `imports.constraints.overload` cannot deduce function from argument types `!()(int, string)`
+ overload(0, "");
+ ^
+fail_compilation/imports/constraints.d(39): Candidates are: `overload(T)(T v)`
+void overload(T)(T v) if (N!T);
+ ^
+fail_compilation/imports/constraints.d(40): `overload(T)(T v)`
+void overload(T)(T v) if (!P!T);
+ ^
+fail_compilation/imports/constraints.d(41): `overload(T)(T v1, T v2)`
+void overload(T)(T v1, T v2) if (N!T);
+ ^
+fail_compilation/imports/constraints.d(42): `overload(T, V)(T v1, V v2)`
+ with `T = int,
+ V = string`
+ must satisfy one of the following constraints:
+` N!T
+ N!V`
+void overload(T, V)(T v1, V v2) if (N!T || N!V);
+ ^
+fail_compilation/constraints_func4.d(93): Error: template `imports.constraints.variadic` cannot deduce function from argument types `!()()`
+ variadic();
+ ^
+fail_compilation/imports/constraints.d(43): Candidate is: `variadic(A, T...)(A a, T v)`
+void variadic(A, T...)(A a, T v) if (N!int);
+ ^
+fail_compilation/constraints_func4.d(94): Error: template `imports.constraints.variadic` cannot deduce function from argument types `!()(int)`
+ variadic(0);
+ ^
+fail_compilation/imports/constraints.d(43): Candidate is: `variadic(A, T...)(A a, T v)`
+ with `A = int,
+ T = ()`
+ must satisfy the following constraint:
+` N!int`
+void variadic(A, T...)(A a, T v) if (N!int);
+ ^
+fail_compilation/constraints_func4.d(95): Error: template `imports.constraints.variadic` cannot deduce function from argument types `!()(int, int)`
+ variadic(0, 1);
+ ^
+fail_compilation/imports/constraints.d(43): Candidate is: `variadic(A, T...)(A a, T v)`
+ with `A = int,
+ T = (int)`
+ must satisfy the following constraint:
+` N!int`
+void variadic(A, T...)(A a, T v) if (N!int);
+ ^
+fail_compilation/constraints_func4.d(96): Error: template `imports.constraints.variadic` cannot deduce function from argument types `!()(int, int, int)`
+ variadic(0, 1, 2);
+ ^
+fail_compilation/imports/constraints.d(43): Candidate is: `variadic(A, T...)(A a, T v)`
+ with `A = int,
+ T = (int, int)`
+ must satisfy the following constraint:
+` N!int`
+void variadic(A, T...)(A a, T v) if (N!int);
+ ^
+---
+*/
+
+void main()
+{
+ import imports.constraints;
+
+ overload(0);
+ overload(0, "");
+
+ variadic();
+ variadic(0);
+ variadic(0, 1);
+ variadic(0, 1, 2);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/constraints_tmpl.d b/gcc/testsuite/gdc.test/fail_compilation/constraints_tmpl.d
new file mode 100644
index 0000000..06caa52
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/constraints_tmpl.d
@@ -0,0 +1,44 @@
+/*
+EXTRA_FILES: imports/constraints.d
+TEST_OUTPUT:
+---
+fail_compilation/constraints_tmpl.d(35): Error: template instance `imports.constraints.dummy!()` does not match template declaration `dummy()()`
+ must satisfy the following constraint:
+` false`
+fail_compilation/constraints_tmpl.d(37): Error: template instance `imports.constraints.message_nice!(int, int)` does not match template declaration `message_nice(T, U)()`
+ with `T = int,
+ U = int`
+ must satisfy the following constraint:
+` N!U`
+fail_compilation/constraints_tmpl.d(38): Error: template instance `imports.constraints.message_ugly!int` does not match template declaration `message_ugly(T)(T v)`
+ with `T = int`
+ must satisfy the following constraint:
+` N!T`
+fail_compilation/constraints_tmpl.d(40): Error: template instance `args!int` does not match template declaration `args(T, U)()`
+fail_compilation/constraints_tmpl.d(41): Error: template instance `imports.constraints.args!(int, float)` does not match template declaration `args(T, U)()`
+ with `T = int,
+ U = float`
+ must satisfy one of the following constraints:
+` N!T
+ N!U`
+fail_compilation/constraints_tmpl.d(43): Error: template instance `constraints_tmpl.main.lambda!((a) => a)` does not match template declaration `lambda(alias pred)()`
+ with `pred = __lambda1`
+ must satisfy the following constraint:
+` N!int`
+---
+*/
+
+void main()
+{
+ import imports.constraints;
+
+ dummy!();
+
+ message_nice!(int, int);
+ message_ugly!int;
+
+ args!int;
+ args!(int, float);
+
+ lambda!(a => a)();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/covariant_override.d b/gcc/testsuite/gdc.test/fail_compilation/covariant_override.d
new file mode 100644
index 0000000..7738770
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/covariant_override.d
@@ -0,0 +1,35 @@
+/++
+https://issues.dlang.org/show_bug.cgi?id=21538
+
+TEST_OUTPUT:
+---
+fail_compilation/covariant_override.d(23): Error: function `@safe void covariant_override.CI.f(void delegate() @safe dg)` does not override any function, did you mean to override `@safe void covariant_override.I.f(void delegate() @system dg)`?
+fail_compilation/covariant_override.d(34): Error: function `@safe void covariant_override.CA.f(void delegate() @safe dg)` does not override any function, did you mean to override `@safe void covariant_override.A.f(void delegate() @system dg)`?
+fail_compilation/covariant_override.d(20): Error: class `covariant_override.CI` interface function `void f(void delegate() @system dg) @safe` is not implemented
+---
+++/
+
+static assert(!is(void delegate() @system : void delegate() @safe));
+static assert( is(void delegate() @safe : void delegate() @system));
+
+interface I
+{
+ void f(void delegate() @system dg) @safe;
+}
+
+class CI : I
+{
+ // this overrride should not be legal
+ override void f(void delegate() @safe dg) @safe { }
+}
+
+abstract class A
+{
+ void f(void delegate() @system dg) @safe;
+}
+
+class CA : A
+{
+ // this overrride should not be legal
+ override void f(void delegate() @safe dg) @safe { }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/cpp_abi_tag.d b/gcc/testsuite/gdc.test/fail_compilation/cpp_abi_tag.d
new file mode 100644
index 0000000..542bc43
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/cpp_abi_tag.d
@@ -0,0 +1,57 @@
+/* DISABLED: win32 win64
+REQUIRED_ARGS: -extern-std=c++11
+TEST_OUTPUT:
+---
+fail_compilation/cpp_abi_tag.d(111): Error: `@gnuAbiTag` can only apply to C++ symbols
+fail_compilation/cpp_abi_tag.d(131): Error: `@gnuAbiTag` cannot be applied to namespaces
+fail_compilation/cpp_abi_tag.d(102): Error: `@gnuAbiTag` at least one argument expected
+fail_compilation/cpp_abi_tag.d(105): Error: `@gnuAbiTag` at least one argument expected
+fail_compilation/cpp_abi_tag.d(108): Error: `@gnuAbiTag` char `0x99` not allowed in mangling
+fail_compilation/cpp_abi_tag.d(114): Error: argument `2` to `@gnuAbiTag` cannot be `null`
+fail_compilation/cpp_abi_tag.d(114): Error: argument `3` to `@gnuAbiTag` cannot be empty
+fail_compilation/cpp_abi_tag.d(117): Error: `@gnuAbiTag` at least one argument expected
+fail_compilation/cpp_abi_tag.d(137): Error: only one `@gnuAbiTag` allowed per symbol
+fail_compilation/cpp_abi_tag.d(137): instead of `@gnuAbiTag(["x"]) @gnuAbiTag(["a"])`, use `@gnuAbiTag("x", "a")`
+---
+*/
+
+#line 100
+import core.attribute;
+
+@gnuAbiTag
+extern(C++) struct A {}
+
+@gnuAbiTag()
+extern(C++) struct B {}
+
+@gnuAbiTag("a\x99")
+extern(C++) struct D {}
+
+@gnuAbiTag("a")
+struct F {}
+
+@gnuAbiTag("a", null, "")
+extern(C++) struct G {}
+
+@gnuAbiTag((string[]).init)
+extern(C++) struct H {}
+
+// Note: There is no way to distinguish between
+// `extern(C++, "ns") { ... }` and `extern(C++, "ns") ...;`
+// So ABI tags have to be on the inside
+extern(C++, "ns") @gnuAbiTag("x") void func1();
+extern(C++, ns2) @gnuAbiTag("x") void func2();
+
+@gnuAbiTag("x")
+extern(C++, "ns3")
+{
+ void func3();
+}
+@gnuAbiTag("x")
+extern(C++, ns4)
+{
+ void func4();
+}
+
+@gnuAbiTag("x") @gnuAbiTag("a")
+extern(C++) void func5();
diff --git a/gcc/testsuite/gdc.test/fail_compilation/cpp_abi_tag2.d b/gcc/testsuite/gdc.test/fail_compilation/cpp_abi_tag2.d
new file mode 100644
index 0000000..2739e2b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/cpp_abi_tag2.d
@@ -0,0 +1,19 @@
+/* DISABLED: win32 win64
+REQUIRED_ARGS: -extern-std=c++11
+TEST_OUTPUT:
+---
+fail_compilation/cpp_abi_tag2.d(102): Error: constructor `core.attribute.gnuAbiTag.this(string[] tags...)` is not callable using argument types `(string, wstring, dstring)`
+fail_compilation/cpp_abi_tag2.d(102): cannot pass argument `"b"w` of type `wstring` to parameter `string[] tags...`
+fail_compilation/cpp_abi_tag2.d(105): Error: constructor `core.attribute.gnuAbiTag.this(string[] tags...)` is not callable using argument types `(string, int, double)`
+fail_compilation/cpp_abi_tag2.d(105): cannot pass argument `2` of type `int` to parameter `string[] tags...`
+---
+*/
+
+#line 100
+import core.attribute;
+
+@gnuAbiTag("a", "b"w, "c"d)
+extern(C++) struct C {}
+
+@gnuAbiTag("a", 2, 3.3)
+extern(C++) struct E {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/cppeh1.d b/gcc/testsuite/gdc.test/fail_compilation/cppeh1.d
index e60368c..9ef0ab3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/cppeh1.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/cppeh1.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/cppeh1.d(26): Error: cannot catch C++ class objects in @safe code
+fail_compilation/cppeh1.d(26): Error: cannot catch C++ class objects in `@safe` code
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/cppmangle.d b/gcc/testsuite/gdc.test/fail_compilation/cppmangle.d
index ca9ed9a..8134afb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/cppmangle.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/cppmangle.d
@@ -1,9 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/cppmangle.d(10): Error: invalid zero length C++ namespace
-fail_compilation/cppmangle.d(14): Error: expected valid identifier for C++ namespace but got `0num`
-fail_compilation/cppmangle.d(18): Error: string expected following `,` for C++ namespace, not `)`
+fail_compilation/cppmangle.d(11): Error: expected valid identifier for C++ namespace but got ``
+fail_compilation/cppmangle.d(15): Error: expected valid identifier for C++ namespace but got `0num`
+fail_compilation/cppmangle.d(19): Error: compile time string constant (or tuple) expected, not `2`
+fail_compilation/cppmangle.d(23): Error: expected valid identifier for C++ namespace but got `invalid@namespace`
---
*/
@@ -15,6 +16,10 @@ extern(C++, "0num")
{
}
-extern(C++, "std", )
+extern(C++, 1+1)
+{
+}
+
+extern(C++, "invalid@namespace")
{
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/cppmangle2.d b/gcc/testsuite/gdc.test/fail_compilation/cppmangle2.d
new file mode 100644
index 0000000..67f0647
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/cppmangle2.d
@@ -0,0 +1,11 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/cppmangle2.d(9): Error: namespace `cppmangle2.ns` conflicts with variable `cppmangle2.ns` at fail_compilation/cppmangle2.d(8)
+---
+*/
+
+enum ns = "ns";
+extern(C++, ns)
+{
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ctfe10989.d b/gcc/testsuite/gdc.test/fail_compilation/ctfe10989.d
index 22b6dbb..a5da609 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ctfe10989.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ctfe10989.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ctfe10989.d(11): Error: uncaught CTFE exception object.Exception("abc"c)
-fail_compilation/ctfe10989.d(14): called from here: throwing()
+fail_compilation/ctfe10989.d(11): Error: uncaught CTFE exception `object.Exception("abc"c)`
+fail_compilation/ctfe10989.d(14): called from here: `throwing()`
fail_compilation/ctfe10989.d(14): while evaluating: `static assert(throwing())`
---
*/
@@ -16,8 +16,8 @@ static assert(throwing());
/*
TEST_OUTPUT:
---
-fail_compilation/ctfe10989.d(33): Error: uncaught CTFE exception object.Exception("abc"c)
-fail_compilation/ctfe10989.d(36): called from here: throwing2()
+fail_compilation/ctfe10989.d(33): Error: uncaught CTFE exception `object.Exception("abc"c)`
+fail_compilation/ctfe10989.d(36): called from here: `throwing2()`
fail_compilation/ctfe10989.d(36): while evaluating: `static assert(throwing2())`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ctfe10995.d b/gcc/testsuite/gdc.test/fail_compilation/ctfe10995.d
index ca42495..829fb53 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ctfe10995.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ctfe10995.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ctfe10995.d(19): Error: cannot read uninitialized variable a in CTFE
-fail_compilation/ctfe10995.d(25): Error: cannot read uninitialized variable a in CTFE
+fail_compilation/ctfe10995.d(19): Error: cannot read uninitialized variable `a` in CTFE
+fail_compilation/ctfe10995.d(25): Error: cannot read uninitialized variable `a` in CTFE
---
*/
struct T
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ctfe11467.d b/gcc/testsuite/gdc.test/fail_compilation/ctfe11467.d
index f7b2577..dcde98f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ctfe11467.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ctfe11467.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ctfe11467.d(15): Error: overlapping slice assignment [0..4] = [1..5]
-fail_compilation/ctfe11467.d(24): called from here: test11467a()
+fail_compilation/ctfe11467.d(15): Error: overlapping slice assignment `[0..4] = [1..5]`
+fail_compilation/ctfe11467.d(24): called from here: `test11467a()`
fail_compilation/ctfe11467.d(24): while evaluating: `static assert(test11467a())`
-fail_compilation/ctfe11467.d(21): Error: overlapping slice assignment [1..5] = [0..4]
-fail_compilation/ctfe11467.d(25): called from here: test11467b()
+fail_compilation/ctfe11467.d(21): Error: overlapping slice assignment `[1..5] = [0..4]`
+fail_compilation/ctfe11467.d(25): called from here: `test11467b()`
fail_compilation/ctfe11467.d(25): while evaluating: `static assert(test11467b())`
---
*/
@@ -27,11 +27,11 @@ static assert(test11467b());
/*
TEST_OUTPUT:
---
-fail_compilation/ctfe11467.d(41): Error: overlapping slice assignment [0..4] = [1..5]
-fail_compilation/ctfe11467.d(50): called from here: test11467c()
+fail_compilation/ctfe11467.d(41): Error: overlapping slice assignment `[0..4] = [1..5]`
+fail_compilation/ctfe11467.d(50): called from here: `test11467c()`
fail_compilation/ctfe11467.d(50): while evaluating: `static assert(test11467c())`
-fail_compilation/ctfe11467.d(47): Error: overlapping slice assignment [1..5] = [0..4]
-fail_compilation/ctfe11467.d(51): called from here: test11467d()
+fail_compilation/ctfe11467.d(47): Error: overlapping slice assignment `[1..5] = [0..4]`
+fail_compilation/ctfe11467.d(51): called from here: `test11467d()`
fail_compilation/ctfe11467.d(51): while evaluating: `static assert(test11467d())`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ctfe13612.d b/gcc/testsuite/gdc.test/fail_compilation/ctfe13612.d
index b7ab79e..150f2ac 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ctfe13612.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ctfe13612.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ctfe13612.d(15): Error: function ctfe13612.S.recurse CTFE recursion limit exceeded
-fail_compilation/ctfe13612.d(20): called from here: s.recurse()
-fail_compilation/ctfe13612.d(15): 1000 recursive calls to function recurse
-fail_compilation/ctfe13612.d(23): called from here: (new S).recurse()
+fail_compilation/ctfe13612.d(15): Error: function `ctfe13612.S.recurse` CTFE recursion limit exceeded
+fail_compilation/ctfe13612.d(20): called from here: `s.recurse()`
+fail_compilation/ctfe13612.d(15): 1000 recursive calls to function `recurse`
+fail_compilation/ctfe13612.d(23): called from here: `(new S).recurse()`
fail_compilation/ctfe13612.d(23): while evaluating: `static assert((new S).recurse())`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ctfe14207.d b/gcc/testsuite/gdc.test/fail_compilation/ctfe14207.d
index 511f755..becc068 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ctfe14207.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ctfe14207.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ctfe14207.d(13): Error: cannot convert &immutable(ulong) to ubyte[8]* at compile time
-fail_compilation/ctfe14207.d(18): called from here: nativeToBigEndian()
-fail_compilation/ctfe14207.d(22): called from here: digest()
+fail_compilation/ctfe14207.d(13): Error: cannot convert `&immutable(ulong)` to `ubyte[8]*` at compile time
+fail_compilation/ctfe14207.d(18): called from here: `nativeToBigEndian()`
+fail_compilation/ctfe14207.d(22): called from here: `digest()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ctfe14465.d b/gcc/testsuite/gdc.test/fail_compilation/ctfe14465.d
index 9106d3d..52e1ad3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ctfe14465.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ctfe14465.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ctfe14465.d(19): Error: uncaught CTFE exception ctfe14465.E("message")
-fail_compilation/ctfe14465.d(22): called from here: foo()
+fail_compilation/ctfe14465.d(19): Error: uncaught CTFE exception `ctfe14465.E("message")`
+fail_compilation/ctfe14465.d(22): called from here: `foo()`
fail_compilation/ctfe14465.d(22): while evaluating: `static assert(foo())`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/dassert.d b/gcc/testsuite/gdc.test/fail_compilation/dassert.d
new file mode 100644
index 0000000..8a81317
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/dassert.d
@@ -0,0 +1,43 @@
+/*
+REQUIRED_ARGS: -checkaction=context
+TEST_OUTPUT:
+---
+fail_compilation/dassert.d(14): Error: expression `tuple(0, 0)` of type `(int, int)` does not have a boolean value
+fail_compilation/dassert.d(21): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/dassert.d(29): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/dassert.d(40): Error: expression `issue()` of type `void` does not have a boolean value
+---
+*/
+#line 10
+
+struct Baguette { int bread, floor; }
+void main ()
+{
+ assert(Baguette.init.tupleof);
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=21590
+void issue21590()
+{
+ int a, b = 1;
+ assert (a = b);
+
+ static ref int get()
+ {
+ static int i;
+ return i;
+ }
+
+ assert(get() = 1);
+
+ // No errors for binary assignments (regardless of -checkaction=context)
+ int[] arr;
+ assert(arr ~= 1);
+ assert(a += b);
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=21798
+void issue()
+{
+ assert(issue());
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ddoc_18083.d b/gcc/testsuite/gdc.test/fail_compilation/ddoc_18083.d
new file mode 100644
index 0000000..234c280
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ddoc_18083.d
@@ -0,0 +1,17 @@
+// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/fail_compilation -o- -w -c
+/* TEST_OUTPUT:
+---
+fail_compilation/ddoc_18083.d(14): Warning: Ddoc: function declaration has no parameter 'this'
+fail_compilation/ddoc_18083.d(14): Warning: Ddoc: parameter count mismatch, expected 0, got 1
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
+---
+*/
+/**
+Params:
+ this = non-existent parameter
+*/
+int foo()
+{
+ return 1;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/debugCaseDeclaration.d b/gcc/testsuite/gdc.test/fail_compilation/debugCaseDeclaration.d
new file mode 100644
index 0000000..0a06bca
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/debugCaseDeclaration.d
@@ -0,0 +1,39 @@
+/*
+https://issues.dlang.org/show_bug.cgi?id=21739
+
+REQUIRED_ARGS: -debug
+TEST_OUTPUT:
+---
+fail_compilation/debugCaseDeclaration.d(22): Error: undefined identifier `x`
+fail_compilation/debugCaseDeclaration.d(33): Error: undefined identifier `y`
+---
+*/
+
+void main()
+{
+ int i, k;
+ switch (i)
+ {
+ case 0:
+ int x;
+ break;
+
+ case 1:
+ x = 1;
+ break;
+
+ case 2:
+ int y;
+ break;
+
+ debug
+ {
+ case 3:
+ k = 1; // Valid
+ y = 1; // Invalid but accepted
+ break;
+ }
+
+ default:
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/dep_d1_ops.d b/gcc/testsuite/gdc.test/fail_compilation/dep_d1_ops.d
new file mode 100644
index 0000000..230fc4b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/dep_d1_ops.d
@@ -0,0 +1,191 @@
+/*
+REQUIRED_ARGS: -de
+TEST_OUTPUT:
+---
+fail_compilation/dep_d1_ops.d(105): Deprecation: `opAdd` is deprecated. Use `opBinary(string op)(...) if (op == "+")` instead.
+fail_compilation/dep_d1_ops.d(106): Deprecation: `opAdd_r` is deprecated. Use `opBinaryRight(string op)(...) if (op == "+")` instead.
+fail_compilation/dep_d1_ops.d(107): Deprecation: `opSub` is deprecated. Use `opBinary(string op)(...) if (op == "-")` instead.
+fail_compilation/dep_d1_ops.d(108): Deprecation: `opSub_r` is deprecated. Use `opBinaryRight(string op)(...) if (op == "-")` instead.
+fail_compilation/dep_d1_ops.d(109): Deprecation: `opMul` is deprecated. Use `opBinary(string op)(...) if (op == "*")` instead.
+fail_compilation/dep_d1_ops.d(110): Deprecation: `opMul_r` is deprecated. Use `opBinaryRight(string op)(...) if (op == "*")` instead.
+fail_compilation/dep_d1_ops.d(111): Deprecation: `opDiv` is deprecated. Use `opBinary(string op)(...) if (op == "/")` instead.
+fail_compilation/dep_d1_ops.d(112): Deprecation: `opDiv_r` is deprecated. Use `opBinaryRight(string op)(...) if (op == "/")` instead.
+fail_compilation/dep_d1_ops.d(113): Deprecation: `opMod` is deprecated. Use `opBinary(string op)(...) if (op == "%")` instead.
+fail_compilation/dep_d1_ops.d(114): Deprecation: `opMod_r` is deprecated. Use `opBinaryRight(string op)(...) if (op == "%")` instead.
+fail_compilation/dep_d1_ops.d(116): Deprecation: `opAnd` is deprecated. Use `opBinary(string op)(...) if (op == "&")` instead.
+fail_compilation/dep_d1_ops.d(117): Deprecation: `opOr` is deprecated. Use `opBinary(string op)(...) if (op == "|")` instead.
+fail_compilation/dep_d1_ops.d(118): Deprecation: `opXor` is deprecated. Use `opBinary(string op)(...) if (op == "^")` instead.
+fail_compilation/dep_d1_ops.d(120): Deprecation: `opShl` is deprecated. Use `opBinary(string op)(...) if (op == "<<")` instead.
+fail_compilation/dep_d1_ops.d(121): Deprecation: `opShl_r` is deprecated. Use `opBinaryRight(string op)(...) if (op == "<<")` instead.
+fail_compilation/dep_d1_ops.d(122): Deprecation: `opShr` is deprecated. Use `opBinary(string op)(...) if (op == ">>")` instead.
+fail_compilation/dep_d1_ops.d(123): Deprecation: `opShr_r` is deprecated. Use `opBinaryRight(string op)(...) if (op == ">>")` instead.
+fail_compilation/dep_d1_ops.d(124): Deprecation: `opUShr` is deprecated. Use `opBinary(string op)(...) if (op == ">>>")` instead.
+fail_compilation/dep_d1_ops.d(125): Deprecation: `opUShr_r` is deprecated. Use `opBinaryRight(string op)(...) if (op == ">>>")` instead.
+fail_compilation/dep_d1_ops.d(127): Deprecation: `opCat` is deprecated. Use `opBinary(string op)(...) if (op == "~")` instead.
+fail_compilation/dep_d1_ops.d(128): Deprecation: `opCat_r` is deprecated. Use `opBinaryRight(string op)(...) if (op == "~")` instead.
+fail_compilation/dep_d1_ops.d(130): Deprecation: `opNeg` is deprecated. Use `opUnary(string op)() if (op == "-")` instead.
+fail_compilation/dep_d1_ops.d(131): Deprecation: `opCom` is deprecated. Use `opUnary(string op)() if (op == "~")` instead.
+fail_compilation/dep_d1_ops.d(132): Deprecation: `opPostInc` is deprecated. Use `opUnary(string op)() if (op == "++")` instead.
+fail_compilation/dep_d1_ops.d(133): Deprecation: `opPostDec` is deprecated. Use `opUnary(string op)() if (op == "--")` instead.
+fail_compilation/dep_d1_ops.d(134): Deprecation: `opStar` is deprecated. Use `opUnary(string op)() if (op == "*")` instead.
+fail_compilation/dep_d1_ops.d(136): Deprecation: `opIn` is deprecated. Use `opBinary(string op)(...) if (op == "in")` instead.
+fail_compilation/dep_d1_ops.d(137): Deprecation: `opIn_r` is deprecated. Use `opBinaryRight(string op)(...) if (op == "in")` instead.
+fail_compilation/dep_d1_ops.d(139): Deprecation: `opAddAssign` is deprecated. Use `opOpAssign(string op)(...) if (op == "+")` instead.
+fail_compilation/dep_d1_ops.d(140): Deprecation: `opSubAssign` is deprecated. Use `opOpAssign(string op)(...) if (op == "-")` instead.
+fail_compilation/dep_d1_ops.d(141): Deprecation: `opMulAssign` is deprecated. Use `opOpAssign(string op)(...) if (op == "*")` instead.
+fail_compilation/dep_d1_ops.d(142): Deprecation: `opDivAssign` is deprecated. Use `opOpAssign(string op)(...) if (op == "/")` instead.
+fail_compilation/dep_d1_ops.d(143): Deprecation: `opModAssign` is deprecated. Use `opOpAssign(string op)(...) if (op == "%")` instead.
+fail_compilation/dep_d1_ops.d(144): Deprecation: `opAndAssign` is deprecated. Use `opOpAssign(string op)(...) if (op == "&")` instead.
+fail_compilation/dep_d1_ops.d(145): Deprecation: `opOrAssign` is deprecated. Use `opOpAssign(string op)(...) if (op == "|")` instead.
+fail_compilation/dep_d1_ops.d(146): Deprecation: `opXorAssign` is deprecated. Use `opOpAssign(string op)(...) if (op == "^")` instead.
+fail_compilation/dep_d1_ops.d(147): Deprecation: `opShlAssign` is deprecated. Use `opOpAssign(string op)(...) if (op == "<<")` instead.
+fail_compilation/dep_d1_ops.d(148): Deprecation: `opShrAssign` is deprecated. Use `opOpAssign(string op)(...) if (op == ">>")` instead.
+fail_compilation/dep_d1_ops.d(149): Deprecation: `opUShrAssign` is deprecated. Use `opOpAssign(string op)(...) if (op == ">>>")` instead.
+fail_compilation/dep_d1_ops.d(150): Deprecation: `opCatAssign` is deprecated. Use `opOpAssign(string op)(...) if (op == "~")` instead.
+fail_compilation/dep_d1_ops.d(158): Deprecation: `opCom` is deprecated. Use `opUnary(string op)() if (op == "~")` instead.
+---
+*/
+
+#line 50
+struct S
+{
+ int opAdd(int i) { return 0; }
+ int opAdd_r(int i) { return 0; }
+ int opSub(int i) { return 0; }
+ int opSub_r(int i) { return 0; }
+ int opMul(int i) { return 0; }
+ int opMul_r(int i) { return 0; }
+ int opDiv(int i) { return 0; }
+ int opDiv_r(int i) { return 0; }
+ int opMod(int i) { return 0; }
+ int opMod_r(int i) { return 0; }
+
+ int opAnd(int i) { return 0; }
+ int opOr(int i) { return 0; }
+ int opXor(int i) { return 0; }
+
+ int opShl(int i) { return 0; }
+ int opShl_r(int i) { return 0; }
+ int opShr(int i) { return 0; }
+ int opShr_r(int i) { return 0; }
+ int opUShr(int i) { return 0; }
+ int opUShr_r(int i) { return 0; }
+
+ int opCat(int i) { return 0; }
+ int opCat_r(int i) { return 0; }
+
+ int opNeg() { return 0; }
+ int opCom() { return 0; }
+ int opPostInc() { return 0; }
+ int opPostDec() { return 0; }
+ int opStar() { return 0; }
+
+ int opIn(int i) { return 0; }
+ int opIn_r(int i) { return 0; }
+
+ int opAddAssign(int i) { return 0; }
+ int opSubAssign(int i) { return 0; }
+ int opMulAssign(int i) { return 0; }
+ int opDivAssign(int i) { return 0; }
+ int opModAssign(int i) { return 0; }
+ int opAndAssign(int i) { return 0; }
+ int opOrAssign(int i) { return 0; }
+ int opXorAssign(int i) { return 0; }
+ int opShlAssign(int i) { return 0; }
+ int opShrAssign(int i) { return 0; }
+ int opUShrAssign(int i) { return 0; }
+ int opCatAssign(int i) { return 0; }
+}
+
+void main()
+{
+ S s;
+ int i;
+
+ i = s + 1;
+ i = 1 + s;
+ i = s - 1;
+ i = 1 - s;
+ i = s * 1;
+ i = 1 * s;
+ i = s / 1;
+ i = 1 / s;
+ i = s % 1;
+ i = 1 % s;
+
+ i = s & 1;
+ i = s | 1;
+ i = s ^ 1;
+
+ i = s << 1;
+ i = 1 << s;
+ i = s >> 1;
+ i = 1 >> s;
+ i = s >>> 1;
+ i = 1 >>> s;
+
+ i = s ~ 1;
+ i = 1 ~ s;
+
+ i = -s;
+ i = ~s;
+ s++;
+ s--;
+ i = *s;
+
+ i = s in 1;
+ i = 1 in s;
+
+ s += 1;
+ s -= 1;
+ s *= 1;
+ s /= 1;
+ s %= 1;
+ s &= 1;
+ s |= 1;
+ s ^= 1;
+ s <<= 1;
+ s >>= 1;
+ s >>>= 1;
+ s ~= 1;
+
+ scope nd = new NoDeprecation;
+ assert((42 in nd) == 0);
+ assert((nd in 42) == 0);
+ assert((nd ~ 42) == 0);
+ assert((42 ~ nd) == 0);
+
+ ~nd;
+}
+
+/// See https://github.com/dlang/dmd/pull/10716
+class NoDeprecation
+{
+ int opIn(int i) { return 0; }
+ int opIn_r(int i) { return 0; }
+ int opCat(int i) { return 0; }
+ int opCat_r(int i) { return 0; }
+
+ /// This is considered because there is no `opUnary`
+ /// However, the other overloads (`opBinary` / `opBinaryRight`)
+ /// means that other operator overloads would not be considered.
+ int opCom() { return 0; }
+
+ int opBinary(string op)(int arg)
+ if (op == "in" || op == "~")
+ {
+ static if (op == "in")
+ return this.opIn(arg);
+ else static if (op == "~")
+ return this.opCat(arg);
+ }
+
+ int opBinaryRight(string op)(int arg)
+ if (op == "in" || op == "~")
+ {
+ static if (op == "in")
+ return this.opIn_r(arg);
+ else static if (op == "~")
+ return this.opCat_r(arg);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/dephexstrings.d b/gcc/testsuite/gdc.test/fail_compilation/dephexstrings.d
new file mode 100644
index 0000000..a97afdc
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/dephexstrings.d
@@ -0,0 +1,9 @@
+// REQUIRED_ARGS: -de
+/*
+TEST_OUTPUT:
+---
+fail_compilation/dephexstrings.d(8): Error: Built-in hex string literals are obsolete, use `std.conv.hexString!"60"` instead.
+---
+*/
+enum xstr = x"60";
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/depmsg.d b/gcc/testsuite/gdc.test/fail_compilation/depmsg.d
index 186576a..b0c2b2e6a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/depmsg.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/depmsg.d
@@ -2,19 +2,19 @@
/*
TEST_OUTPUT:
---
-fail_compilation/depmsg.d(40): Deprecation: struct depmsg.main.Inner.A is deprecated - With message!
-fail_compilation/depmsg.d(40): Deprecation: struct depmsg.main.Inner.A is deprecated - With message!
-fail_compilation/depmsg.d(41): Deprecation: class depmsg.main.Inner.B is deprecated - With message!
-fail_compilation/depmsg.d(41): Deprecation: class depmsg.main.Inner.B is deprecated - With message!
-fail_compilation/depmsg.d(42): Deprecation: interface depmsg.main.Inner.C is deprecated - With message!
-fail_compilation/depmsg.d(42): Deprecation: interface depmsg.main.Inner.C is deprecated - With message!
-fail_compilation/depmsg.d(43): Deprecation: union depmsg.main.Inner.D is deprecated - With message!
-fail_compilation/depmsg.d(43): Deprecation: union depmsg.main.Inner.D is deprecated - With message!
-fail_compilation/depmsg.d(44): Deprecation: enum depmsg.main.Inner.E is deprecated - With message!
-fail_compilation/depmsg.d(44): Deprecation: enum depmsg.main.Inner.E is deprecated - With message!
-fail_compilation/depmsg.d(46): Deprecation: alias depmsg.main.Inner.G is deprecated - With message!
-fail_compilation/depmsg.d(47): Deprecation: variable depmsg.main.Inner.H is deprecated - With message!
-fail_compilation/depmsg.d(48): Deprecation: class depmsg.main.Inner.I!().I is deprecated - With message!
+fail_compilation/depmsg.d(40): Deprecation: struct `depmsg.main.Inner.A` is deprecated - With message!
+fail_compilation/depmsg.d(40): Deprecation: struct `depmsg.main.Inner.A` is deprecated - With message!
+fail_compilation/depmsg.d(41): Deprecation: class `depmsg.main.Inner.B` is deprecated - With message!
+fail_compilation/depmsg.d(41): Deprecation: class `depmsg.main.Inner.B` is deprecated - With message!
+fail_compilation/depmsg.d(42): Deprecation: interface `depmsg.main.Inner.C` is deprecated - With message!
+fail_compilation/depmsg.d(42): Deprecation: interface `depmsg.main.Inner.C` is deprecated - With message!
+fail_compilation/depmsg.d(43): Deprecation: union `depmsg.main.Inner.D` is deprecated - With message!
+fail_compilation/depmsg.d(43): Deprecation: union `depmsg.main.Inner.D` is deprecated - With message!
+fail_compilation/depmsg.d(44): Deprecation: enum `depmsg.main.Inner.E` is deprecated - With message!
+fail_compilation/depmsg.d(44): Deprecation: enum `depmsg.main.Inner.E` is deprecated - With message!
+fail_compilation/depmsg.d(46): Deprecation: alias `depmsg.main.Inner.G` is deprecated - With message!
+fail_compilation/depmsg.d(47): Deprecation: variable `depmsg.main.Inner.H` is deprecated - With message!
+fail_compilation/depmsg.d(48): Deprecation: class `depmsg.main.Inner.I()` is deprecated - With message!
---
*/
@@ -52,13 +52,13 @@ void main()
/*
TEST_OUTPUT:
---
-fail_compilation/depmsg.d(94): Deprecation: function depmsg.test12954.Foo.bar1 is deprecated - [C] Use Foo.bar42 instead
-fail_compilation/depmsg.d(95): Deprecation: function depmsg.test12954.Foo.bar2 is deprecated - [E] Use Foo.bar42 instead
-fail_compilation/depmsg.d(96): Deprecation: function depmsg.test12954.Foo.bar3 is deprecated - [S] Use Foo.bar42 instead
-fail_compilation/depmsg.d(97): Deprecation: function depmsg.test12954.Foo.bar4 is deprecated - [F] Use Foo.bar42 instead
-fail_compilation/depmsg.d(98): Deprecation: variable depmsg.test12954.Foo.v2 is deprecated - Forward reference
-fail_compilation/depmsg.d(105): Deprecation: class depmsg.test12954.Obsolete is deprecated
-fail_compilation/depmsg.d(105): Deprecation: function depmsg.test12954.Obsolete.obs is deprecated - Function is obsolete
+fail_compilation/depmsg.d(94): Deprecation: function `depmsg.test12954.Foo.bar1` is deprecated - [C] Use Foo.bar42 instead
+fail_compilation/depmsg.d(95): Deprecation: function `depmsg.test12954.Foo.bar2` is deprecated - [E] Use Foo.bar42 instead
+fail_compilation/depmsg.d(96): Deprecation: function `depmsg.test12954.Foo.bar3` is deprecated - [S] Use Foo.bar42 instead
+fail_compilation/depmsg.d(97): Deprecation: function `depmsg.test12954.Foo.bar4` is deprecated - [F] Use Foo.bar42 instead
+fail_compilation/depmsg.d(98): Deprecation: variable `depmsg.test12954.Foo.v2` is deprecated - Forward reference
+fail_compilation/depmsg.d(105): Deprecation: class `depmsg.test12954.Obsolete` is deprecated
+fail_compilation/depmsg.d(105): Deprecation: function `depmsg.test12954.Obsolete.obs` is deprecated - Function is obsolete
---
*/
void test12954()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/depmsg15814.d b/gcc/testsuite/gdc.test/fail_compilation/depmsg15814.d
index 1a2b9f8..613576c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/depmsg15814.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/depmsg15814.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/depmsg15814.d(9): Deprecation: function depmsg15814.get15814 is deprecated - bug15814
+fail_compilation/depmsg15814.d(9): Deprecation: function `depmsg15814.get15814` is deprecated - bug15814
---
*/
deprecated("bug15814") int get15814() { return 0; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/depmsg15815.d b/gcc/testsuite/gdc.test/fail_compilation/depmsg15815.d
index 72abbd7..0b19687 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/depmsg15815.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/depmsg15815.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/depmsg15815.d(23): Deprecation: alias depmsg15815.Alias!(const(Foo)).Alias is deprecated - message
+fail_compilation/depmsg15815.d(23): Deprecation: template `depmsg15815.Alias(T)` is deprecated - message
Foo
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/deprecate1553.d b/gcc/testsuite/gdc.test/fail_compilation/deprecate1553.d
index 4a03a6f..18a7152 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/deprecate1553.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/deprecate1553.d
@@ -1,10 +1,9 @@
// REQUIRED_ARGS: -de
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/deprecate1553.d(19): Deprecation: cannot use foreach_reverse with a delegate
+fail_compilation/deprecate1553.d(18): Deprecation: cannot use `foreach_reverse` with a delegate
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/deprecated6760.d b/gcc/testsuite/gdc.test/fail_compilation/deprecated6760.d
index 07b9527..8faa88b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/deprecated6760.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/deprecated6760.d
@@ -3,8 +3,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/deprecated6760.d(13): Deprecation: function deprecated6760.Foo.opEquals overridden functions cannot be annotated @disable
-fail_compilation/deprecated6760.d(18): Deprecation: function deprecated6760.Bar.opEquals deprecated functions cannot be annotated @disable
+fail_compilation/deprecated6760.d(13): Deprecation: `deprecated6760.Foo.opEquals` cannot be annotated with `@disable` because it is overriding a function in the base class
+fail_compilation/deprecated6760.d(18): Deprecation: `deprecated6760.Bar.opEquals` cannot be marked as `deprecated` because it is overriding a function in the base class
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/deprecatedImports.d b/gcc/testsuite/gdc.test/fail_compilation/deprecatedImports.d
new file mode 100644
index 0000000..bd68a9d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/deprecatedImports.d
@@ -0,0 +1,31 @@
+/*
+REQUIRED_ARGS: -de
+EXTRA_FILES: imports/deprecatedImporta.d imports/deprecatedImportb.d
+
+TEST_OUTPUT:
+----
+fail_compilation/deprecatedImports.d(19): Deprecation: alias `deprecatedImporta.foo` is deprecated - Please import deprecatedImportb directly!
+fail_compilation/deprecatedImports.d(21): Deprecation: alias `deprecatedImporta.bar` is deprecated - Please import deprecatedImportb directly!
+fail_compilation/deprecatedImports.d(23): Deprecation: alias `deprecatedImporta.AliasSeq` is deprecated - Please import deprecatedImportb directly!
+fail_compilation/deprecatedImports.d(27): Deprecation: alias `deprecatedImporta.S` is deprecated - Please import deprecatedImportb directly!
+fail_compilation/deprecatedImports.d(29): Deprecation: alias `deprecatedImporta.C` is deprecated - Please import deprecatedImportb directly!
+fail_compilation/deprecatedImports.d(31): Deprecation: alias `deprecatedImporta.I` is deprecated - Please import deprecatedImportb directly!
+fail_compilation/deprecatedImports.d(25): Deprecation: alias `deprecatedImporta.E` is deprecated - Please import deprecatedImportb directly!
+----
+*/
+
+import imports.deprecatedImporta;
+
+alias f = foo;
+
+alias b = bar!(int);
+
+alias Types = AliasSeq!(int);
+
+int x = E;
+
+S s;
+
+C c;
+
+I i;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/deprecatedTemplates.d b/gcc/testsuite/gdc.test/fail_compilation/deprecatedTemplates.d
new file mode 100644
index 0000000..d905479
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/deprecatedTemplates.d
@@ -0,0 +1,63 @@
+/*
+REQUIRED_ARGS: -de
+
+TEST_OUTPUT:
+----
+fail_compilation/deprecatedTemplates.d(103): Deprecation: template `deprecatedTemplates.AliasSeq(V...)` is deprecated
+fail_compilation/deprecatedTemplates.d(107): Deprecation: struct `deprecatedTemplates.S1(V...)` is deprecated
+fail_compilation/deprecatedTemplates.d(115): Deprecation: template `deprecatedTemplates.C(V...)` is deprecated
+----
+*/
+#line 100
+
+deprecated alias AliasSeq(V...) = V;
+
+alias x = AliasSeq!(1, 2, 3);
+
+deprecated struct S1(V...) {}
+
+alias T1 = S1!();
+
+deprecated template C(V...)
+{
+ int i;
+ int j;
+}
+
+alias D = C!();
+
+/*
+TEST_OUTPUT:
+----
+fail_compilation/deprecatedTemplates.d(202): Deprecation: template `deprecatedTemplates.AliasSeqMsg(V...)` is deprecated - Reason
+----
+*/
+#line 200
+deprecated("Reason") alias AliasSeqMsg(V...) = V;
+
+alias xMsg = AliasSeqMsg!(1, 2, 3);
+
+deprecated struct DS()
+{
+ S1!() s;
+}
+
+deprecated struct DS2()
+{
+ static struct DS3()
+ {
+ S1!() s;
+ }
+
+ static struct DS4
+ {
+ S1!() s;
+ }
+}
+
+deprecated void foo()
+{
+ DS!() d1;
+ DS2!().DS3!() d2;
+ DS2!().DS4 d3;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/deprecateopdot.d b/gcc/testsuite/gdc.test/fail_compilation/deprecateopdot.d
new file mode 100644
index 0000000..5aaab6a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/deprecateopdot.d
@@ -0,0 +1,30 @@
+/*
+REQUIRED_ARGS: -de
+TEST_OUTPUT:
+---
+fail_compilation/deprecateopdot.d(27): Deprecation: `opDot` is deprecated. Use `alias this`
+fail_compilation/deprecateopdot.d(28): Deprecation: `opDot` is deprecated. Use `alias this`
+fail_compilation/deprecateopdot.d(29): Deprecation: `opDot` is deprecated. Use `alias this`
+---
+*/
+struct S6
+{
+ int a, b;
+}
+struct T6
+{
+ S6 s;
+
+ S6* opDot() return
+ {
+ return &s;
+ }
+}
+
+void test6()
+{
+ T6 t;
+ t.a = 4;
+ assert(t.a == 4);
+ t.b = 5;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/deprecations.d b/gcc/testsuite/gdc.test/fail_compilation/deprecations.d
new file mode 100644
index 0000000..19adab7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/deprecations.d
@@ -0,0 +1,66 @@
+/*
+REQUIRED_ARGS: -de
+TEST_OUTPUT:
+---
+fail_compilation/deprecations.d(43): Deprecation: struct `deprecations.S` is deprecated
+fail_compilation/deprecations.d(64): instantiated from here: `otherPar!()`
+fail_compilation/deprecations.d(55): Deprecation: struct `deprecations.S` is deprecated
+fail_compilation/deprecations.d(65): instantiated from here: `otherVar!()`
+fail_compilation/deprecations.d(55): Deprecation: struct `deprecations.S` is deprecated
+fail_compilation/deprecations.d(65): instantiated from here: `otherVar!()`
+---
+
+https://issues.dlang.org/show_bug.cgi?id=20474
+*/
+
+deprecated struct S {}
+
+deprecated void foo()(S par) if (is(S == S))
+{
+ S var;
+}
+
+deprecated template bar() if (is(S == S))
+{
+ void bar(S par)
+ {
+ S var;
+ }
+}
+
+deprecated void foobar (T) (T par) if (is(T == S))
+{
+ T inst;
+}
+
+template otherPar()
+{
+ deprecated void otherPar(S par)
+ {
+ S var;
+ }
+
+ void par(S par) {}
+}
+
+template otherVar()
+{
+ deprecated void otherVar(S par)
+ {
+ S var;
+ }
+
+ void var()
+ {
+ S var;
+ }
+}
+
+deprecated void main()
+{
+ foo(S.init);
+ bar(S.init);
+ foobar(S.init);
+ otherPar(S.init);
+ otherVar(S.init);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10089.d b/gcc/testsuite/gdc.test/fail_compilation/diag10089.d
index be0fddc..d79a49e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10089.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10089.d
@@ -1,8 +1,9 @@
/*
+EXTRA_FILES: imports/diag10089a.d imports/diag10089b.d
TEST_OUTPUT:
---
-fail_compilation/diag10089.d(15): Error: undefined identifier `chunks` in package `imports`
-fail_compilation/diag10089.d(17): Error: template Foo() does not have property 'chunks'
+fail_compilation/diag10089.d(16): Error: undefined identifier `chunks` in package `imports`
+fail_compilation/diag10089.d(18): Error: template `Foo()` does not have property `chunks`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10099.d b/gcc/testsuite/gdc.test/fail_compilation/diag10099.d
index a26ca85..cf1b645 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10099.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10099.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag10099.d(15): Error: variable diag10099.main.s default construction is disabled for type S
+fail_compilation/diag10099.d(15): Error: variable `diag10099.main.s` default construction is disabled for type `S`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10141.d b/gcc/testsuite/gdc.test/fail_compilation/diag10141.d
index e9ca913..a2ea073 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10141.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10141.d
@@ -1,7 +1,8 @@
/*
+EXTRA_FILES: imports/diag10141a.d imports/diag10141b.d
TEST_OUTPUT:
---
-fail_compilation/diag10141.d(9): Error: module imports.diag10141a import 'unexisting_symbol' not found
+fail_compilation/diag10141.d(10): Error: module `imports.diag10141a` import `unexisting_symbol` not found
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10169.d b/gcc/testsuite/gdc.test/fail_compilation/diag10169.d
index 3c35b66..72becf2 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10169.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10169.d
@@ -1,7 +1,8 @@
/*
+EXTRA_FILES: imports/a10169.d
TEST_OUTPUT:
---
-fail_compilation/diag10169.d(11): Error: no property `x` for type `B`, did you mean `imports.a10169.B.x`?
+fail_compilation/diag10169.d(12): Error: no property `x` for type `imports.a10169.B`
---
*/
import imports.a10169;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10319.d b/gcc/testsuite/gdc.test/fail_compilation/diag10319.d
index a11e120..4a01c54 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10319.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10319.d
@@ -1,13 +1,15 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag10319.d(25): Error: pure function 'D main' cannot call impure function 'diag10319.foo'
-fail_compilation/diag10319.d(25): Error: @safe function 'D main' cannot call @system function 'diag10319.foo'
-fail_compilation/diag10319.d(26): Error: pure function 'D main' cannot call impure function 'diag10319.bar!int.bar'
-fail_compilation/diag10319.d(26): Error: @safe function 'D main' cannot call @system function 'diag10319.bar!int.bar'
-fail_compilation/diag10319.d(25): Error: function `diag10319.foo` is not nothrow
-fail_compilation/diag10319.d(26): Error: function `diag10319.bar!int.bar` is not nothrow
-fail_compilation/diag10319.d(23): Error: nothrow function `D main` may throw
+fail_compilation/diag10319.d(27): Error: `pure` function `D main` cannot call impure function `diag10319.foo`
+fail_compilation/diag10319.d(27): Error: `@safe` function `D main` cannot call `@system` function `diag10319.foo`
+fail_compilation/diag10319.d(16): `diag10319.foo` is declared here
+fail_compilation/diag10319.d(28): Error: `pure` function `D main` cannot call impure function `diag10319.bar!int.bar`
+fail_compilation/diag10319.d(28): Error: `@safe` function `D main` cannot call `@system` function `diag10319.bar!int.bar`
+fail_compilation/diag10319.d(18): `diag10319.bar!int.bar` is declared here
+fail_compilation/diag10319.d(27): Error: function `diag10319.foo` is not `nothrow`
+fail_compilation/diag10319.d(28): Error: function `diag10319.bar!int.bar` is not `nothrow`
+fail_compilation/diag10319.d(25): Error: `nothrow` function `D main` may throw
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10327.d b/gcc/testsuite/gdc.test/fail_compilation/diag10327.d
index 38f9ccb..1366882 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10327.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10327.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag10327.d(11): Error: module `test10327` is in file 'imports/test10327.d' which cannot be read
+fail_compilation/diag10327.d(12): Error: unable to read module `test10327`
+fail_compilation/diag10327.d(12): Expected 'imports/test10327.d' or 'imports/test10327/package.d' in one of the following import paths:
import path[0] = fail_compilation
import path[1] = $p:druntime/import$
import path[2] = $p:phobos$
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10405.d b/gcc/testsuite/gdc.test/fail_compilation/diag10405.d
index c80c821..28da8af 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10405.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10405.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag10405.d(10): Error: cannot return non-void from void function
+fail_compilation/diag10405.d(10): Error: cannot return non-void from `void` function
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10415.d b/gcc/testsuite/gdc.test/fail_compilation/diag10415.d
index a92b7a4..1fde171 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10415.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10415.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag10415.d(36): Error: none of the overloads of 'x' are callable using argument types (int) const, candidates are:
-fail_compilation/diag10415.d(13): diag10415.C.x()
-fail_compilation/diag10415.d(18): diag10415.C.x(int _param_0)
+fail_compilation/diag10415.d(36): Error: none of the overloads of `x` are callable using argument types `(int) const`
+fail_compilation/diag10415.d(13): Candidates are: `diag10415.C.x()`
+fail_compilation/diag10415.d(18): `diag10415.C.x(int _param_0)`
fail_compilation/diag10415.d(39): Error: d.x is not an lvalue
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10688.d b/gcc/testsuite/gdc.test/fail_compilation/diag10688.d
index 70db7f9..f7d7479 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10688.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10688.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag10688.d(12): Error: function diag10688.Bar.foo private method is not virtual and cannot override
-fail_compilation/diag10688.d(14): Error: function diag10688.Bar.bar package method is not virtual and cannot override
+fail_compilation/diag10688.d(12): Error: function `diag10688.Bar.foo` `private` method is not virtual and cannot override
+fail_compilation/diag10688.d(14): Error: function `diag10688.Bar.bar` `package` method is not virtual and cannot override
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10768.d b/gcc/testsuite/gdc.test/fail_compilation/diag10768.d
index 03b18a1..bea52ea 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10768.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10768.d
@@ -1,15 +1,14 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/diag10768.d(36): Error: cannot implicitly override base class method diag10768.Frop.frop with diag10768.Foo.frop; add 'override' attribute
+fail_compilation/diag10768.d(35): Error: cannot implicitly override base class method `diag10768.Frop.frop` with `diag10768.Foo.frop`; add `override` attribute
---
*/
struct CirBuff(T)
{
- import std.traits: isArray;
- CirBuff!T opAssign(R)(R) if (isArray!R)
+
+ CirBuff!T opAssign(R)(R)
{}
T[] toArray()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10783.d b/gcc/testsuite/gdc.test/fail_compilation/diag10783.d
index d74a66d..f18341f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10783.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10783.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag10783.d(14): Error: no property 'type' for type 'Event'
+fail_compilation/diag10783.d(14): Error: no property `type` for type `diag10783.Event`
fail_compilation/diag10783.d(14): Error: undefined identifier `En`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10792.d b/gcc/testsuite/gdc.test/fail_compilation/diag10792.d
index d54e50f..3c514dd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10792.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10792.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag10792.d(9): Error: semicolon expected following auto declaration, not `EOF`
+fail_compilation/diag10792.d(9): Error: semicolon expected following auto declaration, not `End of File`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10805.d b/gcc/testsuite/gdc.test/fail_compilation/diag10805.d
index 627fe82..3b5df6e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10805.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10805.d
@@ -1,10 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag10805.d(11): Error: delimited string must end in FOO"
-fail_compilation/diag10805.d(13): Error: unterminated string constant starting at fail_compilation/diag10805.d(13)
-fail_compilation/diag10805.d(13): Deprecation: Implicit string concatenation is deprecated, use "" ~ "" instead
-fail_compilation/diag10805.d(14): Error: semicolon expected following auto declaration, not `EOF`
+fail_compilation/diag10805.d(12): Error: delimited string must end in FOO"
+fail_compilation/diag10805.d(14): Error: unterminated string constant starting at fail_compilation/diag10805.d(14)
+fail_compilation/diag10805.d(14): Error: Implicit string concatenation is error-prone and disallowed in D
+fail_compilation/diag10805.d(14): Use the explicit syntax instead (concatenating literals is `@nogc`): "" ~ ""
+fail_compilation/diag10805.d(15): Error: semicolon expected following auto declaration, not `End of File`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10862.d b/gcc/testsuite/gdc.test/fail_compilation/diag10862.d
index 62968f2..00949f1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10862.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10862.d
@@ -1,24 +1,36 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag10862.d(28): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d(29): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d(30): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d(31): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d(32): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d(34): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d(35): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d(36): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d(37): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d(39): Error: assignment cannot be used as a condition, perhaps `==` was meant?
fail_compilation/diag10862.d(40): Error: assignment cannot be used as a condition, perhaps `==` was meant?
fail_compilation/diag10862.d(41): Error: assignment cannot be used as a condition, perhaps `==` was meant?
fail_compilation/diag10862.d(42): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d(43): Error: assignment cannot be used as a condition, perhaps `==` was meant?
fail_compilation/diag10862.d(44): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d(45): Error: assignment cannot be used as a condition, perhaps `==` was meant?
fail_compilation/diag10862.d(46): Error: assignment cannot be used as a condition, perhaps `==` was meant?
fail_compilation/diag10862.d(47): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d(49): Error: undefined identifier `semanticError`
+fail_compilation/diag10862.d(48): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d(49): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d(51): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d(52): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d(53): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d(54): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d(56): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d(57): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d(58): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d(59): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d(61): Error: undefined identifier `semanticError`
+fail_compilation/diag10862.d(71): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d(74): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d-mixin-77(77): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d-mixin-78(78): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d-mixin-79(79): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d-mixin-80(80): Error: Using the result of a comma expression is not allowed
+fail_compilation/diag10862.d-mixin-80(80): Error: assignment cannot be used as a condition, perhaps `==` was meant?
+fail_compilation/diag10862.d-mixin-83(83): Error: `a + b` is not an lvalue and cannot be modified
+fail_compilation/diag10862.d-mixin-84(84): Error: undefined identifier `c`
+fail_compilation/diag10862.d(86): Error: undefined identifier `semanticError`
+fail_compilation/diag10862.d(93): Error: lazy variable `bar` cannot be modified
+fail_compilation/diag10862.d(95): Error: template instance `diag10862.test3.foo!int` error instantiating
---
*/
void test1()
@@ -28,42 +40,27 @@ void test1()
if (a = b) {}
if ((a = b) = 0) {}
if ((a = b) = (a = b)) {}
- if (a = 0, b = 0) {} // Bugzilla 15384
+ if (a = 0, b = 0) {} // https://issues.dlang.org/show_bug.cgi?id=15384
if (auto x = a = b) {} // this is error, today
while (a = b) {}
while ((a = b) = 0) {}
while ((a = b) = (a = b)) {}
- while (a = 0, b = 0) {} // Bugzilla 15384
+ while (a = 0, b = 0) {} // https://issues.dlang.org/show_bug.cgi?id=15384
do {} while (a = b);
do {} while ((a = b) = 0);
do {} while ((a = b) = (a = b));
- do {} while (a = 0, b = 0); // Bugzilla 15384
+ do {} while (a = 0, b = 0); // https://issues.dlang.org/show_bug.cgi?id=15384
for (; a = b; ) {}
for (; (a = b) = 0; ) {}
for (; (a = b) = (a = b); ) {}
- for (; a = 0, b = 0; ) {} // Bugzilla 15384
+ for (; a = 0, b = 0; ) {} // https://issues.dlang.org/show_bug.cgi?id=15384
semanticError;
}
-/*
-TEST_OUTPUT:
----
-fail_compilation/diag10862.d(74): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d(77): Error: assignment cannot be used as a condition, perhaps `==` was meant?
-fail_compilation/diag10862.d-mixin-80(80): Error: assignment cannot be used as a condition, perhaps == was meant?
-fail_compilation/diag10862.d-mixin-81(81): Error: assignment cannot be used as a condition, perhaps == was meant?
-fail_compilation/diag10862.d-mixin-82(82): Error: assignment cannot be used as a condition, perhaps == was meant?
-fail_compilation/diag10862.d-mixin-83(83): Deprecation: Using the result of a comma expression is deprecated
-fail_compilation/diag10862.d-mixin-83(83): Error: assignment cannot be used as a condition, perhaps == was meant?
-fail_compilation/diag10862.d-mixin-86(86): Error: a + b is not an lvalue
-fail_compilation/diag10862.d-mixin-87(87): Error: undefined identifier `c`
-fail_compilation/diag10862.d(89): Error: undefined identifier `semanticError`
----
-*/
void test2()
{
int a, b;
@@ -88,3 +85,12 @@ void test2()
semanticError;
}
+
+void test3()
+{
+ void foo(T)(lazy T bar)
+ {
+ bar = 2;
+ }
+ foo(1 + 1);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10926.d b/gcc/testsuite/gdc.test/fail_compilation/diag10926.d
index bd590ba..f98a5b2 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10926.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10926.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag10926.d(11): Error: cast(const(int)[])c is not an lvalue
+fail_compilation/diag10926.d(11): Error: `cast(const(int)[])c` is not an lvalue and cannot be modified
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10984.d b/gcc/testsuite/gdc.test/fail_compilation/diag10984.d
index 33e0eaf..c3d835c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag10984.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10984.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag10984.d(11): Error: static function diag10984.f.n cannot access frame of function diag10984.f
+fail_compilation/diag10984.d(12): Error: `static` function `diag10984.f.n` cannot access variable `x` in frame of function `diag10984.f`
+fail_compilation/diag10984.d(11): `x` declared here
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag11078.d b/gcc/testsuite/gdc.test/fail_compilation/diag11078.d
index 7507875..334ce16 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag11078.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag11078.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag11078.d(19): Error: none of the overloads of 'value' are callable using argument types (double), candidates are:
-fail_compilation/diag11078.d(12): diag11078.S1.value()
-fail_compilation/diag11078.d(13): diag11078.S1.value(int n)
+fail_compilation/diag11078.d(19): Error: none of the overloads of `value` are callable using argument types `(double)`
+fail_compilation/diag11078.d(12): Candidates are: `diag11078.S1.value()`
+fail_compilation/diag11078.d(13): `diag11078.S1.value(int n)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag11132.d b/gcc/testsuite/gdc.test/fail_compilation/diag11132.d
index 74062c2..64db64d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag11132.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag11132.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag11132.d(22): Error: overlapping initialization for field a and b
+fail_compilation/diag11132.d(22): Error: overlapping initialization for field `a` and `b`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag11425.d b/gcc/testsuite/gdc.test/fail_compilation/diag11425.d
index 16c99cc..f8edc5c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag11425.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag11425.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag11425.d(13): Error: variable x is shadowing variable diag11425.main.x
+fail_compilation/diag11425.d(13): Error: variable `x` is shadowing variable `diag11425.main.x`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag11727.d b/gcc/testsuite/gdc.test/fail_compilation/diag11727.d
index 907c9bb..44cd65a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag11727.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag11727.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag11727.d(10): Error: type n is not an expression
+fail_compilation/diag11727.d(10): Error: type `n` is not an expression
---
*/
auto returnEnum()
@@ -17,7 +17,7 @@ void main()
/*
TEST_OUTPUT:
---
-fail_compilation/diag11727.d(26): Error: type void is not an expression
+fail_compilation/diag11727.d(26): Error: type `void` is not an expression
---
*/
auto returnVoid()
@@ -29,7 +29,7 @@ auto returnVoid()
/*
TEST_OUTPUT:
---
-fail_compilation/diag11727.d(38): Error: template t() has no type
+fail_compilation/diag11727.d(38): Error: template `t()` has no type
---
*/
auto returnTemplate()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag11756.d b/gcc/testsuite/gdc.test/fail_compilation/diag11756.d
index 3d56b99..3a07247 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag11756.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag11756.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag11756.d(15): Error: cannot read uninitialized variable cnt in CTFE
-fail_compilation/diag11756.d(34): called from here: foo.ptr2.opAssign(Ptr(& n))
-fail_compilation/diag11756.d(39): called from here: test()
+fail_compilation/diag11756.d(15): Error: cannot read uninitialized variable `cnt` in CTFE
+fail_compilation/diag11756.d(34): called from here: `foo.ptr2.opAssign(Ptr(& n))`
+fail_compilation/diag11756.d(39): called from here: `test()`
fail_compilation/diag11756.d(39): while evaluating: `static assert(test())`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag11769.d b/gcc/testsuite/gdc.test/fail_compilation/diag11769.d
index bfe4e1b..2717de4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag11769.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag11769.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag11769.d(18): Error: diag11769.foo!string.bar called with argument types (string) matches both:
-fail_compilation/diag11769.d(13): diag11769.foo!string.bar(wstring _param_0)
+fail_compilation/diag11769.d(18): Error: `diag11769.foo!string.bar` called with argument types `(string)` matches both:
+fail_compilation/diag11769.d(13): `diag11769.foo!string.bar(wstring _param_0)`
and:
-fail_compilation/diag11769.d(14): diag11769.foo!string.bar(dstring _param_0)
+fail_compilation/diag11769.d(14): `diag11769.foo!string.bar(dstring _param_0)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag12063.d b/gcc/testsuite/gdc.test/fail_compilation/diag12063.d
index e029810..882a809 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag12063.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag12063.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag12063.d(11): Error: no property 'max' for type 'Foo'
-fail_compilation/diag12063.d(14): Error: incompatible types for ((Foo()) + (1)): 'Bar' and 'int'
+fail_compilation/diag12063.d(11): Error: no property `max` for type `Foo`, perhaps `import std.algorithm;` is needed?
+fail_compilation/diag12063.d(14): Error: incompatible types for `(Foo()) + (1)`: `Bar` and `int`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag12124.d b/gcc/testsuite/gdc.test/fail_compilation/diag12124.d
index 320cfb2..f9f165f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag12124.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag12124.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag12124.d(14): Error: struct diag12124.S1 static opCall is hidden by constructors and can never be called
-fail_compilation/diag12124.d(14): Please use a factory method instead, or replace all constructors with static opCall.
-fail_compilation/diag12124.d(20): Error: struct diag12124.S2 static opCall is hidden by constructors and can never be called
-fail_compilation/diag12124.d(20): Please use a factory method instead, or replace all constructors with static opCall.
+fail_compilation/diag12124.d(14): Error: struct `diag12124.S1` `static opCall` is hidden by constructors and can never be called
+fail_compilation/diag12124.d(14): Please use a factory method instead, or replace all constructors with `static opCall`.
+fail_compilation/diag12124.d(20): Error: struct `diag12124.S2` `static opCall` is hidden by constructors and can never be called
+fail_compilation/diag12124.d(20): Please use a factory method instead, or replace all constructors with `static opCall`.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag12280.d b/gcc/testsuite/gdc.test/fail_compilation/diag12280.d
index f125ff3..8fba615 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag12280.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag12280.d
@@ -2,8 +2,8 @@
TEST_OUTPUT:
---
fail_compilation/diag12280.d(15): Error: undefined identifier `nonexistent`
-fail_compilation/diag12280.d(13): Error: template instance diag12280.f!10 error instantiating
-fail_compilation/diag12280.d(18): 11 recursive instantiations from here: f!0
+fail_compilation/diag12280.d(13): Error: template instance `diag12280.f!10` error instantiating
+fail_compilation/diag12280.d(18): 11 recursive instantiations from here: `f!0`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag12312.d b/gcc/testsuite/gdc.test/fail_compilation/diag12312.d
index 7120a8f..e015cfe 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag12312.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag12312.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag12312.d(10): Error: variable diag12312.main.arr void[16] does not have a default initializer
+fail_compilation/diag12312.d(10): Error: variable `diag12312.main.arr` `void[16]` does not have a default initializer
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag12380.d b/gcc/testsuite/gdc.test/fail_compilation/diag12380.d
index f6434f0..7f59f27 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag12380.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag12380.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag12380.d(12): Error: cannot implicitly convert expression `cast(E)0` of type `E` to `void*`
+fail_compilation/diag12380.d(12): Error: cannot implicitly convert expression `E.a` of type `E` to `void*`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag12480.d b/gcc/testsuite/gdc.test/fail_compilation/diag12480.d
index 1989874..01c2e4e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag12480.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag12480.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag12480.d(12): Error: static assert `2u == 3u` is false
+fail_compilation/diag12480.d(12): Error: static assert: `2u == 3u` is false
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag12487.d b/gcc/testsuite/gdc.test/fail_compilation/diag12487.d
index b919323..8ea103e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag12487.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag12487.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag12487.d(15): Error: recursive expansion of template instance 'diag12487.recTemplate!int'
-fail_compilation/diag12487.d(25): Error: template instance diag12487.recTemplate!int error instantiating
-fail_compilation/diag12487.d(18): Error: function diag12487.recFunction CTFE recursion limit exceeded
-fail_compilation/diag12487.d(20): called from here: recFunction(i)
-fail_compilation/diag12487.d(18): 1000 recursive calls to function recFunction
-fail_compilation/diag12487.d(27): called from here: recFunction(0)
+fail_compilation/diag12487.d(15): Error: recursive expansion of template instance `diag12487.recTemplate!int`
+fail_compilation/diag12487.d(25): Error: template instance `diag12487.recTemplate!int` error instantiating
+fail_compilation/diag12487.d(18): Error: function `diag12487.recFunction` CTFE recursion limit exceeded
+fail_compilation/diag12487.d(20): called from here: `recFunction(i)`
+fail_compilation/diag12487.d(18): 1000 recursive calls to function `recFunction`
+fail_compilation/diag12487.d(27): called from here: `recFunction(0)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag12678.d b/gcc/testsuite/gdc.test/fail_compilation/diag12678.d
index afe56fb..8b17968 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag12678.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag12678.d
@@ -1,9 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag12678.d(19): Error: const field 'cf1' initialized multiple times
-fail_compilation/diag12678.d(22): Error: immutable field 'if1' initialized multiple times
-fail_compilation/diag12678.d(25): Error: const field 'cf2' initialization is not allowed in loops or after labels
+fail_compilation/diag12678.d(21): Error: const field `cf1` initialized multiple times
+fail_compilation/diag12678.d(20): Previous initialization is here.
+fail_compilation/diag12678.d(24): Error: immutable field `if1` initialized multiple times
+fail_compilation/diag12678.d(23): Previous initialization is here.
+fail_compilation/diag12678.d(27): Error: const field `cf2` initialization is not allowed in loops or after labels
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag12777.d b/gcc/testsuite/gdc.test/fail_compilation/diag12777.d
index 1eefd29..dd4321b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag12777.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag12777.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag12777.d(14): Error: cannot modify this.v in const function
-fail_compilation/diag12777.d(15): Error: cannot modify this.v in immutable function
-fail_compilation/diag12777.d(21): Error: cannot modify this.v in const function
-fail_compilation/diag12777.d(22): Error: cannot modify this.v in immutable function
+fail_compilation/diag12777.d(14): Error: cannot modify `this.v` in `const` function
+fail_compilation/diag12777.d(15): Error: cannot modify `this.v` in `immutable` function
+fail_compilation/diag12777.d(21): Error: cannot modify `this.v` in `const` function
+fail_compilation/diag12777.d(22): Error: cannot modify `this.v` in `immutable` function
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag12829.d b/gcc/testsuite/gdc.test/fail_compilation/diag12829.d
index dcaa9f0..f6e764b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag12829.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag12829.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag12829.d(12): Error: function diag12829.test1 is @nogc yet allocates closures with the GC
-fail_compilation/diag12829.d(15): diag12829.test1.__lambda1 closes over variable x at fail_compilation/diag12829.d(14)
+fail_compilation/diag12829.d(12): Error: function `diag12829.test1` is `@nogc` yet allocates closures with the GC
+fail_compilation/diag12829.d(15): diag12829.test1.__lambda2 closes over variable x at fail_compilation/diag12829.d(14)
fail_compilation/diag12829.d(19): diag12829.test1.bar closes over variable x at fail_compilation/diag12829.d(14)
-fail_compilation/diag12829.d(26): Error: function diag12829.test2 is @nogc yet allocates closures with the GC
+fail_compilation/diag12829.d(26): Error: function `diag12829.test2` is `@nogc` yet allocates closures with the GC
fail_compilation/diag12829.d(31): diag12829.test2.S.foo closes over variable x at fail_compilation/diag12829.d(28)
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag13028.d b/gcc/testsuite/gdc.test/fail_compilation/diag13028.d
index d26cb94..6ef11aa 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag13028.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag13028.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag13028.d(15): Error: variable dg cannot be read at compile time
-fail_compilation/diag13028.d(22): Error: variable a cannot be read at compile time
-fail_compilation/diag13028.d(28): Error: CTFE failed because of previous errors in foo
-fail_compilation/diag13028.d(28): while evaluating: `static assert(foo(() => 1) == 1)`
-fail_compilation/diag13028.d(29): Error: CTFE failed because of previous errors in bar
-fail_compilation/diag13028.d(29): while evaluating: `static assert(bar(delegate int() => 1) == 1)`
+fail_compilation/diag13028.d(15): Error: variable `dg` cannot be read at compile time
+fail_compilation/diag13028.d(22): Error: variable `a` cannot be read at compile time
+fail_compilation/diag13028.d(28): Error: CTFE failed because of previous errors in `foo`
+fail_compilation/diag13028.d(28): while evaluating: `static assert(foo(() pure nothrow @nogc @safe => 1) == 1)`
+fail_compilation/diag13028.d(29): Error: CTFE failed because of previous errors in `bar`
+fail_compilation/diag13028.d(29): while evaluating: `static assert(bar(delegate int() pure nothrow @nogc @safe => 1) == 1)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag13215.d b/gcc/testsuite/gdc.test/fail_compilation/diag13215.d
new file mode 100644
index 0000000..3ae50c9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag13215.d
@@ -0,0 +1,12 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag13215.d(11): Error: cannot implicitly convert expression `[1, 2, 3]` of type `int[]` to `immutable(uint[2])[]`
+---
+*/
+
+enum uint N = 10;
+immutable uint[2][3] arr2;
+shared static this() {
+ arr2 = [1, 2, 3];
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag13320.d b/gcc/testsuite/gdc.test/fail_compilation/diag13320.d
index 46a0032..2808606 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag13320.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag13320.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag13320.d(13): Error: 'f += 1' is not a scalar, it is a Foo
+fail_compilation/diag13320.d(13): Error: `f` is not a scalar, it is a `Foo`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag13333.d b/gcc/testsuite/gdc.test/fail_compilation/diag13333.d
index f318a31..34eeaeb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag13333.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag13333.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT*
---
-fail_compilation/diag13333.d(29): Error: template instance VariantN!(maxSize!(S), T) recursive template expansion
-fail_compilation/diag13333.d(29): Error: template instance diag13333.maxSize!(S) error instantiating
-fail_compilation/diag13333.d(34): instantiated from here: Algebraic!(S)
+fail_compilation/diag13333.d(29): Error: template instance `VariantN!(maxSize!(S), T)` recursive template expansion
+fail_compilation/diag13333.d(29): Error: template instance `diag13333.maxSize!(S)` error instantiating
+fail_compilation/diag13333.d(34): instantiated from here: `Algebraic!(S)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag13528.d b/gcc/testsuite/gdc.test/fail_compilation/diag13528.d
index 493cbc7..5d908f7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag13528.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag13528.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag13528.d(13): Error: value of 'this' is not known at compile time
-fail_compilation/diag13528.d(13): while evaluating pragma(msg, __traits(getMember, A, "foo"))
+fail_compilation/diag13528.d(13): Error: value of `this` is not known at compile time
+fail_compilation/diag13528.d(13): while evaluating `pragma(msg, __traits(getMember, A, "foo"))`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag13609b.d b/gcc/testsuite/gdc.test/fail_compilation/diag13609b.d
index dccb9c7..86690fc 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag13609b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag13609b.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/diag13609b.d(10): Error: base classes are not allowed for `struct`, did you mean `;`?
-fail_compilation/diag13609b.d(11): Error: basic type expected, not `EOF`
+fail_compilation/diag13609b.d(11): Error: basic type expected, not `End of File`
fail_compilation/diag13609b.d(11): Error: { } expected following `struct` declaration
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag13787.d b/gcc/testsuite/gdc.test/fail_compilation/diag13787.d
index 99162ed..3a3a2c9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag13787.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag13787.d
@@ -2,8 +2,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag13787.d(12): Error: cannot slice function pointer & main
-fail_compilation/diag13787.d(13): Error: cannot index function pointer & main
+fail_compilation/diag13787.d(12): Error: cannot slice function pointer `& main`
+fail_compilation/diag13787.d(13): Error: cannot index function pointer `& main`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag13884.d b/gcc/testsuite/gdc.test/fail_compilation/diag13884.d
index 71909e28..fe47c83 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag13884.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag13884.d
@@ -2,8 +2,8 @@
TEST_OUTPUT:
---
fail_compilation/diag13884.d(14): Error: functions cannot return a tuple
-fail_compilation/diag13884.d(21): instantiated from here: MapResult!((t) => t.tupleof, Foo[])
-fail_compilation/diag13884.d(14): instantiated from here: map!(Foo[])
+fail_compilation/diag13884.d(21): instantiated from here: `MapResult!((t) => t.tupleof, Foo[])`
+fail_compilation/diag13884.d(14): instantiated from here: `map!(Foo[])`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag13942.d b/gcc/testsuite/gdc.test/fail_compilation/diag13942.d
index 9abea3c..992d5b8 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag13942.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag13942.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag13942.d(18): Error: template instance isRawStaticArray!() does not match template declaration isRawStaticArray(T, A...)
-fail_compilation/diag13942.d(26): Error: template diag13942.to!double.to cannot deduce function from argument types !()(), candidates are:
-fail_compilation/diag13942.d(17): diag13942.to!double.to(A...)(A args) if (!isRawStaticArray!A)
+fail_compilation/diag13942.d(18): Error: template instance `isRawStaticArray!()` does not match template declaration `isRawStaticArray(T, A...)`
+fail_compilation/diag13942.d(26): Error: template `diag13942.to!double.to` cannot deduce function from argument types `!()()`
+fail_compilation/diag13942.d(17): Candidate is: `to(A...)(A args)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag14102.d b/gcc/testsuite/gdc.test/fail_compilation/diag14102.d
index c142b97..e93d40b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag14102.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag14102.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag14102.d(14): Error: -x is not an lvalue
-fail_compilation/diag14102.d(15): Error: -(x -= 1) is not an lvalue
-fail_compilation/diag14102.d(16): Error: -(x -= 1 -= 1) is not an lvalue
-fail_compilation/diag14102.d(17): Error: -(x -= 1 -= 1 -= 1) is not an lvalue
+fail_compilation/diag14102.d(14): Error: `-x` is not an lvalue and cannot be modified
+fail_compilation/diag14102.d(15): Error: `-(x -= 1)` is not an lvalue and cannot be modified
+fail_compilation/diag14102.d(16): Error: `-(x -= 1 -= 1)` is not an lvalue and cannot be modified
+fail_compilation/diag14102.d(17): Error: `-(x -= 1 -= 1 -= 1)` is not an lvalue and cannot be modified
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag14145.d b/gcc/testsuite/gdc.test/fail_compilation/diag14145.d
new file mode 100644
index 0000000..d292f76
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag14145.d
@@ -0,0 +1,38 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag14145.d(15): Error: no property `i` for type `diag14145.main.Capture!(i)`
+fail_compilation/diag14145.d(15): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message
+fail_compilation/diag14145.d(34): Error: expression `*this.ptr` of type `shared(int)` is not implicitly convertible to return type `ref int`
+fail_compilation/diag14145.d(16): Error: template instance `diag14145.main.Capture!(i).Capture.opDispatch!"i"` error instantiating
+---
+*/
+
+int main()
+{
+ int i;
+ auto _ = capture!i;
+ _.i;
+ _.opDispatch!"i";
+ return 0;
+}
+
+auto capture(alias c)()
+{
+ return Capture!c(c);
+}
+
+struct Capture(alias c)
+{
+ shared typeof(c)* ptr;
+ this(ref typeof(c) _c)
+ {
+ ptr = cast(shared)&c;
+ }
+ ref shared typeof(c) opDispatch(string s)()
+ {
+ return *ptr;
+ }
+}
+
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag14163.d b/gcc/testsuite/gdc.test/fail_compilation/diag14163.d
index 8fe6343..eaafc07 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag14163.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag14163.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag14163.d(16): Error: constructor diag14163.Bar.this cannot call super() implicitly because it is annotated with @disable
+fail_compilation/diag14163.d(16): Error: constructor `diag14163.Bar.this` cannot call `super()` implicitly because it is annotated with `@disable`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag14235.d b/gcc/testsuite/gdc.test/fail_compilation/diag14235.d
index 4880bdf..3c8a98e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag14235.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag14235.d
@@ -1,9 +1,10 @@
/*
+EXTRA_FILES: imports/a14235.d
TEST_OUTPUT:
---
-fail_compilation/diag14235.d(11): Error: template identifier 'Undefined' is not a member of module 'imports.a14235'
-fail_compilation/diag14235.d(12): Error: template identifier 'Something' is not a member of module 'imports.a14235', did you mean struct 'SomeThing(T...)'?
-fail_compilation/diag14235.d(13): Error: imports.a14235.SomeClass is not a template, it is a class
+fail_compilation/diag14235.d(12): Error: template identifier `Undefined` is not a member of module `imports.a14235`
+fail_compilation/diag14235.d(13): Error: template identifier `Something` is not a member of module `imports.a14235`, did you mean struct `SomeThing(T...)`?
+fail_compilation/diag14235.d(14): Error: `imports.a14235.SomeClass` is not a template, it is a class
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag14818.d b/gcc/testsuite/gdc.test/fail_compilation/diag14818.d
index 4eef748..660066a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag14818.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag14818.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag14818.d(34): Error: none of the overloads of 'func' are callable using argument types (string), candidates are:
-fail_compilation/diag14818.d(12): diag14818.foo(int _param_0)
-fail_compilation/diag14818.d(13): diag14818.bar(double _param_0)
-fail_compilation/diag14818.d(35): Error: overload alias diag14818.X does not match any template declaration
-fail_compilation/diag14818.d(36): Error: overloadset diag14818.M does not match any template declaration
+fail_compilation/diag14818.d(34): Error: none of the overloads of `func` are callable using argument types `(string)`
+fail_compilation/diag14818.d(12): Candidate is: `diag14818.foo(int _param_0)`
+fail_compilation/diag14818.d(13): `diag14818.bar(double _param_0)`
+fail_compilation/diag14818.d(35): Error: overload alias `diag14818.X` does not match any template declaration
+fail_compilation/diag14818.d(36): Error: overloadset `diag14818.M` does not match any template declaration
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag14875.d b/gcc/testsuite/gdc.test/fail_compilation/diag14875.d
index 52a6127..a4d4abe 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag14875.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag14875.d
@@ -6,7 +6,7 @@ deprecated immutable int depVar = 10;
/*
TEST_OUTPUT:
---
-fail_compilation/diag14875.d(16): Deprecation: class diag14875.Dep is deprecated
+fail_compilation/diag14875.d(16): Deprecation: class `diag14875.Dep` is deprecated
1: Dep
2: Dep
3: Dep
@@ -36,11 +36,16 @@ template Baz(T)
/*
TEST_OUTPUT:
---
-fail_compilation/diag14875.d(47): Deprecation: class diag14875.Dep is deprecated
-fail_compilation/diag14875.d(51): Deprecation: variable diag14875.depVar is deprecated
+fail_compilation/diag14875.d(52): Deprecation: class `diag14875.Dep` is deprecated
+fail_compilation/diag14875.d(56): Deprecation: variable `diag14875.depVar` is deprecated
+fail_compilation/diag14875.d(52): instantiated from here: `Voo!(Dep)`
4: Dep
-fail_compilation/diag14875.d(58): Deprecation: variable diag14875.depVar is deprecated
-fail_compilation/diag14875.d(59): Deprecation: variable diag14875.Vaz!(Dep).Vaz is deprecated
+fail_compilation/diag14875.d(63): Deprecation: variable `diag14875.depVar` is deprecated
+fail_compilation/diag14875.d(59): instantiated from here: `Var!(Dep)`
+fail_compilation/diag14875.d(52): instantiated from here: `Voo!(Dep)`
+fail_compilation/diag14875.d(64): Deprecation: template `diag14875.Vaz(T)` is deprecated
+fail_compilation/diag14875.d(59): instantiated from here: `Var!(Dep)`
+fail_compilation/diag14875.d(52): instantiated from here: `Voo!(Dep)`
---
*/
@@ -67,7 +72,7 @@ deprecated template Vaz(T)
/*
TEST_OUTPUT:
---
-fail_compilation/diag14875.d(75): Error: static assert `0` is false
+fail_compilation/diag14875.d(80): Error: static assert: `0` is false
---
*/
void main()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag14876.d b/gcc/testsuite/gdc.test/fail_compilation/diag14876.d
index dcc440f..0ca0360 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag14876.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag14876.d
@@ -1,14 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag14876.d(17): Deprecation: class diag14876.Dep is deprecated
-fail_compilation/diag14876.d(18): Deprecation: class diag14876.Dep is deprecated
-fail_compilation/diag14876.d(19): Deprecation: class diag14876.Dep is deprecated
-fail_compilation/diag14876.d(20): Deprecation: class diag14876.Dep is deprecated
-fail_compilation/diag14876.d(21): Deprecation: class diag14876.Dep is deprecated
-fail_compilation/diag14876.d(22): Deprecation: class diag14876.Dep is deprecated
-fail_compilation/diag14876.d(23): Deprecation: class diag14876.Dep is deprecated
-fail_compilation/diag14876.d(23): Error: can only slice tuple types, not diag14876.Dep
+fail_compilation/diag14876.d(17): Deprecation: class `diag14876.Dep` is deprecated
+fail_compilation/diag14876.d(18): Deprecation: class `diag14876.Dep` is deprecated
+fail_compilation/diag14876.d(19): Deprecation: class `diag14876.Dep` is deprecated
+fail_compilation/diag14876.d(20): Deprecation: class `diag14876.Dep` is deprecated
+fail_compilation/diag14876.d(21): Deprecation: class `diag14876.Dep` is deprecated
+fail_compilation/diag14876.d(22): Deprecation: class `diag14876.Dep` is deprecated
+fail_compilation/diag14876.d(23): Deprecation: class `diag14876.Dep` is deprecated
+fail_compilation/diag14876.d(23): Error: can only slice tuple types, not `diag14876.Dep`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag15209.d b/gcc/testsuite/gdc.test/fail_compilation/diag15209.d
index 341e026..9a4f396 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag15209.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag15209.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag15209.d(18): Error: need 'this' for 'x' of type 'int'
-fail_compilation/diag15209.d(21): Error: need 'this' for 'x' of type 'int'
+fail_compilation/diag15209.d(18): Error: need `this` for `x` of type `int`
+fail_compilation/diag15209.d(21): Error: need `this` for `x` of type `int`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag15411.d b/gcc/testsuite/gdc.test/fail_compilation/diag15411.d
index bc77d81..8b18c19 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag15411.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag15411.d
@@ -2,8 +2,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag15411.d(13): Error: function diag15411.test15411.__funcliteral1 cannot access frame of function diag15411.test15411
-fail_compilation/diag15411.d(14): Error: function diag15411.test15411.__funcliteral2 cannot access frame of function diag15411.test15411
+fail_compilation/diag15411.d(17): Error: function `diag15411.test15411.__funcliteral2` cannot access variable `i` in frame of function `diag15411.test15411`
+fail_compilation/diag15411.d(16): `i` declared here
+fail_compilation/diag15411.d(18): Error: function `diag15411.test15411.__funcliteral4` cannot access variable `i` in frame of function `diag15411.test15411`
+fail_compilation/diag15411.d(16): `i` declared here
+fail_compilation/diag15411.d(26): Error: `static` function `diag15411.testNestedFunction.myFunc2` cannot access function `myFunc1` in frame of function `diag15411.testNestedFunction`
+fail_compilation/diag15411.d(25): `myFunc1` declared here
---
*/
@@ -13,3 +17,11 @@ void test15411()
auto j = (function() { return i; })();
auto f = function() { return i; };
}
+
+void testNestedFunction ()
+{
+ int i = 42;
+
+ void myFunc1() { assert(i == 42); }
+ static void myFunc2 () { myFunc1(); }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag15669.d b/gcc/testsuite/gdc.test/fail_compilation/diag15669.d
index a2ab4aa..6827685 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag15669.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag15669.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag15669.d(14): Error: variable __b_field_0 cannot be read at compile time
+fail_compilation/diag15669.d(14): Error: variable `__b_field_0` cannot be read at compile time
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag15713.d b/gcc/testsuite/gdc.test/fail_compilation/diag15713.d
index a7714c9..34fc645 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag15713.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag15713.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag15713.d(18): Error: no property 'widthSign' for type 'Data'
-fail_compilation/diag15713.d(38): Error: template instance test.conwritefImpl!("parse-int", "width", "\x0a", Data()) error instantiating
-fail_compilation/diag15713.d(43): instantiated from here: conwritefImpl!("main", "\x0a", Data())
-fail_compilation/diag15713.d(48): instantiated from here: fdwritef!()
+fail_compilation/diag15713.d(19): Error: no property `widthSign` for type `diag15713.WrData.Data`
+fail_compilation/diag15713.d(39): Error: template instance `diag15713.conwritefImpl!("parse-int", "width", "\x0a", Data(null))` error instantiating
+fail_compilation/diag15713.d(44): instantiated from here: `conwritefImpl!("main", "\x0a", Data(null))`
+fail_compilation/diag15713.d(49): instantiated from here: `fdwritef!()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag15974.d b/gcc/testsuite/gdc.test/fail_compilation/diag15974.d
index a6b3077..03f63f4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag15974.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag15974.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag15974.d(21): Error: variable f cannot be read at compile time
-fail_compilation/diag15974.d(21): called from here: format("%s", f)
-fail_compilation/diag15974.d(26): Error: variable f cannot be read at compile time
-fail_compilation/diag15974.d(26): called from here: format("%s", f)
+fail_compilation/diag15974.d(21): Error: variable `f` cannot be read at compile time
+fail_compilation/diag15974.d(21): called from here: `format("%s", f)`
+fail_compilation/diag15974.d(26): Error: variable `f` cannot be read at compile time
+fail_compilation/diag15974.d(26): called from here: `format("%s", f)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag16499.d b/gcc/testsuite/gdc.test/fail_compilation/diag16499.d
index 5d0c6ff..63b4b3c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag16499.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag16499.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag16499.d(22): Error: incompatible types for ((2) in (foo)): 'int' and 'A'
-fail_compilation/diag16499.d(24): Error: incompatible types for ((1.00000) in (bar)): 'double' and 'B'
+fail_compilation/diag16499.d(22): Error: incompatible types for `(2) in (foo)`: `int` and `A`
+fail_compilation/diag16499.d(24): Error: incompatible types for `(1.0) in (bar)`: `double` and `B`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag16977.d b/gcc/testsuite/gdc.test/fail_compilation/diag16977.d
index 0754fc6..8f991a7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag16977.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag16977.d
@@ -1,12 +1,15 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag16977.d(22): Error: undefined identifier `undefined`, did you mean function `undefinedId`?
-fail_compilation/diag16977.d(23): Error: cannot implicitly convert expression `"\x01string"` of type `string` to `int`
-fail_compilation/diag16977.d(24): Error: template diag16977.templ cannot deduce function from argument types !()(int), candidates are:
-fail_compilation/diag16977.d(17): diag16977.templ(S)(S s) if (false)
-fail_compilation/diag16977.d(25): Error: cannot implicitly convert expression `5` of type `int` to `string`
-fail_compilation/diag16977.d(27): Error: template instance diag16977.test.funcTemplate!string error instantiating
+fail_compilation/diag16977.d(25): Error: undefined identifier `undefined`, did you mean function `undefinedId`?
+fail_compilation/diag16977.d(26): Error: cannot implicitly convert expression `"\x01string"` of type `string` to `int`
+fail_compilation/diag16977.d(27): Error: template `diag16977.templ` cannot deduce function from argument types `!()(int)`
+fail_compilation/diag16977.d(20): Candidate is: `templ(S)(S s)`
+ with `S = int`
+ must satisfy the following constraint:
+` false`
+fail_compilation/diag16977.d(28): Error: cannot implicitly convert expression `5` of type `int` to `string`
+fail_compilation/diag16977.d(30): Error: template instance `diag16977.test.funcTemplate!string` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag1730.d b/gcc/testsuite/gdc.test/fail_compilation/diag1730.d
index 697cd5a..a17479c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag1730.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag1730.d
@@ -1,28 +1,41 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag1730.d(38): Error: mutable method diag1730.S.func is not callable using a inout object
-fail_compilation/diag1730.d(40): Error: immutable method diag1730.S.iFunc is not callable using a inout object
-fail_compilation/diag1730.d(41): Error: shared mutable method diag1730.S.sFunc is not callable using a non-shared inout object
-fail_compilation/diag1730.d(42): Error: shared const method diag1730.S.scFunc is not callable using a non-shared inout object
-fail_compilation/diag1730.d(57): Error: immutable method diag1730.S.iFunc is not callable using a mutable object
-fail_compilation/diag1730.d(58): Error: shared method diag1730.S.sFunc is not callable using a non-shared object
-fail_compilation/diag1730.d(59): Error: shared const method diag1730.S.scFunc is not callable using a non-shared mutable object
-fail_compilation/diag1730.d(62): Error: mutable method diag1730.S.func is not callable using a const object
-fail_compilation/diag1730.d(64): Error: immutable method diag1730.S.iFunc is not callable using a const object
-fail_compilation/diag1730.d(65): Error: shared mutable method diag1730.S.sFunc is not callable using a non-shared const object
-fail_compilation/diag1730.d(66): Error: shared const method diag1730.S.scFunc is not callable using a non-shared const object
-fail_compilation/diag1730.d(69): Error: mutable method diag1730.S.func is not callable using a immutable object
-fail_compilation/diag1730.d(72): Error: shared mutable method diag1730.S.sFunc is not callable using a immutable object
-fail_compilation/diag1730.d(76): Error: non-shared method diag1730.S.func is not callable using a shared object
-fail_compilation/diag1730.d(77): Error: non-shared const method diag1730.S.cFunc is not callable using a shared mutable object
-fail_compilation/diag1730.d(78): Error: immutable method diag1730.S.iFunc is not callable using a shared mutable object
-fail_compilation/diag1730.d(81): Error: non-shared inout method diag1730.S.wFunc is not callable using a shared mutable object
-fail_compilation/diag1730.d(83): Error: non-shared mutable method diag1730.S.func is not callable using a shared const object
-fail_compilation/diag1730.d(84): Error: non-shared const method diag1730.S.cFunc is not callable using a shared const object
-fail_compilation/diag1730.d(85): Error: immutable method diag1730.S.iFunc is not callable using a shared const object
-fail_compilation/diag1730.d(86): Error: shared mutable method diag1730.S.sFunc is not callable using a shared const object
-fail_compilation/diag1730.d(88): Error: non-shared inout method diag1730.S.wFunc is not callable using a shared const object
+fail_compilation/diag1730.d(51): Error: mutable method `diag1730.S.func` is not callable using a `inout` object
+fail_compilation/diag1730.d(43): Consider adding `const` or `inout` here
+fail_compilation/diag1730.d(53): Error: `immutable` method `diag1730.S.iFunc` is not callable using a `inout` object
+fail_compilation/diag1730.d(54): Error: `shared` mutable method `diag1730.S.sFunc` is not callable using a non-shared `inout` object
+fail_compilation/diag1730.d(46): Consider adding `const` or `inout` here
+fail_compilation/diag1730.d(55): Error: `shared` `const` method `diag1730.S.scFunc` is not callable using a non-shared `inout` object
+fail_compilation/diag1730.d(70): Error: `immutable` method `diag1730.S.iFunc` is not callable using a mutable object
+fail_compilation/diag1730.d(71): Error: `shared` method `diag1730.S.sFunc` is not callable using a non-shared object
+fail_compilation/diag1730.d(72): Error: `shared` `const` method `diag1730.S.scFunc` is not callable using a non-shared mutable object
+fail_compilation/diag1730.d(75): Error: mutable method `diag1730.S.func` is not callable using a `const` object
+fail_compilation/diag1730.d(43): Consider adding `const` or `inout` here
+fail_compilation/diag1730.d(77): Error: `immutable` method `diag1730.S.iFunc` is not callable using a `const` object
+fail_compilation/diag1730.d(78): Error: `shared` mutable method `diag1730.S.sFunc` is not callable using a non-shared `const` object
+fail_compilation/diag1730.d(46): Consider adding `const` or `inout` here
+fail_compilation/diag1730.d(79): Error: `shared` `const` method `diag1730.S.scFunc` is not callable using a non-shared `const` object
+fail_compilation/diag1730.d(82): Error: mutable method `diag1730.S.func` is not callable using a `immutable` object
+fail_compilation/diag1730.d(43): Consider adding `const` or `inout` here
+fail_compilation/diag1730.d(85): Error: `shared` mutable method `diag1730.S.sFunc` is not callable using a `immutable` object
+fail_compilation/diag1730.d(46): Consider adding `const` or `inout` here
+fail_compilation/diag1730.d(89): Error: non-shared method `diag1730.S.func` is not callable using a `shared` object
+fail_compilation/diag1730.d(43): Consider adding `shared` here
+fail_compilation/diag1730.d(90): Error: non-shared `const` method `diag1730.S.cFunc` is not callable using a `shared` mutable object
+fail_compilation/diag1730.d(44): Consider adding `shared` here
+fail_compilation/diag1730.d(91): Error: `immutable` method `diag1730.S.iFunc` is not callable using a `shared` mutable object
+fail_compilation/diag1730.d(94): Error: non-shared `inout` method `diag1730.S.wFunc` is not callable using a `shared` mutable object
+fail_compilation/diag1730.d(48): Consider adding `shared` here
+fail_compilation/diag1730.d(96): Error: non-shared mutable method `diag1730.S.func` is not callable using a `shared` `const` object
+fail_compilation/diag1730.d(43): Consider adding `shared` here
+fail_compilation/diag1730.d(97): Error: non-shared `const` method `diag1730.S.cFunc` is not callable using a `shared` `const` object
+fail_compilation/diag1730.d(44): Consider adding `shared` here
+fail_compilation/diag1730.d(98): Error: `immutable` method `diag1730.S.iFunc` is not callable using a `shared` `const` object
+fail_compilation/diag1730.d(99): Error: `shared` mutable method `diag1730.S.sFunc` is not callable using a `shared` `const` object
+fail_compilation/diag1730.d(46): Consider adding `const` or `inout` here
+fail_compilation/diag1730.d(101): Error: non-shared `inout` method `diag1730.S.wFunc` is not callable using a `shared` `const` object
+fail_compilation/diag1730.d(48): Consider adding `shared` here
---
*/
struct S
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag18460.d b/gcc/testsuite/gdc.test/fail_compilation/diag18460.d
new file mode 100644
index 0000000..148b64b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag18460.d
@@ -0,0 +1,13 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag18460.d(12): Error: no property `opCall` for type `diag18460.Foo`, did you mean `new Foo`?
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=18460
+
+class Foo {}
+
+void main() {
+ auto f = Foo();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag18574.d b/gcc/testsuite/gdc.test/fail_compilation/diag18574.d
new file mode 100644
index 0000000..fef9829
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag18574.d
@@ -0,0 +1,17 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag18574.d(16): Error: `diag18574.Test`: multiple class inheritance is not supported. Use multiple interface inheritance and/or composition.
+fail_compilation/diag18574.d(16): `diag18574.Bar` has no fields, consider making it an `interface`
+fail_compilation/diag18574.d(16): `diag18574.Baz` has fields, consider making it a member of `diag18574.Test`
+fail_compilation/diag18574.d(16): Error: `diag18574.Test`: base type must be `interface`, not `int`
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=18574
+
+class Foo {}
+class Bar {}
+class Baz { int a; }
+
+class Test : Foo, Bar, Baz, int {}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag19022.d b/gcc/testsuite/gdc.test/fail_compilation/diag19022.d
new file mode 100644
index 0000000..0aa26f5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag19022.d
@@ -0,0 +1,18 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag19022.d(16): Error: immutable field `b` initialized multiple times
+fail_compilation/diag19022.d(15): Previous initialization is here.
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=19022
+
+struct Foo
+{
+ immutable int b;
+ this(int a)
+ {
+ b = 2;
+ b = 2;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag19225.d b/gcc/testsuite/gdc.test/fail_compilation/diag19225.d
new file mode 100644
index 0000000..bbb8251
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag19225.d
@@ -0,0 +1,15 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag19225.d(14): Error: basic type expected, not `else`
+fail_compilation/diag19225.d(14): There's no `static else`, use `else` instead.
+fail_compilation/diag19225.d(14): Error: found `else` without a corresponding `if`, `version` or `debug` statement
+fail_compilation/diag19225.d(15): Error: unrecognized declaration
+---
+*/
+
+void main()
+{
+ static if (true) {}
+ static else {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag20059.d b/gcc/testsuite/gdc.test/fail_compilation/diag20059.d
new file mode 100644
index 0000000..2c8063a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag20059.d
@@ -0,0 +1,16 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag20059.d(15): Error: expected return type of `string`, not `string[]`:
+fail_compilation/diag20059.d(13): Return type of `string` inferred here.
+---
+*/
+
+auto fail()
+{
+ string ret;
+ if (true)
+ return ret;
+ else
+ return [ret];
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag20518.d b/gcc/testsuite/gdc.test/fail_compilation/diag20518.d
new file mode 100644
index 0000000..eb0a932
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag20518.d
@@ -0,0 +1,11 @@
+// EXTRA_FILES: imports/diag20518a.d imports/diag20518a/b.d
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag20518.d(11): Error: module `diag20518a` from file fail_compilation/imports/diag20518a.d conflicts with package `imports.diag20518a`
+---
+*/
+
+import imports.diag20518a.b; // from here 'imports.diag20518a' represents a package and you can optionally
+ // import its package.d with 'import imports.diag20518a;', but anyway
+import imports.diag20518a; // if 'imports/diag20518a.d' exists it will conflict with it.
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag21883.d b/gcc/testsuite/gdc.test/fail_compilation/diag21883.d
new file mode 100644
index 0000000..4823167
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag21883.d
@@ -0,0 +1,16 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag21883.d(15): Error: `diag21883.ClassB`: base class must be specified first, before any interfaces.
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=21883
+
+interface InterfaceA {
+}
+
+class ClassA {
+}
+
+class ClassB: InterfaceA, ClassA {
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag2452.d b/gcc/testsuite/gdc.test/fail_compilation/diag2452.d
index 0c12e80..e68e217 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag2452.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag2452.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag2452.d(14): Error: class diag2452.C interface function 'void f(float p)' is not implemented
+fail_compilation/diag2452.d(14): Error: class `diag2452.C` interface function `void f(float p)` is not implemented
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag3013.d b/gcc/testsuite/gdc.test/fail_compilation/diag3013.d
index c57b4b9..41c98b0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag3013.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag3013.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag3013.d(11): Error: cannot pass type string as a function argument
+fail_compilation/diag3013.d(11): Error: cannot pass type `string` as a function argument
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag3438.d b/gcc/testsuite/gdc.test/fail_compilation/diag3438.d
index 3c22ca8..445f6d5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag3438.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag3438.d
@@ -2,12 +2,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag3438.d(16): Deprecation: constructor diag3438.F1.this all parameters have default arguments, but structs cannot have default constructors.
-fail_compilation/diag3438.d(17): Deprecation: constructor diag3438.F2.this all parameters have default arguments, but structs cannot have default constructors.
-fail_compilation/diag3438.d(20): Deprecation: constructor diag3438.F5.this @disable'd constructor cannot have default arguments for all parameters.
-fail_compilation/diag3438.d(20): Use @disable this(); if you want to disable default initialization.
-fail_compilation/diag3438.d(21): Deprecation: constructor diag3438.F6.this @disable'd constructor cannot have default arguments for all parameters.
-fail_compilation/diag3438.d(21): Use @disable this(); if you want to disable default initialization.
+fail_compilation/diag3438.d(16): Error: constructor `diag3438.F1.this` all parameters have default arguments, but structs cannot have default constructors.
+fail_compilation/diag3438.d(17): Error: constructor `diag3438.F2.this` all parameters have default arguments, but structs cannot have default constructors.
+fail_compilation/diag3438.d(20): Error: constructor `diag3438.F5.this` is marked `@disable`, so it cannot have default arguments for all parameters.
+fail_compilation/diag3438.d(20): Use `@disable this();` if you want to disable default initialization.
+fail_compilation/diag3438.d(21): Error: constructor `diag3438.F6.this` is marked `@disable`, so it cannot have default arguments for all parameters.
+fail_compilation/diag3438.d(21): Use `@disable this();` if you want to disable default initialization.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag3672.d b/gcc/testsuite/gdc.test/fail_compilation/diag3672.d
index ab3c224..41b1415 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag3672.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag3672.d
@@ -1,31 +1,53 @@
-// PERMUTE_ARGS:
// REQUIRED_ARGS: -de
/*
TEST_OUTPUT:
---
-fail_compilation/diag3672.d(36): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"+="(x, 1) instead.
-fail_compilation/diag3672.d(37): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"+="(x, 1) instead.
-fail_compilation/diag3672.d(38): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"-="(x, 1) instead.
-fail_compilation/diag3672.d(39): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"-="(x, 1) instead.
-fail_compilation/diag3672.d(40): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"+="(x, 1) instead.
-fail_compilation/diag3672.d(41): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"+="(x, 2) instead.
-fail_compilation/diag3672.d(42): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"-="(x, 3) instead.
-fail_compilation/diag3672.d(43): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"|="(x, y) instead.
-fail_compilation/diag3672.d(44): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"*="(x, y) instead.
-fail_compilation/diag3672.d(45): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"/="(x, y) instead.
-fail_compilation/diag3672.d(46): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"%="(x, y) instead.
-fail_compilation/diag3672.d(47): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"&="(x, y) instead.
-fail_compilation/diag3672.d(48): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"^="(x, y) instead.
-fail_compilation/diag3672.d(49): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"<<="(x, y) instead.
-fail_compilation/diag3672.d(50): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!">>="(x, y) instead.
-fail_compilation/diag3672.d(51): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!">>>="(x, y) instead.
-fail_compilation/diag3672.d(52): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"^^="(x, y) instead.
-fail_compilation/diag3672.d(53): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"+="(ptr, 1) instead.
-fail_compilation/diag3672.d(54): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"+="(ptr, 1) instead.
-fail_compilation/diag3672.d(55): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"-="(ptr, 1) instead.
-fail_compilation/diag3672.d(56): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"-="(ptr, 1) instead.
+fail_compilation/diag3672.d(8): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(8): Use `core.atomic.atomicOp!"+="(x, 1)` instead
+fail_compilation/diag3672.d(9): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(9): Use `core.atomic.atomicOp!"+="(x, 1)` instead
+fail_compilation/diag3672.d(10): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(10): Use `core.atomic.atomicOp!"-="(x, 1)` instead
+fail_compilation/diag3672.d(11): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(11): Use `core.atomic.atomicOp!"-="(x, 1)` instead
+fail_compilation/diag3672.d(12): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(12): Use `core.atomic.atomicOp!"+="(x, 1)` instead
+fail_compilation/diag3672.d(13): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(13): Use `core.atomic.atomicOp!"+="(x, 2)` instead
+fail_compilation/diag3672.d(14): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(14): Use `core.atomic.atomicOp!"-="(x, 3)` instead
+fail_compilation/diag3672.d(15): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(15): Use `core.atomic.atomicOp!"|="(x, y)` instead
+fail_compilation/diag3672.d(16): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(16): Use `core.atomic.atomicOp!"*="(x, y)` instead
+fail_compilation/diag3672.d(17): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(17): Use `core.atomic.atomicOp!"/="(x, y)` instead
+fail_compilation/diag3672.d(18): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(18): Use `core.atomic.atomicOp!"%="(x, y)` instead
+fail_compilation/diag3672.d(19): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(19): Use `core.atomic.atomicOp!"&="(x, y)` instead
+fail_compilation/diag3672.d(20): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(20): Use `core.atomic.atomicOp!"^="(x, y)` instead
+fail_compilation/diag3672.d(21): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(21): Use `core.atomic.atomicOp!"<<="(x, y)` instead
+fail_compilation/diag3672.d(22): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(22): Use `core.atomic.atomicOp!">>="(x, y)` instead
+fail_compilation/diag3672.d(23): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(23): Use `core.atomic.atomicOp!">>>="(x, y)` instead
+fail_compilation/diag3672.d(24): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(24): Use `core.atomic.atomicOp!"^^="(x, y)` instead
+fail_compilation/diag3672.d(25): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(25): Use `core.atomic.atomicOp!"+="(ptr, 1)` instead
+fail_compilation/diag3672.d(26): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(26): Use `core.atomic.atomicOp!"+="(ptr, 1)` instead
+fail_compilation/diag3672.d(27): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(27): Use `core.atomic.atomicOp!"-="(ptr, 1)` instead
+fail_compilation/diag3672.d(28): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672.d(28): Use `core.atomic.atomicOp!"-="(ptr, 1)` instead
---
*/
+
+#line 1
shared int x;
shared int y;
shared int* ptr;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag3672a.d b/gcc/testsuite/gdc.test/fail_compilation/diag3672a.d
index 6c9f701..66e9c49 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag3672a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag3672a.d
@@ -1,10 +1,11 @@
-// PERMUTE_ARGS:
// REQUIRED_ARGS: -de
/*
TEST_OUTPUT:
---
-fail_compilation/diag3672a.d(16): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"+="(ns.x, 1) instead.
-fail_compilation/diag3672a.d(18): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"+="(s.sx, 1) instead.
+fail_compilation/diag3672a.d(17): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672a.d(17): Use `core.atomic.atomicOp!"+="(ns.x, 1)` instead
+fail_compilation/diag3672a.d(19): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672a.d(19): Use `core.atomic.atomicOp!"+="(s.sx, 1)` instead
---
*/
class NS { shared int x; }
@@ -21,8 +22,10 @@ void main()
/*
TEST_OUTPUT:
---
-fail_compilation/diag3672a.d(32): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"+="(s.var, 1) instead.
-fail_compilation/diag3672a.d(33): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"-="(s.var, 2) instead.
+fail_compilation/diag3672a.d(35): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672a.d(35): Use `core.atomic.atomicOp!"+="(s.var, 1)` instead
+fail_compilation/diag3672a.d(36): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/diag3672a.d(36): Use `core.atomic.atomicOp!"-="(s.var, 2)` instead
---
*/
void test13003()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag3869.d b/gcc/testsuite/gdc.test/fail_compilation/diag3869.d
index 62e8993..6cb92c4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag3869.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag3869.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag3869.d(10): Error: template instance diag3869.sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!int)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) recursive expansion
+fail_compilation/diag3869.d(10): Error: template instance `diag3869.sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!int))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))` recursive expansion
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag3913.d b/gcc/testsuite/gdc.test/fail_compilation/diag3913.d
index e176e9d..abf70b8 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag3913.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag3913.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag3913.d(12): Error: no property 'foobardoo' for type 'Foo'
-fail_compilation/diag3913.d(13): Error: no property 'secon' for type 'Foo'. Did you mean 'Foo.second' ?
+fail_compilation/diag3913.d(12): Error: no property `foobardoo` for type `Foo`
+fail_compilation/diag3913.d(13): Error: no property `secon` for type `Foo`. Did you mean `Foo.second` ?
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag4479.d b/gcc/testsuite/gdc.test/fail_compilation/diag4479.d
index 553f9ef..7ce9bd8 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag4479.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag4479.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag4479.d(10): Error: module imports.fail4479mod from file fail_compilation/imports/fail4479.d must be imported with 'import imports.fail4479mod;'
+fail_compilation/diag4479.d(10): Error: module `imports.fail4479mod` from file fail_compilation/imports/fail4479.d must be imported with 'import imports.fail4479mod;'
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag4528.d b/gcc/testsuite/gdc.test/fail_compilation/diag4528.d
index accadbc..ab7b2cf 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag4528.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag4528.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag4528.d(14): Error: function diag4528.Foo.pva private functions cannot be abstract
-fail_compilation/diag4528.d(15): Error: function diag4528.Foo.pka package functions cannot be abstract
-fail_compilation/diag4528.d(16): Error: function diag4528.Foo.pvsa static functions cannot be abstract
-fail_compilation/diag4528.d(17): Error: function diag4528.Foo.pksa static functions cannot be abstract
-fail_compilation/diag4528.d(18): Error: function diag4528.Foo.pbsa static functions cannot be abstract
+fail_compilation/diag4528.d(14): Error: function `diag4528.Foo.pva` `private` functions cannot be `abstract`
+fail_compilation/diag4528.d(15): Error: function `diag4528.Foo.pka` `package` functions cannot be `abstract`
+fail_compilation/diag4528.d(16): Error: function `diag4528.Foo.pvsa` `static` functions cannot be `abstract`
+fail_compilation/diag4528.d(17): Error: function `diag4528.Foo.pksa` `static` functions cannot be `abstract`
+fail_compilation/diag4528.d(18): Error: function `diag4528.Foo.pbsa` `static` functions cannot be `abstract`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag4596.d b/gcc/testsuite/gdc.test/fail_compilation/diag4596.d
index 368f67e..f6b49d6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag4596.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag4596.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag4596.d(15): Error: this is not an lvalue
-fail_compilation/diag4596.d(16): Error: 1 ? this : this is not an lvalue
-fail_compilation/diag4596.d(18): Error: super is not an lvalue
-fail_compilation/diag4596.d(19): Error: 1 ? super : super is not an lvalue
+fail_compilation/diag4596.d(15): Error: `this` is not an lvalue and cannot be modified
+fail_compilation/diag4596.d(16): Error: conditional expression `1 ? this : this` is not a modifiable lvalue
+fail_compilation/diag4596.d(18): Error: `super` is not an lvalue and cannot be modified
+fail_compilation/diag4596.d(19): Error: conditional expression `1 ? super : super` is not a modifiable lvalue
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag5385.d b/gcc/testsuite/gdc.test/fail_compilation/diag5385.d
index 7c81b16..60455ec 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag5385.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag5385.d
@@ -1,14 +1,15 @@
/*
+EXTRA_FILES: imports/fail5385.d
TEST_OUTPUT:
---
-fail_compilation/diag5385.d(19): Error: no property `privX` for type `imports.fail5385.C`, did you mean `imports.fail5385.C.privX`?
-fail_compilation/diag5385.d(20): Error: no property `packX` for type `imports.fail5385.C`, did you mean `imports.fail5385.C.packX`?
-fail_compilation/diag5385.d(21): Error: no property `privX2` for type `imports.fail5385.C`, did you mean `imports.fail5385.C.privX2`?
-fail_compilation/diag5385.d(22): Error: no property `packX2` for type `imports.fail5385.C`, did you mean `imports.fail5385.C.packX2`?
-fail_compilation/diag5385.d(23): Error: no property `privX` for type `S`, did you mean `imports.fail5385.S.privX`?
-fail_compilation/diag5385.d(24): Error: no property `packX` for type `S`, did you mean `imports.fail5385.S.packX`?
-fail_compilation/diag5385.d(25): Error: no property `privX2` for type `S`, did you mean `imports.fail5385.S.privX2`?
-fail_compilation/diag5385.d(26): Error: no property `packX2` for type `S`, did you mean `imports.fail5385.S.packX2`?
+fail_compilation/diag5385.d(20): Error: no property `privX` for type `imports.fail5385.C`
+fail_compilation/diag5385.d(21): Error: no property `packX` for type `imports.fail5385.C`
+fail_compilation/diag5385.d(22): Error: no property `privX2` for type `imports.fail5385.C`
+fail_compilation/diag5385.d(23): Error: no property `packX2` for type `imports.fail5385.C`
+fail_compilation/diag5385.d(24): Error: no property `privX` for type `imports.fail5385.S`
+fail_compilation/diag5385.d(25): Error: no property `packX` for type `imports.fail5385.S`
+fail_compilation/diag5385.d(26): Error: no property `privX2` for type `imports.fail5385.S`
+fail_compilation/diag5385.d(27): Error: no property `packX2` for type `imports.fail5385.S`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag5450.d b/gcc/testsuite/gdc.test/fail_compilation/diag5450.d
index 495fea9..f544240 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag5450.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag5450.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag5450.d(18): Error: class diag5450.C cannot implicitly generate a default ctor when base class diag5450.B is missing a default ctor
+fail_compilation/diag5450.d(18): Error: class `diag5450.C` cannot implicitly generate a default constructor when base class `diag5450.B` is missing a default constructor
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag6373.d b/gcc/testsuite/gdc.test/fail_compilation/diag6373.d
index d5e396d..8711b90 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag6373.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag6373.d
@@ -2,7 +2,7 @@
REQUIRED_ARGS: -de
TEST_OUTPUT:
---
-fail_compilation/diag6373.d(15): Error: class diag6373.Bar use of `diag6373.Foo.method(double x)` is hidden by `Bar`; use `alias method = Foo.method;` to introduce base class overload set
+fail_compilation/diag6373.d(15): Error: class `diag6373.Bar` use of `diag6373.Foo.method(double x)` is hidden by `Bar`; use `alias method = Foo.method;` to introduce base class overload set
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag6539.d b/gcc/testsuite/gdc.test/fail_compilation/diag6539.d
index eddb5d2..c202548 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag6539.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag6539.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag6539.d(21): Error: overloadset diag6539.Rectangle is used as a type
+fail_compilation/diag6539.d(21): Error: overloadset `diag6539.Rectangle` is used as a type
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag6677.d b/gcc/testsuite/gdc.test/fail_compilation/diag6677.d
index 9f9c6dc..aef65d2 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag6677.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag6677.d
@@ -1,17 +1,16 @@
-// REQUIRED_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/diag6677.d(18): Error: static constructor cannot be `const`
-fail_compilation/diag6677.d(19): Error: static constructor cannot be `inout`
-fail_compilation/diag6677.d(20): Error: static constructor cannot be `immutable`
+fail_compilation/diag6677.d(17): Error: static constructor cannot be `const`
+fail_compilation/diag6677.d(18): Error: static constructor cannot be `inout`
+fail_compilation/diag6677.d(19): Error: static constructor cannot be `immutable`
+fail_compilation/diag6677.d(20): Error: use `shared static this()` to declare a shared static constructor
fail_compilation/diag6677.d(21): Error: use `shared static this()` to declare a shared static constructor
-fail_compilation/diag6677.d(22): Error: use `shared static this()` to declare a shared static constructor
-fail_compilation/diag6677.d(24): Error: shared static constructor cannot be `const`
-fail_compilation/diag6677.d(25): Error: shared static constructor cannot be `inout`
-fail_compilation/diag6677.d(26): Error: shared static constructor cannot be `immutable`
+fail_compilation/diag6677.d(23): Error: shared static constructor cannot be `const`
+fail_compilation/diag6677.d(24): Error: shared static constructor cannot be `inout`
+fail_compilation/diag6677.d(25): Error: shared static constructor cannot be `immutable`
+fail_compilation/diag6677.d(26): Error: redundant attribute `shared`
fail_compilation/diag6677.d(27): Error: redundant attribute `shared`
-fail_compilation/diag6677.d(28): Error: redundant attribute `shared`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag6699.d b/gcc/testsuite/gdc.test/fail_compilation/diag6699.d
index 34b2c77..755d0fd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag6699.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag6699.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag6699.d(8): Error: no property 'x' for type 'int'
+fail_compilation/diag6699.d(8): Error: no property `x` for type `int`
---
*/
alias int b6699;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag6707.d b/gcc/testsuite/gdc.test/fail_compilation/diag6707.d
index cabdec3..70fea4f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag6707.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag6707.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag6707.d(16): Error: mutable method diag6707.Foo.value is not callable using a const object
+fail_compilation/diag6707.d(17): Error: mutable method `diag6707.Foo.value` is not callable using a `const` object
+fail_compilation/diag6707.d(13): Consider adding `const` or `inout` here
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag7050a.d b/gcc/testsuite/gdc.test/fail_compilation/diag7050a.d
index ddee70c..abd0d18 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag7050a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag7050a.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag7050a.d(14): Error: @safe function 'diag7050a.foo' cannot call @system constructor 'diag7050a.Foo.this'
+fail_compilation/diag7050a.d(15): Error: `@safe` function `diag7050a.foo` cannot call `@system` constructor `diag7050a.Foo.this`
+fail_compilation/diag7050a.d(11): `diag7050a.Foo.this` is declared here
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag7050b.d b/gcc/testsuite/gdc.test/fail_compilation/diag7050b.d
index ecbfd81..78912cd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag7050b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag7050b.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag7050b.d(12): Error: pure function 'diag7050b.f.g' cannot call impure function 'diag7050b.f'
+fail_compilation/diag7050b.d(12): Error: `pure` function `diag7050b.f.g` cannot call impure function `diag7050b.f`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag7050c.d b/gcc/testsuite/gdc.test/fail_compilation/diag7050c.d
index 3fa75fc..3b366df 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag7050c.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag7050c.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag7050c.d(13): Error: @safe destructor 'diag7050c.B.~this' cannot call @system destructor 'diag7050c.A.~this'
+fail_compilation/diag7050c.d(14): Error: `@safe` destructor `diag7050c.B.~this` cannot call `@system` destructor `diag7050c.A.~this`
+fail_compilation/diag7050c.d(11): `diag7050c.A.~this` is declared here
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag7420.d b/gcc/testsuite/gdc.test/fail_compilation/diag7420.d
index 80077eb..3267e66 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag7420.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag7420.d
@@ -2,16 +2,17 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag7420.d(20): Error: static variable x cannot be read at compile time
-fail_compilation/diag7420.d(20): while evaluating: `static assert(x < 4)`
-fail_compilation/diag7420.d(21): Error: static variable y cannot be read at compile time
-fail_compilation/diag7420.d(21): while evaluating: `static assert(y == "abc")`
-fail_compilation/diag7420.d(22): Error: static variable y cannot be read at compile time
-fail_compilation/diag7420.d(22): while evaluating: `static assert(cast(ubyte[])y != null)`
-fail_compilation/diag7420.d(23): Error: static variable y cannot be read at compile time
-fail_compilation/diag7420.d(23): while evaluating: `static assert(cast(int)y[0] == 1)`
-fail_compilation/diag7420.d(24): Error: static variable y cannot be read at compile time
-fail_compilation/diag7420.d(24): while evaluating: `static assert(y[0..1].length == 1u)`
+fail_compilation/diag7420.d(21): Error: static variable `x` cannot be read at compile time
+fail_compilation/diag7420.d(21): while evaluating: `static assert(x < 4)`
+fail_compilation/diag7420.d(22): Error: static variable `y` cannot be read at compile time
+fail_compilation/diag7420.d(22): called from here: `__equals(y, "abc")`
+fail_compilation/diag7420.d(22): while evaluating: `static assert(y == "abc")`
+fail_compilation/diag7420.d(23): Error: static variable `y` cannot be read at compile time
+fail_compilation/diag7420.d(23): while evaluating: `static assert(cast(ubyte[])y != null)`
+fail_compilation/diag7420.d(24): Error: static variable `y` cannot be read at compile time
+fail_compilation/diag7420.d(24): while evaluating: `static assert(cast(int)y[0] == 1)`
+fail_compilation/diag7420.d(25): Error: static variable `y` cannot be read at compile time
+fail_compilation/diag7420.d(25): while evaluating: `static assert(y[0..1].length == 1u)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag7477.d b/gcc/testsuite/gdc.test/fail_compilation/diag7477.d
index 1c97184..b82b33d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag7477.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag7477.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag7477.d(13): Error: cannot implicitly convert expression `0` of type `int` to `Foo`
-fail_compilation/diag7477.d(20): Error: cannot implicitly convert expression `0` of type `int` to `string`
+fail_compilation/diag7477.d(13): Error: integral constant must be scalar type, not `Foo`
+fail_compilation/diag7477.d(20): Error: integral constant must be scalar type, not `string`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag7747.d b/gcc/testsuite/gdc.test/fail_compilation/diag7747.d
index 0756911..e2e5992 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag7747.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag7747.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag7747.d(8): Error: forward reference to inferred return type of function call 'fact(n - 1)'
+fail_compilation/diag7747.d(8): Error: forward reference to inferred return type of function call `fact(n - 1)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag7998.d b/gcc/testsuite/gdc.test/fail_compilation/diag7998.d
index 68f61f3..a245b40 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag7998.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag7998.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag7998.d(10): Error: static assert "abcxe"
+fail_compilation/diag7998.d(10): Error: static assert: "abcxe"
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8044.d b/gcc/testsuite/gdc.test/fail_compilation/diag8044.d
new file mode 100644
index 0000000..a8c767a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8044.d
@@ -0,0 +1,19 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag8044.d(18): Error: template instance `diag8044.test!(Enum.Bar)` does not match template declaration `test(Enum en)()`
+ with `en = Bar`
+ must satisfy the following constraint:
+` 0`
+---
+ */
+enum Enum { Foo, Bar }
+void test(Enum en)()
+ if(0)
+{
+}
+
+void main()
+{
+ test!(Enum.Bar)();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8101.d b/gcc/testsuite/gdc.test/fail_compilation/diag8101.d
index 3b2401a..a0d245b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8101.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8101.d
@@ -3,27 +3,27 @@ TEST_OUTPUT:
---
fail_compilation/diag8101.d(57): Error: function `diag8101.f_0(int)` is not callable using argument types `()`
fail_compilation/diag8101.d(57): missing argument for parameter #1: `int`
-fail_compilation/diag8101.d(58): Error: none of the overloads of `f_1` are callable using argument types `()`, candidates are:
-fail_compilation/diag8101.d(33): `diag8101.f_1(int)`
-fail_compilation/diag8101.d(34): `diag8101.f_1(int, int)`
-fail_compilation/diag8101.d(59): Error: none of the overloads of `f_2` are callable using argument types `()`, candidates are:
-fail_compilation/diag8101.d(36): `diag8101.f_2(int)`
-fail_compilation/diag8101.d(37): `diag8101.f_2(int, int)`
-fail_compilation/diag8101.d(38): `diag8101.f_2(int, int, int)`
-fail_compilation/diag8101.d(39): `diag8101.f_2(int, int, int, int)`
-fail_compilation/diag8101.d(40): `diag8101.f_2(int, int, int, int, int)`
+fail_compilation/diag8101.d(58): Error: none of the overloads of `f_1` are callable using argument types `()`
+fail_compilation/diag8101.d(33): Candidates are: `diag8101.f_1(int)`
+fail_compilation/diag8101.d(34): `diag8101.f_1(int, int)`
+fail_compilation/diag8101.d(59): Error: none of the overloads of `f_2` are callable using argument types `()`
+fail_compilation/diag8101.d(36): Candidates are: `diag8101.f_2(int)`
+fail_compilation/diag8101.d(37): `diag8101.f_2(int, int)`
+fail_compilation/diag8101.d(38): `diag8101.f_2(int, int, int)`
+fail_compilation/diag8101.d(39): `diag8101.f_2(int, int, int, int)`
+fail_compilation/diag8101.d(40): `diag8101.f_2(int, int, int, int, int)`
fail_compilation/diag8101.d(59): ... (1 more, -v to show) ...
-fail_compilation/diag8101.d(61): Error: template `diag8101.t_0` cannot deduce function from argument types `!()()`, candidates are:
-fail_compilation/diag8101.d(43): `diag8101.t_0(T1)()`
-fail_compilation/diag8101.d(62): Error: template `diag8101.t_1` cannot deduce function from argument types `!()()`, candidates are:
-fail_compilation/diag8101.d(45): `diag8101.t_1(T1)()`
-fail_compilation/diag8101.d(46): `diag8101.t_1(T1, T2)()`
-fail_compilation/diag8101.d(63): Error: template `diag8101.t_2` cannot deduce function from argument types `!()()`, candidates are:
-fail_compilation/diag8101.d(48): `diag8101.t_2(T1)()`
-fail_compilation/diag8101.d(49): `diag8101.t_2(T1, T2)()`
-fail_compilation/diag8101.d(50): `diag8101.t_2(T1, T2, T3)()`
-fail_compilation/diag8101.d(51): `diag8101.t_2(T1, T2, T3, T4)()`
-fail_compilation/diag8101.d(52): `diag8101.t_2(T1, T2, T3, T4, T5)()`
+fail_compilation/diag8101.d(61): Error: template `diag8101.t_0` cannot deduce function from argument types `!()()`
+fail_compilation/diag8101.d(43): Candidate is: `t_0(T1)()`
+fail_compilation/diag8101.d(62): Error: template `diag8101.t_1` cannot deduce function from argument types `!()()`
+fail_compilation/diag8101.d(45): Candidates are: `t_1(T1)()`
+fail_compilation/diag8101.d(46): `t_1(T1, T2)()`
+fail_compilation/diag8101.d(63): Error: template `diag8101.t_2` cannot deduce function from argument types `!()()`
+fail_compilation/diag8101.d(48): Candidates are: `t_2(T1)()`
+fail_compilation/diag8101.d(49): `t_2(T1, T2)()`
+fail_compilation/diag8101.d(50): `t_2(T1, T2, T3)()`
+fail_compilation/diag8101.d(51): `t_2(T1, T2, T3, T4)()`
+fail_compilation/diag8101.d(52): `t_2(T1, T2, T3, T4, T5)()`
fail_compilation/diag8101.d(63): ... (1 more, -v to show) ...
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8101b.d b/gcc/testsuite/gdc.test/fail_compilation/diag8101b.d
index 228ba16..bc0ee9d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8101b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8101b.d
@@ -1,15 +1,16 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag8101b.d(27): Error: none of the overloads of `foo` are callable using argument types `(double)`, candidates are:
-fail_compilation/diag8101b.d(18): `diag8101b.S.foo(int _param_0)`
-fail_compilation/diag8101b.d(19): `diag8101b.S.foo(int _param_0, int _param_1)`
-fail_compilation/diag8101b.d(29): Error: function `diag8101b.S.bar(int _param_0)` is not callable using argument types `(double)`
-fail_compilation/diag8101b.d(29): cannot pass argument `1.00000` of type `double` to parameter `int _param_0`
-fail_compilation/diag8101b.d(32): Error: none of the overloads of `foo` are callable using a `const` object, candidates are:
-fail_compilation/diag8101b.d(18): `diag8101b.S.foo(int _param_0)`
-fail_compilation/diag8101b.d(19): `diag8101b.S.foo(int _param_0, int _param_1)`
-fail_compilation/diag8101b.d(34): Error: mutable method `diag8101b.S.bar` is not callable using a `const` object
+fail_compilation/diag8101b.d(28): Error: none of the overloads of `foo` are callable using argument types `(double)`
+fail_compilation/diag8101b.d(19): Candidates are: `diag8101b.S.foo(int _param_0)`
+fail_compilation/diag8101b.d(20): `diag8101b.S.foo(int _param_0, int _param_1)`
+fail_compilation/diag8101b.d(30): Error: function `diag8101b.S.bar(int _param_0)` is not callable using argument types `(double)`
+fail_compilation/diag8101b.d(30): cannot pass argument `1.0` of type `double` to parameter `int _param_0`
+fail_compilation/diag8101b.d(33): Error: none of the overloads of `foo` are callable using a `const` object
+fail_compilation/diag8101b.d(19): Candidates are: `diag8101b.S.foo(int _param_0)`
+fail_compilation/diag8101b.d(20): `diag8101b.S.foo(int _param_0, int _param_1)`
+fail_compilation/diag8101b.d(35): Error: mutable method `diag8101b.S.bar` is not callable using a `const` object
+fail_compilation/diag8101b.d(22): Consider adding `const` or `inout` here
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8178.d b/gcc/testsuite/gdc.test/fail_compilation/diag8178.d
index 491a625..00cac98 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8178.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8178.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag8178.d(14): Error: cannot modify manifest constant 's'
+fail_compilation/diag8178.d(14): Error: cannot modify manifest constant `s`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8318.d b/gcc/testsuite/gdc.test/fail_compilation/diag8318.d
index d319532..99dc6c4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8318.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8318.d
@@ -1,7 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag8318.d(13): Error: function diag8318.Bar8318.foo return type inference is not supported if may override base class function
+fail_compilation/diag8318.d(18): Error: function `diag8318.Bar8318.foo` return type inference is not supported if may override base class function
+fail_compilation/diag8318.d(23): Error: function `diag8318.C10021.makeI` return type inference is not supported if may override base class function
+fail_compilation/diag8318.d(31): Error: function `diag8318.Bar10195.baz` return type inference is not supported if may override base class function
+fail_compilation/diag8318.d(37): Error: function `diag8318.B14173.foo` does not override any function
+fail_compilation/diag8318.d(23): Error: class `diag8318.C10021` interface function `I10021 makeI()` is not implemented
+fail_compilation/diag8318.d(29): Error: class `diag8318.Bar10195` interface function `int baz()` is not implemented
---
*/
class Foo8318
@@ -13,22 +18,10 @@ class Bar8318 : Foo8318
override auto foo() { return "Bar.foo"; }
}
-/*
-TEST_OUTPUT:
----
-fail_compilation/diag8318.d(24): Error: function diag8318.C10021.makeI return type inference is not supported if may override base class function
----
-*/
interface I10021 { I10021 makeI(); }
class D10021 : I10021 { D10021 makeI() { return this; } }
class C10021 : I10021 { auto makeI() { return this; } }
-/*
-TEST_OUTPUT:
----
-fail_compilation/diag8318.d(38): Error: function diag8318.Bar10195.baz return type inference is not supported if may override base class function
----
-*/
interface Foo10195
{
int baz();
@@ -38,12 +31,6 @@ class Bar10195 : Foo10195
override auto baz() { return 1; }
}
-/*
-TEST_OUTPUT:
----
-fail_compilation/diag8318.d(50): Error: function diag8318.B14173.foo does not override any function
----
-*/
class A14173 {}
class B14173 : A14173
{
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8425.d b/gcc/testsuite/gdc.test/fail_compilation/diag8425.d
index 14dbb1c..a30881b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8425.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8425.d
@@ -1,12 +1,11 @@
/*
REQUIRED_ARGS: -m64 -o-
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/diag8425.d(13): Error: T in __vector(T) must be a static array, not void
-fail_compilation/diag8425.d(14): Error: 1 byte vector type __vector(void[1]) is not supported on this platform
-fail_compilation/diag8425.d(15): Error: 99 byte vector type __vector(void[99]) is not supported on this platform
-fail_compilation/diag8425.d(16): Error: vector type __vector(void*[4]) is not supported on this platform
+fail_compilation/diag8425.d(12): Error: T in __vector(T) must be a static array, not `void`
+fail_compilation/diag8425.d(13): Error: 1 byte vector type `__vector(void[1])` is not supported on this platform
+fail_compilation/diag8425.d(14): Error: 99 byte vector type `__vector(void[99])` is not supported on this platform
+fail_compilation/diag8425.d(15): Error: vector type `__vector(void*[4])` is not supported on this platform
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8510.d b/gcc/testsuite/gdc.test/fail_compilation/diag8510.d
index d1a897a..77660d0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8510.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8510.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag8510.d(10): Error: alias diag8510.a conflicts with alias diag8510.a at fail_compilation/diag8510.d(9)
-fail_compilation/diag8510.d(15): Error: alias diag8510.S.a conflicts with alias diag8510.S.a at fail_compilation/diag8510.d(14)
+fail_compilation/diag8510.d(10): Error: alias `diag8510.a` conflicts with alias `diag8510.a` at fail_compilation/diag8510.d(9)
+fail_compilation/diag8510.d(15): Error: alias `diag8510.S.a` conflicts with alias `diag8510.S.a` at fail_compilation/diag8510.d(14)
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8559.d b/gcc/testsuite/gdc.test/fail_compilation/diag8559.d
index 5dc2b9d..5da50f4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8559.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8559.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag8559.d(12): Error: void does not have a default initializer
-fail_compilation/diag8559.d(13): Error: function does not have a default initializer
+fail_compilation/diag8559.d(12): Error: `void` does not have a default initializer
+fail_compilation/diag8559.d(13): Error: `function` does not have a default initializer
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8648.d b/gcc/testsuite/gdc.test/fail_compilation/diag8648.d
index fa96d5c..f202fb3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8648.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8648.d
@@ -2,14 +2,14 @@
TEST_OUTPUT:
---
fail_compilation/diag8648.d(18): Error: undefined identifier `X`
-fail_compilation/diag8648.d(29): Error: template diag8648.foo cannot deduce function from argument types !()(Foo!(int, 1)), candidates are:
-fail_compilation/diag8648.d(18): diag8648.foo(T, n)(X!(T, n))
+fail_compilation/diag8648.d(29): Error: template `diag8648.foo` cannot deduce function from argument types `!()(Foo!(int, 1))`
+fail_compilation/diag8648.d(18): Candidate is: `foo(T, n)(X!(T, n))`
fail_compilation/diag8648.d(20): Error: undefined identifier `a`
-fail_compilation/diag8648.d(31): Error: template diag8648.bar cannot deduce function from argument types !()(Foo!(int, 1)), candidates are:
-fail_compilation/diag8648.d(20): diag8648.bar(T)(Foo!(T, a))
+fail_compilation/diag8648.d(31): Error: template `diag8648.bar` cannot deduce function from argument types `!()(Foo!(int, 1))`
+fail_compilation/diag8648.d(20): Candidate is: `bar(T)(Foo!(T, a))`
fail_compilation/diag8648.d(20): Error: undefined identifier `a`
-fail_compilation/diag8648.d(32): Error: template diag8648.bar cannot deduce function from argument types !()(Foo!(int, f)), candidates are:
-fail_compilation/diag8648.d(20): diag8648.bar(T)(Foo!(T, a))
+fail_compilation/diag8648.d(32): Error: template `diag8648.bar` cannot deduce function from argument types `!()(Foo!(int, f))`
+fail_compilation/diag8648.d(20): Candidate is: `bar(T)(Foo!(T, a))`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8684.d b/gcc/testsuite/gdc.test/fail_compilation/diag8684.d
new file mode 100644
index 0000000..acfee71
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8684.d
@@ -0,0 +1,16 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag8684.d(11): Error: found `;` when expecting `)`
+fail_compilation/diag8684.d(12): Error: semicolon expected, not `for`
+---
+*/
+
+int foo(int n, int m)
+{
+ int x = foo( 5, m;
+ for (int q=0; q<10; ++q){
+ ++q;
+ }
+ return 2;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8697.d b/gcc/testsuite/gdc.test/fail_compilation/diag8697.d
index b1a1008..a2abad5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8697.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8697.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag8697.d(10): Error: no property 'Invalid' for type 'diag8697.Base'
+fail_compilation/diag8697.d(10): Error: no property `Invalid` for type `diag8697.Base`
---
*/
interface InterBase : InterRoot { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8714.d b/gcc/testsuite/gdc.test/fail_compilation/diag8714.d
index 3a7ffd8..5a9d8d9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8714.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8714.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag8714.d(9): Error: function diag8714.foo circular dependency. Functions cannot be interpreted while being compiled
-fail_compilation/diag8714.d(15): called from here: foo("somestring")
+fail_compilation/diag8714.d(9): Error: function `diag8714.foo` circular dependency. Functions cannot be interpreted while being compiled
+fail_compilation/diag8714.d(15): called from here: `foo("somestring")`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8777.d b/gcc/testsuite/gdc.test/fail_compilation/diag8777.d
index f289da9..8dfac75 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8777.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8777.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag8777.d(12): Error: constructor diag8777.Foo1.this missing initializer for immutable field x
-fail_compilation/diag8777.d(12): Error: constructor diag8777.Foo1.this missing initializer for const field y
+fail_compilation/diag8777.d(12): Error: constructor `diag8777.Foo1.this` missing initializer for immutable field `x`
+fail_compilation/diag8777.d(12): Error: constructor `diag8777.Foo1.this` missing initializer for const field `y`
---
*/
class Foo1
@@ -15,8 +15,8 @@ class Foo1
/*
TEST_OUTPUT:
---
-fail_compilation/diag8777.d(25): Error: cannot modify immutable expression x
-fail_compilation/diag8777.d(28): Error: cannot modify const expression y
+fail_compilation/diag8777.d(25): Error: cannot modify `immutable` expression `x`
+fail_compilation/diag8777.d(28): Error: cannot modify `const` expression `y`
---
*/
void test2()
@@ -31,8 +31,8 @@ void test2()
/*
TEST_OUTPUT:
---
-fail_compilation/diag8777.d(42): Error: cannot remove key from immutable associative array hashx
-fail_compilation/diag8777.d(43): Error: cannot remove key from const associative array hashy
+fail_compilation/diag8777.d(42): Error: cannot remove key from `immutable` associative array `hashx`
+fail_compilation/diag8777.d(43): Error: cannot remove key from `const` associative array `hashy`
---
*/
immutable(int[int]) hashx;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8787.d b/gcc/testsuite/gdc.test/fail_compilation/diag8787.d
index dde80ab..c4ff6d2 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8787.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8787.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag8787.d(10): Error: function diag8787.I.f function body only allowed in final functions in interface I
+fail_compilation/diag8787.d(10): Error: function `diag8787.I.f` function body only allowed in `final` functions in interface `I`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8894.d b/gcc/testsuite/gdc.test/fail_compilation/diag8894.d
index 9b66bf0..9e0dadd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8894.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8894.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag8894.d(16): Error: no property 'x' for type 'Foo'
-fail_compilation/diag8894.d(17): Error: no property 'y' for type 'Foo'
-fail_compilation/diag8894.d(18): Error: no property 'x' for type 'Foo'
-fail_compilation/diag8894.d(19): Error: no property 'x' for type 'Foo'
+fail_compilation/diag8894.d(16): Error: no property `x` for type `diag8894.Foo`
+fail_compilation/diag8894.d(17): Error: no property `y` for type `diag8894.Foo`
+fail_compilation/diag8894.d(18): Error: no property `x` for type `diag8894.Foo`
+fail_compilation/diag8894.d(19): Error: no property `x` for type `diag8894.Foo`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag8928.d b/gcc/testsuite/gdc.test/fail_compilation/diag8928.d
index bdd1ae8..36bfc96 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag8928.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag8928.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag8928.d(18): Error: class diag8928.Z cannot implicitly generate a default ctor when base class diag8928.X is missing a default ctor
+fail_compilation/diag8928.d(18): Error: class `diag8928.Z` cannot implicitly generate a default constructor when base class `diag8928.X` is missing a default constructor
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9004.d b/gcc/testsuite/gdc.test/fail_compilation/diag9004.d
index 1985275..62fce32 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9004.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9004.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9004.d(21): Error: template diag9004.bar cannot deduce function from argument types !()(Foo!int, int), candidates are:
-fail_compilation/diag9004.d(14): diag9004.bar(FooT)(FooT foo, FooT.T x)
+fail_compilation/diag9004.d(21): Error: template `diag9004.bar` cannot deduce function from argument types `!()(Foo!int, int)`
+fail_compilation/diag9004.d(14): Candidate is: `bar(FooT)(FooT foo, FooT.T x)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9148.d b/gcc/testsuite/gdc.test/fail_compilation/diag9148.d
index 0a7707e..2e5cbc6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9148.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9148.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9148.d(19): Error: pure function 'diag9148.test9148a.foo' cannot access mutable static data 'g'
-fail_compilation/diag9148.d(23): Error: pure function 'diag9148.test9148a.bar' cannot access mutable static data 'g'
-fail_compilation/diag9148.d(24): Error: immutable function 'diag9148.test9148a.bar' cannot access mutable data 'x'
-fail_compilation/diag9148.d(31): Error: pure function 'diag9148.test9148a.S.foo' cannot access mutable static data 'g'
-fail_compilation/diag9148.d(35): Error: pure function 'diag9148.test9148a.S.bar' cannot access mutable static data 'g'
-fail_compilation/diag9148.d(36): Error: immutable function 'diag9148.test9148a.S.bar' cannot access mutable data 'x'
+fail_compilation/diag9148.d(19): Error: `pure` function `diag9148.test9148a.foo` cannot access mutable static data `g`
+fail_compilation/diag9148.d(23): Error: `pure` function `diag9148.test9148a.bar` cannot access mutable static data `g`
+fail_compilation/diag9148.d(24): Error: `immutable` function `diag9148.test9148a.bar` cannot access mutable data `x`
+fail_compilation/diag9148.d(31): Error: `pure` function `diag9148.test9148a.S.foo` cannot access mutable static data `g`
+fail_compilation/diag9148.d(35): Error: `pure` function `diag9148.test9148a.S.bar` cannot access mutable static data `g`
+fail_compilation/diag9148.d(36): Error: `immutable` function `diag9148.test9148a.S.bar` cannot access mutable data `x`
---
*/
void test9148a() pure
@@ -41,7 +41,8 @@ void test9148a() pure
/*
TEST_OUTPUT:
---
-fail_compilation/diag9148.d(53): Error: static function diag9148.test9148b.foo cannot access frame of function diag9148.test9148b
+fail_compilation/diag9148.d(54): Error: `static` function `diag9148.test9148b.foo` cannot access variable `x` in frame of function `diag9148.test9148b`
+fail_compilation/diag9148.d(51): `x` declared here
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9191.d b/gcc/testsuite/gdc.test/fail_compilation/diag9191.d
index 50e5445..889d1fa 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9191.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9191.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9191.d(16): Error: function diag9191.C1.aaa does not override any function, did you mean to override 'diag9191.B1.aa'?
-fail_compilation/diag9191.d(21): Error: function diag9191.C2.aaa does not override any function
-fail_compilation/diag9191.d(31): Error: function diag9191.C3.foo does not override any function, did you mean to override 'diag9191.B2._foo'?
-fail_compilation/diag9191.d(36): Error: function diag9191.C4.toStringa does not override any function, did you mean to override 'object.Object.toString'?
+fail_compilation/diag9191.d(16): Error: function `void diag9191.C1.aaa()` does not override any function, did you mean to override `void diag9191.B1.aa()`?
+fail_compilation/diag9191.d(22): Error: function `diag9191.C2.aaa` does not override any function
+fail_compilation/diag9191.d(33): Error: function `void diag9191.C3.foo()` does not override any function, did you mean to override `void diag9191.B2._foo()`?
+fail_compilation/diag9191.d(38): Error: function `void diag9191.C4.toStringa()` does not override any function, did you mean to override `string object.Object.toString()`?
---
*/
@@ -14,11 +14,13 @@ class B1 { void aa(); }
class C1 : B1, I1
{
override void aaa();
+ void a() {}
}
class C2 : I1
{
override void aaa();
+ void a() {}
}
class B2
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9210a.d b/gcc/testsuite/gdc.test/fail_compilation/diag9210a.d
index ac3609f..d70f4f7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9210a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9210a.d
@@ -1,6 +1,5 @@
// REQUIRED_ARGS: -o-
-// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/diag9210b.d imports/diag9210c.d imports/diag9210stdcomplex.d imports/diag9210stdtraits.d
/*
TEST_OUTPUT:
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9247.d b/gcc/testsuite/gdc.test/fail_compilation/diag9247.d
index e226345..1519b10 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9247.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9247.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9247.d(11): Error: functions cannot return opaque type S by value
-fail_compilation/diag9247.d(12): Error: functions cannot return opaque type S by value
+fail_compilation/diag9247.d(11): Error: functions cannot return opaque type `S` by value
+fail_compilation/diag9247.d(12): Error: functions cannot return opaque type `S` by value
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9312.d b/gcc/testsuite/gdc.test/fail_compilation/diag9312.d
index 41c1360..94e3d3f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9312.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9312.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9312.d(10): Error: with expressions must be aggregate types or pointers to them, not `int`
+fail_compilation/diag9312.d(10): Error: `with` expressions must be aggregate types or pointers to them, not `int`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9357.d b/gcc/testsuite/gdc.test/fail_compilation/diag9357.d
index f26b1c4..097c8de 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9357.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9357.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9357.d(14): Error: cannot implicitly convert expression `1.00000` of type `double` to `int`
-fail_compilation/diag9357.d(15): Error: cannot implicitly convert expression `10.0000` of type `double` to `int`
-fail_compilation/diag9357.d(16): Error: cannot implicitly convert expression `11.0000` of type `double` to `int`
-fail_compilation/diag9357.d(17): Error: cannot implicitly convert expression `99.0000` of type `double` to `int`
+fail_compilation/diag9357.d(14): Error: cannot implicitly convert expression `1.0` of type `double` to `int`
+fail_compilation/diag9357.d(15): Error: cannot implicitly convert expression `10.0` of type `double` to `int`
+fail_compilation/diag9357.d(16): Error: cannot implicitly convert expression `11.0` of type `double` to `int`
+fail_compilation/diag9357.d(17): Error: cannot implicitly convert expression `99.0` of type `double` to `int`
fail_compilation/diag9357.d(18): Error: cannot implicitly convert expression `1.04858e+06L` of type `real` to `int`
fail_compilation/diag9357.d(19): Error: cannot implicitly convert expression `1.04858e+06L` of type `real` to `int`
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9358.d b/gcc/testsuite/gdc.test/fail_compilation/diag9358.d
index d368ae2..5aea6b5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9358.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9358.d
@@ -2,8 +2,8 @@
TEST_OUTPUT:
---
fail_compilation/diag9358.d(12): Error: `x` must be of integral or string type, it is a `double`
-fail_compilation/diag9358.d(14): Error: case must be a string or an integral constant, not `1.1`
-fail_compilation/diag9358.d(15): Error: case must be a string or an integral constant, not `2.1`
+fail_compilation/diag9358.d(14): Error: `case` must be a `string` or an integral constant, not `1.1`
+fail_compilation/diag9358.d(15): Error: `case` must be a `string` or an integral constant, not `2.1`
---
*/
void main()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9398.d b/gcc/testsuite/gdc.test/fail_compilation/diag9398.d
index 67900c9..fe7e400 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9398.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9398.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9398.d(11): Error: incompatible types for ((f) : (s)): 'float' and 'string'
+fail_compilation/diag9398.d(11): Error: incompatible types for `(f) : (s)`: `float` and `string`
---
*/
void main()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9451.d b/gcc/testsuite/gdc.test/fail_compilation/diag9451.d
index a9121fc..ffec627 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9451.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9451.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9451.d(26): Error: cannot create instance of abstract class C2
-fail_compilation/diag9451.d(26): function 'void f1()' is not implemented
-fail_compilation/diag9451.d(26): function 'void f2(int)' is not implemented
-fail_compilation/diag9451.d(26): function 'void f2(float) const' is not implemented
-fail_compilation/diag9451.d(26): function 'int f2(float) pure' is not implemented
+fail_compilation/diag9451.d(26): Error: cannot create instance of abstract class `C2`
+fail_compilation/diag9451.d(26): function `void f1()` is not implemented
+fail_compilation/diag9451.d(26): function `void f2(int)` is not implemented
+fail_compilation/diag9451.d(26): function `void f2(float) const` is not implemented
+fail_compilation/diag9451.d(26): function `int f2(float) pure` is not implemented
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9620.d b/gcc/testsuite/gdc.test/fail_compilation/diag9620.d
index 5d50cb8..d99290c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9620.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9620.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9620.d(18): Error: pure function 'diag9620.main.bar' cannot call impure function 'diag9620.foo1'
-fail_compilation/diag9620.d(19): Error: pure function 'diag9620.main.bar' cannot call impure function 'diag9620.foo2!().foo2'
+fail_compilation/diag9620.d(18): Error: `pure` function `diag9620.main.bar` cannot call impure function `diag9620.foo1`
+fail_compilation/diag9620.d(19): Error: `pure` function `diag9620.main.bar` cannot call impure function `diag9620.foo2!().foo2`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9635.d b/gcc/testsuite/gdc.test/fail_compilation/diag9635.d
index 0e15aa2..fe142ad 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9635.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9635.d
@@ -2,8 +2,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9635.d(17): Error: need 'this' for 'i' of type 'int'
-fail_compilation/diag9635.d(18): Error: need 'this' for 'foo' of type 'pure nothrow @nogc @safe void()'
+fail_compilation/diag9635.d(17): Error: need `this` for `i` of type `int`
+fail_compilation/diag9635.d(18): Error: need `this` for `foo` of type `pure nothrow @nogc @safe void()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9679.d b/gcc/testsuite/gdc.test/fail_compilation/diag9679.d
index a19d99d..4496f0c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9679.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9679.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9679.d(11): Error: variable diag9679.main.n only parameters or foreach declarations can be ref
-fail_compilation/diag9679.d(12): Error: variable diag9679.main.n storage class 'auto' has no effect if type is not inferred, did you mean 'scope'?
+fail_compilation/diag9679.d(11): Error: variable `diag9679.main.n` only parameters or `foreach` declarations can be `ref`
+fail_compilation/diag9679.d(12): Error: variable `diag9679.main.n` storage class `auto` has no effect if type is not inferred, did you mean `scope`?
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9831.d b/gcc/testsuite/gdc.test/fail_compilation/diag9831.d
index 8882f66..b990ced 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9831.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9831.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9831.d(12): Error: function diag9831.main.__lambda1 cannot access frame of function D main
+fail_compilation/diag9831.d(13): Error: function `diag9831.main.__lambda3` cannot access variable `c` in frame of function `D main`
+fail_compilation/diag9831.d(11): `c` declared here
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9861.d b/gcc/testsuite/gdc.test/fail_compilation/diag9861.d
index 6c7d89f..53faea1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9861.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9861.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9861.d(8): Error: no property 'epsilon' for type 'int'
-fail_compilation/diag9861.d(9): while looking for match for Foo!int
+fail_compilation/diag9861.d(8): Error: no property `epsilon` for type `int`
+fail_compilation/diag9861.d(9): while looking for match for `Foo!int`
---
*/
struct Foo(T, real x = T.epsilon) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9880.d b/gcc/testsuite/gdc.test/fail_compilation/diag9880.d
index 9d893b8..597b94e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9880.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9880.d
@@ -1,7 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag9880.d(9): Error: template instance diag9880.foo!string does not match template declaration foo(T)(int) if (is(T == int))
+fail_compilation/diag9880.d(12): Error: template instance `diag9880.foo!string` does not match template declaration `foo(T)(int)`
+ with `T = string`
+ must satisfy the following constraint:
+` is(T == int)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9961.d b/gcc/testsuite/gdc.test/fail_compilation/diag9961.d
index 6b758e5..3eba735 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag9961.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9961.d
@@ -2,9 +2,9 @@
TEST_OUTPUT:
---
fail_compilation/diag9961.d(11): Error: cannot implicitly convert expression `""` of type `string` to `int`
-fail_compilation/diag9961.d(14): Error: template instance diag9961.foo!int error instantiating
+fail_compilation/diag9961.d(14): Error: template instance `diag9961.foo!int` error instantiating
fail_compilation/diag9961.d(11): Error: cannot implicitly convert expression `""` of type `string` to `int`
-fail_compilation/diag9961.d(15): Error: template instance diag9961.foo!char error instantiating
+fail_compilation/diag9961.d(15): Error: template instance `diag9961.foo!char` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag_class_alloc.d b/gcc/testsuite/gdc.test/fail_compilation/diag_class_alloc.d
new file mode 100644
index 0000000..326d82e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag_class_alloc.d
@@ -0,0 +1,19 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag_class_alloc.d(15): Error: `new` allocator must be annotated with `@disabled`
+fail_compilation/diag_class_alloc.d(16): Deprecation: `new` allocator with non-empty parameter list is deprecated
+fail_compilation/diag_class_alloc.d(16): Deprecation: `new` allocator with function definition is deprecated
+---
+*/
+
+// This test exists to ensure class allocators and deallocators emit an appropriate error message.
+// This test can be deleted when class allocators and deallocators are removed from the language.
+
+class C
+{
+ new(size_t size) // error message
+ {
+ return malloc(size);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag_cstyle.d b/gcc/testsuite/gdc.test/fail_compilation/diag_cstyle.d
index 1b1cd0c..72343e7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag_cstyle.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag_cstyle.d
@@ -1,13 +1,12 @@
-// REQUIRED_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/diag_cstyle.d(14): Error: instead of C-style syntax, use D-style `int function(int) fp1`
-fail_compilation/diag_cstyle.d(15): Error: instead of C-style syntax, use D-style `int function(int)* fp3`
-fail_compilation/diag_cstyle.d(17): Error: instead of C-style syntax, use D-style `int function(int) FP`
-fail_compilation/diag_cstyle.d(19): Error: instead of C-style syntax, use D-style `int function() fp`
-fail_compilation/diag_cstyle.d(19): Deprecation: instead of C-style syntax, use D-style syntax `int[] arr`
-fail_compilation/diag_cstyle.d(21): Deprecation: instead of C-style syntax, use D-style syntax `string[] result`
+fail_compilation/diag_cstyle.d(13): Error: instead of C-style syntax, use D-style `int function(int) fp1`
+fail_compilation/diag_cstyle.d(14): Error: instead of C-style syntax, use D-style `int function(int)* fp3`
+fail_compilation/diag_cstyle.d(16): Error: instead of C-style syntax, use D-style `int function(int) FP`
+fail_compilation/diag_cstyle.d(18): Error: instead of C-style syntax, use D-style `int function() fp`
+fail_compilation/diag_cstyle.d(18): Error: instead of C-style syntax, use D-style `int[] arr`
+fail_compilation/diag_cstyle.d(20): Error: instead of C-style syntax, use D-style `string[] result`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag_debug_conditional.d b/gcc/testsuite/gdc.test/fail_compilation/diag_debug_conditional.d
new file mode 100644
index 0000000..99884c7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag_debug_conditional.d
@@ -0,0 +1,11 @@
+/**
+TEST_OUTPUT:
+---
+fail_compilation/diag_debug_conditional.d(1): Error: identifier or integer expected inside `debug(...)`, not `alias`
+fail_compilation/diag_debug_conditional.d(2): Error: identifier or integer expected inside `version(...)`, not `alias`
+fail_compilation/diag_debug_conditional.d(3): Error: declaration expected following attribute, not end of file
+---
+ */
+#line 1
+debug(alias)
+version(alias)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag_err1.d b/gcc/testsuite/gdc.test/fail_compilation/diag_err1.d
index 50e16b4..d1659c4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag_err1.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag_err1.d
@@ -2,14 +2,14 @@
TEST_OUTPUT:
---
fail_compilation/diag_err1.d(21): Error: undefined identifier `x`
-fail_compilation/diag_err1.d(21): while evaluating pragma(msg, [1, 2, x].length)
+fail_compilation/diag_err1.d(21): while evaluating `pragma(msg, [1, 2, x].length)`
fail_compilation/diag_err1.d(22): Error: undefined identifier `x`
fail_compilation/diag_err1.d(22): Error: undefined identifier `y`
-fail_compilation/diag_err1.d(22): while evaluating pragma(msg, (x + y).sizeof)
+fail_compilation/diag_err1.d(22): while evaluating `pragma(msg, (x + y).sizeof)`
fail_compilation/diag_err1.d(23): Error: undefined identifier `x`
-fail_compilation/diag_err1.d(23): while evaluating pragma(msg, (n += x).sizeof)
-fail_compilation/diag_err1.d(24): Error: incompatible types for ((s) ~ (n)): 'string' and 'int'
-fail_compilation/diag_err1.d(24): while evaluating pragma(msg, (s ~ n).sizeof)
+fail_compilation/diag_err1.d(23): while evaluating `pragma(msg, (n += x).sizeof)`
+fail_compilation/diag_err1.d(24): Error: incompatible types for `(s) ~ (n)`: `string` and `int`
+fail_compilation/diag_err1.d(24): while evaluating `pragma(msg, (s ~ n).sizeof)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag_funclit.d b/gcc/testsuite/gdc.test/fail_compilation/diag_funclit.d
new file mode 100644
index 0000000..b46c562
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag_funclit.d
@@ -0,0 +1,40 @@
+/**
+TEST_OUTPUT:
+---
+fail_compilation/diag_funclit.d(103): Error: function literal `__lambda1(x, y, z)` is not callable using argument types `()`
+fail_compilation/diag_funclit.d(103): missing argument for parameter #1: `x`
+fail_compilation/diag_funclit.d(106): Error: function literal `__lambda2(x, y, z)` is not callable using argument types `(int, string, int, int)`
+fail_compilation/diag_funclit.d(106): too many arguments, expected `3`, got `4`
+fail_compilation/diag_funclit.d(108): Error: function literal `__lambda3(x, y, string z = "Hello")` is not callable using argument types `(int, int, string, string)`
+fail_compilation/diag_funclit.d(108): too many arguments, expected `3`, got `4`
+fail_compilation/diag_funclit.d(110): Error: function literal `__lambda4(x, y, string z = "Hello")` is not callable using argument types `(int)`
+fail_compilation/diag_funclit.d(110): too few arguments, expected `3`, got `1`
+fail_compilation/diag_funclit.d(112): Error: function literal `__lambda5(x, y, z)` is not callable using argument types `(int)`
+fail_compilation/diag_funclit.d(112): too few arguments, expected `3`, got `1`
+fail_compilation/diag_funclit.d(115): Error: function literal `__lambda6(x, y, ...)` is not callable using argument types `(int)`
+fail_compilation/diag_funclit.d(115): too few arguments, expected `2`, got `1`
+fail_compilation/diag_funclit.d(117): Error: function literal `__lambda7(x, y, string z = "Hey", ...)` is not callable using argument types `(int)`
+fail_compilation/diag_funclit.d(117): too few arguments, expected `3`, got `1`
+---
+ */
+
+#line 100
+void main()
+{
+ // No argument
+ (x, y, z) { return 42; }();
+
+ // Too many args, non-variadic
+ (x, y, z) { return 42; }(42, "Hello", 42, 42);
+ // Too many args, non-variadic, default param
+ (x, y, string z = "Hello") { return x; }(42, 42, "Nope", "Noooope");
+ // Too few args, non-variadic
+ (x, y, string z = "Hello") { return x; }(42);
+ // Too few args, non-variadic, default param
+ (x, y, z) { return x; }(42);
+
+ // Too few args, variadic
+ (x, y, ...) { return x; }(42);
+ // Too few args, variadic, default param
+ (x, y, string z = "Hey", ...) { return x; }(42);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag_template_alias.d b/gcc/testsuite/gdc.test/fail_compilation/diag_template_alias.d
new file mode 100644
index 0000000..bbfb5a0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag_template_alias.d
@@ -0,0 +1,11 @@
+/**
+TEST_OUTPUT:
+---
+fail_compilation/diag_template_alias.d(1): Error: identifier expected for template `alias` parameter
+fail_compilation/diag_template_alias.d(1): Error: found `alias` when expecting `(`
+fail_compilation/diag_template_alias.d(1): Error: semicolon expected following function declaration
+fail_compilation/diag_template_alias.d(1): Error: declaration expected, not `(`
+---
+ */
+#line 1
+void func1(alias alias)() {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag_template_this.d b/gcc/testsuite/gdc.test/fail_compilation/diag_template_this.d
new file mode 100644
index 0000000..778f68e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag_template_this.d
@@ -0,0 +1,11 @@
+/**
+TEST_OUTPUT:
+---
+fail_compilation/diag_template_this.d(1): Error: identifier expected for template `this` parameter
+fail_compilation/diag_template_this.d(1): Error: found `this` when expecting `(`
+fail_compilation/diag_template_this.d(1): Error: semicolon expected following function declaration
+fail_compilation/diag_template_this.d(1): Error: declaration expected, not `(`
+---
+ */
+#line 1
+void func1(this this)() {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diagin.d b/gcc/testsuite/gdc.test/fail_compilation/diagin.d
new file mode 100644
index 0000000..a4dabee
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diagin.d
@@ -0,0 +1,25 @@
+/*
+PERMUTE_ARGS: -preview=in
+TEST_OUTPUT:
+---
+fail_compilation/diagin.d(14): Error: function `diagin.foo(in int)` is not callable using argument types `()`
+fail_compilation/diagin.d(14): missing argument for parameter #1: `in int`
+fail_compilation/diagin.d(16): Error: template `diagin.foo1` cannot deduce function from argument types `!()(bool[])`
+fail_compilation/diagin.d(20): Candidate is: `foo1(T)(in T v, string)`
+---
+ */
+
+void main ()
+{
+ foo();
+ bool[] lvalue;
+ foo1(lvalue);
+}
+
+void foo(in int) {}
+void foo1(T)(in T v, string) {}
+
+// Ensure that `in` has a unique mangling
+static assert(foo.mangleof == `_D6diagin3fooFIiZv`);
+static assert(foo1!int.mangleof == `_D6diagin__T4foo1TiZQiFNaNbNiNfIiAyaZv`);
+static assert(foo1!char.mangleof == `_D6diagin__T4foo1TaZQiFNaNbNiNfIaAyaZv`);
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diaginref.d b/gcc/testsuite/gdc.test/fail_compilation/diaginref.d
new file mode 100644
index 0000000..2e83d76
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/diaginref.d
@@ -0,0 +1,13 @@
+/*
+REQUIRED_ARGS: -preview=in
+TEST_OUTPUT:
+---
+fail_compilation/diaginref.d(11): Error: attribute `ref` is redundant with previously-applied `in`
+fail_compilation/diaginref.d(13): Error: attribute `in` cannot be added after `ref`: remove `ref`
+---
+ */
+
+void foo(in string) {}
+void foo1(in ref string) {}
+void foo2(T)(in T v, string) {}
+void foo3(T)(ref in T v, string) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/dip22a.d b/gcc/testsuite/gdc.test/fail_compilation/dip22a.d
index 5bd2b5b..bf04a51 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/dip22a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/dip22a.d
@@ -1,10 +1,10 @@
/*
-REQUIRED_ARGS:
+EXTRA_FILES: imports/dip22a.d
TEST_OUTPUT:
---
-fail_compilation/dip22a.d(16): Error: no property `bar` for type `imports.dip22a.Klass`, did you mean `imports.dip22a.Klass.bar`?
-fail_compilation/dip22a.d(17): Error: no property `bar` for type `Struct`, did you mean `imports.dip22a.Struct.bar`?
-fail_compilation/dip22a.d(18): Error: undefined identifier `bar` in module `imports.dip22a`, did you mean function `bar`?
+fail_compilation/dip22a.d(16): Error: no property `bar` for type `imports.dip22a.Klass`
+fail_compilation/dip22a.d(17): Error: no property `bar` for type `imports.dip22a.Struct`
+fail_compilation/dip22a.d(18): Error: undefined identifier `bar` in module `imports.dip22a`
fail_compilation/dip22a.d(19): Error: no property `bar` for type `void`
fail_compilation/dip22a.d(20): Error: no property `bar` for type `int`
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/dip22b.d b/gcc/testsuite/gdc.test/fail_compilation/dip22b.d
index 9520180..0cd7247 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/dip22b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/dip22b.d
@@ -1,5 +1,5 @@
/*
-REQUIRED_ARGS:
+EXTRA_FILES: imports/dip22b.d imports/dip22c.d
TEST_OUTPUT:
---
fail_compilation/dip22b.d(12): Error: undefined identifier `Foo`, did you mean variable `foo`?
diff --git a/gcc/testsuite/gdc.test/fail_compilation/dip22e.d b/gcc/testsuite/gdc.test/fail_compilation/dip22e.d
index b1411b2..f118cf1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/dip22e.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/dip22e.d
@@ -1,5 +1,5 @@
/*
-REQUIRED_ARGS:
+EXTRA_FILES: imports/dip22d.d imports/dip22e.d
TEST_OUTPUT:
---
fail_compilation/dip22e.d(14): Error: undefined identifier `foo`, did you mean struct `Foo`?
diff --git a/gcc/testsuite/gdc.test/fail_compilation/dip25.d b/gcc/testsuite/gdc.test/fail_compilation/dip25.d
new file mode 100644
index 0000000..44fec37
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/dip25.d
@@ -0,0 +1,29 @@
+/*
+REQUIRED_ARGS: -de
+TEST_OUTPUT:
+---
+fail_compilation/dip25.d(17): Deprecation: returning `this.buffer[]` escapes a reference to parameter `this`
+fail_compilation/dip25.d(17): perhaps annotate the parameter with `return`
+fail_compilation/dip25.d(22): Error: returning `identity(x)` escapes a reference to local variable `x`
+fail_compilation/dip25.d(23): Deprecation: returning `identity(x)` escapes a reference to parameter `x`
+fail_compilation/dip25.d(23): perhaps annotate the parameter with `return`
+---
+*/
+struct Data
+{
+ char[256] buffer;
+ @property const(char)[] filename() const pure nothrow
+ {
+ return buffer[];
+ }
+}
+
+ref int identity(return ref int x) { return x; }
+ref int fun(return int x) { return identity(x); }
+ref int fun2(ref int x) { return identity(x); }
+
+void main()
+{
+ Data d;
+ const f = d.filename;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/disable_new.d b/gcc/testsuite/gdc.test/fail_compilation/disable_new.d
new file mode 100644
index 0000000..33ae32c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/disable_new.d
@@ -0,0 +1,25 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/disable_new.d(23): Error: cannot allocate `class C` with `new` because it is annotated with `@disable new()`
+fail_compilation/disable_new.d(24): Error: cannot allocate `struct S` with `new` because it is annotated with `@disable new()`
+---
+*/
+
+class C
+{
+ // force user of a type to use an external allocation strategy
+ @disable new();
+}
+
+struct S
+{
+ // force user of a type to use an external allocation strategy
+ @disable new();
+}
+
+void main()
+{
+ auto c = new C();
+ auto s = new S();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/dtor_attributes.d b/gcc/testsuite/gdc.test/fail_compilation/dtor_attributes.d
new file mode 100644
index 0000000..05c5d30
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/dtor_attributes.d
@@ -0,0 +1,190 @@
+/*
+Informative error messages if the compiler generated destructor overrides a user-defined one.
+
+TEST_OUTPUT:
+---
+fail_compilation/dtor_attributes.d(118): Error: `pure` function `dtor_attributes.test1` cannot call impure destructor `dtor_attributes.Strict.~this`
+fail_compilation/dtor_attributes.d(113): generated `Strict.~this` is impure because of the following field's destructors:
+fail_compilation/dtor_attributes.d(111): - HasDtor member
+fail_compilation/dtor_attributes.d(103): impure `HasDtor.~this` is declared here
+fail_compilation/dtor_attributes.d(118): Error: `@safe` function `dtor_attributes.test1` cannot call `@system` destructor `dtor_attributes.Strict.~this`
+fail_compilation/dtor_attributes.d(113): `dtor_attributes.Strict.~this` is declared here
+fail_compilation/dtor_attributes.d(113): generated `Strict.~this` is @system because of the following field's destructors:
+fail_compilation/dtor_attributes.d(111): - HasDtor member
+fail_compilation/dtor_attributes.d(103): @system `HasDtor.~this` is declared here
+fail_compilation/dtor_attributes.d(118): Error: `@nogc` function `dtor_attributes.test1` cannot call non-@nogc destructor `dtor_attributes.Strict.~this`
+fail_compilation/dtor_attributes.d(113): generated `Strict.~this` is non-@nogc because of the following field's destructors:
+fail_compilation/dtor_attributes.d(111): - HasDtor member
+fail_compilation/dtor_attributes.d(103): non-@nogc `HasDtor.~this` is declared here
+fail_compilation/dtor_attributes.d(118): Error: destructor `dtor_attributes.Strict.~this` is not `nothrow`
+fail_compilation/dtor_attributes.d(113): generated `Strict.~this` is not nothrow because of the following field's destructors:
+fail_compilation/dtor_attributes.d(111): - HasDtor member
+fail_compilation/dtor_attributes.d(103): not nothrow `HasDtor.~this` is declared here
+fail_compilation/dtor_attributes.d(116): Error: `nothrow` function `dtor_attributes.test1` may throw
+---
+*/
+#line 100
+
+struct HasDtor
+{
+ ~this() {}
+}
+
+// The user-defined dtor is overriden by a generated dtor calling both
+// - HasDtor.~this
+// - Strict.~this
+struct Strict
+{
+ HasDtor member;
+
+ ~this() pure nothrow @nogc @safe {}
+}
+
+void test1() pure nothrow @nogc @safe
+{
+ Strict s;
+}
+
+/*
+Works for clases as well.
+
+TEST_OUTPUT:
+---
+fail_compilation/dtor_attributes.d(209): Error: `pure` function `dtor_attributes.test2` cannot call impure destructor `dtor_attributes.StrictClass.~this`
+fail_compilation/dtor_attributes.d(204): generated `StrictClass.~this` is impure because of the following field's destructors:
+fail_compilation/dtor_attributes.d(203): - HasDtor member
+fail_compilation/dtor_attributes.d(103): impure `HasDtor.~this` is declared here
+---
+*/
+#line 200
+
+class StrictClass
+{
+ HasDtor member;
+ ~this() pure {}
+}
+
+void test2() pure
+{
+ scope instance = new StrictClass();
+}
+
+/*
+Ignores members whose destructors are not called.
+
+TEST_OUTPUT:
+---
+fail_compilation/dtor_attributes.d(321): Error: `pure` function `dtor_attributes.test3` cannot call impure destructor `dtor_attributes.StrictStructRef.~this`
+fail_compilation/dtor_attributes.d(316): generated `StrictStructRef.~this` is impure because of the following field's destructors:
+fail_compilation/dtor_attributes.d(310): - HasDtor structMember
+fail_compilation/dtor_attributes.d(103): impure `HasDtor.~this` is declared here
+---
+*/
+#line 300
+
+class HasDtorClass
+{
+ ~this() {}
+}
+
+struct Empty {}
+
+struct StrictStructRef
+{
+ HasDtor structMember;
+ HasDtorClass classMember;
+ int intMember;
+ int[2] arrayMember;
+ Empty e;
+
+ ~this() pure {}
+}
+
+void test3() pure
+{
+ StrictStructRef structInstance;
+}
+
+/*
+Types from nested types work as well.
+
+TEST_OUTPUT:
+---
+fail_compilation/dtor_attributes.d(411): Error: `pure` function `dtor_attributes.test4` cannot call impure destructor `dtor_attributes.StrictNested.~this`
+fail_compilation/dtor_attributes.d(406): generated `StrictNested.~this` is impure because of the following field's destructors:
+fail_compilation/dtor_attributes.d(403): - HasDtor[4] arrayMember
+fail_compilation/dtor_attributes.d(103): impure `HasDtor.~this` is declared here
+---
+*/
+#line 400
+
+struct StrictNested
+{
+ HasDtor[4] arrayMember;
+ HasDtorClass[4] classMember;
+
+ ~this() pure {}
+}
+
+void test4() pure
+{
+ StrictNested structInstance;
+}
+
+/*
+Ignores member destructors when the user-defined one is permissive enough (e.g. both impure)
+
+TEST_OUTPUT:
+---
+fail_compilation/dtor_attributes.d(509): Error: `pure` function `dtor_attributes.test5` cannot call impure destructor `dtor_attributes.Permissive.~this`
+---
+*/
+#line 500
+
+struct Permissive
+{
+ HasDtor[4] arrayMember;
+ ~this() {}
+}
+
+void test5() pure
+{
+ Permissive structInstance;
+}
+
+/*
+Works with destructors generated through multiple layers
+
+TEST_OUTPUT:
+---
+fail_compilation/dtor_attributes.d(618): Error: `pure` function `dtor_attributes.test6` cannot call impure destructor `dtor_attributes.HasNestedDtor3.~this`
+fail_compilation/dtor_attributes.d(611): generated `HasNestedDtor3.~this` is impure because of the following field's destructors:
+fail_compilation/dtor_attributes.d(613): - HasNestedDtor2 member3
+fail_compilation/dtor_attributes.d(606): generated `HasNestedDtor2.~this` is impure because of the following field's destructors:
+fail_compilation/dtor_attributes.d(608): - HasNestedDtor1 member2
+fail_compilation/dtor_attributes.d(601): generated `HasNestedDtor1.~this` is impure because of the following field's destructors:
+fail_compilation/dtor_attributes.d(603): - HasDtor member1
+fail_compilation/dtor_attributes.d(103): impure `HasDtor.~this` is declared here
+---
+*/
+#line 600
+
+struct HasNestedDtor1
+{
+ HasDtor member1;
+}
+
+struct HasNestedDtor2
+{
+ HasNestedDtor1 member2;
+}
+
+struct HasNestedDtor3
+{
+ HasNestedDtor2 member3;
+}
+
+void test6() pure
+{
+ HasNestedDtor3 instance;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/dtorfields_attributes.d b/gcc/testsuite/gdc.test/fail_compilation/dtorfields_attributes.d
new file mode 100644
index 0000000..f6cab89
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/dtorfields_attributes.d
@@ -0,0 +1,43 @@
+/*
+Informative error messages if the compiler inserted an optional destructor call into the constructor.
+
+REQUIRED_ARGS: -preview=dtorfields
+TEST_OUTPUT:
+---
+fail_compilation/dtorfields_attributes.d(117): Error: `pure` constructor `dtorfields_attributes.Strict.this` cannot call impure destructor `dtorfields_attributes.Strict.~this`
+fail_compilation/dtorfields_attributes.d(119): generated `Strict.~this` is impure because of the following field's destructors:
+fail_compilation/dtorfields_attributes.d(115): - HasDtor member
+fail_compilation/dtorfields_attributes.d(103): impure `HasDtor.~this` is declared here
+fail_compilation/dtorfields_attributes.d(117): Error: `@safe` constructor `dtorfields_attributes.Strict.this` cannot call `@system` destructor `dtorfields_attributes.Strict.~this`
+fail_compilation/dtorfields_attributes.d(119): `dtorfields_attributes.Strict.~this` is declared here
+fail_compilation/dtorfields_attributes.d(119): generated `Strict.~this` is @system because of the following field's destructors:
+fail_compilation/dtorfields_attributes.d(115): - HasDtor member
+fail_compilation/dtorfields_attributes.d(103): @system `HasDtor.~this` is declared here
+fail_compilation/dtorfields_attributes.d(117): Error: `@nogc` constructor `dtorfields_attributes.Strict.this` cannot call non-@nogc destructor `dtorfields_attributes.Strict.~this`
+fail_compilation/dtorfields_attributes.d(119): generated `Strict.~this` is non-@nogc because of the following field's destructors:
+fail_compilation/dtorfields_attributes.d(115): - HasDtor member
+fail_compilation/dtorfields_attributes.d(103): non-@nogc `HasDtor.~this` is declared here
+---
+*/
+#line 100
+
+struct HasDtor
+{
+ ~this()
+ {
+ // Enforce @system, ... just to be sure
+ __gshared int i;
+ if (++i)
+ throw new Exception(new immutable(char)[](10));
+ }
+}
+
+// The user-defined dtor matches the ctor attributes
+struct Strict
+{
+ HasDtor member;
+
+ this(int) pure @nogc @safe {} // nothrow doesn't generate dtor call
+
+ ~this() pure @nogc @safe {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/e15876_1.d b/gcc/testsuite/gdc.test/fail_compilation/e15876_1.d
new file mode 100644
index 0000000..33bee25
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/e15876_1.d
@@ -0,0 +1,15 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/e15876_1.d(15): Error: valid scope identifiers are `exit`, `failure`, or `success`, not `x`
+fail_compilation/e15876_1.d(16): Error: found `End of File` when expecting `)`
+fail_compilation/e15876_1.d(16): Error: found `End of File` instead of statement
+fail_compilation/e15876_1.d(16): Error: found `End of File` when expecting `}` following compound statement
+fail_compilation/e15876_1.d(16): Error: found `End of File` when expecting `]`
+fail_compilation/e15876_1.d(16): Error: no identifier for declarator `o[()
+{
+scope(exit) }
+]`
+---
+*/
+o[{scope(x
diff --git a/gcc/testsuite/gdc.test/fail_compilation/e15876_2.d b/gcc/testsuite/gdc.test/fail_compilation/e15876_2.d
new file mode 100644
index 0000000..10ff7d5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/e15876_2.d
@@ -0,0 +1,14 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/e15876_2.d(15): Error: identifier expected following `template`
+fail_compilation/e15876_2.d(15): Error: found `End of File` when expecting `}` following compound statement
+fail_compilation/e15876_2.d(15): Error: found `End of File` when expecting `]`
+fail_compilation/e15876_2.d(15): Error: no identifier for declarator `o[()
+{
+;
+}
+]`
+---
+*/
+o[{template
diff --git a/gcc/testsuite/gdc.test/fail_compilation/e15876_3.d b/gcc/testsuite/gdc.test/fail_compilation/e15876_3.d
new file mode 100644
index 0000000..ae5f77a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/e15876_3.d
@@ -0,0 +1,25 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/e15876_3.d(25): Error: unexpected `(` in declarator
+fail_compilation/e15876_3.d(25): Error: basic type expected, not `=`
+fail_compilation/e15876_3.d(26): Error: found `End of File` when expecting `(`
+fail_compilation/e15876_3.d(26): Error: found `End of File` instead of statement
+fail_compilation/e15876_3.d(26): Error: expression expected, not `End of File`
+fail_compilation/e15876_3.d(26): Error: found `End of File` when expecting `;` following `for` condition
+fail_compilation/e15876_3.d(26): Error: expression expected, not `End of File`
+fail_compilation/e15876_3.d(26): Error: found `End of File` when expecting `)`
+fail_compilation/e15876_3.d(26): Error: found `End of File` instead of statement
+fail_compilation/e15876_3.d(26): Error: found `End of File` when expecting `}` following compound statement
+fail_compilation/e15876_3.d(26): Error: found `End of File` when expecting `)`
+fail_compilation/e15876_3.d(26): Error: no identifier for declarator `d(_error_ = ()
+{
+for (; 0; 0)
+{
+}
+}
+)`
+fail_compilation/e15876_3.d(26): Error: semicolon expected following function declaration
+---
+*/
+d(={for
diff --git a/gcc/testsuite/gdc.test/fail_compilation/e15876_4.d b/gcc/testsuite/gdc.test/fail_compilation/e15876_4.d
new file mode 100644
index 0000000..6f46633
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/e15876_4.d
@@ -0,0 +1,23 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/e15876_4.d(23): Error: found `)` when expecting `(`
+fail_compilation/e15876_4.d(24): Error: found `End of File` when expecting `(`
+fail_compilation/e15876_4.d(24): Error: found `End of File` instead of statement
+fail_compilation/e15876_4.d(24): Error: expression expected, not `End of File`
+fail_compilation/e15876_4.d(24): Error: found `End of File` when expecting `;` following `for` condition
+fail_compilation/e15876_4.d(24): Error: expression expected, not `End of File`
+fail_compilation/e15876_4.d(24): Error: found `End of File` when expecting `)`
+fail_compilation/e15876_4.d(24): Error: found `End of File` instead of statement
+fail_compilation/e15876_4.d(24): Error: found `End of File` when expecting `}` following compound statement
+fail_compilation/e15876_4.d(24): Error: found `End of File` when expecting `)`
+fail_compilation/e15876_4.d(24): Error: no identifier for declarator `typeof(()
+{
+for (; 0; 0)
+{
+}
+}
+)`
+---
+*/
+typeof){for
diff --git a/gcc/testsuite/gdc.test/fail_compilation/e15876_5.d b/gcc/testsuite/gdc.test/fail_compilation/e15876_5.d
new file mode 100644
index 0000000..5b65b1b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/e15876_5.d
@@ -0,0 +1,15 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/e15876_5.d(16): Error: basic type expected, not `End of File`
+fail_compilation/e15876_5.d(16): Error: semicolon expected to close `alias` declaration
+fail_compilation/e15876_5.d(16): Error: found `End of File` when expecting `}` following compound statement
+fail_compilation/e15876_5.d(16): Error: found `End of File` when expecting `]`
+fail_compilation/e15876_5.d(16): Error: no identifier for declarator `p[()
+{
+alias ;
+}
+]`
+---
+*/
+p[{alias
diff --git a/gcc/testsuite/gdc.test/fail_compilation/e15876_6.d b/gcc/testsuite/gdc.test/fail_compilation/e15876_6.d
new file mode 100644
index 0000000..7547b38
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/e15876_6.d
@@ -0,0 +1,7 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/e15876_6.d(7): Error: identifier expected following `(type)`.
+---
+*/
+auto unaryExParseError = immutable(int).;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/enum9921.d b/gcc/testsuite/gdc.test/fail_compilation/enum9921.d
index 54c76b9..90d8802 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/enum9921.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/enum9921.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/enum9921.d(9): Error: enum enum9921.X base type must not be void
-fail_compilation/enum9921.d(11): Error: enum enum9921.Z base type must not be void
+fail_compilation/enum9921.d(9): Error: enum `enum9921.X` base type must not be `void`
+fail_compilation/enum9921.d(11): Error: enum `enum9921.Z` base type must not be `void`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/extra-files/a14446.d b/gcc/testsuite/gdc.test/fail_compilation/extra-files/a14446.d
deleted file mode 100644
index 5e19c1e..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/extra-files/a14446.d
+++ /dev/null
@@ -1,6 +0,0 @@
-module a14446;
-
-struct CDBMaker
-{
- import ice14446;
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10.d b/gcc/testsuite/gdc.test/fail_compilation/fail10.d
index 9d73537..48901a1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10.d(18): Error: mixin Foo!y cannot resolve forward reference
+fail_compilation/fail10.d(18): Error: mixin `Foo!y` cannot resolve forward reference
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail100.d b/gcc/testsuite/gdc.test/fail_compilation/fail100.d
index 1dd8050..a8189ec 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail100.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail100.d
@@ -5,8 +5,8 @@ fail_compilation/fail100.d(24): Error: cannot implicitly convert expression `f`
---
*/
-// Issue 85 - Array of classes doesn't function as array of interfaces
-
+// https://issues.dlang.org/show_bug.cgi?id=85
+// Array of classes doesn't function as array of interfaces
interface I
{
I[] foo();
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10082.d b/gcc/testsuite/gdc.test/fail_compilation/fail10082.d
index fd30801..8a3d2fb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10082.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10082.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10082.d(24): Error: cannot infer type from overloaded function symbol &foo
+fail_compilation/fail10082.d(24): Error: cannot infer type from overloaded function symbol `&foo`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail101.d b/gcc/testsuite/gdc.test/fail_compilation/fail101.d
index 35d23e3..0f6e0b3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail101.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail101.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail101.d(8): Error: cannot implicitly convert expression `1` of type `int` to `creal`
+fail_compilation/fail101.d(9): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead
+fail_compilation/fail101.d(9): Error: cannot implicitly convert expression `1` of type `int` to `creal`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10102.d b/gcc/testsuite/gdc.test/fail_compilation/fail10102.d
index 2c974ea..4847413 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10102.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10102.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10102.d(48): Error: variable fail10102.main.m default construction is disabled for type NotNull!(int*)
-fail_compilation/fail10102.d(49): Error: variable fail10102.main.a default construction is disabled for type NotNull!(int*)[3]
-fail_compilation/fail10102.d(50): Error: default construction is disabled for type NotNull!(int*)
+fail_compilation/fail10102.d(48): Error: variable `fail10102.main.m` default construction is disabled for type `NotNull!(int*)`
+fail_compilation/fail10102.d(49): Error: variable `fail10102.main.a` default construction is disabled for type `NotNull!(int*)[3]`
+fail_compilation/fail10102.d(50): Error: default construction is disabled for type `NotNull!(int*)`
fail_compilation/fail10102.d(51): Error: field `S.m` must be initialized because it has no default constructor
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10115.d b/gcc/testsuite/gdc.test/fail_compilation/fail10115.d
index e94ae87..4d766cf 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10115.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10115.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10115.d(35): Error: cannot have out parameter of type S because the default construction is disabled
-fail_compilation/fail10115.d(35): Error: cannot have out parameter of type E because the default construction is disabled
-fail_compilation/fail10115.d(35): Error: cannot have out parameter of type U because the default construction is disabled
-fail_compilation/fail10115.d(40): Error: struct fail10115.S default construction is disabled
-fail_compilation/fail10115.d(41): Error: struct fail10115.S default construction is disabled
-fail_compilation/fail10115.d(42): Error: union fail10115.U default construction is disabled
+fail_compilation/fail10115.d(35): Error: cannot have `out` parameter of type `S` because the default construction is disabled
+fail_compilation/fail10115.d(35): Error: cannot have `out` parameter of type `E` because the default construction is disabled
+fail_compilation/fail10115.d(35): Error: cannot have `out` parameter of type `U` because the default construction is disabled
+fail_compilation/fail10115.d(40): Error: struct `fail10115.S` default construction is disabled
+fail_compilation/fail10115.d(41): Error: struct `fail10115.S` default construction is disabled
+fail_compilation/fail10115.d(42): Error: union `fail10115.U` default construction is disabled
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10254.d b/gcc/testsuite/gdc.test/fail_compilation/fail10254.d
index 0d402e1..8ad8fde 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10254.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10254.d
@@ -1,10 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10254.d(18): Error: pure function 'fail10254.foo' cannot call impure constructor 'fail10254.C.this'
-fail_compilation/fail10254.d(18): Error: @safe function 'fail10254.foo' cannot call @system constructor 'fail10254.C.this'
-fail_compilation/fail10254.d(19): Error: pure function 'fail10254.foo' cannot call impure constructor 'fail10254.S.this'
-fail_compilation/fail10254.d(19): Error: @safe function 'fail10254.foo' cannot call @system constructor 'fail10254.S.this'
+fail_compilation/fail10254.d(20): Error: `pure` function `fail10254.foo` cannot call impure constructor `fail10254.C.this`
+fail_compilation/fail10254.d(20): Error: `@safe` function `fail10254.foo` cannot call `@system` constructor `fail10254.C.this`
+fail_compilation/fail10254.d(15): `fail10254.C.this` is declared here
+fail_compilation/fail10254.d(21): Error: `pure` function `fail10254.foo` cannot call impure constructor `fail10254.S.this`
+fail_compilation/fail10254.d(21): Error: `@safe` function `fail10254.foo` cannot call `@system` constructor `fail10254.S.this`
+fail_compilation/fail10254.d(16): `fail10254.S.this` is declared here
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10277.d b/gcc/testsuite/gdc.test/fail_compilation/fail10277.d
index 6173d37..11ad9d5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10277.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10277.d
@@ -1,28 +1,28 @@
+// EXTRA_FILES: imports/fail10277.d
module fail10227;
-
/*
TEST_OUTPUT:
---
-fail_compilation/imports/fail10277.d(3): Error: class TypeInfo only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(4): Error: class TypeInfo_Class only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(5): Error: class TypeInfo_Interface only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(6): Error: class TypeInfo_Struct only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(8): Error: class TypeInfo_Pointer only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(9): Error: class TypeInfo_Array only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(10): Error: class TypeInfo_AssociativeArray only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(11): Error: class TypeInfo_Enum only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(12): Error: class TypeInfo_Function only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(13): Error: class TypeInfo_Delegate only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(14): Error: class TypeInfo_Tuple only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(15): Error: class TypeInfo_Const only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(16): Error: class TypeInfo_Invariant only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(17): Error: class TypeInfo_Shared only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(18): Error: class TypeInfo_Inout only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(19): Error: class TypeInfo_Vector only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(20): Error: class Object only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(21): Error: class Throwable only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(22): Error: class Exception only object.d can define this reserved class name
-fail_compilation/imports/fail10277.d(23): Error: class Error only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(3): Error: class `TypeInfo` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(4): Error: class `TypeInfo_Class` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(5): Error: class `TypeInfo_Interface` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(6): Error: class `TypeInfo_Struct` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(8): Error: class `TypeInfo_Pointer` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(9): Error: class `TypeInfo_Array` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(10): Error: class `TypeInfo_AssociativeArray` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(11): Error: class `TypeInfo_Enum` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(12): Error: class `TypeInfo_Function` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(13): Error: class `TypeInfo_Delegate` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(14): Error: class `TypeInfo_Tuple` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(15): Error: class `TypeInfo_Const` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(16): Error: class `TypeInfo_Invariant` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(17): Error: class `TypeInfo_Shared` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(18): Error: class `TypeInfo_Inout` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(19): Error: class `TypeInfo_Vector` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(20): Error: class `Object` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(21): Error: class `Throwable` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(22): Error: class `Exception` only object.d can define this reserved class name
+fail_compilation/imports/fail10277.d(23): Error: class `Error` only object.d can define this reserved class name
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10299.d b/gcc/testsuite/gdc.test/fail_compilation/fail10299.d
index 29475aa..f0eaeba 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10299.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10299.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10299.d(11): Error: foo!string is not an lvalue
+fail_compilation/fail10299.d(11): Error: `foo!string` is not an lvalue and cannot be modified
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail104.d b/gcc/testsuite/gdc.test/fail_compilation/fail104.d
index 2111844..e9190de 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail104.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail104.d
@@ -1,4 +1,5 @@
-// Issue 76 - Using a non-template struct as a template
+// https://issues.dlang.org/show_bug.cgi?id=76
+// Using a non-template struct as a template
// Compiling leads to "Assertion failure: 's->parent' on line 1694 in file
// 'template.c'"
/*
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10481.d b/gcc/testsuite/gdc.test/fail_compilation/fail10481.d
index 878cbe8..a6657c0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10481.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10481.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/fail10481.d(11): Error: undefined identifier `T1`, did you mean alias `T0`?
-fail_compilation/fail10481.d(15): Error: cannot infer type from template instance get!(A)
+fail_compilation/fail10481.d(15): Error: cannot infer type from template instance `get!(A)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail105.d b/gcc/testsuite/gdc.test/fail_compilation/fail105.d
index 8702cac..0e13e36 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail105.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail105.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail105.d(11): Error: cannot cast "bar" to int at compile time
+fail_compilation/fail105.d(11): Error: cannot cast `"bar"` to `int` at compile time
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10528.d b/gcc/testsuite/gdc.test/fail_compilation/fail10528.d
index 067e83c..38c5a23 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10528.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10528.d
@@ -1,14 +1,15 @@
/*
+EXTRA_FILES: imports/a10528.d
TEST_OUTPUT:
---
-fail_compilation/fail10528.d(19): Error: undefined identifier `a`
-fail_compilation/fail10528.d(20): Error: undefined identifier `a` in module `a10528`, did you mean variable `a`?
-fail_compilation/fail10528.d(22): Error: undefined identifier `b`
-fail_compilation/fail10528.d(23): Error: undefined identifier `b` in module `a10528`, did you mean enum member `b`?
-fail_compilation/fail10528.d(25): Error: no property `c` for type `S`, did you mean `a10528.S.c`?
-fail_compilation/fail10528.d(26): Error: no property `c` for type `S`, did you mean `a10528.S.c`?
-fail_compilation/fail10528.d(28): Error: no property `d` for type `a10528.C`, did you mean `a10528.C.d`?
-fail_compilation/fail10528.d(29): Error: no property `d` for type `a10528.C`, did you mean `a10528.C.d`?
+fail_compilation/fail10528.d(20): Error: undefined identifier `a`
+fail_compilation/fail10528.d(21): Error: undefined identifier `a` in module `a10528`
+fail_compilation/fail10528.d(23): Error: undefined identifier `b`
+fail_compilation/fail10528.d(24): Error: undefined identifier `b` in module `a10528`
+fail_compilation/fail10528.d(26): Error: no property `c` for type `a10528.S`
+fail_compilation/fail10528.d(27): Error: no property `c` for type `a10528.S`
+fail_compilation/fail10528.d(29): Error: no property `d` for type `a10528.C`
+fail_compilation/fail10528.d(30): Error: no property `d` for type `a10528.C`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10534.d b/gcc/testsuite/gdc.test/fail_compilation/fail10534.d
index 2516135..fac37f4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10534.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10534.d
@@ -1,22 +1,22 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10534.d(28): Error: 'a' is not of arithmetic type, it is a int delegate()
-fail_compilation/fail10534.d(28): Error: 'b' is not of arithmetic type, it is a int delegate()
-fail_compilation/fail10534.d(29): Error: 'a' is not of arithmetic type, it is a int delegate()
-fail_compilation/fail10534.d(29): Error: 'b' is not of arithmetic type, it is a int delegate()
-fail_compilation/fail10534.d(30): Error: 'a' is not of arithmetic type, it is a int delegate()
-fail_compilation/fail10534.d(30): Error: 'b' is not of arithmetic type, it is a int delegate()
-fail_compilation/fail10534.d(31): Error: 'a' is not of arithmetic type, it is a int delegate()
-fail_compilation/fail10534.d(31): Error: 'b' is not of arithmetic type, it is a int delegate()
-fail_compilation/fail10534.d(36): Error: 'a' is not of arithmetic type, it is a int function()
-fail_compilation/fail10534.d(36): Error: 'b' is not of arithmetic type, it is a int function()
-fail_compilation/fail10534.d(37): Error: 'a' is not of arithmetic type, it is a int function()
-fail_compilation/fail10534.d(37): Error: 'b' is not of arithmetic type, it is a int function()
-fail_compilation/fail10534.d(38): Error: 'a' is not of arithmetic type, it is a int function()
-fail_compilation/fail10534.d(38): Error: 'b' is not of arithmetic type, it is a int function()
-fail_compilation/fail10534.d(39): Error: 'a' is not of arithmetic type, it is a int function()
-fail_compilation/fail10534.d(39): Error: 'b' is not of arithmetic type, it is a int function()
+fail_compilation/fail10534.d(28): Error: `a` is not of arithmetic type, it is a `int delegate()`
+fail_compilation/fail10534.d(28): Error: `b` is not of arithmetic type, it is a `int delegate()`
+fail_compilation/fail10534.d(29): Error: `a` is not of arithmetic type, it is a `int delegate()`
+fail_compilation/fail10534.d(29): Error: `b` is not of arithmetic type, it is a `int delegate()`
+fail_compilation/fail10534.d(30): Error: `a` is not of arithmetic type, it is a `int delegate()`
+fail_compilation/fail10534.d(30): Error: `b` is not of arithmetic type, it is a `int delegate()`
+fail_compilation/fail10534.d(31): Error: `a` is not of arithmetic type, it is a `int delegate()`
+fail_compilation/fail10534.d(31): Error: `b` is not of arithmetic type, it is a `int delegate()`
+fail_compilation/fail10534.d(36): Error: `a` is not of arithmetic type, it is a `int function()`
+fail_compilation/fail10534.d(36): Error: `b` is not of arithmetic type, it is a `int function()`
+fail_compilation/fail10534.d(37): Error: `a` is not of arithmetic type, it is a `int function()`
+fail_compilation/fail10534.d(37): Error: `b` is not of arithmetic type, it is a `int function()`
+fail_compilation/fail10534.d(38): Error: `a` is not of arithmetic type, it is a `int function()`
+fail_compilation/fail10534.d(38): Error: `b` is not of arithmetic type, it is a `int function()`
+fail_compilation/fail10534.d(39): Error: `a` is not of arithmetic type, it is a `int function()`
+fail_compilation/fail10534.d(39): Error: `b` is not of arithmetic type, it is a `int function()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail106.d b/gcc/testsuite/gdc.test/fail_compilation/fail106.d
index f6dc2ea..ba9f7dd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail106.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail106.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail106.d(12): Error: cannot modify immutable expression 'C'
+fail_compilation/fail106.d(12): Error: cannot modify `immutable` expression `"ABC"[2]`
---
*/
-// Issue 239 - Internal error: changing string literal elements
-
+// https://issues.dlang.org/show_bug.cgi?id=239
+// Internal error: changing string literal elements
void main()
{
"ABC"[2] = 's';
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10630.d b/gcc/testsuite/gdc.test/fail_compilation/fail10630.d
index 738bdd1..35feaea 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10630.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10630.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10630.d(12): Error: cannot have out parameter of type S because the default construction is disabled
+fail_compilation/fail10630.d(12): Error: cannot have `out` parameter of type `S` because the default construction is disabled
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10666.d b/gcc/testsuite/gdc.test/fail_compilation/fail10666.d
index 2e1747d..9fe28d0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10666.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10666.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10666.d(16): Error: variable fail10666.foo10666.s1 has scoped destruction, cannot build closure
+fail_compilation/fail10666.d(16): Error: variable `fail10666.foo10666.s1` has scoped destruction, cannot build closure
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10806.d b/gcc/testsuite/gdc.test/fail_compilation/fail10806.d
new file mode 100644
index 0000000..48f3537
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10806.d
@@ -0,0 +1,18 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail10806.d(12): Error: function `fail10806.Class.clone` incompatible covariant types `First()` and `Second()`
+---
+*/
+
+interface First { First clone(); }
+interface Second { Second clone(); void call(); }
+
+class Class : First, Second {
+ override Class clone() { return this; }
+ override void call() { }
+}
+
+void main() {
+ (cast(Second) new Class).clone().call();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail109.d b/gcc/testsuite/gdc.test/fail_compilation/fail109.d
index 3e379c3..3419079 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail109.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail109.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail109.d(12): Error: enum member fail109.Bool.Unknown initialization with `Bool.True+1` causes overflow for type `bool`
+fail_compilation/fail109.d(12): Error: enum member `fail109.Bool.Unknown` initialization with `Bool.True+1` causes overflow for type `bool`
---
*/
@@ -12,11 +12,11 @@ enum Bool : bool
Unknown
}
-/* Bugzilla 11088
+/* https://issues.dlang.org/show_bug.cgi?id=11088
TEST_OUTPUT:
---
-fail_compilation/fail109.d(25): Error: enum member fail109.E.B initialization with `E.A+1` causes overflow for type `int`
-fail_compilation/fail109.d(31): Error: enum member fail109.E1.B initialization with `E1.A+1` causes overflow for type `short`
+fail_compilation/fail109.d(25): Error: enum member `fail109.E.B` initialization with `E.A+1` causes overflow for type `int`
+fail_compilation/fail109.d(31): Error: enum member `fail109.E1.B` initialization with `E1.A+1` causes overflow for type `short`
---
*/
enum E
@@ -31,11 +31,11 @@ enum E1 : short
B
}
-/* Bugzilla 14950
+/* https://issues.dlang.org/show_bug.cgi?id=14950
TEST_OUTPUT:
---
-fail_compilation/fail109.d(50): Deprecation: Comparison between different enumeration types `B` and `C`; If this behavior is intended consider using `std.conv.asOriginalType`
-fail_compilation/fail109.d(50): Error: enum member fail109.B.end initialization with `B.start+1` causes overflow for type `C`
+fail_compilation/fail109.d(50): Error: Comparison between different enumeration types `B` and `C`; If this behavior is intended consider using `std.conv.asOriginalType`
+fail_compilation/fail109.d(50): Error: enum member `fail109.B.end` initialization with `B.start+1` causes overflow for type `C`
---
*/
enum C
@@ -50,7 +50,7 @@ enum B
end
}
-/* Bugzilla 11849
+/* https://issues.dlang.org/show_bug.cgi?id=11849
TEST_OUTPUT:
---
fail_compilation/fail109.d(72): Error: enum member `fail109.RegValueType1a.Unknown` is forward referenced looking for `.max`
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10905.d b/gcc/testsuite/gdc.test/fail_compilation/fail10905.d
index 6181d94..4f243ff 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10905.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10905.d
@@ -1,4 +1,5 @@
/*
+REQUIRED_ARGS: -m64
TEST_OUTPUT:
---
fail_compilation/fail10905.d(20): Error: incompatible types for `(this.x) == (cast(const(__vector(long[2])))cast(__vector(long[2]))1L)`: both operands are of type `const(__vector(long[2]))`
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10947.d b/gcc/testsuite/gdc.test/fail_compilation/fail10947.d
index da84780..9b2de96 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10947.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10947.d
@@ -1,15 +1,15 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10947.d(21): Error: cannot have immutable out parameter of type immutable(S)
-fail_compilation/fail10947.d(22): Error: cannot have immutable out parameter of type immutable(S)
-fail_compilation/fail10947.d(23): Error: cannot have immutable out parameter of type immutable(S)
-fail_compilation/fail10947.d(25): Error: cannot have const out parameter of type const(S)
-fail_compilation/fail10947.d(26): Error: cannot have const out parameter of type const(S)
-fail_compilation/fail10947.d(27): Error: cannot have const out parameter of type const(S)
-fail_compilation/fail10947.d(29): Error: cannot have inout out parameter of type inout(S)
-fail_compilation/fail10947.d(30): Error: cannot have inout out parameter of type inout(S)
-fail_compilation/fail10947.d(31): Error: cannot have inout out parameter of type inout(S)
+fail_compilation/fail10947.d(21): Error: cannot have `immutable out` parameter of type `immutable(S)`
+fail_compilation/fail10947.d(22): Error: cannot have `immutable out` parameter of type `immutable(S)`
+fail_compilation/fail10947.d(23): Error: cannot have `immutable out` parameter of type `immutable(S)`
+fail_compilation/fail10947.d(25): Error: cannot have `const out` parameter of type `const(S)`
+fail_compilation/fail10947.d(26): Error: cannot have `const out` parameter of type `const(S)`
+fail_compilation/fail10947.d(27): Error: cannot have `const out` parameter of type `const(S)`
+fail_compilation/fail10947.d(29): Error: cannot have `inout out` parameter of type `inout(S)`
+fail_compilation/fail10947.d(30): Error: cannot have `inout out` parameter of type `inout(S)`
+fail_compilation/fail10947.d(31): Error: cannot have `inout out` parameter of type `inout(S)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10964.d b/gcc/testsuite/gdc.test/fail_compilation/fail10964.d
index 7b7c826..4b31a92 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10964.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10964.d
@@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10964.d(28): Error: function `fail10964.S.__postblit` is not nothrow
-fail_compilation/fail10964.d(29): Error: function `fail10964.S.__postblit` is not nothrow
-fail_compilation/fail10964.d(30): Error: function `fail10964.S.__postblit` is not nothrow
-fail_compilation/fail10964.d(33): Error: function `fail10964.S.__postblit` is not nothrow
-fail_compilation/fail10964.d(34): Error: function `fail10964.S.__postblit` is not nothrow
-fail_compilation/fail10964.d(35): Error: function `fail10964.S.__postblit` is not nothrow
-fail_compilation/fail10964.d(22): Error: nothrow function `fail10964.foo` may throw
+fail_compilation/fail10964.d(28): Error: function `fail10964.S.__postblit` is not `nothrow`
+fail_compilation/fail10964.d(29): Error: function `fail10964.S.__postblit` is not `nothrow`
+fail_compilation/fail10964.d(30): Error: function `fail10964.S.__postblit` is not `nothrow`
+fail_compilation/fail10964.d(33): Error: function `fail10964.S.__postblit` is not `nothrow`
+fail_compilation/fail10964.d(34): Error: function `core.internal.array.construction._d_arraysetctor!(S[], S)._d_arraysetctor` is not `nothrow`
+fail_compilation/fail10964.d(35): Error: function `core.internal.array.construction._d_arrayctor!(S[], S)._d_arrayctor` is not `nothrow`
+fail_compilation/fail10964.d(22): Error: `nothrow` function `fail10964.foo` may throw
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10968.d b/gcc/testsuite/gdc.test/fail_compilation/fail10968.d
index 257d739..d9f554a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10968.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10968.d
@@ -1,18 +1,26 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10968.d(33): Error: pure function 'fail10968.bar' cannot call impure function 'fail10968.SA.__postblit'
-fail_compilation/fail10968.d(33): Error: @safe function 'fail10968.bar' cannot call @system function 'fail10968.SA.__postblit'
-fail_compilation/fail10968.d(34): Error: pure function 'fail10968.bar' cannot call impure function 'fail10968.SA.__postblit'
-fail_compilation/fail10968.d(34): Error: @safe function 'fail10968.bar' cannot call @system function 'fail10968.SA.__postblit'
-fail_compilation/fail10968.d(35): Error: pure function 'fail10968.bar' cannot call impure function 'fail10968.SA.__postblit'
-fail_compilation/fail10968.d(35): Error: @safe function 'fail10968.bar' cannot call @system function 'fail10968.SA.__postblit'
-fail_compilation/fail10968.d(38): Error: pure function 'fail10968.bar' cannot call impure function 'fail10968.SA.__postblit'
-fail_compilation/fail10968.d(38): Error: @safe function 'fail10968.bar' cannot call @system function 'fail10968.SA.__postblit'
-fail_compilation/fail10968.d(39): Error: pure function 'fail10968.bar' cannot call impure function 'fail10968.SA.__postblit'
-fail_compilation/fail10968.d(39): Error: @safe function 'fail10968.bar' cannot call @system function 'fail10968.SA.__postblit'
-fail_compilation/fail10968.d(40): Error: pure function 'fail10968.bar' cannot call impure function 'fail10968.SA.__postblit'
-fail_compilation/fail10968.d(40): Error: @safe function 'fail10968.bar' cannot call @system function 'fail10968.SA.__postblit'
+fail_compilation/fail10968.d(41): Error: `pure` function `fail10968.bar` cannot call impure function `fail10968.SA.__postblit`
+fail_compilation/fail10968.d(41): Error: `@safe` function `fail10968.bar` cannot call `@system` function `fail10968.SA.__postblit`
+fail_compilation/fail10968.d(29): `fail10968.SA.__postblit` is declared here
+fail_compilation/fail10968.d(42): Error: `pure` function `fail10968.bar` cannot call impure function `fail10968.SA.__postblit`
+fail_compilation/fail10968.d(42): Error: `@safe` function `fail10968.bar` cannot call `@system` function `fail10968.SA.__postblit`
+fail_compilation/fail10968.d(29): `fail10968.SA.__postblit` is declared here
+fail_compilation/fail10968.d(43): Error: `pure` function `fail10968.bar` cannot call impure function `fail10968.SA.__postblit`
+fail_compilation/fail10968.d(43): Error: `@safe` function `fail10968.bar` cannot call `@system` function `fail10968.SA.__postblit`
+fail_compilation/fail10968.d(29): `fail10968.SA.__postblit` is declared here
+fail_compilation/fail10968.d(46): Error: `pure` function `fail10968.bar` cannot call impure function `fail10968.SA.__postblit`
+fail_compilation/fail10968.d(46): Error: `@safe` function `fail10968.bar` cannot call `@system` function `fail10968.SA.__postblit`
+fail_compilation/fail10968.d(29): `fail10968.SA.__postblit` is declared here
+fail_compilation/fail10968.d(47): Error: `pure` function `fail10968.bar` cannot call impure function `fail10968.SA.__postblit`
+fail_compilation/fail10968.d(47): Error: `@safe` function `fail10968.bar` cannot call `@system` function `fail10968.SA.__postblit`
+fail_compilation/fail10968.d(29): `fail10968.SA.__postblit` is declared here
+fail_compilation/fail10968.d(47): Error: `pure` function `fail10968.bar` cannot call impure function `core.internal.array.construction._d_arraysetctor!(SA[], SA)._d_arraysetctor`
+fail_compilation/fail10968.d(48): Error: `pure` function `fail10968.bar` cannot call impure function `fail10968.SA.__postblit`
+fail_compilation/fail10968.d(48): Error: `@safe` function `fail10968.bar` cannot call `@system` function `fail10968.SA.__postblit`
+fail_compilation/fail10968.d(29): `fail10968.SA.__postblit` is declared here
+fail_compilation/fail10968.d(48): Error: `pure` function `fail10968.bar` cannot call impure function `core.internal.array.construction._d_arrayctor!(SA[], SA)._d_arrayctor`
---
*/
@@ -43,12 +51,12 @@ void bar() pure @safe
/*
TEST_OUTPUT:
---
-fail_compilation/fail10968.d(66): Error: struct fail10968.SD is not copyable because it is annotated with `@disable`
-fail_compilation/fail10968.d(67): Error: struct fail10968.SD is not copyable because it is annotated with `@disable`
-fail_compilation/fail10968.d(68): Error: struct fail10968.SD is not copyable because it is annotated with `@disable`
-fail_compilation/fail10968.d(71): Error: struct fail10968.SD is not copyable because it is annotated with `@disable`
-fail_compilation/fail10968.d(72): Error: struct fail10968.SD is not copyable because it is annotated with `@disable`
-fail_compilation/fail10968.d(73): Error: struct fail10968.SD is not copyable because it is annotated with `@disable`
+fail_compilation/fail10968.d(74): Error: struct `fail10968.SD` is not copyable because it has a disabled postblit
+fail_compilation/fail10968.d(75): Error: struct `fail10968.SD` is not copyable because it has a disabled postblit
+fail_compilation/fail10968.d(76): Error: struct `fail10968.SD` is not copyable because it has a disabled postblit
+fail_compilation/fail10968.d(79): Error: struct `fail10968.SD` is not copyable because it has a disabled postblit
+fail_compilation/fail10968.d(80): Error: struct `fail10968.SD` is not copyable because it has a disabled postblit
+fail_compilation/fail10968.d(81): Error: struct `fail10968.SD` is not copyable because it has a disabled postblit
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10980.d b/gcc/testsuite/gdc.test/fail_compilation/fail10980.d
index eb50de3..4869d27 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10980.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10980.d
@@ -1,14 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10980.d(22): Error: variable fail10980.s1b of type struct immutable(S1) uses this(this), which is not allowed in static initialization
-fail_compilation/fail10980.d(28): Error: variable fail10980.s1d of type struct immutable(S1) uses this(this), which is not allowed in static initialization
-fail_compilation/fail10980.d(27): Error: static variable s1x cannot be read at compile time
-fail_compilation/fail10980.d(28): called from here: bar1()
-fail_compilation/fail10980.d(38): Error: variable fail10980.s2b of type struct immutable(S2) uses this(this), which is not allowed in static initialization
-fail_compilation/fail10980.d(44): Error: variable fail10980.s2d of type struct immutable(S2) uses this(this), which is not allowed in static initialization
-fail_compilation/fail10980.d(43): Error: static variable s2x cannot be read at compile time
-fail_compilation/fail10980.d(44): called from here: bar2()
+fail_compilation/fail10980.d(22): Error: variable `fail10980.s1b` of type struct `immutable(S1)` uses `this(this)`, which is not allowed in static initialization
+fail_compilation/fail10980.d(28): Error: variable `fail10980.s1d` of type struct `immutable(S1)` uses `this(this)`, which is not allowed in static initialization
+fail_compilation/fail10980.d(27): Error: static variable `s1x` cannot be read at compile time
+fail_compilation/fail10980.d(28): called from here: `bar1()`
+fail_compilation/fail10980.d(38): Error: variable `fail10980.s2b` of type struct `immutable(S2)` uses `this(this)`, which is not allowed in static initialization
+fail_compilation/fail10980.d(44): Error: variable `fail10980.s2d` of type struct `immutable(S2)` uses `this(this)`, which is not allowed in static initialization
+fail_compilation/fail10980.d(43): Error: static variable `s2x` cannot be read at compile time
+fail_compilation/fail10980.d(44): called from here: `bar2()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11.d b/gcc/testsuite/gdc.test/fail_compilation/fail11.d
index 524e615..9a5a815 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail11.d(12): Error: `type` has no effect in expression `int*`
+fail_compilation/fail11.d(12): Error: `int*` has no effect
---
*/
-// http://forum.dlang.org/thread/c738o9$1p7i$1@digitaldaemon.com
+// https://forum.dlang.org/thread/c738o9$1p7i$1@digitaldaemon.com
void main()
{
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail110.d b/gcc/testsuite/gdc.test/fail_compilation/fail110.d
index 4703401..a13922b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail110.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail110.d
@@ -1,14 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail110.d(16): Error: variable i is shadowing variable fail110.main.i
-fail_compilation/fail110.d(17): Error: variable i is shadowing variable fail110.main.i
-fail_compilation/fail110.d(18): Error: variable i is shadowing variable fail110.main.i
+fail_compilation/fail110.d(16): Error: variable `i` is shadowing variable `fail110.main.i`
+fail_compilation/fail110.d(17): Error: variable `i` is shadowing variable `fail110.main.i`
+fail_compilation/fail110.d(18): Error: variable `i` is shadowing variable `fail110.main.i`
---
*/
-// Issue 297 - Shadowing declarations allowed in foreach type lists
-
+// https://issues.dlang.org/show_bug.cgi?id=297
+// Shadowing declarations allowed in foreach type lists
void main()
{
int i;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11038.d b/gcc/testsuite/gdc.test/fail_compilation/fail11038.d
index 8f39ccc..331c3fc 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11038.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11038.d
@@ -2,16 +2,16 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail11038.d(16): Error: `writeln` is not defined, perhaps `import std.stdio;` is needed?
+fail_compilation/fail11038.d(16): Error: `printf` is not defined, perhaps `import core.stdc.stdio;` is needed?
---
*/
static
{
- import std.stdio;
+ import core.stdc.stdio;
}
void main()
{
- writeln("foo"); // compiles
+ printf("foo"); // compiles
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail111.d b/gcc/testsuite/gdc.test/fail_compilation/fail111.d
index 3a5fed4..b5d1669 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail111.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail111.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail111.d(12): Error: can't have array of int(int)
+fail_compilation/fail111.d(12): Error: cannot have array of `int(int)`
---
*/
-// Issue 289 - Compiler allows (and crashes on) dynamic arrays of typedefs of "immediate"-function types
-
+// https://issues.dlang.org/show_bug.cgi?id=289
+// Compiler allows (and crashes on) dynamic arrays of typedefs of "immediate"-function types
alias int ft(int);
ft[] x; // is allowed
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11125.d b/gcc/testsuite/gdc.test/fail_compilation/fail11125.d
index b42cb88..1a682cd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11125.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11125.d
@@ -1,8 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail11125.d(20): Error: template instance fail11125.filter!(function (int a) => a + 1) does not match template declaration filter(alias predfun) if (is(ReturnType!predfun == bool))
-fail_compilation/fail11125.d(21): Error: template instance fail11125.filter!(function (int a) => a + 1) does not match template declaration filter(alias predfun) if (is(ReturnType!predfun == bool))
+fail_compilation/fail11125.d(26): Error: template instance `fail11125.filter!(function (int a) pure nothrow @nogc @safe => a + 1)` does not match template declaration `filter(alias predfun)`
+ with `predfun = __lambda1`
+ must satisfy the following constraint:
+` is(ReturnType!predfun == bool)`
+fail_compilation/fail11125.d(27): Error: template instance `fail11125.filter!(function (int a) pure nothrow @nogc @safe => a + 1)` does not match template declaration `filter(alias predfun)`
+ with `predfun = __lambda2`
+ must satisfy the following constraint:
+` is(ReturnType!predfun == bool)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11151.d b/gcc/testsuite/gdc.test/fail_compilation/fail11151.d
index 6184317..e5c2622 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11151.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11151.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail11151.d(30): Error: overlapping initialization for field a and y
+fail_compilation/fail11151.d(30): Error: overlapping initialization for field `a` and `y`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11163.d b/gcc/testsuite/gdc.test/fail_compilation/fail11163.d
index 3966c05..d886740 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11163.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11163.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/fail11163.d(12): Error: cannot implicitly convert expression `foo()` of type `int[]` to `immutable(int[])`
-fail_compilation/fail11163.d(13): while evaluating pragma(msg, a)
+fail_compilation/fail11163.d(13): while evaluating `pragma(msg, a)`
---
*/
int[] foo() {
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail113.d b/gcc/testsuite/gdc.test/fail_compilation/fail113.d
index 8271b02..43ee2d8 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail113.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail113.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail113.d(10): Error: forward reference to 'test'
+fail_compilation/fail113.d(10): Error: forward reference to `test`
---
*/
-// Issue 370 - Compiler stack overflow on recursive typeof in function declaration.
-
+// https://issues.dlang.org/show_bug.cgi?id=370
+// Compiler stack overflow on recursive typeof in function declaration.
void test(typeof(test) p) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11355.d b/gcc/testsuite/gdc.test/fail_compilation/fail11355.d
index c41a4c4..50897ad 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11355.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11355.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail11355.d(28): Error: struct fail11355.A is not copyable because it is annotated with `@disable`
+fail_compilation/fail11355.d(28): Error: struct `fail11355.A` is not copyable because it has a disabled postblit
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11375.d b/gcc/testsuite/gdc.test/fail_compilation/fail11375.d
index ba27a08..4f221bf 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11375.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11375.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail11375.d(17): Error: constructor `fail11375.D!().D.this` is not nothrow
-fail_compilation/fail11375.d(15): Error: nothrow function `D main` may throw
+fail_compilation/fail11375.d(17): Error: constructor `fail11375.D!().D.this` is not `nothrow`
+fail_compilation/fail11375.d(15): Error: `nothrow` function `D main` may throw
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail114.d b/gcc/testsuite/gdc.test/fail_compilation/fail114.d
index 5bb9cec..65eeef7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail114.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail114.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail114.d(12): Error: forward reference to 'funcA'
+fail_compilation/fail114.d(12): Error: forward reference to `funcA`
---
*/
-// Issue 371 - ICE on mutual recursive typeof in function declarations
-
+// https://issues.dlang.org/show_bug.cgi?id=371
+// ICE on mutual recursive typeof in function declarations
void funcA(typeof(&funcB) p) {}
void funcB(typeof(&funcA) p) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11445.d b/gcc/testsuite/gdc.test/fail_compilation/fail11445.d
index ed3f226..3295b24 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11445.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11445.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail11445.d(11): Error: incompatible types for ((a) + (b)): both operands are of type 'double[string]'
+fail_compilation/fail11445.d(11): Error: incompatible types for `(a) + (b)`: both operands are of type `double[string]`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11453b.d b/gcc/testsuite/gdc.test/fail_compilation/fail11453b.d
index c7bdce5..c9d7b96 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11453b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11453b.d
@@ -3,7 +3,7 @@
/*
TEST_OUTPUT
---
-fail_compilation/extra-files/foo11453.d(1): Error: module foo11453 from file fail_compilation/extra-files/foo11453.d conflicts with package name foo11453
+fail_compilation/extra-files/foo11453.d(1): Error: module `foo11453` from file fail_compilation/extra-files/foo11453.d conflicts with package name foo11453
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11503c.d b/gcc/testsuite/gdc.test/fail_compilation/fail11503c.d
index ad3963f..88565d3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11503c.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11503c.d
@@ -7,7 +7,7 @@ fail_compilation/fail11503c.d(19): Error: cannot implicitly convert expression `
struct Data
{
char[256] buffer;
- @property const(char)[] filename() const pure nothrow
+ @property const(char)[] filename() const pure nothrow return
{
return buffer[];
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11503d.d b/gcc/testsuite/gdc.test/fail_compilation/fail11503d.d
index d1605b2..30efa8d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11503d.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11503d.d
@@ -10,7 +10,7 @@ struct Data2
char buffer;
}
-@property const(char)[] filename(const ref Data2 d) pure nothrow
+@property const(char)[] filename(const return ref Data2 d) pure nothrow
{
return (&d.buffer)[0 .. 1];
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11510.d b/gcc/testsuite/gdc.test/fail_compilation/fail11510.d
index 13913a0..de08b55 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11510.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11510.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail11510.d(25): Error: reinterpretation through overlapped field y is not allowed in CTFE
-fail_compilation/fail11510.d(29): called from here: test11510a()
-fail_compilation/fail11510.d(36): Error: reinterpretation through overlapped field y is not allowed in CTFE
-fail_compilation/fail11510.d(40): called from here: test11510b()
+fail_compilation/fail11510.d(25): Error: reinterpretation through overlapped field `y` is not allowed in CTFE
+fail_compilation/fail11510.d(29): called from here: `test11510a()`
+fail_compilation/fail11510.d(36): Error: reinterpretation through overlapped field `y` is not allowed in CTFE
+fail_compilation/fail11510.d(40): called from here: `test11510b()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11532.d b/gcc/testsuite/gdc.test/fail_compilation/fail11532.d
index 7f4c770..144dec7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11532.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11532.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail11532.d(17): Error: cannot pass static arrays to extern(C) vararg functions
-fail_compilation/fail11532.d(18): Error: cannot pass dynamic arrays to extern(C) vararg functions
-fail_compilation/fail11532.d(19): Error: cannot pass static arrays to extern(C++) vararg functions
-fail_compilation/fail11532.d(20): Error: cannot pass dynamic arrays to extern(C++) vararg functions
+fail_compilation/fail11532.d(17): Error: cannot pass static arrays to `extern(C)` vararg functions
+fail_compilation/fail11532.d(18): Error: cannot pass dynamic arrays to `extern(C)` vararg functions
+fail_compilation/fail11532.d(19): Error: cannot pass static arrays to `extern(C++)` vararg functions
+fail_compilation/fail11532.d(20): Error: cannot pass dynamic arrays to `extern(C++)` vararg functions
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11542.d b/gcc/testsuite/gdc.test/fail_compilation/fail11542.d
index 22d29ac..0198f64 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11542.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11542.d
@@ -1,13 +1,12 @@
// REQUIRED_ARGS: -o-
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/fail11542.d(16): Error: `object.Exception` is thrown but not caught
-fail_compilation/fail11542.d(13): Error: nothrow function `fail11542.test_success1` may throw
-fail_compilation/fail11542.d(26): Error: `object.Exception` is thrown but not caught
-fail_compilation/fail11542.d(23): Error: nothrow function `fail11542.test_success3` may throw
+fail_compilation/fail11542.d(15): Error: `object.Exception` is thrown but not caught
+fail_compilation/fail11542.d(12): Error: `nothrow` function `fail11542.test_success1` may throw
+fail_compilation/fail11542.d(25): Error: `object.Exception` is thrown but not caught
+fail_compilation/fail11542.d(22): Error: `nothrow` function `fail11542.test_success3` may throw
---
*/
void test_success1() nothrow
@@ -29,8 +28,8 @@ void test_success3() nothrow
/*
TEST_OUTPUT:
---
-fail_compilation/fail11542.d(39): Error: `object.Exception` is thrown but not caught
-fail_compilation/fail11542.d(36): Error: nothrow function `fail11542.test_failure1` may throw
+fail_compilation/fail11542.d(38): Error: `object.Exception` is thrown but not caught
+fail_compilation/fail11542.d(35): Error: `nothrow` function `fail11542.test_failure1` may throw
---
*/
void test_failure1() nothrow
@@ -52,8 +51,8 @@ void est_failure3() nothrow
/*
TEST_OUTPUT:
---
-fail_compilation/fail11542.d(62): Error: `object.Exception` is thrown but not caught
-fail_compilation/fail11542.d(59): Error: nothrow function `fail11542.test_exit1` may throw
+fail_compilation/fail11542.d(61): Error: `object.Exception` is thrown but not caught
+fail_compilation/fail11542.d(58): Error: `nothrow` function `fail11542.test_exit1` may throw
---
*/
void test_exit1() nothrow
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11545.d b/gcc/testsuite/gdc.test/fail_compilation/fail11545.d
index 514cb87..a576817 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11545.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11545.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail11545.d(14): Error: need 'this' for 'x' of type 'int'
-fail_compilation/fail11545.d(18): Error: need 'this' for 'x' of type 'int'
+fail_compilation/fail11545.d(14): Error: need `this` for `x` of type `int`
+fail_compilation/fail11545.d(18): Error: need `this` for `x` of type `int`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11552.d b/gcc/testsuite/gdc.test/fail_compilation/fail11552.d
index 5116522..2520225 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11552.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11552.d
@@ -1,9 +1,8 @@
/*
REQUIRED_ARGS: -o-
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/fail11552.d(12): Error: label `label` is undefined
+fail_compilation/fail11552.d(11): Error: function `D main` label `label` is undefined
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11562.d b/gcc/testsuite/gdc.test/fail_compilation/fail11562.d
index 0377456..dcae1f5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11562.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11562.d
@@ -1,12 +1,11 @@
/*
REQUIRED_ARGS: -o-
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/fail11562.d(16): Error: cannot goto in or out of `finally` block
-fail_compilation/fail11562.d(37): Error: cannot goto in or out of `finally` block
-fail_compilation/fail11562.d(49): Error: cannot goto in or out of `finally` block
-fail_compilation/fail11562.d(64): Error: cannot goto in or out of `finally` block
+fail_compilation/fail11562.d(15): Error: cannot `goto` in or out of `finally` block
+fail_compilation/fail11562.d(36): Error: cannot `goto` in or out of `finally` block
+fail_compilation/fail11562.d(48): Error: cannot `goto` in or out of `finally` block
+fail_compilation/fail11562.d(63): Error: cannot `goto` in or out of `finally` block
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11591b.d b/gcc/testsuite/gdc.test/fail_compilation/fail11591b.d
index 42e89c9..ef4fe16 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11591b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11591b.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail11591b.d(16): Error: AA key type S11591 does not have 'bool opEquals(ref const S11591) const'
+fail_compilation/fail11591b.d(16): Error: AA key type `S11591` does not have `bool opEquals(ref const S11591) const`
---
*/
@@ -19,8 +19,8 @@ void test11591()
/*
TEST_OUTPUT:
---
-fail_compilation/fail11591b.d(30): Error: AA key type S12307a does not have 'bool opEquals(ref const S12307a) const'
-fail_compilation/fail11591b.d(31): Error: AA key type S12307b does not have 'bool opEquals(ref const S12307b) const'
+fail_compilation/fail11591b.d(30): Error: AA key type `S12307a` does not have `bool opEquals(ref const S12307a) const`
+fail_compilation/fail11591b.d(31): Error: AA key type `S12307b` does not have `bool opEquals(ref const S12307b) const`
---
*/
struct S12307a { bool opEquals(T : typeof(this))(T) { return false; } }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail116.d b/gcc/testsuite/gdc.test/fail_compilation/fail116.d
index 87e451b..64f225d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail116.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail116.d
@@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail116.d(11): Error: circular typeof definition
-fail_compilation/fail116.d(16): Error: template instance square!1.2 does not match template declaration square(_error_ x)
+fail_compilation/fail116.d(11): Error: undefined identifier `x`
+fail_compilation/fail116.d(16): Error: template instance `square!1.2` does not match template declaration `square(_error_ x)`
---
*/
-// Issue 405 - typeof in TemplateParameterList causes compiletime segmentfault
-
+// https://issues.dlang.org/show_bug.cgi?id=405
+// typeof in TemplateParameterList causes compiletime segmentfault
template square(typeof(x) x)
{
const square = x * x;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail117.d b/gcc/testsuite/gdc.test/fail_compilation/fail117.d
index 9279d54..b0e1b12 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail117.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail117.d
@@ -8,8 +8,8 @@ fail_compilation/fail117.d(38): Error: expression `foo.mixin MGettor!(b) getb;
---
*/
-// Issue 420 - mixin make dmd break
-
+// https://issues.dlang.org/show_bug.cgi?id=420
+// mixin make dmd break
//import std.stdio;
template MGettor(alias Fld)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11714.d b/gcc/testsuite/gdc.test/fail_compilation/fail11714.d
new file mode 100644
index 0000000..abc4708
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11714.d
@@ -0,0 +1,21 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail11714.d(14): Error: variable `fail11714.c` is a thread-local class and cannot have a static initializer. Use `static this()` to initialize instead.
+fail_compilation/fail11714.d(21): Error: variable `fail11714.s` is a thread-local pointer to struct and cannot have a static initializer. Use `static this()` to initialize instead.
+---
+*/
+
+class C11714
+{
+ int data;
+};
+
+C11714 c = new C11714; // mutable class reference.
+
+struct S11714
+{
+ int data;
+};
+
+S11714* s = new S11714; // mutable pointer to struct.
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11717.d b/gcc/testsuite/gdc.test/fail_compilation/fail11717.d
deleted file mode 100644
index c6d505c..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11717.d
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail11717.d(13): Error: cannot interpret array literal expression [1, 2, 3, 4] + [1, 2, 3, 4] at compile time
----
-*/
-
-// https://issues.dlang.org/show_bug.cgi?id=11717
-
-enum int[4] A = [1,2,3,4];
-enum int[4] B = [1,2,3,4];
-// Internal Compiler Error: non-constant value [1, 2, 3, 4]
-enum int[4] C = A[] + B[];
-
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11720.d b/gcc/testsuite/gdc.test/fail_compilation/fail11720.d
deleted file mode 100644
index 8ad1d86..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11720.d
+++ /dev/null
@@ -1,33 +0,0 @@
-// REQUIRED_ARGS: -o-
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail11720.d(23): Error: declaration fail11720.foo!().foo.temp is already defined in another scope in foo
-fail_compilation/fail11720.d(13): Error: template instance fail11720.foo!() error instantiating
-fail_compilation/fail11720.d(31): Error: declaration fail11720.bar.temp is already defined in another scope in bar
----
-*/
-
-void main()
-{
- foo();
- bar();
-}
-
-alias TypeTuple(T...) = T;
-
-void foo()()
-{
- foreach (T; TypeTuple!(int, double))
- {
- static temp = T.stringof;
- }
-}
-
-void bar()
-{
- foreach (T; TypeTuple!(int, double))
- {
- static temp = T.stringof;
- }
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11748.d b/gcc/testsuite/gdc.test/fail_compilation/fail11748.d
index 95b78fa..7b6a6c8 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail11748.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail11748.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail11748.d(12): Error: expression my_function(0) is void and has no value
+fail_compilation/fail11748.d(12): Error: expression `my_function(0)` is `void` and has no value
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail118.d b/gcc/testsuite/gdc.test/fail_compilation/fail118.d
index e17b954..263570a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail118.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail118.d
@@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail118.d(26): Error: invalid foreach aggregate `Iter`, define opApply(), range primitives, or use .tupleof
-fail_compilation/fail118.d(27): Error: invalid foreach aggregate `Iter`, define opApply(), range primitives, or use .tupleof
+fail_compilation/fail118.d(26): Error: invalid `foreach` aggregate `Iter`, define `opApply()`, range primitives, or use `.tupleof`
+fail_compilation/fail118.d(27): Error: invalid `foreach` aggregate `Iter`, define `opApply()`, range primitives, or use `.tupleof`
---
*/
-// Issue 441 - Crash on foreach of mixed-in aggregate.
-
+// https://issues.dlang.org/show_bug.cgi?id=441
+// Crash on foreach of mixed-in aggregate.
template opHackedApply()
{
struct Iter
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail120.d b/gcc/testsuite/gdc.test/fail_compilation/fail120.d
index ae0f5b1..c9d67a4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail120.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail120.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail120.d(12): Error: need 'this' for 'nodes' of type 'int[2]'
-fail_compilation/fail120.d(13): Error: need 'this' for 'nodes' of type 'int[2]'
+fail_compilation/fail120.d(12): Error: need `this` for `nodes` of type `int[2]`
+fail_compilation/fail120.d(13): Error: need `this` for `nodes` of type `int[2]`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail122.d b/gcc/testsuite/gdc.test/fail_compilation/fail122.d
index f4ba301..da355d5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail122.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail122.d
@@ -5,8 +5,8 @@ fail_compilation/fail122.d(12): Error: undefined identifier `y`
---
*/
-// Issue 228 - Crash on inferring function literal return type after prior errors
-
+// https://issues.dlang.org/show_bug.cgi?id=228
+// Crash on inferring function literal return type after prior errors
void main()
{
y = 2;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12236.d b/gcc/testsuite/gdc.test/fail_compilation/fail12236.d
index ea95066..738864c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12236.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12236.d
@@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail12236.d(16): Error: forward reference to inferred return type of function 'f1'
-fail_compilation/fail12236.d(16): while evaluating pragma(msg, f1.mangleof)
-fail_compilation/fail12236.d(21): Error: forward reference to inferred return type of function 'f2'
-fail_compilation/fail12236.d(21): while evaluating pragma(msg, f2(T)(T).mangleof)
-fail_compilation/fail12236.d(27): Error: template instance fail12236.f2!int error instantiating
-fail_compilation/fail12236.d(31): Error: forward reference to inferred return type of function '__lambda1'
-fail_compilation/fail12236.d(31): while evaluating pragma(msg, __lambda1.mangleof)
+fail_compilation/fail12236.d(16): Error: forward reference to inferred return type of function `f1`
+fail_compilation/fail12236.d(16): while evaluating `pragma(msg, f1.mangleof)`
+fail_compilation/fail12236.d(21): Error: forward reference to inferred return type of function `f2`
+fail_compilation/fail12236.d(21): while evaluating `pragma(msg, f2(T)(T).mangleof)`
+fail_compilation/fail12236.d(27): Error: template instance `fail12236.f2!int` error instantiating
+fail_compilation/fail12236.d(31): Error: forward reference to inferred return type of function `__lambda1`
+fail_compilation/fail12236.d(31): while evaluating `pragma(msg, __lambda1.mangleof)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12255.d b/gcc/testsuite/gdc.test/fail_compilation/fail12255.d
index 4531e86..945212b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12255.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12255.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail12255.d(29): Error: AA key type SC1 does not have 'bool opEquals(ref const SC1) const'
-fail_compilation/fail12255.d(30): Error: AA key type SC2 does not support const equality
-fail_compilation/fail12255.d(35): Error: AA key type SD1 should have 'size_t toHash() const nothrow @safe' if opEquals defined
-fail_compilation/fail12255.d(36): Error: AA key type SD2 supports const equality but doesn't support const hashing
-fail_compilation/fail12255.d(40): Error: AA key type SE1 should have 'size_t toHash() const nothrow @safe' if opEquals defined
-fail_compilation/fail12255.d(41): Error: AA key type SE2 supports const equality but doesn't support const hashing
+fail_compilation/fail12255.d(29): Error: AA key type `SC1` does not have `bool opEquals(ref const SC1) const`
+fail_compilation/fail12255.d(30): Error: AA key type `SC2` does not support const equality
+fail_compilation/fail12255.d(35): Error: AA key type `SD1` should have `extern (D) size_t toHash() const nothrow @safe` if `opEquals` defined
+fail_compilation/fail12255.d(36): Error: AA key type `SD2` supports const equality but doesn't support const hashing
+fail_compilation/fail12255.d(40): Error: AA key type `SE1` should have `extern (D) size_t toHash() const nothrow @safe` if `opEquals` defined
+fail_compilation/fail12255.d(41): Error: AA key type `SE2` supports const equality but doesn't support const hashing
---
*/
@@ -91,12 +91,12 @@ struct SE2
/*
TEST_OUTPUT:
---
-fail_compilation/fail12255.d(108): Error: bottom of AA key type SC1 does not have 'bool opEquals(ref const SC1) const'
-fail_compilation/fail12255.d(109): Error: bottom of AA key type SC2 does not support const equality
-fail_compilation/fail12255.d(110): Error: bottom of AA key type SD1 should have 'size_t toHash() const nothrow @safe' if opEquals defined
-fail_compilation/fail12255.d(111): Error: bottom of AA key type SD2 supports const equality but doesn't support const hashing
-fail_compilation/fail12255.d(112): Error: bottom of AA key type SE1 should have 'size_t toHash() const nothrow @safe' if opEquals defined
-fail_compilation/fail12255.d(113): Error: bottom of AA key type SE2 supports const equality but doesn't support const hashing
+fail_compilation/fail12255.d(108): Error: bottom of AA key type `SC1` does not have `bool opEquals(ref const SC1) const`
+fail_compilation/fail12255.d(109): Error: bottom of AA key type `SC2` does not support const equality
+fail_compilation/fail12255.d(110): Error: bottom of AA key type `SD1` should have `extern (D) size_t toHash() const nothrow @safe` if `opEquals` defined
+fail_compilation/fail12255.d(111): Error: bottom of AA key type `SD2` supports const equality but doesn't support const hashing
+fail_compilation/fail12255.d(112): Error: bottom of AA key type `SE1` should have `extern (D) size_t toHash() const nothrow @safe` if `opEquals` defined
+fail_compilation/fail12255.d(113): Error: bottom of AA key type `SE2` supports const equality but doesn't support const hashing
---
*/
void testSArray()
@@ -116,12 +116,12 @@ void testSArray()
/*
TEST_OUTPUT:
---
-fail_compilation/fail12255.d(133): Error: bottom of AA key type SC1 does not have 'bool opEquals(ref const SC1) const'
-fail_compilation/fail12255.d(134): Error: bottom of AA key type SC2 does not support const equality
-fail_compilation/fail12255.d(135): Error: bottom of AA key type SD1 should have 'size_t toHash() const nothrow @safe' if opEquals defined
-fail_compilation/fail12255.d(136): Error: bottom of AA key type SD2 supports const equality but doesn't support const hashing
-fail_compilation/fail12255.d(137): Error: bottom of AA key type SE1 should have 'size_t toHash() const nothrow @safe' if opEquals defined
-fail_compilation/fail12255.d(138): Error: bottom of AA key type SE2 supports const equality but doesn't support const hashing
+fail_compilation/fail12255.d(133): Error: bottom of AA key type `SC1` does not have `bool opEquals(ref const SC1) const`
+fail_compilation/fail12255.d(134): Error: bottom of AA key type `SC2` does not support const equality
+fail_compilation/fail12255.d(135): Error: bottom of AA key type `SD1` should have `extern (D) size_t toHash() const nothrow @safe` if `opEquals` defined
+fail_compilation/fail12255.d(136): Error: bottom of AA key type `SD2` supports const equality but doesn't support const hashing
+fail_compilation/fail12255.d(137): Error: bottom of AA key type `SE1` should have `extern (D) size_t toHash() const nothrow @safe` if `opEquals` defined
+fail_compilation/fail12255.d(138): Error: bottom of AA key type `SE2` supports const equality but doesn't support const hashing
---
*/
void testDArray()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail123.d b/gcc/testsuite/gdc.test/fail_compilation/fail123.d
index fd1aef0..1566b91 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail123.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail123.d
@@ -2,12 +2,12 @@
TEST_OUTPUT:
---
fail_compilation/fail123.d(11): Error: undefined identifier `type`
-fail_compilation/fail123.d(17): Error: enum fail123.foo2 base type must not be void
+fail_compilation/fail123.d(17): Error: enum `fail123.foo2` base type must not be `void`
---
*/
-// Issue 355 - ICE from enum : nonexistent type
-
+// https://issues.dlang.org/show_bug.cgi?id=355
+// ICE from enum : nonexistent type
enum foo : type
{
blah1,
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12378.d b/gcc/testsuite/gdc.test/fail_compilation/fail12378.d
index 6f78730..77678eb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12378.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12378.d
@@ -3,11 +3,11 @@ TEST_OUTPUT:
---
fail_compilation/fail12378.d(18): Error: undefined identifier `ANYTHING`
fail_compilation/fail12378.d(18): Error: undefined identifier `GOES`
-fail_compilation/fail12378.d(91): instantiated from here: MapResultS!((x0) => ANYTHING - GOES, Result)
-fail_compilation/fail12378.d(17): instantiated from here: mapS!(Result)
-fail_compilation/fail12378.d(100): instantiated from here: __lambda1!int
-fail_compilation/fail12378.d(91): instantiated from here: MapResultS!((y0) => iota(2).mapS!((x0) => ANYTHING - GOES), Result)
-fail_compilation/fail12378.d(16): instantiated from here: mapS!(Result)
+fail_compilation/fail12378.d(91): instantiated from here: `MapResultS!((x0) => ANYTHING - GOES, Result)`
+fail_compilation/fail12378.d(17): instantiated from here: `mapS!(Result)`
+fail_compilation/fail12378.d(100): instantiated from here: `__lambda1!int`
+fail_compilation/fail12378.d(91): instantiated from here: `MapResultS!((y0) => iota(2).mapS!((x0) => ANYTHING - GOES), Result)`
+fail_compilation/fail12378.d(16): instantiated from here: `mapS!(Result)`
---
*/
void testS()
@@ -25,11 +25,11 @@ TEST_OUTPUT:
---
fail_compilation/fail12378.d(40): Error: undefined identifier `ANYTHING`
fail_compilation/fail12378.d(40): Error: undefined identifier `GOES`
-fail_compilation/fail12378.d(112): instantiated from here: MapResultC!((x0) => ANYTHING - GOES, Result)
-fail_compilation/fail12378.d(39): instantiated from here: mapC!(Result)
-fail_compilation/fail12378.d(123): instantiated from here: __lambda1!int
-fail_compilation/fail12378.d(112): instantiated from here: MapResultC!((y0) => iota(2).mapC!((x0) => ANYTHING - GOES), Result)
-fail_compilation/fail12378.d(38): instantiated from here: mapC!(Result)
+fail_compilation/fail12378.d(112): instantiated from here: `MapResultC!((x0) => ANYTHING - GOES, Result)`
+fail_compilation/fail12378.d(39): instantiated from here: `mapC!(Result)`
+fail_compilation/fail12378.d(123): instantiated from here: `__lambda1!int`
+fail_compilation/fail12378.d(112): instantiated from here: `MapResultC!((y0) => iota(2).mapC!((x0) => ANYTHING - GOES), Result)`
+fail_compilation/fail12378.d(38): instantiated from here: `mapC!(Result)`
---
*/
void testC()
@@ -47,11 +47,11 @@ TEST_OUTPUT:
---
fail_compilation/fail12378.d(64): Error: undefined identifier `ANYTHING`
fail_compilation/fail12378.d(64): Error: undefined identifier `GOES`
-fail_compilation/fail12378.d(135): instantiated from here: MapResultI!((x0) => ANYTHING - GOES, Result)
-fail_compilation/fail12378.d(63): instantiated from here: mapI!(Result)
-fail_compilation/fail12378.d(143): instantiated from here: __lambda1!int
-fail_compilation/fail12378.d(135): instantiated from here: MapResultI!((y0) => iota(2).mapI!((x0) => ANYTHING - GOES), Result)
-fail_compilation/fail12378.d(62): instantiated from here: mapI!(Result)
+fail_compilation/fail12378.d(135): instantiated from here: `MapResultI!((x0) => ANYTHING - GOES, Result)`
+fail_compilation/fail12378.d(63): instantiated from here: `mapI!(Result)`
+fail_compilation/fail12378.d(143): instantiated from here: `__lambda1!int`
+fail_compilation/fail12378.d(135): instantiated from here: `MapResultI!((y0) => iota(2).mapI!((x0) => ANYTHING - GOES), Result)`
+fail_compilation/fail12378.d(62): instantiated from here: `mapI!(Result)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12390.d b/gcc/testsuite/gdc.test/fail_compilation/fail12390.d
index cb1eb8a..dd28163 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12390.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12390.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail12390.d(14): Error: `==` has no effect in expression `fun().i == 4`
+fail_compilation/fail12390.d(14): Error: `fun().i == 4` has no effect
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail124.d b/gcc/testsuite/gdc.test/fail_compilation/fail124.d
index 62b5894..7eeb29f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail124.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail124.d
@@ -1,7 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail124.d(15): Error: class fail124.CC inherits from duplicate interface C
+fail_compilation/fail124.d(17): Error: class `fail124.CC` inherits from duplicate interface `C`
+fail_compilation/fail124.d(31): Error: class `fail124.D` inherits from duplicate interface `T`
+fail_compilation/fail124.d(31): Error: class `fail124.D` inherits from duplicate interface `T`
---
*/
@@ -22,3 +24,8 @@ void main()
CC cc = new CC();
cc.f();
}
+
+// https://issues.dlang.org/show_bug.cgi?id=20830
+interface T { }
+
+class D : T, T, T { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12436.d b/gcc/testsuite/gdc.test/fail_compilation/fail12436.d
index 605ab05..5bdf0d5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12436.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12436.d
@@ -21,8 +21,8 @@ TupleType test2();
/*
TEST_OUTPUT:
---
-fail_compilation/fail12436.d(28): Error: functions cannot return opaque type Opaque by value
-fail_compilation/fail12436.d(29): Error: functions cannot return opaque type Opaque[1] by value
+fail_compilation/fail12436.d(28): Error: functions cannot return opaque type `Opaque` by value
+fail_compilation/fail12436.d(29): Error: functions cannot return opaque type `Opaque[1]` by value
---
*/
Opaque ret12436a(); // error
@@ -40,7 +40,7 @@ ref Opaque[1] ret12436g(); // no error
/*
TEST_OUTPUT:
---
-fail_compilation/fail12436.d(46): Error: cannot have parameter of function type void()
+fail_compilation/fail12436.d(46): Error: cannot have parameter of function type `void()`
---
*/
void test3(FuncType) {}
@@ -48,8 +48,8 @@ void test3(FuncType) {}
/*
TEST_OUTPUT:
---
-fail_compilation/fail12436.d(55): Error: cannot have parameter of opaque type Opaque by value
-fail_compilation/fail12436.d(56): Error: cannot have parameter of opaque type Opaque[1] by value
+fail_compilation/fail12436.d(55): Error: cannot have parameter of opaque type `Opaque` by value
+fail_compilation/fail12436.d(56): Error: cannot have parameter of opaque type `Opaque[1]` by value
---
*/
void param12436a(Opaque); // error
@@ -66,9 +66,9 @@ void param12436i(out Opaque[1]); // no error
/*
TEST_OUTPUT:
---
-fail_compilation/fail12436.d(75): Error: cannot have parameter of opaque type A14906 by value
-fail_compilation/fail12436.d(76): Error: cannot have parameter of opaque type A14906[3] by value
-fail_compilation/fail12436.d(77): Error: cannot have parameter of opaque type A14906[3][3] by value
+fail_compilation/fail12436.d(75): Error: cannot have parameter of opaque type `A14906` by value
+fail_compilation/fail12436.d(76): Error: cannot have parameter of opaque type `A14906[3]` by value
+fail_compilation/fail12436.d(77): Error: cannot have parameter of opaque type `A14906[3][3]` by value
---
*/
enum A14906;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail125.d b/gcc/testsuite/gdc.test/fail_compilation/fail125.d
index 0e0f5ea..93d176d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail125.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail125.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail125.d(15): Error: array index [2] is outside array bounds [0 .. 2]
-fail_compilation/fail125.d(18): Error: template instance fail125.main.recMove!(1, a, b) error instantiating
-fail_compilation/fail125.d(25): instantiated from here: recMove!(0, a, b)
+fail_compilation/fail125.d(15): Error: array index `[2]` is outside array bounds `[0 .. 2]`
+fail_compilation/fail125.d(18): Error: template instance `fail125.main.recMove!(1, a, b)` error instantiating
+fail_compilation/fail125.d(25): instantiated from here: `recMove!(0, a, b)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail126.d b/gcc/testsuite/gdc.test/fail_compilation/fail126.d
index 280fde9..b851c50 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail126.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail126.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail126.d(8): Error: forward reference to 'test'
+fail_compilation/fail126.d(8): Error: forward reference to `test`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12622.d b/gcc/testsuite/gdc.test/fail_compilation/fail12622.d
index 04bb8d6..1a8b185 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12622.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12622.d
@@ -1,15 +1,16 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail12622.d(25): Error: pure function 'fail12622.foo' cannot call impure function pointer 'fp'
-fail_compilation/fail12622.d(25): Error: @nogc function 'fail12622.foo' cannot call non-@nogc function pointer 'fp'
-fail_compilation/fail12622.d(25): Error: @safe function 'fail12622.foo' cannot call @system function pointer 'fp'
-fail_compilation/fail12622.d(27): Error: pure function 'fail12622.foo' cannot call impure function pointer 'fp'
-fail_compilation/fail12622.d(27): Error: @nogc function 'fail12622.foo' cannot call non-@nogc function pointer 'fp'
-fail_compilation/fail12622.d(27): Error: @safe function 'fail12622.foo' cannot call @system function pointer 'fp'
-fail_compilation/fail12622.d(29): Error: pure function 'fail12622.foo' cannot call impure function 'fail12622.bar'
-fail_compilation/fail12622.d(29): Error: @safe function 'fail12622.foo' cannot call @system function 'fail12622.bar'
-fail_compilation/fail12622.d(29): Error: @nogc function 'fail12622.foo' cannot call non-@nogc function 'fail12622.bar'
+fail_compilation/fail12622.d(26): Error: `pure` function `fail12622.foo` cannot call impure function pointer `fp`
+fail_compilation/fail12622.d(26): Error: `@nogc` function `fail12622.foo` cannot call non-@nogc function pointer `fp`
+fail_compilation/fail12622.d(26): Error: `@safe` function `fail12622.foo` cannot call `@system` function pointer `fp`
+fail_compilation/fail12622.d(28): Error: `pure` function `fail12622.foo` cannot call impure function pointer `fp`
+fail_compilation/fail12622.d(28): Error: `@nogc` function `fail12622.foo` cannot call non-@nogc function pointer `fp`
+fail_compilation/fail12622.d(28): Error: `@safe` function `fail12622.foo` cannot call `@system` function pointer `fp`
+fail_compilation/fail12622.d(30): Error: `pure` function `fail12622.foo` cannot call impure function `fail12622.bar`
+fail_compilation/fail12622.d(30): Error: `@safe` function `fail12622.foo` cannot call `@system` function `fail12622.bar`
+fail_compilation/fail12622.d(20): `fail12622.bar` is declared here
+fail_compilation/fail12622.d(30): Error: `@nogc` function `fail12622.foo` cannot call non-@nogc function `fail12622.bar`
---
*/
// Note that, today nothrow violation errors are accidentally hidden.
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12636.d b/gcc/testsuite/gdc.test/fail_compilation/fail12636.d
index 9a243a5..42e7855 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12636.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12636.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail12636.d(13): Error: C++ class 'fail12636.C' cannot implement D interface 'fail12636.D'
+fail_compilation/fail12636.d(13): Error: C++ class `fail12636.C` cannot implement D interface `fail12636.D`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail127.d b/gcc/testsuite/gdc.test/fail_compilation/fail127.d
index 449dbc5..ad9ddd0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail127.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail127.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail127.d(9): Error: a struct is not a valid initializer for a char[][]
-fail_compilation/fail127.d(10): Error: a struct is not a valid initializer for a string[]
+fail_compilation/fail127.d(9): Error: a struct is not a valid initializer for a `char[][]`
+fail_compilation/fail127.d(10): Error: a struct is not a valid initializer for a `string[]`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12744.d b/gcc/testsuite/gdc.test/fail_compilation/fail12744.d
index f1216b5..46ed9f6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12744.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12744.d
@@ -1,24 +1,24 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail12744.d(38): Error: incompatible parameter storage classes 'ref' and 'out'
-fail_compilation/fail12744.d(52): Error: template instance fail12744.bar12744R!(foo12744O) error instantiating
-fail_compilation/fail12744.d(38): Error: incompatible parameter storage classes 'ref' and 'lazy'
-fail_compilation/fail12744.d(53): Error: template instance fail12744.bar12744R!(foo12744L) error instantiating
-fail_compilation/fail12744.d(39): Error: incompatible parameter storage classes 'out' and 'ref'
-fail_compilation/fail12744.d(56): Error: template instance fail12744.bar12744O!(foo12744R) error instantiating
-fail_compilation/fail12744.d(39): Error: incompatible parameter storage classes 'out' and 'lazy'
-fail_compilation/fail12744.d(58): Error: template instance fail12744.bar12744O!(foo12744L) error instantiating
-fail_compilation/fail12744.d(40): Error: incompatible parameter storage classes 'lazy' and 'ref'
-fail_compilation/fail12744.d(61): Error: template instance fail12744.bar12744L!(foo12744R) error instantiating
-fail_compilation/fail12744.d(40): Error: incompatible parameter storage classes 'lazy' and 'out'
-fail_compilation/fail12744.d(62): Error: template instance fail12744.bar12744L!(foo12744O) error instantiating
-fail_compilation/fail12744.d(41): Error: incompatible parameter storage classes 'auto ref' and 'out'
-fail_compilation/fail12744.d(67): Error: template fail12744.bar12744A cannot deduce function from argument types !(foo12744O)(int), candidates are:
-fail_compilation/fail12744.d(41): fail12744.bar12744A(alias f)(auto ref PTT12744!f args)
-fail_compilation/fail12744.d(41): Error: incompatible parameter storage classes 'auto ref' and 'lazy'
-fail_compilation/fail12744.d(68): Error: template fail12744.bar12744A cannot deduce function from argument types !(foo12744L)(int), candidates are:
-fail_compilation/fail12744.d(41): fail12744.bar12744A(alias f)(auto ref PTT12744!f args)
+fail_compilation/fail12744.d(38): Error: incompatible parameter storage classes `ref` and `out`
+fail_compilation/fail12744.d(52): Error: template instance `fail12744.bar12744R!(foo12744O)` error instantiating
+fail_compilation/fail12744.d(38): Error: incompatible parameter storage classes `ref` and `lazy`
+fail_compilation/fail12744.d(53): Error: template instance `fail12744.bar12744R!(foo12744L)` error instantiating
+fail_compilation/fail12744.d(39): Error: incompatible parameter storage classes `out` and `ref`
+fail_compilation/fail12744.d(56): Error: template instance `fail12744.bar12744O!(foo12744R)` error instantiating
+fail_compilation/fail12744.d(39): Error: incompatible parameter storage classes `out` and `lazy`
+fail_compilation/fail12744.d(58): Error: template instance `fail12744.bar12744O!(foo12744L)` error instantiating
+fail_compilation/fail12744.d(40): Error: incompatible parameter storage classes `lazy` and `ref`
+fail_compilation/fail12744.d(61): Error: template instance `fail12744.bar12744L!(foo12744R)` error instantiating
+fail_compilation/fail12744.d(40): Error: incompatible parameter storage classes `lazy` and `out`
+fail_compilation/fail12744.d(62): Error: template instance `fail12744.bar12744L!(foo12744O)` error instantiating
+fail_compilation/fail12744.d(41): Error: incompatible parameter storage classes `auto ref` and `out`
+fail_compilation/fail12744.d(67): Error: template `fail12744.bar12744A` cannot deduce function from argument types `!(foo12744O)(int)`
+fail_compilation/fail12744.d(41): Candidate is: `bar12744A(alias f)(auto ref PTT12744!f args)`
+fail_compilation/fail12744.d(41): Error: incompatible parameter storage classes `auto ref` and `lazy`
+fail_compilation/fail12744.d(68): Error: template `fail12744.bar12744A` cannot deduce function from argument types `!(foo12744L)(int)`
+fail_compilation/fail12744.d(41): Candidate is: `bar12744A(alias f)(auto ref PTT12744!f args)`
---
*/
template PTT12744(func...)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12749.d b/gcc/testsuite/gdc.test/fail_compilation/fail12749.d
index 149d120..231b21e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12749.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12749.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail12749.d(19): Error: immutable field 'inum' initialization is not allowed in foreach loop
-fail_compilation/fail12749.d(20): Error: const field 'cnum' initialization is not allowed in foreach loop
-fail_compilation/fail12749.d(25): Error: immutable field 'inum' initialization is not allowed in nested function 'set'
-fail_compilation/fail12749.d(26): Error: const field 'cnum' initialization is not allowed in nested function 'set'
+fail_compilation/fail12749.d(19): Error: immutable field `inum` initialization is not allowed in foreach loop
+fail_compilation/fail12749.d(20): Error: const field `cnum` initialization is not allowed in foreach loop
+fail_compilation/fail12749.d(25): Error: immutable field `inum` initialization is not allowed in nested function `set`
+fail_compilation/fail12749.d(26): Error: const field `cnum` initialization is not allowed in nested function `set`
---
*/
struct S
@@ -31,10 +31,10 @@ struct S
/*
TEST_OUTPUT:
---
-fail_compilation/fail12749.d(48): Error: immutable variable 'inum' initialization is not allowed in foreach loop
-fail_compilation/fail12749.d(49): Error: const variable 'cnum' initialization is not allowed in foreach loop
-fail_compilation/fail12749.d(54): Error: immutable variable 'inum' initialization is not allowed in nested function 'set'
-fail_compilation/fail12749.d(55): Error: const variable 'cnum' initialization is not allowed in nested function 'set'
+fail_compilation/fail12749.d(48): Error: immutable variable `inum` initialization is not allowed in foreach loop
+fail_compilation/fail12749.d(49): Error: const variable `cnum` initialization is not allowed in foreach loop
+fail_compilation/fail12749.d(54): Error: immutable variable `inum` initialization is not allowed in nested function `set`
+fail_compilation/fail12749.d(55): Error: const variable `cnum` initialization is not allowed in nested function `set`
---
*/
immutable int inum;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12764.d b/gcc/testsuite/gdc.test/fail_compilation/fail12764.d
new file mode 100644
index 0000000..f889cb7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12764.d
@@ -0,0 +1,26 @@
+// https://issues.dlang.org/show_bug.cgi?id=12764
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail12764.d(20): Error: field `s` must be initialized in constructor
+---
+*/
+
+struct S
+{
+ @disable this();
+
+ this(string) { }
+ int f;
+}
+
+class C
+{
+ this(int)
+ {
+ s.f = 1; // circumvents default ctor!
+ }
+
+ S s;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12809.d b/gcc/testsuite/gdc.test/fail_compilation/fail12809.d
index 7c08683..a5e9f72 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12809.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12809.d
@@ -1,16 +1,15 @@
// REQUIRED_ARGS: -o-
-// PERMUTE_ARGS:
bool cond;
/*
TEST_OUTPUT:
---
-fail_compilation/fail12809.d(19): Error: `object.Exception` is thrown but not caught
-fail_compilation/fail12809.d(16): Error: nothrow function `fail12809.test_finally1` may throw
-fail_compilation/fail12809.d(35): Error: `object.Exception` is thrown but not caught
-fail_compilation/fail12809.d(39): Error: `object.Exception` is thrown but not caught
-fail_compilation/fail12809.d(32): Error: nothrow function `fail12809.test_finally3` may throw
+fail_compilation/fail12809.d(18): Error: `object.Exception` is thrown but not caught
+fail_compilation/fail12809.d(15): Error: `nothrow` function `fail12809.test_finally1` may throw
+fail_compilation/fail12809.d(34): Error: `object.Exception` is thrown but not caught
+fail_compilation/fail12809.d(38): Error: `object.Exception` is thrown but not caught
+fail_compilation/fail12809.d(31): Error: `nothrow` function `fail12809.test_finally3` may throw
---
*/
void test_finally1() nothrow
@@ -44,11 +43,11 @@ void test_finally3() nothrow
/*
TEST_OUTPUT:
---
-fail_compilation/fail12809.d(59): Error: `object.Exception` is thrown but not caught
-fail_compilation/fail12809.d(54): Error: nothrow function `fail12809.test_finally4` may throw
-fail_compilation/fail12809.d(75): Error: `object.Exception` is thrown but not caught
-fail_compilation/fail12809.d(79): Error: `object.Exception` is thrown but not caught
-fail_compilation/fail12809.d(70): Error: nothrow function `fail12809.test_finally6` may throw
+fail_compilation/fail12809.d(58): Error: `object.Exception` is thrown but not caught
+fail_compilation/fail12809.d(53): Error: `nothrow` function `fail12809.test_finally4` may throw
+fail_compilation/fail12809.d(74): Error: `object.Exception` is thrown but not caught
+fail_compilation/fail12809.d(78): Error: `object.Exception` is thrown but not caught
+fail_compilation/fail12809.d(69): Error: `nothrow` function `fail12809.test_finally6` may throw
---
*/
void test_finally4() nothrow
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail129.d b/gcc/testsuite/gdc.test/fail_compilation/fail129.d
index 2bf4369..dc0ca07 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail129.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail129.d
@@ -3,7 +3,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail129.d: Error: module fail129 source file must start with BOM or ASCII character, not \xC3
+fail_compilation/fail129.d: Error: module `fail129` source file must start with BOM or ASCII character, not \xC3
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12901.d b/gcc/testsuite/gdc.test/fail_compilation/fail12901.d
index 8d62c3e..31c90c1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12901.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12901.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail12901.d(11): Error: constructor fail12901.S.this in and out contracts require function body
+fail_compilation/fail12901.d(11): Error: constructor `fail12901.S.this` `in` and `out` contracts can only appear without a body when they are virtual interface functions or abstract
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12908.d b/gcc/testsuite/gdc.test/fail_compilation/fail12908.d
index c238028..67ea6ce 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12908.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12908.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail12908.d(14): Error: pure delegate 'fail12908.main.__foreachbody1' cannot call impure function 'fail12908.g'
+fail_compilation/fail12908.d(14): Error: `pure` delegate `fail12908.main.__foreachbody1` cannot call impure function `fail12908.g`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12932.d b/gcc/testsuite/gdc.test/fail_compilation/fail12932.d
index 871abfe..fe68fea 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail12932.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail12932.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail12932.d(11): Error: array literal in @nogc function 'fail12932.foo' may cause GC allocation
-fail_compilation/fail12932.d(15): Error: array literal in @nogc function 'fail12932.foo' may cause GC allocation
+fail_compilation/fail12932.d(11): Error: array literal in `@nogc` function `fail12932.foo` may cause a GC allocation
+fail_compilation/fail12932.d(15): Error: array literal in `@nogc` function `fail12932.foo` may cause a GC allocation
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13064.d b/gcc/testsuite/gdc.test/fail_compilation/fail13064.d
index be43460..a59de72 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13064.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13064.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail13064.d(8): Error: function fail13064.f storage class 'auto' has no effect if return type is not inferred
+fail_compilation/fail13064.d(8): Error: function `fail13064.f` storage class `auto` has no effect if return type is not inferred
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail131.d b/gcc/testsuite/gdc.test/fail_compilation/fail131.d
index e0f568f..15b6dc9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail131.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail131.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail131.d(8): Error: function D main parameters must be main() or main(string[] args)
+fail_compilation/fail131.d(8): Error: function `D main` parameters must be `main()` or `main(string[] args)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13116.d b/gcc/testsuite/gdc.test/fail_compilation/fail13116.d
index fe1180c..ac520d7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13116.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13116.d
@@ -1,12 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail13116.d(13): Error: this is not an lvalue
+fail_compilation/fail13116.d(14): Error: `this` is not an lvalue and cannot be modified
+fail_compilation/fail13116.d(23): Error: `super` is not an lvalue and cannot be modified
---
*/
struct S
{
- ref S notEvil() { return this; } // this should be accepted
+ ref S notEvil() return { return this; } // this should be accepted
}
class C
{
@@ -16,12 +17,6 @@ void main()
{
}
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail13116.d(28): Error: super is not an lvalue
----
-*/
class Base { }
class Derived : Base
{
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13120.d b/gcc/testsuite/gdc.test/fail_compilation/fail13120.d
index 1acda7b2..f1cf340 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13120.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13120.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail13120.d(13): Error: pure delegate 'fail13120.g1.__foreachbody2' cannot call impure function 'fail13120.f1'
-fail_compilation/fail13120.d(13): Error: @nogc delegate 'fail13120.g1.__foreachbody2' cannot call non-@nogc function 'fail13120.f1'
+fail_compilation/fail13120.d(13): Error: `pure` delegate `fail13120.g1.__foreachbody2` cannot call impure function `fail13120.f1`
+fail_compilation/fail13120.d(13): Error: `@nogc` delegate `fail13120.g1.__foreachbody2` cannot call non-@nogc function `fail13120.f1`
---
*/
void f1() {}
@@ -16,9 +16,10 @@ void g1(char[] s) pure @nogc
/*
TEST_OUTPUT:
---
-fail_compilation/fail13120.d(34): Error: pure function 'fail13120.h2' cannot call impure function 'fail13120.g2!().g2'
-fail_compilation/fail13120.d(34): Error: @safe function 'fail13120.h2' cannot call @system function 'fail13120.g2!().g2'
-fail_compilation/fail13120.d(34): Error: @nogc function 'fail13120.h2' cannot call non-@nogc function 'fail13120.g2!().g2'
+fail_compilation/fail13120.d(35): Error: `pure` function `fail13120.h2` cannot call impure function `fail13120.g2!().g2`
+fail_compilation/fail13120.d(35): Error: `@safe` function `fail13120.h2` cannot call `@system` function `fail13120.g2!().g2`
+fail_compilation/fail13120.d(27): `fail13120.g2!().g2` is declared here
+fail_compilation/fail13120.d(35): Error: `@nogc` function `fail13120.h2` cannot call non-@nogc function `fail13120.g2!().g2`
---
*/
void f2() {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13187.d b/gcc/testsuite/gdc.test/fail_compilation/fail13187.d
index 3799d77..2972c27 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13187.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13187.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail13187.d(12): Error: pure function 'fail13187.test' cannot access mutable static data 'my_func_ptr'
+fail_compilation/fail13187.d(12): Error: `pure` function `fail13187.test` cannot access mutable static data `my_func_ptr`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail132.d b/gcc/testsuite/gdc.test/fail_compilation/fail132.d
index 3463184..2c271d9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail132.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail132.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail132.d(19): Error: outer class A 'this' needed to 'new' nested class B
+fail_compilation/fail132.d(19): Error: outer class `A` `this` needed to `new` nested class `B`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13203.d b/gcc/testsuite/gdc.test/fail_compilation/fail13203.d
index 86d30a4..e242349 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13203.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13203.d
@@ -3,10 +3,10 @@ int v1, v2;
/*
TEST_OUTPUT:
---
-fail_compilation/fail13203.d(15): Error: alias fail13203.FA1!1.T conflicts with alias fail13203.FA1!1.T at fail_compilation/fail13203.d(14)
-fail_compilation/fail13203.d(22): Error: template instance fail13203.FA1!1 error instantiating
-fail_compilation/fail13203.d(20): Error: alias fail13203.FA2!1.T conflicts with alias fail13203.FA2!1.T at fail_compilation/fail13203.d(19)
-fail_compilation/fail13203.d(23): Error: template instance fail13203.FA2!1 error instantiating
+fail_compilation/fail13203.d(15): Error: alias `fail13203.FA1!1.T` conflicts with alias `fail13203.FA1!1.T` at fail_compilation/fail13203.d(14)
+fail_compilation/fail13203.d(22): Error: template instance `fail13203.FA1!1` error instantiating
+fail_compilation/fail13203.d(20): Error: alias `fail13203.FA2!1.T` conflicts with alias `fail13203.FA2!1.T` at fail_compilation/fail13203.d(19)
+fail_compilation/fail13203.d(23): Error: template instance `fail13203.FA2!1` error instantiating
---
*/
template FA1(int b)
@@ -25,10 +25,10 @@ alias A2 = FA2!1; // variable symbol is not overloadable
/*
TEST_OUTPUT:
---
-fail_compilation/fail13203.d(36): Error: alias fail13203.FB1!1.T conflicts with alias fail13203.FB1!1.T at fail_compilation/fail13203.d(37)
-fail_compilation/fail13203.d(44): Error: template instance fail13203.FB1!1 error instantiating
-fail_compilation/fail13203.d(41): Error: alias fail13203.FB2!1.T conflicts with alias fail13203.FB2!1.T at fail_compilation/fail13203.d(42)
-fail_compilation/fail13203.d(45): Error: template instance fail13203.FB2!1 error instantiating
+fail_compilation/fail13203.d(36): Error: alias `fail13203.FB1!1.T` conflicts with alias `fail13203.FB1!1.T` at fail_compilation/fail13203.d(37)
+fail_compilation/fail13203.d(44): Error: template instance `fail13203.FB1!1` error instantiating
+fail_compilation/fail13203.d(41): Error: alias `fail13203.FB2!1.T` conflicts with alias `fail13203.FB2!1.T` at fail_compilation/fail13203.d(42)
+fail_compilation/fail13203.d(45): Error: template instance `fail13203.FB2!1` error instantiating
---
*/
template FB1(int b)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail133.d b/gcc/testsuite/gdc.test/fail_compilation/fail133.d
index e189ad5..29b7d40 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail133.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail133.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail133.d(13): Error: function D main circular dependency. Functions cannot be interpreted while being compiled
-fail_compilation/fail133.d(15): called from here: main()
+fail_compilation/fail133.d(13): Error: function `D main` circular dependency. Functions cannot be interpreted while being compiled
+fail_compilation/fail133.d(15): called from here: `main()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13336a.d b/gcc/testsuite/gdc.test/fail_compilation/fail13336a.d
index 5ab7e6c..e3f990c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13336a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13336a.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail13336a.d(28): Error: choose(true) is not an lvalue
+fail_compilation/fail13336a.d(28): Error: `choose(true)` is not an lvalue and cannot be modified
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13336b.d b/gcc/testsuite/gdc.test/fail_compilation/fail13336b.d
index 9d30d2c..b8fb12d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13336b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13336b.d
@@ -1,5 +1,4 @@
// REQUIRED_ARGS: -o-
-// PERMUTE_ARGS:
int sx;
double sy;
@@ -7,7 +6,8 @@ double sy;
/*
TEST_OUTPUT:
---
-fail_compilation/fail13336b.d(16): Error: cast(double)sx is not an lvalue
+fail_compilation/fail13336b.d(16): Error: `cast(double)sx` is not an lvalue and cannot be modified
+fail_compilation/fail13336b.d(24): Error: `cast(double)sx` is not an lvalue and cannot be modified
---
*/
ref f1(bool f)
@@ -17,12 +17,6 @@ ref f1(bool f)
return sy;
}
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail13336b.d(30): Error: cast(double)sx is not an lvalue
----
-*/
ref f2(bool f)
{
if (f)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail134.d b/gcc/testsuite/gdc.test/fail_compilation/fail134.d
index d7b4a36..d8ae89c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail134.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail134.d
@@ -1,13 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail134.d(13): Error: template instance foo!(f) does not match template declaration foo(T)
-fail_compilation/fail134.d(14): Error: template instance fail134.bar!(f) error instantiating
+fail_compilation/fail134.d(14): Error: template instance `foo!(f)` does not match template declaration `foo(T)`
+fail_compilation/fail134.d(14): `f` is not a type
+fail_compilation/fail134.d(15): Error: template instance `fail134.bar!(f)` error instantiating
---
*/
-// Issue 651 - Assertion failure: 'global.errors' on line 2622 in file 'template.c'
-
+// https://issues.dlang.org/show_bug.cgi?id=651
+// Assertion failure: 'global.errors' on line 2622 in file 'template.c'
void f() {}
template foo(T) {}
template bar(T...) { alias foo!(T) buz; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13424.d b/gcc/testsuite/gdc.test/fail_compilation/fail13424.d
index 31bed56..dcec523 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13424.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13424.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail13424.d(12): Error: delegate fail13424.S.__lambda2 cannot be struct members
-fail_compilation/fail13424.d(17): Error: delegate fail13424.U.__lambda2 cannot be union members
-fail_compilation/fail13424.d(22): Error: delegate fail13424.C.__lambda2 cannot be class members
+fail_compilation/fail13424.d(12): Error: delegate `fail13424.S.__lambda2` cannot be struct members
+fail_compilation/fail13424.d(17): Error: delegate `fail13424.U.__lambda2` cannot be union members
+fail_compilation/fail13424.d(22): Error: delegate `fail13424.C.__lambda2` cannot be class members
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13435.d b/gcc/testsuite/gdc.test/fail_compilation/fail13435.d
new file mode 100644
index 0000000..a3ef5e4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13435.d
@@ -0,0 +1,27 @@
+// https://issues.dlang.org/show_bug.cgi?id=13435
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail13435.d(22): Error: cannot implicitly convert expression `d` of type `int[]` to `S!int`
+fail_compilation/fail13435.d(22): `this._a = d` is the first assignment of `this._a` therefore it represents its initialization
+fail_compilation/fail13435.d(22): `opAssign` methods are not used for initialization, but for subsequent assignments
+---
+*/
+
+struct S(T)
+{
+ void opAssign(T[] arg) {}
+}
+
+class B
+{
+ this(int[] d)
+ {
+ S!int c;
+ _a = d; // Error: cannot implicitly convert expression (d) of type int[] to S!int
+ c = d; // compiles OK
+ }
+
+ S!int _a;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13498.d b/gcc/testsuite/gdc.test/fail_compilation/fail13498.d
index c18d2e3..27f47b3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13498.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13498.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/fail13498.d(11): Error: cannot implicitly convert expression `"foo"` of type `string` to `int`
-fail_compilation/fail13498.d(16): Error: template instance fail13498.foo!() error instantiating
+fail_compilation/fail13498.d(16): Error: template instance `fail13498.foo!()` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13574.d b/gcc/testsuite/gdc.test/fail_compilation/fail13574.d
index 081f8b5..2a9336b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13574.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13574.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail13574.d(21): Error: '$' is not an lvalue
-fail_compilation/fail13574.d(27): Error: '$' is not an lvalue
+fail_compilation/fail13574.d(21): Error: cannot modify operator `$`
+fail_compilation/fail13574.d(27): Error: cannot modify operator `$`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail136.d b/gcc/testsuite/gdc.test/fail_compilation/fail136.d
index bba0c51..299b994 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail136.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail136.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail136.d(10): Error: `string` has no effect in expression `"\xef\xbb\xbf"`
+fail_compilation/fail136.d(10): Error: Built-in hex string literals are obsolete, use `std.conv.hexString!"EF BB BF"` instead.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13601.d b/gcc/testsuite/gdc.test/fail_compilation/fail13601.d
index e1aa2d5..51291f4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13601.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13601.d
@@ -4,7 +4,7 @@ TEST_OUTPUT:
fail_compilation/fail13601.d(13): Error: variable `__ctfe` cannot be read at compile time
fail_compilation/fail13601.d(14): Error: variable `__ctfe` cannot be read at compile time
fail_compilation/fail13601.d(15): Error: variable `__ctfe` cannot be read at compile time
-fail_compilation/fail13601.d(16): Error: variable __ctfe cannot be read at compile time
+fail_compilation/fail13601.d(16): Error: variable `__ctfe` cannot be read at compile time
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13701.d b/gcc/testsuite/gdc.test/fail_compilation/fail13701.d
index c0bdfcc..88ed2d9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13701.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13701.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail13701.d(16): Error: cannot modify immutable expression this.aa[10]
-fail_compilation/fail13701.d(23): Error: cannot modify immutable expression aa[10]
-fail_compilation/fail13701.d(24): Error: cannot modify immutable expression aa[10]
+fail_compilation/fail13701.d(16): Error: cannot modify `immutable` expression `this.aa[10]`
+fail_compilation/fail13701.d(23): Error: cannot modify `immutable` expression `aa[10]`
+fail_compilation/fail13701.d(24): Error: cannot modify `immutable` expression `aa[10]`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13756.d b/gcc/testsuite/gdc.test/fail_compilation/fail13756.d
index 38dfeb8..cdf0e85 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13756.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13756.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail13756.d(11): Error: foreach: index must be type `const(int)`, not `int`
+fail_compilation/fail13756.d(11): Error: `foreach`: index must be type `const(int)`, not `int`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail139.d b/gcc/testsuite/gdc.test/fail_compilation/fail139.d
index 22fc616..d5cdb99 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail139.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail139.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail139.d(8): Error: forward reference to 'test'
+fail_compilation/fail139.d(8): Error: forward reference to `test`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13902.d b/gcc/testsuite/gdc.test/fail_compilation/fail13902.d
index fbe4b4a..5e3b637 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13902.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13902.d
@@ -4,9 +4,11 @@ struct S1 { int v; }
struct S2 { int* p; }
class C { int v; }
+#line 6
/*
TEST_OUTPUT:
---
+fail_compilation/fail13902.d(45): Error: Using the result of a comma expression is not allowed
fail_compilation/fail13902.d(32): Error: returning `& x` escapes a reference to local variable `x`
fail_compilation/fail13902.d(33): Error: returning `&s1.v` escapes a reference to local variable `s1`
fail_compilation/fail13902.d(38): Error: returning `& sa1` escapes a reference to local variable `sa1`
@@ -47,17 +49,19 @@ int* testEscape1()
return null; // ok
}
+#line 49
/*
TEST_OUTPUT:
---
-fail_compilation/fail13902.d(75): Error: returning `& x` escapes a reference to parameter `x`, perhaps annotate with `return`
-fail_compilation/fail13902.d(76): Error: returning `&s1.v` escapes a reference to parameter `s1`, perhaps annotate with `return`
-fail_compilation/fail13902.d(81): Error: returning `& sa1` escapes a reference to parameter `sa1`, perhaps annotate with `return`
-fail_compilation/fail13902.d(82): Error: returning `&sa2[0][0]` escapes a reference to parameter `sa2`, perhaps annotate with `return`
-fail_compilation/fail13902.d(83): Error: returning `& x` escapes a reference to parameter `x`, perhaps annotate with `return`
-fail_compilation/fail13902.d(84): Error: returning `(& x+4)` escapes a reference to parameter `x`, perhaps annotate with `return`
-fail_compilation/fail13902.d(85): Error: returning `& x + cast(long)x * 4L` escapes a reference to parameter `x`, perhaps annotate with `return`
-fail_compilation/fail13902.d(88): Error: returning `& y` escapes a reference to parameter `y`, perhaps annotate with `return`
+fail_compilation/fail13902.d(88): Error: Using the result of a comma expression is not allowed
+fail_compilation/fail13902.d(75): Error: returning `& x` escapes a reference to local variable `x`
+fail_compilation/fail13902.d(76): Error: returning `&s1.v` escapes a reference to local variable `s1`
+fail_compilation/fail13902.d(81): Error: returning `& sa1` escapes a reference to local variable `sa1`
+fail_compilation/fail13902.d(82): Error: returning `&sa2[0][0]` escapes a reference to local variable `sa2`
+fail_compilation/fail13902.d(83): Error: returning `& x` escapes a reference to local variable `x`
+fail_compilation/fail13902.d(84): Error: returning `(& x+4)` escapes a reference to local variable `x`
+fail_compilation/fail13902.d(85): Error: returning `& x + cast(long)x * 4L` escapes a reference to local variable `x`
+fail_compilation/fail13902.d(88): Error: returning `& y` escapes a reference to local variable `y`
---
*/
int* testEscape2(
@@ -90,19 +94,21 @@ int* testEscape2(
return null; // ok
}
+#line 92
/*
TEST_OUTPUT:
---
+fail_compilation/fail13902.d(123): Error: Using the result of a comma expression is not allowed
---
*/
int* testEscape3(
- ref int x, ref int y,
+ return ref int x, return ref int y,
ref int[] da1,
ref int[][] da2,
- ref int[1] sa1,
- ref int[1][1] sa2,
+ return ref int[1] sa1,
+ return ref int[1][1] sa2,
ref int* ptr,
- ref S1 s1,
+ return ref S1 s1,
ref S2 s2,
ref C c,
)
@@ -128,9 +134,9 @@ int* testEscape3(
/*
TEST_OUTPUT:
---
-fail_compilation/fail13902.d(150): Error: returning `cast(int[])sa1` escapes a reference to parameter `sa1`, perhaps annotate with `return`
-fail_compilation/fail13902.d(151): Error: returning `cast(int[])sa1` escapes a reference to parameter `sa1`, perhaps annotate with `return`
-fail_compilation/fail13902.d(152): Error: returning `sa1[]` escapes a reference to parameter `sa1`, perhaps annotate with `return`
+fail_compilation/fail13902.d(150): Error: returning `cast(int[])sa1` escapes a reference to local variable `sa1`
+fail_compilation/fail13902.d(151): Error: returning `cast(int[])sa1` escapes a reference to local variable `sa1`
+fail_compilation/fail13902.d(152): Error: returning `sa1[]` escapes a reference to local variable `sa1`
fail_compilation/fail13902.d(155): Error: returning `cast(int[])sa2` escapes a reference to local variable `sa2`
fail_compilation/fail13902.d(156): Error: returning `cast(int[])sa2` escapes a reference to local variable `sa2`
fail_compilation/fail13902.d(157): Error: returning `sa2[]` escapes a reference to local variable `sa2`
@@ -145,7 +151,7 @@ fail_compilation/fail13902.d(172): Error: escaping reference to stack allocated
fail_compilation/fail13902.d(173): Error: escaping reference to stack allocated value returned by `makeS()`
---
*/
-int[] testEscape4(int[3] sa1) // Bugzilla 9279
+int[] testEscape4(int[3] sa1) // https://issues.dlang.org/show_bug.cgi?id=9279
{
if (0) return sa1; // error <- no error
if (0) return cast(int[])sa1; // error <- no error
@@ -217,14 +223,14 @@ ref int testEscapeRef1()
/*
TEST_OUTPUT:
---
-fail_compilation/fail13902.d(240): Error: returning `x` escapes a reference to parameter `x`, perhaps annotate with `return`
-fail_compilation/fail13902.d(241): Error: returning `s1.v` escapes a reference to parameter `s1`, perhaps annotate with `return`
-fail_compilation/fail13902.d(245): Error: returning `sa1[0]` escapes a reference to parameter `sa1`, perhaps annotate with `return`
-fail_compilation/fail13902.d(246): Error: returning `sa2[0][0]` escapes a reference to parameter `sa2`, perhaps annotate with `return`
-fail_compilation/fail13902.d(247): Error: returning `x = 1` escapes a reference to parameter `x`, perhaps annotate with `return`
-fail_compilation/fail13902.d(248): Error: returning `x += 1` escapes a reference to parameter `x`, perhaps annotate with `return`
-fail_compilation/fail13902.d(249): Error: returning `s1.v = 1` escapes a reference to parameter `s1`, perhaps annotate with `return`
-fail_compilation/fail13902.d(250): Error: returning `s1.v += 1` escapes a reference to parameter `s1`, perhaps annotate with `return`
+fail_compilation/fail13902.d(240): Error: returning `x` escapes a reference to local variable `x`
+fail_compilation/fail13902.d(241): Error: returning `s1.v` escapes a reference to local variable `s1`
+fail_compilation/fail13902.d(245): Error: returning `sa1[0]` escapes a reference to local variable `sa1`
+fail_compilation/fail13902.d(246): Error: returning `sa2[0][0]` escapes a reference to local variable `sa2`
+fail_compilation/fail13902.d(247): Error: returning `x = 1` escapes a reference to local variable `x`
+fail_compilation/fail13902.d(248): Error: returning `x += 1` escapes a reference to local variable `x`
+fail_compilation/fail13902.d(249): Error: returning `s1.v = 1` escapes a reference to local variable `s1`
+fail_compilation/fail13902.d(250): Error: returning `s1.v += 1` escapes a reference to local variable `s1`
---
*/
ref int testEscapeRef2(
@@ -259,12 +265,12 @@ TEST_OUTPUT:
---
*/
ref int testEscapeRef2(
- ref int x,
+ return ref int x,
ref int[] da1,
ref int[][] da2,
- ref int[1] sa1,
- ref int[1][1] sa2,
- ref S1 s1,
+ return ref int[1] sa1,
+ return ref int[1][1] sa2,
+ return ref S1 s1,
ref C c,
)
{
@@ -317,18 +323,18 @@ int[] testSlice2() { int[3] sa; int n; return sa[n..2][1..2]; }
/*
TEST_OUTPUT:
---
-fail_compilation/fail13902.d(324): Error: returning `vda[0]` escapes a reference to parameter `vda`, perhaps annotate with `return`
-fail_compilation/fail13902.d(325): Error: returning `vda[]` escapes a reference to variadic parameter `vda`
+fail_compilation/fail13902.d(324): Error: returning `vda[0]` escapes a reference to parameter `vda`
+fail_compilation/fail13902.d(324): perhaps annotate the parameter with `return`
---
*/
ref int testDynamicArrayVariadic1(int[] vda...) { return vda[0]; }
-int[] testDynamicArrayVariadic2(int[] vda...) { return vda[]; }
+@safe int[] testDynamicArrayVariadic2(int[] vda...) { return vda[]; }
int[3] testDynamicArrayVariadic3(int[] vda...) { return vda[0..3]; } // no error
/*
TEST_OUTPUT:
---
-fail_compilation/fail13902.d(335): Error: returning `vsa[0]` escapes a reference to parameter `vsa`, perhaps annotate with `return`
+fail_compilation/fail13902.d(335): Error: returning `vsa[0]` escapes a reference to local variable `vsa`
fail_compilation/fail13902.d(336): Error: returning `vsa[]` escapes a reference to variadic parameter `vsa`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14089.d b/gcc/testsuite/gdc.test/fail_compilation/fail14089.d
index df1221a..f609104 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail14089.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail14089.d
@@ -1,16 +1,16 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail14089.d(41): Error: `long` has no effect in expression `1`
-fail_compilation/fail14089.d(41): Error: `long` has no effect in expression `1`
-fail_compilation/fail14089.d(42): Error: `long` has no effect in expression `1`
-fail_compilation/fail14089.d(42): Error: `var` has no effect in expression `n`
-fail_compilation/fail14089.d(43): Error: `long` has no effect in expression `1`
-fail_compilation/fail14089.d(43): Error: `dotvar` has no effect in expression `s.val`
-fail_compilation/fail14089.d(44): Error: `var` has no effect in expression `n`
-fail_compilation/fail14089.d(44): Error: `long` has no effect in expression `1`
-fail_compilation/fail14089.d(45): Error: `dotvar` has no effect in expression `s.val`
-fail_compilation/fail14089.d(45): Error: `long` has no effect in expression `1`
+fail_compilation/fail14089.d(41): Error: `1` has no effect
+fail_compilation/fail14089.d(41): Error: `1` has no effect
+fail_compilation/fail14089.d(42): Error: `1` has no effect
+fail_compilation/fail14089.d(42): Error: `n` has no effect
+fail_compilation/fail14089.d(43): Error: `1` has no effect
+fail_compilation/fail14089.d(43): Error: `s.val` has no effect
+fail_compilation/fail14089.d(44): Error: `n` has no effect
+fail_compilation/fail14089.d(44): Error: `1` has no effect
+fail_compilation/fail14089.d(45): Error: `s.val` has no effect
+fail_compilation/fail14089.d(45): Error: `1` has no effect
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail142.d b/gcc/testsuite/gdc.test/fail_compilation/fail142.d
index e89b576..343b2e3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail142.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail142.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail142.d(20): Error: cannot create instance of abstract class B
-fail_compilation/fail142.d(20): function 'void test()' is not implemented
+fail_compilation/fail142.d(20): Error: cannot create instance of abstract class `B`
+fail_compilation/fail142.d(20): function `void test()` is not implemented
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14249.d b/gcc/testsuite/gdc.test/fail_compilation/fail14249.d
index c895c55..8d66a75 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail14249.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail14249.d
@@ -2,20 +2,18 @@
REQUIRED_ARGS: -unittest
TEST_OUTPUT:
---
-fail_compilation/fail14249.d(23): Error: shared static constructor can only be member of module/aggregate/template, not function main
-fail_compilation/fail14249.d(24): Error: shared static destructor can only be member of module/aggregate/template, not function main
-fail_compilation/fail14249.d(25): Error: static constructor can only be member of module/aggregate/template, not function main
-fail_compilation/fail14249.d(26): Error: static destructor can only be member of module/aggregate/template, not function main
-fail_compilation/fail14249.d(27): Error: unittest can only be a member of module/aggregate/template, not function main
-fail_compilation/fail14249.d(28): Error: invariant can only be a member of aggregate, not function main
-fail_compilation/fail14249.d(29): Error: alias this can only be a member of aggregate, not function `main`
-fail_compilation/fail14249.d(30): Error: allocator can only be a member of aggregate, not function main
-fail_compilation/fail14249.d(31): Error: deallocator can only be a member of aggregate, not function main
-fail_compilation/fail14249.d(32): Error: constructor can only be a member of aggregate, not function main
-fail_compilation/fail14249.d(33): Error: destructor can only be a member of aggregate, not function main
-fail_compilation/fail14249.d(34): Error: postblit can only be a member of struct/union, not function main
-fail_compilation/fail14249.d(35): Error: anonymous union can only be a part of an aggregate, not function `main`
-fail_compilation/fail14249.d(39): Error: mixin fail14249.main.Mix!() error instantiating
+fail_compilation/fail14249.d(21): Error: `shared static` constructor can only be member of module/aggregate/template, not function `main`
+fail_compilation/fail14249.d(22): Error: `shared static` destructor can only be member of module/aggregate/template, not function `main`
+fail_compilation/fail14249.d(23): Error: `static` constructor can only be member of module/aggregate/template, not function `main`
+fail_compilation/fail14249.d(24): Error: `static` destructor can only be member of module/aggregate/template, not function `main`
+fail_compilation/fail14249.d(25): Error: `unittest` can only be a member of module/aggregate/template, not function `main`
+fail_compilation/fail14249.d(26): Error: `invariant` can only be a member of aggregate, not function `main`
+fail_compilation/fail14249.d(27): Error: alias this can only be a member of aggregate, not function `main`
+fail_compilation/fail14249.d(28): Error: constructor can only be a member of aggregate, not function `main`
+fail_compilation/fail14249.d(29): Error: destructor can only be a member of aggregate, not function `main`
+fail_compilation/fail14249.d(30): Error: postblit can only be a member of struct, not function `main`
+fail_compilation/fail14249.d(31): Error: anonymous union can only be a part of an aggregate, not function `main`
+fail_compilation/fail14249.d(35): Error: mixin `fail14249.main.Mix!()` error instantiating
---
*/
mixin template Mix()
@@ -27,8 +25,6 @@ mixin template Mix()
unittest {}
invariant {}
alias a this;
- new(size_t sz) { return null; }
- delete(void* p) { }
this() {} // from fail268.d
~this() {} // from fail268.d
this(this) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail143.d b/gcc/testsuite/gdc.test/fail_compilation/fail143.d
index 0a0986a..6df232f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail143.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail143.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail143.d(23): Error: need 'this' for 'next' of type 'uint()'
-fail_compilation/fail143.d(30): Error: template instance fail143.Foo!int error instantiating
+fail_compilation/fail143.d(23): Error: need `this` for `next` of type `uint()`
+fail_compilation/fail143.d(30): Error: template instance `fail143.Foo!int` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14304.d b/gcc/testsuite/gdc.test/fail_compilation/fail14304.d
index 472b33d..8321401 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail14304.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail14304.d
@@ -1,16 +1,16 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail14304.d(26): Error: cannot modify read-only constant S14304(1)
-fail_compilation/fail14304.d(58): called from here: sle14304.modify()
-fail_compilation/fail14304.d(35): Error: cannot modify read-only constant [1:1, 2:2]
-fail_compilation/fail14304.d(61): called from here: modify14304(aae14304)
-fail_compilation/fail14304.d(41): Error: cannot modify read-only constant [1, 2, 3]
-fail_compilation/fail14304.d(64): called from here: modify14304(cast(const(int)[])index14304)
-fail_compilation/fail14304.d(47): Error: cannot modify read-only constant [1.414, 1.732, 2.00000]
-fail_compilation/fail14304.d(67): called from here: modify14304(cast(const(double)[])slice14304)
-fail_compilation/fail14304.d(53): Error: cannot modify read-only string literal "abc"
-fail_compilation/fail14304.d(70): called from here: modify14304(cast(const(char)[])str14304)
+fail_compilation/fail14304.d(26): Error: reinterpreting cast from `const(S14304)*` to `S14304*` is not supported in CTFE
+fail_compilation/fail14304.d(58): called from here: `sle14304.modify()`
+fail_compilation/fail14304.d(35): Error: cannot modify read-only constant `[1:1, 2:2]`
+fail_compilation/fail14304.d(61): called from here: `modify14304(aae14304)`
+fail_compilation/fail14304.d(41): Error: cannot modify read-only constant `[1, 2, 3]`
+fail_compilation/fail14304.d(64): called from here: `modify14304(cast(const(int)[])index14304)`
+fail_compilation/fail14304.d(46): Error: array cast from `immutable(double[])` to `double[]` is not supported at compile time
+fail_compilation/fail14304.d(67): called from here: `modify14304(cast(const(double)[])slice14304)`
+fail_compilation/fail14304.d(53): Error: cannot modify read-only string literal `"abc"`
+fail_compilation/fail14304.d(70): called from here: `modify14304(cast(const(char)[])str14304)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail144.d b/gcc/testsuite/gdc.test/fail_compilation/fail144.d
index 574d167..6e73d3b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail144.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail144.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail144.d(13): Error: "message"
-fail_compilation/fail144.d(26): called from here: bar(7)
+fail_compilation/fail144.d(13): Error: `"message"`
+fail_compilation/fail144.d(26): called from here: `bar(7)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14406.d b/gcc/testsuite/gdc.test/fail_compilation/fail14406.d
index 09f4816..3725a91 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail14406.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail14406.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail14406.d-mixin-20(20): Error: variable fail14406.CFrop.bar_obj cannot be further field because it will change the determined CFrop size
-fail_compilation/fail14406.d-mixin-25(25): Error: variable fail14406.IFrop.bar_obj field not allowed in interface
+fail_compilation/fail14406.d-mixin-20(20): Error: variable `fail14406.CFrop.bar_obj` cannot be further field because it will change the determined CFrop size
+fail_compilation/fail14406.d-mixin-25(25): Error: variable `fail14406.IFrop.bar_obj` field not allowed in interface
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14407.d b/gcc/testsuite/gdc.test/fail_compilation/fail14407.d
deleted file mode 100644
index 341c5ca..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail14407.d
+++ /dev/null
@@ -1,47 +0,0 @@
-import imports.a14407;
-
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail14407.d(23): Deprecation: class imports.a14407.C is deprecated
-fail_compilation/fail14407.d(23): Deprecation: allocator imports.a14407.C.new is deprecated
-fail_compilation/fail14407.d(23): Error: pure function 'fail14407.testC' cannot call impure allocator 'imports.a14407.C.new'
-fail_compilation/fail14407.d(23): Error: @safe function 'fail14407.testC' cannot call @system allocator 'imports.a14407.C.new'
-fail_compilation/fail14407.d(23): Error: @nogc function 'fail14407.testC' cannot call non-@nogc allocator 'imports.a14407.C.new'
-fail_compilation/fail14407.d(23): Error: class imports.a14407.C member `new` is not accessible
-fail_compilation/fail14407.d(23): Error: pure function 'fail14407.testC' cannot call impure constructor 'imports.a14407.C.this'
-fail_compilation/fail14407.d(23): Error: @safe function 'fail14407.testC' cannot call @system constructor 'imports.a14407.C.this'
-fail_compilation/fail14407.d(23): Error: @nogc function 'fail14407.testC' cannot call non-@nogc constructor 'imports.a14407.C.this'
-fail_compilation/fail14407.d(23): Error: class imports.a14407.C member `this` is not accessible
-fail_compilation/fail14407.d(23): Error: allocator `imports.a14407.C.new` is not nothrow
-fail_compilation/fail14407.d(23): Error: constructor `imports.a14407.C.this` is not nothrow
-fail_compilation/fail14407.d(21): Error: nothrow function `fail14407.testC` may throw
----
-*/
-void testC() pure nothrow @safe @nogc
-{
- new("arg") C(0);
-}
-
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail14407.d(46): Deprecation: struct imports.a14407.S is deprecated
-fail_compilation/fail14407.d(46): Deprecation: allocator imports.a14407.S.new is deprecated
-fail_compilation/fail14407.d(46): Error: pure function 'fail14407.testS' cannot call impure allocator 'imports.a14407.S.new'
-fail_compilation/fail14407.d(46): Error: @safe function 'fail14407.testS' cannot call @system allocator 'imports.a14407.S.new'
-fail_compilation/fail14407.d(46): Error: @nogc function 'fail14407.testS' cannot call non-@nogc allocator 'imports.a14407.S.new'
-fail_compilation/fail14407.d(46): Error: struct imports.a14407.S member `new` is not accessible
-fail_compilation/fail14407.d(46): Error: pure function 'fail14407.testS' cannot call impure constructor 'imports.a14407.S.this'
-fail_compilation/fail14407.d(46): Error: @safe function 'fail14407.testS' cannot call @system constructor 'imports.a14407.S.this'
-fail_compilation/fail14407.d(46): Error: @nogc function 'fail14407.testS' cannot call non-@nogc constructor 'imports.a14407.S.this'
-fail_compilation/fail14407.d(46): Error: struct imports.a14407.S member `this` is not accessible
-fail_compilation/fail14407.d(46): Error: allocator `imports.a14407.S.new` is not nothrow
-fail_compilation/fail14407.d(46): Error: constructor `imports.a14407.S.this` is not nothrow
-fail_compilation/fail14407.d(44): Error: nothrow function `fail14407.testS` may throw
----
-*/
-void testS() pure nothrow @safe @nogc
-{
- new("arg") S(0);
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14416.d b/gcc/testsuite/gdc.test/fail_compilation/fail14416.d
index b0518c8..9d0b3e8 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail14416.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail14416.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail14416.d(13): Error: template S(T) does not have property 'sizeof'
+fail_compilation/fail14416.d(13): Error: template `S(T)` does not have property `sizeof`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14486.d b/gcc/testsuite/gdc.test/fail_compilation/fail14486.d
index 84af9cf..07152f4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail14486.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail14486.d
@@ -41,148 +41,48 @@ fail_compilation/fail14486.d(84): Error: `nothrow` function `fail14486.test3b` m
class C0a { }
class C1a { ~this() {} }
-class C2a { ~this() {} @nogc pure @safe delete(void* p) {} }
-class C3a { @nogc pure @safe ~this() {} delete(void* p) {} }
-class C4a { @nogc pure @safe ~this() {} @nogc pure @safe delete(void* p) {} }
class C0b { }
class C1b { ~this() {} }
-class C2b { ~this() {} nothrow delete(void* p) {} }
-class C3b { nothrow ~this() {} delete(void* p) {} }
-class C4b { nothrow ~this() {} nothrow delete(void* p) {} }
struct S0a { }
struct S1a { ~this() {} }
-struct S2a { ~this() {} @nogc pure @safe delete(void* p) {} }
-struct S3a { @nogc pure @safe ~this() {} delete(void* p) {} }
-struct S4a { @nogc pure @safe ~this() {} @nogc pure @safe delete(void* p) {} }
struct S0b { }
struct S1b { ~this() {} }
-struct S2b { ~this() {} nothrow delete(void* p) {} }
-struct S3b { nothrow ~this() {} delete(void* p) {} }
-struct S4b { nothrow ~this() {} nothrow delete(void* p) {} }
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail14486.d(44): Error: delete c0 is not @safe but is used in @safe function test1a
-fail_compilation/fail14486.d(45): Error: pure function 'fail14486.test1a' cannot call impure destructor 'fail14486.C1a.~this'
-fail_compilation/fail14486.d(45): Error: @safe function 'fail14486.test1a' cannot call @system destructor 'fail14486.C1a.~this'
-fail_compilation/fail14486.d(45): Error: @nogc function 'fail14486.test1a' cannot call non-@nogc destructor 'fail14486.C1a.~this'
-fail_compilation/fail14486.d(46): Error: pure function 'fail14486.test1a' cannot call impure destructor 'fail14486.C2a.~this'
-fail_compilation/fail14486.d(46): Error: @safe function 'fail14486.test1a' cannot call @system destructor 'fail14486.C2a.~this'
-fail_compilation/fail14486.d(46): Error: @nogc function 'fail14486.test1a' cannot call non-@nogc destructor 'fail14486.C2a.~this'
-fail_compilation/fail14486.d(47): Error: pure function 'fail14486.test1a' cannot call impure deallocator 'fail14486.C3a.delete'
-fail_compilation/fail14486.d(47): Error: @safe function 'fail14486.test1a' cannot call @system deallocator 'fail14486.C3a.delete'
-fail_compilation/fail14486.d(47): Error: @nogc function 'fail14486.test1a' cannot call non-@nogc deallocator 'fail14486.C3a.delete'
-fail_compilation/fail14486.d(48): Error: delete c4 is not @safe but is used in @safe function test1a
----*/
void test1a() @nogc pure @safe
{
C0a c0; delete c0; // error
C1a c1; delete c1; // error
- C2a c2; delete c2; // error
- C3a c3; delete c3; // error
- C4a c4; delete c4; // no error
}
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail14486.d(63): Error: destructor `fail14486.C1b.~this` is not nothrow
-fail_compilation/fail14486.d(64): Error: destructor `fail14486.C2b.~this` is not nothrow
-fail_compilation/fail14486.d(65): Error: deallocator `fail14486.C3b.delete` is not nothrow
-fail_compilation/fail14486.d(60): Error: nothrow function `fail14486.test1b` may throw
----
-*/
void test1b() nothrow
{
C0b c0; delete c0; // no error
C1b c1; delete c1; // error
- C2b c2; delete c2; // error
- C3b c3; delete c3; // error
- C4b c4; delete c4; // no error
}
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail14486.d(86): Error: delete s0 is not @safe but is used in @safe function test2a
-fail_compilation/fail14486.d(87): Error: pure function 'fail14486.test2a' cannot call impure destructor 'fail14486.S1a.~this'
-fail_compilation/fail14486.d(87): Error: @safe function 'fail14486.test2a' cannot call @system destructor 'fail14486.S1a.~this'
-fail_compilation/fail14486.d(87): Error: @nogc function 'fail14486.test2a' cannot call non-@nogc destructor 'fail14486.S1a.~this'
-fail_compilation/fail14486.d(88): Error: pure function 'fail14486.test2a' cannot call impure destructor 'fail14486.S2a.~this'
-fail_compilation/fail14486.d(88): Error: @safe function 'fail14486.test2a' cannot call @system destructor 'fail14486.S2a.~this'
-fail_compilation/fail14486.d(88): Error: @nogc function 'fail14486.test2a' cannot call non-@nogc destructor 'fail14486.S2a.~this'
-fail_compilation/fail14486.d(89): Error: pure function 'fail14486.test2a' cannot call impure deallocator 'fail14486.S3a.delete'
-fail_compilation/fail14486.d(89): Error: @safe function 'fail14486.test2a' cannot call @system deallocator 'fail14486.S3a.delete'
-fail_compilation/fail14486.d(89): Error: @nogc function 'fail14486.test2a' cannot call non-@nogc deallocator 'fail14486.S3a.delete'
----
-*/
void test2a() @nogc pure @safe
{
S0a* s0; delete s0; // error
S1a* s1; delete s1; // error
- S2a* s2; delete s2; // error
- S3a* s3; delete s3; // error
- S4a* s4; delete s4; // no error
}
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail14486.d(105): Error: destructor `fail14486.S1b.~this` is not nothrow
-fail_compilation/fail14486.d(106): Error: destructor `fail14486.S2b.~this` is not nothrow
-fail_compilation/fail14486.d(107): Error: deallocator `fail14486.S3b.delete` is not nothrow
-fail_compilation/fail14486.d(102): Error: nothrow function `fail14486.test2b` may throw
----
-*/
void test2b() nothrow
{
S0b* s0; delete s0; // no error
S1b* s1; delete s1; // error
- S2b* s2; delete s2; // error
- S3b* s3; delete s3; // error
- S4b* s4; delete s4; // no error
}
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail14486.d(127): Error: delete a0 is not @safe but is used in @safe function test3a
-fail_compilation/fail14486.d(128): Error: pure function 'fail14486.test3a' cannot call impure destructor 'fail14486.S1a.~this'
-fail_compilation/fail14486.d(128): Error: @safe function 'fail14486.test3a' cannot call @system destructor 'fail14486.S1a.~this'
-fail_compilation/fail14486.d(128): Error: @nogc function 'fail14486.test3a' cannot call non-@nogc destructor 'fail14486.S1a.~this'
-fail_compilation/fail14486.d(129): Error: pure function 'fail14486.test3a' cannot call impure destructor 'fail14486.S2a.~this'
-fail_compilation/fail14486.d(129): Error: @safe function 'fail14486.test3a' cannot call @system destructor 'fail14486.S2a.~this'
-fail_compilation/fail14486.d(129): Error: @nogc function 'fail14486.test3a' cannot call non-@nogc destructor 'fail14486.S2a.~this'
-fail_compilation/fail14486.d(130): Error: delete a3 is not @safe but is used in @safe function test3a
-fail_compilation/fail14486.d(131): Error: delete a4 is not @safe but is used in @safe function test3a
----
-*/
void test3a() @nogc pure @safe
{
S0a[] a0; delete a0; // error
S1a[] a1; delete a1; // error
- S2a[] a2; delete a2; // error
- S3a[] a3; delete a3; // error
- S4a[] a4; delete a4; // error
}
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail14486.d(145): Error: destructor `fail14486.S1b.~this` is not nothrow
-fail_compilation/fail14486.d(146): Error: destructor `fail14486.S2b.~this` is not nothrow
-fail_compilation/fail14486.d(142): Error: nothrow function `fail14486.test3b` may throw
----
-*/
void test3b() nothrow
{
S0b[] a0; delete a0; // no error
S1b[] a1; delete a1; // error
- S2b[] a2; delete a2; // error
- S3b[] a3; delete a3; // no error
- S4b[] a4; delete a4; // no error
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail145.d b/gcc/testsuite/gdc.test/fail_compilation/fail145.d
index 9d285dc..5a7a4ca 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail145.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail145.d
@@ -1,8 +1,9 @@
/*
+REQUIRED_ARGS: -checkaction=context
TEST_OUTPUT:
---
-fail_compilation/fail145.d(13): Error: assert(i < 0) failed
-fail_compilation/fail145.d(26): called from here: bar(7)
+fail_compilation/fail145.d(14): Error: `"assert(i && (i < 0)) failed"`
+fail_compilation/fail145.d(27): called from here: `bar(7)`
---
*/
@@ -10,7 +11,7 @@ fail_compilation/fail145.d(26): called from here: bar(7)
int bar(int i)
{
- assert(i < 0);
+ assert(i && i < 0);
foreach_reverse (k, v; "hello")
{
i <<= 1;
@@ -26,5 +27,5 @@ void main()
static b = bar(7);
auto c = bar(7);
//printf("b = %d, %d\n", b, c);
- assert(b == 674);
+ assert(b && b == 674);
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14554.d b/gcc/testsuite/gdc.test/fail_compilation/fail14554.d
index 5d4e96c..73b0a78 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail14554.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail14554.d
@@ -3,14 +3,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail14554.d(28): Error: fail14554.issue14554_1.foo called with argument types (int) matches both:
-fail_compilation/fail14554.d(17): fail14554.issue14554_1.foo!bool.foo(int j)
+fail_compilation/fail14554.d(28): Error: `fail14554.issue14554_1.foo` called with argument types `(int)` matches both:
+fail_compilation/fail14554.d(17): `fail14554.issue14554_1.foo!bool.foo(int j)`
and:
-fail_compilation/fail14554.d(18): fail14554.issue14554_1.foo!bool.foo(int j)
-fail_compilation/fail14554.d(29): Error: fail14554.issue14554_2.foo called with argument types (int) matches both:
-fail_compilation/fail14554.d(22): fail14554.issue14554_2.foo!bool.foo(int j)
+fail_compilation/fail14554.d(18): `fail14554.issue14554_1.foo!bool.foo(int j)`
+fail_compilation/fail14554.d(29): Error: `fail14554.issue14554_2.foo` called with argument types `(int)` matches both:
+fail_compilation/fail14554.d(22): `fail14554.issue14554_2.foo!bool.foo(int j)`
and:
-fail_compilation/fail14554.d(23): fail14554.issue14554_2.foo!bool.foo(int j)
+fail_compilation/fail14554.d(23): `fail14554.issue14554_2.foo!bool.foo(int j)`
---
*/
struct issue14554_1 {
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14669.d b/gcc/testsuite/gdc.test/fail_compilation/fail14669.d
index 8984001..c5ae8e7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail14669.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail14669.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail14669.d(11): Error: 'auto' can only be used as part of 'auto ref' for template function parameters
-fail_compilation/fail14669.d(16): Error: template instance fail14669.foo1!() error instantiating
-fail_compilation/fail14669.d(12): Error: 'auto' can only be used as part of 'auto ref' for template function parameters
-fail_compilation/fail14669.d(17): Error: template fail14669.foo2 cannot deduce function from argument types !()(int), candidates are:
-fail_compilation/fail14669.d(12): fail14669.foo2()(auto int a)
+fail_compilation/fail14669.d(11): Error: `auto` can only be used as part of `auto ref` for template function parameters
+fail_compilation/fail14669.d(16): Error: template instance `fail14669.foo1!()` error instantiating
+fail_compilation/fail14669.d(12): Error: `auto` can only be used as part of `auto ref` for template function parameters
+fail_compilation/fail14669.d(17): Error: template `fail14669.foo2` cannot deduce function from argument types `!()(int)`
+fail_compilation/fail14669.d(12): Candidate is: `foo2()(auto int a)`
---
*/
void foo1()(auto int a) {}
@@ -20,10 +20,10 @@ void test1()
/*
TEST_OUTPUT:
---
-fail_compilation/fail14669.d(29): Error: 'auto' can only be used as part of 'auto ref' for template function parameters
-fail_compilation/fail14669.d(38): Error: template instance fail14669.bar1!int error instantiating
-fail_compilation/fail14669.d(30): Error: 'auto' can only be used as part of 'auto ref' for template function parameters
-fail_compilation/fail14669.d(40): Error: template instance fail14669.bar2!int error instantiating
+fail_compilation/fail14669.d(29): Error: `auto` can only be used as part of `auto ref` for template function parameters
+fail_compilation/fail14669.d(38): Error: template instance `fail14669.bar1!int` error instantiating
+fail_compilation/fail14669.d(30): Error: `auto` can only be used as part of `auto ref` for template function parameters
+fail_compilation/fail14669.d(40): Error: template instance `fail14669.bar2!int` error instantiating
---
*/
void bar1(T)(auto ref T x) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14965.d b/gcc/testsuite/gdc.test/fail_compilation/fail14965.d
index f1a1ec1..37fc0fa 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail14965.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail14965.d
@@ -1,18 +1,18 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail14965.d(19): Error: forward reference to inferred return type of function 'foo1'
-fail_compilation/fail14965.d(20): Error: forward reference to inferred return type of function 'foo2'
-fail_compilation/fail14965.d(22): Error: forward reference to inferred return type of function 'bar1'
-fail_compilation/fail14965.d(23): Error: forward reference to inferred return type of function 'bar2'
-fail_compilation/fail14965.d(25): Error: forward reference to inferred return type of function 'baz1'
-fail_compilation/fail14965.d(26): Error: forward reference to inferred return type of function 'baz2'
-fail_compilation/fail14965.d(30): Error: forward reference to inferred return type of function 'foo1'
-fail_compilation/fail14965.d(31): Error: forward reference to inferred return type of function 'foo2'
-fail_compilation/fail14965.d(33): Error: forward reference to inferred return type of function 'bar1'
-fail_compilation/fail14965.d(34): Error: forward reference to inferred return type of function 'bar2'
-fail_compilation/fail14965.d(36): Error: forward reference to inferred return type of function 'baz1'
-fail_compilation/fail14965.d(37): Error: forward reference to inferred return type of function 'baz2'
+fail_compilation/fail14965.d(19): Error: forward reference to inferred return type of function `foo1`
+fail_compilation/fail14965.d(20): Error: forward reference to inferred return type of function `foo2`
+fail_compilation/fail14965.d(22): Error: forward reference to inferred return type of function `bar1`
+fail_compilation/fail14965.d(23): Error: forward reference to inferred return type of function `bar2`
+fail_compilation/fail14965.d(25): Error: forward reference to inferred return type of function `baz1`
+fail_compilation/fail14965.d(26): Error: forward reference to inferred return type of function `baz2`
+fail_compilation/fail14965.d(30): Error: forward reference to inferred return type of function `foo1`
+fail_compilation/fail14965.d(31): Error: forward reference to inferred return type of function `foo2`
+fail_compilation/fail14965.d(33): Error: forward reference to inferred return type of function `bar1`
+fail_compilation/fail14965.d(34): Error: forward reference to inferred return type of function `bar2`
+fail_compilation/fail14965.d(36): Error: forward reference to inferred return type of function `baz1`
+fail_compilation/fail14965.d(37): Error: forward reference to inferred return type of function `baz2`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14997.d b/gcc/testsuite/gdc.test/fail_compilation/fail14997.d
new file mode 100644
index 0000000..3654f04
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail14997.d
@@ -0,0 +1,20 @@
+// https://issues.dlang.org/show_bug.cgi?id=14997
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail14997.d(19): Error: none of the overloads of `this` are callable using argument types `()`
+fail_compilation/fail14997.d(14): Candidates are: `fail14997.Foo.this(int a)`
+fail_compilation/fail14997.d(15): `fail14997.Foo.this(string a)`
+---
+*/
+
+class Foo
+{
+ this (int a) {}
+ this (string a) {}
+}
+void main()
+{
+ auto a = new Foo;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15.d b/gcc/testsuite/gdc.test/fail_compilation/fail15.d
index 0386b9a..cd18485 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail15.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail15.d
@@ -6,7 +6,7 @@ fail_compilation/fail15.d(24): Error: cannot use `[]` operator on expression of
*/
/*
Segfault on DMD 0.095
-http://www.digitalmars.com/d/archives/digitalmars/D/bugs/926.html
+https://www.digitalmars.com/d/archives/digitalmars/D/bugs/926.html
*/
module test;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail150.d b/gcc/testsuite/gdc.test/fail_compilation/fail150.d
index 4a53053..6ba04c1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail150.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail150.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail150.d(22): Error: e.new is only for allocating nested classes
+fail_compilation/fail150.d(22): Error: `.new` is only for allocating nested classes
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15068.d b/gcc/testsuite/gdc.test/fail_compilation/fail15068.d
new file mode 100644
index 0000000..ca555b0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail15068.d
@@ -0,0 +1,18 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail15068.d(17): Error: `T!int` is not a valid template instance, because `T` is not a template declaration but a type (`T == int`)
+fail_compilation/fail15068.d(13): Error: template instance `fail15068.Stuff!int` error instantiating
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=15068
+
+void main()
+{
+ Stuff!int s;
+}
+struct Stuff(T)
+{
+ T!int var;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15292.d b/gcc/testsuite/gdc.test/fail_compilation/fail15292.d
deleted file mode 100644
index 3b3602f..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail15292.d
+++ /dev/null
@@ -1,28 +0,0 @@
-// REQUIRED_ARGS: -o-
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail15292.d(27): Error: cannot compare S15292 because its auto generated member-wise equality has recursive definition
----
-*/
-
-struct NullableRef15292(T)
-{
- inout(T) get() inout
- {
- assert(false);
- }
-
- alias get this;
-}
-
-struct S15292
-{
- NullableRef15292!S15292 n;
-}
-
-void main()
-{
- S15292 s;
- assert(s == s);
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail153.d b/gcc/testsuite/gdc.test/fail_compilation/fail153.d
index 8e397e3..96cd383 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail153.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail153.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail153.d(10): Error: class fail153.Bar cannot inherit from final class Foo
+fail_compilation/fail153.d(10): Error: class `fail153.Bar` cannot inherit from class `Foo` because it is `final`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail154.d b/gcc/testsuite/gdc.test/fail_compilation/fail154.d
index 8b5fefc..ee9eb42 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail154.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail154.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail154.d(18): Error: template instance X!(MYP!int) does not match template declaration X(T : Policy!T, alias Policy)
+fail_compilation/fail154.d(18): Error: template instance `X!(MYP!int)` does not match template declaration `X(T : Policy!T, alias Policy)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail155.d b/gcc/testsuite/gdc.test/fail_compilation/fail155.d
index cc1e03c..6d8f184 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail155.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail155.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail155.d(19): Error: overlapping initialization for y
+fail_compilation/fail155.d(20): Error: overlapping initialization for `y`
+fail_compilation/fail155.d(20): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15535.d b/gcc/testsuite/gdc.test/fail_compilation/fail15535.d
index d53e4d7..6f71a92 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail15535.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail15535.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail15535.d(17): Error: goto default not allowed in final switch statement
+fail_compilation/fail15535.d(17): Error: `goto default` not allowed in `final switch` statement
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15550.d b/gcc/testsuite/gdc.test/fail_compilation/fail15550.d
index e20a7f2..f7b910c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail15550.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail15550.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail15550.d(25): Error: partial template instance foo!int has no type
-fail_compilation/fail15550.d(26): Error: partial template instance opDispatch!"_isMatrix" has no type
-fail_compilation/fail15550.d(27): Error: partial template instance baz!"_isMatrix" has no type
+fail_compilation/fail15550.d(25): Error: partial template instance `foo!int` has no type
+fail_compilation/fail15550.d(26): Error: partial template instance `opDispatch!"_isMatrix"` has no type
+fail_compilation/fail15550.d(27): Error: partial template instance `baz!"_isMatrix"` has no type
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail156.d b/gcc/testsuite/gdc.test/fail_compilation/fail156.d
index cfd5b83..bfc2383b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail156.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail156.d
@@ -2,8 +2,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail156.d(33): Error: overlapping initialization for y
-fail_compilation/fail156.d(40): Error: overlapping initialization for y
+fail_compilation/fail156.d(35): Error: overlapping initialization for `y`
+fail_compilation/fail156.d(35): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized
+fail_compilation/fail156.d(42): Error: overlapping initialization for `y`
+fail_compilation/fail156.d(42): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15616a.d b/gcc/testsuite/gdc.test/fail_compilation/fail15616a.d
index 9726e3df..e047365 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail15616a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail15616a.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail15616a.d(41): Error: none of the overloads of 'foo' are callable using argument types (double), candidates are:
-fail_compilation/fail15616a.d(14): fail15616a.foo(int a)
-fail_compilation/fail15616a.d(17): fail15616a.foo(int a, int b)
-fail_compilation/fail15616a.d(26): fail15616a.foo(int a, int b, int c)
-fail_compilation/fail15616a.d(29): fail15616a.foo(string a)
-fail_compilation/fail15616a.d(32): fail15616a.foo(string a, string b)
+fail_compilation/fail15616a.d(41): Error: none of the overloads of `foo` are callable using argument types `(double)`
+fail_compilation/fail15616a.d(14): Candidates are: `fail15616a.foo(int a)`
+fail_compilation/fail15616a.d(17): `fail15616a.foo(int a, int b)`
+fail_compilation/fail15616a.d(26): `fail15616a.foo(int a, int b, int c)`
+fail_compilation/fail15616a.d(29): `fail15616a.foo(string a)`
+fail_compilation/fail15616a.d(32): `fail15616a.foo(string a, string b)`
fail_compilation/fail15616a.d(41): ... (3 more, -v to show) ...
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15616b.d b/gcc/testsuite/gdc.test/fail_compilation/fail15616b.d
index 4776f40..faad0f1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail15616b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail15616b.d
@@ -1,19 +1,33 @@
/*
REQUIRED_ARGS: -v
+TRANSFORM_OUTPUT: remove_lines("^(predefs|binary|version|config|DFLAG|parse|import|semantic|entry|\s*$)")
TEST_OUTPUT:
---
-fail_compilation/fail15616b.d(43): Error: none of the overloads of 'foo' are callable using argument types (double), candidates are:
-fail_compilation/fail15616b.d(16): fail15616b.foo(int a)
-fail_compilation/fail15616b.d(19): fail15616b.foo(int a, int b)
-fail_compilation/fail15616b.d(28): fail15616b.foo(int a, int b, int c)
-fail_compilation/fail15616b.d(31): fail15616b.foo(string a)
-fail_compilation/fail15616b.d(34): fail15616b.foo(string a, string b)
-fail_compilation/fail15616b.d(37): fail15616b.foo(string a, string b, string c)
-fail_compilation/fail15616b.d(22): fail15616b.foo(T)(T a) if (is(T == float))
-fail_compilation/fail15616b.d(25): fail15616b.foo(T)(T a) if (is(T == char))
+fail_compilation/fail15616b.d(44): Error: none of the overloads of `foo` are callable using argument types `(double)`
+fail_compilation/fail15616b.d(17): Candidates are: `fail15616b.foo(int a)`
+fail_compilation/fail15616b.d(20): `fail15616b.foo(int a, int b)`
+fail_compilation/fail15616b.d(29): `fail15616b.foo(int a, int b, int c)`
+fail_compilation/fail15616b.d(32): `fail15616b.foo(string a)`
+fail_compilation/fail15616b.d(35): `fail15616b.foo(string a, string b)`
+fail_compilation/fail15616b.d(38): `fail15616b.foo(string a, string b, string c)`
+fail_compilation/fail15616b.d(23): `foo(T)(T a)`
+ with `T = double`
+ whose parameters have the following constraints:
+ `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
+` > is(T == float)
+` `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
+fail_compilation/fail15616b.d(26): `foo(T)(T a)`
+ with `T = double`
+ whose parameters have the following constraints:
+ `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
+` > is(T == char)
+` `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
+fail_compilation/fail15616b.d(44): All possible candidates are marked as `deprecated` or `@disable`
+ Tip: not satisfied constraints are marked with `>`
---
*/
+#line 17
void foo(int a)
{}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15626.d b/gcc/testsuite/gdc.test/fail_compilation/fail15626.d
index 3b70205..8ef14cd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail15626.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail15626.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail15626.d(12): Error: class fail15626.D C++ base class C needs at least one virtual function
+fail_compilation/fail15626.d(12): Error: class `fail15626.D` C++ base class `C` needs at least one virtual function
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15667.d b/gcc/testsuite/gdc.test/fail_compilation/fail15667.d
index f23963f..ce4940f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail15667.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail15667.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -o-
+// EXTRA_FILES: imports/a15667.d
/*
TEST_OUTPUT:
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15691.d b/gcc/testsuite/gdc.test/fail_compilation/fail15691.d
new file mode 100644
index 0000000..a20e1b5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail15691.d
@@ -0,0 +1,24 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail15691.d(15): Error: `c` is not a member of `Foo`
+fail_compilation/fail15691.d(20): Error: `bc` is not a member of `Foo`, did you mean variable `abc`?
+---
+*/
+
+struct Foo { int a; int abc; }
+
+void main()
+{
+ Foo z = { // line 13
+ a: 3,
+ c: 4, // line 15
+ };
+
+ Foo z2 = { // line 18
+ a: 3,
+ bc: 4, // line 20
+ };
+}
+
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15755.d b/gcc/testsuite/gdc.test/fail_compilation/fail15755.d
new file mode 100644
index 0000000..8fd2b51
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail15755.d
@@ -0,0 +1,29 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail15755.d(28): Error: `tuple(123)` has no effect
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=15755
+
+struct Foo
+{
+ @(123)
+ int a;
+}
+
+template Attributes(As...)
+{
+ alias Attributes = As;
+}
+
+template getattribute(alias member, alias attrs = Attributes!(__traits(getAttributes, member)))
+{
+ alias getattribute = attrs;
+}
+
+void main()
+{
+ getattribute!(__traits(getMember, Foo, "a"));
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail158.d b/gcc/testsuite/gdc.test/fail_compilation/fail158.d
index 353874f..6f09f65 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail158.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail158.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail158.d(17): Error: more initializers than fields (2) of S
+fail_compilation/fail158.d(17): Error: more initializers than fields (2) of `S`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail159.d b/gcc/testsuite/gdc.test/fail_compilation/fail159.d
index 13be8ee..a100606 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail159.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail159.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail159.d(24): Error: static assert `foo(S(1, 5), S(1, 4)) == 0` is false
+fail_compilation/fail159.d(24): Error: static assert: `foo(S(1, 5), S(1, 4)) == 0` is false
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail160.d b/gcc/testsuite/gdc.test/fail_compilation/fail160.d
index 1e2414c..c07c8d3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail160.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail160.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail160.d(22): Error: typeid(fail160.Foo).vtbl is not yet implemented at compile time
+fail_compilation/fail160.d(22): Error: `typeid(fail160.Foo).vtbl` is not yet implemented at compile time
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail16001.d b/gcc/testsuite/gdc.test/fail_compilation/fail16001.d
new file mode 100644
index 0000000..ef5fc7b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail16001.d
@@ -0,0 +1,13 @@
+// REQUIRED_ARGS: -de
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail16001.d(10): Deprecation: Using `(args) => { ... }` to create a delegate that returns a delegate is error-prone.
+fail_compilation/fail16001.d(10): Use `(args) { ... }` for a multi-statement function literal or use `(args) => () { }` if you intended for the lambda to return a delegate.
+---
+*/
+void main() {
+ auto fail = () => {};
+ auto ok = () => () {};
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail161.d b/gcc/testsuite/gdc.test/fail_compilation/fail161.d
index d0aa940..ecbf691 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail161.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail161.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail161.d(15): Error: template instance MetaString!"2 == 1" does not match template declaration MetaString(String)
+fail_compilation/fail161.d(15): Error: template instance `MetaString!"2 == 1"` does not match template declaration `MetaString(String)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail162.d b/gcc/testsuite/gdc.test/fail_compilation/fail162.d
index f49fbac..663e0e1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail162.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail162.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail162.d(25): Error: template fail162.testHelper cannot deduce function from argument types !()(string, string), candidates are:
-fail_compilation/fail162.d(10): fail162.testHelper(A...)()
-fail_compilation/fail162.d(30): Error: template instance fail162.test!("hello", "world") error instantiating
+fail_compilation/fail162.d(25): Error: template `fail162.testHelper` cannot deduce function from argument types `!()(string, string)`
+fail_compilation/fail162.d(10): Candidate is: `testHelper(A...)()`
+fail_compilation/fail162.d(30): Error: template instance `fail162.test!("hello", "world")` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail16206a.d b/gcc/testsuite/gdc.test/fail_compilation/fail16206a.d
index 3c1cc56..d28a8c3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail16206a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail16206a.d
@@ -1,12 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail16206a.d(12): Error: `bool` expected as third argument of `__traits(getOverloads)`, not `"Not a bool"` of type `string`
+fail_compilation/fail16206a.d(14): Error: `bool` expected as third argument of `__traits(getOverloads)`, not `"Not a bool"` of type `string`
---
*/
-struct S {
+struct S
+{
static int foo()() { return 0; }
}
+
alias AliasSeq(T...) = T;
-alias allFoos = AliasSeq!(__traits(getOverloads, S, "foo", "Not a bool")); \ No newline at end of file
+alias allFoos = AliasSeq!(__traits(getOverloads, S, "foo", "Not a bool"));
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail16206b.d b/gcc/testsuite/gdc.test/fail_compilation/fail16206b.d
index 9b3a69c..0f20ad5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail16206b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail16206b.d
@@ -1,12 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail16206b.d(12): Error: expected 2 arguments for `hasMember` but had 3
+fail_compilation/fail16206b.d(14): Error: expected 2 arguments for `hasMember` but had 3
---
*/
-struct S {
+struct S
+{
static int foo()() { return 0; }
}
+
alias AliasSeq(T...) = T;
-alias allFoos = AliasSeq!(__traits(hasMember, S, "foo", true)); \ No newline at end of file
+alias allFoos = AliasSeq!(__traits(hasMember, S, "foo", true));
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail163.d b/gcc/testsuite/gdc.test/fail_compilation/fail163.d
index c2eb1fd..7f8f028 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail163.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail163.d
@@ -27,7 +27,7 @@ void test2()
/*
TEST_OUTPUT:
---
-fail_compilation/fail163.d(37): Error: cannot modify const expression p
+fail_compilation/fail163.d(37): Error: cannot modify `const` expression `p`
---
*/
void test3()
@@ -53,7 +53,7 @@ void test4()
/*
TEST_OUTPUT:
---
-fail_compilation/fail163.d(63): Error: cannot modify const expression *p
+fail_compilation/fail163.d(63): Error: cannot modify `const` expression `*p`
---
*/
void test5()
@@ -67,7 +67,7 @@ void test5()
TEST_OUTPUT:
---
fail_compilation/fail163.d(76): Error: cannot implicitly convert expression `& x` of type `int*` to `immutable(int)*`
-fail_compilation/fail163.d(77): Error: cannot modify immutable expression *p
+fail_compilation/fail163.d(77): Error: cannot modify `immutable` expression `*p`
---
*/
void test6()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail16600.d b/gcc/testsuite/gdc.test/fail_compilation/fail16600.d
index a7f30d9..a4bc739 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail16600.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail16600.d
@@ -1,9 +1,9 @@
/* TEST_OUTPUT:
---
-fail_compilation/fail16600.d(22): Error: fail16600.S.__ctor called with argument types (string) const matches both:
-fail_compilation/fail16600.d(16): fail16600.S.this(string _param_0)
+fail_compilation/fail16600.d(22): Error: `fail16600.S.__ctor` called with argument types `(string) const` matches both:
+fail_compilation/fail16600.d(16): `fail16600.S.this(string _param_0)`
and:
-fail_compilation/fail16600.d(17): fail16600.S.this(string _param_0) immutable
+fail_compilation/fail16600.d(17): `fail16600.S.this(string _param_0) immutable`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail16689.d b/gcc/testsuite/gdc.test/fail_compilation/fail16689.d
new file mode 100644
index 0000000..f8e0bae
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail16689.d
@@ -0,0 +1,14 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail16689.d(3): Error: static assert: "false"
+fail_compilation/fail16689.d(6): instantiated from here: `Issue16689!()`
+---
+*/
+#line 1
+mixin template Issue16689()
+{
+ static assert(false, "false");
+}
+
+mixin Issue16689!();
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail169.d b/gcc/testsuite/gdc.test/fail_compilation/fail169.d
index bd1da0b..a8ad102 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail169.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail169.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail169.d(8): Error: cannot have const out parameter of type const(int)
+fail_compilation/fail169.d(8): Error: cannot have `const out` parameter of type `const(int)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail16997.d b/gcc/testsuite/gdc.test/fail_compilation/fail16997.d
new file mode 100644
index 0000000..279d9da
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail16997.d
@@ -0,0 +1,59 @@
+/*
+REQUIRED_ARGS: -de -revert=intpromote
+TEST_OUTPUT:
+---
+fail_compilation/fail16997.d(31): Deprecation: integral promotion not done for `~c`, remove '-revert=intpromote' switch or `~cast(int)(c)`
+fail_compilation/fail16997.d(32): Deprecation: integral promotion not done for `-c`, remove '-revert=intpromote' switch or `-cast(int)(c)`
+fail_compilation/fail16997.d(33): Deprecation: integral promotion not done for `+c`, remove '-revert=intpromote' switch or `+cast(int)(c)`
+fail_compilation/fail16997.d(36): Deprecation: integral promotion not done for `~w`, remove '-revert=intpromote' switch or `~cast(int)(w)`
+fail_compilation/fail16997.d(37): Deprecation: integral promotion not done for `-w`, remove '-revert=intpromote' switch or `-cast(int)(w)`
+fail_compilation/fail16997.d(38): Deprecation: integral promotion not done for `+w`, remove '-revert=intpromote' switch or `+cast(int)(w)`
+fail_compilation/fail16997.d(41): Deprecation: integral promotion not done for `~sb`, remove '-revert=intpromote' switch or `~cast(int)(sb)`
+fail_compilation/fail16997.d(42): Deprecation: integral promotion not done for `-sb`, remove '-revert=intpromote' switch or `-cast(int)(sb)`
+fail_compilation/fail16997.d(43): Deprecation: integral promotion not done for `+sb`, remove '-revert=intpromote' switch or `+cast(int)(sb)`
+fail_compilation/fail16997.d(46): Deprecation: integral promotion not done for `~ub`, remove '-revert=intpromote' switch or `~cast(int)(ub)`
+fail_compilation/fail16997.d(47): Deprecation: integral promotion not done for `-ub`, remove '-revert=intpromote' switch or `-cast(int)(ub)`
+fail_compilation/fail16997.d(48): Deprecation: integral promotion not done for `+ub`, remove '-revert=intpromote' switch or `+cast(int)(ub)`
+fail_compilation/fail16997.d(51): Deprecation: integral promotion not done for `~s`, remove '-revert=intpromote' switch or `~cast(int)(s)`
+fail_compilation/fail16997.d(52): Deprecation: integral promotion not done for `-s`, remove '-revert=intpromote' switch or `-cast(int)(s)`
+fail_compilation/fail16997.d(53): Deprecation: integral promotion not done for `+s`, remove '-revert=intpromote' switch or `+cast(int)(s)`
+fail_compilation/fail16997.d(56): Deprecation: integral promotion not done for `~us`, remove '-revert=intpromote' switch or `~cast(int)(us)`
+fail_compilation/fail16997.d(57): Deprecation: integral promotion not done for `-us`, remove '-revert=intpromote' switch or `-cast(int)(us)`
+fail_compilation/fail16997.d(58): Deprecation: integral promotion not done for `+us`, remove '-revert=intpromote' switch or `+cast(int)(us)`
+---
+*/
+
+void test()
+{
+ int x;
+
+ char c;
+ x = ~c;
+ x = -c;
+ x = +c;
+
+ wchar w;
+ x = ~w;
+ x = -w;
+ x = +w;
+
+ byte sb;
+ x = ~sb;
+ x = -sb;
+ x = +sb;
+
+ ubyte ub;
+ x = ~ub;
+ x = -ub;
+ x = +ub;
+
+ short s;
+ x = ~s;
+ x = -s;
+ x = +s;
+
+ ushort us;
+ x = ~us;
+ x = -us;
+ x = +us;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail170.d b/gcc/testsuite/gdc.test/fail_compilation/fail170.d
index a78fc03..61c7ae6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail170.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail170.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail170.d(8): Error: variable fail170.foo.x cannot be final, perhaps you meant const?
+fail_compilation/fail170.d(8): Error: variable `fail170.foo.x` cannot be `final`, perhaps you meant `const`?
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail172.d b/gcc/testsuite/gdc.test/fail_compilation/fail172.d
index c7ccdc1..9862fe8 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail172.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail172.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail172.d(25): Error: cannot modify const expression c1.x
-fail_compilation/fail172.d(26): Error: cannot modify const expression c2.x
-fail_compilation/fail172.d(30): Error: cannot modify const expression s1.x
-fail_compilation/fail172.d(31): Error: cannot modify const expression s2.x
+fail_compilation/fail172.d(25): Error: cannot modify `const` expression `c1.x`
+fail_compilation/fail172.d(26): Error: cannot modify `const` expression `c2.x`
+fail_compilation/fail172.d(30): Error: cannot modify `const` expression `s1.x`
+fail_compilation/fail172.d(31): Error: cannot modify `const` expression `s2.x`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17275.d b/gcc/testsuite/gdc.test/fail_compilation/fail17275.d
index fcccdf2..fd7623f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail17275.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17275.d
@@ -1,7 +1,7 @@
/* TEST_OUTPUT:
---
fail_compilation/fail17275.d(12): Error: undefined identifier `ModuleGroup`, did you mean function `moduleGroup`?
-fail_compilation/fail17275.d(12): Error: inout on return means inout must be on a parameter as well for inout(ModuleGroup)()
+fail_compilation/fail17275.d(12): Error: `inout` on `return` means `inout` must be on a parameter as well for `inout(ModuleGroup)()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17354.d b/gcc/testsuite/gdc.test/fail_compilation/fail17354.d
index e09f1e5..fd44e65 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail17354.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17354.d
@@ -1,8 +1,7 @@
-/* REQUIRED_ARGS: -de
- * TEST_OUTPUT:
+/* TEST_OUTPUT:
---
-fail_compilation/fail17354.d(13): Deprecation: cannot implicitly override base class method `object.Object.opEquals` with `fail17354.Foo.opEquals`; add `override` attribute
-fail_compilation/fail17354.d(18): Deprecation: cannot implicitly override base class method `object.Object.opEquals` with `fail17354.Bar.opEquals`; add `override` attribute
+fail_compilation/fail17354.d(12): Error: cannot implicitly override base class method `object.Object.opEquals` with `fail17354.Foo.opEquals`; add `override` attribute
+fail_compilation/fail17354.d(17): Error: cannot implicitly override base class method `object.Object.opEquals` with `fail17354.Bar.opEquals`; add `override` attribute
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17491.d b/gcc/testsuite/gdc.test/fail_compilation/fail17491.d
index 4902392..0fb9708 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail17491.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17491.d
@@ -1,18 +1,16 @@
/* TEST_OUTPUT:
---
-fail_compilation/fail17491.d(24): Error: (S17491).init is not an lvalue
-fail_compilation/fail17491.d(25): Error: S17491(0) is not an lvalue
-fail_compilation/fail17491.d(27): Error: constant S17491(0).field is not an lvalue
-fail_compilation/fail17491.d(28): Error: constant *&S17491(0).field is not an lvalue
-fail_compilation/fail17491.d(33): Error: S17491(0) is not an lvalue
-fail_compilation/fail17491.d(34): Error: S17491(0) is not an lvalue
-fail_compilation/fail17491.d(36): Error: constant S17491(0).field is not an lvalue
-fail_compilation/fail17491.d(37): Error: constant *&S17491(0).field is not an lvalue
+fail_compilation/fail17491.d(22): Error: `(S17491).init` is not an lvalue and cannot be modified
+fail_compilation/fail17491.d(23): Error: `S17491(0)` is not an lvalue and cannot be modified
+fail_compilation/fail17491.d(25): Error: `S17491(0).field` is not an lvalue and cannot be modified
+fail_compilation/fail17491.d(26): Error: `S17491(0).field` is not an lvalue and cannot be modified
+fail_compilation/fail17491.d(31): Error: `S17491(0)` is not an lvalue and cannot be modified
+fail_compilation/fail17491.d(32): Error: `S17491(0)` is not an lvalue and cannot be modified
+fail_compilation/fail17491.d(34): Error: `S17491(0).field` is not an lvalue and cannot be modified
+fail_compilation/fail17491.d(35): Error: `S17491(0).field` is not an lvalue and cannot be modified
---
*/
-
// https://issues.dlang.org/show_bug.cgi?id=17491
-
struct S17491
{
int field;
@@ -25,7 +23,7 @@ void test17491()
*&S17491.init = S17491(42); // NG
S17491.init.field = 42; // NG
- *&S17491.init.field = 42; // Should be NG
+ *&S17491.init.field = 42; // NG
S17491.init.var = 42; // OK
*&S17491.init.var = 42; // OK
@@ -34,7 +32,7 @@ void test17491()
*&S17491(0) = S17491(42); // NG
S17491(0).field = 42; // NG
- *&S17491(0).field = 42; // Should be NG
+ *&S17491(0).field = 42; // NG
S17491(0).var = 42; // OK
*&S17491(0).var = 42; // OK
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17492.d b/gcc/testsuite/gdc.test/fail_compilation/fail17492.d
index 80e9e2a..7236c22 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail17492.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17492.d
@@ -1,7 +1,9 @@
-/* TEST_OUTPUT:
+/*
+REQUIRED_ARGS: -de
+TEST_OUTPUT:
---
-fail_compilation/fail17492.d(20): Error: class `fail17492.C.testE.I` already exists at fail17492.d(13). Perhaps in another function with the same name?
-fail_compilation/fail17492.d(37): Error: struct `fail17492.S.testE.I` already exists at fail17492.d(30). Perhaps in another function with the same name?
+fail_compilation/fail17492.d(20): Error: function `fail17492.C.testE()` conflicts with previous declaration at fail_compilation/fail17492.d(13)
+fail_compilation/fail17492.d(37): Error: function `fail17492.S.testE()` conflicts with previous declaration at fail_compilation/fail17492.d(30)
---
https://issues.dlang.org/show_bug.cgi?id=17492
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17502.d b/gcc/testsuite/gdc.test/fail_compilation/fail17502.d
index b1366d1..49db4fc 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail17502.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17502.d
@@ -11,9 +11,9 @@ class Foo
{
void foo()
out (res) { assert(res > 5); }
- body {}
+ do {}
auto bar()
out (res) { assert (res > 5); }
- body { return; }
+ do { return; }
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17518.d b/gcc/testsuite/gdc.test/fail_compilation/fail17518.d
new file mode 100644
index 0000000..385483c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17518.d
@@ -0,0 +1,22 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail17518.d(21): Error: constructor `fail17518.S.this(inout(Correct) _param_0) inout` is not callable using argument types `(Wrong)`
+fail_compilation/fail17518.d(21): cannot pass argument `Wrong()` of type `Wrong` to parameter `inout(Correct) _param_0`
+---
+*/
+
+struct S
+{
+ this(inout Correct) inout
+ {
+ }
+}
+
+struct Correct {}
+struct Wrong {}
+
+S bug()
+{
+ return S(Wrong());
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17570.d b/gcc/testsuite/gdc.test/fail_compilation/fail17570.d
new file mode 100644
index 0000000..bee61cf
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17570.d
@@ -0,0 +1,13 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail17570.d(11): Error: cannot use function constraints for non-template functions. Use `static if` instead
+fail_compilation/fail17570.d(11): Error: declaration expected, not `if`
+fail_compilation/fail17570.d(14): Error: `}` expected following members in `struct` declaration at fail_compilation/fail17570.d(10)
+---
+*/
+
+struct S(T) {
+ void func() if(isIntegral!T)
+ {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail176.d b/gcc/testsuite/gdc.test/fail_compilation/fail176.d
index 908d08c..797407e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail176.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail176.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail176.d(13): Error: cannot modify immutable expression a[1]
-fail_compilation/fail176.d(16): Error: cannot modify immutable expression b[1]
-fail_compilation/fail176.d(19): Error: cannot modify const expression c[1]
+fail_compilation/fail176.d(13): Error: cannot modify `immutable` expression `a[1]`
+fail_compilation/fail176.d(16): Error: cannot modify `immutable` expression `b[1]`
+fail_compilation/fail176.d(19): Error: cannot modify `const` expression `c[1]`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17602.d b/gcc/testsuite/gdc.test/fail_compilation/fail17602.d
new file mode 100644
index 0000000..6423d1b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17602.d
@@ -0,0 +1,18 @@
+/*
+EXTRA_FILES: imports/imp17602.d
+TEST_OUTPUT:
+---
+fail_compilation/fail17602.d(17): Error: cannot implicitly convert expression `Status.on` of type `imports.imp17602.Status` to `fail17602.Status`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=17602
+
+import imports.imp17602;
+
+enum Status { off }
+
+void main()
+{
+ Status status = imports.imp17602.Status.on;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17612.d b/gcc/testsuite/gdc.test/fail_compilation/fail17612.d
index 4ae1e0a..d39dd51 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail17612.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17612.d
@@ -1,7 +1,7 @@
/* TEST_OUTPUT:
---
fail_compilation/fail17612.d(14): Error: undefined identifier `string`
-fail_compilation/fail17612.d(17): Error: class object.TypeInfo missing or corrupt object.d
+fail_compilation/fail17612.d(17): Error: class `object.TypeInfo` missing or corrupt object.d
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17625.d b/gcc/testsuite/gdc.test/fail_compilation/fail17625.d
new file mode 100644
index 0000000..bb69462
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17625.d
@@ -0,0 +1,17 @@
+/*
+EXTRA_FILES: imports/a17625.d imports/b17625.d
+TEST_OUTPUT:
+---
+fail_compilation/fail17625.d(16): Error: undefined identifier `boo`
+---
+*/
+
+module fail17625;
+
+import imports.a17625;
+import imports.b17625;
+
+void main()
+{
+ boo();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17646.d b/gcc/testsuite/gdc.test/fail_compilation/fail17646.d
index 416b0d4..3571e38 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail17646.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17646.d
@@ -1,12 +1,12 @@
/*
REQUIRED_ARGS: -o-
-PERMUTE_ARGS:
+EXTRA_FILES: imports/fail17646.d
TEST_OUTPUT:
---
fail_compilation/imports/fail17646.d(10): Error: found `}` instead of statement
-fail_compilation/imports/fail17646.d(7): Error: function imports.fail17646.allTestData!"".allTestData has no return statement, but is expected to return a value of type const(TestData)[]
-fail_compilation/fail17646.d(16): Error: template instance imports.fail17646.allTestData!"" error instantiating
-fail_compilation/fail17646.d(19): instantiated from here: runTests!""
+fail_compilation/imports/fail17646.d(7): Error: function `imports.fail17646.allTestData!"".allTestData` has no `return` statement, but is expected to return a value of type `const(TestData)[]`
+fail_compilation/fail17646.d(16): Error: template instance `imports.fail17646.allTestData!""` error instantiating
+fail_compilation/fail17646.d(19): instantiated from here: `runTests!""`
---
*/
int runTests(Modules...)()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail177.d b/gcc/testsuite/gdc.test/fail_compilation/fail177.d
index 1e12077..49edf4d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail177.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail177.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail177.d(22): Error: cannot modify immutable expression j
-fail_compilation/fail177.d(24): Error: cannot modify const expression i
-fail_compilation/fail177.d(26): Error: cannot modify const expression s1.x
-fail_compilation/fail177.d(27): Error: cannot modify const expression *s1.p
-fail_compilation/fail177.d(29): Error: cannot modify const expression s2.x
-fail_compilation/fail177.d(30): Error: cannot modify const expression *s2.p
+fail_compilation/fail177.d(22): Error: cannot modify `immutable` expression `j`
+fail_compilation/fail177.d(24): Error: cannot modify `const` expression `i`
+fail_compilation/fail177.d(26): Error: cannot modify `const` expression `s1.x`
+fail_compilation/fail177.d(27): Error: cannot modify `const` expression `*s1.p`
+fail_compilation/fail177.d(29): Error: cannot modify `const` expression `s2.x`
+fail_compilation/fail177.d(30): Error: cannot modify `const` expression `*s2.p`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17722a.d b/gcc/testsuite/gdc.test/fail_compilation/fail17722a.d
index b6ede29..7e0b911 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail17722a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17722a.d
@@ -1,6 +1,6 @@
/* TEST_OUTPUT:
---
-fail_compilation/fail17722a.d(12): Error: static assert `__traits(compiles, a1 && a2)` is false
+fail_compilation/fail17722a.d(12): Error: static assert: `__traits(compiles, a1 && a2)` is false
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17722b.d b/gcc/testsuite/gdc.test/fail_compilation/fail17722b.d
index 848db15..171c49f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail17722b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17722b.d
@@ -1,6 +1,6 @@
/* TEST_OUTPUT:
---
-fail_compilation/fail17722b.d(12): Error: static assert `__traits(compiles, a1 || a2)` is false
+fail_compilation/fail17722b.d(12): Error: static assert: `__traits(compiles, a1 || a2)` is false
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17842.d b/gcc/testsuite/gdc.test/fail_compilation/fail17842.d
new file mode 100644
index 0000000..ef66858
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17842.d
@@ -0,0 +1,29 @@
+/* REQUIRED_ARGS: -preview=dip1000
+ * TEST_OUTPUT:
+---
+fail_compilation/fail17842.d(14): Error: scope variable `p` assigned to non-scope `*q`
+fail_compilation/fail17842.d(23): Error: scope variable `obj` may not be copied into allocated memory
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=17842
+
+void* testp(scope void* p) @safe
+{
+ scope void** q;
+ *q = p; // error
+ void** t;
+ *t = *q;
+ return *t;
+}
+
+Object testobj(scope Object obj) @safe
+{
+ scope Object[] arr;
+ arr ~= obj; // error
+ Object[] array;
+ array ~= arr;
+ return array[0];
+}
+
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail179.d b/gcc/testsuite/gdc.test/fail_compilation/fail179.d
index bd0e155..0c9c248 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail179.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail179.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail179.d(11): Error: variable fail179.main.px cannot be final, perhaps you meant const?
+fail_compilation/fail179.d(11): Error: variable `fail179.main.px` cannot be `final`, perhaps you meant `const`?
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17927.d b/gcc/testsuite/gdc.test/fail_compilation/fail17927.d
new file mode 100644
index 0000000..348d473
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17927.d
@@ -0,0 +1,24 @@
+/* REQUIRED_ARGS: -preview=dip1000
+ * TEST_OUTPUT:
+---
+fail_compilation/fail17927.d(13): Error: scope variable `this` may not be returned
+fail_compilation/fail17927.d(21): Error: scope variable `ptr` may not be returned
+fail_compilation/fail17927.d(23): Error: scope variable `ptr` may not be returned
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=17927
+
+struct String {
+ const(char)* mem1() const scope @safe { return ptr; }
+
+ inout(char)* mem2() inout scope @safe { return ptr; } // no error because `ref inout` implies `return`
+
+ char* ptr;
+}
+
+
+const(char)* foo1(scope const(char)* ptr) @safe { return ptr; }
+
+inout(char)* foo2(scope inout(char)* ptr) @safe { return ptr; }
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17955.d b/gcc/testsuite/gdc.test/fail_compilation/fail17955.d
new file mode 100644
index 0000000..f33149e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17955.d
@@ -0,0 +1,102 @@
+// https://issues.dlang.org/show_bug.cgi?id=17955
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail17955.d(81): Error: cannot create instance of abstract class `SimpleTimeZone`
+fail_compilation/fail17955.d(81): function `bool hasDST()` is not implemented
+fail_compilation/fail17955.d(93): Error: template instance `fail17955.SimpleTimeZone.fromISOExtString!dstring` error instantiating
+fail_compilation/fail17955.d(25): instantiated from here: `fromISOExtString!string`
+fail_compilation/fail17955.d(56): instantiated from here: `isISOExtStringSerializable!(SysTime)`
+fail_compilation/fail17955.d(49): instantiated from here: `toRedis!(SysTime)`
+fail_compilation/fail17955.d(40): ... (2 instantiations, -v to show) ...
+fail_compilation/fail17955.d(32): instantiated from here: `indicesOf!(isRedisType, resetCodeExpireTime)`
+fail_compilation/fail17955.d(67): instantiated from here: `RedisStripped!(User, true)`
+fail_compilation/fail17955.d(93): Error: need `this` for `fromISOExtString` of type `pure nothrow @nogc @safe immutable(SimpleTimeZone)(dstring _param_0)`
+fail_compilation/fail17955.d(95): Error: undefined identifier `DateTimeException`
+fail_compilation/fail17955.d(25): Error: variable `fail17955.isISOExtStringSerializable!(SysTime).isISOExtStringSerializable` type `void` is inferred from initializer `fromISOExtString("")`, and variables cannot be of type `void`
+fail_compilation/fail17955.d(54): Error: function `fail17955.toRedis!(SysTime).toRedis` has no `return` statement, but is expected to return a value of type `string`
+---
+*/
+
+alias Alias(alias a) = a;
+
+template isISOExtStringSerializable(T)
+{
+ enum isISOExtStringSerializable = T.fromISOExtString("");
+}
+
+template RedisObjectCollection(){}
+
+struct RedisStripped(T, bool strip_id = true)
+{
+ alias unstrippedMemberIndices = indicesOf!(Select!(strip_id,
+ isRedisTypeAndNotID, isRedisType), T.tupleof);
+}
+
+template indicesOf(alias PRED, T...)
+{
+ template impl(size_t i)
+ {
+ static if (PRED!T)
+ impl TypeTuple;
+ }
+
+ alias indicesOf = impl!0;
+}
+
+template isRedisType(alias F)
+{
+ enum isRedisType = toRedis!(typeof(F));
+}
+
+template isRedisTypeAndNotID(){}
+
+string toRedis(T)()
+{
+ static if (isISOExtStringSerializable!T)
+ return;
+}
+
+struct User
+{
+ SysTime resetCodeExpireTime;
+}
+
+class RedisUserManController
+{
+ RedisObjectCollection!(RedisStripped!User) m_users;
+}
+
+class TimeZone
+{
+ abstract bool hasDST();
+}
+
+class SimpleTimeZone : TimeZone
+{
+ unittest {}
+
+ immutable(SimpleTimeZone) fromISOExtString(S)(S)
+ {
+ new SimpleTimeZone;
+ }
+}
+
+struct SysTime
+{
+
+ static fromISOExtString(S)(S)
+ {
+ dstring zoneStr;
+
+ try
+ SimpleTimeZone.fromISOExtString(zoneStr);
+
+ catch (DateTimeException e) {}
+ }
+}
+
+template Select(bool condition, T...)
+{
+ alias Select = Alias!(T[condition]);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17969.d b/gcc/testsuite/gdc.test/fail_compilation/fail17969.d
new file mode 100644
index 0000000..57fabbb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17969.d
@@ -0,0 +1,18 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/fail17969.d(9): Error: no property `sum` for type `fail17969.__lambda6!(int[]).__lambda6.MapResult2!((b) => b)`
+---
+ * https://issues.dlang.org/show_bug.cgi?id=17969
+ */
+
+
+alias fun = a => MapResult2!(b => b).sum;
+
+int[] e;
+static assert(!is(typeof(fun(e)) == void));
+void foo() { fun(e); }
+
+struct MapResult2(alias fun)
+{
+ int[] _input;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17976.d b/gcc/testsuite/gdc.test/fail_compilation/fail17976.d
new file mode 100644
index 0000000..4ecc092
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail17976.d
@@ -0,0 +1,18 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail17976.d(11): Error: constructor `fail17976.S.this` parameter `this.a` is already defined
+fail_compilation/fail17976.d(11): Error: constructor `fail17976.S.this` parameter `this.a` is already defined
+---
+*/
+
+struct S
+{
+ this(string a, string a, string a)
+ {
+ }
+}
+
+void main()
+{
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail180.d b/gcc/testsuite/gdc.test/fail_compilation/fail180.d
index 64ba3ef..ef4ffaa 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail180.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail180.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail180.d(23): Error: cannot modify this.x in const function
-fail_compilation/fail180.d(24): Error: cannot modify this.x in const function
-fail_compilation/fail180.d(38): Error: cannot modify this.x in const function
-fail_compilation/fail180.d(39): Error: cannot modify this.x in const function
-fail_compilation/fail180.d(50): Error: variable fail180.main.t cannot be final, perhaps you meant const?
-fail_compilation/fail180.d(62): Error: variable fail180.test.d cannot be final, perhaps you meant const?
+fail_compilation/fail180.d(23): Error: cannot modify `this.x` in `const` function
+fail_compilation/fail180.d(24): Error: cannot modify `this.x` in `const` function
+fail_compilation/fail180.d(38): Error: cannot modify `this.x` in `const` function
+fail_compilation/fail180.d(39): Error: cannot modify `this.x` in `const` function
+fail_compilation/fail180.d(50): Error: variable `fail180.main.t` cannot be `final`, perhaps you meant `const`?
+fail_compilation/fail180.d(62): Error: variable `fail180.test.d` cannot be `final`, perhaps you meant `const`?
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18057.d b/gcc/testsuite/gdc.test/fail_compilation/fail18057.d
index 5e2bab7..19e8eb4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail18057.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18057.d
@@ -1,8 +1,8 @@
/**
TEST_OUTPUT:
---
-fail_compilation/fail18057.d(16): Error: template instance RBNode!int `RBNode` is not a template declaration, it is a struct
-fail_compilation/fail18057.d(13): Error: variable fail18057.RBNode.copy recursive initialization of field
+fail_compilation/fail18057.d(16): Error: template instance `RBNode!int` `RBNode` is not a template declaration, it is a struct
+fail_compilation/fail18057.d(13): Error: variable `fail18057.RBNode.copy` recursive initialization of field
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18093.d b/gcc/testsuite/gdc.test/fail_compilation/fail18093.d
new file mode 100644
index 0000000..4eb3663
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18093.d
@@ -0,0 +1,27 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/fail18093.d(19): Error: function `void fail18093.GenericTransitiveVisitor!(ASTCodegen).GenericTransitiveVisitor.ParseVisitMethods!(ASTCodegen).visit()` does not override any function, did you mean to override `extern (C++) void fail18093.ParseTimeVisitor!(ASTCodegen).ParseTimeVisitor.visit()`?
+fail_compilation/fail18093.d(24): Error: mixin `fail18093.GenericTransitiveVisitor!(ASTCodegen).GenericTransitiveVisitor.ParseVisitMethods!(ASTCodegen)` error instantiating
+fail_compilation/fail18093.d(27): Error: template instance `fail18093.GenericTransitiveVisitor!(ASTCodegen)` error instantiating
+---
+ * https://issues.dlang.org/show_bug.cgi?id=18093
+ */
+
+
+struct ASTCodegen {}
+
+extern (C++) class ParseTimeVisitor(AST)
+{
+ void visit() {}
+}
+template ParseVisitMethods(AST)
+{
+ override void visit() {}
+}
+
+class GenericTransitiveVisitor(AST) : ParseTimeVisitor!AST
+{
+ mixin ParseVisitMethods!AST;
+}
+
+alias SemanticTimeTransitiveVisitor = GenericTransitiveVisitor!ASTCodegen;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18228.d b/gcc/testsuite/gdc.test/fail_compilation/fail18228.d
new file mode 100644
index 0000000..983719a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18228.d
@@ -0,0 +1,15 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail18228.d(12): Error: Using `this` as a type is obsolete. Use `typeof(this)` instead
+fail_compilation/fail18228.d(13): Error: Using `this` as a type is obsolete. Use `typeof(this)` instead
+fail_compilation/fail18228.d(14): Error: Using `super` as a type is obsolete. Use `typeof(super)` instead
+---
+*/
+
+class C
+{
+ this(this a) {}
+ this(int a, this b) {}
+ this(super a) {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18236.d b/gcc/testsuite/gdc.test/fail_compilation/fail18236.d
new file mode 100644
index 0000000..5a696f3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18236.d
@@ -0,0 +1,21 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail18236.d(20): Error: cannot cast expression `V(12)` of type `V` to `int`
+---
+*/
+
+struct V
+{
+ int a;
+}
+
+struct S
+{
+ enum A = V(12);
+}
+
+void main()
+{
+ int b = cast(int)S.A;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18243.d b/gcc/testsuite/gdc.test/fail_compilation/fail18243.d
new file mode 100644
index 0000000..f31319b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18243.d
@@ -0,0 +1,16 @@
+/*
+EXTRA_FILES: imports/a18243.d
+TEST_OUTPUT:
+---
+fail_compilation/fail18243.d(15): Error: none of the overloads of `isNaN` are callable using argument types `!()(float)`
+---
+*/
+
+module fail18243;
+
+import imports.a18243;
+
+void main()
+{
+ bool b = isNaN(float.nan);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail183.d b/gcc/testsuite/gdc.test/fail_compilation/fail183.d
index c43d377..362213c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail183.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail183.d
@@ -1,11 +1,25 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail183.d(10): Error: redundant attribute `const`
-fail_compilation/fail183.d(10): Error: redundant attribute `scope`
-fail_compilation/fail183.d(11): Error: redundant attribute `in`
+fail_compilation/fail183.d(17): Error: attribute `const` is redundant with previously-applied `in`
+fail_compilation/fail183.d(18): Error: attribute `scope` cannot be applied with `in`, use `-preview=in` instead
+fail_compilation/fail183.d(19): Error: attribute `const` is redundant with previously-applied `in`
+fail_compilation/fail183.d(19): Error: attribute `scope` cannot be applied with `in`, use `-preview=in` instead
+fail_compilation/fail183.d(20): Error: attribute `scope` cannot be applied with `in`, use `-preview=in` instead
+fail_compilation/fail183.d(20): Error: attribute `const` is redundant with previously-applied `in`
+fail_compilation/fail183.d(22): Error: attribute `in` cannot be added after `const`: remove `const`
+fail_compilation/fail183.d(23): Error: attribute `in` cannot be added after `scope`: remove `scope` and use `-preview=in`
+fail_compilation/fail183.d(24): Error: attribute `in` cannot be added after `const`: remove `const`
+fail_compilation/fail183.d(25): Error: attribute `in` cannot be added after `const`: remove `const`
---
*/
-void f(in final const scope int x) {}
-void g(final const scope in int x) {}
+void f1(in const int x) {}
+void f2(in scope int x) {}
+void f3(in const scope int x) {}
+void f4(in scope const int x) {}
+
+void f5(const in int x) {}
+void f6(scope in int x) {}
+void f7(const scope in int x) {}
+void f8(scope const in int x) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18417.d b/gcc/testsuite/gdc.test/fail_compilation/fail18417.d
new file mode 100644
index 0000000..b32a99b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18417.d
@@ -0,0 +1,13 @@
+// REQUIRED_ARGS : -de
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail18417.d(11): Deprecation: `const` postblit is deprecated. Please use an unqualified postblit.
+fail_compilation/fail18417.d(12): Deprecation: `immutable` postblit is deprecated. Please use an unqualified postblit.
+fail_compilation/fail18417.d(13): Deprecation: `shared` postblit is deprecated. Please use an unqualified postblit.
+---
+*/
+
+struct A { this(this) const {} }
+struct B { this(this) immutable {} }
+struct C { this(this) shared {} }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail185.d b/gcc/testsuite/gdc.test/fail_compilation/fail185.d
index 7197531..8d3ffc9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail185.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail185.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail185.d(10): Error: static assert "An error message
+fail_compilation/fail185.d(10): Error: static assert: "An error message
that spans multiple lines, and also contains such characters as a tab,
\ and "."
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18620.d b/gcc/testsuite/gdc.test/fail_compilation/fail18620.d
new file mode 100644
index 0000000..ce202b8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18620.d
@@ -0,0 +1,21 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail18620.d(14): Error: `strlen` cannot be interpreted at compile time, because it has no available source code
+fail_compilation/fail18620.d(19): compile time context created here
+fail_compilation/fail18620.d(14): Error: `strlen` cannot be interpreted at compile time, because it has no available source code
+fail_compilation/fail18620.d(20): compile time context created here
+---
+*/
+class A{
+ this(const(char)* s)
+ {
+ import core.stdc.string;
+ auto a=strlen(s);
+ }
+}
+
+void main(){
+ static a = new A("a");
+ __gshared b = new A("b");
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail187.d b/gcc/testsuite/gdc.test/fail_compilation/fail187.d
index b985493..b23a95d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail187.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail187.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail187.d(16): Error: catch at fail_compilation/fail187.d(20) hides catch at fail_compilation/fail187.d(24)
+fail_compilation/fail187.d(16): Error: `catch` at fail_compilation/fail187.d(20) hides `catch` at fail_compilation/fail187.d(24)
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18719.d b/gcc/testsuite/gdc.test/fail_compilation/fail18719.d
index 7d993d1..7ed513a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail18719.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18719.d
@@ -1,10 +1,9 @@
// https://issues.dlang.org/show_bug.cgi?id=18719
-// REQUIRED_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/fail18719.d(30): Error: immutable field `x` initialized multiple times
+fail_compilation/fail18719.d(29): Error: immutable field `x` initialized multiple times
Previous initialization is here.
---
*/
@@ -15,8 +14,8 @@ struct S
this(int y) immutable
{
x = y;
- import std.stdio;
- writeln("Ctor called with ", y);
+ import core.stdc.stdio;
+ printf("Ctor called with %d\n", y);
}
void opAssign(int) immutable;
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail188.d b/gcc/testsuite/gdc.test/fail_compilation/fail188.d
index cd201d02..6809e10 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail188.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail188.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail188.d(15): Error: function fail188.Derived.foo cannot override final function fail188.Base.foo
+fail_compilation/fail188.d(15): Error: function `fail188.Derived.foo` cannot override `final` function `fail188.Base.foo`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18892.d b/gcc/testsuite/gdc.test/fail_compilation/fail18892.d
new file mode 100644
index 0000000..531d1ed
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18892.d
@@ -0,0 +1,22 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail18892.d(20): Error: no property `foo` for type `fail18892.MT`
+fail_compilation/fail18892.d(21): Error: no property `foo` for type `fail18892.MT`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=18892
+
+struct MT
+{
+ int _payload;
+ alias _payload this;
+}
+
+void main()
+{
+ MT a;
+ a.foo = 3;
+ MT.foo = 3;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18938.d b/gcc/testsuite/gdc.test/fail_compilation/fail18938.d
new file mode 100644
index 0000000..f7ece6d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18938.d
@@ -0,0 +1,11 @@
+// REQUIRED_ARGS: -c -Ifail_compilation/imports/
+// EXTRA_SOURCES: imports/test18938a/cache.d imports/test18938a/file.d
+// EXTRA_FILES: imports/test18938b/file.d
+/*
+TEST_OUTPUT:
+---
+fail_compilation/imports/test18938b/file.d(20): Error: undefined identifier `No`
+---
+*/
+
+void main() {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18970.d b/gcc/testsuite/gdc.test/fail_compilation/fail18970.d
index 0ec53c8..0973217 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail18970.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18970.d
@@ -1,8 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail18970.d(22): Error: no property `y` for type `S`
-fail_compilation/fail18970.d(29): Error: no property `yyy` for type `S2`
+fail_compilation/fail18970.d(24): Error: no property `y` for type `fail18970.S`
+fail_compilation/fail18970.d(24): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message
+fail_compilation/fail18970.d(31): Error: no property `yyy` for type `fail18970.S2`
+fail_compilation/fail18970.d(31): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18979.d b/gcc/testsuite/gdc.test/fail_compilation/fail18979.d
new file mode 100644
index 0000000..9756570
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18979.d
@@ -0,0 +1,14 @@
+// EXTRA_FILES: imports/imp18979.d
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail18979.d(13): Error: no property `__ctor` for type `imports.imp18979.Foo`
+----
+*/
+
+import imports.imp18979;
+
+void main()
+{
+ auto f = Foo(42);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18985.d b/gcc/testsuite/gdc.test/fail_compilation/fail18985.d
new file mode 100644
index 0000000..830a679
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18985.d
@@ -0,0 +1,18 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail18985.d(16): Error: `foo` is not a scalar, it is a `object.Object`
+fail_compilation/fail18985.d(17): Error: `bar` is not a scalar, it is a `shared(Object)`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=18985
+
+Object foo;
+shared Object bar;
+
+void main()
+{
+ foo += 1;
+ bar += 1;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18994.d b/gcc/testsuite/gdc.test/fail_compilation/fail18994.d
new file mode 100644
index 0000000..14935a72
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail18994.d
@@ -0,0 +1,20 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail18994.d(19): Error: struct `fail18994.Type1` is not copyable because it has a disabled postblit
+---
+*/
+struct Type2
+{
+ int opApply(int delegate(ref Type1)) { return 0; }
+}
+
+struct Type1
+{
+ @disable this(this);
+}
+
+void test()
+{
+ foreach(b; Type2()) {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail190.d b/gcc/testsuite/gdc.test/fail_compilation/fail190.d
index 6f4046a..59e11d7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail190.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail190.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail190.d(9): Error: can't have pointer to (int, int, int)
-fail_compilation/fail190.d(16): Error: template instance fail190.f!(int, int, int) error instantiating
+fail_compilation/fail190.d(9): Error: cannot have pointer to `(int, int, int)`
+fail_compilation/fail190.d(16): Error: template instance `fail190.f!(int, int, int)` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail1900.d b/gcc/testsuite/gdc.test/fail_compilation/fail1900.d
index cabfbdf..fd0d6ac 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail1900.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail1900.d
@@ -1,10 +1,11 @@
/*
+EXTRA_FILES: imports/fail1900a.d imports/fail1900b.d
TEST_OUTPUT:
---
-fail_compilation/fail1900.d(26): Error: template fail1900.Mix1a!().Foo matches more than one template declaration:
-fail_compilation/fail1900.d(13): Foo(ubyte x)
+fail_compilation/fail1900.d(27): Error: template `fail1900.Mix1a!().Foo` matches more than one template declaration:
+fail_compilation/fail1900.d(14): `Foo(ubyte x)`
and
-fail_compilation/fail1900.d(14): Foo(byte x)
+fail_compilation/fail1900.d(15): `Foo(byte x)`
---
*/
@@ -29,7 +30,7 @@ void test1900a()
/*
TEST_OUTPUT:
---
-fail_compilation/fail1900.d(41): Error: imports.fail1900b.Bar(short n) at fail_compilation/imports/fail1900b.d(2) conflicts with imports.fail1900a.Bar(int n) at fail_compilation/imports/fail1900a.d(2)
+fail_compilation/fail1900.d(42): Error: template `imports.fail1900b.Bar(short n)` at fail_compilation/imports/fail1900b.d(2) conflicts with template `imports.fail1900a.Bar(int n)` at fail_compilation/imports/fail1900a.d(2)
---
*/
@@ -44,7 +45,7 @@ void test1900b()
/*
TEST_OUTPUT:
---
-fail_compilation/fail1900.d(65): Error: fail1900.Mix2b!().Baz(int x) at fail_compilation/fail1900.d(57) conflicts with fail1900.Mix2a!().Baz(byte x) at fail_compilation/fail1900.d(53)
+fail_compilation/fail1900.d(66): Error: template `fail1900.Mix2b!().Baz(int x)` at fail_compilation/fail1900.d(58) conflicts with template `fail1900.Mix2a!().Baz(byte x)` at fail_compilation/fail1900.d(54)
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19038.d b/gcc/testsuite/gdc.test/fail_compilation/fail19038.d
new file mode 100644
index 0000000..ef1a8b7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19038.d
@@ -0,0 +1,29 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/fail19038.d(21): Error: cannot implicitly convert expression `a` of type `string[][]` to `const(string)[][]`
+fail_compilation/fail19038.d(23): Error: cannot modify `const` expression `c[0]`
+---
+ * Credit: yshui
+ * https://github.com/dlang/dmd/pull/8413#issuecomment-401104961
+ * https://issues.dlang.org/show_bug.cgi?id=19038
+ */
+
+
+void test()
+{
+ /* string[][] is not implicitly converible to const(string)[][],
+ * and there is good reason why:
+ *
+ * https://stackoverflow.com/questions/5055655/double-pointer-const-correctness-warnings-in-c
+ */
+
+ string[][] a = [["Lord"]];
+ const(string)[][] b = a; // assume this works (and it should not)
+ const(string)[] c = ["Sauron"];
+ c[0] = "Mordor"; // invalid, because c[0] is const(string)
+
+ b[0] = c; // valid, b[0] is const(string)[]
+ // But now, a[0] has become c
+ a[0][0] = "Nazgul"; // valid, because a[0][0] is string
+ // But this also changes c[0], which shouldn't be possible
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19076.d b/gcc/testsuite/gdc.test/fail_compilation/fail19076.d
new file mode 100644
index 0000000..9bfc0a5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19076.d
@@ -0,0 +1,11 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19076.d(11): Error: no property `V` for type `fail19076.I`
+fail_compilation/fail19076.d(11): Error: `(I).V` cannot be resolved
+---
+*/
+
+interface P { }
+interface I : P { }
+auto F = __traits(getVirtualFunctions, I, "V");
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19098.d b/gcc/testsuite/gdc.test/fail_compilation/fail19098.d
new file mode 100644
index 0000000..c4f879f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19098.d
@@ -0,0 +1,19 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19098.d(18): Error: cannot modify struct instance `a` of type `A` because it contains `const` or `immutable` members
+---
+*/
+
+struct A
+{
+ const int a;
+ this(int) {}
+}
+
+void main()
+{
+ A a = A(2);
+ A b = A(3);
+ a = b;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19099.d b/gcc/testsuite/gdc.test/fail_compilation/fail19099.d
new file mode 100644
index 0000000..6fbc6147
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19099.d
@@ -0,0 +1,27 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19099.d(26): Error: cannot modify struct instance `a` of type `A` because it contains `const` or `immutable` members
+---
+*/
+
+struct B
+{
+ this(this) {}
+ ~this() {}
+ int a;
+}
+
+struct A
+{
+ B b;
+ immutable int a;
+ this(int b) { a = b;}
+}
+
+void main()
+{
+ A a = A(2);
+ A b = A(3);
+ a = b;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19103.d b/gcc/testsuite/gdc.test/fail_compilation/fail19103.d
new file mode 100644
index 0000000..6b740ac
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19103.d
@@ -0,0 +1,36 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19103.d(12): Error: no property `puts` for type `fail19103.C`
+fail_compilation/fail19103.d(14): Error: no property `puts` for type `fail19103.S1`
+fail_compilation/fail19103.d(16): Error: no property `puts` for type `S2`, did you mean `core.stdc.stdio.puts`?
+---
+*/
+
+void main()
+{
+ (new C).puts("OK."); // Error: no property puts for type test.C, did you mean core.stdc.stdio.puts(T...)(T args)?
+ S1 s1;
+ s1.puts("Hey?"); // It can be compiled and runs!
+ S2 s2;
+ s2.puts("OK."); // Error: no property puts for type S2, did you mean core.stdc.stdio.puts(T...)(T args)?
+}
+
+mixin template T()
+{
+ import core.stdc.stdio;
+}
+
+class C
+{
+ mixin T;
+}
+struct S1
+{
+ mixin T;
+}
+
+struct S2
+{
+ import core.stdc.stdio;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19107.d b/gcc/testsuite/gdc.test/fail_compilation/fail19107.d
deleted file mode 100644
index c748650..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19107.d
+++ /dev/null
@@ -1,21 +0,0 @@
-// REQUIRED_ARGS:
-/*
-TEST_OUTPUT:
----
-fail_compilation/test19107.d(20): Error: template `test19107.all` cannot deduce function from argument types `!((c) => c)(string[])`, candidates are:
-fail_compilation/test19107.d(14): `test19107.all(alias pred, T)(T t) if (is(typeof(I!pred(t))))`
----
-*/
-
-// https://issues.dlang.org/show_bug.cgi?id=19107
-
-import imports.test19107b;
-
-void all(alias pred, T)(T t)
- if (is(typeof(I!pred(t))))
-{ }
-
-void main(string[] args)
-{
- args.all!(c => c);
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19181.d b/gcc/testsuite/gdc.test/fail_compilation/fail19181.d
new file mode 100644
index 0000000..873e292
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19181.d
@@ -0,0 +1,16 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19181.d(15): Error: undefined identifier `LanguageError`
+---
+*/
+struct S
+{
+ void opDispatch(string name, T)(T arg) { }
+}
+
+void main()
+{
+ S s;
+ s.foo(LanguageError);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail192.d b/gcc/testsuite/gdc.test/fail_compilation/fail192.d
index 3c485e6..96232a5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail192.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail192.d
@@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail192.d(15): Error: outer function context of fail192.foo is needed to 'new' nested class fail192.foo.DummyClass
-fail_compilation/fail192.d(26): Error: template instance fail192.X!(DummyClass) error instantiating
+fail_compilation/fail192.d(15): Error: outer function context of `fail192.foo` is needed to `new` nested class `fail192.foo.DummyClass`
+fail_compilation/fail192.d(26): Error: template instance `fail192.X!(DummyClass)` error instantiating
---
*/
-// 1336 Internal error when trying to construct a class declared within a unittest from a templated class.
-
+// https://issues.dlang.org/show_bug.cgi?id=1336
+// Internal error when trying to construct a class declared within a unittest from a templated class.
class X(T)
{
void bar()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19202.d b/gcc/testsuite/gdc.test/fail_compilation/fail19202.d
new file mode 100644
index 0000000..f19bc18
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19202.d
@@ -0,0 +1,17 @@
+// REQUIRED_ARGS: -de
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19202.d(11): Deprecation: variable `fail19202.X!().X` is deprecated
+---
+*/
+
+void main()
+{
+ auto b = X!();
+}
+
+template X()
+{
+ deprecated enum X = true;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19209.d b/gcc/testsuite/gdc.test/fail_compilation/fail19209.d
new file mode 100644
index 0000000..ceede5e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19209.d
@@ -0,0 +1,17 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19209.d(16): Error: function `fail19209.Spammer.method()` does not override any function, did you mean to override variable `fail19209.Spam.method`?
+fail_compilation/fail19209.d(16): Functions are the only declarations that may be overriden
+---
+*/
+
+class Spam
+{
+ int method;
+}
+
+class Spammer : Spam
+{
+ override method() {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail193.d b/gcc/testsuite/gdc.test/fail_compilation/fail193.d
index c3093c7..9fcae5b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail193.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail193.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail193.d(14): Error: cannot infer type from overloaded function symbol & foo
+fail_compilation/fail193.d(14): Error: cannot infer type from overloaded function symbol `& foo`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19319a.d b/gcc/testsuite/gdc.test/fail_compilation/fail19319a.d
new file mode 100644
index 0000000..f3efe1f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19319a.d
@@ -0,0 +1,17 @@
+/*
+DFLAGS:
+REQUIRED_ARGS: -conf= -Ifail_compilation/extra-files/minimal
+TEST_OUTPUT:
+---
+fail_compilation/fail19319a.d(16): Error: `7 ^^ g19319` requires `std.math` for `^^` operators
+fail_compilation/fail19319a.d(17): Error: `g19319 ^^ 7` requires `std.math` for `^^` operators
+---
+*/
+
+__gshared int g19319 = 0;
+
+static assert(!__traits(compiles, 7 ^^ g19319));
+static assert(!__traits(compiles, g19319 ^^= 7));
+
+__gshared int e19319 = 7 ^^ g19319;
+__gshared int a19319 = g19319 ^^= 7;;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19319b.d b/gcc/testsuite/gdc.test/fail_compilation/fail19319b.d
new file mode 100644
index 0000000..933dc16
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19319b.d
@@ -0,0 +1,18 @@
+/*
+DFLAGS:
+REQUIRED_ARGS: -conf= -Ifail_compilation/extra-files/minimal
+TEST_OUTPUT:
+---
+fail_compilation/fail19319b.d(16): Error: `7 ^^ x` requires `std.math` for `^^` operators
+fail_compilation/fail19319b.d(17): Error: `x ^^ 7` requires `std.math` for `^^` operators
+---
+*/
+
+void test19319(int x)
+{
+ static assert(!__traits(compiles, 7 ^^ x));
+ static assert(!__traits(compiles, x ^^= 7));
+
+ int i = 7 ^^ x;
+ x ^^= 7;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail194.d b/gcc/testsuite/gdc.test/fail_compilation/fail194.d
index 2ce4ab8..f2270f1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail194.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail194.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail194.d(18): Error: function & foo is overloaded
+fail_compilation/fail194.d(18): Error: function `& foo` is overloaded
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19441.d b/gcc/testsuite/gdc.test/fail_compilation/fail19441.d
new file mode 100644
index 0000000..f1f1769
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19441.d
@@ -0,0 +1,49 @@
+// REQUIRED_ARGS: -de
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19441.d(44): Deprecation: Cannot use `alias this` to partially initialize variable `wrap[0]` of type `Wrap10595`. Use `wrap[0].i`
+---
+*/
+
+struct S10595
+{
+ bool b = true;
+
+ bool test()
+ {
+ if (!b) // note: must be a check, not 'return b;'
+ return false;
+
+ return true;
+ }
+}
+
+struct Wrap10595
+{
+ int i;
+ alias i this;
+ S10595 s;
+}
+
+void main()
+{
+ {
+ Wrap10595[int] wrap;
+
+ wrap[0] = Wrap10595();
+ wrap[0].i = 0;
+
+ assert(wrap[0].s.test()); // ok
+ }
+
+ {
+ Wrap10595[int] wrap;
+
+ wrap[0] = Wrap10595();
+ wrap[0] = 0; // note: using 'alias this' to assign
+
+ assert(wrap[0].s.test()); // failure
+ }
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19447.d b/gcc/testsuite/gdc.test/fail_compilation/fail19447.d
new file mode 100644
index 0000000..23f4921
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19447.d
@@ -0,0 +1,19 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/fail19447.d(110): Error: static variable `mh` cannot be read at compile time
+fail_compilation/fail19447.d(110): called from here: `g19447(mh)`
+---
+ */
+
+#line 100
+
+int [2] mh = [1, 2];
+int g19447(ref int[2] a)
+{
+ int[2] b=2;
+ a=b;
+ assert(a[0]==2);
+ return 1;
+}
+
+immutable int i = g19447(mh);
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail195.d b/gcc/testsuite/gdc.test/fail_compilation/fail195.d
index 57a6bdc..5f067a9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail195.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail195.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail195.d(22): Error: struct Foo does not overload ()
+fail_compilation/fail195.d(22): Error: struct `Foo` does not overload ()
---
*/
-// 1384 Compiler segfaults when using struct variable like a function with no opCall member.
-
+// https://issues.dlang.org/show_bug.cgi?id=1384
+// Compiler segfaults when using struct variable like a function with no opCall member.
struct Foo
{
union
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19609.d b/gcc/testsuite/gdc.test/fail_compilation/fail19609.d
index 26ef576..c68f199 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19609.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19609.d
@@ -1,15 +1,16 @@
// https://issues.dlang.org/show_bug.cgi?id=19609
/*
+EXTRA_FILES: imports/fail19609a.d imports/fail19609b.d imports/fail19609c.d imports/fail19609d.d
TEST_OUTPUT
---
fail_compilation/imports/fail19609a.d(1): Error: `string` expected for deprecation message, not `([""])` of type `string[]`
-fail_compilation/fail19609.d(15): Deprecation: module `imports.fail19609a` is deprecated
+fail_compilation/fail19609.d(16): Deprecation: module `imports.fail19609a` is deprecated
fail_compilation/imports/fail19609b.d(1): Error: `string` expected for deprecation message, not `([1])` of type `int[]`
-fail_compilation/fail19609.d(16): Deprecation: module `imports.fail19609b` is deprecated
+fail_compilation/fail19609.d(17): Deprecation: module `imports.fail19609b` is deprecated
fail_compilation/imports/fail19609c.d(1): Error: `string` expected for deprecation message, not `(123.4F)` of type `float`
-fail_compilation/fail19609.d(17): Deprecation: module `imports.fail19609c` is deprecated
+fail_compilation/fail19609.d(18): Deprecation: module `imports.fail19609c` is deprecated
fail_compilation/imports/fail19609d.d(1): Error: undefined identifier `msg`
-fail_compilation/fail19609.d(19): Deprecation: module `imports.fail19609d` is deprecated
+fail_compilation/fail19609.d(20): Deprecation: module `imports.fail19609d` is deprecated
---
*/
import imports.fail19609a;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19687.d b/gcc/testsuite/gdc.test/fail_compilation/fail19687.d
new file mode 100644
index 0000000..7d1c6e5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19687.d
@@ -0,0 +1,18 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19687.d(17): Error: no property `nonexisting` for type `string`
+---
+*/
+
+struct S
+{
+ void opDispatch(string name)() {}
+ void opDispatch(string name)(string value) {}
+}
+
+void main()
+{
+ S n;
+ n.foo = "".nonexisting();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19729.d b/gcc/testsuite/gdc.test/fail_compilation/fail19729.d
new file mode 100644
index 0000000..5943d08
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19729.d
@@ -0,0 +1,37 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19729.d(35): Error: `fail19729.C.__ctor` called with argument types `(string)` matches both:
+fail_compilation/fail19729.d(18): `fail19729.C.Templ!string.this(string t)`
+and:
+fail_compilation/fail19729.d(18): `fail19729.C.Templ!string.this(string t)`
+fail_compilation/fail19729.d(36): Error: `fail19729.D.__ctor` called with argument types `(string)` matches both:
+fail_compilation/fail19729.d(18): `fail19729.D.Templ!(const(char)[]).this(const(char)[] t)`
+and:
+fail_compilation/fail19729.d(18): `fail19729.D.Templ!(const(char)*).this(const(char)* t)`
+---
+*/
+module fail19729;
+
+mixin template Templ(T)
+{
+ this(T t) { }
+}
+
+class C
+{
+ mixin Templ!string;
+ mixin Templ!string;
+}
+
+class D
+{
+ mixin Templ!(const(char)*);
+ mixin Templ!(const(char)[]);
+}
+
+void main()
+{
+ new C("conflict");
+ new D("conflict");
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19744.d b/gcc/testsuite/gdc.test/fail_compilation/fail19744.d
new file mode 100644
index 0000000..9115b4e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19744.d
@@ -0,0 +1,11 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19744.d(8): Error: Top-level function `test` has no `this` to which `return` can apply
+---
+*/
+
+int* test(return scope int* n) return
+{
+ return n;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19757_m32.d b/gcc/testsuite/gdc.test/fail_compilation/fail19757_m32.d
new file mode 100644
index 0000000..6ddb456
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19757_m32.d
@@ -0,0 +1,9 @@
+// REQUIRED_ARGS: -m32
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19757_m32.d(9): Error: cannot implicitly convert expression `"oops"` of type `string` to `uint`
+---
+*/
+
+auto s = new string("oops");
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19757_m64.d b/gcc/testsuite/gdc.test/fail_compilation/fail19757_m64.d
new file mode 100644
index 0000000..e1f9afc
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19757_m64.d
@@ -0,0 +1,9 @@
+// REQUIRED_ARGS: -m64
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19757_m64.d(9): Error: cannot implicitly convert expression `"oops"` of type `string` to `ulong`
+---
+*/
+
+auto s = new string("oops");
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail198.d b/gcc/testsuite/gdc.test/fail_compilation/fail198.d
index 4cb63b4..1a096f4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail198.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail198.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail198.d(8): Error: template instance test!42 template 'test' is not defined
+fail_compilation/fail198.d(8): Error: template instance `test!42` template `test` is not defined
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19871.d b/gcc/testsuite/gdc.test/fail_compilation/fail19871.d
new file mode 100644
index 0000000..ad458df
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19871.d
@@ -0,0 +1,20 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19871.d(10): Error: `struct Struct` may not define both a rvalue constructor and a copy constructor
+fail_compilation/fail19871.d(19): rvalue constructor defined here
+fail_compilation/fail19871.d(13): copy constructor defined here
+---
+*/
+
+struct Struct
+{
+ @disable this();
+ this(ref Struct other)
+ {
+ const Struct s = void;
+ this(s);
+ }
+
+ this(Struct) {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19881.d b/gcc/testsuite/gdc.test/fail_compilation/fail19881.d
new file mode 100644
index 0000000..f4a4d76
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19881.d
@@ -0,0 +1,15 @@
+/* REQUIRED_ARGS: -preview=dip1000
+ * TEST_OUTPUT:
+---
+fail_compilation/fail19881.d(12): Error: address of local variable `local` assigned to return scope `input`
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=19881
+
+@safe int* test(return scope int* input) {
+ int local = 42;
+ input = &local;
+
+ return input;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19890a.d b/gcc/testsuite/gdc.test/fail_compilation/fail19890a.d
index 2120dc5..d4da116 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19890a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19890a.d
@@ -1,8 +1,8 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/fail19890a.d(8): Error: `void[/^[0-9]+(LU)?$/]` size 1 * /^[0-9]+$/ exceeds 0x7fffffff size limit for static array
+fail_compilation/fail19890a.d(8): Error: `void[$n$$?:64=LU$]` size 1 * $n$ exceeds $?:windows+32=0x1000000|0x7fffffff$ size limit for static array
---
*/
+
void[] f = cast(void[-1]) "a";
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19890b.d b/gcc/testsuite/gdc.test/fail_compilation/fail19890b.d
index c3ee677..f4a5dad 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19890b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19890b.d
@@ -1,8 +1,8 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/fail19890b.d(8): Error: `void[/^[0-9]+(LU)?$/]` size 1 * /^[0-9]+$/ exceeds 0x7fffffff size limit for static array
+fail_compilation/fail19890b.d(8): Error: `void[$n$$?:64=LU$]` size 1 * $n$ exceeds $?:windows+32=0x1000000|0x7fffffff$ size limit for static array
---
*/
+
void[] f = cast(void[-2]) "a";
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19897.d b/gcc/testsuite/gdc.test/fail_compilation/fail19897.d
index 8dd4e14..d5e6f57 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19897.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19897.d
@@ -1,8 +1,7 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT
---
-fail_compilation/fail19897.d(10): Error: cannot implicitly convert expression `[]` of type `const(char[0])` to `const(char)`
+fail_compilation/fail19897.d(9): Error: cannot implicitly convert expression `[]` of type `const(char[0])` to `const(char)`
---
*/
struct S
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19898a.d b/gcc/testsuite/gdc.test/fail_compilation/fail19898a.d
index 406e468..f4aa848 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19898a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19898a.d
@@ -1,9 +1,8 @@
/*
-PERMUTE_ARGS:
REQUIRED_ARGS: -m64
TEST_OUTPUT:
---
-fail_compilation/fail19898a.d(11): Error: incompatible types for `(__key2) < (__limit3)`: both operands are of type `__vector(int[4])`
+fail_compilation/fail19898a.d(10): Error: incompatible types for `(__key2) < (__limit3)`: both operands are of type `__vector(int[4])`
---
*/
void f (__vector(int[4]) n)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19898b.d b/gcc/testsuite/gdc.test/fail_compilation/fail19898b.d
index 0b47fb78..82d92eb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19898b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19898b.d
@@ -1,11 +1,10 @@
/*
-PERMUTE_ARGS:
REQUIRED_ARGS: -m64
TEST_OUTPUT:
---
-fail_compilation/fail19898b.d(18): Error: cannot implicitly convert expression `m` of type `S` to `__vector(int[4])`
-fail_compilation/fail19898b.d(18): Error: incompatible types for `(__key2) != (__limit3)`: both operands are of type `__vector(int[4])`
-fail_compilation/fail19898b.d(18): Error: cannot cast expression `__key2` of type `__vector(int[4])` to `S`
+fail_compilation/fail19898b.d(17): Error: cannot implicitly convert expression `m` of type `S` to `__vector(int[4])`
+fail_compilation/fail19898b.d(17): Error: incompatible types for `(__key2) != (__limit3)`: both operands are of type `__vector(int[4])`
+fail_compilation/fail19898b.d(17): Error: cannot cast expression `__key2` of type `__vector(int[4])` to `S`
---
*/
struct S
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19911b.d b/gcc/testsuite/gdc.test/fail_compilation/fail19911b.d
index b4ad22b..c5d6a8a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19911b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19911b.d
@@ -1,6 +1,5 @@
/*
DFLAGS:
-REQUIRED_ARGS:
EXTRA_SOURCES: extra-files/minimal/object.d
TEST_OUTPUT:
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19911c.d b/gcc/testsuite/gdc.test/fail_compilation/fail19911c.d
index d1e954e..fbd7406 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19911c.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19911c.d
@@ -1,9 +1,8 @@
/*
DFLAGS:
-REQUIRED_ARGS:
TEST_OUTPUT:
---
-fail_compilation/fail19911c.d(15): Error: function `object.fun` `object.TypeInfo` could not be found, but is implicitly used in D-style variadic functions
+fail_compilation/fail19911c.d(14): Error: function `object.fun` `object.TypeInfo` could not be found, but is implicitly used in D-style variadic functions
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19912a.d b/gcc/testsuite/gdc.test/fail_compilation/fail19912a.d
index 47d3cf2..31a508a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19912a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19912a.d
@@ -1,8 +1,7 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/fail19912a.d(8): Error: struct `fail19912a.object` conflicts with import `fail19912a.object` at fail_compilation/fail19912a.d
+fail_compilation/fail19912a.d(7): Error: struct `fail19912a.object` conflicts with import `fail19912a.object` at fail_compilation/fail19912a.d
---
*/
struct object { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19912b.d b/gcc/testsuite/gdc.test/fail_compilation/fail19912b.d
index b3bd56d..1e52814 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19912b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19912b.d
@@ -1,8 +1,7 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/fail19912b.d(8): Error: class `fail19912b.object` conflicts with import `fail19912b.object` at fail_compilation/fail19912b.d
+fail_compilation/fail19912b.d(7): Error: class `fail19912b.object` conflicts with import `fail19912b.object` at fail_compilation/fail19912b.d
---
*/
class object { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19912c.d b/gcc/testsuite/gdc.test/fail_compilation/fail19912c.d
index a4656cc..38d7a5a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19912c.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19912c.d
@@ -1,8 +1,7 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/fail19912c.d(8): Error: alias `fail19912c.object` conflicts with import `fail19912c.object` at fail_compilation/fail19912c.d
+fail_compilation/fail19912c.d(7): Error: alias `fail19912c.object` conflicts with import `fail19912c.object` at fail_compilation/fail19912c.d
---
*/
alias object = int;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19912d.d b/gcc/testsuite/gdc.test/fail_compilation/fail19912d.d
index fdc8dcb..c0fe489 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19912d.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19912d.d
@@ -1,8 +1,7 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/fail19912d.d(8): Error: enum `fail19912d.object` conflicts with import `fail19912d.object` at fail_compilation/fail19912d.d
+fail_compilation/fail19912d.d(7): Error: enum `fail19912d.object` conflicts with import `fail19912d.object` at fail_compilation/fail19912d.d
---
*/
enum object { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19912e.d b/gcc/testsuite/gdc.test/fail_compilation/fail19912e.d
index 19cc9a6..0aa3433 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19912e.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19912e.d
@@ -1,8 +1,7 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/fail19912e.d(8): Error: function `fail19912e.object` conflicts with import `fail19912e.object` at fail_compilation/fail19912e.d
+fail_compilation/fail19912e.d(7): Error: function `fail19912e.object` conflicts with import `fail19912e.object` at fail_compilation/fail19912e.d
---
*/
void object() { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19913.d b/gcc/testsuite/gdc.test/fail_compilation/fail19913.d
index b0f31b5..fe2655e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19913.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19913.d
@@ -1,10 +1,10 @@
-/* PERMUTE_ARGS:
- * TEST_OUTPUT:
+/*
+TEST_OUTPUT:
---
fail_compilation/fail19913.d(11): Error: no property `b` for type `int`
fail_compilation/fail19913.d(11): Error: mixin `fail19913.S.b!()` is not defined
---
- */
+*/
struct S
{
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19914.d b/gcc/testsuite/gdc.test/fail_compilation/fail19914.d
index a890d35..2fd3da7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19914.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19914.d
@@ -1,9 +1,8 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/fail19914.d(9): Error: undefined identifier `c` in module `fail19914`
-fail_compilation/fail19914.d(10): Error: mixin `fail19914.a!string` error instantiating
+fail_compilation/fail19914.d(8): Error: undefined identifier `c` in module `fail19914`
+fail_compilation/fail19914.d(9): Error: mixin `fail19914.a!string` error instantiating
---
*/
class a(b) { align.c d; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19915.d b/gcc/testsuite/gdc.test/fail_compilation/fail19915.d
index 17e05ee..e12fe0f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19915.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19915.d
@@ -1,9 +1,8 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/fail19915.d(9): Error: undefined identifier `c` in module `fail19915`
-fail_compilation/fail19915.d(10): Error: template instance `fail19915.a!int` error instantiating
+fail_compilation/fail19915.d(8): Error: undefined identifier `c` in module `fail19915`
+fail_compilation/fail19915.d(9): Error: template instance `fail19915.a!int` error instantiating
---
*/
class a (b) { align.c d; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19917.d b/gcc/testsuite/gdc.test/fail_compilation/fail19917.d
new file mode 100644
index 0000000..c6ad83b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19917.d
@@ -0,0 +1,49 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19917.d(22): Error: overlapping default initialization for field `c` and `a`
+fail_compilation/fail19917.d(22): Error: overlapping default initialization for field `d` and `b`
+fail_compilation/fail19917.d(39): Error: overlapping default initialization for field `b` and `a`
+---
+*/
+
+struct S
+{
+ union
+ {
+ struct
+ {
+ int a = 3;
+ int b = 4;
+ }
+ }
+}
+
+struct X
+{
+ union
+ {
+ struct
+ {
+ int a = 3;
+ int b = 4;
+ }
+ struct
+ {
+ int c = 3;
+ int d = 4;
+ }
+ }
+}
+
+struct Y
+{
+ union
+ {
+ struct
+ {
+ union { int a = 3; }
+ }
+ int b = 4;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19919.d b/gcc/testsuite/gdc.test/fail_compilation/fail19919.d
new file mode 100644
index 0000000..3c65cbf
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19919.d
@@ -0,0 +1,25 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19919.d(16): Error: union field `f` with default initialization `3.14F` must be before field `n`
+fail_compilation/fail19919.d(23): Error: union field `f` with default initialization `3.14F` must be before field `n`
+---
+*/
+
+void main()
+{
+ struct X
+ {
+ union
+ {
+ int n;
+ float f = 3.14f;
+ }
+ }
+
+ union U
+ {
+ int n;
+ float f = 3.14f;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19922.d b/gcc/testsuite/gdc.test/fail_compilation/fail19922.d
index 5c9e2bb..201b124 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19922.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19922.d
@@ -1,9 +1,8 @@
/*
DFLAGS:
-REQUIRED_ARGS:
TEST_OUTPUT:
---
-fail_compilation/fail19922.d(17): Error: `object.TypeInfo_Class` could not be found, but is implicitly used
+fail_compilation/fail19922.d(16): Error: `object.TypeInfo_Class` could not be found, but is implicitly used
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19923.d b/gcc/testsuite/gdc.test/fail_compilation/fail19923.d
index 042cf8a..1438151 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19923.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19923.d
@@ -1,9 +1,8 @@
/*
DFLAGS:
-REQUIRED_ARGS:
TEST_OUTPUT:
---
-fail_compilation/fail19923.d(17): Error: `object.TypeInfo_Class` could not be found, but is implicitly used
+fail_compilation/fail19923.d(16): Error: `object.TypeInfo_Class` could not be found, but is implicitly used
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19931.d b/gcc/testsuite/gdc.test/fail_compilation/fail19931.d
new file mode 100644
index 0000000..940a1fa
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19931.d
@@ -0,0 +1,15 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail19931.d(10): Error: `struct S` may not define both a rvalue constructor and a copy constructor
+fail_compilation/fail19931.d(12): rvalue constructor defined here
+fail_compilation/fail19931.d(13): copy constructor defined here
+---
+*/
+
+struct S
+{
+ this(S s) {}
+ this(ref S s) {}
+ this(this) {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail1995.d b/gcc/testsuite/gdc.test/fail_compilation/fail1995.d
new file mode 100644
index 0000000..7dfddec
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail1995.d
@@ -0,0 +1,12 @@
+/*
+REQUIRED_ARGS: -Jdoes_not_exists -Jfail_compilation/fail1995.d -Jfail_compilation/
+TEST_OUTPUT:
+---
+fail_compilation/fail1995.d(12): Error: file `"SomeFile.txt"` cannot be found or not in a path specified with `-J`
+fail_compilation/fail1995.d(12): Path(s) searched (as provided by `-J`):
+fail_compilation/fail1995.d(12): [0]: `does_not_exists` (path not found)
+fail_compilation/fail1995.d(12): [1]: `fail_compilation/fail1995.d` (not a directory)
+fail_compilation/fail1995.d(12): [2]: `fail_compilation/`
+---
+ */
+immutable string Var = import("SomeFile.txt");
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19955.d b/gcc/testsuite/gdc.test/fail_compilation/fail19955.d
index 7cdce2c..e2af71f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail19955.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19955.d
@@ -1,8 +1,7 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/fail19955.d(8): Error: `switch` statement without a `default`; use `final switch` or add `default: assert(0);` or add `default: break;`
+fail_compilation/fail19955.d(7): Error: `switch` statement without a `default`; use `final switch` or add `default: assert(0);` or add `default: break;`
---
*/
void f() { switch(1) static assert(1); }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19965.d b/gcc/testsuite/gdc.test/fail_compilation/fail19965.d
new file mode 100644
index 0000000..b76a3a0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19965.d
@@ -0,0 +1,37 @@
+/*
+REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/fail19965.d(36): Error: address of variable `f` assigned to `a` with longer lifetime
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=19965
+
+struct Buffer
+{
+ int[10] data;
+
+ int[] getData() @safe return
+ {
+ return data[];
+ }
+}
+
+struct Foo()
+{
+ Buffer buffer;
+
+ int[] toArray() @safe return
+ {
+ return buffer.getData;
+ }
+}
+
+int[] a;
+
+void main() @safe
+{
+ Foo!() f;
+ a = f.toArray;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20.d b/gcc/testsuite/gdc.test/fail_compilation/fail20.d
index 821cc84..6cc4d22 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail20.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail20.d(16): Error: need member function opCmp() for struct FOO to compare
+fail_compilation/fail20.d(16): Error: need member function `opCmp()` for struct `FOO` to compare
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20000.d b/gcc/testsuite/gdc.test/fail_compilation/fail20000.d
new file mode 100644
index 0000000..fe48121
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20000.d
@@ -0,0 +1,39 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20000.d(25): Error: cast from `fail20000.DClass` to `fail20000.CppClass` not allowed in safe code
+fail_compilation/fail20000.d(26): Error: cast from `fail20000.DInterface` to `fail20000.CppClass` not allowed in safe code
+fail_compilation/fail20000.d(27): Error: cast from `fail20000.CppClass2` to `fail20000.CppClass` not allowed in safe code
+fail_compilation/fail20000.d(28): Error: cast from `fail20000.CppInterface2` to `fail20000.CppClass` not allowed in safe code
+fail_compilation/fail20000.d(30): Error: cast from `fail20000.DClass` to `fail20000.CppInterface` not allowed in safe code
+fail_compilation/fail20000.d(31): Error: cast from `fail20000.DInterface` to `fail20000.CppInterface` not allowed in safe code
+fail_compilation/fail20000.d(32): Error: cast from `fail20000.CppClass2` to `fail20000.CppInterface` not allowed in safe code
+fail_compilation/fail20000.d(33): Error: cast from `fail20000.CppInterface2` to `fail20000.CppInterface` not allowed in safe code
+fail_compilation/fail20000.d(35): Error: cast from `fail20000.CppClass` to `fail20000.DClass` not allowed in safe code
+fail_compilation/fail20000.d(36): Error: cast from `fail20000.CppInterface` to `fail20000.DClass` not allowed in safe code
+fail_compilation/fail20000.d(38): Error: cast from `fail20000.CppClass` to `fail20000.DInterface` not allowed in safe code
+fail_compilation/fail20000.d(39): Error: cast from `fail20000.CppInterface` to `fail20000.DInterface` not allowed in safe code
+---
+*/
+extern(C++) class CppClass { int a; }
+extern(C++) class CppClass2 { void* a; }
+extern(C++) interface CppInterface { int b(); }
+extern(C++) interface CppInterface2 { void* b(); }
+class DClass { int c; }
+interface DInterface { int d(); }
+
+bool isCppClass(DClass a) @safe { return cast(CppClass) a !is null; }
+bool isCppClass(DInterface a) @safe { return cast(CppClass) a !is null; }
+bool isCppClass(CppClass2 a) @safe { return cast(CppClass) a !is null; }
+bool isCppClass(CppInterface2 a) @safe { return cast(CppClass) a !is null; }
+
+bool isCppInterface(DClass a) @safe { return cast(CppInterface) a !is null; }
+bool isCppInterface(DInterface a) @safe { return cast(CppInterface) a !is null; }
+bool isCppInterface(CppClass2 a) @safe { return cast(CppInterface) a !is null; }
+bool isCppInterface(CppInterface2 a) @safe { return cast(CppInterface) a !is null; }
+
+bool isDClass(CppClass a) @safe { return cast(DClass) a !is null; }
+bool isDClass(CppInterface a) @safe { return cast(DClass) a !is null; }
+
+bool isDInterface(CppClass a) @safe { return cast(DInterface) a !is null; }
+bool isDInterface(CppInterface a) @safe { return cast(DInterface) a !is null; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20033.d b/gcc/testsuite/gdc.test/fail_compilation/fail20033.d
new file mode 100644
index 0000000..f641469
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20033.d
@@ -0,0 +1,54 @@
+// REQUIRED_ARGS: -de
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20033.d(38): Deprecation: `alias byKeyValue this` is deprecated - This was a bad idea
+fail_compilation/fail20033.d(39): Deprecation: `alias byKeyValue this` is deprecated
+fail_compilation/fail20033.d(41): Deprecation: `alias byKeyValue this` is deprecated - This was a bad idea
+fail_compilation/fail20033.d(42): Deprecation: `alias byKeyValue this` is deprecated
+---
+*/
+#line 1
+struct Tuple(T...)
+{
+ T values;
+ alias values this;
+}
+
+alias KVT = Tuple!(string, string);
+
+struct Test {
+ struct Range {
+ bool empty () { return false; }
+ KVT front() { return KVT.init; }
+ void popFront() {}
+ }
+
+ auto byKeyValue () { return Range.init; }
+
+ deprecated("This was a bad idea")
+ alias byKeyValue this;
+}
+
+struct Test2 {
+ struct Range {
+ bool empty () { return false; }
+ KVT front() { return KVT.init; }
+ void popFront() {}
+ }
+
+ auto byKeyValue () { return Range.init; }
+
+ deprecated alias byKeyValue this;
+}
+
+void main ()
+{
+ foreach (k, v; Test.init.byKeyValue) {} // Fine
+ foreach (k, v; Test2.init.byKeyValue) {} // Fine
+ foreach (k, v; Test.init) {} // Fails
+ foreach (k, v; Test2.init) {} // Fails
+
+ auto f1 = Test.init.front(); // Fails
+ auto f2 = Test2.init.front(); // Fails
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20040.d b/gcc/testsuite/gdc.test/fail_compilation/fail20040.d
new file mode 100644
index 0000000..67bdd31
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20040.d
@@ -0,0 +1,16 @@
+/*
+REQUIRED_ARGS: -o-
+TEST_OUTPUT:
+---
+fail_compilation/fail20040.d(13): Error: no property `joiner` for type `string[]`, perhaps `import std.algorithm;` is needed?
+fail_compilation/fail20040.d(14): Error: no property `split` for type `string[]`, perhaps `import std.array;` is needed?
+fail_compilation/fail20040.d(15): Error: no property `startsWith` for type `string[]`, perhaps `import std.algorithm;` is needed?
+---
+*/
+void main()
+{
+ auto x = ["a","b","c"];
+ x.joiner();
+ x.split();
+ x.startsWith;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20073.d b/gcc/testsuite/gdc.test/fail_compilation/fail20073.d
new file mode 100644
index 0000000..01a9ede
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20073.d
@@ -0,0 +1,22 @@
+// https://issues.dlang.org/show_bug.cgi?id=20073
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20073.d(20): Error: cannot implicitly convert expression `s` of type `S` to `string`
+fail_compilation/fail20073.d(21): Error: cannot implicitly convert expression `s` of type `S` to `string`
+---
+*/
+
+struct S
+{
+ char[10] x;
+ auto slice() inout { return x[0 .. 10]; }
+ alias slice this;
+}
+
+
+string test() {
+ S s;
+ string str = s; // cannot implicitly convert expression `s` of type `S` to `string`
+ return s; // and suddenly we can!
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20084.d b/gcc/testsuite/gdc.test/fail_compilation/fail20084.d
new file mode 100644
index 0000000..dcc73a9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20084.d
@@ -0,0 +1,19 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/fail20084.d(109): Error: returning `v.front()` escapes a reference to local variable `v`
+---
+*/
+
+#line 100
+
+// https://issues.dlang.org/show_bug.cgi?id=20084
+
+struct W() {
+ int value;
+ @safe ref int front() return { return value; }
+}
+
+@safe ref int get(W!() v) {
+ return v.front;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20108.d b/gcc/testsuite/gdc.test/fail_compilation/fail20108.d
new file mode 100644
index 0000000..f768b89
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20108.d
@@ -0,0 +1,31 @@
+// REQUIRED_ARGS: -preview=dip1000
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20108.d(15): Error: address of variable `y` assigned to `x` with longer lifetime
+fail_compilation/fail20108.d(16): Error: scope variable `x` may not be returned
+fail_compilation/fail20108.d(23): Error: address of variable `y` assigned to `x` with longer lifetime
+fail_compilation/fail20108.d(24): Error: scope variable `x` may not be returned
+---
+*/
+
+@safe auto test(scope int* x)
+{
+ int y = 69;
+ x = &y; //bad
+ return x;
+}
+
+@safe auto test2()
+{
+ scope int* x;
+ int y = 69;
+ x = &y; //bad
+ return x;
+}
+
+void main()
+{
+ auto y = test(null);
+ auto z = test2();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20163.d b/gcc/testsuite/gdc.test/fail_compilation/fail20163.d
new file mode 100644
index 0000000..67df48b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20163.d
@@ -0,0 +1,11 @@
+// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/fail20164.d
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20163.d-mixin-11(11): Deprecation: module `imports.fail20164` is deprecated
+---
+*/
+module fail20163;
+
+mixin("import imports.fail20164;");
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20164.d b/gcc/testsuite/gdc.test/fail_compilation/fail20164.d
new file mode 100644
index 0000000..c70947c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20164.d
@@ -0,0 +1,14 @@
+// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/fail20164.d
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20164.d(13): Deprecation: module `imports.fail20164` is deprecated
+---
+*/
+module fail20164;
+
+void foo()
+{
+ import imports.fail20164;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20183.d b/gcc/testsuite/gdc.test/fail_compilation/fail20183.d
new file mode 100644
index 0000000..8a08844
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20183.d
@@ -0,0 +1,47 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/fail20183.d(1016): Error: function `fail20183.addr(return ref int b)` is not callable using argument types `(int)`
+fail_compilation/fail20183.d(1016): cannot pass rvalue argument `S(0).i` of type `int` to parameter `return ref int b`
+fail_compilation/fail20183.d(1017): Error: address of struct temporary returned by `s()` assigned to longer lived variable `q`
+---
+ */
+
+#line 1000
+
+// https://issues.dlang.org/show_bug.cgi?id=20183
+
+@safe:
+
+int* addr(return ref int b) { return &b; }
+
+struct S
+{
+ int i;
+}
+
+S s() { return S(); }
+
+void test()
+{
+ int* p = addr(S().i); // struct literal
+ int* q = addr(s().i); // struct temporary
+}
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20183.d(1107): Error: address of struct temporary returned by `s()` assigned to longer lived variable `this.ptr`
+---
+ */
+#line 1100
+
+class Foo
+{
+ int* ptr;
+
+ this() @safe
+ {
+ ptr = addr(s().i); // struct literal
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20376.d b/gcc/testsuite/gdc.test/fail_compilation/fail20376.d
new file mode 100644
index 0000000..8410af5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20376.d
@@ -0,0 +1,20 @@
+// https://issues.dlang.org/show_bug.cgi?id=20376
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20376.d(17): Error: cannot implicitly convert expression `Foo()` of type `Foo` to `ubyte`
+---
+*/
+
+struct Foo
+{
+ this(ref scope Foo);
+}
+
+ubyte fun()
+{
+ return Foo();
+}
+
+void main(){}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20448.d b/gcc/testsuite/gdc.test/fail_compilation/fail20448.d
new file mode 100644
index 0000000..6ef3a4a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20448.d
@@ -0,0 +1,23 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20448.d(16): Error: returning `p.x` escapes a reference to local variable `p`
+fail_compilation/fail20448.d(22): Error: template instance `fail20448.member!"x"` error instantiating
+---
+*/
+
+struct S
+{
+ int x, y;
+}
+
+ref int member(string mem)(S p)
+{
+ return p.x;
+}
+
+void main()
+{
+ S p;
+ p.member!"x" = 2;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20461.d b/gcc/testsuite/gdc.test/fail_compilation/fail20461.d
new file mode 100644
index 0000000..77c7178
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20461.d
@@ -0,0 +1,16 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/fail20461.d(106): Error: reference to local variable `buffer` assigned to non-scope parameter calling `assert()`
+---
+*/
+
+#line 100
+
+// https://issues.dlang.org/show_bug.cgi?id=20461
+
+void test() @safe
+{
+ char[10] buffer = "0123456789";
+ assert(false, buffer[]);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20538.d b/gcc/testsuite/gdc.test/fail_compilation/fail20538.d
new file mode 100644
index 0000000..df7f142e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20538.d
@@ -0,0 +1,14 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20538.d(12): Error: assignment must be preceded by an identifier
+fail_compilation/fail20538.d(12): Error: found `1` when expecting `,`
+---
+*/
+
+enum smth
+{
+ a,
+ = 1,
+ @disable b
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20547.d b/gcc/testsuite/gdc.test/fail_compilation/fail20547.d
new file mode 100644
index 0000000..c14977d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20547.d
@@ -0,0 +1,15 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20547.d(12): Error: cannot create a `string[string]` with `new`
+fail_compilation/fail20547.d(14): Error: cannot create a `string[string]` with `new`
+---
+*/
+
+void main()
+{
+ //https://issues.dlang.org/show_bug.cgi?id=11790
+ string[string] crash = new string[string];
+ //https://issues.dlang.org/show_bug.cgi?id=20547
+ int[string] c = new typeof(crash);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20551.d b/gcc/testsuite/gdc.test/fail_compilation/fail20551.d
new file mode 100644
index 0000000..633be0a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20551.d
@@ -0,0 +1,27 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20551.d(15): Error: cannot take address of lazy parameter `e` in `@safe` function `opAssign`
+fail_compilation/fail20551.d(26): Error: template instance `fail20551.LazyStore!int.LazyStore.opAssign!int` error instantiating
+---
+*/
+
+struct LazyStore(T)
+{
+ T delegate() @safe dg;
+
+ void opAssign(E)(lazy E e) @safe
+ {
+ dg = cast(typeof(dg)) &e;
+ }
+
+ T test() @safe{ return dg(); }
+}
+
+static LazyStore!int f;
+
+void main(string[] args) @safe
+{
+ int x = 1;
+ f = x + x + 20 + x * 20;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20609.d b/gcc/testsuite/gdc.test/fail_compilation/fail20609.d
new file mode 100644
index 0000000..05b7c85
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20609.d
@@ -0,0 +1,45 @@
+/*
+ TEST_OUTPUT:
+ ---
+fail_compilation/fail20609.d(26): Error: none of the overloads of `this` are callable using argument types `(int)`
+fail_compilation/fail20609.d(23): Candidate is: `fail20609.Foo.this(string[] args)`
+fail_compilation/fail20609.d(27): Error: none of the overloads of `this` are callable using argument types `(int)`
+fail_compilation/fail20609.d(22): Candidates are: `fail20609.Foo.this(Object _param_0)`
+fail_compilation/fail20609.d(23): `fail20609.Foo.this(string[] args)`
+fail_compilation/fail20609.d(37): Error: none of the overloads of `this` are callable using argument types `(int)`
+fail_compilation/fail20609.d(37): All possible candidates are marked as `deprecated` or `@disable`
+fail_compilation/fail20609.d(43): Error: undefined identifier `deprecatedTypo_`
+fail_compilation/fail20609.d(44): Error: undefined identifier `deprecatedTypo_`, did you mean function `deprecatedTypo`?
+fail_compilation/fail20609.d(45): Error: undefined identifier `disabledTypo_`
+---
+ */
+
+// Only show `this(string[])` in non-deprecated context.
+// Show both `this(string[])` and ` this(Object)` in deprecated context.
+struct Foo
+{
+ @disable this();
+ deprecated this(Object) {}
+ this(string[] args) {}
+}
+
+void test1() { auto f = Foo(42); }
+deprecated void test2() { auto f = Foo(42); }
+
+// Make sure we do not show a message promising candidates,
+// then no candidates in the special case where nothing
+// would be usable
+struct WhoDoesThat
+{
+ @disable this();
+ deprecated this(Object) {}
+}
+void test3() { auto f = WhoDoesThat(42); }
+
+// Make sure we don't suggest disabled or deprecated functions
+deprecated void deprecatedTypo () {}
+@disable void disabledTypo () {}
+
+void test4 () { deprecatedTypo_("42"); }
+deprecated void test5 () { deprecatedTypo_("42"); }
+void test6 () { disabledTypo_("42"); }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20616.d b/gcc/testsuite/gdc.test/fail_compilation/fail20616.d
new file mode 100644
index 0000000..0f76e31
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20616.d
@@ -0,0 +1,26 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20616.d(16): Error: undefined identifier `$`
+fail_compilation/fail20616.d(16): Aggregate declaration 'X()' does not define 'opDollar'
+fail_compilation/fail20616.d(18): Error: undefined identifier `$`
+fail_compilation/fail20616.d(18): Aggregate declaration 'b' does not define 'opDollar'
+---
+*/
+module fail20616;
+
+void g() {
+ struct X {
+ auto opSlice(size_t a, size_t b) { return ""; }
+ }
+ auto x = X()[0 .. $];
+ auto b = X();
+ auto c = b[0 .. $ - 1];
+ auto v = [1, 2, 3];
+ auto d = v[$.. $];
+}
+
+int main() {
+ g();
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20618.d b/gcc/testsuite/gdc.test/fail_compilation/fail20618.d
new file mode 100644
index 0000000..ac6b33a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20618.d
@@ -0,0 +1,16 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20618.d(13): Error: in slice `a[1 .. 12]`, upper bound is greater than array length `10`
+fail_compilation/fail20618.d(14): Error: in slice `a[4 .. 3]`, lower bound is greater than upper bound
+fail_compilation/fail20618.d(15): Error: in slice `a[0 .. 11]`, upper bound is greater than array length `10`
+---
+*/
+
+void main()
+{
+ int[10] a;
+ auto b = a[1..12];
+ auto c = a[4..3];
+ auto d = a[0..$ + 1];
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20637.d b/gcc/testsuite/gdc.test/fail_compilation/fail20637.d
new file mode 100644
index 0000000..77c69ea
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20637.d
@@ -0,0 +1,12 @@
+/*
+EXTRA_FILES: imports/fail20637b.d
+TEST_OUTPUT:
+---
+fail_compilation/fail20637.d(12): Error: no property `foo` for type `imports.fail20637b.A`
+---
+*/
+module fail20637;
+
+import imports.fail20637b;
+
+void main() { A.foo; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20638.d b/gcc/testsuite/gdc.test/fail_compilation/fail20638.d
new file mode 100644
index 0000000..9954d37
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20638.d
@@ -0,0 +1,14 @@
+/*
+EXTRA_FILES: imports/fail20638b.d
+TEST_OUTPUT:
+---
+fail_compilation/fail20638.d(13): Error: undefined identifier `foo` in module `imports.fail20638b`
+---
+*/
+module fail20638;
+
+import imports.fail20638b;
+
+void main() {
+ imports.fail20638b.foo;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20658.d b/gcc/testsuite/gdc.test/fail_compilation/fail20658.d
new file mode 100644
index 0000000..fd422aa
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20658.d
@@ -0,0 +1,14 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20658.d(14): Error: field `U.m` cannot modify fields in `@safe` code that overlap fields with other storage classes
+---
+*/
+
+union U
+{
+ int m;
+ immutable int i;
+}
+U u;
+enum e = () @safe { u.m = 13; };
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20691.d b/gcc/testsuite/gdc.test/fail_compilation/fail20691.d
new file mode 100644
index 0000000..7a43232
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20691.d
@@ -0,0 +1,25 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/fail20691.d(106): Error: cannot take address of `scope` local `sa` in `@safe` function `bar`
+fail_compilation/fail20691.d(106): Error: cannot cast expression `sa` of type `char[][2]` to `char[][]`
+fail_compilation/fail20691.d(107): Error: cannot take address of `scope` local `sa` in `@safe` function `bar`
+fail_compilation/fail20691.d(107): Error: cannot cast expression `sa` of type `char[][2]` to `char[][]`
+fail_compilation/fail20691.d(108): Error: cannot take address of `scope` local `sa` in `@safe` function `bar`
+fail_compilation/fail20691.d(108): Error: cannot cast expression `sa` of type `char[][2]` to `char[][]`
+---
+*/
+
+#line 100
+
+// https://issues.dlang.org/show_bug.cgi?id=20691
+
+void bar() @safe
+{
+ scope char[][2] sa;
+ scope char[][] da = cast(char[][])sa;
+ scope char[][] ca = sa;
+ foo(sa);
+}
+
+void foo(scope char[][] a) @safe;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail207.d b/gcc/testsuite/gdc.test/fail_compilation/fail207.d
index becf49b..2a00f7f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail207.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail207.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/fail207.d(10): Error: found end of file instead of initializer
-fail_compilation/fail207.d(10): Error: semicolon expected, not `EOF`
+fail_compilation/fail207.d(10): Error: semicolon expected, not `End of File`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20714.d b/gcc/testsuite/gdc.test/fail_compilation/fail20714.d
new file mode 100644
index 0000000..6bf6b07
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20714.d
@@ -0,0 +1,32 @@
+// https://issues.dlang.org/show_bug.cgi?id=20714
+// REQUIRED_ARGS: -de
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20714.d(19): Deprecation: `struct Adder` implicitly-generated postblit hides copy constructor.
+fail_compilation/fail20714.d(19): The field postblit will have priority over the copy constructor.
+fail_compilation/fail20714.d(19): To change this, the postblit should be disabled for `struct Adder`
+---
+*/
+
+
+struct Blitter
+{
+ int payload;
+ this(this){}
+}
+
+struct Adder
+{
+ Blitter blitter;
+ this(int payload) {this.blitter.payload = payload;}
+ this(ref Adder rhs) {this.blitter.payload = rhs.blitter.payload + 1;}
+}
+
+void main()
+{
+ Adder piece1 = 1;
+ auto piece2 = piece1;
+
+ assert(piece2.blitter.payload == 2);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20730a.d b/gcc/testsuite/gdc.test/fail_compilation/fail20730a.d
new file mode 100644
index 0000000..dcf8960
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20730a.d
@@ -0,0 +1,39 @@
+/*
+REQUIRED_ARGS: -o-
+TEST_OUTPUT:
+---
+fail_compilation/fail20730a.d(11): Error: undefined identifier `undef20730`
+---
+*/
+void test20730()
+{
+ auto f = File().byLine;
+ undef20730();
+}
+
+struct File
+{
+ shared uint refs;
+
+ this(this)
+ {
+ atomicOp!"+="(refs, 1);
+ }
+
+ struct ByLineImpl(Char)
+ {
+ File file;
+ char[] line;
+ }
+
+ auto byLine()
+ {
+ return ByLineImpl!char();
+ }
+}
+
+T atomicOp(string op, T, V1)(ref shared T val, V1 mod)
+ if (__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod")))
+{
+ return val;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20730b.d b/gcc/testsuite/gdc.test/fail_compilation/fail20730b.d
new file mode 100644
index 0000000..9320423
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20730b.d
@@ -0,0 +1,46 @@
+/*
+REQUIRED_ARGS: -verrors=spec -o-
+TEST_OUTPUT:
+---
+(spec:1) fail_compilation/fail20730b.d-mixin-43(43): Error: C style cast illegal, use `cast(int)mod`
+fail_compilation/fail20730b.d(26): Error: template `fail20730b.atomicOp` cannot deduce function from argument types `!("+=")(shared(uint), int)`
+fail_compilation/fail20730b.d(41): Candidate is: `atomicOp(string op, T, V1)(shared ref T val, V1 mod)`
+ with `op = "+=",
+ T = uint,
+ V1 = int`
+ must satisfy the following constraint:
+` __traits(compiles, mixin("(int)mod"))`
+---
+*/
+void test20730()
+{
+ auto f = File().byLine;
+}
+
+struct File
+{
+ shared uint refs;
+
+ this(this)
+ {
+ atomicOp!"+="(refs, 1);
+ }
+
+ struct ByLineImpl(Char)
+ {
+ File file;
+ char[] line;
+ }
+
+ auto byLine()
+ {
+ return ByLineImpl!char();
+ }
+}
+
+T atomicOp(string op, T, V1)(ref shared T val, V1 mod)
+ // C-style cast causes raises a parser error whilst gagged.
+ if (__traits(compiles, mixin("(int)mod")))
+{
+ return val;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20771.d b/gcc/testsuite/gdc.test/fail_compilation/fail20771.d
new file mode 100644
index 0000000..18e1c87
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20771.d
@@ -0,0 +1,21 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20771.d(19): Error: cannot pass types with postblits or copy constructors as variadic arguments
+fail_compilation/fail20771.d(20): Error: cannot pass types with postblits or copy constructors as variadic arguments
+---
+*/
+extern void variadic(...);
+
+struct S20771
+{
+ int field;
+ this(this) { }
+}
+
+void test()
+{
+ auto v = S20771(0);
+ variadic(v,
+ S20771(1));
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20772.d b/gcc/testsuite/gdc.test/fail_compilation/fail20772.d
new file mode 100644
index 0000000..a2fdac6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20772.d
@@ -0,0 +1,22 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20772.d(20): Error: cannot pass types with postblits or copy constructors as variadic arguments
+fail_compilation/fail20772.d(21): Error: cannot pass types with postblits or copy constructors as variadic arguments
+---
+*/
+extern void variadic(...);
+
+struct S20772
+{
+ int field;
+ this(int) { }
+ this(ref S20772 o) { }
+}
+
+void test()
+{
+ auto v = S20772(0);
+ variadic(v,
+ S20772(1));
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20775.d b/gcc/testsuite/gdc.test/fail_compilation/fail20775.d
new file mode 100644
index 0000000..3e05096
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20775.d
@@ -0,0 +1,21 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20775.d(19): Error: cannot pass types that need destruction as variadic arguments
+fail_compilation/fail20775.d(20): Error: cannot pass types that need destruction as variadic arguments
+---
+*/
+extern void variadic(...);
+
+struct S20775
+{
+ int field;
+ ~this() { }
+}
+
+void test()
+{
+ auto v = S20775(0);
+ variadic(v,
+ S20775(1));
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20779.d b/gcc/testsuite/gdc.test/fail_compilation/fail20779.d
new file mode 100644
index 0000000..945803d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20779.d
@@ -0,0 +1,17 @@
+// https://issues.dlang.org/show_bug.cgi?id=20779
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20779.d(12): Error: struct `fail20779.X` cannot have field `x` with same struct type
+---
+*/
+
+module fail20779;
+
+struct X
+{
+ X x;
+
+ enum e = __traits(compiles, X.init);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail208.d b/gcc/testsuite/gdc.test/fail_compilation/fail208.d
index 8abcc3e..f81774b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail208.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail208.d
@@ -1,14 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail208.d(18): Error: return expression expected
-fail_compilation/fail208.d(21): called from here: MakeA()
+fail_compilation/fail208.d(18): Error: `return` expression expected
+fail_compilation/fail208.d(21): called from here: `MakeA()`
---
*/
-// Issue 1593 - ICE compiler crash empty return statement in function
-
+// https://issues.dlang.org/show_bug.cgi?id=1593
+// ICE compiler crash empty return statement in function
struct A
{
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20800.d b/gcc/testsuite/gdc.test/fail_compilation/fail20800.d
new file mode 100644
index 0000000..1184b8e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20800.d
@@ -0,0 +1,24 @@
+// https://issues.dlang.org/show_bug.cgi?id=20800
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20800.d(22): Error: function `fail20800.fun(int a)` is not callable using argument types `(string)`
+fail_compilation/fail20800.d(22): cannot pass argument `(m()).index()` of type `string` to parameter `int a`
+---
+*/
+
+struct RegexMatch
+{
+ string index() { return null; }
+ ~this() { }
+}
+static m() { return RegexMatch(); }
+
+void fun(int a);
+
+void initCommands()
+{
+ fun(m.index);
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail209.d b/gcc/testsuite/gdc.test/fail_compilation/fail209.d
index a0211aa..689fd7b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail209.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail209.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail209.d(20): Error: incompatible types for ((a) -= (x)): 'float' and 'fail209.X'
+fail_compilation/fail209.d(20): Error: incompatible types for `(a) -= (x)`: `float` and `fail209.X`
---
*/
-// Issue 725 - expression.c:6516: virtual Expression* MinAssignExp::semantic(Scope*): Assertion `e2->type->isfloating()' failed
-
+// https://issues.dlang.org/show_bug.cgi?id=725
+// expression.c:6516: virtual Expression* MinAssignExp::semantic(Scope*): Assertion `e2->type->isfloating()' failed
class X
{
float a;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20965.d b/gcc/testsuite/gdc.test/fail_compilation/fail20965.d
new file mode 100644
index 0000000..192b84e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20965.d
@@ -0,0 +1,27 @@
+// https://issues.dlang.org/show_bug.cgi?id=20965
+// REQUIRED_ARGS: -de
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20965.d(17): Deprecation: `struct S` implicitly-generated postblit hides copy constructor.
+fail_compilation/fail20965.d(17): The field postblit will have priority over the copy constructor.
+fail_compilation/fail20965.d(17): To change this, the postblit should be disabled for `struct S`
+---
+*/
+
+struct C
+{
+ this(this) {}
+}
+
+struct S
+{
+ C c;
+ @disable this(ref typeof(this));
+}
+
+void main()
+{
+ S s1;
+ auto s2 = s1; // problem
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21091a.d b/gcc/testsuite/gdc.test/fail_compilation/fail21091a.d
new file mode 100644
index 0000000..c2bbe4d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21091a.d
@@ -0,0 +1,18 @@
+// https://issues.dlang.org/show_bug.cgi?id=21091
+
+/*
+TEST_OUTPUT:
+----
+fail_compilation/fail21091a.d(16): Error: unable to read module `Ternary`
+fail_compilation/fail21091a.d(16): Expected 'Ternary.d' or 'Ternary/package.d' in one of the following import paths:
+import path[0] = fail_compilation
+import path[1] = $p:druntime/import$
+import path[2] = $p:phobos$
+----
+*/
+
+struct NullAllocator
+{
+ import Ternary;
+ Ternary owns() { }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21091b.d b/gcc/testsuite/gdc.test/fail_compilation/fail21091b.d
new file mode 100644
index 0000000..3d7d600
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21091b.d
@@ -0,0 +1,18 @@
+// https://issues.dlang.org/show_bug.cgi?id=21091
+
+/*
+TEST_OUTPUT:
+----
+fail_compilation/fail21091b.d(16): Error: unable to read module `Tid`
+fail_compilation/fail21091b.d(16): Expected 'Tid.d' or 'Tid/package.d' in one of the following import paths:
+import path[0] = fail_compilation
+import path[1] = $p:druntime/import$
+import path[2] = $p:phobos$
+----
+*/
+
+class Logger
+{
+ import Tid;
+ Tid threadId;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21092.d b/gcc/testsuite/gdc.test/fail_compilation/fail21092.d
new file mode 100644
index 0000000..2ca826e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21092.d
@@ -0,0 +1,27 @@
+// https://issues.dlang.org/show_bug.cgi?id=21092
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail21092.d(19): Error: Using the result of a comma expression is not allowed
+fail_compilation/fail21092.d(19): Error: using `*` on an array is no longer supported; use `*(T , U).ptr` instead
+fail_compilation/fail21092.d(19): Error: `*(T , cast(real*)U)` has no effect
+fail_compilation/fail21092.d(26): Error: Using the result of a comma expression is not allowed
+fail_compilation/fail21092.d(26): Error: using `*` on an array is no longer supported; use `*(w , SmallStirlingCoeffs).ptr` instead
+fail_compilation/fail21092.d(26): Error: `*(w , cast(real*)SmallStirlingCoeffs)` has no effect
+---
+*/
+
+real[] T;
+real[] U = [];
+real erf()
+{
+ *(T, U);
+}
+
+real gammaStirling()
+{
+ static real[] SmallStirlingCoeffs = [];
+ real w;
+ *(w, SmallStirlingCoeffs);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail212.d b/gcc/testsuite/gdc.test/fail_compilation/fail212.d
index 63c573e..5f30863 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail212.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail212.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail212.d(14): Error: function fail212.S.bar without 'this' cannot be const
+fail_compilation/fail212.d(14): Error: function `fail212.S.bar` without `this` cannot be `const`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21275.d b/gcc/testsuite/gdc.test/fail_compilation/fail21275.d
new file mode 100644
index 0000000..dbdedb3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21275.d
@@ -0,0 +1,22 @@
+// https://issues.dlang.org/show_bug.cgi?id=21275
+// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/fail21275a.d
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail21275.d(18): Deprecation: Function `imports.fail21275a.Foo.x` of type `ref int() return` is not accessible from module `fail21275`
+fail_compilation/fail21275.d(21): Deprecation: Function `imports.fail21275a.Bar.x` of type `int(int)` is not accessible from module `fail21275`
+---
+*/
+
+void main()
+{
+ import imports.fail21275a;
+
+ auto f = Foo();
+ f.x = 3;
+
+ auto b = Bar();
+ b.x = 3;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail213.d b/gcc/testsuite/gdc.test/fail_compilation/fail213.d
index d002382..fee91ec 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail213.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail213.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail213.d(18): Error: template instance Foo!int does not match template declaration Foo(T : immutable(T))
-fail_compilation/fail213.d(25): Error: template instance Foo!(const(int)) does not match template declaration Foo(T : immutable(T))
+fail_compilation/fail213.d(18): Error: template instance `Foo!int` does not match template declaration `Foo(T : immutable(T))`
+fail_compilation/fail213.d(25): Error: template instance `Foo!(const(int))` does not match template declaration `Foo(T : immutable(T))`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail215.d b/gcc/testsuite/gdc.test/fail_compilation/fail215.d
index f942723..292f071 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail215.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail215.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail215.d(10): Error: function fail215.b.k cannot be both final and abstract
+fail_compilation/fail215.d(10): Error: function `fail215.b.k` cannot be both `final` and `abstract`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21508.d b/gcc/testsuite/gdc.test/fail_compilation/fail21508.d
new file mode 100644
index 0000000..da5d8f9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21508.d
@@ -0,0 +1,18 @@
+/*
+REQUIRED_ARGS: -Ifail_compilation/imports/
+EXTRA_FILES: imports/import21508.d
+TEST_OUTPUT:
+---
+fail_compilation/fail21508.d(17): Error: import `fail21508.import21508` is used as a type
+---
+*/
+import import21508;
+
+// import21508 is a private class, code should not compile
+// The compiler used to "helpfully" look inside the import,
+// bypassing the shadowing that this introduces.
+
+void main ()
+{
+ auto c = new import21508();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21508_2.d b/gcc/testsuite/gdc.test/fail_compilation/fail21508_2.d
new file mode 100644
index 0000000..af986b7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21508_2.d
@@ -0,0 +1,11 @@
+/*
+REQUIRED_ARGS: -Ifail_compilation/imports/
+EXTRA_FILES: imports/import21508.d
+TEST_OUTPUT:
+---
+fail_compilation/fail21508_2.d(11): Error: import `fail21508_2.import21508` is used as a type
+---
+*/
+import import21508;
+
+class Other : import21508 { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21547.d b/gcc/testsuite/gdc.test/fail_compilation/fail21547.d
new file mode 100644
index 0000000..7a6a44a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21547.d
@@ -0,0 +1,34 @@
+// https://issues.dlang.org/show_bug.cgi?id=21547
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail21547.d(32): Error: struct `Bar` has constructors, cannot use `{ initializers }`, use `Bar( initializers )` instead
+fail_compilation/fail21547.d(33): Error: struct `Bar1` has constructors, cannot use `{ initializers }`, use `Bar1( initializers )` instead
+---
+*/
+
+struct Bar
+{
+ @disable this(int a) {}
+ this(int a, int b) {}
+
+ string a;
+ uint b;
+}
+
+struct Bar1
+{
+ @disable this(int a) {}
+ this(const ref Bar1 o) {}
+ this(int a, int b) {}
+
+ string a;
+ uint b;
+}
+
+void main ()
+{
+ Bar b = { a: "Hello", b: 42 };
+ Bar1 b1 = { a: "Hello", b: 42 };
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail216.d b/gcc/testsuite/gdc.test/fail_compilation/fail216.d
index 98dcbb8..eb736e6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail216.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail216.d
@@ -1,14 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail216.d(16): Error: expression foo() is void and has no value
-fail_compilation/fail216.d(14): Error: function fail216.bar has no return statement, but is expected to return a value of type int
-fail_compilation/fail216.d(19): called from here: bar()
+fail_compilation/fail216.d(16): Error: expression `foo()` is `void` and has no value
+fail_compilation/fail216.d(14): Error: function `fail216.bar` has no `return` statement, but is expected to return a value of type `int`
+fail_compilation/fail216.d(19): called from here: `bar()`
---
*/
-// Issue 1744 - CTFE: crash on assigning void-returning function to variable
-
+// https://issues.dlang.org/show_bug.cgi?id=1744
+// CTFE: crash on assigning void-returning function to variable
void foo() {}
int bar()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail218.d b/gcc/testsuite/gdc.test/fail_compilation/fail218.d
index e180e77..a468611 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail218.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail218.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail218.d(15): Error: cannot modify string literal ", "
+fail_compilation/fail218.d(15): Error: cannot modify string literal `", "`
---
*/
-// Issue 1788 - dmd segfaults without info
-
+// https://issues.dlang.org/show_bug.cgi?id=1788
+// dmd segfaults without info
void main()
{
string a = "abc";
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21830.d b/gcc/testsuite/gdc.test/fail_compilation/fail21830.d
new file mode 100644
index 0000000..9955c65
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21830.d
@@ -0,0 +1,34 @@
+/* REQUIRED_ARGS: -de -unittest
+TEST_OUTPUT
+---
+fail_compilation/fail21830.d(24): Deprecation: struct `fail21830.OldS21830` is deprecated - Deprecated type
+fail_compilation/fail21830.d(24): Deprecation: template `fail21830.test21830(T)(T t) if (is(T == OldS21830))` is deprecated - Deprecated template
+fail_compilation/fail21830.d(24): Deprecation: struct `fail21830.OldS21830` is deprecated - Deprecated type
+---
+*/
+#line 1
+deprecated("Deprecated type")
+struct OldS21830 { }
+
+struct NewS21830 { }
+
+static if (1)
+{
+ auto test21830(T)(T t)
+ if (is(T == NewS21830))
+ {
+ return T.init;
+ }
+}
+
+deprecated("Deprecated template")
+auto test21830(T)(T t)
+if (is(T == OldS21830))
+{
+ return T.init;
+}
+
+unittest
+{
+ auto b = test21830(OldS21830());
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21831.d b/gcc/testsuite/gdc.test/fail_compilation/fail21831.d
new file mode 100644
index 0000000..699ef0b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21831.d
@@ -0,0 +1,29 @@
+/* REQUIRED_ARGS: -de -unittest
+TEST_OUTPUT
+---
+fail_compilation/fail21831.d(19): Deprecation: struct `fail21831.S21831` is deprecated - Deprecated type
+fail_compilation/fail21831.d(19): Deprecation: template `fail21831.test21831(T)(T t) if (__traits(isDeprecated, T))` is deprecated - Deprecated template
+fail_compilation/fail21831.d(19): Deprecation: struct `fail21831.S21831` is deprecated - Deprecated type
+---
+*/
+#line 1
+deprecated("Deprecated type")
+struct S21831 { }
+
+auto test21831(T)(T t)
+if (!__traits(isDeprecated, T))
+{
+ return T.init;
+}
+
+deprecated("Deprecated template")
+auto test21831(T)(T t)
+if (__traits(isDeprecated, T))
+{
+ return T.init;
+}
+
+unittest
+{
+ auto b = test21831(S21831());
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21832.d b/gcc/testsuite/gdc.test/fail_compilation/fail21832.d
new file mode 100644
index 0000000..03753a4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21832.d
@@ -0,0 +1,21 @@
+// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/imp21832.d
+/*
+TEST_OUTPUT
+---
+fail_compilation/fail21832.d(4): Deprecation: function `imports.imp21832.fun` is deprecated
+fail_compilation/fail21832.d(10): Deprecation: template `imports.imp21832.tpl()(char a)` is deprecated
+---
+*/
+#line 1
+int test21832a()
+{
+ import imports.imp21832 : fun;
+ return fun('a');
+}
+
+int test21832b()
+{
+ import imports.imp21832 : tpl;
+ return tpl('a');
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21849.d b/gcc/testsuite/gdc.test/fail_compilation/fail21849.d
new file mode 100644
index 0000000..75821f6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21849.d
@@ -0,0 +1,36 @@
+// https://issues.dlang.org/show_bug.cgi?id=21849
+// REQUIRED_ARGS: -verrors=context -vcolumns
+/* TEST_OUTPUT:
+---
+fail_compilation/fail21849.d(21,17): Error: cannot implicitly convert expression `1` of type `int` to `string`
+ string ß = 1;
+ ^
+fail_compilation/fail21849.d(25,42): Error: cannot implicitly convert expression `cast(ushort)65535u` of type `ushort` to `byte`
+ string s = "ß☺-oneline"; byte S = ushort.max;
+ ^
+fail_compilation/fail21849.d(30,10): Error: undefined identifier `undefined_identifier`
+ß-utf"; undefined_identifier;
+ ^
+fail_compilation/fail21849.d(35,15): Error: `s[0..9]` has no effect
+☺-smiley"; s[0 .. 9];
+ ^
+---
+*/
+void fail21849a()
+{
+ string ß = 1;
+}
+void fail21849b()
+{
+ string s = "ß☺-oneline"; byte S = ushort.max;
+}
+void fail21849c()
+{
+ string s = "
+ß-utf"; undefined_identifier;
+}
+void fail21849d()
+{
+ string s = "
+☺-smiley"; s[0 .. 9];
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21868b.d b/gcc/testsuite/gdc.test/fail_compilation/fail21868b.d
new file mode 100644
index 0000000..6f34029
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21868b.d
@@ -0,0 +1,22 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/fail21868b.d(19): Error: returning `&s.x` escapes a reference to parameter `s`
+fail_compilation/fail21868b.d(19): perhaps remove `scope` parameter annotation so `return` applies to `ref`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=21868
+
+struct S
+{
+ int x;
+ int* y;
+}
+
+int* test(ref return scope S s)
+{
+ return &s.x;
+}
+
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21885.d b/gcc/testsuite/gdc.test/fail_compilation/fail21885.d
new file mode 100644
index 0000000..4052efd
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21885.d
@@ -0,0 +1,25 @@
+// https://issues.dlang.org/show_bug.cgi?id=21885
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail21885.d(24): Error: struct `fail21885.Outer` is not copyable because field `i` is not copyable
+---
+*/
+
+struct Outer
+{
+ Inner i;
+}
+
+struct Inner
+{
+ @disable this(this);
+}
+
+void main()
+{
+ Outer o1;
+ Outer o2;
+ o1 = o2;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21928.d b/gcc/testsuite/gdc.test/fail_compilation/fail21928.d
new file mode 100644
index 0000000..c9fac13
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21928.d
@@ -0,0 +1,19 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail21928.d(18): Error: array literal in `@nogc` function `D main` may cause a GC allocation
+---
+*/
+
+@nogc:
+
+
+struct Shape
+{
+ immutable size_t[] dims = [];
+}
+
+void main()
+{
+ auto s = Shape(2 ~ Shape.init.dims);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail21928b.d b/gcc/testsuite/gdc.test/fail_compilation/fail21928b.d
new file mode 100644
index 0000000..3ce93e0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail21928b.d
@@ -0,0 +1,19 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail21928b.d(18): Error: array literal in `@nogc` function `D main` may cause a GC allocation
+---
+*/
+
+@nogc:
+
+
+struct Shape
+{
+ immutable size_t[] dims = [];
+}
+
+void main()
+{
+ auto s = Shape(Shape.init.dims ~ 2);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail2195.d b/gcc/testsuite/gdc.test/fail_compilation/fail2195.d
index b6d5304..0eff066 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail2195.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail2195.d
@@ -16,3 +16,19 @@ void main()
int variable; // shadowing is disallowed but not detected
}
}
+
+void fun()
+{
+ int var1, var2, var3;
+
+ void gun()
+ {
+ int var1; // OK?
+
+ int[] arr;
+ foreach (i, var2; arr) {} // OK?
+
+ int[int] aa;
+ foreach (k, var3; aa) {} // Not OK??
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22035.d b/gcc/testsuite/gdc.test/fail_compilation/fail22035.d
new file mode 100644
index 0000000..ba03be6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22035.d
@@ -0,0 +1,11 @@
+// https://issues.dlang.org/show_bug.cgi?id=22035
+/* TEST_OUTPUT
+---
+fail_compilation/fail22035.d(10): Error: found `2` when expecting `:`
+fail_compilation/fail22035.d(10): Error: found `:` instead of statement
+---
+*/
+int test22035()
+{
+ case 1 2:
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22054.d b/gcc/testsuite/gdc.test/fail_compilation/fail22054.d
new file mode 100644
index 0000000..c172f08
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22054.d
@@ -0,0 +1,23 @@
+// https://issues.dlang.org/show_bug.cgi?id=22054
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail22054.d(21): Error: no property `what` for type `fail22054.exception`
+fail_compilation/fail22054.d(16): `class fail22054.exception` is opaque and has no members.
+fail_compilation/fail22054.d(22): Error: no property `what` for type `fail22054.exception2`
+fail_compilation/fail22054.d(17): `struct fail22054.exception2` is opaque and has no members.
+---
+*/
+
+
+
+
+class exception;
+struct exception2;
+
+void main ()
+{
+ assert(exception.what() == "Hello");
+ assert(exception2.what() == "Hello");
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22075.d b/gcc/testsuite/gdc.test/fail_compilation/fail22075.d
new file mode 100644
index 0000000..9b857c2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22075.d
@@ -0,0 +1,30 @@
+// https://issues.dlang.org/show_bug.cgi?id=22075
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail22075.d(25): Error: AA key type `S` should have `extern (D) size_t toHash() const nothrow @safe` if `opEquals` defined
+fail_compilation/fail22075.d(26): Error: AA key type `S` should have `extern (D) size_t toHash() const nothrow @safe` if `opEquals` defined
+---
+*/
+
+struct HasAliasThis { int a; alias a this; }
+
+struct LacksAliasThis { int a; }
+
+struct S(T)
+{
+ private T a;
+
+ bool opEquals(const S rhs) const @nogc nothrow @safe
+ {
+ return rhs is this;
+ }
+}
+
+int[S!HasAliasThis] aa1; // Compiles but should not.
+int[S!LacksAliasThis] aa2; // Correctly fails to compile with "Error: AA key
+ // type `S` should have `extern (D) size_t toHash() const nothrow @safe`
+ // if `opEquals` defined"".
+
+void main() {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22084.d b/gcc/testsuite/gdc.test/fail_compilation/fail22084.d
new file mode 100644
index 0000000..bd11832
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22084.d
@@ -0,0 +1,23 @@
+// https://issues.dlang.org/show_bug.cgi?id=22084
+/*
+TEST_OUTPUT
+---
+fail_compilation/fail22084.d(22): Error: cannot pass types that need destruction as variadic arguments
+---
+*/
+import core.stdc.stdarg;
+
+extern(C++) void testVariadic(int a, ...)
+{
+}
+
+struct Destructor
+{
+ ~this() { }
+}
+
+void test()
+{
+ auto a0 = Destructor();
+ testVariadic(1, a0);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail221.d b/gcc/testsuite/gdc.test/fail_compilation/fail221.d
index 9bada5b..14c3e7b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail221.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail221.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail221.d(11): Error: expression cast(void)0 is void and has no value
+fail_compilation/fail221.d(11): Error: expression `cast(void)0` is `void` and has no value
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22118.d b/gcc/testsuite/gdc.test/fail_compilation/fail22118.d
new file mode 100644
index 0000000..7408661
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22118.d
@@ -0,0 +1,36 @@
+// https://issues.dlang.org/show_bug.cgi?id=22118
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail22118.d(33): Error: cannot modify `this.v.a` in `const` function
+---
+*/
+
+struct NeedsInit
+{
+ int n;
+ @disable this();
+}
+
+union U
+{
+ NeedsInit a;
+}
+
+struct V
+{
+ NeedsInit a;
+}
+
+struct S
+{
+ U u;
+ V v;
+ this(const NeedsInit arg) const
+ {
+ u.a = arg; // this should compile
+ v.a = arg; // this should not
+ }
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22121.d b/gcc/testsuite/gdc.test/fail_compilation/fail22121.d
new file mode 100644
index 0000000..f45cf12
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22121.d
@@ -0,0 +1,11 @@
+// https://issues.dlang.org/show_bug.cgi?id=22121
+// EXTRA_FILES: fail22121/imports/test22121/package.d
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail22121/imports/test22121/package.d(1): Error: package name 'fail22121' conflicts with usage as a module name in file fail_compilation/fail22121.d
+---
+*/
+
+module fail22121;
+import fail22121.imports.test22121;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22121/imports/test22121/package.d b/gcc/testsuite/gdc.test/fail_compilation/fail22121/imports/test22121/package.d
new file mode 100644
index 0000000..9277fab
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22121/imports/test22121/package.d
@@ -0,0 +1 @@
+module fail22121.imports.test22121;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22138.d b/gcc/testsuite/gdc.test/fail_compilation/fail22138.d
new file mode 100644
index 0000000..4fee96f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22138.d
@@ -0,0 +1,21 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/fail22138.d(107): Error: scope variable `e` may not be returned
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=22138
+
+#line 100
+
+@safe
+int* test()
+{
+ int*[] a;
+ foreach (scope e; a)
+ {
+ return e;
+ }
+ return null;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22151.d b/gcc/testsuite/gdc.test/fail_compilation/fail22151.d
new file mode 100644
index 0000000..c6c3b1b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22151.d
@@ -0,0 +1,24 @@
+// https://issues.dlang.org/show_bug.cgi?id=22151
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail22151.d(14): Error: function `test` is not an lvalue and cannot be modified
+fail_compilation/fail22151.d(15): Error: function `test2` is not an lvalue and cannot be modified
+fail_compilation/fail22151.d(18): Error: function pointed to by `fp` is not an lvalue and cannot be modified
+fail_compilation/fail22151.d(21): Error: function pointed to by `ff` is not an lvalue and cannot be modified
+---
+*/
+
+void test()
+{
+ *&test = *&test;
+ *&test2 = *&test;
+
+ void function() fp;
+ *fp = *fp;
+
+ auto ff = &test2;
+ *ff = *&test2;
+}
+
+void test2();
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22157.d b/gcc/testsuite/gdc.test/fail_compilation/fail22157.d
new file mode 100644
index 0000000..d25aaad
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22157.d
@@ -0,0 +1,34 @@
+// https://issues.dlang.org/show_bug.cgi?id=22157
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail22157.d(32): Error: `fail22157.S!true.S.foo` called with argument types `()` matches both:
+fail_compilation/fail22157.d(21): `fail22157.S!true.S.foo()`
+and:
+fail_compilation/fail22157.d(22): `fail22157.S!true.S.foo()`
+fail_compilation/fail22157.d(33): Error: `fail22157.S!false.S.foo` called with argument types `()` matches both:
+fail_compilation/fail22157.d(26): `fail22157.S!false.S.foo()`
+and:
+fail_compilation/fail22157.d(27): `fail22157.S!false.S.foo()`
+---
+*/
+
+struct S(bool b)
+{
+ static if(b)
+ {
+ void foo() {}
+ static void foo() {}
+ }
+ else
+ {
+ static void foo() {}
+ void foo() {}
+ }
+}
+
+void main() {
+ S!true.foo;
+ S!false.foo;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail222.d b/gcc/testsuite/gdc.test/fail_compilation/fail222.d
index c377239..30eb014 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail222.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail222.d
@@ -1,9 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail222.d(10): Error: template fail222.getMixin(TArg..., int i = 0)() template tuple parameter must be last one
-fail_compilation/fail222.d(17): Error: template instance getMixin!() does not match template declaration getMixin(TArg..., int i = 0)()
-fail_compilation/fail222.d(20): Error: template instance fail222.Thing!() error instantiating
+fail_compilation/fail222.d(11): Error: template `fail222.getMixin(TArg..., int i = 0)()` template tuple parameter must be last one
+fail_compilation/fail222.d(18): Error: template instance `getMixin!()` does not match template declaration `getMixin(TArg..., int i = 0)()`
+fail_compilation/fail222.d(21): Error: template instance `fail222.Thing!()` error instantiating
+fail_compilation/fail222.d(23): Error: template `fail222.fooBar(A..., B...)()` template tuple parameter must be last one
---
*/
@@ -18,3 +19,5 @@ class Thing(TArg...)
}
public Thing!() stuff;
+
+void fooBar (A..., B...)() {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail223.d b/gcc/testsuite/gdc.test/fail_compilation/fail223.d
index 99e26ea..804b535 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail223.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail223.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail223.d(14): Error: cannot modify this.x in const function
+fail_compilation/fail223.d(14): Error: cannot modify `this.x` in `const` function
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22366.d b/gcc/testsuite/gdc.test/fail_compilation/fail22366.d
new file mode 100644
index 0000000..3a2469f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22366.d
@@ -0,0 +1,15 @@
+// REQUIRED_ARGS: -dip1000
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail22366.d(13): Error: scope variable `__aaval2` assigned to non-scope `aa[0]`
+---
+*/
+
+int* fun(scope int* x) @safe
+{
+ int*[int] aa;
+ aa[0] = x; // should give an error
+ return aa[0];
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail224.d b/gcc/testsuite/gdc.test/fail_compilation/fail224.d
index 4bde370..c52cb431 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail224.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail224.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail224.d(22): Error: need 'this' of type A to access member x from static function f
+fail_compilation/fail224.d(22): Error: need `this` of type `A` to access member `x` from static function `f`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail225.d b/gcc/testsuite/gdc.test/fail_compilation/fail225.d
deleted file mode 100644
index dee9a54..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail225.d
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail225.d(15): Error: cannot implicitly convert expression `1` of type `int` to `immutable(char*)`
-fail_compilation/fail225.d(15): Error: cannot implicitly convert expression `& ch` of type `char*` to `immutable(char*)`
----
-*/
-struct Struct {
- char* chptr;
-}
-
-void main()
-{
- char ch = 'd';
- immutable Struct iStruct = {1, &ch};
-}
-
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22529.d b/gcc/testsuite/gdc.test/fail_compilation/fail22529.d
new file mode 100644
index 0000000..3bec3c0f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22529.d
@@ -0,0 +1,14 @@
+// https://issues.dlang.org/show_bug.cgi?id=22529
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail22529.d(13): Error: found `return` when expecting `;` following statement
+---
+*/
+
+void main()
+{
+ foo()
+ return;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22570.d b/gcc/testsuite/gdc.test/fail_compilation/fail22570.d
new file mode 100644
index 0000000..cb8c286
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22570.d
@@ -0,0 +1,21 @@
+// https://issues.dlang.org/show_bug.cgi?id=22570
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail22570.d(19): Error: more initializers than fields (1) of `S`
+fail_compilation/fail22570.d(20): Error: more initializers than fields (1) of `S`
+---
+*/
+
+struct S
+{
+ Object o1;
+}
+
+void main() @safe
+{
+ S[] s;
+ s = [S(null, null)];
+ s ~= S(null, null);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail229.d b/gcc/testsuite/gdc.test/fail_compilation/fail229.d
index 6cf8676..5b42cca 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail229.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail229.d
@@ -6,6 +6,6 @@ fail_compilation/fail229.d(11): Error: array dimension overflow
---
*/
-// Issue 1936 - Error with no line number (array dimension overflow)
-
+// https://issues.dlang.org/show_bug.cgi?id=1936
+// Error with no line number (array dimension overflow)
static int[] x = [-1: 1];
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail23.d b/gcc/testsuite/gdc.test/fail_compilation/fail23.d
index 29e8ed4..67d02eb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail23.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail23.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail23.d(14): Error: break is not inside a loop or switch
+fail_compilation/fail23.d(14): Error: `break` is not inside a loop or `switch`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail231.d b/gcc/testsuite/gdc.test/fail_compilation/fail231.d
index 95f25ee..fc6cfa1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail231.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail231.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail231.d(15): Error: class fail231.Derived cannot implicitly generate a default ctor when base class fail231.Base is missing a default ctor
+fail_compilation/fail231.d(15): Error: class `fail231.Derived` cannot implicitly generate a default constructor when base class `fail231.Base` is missing a default constructor
---
*/
-// Issue 951 - Missing line number: no constructor provided for a class derived from a class with no default constructor
-
+// https://issues.dlang.org/show_bug.cgi?id=951
+// Missing line number: no constructor provided for a class derived from a class with no default constructor
class Base
{
this(int x) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail233.d b/gcc/testsuite/gdc.test/fail_compilation/fail233.d
index e2274ab..7d4d978 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail233.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail233.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail233.d(11): Error: variable fail233.bug1176.v void[1] does not have a default initializer
+fail_compilation/fail233.d(11): Error: variable `fail233.bug1176.v` `void[1]` does not have a default initializer
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail235.d b/gcc/testsuite/gdc.test/fail_compilation/fail235.d
index d0d9deb..47f302d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail235.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail235.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail235.d(12): Error: expression typeid(char) is not a valid template value argument
+fail_compilation/fail235.d(12): Error: expression `typeid(char)` is not a valid template value argument
---
*/
template Tuple(TPL...)
@@ -14,7 +14,7 @@ auto K = Tuple!(typeid(char));
/*
TEST_OUTPUT:
---
-fail_compilation/fail235.d(24): Error: expression typeid(char) is not a valid template value argument
+fail_compilation/fail235.d(24): Error: expression `typeid(char)` is not a valid template value argument
---
*/
template Alias(alias A)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail236.d b/gcc/testsuite/gdc.test/fail_compilation/fail236.d
index 255a881..f63eb21 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail236.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail236.d
@@ -2,13 +2,13 @@
TEST_OUTPUT:
---
fail_compilation/fail236.d(14): Error: undefined identifier `x`
-fail_compilation/fail236.d(22): Error: template fail236.Templ2 cannot deduce function from argument types !()(int), candidates are:
-fail_compilation/fail236.d(12): fail236.Templ2(alias a)(x)
+fail_compilation/fail236.d(22): Error: template `fail236.Templ2` cannot deduce function from argument types `!()(int)`
+fail_compilation/fail236.d(12): Candidate is: `Templ2(alias a)(x)`
---
*/
-// Issue 870 - contradictory error messages for templates
-
+// https://issues.dlang.org/show_bug.cgi?id=870
+// contradictory error messages for templates
template Templ2(alias a)
{
void Templ2(x)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail2361.d b/gcc/testsuite/gdc.test/fail_compilation/fail2361.d
index 7cc402e..a969495 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail2361.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail2361.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail2361.d(13): Error: cannot modify immutable expression c
+fail_compilation/fail2361.d(14): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+fail_compilation/fail2361.d(14): Error: cannot modify `immutable` expression `c`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail237.d b/gcc/testsuite/gdc.test/fail_compilation/fail237.d
index 09ca94c..c930051 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail237.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail237.d
@@ -6,6 +6,6 @@ fail_compilation/fail237.d(11): while evaluating: `static assert(module f
---
*/
-// Issue 581 - Error message w/o line number in dot-instantiated template
-
+// https://issues.dlang.org/show_bug.cgi?id=581
+// Error message w/o line number in dot-instantiated template
static assert(.a!().b);
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail238_m32.d b/gcc/testsuite/gdc.test/fail_compilation/fail238_m32.d
index a312dc0..b4cfbc9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail238_m32.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail238_m32.d
@@ -10,8 +10,8 @@ fail_compilation/fail238_m32.d(35): while evaluating `pragma(msg, M!(q))`
---
*/
-// Issue 581 - Error message w/o line number in dot-instantiated template
-
+// https://issues.dlang.org/show_bug.cgi?id=581
+// Error message w/o line number in dot-instantiated template
template X(){}
template D(string str){}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail238_m64.d b/gcc/testsuite/gdc.test/fail_compilation/fail238_m64.d
index dc7a50e..10e1da4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail238_m64.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail238_m64.d
@@ -10,8 +10,8 @@ fail_compilation/fail238_m64.d(35): while evaluating `pragma(msg, M!(q))`
---
*/
-// Issue 581 - Error message w/o line number in dot-instantiated template
-
+// https://issues.dlang.org/show_bug.cgi?id=581
+// Error message w/o line number in dot-instantiated template
template X(){}
template D(string str){}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail24.d b/gcc/testsuite/gdc.test/fail_compilation/fail24.d
index 84cf8e1..3b30175 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail24.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail24.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail24.d(11): Error: alias fail24.strtype conflicts with alias fail24.strtype at fail_compilation/fail24.d(10)
-fail_compilation/fail24.d(12): Error: alias fail24.strtype conflicts with alias fail24.strtype at fail_compilation/fail24.d(11)
-fail_compilation/fail24.d(13): Error: alias fail24.strtype conflicts with alias fail24.strtype at fail_compilation/fail24.d(12)
+fail_compilation/fail24.d(11): Error: alias `fail24.strtype` conflicts with alias `fail24.strtype` at fail_compilation/fail24.d(10)
+fail_compilation/fail24.d(12): Error: alias `fail24.strtype` conflicts with alias `fail24.strtype` at fail_compilation/fail24.d(11)
+fail_compilation/fail24.d(13): Error: alias `fail24.strtype` conflicts with alias `fail24.strtype` at fail_compilation/fail24.d(12)
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail240.d b/gcc/testsuite/gdc.test/fail_compilation/fail240.d
index 8a06b434..e32768a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail240.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail240.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail240.d(9): Error: type F is not an expression
+fail_compilation/fail240.d(9): Error: type `F` is not an expression
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail241.d b/gcc/testsuite/gdc.test/fail_compilation/fail241.d
index 97cad21..babd193 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail241.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail241.d
@@ -1,8 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail241.d(16): Error: mutable method fail241.Foo.f is not callable using a const object
-fail_compilation/fail241.d(17): Error: mutable method fail241.Foo.g is not callable using a const object
+fail_compilation/fail241.d(18): Error: mutable method `fail241.Foo.f` is not callable using a `const` object
+fail_compilation/fail241.d(13): Consider adding `const` or `inout` here
+fail_compilation/fail241.d(19): Error: mutable method `fail241.Foo.g` is not callable using a `const` object
+fail_compilation/fail241.d(14): Consider adding `const` or `inout` here
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail243.d b/gcc/testsuite/gdc.test/fail_compilation/fail243.d
index c8970ba..d9852ff 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail243.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail243.d
@@ -2,11 +2,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail243.d(23): Deprecation: class fail243.DepClass is deprecated
-fail_compilation/fail243.d(24): Deprecation: struct fail243.DepStruct is deprecated
-fail_compilation/fail243.d(25): Deprecation: union fail243.DepUnion is deprecated
-fail_compilation/fail243.d(26): Deprecation: enum fail243.DepEnum is deprecated
-fail_compilation/fail243.d(27): Deprecation: alias fail243.DepAlias is deprecated
+fail_compilation/fail243.d(23): Deprecation: class `fail243.DepClass` is deprecated
+fail_compilation/fail243.d(24): Deprecation: struct `fail243.DepStruct` is deprecated
+fail_compilation/fail243.d(25): Deprecation: union `fail243.DepUnion` is deprecated
+fail_compilation/fail243.d(26): Deprecation: enum `fail243.DepEnum` is deprecated
+fail_compilation/fail243.d(27): Deprecation: alias `fail243.DepAlias` is deprecated
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail244.d b/gcc/testsuite/gdc.test/fail_compilation/fail244.d
index d688e9a..757eb2b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail244.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail244.d
@@ -2,16 +2,16 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail244.d(27): Deprecation: variable fail244.StructWithDeps.value is deprecated
-fail_compilation/fail244.d(28): Deprecation: variable fail244.StructWithDeps.value is deprecated
-fail_compilation/fail244.d(29): Deprecation: variable fail244.StructWithDeps.value is deprecated
-fail_compilation/fail244.d(30): Deprecation: variable fail244.StructWithDeps.value is deprecated
-fail_compilation/fail244.d(32): Deprecation: variable fail244.StructWithDeps.staticValue is deprecated
-fail_compilation/fail244.d(33): Deprecation: variable fail244.StructWithDeps.staticValue is deprecated
-fail_compilation/fail244.d(34): Deprecation: variable fail244.StructWithDeps.staticValue is deprecated
-fail_compilation/fail244.d(35): Deprecation: variable fail244.StructWithDeps.staticValue is deprecated
-fail_compilation/fail244.d(36): Deprecation: variable fail244.StructWithDeps.staticValue is deprecated
-fail_compilation/fail244.d(37): Deprecation: variable fail244.StructWithDeps.staticValue is deprecated
+fail_compilation/fail244.d(27): Deprecation: variable `fail244.StructWithDeps.value` is deprecated
+fail_compilation/fail244.d(28): Deprecation: variable `fail244.StructWithDeps.value` is deprecated
+fail_compilation/fail244.d(29): Deprecation: variable `fail244.StructWithDeps.value` is deprecated
+fail_compilation/fail244.d(30): Deprecation: variable `fail244.StructWithDeps.value` is deprecated
+fail_compilation/fail244.d(32): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated
+fail_compilation/fail244.d(33): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated
+fail_compilation/fail244.d(34): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated
+fail_compilation/fail244.d(35): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated
+fail_compilation/fail244.d(36): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated
+fail_compilation/fail244.d(37): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail245.d b/gcc/testsuite/gdc.test/fail_compilation/fail245.d
index 79e663d..927f941 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail245.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail245.d
@@ -2,16 +2,16 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail245.d(27): Deprecation: variable fail245.ClassWithDeps.value is deprecated
-fail_compilation/fail245.d(28): Deprecation: variable fail245.ClassWithDeps.value is deprecated
-fail_compilation/fail245.d(29): Deprecation: variable fail245.ClassWithDeps.value is deprecated
-fail_compilation/fail245.d(30): Deprecation: variable fail245.ClassWithDeps.value is deprecated
-fail_compilation/fail245.d(32): Deprecation: variable fail245.ClassWithDeps.staticValue is deprecated
-fail_compilation/fail245.d(33): Deprecation: variable fail245.ClassWithDeps.staticValue is deprecated
-fail_compilation/fail245.d(34): Deprecation: variable fail245.ClassWithDeps.staticValue is deprecated
-fail_compilation/fail245.d(35): Deprecation: variable fail245.ClassWithDeps.staticValue is deprecated
-fail_compilation/fail245.d(36): Deprecation: variable fail245.ClassWithDeps.staticValue is deprecated
-fail_compilation/fail245.d(37): Deprecation: variable fail245.ClassWithDeps.staticValue is deprecated
+fail_compilation/fail245.d(27): Deprecation: variable `fail245.ClassWithDeps.value` is deprecated
+fail_compilation/fail245.d(28): Deprecation: variable `fail245.ClassWithDeps.value` is deprecated
+fail_compilation/fail245.d(29): Deprecation: variable `fail245.ClassWithDeps.value` is deprecated
+fail_compilation/fail245.d(30): Deprecation: variable `fail245.ClassWithDeps.value` is deprecated
+fail_compilation/fail245.d(32): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated
+fail_compilation/fail245.d(33): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated
+fail_compilation/fail245.d(34): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated
+fail_compilation/fail245.d(35): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated
+fail_compilation/fail245.d(36): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated
+fail_compilation/fail245.d(37): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail2450.d b/gcc/testsuite/gdc.test/fail_compilation/fail2450.d
new file mode 100644
index 0000000..82118d5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail2450.d
@@ -0,0 +1,27 @@
+// https://issues.dlang.org/show_bug.cgi?id=2450
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail2450.d(22): Error: function expected before `()`, not `this.mixin Event!() clicked;
+` of type `void`
+fail_compilation/fail2450.d(25): Error: function expected before `()`, not `b.mixin Event!() clicked;
+` of type `void`
+---
+*/
+
+template Event()
+{
+ void opCall() { }
+ void opAddAssign(int i) { }
+}
+class Button {
+ mixin Event clicked;
+ void func()
+ {
+ clicked.opCall(); // works
+ this.clicked(); // works
+
+ auto b = new Button();
+ b.clicked(); // works
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail2456.d b/gcc/testsuite/gdc.test/fail_compilation/fail2456.d
index e8cf5ab..08e11da 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail2456.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail2456.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail2456.d(14): Error: cannot put `scope(success)` statement inside finally block
+fail_compilation/fail2456.d(14): Error: cannot put `scope(success)` statement inside `finally` block
---
*/
void test_success()
@@ -18,7 +18,7 @@ void test_success()
/*
TEST_OUTPUT:
---
-fail_compilation/fail2456.d(31): Error: cannot put `scope(failure)` statement inside finally block
+fail_compilation/fail2456.d(31): Error: cannot put `scope(failure)` statement inside `finally` block
---
*/
void test_failure()
@@ -84,8 +84,8 @@ void test2456a()
/*
TEST_OUTPUT:
---
-fail_compilation/fail2456.d(96): Error: cannot put catch statement inside `scope(success)`
-fail_compilation/fail2456.d(108): Error: cannot put catch statement inside `scope(exit)`
+fail_compilation/fail2456.d(96): Error: cannot put `catch` statement inside `scope(success)`
+fail_compilation/fail2456.d(108): Error: cannot put `catch` statement inside `scope(exit)`
---
*/
void test2456b()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail246.d b/gcc/testsuite/gdc.test/fail_compilation/fail246.d
index c6214ff..f48ddbb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail246.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail246.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail246.d-mixin-11(11): Error: identifier expected, not `EOF`
-fail_compilation/fail246.d-mixin-11(11): Error: `;` expected after mixin
+fail_compilation/fail246.d-mixin-11(11): Error: identifier expected, not `End of File`
+fail_compilation/fail246.d-mixin-11(11): Error: `;` expected after `mixin`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail247.d b/gcc/testsuite/gdc.test/fail_compilation/fail247.d
index 1acf1a4..4805d9d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail247.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail247.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail247.d-mixin-9(9): Error: identifier expected, not `EOF`
-fail_compilation/fail247.d-mixin-9(9): Error: `;` expected after mixin
+fail_compilation/fail247.d-mixin-9(9): Error: identifier expected, not `End of File`
+fail_compilation/fail247.d-mixin-9(9): Error: `;` expected after `mixin`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail248.d b/gcc/testsuite/gdc.test/fail_compilation/fail248.d
index 185de13..a15ec96 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail248.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail248.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail248.d(9): Error: type int is not an expression
+fail_compilation/fail248.d(9): Error: type `int` is not an expression
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail249.d b/gcc/testsuite/gdc.test/fail_compilation/fail249.d
index 79a4289..82b291f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail249.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail249.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail249.d(16): Error: invalid foreach aggregate `bar()`
+fail_compilation/fail249.d(16): Error: invalid `foreach` aggregate `bar()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail25.d b/gcc/testsuite/gdc.test/fail_compilation/fail25.d
index 7393a6c..11c0f0b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail25.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail25.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail25.d(14): Error: need 'this' for 'yuiop' of type 'int'
+fail_compilation/fail25.d(14): Error: need `this` for `yuiop` of type `int`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail250.d b/gcc/testsuite/gdc.test/fail_compilation/fail250.d
index c3fd763..c6c08f7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail250.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail250.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail250.d(10): Error: constructor fail250.A.this default constructor for structs only allowed with @disable, no body, and no parameters
+fail_compilation/fail250.d(10): Error: constructor `fail250.A.this` default constructor for structs only allowed with `@disable`, no body, and no parameters
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail251.d b/gcc/testsuite/gdc.test/fail_compilation/fail251.d
index 083f3a4..75cf6e2 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail251.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail251.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/fail251.d(12): Error: undefined identifier `xs`
-fail_compilation/fail251.d(16): called from here: foo()
+fail_compilation/fail251.d(16): called from here: `foo()`
fail_compilation/fail251.d(16): while evaluating: `static assert(foo())`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail253.d b/gcc/testsuite/gdc.test/fail_compilation/fail253.d
index 14e8858..bee7e31 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail253.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail253.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail253.d(13): Error: variable fail253.main.x inout variables can only be declared inside inout functions
-fail_compilation/fail253.d(16): Error: cannot modify inout expression x
+fail_compilation/fail253.d(13): Error: variable `fail253.main.x` `inout` variables can only be declared inside `inout` functions
+fail_compilation/fail253.d(16): Error: cannot modify `inout` expression `x`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail256.d b/gcc/testsuite/gdc.test/fail_compilation/fail256.d
index 87120e2..ce182e4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail256.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail256.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail256.d(8): Error: incompatible types for (("foo"d) ~ ("bar"c)): 'dstring' and 'string'
+fail_compilation/fail256.d(8): Error: incompatible types for `("foo"d) ~ ("bar"c)`: `dstring` and `string`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail259.d b/gcc/testsuite/gdc.test/fail_compilation/fail259.d
index 802e037..0c31b23 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail259.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail259.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail259.d(11): Error: function fail259.C.foo does not override any function
+fail_compilation/fail259.d(11): Error: function `fail259.C.foo` does not override any function
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail261.d b/gcc/testsuite/gdc.test/fail_compilation/fail261.d
index e25722c..73e062c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail261.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail261.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail261.d(18): Error: invalid foreach aggregate `range`, define opApply(), range primitives, or use .tupleof
+fail_compilation/fail261.d(18): Error: invalid `foreach` aggregate `range`, define `opApply()`, range primitives, or use `.tupleof`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail262.d b/gcc/testsuite/gdc.test/fail_compilation/fail262.d
index 6d15e1a..7c92c7c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail262.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail262.d
@@ -5,8 +5,8 @@ fail_compilation/fail262.d(23): Error: function `const void fail262.B.f()` does
---
*/
-// Issue 1645 - can override base class' const method with non-const method
-
+// https://issues.dlang.org/show_bug.cgi?id=1645
+// can override base class' const method with non-const method
import core.stdc.stdio;
class A
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail263.d b/gcc/testsuite/gdc.test/fail_compilation/fail263.d
index 8cf9b20..0fa2f86 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail263.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail263.d
@@ -6,8 +6,8 @@ fail_compilation/fail263.d(19): cannot pass argument `cast(const(byte)*)A
---
*/
-// Issue 2766 - DMD hangs with 0%cpu
-
+// https://issues.dlang.org/show_bug.cgi?id=2766
+// DMD hangs with 0%cpu
const byte[] A = [ cast(byte)0 ];
void f(byte* p)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail265.d b/gcc/testsuite/gdc.test/fail_compilation/fail265.d
index 476ff17..5585109 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail265.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail265.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail265.d-mixin-10(10): Error: found `EOF` instead of statement
+fail_compilation/fail265.d-mixin-10(10): Error: found `End of File` instead of statement
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail267.d b/gcc/testsuite/gdc.test/fail_compilation/fail267.d
index a6ebfac..fe02994 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail267.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail267.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail267.d(15): Error: template Bar() does not have property 'foo'
+fail_compilation/fail267.d(15): Error: template `Bar()` does not have property `foo`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail270.d b/gcc/testsuite/gdc.test/fail_compilation/fail270.d
index 8f31fd3..188fab8 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail270.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail270.d
@@ -2,8 +2,8 @@
TEST_OUTPUT:
---
fail_compilation/fail270.d(12): Error: string slice `[1 .. 0]` is out of bounds
-fail_compilation/fail270.d(12): Error: mixin fail270.Tuple!int.Tuple.Tuple!() error instantiating
-fail_compilation/fail270.d(14): Error: mixin fail270.Tuple!int error instantiating
+fail_compilation/fail270.d(12): Error: mixin `fail270.Tuple!int.Tuple.Tuple!()` error instantiating
+fail_compilation/fail270.d(14): Error: mixin `fail270.Tuple!int` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail272.d b/gcc/testsuite/gdc.test/fail_compilation/fail272.d
index 15325ad..508599a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail272.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail272.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail272.d(9): Error: circular reference to variable 'fail272.Ins!(Ins).Ins'
-fail_compilation/fail272.d(10): Error: template instance fail272.Ins!(Ins) error instantiating
+fail_compilation/fail272.d(9): Error: circular reference to variable `fail272.Ins!(Ins).Ins`
+fail_compilation/fail272.d(10): Error: template instance `fail272.Ins!(Ins)` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail273.d b/gcc/testsuite/gdc.test/fail_compilation/fail273.d
index 9393c85..bf93276 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail273.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail273.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail273.d(10): Error: alias fail273.b recursive alias declaration
+fail_compilation/fail273.d(10): Error: alias `fail273.b` recursive alias declaration
---
*/
-// Issue 1054 - regression: circular aliases cause compiler stack overflow
-
+// https://issues.dlang.org/show_bug.cgi?id=1054
+// regression: circular aliases cause compiler stack overflow
alias a b;
alias b a;
b x; // ICE #1
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail275.d b/gcc/testsuite/gdc.test/fail_compilation/fail275.d
index df3eca1..ba4bd75 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail275.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail275.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail275.d(10): Error: circular reference to variable 'fail275.C.x'
+fail_compilation/fail275.d(10): Error: circular reference to variable `fail275.C.x`
---
*/
// REQUIRED_ARGS: -d
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail278.d b/gcc/testsuite/gdc.test/fail_compilation/fail278.d
index 8437acd..39b4e4e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail278.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail278.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail278.d(11): Error: template instance NONEXISTENT!() template 'NONEXISTENT' is not defined
-fail_compilation/fail278.d(12): Error: template instance fail278.F!() error instantiating
-fail_compilation/fail278.d(13): instantiated from here: Bar!(Foo)
+fail_compilation/fail278.d(11): Error: template instance `NONEXISTENT!()` template `NONEXISTENT` is not defined
+fail_compilation/fail278.d(12): Error: template instance `fail278.F!()` error instantiating
+fail_compilation/fail278.d(13): instantiated from here: `Bar!(Foo)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail2789.d b/gcc/testsuite/gdc.test/fail_compilation/fail2789.d
new file mode 100644
index 0000000..2d6c8e2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail2789.d
@@ -0,0 +1,109 @@
+/*
+https://issues.dlang.org/show_bug.cgi?id=18385
+
+TEST_OUTPUT:
+---
+fail_compilation/fail2789.d(15): Error: function `fail2789.A2789.m()` conflicts with previous declaration at fail_compilation/fail2789.d(10)
+---
+*/
+#line 7
+
+class A2789
+{
+ int m()
+ {
+ return 1;
+ }
+
+ float m() // conflict
+ {
+ return 2.0;
+ }
+
+ float m() const // doen't conflict
+ {
+ return 3.0;
+ }
+
+ static void m() // no conflict
+ {
+ }
+}
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail2789.d(49): Error: function `fail2789.f4()` conflicts with previous declaration at fail_compilation/fail2789.d(48)
+fail_compilation/fail2789.d(55): Error: function `fail2789.f6()` conflicts with previous declaration at fail_compilation/fail2789.d(54)
+---
+*/
+
+
+void f1();
+void f1() {} // ok
+
+void f2() {}
+void f2(); // ok
+
+void f3();
+void f3(); // ok
+
+void f4() {}
+void f4() {} // conflict
+
+void f5() @safe {}
+void f5() @system {} // no conflict because of attribute based overloading in in extern(D)
+
+auto f6() { return 10; } // int()
+auto f6() { return ""; } // string(), conflict
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail2789.d(67): Error: function `fail2789.f_ExternC1()` conflicts with previous declaration at fail_compilation/fail2789.d(66)
+fail_compilation/fail2789.d(70): Deprecation: function `fail2789.f_ExternC2` cannot overload `extern(C)` function at fail_compilation/fail2789.d(69)
+fail_compilation/fail2789.d(73): Deprecation: function `fail2789.f_ExternC3` cannot overload `extern(C)` function at fail_compilation/fail2789.d(72)
+---
+*/
+
+extern(C) void f_ExternC1() {}
+extern(C) void f_ExternC1() {} // conflict
+
+extern(C) void f_ExternC2() {}
+extern(C) void f_ExternC2(int) {} // conflict
+
+extern(C) void f_ExternC3(int) {}
+extern(C) void f_ExternC3() {} // conflict
+
+extern (D) void f_MixExtern1() {}
+extern (C) void f_MixExtern1() {} // no conflict because of different mangling
+
+extern (D) void f_MixExtern2(int) {}
+extern (C) void f_MixExtern2() {} // no error
+
+extern (C) void f_ExternC4(int sig);
+extern (C) void f_ExternC4(int sig) @nogc; // no error
+
+extern (C) void f_ExternC5(int sig) {}
+extern (C) void f_ExternC5(int sig) @nogc; // no error
+
+extern (C) void f_ExternC6(int sig);
+extern (C) void f_ExternC6(int sig) @nogc {} // no error
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail2789.d(103): Error: function `fail2789.mul14147(const(int[]) left, const(int[]) right)` conflicts with previous declaration at fail_compilation/fail2789.d(99)
+---
+*/
+struct S14147(alias func)
+{
+}
+pure auto mul14147(const int[] left, const int[] right)
+{
+ S14147!(a => a) s;
+}
+pure auto mul14147(const int[] left, const int[] right)
+{
+ S14147!(a => a) s;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail282.d b/gcc/testsuite/gdc.test/fail_compilation/fail282.d
index 0b1391b..a25aa5c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail282.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail282.d
@@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail282.d(13): Error: template instance fail282.Template!500 recursive expansion
+fail_compilation/fail282.d(13): Error: template instance `fail282.Template!500` recursive expansion exceeded allowed nesting limit
---
*/
-// Issue 2920 - recursive templates blow compiler stack
+// https://issues.dlang.org/show_bug.cgi?id=2920
+// recursive templates blow compiler stack
// template_class_09.
-
template Template(int i)
{
class Class : Template!(i + 1).Class
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail284.d b/gcc/testsuite/gdc.test/fail_compilation/fail284.d
index a33f2c5..abfad67 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail284.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail284.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail284.d(19): Error: pure function 'fail284.foo' cannot call impure function pointer 'a'
+fail_compilation/fail284.d(19): Error: `pure` function `fail284.foo` cannot call impure function pointer `a`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail287.d b/gcc/testsuite/gdc.test/fail_compilation/fail287.d
index 7ed8f13..e5b1a79 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail287.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail287.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail287.d(14): Error: had 299 cases which is more than 256 cases in case range
+fail_compilation/fail287.d(14): Error: had 300 cases which is more than 257 cases in case range
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail288.d b/gcc/testsuite/gdc.test/fail_compilation/fail288.d
index d6b68c9..4fdaddd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail288.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail288.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail288.d(14): Error: case ranges not allowed in final switch
+fail_compilation/fail288.d(14): Error: case ranges not allowed in `final switch`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail291.d b/gcc/testsuite/gdc.test/fail_compilation/fail291.d
index 79ff2b0..e8d9f37 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail291.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail291.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail291.d(9): Error: variable fail291.X cannot be declared to be a function
+fail_compilation/fail291.d(9): Error: variable `fail291.X` cannot be declared to be a function
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail296.d b/gcc/testsuite/gdc.test/fail_compilation/fail296.d
index 3f1e5d3f..920854f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail296.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail296.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail296.d(10): Error: can only * a pointer, not a 'int'
+fail_compilation/fail296.d(10): Error: can only `*` a pointer, not a `int`
---
*/
-// Issue 3117 - dmd crash by *1
-
+// https://issues.dlang.org/show_bug.cgi?id=3117
+// dmd crash by *1
void main(){ *1; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail2962.d b/gcc/testsuite/gdc.test/fail_compilation/fail2962.d
index 06caadc..59e86c1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail2962.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail2962.d
@@ -4,9 +4,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail2962.d(14): Error: variable y cannot be read at compile time
-fail_compilation/fail2962.d(14): while looking for match for baz6!(int, y)
-fail_compilation/fail2962.d(22): Error: template instance fail2962.bar6!int error instantiating
+fail_compilation/fail2962.d(14): Error: variable `y` cannot be read at compile time
+fail_compilation/fail2962.d(14): while looking for match for `baz6!(int, y)`
+fail_compilation/fail2962.d(22): Error: template instance `fail2962.bar6!int` error instantiating
---
*/
T bar6(T)(T y)
@@ -26,9 +26,9 @@ void test6()
/*
TEST_OUTPUT:
---
-fail_compilation/fail2962.d(36): Error: variable x cannot be read at compile time
-fail_compilation/fail2962.d(36): while looking for match for baz4!(int, x)
-fail_compilation/imports/fail2962a.d(6): Error: template instance fail2962.bar4!int error instantiating
+fail_compilation/fail2962.d(36): Error: variable `x` cannot be read at compile time
+fail_compilation/fail2962.d(36): while looking for match for `baz4!(int, x)`
+fail_compilation/imports/fail2962a.d(6): Error: template instance `fail2962.bar4!int` error instantiating
---
*/
T bar4(T)(T x)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail297.d b/gcc/testsuite/gdc.test/fail_compilation/fail297.d
index fd2249d..5fc3bbf 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail297.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail297.d
@@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail297.d(30): Error: incompatible types for ((Bar()) + (baz())): 'Bar' and 'const(Bar)'
+fail_compilation/fail297.d(30): Error: incompatible types for `(Bar()) + (baz())`: `Bar` and `const(Bar)`
---
*/
-// Issue 1969 - ICE(cod1.c) using undefined operator with one const operand
-
-// 1969 ICE or wrong-code. D2 only. Internal error: backend\cod1.c 1673
+// https://issues.dlang.org/show_bug.cgi?id=1969
+// ICE(cod1.c) using undefined operator with one const operand
+// ICE or wrong-code. D2 only. Internal error: backend\cod1.c 1673
/* Root cause: BinExp::typeCombine() is checking for an _exact_ match, but
typeMerge() will return success.
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail299.d b/gcc/testsuite/gdc.test/fail_compilation/fail299.d
index 1bfdd82..ffe5067 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail299.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail299.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail299.d(14): Error: more initializers than fields (0) of Foo
+fail_compilation/fail299.d(14): Error: more initializers than fields (0) of `Foo`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3.d b/gcc/testsuite/gdc.test/fail_compilation/fail3.d
index 0b7516c..5c1ea91 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail3.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail3.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail3.d(41): Error: incompatible types for ((a) + (b)): both operands are of type 'vec2'
+fail_compilation/fail3.d(41): Error: incompatible types for `(a) + (b)`: both operands are of type `vec2`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail301.d b/gcc/testsuite/gdc.test/fail_compilation/fail301.d
index b012fc8..bf90f55 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail301.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail301.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail301.d(11): Error: need 'this' for 'guard' of type 'int'
-fail_compilation/fail301.d(22): Error: template instance fail301.bug3305!0 error instantiating
+fail_compilation/fail301.d(11): Error: need `this` for `guard` of type `int`
+fail_compilation/fail301.d(22): Error: template instance `fail301.bug3305!0` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail302.d b/gcc/testsuite/gdc.test/fail_compilation/fail302.d
index 02c6b24..d1133b0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail302.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail302.d
@@ -1,7 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail302.d(21): Error: cannot implicitly convert expression `1` of type `int` to `Bar`
+fail_compilation/fail302.d(23): Error: cannot implicitly convert expression `1` of type `int` to `Bar`
+fail_compilation/fail302.d(23): `bar = 1` is the first assignment of `bar` therefore it represents its initialization
+fail_compilation/fail302.d(23): `opAssign` methods are not used for initialization, but for subsequent assignments
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail303.d b/gcc/testsuite/gdc.test/fail_compilation/fail303.d
index 98223fa..2c825fe 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail303.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail303.d
@@ -1,13 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail303.d(19): Error: double /= cdouble is undefined. Did you mean double /= cdouble.re ?
-fail_compilation/fail303.d(20): Error: ireal *= ireal is an undefined operation
-fail_compilation/fail303.d(21): Error: ireal *= creal is undefined. Did you mean ireal *= creal.im ?
-fail_compilation/fail303.d(22): Error: ireal %= creal is undefined. Did you mean ireal %= creal.im ?
-fail_compilation/fail303.d(23): Error: ireal += real is undefined (result is complex)
-fail_compilation/fail303.d(24): Error: ireal -= creal is undefined (result is complex)
-fail_compilation/fail303.d(25): Error: double -= idouble is undefined (result is complex)
+fail_compilation/fail303.d(18): Deprecation: use of imaginary type `ireal` is deprecated, use `real` instead
+fail_compilation/fail303.d(20): Error: `double /= cdouble` is undefined. Did you mean `double /= cdouble.re`?
+fail_compilation/fail303.d(21): Error: `ireal *= ireal` is an undefined operation
+fail_compilation/fail303.d(22): Error: `ireal *= creal` is undefined. Did you mean `ireal *= creal.im`?
+fail_compilation/fail303.d(23): Error: `ireal %= creal` is undefined. Did you mean `ireal %= creal.im`?
+fail_compilation/fail303.d(24): Error: `ireal += real` is undefined (result is complex)
+fail_compilation/fail303.d(25): Error: `ireal -= creal` is undefined (result is complex)
+fail_compilation/fail303.d(26): Error: `double -= idouble` is undefined (result is complex)
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail305.d b/gcc/testsuite/gdc.test/fail_compilation/fail305.d
index 3c9dc76..aef1624 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail305.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail305.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail305.d(10): Error: cannot return non-void from void function
+fail_compilation/fail305.d(10): Error: cannot return non-void from `void` function
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail309.d b/gcc/testsuite/gdc.test/fail_compilation/fail309.d
index e1c9bfa..0fbfd59 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail309.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail309.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail309.d(10): Error: circular reference to variable 'fail309.S.x'
+fail_compilation/fail309.d(10): Error: circular reference to variable `fail309.S.x`
---
*/
// REQUIRED_ARGS: -d
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail310.d b/gcc/testsuite/gdc.test/fail_compilation/fail310.d
index 1dc3d5b..5b3c99a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail310.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail310.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/fail310.d(10): Error: undefined identifier `Foo`, did you mean function `foo`?
-fail_compilation/fail310.d(14): Error: template instance fail310.foo!(1, 2) error instantiating
+fail_compilation/fail310.d(14): Error: template instance `fail310.foo!(1, 2)` error instantiating
fail_compilation/fail310.d(14): while evaluating: `static assert(foo!(1, 2)())`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail311.d b/gcc/testsuite/gdc.test/fail_compilation/fail311.d
index 1713069..eaacfab 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail311.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail311.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/fail311.d(16): Error: undefined identifier `undefined`
-fail_compilation/fail311.d(25): Error: template instance fail311.foo!() error instantiating
+fail_compilation/fail311.d(25): Error: template instance `fail311.foo!()` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail312.d b/gcc/testsuite/gdc.test/fail_compilation/fail312.d
index 3823ee4..7260697 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail312.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail312.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail312.d(13): Error: incompatible types for ((a[]) == (b)): 'int[]' and 'short'
-fail_compilation/fail312.d(14): Error: incompatible types for ((a[]) <= (b)): 'int[]' and 'short'
+fail_compilation/fail312.d(13): Error: incompatible types for `(a[]) == (b)`: `int[]` and `short`
+fail_compilation/fail312.d(14): Error: incompatible types for `(a[]) <= (b)`: `int[]` and `short`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail313.d b/gcc/testsuite/gdc.test/fail_compilation/fail313.d
index a2c2890..3a2c7ec 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail313.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail313.d
@@ -1,10 +1,10 @@
/*
-REQUIRED_ARGS: -de
+EXTRA_FILES: imports/a313.d imports/b313.d imports/pkg313/package.d
TEST_OUTPUT:
---
-fail_compilation/fail313.d(15): Error: undefined identifier `b313` in package `imports`, perhaps add `static import imports.b313;`
-fail_compilation/fail313.d(22): Error: undefined identifier `core`
-fail_compilation/fail313.d(27): Error: undefined identifier `pkg313` in package `imports`, perhaps add `static import imports.pkg313;`
+fail_compilation/fail313.d(16): Error: undefined identifier `b313` in package `imports`, perhaps add `static import imports.b313;`
+fail_compilation/fail313.d(23): Error: undefined identifier `core`
+fail_compilation/fail313.d(28): Error: undefined identifier `pkg313` in package `imports`, perhaps add `static import imports.pkg313;`
---
*/
module test313;
@@ -23,7 +23,7 @@ void test2()
core.stdc.stdio.printf("");
}
-void test2()
+void test3()
{
imports.pkg313.bug();
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail314.d b/gcc/testsuite/gdc.test/fail_compilation/fail314.d
deleted file mode 100644
index cfbb030..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail314.d
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail314.d(11): Error: declaration T is already defined
----
-*/
-
-struct foo
-{
- static if (is(int T == int)) {}
- static if (is(int T == int)) {}
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3144.d b/gcc/testsuite/gdc.test/fail_compilation/fail3144.d
index 04e808f..ff01a03 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail3144.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail3144.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail3144.d(12): Error: break is not inside a loop or switch
-fail_compilation/fail3144.d(15): Error: break is not inside a loop or switch
+fail_compilation/fail3144.d(12): Error: `break` is not inside a loop or `switch`
+fail_compilation/fail3144.d(15): Error: `break` is not inside a loop or `switch`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail315.d b/gcc/testsuite/gdc.test/fail_compilation/fail315.d
index 7ce4a80..c7fd78f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail315.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail315.d
@@ -3,11 +3,11 @@ TEST_OUTPUT:
---
fail_compilation/fail315.d-mixin-16(16): Error: found `;` when expecting `,`
fail_compilation/fail315.d-mixin-16(16): Error: expression expected, not `}`
-fail_compilation/fail315.d-mixin-16(16): Error: found `EOF` when expecting `,`
-fail_compilation/fail315.d-mixin-16(16): Error: found `EOF` when expecting `]`
-fail_compilation/fail315.d-mixin-16(16): Error: found `EOF` when expecting `;` following return statement
-fail_compilation/fail315.d-mixin-16(16): Error: found `EOF` when expecting `}` following compound statement
-fail_compilation/fail315.d(21): Error: template instance fail315.foo!() error instantiating
+fail_compilation/fail315.d-mixin-16(16): Error: found `End of File` when expecting `,`
+fail_compilation/fail315.d-mixin-16(16): Error: found `End of File` when expecting `]`
+fail_compilation/fail315.d-mixin-16(16): Error: found `End of File` when expecting `;` following `return` statement
+fail_compilation/fail315.d-mixin-16(16): Error: found `End of File` when expecting `}` following compound statement
+fail_compilation/fail315.d(21): Error: template instance `fail315.foo!()` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail317.d b/gcc/testsuite/gdc.test/fail_compilation/fail317.d
index 05e7edb..d6a0f4d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail317.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail317.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail317.d(10): Error: function fail317.I.f has no function body with return type inference
+fail_compilation/fail317.d(10): Error: function `fail317.I.f` has no function body with return type inference
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail318.d b/gcc/testsuite/gdc.test/fail_compilation/fail318.d
deleted file mode 100644
index dd93803..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail318.d
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail318.d(8): Error: function D main must return int or void
----
-*/
-
-auto main() { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail318_b.d b/gcc/testsuite/gdc.test/fail_compilation/fail318_b.d
new file mode 100644
index 0000000..efbf45b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail318_b.d
@@ -0,0 +1,11 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail318_b.d(8): Error: function `D main` must return `int`, `void` or `noreturn`, not `string`
+---
+*/
+
+auto main()
+{
+ return "";
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail319.d b/gcc/testsuite/gdc.test/fail_compilation/fail319.d
index 3c4459a..cf56fee 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail319.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail319.d
@@ -1,7 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail319.d(13): Error: template instance fail319.f!(int, int) does not match template declaration f(T...)() if (T.length > 20)
+fail_compilation/fail319.d(16): Error: template instance `fail319.f!(int, int)` does not match template declaration `f(T...)()`
+ with `T = (int, int)`
+ must satisfy the following constraint:
+` T.length > 20`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail320.d b/gcc/testsuite/gdc.test/fail_compilation/fail320.d
index 3a80dd5..24020b4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail320.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail320.d
@@ -1,7 +1,8 @@
/*
+EXTRA_FILES: imports/fail320a.d imports/fail320b.d
TEST_OUTPUT:
---
-fail_compilation/fail320.d(10): Error: no overload matches for foo
+fail_compilation/fail320.d(11): Error: no overload matches for `foo`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail324.d b/gcc/testsuite/gdc.test/fail_compilation/fail324.d
deleted file mode 100644
index 931cb8d..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail324.d
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail324.d(16): Error: template instance doStuff!((i){ return i; }) cannot use local '__lambda1' as parameter to non-global template doStuff(alias fun)()
----
-*/
-
-struct Foo
-{
- void doStuff(alias fun)() {}
-}
-
-void main()
-{
- Foo foo;
- foo.doStuff!( (i) { return i; })();
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail325.d b/gcc/testsuite/gdc.test/fail_compilation/fail325.d
index e75a1c1..bf7f305 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail325.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail325.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail325.d(12): Error: template fun(T = int)(int w, int z) has no type
+fail_compilation/fail325.d(12): Error: template `fun(T = int)(int w, int z)` has no type
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail328.d b/gcc/testsuite/gdc.test/fail_compilation/fail328.d
index 7e97913..12347e5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail328.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail328.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail328.d(12): Error: @safe function 'fail328.foo' cannot call @system function 'fail328.bar'
+fail_compilation/fail328.d(13): Error: `@safe` function `fail328.foo` cannot call `@system` function `fail328.bar`
+fail_compilation/fail328.d(9): `fail328.bar` is declared here
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail329.d b/gcc/testsuite/gdc.test/fail_compilation/fail329.d
index f28304e..95aaaf4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail329.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail329.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail329.d(28): Error: variable fail329.A.foo.__ensure.result cannot modify result 'result' in contract
+fail_compilation/fail329.d(28): Error: variable `fail329.A.foo.__ensure.result` cannot modify result `result` in contract
---
*/
@@ -27,7 +27,7 @@ class A
assert(x == 7);
result++;
}
- body
+ do
{
return i;
}
@@ -49,7 +49,7 @@ class B : A
assert(result < 8);
assert(x == 7);
}
- body
+ do
{
return i - 1;
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail330.d b/gcc/testsuite/gdc.test/fail_compilation/fail330.d
index a3409db..94e91bb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail330.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail330.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail330.d(9): Error: variable fail330.fun.result cannot modify result 'result' in contract
+fail_compilation/fail330.d(9): Error: variable `fail330.fun.result` cannot modify result `result` in contract
---
*/
int fun()
out(result) { result = 2; }
-body { return 1; }
+do { return 1; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail331.d b/gcc/testsuite/gdc.test/fail_compilation/fail331.d
index 8b79ea2..7f97801 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail331.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail331.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail331.d(10): Error: cannot use typeof(return) inside function foo with inferred return type
+fail_compilation/fail331.d(10): Error: cannot use `typeof(return)` inside function `foo` with inferred return type
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail332.d b/gcc/testsuite/gdc.test/fail_compilation/fail332.d
index 91f8046..12164b9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail332.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail332.d
@@ -21,7 +21,7 @@ void test()
{
foo();
foo(null);
-
+
baz("");
baz(3, null);
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail333.d b/gcc/testsuite/gdc.test/fail_compilation/fail333.d
index 717de24..89f9478 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail333.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail333.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail333.d(8): Error: forward reference to 'test'
+fail_compilation/fail333.d(8): Error: forward reference to `test`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail336.d b/gcc/testsuite/gdc.test/fail_compilation/fail336.d
index 2a6be95..9df2071 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail336.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail336.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail336.d(16): Error: struct S has constructors, cannot use { initializers }, use S( initializers ) instead
+fail_compilation/fail336.d(16): Error: struct `S` has constructors, cannot use `{ initializers }`, use `S( initializers )` instead
---
*/
-// Issue 3476 - C-style initializer for structs must be disallowed for structs with a constructor
-
+// https://issues.dlang.org/show_bug.cgi?id=3476
+// C-style initializer for structs must be disallowed for structs with a constructor
struct S
{
int a;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail337.d b/gcc/testsuite/gdc.test/fail_compilation/fail337.d
index cc86bd2..0a411e6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail337.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail337.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail337.d(13): Error: static assert `0` is false
-fail_compilation/fail337.d(26): instantiated from here: bar!()
-fail_compilation/fail337.d(33): 100 recursive instantiations from here: foo!196
-fail_compilation/fail337.d(41): 253 recursive instantiations from here: baz!300
+fail_compilation/fail337.d(13): Error: static assert: `0` is false
+fail_compilation/fail337.d(26): instantiated from here: `bar!()`
+fail_compilation/fail337.d(33): 100 recursive instantiations from here: `foo!196`
+fail_compilation/fail337.d(41): 253 recursive instantiations from here: `baz!300`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail34.d b/gcc/testsuite/gdc.test/fail_compilation/fail34.d
index f910a2d..7a3c807 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail34.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail34.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail34.d(31): Error: duplicate `case "123"` in switch statement
+fail_compilation/fail34.d(31): Error: duplicate `case "123"` in `switch` statement
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail340.d b/gcc/testsuite/gdc.test/fail_compilation/fail340.d
index 57d40a7..3d83e68 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail340.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail340.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail340.d(18): Error: variable fail340.w of type struct const(CopyTest) uses this(this), which is not allowed in static initialization
-fail_compilation/fail340.d(19): while evaluating: `static assert(w.x == 55.0000)`
+fail_compilation/fail340.d(18): Error: variable `fail340.w` of type struct `const(CopyTest)` uses `this(this)`, which is not allowed in static initialization
+fail_compilation/fail340.d(19): while evaluating: `static assert(w.x == 55.0)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail341.d b/gcc/testsuite/gdc.test/fail_compilation/fail341.d
index 8677d48..38bb6dc 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail341.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail341.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail341.d(26): Error: struct fail341.S is not copyable because it is annotated with `@disable`
+fail_compilation/fail341.d(26): Error: struct `fail341.S` is not copyable because field `t` is not copyable
fail_compilation/fail341.d(27): Error: function `fail341.foo` cannot be used because it is annotated with `@disable`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail343.d b/gcc/testsuite/gdc.test/fail_compilation/fail343.d
index 19601a7..5b7e9bf 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail343.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail343.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail343.d(22): Error: function fail343.TimedApp.run cannot override final function I.fail343.Timer.run
-fail_compilation/fail343.d(22): Error: function fail343.TimedApp.run cannot override final function Application.fail343.Application.run
+fail_compilation/fail343.d(22): Error: function `fail343.TimedApp.run` cannot override `final` function `I.fail343.Timer.run`
+fail_compilation/fail343.d(22): Error: function `fail343.TimedApp.run` cannot override `final` function `Application.fail343.Application.run`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail347.d b/gcc/testsuite/gdc.test/fail_compilation/fail347.d
index 61718df..8d061f9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail347.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail347.d
@@ -1,9 +1,10 @@
/*
+EXTRA_FILES: imports/fail347a.d
TEST_OUTPUT:
---
-fail_compilation/fail347.d(21): Error: undefined identifier `bbr`, did you mean variable `bar`?
-fail_compilation/fail347.d(22): Error: no property 'ofo' for type 'S', did you mean 'fail347.S.foo'?
-fail_compilation/fail347.d(23): Error: undefined identifier `strlenx`, did you mean function `strlen`?
+fail_compilation/fail347.d(22): Error: undefined identifier `bbr`, did you mean variable `bar`?
+fail_compilation/fail347.d(23): Error: no property `ofo` for type `S`, did you mean `fail347.S.foo`?
+fail_compilation/fail347.d(24): Error: undefined identifier `strlenx`, did you mean function `strlen`?
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail349.d b/gcc/testsuite/gdc.test/fail_compilation/fail349.d
index 8100ab7..11a392c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail349.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail349.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail349.d(15): Error: function `fail349.bug6109throwing` is not nothrow
-fail_compilation/fail349.d(13): Error: nothrow function `fail349.bug6109noThrow` may throw
+fail_compilation/fail349.d(15): Error: function `fail349.bug6109throwing` is not `nothrow`
+fail_compilation/fail349.d(13): Error: `nothrow` function `fail349.bug6109noThrow` may throw
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail35.d b/gcc/testsuite/gdc.test/fail_compilation/fail35.d
index c56f278..4f47a62 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail35.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail35.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail35.d(15): Error: variable t cannot be read at compile time
+fail_compilation/fail35.d(15): Error: variable `t` cannot be read at compile time
---
*/
-// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/2372.html
+// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/2372.html
// allegedly crashes, but cannot reproduce
void main()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail351.d b/gcc/testsuite/gdc.test/fail_compilation/fail351.d
index 04f21b2..1762ec0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail351.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail351.d
@@ -1,16 +1,16 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail351.d(14): Error: cast(uint)this.num[index] is not an lvalue
+fail_compilation/fail351.d(14): Error: expression `this.num[index]` of type `immutable(uint)` is not implicitly convertible to return type `ref uint`
---
*/
-// 2780
+// https://issues.dlang.org/show_bug.cgi?id=2780
struct Immutable {
immutable uint[2] num;
- ref uint opIndex(size_t index) immutable {
+ ref uint opIndex(size_t index) immutable return {
return num[index];
}
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail354.d b/gcc/testsuite/gdc.test/fail_compilation/fail354.d
index 55dbf52..8689f61 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail354.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail354.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail354.d(11): Error: template instance T!N template 'T' is not defined
-fail_compilation/fail354.d(13): Error: template instance fail354.S!1 error instantiating
+fail_compilation/fail354.d(11): Error: template instance `T!N` template `T` is not defined
+fail_compilation/fail354.d(13): Error: template instance `fail354.S!1` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail355.d b/gcc/testsuite/gdc.test/fail_compilation/fail355.d
index d342d12..1237801 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail355.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail355.d
@@ -1,7 +1,8 @@
/*
+EXTRA_FILES: imports/fail355.d
TEST_OUTPUT:
---
-fail_compilation/fail355.d(8): Error: module imports.fail355 import 'nonexistent' not found
+fail_compilation/fail355.d(9): Error: module `imports.fail355` import `nonexistent` not found
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail36.d b/gcc/testsuite/gdc.test/fail_compilation/fail36.d
index 47fb884..96e022e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail36.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail36.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail36.d(13): Error: template t(int L) does not have property 'a'
-fail_compilation/fail36.d(18): Error: mixin fail36.func.t!10 error instantiating
+fail_compilation/fail36.d(13): Error: template `t(int L)` does not have property `a`
+fail_compilation/fail36.d(18): Error: mixin `fail36.func.t!10` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3672.d b/gcc/testsuite/gdc.test/fail_compilation/fail3672.d
index 1622bd2..2f9bdf7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail3672.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail3672.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail3672.d(28): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"+="(*p, 1) instead.
-fail_compilation/fail3672.d(32): Deprecation: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"+="(*sfp, 1) instead.
-fail_compilation/fail3672.d(32): Error: '*sfp += 1' is not a scalar, it is a shared(SF)
+fail_compilation/fail3672.d(28): Error: read-modify-write operations are not allowed for `shared` variables
+fail_compilation/fail3672.d(28): Use `core.atomic.atomicOp!"+="(*p, 1)` instead
+fail_compilation/fail3672.d(32): Error: none of the `opOpAssign` overloads of `SF` are callable for `*sfp` of type `shared(SF)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3703.d b/gcc/testsuite/gdc.test/fail_compilation/fail3703.d
index 0b4e260..6b4edd5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail3703.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail3703.d
@@ -1,5 +1,5 @@
-// Issue 3703 - static array assignment
-
+// https://issues.dlang.org/show_bug.cgi?id=3703
+// static array assignment
/*
TEST_OUTPUT:
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3753.d b/gcc/testsuite/gdc.test/fail_compilation/fail3753.d
deleted file mode 100644
index d20d8e9..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail3753.d
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-TEST_OUTPUT:
----
-Error: cannot mix core.std.stdlib.alloca() and exception handling in _Dmain()
----
-*/
-
-import core.stdc.stdlib : alloca;
-import core.stdc.stdio;
-
-struct TheStruct
-{
- ~this()
- {
- printf("dtor()\n");
- }
-}
-
-void bar()
-{
- printf("bar()\n");
-}
-
-void main()
-{
- auto s = TheStruct();
- bar();
- auto a = alloca(16);
- printf("test()\n");
- version (DigitalMars)
- {
- version (Win32) static assert(0);
- version (linux)
- {
- static assert(0);
- }
- version (FreeBSD)
- {
- static assert(0);
- }
- version (OSX)
- {
- static assert(0);
- }
- }
- else
- static assert(0);
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail37_m32.d b/gcc/testsuite/gdc.test/fail_compilation/fail37_m32.d
index 996f98f..900d80d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail37_m32.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail37_m32.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail37_m32.d(9): Error: 'cast(float)4u / cast(float)8u - cast(float)2147483647' is not of integral type, it is a float
+fail_compilation/fail37_m32.d(9): Error: `cast(float)4u / cast(float)8u - cast(float)2147483647` is not of integral type, it is a `float`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail37_m64.d b/gcc/testsuite/gdc.test/fail_compilation/fail37_m64.d
index 2e979e7..5c0d169 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail37_m64.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail37_m64.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail37_m64.d(9): Error: 'cast(float)4LU / cast(float)8LU - cast(float)2147483647' is not of integral type, it is a float
+fail_compilation/fail37_m64.d(9): Error: `cast(float)4LU / cast(float)8LU - cast(float)2147483647` is not of integral type, it is a `float`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail38.d b/gcc/testsuite/gdc.test/fail_compilation/fail38.d
index 0f2cd5f..344a075 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail38.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail38.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail38.d(12): Error: 'super' is only allowed in non-static class member functions
+fail_compilation/fail38.d(12): Error: `super` is only allowed in non-static class member functions
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3882.d b/gcc/testsuite/gdc.test/fail_compilation/fail3882.d
index b7d8a97..27ddad4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail3882.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail3882.d
@@ -2,13 +2,13 @@
// PERMUTE_ARGS: -debug
/******************************************/
-// 3882
+// https://issues.dlang.org/show_bug.cgi?id=3882
/*
TEST_OUTPUT:
---
-fail_compilation/fail3882.d(23): Warning: calling fail3882.strictlyPure!int.strictlyPure without side effects discards return value of type int, prepend a cast(void) if intentional
-fail_compilation/fail3882.d(27): Warning: calling fp without side effects discards return value of type int, prepend a cast(void) if intentional
+fail_compilation/fail3882.d(23): Warning: calling `fail3882.strictlyPure!int.strictlyPure` without side effects discards return value of type `int`; prepend a `cast(void)` if intentional
+fail_compilation/fail3882.d(27): Warning: calling `fp` without side effects discards return value of type `int`; prepend a `cast(void)` if intentional
---
*/
@@ -22,7 +22,7 @@ void main()
int x = 3;
strictlyPure(x);
- // 12649
+ // https://issues.dlang.org/show_bug.cgi?id=12649
auto fp = &strictlyPure!int;
fp(x);
}
@@ -33,8 +33,10 @@ void main()
/*
TEST_OUTPUT:
---
-fail_compilation/fail3882.d(46): Warning: calling fail3882.f1 without side effects discards return value of type int, prepend a cast(void) if intentional
-fail_compilation/fail3882.d(47): Warning: calling fail3882.f2 without side effects discards return value of type int, prepend a cast(void) if intentional
+fail_compilation/fail3882.d(48): Warning: calling `fail3882.f1` without side effects discards return value of type `int`; prepend a `cast(void)` if intentional
+fail_compilation/fail3882.d(49): Warning: calling `fail3882.f2` without side effects discards return value of type `int`; prepend a `cast(void)` if intentional
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail39.d b/gcc/testsuite/gdc.test/fail_compilation/fail39.d
index 65472cf..c0bb0e1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail39.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail39.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail39.d(11): Error: function fail39.main.__funcliteral2 cannot access frame of function D main
+fail_compilation/fail39.d(12): Error: function `fail39.main.__funcliteral2` cannot access function `foo` in frame of function `D main`
+fail_compilation/fail39.d(11): `foo` declared here
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3990.d b/gcc/testsuite/gdc.test/fail_compilation/fail3990.d
index 6d17a7d..aa0fa81 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail3990.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail3990.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail3990.d(12): Error: using * on an array is no longer supported; use *(arr1).ptr instead
-fail_compilation/fail3990.d(14): Error: using * on an array is no longer supported; use *(arr2).ptr instead
+fail_compilation/fail3990.d(12): Error: using `*` on an array is no longer supported; use `*(arr1).ptr` instead
+fail_compilation/fail3990.d(14): Error: using `*` on an array is no longer supported; use `*(arr2).ptr` instead
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail40.d b/gcc/testsuite/gdc.test/fail_compilation/fail40.d
index aa15db3..947a3af 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail40.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail40.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail40.d(11): Error: variable yuiop cannot be read at compile time
+fail_compilation/fail40.d(11): Error: variable `yuiop` cannot be read at compile time
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4082.d b/gcc/testsuite/gdc.test/fail_compilation/fail4082.d
index fc6ba78..6f9ee61 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4082.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4082.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4082.d(14): Error: destructor `fail4082.Foo.~this` is not nothrow
-fail_compilation/fail4082.d(12): Error: nothrow function `fail4082.test1` may throw
+fail_compilation/fail4082.d(14): Error: destructor `fail4082.Foo.~this` is not `nothrow`
+fail_compilation/fail4082.d(12): Error: `nothrow` function `fail4082.test1` may throw
---
*/
struct Foo
@@ -21,8 +21,8 @@ NEXT:
/*
TEST_OUTPUT:
---
-fail_compilation/fail4082.d(32): Error: destructor `fail4082.Bar.~this` is not nothrow
-fail_compilation/fail4082.d(32): Error: nothrow function `fail4082.test2` may throw
+fail_compilation/fail4082.d(32): Error: destructor `fail4082.Bar.~this` is not `nothrow`
+fail_compilation/fail4082.d(32): Error: `nothrow` function `fail4082.test2` may throw
---
*/
struct Bar
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail41.d b/gcc/testsuite/gdc.test/fail_compilation/fail41.d
index fa0e0c3..6d89395 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail41.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail41.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail41.d(17): Error: cannot return non-void from void function
+fail_compilation/fail41.d(17): Error: cannot return non-void from `void` function
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail42.d b/gcc/testsuite/gdc.test/fail_compilation/fail42.d
index 5101ca1..c153d5b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail42.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail42.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail42.d(22): Error: struct fail42.Qwert no size because of forward reference
+fail_compilation/fail42.d(22): Error: struct `fail42.Qwert` no size because of forward reference
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375a.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375a.d
index 5ee2a31..a07f78f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375a.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375a.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375a.d(11)
+fail_compilation/fail4375a.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375a.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375b.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375b.d
index 0d16446..dbc299f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375b.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375b.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375b.d(12)
+fail_compilation/fail4375b.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375b.d(14)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375c.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375c.d
index 4e578aa..230c656 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375c.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375c.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375c.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375c.d(11)
+fail_compilation/fail4375c.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375c.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375d.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375d.d
index 8e9b4e7..7592779 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375d.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375d.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375d.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375d.d(11)
+fail_compilation/fail4375d.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375d.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375e.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375e.d
index ae809bc..3ccd4fb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375e.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375e.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375e.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375e.d(11)
+fail_compilation/fail4375e.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375e.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375f.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375f.d
index 5855b1b..867fbff 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375f.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375f.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375f.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375f.d(11)
+fail_compilation/fail4375f.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375f.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375g.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375g.d
index 4b9d12b..6f452f53 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375g.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375g.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375g.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375g.d(11)
+fail_compilation/fail4375g.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375g.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375h.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375h.d
index 72e3e14..c0f1c5b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375h.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375h.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375h.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375h.d(13)
+fail_compilation/fail4375h.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375h.d(15)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375i.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375i.d
index 5801c61..b13c9e4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375i.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375i.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375i.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375i.d(11)
+fail_compilation/fail4375i.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375i.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375j.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375j.d
index 9a87540..8f24700 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375j.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375j.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375j.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375j.d(11)
+fail_compilation/fail4375j.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375j.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375k.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375k.d
index bb8b7b2..8c21fea 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375k.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375k.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375k.d-mixin-11(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375k.d-mixin-11(12)
+fail_compilation/fail4375k.d-mixin-13(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375k.d-mixin-13(14)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375l.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375l.d
index 965b0e7..1c815ea 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375l.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375l.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375l.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375l.d(11)
+fail_compilation/fail4375l.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375l.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375m.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375m.d
index a6bdf1e..7cbf20f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375m.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375m.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375m.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375m.d(12)
+fail_compilation/fail4375m.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375m.d(14)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375o.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375o.d
index c37b219..fbfde4e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375o.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375o.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375o.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375o.d(11)
+fail_compilation/fail4375o.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375o.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375r.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375r.d
index 61923e2..dfa7731 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375r.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375r.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375r.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375r.d(11)
+fail_compilation/fail4375r.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375r.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375s.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375s.d
index cd4e5a0..f85a1db 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375s.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375s.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375s.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375s.d(11)
+fail_compilation/fail4375s.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375s.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375t.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375t.d
index 557761b..0fd1f4d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375t.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375t.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375t.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375t.d(11)
+fail_compilation/fail4375t.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375t.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375u.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375u.d
index 1028b78..8e2ea13 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375u.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375u.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375u.d(13): Warning: else is dangling, add { } after condition at fail_compilation/fail4375u.d(11)
+fail_compilation/fail4375u.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375u.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375v.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375v.d
index f4a6089..8b99a9c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375v.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375v.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375v.d(13): Warning: else is dangling, add { } after condition at fail_compilation/fail4375v.d(11)
+fail_compilation/fail4375v.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375v.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375w.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375w.d
index ae1ac21..ecfffb6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375w.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375w.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375w.d(13): Warning: else is dangling, add { } after condition at fail_compilation/fail4375w.d(11)
+fail_compilation/fail4375w.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375w.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375x.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375x.d
index 33c8eb2..f29a6e3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375x.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375x.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375x.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375x.d(11)
+fail_compilation/fail4375x.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375x.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375y.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375y.d
index bc79631..3111623 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4375y.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375y.d
@@ -3,7 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4375y.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375y.d(11)
+fail_compilation/fail4375y.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375y.d(13)
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail44.d b/gcc/testsuite/gdc.test/fail_compilation/fail44.d
index b8916a0..e2ea40b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail44.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail44.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail44.d(18): Error: expression bar[i] is void and has no value
+fail_compilation/fail44.d(18): Error: expression `bar[i]` is `void` and has no value
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4421.d b/gcc/testsuite/gdc.test/fail_compilation/fail4421.d
index b82d701..3aedfc3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4421.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4421.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4421.d(16): Error: function fail4421.U1.__postblit destructors, postblits and invariants are not allowed in union U1
-fail_compilation/fail4421.d(17): Error: destructor fail4421.U1.~this destructors, postblits and invariants are not allowed in union U1
-fail_compilation/fail4421.d(18): Error: function fail4421.U1.__invariant1 destructors, postblits and invariants are not allowed in union U1
+fail_compilation/fail4421.d(16): Error: function `fail4421.U1.__postblit` destructors, postblits and invariants are not allowed in union `U1`
+fail_compilation/fail4421.d(17): Error: destructor `fail4421.U1.~this` destructors, postblits and invariants are not allowed in union `U1`
+fail_compilation/fail4421.d(18): Error: function `fail4421.U1.__invariant1` destructors, postblits and invariants are not allowed in union `U1`
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4448.d b/gcc/testsuite/gdc.test/fail_compilation/fail4448.d
index f8b2dbb..d5a0d4e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4448.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4448.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4448.d(19): Error: label `L1` has no break
-fail_compilation/fail4448.d(26): called from here: bug4448()
+fail_compilation/fail4448.d(19): Error: label `L1` has no `break`
+fail_compilation/fail4448.d(26): called from here: `bug4448()`
fail_compilation/fail4448.d(26): while evaluating: `static assert(bug4448() == 3)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail45.d b/gcc/testsuite/gdc.test/fail_compilation/fail45.d
index 3380fe4..503ac61 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail45.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail45.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail45.d(10): Error: variable fail45.main.O cannot be declared to be a function
+fail_compilation/fail45.d(10): Error: variable `fail45.main.O` cannot be declared to be a function
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4517.d b/gcc/testsuite/gdc.test/fail_compilation/fail4517.d
deleted file mode 100644
index f3fe031..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4517.d
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail4517.d(16): Error: `enum` member `B` not represented in `final switch`
----
-*/
-
-enum E : ushort
-{
- A, B
-}
-
-void main()
-{
- E e;
- final switch(e)
- {
- case E.A:
- break;
- }
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4544.d b/gcc/testsuite/gdc.test/fail_compilation/fail4544.d
new file mode 100644
index 0000000..cf1554d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4544.d
@@ -0,0 +1,23 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail4544.d(15): Error: character constant has multiple characters
+fail_compilation/fail4544.d(16): Error: `0x` isn't a valid integer literal, use `0x0` instead
+fail_compilation/fail4544.d(16): Error: no identifier for declarator `int`
+fail_compilation/fail4544.d(17): Error: unterminated character constant
+fail_compilation/fail4544.d(18): Error: character constant has multiple characters
+---
+*/
+
+int foo(char n, int m)
+{
+ int k = 5;
+ char c = 'asd';
+ int 0x = 'k';
+ foo('dasadasdaasdasdaslkdhasdlashdsalk, xxx);
+ goo('asdasdsa');
+ for (int i = 0; i < 10; i++)
+ {
+ k++;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail46.d b/gcc/testsuite/gdc.test/fail_compilation/fail46.d
index a62d163..9401b92 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail46.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail46.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail46.d(19): Error: need 'this' for 'bug' of type 'int()'
+fail_compilation/fail46.d(19): Error: need `this` for `bug` of type `int()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4611.d b/gcc/testsuite/gdc.test/fail_compilation/fail4611.d
index 02fcc2e..030c47c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4611.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4611.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail4611.d(15): Error: Vec[2147483647] size 4 * 2147483647 exceeds 0x7fffffff size limit for static array
+fail_compilation/fail4611.d(15): Error: `Vec[$n$]` size 4 * $n$ exceeds $?:windows+32=0x1000000|0x7fffffff$ size limit for static array
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4923.d b/gcc/testsuite/gdc.test/fail_compilation/fail4923.d
new file mode 100644
index 0000000..3239cff
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail4923.d
@@ -0,0 +1,13 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail4923.d(4): Error: immutable variable `bar` initialization is not allowed in `static this`
+fail_compilation/fail4923.d(4): Use `shared static this` instead.
+---
+*/
+#line 1
+immutable int bar;
+static this()
+{
+ bar = 42;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail50.d b/gcc/testsuite/gdc.test/fail_compilation/fail50.d
index 9cd2983..36bf382 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail50.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail50.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail50.d(12): Error: need 'this' for address of a
-fail_compilation/fail50.d(12): Error: variable a cannot be read at compile time
+fail_compilation/fail50.d(12): Error: need `this` for address of `a`
+fail_compilation/fail50.d(12): Error: variable `a` cannot be read at compile time
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail51.d b/gcc/testsuite/gdc.test/fail_compilation/fail51.d
index 41a27ca..b5a11d4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail51.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail51.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail51.d(11): Error: interface fail51.B circular inheritance of interface
+fail_compilation/fail51.d(11): Error: interface `fail51.B` circular inheritance of interface
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail5153.d b/gcc/testsuite/gdc.test/fail_compilation/fail5153.d
new file mode 100644
index 0000000..21de06e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail5153.d
@@ -0,0 +1,28 @@
+// https://issues.dlang.org/show_bug.cgi?id=5153
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail5153.d(26): Error: cannot implicitly convert expression `new Foo(0)` of type `Foo*` to `Foo`
+fail_compilation/fail5153.d(26): Perhaps remove the `new` keyword?
+---
+*/
+
+class Foo2
+{
+ this(int) {}
+}
+
+struct Foo {
+ int x;
+ this(int x_)
+ {
+ this.x = x_;
+ }
+
+ this(Foo2) {}
+}
+void main() {
+ Foo f = new Foo(0);
+ Foo f2 = new Foo2(0);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail52.d b/gcc/testsuite/gdc.test/fail_compilation/fail52.d
index 9b662de..9743be2 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail52.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail52.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail52.d(10): Error: class fail52.C circular inheritance
+fail_compilation/fail52.d(10): Error: class `fail52.C` circular inheritance
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail54.d b/gcc/testsuite/gdc.test/fail_compilation/fail54.d
index aa95b1d..e52c533 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail54.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail54.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail54.d(22): Error: incompatible types for ((0) == (Exception)): cannot use '==' with types
+fail_compilation/fail54.d(22): Error: incompatible types for `(0) == (Exception)`: cannot use `==` with types
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail59.d b/gcc/testsuite/gdc.test/fail_compilation/fail59.d
index 63fab5e..8c51311 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail59.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail59.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail59.d(50): Error: outer class C1 'this' needed to 'new' nested class C2
+fail_compilation/fail59.d(50): Error: outer class `C1` `this` needed to `new` nested class `C2`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail61.d b/gcc/testsuite/gdc.test/fail_compilation/fail61.d
index e9daa61..90c3b39 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail61.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail61.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail61.d(22): Error: no property 'B' for type 'fail61.A.B'
-fail_compilation/fail61.d(23): Error: no property 'B' for type 'fail61.A.B'
-fail_compilation/fail61.d(32): Error: no property 'A2' for type 'fail61.B2'
-fail_compilation/fail61.d(41): Error: this for foo needs to be type B3 not type fail61.C3
+fail_compilation/fail61.d(22): Error: no property `B` for type `fail61.A.B`
+fail_compilation/fail61.d(23): Error: no property `B` for type `fail61.A.B`
+fail_compilation/fail61.d(32): Error: no property `A2` for type `fail61.B2`
+fail_compilation/fail61.d(41): Error: `this` for `foo` needs to be type `B3` not type `fail61.C3`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6107.d b/gcc/testsuite/gdc.test/fail_compilation/fail6107.d
index 4d79b0c..656b3cf 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail6107.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail6107.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail6107.d(10): Error: variable fail6107.Foo.__ctor is not a constructor; identifiers starting with __ are reserved for the implementation
-fail_compilation/fail6107.d(14): Error: variable fail6107.Bar.__ctor is not a constructor; identifiers starting with __ are reserved for the implementation
+fail_compilation/fail6107.d(10): Error: variable `fail6107.Foo.__ctor` is not a constructor; identifiers starting with `__` are reserved for the implementation
+fail_compilation/fail6107.d(14): Error: variable `fail6107.Bar.__ctor` is not a constructor; identifiers starting with `__` are reserved for the implementation
---
*/
struct Foo
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail62.d b/gcc/testsuite/gdc.test/fail_compilation/fail62.d
index caa7843..6e939db 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail62.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail62.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail62.d(11): Error: version Foo defined after use
+fail_compilation/fail62.d(11): Error: version `Foo` defined after use
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6242.d b/gcc/testsuite/gdc.test/fail_compilation/fail6242.d
index 08f5de3..cb2de2c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail6242.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail6242.d
@@ -6,4 +6,4 @@ fail_compilation/fail6242.d(9): Error: cannot implicitly override base class met
*/
class A { void fun(int) {} }
-class B : A { void fun(int x) in { assert(x > 0); } body {} }
+class B : A { void fun(int x) in { assert(x > 0); } do {} }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail63.d b/gcc/testsuite/gdc.test/fail_compilation/fail63.d
index 4af83ec..e4080eb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail63.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail63.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail63.d(11): Error: debug Foo defined after use
+fail_compilation/fail63.d(11): Error: debug `Foo` defined after use
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6334.d b/gcc/testsuite/gdc.test/fail_compilation/fail6334.d
index 3bb6b77..7abdb9e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail6334.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail6334.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail6334.d(12): Error: static assert `0` is false
+fail_compilation/fail6334.d(13): Error: static assert: `0` is false
+fail_compilation/fail6334.d(11): instantiated from here: `T2!()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6453.d b/gcc/testsuite/gdc.test/fail_compilation/fail6453.d
index e1db9f4..f6ce89f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail6453.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail6453.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail6453.d(13): Error: struct fail6453.S6453x mixing invariants with shared/synchronized differene is not supported
-fail_compilation/fail6453.d(18): Error: class fail6453.C6453y mixing invariants with shared/synchronized differene is not supported
-fail_compilation/fail6453.d(23): Error: class fail6453.C6453z mixing invariants with shared/synchronized differene is not supported
+fail_compilation/fail6453.d(13): Error: struct `fail6453.S6453x` mixing invariants with different `shared`/`synchronized` qualifiers is not supported
+fail_compilation/fail6453.d(18): Error: class `fail6453.C6453y` mixing invariants with different `shared`/`synchronized` qualifiers is not supported
+fail_compilation/fail6453.d(23): Error: class `fail6453.C6453z` mixing invariants with different `shared`/`synchronized` qualifiers is not supported
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail66.d b/gcc/testsuite/gdc.test/fail_compilation/fail66.d
index 5c352a5..5820ca5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail66.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail66.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail66.d(11): Error: constructor fail66.C1.this missing initializer for const field y
+fail_compilation/fail66.d(11): Error: constructor `fail66.C1.this` missing initializer for const field `y`
---
*/
@@ -14,7 +14,7 @@ class C1
/*
TEST_OUTPUT:
---
-fail_compilation/fail66.d(28): Error: cannot modify const expression c.y
+fail_compilation/fail66.d(28): Error: cannot modify `const` expression `c.y`
---
*/
class C2
@@ -31,7 +31,7 @@ void test2()
/*
TEST_OUTPUT:
---
-fail_compilation/fail66.d(43): Error: cannot modify const expression this.y
+fail_compilation/fail66.d(43): Error: cannot modify `const` expression `this.y`
---
*/
class C3
@@ -47,7 +47,7 @@ class C3
/*
TEST_OUTPUT:
---
-fail_compilation/fail66.d(59): Error: cannot modify const expression x
+fail_compilation/fail66.d(59): Error: cannot modify `const` expression `x`
---
*/
class C4
@@ -63,7 +63,7 @@ class C4
/*
TEST_OUTPUT:
---
-fail_compilation/fail66.d(73): Error: cannot modify const expression z5
+fail_compilation/fail66.d(73): Error: cannot modify `const` expression `z5`
---
*/
const int z5;
@@ -76,7 +76,7 @@ void test5()
/*
TEST_OUTPUT:
---
-fail_compilation/fail66.d(89): Error: cannot modify const expression c.y
+fail_compilation/fail66.d(89): Error: cannot modify `const` expression `c.y`
---
*/
class C6
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6652.d b/gcc/testsuite/gdc.test/fail_compilation/fail6652.d
index 45a3f5a..78cea67 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail6652.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail6652.d
@@ -1,15 +1,15 @@
// PERMUTE_ARGS: -w -dw -de -d
/******************************************/
-// 6652
+// https://issues.dlang.org/show_bug.cgi?id=6652
/*
TEST_OUTPUT:
---
-fail_compilation/fail6652.d(20): Error: cannot modify const expression i
-fail_compilation/fail6652.d(25): Error: cannot modify const expression i
-fail_compilation/fail6652.d(30): Error: cannot modify const expression i
-fail_compilation/fail6652.d(35): Error: cannot modify const expression i
+fail_compilation/fail6652.d(20): Error: cannot modify `const` expression `i`
+fail_compilation/fail6652.d(25): Error: cannot modify `const` expression `i`
+fail_compilation/fail6652.d(30): Error: cannot modify `const` expression `i`
+fail_compilation/fail6652.d(35): Error: cannot modify `const` expression `i`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6795.d b/gcc/testsuite/gdc.test/fail_compilation/fail6795.d
index d714f20..584a467 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail6795.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail6795.d
@@ -1,34 +1,27 @@
-// 6795
+// https://issues.dlang.org/show_bug.cgi?id=6795
/*
TEST_OUTPUT:
---
-fail_compilation/fail6795.d(12): Error: constant 0 is not an lvalue
-fail_compilation/fail6795.d(13): Error: constant 0 is not an lvalue
----
-*/
-
-void main() {
- enum int[] array = [0];
- array[0]++;
- array[0] += 3;
-}
-
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail6795.d(31): Error: constant 0 is not an lvalue
-fail_compilation/fail6795.d(32): Error: constant 0 is not an lvalue
-fail_compilation/fail6795.d(33): Error: constant 0 is not an lvalue
+fail_compilation/fail6795.d(19): Error: `[0][0]` is not an lvalue and cannot be modified
+fail_compilation/fail6795.d(20): Error: `[0:0][0]` is not an lvalue and cannot be modified
+fail_compilation/fail6795.d(22): Error: `[0][0]` is not an lvalue and cannot be modified
+fail_compilation/fail6795.d(23): Error: `[0:0][0]` is not an lvalue and cannot be modified
+fail_compilation/fail6795.d(25): Error: `[0][0]` is not an lvalue and cannot be modified
+fail_compilation/fail6795.d(26): Error: `[0:0][0]` is not an lvalue and cannot be modified
---
*/
void test_wrong_line_num()
{
- enum int[] da = [0];
enum int[1] sa = [0];
enum int[int] aa = [0:0];
- da[0] += 3;
- sa[0] += 3;
- aa[0] += 3;
+ sa[0]++;
+ --aa[0];
+
+ sa[0] *= 3;
+ aa[0] /= 3;
+
+ auto ps = &sa[0];
+ auto pa = &aa[0];
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6889.d b/gcc/testsuite/gdc.test/fail_compilation/fail6889.d
index 4d86256..aa18977 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail6889.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail6889.d
@@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail6889.d(16): Error: cannot goto out of `scope(success)` block
-fail_compilation/fail6889.d(17): Error: cannot goto in to `scope(success)` block
-fail_compilation/fail6889.d(19): Error: return statements cannot be in `scope(success)` bodies
-fail_compilation/fail6889.d(23): Error: continue is not inside `scope(success)` bodies
-fail_compilation/fail6889.d(24): Error: break is not inside `scope(success)` bodies
-fail_compilation/fail6889.d(29): Error: continue is not inside `scope(success)` bodies
-fail_compilation/fail6889.d(30): Error: break is not inside `scope(success)` bodies
+fail_compilation/fail6889.d(16): Error: cannot `goto` out of `scope(success)` block
+fail_compilation/fail6889.d(17): Error: cannot `goto` in to `scope(success)` block
+fail_compilation/fail6889.d(19): Error: `return` statements cannot be in `scope(success)` bodies
+fail_compilation/fail6889.d(23): Error: `continue` is not allowed inside `scope(success)` bodies
+fail_compilation/fail6889.d(24): Error: `break` is not allowed inside `scope(success)` bodies
+fail_compilation/fail6889.d(29): Error: `continue` is not allowed inside `scope(success)` bodies
+fail_compilation/fail6889.d(30): Error: `break` is not allowed inside `scope(success)` bodies
---
*/
void test_success()
@@ -46,7 +46,7 @@ L1:
/*
TEST_OUTPUT:
---
-fail_compilation/fail6889.d(56): Error: cannot goto in to `scope(failure)` block
+fail_compilation/fail6889.d(56): Error: cannot `goto` in to `scope(failure)` block
---
*/
void test_failure()
@@ -85,13 +85,13 @@ L1:
/*
TEST_OUTPUT:
---
-fail_compilation/fail6889.d(100): Error: cannot goto out of `scope(exit)` block
-fail_compilation/fail6889.d(101): Error: cannot goto in to `scope(exit)` block
-fail_compilation/fail6889.d(103): Error: return statements cannot be in `scope(exit)` bodies
-fail_compilation/fail6889.d(107): Error: continue is not inside `scope(exit)` bodies
-fail_compilation/fail6889.d(108): Error: break is not inside `scope(exit)` bodies
-fail_compilation/fail6889.d(113): Error: continue is not inside `scope(exit)` bodies
-fail_compilation/fail6889.d(114): Error: break is not inside `scope(exit)` bodies
+fail_compilation/fail6889.d(100): Error: cannot `goto` out of `scope(exit)` block
+fail_compilation/fail6889.d(101): Error: cannot `goto` in to `scope(exit)` block
+fail_compilation/fail6889.d(103): Error: `return` statements cannot be in `scope(exit)` bodies
+fail_compilation/fail6889.d(107): Error: `continue` is not allowed inside `scope(exit)` bodies
+fail_compilation/fail6889.d(108): Error: `break` is not allowed inside `scope(exit)` bodies
+fail_compilation/fail6889.d(113): Error: `continue` is not allowed inside `scope(exit)` bodies
+fail_compilation/fail6889.d(114): Error: `break` is not allowed inside `scope(exit)` bodies
---
*/
void test_exit()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail73.d b/gcc/testsuite/gdc.test/fail_compilation/fail73.d
index dc83e5d..0242201 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail73.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail73.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail73.d(20): Error: case not in switch statement
+fail_compilation/fail73.d(20): Error: `case` not in `switch` statement
---
*/
// segfault DMD 0.120
-// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/4634.html
+// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/4634.html
void main()
{
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7352.d b/gcc/testsuite/gdc.test/fail_compilation/fail7352.d
new file mode 100644
index 0000000..f5e8f9b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail7352.d
@@ -0,0 +1,52 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail7352.d(42): Error: template instance `Type!(1)` does not match template declaration `Type(T)`
+fail_compilation/fail7352.d(43): Error: template instance `Type!(b)` does not match template declaration `Type(T)`
+fail_compilation/fail7352.d(43): `b` is not a type
+fail_compilation/fail7352.d(44): Error: template instance `Type!(function () pure nothrow @nogc @safe => 1)` does not match template declaration `Type(T)`
+fail_compilation/fail7352.d(45): Error: template instance `Type!(fun)` does not match template declaration `Type(T)`
+fail_compilation/fail7352.d(45): `fun` is not a type
+fail_compilation/fail7352.d(47): Error: template instance `Immutable!int` does not match template declaration `Immutable(T : immutable(T))`
+fail_compilation/fail7352.d(49): Error: template instance `Value!int` does not match template declaration `Value(string s)`
+fail_compilation/fail7352.d(50): Error: template instance `Value!(1)` does not match template declaration `Value(string s)`
+fail_compilation/fail7352.d(51): Error: template instance `Value!(fun)` does not match template declaration `Value(string s)`
+fail_compilation/fail7352.d(51): `fun` is not of a value of type `string`
+---
+*/
+
+template Type(T)
+{
+}
+
+template Immutable(T : immutable(T))
+{
+ alias Immutable = T;
+}
+
+template Value(string s)
+{
+ auto x = s;
+}
+
+int fun(int i)
+{
+ return i;
+}
+
+void main()
+{
+ enum a = 1;
+ int b;
+
+ Type!a testTypeValue;
+ Type!b testTypeVar;
+ Type!(() => 1) testTypeFuncLiteral;
+ Type!fun testTypeFunc;
+
+ Immutable!int testImmutable;
+
+ auto testValueType = Value!int.x;
+ auto testValueWrongType = Value!a.x;
+ auto testValueFunc = Value!fun.x;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail74.d b/gcc/testsuite/gdc.test/fail_compilation/fail74.d
index c038b20a..79449eb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail74.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail74.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail74.d(13): Error: cannot append type C[1] to type C[1]
+fail_compilation/fail74.d(13): Error: cannot append type `C[1]` to type `C[1]`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7443.d b/gcc/testsuite/gdc.test/fail_compilation/fail7443.d
new file mode 100644
index 0000000..2c5c940
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail7443.d
@@ -0,0 +1,14 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail7443.d(11): Error: `static` has no effect on a constructor inside a `static` block. Use `static this()`
+fail_compilation/fail7443.d(12): Error: `shared static` has no effect on a constructor inside a `shared static` block. Use `shared static this()`
+---
+*/
+
+class Foo
+{
+ public static { this() {}}
+ public shared static { this() {}}
+ public {this(int) {}}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail75.d b/gcc/testsuite/gdc.test/fail_compilation/fail75.d
index 1059e36..0b0b8e0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail75.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail75.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail75.d(13): Error: cannot append type fail75.C to type C[1]
+fail_compilation/fail75.d(13): Error: cannot append type `fail75.C` to type `C[1]`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail76.d b/gcc/testsuite/gdc.test/fail_compilation/fail76.d
index c2b7e59..673fc7a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail76.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail76.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail76.d(9): Error: alias fail76.a conflicts with alias fail76.a at fail_compilation/fail76.d(8)
+fail_compilation/fail76.d(9): Error: alias `fail76.a` conflicts with alias `fail76.a` at fail_compilation/fail76.d(8)
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7848.d b/gcc/testsuite/gdc.test/fail_compilation/fail7848.d
index 77fcdfa..4fc269e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail7848.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail7848.d
@@ -3,26 +3,18 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail7848.d(35): Error: pure function 'fail7848.C.__unittestL33_$n$' cannot call impure function 'fail7848.func'
-fail_compilation/fail7848.d(35): Error: @safe function 'fail7848.C.__unittestL33_$n$' cannot call @system function 'fail7848.func'
-fail_compilation/fail7848.d(35): Error: @nogc function 'fail7848.C.__unittestL33_$n$' cannot call non-@nogc function 'fail7848.func'
-fail_compilation/fail7848.d(35): Error: function `fail7848.func` is not nothrow
-fail_compilation/fail7848.d(33): Error: nothrow function `fail7848.C.__unittestL33_$n$` may throw
-fail_compilation/fail7848.d(40): Error: pure function 'fail7848.C.__invariant2' cannot call impure function 'fail7848.func'
-fail_compilation/fail7848.d(40): Error: @safe function 'fail7848.C.__invariant2' cannot call @system function 'fail7848.func'
-fail_compilation/fail7848.d(40): Error: @nogc function 'fail7848.C.__invariant2' cannot call non-@nogc function 'fail7848.func'
-fail_compilation/fail7848.d(40): Error: function `fail7848.func` is not nothrow
-fail_compilation/fail7848.d(38): Error: nothrow function `fail7848.C.__invariant2` may throw
-fail_compilation/fail7848.d(45): Error: pure allocator 'fail7848.C.new' cannot call impure function 'fail7848.func'
-fail_compilation/fail7848.d(45): Error: @safe allocator 'fail7848.C.new' cannot call @system function 'fail7848.func'
-fail_compilation/fail7848.d(45): Error: @nogc allocator 'fail7848.C.new' cannot call non-@nogc function 'fail7848.func'
-fail_compilation/fail7848.d(45): Error: function `fail7848.func` is not nothrow
-fail_compilation/fail7848.d(43): Error: nothrow allocator `fail7848.C.new` may throw
-fail_compilation/fail7848.d(51): Error: pure deallocator 'fail7848.C.delete' cannot call impure function 'fail7848.func'
-fail_compilation/fail7848.d(51): Error: @safe deallocator 'fail7848.C.delete' cannot call @system function 'fail7848.func'
-fail_compilation/fail7848.d(51): Error: @nogc deallocator 'fail7848.C.delete' cannot call non-@nogc function 'fail7848.func'
-fail_compilation/fail7848.d(51): Error: function `fail7848.func` is not nothrow
-fail_compilation/fail7848.d(49): Error: nothrow deallocator `fail7848.C.delete` may throw
+fail_compilation/fail7848.d(27): Error: `pure` function `fail7848.C.__unittest_L25_C30` cannot call impure function `fail7848.func`
+fail_compilation/fail7848.d(27): Error: `@safe` function `fail7848.C.__unittest_L25_C30` cannot call `@system` function `fail7848.func`
+fail_compilation/fail7848.d(21): `fail7848.func` is declared here
+fail_compilation/fail7848.d(27): Error: `@nogc` function `fail7848.C.__unittest_L25_C30` cannot call non-@nogc function `fail7848.func`
+fail_compilation/fail7848.d(27): Error: function `fail7848.func` is not `nothrow`
+fail_compilation/fail7848.d(25): Error: `nothrow` function `fail7848.C.__unittest_L25_C30` may throw
+fail_compilation/fail7848.d(32): Error: `pure` function `fail7848.C.__invariant1` cannot call impure function `fail7848.func`
+fail_compilation/fail7848.d(32): Error: `@safe` function `fail7848.C.__invariant1` cannot call `@system` function `fail7848.func`
+fail_compilation/fail7848.d(21): `fail7848.func` is declared here
+fail_compilation/fail7848.d(32): Error: `@nogc` function `fail7848.C.__invariant1` cannot call non-@nogc function `fail7848.func`
+fail_compilation/fail7848.d(32): Error: function `fail7848.func` is not `nothrow`
+fail_compilation/fail7848.d(30): Error: `nothrow` function `fail7848.C.__invariant1` may throw
---
*/
@@ -39,15 +31,4 @@ class C
{
func();
}
-
- @safe pure nothrow @nogc new (size_t sz)
- {
- func();
- return null;
- }
-
- @safe pure nothrow @nogc delete (void* p)
- {
- func();
- }
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7862.d b/gcc/testsuite/gdc.test/fail_compilation/fail7862.d
index a81bc65..b408b44 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail7862.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail7862.d
@@ -3,12 +3,12 @@ TEST_OUTPUT:
---
A: false
A: false
-fail_compilation/fail7862.d(26): Error: template instance nonExistent!() template 'nonExistent' is not defined
-fail_compilation/fail7862.d(25): Error: template instance fail7862.B!(A) error instantiating
+fail_compilation/fail7862.d(26): Error: template instance `nonExistent!()` template `nonExistent` is not defined
+fail_compilation/fail7862.d(25): Error: template instance `fail7862.B!(A)` error instantiating
---
*/
-// 7862
+// https://issues.dlang.org/show_bug.cgi?id=7862
template B(T) {
mixin(
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail79.d b/gcc/testsuite/gdc.test/fail_compilation/fail79.d
index da06984..93fb7cb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail79.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail79.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail79.d(13): Error: incompatible types for ((& a) + (& b)): both operands are of type 'int*'
+fail_compilation/fail79.d(13): Error: incompatible types for `(& a) + (& b)`: both operands are of type `int*`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7903.d b/gcc/testsuite/gdc.test/fail_compilation/fail7903.d
index 7759f1a..18168ea 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail7903.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail7903.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail7903.d(21): Error: variable fail7903.F1.x Field members of a synchronized class cannot be public
-fail_compilation/fail7903.d(22): Error: variable fail7903.F1.y Field members of a synchronized class cannot be export
-fail_compilation/fail7903.d(27): Error: variable fail7903.F2.x Field members of a synchronized class cannot be public
+fail_compilation/fail7903.d(21): Error: variable `fail7903.F1.x` Field members of a `synchronized` class cannot be `public`
+fail_compilation/fail7903.d(22): Error: variable `fail7903.F1.y` Field members of a `synchronized` class cannot be `export`
+fail_compilation/fail7903.d(27): Error: variable `fail7903.F2.x` Field members of a `synchronized` class cannot be `public`
---
*/
synchronized class K1
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail8009.d b/gcc/testsuite/gdc.test/fail_compilation/fail8009.d
index 19a0712..a06dec5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail8009.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail8009.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail8009.d(9): Error: template `fail8009.filter` cannot deduce function from argument types `!()(void)`, candidates are:
-fail_compilation/fail8009.d(8): `filter(R)(scope bool delegate(ref BAD!R) func)`
+fail_compilation/fail8009.d(9): Error: template `fail8009.filter` cannot deduce function from argument types `!()(void)`
+fail_compilation/fail8009.d(8): Candidate is: `filter(R)(scope bool delegate(ref BAD!R) func)`
---
*/
void filter(R)(scope bool delegate(ref BAD!R) func) { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail80_m32.d b/gcc/testsuite/gdc.test/fail_compilation/fail80_m32.d
index fb2f6fa..11facfd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail80_m32.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail80_m32.d
@@ -18,8 +18,8 @@ class ResourceManager
class Test
{
- import std.file;
- import std.path;
+
+
static Image[] images;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail80_m64.d b/gcc/testsuite/gdc.test/fail_compilation/fail80_m64.d
index 52d23d3..59c890e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail80_m64.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail80_m64.d
@@ -18,8 +18,8 @@ class ResourceManager
class Test
{
- import std.file;
- import std.path;
+
+
static Image[] images;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail8217.d b/gcc/testsuite/gdc.test/fail_compilation/fail8217.d
index e74b7c3..477ca63 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail8217.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail8217.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail8217.d(22): Error: this for foo needs to be type D not type fail8217.D.C
+fail_compilation/fail8217.d(22): Error: `this` for `foo` needs to be type `D` not type `fail8217.D.C`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail8262.d b/gcc/testsuite/gdc.test/fail_compilation/fail8262.d
new file mode 100644
index 0000000..2df1bca
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail8262.d
@@ -0,0 +1,33 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/fail8262.d(32): Error: initializer must be an expression, not `Tuple8262!1`
+fail_compilation/fail8262.d(27): Error: template instance `fail8262.T8262!(Tuple8262!1)` error instantiating
+fail_compilation/fail8262.d(19): Error: cannot implicitly convert expression `S(0)` of type `S` to `int`
+---
+ * https://issues.dlang.org/show_bug.cgi?id=8262
+ */
+
+template Seq(T...) { alias T Seq; }
+
+struct S
+{
+ int s;
+ alias Seq!s _;
+ alias _ this;
+}
+
+int si = S.init;
+
+struct Tuple8262(T...)
+{
+ alias T expand;
+ alias expand this;
+}
+
+auto data = T8262!(Tuple8262!1);
+//pragma(msg, data);
+
+template T8262(T)
+{
+ immutable(int) T8262 = T;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail8373.d b/gcc/testsuite/gdc.test/fail_compilation/fail8373.d
index d921707..2fb478d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail8373.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail8373.d
@@ -1,14 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail8373.d(21): Error: fail8373.fun1 called with argument types (int) matches both:
-fail_compilation/fail8373.d(15): fail8373.fun1!().fun1!int.fun1(int)
+fail_compilation/fail8373.d(21): Error: `fail8373.fun1` called with argument types `(int)` matches both:
+fail_compilation/fail8373.d(15): `fail8373.fun1!().fun1!int.fun1(int)`
and:
-fail_compilation/fail8373.d(16): fail8373.fun1!int.fun1(int)
-fail_compilation/fail8373.d(22): Error: fail8373.fun2 called with argument types (int) matches both:
-fail_compilation/fail8373.d(18): fail8373.fun2!int.fun2(int)
+fail_compilation/fail8373.d(16): `fail8373.fun1!int.fun1(int)`
+fail_compilation/fail8373.d(22): Error: `fail8373.fun2` called with argument types `(int)` matches both:
+fail_compilation/fail8373.d(18): `fail8373.fun2!int.fun2(int)`
and:
-fail_compilation/fail8373.d(19): fail8373.fun2!().fun2!int.fun2(int)
+fail_compilation/fail8373.d(19): `fail8373.fun2!().fun2!int.fun2(int)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail86.d b/gcc/testsuite/gdc.test/fail_compilation/fail86.d
index a0ccb7c..4f56e95 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail86.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail86.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail86.d(12): Error: alias Foo recursive alias declaration
+fail_compilation/fail86.d(12): Error: alias `Foo` recursive alias declaration
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail8631.d b/gcc/testsuite/gdc.test/fail_compilation/fail8631.d
index 3aada74..4f5b076 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail8631.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail8631.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail8631.d(14): Error: function fail8631.D.foo does not override any function, did you mean to override 'fail8631.B.foo'?
+fail_compilation/fail8631.d(14): Error: function `shared const int fail8631.D.foo()` does not override any function, did you mean to override `immutable int fail8631.B.foo()`?
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail8724.d b/gcc/testsuite/gdc.test/fail_compilation/fail8724.d
index 7f9cba2..c5ca98b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail8724.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail8724.d
@@ -3,7 +3,7 @@
TEST_OUTPUT:
---
fail_compilation/fail8724.d(14): Error: `object.Exception` is thrown but not caught
-fail_compilation/fail8724.d(12): Error: nothrow constructor `fail8724.Foo.this` may throw
+fail_compilation/fail8724.d(12): Error: `nothrow` constructor `fail8724.Foo.this` may throw
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9.d b/gcc/testsuite/gdc.test/fail_compilation/fail9.d
index 6253774..0878995 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9.d(23): Error: no property 'Vector' for type 'fail9.Vector!int'
+fail_compilation/fail9.d(23): Error: no property `Vector` for type `fail9.Vector!int`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9063.d b/gcc/testsuite/gdc.test/fail_compilation/fail9063.d
index 962fb04..36f04ad 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9063.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9063.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9063.d(9): Error: static assert "msg"
+fail_compilation/fail9063.d(9): Error: static assert: "msg"
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9081.d b/gcc/testsuite/gdc.test/fail_compilation/fail9081.d
index 86c8887..3d65bea 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9081.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9081.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9081.d(12): Error: package core has no type
-fail_compilation/fail9081.d(13): Error: package stdc has no type
-fail_compilation/fail9081.d(14): Error: module stdio has no type
+fail_compilation/fail9081.d(12): Error: package `core` has no type
+fail_compilation/fail9081.d(13): Error: package `stdc` has no type
+fail_compilation/fail9081.d(14): Error: module `stdio` has no type
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail91.d b/gcc/testsuite/gdc.test/fail_compilation/fail91.d
index 59f80fd..41be801 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail91.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail91.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail91.d(12): Error: struct fail91.S unknown size
+fail_compilation/fail91.d(12): Error: struct `fail91.S` unknown size
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9199.d b/gcc/testsuite/gdc.test/fail_compilation/fail9199.d
index 00a87c3..2a5cd01 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9199.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9199.d
@@ -2,12 +2,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9199.d(13): Error: function fail9199.fc without 'this' cannot be const
-fail_compilation/fail9199.d(14): Error: function fail9199.fi without 'this' cannot be immutable
-fail_compilation/fail9199.d(15): Error: function fail9199.fw without 'this' cannot be inout
-fail_compilation/fail9199.d(16): Error: function fail9199.fs without 'this' cannot be shared
-fail_compilation/fail9199.d(17): Error: function fail9199.fsc without 'this' cannot be shared const
-fail_compilation/fail9199.d(18): Error: function fail9199.fsw without 'this' cannot be shared inout
+fail_compilation/fail9199.d(13): Error: function `fail9199.fc` without `this` cannot be `const`
+fail_compilation/fail9199.d(14): Error: function `fail9199.fi` without `this` cannot be `immutable`
+fail_compilation/fail9199.d(15): Error: function `fail9199.fw` without `this` cannot be `inout`
+fail_compilation/fail9199.d(16): Error: function `fail9199.fs` without `this` cannot be `shared`
+fail_compilation/fail9199.d(17): Error: function `fail9199.fsc` without `this` cannot be `shared const`
+fail_compilation/fail9199.d(18): Error: function `fail9199.fsw` without `this` cannot be `shared inout`
---
*/
void fc() const {}
@@ -20,12 +20,12 @@ void fsw() shared inout {}
/*
TEST_OUTPUT:
---
-fail_compilation/fail9199.d(33): Error: function fail9199.C.fc without 'this' cannot be const
-fail_compilation/fail9199.d(34): Error: function fail9199.C.fi without 'this' cannot be immutable
-fail_compilation/fail9199.d(35): Error: function fail9199.C.fw without 'this' cannot be inout
-fail_compilation/fail9199.d(36): Error: function fail9199.C.fs without 'this' cannot be shared
-fail_compilation/fail9199.d(37): Error: function fail9199.C.fsc without 'this' cannot be shared const
-fail_compilation/fail9199.d(38): Error: function fail9199.C.fsw without 'this' cannot be shared inout
+fail_compilation/fail9199.d(33): Error: function `fail9199.C.fc` without `this` cannot be `const`
+fail_compilation/fail9199.d(34): Error: function `fail9199.C.fi` without `this` cannot be `immutable`
+fail_compilation/fail9199.d(35): Error: function `fail9199.C.fw` without `this` cannot be `inout`
+fail_compilation/fail9199.d(36): Error: function `fail9199.C.fs` without `this` cannot be `shared`
+fail_compilation/fail9199.d(37): Error: function `fail9199.C.fsc` without `this` cannot be `shared const`
+fail_compilation/fail9199.d(38): Error: function `fail9199.C.fsw` without `this` cannot be `shared inout`
---
*/
class C
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail92.d b/gcc/testsuite/gdc.test/fail_compilation/fail92.d
index 8fa69bb..8e34199 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail92.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail92.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail92.d(15): Error: invalid foreach aggregate `t`
-fail_compilation/fail92.d(23): Error: template instance fail92.crash!(typeof(null)) error instantiating
+fail_compilation/fail92.d(15): Error: invalid `foreach` aggregate `t`
+fail_compilation/fail92.d(23): Error: template instance `fail92.crash!(typeof(null))` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9290.d b/gcc/testsuite/gdc.test/fail_compilation/fail9290.d
new file mode 100644
index 0000000..6b51b2b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9290.d
@@ -0,0 +1,17 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail9290.d(15): Error: slice `s1[]` is not mutable, struct `S` has immutable members
+fail_compilation/fail9290.d(16): Error: array `s1` is not mutable, struct `S` has immutable members
+---
+*/
+
+struct S { immutable int i; }
+
+void main()
+{
+ S[1] s1 = S(1);
+ S[1] s2 = S(2);
+ s1 = S(3);
+ s1 = s2;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail93.d b/gcc/testsuite/gdc.test/fail_compilation/fail93.d
index 4784038..b9ad294 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail93.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail93.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail93.d(13): Error: variable i is shadowing variable fail93.main.i
+fail_compilation/fail93.d(13): Error: variable `i` is shadowing variable `fail93.main.i`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9346.d b/gcc/testsuite/gdc.test/fail_compilation/fail9346.d
index 57d420f..19d0baa 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9346.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9346.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9346.d(26): Error: struct fail9346.S is not copyable because it is annotated with `@disable`
-fail_compilation/fail9346.d(27): Error: struct fail9346.S is not copyable because it is annotated with `@disable`
+fail_compilation/fail9346.d(26): Error: struct `fail9346.S` is not copyable because it has a disabled postblit
+fail_compilation/fail9346.d(27): Error: struct `fail9346.S` is not copyable because it has a disabled postblit
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9368.d b/gcc/testsuite/gdc.test/fail_compilation/fail9368.d
deleted file mode 100644
index 25e1360..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9368.d
+++ /dev/null
@@ -1,49 +0,0 @@
-// PERMUTE_ARGS:
-// REQUIRED_ARGS: -d
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail9368.d(20): Error: enum member `b` not represented in final switch
----
-*/
-
-enum E
-{
- a,
- b
-}
-
-void main()
-{
- alias E F;
- F f;
- final switch (f)
- {
- case F.a:
- }
-}
-
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail9368.d(41): Error: enum member `B` not represented in final switch
----
-*/
-
-enum G
-{
- A,B,C
-}
-
-void test286()
-{
- G e;
- final switch (e)
- {
- case G.A:
-// case G.B:
- case G.C:
- {}
- }
-}
-
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail94.d b/gcc/testsuite/gdc.test/fail_compilation/fail94.d
index 335b695..aa722bf 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail94.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail94.d
@@ -30,7 +30,7 @@ class B : A
{
printf("B.clone()\n");
}
- body { return ia; }
+ do { return ia; }
}
void main()
@@ -59,4 +59,3 @@ void main()
void bar(IA delegate() dg)
{
}
-
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9413.d b/gcc/testsuite/gdc.test/fail_compilation/fail9413.d
index 617c995..c17e713 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9413.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9413.d
@@ -1,24 +1,24 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9413.d(45): Error: variable fail9413.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9413.d(32): Error: variable fail9413.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9413.d(33): Error: variable fail9413.foo.bar.y cannot modify parameter 'y' in contract
-fail_compilation/fail9413.d(38): Error: variable fail9413.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9413.d(39): Error: variable fail9413.foo.bar.y cannot modify parameter 'y' in contract
-fail_compilation/fail9413.d(40): Error: variable fail9413.foo.bar.s cannot modify result 's' in contract
-fail_compilation/fail9413.d(50): Error: variable fail9413.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9413.d(73): Error: variable fail9413.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9413.d(74): Error: variable fail9413.foo.r cannot modify result 'r' in contract
-fail_compilation/fail9413.d(58): Error: variable fail9413.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9413.d(59): Error: variable fail9413.foo.r cannot modify result 'r' in contract
-fail_compilation/fail9413.d(60): Error: variable fail9413.foo.baz.y cannot modify parameter 'y' in contract
-fail_compilation/fail9413.d(65): Error: variable fail9413.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9413.d(66): Error: variable fail9413.foo.r cannot modify result 'r' in contract
-fail_compilation/fail9413.d(67): Error: variable fail9413.foo.baz.y cannot modify parameter 'y' in contract
-fail_compilation/fail9413.d(68): Error: variable fail9413.foo.baz.s cannot modify result 's' in contract
-fail_compilation/fail9413.d(79): Error: variable fail9413.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9413.d(80): Error: variable fail9413.foo.r cannot modify result 'r' in contract
+fail_compilation/fail9413.d(45): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9413.d(32): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9413.d(33): Error: variable `fail9413.foo.bar.y` cannot modify parameter `y` in contract
+fail_compilation/fail9413.d(38): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9413.d(39): Error: variable `fail9413.foo.bar.y` cannot modify parameter `y` in contract
+fail_compilation/fail9413.d(40): Error: variable `fail9413.foo.bar.s` cannot modify result `s` in contract
+fail_compilation/fail9413.d(50): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9413.d(73): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9413.d(74): Error: variable `fail9413.foo.r` cannot modify result `r` in contract
+fail_compilation/fail9413.d(58): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9413.d(59): Error: variable `fail9413.foo.r` cannot modify result `r` in contract
+fail_compilation/fail9413.d(60): Error: variable `fail9413.foo.baz.y` cannot modify parameter `y` in contract
+fail_compilation/fail9413.d(65): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9413.d(66): Error: variable `fail9413.foo.r` cannot modify result `r` in contract
+fail_compilation/fail9413.d(67): Error: variable `fail9413.foo.baz.y` cannot modify parameter `y` in contract
+fail_compilation/fail9413.d(68): Error: variable `fail9413.foo.baz.s` cannot modify result `s` in contract
+fail_compilation/fail9413.d(79): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9413.d(80): Error: variable `fail9413.foo.r` cannot modify result `r` in contract
---
*/
@@ -40,7 +40,7 @@ in
s = 10; // err
a = 1; // OK
}
- body
+ do
{
x = 10; // err
y = 1; // OK
@@ -68,7 +68,7 @@ out(r)
s = 10; // err
a = 1; // OK
}
- body
+ do
{
x = 10; // err
r = 10; // err
@@ -79,7 +79,7 @@ out(r)
x = 10; // err
r = 10; // err
}
-body
+do
{
return 1;
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9414a.d b/gcc/testsuite/gdc.test/fail_compilation/fail9414a.d
index 4fd98d3..b6e2a6f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9414a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9414a.d
@@ -1,24 +1,24 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9414a.d(47): Error: variable fail9414a.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414a.d(34): Error: variable fail9414a.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414a.d(35): Error: variable fail9414a.C.foo.__require.bar.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414a.d(40): Error: variable fail9414a.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414a.d(41): Error: variable fail9414a.C.foo.__require.bar.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414a.d(42): Error: variable fail9414a.C.foo.__require.bar.s cannot modify result 's' in contract
-fail_compilation/fail9414a.d(52): Error: variable fail9414a.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414a.d(75): Error: variable fail9414a.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414a.d(76): Error: variable fail9414a.C.foo.__ensure.r cannot modify result 'r' in contract
-fail_compilation/fail9414a.d(60): Error: variable fail9414a.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414a.d(61): Error: variable fail9414a.C.foo.__ensure.r cannot modify result 'r' in contract
-fail_compilation/fail9414a.d(62): Error: variable fail9414a.C.foo.__ensure.baz.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414a.d(67): Error: variable fail9414a.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414a.d(68): Error: variable fail9414a.C.foo.__ensure.r cannot modify result 'r' in contract
-fail_compilation/fail9414a.d(69): Error: variable fail9414a.C.foo.__ensure.baz.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414a.d(70): Error: variable fail9414a.C.foo.__ensure.baz.s cannot modify result 's' in contract
-fail_compilation/fail9414a.d(81): Error: variable fail9414a.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414a.d(82): Error: variable fail9414a.C.foo.__ensure.r cannot modify result 'r' in contract
+fail_compilation/fail9414a.d(47): Error: variable `fail9414a.C.foo.__require.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414a.d(34): Error: variable `fail9414a.C.foo.__require.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414a.d(35): Error: variable `fail9414a.C.foo.__require.bar.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414a.d(40): Error: variable `fail9414a.C.foo.__require.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414a.d(41): Error: variable `fail9414a.C.foo.__require.bar.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414a.d(42): Error: variable `fail9414a.C.foo.__require.bar.s` cannot modify result `s` in contract
+fail_compilation/fail9414a.d(52): Error: variable `fail9414a.C.foo.__require.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414a.d(75): Error: variable `fail9414a.C.foo.__ensure.x` cannot modify result `x` in contract
+fail_compilation/fail9414a.d(76): Error: variable `fail9414a.C.foo.__ensure.r` cannot modify result `r` in contract
+fail_compilation/fail9414a.d(60): Error: variable `fail9414a.C.foo.__ensure.x` cannot modify result `x` in contract
+fail_compilation/fail9414a.d(61): Error: variable `fail9414a.C.foo.__ensure.r` cannot modify result `r` in contract
+fail_compilation/fail9414a.d(62): Error: variable `fail9414a.C.foo.__ensure.baz.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414a.d(67): Error: variable `fail9414a.C.foo.__ensure.x` cannot modify result `x` in contract
+fail_compilation/fail9414a.d(68): Error: variable `fail9414a.C.foo.__ensure.r` cannot modify result `r` in contract
+fail_compilation/fail9414a.d(69): Error: variable `fail9414a.C.foo.__ensure.baz.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414a.d(70): Error: variable `fail9414a.C.foo.__ensure.baz.s` cannot modify result `s` in contract
+fail_compilation/fail9414a.d(81): Error: variable `fail9414a.C.foo.__ensure.x` cannot modify result `x` in contract
+fail_compilation/fail9414a.d(82): Error: variable `fail9414a.C.foo.__ensure.r` cannot modify result `r` in contract
---
*/
@@ -42,7 +42,7 @@ class C
s = 10; // err
a = 1; // OK
}
- body
+ do
{
x = 10; // err
y = 1; // OK
@@ -70,7 +70,7 @@ class C
s = 10; // err
a = 1; // OK
}
- body
+ do
{
x = 10; // err
r = 10; // err
@@ -81,7 +81,7 @@ class C
x = 10; // err
r = 10; // err
}
- body
+ do
{
return 1;
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9414b.d b/gcc/testsuite/gdc.test/fail_compilation/fail9414b.d
index 37bd12f..dbb76da 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9414b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9414b.d
@@ -1,24 +1,24 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9414b.d(47): Error: variable fail9414b.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414b.d(34): Error: variable fail9414b.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414b.d(35): Error: variable fail9414b.C.foo.__require.bar.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414b.d(40): Error: variable fail9414b.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414b.d(41): Error: variable fail9414b.C.foo.__require.bar.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414b.d(42): Error: variable fail9414b.C.foo.__require.bar.s cannot modify result 's' in contract
-fail_compilation/fail9414b.d(52): Error: variable fail9414b.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414b.d(75): Error: variable fail9414b.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414b.d(76): Error: variable fail9414b.C.foo.__ensure.r cannot modify result 'r' in contract
-fail_compilation/fail9414b.d(60): Error: variable fail9414b.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414b.d(61): Error: variable fail9414b.C.foo.__ensure.r cannot modify result 'r' in contract
-fail_compilation/fail9414b.d(62): Error: variable fail9414b.C.foo.__ensure.baz.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414b.d(67): Error: variable fail9414b.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414b.d(68): Error: variable fail9414b.C.foo.__ensure.r cannot modify result 'r' in contract
-fail_compilation/fail9414b.d(69): Error: variable fail9414b.C.foo.__ensure.baz.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414b.d(70): Error: variable fail9414b.C.foo.__ensure.baz.s cannot modify result 's' in contract
-fail_compilation/fail9414b.d(81): Error: variable fail9414b.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414b.d(82): Error: variable fail9414b.C.foo.__ensure.r cannot modify result 'r' in contract
+fail_compilation/fail9414b.d(47): Error: variable `fail9414b.C.foo.__require.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414b.d(34): Error: variable `fail9414b.C.foo.__require.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414b.d(35): Error: variable `fail9414b.C.foo.__require.bar.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414b.d(40): Error: variable `fail9414b.C.foo.__require.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414b.d(41): Error: variable `fail9414b.C.foo.__require.bar.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414b.d(42): Error: variable `fail9414b.C.foo.__require.bar.s` cannot modify result `s` in contract
+fail_compilation/fail9414b.d(52): Error: variable `fail9414b.C.foo.__require.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414b.d(75): Error: variable `fail9414b.C.foo.__ensure.x` cannot modify result `x` in contract
+fail_compilation/fail9414b.d(76): Error: variable `fail9414b.C.foo.__ensure.r` cannot modify result `r` in contract
+fail_compilation/fail9414b.d(60): Error: variable `fail9414b.C.foo.__ensure.x` cannot modify result `x` in contract
+fail_compilation/fail9414b.d(61): Error: variable `fail9414b.C.foo.__ensure.r` cannot modify result `r` in contract
+fail_compilation/fail9414b.d(62): Error: variable `fail9414b.C.foo.__ensure.baz.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414b.d(67): Error: variable `fail9414b.C.foo.__ensure.x` cannot modify result `x` in contract
+fail_compilation/fail9414b.d(68): Error: variable `fail9414b.C.foo.__ensure.r` cannot modify result `r` in contract
+fail_compilation/fail9414b.d(69): Error: variable `fail9414b.C.foo.__ensure.baz.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414b.d(70): Error: variable `fail9414b.C.foo.__ensure.baz.s` cannot modify result `s` in contract
+fail_compilation/fail9414b.d(81): Error: variable `fail9414b.C.foo.__ensure.x` cannot modify result `x` in contract
+fail_compilation/fail9414b.d(82): Error: variable `fail9414b.C.foo.__ensure.r` cannot modify result `r` in contract
---
*/
@@ -42,7 +42,7 @@ class C
s = 10; // err
a = 1; // OK
}
- body
+ do
{
x = 10; // err
y = 1; // OK
@@ -70,7 +70,7 @@ class C
s = 10; // err
a = 1; // OK
}
- body
+ do
{
x = 10; // err
r = 10; // err
@@ -81,7 +81,7 @@ class C
x = 10; // err
r = 10; // err
}
- body
+ do
{
return 1;
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9414c.d b/gcc/testsuite/gdc.test/fail_compilation/fail9414c.d
index efbff9c..3e0311a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9414c.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9414c.d
@@ -1,24 +1,24 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9414c.d(47): Error: variable fail9414c.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414c.d(34): Error: variable fail9414c.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414c.d(35): Error: variable fail9414c.C.foo.bar.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414c.d(40): Error: variable fail9414c.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414c.d(41): Error: variable fail9414c.C.foo.bar.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414c.d(42): Error: variable fail9414c.C.foo.bar.s cannot modify result 's' in contract
-fail_compilation/fail9414c.d(52): Error: variable fail9414c.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414c.d(75): Error: variable fail9414c.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414c.d(76): Error: variable fail9414c.C.foo.r cannot modify result 'r' in contract
-fail_compilation/fail9414c.d(60): Error: variable fail9414c.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414c.d(61): Error: variable fail9414c.C.foo.r cannot modify result 'r' in contract
-fail_compilation/fail9414c.d(62): Error: variable fail9414c.C.foo.baz.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414c.d(67): Error: variable fail9414c.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414c.d(68): Error: variable fail9414c.C.foo.r cannot modify result 'r' in contract
-fail_compilation/fail9414c.d(69): Error: variable fail9414c.C.foo.baz.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414c.d(70): Error: variable fail9414c.C.foo.baz.s cannot modify result 's' in contract
-fail_compilation/fail9414c.d(81): Error: variable fail9414c.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414c.d(82): Error: variable fail9414c.C.foo.r cannot modify result 'r' in contract
+fail_compilation/fail9414c.d(47): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414c.d(34): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414c.d(35): Error: variable `fail9414c.C.foo.bar.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414c.d(40): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414c.d(41): Error: variable `fail9414c.C.foo.bar.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414c.d(42): Error: variable `fail9414c.C.foo.bar.s` cannot modify result `s` in contract
+fail_compilation/fail9414c.d(52): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414c.d(75): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414c.d(76): Error: variable `fail9414c.C.foo.r` cannot modify result `r` in contract
+fail_compilation/fail9414c.d(60): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414c.d(61): Error: variable `fail9414c.C.foo.r` cannot modify result `r` in contract
+fail_compilation/fail9414c.d(62): Error: variable `fail9414c.C.foo.baz.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414c.d(67): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414c.d(68): Error: variable `fail9414c.C.foo.r` cannot modify result `r` in contract
+fail_compilation/fail9414c.d(69): Error: variable `fail9414c.C.foo.baz.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414c.d(70): Error: variable `fail9414c.C.foo.baz.s` cannot modify result `s` in contract
+fail_compilation/fail9414c.d(81): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414c.d(82): Error: variable `fail9414c.C.foo.r` cannot modify result `r` in contract
---
*/
@@ -42,7 +42,7 @@ class C
s = 10; // err
a = 1; // OK
}
- body
+ do
{
x = 10; // err
y = 1; // OK
@@ -70,7 +70,7 @@ class C
s = 10; // err
a = 1; // OK
}
- body
+ do
{
x = 10; // err
r = 10; // err
@@ -81,7 +81,7 @@ class C
x = 10; // err
r = 10; // err
}
- body
+ do
{
return 1;
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9414d.d b/gcc/testsuite/gdc.test/fail_compilation/fail9414d.d
index 60b5886..06d37ce 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9414d.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9414d.d
@@ -1,24 +1,24 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9414d.d(47): Error: variable fail9414d.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414d.d(34): Error: variable fail9414d.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414d.d(35): Error: variable fail9414d.C.foo.bar.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414d.d(40): Error: variable fail9414d.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414d.d(41): Error: variable fail9414d.C.foo.bar.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414d.d(42): Error: variable fail9414d.C.foo.bar.s cannot modify result 's' in contract
-fail_compilation/fail9414d.d(52): Error: variable fail9414d.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414d.d(75): Error: variable fail9414d.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414d.d(76): Error: variable fail9414d.C.foo.r cannot modify result 'r' in contract
-fail_compilation/fail9414d.d(60): Error: variable fail9414d.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414d.d(61): Error: variable fail9414d.C.foo.r cannot modify result 'r' in contract
-fail_compilation/fail9414d.d(62): Error: variable fail9414d.C.foo.baz.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414d.d(67): Error: variable fail9414d.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414d.d(68): Error: variable fail9414d.C.foo.r cannot modify result 'r' in contract
-fail_compilation/fail9414d.d(69): Error: variable fail9414d.C.foo.baz.y cannot modify parameter 'y' in contract
-fail_compilation/fail9414d.d(70): Error: variable fail9414d.C.foo.baz.s cannot modify result 's' in contract
-fail_compilation/fail9414d.d(81): Error: variable fail9414d.C.foo.x cannot modify parameter 'x' in contract
-fail_compilation/fail9414d.d(82): Error: variable fail9414d.C.foo.r cannot modify result 'r' in contract
+fail_compilation/fail9414d.d(47): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414d.d(34): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414d.d(35): Error: variable `fail9414d.C.foo.bar.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414d.d(40): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414d.d(41): Error: variable `fail9414d.C.foo.bar.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414d.d(42): Error: variable `fail9414d.C.foo.bar.s` cannot modify result `s` in contract
+fail_compilation/fail9414d.d(52): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414d.d(75): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414d.d(76): Error: variable `fail9414d.C.foo.r` cannot modify result `r` in contract
+fail_compilation/fail9414d.d(60): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414d.d(61): Error: variable `fail9414d.C.foo.r` cannot modify result `r` in contract
+fail_compilation/fail9414d.d(62): Error: variable `fail9414d.C.foo.baz.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414d.d(67): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414d.d(68): Error: variable `fail9414d.C.foo.r` cannot modify result `r` in contract
+fail_compilation/fail9414d.d(69): Error: variable `fail9414d.C.foo.baz.y` cannot modify parameter `y` in contract
+fail_compilation/fail9414d.d(70): Error: variable `fail9414d.C.foo.baz.s` cannot modify result `s` in contract
+fail_compilation/fail9414d.d(81): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract
+fail_compilation/fail9414d.d(82): Error: variable `fail9414d.C.foo.r` cannot modify result `r` in contract
---
*/
@@ -42,7 +42,7 @@ class C
s = 10; // err
a = 1; // OK
}
- body
+ do
{
x = 10; // err
y = 1; // OK
@@ -70,7 +70,7 @@ class C
s = 10; // err
a = 1; // OK
}
- body
+ do
{
x = 10; // err
r = 10; // err
@@ -81,7 +81,7 @@ class C
x = 10; // err
r = 10; // err
}
- body
+ do
{
return 1;
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail95.d b/gcc/testsuite/gdc.test/fail_compilation/fail95.d
index 439e55d..b1f046a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail95.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail95.d
@@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail95.d(19): Error: template fail95.A cannot deduce function from argument types !()(int), candidates are:
-fail_compilation/fail95.d(11): fail95.A(alias T)(T)
+fail_compilation/fail95.d(19): Error: template `fail95.A` cannot deduce function from argument types `!()(int)`
+fail_compilation/fail95.d(11): Candidate is: `A(alias T)(T)`
---
*/
-// Issue 142 - Assertion failure: '0' on line 610 in file 'template.c'
-
+// https://issues.dlang.org/show_bug.cgi?id=142
+// Assertion failure: '0' on line 610 in file 'template.c'
template A(alias T)
{
void A(T) { T = 2; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9537.d b/gcc/testsuite/gdc.test/fail_compilation/fail9537.d
index bf6e4db..e08badf 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9537.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9537.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9537.d(26): Error: foo(tuple(1, 2)) is not an lvalue
+fail_compilation/fail9537.d(26): Error: `foo(tuple(1, 2))` is not an lvalue and cannot be modified
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9562.d b/gcc/testsuite/gdc.test/fail_compilation/fail9562.d
index 46aafee..7c40c41 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9562.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9562.d
@@ -1,13 +1,12 @@
/*
REQUIRED_ARGS: -o-
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/fail9562.d(17): Error: int[] is not an expression
-fail_compilation/fail9562.d(18): Error: no property 'reverse' for type 'int[]'
-fail_compilation/fail9562.d(19): Error: no property 'sort' for type 'int[]'
-fail_compilation/fail9562.d(20): Error: no property 'dup' for type 'int[]'
-fail_compilation/fail9562.d(21): Error: no property 'idup' for type 'int[]'
+fail_compilation/fail9562.d(16): Error: `int[]` is not an expression
+fail_compilation/fail9562.d(17): Error: no property `reverse` for type `int[]`
+fail_compilation/fail9562.d(18): Error: no property `sort` for type `int[]`, perhaps `import std.algorithm;` is needed?
+fail_compilation/fail9562.d(19): Error: no property `dup` for type `int[]`
+fail_compilation/fail9562.d(20): Error: no property `idup` for type `int[]`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail96.d b/gcc/testsuite/gdc.test/fail_compilation/fail96.d
index 1bdc841..639fb6c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail96.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail96.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail96.d(21): Error: template instance foo!long foo is not a template declaration, it is a function alias
+fail_compilation/fail96.d(21): Error: template instance `foo!long` `foo` is not a template declaration, it is a function alias
---
*/
-// 153
+// https://issues.dlang.org/show_bug.cgi?id=153
template bar(T)
{
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9613.d b/gcc/testsuite/gdc.test/fail_compilation/fail9613.d
index 7f9d007..31ca808 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9613.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9613.d
@@ -1,4 +1,4 @@
-// PREMUTE_ARGS:
+// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9665a.d b/gcc/testsuite/gdc.test/fail_compilation/fail9665a.d
index 64602f87..abfe914 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9665a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9665a.d
@@ -1,15 +1,39 @@
-// REQUIRED_ARGS:
-// PERMUTE_ARGS:
-
-/***************************************************/
-// immutable field
-
/+
TEST_OUTPUT:
---
-fail_compilation/fail9665a.d(19): Error: immutable field 'v' initialized multiple times
+fail_compilation/fail9665a.d(43): Error: immutable field `v` initialized multiple times
+fail_compilation/fail9665a.d(42): Previous initialization is here.
+fail_compilation/fail9665a.d(53): Error: immutable field `v` initialized multiple times
+fail_compilation/fail9665a.d(52): Previous initialization is here.
+fail_compilation/fail9665a.d(58): Error: immutable field `v` initialized multiple times
+fail_compilation/fail9665a.d(57): Previous initialization is here.
+fail_compilation/fail9665a.d(63): Error: immutable field `v` initialized multiple times
+fail_compilation/fail9665a.d(62): Previous initialization is here.
+fail_compilation/fail9665a.d(73): Error: immutable field `v` initialized multiple times
+fail_compilation/fail9665a.d(72): Previous initialization is here.
+fail_compilation/fail9665a.d(78): Error: immutable field `v` initialized multiple times
+fail_compilation/fail9665a.d(77): Previous initialization is here.
+fail_compilation/fail9665a.d(83): Error: immutable field `v` initialized multiple times
+fail_compilation/fail9665a.d(82): Previous initialization is here.
+fail_compilation/fail9665a.d(96): Error: immutable field `v` initialization is not allowed in loops or after labels
+fail_compilation/fail9665a.d(101): Error: immutable field `v` initialization is not allowed in loops or after labels
+fail_compilation/fail9665a.d(106): Error: immutable field `v` initialized multiple times
+fail_compilation/fail9665a.d(105): Previous initialization is here.
+fail_compilation/fail9665a.d(111): Error: immutable field `v` initialized multiple times
+fail_compilation/fail9665a.d(110): Previous initialization is here.
+fail_compilation/fail9665a.d(116): Error: immutable field `v` initialized multiple times
+fail_compilation/fail9665a.d(115): Previous initialization is here.
+fail_compilation/fail9665a.d(130): Error: immutable field `v` initialized multiple times
+fail_compilation/fail9665a.d(129): Previous initialization is here.
+fail_compilation/fail9665a.d(134): Error: immutable field `w` initialized multiple times
+fail_compilation/fail9665a.d(133): Previous initialization is here.
+fail_compilation/fail9665a.d(148): Error: static assert: `__traits(compiles, this.v = 1)` is false
---
+/
+
+/***************************************************/
+// immutable field
+
struct S1A
{
immutable int v;
@@ -20,14 +44,6 @@ struct S1A
}
}
-/+
-TEST_OUTPUT:
----
-fail_compilation/fail9665a.d(37): Error: immutable field 'v' initialized multiple times
-fail_compilation/fail9665a.d(42): Error: immutable field 'v' initialized multiple times
-fail_compilation/fail9665a.d(47): Error: immutable field 'v' initialized multiple times
----
-+/
struct S1B
{
immutable int v;
@@ -48,14 +64,6 @@ struct S1B
}
}
-/+
-TEST_OUTPUT:
----
-fail_compilation/fail9665a.d(65): Error: immutable field 'v' initialized multiple times
-fail_compilation/fail9665a.d(70): Error: immutable field 'v' initialized multiple times
-fail_compilation/fail9665a.d(75): Error: immutable field 'v' initialized multiple times
----
-+/
struct S1C
{
immutable int v;
@@ -79,16 +87,6 @@ struct S1C
/***************************************************/
// with control flow
-/+
-TEST_OUTPUT:
----
-fail_compilation/fail9665a.d(98): Error: immutable field 'v' initialization is not allowed in loops or after labels
-fail_compilation/fail9665a.d(103): Error: immutable field 'v' initialization is not allowed in loops or after labels
-fail_compilation/fail9665a.d(108): Error: immutable field 'v' initialized multiple times
-fail_compilation/fail9665a.d(113): Error: immutable field 'v' initialized multiple times
-fail_compilation/fail9665a.d(118): Error: immutable field 'v' initialized multiple times
----
-+/
struct S2
{
immutable int v;
@@ -122,13 +120,6 @@ struct S2
/***************************************************/
// with immutable constructor
-/+
-TEST_OUTPUT:
----
-fail_compilation/fail9665a.d(139): Error: immutable field 'v' initialized multiple times
-fail_compilation/fail9665a.d(143): Error: immutable field 'w' initialized multiple times
----
-+/
struct S3
{
int v;
@@ -147,12 +138,6 @@ struct S3
/***************************************************/
// in __traits(compiles)
-/+
-TEST_OUTPUT:
----
-fail_compilation/fail9665a.d(163): Error: static assert `__traits(compiles, this.v = 1)` is false
----
-+/
struct S4
{
immutable int v;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9665b.d b/gcc/testsuite/gdc.test/fail_compilation/fail9665b.d
index 8f7d79c..8980546 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9665b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9665b.d
@@ -11,12 +11,12 @@ struct X
/+
TEST_OUTPUT:
---
-fail_compilation/fail9665b.d(32): Error: one path skips field x2
-fail_compilation/fail9665b.d(33): Error: one path skips field x3
-fail_compilation/fail9665b.d(35): Error: one path skips field x5
-fail_compilation/fail9665b.d(36): Error: one path skips field x6
-fail_compilation/fail9665b.d(30): Error: field x1 must be initialized in constructor
-fail_compilation/fail9665b.d(30): Error: field x4 must be initialized in constructor
+fail_compilation/fail9665b.d(32): Error: one path skips field `x2`
+fail_compilation/fail9665b.d(33): Error: one path skips field `x3`
+fail_compilation/fail9665b.d(35): Error: one path skips field `x5`
+fail_compilation/fail9665b.d(36): Error: one path skips field `x6`
+fail_compilation/fail9665b.d(30): Error: field `x1` must be initialized in constructor
+fail_compilation/fail9665b.d(30): Error: field `x4` must be initialized in constructor
---
+/
struct S1
@@ -43,13 +43,13 @@ struct S1
/+
TEST_OUTPUT:
---
-fail_compilation/fail9665b.d(65): Error: one path skips field x2
-fail_compilation/fail9665b.d(66): Error: one path skips field x3
-fail_compilation/fail9665b.d(68): Error: one path skips field x5
-fail_compilation/fail9665b.d(69): Error: one path skips field x6
-fail_compilation/fail9665b.d(63): Error: field x1 must be initialized in constructor, because it is nested struct
-fail_compilation/fail9665b.d(63): Error: field x4 must be initialized in constructor, because it is nested struct
-fail_compilation/fail9665b.d(76): Error: template instance fail9665b.S2!(X) error instantiating
+fail_compilation/fail9665b.d(65): Error: one path skips field `x2`
+fail_compilation/fail9665b.d(66): Error: one path skips field `x3`
+fail_compilation/fail9665b.d(68): Error: one path skips field `x5`
+fail_compilation/fail9665b.d(69): Error: one path skips field `x6`
+fail_compilation/fail9665b.d(63): Error: field `x1` must be initialized in constructor, because it is nested struct
+fail_compilation/fail9665b.d(63): Error: field `x4` must be initialized in constructor, because it is nested struct
+fail_compilation/fail9665b.d(76): Error: template instance `fail9665b.S2!(X)` error instantiating
---
+/
struct S2(X)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail97.d b/gcc/testsuite/gdc.test/fail_compilation/fail97.d
index 33d0c5f..cec9819 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail97.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail97.d
@@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail97.d(11): Error: pragma lib pragma is missing closing `;`
+fail_compilation/fail97.d(11): Error: pragma `lib` is missing a terminating `;`
---
*/
-// 151
+// https://issues.dlang.org/show_bug.cgi?id=151
-import std.stdio;
+import core.stdc.stdio;
pragma(lib,"ws2_32.lib")//;
class bla{}
void main(){}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9710.d b/gcc/testsuite/gdc.test/fail_compilation/fail9710.d
index 98306b2..dc772cd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9710.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9710.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9710.d(9): Error: static variable e cannot be read at compile time
+fail_compilation/fail9710.d(9): Error: static variable `e` cannot be read at compile time
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9766.d b/gcc/testsuite/gdc.test/fail_compilation/fail9766.d
index 58cabe3..03a94cb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9766.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9766.d
@@ -2,11 +2,11 @@
TEST_OUTPUT:
---
fail_compilation/fail9766.d(14): Error: integer constant expression expected instead of `Foo!int`
-fail_compilation/fail9766.d(14): Error: alignment must be an integer positive power of 2, not Foo!int
-fail_compilation/fail9766.d(17): Error: alignment must be an integer positive power of 2, not -1
-fail_compilation/fail9766.d(20): Error: alignment must be an integer positive power of 2, not 0
-fail_compilation/fail9766.d(23): Error: alignment must be an integer positive power of 2, not 3
-fail_compilation/fail9766.d(26): Error: alignment must be an integer positive power of 2, not 2147483649u
+fail_compilation/fail9766.d(14): Error: alignment must be an integer positive power of 2, not 0x0
+fail_compilation/fail9766.d(17): Error: alignment must be an integer positive power of 2, not 0xffffffffffffffff
+fail_compilation/fail9766.d(20): Error: alignment must be an integer positive power of 2, not 0x0
+fail_compilation/fail9766.d(23): Error: alignment must be an integer positive power of 2, not 0x3
+fail_compilation/fail9766.d(26): Error: alignment must be an integer positive power of 2, not 0x80000001
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9773.d b/gcc/testsuite/gdc.test/fail_compilation/fail9773.d
index 18da406..b49ffe1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9773.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9773.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9773.d(7): Error: "" is not an lvalue
+fail_compilation/fail9773.d(7): Error: `""` is not an lvalue and cannot be modified
---
*/
void f(ref string a = "")
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9790.d b/gcc/testsuite/gdc.test/fail_compilation/fail9790.d
index 0becddd..cae33c2 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9790.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9790.d
@@ -2,9 +2,9 @@
TEST_OUTPUT:
---
fail_compilation/fail9790.d(13): Error: undefined identifier `_Unused_`
-fail_compilation/fail9790.d(20): Error: template instance fail9790.foo!() error instantiating
+fail_compilation/fail9790.d(20): Error: template instance `fail9790.foo!()` error instantiating
fail_compilation/fail9790.d(18): Error: undefined identifier `_Unused_`
-fail_compilation/fail9790.d(21): Error: template instance fail9790.bar!() error instantiating
+fail_compilation/fail9790.d(21): Error: template instance `fail9790.bar!()` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail98.d b/gcc/testsuite/gdc.test/fail_compilation/fail98.d
index ded3624..7541d37 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail98.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail98.d
@@ -5,7 +5,7 @@ fail_compilation/fail98.d(17): Error: cannot implicitly convert expression `256`
---
*/
-// 139
+// https://issues.dlang.org/show_bug.cgi?id=139
E foo(int index)
{
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9891.d b/gcc/testsuite/gdc.test/fail_compilation/fail9891.d
index 99d5f11..791e734 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9891.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9891.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9891.d(13): Error: cast(int)i is not an lvalue
-fail_compilation/fail9891.d(18): Error: cast(int)i is not an lvalue
-fail_compilation/fail9891.d(23): Error: prop() is not an lvalue
+fail_compilation/fail9891.d(13): Error: expression `i` of type `immutable(int)` is not implicitly convertible to type `ref int` of parameter `n`
+fail_compilation/fail9891.d(18): Error: expression `i` of type `immutable(int)` is not implicitly convertible to type `out int` of parameter `n`
+fail_compilation/fail9891.d(23): Error: `prop()` is not an lvalue and cannot be modified
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9892.d b/gcc/testsuite/gdc.test/fail_compilation/fail9892.d
index 32eef12..c3fbf7a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9892.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9892.d
@@ -1,8 +1,8 @@
-// 9892
+// https://issues.dlang.org/show_bug.cgi?id=9892
/*
TEST_OUTPUT:
---
-fail_compilation/fail9892.d(11): Error: enum member fail9892.a circular reference to enum member
+fail_compilation/fail9892.d(11): Error: enum member `fail9892.a` circular reference to `enum` member
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9936.d b/gcc/testsuite/gdc.test/fail_compilation/fail9936.d
index 36178f4..0d7d44a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail9936.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail9936.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail9936.d(25): Error: S().opBinary isn't a template
-fail_compilation/fail9936.d(26): Error: S().opBinaryRight isn't a template
-fail_compilation/fail9936.d(27): Error: S().opOpAssign isn't a template
-fail_compilation/fail9936.d(29): Error: S().opIndexUnary isn't a template
-fail_compilation/fail9936.d(30): Error: S().opUnary isn't a template
+fail_compilation/fail9936.d(25): Error: `S().opBinary` isn't a template
+fail_compilation/fail9936.d(26): Error: `S().opBinaryRight` isn't a template
+fail_compilation/fail9936.d(27): Error: `S().opOpAssign` isn't a template
+fail_compilation/fail9936.d(29): Error: `S().opIndexUnary` isn't a template
+fail_compilation/fail9936.d(30): Error: `S().opUnary` isn't a template
---
*/
struct S
diff --git a/gcc/testsuite/gdc.test/fail_compilation/failCopyCtor.d b/gcc/testsuite/gdc.test/fail_compilation/failCopyCtor.d
new file mode 100644
index 0000000..f341675
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/failCopyCtor.d
@@ -0,0 +1,15 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/failCopyCtor.d(10): Error: `struct A` may not define both a rvalue constructor and a copy constructor
+fail_compilation/failCopyCtor.d(12): rvalue constructor defined here
+fail_compilation/failCopyCtor.d(13): copy constructor defined here
+---
+*/
+
+struct A
+{
+ this(immutable A a) {}
+ this(ref shared A a) immutable {}
+ this(ref A a) {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/failCopyCtor2.d b/gcc/testsuite/gdc.test/fail_compilation/failCopyCtor2.d
new file mode 100644
index 0000000..5e8f8c4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/failCopyCtor2.d
@@ -0,0 +1,19 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/failCopyCtor2.d(15): Error: `struct B` may not define a rvalue constructor and have fields with copy constructors
+fail_compilation/failCopyCtor2.d(18): rvalue constructor defined here
+fail_compilation/failCopyCtor2.d(17): field with copy constructor defined here
+---
+*/
+
+struct A
+{
+ this (ref shared A a) immutable {}
+}
+
+struct B
+{
+ A a;
+ this(immutable B b) shared {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_arrayexp.d b/gcc/testsuite/gdc.test/fail_compilation/fail_arrayexp.d
new file mode 100644
index 0000000..1a766ff
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_arrayexp.d
@@ -0,0 +1,30 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail_arrayexp.d(24): Error: cannot use `[]` operator on expression of type `int`
+fail_compilation/fail_arrayexp.d(25): Error: cannot use `[]` operator on expression of type `void`
+fail_compilation/fail_arrayexp.d(26): Error: static array of `const(int)[]` with multiple lengths not allowed
+fail_compilation/fail_arrayexp.d(27): Error: only one index allowed to index `string`
+fail_compilation/fail_arrayexp.d(28): Error: no `[]` operator overload for type `U`
+fail_compilation/fail_arrayexp.d(29): Error: only one index allowed to index `(int, string)`
+---
+*/
+
+int i;
+string str;
+union U {}
+alias typeAlias = const(int)[];
+void getVoid();
+alias getTuple(T...) = T;
+
+void test19534() // https://issues.dlang.org/show_bug.cgi?id=19534
+{
+ U agg;
+#line 24
+ auto p = i[0];
+ auto q = getVoid()[0];
+ alias r = getTuple!(typeAlias[0, 1]);
+ auto s = str[0, 1, 2];
+ auto t = agg[];
+ auto u = getTuple!(int, string)[1, 2];
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop1.d b/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop1.d
index 3498df7..7527639 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop1.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop1.d
@@ -4,10 +4,12 @@
TEST_OUTPUT:
---
fail_compilation/fail_arrayop1.d(11): Error: invalid array operation `a + a` (possible missing [])
+fail_compilation/fail_arrayop1.d(11): did you mean to concatenate (`a ~ a`) instead ?
---
*/
-void test2199(int[] a) // Issue 2199 - Segfault using array operation in function call (from fail266.d)
+void test2199(int[] a) // https://issues.dlang.org/show_bug.cgi?id=2199 - Segfault using array operation in function call (from fail266.d)
{
+#line 11
test2199(a + a);
}
@@ -17,7 +19,7 @@ TEST_OUTPUT:
fail_compilation/fail_arrayop1.d(29): Error: invalid array operation `-a` (possible missing [])
---
*/
-void fail323() // from fail323.d, maybe was a part of issue 3471 fix?
+void fail323() // from fail323.d, maybe was a part of https://issues.dlang.org/show_bug.cgi?id=3471 fix?
{
void foo(double[]) {}
@@ -25,7 +27,7 @@ void fail323() // from fail323.d, maybe was a part of issue 3471 fix?
b = a.dup,
c = a.dup,
d = a.dup;
-
+#line 29
foo(-a);
// a[] = -(b[] * (c[] + 4)) + 5 * d[]; // / 3;
}
@@ -36,6 +38,7 @@ TEST_OUTPUT:
fail_compilation/fail_arrayop1.d(54): Error: invalid array operation `-a` (possible missing [])
fail_compilation/fail_arrayop1.d(55): Error: invalid array operation `~a` (possible missing [])
fail_compilation/fail_arrayop1.d(56): Error: invalid array operation `a + a` (possible missing [])
+fail_compilation/fail_arrayop1.d(56): did you mean to concatenate (`a ~ a`) instead ?
fail_compilation/fail_arrayop1.d(57): Error: invalid array operation `a - a` (possible missing [])
fail_compilation/fail_arrayop1.d(58): Error: invalid array operation `a * a` (possible missing [])
fail_compilation/fail_arrayop1.d(59): Error: invalid array operation `a / a` (possible missing [])
@@ -50,7 +53,7 @@ void test3903()
{
int[] a = [1, 2];
int[] r;
-
+#line 54
r = -a;
r = ~a;
r = a + a;
@@ -68,6 +71,7 @@ void test3903()
TEST_OUTPUT:
---
fail_compilation/fail_arrayop1.d(85): Error: invalid array operation `a += a[]` (possible missing [])
+fail_compilation/fail_arrayop1.d(85): did you mean to concatenate (`a ~= a[]`) instead ?
fail_compilation/fail_arrayop1.d(86): Error: invalid array operation `a -= a[]` (possible missing [])
fail_compilation/fail_arrayop1.d(87): Error: invalid array operation `a *= a[]` (possible missing [])
fail_compilation/fail_arrayop1.d(88): Error: invalid array operation `a /= a[]` (possible missing [])
@@ -81,7 +85,7 @@ fail_compilation/fail_arrayop1.d(93): Error: invalid array operation `a ^^= a[]`
void test9459()
{
int[] a = [1, 2, 3];
-
+#line 85
a += a[];
a -= a[];
a *= a[];
@@ -96,47 +100,25 @@ void test9459()
/*
TEST_OUTPUT:
---
-fail_compilation/fail_arrayop1.d(111): Error: invalid array operation `x1[] = x2[] * x3[]` because `X` doesn't support necessary arithmetic operations
-fail_compilation/fail_arrayop1.d(115): Error: invalid array operation `s2[] += s1[]` because `string` is not a scalar type
-fail_compilation/fail_arrayop1.d(119): Error: invalid array operation `pa1[] *= pa2[]` for element type `int*`
----
-*/
-void test11376()
-{
- struct X { }
-
- auto x1 = [X()];
- auto x2 = [X()];
- auto x3 = [X()];
- x1[] = x2[] * x3[];
-
- string[] s1;
- string[] s2;
- s2[] += s1[];
-
- int*[] pa1;
- int*[] pa2;
- pa1[] *= pa2[];
-}
-
-/*
-TEST_OUTPUT:
----
-fail_compilation/fail_arrayop1.d(131): Error: invalid array operation `a[] <<= 1` (possible missing [])
+fail_compilation/fail_arrayop1.d(105): Error: invalid array operation `a[] <<= 1` (possible missing [])
---
*/
void test11566()
{
int[] a;
+#line 105
a[] <<= 1;
}
/*
TEST_OUTPUT:
---
-fail_compilation/fail_arrayop1.d(147): Error: invalid array operation `a + b` (possible missing [])
-fail_compilation/fail_arrayop1.d(148): Error: invalid array operation `x + y` (possible missing [])
-fail_compilation/fail_arrayop1.d(149): Error: invalid array operation `"hel" + "lo."` (possible missing [])
+fail_compilation/fail_arrayop1.d(121): Error: invalid array operation `a + b` (possible missing [])
+fail_compilation/fail_arrayop1.d(121): did you mean to concatenate (`a ~ b`) instead ?
+fail_compilation/fail_arrayop1.d(122): Error: invalid array operation `x + y` (possible missing [])
+fail_compilation/fail_arrayop1.d(122): did you mean to concatenate (`x ~ y`) instead ?
+fail_compilation/fail_arrayop1.d(123): Error: invalid array operation `"hel" + "lo."` (possible missing [])
+fail_compilation/fail_arrayop1.d(123): did you mean to concatenate (`"hel" ~ "lo."`) instead ?
---
*/
void test14649()
@@ -144,6 +126,7 @@ void test14649()
char[] a, b, r;
string x, y;
+#line 121
r[] = a + b;
r[] = x + y;
r[] = "hel" + "lo.";
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop2.d b/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop2.d
index 8f654b0..ed228a9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop2.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop2.d
@@ -1,13 +1,14 @@
// REQUIRED_ARGS: -o-
+
/*
TEST_OUTPUT:
---
-fail_compilation/fail_arrayop2.d(12): Error: array operation `[1, 2, 3] - [1, 2, 3]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(15): Error: invalid array operation `"a" - "b"` (possible missing [])
+fail_compilation/fail_arrayop2.d(13): Error: array operation `[1, 2, 3] - [1, 2, 3]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(16): Error: invalid array operation `"a" - "b"` (possible missing [])
---
*/
-void test2603() // Issue 2603 - ICE(cgcs.c) on subtracting string literals
+void test2603() // https://issues.dlang.org/show_bug.cgi?id=2603 - ICE(cgcs.c) on subtracting string literals
{
auto c1 = [1,2,3] - [1,2,3];
@@ -18,17 +19,17 @@ void test2603() // Issue 2603 - ICE(cgcs.c) on subtracting string literals
/*
TEST_OUTPUT:
---
-fail_compilation/fail_arrayop2.d(37): Error: array operation `-a[]` without destination memory not allowed (possible missing [])
-fail_compilation/fail_arrayop2.d(38): Error: array operation `~a[]` without destination memory not allowed (possible missing [])
-fail_compilation/fail_arrayop2.d(40): Error: array operation `a[] + a[]` without destination memory not allowed (possible missing [])
-fail_compilation/fail_arrayop2.d(41): Error: array operation `a[] - a[]` without destination memory not allowed (possible missing [])
-fail_compilation/fail_arrayop2.d(42): Error: array operation `a[] * a[]` without destination memory not allowed (possible missing [])
-fail_compilation/fail_arrayop2.d(43): Error: array operation `a[] / a[]` without destination memory not allowed (possible missing [])
-fail_compilation/fail_arrayop2.d(44): Error: array operation `a[] % a[]` without destination memory not allowed (possible missing [])
-fail_compilation/fail_arrayop2.d(45): Error: array operation `a[] ^ a[]` without destination memory not allowed (possible missing [])
-fail_compilation/fail_arrayop2.d(46): Error: array operation `a[] & a[]` without destination memory not allowed (possible missing [])
-fail_compilation/fail_arrayop2.d(47): Error: array operation `a[] | a[]` without destination memory not allowed (possible missing [])
-fail_compilation/fail_arrayop2.d(48): Error: array operation `a[] ^^ a[]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(38): Error: array operation `-a[]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(39): Error: array operation `~a[]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(41): Error: array operation `a[] + a[]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(42): Error: array operation `a[] - a[]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(43): Error: array operation `a[] * a[]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(44): Error: array operation `a[] / a[]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(45): Error: array operation `a[] % a[]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(46): Error: array operation `a[] ^ a[]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(47): Error: array operation `a[] & a[]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(48): Error: array operation `a[] | a[]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(49): Error: array operation `a[] ^^ a[]` without destination memory not allowed (possible missing [])
---
*/
void test9459()
@@ -51,19 +52,19 @@ void test9459()
/*
TEST_OUTPUT:
---
-fail_compilation/fail_arrayop2.d(74): Error: array operation `a[] + a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(75): Error: array operation `a[] - a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(76): Error: array operation `a[] * a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(77): Error: array operation `a[] / a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(78): Error: array operation `a[] % a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(79): Error: array operation `a[] ^ a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(80): Error: array operation `a[] & a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(81): Error: array operation `a[] | a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(82): Error: array operation `a[] ^^ 10` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(83): Error: array operation `-a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(84): Error: array operation `~a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(89): Error: array operation `[1] + a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(75): Error: array operation `a[] + a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(76): Error: array operation `a[] - a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(77): Error: array operation `a[] * a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(78): Error: array operation `a[] / a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(79): Error: array operation `a[] % a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(80): Error: array operation `a[] ^ a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(81): Error: array operation `a[] & a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(82): Error: array operation `a[] | a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(83): Error: array operation `a[] ^^ 10` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(84): Error: array operation `-a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(85): Error: array operation `~a[]` without destination memory not allowed
fail_compilation/fail_arrayop2.d(90): Error: array operation `[1] + a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(91): Error: array operation `[1] + a[]` without destination memory not allowed
---
*/
void test12179()
@@ -83,7 +84,7 @@ void test12179()
foo(-a[]);
foo(~a[]);
- // from issue 11992
+ // from https://issues.dlang.org/show_bug.cgi?id=11992
int[] arr1;
int[][] arr2;
arr1 ~= [1] + a[]; // NG
@@ -93,7 +94,7 @@ void test12179()
/*
TEST_OUTPUT:
---
-fail_compilation/fail_arrayop2.d(104): Error: array operation `h * y[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(105): Error: array operation `h * y[]` without destination memory not allowed
---
*/
void test12381()
@@ -107,8 +108,8 @@ void test12381()
/*
TEST_OUTPUT:
---
-fail_compilation/fail_arrayop2.d(117): Error: array operation `-a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(119): Error: array operation `(-a[])[0..4]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(118): Error: array operation `-a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(120): Error: array operation `(-a[])[0..4]` without destination memory not allowed
---
*/
float[] test12769(float[] a)
@@ -122,11 +123,11 @@ float[] test12769(float[] a)
/*
TEST_OUTPUT:
---
-fail_compilation/fail_arrayop2.d(136): Error: array operation `a[] - a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(138): Error: array operation `a[] - a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(137): Error: array operation `a[] - a[]` without destination memory not allowed
fail_compilation/fail_arrayop2.d(139): Error: array operation `a[] - a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(142): Error: array operation `a[] - a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(144): Error: array operation `a[] - a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(140): Error: array operation `a[] - a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(143): Error: array operation `a[] - a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(145): Error: array operation `a[] - a[]` without destination memory not allowed
---
*/
void test13208()
@@ -147,10 +148,10 @@ void test13208()
/*
TEST_OUTPUT:
---
-fail_compilation/fail_arrayop2.d(159): Error: array operation `a[] * a[]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(160): Error: array operation `(a[] * a[])[0..1]` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(163): Error: array operation `a[] * a[]` without destination memory not allowed (possible missing [])
-fail_compilation/fail_arrayop2.d(164): Error: array operation `(a[] * a[])[0..1]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(160): Error: array operation `a[] * a[]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(161): Error: array operation `(a[] * a[])[0..1]` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(164): Error: array operation `a[] * a[]` without destination memory not allowed (possible missing [])
+fail_compilation/fail_arrayop2.d(165): Error: array operation `(a[] * a[])[0..1]` without destination memory not allowed (possible missing [])
---
*/
void test13497()
@@ -167,7 +168,7 @@ void test13497()
/*
TEST_OUTPUT:
---
-fail_compilation/fail_arrayop2.d(180): Error: array operation `data[segmentId][28..29] & cast(ubyte)(1 << 0)` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(181): Error: array operation `data[segmentId][28..29] & cast(ubyte)(1 << 0)` without destination memory not allowed
---
*/
void test13910()
@@ -184,8 +185,8 @@ void test13910()
/*
TEST_OUTPUT:
---
-fail_compilation/fail_arrayop2.d(194): Error: array operation `a[] + 1` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(194): Error: array operation `a[] * 2` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(195): Error: array operation `a[] + 1` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(195): Error: array operation `a[] * 2` without destination memory not allowed
---
*/
void test14895()
@@ -197,40 +198,41 @@ void test14895()
/*
TEST_OUTPUT:
---
-fail_compilation/fail_arrayop2.d(245): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(246): Error: array operation `[1] * 6` without destination memory not allowed
fail_compilation/fail_arrayop2.d(247): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(252): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(255): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(264): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(267): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(268): Error: array operation `"abc"[] + '\x01'` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(271): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(274): Error: ([1] * 6)[0..2] is not an lvalue
-fail_compilation/fail_arrayop2.d(277): Error: can only * a pointer, not a 'int[]'
-fail_compilation/fail_arrayop2.d(280): Error: [1] * 6 is not an lvalue
-fail_compilation/fail_arrayop2.d(283): Error: array operation `da[] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(286): Error: array operation `da[] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(289): Error: [1] * 6 is not an lvalue
-fail_compilation/fail_arrayop2.d(290): Error: invalid array operation `[1] * 6 -= 1` for element type `int`
-fail_compilation/fail_arrayop2.d(293): Error: [1] * 6 is not an lvalue
-fail_compilation/fail_arrayop2.d(294): Error: ([1] * 6)[] is not an lvalue
-fail_compilation/fail_arrayop2.d(297): Error: invalid array operation `[1] * 6 += 1` for element type `int`
-fail_compilation/fail_arrayop2.d(298): Error: invalid array operation `[1] * 6 *= 2` for element type `int`
-fail_compilation/fail_arrayop2.d(299): Error: invalid array operation `[1] * 6 ^^= 3` for element type `int`
-fail_compilation/fail_arrayop2.d(302): Error: [1] * 6 is not an lvalue
-fail_compilation/fail_arrayop2.d(303): Error: [1] * 6 is not an lvalue
-fail_compilation/fail_arrayop2.d(306): Error: '[1] * 6' is not of integral type, it is a int[]
-fail_compilation/fail_arrayop2.d(307): Error: '[1] * 6' is not of integral type, it is a int[]
-fail_compilation/fail_arrayop2.d(308): Error: '[1] * 6' is not of integral type, it is a int[]
-fail_compilation/fail_arrayop2.d(311): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(248): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(249): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(253): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(256): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(265): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(268): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(269): Error: array operation `"abc"[] + '\x01'` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(272): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(275): Error: `([1] * 6)[0..2]` is not an lvalue and cannot be modified
+fail_compilation/fail_arrayop2.d(278): Error: can only `*` a pointer, not a `int[]`
+fail_compilation/fail_arrayop2.d(281): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+fail_compilation/fail_arrayop2.d(281): Error: `[1] * 6` is not an lvalue and cannot be modified
+fail_compilation/fail_arrayop2.d(284): Error: array operation `da[] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(287): Error: array operation `da[] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(290): Error: `[1] * 6` is not an lvalue and cannot be modified
+fail_compilation/fail_arrayop2.d(291): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(294): Error: `[1] * 6` is not an lvalue and cannot be modified
+fail_compilation/fail_arrayop2.d(295): Error: `([1] * 6)[]` is not an lvalue and cannot be modified
+fail_compilation/fail_arrayop2.d(298): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(299): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(300): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(303): Error: `[1] * 6` is not an lvalue and cannot be modified
+fail_compilation/fail_arrayop2.d(304): Error: `[1] * 6` is not an lvalue and cannot be modified
+fail_compilation/fail_arrayop2.d(307): Error: `[1] * 6` is not of integral type, it is a `int[]`
+fail_compilation/fail_arrayop2.d(308): Error: `[1] * 6` is not of integral type, it is a `int[]`
+fail_compilation/fail_arrayop2.d(309): Error: `[1] * 6` is not of integral type, it is a `int[]`
fail_compilation/fail_arrayop2.d(312): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(315): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(313): Error: array operation `[1] * 6` without destination memory not allowed
fail_compilation/fail_arrayop2.d(316): Error: array operation `[1] * 6` without destination memory not allowed
fail_compilation/fail_arrayop2.d(317): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(320): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(320): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(320): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(318): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(321): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(321): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(321): Error: array operation `[1] * 6` without destination memory not allowed
---
*/
// Test all expressions, which can take arrays as their operands but cannot be a part of array operation.
@@ -247,7 +249,6 @@ void test15407exp()
[1] * 6]; } // AssocArrayLiteralExp
//TupleExp
-
// StructLiteralExp.elements <- preFunctionParameters in CallExp
{ auto r = S([1] * 6); }
@@ -320,18 +321,18 @@ void test15407exp()
{ auto r = [1] * 6 ? [1] * 6 : [1] * 6; }
}
-/*
-TEST_OUTPUT:
+/* TEST_OUTPUT:
---
-fail_compilation/fail_arrayop2.d(341): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(344): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(347): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(342): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(345): Error: array operation `[1] * 6` without destination memory not allowed
fail_compilation/fail_arrayop2.d(348): Error: array operation `[1] * 6` without destination memory not allowed
fail_compilation/fail_arrayop2.d(349): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(352): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(355): Error: array operation `[1] * 6` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(358): Error: array operation `"str"[] + cast(immutable(char))1` without destination memory not allowed
-fail_compilation/fail_arrayop2.d(366): Error: CTFE internal error: non-constant value "uvt"[]
+fail_compilation/fail_arrayop2.d(350): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(353): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(356): Error: array operation `[1] * 6` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(359): Error: array operation `"str"[] + cast(immutable(char))1` without destination memory not allowed
+fail_compilation/fail_arrayop2.d(367): Error: CTFE internal error: non-constant value `"uvt"`
+fail_compilation/fail_arrayop2.d(367): Error: `"uvt"[] - '\x01'` cannot be interpreted at compile time
---
*/
// Test all statements, which can take arrays as their operands.
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop3a.d b/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop3a.d
new file mode 100644
index 0000000..55898d1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop3a.d
@@ -0,0 +1,28 @@
+/*
+REQUIRED_ARGS: -o-
+TEST_OUTPUT:
+----
+$p:druntime/import/core/internal/array/operations.d$($n$): Error: static assert: "Binary `*` not supported for types `X` and `X`."
+$p:druntime/import/core/internal/array/operations.d$($n$): instantiated from here: `typeCheck!(true, X, X, X, "*", "=")`
+$p:druntime/import/object.d$($n$): instantiated from here: `arrayOp!(X[], X[], X[], "*", "=")`
+fail_compilation/fail_arrayop3a.d(19): instantiated from here: `_arrayOp!(X[], X[], X[], "*", "=")`
+----
+*/
+
+void test11376()
+{
+ struct X { }
+
+ auto x1 = [X()];
+ auto x2 = [X()];
+ auto x3 = [X()];
+ x1[] = x2[] * x3[];
+
+ string[] s1;
+ string[] s2;
+ s2[] += s1[];
+
+ int*[] pa1;
+ int*[] pa2;
+ pa1[] *= pa2[];
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop3b.d b/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop3b.d
new file mode 100644
index 0000000..87f2993
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop3b.d
@@ -0,0 +1,16 @@
+/*
+REQUIRED_ARGS: -o-
+TEST_OUTPUT:
+----
+$p:druntime/import/core/internal/array/operations.d$($n$): Error: static assert: "Binary op `+=` not supported for types `string` and `string`."
+$p:druntime/import/core/internal/array/operations.d$($n$): instantiated from here: `typeCheck!(true, string, string, "+=")`
+$p:druntime/import/object.d$($n$): instantiated from here: `arrayOp!(string[], string[], "+=")`
+fail_compilation/fail_arrayop3b.d(15): instantiated from here: `_arrayOp!(string[], string[], "+=")`
+---
+*/
+void test11376()
+{
+ string[] s1;
+ string[] s2;
+ s2[] += s1[];
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop3c.d b/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop3c.d
new file mode 100644
index 0000000..2e9d61a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_arrayop3c.d
@@ -0,0 +1,16 @@
+/*
+REQUIRED_ARGS: -o-
+TEST_OUTPUT:
+----
+$p:druntime/import/core/internal/array/operations.d$($n$): Error: static assert: "Binary op `*=` not supported for types `int*` and `int*`."
+$p:druntime/import/core/internal/array/operations.d$($n$): instantiated from here: `typeCheck!(true, int*, int*, "*=")`
+$p:druntime/import/object.d$($n$): instantiated from here: `arrayOp!(int*[], int*[], "*=")`
+fail_compilation/fail_arrayop3c.d(15): instantiated from here: `_arrayOp!(int*[], int*[], "*=")`
+----
+*/
+void test11376()
+{
+ int*[] pa1;
+ int*[] pa2;
+ pa1[] *= pa2[];
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_casting.d b/gcc/testsuite/gdc.test/fail_compilation/fail_casting.d
index 74337c3..88d579b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail_casting.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_casting.d
@@ -93,11 +93,11 @@ void test11485()
class C {}
interface I {}
- // 11485 TypeBasic --> Tclass
+ // https://issues.dlang.org/show_bug.cgi?id=11485 TypeBasic --> Tclass
{ int x; auto y = cast(C)x; }
{ int x; auto y = cast(I)x; }
- // 7472 TypeBasic <-- Tclass
+ // https://issues.dlang.org/show_bug.cgi?id=7472 TypeBasic <-- Tclass
{ C x; auto y = cast(int)x; }
{ I x; auto y = cast(int)x; }
}
@@ -133,7 +133,7 @@ void test13959()
/*
TEST_OUTPUT:
---
-fail_compilation/fail_casting.d(144): Error: cannot cast expression `mi.x` of type `int` to `MyUbyte14154`
+fail_compilation/fail_casting.d(144): Error: cannot cast expression `mi` of type `MyInt14154` to `MyUbyte14154` because of different sizes
---
*/
struct MyUbyte14154 { ubyte x; alias x this; }
@@ -147,10 +147,10 @@ void test14154()
/*
TEST_OUTPUT:
---
-fail_compilation/fail_casting.d(179): Error: cannot cast expression `__tup$n$.__expand_field_0` of type `int` to `object.Object`
-fail_compilation/fail_casting.d(179): Error: cannot cast expression `__tup$n$.__expand_field_1` of type `int` to `object.Object`
+fail_compilation/fail_casting.d(179): Error: cannot cast expression `point` of type `Tuple14093!(int, "x", int, "y")` to `object.Object`
---
*/
+
alias TypeTuple14093(T...) = T;
struct Tuple14093(T...)
{
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_casting2.d b/gcc/testsuite/gdc.test/fail_compilation/fail_casting2.d
index a45d6d3..16bc5bc 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail_casting2.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_casting2.d
@@ -3,9 +3,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail_casting2.d(15): Error: type int is not an expression
+fail_compilation/fail_casting2.d(15): Error: type `int` is not an expression
fail_compilation/fail_casting2.d(17): Error: template lambda has no type
-fail_compilation/fail_casting2.d(20): Error: template Templ() has no type
+fail_compilation/fail_casting2.d(20): Error: template `Templ()` has no type
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_circular.d b/gcc/testsuite/gdc.test/fail_compilation/fail_circular.d
index dd958af..186444e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail_circular.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_circular.d
@@ -1,16 +1,16 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail_circular.d(16): Error: circular reference to variable 'fail_circular.a1'
-fail_compilation/fail_circular.d(17): Error: circular reference to variable 'fail_circular.a2'
-fail_compilation/fail_circular.d(19): Error: circular reference to variable 'fail_circular.b1'
-fail_compilation/fail_circular.d(20): Error: circular reference to variable 'fail_circular.b2'
-fail_compilation/fail_circular.d(22): Error: circular reference to variable 'fail_circular.c1'
-fail_compilation/fail_circular.d(23): Error: circular reference to variable 'fail_circular.c2'
-fail_compilation/fail_circular.d(25): Error: circular initialization of variable 'fail_circular.d1'
-fail_compilation/fail_circular.d(26): Error: circular initialization of variable 'fail_circular.d2'
-fail_compilation/fail_circular.d(28): Error: circular initialization of variable 'fail_circular.e1'
-fail_compilation/fail_circular.d(29): Error: circular initialization of variable 'fail_circular.e2'
+fail_compilation/fail_circular.d(16): Error: circular reference to variable `fail_circular.a1`
+fail_compilation/fail_circular.d(17): Error: circular reference to variable `fail_circular.a2`
+fail_compilation/fail_circular.d(19): Error: circular reference to variable `fail_circular.b1`
+fail_compilation/fail_circular.d(20): Error: circular reference to variable `fail_circular.b2`
+fail_compilation/fail_circular.d(22): Error: circular reference to variable `fail_circular.c1`
+fail_compilation/fail_circular.d(23): Error: circular reference to variable `fail_circular.c2`
+fail_compilation/fail_circular.d(25): Error: circular initialization of variable `fail_circular.d1`
+fail_compilation/fail_circular.d(26): Error: circular initialization of variable `fail_circular.d2`
+fail_compilation/fail_circular.d(28): Error: circular initialization of variable `fail_circular.e1`
+fail_compilation/fail_circular.d(29): Error: circular initialization of variable `fail_circular.e2`
---
*/
auto a1 = a1; // semantic error (cannot determine expression type)
@@ -31,16 +31,16 @@ enum int e2 = .e2; // CTFE error
/*
TEST_OUTPUT:
---
-fail_compilation/fail_circular.d(47): Error: circular reference to variable 'fail_circular.a1a'
-fail_compilation/fail_circular.d(49): Error: circular reference to variable 'fail_circular.a2a'
-fail_compilation/fail_circular.d(52): Error: circular reference to variable 'fail_circular.b1a'
-fail_compilation/fail_circular.d(54): Error: circular reference to variable 'fail_circular.b2a'
-fail_compilation/fail_circular.d(57): Error: circular reference to variable 'fail_circular.c1a'
-fail_compilation/fail_circular.d(59): Error: circular reference to variable 'fail_circular.c2a'
-fail_compilation/fail_circular.d(62): Error: circular initialization of variable 'fail_circular.d1a'
-fail_compilation/fail_circular.d(64): Error: circular initialization of variable 'fail_circular.d2a'
-fail_compilation/fail_circular.d(67): Error: circular initialization of variable 'fail_circular.e1a'
-fail_compilation/fail_circular.d(69): Error: circular initialization of variable 'fail_circular.e2a'
+fail_compilation/fail_circular.d(47): Error: circular reference to variable `fail_circular.a1a`
+fail_compilation/fail_circular.d(49): Error: circular reference to variable `fail_circular.a2a`
+fail_compilation/fail_circular.d(52): Error: circular reference to variable `fail_circular.b1a`
+fail_compilation/fail_circular.d(54): Error: circular reference to variable `fail_circular.b2a`
+fail_compilation/fail_circular.d(57): Error: circular reference to variable `fail_circular.c1a`
+fail_compilation/fail_circular.d(59): Error: circular reference to variable `fail_circular.c2a`
+fail_compilation/fail_circular.d(62): Error: circular initialization of variable `fail_circular.d1a`
+fail_compilation/fail_circular.d(64): Error: circular initialization of variable `fail_circular.d2a`
+fail_compilation/fail_circular.d(67): Error: circular initialization of variable `fail_circular.e1a`
+fail_compilation/fail_circular.d(69): Error: circular initialization of variable `fail_circular.e2a`
---
*/
auto a1a = a1b;
@@ -71,12 +71,12 @@ enum int e2b = .e2a; // CTFE error
/*
TEST_OUTPUT:
---
-fail_compilation/fail_circular.d(84): Error: circular reference to variable 'fail_circular.S1.a1'
-fail_compilation/fail_circular.d(88): Error: circular reference to variable 'fail_circular.S2.b1'
-fail_compilation/fail_circular.d(92): Error: circular reference to variable 'fail_circular.S3.c1'
-fail_compilation/fail_circular.d(97): Error: circular reference to variable 'fail_circular.S4.a1a'
-fail_compilation/fail_circular.d(102): Error: circular reference to variable 'fail_circular.S5.b1a'
-fail_compilation/fail_circular.d(107): Error: circular reference to variable 'fail_circular.S6.c1a'
+fail_compilation/fail_circular.d(84): Error: circular reference to variable `fail_circular.S1.a1`
+fail_compilation/fail_circular.d(88): Error: circular reference to variable `fail_circular.S2.b1`
+fail_compilation/fail_circular.d(92): Error: circular reference to variable `fail_circular.S3.c1`
+fail_compilation/fail_circular.d(97): Error: circular reference to variable `fail_circular.S4.a1a`
+fail_compilation/fail_circular.d(102): Error: circular reference to variable `fail_circular.S5.b1a`
+fail_compilation/fail_circular.d(107): Error: circular reference to variable `fail_circular.S6.c1a`
---
*/
struct S1
@@ -110,12 +110,12 @@ struct S6
/*
TEST_OUTPUT:
---
-fail_compilation/fail_circular.d(123): Error: circular reference to variable 'fail_circular.C.a1'
-fail_compilation/fail_circular.d(125): Error: circular reference to variable 'fail_circular.C.b1'
-fail_compilation/fail_circular.d(127): Error: circular reference to variable 'fail_circular.C.c1'
-fail_compilation/fail_circular.d(130): Error: circular reference to variable 'fail_circular.C.a1a'
-fail_compilation/fail_circular.d(133): Error: circular reference to variable 'fail_circular.C.b1a'
-fail_compilation/fail_circular.d(136): Error: circular reference to variable 'fail_circular.C.c1a'
+fail_compilation/fail_circular.d(123): Error: circular reference to variable `fail_circular.C.a1`
+fail_compilation/fail_circular.d(125): Error: circular reference to variable `fail_circular.C.b1`
+fail_compilation/fail_circular.d(127): Error: circular reference to variable `fail_circular.C.c1`
+fail_compilation/fail_circular.d(130): Error: circular reference to variable `fail_circular.C.a1a`
+fail_compilation/fail_circular.d(133): Error: circular reference to variable `fail_circular.C.b1a`
+fail_compilation/fail_circular.d(136): Error: circular reference to variable `fail_circular.C.c1a`
---
*/
class C
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_circular2.d b/gcc/testsuite/gdc.test/fail_compilation/fail_circular2.d
index f04d272..6db68c6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail_circular2.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_circular2.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail_circular2.d(10): Error: circular initialization of variable 'fail_circular2.S.d1'
-fail_compilation/fail_circular2.d(12): Error: circular initialization of variable 'fail_circular2.S.e1'
+fail_compilation/fail_circular2.d(10): Error: circular initialization of variable `fail_circular2.S.d1`
+fail_compilation/fail_circular2.d(12): Error: circular initialization of variable `fail_circular2.S.e1`
---
*/
struct S
@@ -15,8 +15,8 @@ struct S
/*
TEST_OUTPUT:
---
-fail_compilation/fail_circular2.d(24): Error: circular initialization of variable 'fail_circular2.C.d1'
-fail_compilation/fail_circular2.d(26): Error: circular initialization of variable 'fail_circular2.C.e1'
+fail_compilation/fail_circular2.d(24): Error: circular initialization of variable `fail_circular2.C.d1`
+fail_compilation/fail_circular2.d(26): Error: circular initialization of variable `fail_circular2.C.e1`
---
*/
class C
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_compilation.exp b/gcc/testsuite/gdc.test/fail_compilation/fail_compilation.exp
index cd65d7b..4825146 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail_compilation.exp
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_compilation.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 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/gdc.test/fail_compilation/fail_contracts3.d b/gcc/testsuite/gdc.test/fail_compilation/fail_contracts3.d
index de3e9bb..b0b366b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail_contracts3.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_contracts3.d
@@ -6,9 +6,9 @@ fail_compilation/fail_contracts3.d(13): Error: function `fail_contracts3.D.foo`
*/
class C {
- void foo(){}
+ void foo(){}
}
class D : C {
- override void foo()in{}do{}
+ override void foo()in{}do{}
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_opover.d b/gcc/testsuite/gdc.test/fail_compilation/fail_opover.d
index ba930f0..2a62f53 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail_opover.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_opover.d
@@ -3,8 +3,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail_opover.d(13): Error: no [] operator overload for type object.Object
-fail_compilation/fail_opover.d(17): Error: no [] operator overload for type TestS
+fail_compilation/fail_opover.d(13): Error: no `[]` operator overload for type `object.Object`
+fail_compilation/fail_opover.d(17): Error: no `[]` operator overload for type `TestS`
---
*/
void test1()
@@ -20,18 +20,18 @@ void test1()
/*
TEST_OUTPUT:
---
-fail_compilation/fail_opover.d(46): Error: no [] operator overload for type S
-fail_compilation/fail_opover.d(47): Error: no [] operator overload for type S
-fail_compilation/fail_opover.d(48): Error: no [] operator overload for type S
-fail_compilation/fail_opover.d(49): Error: no [] operator overload for type S
-fail_compilation/fail_opover.d(50): Error: no [] operator overload for type S
-fail_compilation/fail_opover.d(51): Error: no [] operator overload for type S
-fail_compilation/fail_opover.d(52): Error: no [] operator overload for type S
-fail_compilation/fail_opover.d(53): Error: no [] operator overload for type S
-fail_compilation/fail_opover.d(54): Error: no [] operator overload for type S
-fail_compilation/fail_opover.d(55): Error: no [] operator overload for type S
-fail_compilation/fail_opover.d(56): Error: no [] operator overload for type S
-fail_compilation/fail_opover.d(57): Error: no [] operator overload for type S
+fail_compilation/fail_opover.d(46): Error: no `[]` operator overload for type `S`
+fail_compilation/fail_opover.d(47): Error: no `[]` operator overload for type `S`
+fail_compilation/fail_opover.d(48): Error: no `[]` operator overload for type `S`
+fail_compilation/fail_opover.d(49): Error: no `[]` operator overload for type `S`
+fail_compilation/fail_opover.d(50): Error: no `[]` operator overload for type `S`
+fail_compilation/fail_opover.d(51): Error: no `[]` operator overload for type `S`
+fail_compilation/fail_opover.d(52): Error: no `[]` operator overload for type `S`
+fail_compilation/fail_opover.d(53): Error: no `[]` operator overload for type `S`
+fail_compilation/fail_opover.d(54): Error: no `[]` operator overload for type `S`
+fail_compilation/fail_opover.d(55): Error: no `[]` operator overload for type `S`
+fail_compilation/fail_opover.d(56): Error: no `[]` operator overload for type `S`
+fail_compilation/fail_opover.d(57): Error: no `[]` operator overload for type `S`
---
*/
void test2()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_pretty_errors.d b/gcc/testsuite/gdc.test/fail_compilation/fail_pretty_errors.d
new file mode 100644
index 0000000..d25e8f7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_pretty_errors.d
@@ -0,0 +1,36 @@
+/*
+REQUIRED_ARGS: -verrors=context
+TEST_OUTPUT:
+---
+fail_compilation/fail_pretty_errors.d(20): Error: undefined identifier `a`
+ a = 1;
+ ^
+fail_compilation/fail_pretty_errors.d-mixin-25(25): Error: undefined identifier `b`
+fail_compilation/fail_pretty_errors.d(30): Error: cannot implicitly convert expression `5` of type `int` to `string`
+ string x = 5;
+ ^
+fail_compilation/fail_pretty_errors.d(35): Error: mixin `fail_pretty_errors.testMixin2.mixinTemplate!()` error instantiating
+ mixin mixinTemplate;
+ ^
+---
+*/
+
+void foo()
+{
+ a = 1;
+}
+
+void testMixin1()
+{
+ mixin("b = 1;");
+}
+
+mixin template mixinTemplate()
+{
+ string x = 5;
+}
+
+void testMixin2()
+{
+ mixin mixinTemplate;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_scope.d b/gcc/testsuite/gdc.test/fail_compilation/fail_scope.d
index c634253..41a8c2d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail_scope.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail_scope.d
@@ -1,16 +1,19 @@
/*
-PERMUTE_ARGS:
-REQUIRED_ARGS: -dip25
+REQUIRED_ARGS:
TEST_OUTPUT:
---
-fail_compilation/fail_scope.d(45): Error: returning `cast(char[])string` escapes a reference to local variable `string`
-fail_compilation/fail_scope.d(63): Error: returning `s.bar()` escapes a reference to local variable `s`
-fail_compilation/fail_scope.d(82): Error: returning `& string` escapes a reference to local variable `string`
-fail_compilation/fail_scope.d(92): Error: returning `cast(int[])a` escapes a reference to local variable `a`
-fail_compilation/fail_scope.d(100): Error: returning `cast(int[])a` escapes a reference to local variable `a`
-fail_compilation/fail_scope.d(108): Error: escaping reference to outer local variable `x`
-fail_compilation/fail_scope.d(127): Error: returning `s.bar()` escapes a reference to local variable `s`
-fail_compilation/fail_scope.d(137): Error: returning `foo16226(i)` escapes a reference to local variable `i`
+fail_compilation/fail_scope.d(44): Error: returning `cast(char[])string` escapes a reference to local variable `string`
+fail_compilation/fail_scope.d(62): Error: returning `s.bar()` escapes a reference to local variable `s`
+fail_compilation/fail_scope.d(73): Error: `fail_scope.foo8` called with argument types `(int)` matches both:
+fail_compilation/fail_scope.d(67): `fail_scope.foo8(ref int x)`
+and:
+fail_compilation/fail_scope.d(68): `fail_scope.foo8(return ref int x)`
+fail_compilation/fail_scope.d(81): Error: returning `& string` escapes a reference to local variable `string`
+fail_compilation/fail_scope.d(91): Error: returning `cast(int[])a` escapes a reference to local variable `a`
+fail_compilation/fail_scope.d(99): Error: returning `cast(int[])a` escapes a reference to local variable `a`
+fail_compilation/fail_scope.d(107): Deprecation: escaping reference to outer local variable `x`
+fail_compilation/fail_scope.d(126): Error: returning `s.bar()` escapes a reference to local variable `s`
+fail_compilation/fail_scope.d(136): Error: returning `foo16226(i)` escapes a reference to local variable `i`
---
//fail_compilation/fail_scope.d(30): Error: scope variable `da` may not be returned
//fail_compilation/fail_scope.d(32): Error: scope variable `o` may not be returned
@@ -21,10 +24,6 @@ fail_compilation/fail_scope.d(137): Error: returning `foo16226(i)` escapes a ref
//fail_compilation/fail_scope.d(40): Error: scope variable `p` may not be returned
*/
-
-
-
-
alias int delegate() dg_t;
int[] checkEscapeScope1(scope int[] da) { return da; }
@@ -86,7 +85,7 @@ char* fail141()
int[] test1313b()
out{}
-body
+do
{
int[2] a;
return a;
@@ -94,7 +93,7 @@ body
int[] test1313a()
//out{}
-body
+do
{
int[2] a;
return a;
@@ -142,4 +141,3 @@ ref foo16226(ref int bar) @safe
{
return bar;
}
-
diff --git a/gcc/testsuite/gdc.test/fail_compilation/failattr.d b/gcc/testsuite/gdc.test/fail_compilation/failattr.d
index e0b4562..c7f0f31 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/failattr.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/failattr.d
@@ -3,12 +3,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/failattr.d(16): Error: variable failattr.C2901.v1 cannot be synchronized
-fail_compilation/failattr.d(17): Error: variable failattr.C2901.v2 cannot be override
-fail_compilation/failattr.d(18): Error: variable failattr.C2901.v3 cannot be abstract
-fail_compilation/failattr.d(19): Error: variable failattr.C2901.v4 cannot be final, perhaps you meant const?
-fail_compilation/failattr.d(31): Error: variable failattr.C2901.v13 cannot be final abstract synchronized override
-fail_compilation/failattr.d(33): Error: variable failattr.C2901.v14 cannot be final, perhaps you meant const?
+fail_compilation/failattr.d(16): Error: variable `failattr.C2901.v1` cannot be `synchronized`
+fail_compilation/failattr.d(17): Error: variable `failattr.C2901.v2` cannot be `override`
+fail_compilation/failattr.d(18): Error: variable `failattr.C2901.v3` cannot be `abstract`
+fail_compilation/failattr.d(19): Error: variable `failattr.C2901.v4` cannot be `final`, perhaps you meant `const`?
+fail_compilation/failattr.d(31): Error: variable `failattr.C2901.v13` cannot be `final abstract synchronized override`
+fail_compilation/failattr.d(33): Error: variable `failattr.C2901.v14` cannot be `final`, perhaps you meant `const`?
---
*/
class C2901
diff --git a/gcc/testsuite/gdc.test/fail_compilation/faildeleteaa.d b/gcc/testsuite/gdc.test/fail_compilation/faildeleteaa.d
index f190141..95663ea 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/faildeleteaa.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/faildeleteaa.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/faildeleteaa.d(11): Error: cannot delete type int
+fail_compilation/faildeleteaa.d(12): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+fail_compilation/faildeleteaa.d(12): Error: cannot delete type `int`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/faildottypeinfo.d b/gcc/testsuite/gdc.test/fail_compilation/faildottypeinfo.d
index af238f7..d7853e6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/faildottypeinfo.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/faildottypeinfo.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/faildottypeinfo.d(11): Error: no property 'typeinfo' for type 'int'
-fail_compilation/faildottypeinfo.d(12): Error: no property 'typeinfo' for type 'object.Object'
+fail_compilation/faildottypeinfo.d(11): Error: no property `typeinfo` for type `int`
+fail_compilation/faildottypeinfo.d(12): Error: no property `typeinfo` for type `object.Object`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/failmemalloc.d b/gcc/testsuite/gdc.test/fail_compilation/failmemalloc.d
deleted file mode 100644
index 713c180..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/failmemalloc.d
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-TEST_OUTPUT:
----
-fail_compilation/failmemalloc.d(13): Error: member allocators not supported by CTFE
----
-*/
-
-struct S
-{
- new(size_t sz) { return null; }
-}
-
-S* s = new S();
diff --git a/gcc/testsuite/gdc.test/fail_compilation/failob1.d b/gcc/testsuite/gdc.test/fail_compilation/failob1.d
new file mode 100644
index 0000000..7fe73d3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/failob1.d
@@ -0,0 +1,34 @@
+/*
+REQUIRED_ARGS:-preview=dip1021
+TEST_OUTPUT:
+---
+fail_compilation/failob1.d(104): Error: variable `failob1.test1.a1` is left dangling at return
+fail_compilation/failob1.d(105): Error: variable `failob1.test2.a2` is left dangling at return
+fail_compilation/failob1.d(107): Error: variable `failob1.test4.s4` is left dangling at return
+fail_compilation/failob1.d(108): Error: variable `failob1.test5.dg5` is left dangling at return
+fail_compilation/failob1.d(115): Error: variable `failob1.test12.p12` is left dangling at return
+---
+*/
+
+struct S { int i; int* f; }
+struct T { int i; const(int)* f; }
+class C { int i; int* f; }
+
+#line 100
+
+@live
+{
+ // Test what is and is not a trackable variable
+ void test1(int[] a1) { } // error
+ void test2(int*[3] a2) { } // error
+ void test3(const int*[3] a) { } // ok
+ void test4(S s4) { } // error
+ void test5(int delegate() dg5) { } // error
+ void test6(const(int*)[3] a) { } // ok
+ void test7(const(int)*[3] a) { } // ok
+ void test8(const(int)* p) { } // ok
+ void test9(T t) { } // ok
+ void test10(C c) { } // ok
+ void test11(int i) { } // ok
+ void test12(int* p12) { } // error
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/failob2.d b/gcc/testsuite/gdc.test/fail_compilation/failob2.d
new file mode 100644
index 0000000..bd52648
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/failob2.d
@@ -0,0 +1,67 @@
+// REQUIRED_ARGS: -preview=dip1021
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/failob2.d(105): Error: variable `failob2.foo1!int.foo1.p` has undefined state and cannot be read
+fail_compilation/failob2.d(105): Error: variable `failob2.foo1!int.foo1.p` is returned but is Undefined
+fail_compilation/failob2.d(124): Error: template instance `failob2.foo1!int` error instantiating
+fail_compilation/failob2.d(111): Error: variable `failob2.foo2!int.foo2.p` has undefined state and cannot be read
+fail_compilation/failob2.d(111): Error: variable `failob2.foo2!int.foo2.p` is returned but is Undefined
+fail_compilation/failob2.d(125): Error: template instance `failob2.foo2!int` error instantiating
+fail_compilation/failob2.d(119): Error: variable `failob2.foo3!int.foo3.p` has undefined state and cannot be read
+fail_compilation/failob2.d(119): Error: variable `failob2.foo3!int.foo3.p` is returned but is Undefined
+fail_compilation/failob2.d(126): Error: template instance `failob2.foo3!int` error instantiating
+---
+*/
+
+#line 100
+
+@live
+T* foo1(T)()
+{
+ T* p = void;
+ return p;
+}
+
+template foo2(T) {
+ @live T* foo2() {
+ T* p = void;
+ return p;
+ }
+}
+
+@live
+template foo3(T) {
+ T* foo3() {
+ T* p = void;
+ return p;
+ }
+}
+
+void test1() {
+ foo1!int();
+ foo2!int();
+ foo3!int();
+}
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/failob2.d(205): Error: variable `failob2.foo4!int.foo4.p` is left dangling at return
+fail_compilation/failob2.d(209): Error: template instance `failob2.foo4!int` error instantiating
+---
+*/
+
+#line 200
+
+void* alloc(size_t);
+
+@live void foo4(T)()
+{
+ auto p = alloc(4);
+}
+
+void test2() {
+ foo4!int();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/failoffset.d b/gcc/testsuite/gdc.test/fail_compilation/failoffset.d
index c991d47..bbec698 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/failoffset.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/failoffset.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/failoffset.d(12): Error: no property 'offset' for type 'int'
+fail_compilation/failoffset.d(12): Error: no property `offset` for type `int`
fail_compilation/failoffset.d(12): while evaluating: `static assert(b.offset == 4)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fix17349.d b/gcc/testsuite/gdc.test/fail_compilation/fix17349.d
new file mode 100644
index 0000000..493d30f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fix17349.d
@@ -0,0 +1,36 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/fix17349.d(35): Error: cannot implicitly override base class method `fix17349.E.foo` with `fix17349.F.foo`; add `override` attribute
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=17349
+
+struct S { }
+
+class C {
+ void bar();
+ void foo(void* p);
+ void abc(Object);
+ void def(S);
+}
+
+class D : C {
+ override void bar() const;
+ override void foo(const void*);
+ override void abc(const Object);
+ override void def(const S);
+}
+
+alias fp_t = void function(int*);
+@safe void abc(const int*);
+fp_t fp = &abc;
+
+
+class E {
+ void foo(void*);
+}
+
+class F : E {
+ void foo(const void*);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fix17635.d b/gcc/testsuite/gdc.test/fail_compilation/fix17635.d
new file mode 100644
index 0000000..27f55e0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fix17635.d
@@ -0,0 +1,23 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/fix17635.d(22): Error: cannot implicitly convert expression `f(& p)` of type `immutable(int)**` to `immutable(int**)`
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=17635
+// https://issues.dlang.org/show_bug.cgi?id=15660
+
+alias T = immutable int;
+
+T** f(const T** input) pure
+{
+ T** output;
+ return output;
+}
+
+void main()
+{
+ T i;
+ T* p = &i;
+ immutable T** r = f(&p);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fix17751.d b/gcc/testsuite/gdc.test/fail_compilation/fix17751.d
new file mode 100644
index 0000000..11b9c54
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fix17751.d
@@ -0,0 +1,22 @@
+/* REQUIRED_ARGS: -m64
+ * TEST_OUTPUT:
+---
+fail_compilation/fix17751.d(15): Error: last parameter to `__simd()` must be a constant
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=17751
+
+import core.simd;
+
+pure @safe V1 simd(XMM opcode, V1, V2)(V1 op1, V2 op2, ubyte imm8)
+ if (is(V1 == __vector) && is(V2 == __vector))
+{
+ return cast(V1)__simd(opcode, op1, op2, imm8);
+}
+
+void main()
+{
+ float4 a, b;
+ a = simd!(XMM.CMPPD)(a, b, 0x7A);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fix18575.d b/gcc/testsuite/gdc.test/fail_compilation/fix18575.d
new file mode 100644
index 0000000..7b8f287
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fix18575.d
@@ -0,0 +1,41 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/fix18575.d(27): Error: returning `s.foo()` escapes a reference to local variable `s`
+fail_compilation/fix18575.d(31): Error: returning `s.foo()` escapes a reference to local variable `s`
+fail_compilation/fix18575.d(35): Error: returning `s.abc()` escapes a reference to local variable `s`
+fail_compilation/fix18575.d(39): Error: returning `s.ghi(t)` escapes a reference to local variable `t`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=18575
+
+@safe:
+
+struct S {
+@safe:
+ int x;
+
+ void bar() { }
+ auto foo() { return &this.bar; }
+ auto def() { return &bar; }
+ auto abc() { return &x; }
+ auto ghi(ref S s) { return &s.bar; }
+}
+
+auto f(S s) {
+ return s.foo();
+}
+
+auto g(S s) {
+ return s.foo();
+}
+
+auto h(S s) {
+ return s.abc();
+}
+
+auto j(S s, S t) {
+ return s.ghi(t);
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fix19018.d b/gcc/testsuite/gdc.test/fail_compilation/fix19018.d
new file mode 100644
index 0000000..b2a2a30
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fix19018.d
@@ -0,0 +1,21 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fix19018.d(16): Error: `0b` isn't a valid integer literal, use `0b0` instead
+fail_compilation/fix19018.d(17): Error: `0B` isn't a valid integer literal, use `0B0` instead
+fail_compilation/fix19018.d(18): Error: `0x` isn't a valid integer literal, use `0x0` instead
+fail_compilation/fix19018.d(19): Error: `0X` isn't a valid integer literal, use `0X0` instead
+fail_compilation/fix19018.d(20): Error: `0x_` isn't a valid integer literal, use `0x0` instead
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=19018
+
+void foo()
+{
+ auto a = 0b;
+ auto b = 0B;
+ auto c = 0x;
+ auto d = 0X;
+ auto e = 0x_;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fix19059.d b/gcc/testsuite/gdc.test/fail_compilation/fix19059.d
new file mode 100644
index 0000000..0be003a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fix19059.d
@@ -0,0 +1,19 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fix19059.d(16): Error: octal digit expected, not `8`
+fail_compilation/fix19059.d(16): Error: octal literals larger than 7 are no longer supported
+fail_compilation/fix19059.d(17): Error: octal digit expected, not `9`
+fail_compilation/fix19059.d(17): Error: octal literals larger than 7 are no longer supported
+fail_compilation/fix19059.d(18): Error: octal literals `010` are no longer supported, use `std.conv.octal!10` instead
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=19059
+
+void foo()
+{
+ auto a = 08;
+ auto b = 09;
+ auto c = 010;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fix19246.d b/gcc/testsuite/gdc.test/fail_compilation/fix19246.d
new file mode 100644
index 0000000..55b9650
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fix19246.d
@@ -0,0 +1,19 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fix19246.d(15): Error: `0b_` isn't a valid integer literal, use `0b0` instead
+fail_compilation/fix19246.d(16): Error: `0B_` isn't a valid integer literal, use `0B0` instead
+fail_compilation/fix19246.d(17): Error: `0b` isn't a valid integer literal, use `0b0` instead
+fail_compilation/fix19246.d(18): Error: `0B` isn't a valid integer literal, use `0B0` instead
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=19246
+
+void foo()
+{
+ auto a = 0b_;
+ auto b = 0B_;
+ auto c = 0b;
+ auto d = 0B;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fix5212.d b/gcc/testsuite/gdc.test/fail_compilation/fix5212.d
new file mode 100644
index 0000000..faf2e29
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fix5212.d
@@ -0,0 +1,17 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/fix5212.d(14): Error: scope variable `args_` assigned to non-scope `this.args`
+---
+*/
+
+
+// https://issues.dlang.org/show_bug.cgi?id=5212
+
+class Foo {
+ int[] args;
+ @safe this(int[] args_...) {
+ args = args_;
+ }
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fob1.d b/gcc/testsuite/gdc.test/fail_compilation/fob1.d
new file mode 100644
index 0000000..1f23122
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fob1.d
@@ -0,0 +1,63 @@
+// REQUIRED_ARGS: -preview=dip1021
+
+/* TEST_OUTPUT:
+---
+fail_compilation/fob1.d(104): Error: variable `fob1.foo1.p` has undefined state and cannot be read
+fail_compilation/fob1.d(104): Error: variable `fob1.foo1.p` is returned but is Undefined
+---
+*/
+
+#line 100
+
+@live int* foo1()
+{
+ int* p = void;
+ return p;
+}
+
+/* TEST_OUTPUT:
+---
+fail_compilation/fob1.d(203): Error: variable `fob1.foo2.p` is left dangling at return
+---
+*/
+
+#line 200
+
+@live void foo2()
+{
+ int* p;
+ p = null;
+}
+
+
+/* TEST_OUTPUT:
+---
+fail_compilation/fob1.d(304): Error: variable `fob1.foo3.p` has undefined state and cannot be read
+fail_compilation/fob1.d(304): Error: variable `fob1.foo3.p` is returned but is Undefined
+fail_compilation/fob1.d(303): Error: variable `fob1.foo3.q` is left dangling at return
+---
+*/
+
+#line 300
+
+@live int* foo3(int* p)
+{
+ int* q = p;
+ return p;
+}
+
+/* TEST_OUTPUT:
+---
+fail_compilation/fob1.d(405): Error: variable `fob1.foo4.bq` has undefined state and cannot be read
+---
+*/
+
+#line 400
+
+@live int* foo4(int* p)
+{
+ scope int* bq = p;
+ scope const int* cq = p;
+ *bq = 1;
+ return p;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fob2.d b/gcc/testsuite/gdc.test/fail_compilation/fob2.d
new file mode 100644
index 0000000..175ade3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fob2.d
@@ -0,0 +1,178 @@
+/* Testing Ownership/Borrowing system
+REQUIRED_ARGS: -preview=dip1021
+ */
+
+int* malloc();
+void free(int*);
+
+/* TEST_OUTPUT:
+---
+fail_compilation/fob2.d(110): Error: variable `fob2.foo1.b1` has undefined state and cannot be read
+fail_compilation/fob2.d(103): Error: variable `fob2.foo1.p` is left dangling at return
+---
+*/
+
+#line 100
+
+@live int foo1(int i)
+{
+ int* p = malloc();
+ scope const(int)* b1, b2;
+ if (i)
+ b1 = p;
+ else
+ b2 = p;
+ *p = 3;
+ return *b1;
+}
+
+/* TEST_OUTPUT:
+---
+fail_compilation/fob2.d(203): Error: variable `fob2.zoo2.p` is passed as Owner more than once
+fail_compilation/fob2.d(202): Error: variable `fob2.zoo2.p` is left dangling at return
+---
+*/
+
+#line 200
+
+@live void zoo2() {
+ int* p = malloc();
+ foo2(p, p + 1);
+}
+
+@live void foo2( scope int* p, scope int* q );
+
+/* TEST_OUTPUT:
+---
+fail_compilation/fob2.d(303): Error: variable `fob2.foo3.b` is left dangling at return
+---
+*/
+
+#line 300
+
+@live void foo3()
+{
+ scope int* b = malloc();
+}
+
+/* TEST_OUTPUT:
+---
+fail_compilation/fob2.d(427): Error: variable `fob2.test43.p` is both Owner and Undefined
+fail_compilation/fob2.d(429): Error: variable `fob2.test43.p` has undefined state and cannot be read
+fail_compilation/fob2.d(429): Error: variable `fob2.test43.p` is not Owner, cannot consume its value
+fail_compilation/fob2.d(432): Error: variable `fob2.test43.p` has undefined state and cannot be read
+fail_compilation/fob2.d(432): Error: variable `fob2.test43.p` is not Owner, cannot consume its value
+---
+*/
+#line 400
+
+
+bool f();
+
+@live void test41(int* p, int i)
+{
+ for (; f(); ++i)
+ {
+ --i;
+ free(p);
+ p = null;
+ }
+ free(p);
+}
+
+@live void test42(int* p, int i)
+{
+ for (; f(); ++i)
+ {
+ --i;
+ }
+ free(p);
+}
+
+
+@live void test43(int* p, int i)
+{
+ for (; f(); ++i)
+ {
+ free(p);
+ --i;
+ }
+ free(p);
+}
+
+/* TEST_OUTPUT:
+---
+fail_compilation/fob2.d(506): Error: variable `fob2.test51.p` has undefined state and cannot be read
+fail_compilation/fob2.d(515): Error: variable `fob2.test52.p` has undefined state and cannot be read
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=20747
+
+#line 500
+
+@live test51()
+{
+ int x;
+ scope p = &x;
+ x = 3;
+ *p = 4;
+}
+
+
+@live void test52() @safe
+{
+ int x = 5;
+ auto p = &x;
+ auto q = &x;
+ *p = 3;
+}
+
+
+@live void test53()
+{
+ scope int x;
+ scope int y;
+ y = x;
+ x = 3;
+ y = 4;
+}
+
+/* TEST_OUTPUT:
+---
+fail_compilation/fob2.d(603): Error: variable `fob2.test6.p` is left dangling at return
+---
+*/
+
+#line 600
+
+@live extern (C) void foo6(int, scope ...);
+
+@live void test6(int* p)
+{
+ foo6(1, p);
+}
+
+@live extern (C) void foo6b(int, scope const ...);
+
+@live int* test6b(return int* p)
+{
+ foo6b(1, p, p);
+ return p;
+}
+
+/* TEST_OUTPUT:
+---
+fail_compilation/fob2.d(705): Error: variable `fob2.test7.p` is not Owner, cannot consume its value
+---
+*/
+
+#line 700
+
+void free7(int*);
+
+@live void test7(scope int* p)
+{
+ free7(p);
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/foreach.d b/gcc/testsuite/gdc.test/fail_compilation/foreach.d
new file mode 100644
index 0000000..9a1c7c8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/foreach.d
@@ -0,0 +1,14 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/foreach.d(12): Error: cannot declare `out` loop variable, use `ref` instead
+fail_compilation/foreach.d(13): Error: cannot declare `out` loop variable, use `ref` instead
+fail_compilation/foreach.d(13): Error: cannot declare `out` loop variable, use `ref` instead
+---
+*/
+void main ()
+{
+ int[] array;
+ foreach (out val; array) {}
+ foreach (out idx, out val; array) {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/foreach2.d b/gcc/testsuite/gdc.test/fail_compilation/foreach2.d
new file mode 100644
index 0000000..8bd4893
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/foreach2.d
@@ -0,0 +1,22 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/foreach2.d(15): Error: argument type mismatch, `int` to `ref immutable(int)`
+fail_compilation/foreach2.d(16): Error: argument type mismatch, `int` to `ref immutable(int)`
+fail_compilation/foreach2.d(19): Error: argument type mismatch, `int` to `ref double`
+fail_compilation/foreach2.d(20): Error: argument type mismatch, `int` to `ref const(double)`
+fail_compilation/foreach2.d(21): Error: argument type mismatch, `int` to `ref immutable(double)`
+---
+*/
+void test4090 ()
+{
+ // From https://issues.dlang.org/show_bug.cgi?id=4090
+ int[] arr = [1,2,3];
+ foreach (immutable ref x; arr) {}
+ foreach (immutable ref int x; arr) {}
+
+ // convertible type + qualifier + ref
+ foreach ( ref double x; arr) {}
+ foreach ( const ref double x; arr) {}
+ foreach (immutable ref double x; arr) {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/gag4269f.d b/gcc/testsuite/gdc.test/fail_compilation/gag4269f.d
index eaf8593..84d39eb 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/gag4269f.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/gag4269f.d
@@ -3,7 +3,7 @@
TEST_OUTPUT:
---
fail_compilation/gag4269f.d(11): Error: undefined identifier `Y9`, did you mean interface `X9`?
-fail_compilation/gag4269f.d(11): Error: variable gag4269f.X9.y field not allowed in interface
+fail_compilation/gag4269f.d(11): Error: variable `gag4269f.X9.y` field not allowed in interface
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/goto1.d b/gcc/testsuite/gdc.test/fail_compilation/goto1.d
new file mode 100644
index 0000000..b35a1c3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/goto1.d
@@ -0,0 +1,26 @@
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/goto1.d(1010): Error: `return` statements cannot be in `finally` bodies
+---
+ */
+
+void foo();
+void bar();
+
+#line 1000
+
+void test2()
+{
+ try
+ {
+ foo();
+ }
+ finally
+ {
+ bar();
+ return;
+ }
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/goto2.d b/gcc/testsuite/gdc.test/fail_compilation/goto2.d
new file mode 100644
index 0000000..72e8bcb6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/goto2.d
@@ -0,0 +1,143 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/goto2.d(1024): Error: case cannot be in different `try` block level from `switch`
+fail_compilation/goto2.d(1026): Error: default cannot be in different `try` block level from `switch`
+fail_compilation/goto2.d(1003): Error: cannot `goto` into `try` block
+---
+ */
+
+
+void foo();
+void bar();
+
+#line 1000
+
+void test1()
+{
+ goto L1;
+ try
+ {
+ foo();
+ L1:
+ { }
+ }
+ finally
+ {
+ bar();
+ }
+
+ /********************************/
+
+ int i;
+ switch (i)
+ {
+ case 1:
+ try
+ {
+ foo();
+ case 2:
+ { }
+ default:
+ { }
+ }
+ finally
+ {
+ bar();
+ }
+ break;
+ }
+}
+
+/**************************************************
+https://issues.dlang.org/show_bug.cgi?id=11540
+goto label + try-catch-finally / with statement
+
+TEST_OUTPUT:
+---
+fail_compilation/goto2.d(1121): Error: cannot `goto` into `try` block
+---
+*/
+#line 1100
+
+int interpret3a()
+{
+ // enter to TryCatchStatement.body
+ {
+ bool c = false;
+ try
+ {
+ if (c) // need to bypass front-end optimization
+ throw new Exception("");
+ else
+ {
+ goto Lx;
+ L1:
+ c = true;
+ }
+ }
+ catch (Exception e) {}
+
+ Lx:
+ if (!c)
+ goto L1;
+ }
+ return 1;
+}
+
+/**************************************************
+https://issues.dlang.org/show_bug.cgi?id=11540
+goto label + try-catch-finally / with statement
+
+TEST_OUTPUT:
+---
+fail_compilation/goto2.d(1217): Error: cannot `goto` into `try` block
+---
+*/
+#line 1200
+
+int interpret3b()
+{
+ // enter back to TryFinallyStatement.body
+ {
+ bool c = false;
+ try
+ {
+ goto Lx;
+ L1:
+ c = true;
+ }
+ finally {
+ }
+
+ Lx:
+ if (!c)
+ goto L1;
+ }
+
+ return 1;
+}
+
+/**************************************************
+https://issues.dlang.org/show_bug.cgi?id=13815
+
+TEST_OUTPUT:
+---
+fail_compilation/goto2.d(1234): Error: cannot `goto` into `try` block
+---
+*/
+
+bool f()
+{
+ goto L;
+ try
+ {
+L: // line 7
+ throw new Exception(""); // line 8
+ }
+ catch (Exception e)
+ {
+ return true;
+ }
+ return false;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/goto3.d b/gcc/testsuite/gdc.test/fail_compilation/goto3.d
new file mode 100644
index 0000000..4b811fa
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/goto3.d
@@ -0,0 +1,37 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/goto3.d(1010): Error: case cannot be in different `try` block level from `switch`
+fail_compilation/goto3.d(1012): Error: default cannot be in different `try` block level from `switch`
+---
+ */
+
+
+void foo();
+void bar();
+
+#line 1000
+
+void test1()
+{
+ int i;
+ switch (i)
+ {
+ case 1:
+ try
+ {
+ foo();
+ case 2:
+ { }
+ default:
+ { }
+ }
+ finally
+ {
+ bar();
+ }
+ break;
+ }
+}
+
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10016.d b/gcc/testsuite/gdc.test/fail_compilation/ice10016.d
index ff72131..2f444f1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10016.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10016.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/ice10016.d(33): Error: undefined identifier `unknownIdentifier`
-fail_compilation/ice10016.d(47): Error: template instance ice10016.RefCounted!(S) error instantiating
+fail_compilation/ice10016.d(47): Error: template instance `ice10016.RefCounted!(S)` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10076.d b/gcc/testsuite/gdc.test/fail_compilation/ice10076.d
index 8337d7f..24f92d7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10076.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10076.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice10076.d(18): Error: template instance getMembersAndAttributesWhere!() template 'getMembersAndAttributesWhere' is not defined
-fail_compilation/ice10076.d(23): Error: template instance ice10076.getValidaterAttrs!string error instantiating
-fail_compilation/ice10076.d(13): instantiated from here: validate!string
+fail_compilation/ice10076.d(18): Error: template instance `getMembersAndAttributesWhere!()` template `getMembersAndAttributesWhere` is not defined
+fail_compilation/ice10076.d(23): Error: template instance `ice10076.getValidaterAttrs!string` error instantiating
+fail_compilation/ice10076.d(13): instantiated from here: `validate!string`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10212.d b/gcc/testsuite/gdc.test/fail_compilation/ice10212.d
index ce4a671..99fe1ed 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10212.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10212.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice10212.d(12): Error: mismatched function return type inference of `int function() pure nothrow @nogc @safe` and `int`
+fail_compilation/ice10212.d(13): Error: expected return type of `int`, not `int function() pure nothrow @nogc @safe`:
+fail_compilation/ice10212.d(13): Return type of `int` inferred here.
---
*/
@@ -9,7 +10,7 @@ int delegate() foo()
{
// returns "int function() pure nothrow @safe function() pure nothrow @safe"
// and it mismatches to "int delegate()"
- return () => {
+ return () => () {
return 1;
};
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10259.d b/gcc/testsuite/gdc.test/fail_compilation/ice10259.d
index e12df7d..4a7b0df 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10259.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10259.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice10259.d(11): Error: circular reference to 'ice10259.D.d'
-fail_compilation/ice10259.d(11): called from here: (*function () => x)()
+fail_compilation/ice10259.d(11): Error: circular reference to `ice10259.D.d`
+fail_compilation/ice10259.d(11): called from here: `(*function () pure nothrow @safe => x)()`
---
*/
class D
@@ -15,8 +15,8 @@ enum x = new D;
/*
TEST_OUTPUT:
---
-fail_compilation/ice10259.d(25): Error: circular reference to 'ice10259.D2.d'
-fail_compilation/ice10259.d(25): called from here: (*function () => x)()
+fail_compilation/ice10259.d(25): Error: circular reference to `ice10259.D2.d`
+fail_compilation/ice10259.d(25): called from here: `(*function () pure nothrow @safe => x)()`
---
*/
class D2
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10341.d b/gcc/testsuite/gdc.test/fail_compilation/ice10341.d
index ed6b6cb..56be4b3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10341.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10341.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice10341.d(10): Error: case range not in switch statement
+fail_compilation/ice10341.d(10): Error: case range not in `switch` statement
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10419.d b/gcc/testsuite/gdc.test/fail_compilation/ice10419.d
index 47d1f73..827f045 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10419.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10419.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice10419.d(12): Error: arr().length is not an lvalue
+fail_compilation/ice10419.d(12): Error: `arr().length` is not an lvalue and cannot be modified
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10600.d b/gcc/testsuite/gdc.test/fail_compilation/ice10600.d
index b1ee906..a240045 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10600.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10600.d
@@ -1,7 +1,8 @@
/*
+EXTRA_FILES: imports/ice10600a.d imports/ice10600b.d
TEST_OUTPUT:
---
-fail_compilation/ice10600.d(30): Error: template instance to!(int, double) does not match template declaration to(T)
+fail_compilation/ice10600.d(31): Error: template instance `to!(int, double)` does not match template declaration `to(T)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10616.d b/gcc/testsuite/gdc.test/fail_compilation/ice10616.d
index 6ccd1c3..654e16f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10616.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10616.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice10616.d(8): Error: class ice10616.A is forward referenced when looking for 'B'
+fail_compilation/ice10616.d(8): Error: class `ice10616.A` is forward referenced when looking for `B`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10624.d b/gcc/testsuite/gdc.test/fail_compilation/ice10624.d
index 883b98e..3bc3c7d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10624.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10624.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice10624.d(38): Error: need member function opCmp() for struct Tuple!(Msg) to compare
-fail_compilation/ice10624.d(48): Error: template instance ice10624.Variant.handler!(Tuple!(Msg)) error instantiating
-fail_compilation/ice10624.d(21): instantiated from here: opAssign!(Tuple!(Msg))
+fail_compilation/ice10624.d(38): Error: need member function `opCmp()` for struct `Tuple!(Msg)` to compare
+fail_compilation/ice10624.d(48): Error: template instance `ice10624.Variant.handler!(Tuple!(Msg))` error instantiating
+fail_compilation/ice10624.d(21): instantiated from here: `opAssign!(Tuple!(Msg))`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10651.d b/gcc/testsuite/gdc.test/fail_compilation/ice10651.d
index 51e0a72..1f87955 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10651.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10651.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice10651.d(11): Error: can only throw class objects derived from Throwable, not type `int*`
+fail_compilation/ice10651.d(11): Error: can only throw class objects derived from `Throwable`, not type `int*`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10713.d b/gcc/testsuite/gdc.test/fail_compilation/ice10713.d
index 9ef07b3..f368032 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10713.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10713.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice10713.d(10): Error: no property 'nonExistingField' for type 'S'
+fail_compilation/ice10713.d(10): Error: no property `nonExistingField` for type `ice10713.S`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10727a.d b/gcc/testsuite/gdc.test/fail_compilation/ice10727a.d
index a7529dc..ebefe33 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10727a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10727a.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -c
+// EXTRA_FILES: imports/foo10727a.d imports/stdtraits10727.d
/*
TEST_OUTPUT:
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10727b.d b/gcc/testsuite/gdc.test/fail_compilation/ice10727b.d
index 958b506..125ac12 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10727b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10727b.d
@@ -1,4 +1,5 @@
// REQUIRED_ARGS: -c
+// EXTRA_FILES: imports/foo10727b.d imports/stdtraits10727.d
/*
TEST_OUTPUT:
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10922.d b/gcc/testsuite/gdc.test/fail_compilation/ice10922.d
index 9eeb622..c227ee5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10922.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10922.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice10922.d(10): Error: function `ice10922.__lambda4(const(uint) n)` is not callable using argument types `()`
-fail_compilation/ice10922.d(10): missing argument for parameter #1: `const(uint) n`
+fail_compilation/ice10922.d(10): Error: function `ice10922.__lambda4(in uint n)` is not callable using argument types `()`
+fail_compilation/ice10922.d(10): missing argument for parameter #1: `in uint n`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10938.d b/gcc/testsuite/gdc.test/fail_compilation/ice10938.d
index 2b3eab5..2084e32 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10938.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10938.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice10938.d(12): Error: no property 'opts' for type 'ice10938.C'
+fail_compilation/ice10938.d(13): Error: no property `opts` for type `ice10938.C`
+fail_compilation/ice10938.d(13): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10949.d b/gcc/testsuite/gdc.test/fail_compilation/ice10949.d
index e81cf97..45b18e0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice10949.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice10949.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice10949.d(12): Deprecation: Using the result of a comma expression is deprecated
+fail_compilation/ice10949.d(12): Error: Using the result of a comma expression is not allowed
fail_compilation/ice10949.d(12): Error: array index 3 is out of bounds `[5, 5][0 .. 2]`
fail_compilation/ice10949.d(12): Error: array index 17 is out of bounds `[2, 3][0 .. 2]`
fail_compilation/ice10949.d(12): while evaluating: `static assert((((([5, 5][3] + global - global) * global / global % global >> global & global | global) ^ global) == 9 , [2, 3][17]) || [3, 3, 3][9] is 4 && [[1, 2, 3]][4].length)`
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11086.d b/gcc/testsuite/gdc.test/fail_compilation/ice11086.d
index 0b2ee30..fee958d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11086.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11086.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice11086.d(10): Error: template instance foo!A template 'foo' is not defined
+fail_compilation/ice11086.d(10): Error: template instance `foo!A` template `foo` is not defined
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11404.d b/gcc/testsuite/gdc.test/fail_compilation/ice11404.d
index c3f1ce6..f445903 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11404.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11404.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice11404.d(10): Error: can't have associative array of (int, int)
+fail_compilation/ice11404.d(10): Error: cannot have associative array of `(int, int)`
---
*/
template TypeTuple(TL...) { alias TL TypeTuple; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice1144.d b/gcc/testsuite/gdc.test/fail_compilation/ice1144.d
index 68563b6..cd64864 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice1144.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice1144.d
@@ -2,12 +2,12 @@
TEST_OUTPUT:
---
fail_compilation/ice1144.d(14): Error: undefined identifier `a`
-fail_compilation/ice1144.d(23): Error: template instance ice1144.testHelper!("hello", "world") error instantiating
+fail_compilation/ice1144.d(23): Error: template instance `ice1144.testHelper!("hello", "world")` error instantiating
---
*/
-// Issue 1144 - ICE(template.c) template mixin causes DMD crash
-
+// https://issues.dlang.org/show_bug.cgi?id=1144
+// ICE(template.c) template mixin causes DMD crash
char[] testHelper(A ...)()
{
char[] result;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11472.d b/gcc/testsuite/gdc.test/fail_compilation/ice11472.d
index f5b767f..4e12490 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11472.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11472.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice11472.d(13): Error: template instance fun2!fun fun2 is not a template declaration, it is a function
-fail_compilation/ice11472.d(18): Error: template instance ice11472.fun1!(fun3) error instantiating
+fail_compilation/ice11472.d(13): Error: template instance `fun2!fun` `fun2` is not a template declaration, it is a function
+fail_compilation/ice11472.d(18): Error: template instance `ice11472.fun1!(fun3)` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11513a.d b/gcc/testsuite/gdc.test/fail_compilation/ice11513a.d
index 576c845..87ce0e1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11513a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11513a.d
@@ -1,4 +1,5 @@
/*
+EXTRA_FILES: imports/ice11513x.d
TEST_OUTPUT:
---
fail_compilation/imports/ice11513x.d(1): Error: package name 'ice11513a' conflicts with usage as a module name in file fail_compilation/ice11513a.d
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11513b.d b/gcc/testsuite/gdc.test/fail_compilation/ice11513b.d
index dab09b8..4f933f4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11513b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11513b.d
@@ -1,4 +1,5 @@
/*
+EXTRA_FILES: imports/ice11513y.d
TEST_OUTPUT:
---
fail_compilation/imports/ice11513y.d(1): Error: package name 'ice11513b' conflicts with usage as a module name in file fail_compilation/ice11513b.d
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11518.d b/gcc/testsuite/gdc.test/fail_compilation/ice11518.d
index cfceb64e..c8542f7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11518.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11518.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice11518.d(17): Error: class ice11518.B matches more than one template declaration:
-fail_compilation/ice11518.d(12): B(T : A!T)
+fail_compilation/ice11518.d(17): Error: class `ice11518.B` matches more than one template declaration:
+fail_compilation/ice11518.d(12): `B(T : A!T)`
and
-fail_compilation/ice11518.d(13): B(T : A!T)
+fail_compilation/ice11518.d(13): `B(T : A!T)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11552.d b/gcc/testsuite/gdc.test/fail_compilation/ice11552.d
index 43fba40..28d8be1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11552.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11552.d
@@ -1,11 +1,10 @@
/*
REQUIRED_ARGS: -o-
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/ice11552.d(14): Error: label `label` is undefined
-fail_compilation/ice11552.d(17): called from here: test11552()
-fail_compilation/ice11552.d(17): while evaluating: `static assert(test11552())`
+fail_compilation/ice11552.d(13): Error: function `ice11552.test11552` label `label` is undefined
+fail_compilation/ice11552.d(16): called from here: `test11552()`
+fail_compilation/ice11552.d(16): while evaluating: `static assert(test11552())`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11553.d b/gcc/testsuite/gdc.test/fail_compilation/ice11553.d
index 8fd0975..7497aad 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11553.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11553.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice11553.d(22): Error: recursive template expansion while looking for A!().A()
+fail_compilation/ice11553.d(22): Error: recursive template expansion while looking for `A!().A()`
+fail_compilation/ice11553.d(22): Error: expression `A()` of type `void` does not have a boolean value
---
*/
-
template A(alias T)
{
template A()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11755.d b/gcc/testsuite/gdc.test/fail_compilation/ice11755.d
deleted file mode 100644
index 86ce6f6..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11755.d
+++ /dev/null
@@ -1,30 +0,0 @@
-// REQUIRED_ARGS: -w
-/*
-TEST_OUTPUT:
----
-fail_compilation/ice11755.d(20): Error: '!<>=' is not defined for array comparisons
-fail_compilation/ice11755.d(21): Error: use '==' for non-floating comparisons rather than floating point operator '!<>'
-fail_compilation/ice11755.d(22): Error: use '!=' for non-floating comparisons rather than floating point operator '<>'
-fail_compilation/ice11755.d(23): Error: '<>=' is not defined for array comparisons
-fail_compilation/ice11755.d(24): Error: use '<=' for non-floating comparisons rather than floating point operator '!>'
-fail_compilation/ice11755.d(25): Error: use '<' for non-floating comparisons rather than floating point operator '!>='
-fail_compilation/ice11755.d(26): Error: use '>=' for non-floating comparisons rather than floating point operator '!<'
-fail_compilation/ice11755.d(27): Error: use '>' for non-floating comparisons rather than floating point operator '!<='
-fail_compilation/ice11755.d(28): Error: floating point operator '<>=' always returns true for non-floating comparisons
-fail_compilation/ice11755.d(29): Error: floating point operator '!<>=' always returns false for non-floating comparisons
----
-*/
-void main()
-{
- int[] a, b;
- auto r4 = a !<>= b; // TOKunord
- auto r2 = a !<> b; // TOKue
- auto r1 = a <> b; // TOKlg
- auto r3 = a <>= b; // TOKleg
- auto r8 = a !> b; // TOKule
- auto r7 = a !>= b; // TOKul
- auto r6 = a !< b; // TOKuge
- auto r5 = a !<= b; // TOKug
- assert((5 <>= 3) == 1);
- assert((5 !<>= 3) == 0);
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11790.d b/gcc/testsuite/gdc.test/fail_compilation/ice11790.d
deleted file mode 100644
index 34b2002..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11790.d
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-TEST_OUTPUT:
----
-fail_compilation/ice11790.d(8): Error: cannot pass type string as a function argument
----
-*/
-
-string[string] crash = new string[string];
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11793.d b/gcc/testsuite/gdc.test/fail_compilation/ice11793.d
index e9453a3..2d997ca 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11793.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11793.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice11793.d(11): Error: circular reference to 'ice11793.Outer.outer'
+fail_compilation/ice11793.d(11): Error: circular reference to `ice11793.Outer.outer`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11822.d b/gcc/testsuite/gdc.test/fail_compilation/ice11822.d
index 4ec46c3..830af21 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11822.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11822.d
@@ -4,9 +4,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice11822.d(32): Deprecation: function ice11822.d is deprecated
-fail_compilation/ice11822.d(21): instantiated from here: S!(__lambda1)
-fail_compilation/ice11822.d(32): instantiated from here: g!((n) => d(i))
+fail_compilation/ice11822.d(33): Deprecation: function `ice11822.d` is deprecated
+fail_compilation/ice11822.d(16): instantiated from here: `__lambda2!int`
+fail_compilation/ice11822.d(22): instantiated from here: `S!(__lambda2)`
+fail_compilation/ice11822.d(33): instantiated from here: `g!((n) => d(i))`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11849b.d b/gcc/testsuite/gdc.test/fail_compilation/ice11849b.d
index ef9380f..f879496 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11849b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11849b.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/ice11849b.d(11): Error: circular reference to enum base type `DWORD1`
-fail_compilation/ice11849b.d(11): Error: DWORD1 is used as a type
+fail_compilation/ice11849b.d(11): Error: `DWORD1` is used as a type
fail_compilation/ice11849b.d(16): Error: circular reference to enum base type `typeof(DWORD2)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11850.d b/gcc/testsuite/gdc.test/fail_compilation/ice11850.d
index 9d1f172..d33549a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11850.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11850.d
@@ -1,9 +1,10 @@
/*
+EXTRA_FILES: imports/a11850.d
TEST_OUTPUT:
---
-fail_compilation/ice11850.d(14): Error: incompatible types for ((a) < ([0])): 'uint[]' and 'int[]'
-fail_compilation/imports/a11850.d(9): instantiated from here: FilterResult!(__lambda1, uint[][])
-fail_compilation/ice11850.d(14): instantiated from here: filter!(uint[][])
+fail_compilation/ice11850.d(15): Error: incompatible types for `(a) < ([0])`: `uint[]` and `int[]`
+fail_compilation/imports/a11850.d(9): instantiated from here: `FilterResult!(__lambda1, uint[][])`
+fail_compilation/ice11850.d(15): instantiated from here: `filter!(uint[][])`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11856_0.d b/gcc/testsuite/gdc.test/fail_compilation/ice11856_0.d
new file mode 100644
index 0000000..36bc2bd
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11856_0.d
@@ -0,0 +1,19 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice11856_0.d(19): Error: template `ice11856_0.f` cannot deduce function from argument types `!()(int)`
+fail_compilation/ice11856_0.d(13): Candidates are: `f(T)(T t)`
+fail_compilation/ice11856_0.d(16): `f(T)(T t)`
+ with `T = int`
+ must satisfy the following constraint:
+` !__traits(compiles, .f!T)`
+---
+*/
+
+int f(T)(T t) if(!__traits(compiles,.f!T)) {
+ return 0;
+}
+int f(T)(T t) if(!__traits(compiles,.f!T)) {
+ return 1;
+}
+enum x=f(2);
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11856_1.d b/gcc/testsuite/gdc.test/fail_compilation/ice11856_1.d
new file mode 100644
index 0000000..70991ae
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11856_1.d
@@ -0,0 +1,13 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice11856_1.d(13): Error: template `ice11856_1.g` cannot deduce function from argument types `!()(A)`
+fail_compilation/ice11856_1.d(11): Candidate is: `g(T)(T x)`
+---
+*/
+struct A {}
+
+void f(T)(T x) if (is(typeof(x.g()))) {}
+void g(T)(T x) if (is(typeof(x.f()))) {}
+
+void main() { A().g(); }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11919.d b/gcc/testsuite/gdc.test/fail_compilation/ice11919.d
index 7005610..e6b4f70 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11919.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11919.d
@@ -1,10 +1,11 @@
/*
+EXTRA_FILES: imports/a11919.d
TEST_OUTPUT:
---
-fail_compilation/ice11919.d(17): Error: cannot interpret foo at compile time
-fail_compilation/imports/a11919.d(4): Error: template instance a11919.doBar!(Foo).doBar.zoo!(t) error instantiating
-fail_compilation/imports/a11919.d(11): instantiated from here: doBar!(Foo)
-fail_compilation/ice11919.d(25): instantiated from here: doBar!(Bar)
+fail_compilation/ice11919.d(18): Error: initializer must be an expression, not `foo`
+fail_compilation/imports/a11919.d(4): Error: template instance `a11919.doBar!(Foo).doBar.zoo!(t)` error instantiating
+fail_compilation/imports/a11919.d(11): instantiated from here: `doBar!(Foo)`
+fail_compilation/ice11919.d(26): instantiated from here: `doBar!(Bar)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11922.d b/gcc/testsuite/gdc.test/fail_compilation/ice11922.d
index 0999aeac..bca0bbe 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11922.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11922.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/ice11922.d(11): Error: undefined identifier `a`
-fail_compilation/ice11922.d(17): Error: template instance ice11922.S.f!int error instantiating
+fail_compilation/ice11922.d(17): Error: template instance `ice11922.S.f!int` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11925.d b/gcc/testsuite/gdc.test/fail_compilation/ice11925.d
new file mode 100644
index 0000000..2627f2b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11925.d
@@ -0,0 +1,45 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/ice11925.d(23): Error: cannot `goto` into `try` block
+fail_compilation/ice11925.d(31): Error: cannot `goto` into `try` block
+---
+*/
+
+void test11925a()
+{
+ try
+ {
+ try
+ {
+ L1: {}
+ }
+ finally
+ {
+ }
+ }
+ finally
+ {
+ }
+ goto L1;
+}
+
+void test11925b()
+{
+ switch (1)
+ {
+ case 1:
+ goto L1;
+ break;
+
+ default:
+ break;
+ }
+
+ try
+ {
+ L1: { }
+ }
+ finally
+ {
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11944.d b/gcc/testsuite/gdc.test/fail_compilation/ice11944.d
index c72d9f0..9b0326b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice11944.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice11944.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice11944.d(12): Error: template instance doCommand!(func) does not match template declaration doCommand(f, T)(f, T arg)
+fail_compilation/ice11944.d(12): Error: template instance `doCommand!(func)` does not match template declaration `doCommand(f, T)(f, T arg)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12040.d b/gcc/testsuite/gdc.test/fail_compilation/ice12040.d
index 2307e94..e43079a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12040.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12040.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice12040.d(8): Error: circular reference to 'ice12040.lol'
+fail_compilation/ice12040.d(8): Error: circular reference to `ice12040.lol`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12158.d b/gcc/testsuite/gdc.test/fail_compilation/ice12158.d
index 7b8d38d..50a0b60 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12158.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12158.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice12158.d(7): Error: module object import 'nonexisting' not found
+fail_compilation/ice12158.d(7): Error: module `object` import `nonexisting` not found
---
*/
import object : nonexisting;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12174.d b/gcc/testsuite/gdc.test/fail_compilation/ice12174.d
index 81fef2d..019722a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12174.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12174.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice12174.d(12): Error: no property 'sum' for type 'int[]'
-fail_compilation/ice12174.d(20): Error: CTFE failed because of previous errors in this
-fail_compilation/ice12174.d(13): called from here: filter([1, 2, 3])
+fail_compilation/ice12174.d(12): Error: no property `sum` for type `int[]`
+fail_compilation/ice12174.d(20): Error: CTFE failed because of previous errors in `this`
+fail_compilation/ice12174.d(13): called from here: `filter([1, 2, 3])`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12235.d b/gcc/testsuite/gdc.test/fail_compilation/ice12235.d
index 1bf55b9..8f2fefd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12235.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12235.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice12235.d(14): Error: forward reference to inferred return type of function '__lambda1'
-fail_compilation/ice12235.d(15): Error: forward reference to inferred return type of function '__lambda1'
-fail_compilation/ice12235.d(15): while evaluating pragma(msg, __lambda1.mangleof)
+fail_compilation/ice12235.d(14): Error: forward reference to inferred return type of function `__lambda1`
+fail_compilation/ice12235.d(15): Error: forward reference to inferred return type of function `__lambda1`
+fail_compilation/ice12235.d(15): while evaluating `pragma(msg, __lambda1.mangleof)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12350.d b/gcc/testsuite/gdc.test/fail_compilation/ice12350.d
index 3ac3751..73ed39d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12350.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12350.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice12350.d(15): Error: type MyUDC has no value
-fail_compilation/ice12350.d(30): Error: template instance ice12350.testAttrs!(MyStruct) error instantiating
+fail_compilation/ice12350.d(15): Error: type `MyUDC` has no value
+fail_compilation/ice12350.d(30): Error: template instance `ice12350.testAttrs!(MyStruct)` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12362.d b/gcc/testsuite/gdc.test/fail_compilation/ice12362.d
index 2c662c0..d0853b9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12362.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12362.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice12362.d(12): Error: cannot interpret foo at compile time
+fail_compilation/ice12362.d(12): Error: initializer must be an expression, not `foo`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12534.d b/gcc/testsuite/gdc.test/fail_compilation/ice12534.d
index 6820f39..da9c021 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12534.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12534.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice12534.d(14): Error: static assert `is(exprs[0 .. 0])` is false
+fail_compilation/ice12534.d(14): Error: static assert: `is(exprs[0 .. 0])` is false
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12539.d b/gcc/testsuite/gdc.test/fail_compilation/ice12539.d
index e1ad994..8fab042 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12539.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12539.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice12539.d(15): Error: array index [0] is outside array bounds [0 .. 0]
+fail_compilation/ice12539.d(15): Error: array index `[0]` is outside array bounds `[0 .. 0]`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12574.d b/gcc/testsuite/gdc.test/fail_compilation/ice12574.d
index 362c359..420b6b7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12574.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12574.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice12574.d(40): Error: tuple index 2 exceeds length 2
-fail_compilation/ice12574.d(53): Error: template instance ice12574.reduce!("a", "a").reduce!(Tuple!(int, int, int)) error instantiating
+fail_compilation/ice12574.d(40): Error: tuple index `2` exceeds length 2
+fail_compilation/ice12574.d(53): Error: template instance `ice12574.reduce!("a", "a").reduce!(Tuple!(int, int, int))` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12727.d b/gcc/testsuite/gdc.test/fail_compilation/ice12727.d
index 027894c..bf6af7b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12727.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12727.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
----
-fail_compilation/ice12727.d(16): Error: alias ice12727.IndexTuple!(1, 0).IndexTuple recursive alias declaration
-fail_compilation/ice12727.d(23): Error: template instance ice12727.IndexTuple!(1, 0) error instantiating
-fail_compilation/ice12727.d(27): instantiated from here: Matrix!(float, 3)
-fail_compilation/ice12727.d(28): instantiated from here: Vector!(float, 3)
+fail_compilation/ice12727.d(16): Error: alias `ice12727.IndexTuple!(1, 0).IndexTuple` recursive alias declaration
+fail_compilation/ice12727.d(23): Error: template instance `ice12727.IndexTuple!(1, 0)` error instantiating
+fail_compilation/ice12727.d(27): instantiated from here: `Matrix!(float, 3)`
+fail_compilation/ice12727.d(28): instantiated from here: `Vector!(float, 3)`
----
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12827.d b/gcc/testsuite/gdc.test/fail_compilation/ice12827.d
index 8270c1f..20974e4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12827.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12827.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice12827.d(10): Error: circular initialization of variable 'ice12827.Test.i'
+fail_compilation/ice12827.d(10): Error: circular initialization of variable `ice12827.Test.i`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12841.d b/gcc/testsuite/gdc.test/fail_compilation/ice12841.d
index 564b661..c5894d2 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12841.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12841.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice12841.d(23): Error: taskPool().amap(Args...)(Args args) is not an lvalue
-fail_compilation/ice12841.d(24): Error: amap(Args...)(Args args) is not an lvalue
+fail_compilation/ice12841.d(23): Error: `taskPool().amap(Args...)(Args args)` is not an lvalue and cannot be modified
+fail_compilation/ice12841.d(24): Error: `amap(Args...)(Args args)` is not an lvalue and cannot be modified
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12902.d b/gcc/testsuite/gdc.test/fail_compilation/ice12902.d
index e5ada09..ac43012 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice12902.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice12902.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice12902.d(20): Error: variable ice12902.main.__dollar type void is inferred from initializer s.opDollar(), and variables cannot be of type void
-fail_compilation/ice12902.d(20): Error: expression s.opDollar() is void and has no value
+fail_compilation/ice12902.d(20): Error: variable `ice12902.main.__dollar` type `void` is inferred from initializer `s.opDollar()`, and variables cannot be of type `void`
+fail_compilation/ice12902.d(20): Error: expression `s.opDollar()` is `void` and has no value
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13024.d b/gcc/testsuite/gdc.test/fail_compilation/ice13024.d
deleted file mode 100644
index bf82677..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13024.d
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-TEST_OUTPUT:
----
-fail_compilation/ice13024.d(15): Error: cannot implicitly convert expression `t.x` of type `A` to `B`
----
-*/
-
-enum A { a }
-enum B { b }
-struct T { A x; B y; }
-void main()
-{
- T t;
- auto r1 = [cast(int)(t.x), cast(int)(t.y)]; // OK
- auto r3 = [t.x, t.y]; // crash
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13027.d b/gcc/testsuite/gdc.test/fail_compilation/ice13027.d
index 04ccdf3..03c6820 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13027.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13027.d
@@ -1,10 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice13027.d(9): Error: template instance b!"c" template 'b' is not defined
+fail_compilation/ice13027.d(9): Error: template instance `b!"c"` template `b` is not defined
---
*/
void main()
{
scope a = b!"c";
}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13081.d b/gcc/testsuite/gdc.test/fail_compilation/ice13081.d
index 126ce9f..64474ba 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13081.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13081.d
@@ -4,7 +4,7 @@ TEST_OUTPUT:
fail_compilation/ice13081.d(17): Error: undefined identifier `node`
fail_compilation/ice13081.d(17): Error: undefined identifier `data`
fail_compilation/ice13081.d(17): Error: undefined identifier `node`
-fail_compilation/ice13081.d(28): Error: template instance ice13081.Cube!(SparseDataStore) error instantiating
+fail_compilation/ice13081.d(28): Error: template instance `ice13081.Cube!(SparseDataStore)` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13131.d b/gcc/testsuite/gdc.test/fail_compilation/ice13131.d
index 13b5aff..d4a6b91 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13131.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13131.d
@@ -1,10 +1,11 @@
// EXTRA_SOURCES: imports/a13131parameters.d imports/a13131elec.d
+// EXTRA_FILES: imports/a13131checkpoint.d
/*
TEST_OUTPUT:
---
+A
+B
-fail_compilation/imports/a13131elec.d(10): Error: template instance elecConnOf!gconn template 'elecConnOf' is not defined
+fail_compilation/imports/a13131elec.d(10): Error: template instance `elecConnOf!gconn` template `elecConnOf` is not defined
-B
-A
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13220.d b/gcc/testsuite/gdc.test/fail_compilation/ice13220.d
index 3affd54..65b661b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13220.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13220.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice13220.d(22): Error: template instance test!0 does not match template declaration test(T)()
+fail_compilation/ice13220.d(22): Error: template instance `test!0` does not match template declaration `test(T)()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13221.d b/gcc/testsuite/gdc.test/fail_compilation/ice13221.d
index b00169e..3c55054 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13221.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13221.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice13221.d(20): Error: variable r cannot be read at compile time
+fail_compilation/ice13221.d(20): Error: variable `r` cannot be read at compile time
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13225.d b/gcc/testsuite/gdc.test/fail_compilation/ice13225.d
index b042431..6988cd7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13225.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13225.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice13225.d(12): Error: mixin ice13225.S.M!(function (S _param_0) => 0) does not match template declaration M(T)
+fail_compilation/ice13225.d(12): Error: mixin `ice13225.S.M!(function (S _param_0) pure nothrow @nogc @safe => 0)` does not match template declaration `M(T)`
fail_compilation/ice13225.d(16): Error: undefined identifier `undefined`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13311.d b/gcc/testsuite/gdc.test/fail_compilation/ice13311.d
index b86681b..2aa01ad 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13311.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13311.d
@@ -1,4 +1,5 @@
/*
+EXTRA_FILES: imports/a13311.d
TEST_OUTPUT:
---
fail_compilation/imports/a13311.d(8): Error: undefined identifier `PieceTree`
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13356.d b/gcc/testsuite/gdc.test/fail_compilation/ice13356.d
index 9225d55..3bac9b5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13356.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13356.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice13356.d(32): Error: template instance Algebraic!(Tuple!(List)) recursive template expansion
-fail_compilation/ice13356.d(15): Error: template instance ice13356.isPrintable!(List) error instantiating
-fail_compilation/ice13356.d(33): instantiated from here: Tuple!(List)
+fail_compilation/ice13356.d(32): Error: template instance `Algebraic!(Tuple!(List))` recursive template expansion
+fail_compilation/ice13356.d(15): Error: template instance `ice13356.isPrintable!(List)` error instantiating
+fail_compilation/ice13356.d(33): instantiated from here: `Tuple!(List)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13382.d b/gcc/testsuite/gdc.test/fail_compilation/ice13382.d
index e5f1ac0..87c70d9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13382.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13382.d
@@ -1,14 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice13382.d(18): Error: incompatible types for ((a) == (0)): 'int[]' and 'int'
-fail_compilation/ice13382.d(19): Error: incompatible types for ((a) >= (0)): 'int[]' and 'int'
-fail_compilation/ice13382.d(20): Error: incompatible types for ((0) == (a)): 'int' and 'int[]'
-fail_compilation/ice13382.d(21): Error: incompatible types for ((0) >= (a)): 'int' and 'int[]'
-fail_compilation/ice13382.d(22): Error: incompatible types for ((a) is (0)): 'int[]' and 'int'
-fail_compilation/ice13382.d(23): Error: incompatible types for ((a) !is (0)): 'int[]' and 'int'
-fail_compilation/ice13382.d(24): Error: incompatible types for ((0) is (a)): 'int' and 'int[]'
-fail_compilation/ice13382.d(25): Error: incompatible types for ((0) !is (a)): 'int' and 'int[]'
+fail_compilation/ice13382.d(18): Error: incompatible types for `(a) == (0)`: `int[]` and `int`
+fail_compilation/ice13382.d(19): Error: incompatible types for `(a) >= (0)`: `int[]` and `int`
+fail_compilation/ice13382.d(20): Error: incompatible types for `(0) == (a)`: `int` and `int[]`
+fail_compilation/ice13382.d(21): Error: incompatible types for `(0) >= (a)`: `int` and `int[]`
+fail_compilation/ice13382.d(22): Error: incompatible types for `(a) is (0)`: `int[]` and `int`
+fail_compilation/ice13382.d(23): Error: incompatible types for `(a) !is (0)`: `int[]` and `int`
+fail_compilation/ice13382.d(24): Error: incompatible types for `(0) is (a)`: `int` and `int[]`
+fail_compilation/ice13382.d(25): Error: incompatible types for `(0) !is (a)`: `int` and `int[]`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13385.d b/gcc/testsuite/gdc.test/fail_compilation/ice13385.d
index b2039b2..cf114d0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13385.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13385.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice13385.d(9): Error: protection attribute 'package(a)' does not bind to one of ancestor packages of module `ice13385`
+fail_compilation/ice13385.d(9): Error: visibility attribute `package(a)` does not bind to one of ancestor packages of module `ice13385`
---
*/
module ice13385;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13459.d b/gcc/testsuite/gdc.test/fail_compilation/ice13459.d
index 35420fd..2c42dd3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13459.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13459.d
@@ -2,13 +2,13 @@
TEST_OUTPUT:
---
fail_compilation/ice13459.d(12): Error: undefined identifier `B`
-fail_compilation/ice13459.d(18): Error: none of the overloads of 'opSlice' are callable using argument types (int, int), candidates are:
-fail_compilation/ice13459.d(11): ice13459.A.opSlice()
+fail_compilation/ice13459.d(18): Error: none of the overloads of `opSlice` are callable using argument types `(int, int)`
+fail_compilation/ice13459.d(11): Candidates are: `ice13459.A.opSlice()`
---
*/
struct A
{
- auto opSlice() {}
+ auto opSlice() const {}
auto opSlice() { return B; }
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13465a.d b/gcc/testsuite/gdc.test/fail_compilation/ice13465a.d
index 23f73b7..16c43a6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13465a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13465a.d
@@ -3,8 +3,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/imports/a13465.d(10): Error: cannot infer type from template instance isMaskField!()
-fail_compilation/ice13465a.d(17): Error: template instance imports.a13465.isMatchingMaskField!() error instantiating
+fail_compilation/imports/a13465.d(10): Error: cannot infer type from template instance `isMaskField!()`
+fail_compilation/ice13465a.d(17): Error: template instance `imports.a13465.isMatchingMaskField!()` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13465b.d b/gcc/testsuite/gdc.test/fail_compilation/ice13465b.d
index db0cce1..60c8505 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13465b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13465b.d
@@ -3,8 +3,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/imports/b13465.d(10): Error: cannot infer type from template instance isMaskField!()
-fail_compilation/ice13465b.d(17): Error: template instance imports.b13465.isMatchingMaskField!() error instantiating
+fail_compilation/imports/b13465.d(10): Error: cannot infer type from template instance `isMaskField!()`
+fail_compilation/ice13465b.d(17): Error: template instance `imports.b13465.isMatchingMaskField!()` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice1358.d b/gcc/testsuite/gdc.test/fail_compilation/ice1358.d
index ee71f8c..2c334f9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice1358.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice1358.d
@@ -5,8 +5,8 @@ fail_compilation/ice1358.d(29): Error: invalid UTF character \U80000000
---
*/
-// Issue 1358 - ICE(root.c) on Unicode codepoints greater than 0x7FFFFFFF
-
+// https://issues.dlang.org/show_bug.cgi?id=1358
+// ICE(root.c) on Unicode codepoints greater than 0x7FFFFFFF
/* 1358. Assertion failure: '0' on line 1548 in file '..\root\root.c'
This one is trivial.
PATCH(lexer.c, Lexer::escapeSequence()).
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13788.d b/gcc/testsuite/gdc.test/fail_compilation/ice13788.d
index 7d04d9d..99f3c4a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13788.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13788.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice13788.d(11): Error: pragma mangle string expected for mangled name
-fail_compilation/ice13788.d(12): Error: string expected for mangled name, not (1) of type int
-fail_compilation/ice13788.d(13): Error: pragma mangle zero-length string not allowed for mangled name
-fail_compilation/ice13788.d(14): Error: pragma mangle mangled name characters can only be of type char
+fail_compilation/ice13788.d(11): Error: pragma `mangle` string expected for mangled name
+fail_compilation/ice13788.d(12): Error: `string` expected for mangled name, not `(1)` of type `int`
+fail_compilation/ice13788.d(13): Error: pragma `mangle` zero-length string not allowed for mangled name
+fail_compilation/ice13788.d(14): Error: pragma `mangle` mangled name characters can only be of type `char`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13816.d b/gcc/testsuite/gdc.test/fail_compilation/ice13816.d
index 6745d7b..e683e33 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13816.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13816.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice13816.d(15): Error: alias ice13816.ItemProperty!().ItemProperty recursive alias declaration
-fail_compilation/ice13816.d(20): Error: template instance ice13816.ItemProperty!() error instantiating
+fail_compilation/ice13816.d(15): Error: alias `ice13816.ItemProperty!().ItemProperty` recursive alias declaration
+fail_compilation/ice13816.d(20): Error: template instance `ice13816.ItemProperty!()` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13835.d b/gcc/testsuite/gdc.test/fail_compilation/ice13835.d
index 6bacdb0..dcb1757 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13835.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13835.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice13835.d(15): Error: value of 'this' is not known at compile time
-fail_compilation/ice13835.d(21): Error: template instance ice13835.Foo!int error instantiating
+fail_compilation/ice13835.d(15): Error: value of `this` is not known at compile time
+fail_compilation/ice13835.d(21): Error: template instance `ice13835.Foo!int` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13921.d b/gcc/testsuite/gdc.test/fail_compilation/ice13921.d
index 8793e5c..96c11ed 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13921.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13921.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/ice13921.d(13): Error: undefined identifier `undefined_identifier`
-fail_compilation/ice13921.d(25): Error: template instance ice13921.S!string error instantiating
+fail_compilation/ice13921.d(25): Error: template instance `ice13921.S!string` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13987.d b/gcc/testsuite/gdc.test/fail_compilation/ice13987.d
index 26d3d30..28a57c0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice13987.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice13987.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice13987.d(9): Error: cannot use array to initialize S
+fail_compilation/ice13987.d(9): Error: cannot use array to initialize `S`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14055.d b/gcc/testsuite/gdc.test/fail_compilation/ice14055.d
index 5e60e88..13cdf34 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14055.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice14055.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice14055.d(16): Error: uninitialized variable 'foo' cannot be returned from CTFE
+fail_compilation/ice14055.d(16): Error: uninitialized variable `foo` cannot be returned from CTFE
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14096.d b/gcc/testsuite/gdc.test/fail_compilation/ice14096.d
index 654cfcc..05171ad 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14096.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice14096.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice14096.d(29): Error: cannot access frame pointer of ice14096.main.Baz!((i) => i).Baz
-fail_compilation/ice14096.d(23): Error: template instance ice14096.foo!(Tuple!(Baz!((i) => i))).foo.bar!(t) error instantiating
-fail_compilation/ice14096.d(40): instantiated from here: foo!(Tuple!(Baz!((i) => i)))
+fail_compilation/ice14096.d(29): Error: cannot access frame pointer of `ice14096.main.Baz!((i) => i).Baz`
+fail_compilation/ice14096.d(23): Error: template instance `ice14096.foo!(Tuple!(Baz!((i) => i))).foo.bar!(t)` error instantiating
+fail_compilation/ice14096.d(40): instantiated from here: `foo!(Tuple!(Baz!((i) => i)))`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14116.d b/gcc/testsuite/gdc.test/fail_compilation/ice14116.d
index 52cd8ce..c3339c7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14116.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice14116.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/imports/a14116.d(3): Error: module ice14116.ice14116 from file fail_compilation/ice14116.d must be imported with 'import ice14116.ice14116;'
+fail_compilation/imports/a14116.d(3): Error: module `ice14116.ice14116` from file fail_compilation/ice14116.d must be imported with 'import ice14116.ice14116;'
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14130.d b/gcc/testsuite/gdc.test/fail_compilation/ice14130.d
index 916a7b9..53e35a6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14130.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice14130.d
@@ -2,8 +2,8 @@
TEST_OUTPUT:
---
fail_compilation/ice14130.d(10): Error: undefined identifier `Undef`
-fail_compilation/ice14130.d(14): Error: template ice14130.foo cannot deduce function from argument types !()(int), candidates are:
-fail_compilation/ice14130.d(10): ice14130.foo(R, F = Undef)(R r, F s = 0)
+fail_compilation/ice14130.d(14): Error: template `ice14130.foo` cannot deduce function from argument types `!()(int)`
+fail_compilation/ice14130.d(10): Candidate is: `foo(R, F = Undef)(R r, F s = 0)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14146.d b/gcc/testsuite/gdc.test/fail_compilation/ice14146.d
index 1e4f9a9..f058d1c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14146.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice14146.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice14146.d(15): Error: constructor ice14146.Array.this default constructor for structs only allowed with @disable, no body, and no parameters
+fail_compilation/ice14146.d(15): Error: constructor `ice14146.Array.this` default constructor for structs only allowed with `@disable`, no body, and no parameters
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14177.d b/gcc/testsuite/gdc.test/fail_compilation/ice14177.d
index b487c2b..c7968158 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14177.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice14177.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
----
-fail_compilation/ice14177.d(8): Error: alias ice14177.Primitive recursive alias declaration
+fail_compilation/ice14177.d(8): Error: alias `ice14177.Primitive` recursive alias declaration
----
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14272.d b/gcc/testsuite/gdc.test/fail_compilation/ice14272.d
index d9f642d..ee102fc 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14272.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice14272.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice14272.d(11): Error: circular initialization of variable 'ice14272.A14272!1.A14272.tag'
-fail_compilation/ice14272.d(14): Error: template instance ice14272.A14272!1 error instantiating
+fail_compilation/ice14272.d(11): Error: circular initialization of variable `ice14272.A14272!1.A14272.tag`
+fail_compilation/ice14272.d(14): Error: template instance `ice14272.A14272!1` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14424.d b/gcc/testsuite/gdc.test/fail_compilation/ice14424.d
index 29fe666..c99522d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14424.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice14424.d
@@ -1,8 +1,9 @@
// REQUIRED_ARGS: -o- -unittest
+// EXTRA_FILES: imports/a14424.d
/*
TEST_OUTPUT:
---
-fail_compilation/ice14424.d(12): Error: `tuple` has no effect in expression `tuple(__unittestL3_$n$)`
+fail_compilation/ice14424.d(13): Error: `tuple(__unittest_L3_C1)` has no effect
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14446.d b/gcc/testsuite/gdc.test/fail_compilation/ice14446.d
deleted file mode 100644
index ee0bfc4..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14446.d
+++ /dev/null
@@ -1,14 +0,0 @@
-// REQUIRED_ARGS: -o-
-// PERMUTE_ARGS:
-// EXTRA_SOURCES: extra-files/a14446.d
-
-/*
-TEST_OUTPUT:
----
-fail_compilation/extra-files/a14446.d(5): Error: module x14446 from file fail_compilation/ice14446.d must be imported with 'import x14446;'
----
-*/
-
-module x14446;
-
-struct CDB {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14621.d b/gcc/testsuite/gdc.test/fail_compilation/ice14621.d
index 15690b7..b3d26b8 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14621.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice14621.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice14621.d(22): Error: static assert `false` is false
-fail_compilation/ice14621.d(28): instantiated from here: erroneousTemplateInstantiation!()
+fail_compilation/ice14621.d(22): Error: static assert: `false` is false
+fail_compilation/ice14621.d(28): instantiated from here: `erroneousTemplateInstantiation!()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14642.d b/gcc/testsuite/gdc.test/fail_compilation/ice14642.d
index 07d4963..90b9867 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14642.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice14642.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/ice14642.d(47): Error: undefined identifier `errorValue`
-fail_compilation/ice14642.d(23): Error: template instance ice14642.X.NA!() error instantiating
+fail_compilation/ice14642.d(23): Error: template instance `ice14642.X.NA!()` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14844.d b/gcc/testsuite/gdc.test/fail_compilation/ice14844.d
index d49a1d1..9f602a5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14844.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice14844.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice14844.d(20): Error: template `opDispatch(string name)` has no members
+fail_compilation/ice14844.d(21): Error: In expression `__traits(allMembers, opDispatch)` template `opDispatch(string name)` has no members
+fail_compilation/ice14844.d(21): `opDispatch(string name)` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14907.d b/gcc/testsuite/gdc.test/fail_compilation/ice14907.d
index 6d9edf0..ac4ba68 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14907.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice14907.d
@@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice14907.d(14): Error: struct ice14907.S(int v = S) recursive template expansion
+fail_compilation/ice14907.d(14): Error: struct `ice14907.S(int v = S)` recursive template expansion
fail_compilation/ice14907.d(19): while looking for match for `S!()`
-fail_compilation/ice14907.d(15): Error: template ice14907.f(int v = f)() recursive template expansion
+fail_compilation/ice14907.d(15): Error: template `ice14907.f(int v = f)()` recursive template expansion
fail_compilation/ice14907.d(20): while looking for match for `f!()`
-fail_compilation/ice14907.d(15): Error: template ice14907.f(int v = f)() recursive template expansion
-fail_compilation/ice14907.d(21): Error: template `ice14907.f` cannot deduce function from argument types `!()()`, candidates are:
-fail_compilation/ice14907.d(15): `ice14907.f(int v = f)()`
+fail_compilation/ice14907.d(15): Error: template `ice14907.f(int v = f)()` recursive template expansion
+fail_compilation/ice14907.d(21): Error: template `ice14907.f` cannot deduce function from argument types `!()()`
+fail_compilation/ice14907.d(15): Candidate is: `f(int v = f)()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice14929.d b/gcc/testsuite/gdc.test/fail_compilation/ice14929.d
deleted file mode 100644
index 01edc0d..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/ice14929.d
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-TEST_OUTPUT:
----
-fail_compilation/ice14929.d(45): Error: cast(Node)(*this.current).items[this.index] is not an lvalue
-fail_compilation/ice14929.d(88): Error: template instance ice14929.HashMap!(ulong, int).HashMap.opBinaryRight!"in" error instantiating
-fail_compilation/ice14929.d(92): instantiated from here: HashmapComponentStorage!int
-fail_compilation/ice14929.d(92): Error: template instance ice14929.isComponentStorage!(HashmapComponentStorage!int, int) error instantiating
-fail_compilation/ice14929.d(92): while evaluating: `static assert(isComponentStorage!(HashmapComponentStorage!int, int))`
----
-*/
-
-struct HashMap(K, V)
-{
- V* opBinaryRight(string op)(K key) const if (op == "in")
- {
- size_t index;
- foreach (ref node; buckets[index].range)
- {
- return &(node.value);
- }
- return null;
- }
-
- struct Node
- {
- K key;
- V value;
- }
-
- alias Bucket = UnrolledList!(Node);
- Bucket[] buckets;
-}
-
-struct UnrolledList(T)
-{
- Range range() const pure
- {
- return Range(_front);
- }
-
- static struct Range
- {
- ref T front() const @property
- {
- return cast(T) current.items[index];
- }
- void popFront() pure
- {
- }
- bool empty() const pure @property
- {
- return true;
- }
- const(Node)* current;
- size_t index;
- }
-
- Node* _front;
-
- static struct Node
- {
- ContainerStorageType!T[10] items;
- }
-}
-
-template ContainerStorageType(T)
-{
- alias ContainerStorageType = T;
-}
-
-template isComponentStorage(CS, C)
-{
- enum bool isComponentStorage = is(typeof(
- (inout int = 0)
- {
- CS cs = CS.init;
- ulong eid;
- cs.add(eid, c);
- }));
-}
-
-struct HashmapComponentStorage(ComponentType)
-{
- private HashMap!(ulong, ComponentType) components;
-
- void add(ulong eid, ComponentType component)
- {
- assert(eid !in components);
- }
-}
-
-static assert(isComponentStorage!(HashmapComponentStorage!int, int));
-
-void main()
-{
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice15092.d b/gcc/testsuite/gdc.test/fail_compilation/ice15092.d
index 0064ae3..6824cc1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice15092.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice15092.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice15092.d(13): Error: struct ice15092.A.S conflicts with struct ice15092.A.S at fail_compilation/ice15092.d(12)
-fail_compilation/ice15092.d(16): Error: class ice15092.A.C conflicts with class ice15092.A.C at fail_compilation/ice15092.d(15)
-fail_compilation/ice15092.d(19): Error: interface ice15092.A.I conflicts with interface ice15092.A.I at fail_compilation/ice15092.d(18)
+fail_compilation/ice15092.d(13): Error: struct `ice15092.A.S` conflicts with struct `ice15092.A.S` at fail_compilation/ice15092.d(12)
+fail_compilation/ice15092.d(16): Error: class `ice15092.A.C` conflicts with class `ice15092.A.C` at fail_compilation/ice15092.d(15)
+fail_compilation/ice15092.d(19): Error: interface `ice15092.A.I` conflicts with interface `ice15092.A.I` at fail_compilation/ice15092.d(18)
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice15172.d b/gcc/testsuite/gdc.test/fail_compilation/ice15172.d
index dc8ae94..aa070f6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice15172.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice15172.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice15172.d(14): Error: constructor ice15172.ThreadError.this no match for implicit super() call in constructor
+fail_compilation/ice15172.d(14): Error: constructor `ice15172.ThreadError.this` no match for implicit `super()` call in constructor
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice15332.d b/gcc/testsuite/gdc.test/fail_compilation/ice15332.d
index 4141178..dbedc73 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice15332.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice15332.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice15332.d(16): Error: need 'this' for 'fun' of type 'int()'
-fail_compilation/ice15332.d(17): Error: need 'this' for 'var' of type 'int'
+fail_compilation/ice15332.d(16): Error: need `this` for `fun` of type `int()`
+fail_compilation/ice15332.d(17): Error: need `this` for `var` of type `int`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice15441.d b/gcc/testsuite/gdc.test/fail_compilation/ice15441.d
index ef4369b..97fd170 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice15441.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice15441.d
@@ -1,10 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice15441.d(24): Error: variable ice15441.main.__front$n$ type void is inferred from initializer __r$n$.front(), and variables cannot be of type void
-fail_compilation/ice15441.d(24): Error: expression __r$n$.front() is void and has no value
-fail_compilation/ice15441.d(24): Error: `s1.front` is void and has no value
-fail_compilation/ice15441.d(27): Error: cannot infer argument types, expected 1 argument, not 2
+fail_compilation/ice15441.d(22): Error: `s1.front` is `void` and has no value
+fail_compilation/ice15441.d(25): Error: cannot infer argument types, expected 1 argument, not 2
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice15688.d b/gcc/testsuite/gdc.test/fail_compilation/ice15688.d
index 92810e6..e086e31 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice15688.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice15688.d
@@ -3,7 +3,7 @@
TEST_OUTPUT:
---
fail_compilation/ice15688.d(12): Error: undefined identifier `mappings`
-fail_compilation/ice15688.d(12): Error: function expected before (), not 0 of type int
+fail_compilation/ice15688.d(12): Error: function expected before `()`, not `0` of type `int`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice15788.d b/gcc/testsuite/gdc.test/fail_compilation/ice15788.d
index e81f25b..941b179 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice15788.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice15788.d
@@ -1,7 +1,8 @@
/*
+EXTRA_FILES: imports/range15788.d
TEST_OUTPUT:
---
-fail_compilation/ice15788.d(17): Error: none of the overloads of 'iota' are callable using argument types !()(S, S)
+fail_compilation/ice15788.d(18): Error: none of the overloads of `iota` are callable using argument types `!()(S, S)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice15816.d b/gcc/testsuite/gdc.test/fail_compilation/ice15816.d
index b9e1e47..9576b56 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice15816.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice15816.d
@@ -1,4 +1,5 @@
/*
+EXTRA_FILES: imports/a15816.d
TEST_OUTPUT:
---
fail_compilation/imports/a15816.d(3): Error: anonymous classes not allowed
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice15922.d b/gcc/testsuite/gdc.test/fail_compilation/ice15922.d
index c9739a1..d98404c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice15922.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice15922.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice15922.d(23): Error: function ice15922.ValidSparseDataStore!int.ValidSparseDataStore.correctedInsert!false.correctedInsert has no return statement, but is expected to return a value of type int
-fail_compilation/ice15922.d(21): Error: template instance ice15922.ValidSparseDataStore!int.ValidSparseDataStore.correctedInsert!false error instantiating
-fail_compilation/ice15922.d(26): instantiated from here: ValidSparseDataStore!int
-fail_compilation/ice15922.d(14): Error: need 'this' for 'insert' of type 'pure @nogc @safe int()'
-fail_compilation/ice15922.d(26): Error: template instance ice15922.StorageAttributes!(ValidSparseDataStore!int) error instantiating
+fail_compilation/ice15922.d(23): Error: function `ice15922.ValidSparseDataStore!int.ValidSparseDataStore.correctedInsert!false.correctedInsert` has no `return` statement, but is expected to return a value of type `int`
+fail_compilation/ice15922.d(21): Error: template instance `ice15922.ValidSparseDataStore!int.ValidSparseDataStore.correctedInsert!false` error instantiating
+fail_compilation/ice15922.d(26): instantiated from here: `ValidSparseDataStore!int`
+fail_compilation/ice15922.d(14): Error: need `this` for `insert` of type `pure nothrow @nogc @safe int()`
+fail_compilation/ice15922.d(26): Error: template instance `ice15922.StorageAttributes!(ValidSparseDataStore!int)` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice16035.d b/gcc/testsuite/gdc.test/fail_compilation/ice16035.d
index 9ad1a4e..8361c42 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice16035.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice16035.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice16035.d(18): Error: forward reference to inferred return type of function call 'this.a[0].toString()'
-fail_compilation/ice16035.d(13): Error: template instance ice16035.Value.get!string error instantiating
+fail_compilation/ice16035.d(18): Error: forward reference to inferred return type of function call `this.a[0].toString()`
+fail_compilation/ice16035.d(13): Error: template instance `ice16035.Value.get!string` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice16657.d b/gcc/testsuite/gdc.test/fail_compilation/ice16657.d
new file mode 100644
index 0000000..19231c2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice16657.d
@@ -0,0 +1,16 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice16657.d(9): Error: function `ice16657.RefCounted.refCountedPayload` has no `return` statement, but is expected to return a value of type `inout(RefCounted)`
+---
+*/
+struct RefCounted
+{
+ inout(RefCounted) refCountedPayload() inout { }
+ alias refCountedPayload this;
+}
+
+struct Store
+{
+ RefCounted p;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice17074.d b/gcc/testsuite/gdc.test/fail_compilation/ice17074.d
index b41b25a..84c4d85 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice17074.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice17074.d
@@ -1,39 +1,13 @@
/*
-TEST_OUTPUT:
----
-fail_compilation/ice17074.d(9): Error: identifier expected for C++ namespace
-fail_compilation/ice17074.d(9): Error: found `cast` when expecting `)`
-fail_compilation/ice17074.d(9): Error: declaration expected, not `)`
----
-*/
-extern(C++, cast) void ice_keyword();
-
-/*
-TEST_OUTPUT:
----
-fail_compilation/ice17074.d(19): Error: identifier expected for C++ namespace
-fail_compilation/ice17074.d(19): Error: found `__overloadset` when expecting `)`
-fail_compilation/ice17074.d(19): Error: declaration expected, not `)`
----
*/
extern(C++, std.__overloadset) void ice_std_keyword();
/*
TEST_OUTPUT:
---
-fail_compilation/ice17074.d(29): Error: identifier expected for C++ namespace
-fail_compilation/ice17074.d(29): Error: found `...` when expecting `)`
-fail_compilation/ice17074.d(29): Error: declaration expected, not `)`
----
-*/
-extern(C++, ...) void ice_token();
-
-/*
-TEST_OUTPUT:
----
-fail_compilation/ice17074.d(39): Error: identifier expected for C++ namespace
-fail_compilation/ice17074.d(39): Error: found `*` when expecting `)`
-fail_compilation/ice17074.d(39): Error: declaration expected, not `)`
+fail_compilation/ice17074.d(13): Error: identifier expected for C++ namespace
+fail_compilation/ice17074.d(13): Error: found `*` when expecting `)`
+fail_compilation/ice17074.d(13): Error: declaration expected, not `)`
---
*/
extern(C++, std.*) void ice_std_token();
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice17831.d b/gcc/testsuite/gdc.test/fail_compilation/ice17831.d
index 15b8502..41abbf7 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice17831.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice17831.d
@@ -1,12 +1,16 @@
-// REQUIRED_ARGS: -d
/*
TEST_OUTPUT:
---
-fail_compilation/ice17831.d(19): Error: case variable `i` declared at fail_compilation/ice17831.d(17) cannot be declared in switch body
-fail_compilation/ice17831.d(33): Error: case variable `i` declared at fail_compilation/ice17831.d(31) cannot be declared in switch body
-fail_compilation/ice17831.d(48): Error: case variable `i` declared at fail_compilation/ice17831.d(45) cannot be declared in switch body
-fail_compilation/ice17831.d(61): Error: case variable `i` declared at fail_compilation/ice17831.d(60) cannot be declared in switch body
-fail_compilation/ice17831.d(73): Error: case variable `i` declared at fail_compilation/ice17831.d(72) cannot be declared in switch body
+fail_compilation/ice17831.d(23): Error: `case` variables have to be `const` or `immutable`
+fail_compilation/ice17831.d(23): Error: `case` variable `i` declared at fail_compilation/ice17831.d(21) cannot be declared in `switch` body
+fail_compilation/ice17831.d(37): Error: `case` variables have to be `const` or `immutable`
+fail_compilation/ice17831.d(37): Error: `case` variable `i` declared at fail_compilation/ice17831.d(35) cannot be declared in `switch` body
+fail_compilation/ice17831.d(52): Error: `case` variables have to be `const` or `immutable`
+fail_compilation/ice17831.d(52): Error: `case` variable `i` declared at fail_compilation/ice17831.d(49) cannot be declared in `switch` body
+fail_compilation/ice17831.d(65): Error: `case` variables have to be `const` or `immutable`
+fail_compilation/ice17831.d(65): Error: `case` variable `i` declared at fail_compilation/ice17831.d(64) cannot be declared in `switch` body
+fail_compilation/ice17831.d(77): Error: `case` variables have to be `const` or `immutable`
+fail_compilation/ice17831.d(77): Error: `case` variable `i` declared at fail_compilation/ice17831.d(76) cannot be declared in `switch` body
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice18469.d b/gcc/testsuite/gdc.test/fail_compilation/ice18469.d
new file mode 100644
index 0000000..8803956
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice18469.d
@@ -0,0 +1,13 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice18469.d(10): Error: no property `opCall` for type `void`
+---
+*/
+class Bar
+{
+ ~this(){}
+ this(){alias T = typeof(Bar.__dtor.opCall);}
+}
+
+void main() {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice18753.d b/gcc/testsuite/gdc.test/fail_compilation/ice18753.d
new file mode 100644
index 0000000..300eab2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice18753.d
@@ -0,0 +1,39 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice18753.d(21): Error: variable `ice18753.isInputRange!(Group).isInputRange` type `void` is inferred from initializer `ReturnType(func...)`, and variables cannot be of type `void`
+fail_compilation/ice18753.d(23): Error: template instance `ice18753.isInputRange!(Group)` error instantiating
+fail_compilation/ice18753.d(18): instantiated from here: `isForwardRange!(Group)`
+fail_compilation/ice18753.d(18): while evaluating: `static assert(isForwardRange!(Group))`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=18753
+
+struct ChunkByImpl
+{
+ struct Group
+ { }
+
+ static assert(isForwardRange!Group);
+}
+
+enum isInputRange(R) = ReturnType;
+
+enum isForwardRange(R) = isInputRange!R is ReturnType!(() => r);
+
+template ReturnType(func...)
+{
+ static if (is(FunctionTypeOf!func R == return))
+ ReturnType R;
+}
+
+template FunctionTypeOf(func...)
+{
+ static if (is(typeof(func[0]) T))
+ static if (is(T Fptr ) )
+ alias FunctionTypeOf = Fptr;
+}
+
+template Select()
+{ }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice18803a.d b/gcc/testsuite/gdc.test/fail_compilation/ice18803a.d
new file mode 100644
index 0000000..5ec5a81
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice18803a.d
@@ -0,0 +1,9 @@
+/*
+EXTRA_FILES: ice18803b.d
+TEST_OUTPUT:
+---
+fail_compilation/ice18803b.d(9): Error: (expression) expected following `static if`
+fail_compilation/ice18803b.d(9): Error: declaration expected following attribute, not end of file
+---
+*/
+void main() { import ice18803b; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice18803b.d b/gcc/testsuite/gdc.test/fail_compilation/ice18803b.d
new file mode 100644
index 0000000..cfc38c5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice18803b.d
@@ -0,0 +1,8 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice18803b.d(9): Error: (expression) expected following `static if`
+fail_compilation/ice18803b.d(9): Error: declaration expected following attribute, not end of file
+---
+*/
+static if
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice19295.d b/gcc/testsuite/gdc.test/fail_compilation/ice19295.d
new file mode 100644
index 0000000..a92f5f8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice19295.d
@@ -0,0 +1,18 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice19295.d(11): Error: `this` for `gun` needs to be type `S2` not type `S1!(gun)`
+fail_compilation/ice19295.d(11): while evaluating `pragma(msg, &gun)`
+fail_compilation/ice19295.d(17): Error: template instance `ice19295.S1!(gun)` error instantiating
+---
+*/
+struct S1(T...) {
+ auto fun() {
+ pragma(msg, &T[0]);
+ }
+}
+
+struct S2 {
+ void gun() {}
+ S1!gun overloaded;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice19755.d b/gcc/testsuite/gdc.test/fail_compilation/ice19755.d
new file mode 100644
index 0000000..f948477
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice19755.d
@@ -0,0 +1,16 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/ice19755.d(11): Error: no property `x` for type `ice19755.Thunk!int*`
+fail_compilation/ice19755.d(16): Error: template instance `ice19755.Thunk!int` error instantiating
+---
+*/
+struct Thunk(Dummy) {
+ void opAssign(int dlg) {}
+ auto get() inout {
+ Thunk* self;
+ self.x = 0;
+ }
+ alias get this;
+}
+
+alias T = Thunk!int;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice19762.d b/gcc/testsuite/gdc.test/fail_compilation/ice19762.d
new file mode 100644
index 0000000..a484327
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice19762.d
@@ -0,0 +1,17 @@
+// EXTRA_FILES: imports/b19762.d imports/c19762.d
+// PERMUTE_ARGS: -g
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice19762.d(13): Error: struct `ice19762.X` had semantic errors when compiling
+---
+*/
+
+module ice19762;
+
+struct X
+{
+ import imports.b19762 : Baz;
+ Err err;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice19887.d b/gcc/testsuite/gdc.test/fail_compilation/ice19887.d
new file mode 100644
index 0000000..a323d08
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice19887.d
@@ -0,0 +1,14 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice19887.d(9): Error: initializer must be an expression, not `(void)`
+---
+*/
+module ice19887;
+
+void func(AliasSeq!(int) params = AliasSeq!(void)) {}
+
+template AliasSeq(TList...)
+{
+ alias AliasSeq = TList;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice19950.d b/gcc/testsuite/gdc.test/fail_compilation/ice19950.d
new file mode 100644
index 0000000..dc930d5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice19950.d
@@ -0,0 +1,13 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice19950.d(8): Error: undefined identifier `NotHere`
+fail_compilation/ice19950.d(9): Error: template instance `ice19950.baz!()` does not match template declaration `baz()(Foo)`
+---
+*/
+alias Foo = NotHere;
+alias Bar = baz!();
+
+void baz()(Foo)
+ if (true)
+{}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice20042.d b/gcc/testsuite/gdc.test/fail_compilation/ice20042.d
new file mode 100644
index 0000000..6b71903
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice20042.d
@@ -0,0 +1,29 @@
+/*
+DISABLED: freebsd32 linux32 osx32 win32
+TEST_OUTPUT:
+---
+fail_compilation/ice20042.d(18): Error: slice operation `cast(__vector(float[4]))[nanF, nanF, nanF, nanF] = [1.0F, 2.0F, 3.0F, 4.0F][0..4]` cannot be evaluated at compile time
+fail_compilation/ice20042.d(25): called from here: `Vec4(cast(__vector(float[4]))[nanF, nanF, nanF, nanF]).this([1.0F, 2.0F, 3.0F, 4.0F])`
+---
+*/
+void write(T...)(T t){}
+
+struct Vec4
+{
+ __vector(float[4]) raw;
+
+ this(const(float[4]) value...) inout pure @safe nothrow @nogc
+ {
+ __vector(float[4]) raw;
+ raw[] = value[];
+ this.raw = raw;
+ }
+}
+
+void main()
+{
+ static immutable Vec4 v = Vec4( 1.0f, 2.0f, 3.0f, 4.0f );
+
+ static foreach(d; 0 .. 4)
+ write(v.raw[d], " ");
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice20056.d b/gcc/testsuite/gdc.test/fail_compilation/ice20056.d
new file mode 100644
index 0000000..1b991ca
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice20056.d
@@ -0,0 +1,25 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice20056.d(19): Error: need `this` for `iter` of type `void()`
+---
+*/
+struct Def(alias fn)
+{
+ alias func = alias_selector!(fn).VOverloads[0];
+}
+
+template alias_selector(alias fn)
+{
+ alias VOverloads = __traits(getOverloads, __traits(parent, fn), __traits(identifier, fn));
+}
+
+void init_rangewrapper()
+{
+ Def!(RangeWrapper.iter).func;
+}
+
+struct RangeWrapper
+{
+ void iter() { }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice20057.d b/gcc/testsuite/gdc.test/fail_compilation/ice20057.d
new file mode 100644
index 0000000..617e07c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice20057.d
@@ -0,0 +1,17 @@
+/*
+EXTRA_FILES: imports/i20057.d
+TEST_OUTPUT:
+---
+fail_compilation/ice20057.d(10): Error: alias `ice20057.BlackHole` conflicts with struct `ice20057.BlackHole(alias T)` at fail_compilation/ice20057.d(9)
+---
+*/
+
+struct BlackHole(alias T){T t;}
+import imports.i20057: BlackHole;
+
+extern(C++) interface Inter
+{
+ void func();
+}
+
+BlackHole!Inter var;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice20264.d b/gcc/testsuite/gdc.test/fail_compilation/ice20264.d
new file mode 100644
index 0000000..0d697e2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice20264.d
@@ -0,0 +1,13 @@
+/*
+DISABLED: freebsd32 linux32 osx32 win32
+TEST_OUTPUT:
+---
+fail_compilation/ice20264.d(12): Error: `cast(__vector(float[4]))a` is not an lvalue and cannot be modified
+---
+*/
+
+void foo(float *a)
+{
+ alias float4 = __vector(float[4]);
+ cast(float4)(a) = 1.0f;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice20545.d b/gcc/testsuite/gdc.test/fail_compilation/ice20545.d
new file mode 100644
index 0000000..26bd320
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice20545.d
@@ -0,0 +1,8 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice20545.d(8): Error: initializer expression expected following colon, not `]`
+---
+*/
+
+static initial = [{ }: ];
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice20709.d b/gcc/testsuite/gdc.test/fail_compilation/ice20709.d
new file mode 100644
index 0000000..cc36de9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice20709.d
@@ -0,0 +1,14 @@
+/*
+EXTRA_FILES: imports/imp20709.d
+TEST_OUTPUT:
+---
+fail_compilation/ice20709.d(10): Error: module `imp20709` import `Point` not found
+---
+*/
+module ice20709;
+
+import imports.imp20709 : Point;
+
+immutable Point aPoint = somePoint;
+
+Point somePoint() {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice21095.d b/gcc/testsuite/gdc.test/fail_compilation/ice21095.d
new file mode 100644
index 0000000..0d87d63
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice21095.d
@@ -0,0 +1,15 @@
+// https://issues.dlang.org/show_bug.cgi?id=21095
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice21095.d(14): Error: constructor `ice21095.Mutex.__ctor!().this` `in` and `out` contracts can only appear without a body when they are virtual interface functions or abstract
+fail_compilation/ice21095.d(12): Error: template instance `ice21095.Mutex.__ctor!()` error instantiating
+---
+*/
+class Mutex
+{
+ this(Object obj) {
+ this(obj, true);
+ }
+ this()(Object, bool) in { }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice22377.d b/gcc/testsuite/gdc.test/fail_compilation/ice22377.d
new file mode 100644
index 0000000..4616f99
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice22377.d
@@ -0,0 +1,8 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/ice22377.d(8): Error: Internal Compiler Error: type `string` cannot be mapped to C++
+---
+*/
+
+extern(C++) void foo(string a) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice22516.d b/gcc/testsuite/gdc.test/fail_compilation/ice22516.d
new file mode 100644
index 0000000..1c71f38
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice22516.d
@@ -0,0 +1,21 @@
+/++
+https://issues.dlang.org/show_bug.cgi?id=22516
+
+TEST_OUTPUT:
+---
+fail_compilation/ice22516.d(18): Error: undefined identifier `X`
+---
++/
+
+struct Data
+{
+ void function() eval;
+
+}
+
+struct Builtins
+{
+ X x;
+
+ Data myData = { (){} };
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice2843.d b/gcc/testsuite/gdc.test/fail_compilation/ice2843.d
index c0c3797..cf53e5d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice2843.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice2843.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice2843.d(22): Error: incompatible types for ((1) is (typeid(int))): 'int' and 'object.TypeInfo'
+fail_compilation/ice2843.d(22): Error: incompatible types for `(1) is (typeid(int))`: `int` and `object.TypeInfo`
---
*/
-// Issue 2843 - ICE(constfold.c) with is-expression with invalid dot-expression in is-expression involving typeid expression
-
+// https://issues.dlang.org/show_bug.cgi?id=2843
+// ICE(constfold.c) with is-expression with invalid dot-expression in is-expression involving typeid expression
/* 2843 Assertion failure: '0' on line 863 in file 'constfold.c'
PATCH: constfold.c, line 861:
OLD:
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice4094.d b/gcc/testsuite/gdc.test/fail_compilation/ice4094.d
index cd41e65..61108c4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice4094.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice4094.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice4094.d(11): Error: circular reference to variable 'ice4094.Zug!0.Zug.bahn'
-fail_compilation/ice4094.d(19): Error: template instance ice4094.Zug!0 error instantiating
+fail_compilation/ice4094.d(11): Error: circular reference to variable `ice4094.Zug!0.Zug.bahn`
+fail_compilation/ice4094.d(19): Error: template instance `ice4094.Zug!0` error instantiating
---
*/
// REQUIRED_ARGS: -d
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice4983.d b/gcc/testsuite/gdc.test/fail_compilation/ice4983.d
index 1925c17..00fa95c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice4983.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice4983.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice4983.d(14): Error: circular reference to 'ice4983.Foo.dg'
+fail_compilation/ice4983.d(14): Error: circular reference to `ice4983.Foo.dg`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice6538.d b/gcc/testsuite/gdc.test/fail_compilation/ice6538.d
index dad6491..0715db5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice6538.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice6538.d
@@ -1,14 +1,14 @@
/**************************************/
-// 9361
+// https://issues.dlang.org/show_bug.cgi?id=9361
/*
TEST_OUTPUT:
---
-fail_compilation/ice6538.d(23): Error: expression super is not a valid template value argument
-fail_compilation/ice6538.d(28): Error: template ice6538.D.foo cannot deduce function from argument types !()(), candidates are:
-fail_compilation/ice6538.d(23): ice6538.D.foo()() if (Sym!(super))
+fail_compilation/ice6538.d(23): Error: expression `super` is not a valid template value argument
+fail_compilation/ice6538.d(28): Error: template `ice6538.D.foo` cannot deduce function from argument types `!()()`
+fail_compilation/ice6538.d(23): Candidate is: `foo()()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice7645.d b/gcc/testsuite/gdc.test/fail_compilation/ice7645.d
index 1aa3fad..379ac67 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice7645.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice7645.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice7645.d(28): Error: need 'this' for 't' of type 'char'
-fail_compilation/ice7645.d(31): Error: need 'this' for 'fn' of type 'pure nothrow @nogc @safe void()'
+fail_compilation/ice7645.d(28): Error: need `this` for `t` of type `char`
+fail_compilation/ice7645.d(31): Error: need `this` for `fn` of type `pure nothrow @nogc @safe void()`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice7782.d b/gcc/testsuite/gdc.test/fail_compilation/ice7782.d
index d42011a..551933b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice7782.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice7782.d
@@ -2,7 +2,8 @@
EXTRA_FILES: imports/ice7782algorithm.d imports/ice7782range.d
TEST_OUTPUT:
----
-fail_compilation/ice7782.d(13): Error: module `ice7782math` is in file 'imports/ice7782range/imports/ice7782math.d' which cannot be read
+fail_compilation/ice7782.d(14): Error: unable to read module `ice7782math`
+fail_compilation/ice7782.d(14): Expected 'imports/ice7782range/imports/ice7782math.d' or 'imports/ice7782range/imports/ice7782math/package.d' in one of the following import paths:
import path[0] = fail_compilation
import path[1] = $p:druntime/import$
import path[2] = $p:phobos$
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice8100.d b/gcc/testsuite/gdc.test/fail_compilation/ice8100.d
index 1e7d56b..dc68cfc 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice8100.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice8100.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice8100.d(10): Error: no property 'Q' for type 'ice8100.Bar!bool'
-fail_compilation/ice8100.d(11): Error: template instance ice8100.Foo!(Bar!bool) error instantiating
-fail_compilation/ice8100.d(12): instantiated from here: Bar!bool
+fail_compilation/ice8100.d(10): Error: no property `Q` for type `ice8100.Bar!bool`
+fail_compilation/ice8100.d(11): Error: template instance `ice8100.Foo!(Bar!bool)` error instantiating
+fail_compilation/ice8100.d(12): instantiated from here: `Bar!bool`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice8255.d b/gcc/testsuite/gdc.test/fail_compilation/ice8255.d
deleted file mode 100644
index 0db3abc..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/ice8255.d
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
-TEST_OUTPUT:
----
-fail_compilation/ice8255.d(11): Error: function `ice8255.F!(G).F.f(ref G _param_0)` is not callable using argument types `(G)`
-fail_compilation/ice8255.d(11): cannot pass rvalue argument `G()` of type `G` to parameter `ref G _param_0`
-fail_compilation/ice8255.d(11): while evaluating `pragma(msg, F().f(G()))`
----
-*/
-struct G {}
-struct F(T) { void f(ref T) {} }
-pragma(msg, F!G().f(G.init));
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice8309.d b/gcc/testsuite/gdc.test/fail_compilation/ice8309.d
index 5d5bb83..2446914 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice8309.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice8309.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice8309.d(10): Error: incompatible types for ((__lambda1) : (__lambda2)): 'double function() pure nothrow @nogc @safe' and 'int function() pure nothrow @nogc @safe'
+fail_compilation/ice8309.d(10): Error: incompatible types for `(__lambda1) : (__lambda2)`: `double function() pure nothrow @nogc @safe` and `int function() pure nothrow @nogc @safe`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice8711.d b/gcc/testsuite/gdc.test/fail_compilation/ice8711.d
index c143929..d6674c4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice8711.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice8711.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice8711.d(8): Error: cannot use array to initialize int function(int)
+fail_compilation/ice8711.d(8): Error: cannot use array to initialize `int function(int)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice8795.d b/gcc/testsuite/gdc.test/fail_compilation/ice8795.d
index 29eabbf..5d7d6dd 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice8795.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice8795.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice8795.d-mixin-14(14): Error: found `EOF` when expecting `(`
-fail_compilation/ice8795.d-mixin-14(14): Error: expression expected, not `EOF`
-fail_compilation/ice8795.d-mixin-14(14): Error: found `EOF` when expecting `)`
-fail_compilation/ice8795.d-mixin-14(14): Error: found `EOF` instead of statement
+fail_compilation/ice8795.d-mixin-14(14): Error: found `End of File` when expecting `(`
+fail_compilation/ice8795.d-mixin-14(14): Error: expression expected, not `End of File`
+fail_compilation/ice8795.d-mixin-14(14): Error: found `End of File` when expecting `)`
+fail_compilation/ice8795.d-mixin-14(14): Error: found `End of File` instead of statement
fail_compilation/ice8795.d-mixin-15(15): Error: { } expected following `interface` declaration
fail_compilation/ice8795.d-mixin-15(15): Error: anonymous interfaces not allowed
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9273a.d b/gcc/testsuite/gdc.test/fail_compilation/ice9273a.d
index 91f22d4..c2f44a3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice9273a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice9273a.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice9273a.d(19): Error: constructor ice9273a.C.__ctor!().this no match for implicit super() call in constructor
-fail_compilation/ice9273a.d(23): Error: template instance ice9273a.C.__ctor!() error instantiating
+fail_compilation/ice9273a.d(19): Error: constructor `ice9273a.C.__ctor!().this` no match for implicit `super()` call in constructor
+fail_compilation/ice9273a.d(23): Error: template instance `ice9273a.C.__ctor!()` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9273b.d b/gcc/testsuite/gdc.test/fail_compilation/ice9273b.d
index 1a779fa..2d05724 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice9273b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice9273b.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice9273b.d(14): Error: constructor ice9273b.B.this no match for implicit super() call in constructor
+fail_compilation/ice9273b.d(14): Error: constructor `ice9273b.B.this` no match for implicit `super()` call in constructor
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9284.d b/gcc/testsuite/gdc.test/fail_compilation/ice9284.d
index 0c95bd8..a6d84ae 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice9284.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice9284.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice9284.d(14): Error: template ice9284.C.__ctor cannot deduce function from argument types !()(int), candidates are:
-fail_compilation/ice9284.d(12): ice9284.C.__ctor()(string)
-fail_compilation/ice9284.d(20): Error: template instance ice9284.C.__ctor!() error instantiating
+fail_compilation/ice9284.d(14): Error: template `ice9284.C.__ctor` cannot deduce function from argument types `!()(int)`
+fail_compilation/ice9284.d(12): Candidate is: `__ctor()(string)`
+fail_compilation/ice9284.d(20): Error: template instance `ice9284.C.__ctor!()` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9338.d b/gcc/testsuite/gdc.test/fail_compilation/ice9338.d
index 292c059..5f77817 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice9338.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice9338.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice9338.d(13): Error: value of 'this' is not known at compile time
-fail_compilation/ice9338.d(14): Error: value of 'this' is not known at compile time
+fail_compilation/ice9338.d(13): Error: value of `this` is not known at compile time
+fail_compilation/ice9338.d(14): Error: value of `this` is not known at compile time
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9439.d b/gcc/testsuite/gdc.test/fail_compilation/ice9439.d
index 51b84e8..a9e7008 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice9439.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice9439.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice9439.d(12): Error: this for foo needs to be type Derived not type ice9439.Base
+fail_compilation/ice9439.d(12): Error: `this` for `foo` needs to be type `Derived` not type `ice9439.Base`
fail_compilation/ice9439.d(12): while evaluating: `static assert((__error).foo())`
-fail_compilation/ice9439.d(19): Error: template instance ice9439.Base.boo!(foo) error instantiating
+fail_compilation/ice9439.d(19): Error: template instance `ice9439.Base.boo!(foo)` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9494.d b/gcc/testsuite/gdc.test/fail_compilation/ice9494.d
index b2743e5..732b88a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice9494.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice9494.d
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice9494.d(10): Error: circular reference to variable 'ice9494.test'
-fail_compilation/ice9494.d(14): Error: circular reference to variable 'ice9494.Foo.test'
-fail_compilation/ice9494.d(19): Error: circular reference to variable 'ice9494.Bar.test'
+fail_compilation/ice9494.d(10): Error: circular reference to variable `ice9494.test`
+fail_compilation/ice9494.d(14): Error: circular reference to variable `ice9494.Foo.test`
+fail_compilation/ice9494.d(19): Error: circular reference to variable `ice9494.Bar.test`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9545.d b/gcc/testsuite/gdc.test/fail_compilation/ice9545.d
index 846975a..7360bc5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice9545.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice9545.d
@@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
----
-fail_compilation/ice9545.d(13): Error: type int has no value
+fail_compilation/ice9545.d(13): Error: type `int` has no value
----
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9759.d b/gcc/testsuite/gdc.test/fail_compilation/ice9759.d
index 300540c..6608b58 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice9759.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice9759.d
@@ -1,7 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ice9759.d(24): Error: mutable method ice9759.Json.opAssign is not callable using a const object
+fail_compilation/ice9759.d(25): Error: mutable method `ice9759.Json.opAssign` is not callable using a `const` object
+fail_compilation/ice9759.d(17): Consider adding `const` or `inout` here
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9806.d b/gcc/testsuite/gdc.test/fail_compilation/ice9806.d
index 5f00fcc..40e6273 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice9806.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice9806.d
@@ -2,11 +2,11 @@
TEST_OUTPUT:
---
fail_compilation/ice9806.d(12): Error: undefined identifier `undefined_expr`
-fail_compilation/ice9806.d(17): Error: template instance ice9806.S1!() error instantiating
+fail_compilation/ice9806.d(17): Error: template instance `ice9806.S1!()` error instantiating
fail_compilation/ice9806.d(13): Error: undefined identifier `undefined_expr`
-fail_compilation/ice9806.d(19): Error: template instance ice9806.C1!() error instantiating
+fail_compilation/ice9806.d(19): Error: template instance `ice9806.C1!()` error instantiating
fail_compilation/ice9806.d(14): Error: undefined identifier `undefined_expr`
-fail_compilation/ice9806.d(21): Error: template instance ice9806.I1!() error instantiating
+fail_compilation/ice9806.d(21): Error: template instance `ice9806.I1!()` error instantiating
---
*/
struct S1() { enum x = undefined_expr; }
@@ -26,11 +26,11 @@ void test1() {
TEST_OUTPUT:
---
fail_compilation/ice9806.d(36): Error: undefined identifier `undefined_expr`
-fail_compilation/ice9806.d(44): Error: template instance ice9806.S2!() error instantiating
+fail_compilation/ice9806.d(44): Error: template instance `ice9806.S2!()` error instantiating
fail_compilation/ice9806.d(37): Error: undefined identifier `undefined_expr`
-fail_compilation/ice9806.d(46): Error: template instance ice9806.C2!() error instantiating
+fail_compilation/ice9806.d(46): Error: template instance `ice9806.C2!()` error instantiating
fail_compilation/ice9806.d(38): Error: undefined identifier `undefined_expr`
-fail_compilation/ice9806.d(48): Error: template instance ice9806.I2!() error instantiating
+fail_compilation/ice9806.d(48): Error: template instance `ice9806.I2!()` error instantiating
---
*/
int foo2()() { return undefined_expr; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9865.d b/gcc/testsuite/gdc.test/fail_compilation/ice9865.d
index 846ba2e..3d8e997 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ice9865.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ice9865.d
@@ -1,7 +1,8 @@
/*
+EXTRA_FILES: imports/ice9865b.d
TEST_OUTPUT:
---
-fail_compilation/ice9865.d(8): Error: alias ice9865.Baz recursive alias declaration
+fail_compilation/ice9865.d(9): Error: alias `ice9865.Baz` recursive alias declaration
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/impconv.d b/gcc/testsuite/gdc.test/fail_compilation/impconv.d
new file mode 100644
index 0000000..cb1cb8e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/impconv.d
@@ -0,0 +1,40 @@
+/*
+FIXME: DMD host compilers < 2.073 with faulty optimization
+lead to unfortunate test failures, see
+https://github.com/dlang/dmd/pull/6831#issuecomment-304495842.
+
+DISABLED: win32 win64 linux osx freebsd
+*/
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/impconv.d(30): Error: function `impconv.foo_float(float)` is not callable using argument types `(int)`
+fail_compilation/impconv.d(30): cannot pass argument `-2147483647` of type `int` to parameter `float`
+fail_compilation/impconv.d(31): Error: function `impconv.foo_float(float)` is not callable using argument types `(uint)`
+fail_compilation/impconv.d(31): cannot pass argument `4294967295u` of type `uint` to parameter `float`
+fail_compilation/impconv.d(34): Error: function `impconv.foo_double(double)` is not callable using argument types `(long)`
+fail_compilation/impconv.d(34): cannot pass argument `-9223372036854775807L` of type `long` to parameter `double`
+fail_compilation/impconv.d(35): Error: function `impconv.foo_double(double)` is not callable using argument types `(ulong)`
+fail_compilation/impconv.d(35): cannot pass argument `18446744073709551615LU` of type `ulong` to parameter `double`
+---
+*/
+
+void foo_float(float);
+void foo_double(double);
+void foo_real(real);
+
+void main()
+{
+ foo_float(1); // implicitly convertible to float
+ foo_float(-int.max); // -(2^31 - 1)
+ foo_float(uint.max); // 2^32 - 1
+
+ foo_double(int.max); // implicitly convertible to double
+ foo_double(-long.max); // -(2^63 - 1)
+ foo_double(ulong.max); // 2^64 - 1
+
+ foo_real(0xffff_ffff_ffffL); // 2^48 - 1, implicitly convertible to real
+ static assert(__traits(compiles, foo_real(-long.max)) == (real.mant_dig >= 63));
+ static assert(__traits(compiles, foo_real(ulong.max)) == (real.mant_dig >= 64));
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imphint.d b/gcc/testsuite/gdc.test/fail_compilation/imphint.d
index 2b3abeb..101e786 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/imphint.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/imphint.d
@@ -1,12 +1,50 @@
/*
TEST_OUTPUT:
---
-fail_compilation/imphint.d(14): Error: 'printf' is not defined, perhaps you need to import core.stdc.stdio; ?
-fail_compilation/imphint.d(15): Error: 'writeln' is not defined, perhaps you need to import std.stdio; ?
-fail_compilation/imphint.d(16): Error: 'sin' is not defined, perhaps you need to import std.math; ?
-fail_compilation/imphint.d(17): Error: 'cos' is not defined, perhaps you need to import std.math; ?
-fail_compilation/imphint.d(18): Error: 'sqrt' is not defined, perhaps you need to import std.math; ?
-fail_compilation/imphint.d(19): Error: 'fabs' is not defined, perhaps you need to import std.math; ?
+fail_compilation/imphint.d(53): Error: `printf` is not defined, perhaps `import core.stdc.stdio;` is needed?
+fail_compilation/imphint.d(54): Error: `writeln` is not defined, perhaps `import std.stdio;` is needed?
+fail_compilation/imphint.d(55): Error: `sin` is not defined, perhaps `import std.math;` is needed?
+fail_compilation/imphint.d(56): Error: `cos` is not defined, perhaps `import std.math;` is needed?
+fail_compilation/imphint.d(57): Error: `sqrt` is not defined, perhaps `import std.math;` is needed?
+fail_compilation/imphint.d(58): Error: `fabs` is not defined, perhaps `import std.math;` is needed?
+fail_compilation/imphint.d(61): Error: `AliasSeq` is not defined, perhaps `import std.meta;` is needed?
+fail_compilation/imphint.d(62): Error: `appender` is not defined, perhaps `import std.array;` is needed?
+fail_compilation/imphint.d(63): Error: `array` is not defined, perhaps `import std.array;` is needed?
+fail_compilation/imphint.d(64): Error: `calloc` is not defined, perhaps `import core.stdc.stdlib;` is needed?
+fail_compilation/imphint.d(65): Error: `chdir` is not defined, perhaps `import std.file;` is needed?
+fail_compilation/imphint.d(66): Error: `dirEntries` is not defined, perhaps `import std.file;` is needed?
+fail_compilation/imphint.d(67): Error: `drop` is not defined, perhaps `import std.range;` is needed?
+fail_compilation/imphint.d(68): Error: `each` is not defined, perhaps `import std.algorithm;` is needed?
+fail_compilation/imphint.d(69): Error: `empty` is not defined, perhaps `import std.range;` is needed?
+fail_compilation/imphint.d(70): Error: `enumerate` is not defined, perhaps `import std.range;` is needed?
+fail_compilation/imphint.d(71): Error: `endsWith` is not defined, perhaps `import std.algorithm;` is needed?
+fail_compilation/imphint.d(72): Error: `enforce` is not defined, perhaps `import std.exception;` is needed?
+fail_compilation/imphint.d(73): Error: `equal` is not defined, perhaps `import std.algorithm;` is needed?
+fail_compilation/imphint.d(74): Error: `exists` is not defined, perhaps `import std.file;` is needed?
+fail_compilation/imphint.d(75): Error: `filter` is not defined, perhaps `import std.algorithm;` is needed?
+fail_compilation/imphint.d(76): Error: `format` is not defined, perhaps `import std.format;` is needed?
+fail_compilation/imphint.d(77): Error: `free` is not defined, perhaps `import core.stdc.stdlib;` is needed?
+fail_compilation/imphint.d(78): Error: `front` is not defined, perhaps `import std.range;` is needed?
+fail_compilation/imphint.d(79): Error: `iota` is not defined, perhaps `import std.range;` is needed?
+fail_compilation/imphint.d(80): Error: `isDir` is not defined, perhaps `import std.file;` is needed?
+fail_compilation/imphint.d(81): Error: `isFile` is not defined, perhaps `import std.file;` is needed?
+fail_compilation/imphint.d(82): Error: `join` is not defined, perhaps `import std.array;` is needed?
+fail_compilation/imphint.d(83): Error: `joiner` is not defined, perhaps `import std.algorithm;` is needed?
+fail_compilation/imphint.d(84): Error: `malloc` is not defined, perhaps `import core.stdc.stdlib;` is needed?
+fail_compilation/imphint.d(85): Error: `map` is not defined, perhaps `import std.algorithm;` is needed?
+fail_compilation/imphint.d(86): Error: `max` is not defined, perhaps `import std.algorithm;` is needed?
+fail_compilation/imphint.d(87): Error: `min` is not defined, perhaps `import std.algorithm;` is needed?
+fail_compilation/imphint.d(88): Error: `mkdir` is not defined, perhaps `import std.file;` is needed?
+fail_compilation/imphint.d(89): Error: `popFront` is not defined, perhaps `import std.range;` is needed?
+fail_compilation/imphint.d(90): Error: `realloc` is not defined, perhaps `import core.stdc.stdlib;` is needed?
+fail_compilation/imphint.d(91): Error: `replace` is not defined, perhaps `import std.array;` is needed?
+fail_compilation/imphint.d(92): Error: `rmdir` is not defined, perhaps `import std.file;` is needed?
+fail_compilation/imphint.d(93): Error: `sort` is not defined, perhaps `import std.algorithm;` is needed?
+fail_compilation/imphint.d(94): Error: `split` is not defined, perhaps `import std.array;` is needed?
+fail_compilation/imphint.d(95): Error: `startsWith` is not defined, perhaps `import std.algorithm;` is needed?
+fail_compilation/imphint.d(96): Error: `take` is not defined, perhaps `import std.range;` is needed?
+fail_compilation/imphint.d(97): Error: `text` is not defined, perhaps `import std.conv;` is needed?
+fail_compilation/imphint.d(98): Error: `to` is not defined, perhaps `import std.conv;` is needed?
---
*/
@@ -18,4 +56,44 @@ void foo()
cos(1.2);
sqrt(2.0);
fabs(-3);
+
+
+ AliasSeq();
+ appender();
+ array();
+ calloc();
+ chdir();
+ dirEntries();
+ drop();
+ each();
+ empty();
+ enumerate();
+ endsWith();
+ enforce();
+ equal();
+ exists();
+ filter();
+ format();
+ free();
+ front();
+ iota();
+ isDir();
+ isFile();
+ join();
+ joiner();
+ malloc();
+ map();
+ max();
+ min();
+ mkdir();
+ popFront();
+ realloc();
+ replace();
+ rmdir();
+ sort();
+ split();
+ startsWith();
+ take();
+ text();
+ to();
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/a14407.d b/gcc/testsuite/gdc.test/fail_compilation/imports/a14407.d
deleted file mode 100644
index d906bc7..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/imports/a14407.d
+++ /dev/null
@@ -1,19 +0,0 @@
-module imports.a14407;
-
-deprecated class C
-{
- private deprecated new (size_t, string)
- {
- return null;
- }
- private this(int) {}
-}
-
-deprecated struct S
-{
- private deprecated new (size_t, string)
- {
- return null;
- }
- private this(int) {}
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/a17625.d b/gcc/testsuite/gdc.test/fail_compilation/imports/a17625.d
new file mode 100644
index 0000000..d8a457c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/a17625.d
@@ -0,0 +1,3 @@
+module a17625;
+
+private int boo() { return 69; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/a18243.d b/gcc/testsuite/gdc.test/fail_compilation/imports/a18243.d
new file mode 100644
index 0000000..73df751
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/a18243.d
@@ -0,0 +1,5 @@
+module a18243;
+
+import std.math : isNaN;
+
+public bool isNaN() { return false; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/b17625.d b/gcc/testsuite/gdc.test/fail_compilation/imports/b17625.d
new file mode 100644
index 0000000..02946b0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/b17625.d
@@ -0,0 +1,3 @@
+module b17625;
+
+private int boo() { return 45; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/b17918a.d b/gcc/testsuite/gdc.test/fail_compilation/imports/b17918a.d
new file mode 100644
index 0000000..03cf9a9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/b17918a.d
@@ -0,0 +1,9 @@
+module imports.b17918a;
+
+class Base
+{
+ auto byNode()
+ {
+ return _listMap;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/b19762.d b/gcc/testsuite/gdc.test/fail_compilation/imports/b19762.d
new file mode 100644
index 0000000..f089354
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/b19762.d
@@ -0,0 +1,7 @@
+module imports.b19762;
+
+struct Baz {}
+struct Qux
+{
+ import imports.c19762;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/c19762.d b/gcc/testsuite/gdc.test/fail_compilation/imports/c19762.d
new file mode 100644
index 0000000..ec4d389
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/c19762.d
@@ -0,0 +1,27 @@
+module imports.c19762;
+
+struct Foo
+{
+ import ice19762 : X;
+ X[] x;
+}
+
+Nullable!Foo foo()
+{
+ Nullable!Foo output;
+ return output;
+}
+
+struct Nullable(T)
+{
+ bool opEquals(U)(const(U) rhs) const
+ if (is(typeof(this.get == rhs)))
+ {
+ return true;
+ }
+
+ inout(T) get() inout
+ {
+ return T.init;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/constraints.d b/gcc/testsuite/gdc.test/fail_compilation/imports/constraints.d
new file mode 100644
index 0000000..a19e89a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/constraints.d
@@ -0,0 +1,73 @@
+module imports.constraints;
+
+// can be shared between usual and verbose output versions
+
+enum P(T) = true;
+enum N(T) = false;
+
+// constraints_func1
+void test1(T)(T v) if (N!T);
+void test2(T)(T v) if (!P!T);
+void test3(T)(T v) if (P!T && N!T);
+void test4(T)(T v) if (P!T && N!T && P!T);
+void test5(T)(T v) if (N!T || N!T);
+void test6(T)(T v) if (N!T || N!T || !P!T);
+void test7(T)(T v) if (N!T || P!T && N!T);
+void test8(T)(T v) if ((N!T || P!T) && N!T);
+void test9(T)(T v) if (!P!T && !N!T);
+void test10(T)(T v) if (!N!T && !P!T);
+void test11(T)(T v) if (!(!N!T && P!T));
+void test12(T)(T v) if (!(N!T || P!T));
+
+// constraints_func2
+void test13(T)(T v) if (P!T ? N!T : P!T); // P!T && N!T || !P!T && P!T
+void test14(T)(T v) if (!P!T ? P!T : N!T);
+void test15(T)(T v) if (!(P!T ? P!T : N!T)); // (!P!T || !P!T) && (P!T || !N!T)
+void test16(T)(T v) if (N!T && P!T || N!T);
+void test17(T)(T v) if (N!T && P!T && (P!T || P!T));
+void test18(T)(T v) if ((N!T || P!T && N!T) && P!T);
+void test19(T)(T v) if ((N!T ? P!T : !P!T) ? P!T : N!T); // (N!T && P!T || !N!T && !P!T) && P!T || (!N!T || !P!T) && (N!T || P!T) && N!T
+void test20(T)(T v) if (N!T && (P!T && N!T || N!T));
+void test21(T)(T v) if (P!T && (N!T && P!T || N!T));
+void test22(T)(T v) if ((!P!T || !P!T && P!T) && (N!T || !P!T));
+void test23(T)(T v) if (!P!T || P!T && N!T || !P!T);
+void test24(R)(R r) if (__traits(hasMember, R, "stuff"));
+int test25(T)(T v) if (N!T);
+float test26(T, U)(U u) if (N!U);
+
+// constraints_func3
+void overload(T)(T v) if (N!T);
+void overload(T)(T v) if (!P!T);
+void overload(T)(T v1, T v2) if (N!T);
+void overload(T, V)(T v1, V v2) if (N!T || N!V);
+void variadic(A, T...)(A a, T v) if (N!int);
+
+// constraints_tmpl
+void dummy()() if (false);
+void message_nice(T, U)() if (P!T && "message 1" && N!U && "message 2");
+void message_ugly(T)(T v) if (!N!T && (T.stringof ~ " must be that") && N!T);
+void args(T, U)() if (N!T || N!U);
+void lambda(alias pred)() if (N!int);
+
+// constraints_defs
+void def(T, int i = 5, alias R)() if (N!T);
+void defa(T, U = int)() if (N!T);
+void defv(T = bool, int i = 5, Ts...)() if (N!T);
+
+// constraints_aggr
+class C
+{
+ void f(T)(T v) if (P!T && !P!T)
+ {}
+
+ void g(this T)() if (N!T)
+ {}
+}
+
+template S(T) if (N!T)
+{
+ alias S = T;
+}
+
+struct BitFlags(E, bool unsafe = false) if (unsafe || N!E)
+{}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/deprecatedImporta.d b/gcc/testsuite/gdc.test/fail_compilation/imports/deprecatedImporta.d
new file mode 100644
index 0000000..ef64878
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/deprecatedImporta.d
@@ -0,0 +1,2 @@
+deprecated("Please import deprecatedImportb directly!")
+public import imports.deprecatedImportb : AliasSeq, foo, bar, E, S, C, I;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/deprecatedImportb.d b/gcc/testsuite/gdc.test/fail_compilation/imports/deprecatedImportb.d
new file mode 100644
index 0000000..4a53e7f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/deprecatedImportb.d
@@ -0,0 +1,13 @@
+alias AliasSeq(T...) = T;
+
+void foo() {}
+
+void bar(T)(T t) {}
+
+enum E = 2;
+
+struct S {}
+
+class C {}
+
+interface I {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/diag20518a.d b/gcc/testsuite/gdc.test/fail_compilation/imports/diag20518a.d
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/diag20518a.d
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/diag20518a/b.d b/gcc/testsuite/gdc.test/fail_compilation/imports/diag20518a/b.d
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/diag20518a/b.d
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/diag9210stdcomplex.d b/gcc/testsuite/gdc.test/fail_compilation/imports/diag9210stdcomplex.d
index 58aa99a..76a2cee 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/imports/diag9210stdcomplex.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/diag9210stdcomplex.d
@@ -8,7 +8,7 @@ struct Complex(T) if (isFloatingPoint!T)
T im;
}
-// Bugzilla 9210: Complex!real instantiation is incomplete in here,
+// https://issues.dlang.org/show_bug.cgi?id=9210: Complex!real instantiation is incomplete in here,
// because its completion is deferred by an "undefined identifier" error in imports.diag9210b.
Complex!real expi(real y)
{
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/fail20164.d b/gcc/testsuite/gdc.test/fail_compilation/imports/fail20164.d
new file mode 100644
index 0000000..15d6359
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/fail20164.d
@@ -0,0 +1 @@
+deprecated module imports.fail20164;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/fail20637b.d b/gcc/testsuite/gdc.test/fail_compilation/imports/fail20637b.d
new file mode 100644
index 0000000..d6fbdf5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/fail20637b.d
@@ -0,0 +1,3 @@
+module imports.fail20637b;
+
+class A { private static void foo() { } }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/fail20638b.d b/gcc/testsuite/gdc.test/fail_compilation/imports/fail20638b.d
new file mode 100644
index 0000000..71218d9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/fail20638b.d
@@ -0,0 +1,3 @@
+module imports.fail20638b;
+
+private void foo() { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/fail21275a.d b/gcc/testsuite/gdc.test/fail_compilation/imports/fail21275a.d
new file mode 100644
index 0000000..3fee203
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/fail21275a.d
@@ -0,0 +1,34 @@
+module imports.fail21275a;
+
+struct Foo
+{
+ private int _x;
+
+ private ref int x() return
+ {
+ return _x;
+ }
+
+ int x() const
+ {
+ return _x;
+ }
+
+}
+
+struct Bar
+{
+
+ private int _x;
+
+ private int x(int)
+ {
+ return _x;
+ }
+
+ int x() const
+ {
+ return _x;
+ }
+
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/i20057.d b/gcc/testsuite/gdc.test/fail_compilation/imports/i20057.d
new file mode 100644
index 0000000..9c9c666
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/i20057.d
@@ -0,0 +1,13 @@
+template generateEmptyFunction(C, func...)
+{
+}
+
+template isAbstractFunction(T...)
+if (T.length == 1)
+{
+ enum bool isAbstractFunction = __traits(isAbstractFunction, T[0]);
+}
+
+alias BlackHole(Base) = AutoImplement!(Base, generateEmptyFunction, isAbstractFunction);
+
+class AutoImplement(Base, alias how, alias what = isAbstractFunction) : Base {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/imp17602.d b/gcc/testsuite/gdc.test/fail_compilation/imports/imp17602.d
new file mode 100644
index 0000000..c1e6790
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/imp17602.d
@@ -0,0 +1,3 @@
+module imports.imp17602;
+
+enum Status { on }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/imp18554.d b/gcc/testsuite/gdc.test/fail_compilation/imports/imp18554.d
new file mode 100644
index 0000000..9f2a855
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/imp18554.d
@@ -0,0 +1,4 @@
+struct S
+{
+ private int i;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/imp18979.d b/gcc/testsuite/gdc.test/fail_compilation/imports/imp18979.d
new file mode 100644
index 0000000..9403f69
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/imp18979.d
@@ -0,0 +1,6 @@
+module imports.imp18979;
+
+struct Foo
+{
+ private this(A)(A a) {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/imp19661.d b/gcc/testsuite/gdc.test/fail_compilation/imports/imp19661.d
new file mode 100644
index 0000000..3a96803
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/imp19661.d
@@ -0,0 +1,17 @@
+template isFunction(X...)
+if (X.length == 1)
+{
+ static if (is(typeof(&X[0]) U : U*) && is(U == function) ||
+ is(typeof(&X[0]) U == delegate))
+ {
+ // x is a (nested) function symbol.
+ enum isFunction = true;
+ }
+ else static if (is(X[0] T))
+ {
+ // x is a type. Take the type of it and examine.
+ enum isFunction = is(T == function);
+ }
+ else
+ enum isFunction = false;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/imp20709.d b/gcc/testsuite/gdc.test/fail_compilation/imports/imp20709.d
new file mode 100644
index 0000000..a232974
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/imp20709.d
@@ -0,0 +1 @@
+module imp20709;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/imp21832.d b/gcc/testsuite/gdc.test/fail_compilation/imports/imp21832.d
new file mode 100644
index 0000000..ee4a1d6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/imp21832.d
@@ -0,0 +1,24 @@
+module imports.imp21832;
+static if(1)
+{
+ int fun(int a)
+ {
+ return a;
+ }
+ int tpl()(int a)
+ {
+ return a;
+ }
+}
+
+deprecated
+{
+ int fun(char a)
+ {
+ return a;
+ }
+ int tpl()(char a)
+ {
+ return a;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/imp22329.d b/gcc/testsuite/gdc.test/fail_compilation/imports/imp22329.d
new file mode 100644
index 0000000..9dc3c8e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/imp22329.d
@@ -0,0 +1,4 @@
+void func(T)(T arg)
+{
+ auto a = arg + 1;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/import21508.d b/gcc/testsuite/gdc.test/fail_compilation/imports/import21508.d
new file mode 100644
index 0000000..07aa66e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/import21508.d
@@ -0,0 +1,2 @@
+module import21508;
+private class import21508 {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/issue21685.d b/gcc/testsuite/gdc.test/fail_compilation/imports/issue21685.d
new file mode 100644
index 0000000..eef95bf
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/issue21685.d
@@ -0,0 +1,6 @@
+module issue21685;
+
+class E
+{
+ private this() {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/test18480a.d b/gcc/testsuite/gdc.test/fail_compilation/imports/test18480a.d
new file mode 100644
index 0000000..f20cf8a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/test18480a.d
@@ -0,0 +1,3 @@
+public import imports.test18480b : TestTemplate;
+alias TestTemplate = TestTemplate;
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/test18480b.d b/gcc/testsuite/gdc.test/fail_compilation/imports/test18480b.d
new file mode 100644
index 0000000..aa3ebd1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/test18480b.d
@@ -0,0 +1 @@
+template TestTemplate() { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/test18938a/cache.d b/gcc/testsuite/gdc.test/fail_compilation/imports/test18938a/cache.d
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/test18938a/cache.d
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/test18938a/file.d b/gcc/testsuite/gdc.test/fail_compilation/imports/test18938a/file.d
new file mode 100644
index 0000000..ee3199d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/test18938a/file.d
@@ -0,0 +1,13 @@
+import imports.test18938b.file;
+class IconThemeGroup : IniLikeGroup
+{
+ this()
+ {
+ super("Icon Theme");
+ }
+
+ ///setter
+ string inherits()() {
+ }
+
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/test18938b/file.d b/gcc/testsuite/gdc.test/fail_compilation/imports/test18938b/file.d
new file mode 100644
index 0000000..977fe7a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/test18938b/file.d
@@ -0,0 +1,28 @@
+module imports.test18938b.file;
+import std.algorithm;
+
+class IniLikeGroup
+{
+ this(string ) {}
+ @trusted byNode()
+ {
+ map!(node => lineNode);
+ }
+}
+
+
+class IniLikeFile
+{
+ struct WriteOptions
+ {
+ static exact()
+ {
+ return WriteOptions(No.lineBetweenGroups);
+ }
+
+ this(Args)(Args ){}
+
+ }
+ void saveToFile(WriteOptions = WriteOptions.exact) {}
+ final save() {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/test19107a.d b/gcc/testsuite/gdc.test/fail_compilation/imports/test19107a.d
new file mode 100644
index 0000000..d270e3b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/test19107a.d
@@ -0,0 +1,3 @@
+module imports.test19107a.d;
+
+alias I(alias A) = A;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/test19107b.d b/gcc/testsuite/gdc.test/fail_compilation/imports/test19107b.d
new file mode 100644
index 0000000..8fd8087
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/test19107b.d
@@ -0,0 +1,3 @@
+module imports.test19107b;
+
+import imports.test19107a : I;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/test20023b.d b/gcc/testsuite/gdc.test/fail_compilation/imports/test20023b.d
new file mode 100644
index 0000000..c3e8a78
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/test20023b.d
@@ -0,0 +1,10 @@
+module imports.test20023b;
+
+auto threw()() @safe
+{
+ try
+ throw new Exception("Hello");
+ catch (Exception e)
+ return e;
+ assert(0);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/test20267.d b/gcc/testsuite/gdc.test/fail_compilation/imports/test20267.d
new file mode 100644
index 0000000..05059f6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/test20267.d
@@ -0,0 +1,3 @@
+module imports.test20267;
+
+int[1] array;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/test21246.d b/gcc/testsuite/gdc.test/fail_compilation/imports/test21246.d
new file mode 100644
index 0000000..5294c41
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/imports/test21246.d
@@ -0,0 +1,8 @@
+module imports.test21246;
+
+class Clock {}
+
+class B
+{
+ void set (Clock clock) { }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/issue15103.d b/gcc/testsuite/gdc.test/fail_compilation/issue15103.d
new file mode 100644
index 0000000..c4a67eb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/issue15103.d
@@ -0,0 +1,25 @@
+/*
+TEST_OUTPUT:
+----
+fail_compilation/issue15103.d(22): Error: found `(` when expecting `;` or `=`, did you mean `Foo foo = 42`?
+fail_compilation/issue15103.d(23): Error: found `(` when expecting `;` or `=`, did you mean `Boo boo = 43`?
+fail_compilation/issue15103.d(24): Error: found `(` when expecting `;` or `=`, did you mean `string y = "a string"`?
+---
+*/
+
+struct Foo
+{
+ this(int x) {}
+}
+
+class Boo
+{
+ this(int x) {}
+}
+
+void main ()
+{
+ Foo foo(42);
+ Boo boo(43);
+ string y("a string");
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/issue20422.d b/gcc/testsuite/gdc.test/fail_compilation/issue20422.d
new file mode 100644
index 0000000..1964f8a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/issue20422.d
@@ -0,0 +1,12 @@
+// https://issues.dlang.org/show_bug.cgi?id=20422
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/issue20422.d(11): Error: missing length argument for array
+---
+*/
+
+void main() {
+ new int[];
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/issue20627.d b/gcc/testsuite/gdc.test/fail_compilation/issue20627.d
new file mode 100644
index 0000000..ff08c6a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/issue20627.d
@@ -0,0 +1,67 @@
+/**
+REQUIRED_ARGS: -de
+TEST_OUTPUT:
+---
+fail_compilation/issue20627.d(38): Deprecation: `shared static` constructor can only be of D linkage
+fail_compilation/issue20627.d(39): Deprecation: `shared static` destructor can only be of D linkage
+fail_compilation/issue20627.d(40): Deprecation: `static` constructor can only be of D linkage
+fail_compilation/issue20627.d(41): Deprecation: `static` destructor can only be of D linkage
+fail_compilation/issue20627.d(55): Deprecation: `shared static` constructor can only be of D linkage
+fail_compilation/issue20627.d(56): Deprecation: `shared static` destructor can only be of D linkage
+fail_compilation/issue20627.d(57): Deprecation: `static` constructor can only be of D linkage
+fail_compilation/issue20627.d(58): Deprecation: `static` destructor can only be of D linkage
+fail_compilation/issue20627.d(63): Deprecation: `shared static` constructor can only be of D linkage
+fail_compilation/issue20627.d(64): Deprecation: `shared static` destructor can only be of D linkage
+fail_compilation/issue20627.d(65): Deprecation: `static` constructor can only be of D linkage
+fail_compilation/issue20627.d(66): Deprecation: `static` destructor can only be of D linkage
+---
+*/
+
+// OK, default linkage
+shared static this () {}
+shared static ~this () {}
+static this () {}
+static ~this () {}
+
+// Still okay
+extern(D)
+{
+ shared static this () {}
+ shared static ~this () {}
+ static this () {}
+ static ~this () {}
+}
+
+// No!
+extern(C)
+{
+ shared static this () {}
+ shared static ~this () {}
+ static this () {}
+ static ~this () {}
+}
+
+// Disabled because platform specific
+version (none) extern(Objective-C)
+{
+ shared static this () {}
+ shared static ~this () {}
+ static this () {}
+ static ~this () {}
+}
+
+extern(C++)
+{
+ shared static this () {}
+ shared static ~this () {}
+ static this () {}
+ static ~this () {}
+}
+
+extern(System)
+{
+ shared static this () {}
+ shared static ~this () {}
+ static this () {}
+ static ~this () {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/issue20704.d b/gcc/testsuite/gdc.test/fail_compilation/issue20704.d
new file mode 100644
index 0000000..1e1f2e6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/issue20704.d
@@ -0,0 +1,39 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/issue20704.d(17): Error: cannot modify constant `0`
+fail_compilation/issue20704.d(28): Error: template instance `issue20704.f2!int` error instantiating
+fail_compilation/issue20704.d(19): Error: cannot modify constant `0`
+fail_compilation/issue20704.d(30): Error: template instance `issue20704.f4!int` error instantiating
+fail_compilation/issue20704.d(17): Error: `S(0)` is not an lvalue and cannot be modified
+fail_compilation/issue20704.d(36): Error: template instance `issue20704.f2!(S)` error instantiating
+fail_compilation/issue20704.d(17): Error: `null` is not an lvalue and cannot be modified
+fail_compilation/issue20704.d(38): Error: template instance `issue20704.f2!(C)` error instantiating
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=20704
+
+void f1(T)(const auto ref T arg = T.init) {}
+void f2(T)(const ref T arg = T.init) {}
+void f3(T)(const auto ref T arg = 0) {}
+void f4(T)(const ref T arg = 0) {}
+
+struct S { int _; }
+class C { int _; }
+
+void main ()
+{
+ int i;
+ f1!int(i);
+ f2!int(i);
+ f3!int(i);
+ f4!int(i);
+ f1!int();
+ f2!int();
+ f3!int();
+ f4!int();
+ f1!S();
+ f2!S();
+ f1!C();
+ f2!C();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/issue21203.d b/gcc/testsuite/gdc.test/fail_compilation/issue21203.d
new file mode 100644
index 0000000..7679d67
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/issue21203.d
@@ -0,0 +1,17 @@
+// Ideally this should work, at least give a nice error messae
+/**
+REQUIRED_ARGS: -de
+TEST_OUTPUT:
+---
+fail_compilation/issue21203.d(12): Error: pragma `mangle` cannot apply to a template declaration
+fail_compilation/issue21203.d(12): use `template Class(Args...){ pragma(mangle, "other_name") class Class {} }`
+---
+*/
+
+extern(C++)
+pragma(mangle,"gdkfjgh")
+class F(T)
+{
+
+}
+void use(F!int a) {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/issue21295.d b/gcc/testsuite/gdc.test/fail_compilation/issue21295.d
index 9916e9b..24d282c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/issue21295.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/issue21295.d
@@ -1,8 +1,7 @@
/*
-REQUIRED_ARGS: -de
TEST_OUTPUT:
---
-fail_compilation/issue21295.d(9): Deprecation: imports.issue21295ast_node.Visitor is not visible from module issue21295
+fail_compilation/issue21295.d(8): Error: undefined identifier `Visitor`
---
*/
import imports.issue21295ast_node;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/issue21378.d b/gcc/testsuite/gdc.test/fail_compilation/issue21378.d
new file mode 100644
index 0000000..22c60a3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/issue21378.d
@@ -0,0 +1,16 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/issue21378.d(13): Error: function `issue21378.fn` circular dependency. Functions cannot be interpreted while being compiled
+fail_compilation/issue21378.d(12): called from here: `fn()`
+fail_compilation/issue21378.d(12): Error: pragma `inline` pragma(`inline`, `true` or `false`) expected, not `fn()`
+---
+*/
+
+// Cannot call the same function linked to the pragma
+// Really hard to fix this limitation in the implementation
+pragma(inline, fn())
+int fn()
+{
+ return 1;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/issue21685_main.d b/gcc/testsuite/gdc.test/fail_compilation/issue21685_main.d
new file mode 100644
index 0000000..c6e29c3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/issue21685_main.d
@@ -0,0 +1,12 @@
+/* REQUIRED_ARGS: -preview=dip1000 -Ifail_compilation/imports
+TEST_OUTPUT:
+---
+fail_compilation/issue21685_main.d(11): Error: class `issue21685.E` constructor `this` is not accessible
+---
+*/
+import issue21685;
+
+void main()
+{
+ new E;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/issue21936.d b/gcc/testsuite/gdc.test/fail_compilation/issue21936.d
new file mode 100644
index 0000000..a37aa04
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/issue21936.d
@@ -0,0 +1,32 @@
+/* REQUIRED_ARGS: -preview=dip1000 -Ifail_compilation/imports
+TEST_OUTPUT:
+---
+fail_compilation/issue21936.d(15): Error: struct `issue21936s.S` variable `field` is not accessible from `@safe` code
+fail_compilation/issue21936.d(15): Error: struct `issue21936s.S` variable `field` is not accessible from `@safe` code
+fail_compilation/issue21936.d(11): Error: template instance `issue21936.constructImplicit!(S)` error instantiating
+fail_compilation/issue21936.d(7): instantiated from here: `registerConstructors!(S)`
+fail_compilation/issue21936.d(21): instantiated from here: `registerType!(S)`
+---
+*/
+#line 2
+module issue21936;
+import issue21936s;
+struct Handlers {
+ void registerType(T)()
+ {
+ registerConstructors!T;
+ }
+ void registerConstructors(T)()
+ {
+ constructImplicit!T;
+ }
+}
+
+auto constructImplicit(T)(typeof(T.init.tupleof) x = T.init.tupleof)
+{
+}
+
+void registerHandlersDateTime(Handlers handlers)
+{
+ handlers.registerType!(S);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/issue3827.d b/gcc/testsuite/gdc.test/fail_compilation/issue3827.d
index 76d90ed..d17cee8 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/issue3827.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/issue3827.d
@@ -2,8 +2,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/issue3827.d(12): Deprecation: Implicit string concatenation is deprecated, use "Hello" ~ "World" instead
-fail_compilation/issue3827.d(13): Deprecation: Implicit string concatenation is deprecated, use "A" ~ "B" instead
+fail_compilation/issue3827.d(14): Error: Implicit string concatenation is error-prone and disallowed in D
+fail_compilation/issue3827.d(14): Use the explicit syntax instead (concatenating literals is `@nogc`): "Hello" ~ "World"
+fail_compilation/issue3827.d(15): Error: Implicit string concatenation is error-prone and disallowed in D
+fail_compilation/issue3827.d(15): Use the explicit syntax instead (concatenating literals is `@nogc`): "A" ~ "B"
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/lexer1.d b/gcc/testsuite/gdc.test/fail_compilation/lexer1.d
index 31246ce..088e897 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/lexer1.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/lexer1.d
@@ -1,6 +1,7 @@
/*
TEST_OUTPUT:
---
+fail_compilation/lexer1.d(30): Error: Built-in hex string literals are obsolete, use `std.conv.hexString!"01 02 03"w` instead.
fail_compilation/lexer1.d(30): Error: declaration expected, not `x"01 02 03"w`
fail_compilation/lexer1.d(31): Error: declaration expected, not `2147483649U`
fail_compilation/lexer1.d(32): Error: declaration expected, not `0.1`
@@ -15,7 +16,7 @@ fail_compilation/lexer1.d(40): Error: declaration expected, not `65536U`
fail_compilation/lexer1.d(41): Error: declaration expected, not `"ab\\c\"\u1234a\U00011100a"d`
fail_compilation/lexer1.d(43): Error: declaration expected, not `module`
fail_compilation/lexer1.d(45): Error: escape hex sequence has 1 hex digits instead of 2
-fail_compilation/lexer1.d(46): Error: undefined escape hex sequence \G
+fail_compilation/lexer1.d(46): Error: undefined escape hex sequence \xG
fail_compilation/lexer1.d(47): Error: unnamed character entity &unnamedentity;
fail_compilation/lexer1.d(48): Error: unterminated named entity &1;
fail_compilation/lexer1.d(49): Error: unterminated named entity &*;
@@ -26,7 +27,6 @@ fail_compilation/lexer1.d(52): Error: escape octal sequence \400 is larger than
*/
// https://dlang.dawg.eu/coverage/src/lexer.c.gcov.html
-
x"01 02 03"w;
0x80000001;
0.1;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/lexer2.d b/gcc/testsuite/gdc.test/fail_compilation/lexer2.d
index d574b07..2386da5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/lexer2.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/lexer2.d
@@ -1,11 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/lexer2.d(14): Error: odd number (3) of hex characters in hex string
-fail_compilation/lexer2.d(15): Error: non-hex character 'G' in hex string
-fail_compilation/lexer2.d(16): Error: heredoc rest of line should be blank
-fail_compilation/lexer2.d(18): Error: unterminated delimited string constant starting at fail_compilation/lexer2.d(18)
-fail_compilation/lexer2.d(20): Error: semicolon expected following auto declaration, not `EOF`
+fail_compilation/lexer2.d(16): Error: odd number (3) of hex characters in hex string
+fail_compilation/lexer2.d(16): Error: Built-in hex string literals are obsolete, use `std.conv.hexString!"123"` instead.
+fail_compilation/lexer2.d(17): Error: non-hex character 'G' in hex string
+fail_compilation/lexer2.d(17): Error: Built-in hex string literals are obsolete, use `std.conv.hexString!"123G"` instead.
+fail_compilation/lexer2.d(18): Error: heredoc rest of line should be blank
+fail_compilation/lexer2.d(20): Error: unterminated delimited string constant starting at fail_compilation/lexer2.d(20)
+fail_compilation/lexer2.d(22): Error: semicolon expected following auto declaration, not `End of File`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/lexer3.d b/gcc/testsuite/gdc.test/fail_compilation/lexer3.d
index f2bcda4..dc6ad64 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/lexer3.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/lexer3.d
@@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/lexer3.d(9): Error: unterminated token string constant starting at fail_compilation/lexer3.d(9)
-fail_compilation/lexer3.d(10): Error: semicolon expected following auto declaration, not `EOF`
+fail_compilation/lexer3.d(10): Error: semicolon expected following auto declaration, not `End of File`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/lexer4.d b/gcc/testsuite/gdc.test/fail_compilation/lexer4.d
index 374f69d..ecc7208 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/lexer4.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/lexer4.d
@@ -4,10 +4,10 @@ TEST_OUTPUT:
fail_compilation/lexer4.d(22): Error: unterminated character constant
fail_compilation/lexer4.d(24): Error: unterminated character constant
fail_compilation/lexer4.d(25): Error: unterminated character constant
-fail_compilation/lexer4.d(26): Error: binary digit expected
-fail_compilation/lexer4.d(27): Error: radix 8 digit expected, not `8`
-fail_compilation/lexer4.d(27): Error: octal literals `0130` are no longer supported, use `std.conv.octal!130` instead
-fail_compilation/lexer4.d(28): Error: radix 10 digit expected, not `a`
+fail_compilation/lexer4.d(26): Error: binary digit expected, not `2`
+fail_compilation/lexer4.d(27): Error: octal digit expected, not `8`
+fail_compilation/lexer4.d(27): Error: octal literals larger than 7 are no longer supported
+fail_compilation/lexer4.d(28): Error: decimal digit expected, not `a`
fail_compilation/lexer4.d(29): Error: unrecognized token
fail_compilation/lexer4.d(30): Error: exponent required for hex float
fail_compilation/lexer4.d(31): Error: lower case integer suffix 'l' is not allowed. Please use 'L' instead
diff --git a/gcc/testsuite/gdc.test/fail_compilation/lookup.d b/gcc/testsuite/gdc.test/fail_compilation/lookup.d
index aedb44e..fe752f2 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/lookup.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/lookup.d
@@ -1,10 +1,11 @@
/*
+EXTRA_FILES: imports/imp1.d imports/imp2.d
TEST_OUTPUT:
---
-fail_compilation/lookup.d(23): Error: no property `X` for type `lookup.B`, did you mean `imports.imp2.X`?
-fail_compilation/lookup.d(23): while evaluating: `static assert((B).X == 0)`
-+fail_compilation/lookup.d(24): Error: no property `Y` for type `lookup.B`, did you mean `imports.imp2.Y`?
-fail_compilation/lookup.d(24): while evaluating: `static assert((B).Y == 2)`
+fail_compilation/lookup.d(24): Error: no property `X` for type `lookup.B`, did you mean `imports.imp2.X`?
+fail_compilation/lookup.d(24): while evaluating: `static assert((B).X == 0)`
+fail_compilation/lookup.d(25): Error: no property `Y` for type `lookup.B`, did you mean `imports.imp2.Y`?
+fail_compilation/lookup.d(25): while evaluating: `static assert((B).Y == 2)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/mangle1.d b/gcc/testsuite/gdc.test/fail_compilation/mangle1.d
index bc2bc3d..a97a55b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/mangle1.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/mangle1.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/mangle1.d(8): Error: pragma mangle can only apply to a single declaration
+fail_compilation/mangle1.d(8): Error: pragma `mangle` can only apply to a single declaration
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/mangle2.d b/gcc/testsuite/gdc.test/fail_compilation/mangle2.d
index e68c92a..415e719 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/mangle2.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/mangle2.d
@@ -1,18 +1,18 @@
/*
TEST_OUTPUT:
---
-fail_compilation/mangle2.d(20): Error: pragma mangle char 0x20 not allowed in mangled name
-fail_compilation/mangle2.d(21): Error: pragma mangle char 0x20 not allowed in mangled name
-fail_compilation/mangle2.d(24): Error: pragma mangle char 0x0a not allowed in mangled name
-fail_compilation/mangle2.d(25): Error: pragma mangle char 0x0a not allowed in mangled name
-fail_compilation/mangle2.d(28): Error: pragma mangle char 0x07 not allowed in mangled name
-fail_compilation/mangle2.d(29): Error: pragma mangle char 0x07 not allowed in mangled name
-fail_compilation/mangle2.d(32): Error: pragma mangle char 0x01 not allowed in mangled name
-fail_compilation/mangle2.d(33): Error: pragma mangle char 0x01 not allowed in mangled name
-fail_compilation/mangle2.d(36): Error: pragma mangle char 0x00 not allowed in mangled name
-fail_compilation/mangle2.d(37): Error: pragma mangle char 0x00 not allowed in mangled name
-fail_compilation/mangle2.d(40): Error: pragma mangle Outside Unicode code space
-fail_compilation/mangle2.d(41): Error: pragma mangle Outside Unicode code space
+fail_compilation/mangle2.d(20): Error: pragma `mangle` char 0x20 not allowed in mangled name
+fail_compilation/mangle2.d(21): Error: pragma `mangle` char 0x20 not allowed in mangled name
+fail_compilation/mangle2.d(24): Error: pragma `mangle` char 0x0a not allowed in mangled name
+fail_compilation/mangle2.d(25): Error: pragma `mangle` char 0x0a not allowed in mangled name
+fail_compilation/mangle2.d(28): Error: pragma `mangle` char 0x07 not allowed in mangled name
+fail_compilation/mangle2.d(29): Error: pragma `mangle` char 0x07 not allowed in mangled name
+fail_compilation/mangle2.d(32): Error: pragma `mangle` char 0x01 not allowed in mangled name
+fail_compilation/mangle2.d(33): Error: pragma `mangle` char 0x01 not allowed in mangled name
+fail_compilation/mangle2.d(36): Error: pragma `mangle` char 0x00 not allowed in mangled name
+fail_compilation/mangle2.d(37): Error: pragma `mangle` char 0x00 not allowed in mangled name
+fail_compilation/mangle2.d(40): Error: pragma `mangle` Outside Unicode code space
+fail_compilation/mangle2.d(41): Error: pragma `mangle` Outside Unicode code space
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/misc1.d b/gcc/testsuite/gdc.test/fail_compilation/misc1.d
new file mode 100644
index 0000000..9a319eb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/misc1.d
@@ -0,0 +1,20 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/misc1.d(108): Error: `5` has no effect
+fail_compilation/misc1.d(109): Error: `1 + 2` has no effect
+---
+*/
+
+#line 100
+
+/***************************************************/
+//https://issues.dlang.org/show_bug.cgi?id=12490
+
+void hasSideEffect12490(){}
+
+void issue12490()
+{
+ 5, hasSideEffect12490();
+ 1 + 2, hasSideEffect12490();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/misc_parser_err_cov1.d b/gcc/testsuite/gdc.test/fail_compilation/misc_parser_err_cov1.d
new file mode 100644
index 0000000..22cf392
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/misc_parser_err_cov1.d
@@ -0,0 +1,55 @@
+/*
+REQUIRED_ARGS: -verrors=0
+TEST_OUTPUT:
+---
+fail_compilation/misc_parser_err_cov1.d(29): Error: basic type expected, not `)`
+fail_compilation/misc_parser_err_cov1.d(30): Error: basic type expected, not `)`
+fail_compilation/misc_parser_err_cov1.d(31): Error: `__traits(identifier, args...)` expected
+fail_compilation/misc_parser_err_cov1.d(31): Error: semicolon expected following auto declaration, not `o`
+fail_compilation/misc_parser_err_cov1.d(31): Error: expression expected, not `)`
+fail_compilation/misc_parser_err_cov1.d(32): Error: `type identifier : specialization` expected following `is`
+fail_compilation/misc_parser_err_cov1.d(33): Error: semicolon expected following auto declaration, not `auto`
+fail_compilation/misc_parser_err_cov1.d(33): Error: found `+` when expecting `(` following `mixin`
+fail_compilation/misc_parser_err_cov1.d(34): Error: cannot create a `char[float]` with `new`
+fail_compilation/misc_parser_err_cov1.d(35): Error: `key:value` expected for associative array literal
+fail_compilation/misc_parser_err_cov1.d(36): Error: basic type expected, not `;`
+fail_compilation/misc_parser_err_cov1.d(36): Error: `{ members }` expected for anonymous class
+fail_compilation/misc_parser_err_cov1.d(38): Error: template argument expected following `!`
+fail_compilation/misc_parser_err_cov1.d(38): Error: missing closing `)` after `if (parseShift!()`
+fail_compilation/misc_parser_err_cov1.d(38): Error: found `)` when expecting `(`
+fail_compilation/misc_parser_err_cov1.d(39): Error: missing closing `)` after `if (`
+fail_compilation/misc_parser_err_cov1.d(39): Error: identifier expected following `(type)`.
+fail_compilation/misc_parser_err_cov1.d(39): Error: expression expected, not `;`
+fail_compilation/misc_parser_err_cov1.d(40): Error: semicolon expected following auto declaration, not `auto`
+fail_compilation/misc_parser_err_cov1.d(40): Error: identifier or `new` expected following `.`, not `+`
+fail_compilation/misc_parser_err_cov1.d(41): Error: identifier or new keyword expected following `(...)`.
+fail_compilation/misc_parser_err_cov1.d(41): Error: found `.` when expecting `;` following statement
+fail_compilation/misc_parser_err_cov1.d(41): Error: expression expected, not `;`
+fail_compilation/misc_parser_err_cov1.d(42): Error: found `}` when expecting `;` following statement
+fail_compilation/misc_parser_err_cov1.d(43): Error: found `End of File` when expecting `}` following compound statement
+---
+*/
+module misc_parser_err_cov1;
+
+
+//https://issues.dlang.org/show_bug.cgi?id=19995
+#line 29
+void foo(in);
+void bar(int, const @tation);
+
+void main()
+{
+ // cover errors from line 7930 to EOF
+ #line 31
+ auto tt = __traits(<o<);
+ auto b = is ;
+ auto mx1 = mixin +);
+ auto aa1 = new char[float];
+ aa += [key:value, key];
+ auto anon1 = new class;
+ auto anon2 = new class {};
+ if (parseShift !if){}
+ auto unaryExParseError = immutable(int).+;
+ auto postFixParseError = int.max.+;
+ (int).+;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/mixin.d b/gcc/testsuite/gdc.test/fail_compilation/mixin.d
new file mode 100644
index 0000000..1db1206
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/mixin.d
@@ -0,0 +1,25 @@
+// REQUIRED_ARGS: -mixin=${RESULTS_DIR}/fail_compilation/mixin_test.mixin
+/*
+TEST_OUTPUT:
+---
+{{RESULTS_DIR}}/fail_compilation/mixin_test.mixin(7): Error: undefined identifier `b`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=1870
+// https://issues.dlang.org/show_bug.cgi?id=12790
+string get()
+{
+ return
+ q{int x;
+ int y;
+
+
+
+ int z = x + b;};
+}
+
+void main()
+{
+ mixin(get());
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/mixin_gc.d b/gcc/testsuite/gdc.test/fail_compilation/mixin_gc.d
new file mode 100644
index 0000000..6c2d8de
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/mixin_gc.d
@@ -0,0 +1,25 @@
+// REQUIRED_ARGS: -mixin=${RESULTS_DIR}/fail_compilation/mixin_test.mixin -lowmem
+/*
+TEST_OUTPUT:
+---
+{{RESULTS_DIR}}/fail_compilation/mixin_test.mixin(7): Error: undefined identifier `b`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=1870
+// https://issues.dlang.org/show_bug.cgi?id=12790
+string get()
+{
+ return
+ q{int x;
+ int y;
+
+
+
+ int z = x + b;};
+}
+
+void main()
+{
+ mixin(get());
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/nestedtempl0.d b/gcc/testsuite/gdc.test/fail_compilation/nestedtempl0.d
new file mode 100644
index 0000000..d323c34
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/nestedtempl0.d
@@ -0,0 +1,35 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/nestedtempl0.d(18): Error: class `nestedtempl0.K.D!(1, B!(a)).D` doesn't need a frame pointer, but super class `B` needs the frame pointer of `main`
+fail_compilation/nestedtempl0.d(28): Error: template instance `nestedtempl0.K.D!(1, B!(a))` error instantiating
+fail_compilation/nestedtempl0.d(18): Error: class `nestedtempl0.main.fun.D!(b, B!(a)).D` needs the frame pointer of `fun`, but super class `B` needs the frame pointer of `main`
+fail_compilation/nestedtempl0.d(33): Error: template instance `nestedtempl0.main.fun.D!(b, B!(a))` error instantiating
+---
+*/
+
+class K
+{
+ class B(alias a)
+ {
+
+ }
+
+ class D(alias a, T) : T
+ {
+
+ }
+}
+
+void main()
+{
+ int a;
+ auto k = new K;
+ auto d = k.new K.D!(1, K.B!a);
+
+ auto fun()
+ {
+ int b;
+ auto o = k.new K.D!(b, K.B!a);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/nestedtempl1.d b/gcc/testsuite/gdc.test/fail_compilation/nestedtempl1.d
new file mode 100644
index 0000000..c34d70b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/nestedtempl1.d
@@ -0,0 +1,27 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/nestedtempl1.d(14): Deprecation: function `nestedtempl1.main.bar!(a).bar` function requires a dual-context, which is deprecated
+fail_compilation/nestedtempl1.d(26): instantiated from here: `bar!(a)`
+fail_compilation/nestedtempl1.d(26): Error: modify `inout` to `mutable` is not allowed inside `inout` function
+---
+*/
+
+auto foo(ref inout(int) x)
+{
+ struct S
+ {
+ ref inout(int) bar(alias a)() inout
+ {
+ return x;
+ }
+ }
+ return S();
+}
+
+void main()
+{
+ int a;
+ auto o = foo(a);
+ o.bar!a() = 1; // bad!
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/nestedtempl2.d b/gcc/testsuite/gdc.test/fail_compilation/nestedtempl2.d
new file mode 100644
index 0000000..afc8a29
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/nestedtempl2.d
@@ -0,0 +1,38 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/nestedtempl2.d(22): Deprecation: function `nestedtempl2.B.func!(n).func` function requires a dual-context, which is deprecated
+fail_compilation/nestedtempl2.d(34): instantiated from here: `func!(n)`
+fail_compilation/nestedtempl2.d(34): Error: `this` is only defined in non-static member functions, not `test`
+fail_compilation/nestedtempl2.d(34): Error: need `this` of type `B` to call function `func`
+fail_compilation/nestedtempl2.d(35): Error: `this` is only defined in non-static member functions, not `test`
+fail_compilation/nestedtempl2.d(35): Error: need `this` of type `B` to make delegate from function `func`
+fail_compilation/nestedtempl2.d(37): Error: `this` is only defined in non-static member functions, not `test`
+fail_compilation/nestedtempl2.d(37): Error: need `this` of type `B` needed to `new` nested class `N`
+---
+*/
+
+class B
+{
+ int n;
+}
+
+void test()
+{
+ auto func(alias a)()
+ {
+ return a;
+ }
+
+ class N(alias a)
+ {
+ }
+
+ auto b = new B();
+ b.n = 1;
+
+ func!(b.n)();
+ auto dg = &func!(b.n);
+
+ new N!(b.n)();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/nestedtempl3.d b/gcc/testsuite/gdc.test/fail_compilation/nestedtempl3.d
new file mode 100644
index 0000000..a95bda0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/nestedtempl3.d
@@ -0,0 +1,24 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/nestedtempl3.d(23): Error: cannot access frame pointer of `nestedtempl3.test.S!(i).S`
+---
+*/
+
+void test()
+{
+ int i;
+
+ auto f0()
+ {
+ int j = 10;
+ struct S(alias a)
+ {
+ auto get() { return j; }
+ }
+ return S!i();
+ }
+
+ alias S = typeof(f0());
+ auto s = S();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/no_Throwable.d b/gcc/testsuite/gdc.test/fail_compilation/no_Throwable.d
new file mode 100644
index 0000000..29481e3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/no_Throwable.d
@@ -0,0 +1,26 @@
+/*
+DFLAGS:
+REQUIRED_ARGS: -c
+EXTRA_SOURCES: extra-files/minimal/object.d
+TEST_OUTPUT:
+---
+fail_compilation/no_Throwable.d(14): Error: Cannot use `throw` statements because `object.Throwable` was not declared
+fail_compilation/no_Throwable.d(19): Error: Cannot use try-catch statements because `object.Throwable` was not declared
+---
+*/
+
+void test()
+{
+ throw new Exception("msg");
+}
+
+void test2()
+{
+ try
+ {
+ test();
+ }
+ catch (Exception e)
+ {
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/no_TypeInfo.d b/gcc/testsuite/gdc.test/fail_compilation/no_TypeInfo.d
new file mode 100644
index 0000000..328f9b9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/no_TypeInfo.d
@@ -0,0 +1,16 @@
+/*
+DFLAGS:
+REQUIRED_ARGS: -c
+EXTRA_SOURCES: extra-files/minimal/object.d
+TEST_OUTPUT:
+---
+fail_compilation/no_TypeInfo.d(14): Error: `object.TypeInfo` could not be found, but is implicitly used
+---
+*/
+
+void test()
+{
+ int i;
+ auto ti = typeid(i);
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/nogc1.d b/gcc/testsuite/gdc.test/fail_compilation/nogc1.d
index 8a66ac3..a862e52 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/nogc1.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/nogc1.d
@@ -1,25 +1,21 @@
// REQUIRED_ARGS: -o-
-// PERMUTE_ARGS:
/***************** NewExp *******************/
struct S1 { }
struct S2 { this(int); }
struct S3 { this(int) @nogc; }
-struct S4 { new(size_t); }
-struct S5 { @nogc new(size_t); }
/*
TEST_OUTPUT:
---
-fail_compilation/nogc1.d(27): Error: cannot use 'new' in @nogc function 'nogc1.testNew'
-fail_compilation/nogc1.d(29): Error: cannot use 'new' in @nogc function 'nogc1.testNew'
-fail_compilation/nogc1.d(30): Error: cannot use 'new' in @nogc function 'nogc1.testNew'
-fail_compilation/nogc1.d(32): Error: cannot use 'new' in @nogc function 'nogc1.testNew'
-fail_compilation/nogc1.d(33): Error: @nogc function 'nogc1.testNew' cannot call non-@nogc constructor 'nogc1.S2.this'
-fail_compilation/nogc1.d(34): Error: cannot use 'new' in @nogc function 'nogc1.testNew'
-fail_compilation/nogc1.d(35): Error: @nogc function 'nogc1.testNew' cannot call non-@nogc allocator 'nogc1.S4.new'
-fail_compilation/nogc1.d(38): Error: cannot use 'new' in @nogc function 'nogc1.testNew'
+fail_compilation/nogc1.d(23): Error: cannot use `new` in `@nogc` function `nogc1.testNew`
+fail_compilation/nogc1.d(25): Error: cannot use `new` in `@nogc` function `nogc1.testNew`
+fail_compilation/nogc1.d(26): Error: cannot use `new` in `@nogc` function `nogc1.testNew`
+fail_compilation/nogc1.d(28): Error: cannot use `new` in `@nogc` function `nogc1.testNew`
+fail_compilation/nogc1.d(29): Error: `@nogc` function `nogc1.testNew` cannot call non-@nogc constructor `nogc1.S2.this`
+fail_compilation/nogc1.d(30): Error: cannot use `new` in `@nogc` function `nogc1.testNew`
+fail_compilation/nogc1.d(32): Error: cannot use `new` in `@nogc` function `nogc1.testNew`
---
*/
@nogc void testNew()
@@ -32,8 +28,6 @@ fail_compilation/nogc1.d(38): Error: cannot use 'new' in @nogc function 'nogc1.t
S1* ps1 = new S1();
S2* ps2 = new S2(1);
S3* ps3 = new S3(1);
- S4* ps4 = new S4;
- S5* ps5 = new S5; // no error
Object o1 = new Object();
}
@@ -41,13 +35,12 @@ fail_compilation/nogc1.d(38): Error: cannot use 'new' in @nogc function 'nogc1.t
/*
TEST_OUTPUT:
---
-fail_compilation/nogc1.d(55): Error: cannot use 'new' in @nogc function 'nogc1.testNewScope'
-fail_compilation/nogc1.d(57): Error: cannot use 'new' in @nogc function 'nogc1.testNewScope'
-fail_compilation/nogc1.d(58): Error: cannot use 'new' in @nogc function 'nogc1.testNewScope'
-fail_compilation/nogc1.d(60): Error: cannot use 'new' in @nogc function 'nogc1.testNewScope'
-fail_compilation/nogc1.d(61): Error: @nogc function 'nogc1.testNewScope' cannot call non-@nogc constructor 'nogc1.S2.this'
-fail_compilation/nogc1.d(62): Error: cannot use 'new' in @nogc function 'nogc1.testNewScope'
-fail_compilation/nogc1.d(63): Error: @nogc function 'nogc1.testNewScope' cannot call non-@nogc allocator 'nogc1.S4.new'
+fail_compilation/nogc1.d(48): Error: cannot use `new` in `@nogc` function `nogc1.testNewScope`
+fail_compilation/nogc1.d(50): Error: cannot use `new` in `@nogc` function `nogc1.testNewScope`
+fail_compilation/nogc1.d(51): Error: cannot use `new` in `@nogc` function `nogc1.testNewScope`
+fail_compilation/nogc1.d(53): Error: cannot use `new` in `@nogc` function `nogc1.testNewScope`
+fail_compilation/nogc1.d(54): Error: `@nogc` function `nogc1.testNewScope` cannot call non-@nogc constructor `nogc1.S2.this`
+fail_compilation/nogc1.d(55): Error: cannot use `new` in `@nogc` function `nogc1.testNewScope`
---
*/
@nogc void testNewScope()
@@ -60,8 +53,6 @@ fail_compilation/nogc1.d(63): Error: @nogc function 'nogc1.testNewScope' cannot
scope S1* ps1 = new S1();
scope S2* ps2 = new S2(1);
scope S3* ps3 = new S3(1);
- scope S4* ps4 = new S4;
- scope S5* ps5 = new S5; // no error
scope Object o1 = new Object(); // no error
scope o2 = new Object(); // no error
@@ -72,9 +63,12 @@ fail_compilation/nogc1.d(63): Error: @nogc function 'nogc1.testNewScope' cannot
/*
TEST_OUTPUT:
---
-fail_compilation/nogc1.d(82): Error: cannot use 'delete' in @nogc function 'nogc1.testDelete'
-fail_compilation/nogc1.d(83): Error: cannot use 'delete' in @nogc function 'nogc1.testDelete'
-fail_compilation/nogc1.d(84): Error: cannot use 'delete' in @nogc function 'nogc1.testDelete'
+fail_compilation/nogc1.d(76): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+fail_compilation/nogc1.d(76): Error: cannot use `delete` in `@nogc` function `nogc1.testDelete`
+fail_compilation/nogc1.d(77): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+fail_compilation/nogc1.d(77): Error: cannot use `delete` in `@nogc` function `nogc1.testDelete`
+fail_compilation/nogc1.d(78): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+fail_compilation/nogc1.d(78): Error: cannot use `delete` in `@nogc` function `nogc1.testDelete`
---
*/
@nogc void testDelete(int* p, Object o, S1* s)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/nogc2.d b/gcc/testsuite/gdc.test/fail_compilation/nogc2.d
index 1af413a..2a3ea8a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/nogc2.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/nogc2.d
@@ -1,19 +1,18 @@
// REQUIRED_ARGS: -o-
-// PERMUTE_ARGS:
/***************** CatExp *******************/
/*
TEST_OUTPUT:
---
-fail_compilation/nogc2.d(21): Error: cannot use operator ~ in @nogc function 'nogc2.testCat'
-fail_compilation/nogc2.d(22): Error: cannot use operator ~ in @nogc function 'nogc2.testCat'
-fail_compilation/nogc2.d(23): Error: cannot use operator ~ in @nogc function 'nogc2.testCat'
-fail_compilation/nogc2.d(25): Error: cannot use operator ~ in @nogc function 'nogc2.testCat'
-fail_compilation/nogc2.d(26): Error: cannot use operator ~ in @nogc function 'nogc2.testCat'
-fail_compilation/nogc2.d(27): Error: cannot use operator ~ in @nogc function 'nogc2.testCat'
-fail_compilation/nogc2.d(28): Error: cannot use operator ~ in @nogc function 'nogc2.testCat'
-fail_compilation/nogc2.d(29): Error: cannot use operator ~ in @nogc function 'nogc2.testCat'
+fail_compilation/nogc2.d(20): Error: cannot use operator `~` in `@nogc` function `nogc2.testCat`
+fail_compilation/nogc2.d(21): Error: cannot use operator `~` in `@nogc` function `nogc2.testCat`
+fail_compilation/nogc2.d(22): Error: cannot use operator `~` in `@nogc` function `nogc2.testCat`
+fail_compilation/nogc2.d(24): Error: cannot use operator `~` in `@nogc` function `nogc2.testCat`
+fail_compilation/nogc2.d(25): Error: cannot use operator `~` in `@nogc` function `nogc2.testCat`
+fail_compilation/nogc2.d(26): Error: cannot use operator `~` in `@nogc` function `nogc2.testCat`
+fail_compilation/nogc2.d(27): Error: cannot use operator `~` in `@nogc` function `nogc2.testCat`
+fail_compilation/nogc2.d(28): Error: cannot use operator `~` in `@nogc` function `nogc2.testCat`
---
*/
@nogc void testCat(int[] a, string s)
@@ -38,9 +37,9 @@ fail_compilation/nogc2.d(29): Error: cannot use operator ~ in @nogc function 'no
/*
TEST_OUTPUT:
---
-fail_compilation/nogc2.d(48): Error: cannot use operator ~= in @nogc function 'nogc2.testCatAssign'
-fail_compilation/nogc2.d(50): Error: cannot use operator ~= in @nogc function 'nogc2.testCatAssign'
-fail_compilation/nogc2.d(51): Error: cannot use operator ~= in @nogc function 'nogc2.testCatAssign'
+fail_compilation/nogc2.d(47): Error: cannot use operator `~=` in `@nogc` function `nogc2.testCatAssign`
+fail_compilation/nogc2.d(49): Error: cannot use operator `~=` in `@nogc` function `nogc2.testCatAssign`
+fail_compilation/nogc2.d(50): Error: cannot use operator `~=` in `@nogc` function `nogc2.testCatAssign`
---
*/
@nogc void testCatAssign(int[] a, string s)
@@ -58,8 +57,8 @@ fail_compilation/nogc2.d(51): Error: cannot use operator ~= in @nogc function 'n
/*
TEST_OUTPUT:
---
-fail_compilation/nogc2.d(70): Error: array literal in @nogc function 'nogc2.testArray' may cause GC allocation
-fail_compilation/nogc2.d(71): Error: array literal in @nogc function 'nogc2.testArray' may cause GC allocation
+fail_compilation/nogc2.d(69): Error: array literal in `@nogc` function `nogc2.testArray` may cause a GC allocation
+fail_compilation/nogc2.d(70): Error: array literal in `@nogc` function `nogc2.testArray` may cause a GC allocation
---
*/
@nogc void testArray()
@@ -76,8 +75,8 @@ fail_compilation/nogc2.d(71): Error: array literal in @nogc function 'nogc2.test
/*
TEST_OUTPUT:
---
-fail_compilation/nogc2.d(87): Error: associative array literal in @nogc function 'nogc2.testAssocArray' may cause GC allocation
-fail_compilation/nogc2.d(88): Error: associative array literal in @nogc function 'nogc2.testAssocArray' may cause GC allocation
+fail_compilation/nogc2.d(86): Error: associative array literal in `@nogc` function `nogc2.testAssocArray` may cause a GC allocation
+fail_compilation/nogc2.d(87): Error: associative array literal in `@nogc` function `nogc2.testAssocArray` may cause a GC allocation
---
*/
@nogc void testAssocArray()
@@ -93,8 +92,8 @@ fail_compilation/nogc2.d(88): Error: associative array literal in @nogc function
/*
TEST_OUTPUT:
---
-fail_compilation/nogc2.d(102): Error: indexing an associative array in @nogc function 'nogc2.testIndex' may cause GC allocation
-fail_compilation/nogc2.d(103): Error: indexing an associative array in @nogc function 'nogc2.testIndex' may cause GC allocation
+fail_compilation/nogc2.d(101): Error: indexing an associative array in `@nogc` function `nogc2.testIndex` may cause a GC allocation
+fail_compilation/nogc2.d(102): Error: indexing an associative array in `@nogc` function `nogc2.testIndex` may cause a GC allocation
---
*/
@nogc void testIndex(int[int] aa)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/nogc3.d b/gcc/testsuite/gdc.test/fail_compilation/nogc3.d
index 7c9e6d2..fdc3cde 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/nogc3.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/nogc3.d
@@ -1,14 +1,13 @@
// REQUIRED_ARGS: -o-
-// PERMUTE_ARGS:
/***************** AssignExp *******************/
/*
TEST_OUTPUT:
---
-fail_compilation/nogc3.d(16): Error: setting 'length' in @nogc function 'nogc3.testArrayLength' may cause GC allocation
-fail_compilation/nogc3.d(17): Error: setting 'length' in @nogc function 'nogc3.testArrayLength' may cause GC allocation
-fail_compilation/nogc3.d(18): Error: setting 'length' in @nogc function 'nogc3.testArrayLength' may cause GC allocation
+fail_compilation/nogc3.d(15): Error: setting `length` in `@nogc` function `nogc3.testArrayLength` may cause a GC allocation
+fail_compilation/nogc3.d(16): Error: setting `length` in `@nogc` function `nogc3.testArrayLength` may cause a GC allocation
+fail_compilation/nogc3.d(17): Error: setting `length` in `@nogc` function `nogc3.testArrayLength` may cause a GC allocation
---
*/
@nogc void testArrayLength(int[] a)
@@ -25,8 +24,8 @@ void barCall();
/*
TEST_OUTPUT:
---
-fail_compilation/nogc3.d(35): Error: @nogc function 'nogc3.testCall' cannot call non-@nogc function pointer 'fp'
-fail_compilation/nogc3.d(36): Error: @nogc function 'nogc3.testCall' cannot call non-@nogc function 'nogc3.barCall'
+fail_compilation/nogc3.d(34): Error: `@nogc` function `nogc3.testCall` cannot call non-@nogc function pointer `fp`
+fail_compilation/nogc3.d(35): Error: `@nogc` function `nogc3.testCall` cannot call non-@nogc function `nogc3.barCall`
---
*/
@nogc void testCall()
@@ -44,10 +43,10 @@ fail_compilation/nogc3.d(36): Error: @nogc function 'nogc3.testCall' cannot call
/*
TEST_OUTPUT:
---
-fail_compilation/nogc3.d(53): Error: function nogc3.testClosure1 is @nogc yet allocates closures with the GC
-fail_compilation/nogc3.d(56): nogc3.testClosure1.bar closes over variable x at fail_compilation/nogc3.d(55)
-fail_compilation/nogc3.d(65): Error: function nogc3.testClosure3 is @nogc yet allocates closures with the GC
-fail_compilation/nogc3.d(68): nogc3.testClosure3.bar closes over variable x at fail_compilation/nogc3.d(67)
+fail_compilation/nogc3.d(52): Error: function `nogc3.testClosure1` is `@nogc` yet allocates closures with the GC
+fail_compilation/nogc3.d(55): nogc3.testClosure1.bar closes over variable x at fail_compilation/nogc3.d(54)
+fail_compilation/nogc3.d(64): Error: function `nogc3.testClosure3` is `@nogc` yet allocates closures with the GC
+fail_compilation/nogc3.d(67): nogc3.testClosure3.bar closes over variable x at fail_compilation/nogc3.d(66)
---
*/
@nogc auto testClosure1()
@@ -74,10 +73,10 @@ fail_compilation/nogc3.d(68): nogc3.testClosure3.bar closes over variable
/*
TEST_OUTPUT:
---
-fail_compilation/nogc3.d(86): Error: array literal in @nogc function 'nogc3.foo13702' may cause GC allocation
-fail_compilation/nogc3.d(87): Error: array literal in @nogc function 'nogc3.foo13702' may cause GC allocation
-fail_compilation/nogc3.d(93): Error: array literal in @nogc function 'nogc3.bar13702' may cause GC allocation
-fail_compilation/nogc3.d(92): Error: array literal in @nogc function 'nogc3.bar13702' may cause GC allocation
+fail_compilation/nogc3.d(85): Error: array literal in `@nogc` function `nogc3.foo13702` may cause a GC allocation
+fail_compilation/nogc3.d(86): Error: array literal in `@nogc` function `nogc3.foo13702` may cause a GC allocation
+fail_compilation/nogc3.d(92): Error: array literal in `@nogc` function `nogc3.bar13702` may cause a GC allocation
+fail_compilation/nogc3.d(91): Error: array literal in `@nogc` function `nogc3.bar13702` may cause a GC allocation
---
*/
int[] foo13702(bool b) @nogc
diff --git a/gcc/testsuite/gdc.test/fail_compilation/noreturn.d b/gcc/testsuite/gdc.test/fail_compilation/noreturn.d
new file mode 100644
index 0000000..4a588b4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/noreturn.d
@@ -0,0 +1,118 @@
+/*
+REQUIRED_ARGS: -w -o-
+
+TEST_OUTPUT:
+---
+fail_compilation\noreturn.d(38): Error: `"Accessed expression of type `noreturn`"`
+fail_compilation\noreturn.d(42): called from here: `assign()`
+fail_compilation\noreturn.d(49): Error: `"Accessed expression of type `noreturn`"`
+fail_compilation\noreturn.d(49): called from here: `foo(n)`
+fail_compilation\noreturn.d(53): called from here: `calling()`
+fail_compilation\noreturn.d(59): Error: `"Accessed expression of type `noreturn`"`
+fail_compilation\noreturn.d(62): called from here: `nested()`
+fail_compilation\noreturn.d(68): Error: `"Accessed expression of type `noreturn`"`
+fail_compilation\noreturn.d(78): called from here: `casting(0)`
+fail_compilation\noreturn.d(69): Error: `"Accessed expression of type `noreturn`"`
+fail_compilation\noreturn.d(79): called from here: `casting(1)`
+fail_compilation\noreturn.d(72): Error: `"Accessed expression of type `noreturn`"`
+fail_compilation\noreturn.d(80): called from here: `casting(2)`
+---
+
+https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1034.md
+*/
+
+alias noreturn = typeof(*null);
+
+int pass()
+{
+ noreturn n;
+ noreturn m;
+ return 0;
+}
+
+enum forcePass = pass();
+
+int assign()
+{
+ noreturn n;
+ noreturn m = n;
+ return 0;
+}
+
+enum forceAss = assign();
+
+void foo(const noreturn) {}
+
+int calling()
+{
+ noreturn n;
+ foo(n);
+ return 0;
+}
+
+enum forceCall = calling();
+
+int nested()
+{
+ int[4] arr;
+ noreturn n;
+ return arr[n ? n : n];
+}
+
+enum forceNested = nested();
+
+noreturn casting(int i)
+{
+ final switch (i)
+ {
+ case 0: return cast(noreturn) i;
+ case 1: return cast(typeof(assert(0))) cast(double) i;
+ case 2, 3: {
+ noreturn n;
+ return cast() n;
+ }
+ }
+ assert(false);
+}
+
+enum forceCasting0 = casting(0);
+enum forceCasting1 = casting(1);
+enum forceCasting2 = casting(2);
+
+/*
+struct HasNoreturnStruct
+{
+ noreturn n;
+}
+
+int inStruct()
+{
+ HasNoreturnStruct hn;
+ return hn.n;
+}
+
+enum forceInStruct = inStruct();
+
+class HasNoreturnClass
+{
+ noreturn n;
+}
+
+int inClass()
+{
+ HasNoreturnClass hn = new HasNoreturnClass();
+ return hn.n;
+}
+
+enum forceInClass = inClass();
+
+int inClassRef()
+{
+ static void byRef(ref noreturn n) {}
+ HasNoreturnClass hn = new HasNoreturnClass();
+ byRef(hn.n);
+ return 0;
+}
+
+enum forceInClassRef = inClassRef();
+*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/noreturn2.d b/gcc/testsuite/gdc.test/fail_compilation/noreturn2.d
new file mode 100644
index 0000000..e7d28dc
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/noreturn2.d
@@ -0,0 +1,90 @@
+/*
+REQUIRED_ARGS: -w -o-
+
+TEST_OUTPUT:
+---
+fail_compilation/noreturn2.d(18): Error: expected return type of `noreturn`, not `void`
+---
+
+https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1034.md
+*/
+
+alias noreturn = typeof(*null);
+
+void doStuff();
+
+noreturn returnVoid()
+{
+ return doStuff();
+}
+
+
+/+
+TEST_OUTPUT:
+---
+fail_compilation/noreturn2.d(37): Error: expected return type of `int`, not `string`:
+fail_compilation/noreturn2.d(35): Return type of `int` inferred here.
+---
++/
+
+auto missmatch(int i)
+{
+ if (i < 0)
+ return assert(false);
+ if (i == 0)
+ return i;
+ if (i > 0)
+ return "";
+}
+
+/+
+TEST_OUTPUT:
+---
+fail_compilation/noreturn2.d(50): Error: function `noreturn2.returns` is typed as `NR` but does return
+fail_compilation/noreturn2.d(50): `noreturn` functions must either throw, abort or loop indefinitely
+---
++/
+
+enum NR : noreturn;
+
+NR returns()
+{
+ // Fallthrough despite noreturn
+}
+
+/+
+TEST_OUTPUT:
+---
+fail_compilation/noreturn2.d(64): Error: cannot implicitly convert expression `1` of type `int` to `noreturn`
+---
++/
+
+noreturn returnsValue()
+{
+ return 1;
+}
+
+/+
+TEST_OUTPUT:
+---
+fail_compilation/noreturn2.d(75): Error: expected return type of `int`, not `void`
+---
++/
+int returnVoid2()
+{
+ return doStuff();
+}
+
+/+
+TEST_OUTPUT:
+---
+fail_compilation/noreturn2.d(89): Error: mismatched function return type inference of `void` and `int`
+---
++/
+auto returnVoid3(int i)
+{
+ if (i > 0)
+ return i;
+ else
+ return doStuff();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/notype.d b/gcc/testsuite/gdc.test/fail_compilation/notype.d
new file mode 100644
index 0000000..1825968
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/notype.d
@@ -0,0 +1,31 @@
+struct S(int var = 3) {
+ int a;
+}
+S s;
+
+alias A() = int;
+A a;
+
+enum e() = 5;
+e val;
+
+interface I()
+{
+}
+I i;
+
+template t()
+{
+}
+t tv;
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/notype.d(4): Error: template struct `notype.S(int var = 3)` is used as a type without instantiation; to instantiate it use `S!(arguments)`
+fail_compilation/notype.d(7): Error: template `notype.A()` is used as a type
+fail_compilation/notype.d(10): Error: template `notype.e()` is used as a type
+fail_compilation/notype.d(15): Error: template interface `notype.I()` is used as a type without instantiation; to instantiate it use `I!(arguments)`
+fail_compilation/notype.d(20): Error: template `notype.t()` is used as a type
+---
+*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/objc_class2.d b/gcc/testsuite/gdc.test/fail_compilation/objc_class2.d
new file mode 100644
index 0000000..9d6658c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/objc_class2.d
@@ -0,0 +1,15 @@
+// EXTRA_OBJC_SOURCES
+/*
+TEST_OUTPUT:
+---
+fail_compilation/objc_class2.d(14): Error: function `objc_class2.A.test` number of colons in Objective-C selector must match number of parameters
+---
+*/
+
+import core.attribute : selector;
+
+extern (Objective-C)
+extern class A
+{
+ void test(int a, int b, int c) @selector("test:"); // non-matching number of colon
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/objc_class3.d b/gcc/testsuite/gdc.test/fail_compilation/objc_class3.d
new file mode 100644
index 0000000..f76443d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/objc_class3.d
@@ -0,0 +1,22 @@
+// EXTRA_OBJC_SOURCES
+/*
+TEST_OUTPUT:
+---
+fail_compilation/objc_class3.d(15): Error: function `objc_class3.A.test!int.test` template cannot have an Objective-C selector attached
+fail_compilation/objc_class3.d(21): Error: template instance `objc_class3.A.test!int` error instantiating
+---
+*/
+
+import core.attribute : selector;
+
+extern (Objective-C)
+extern class A
+{
+ void test(T)(T a) @selector("test:"); // selector defined for template
+}
+
+void test()
+{
+ A a;
+ a.test(3);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/objc_non_objc_base.d b/gcc/testsuite/gdc.test/fail_compilation/objc_non_objc_base.d
new file mode 100644
index 0000000..6e2b078
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/objc_non_objc_base.d
@@ -0,0 +1,12 @@
+// EXTRA_OBJC_SOURCES
+/*
+TEST_OUTPUT:
+---
+fail_compilation/objc_non_objc_base.d(12): Error: class `objc_non_objc_base.A` base class for an Objective-C class must be `extern (Objective-C)`
+---
+*/
+
+interface Base {}
+
+extern (Objective-C)
+class A : Base {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/parse12967a.d b/gcc/testsuite/gdc.test/fail_compilation/parse12967a.d
index 90bccb7..5282232 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/parse12967a.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/parse12967a.d
@@ -1,14 +1,14 @@
/*
TEST_OUTPUT:
---
-fail_compilation/parse12967a.d(14): Error: function parse12967a.pre_i1 without 'this' cannot be immutable
-fail_compilation/parse12967a.d(15): Error: function parse12967a.pre_i2 without 'this' cannot be immutable
-fail_compilation/parse12967a.d(16): Error: function parse12967a.pre_c1 without 'this' cannot be const
-fail_compilation/parse12967a.d(17): Error: function parse12967a.pre_c2 without 'this' cannot be const
-fail_compilation/parse12967a.d(18): Error: function parse12967a.pre_w1 without 'this' cannot be inout
-fail_compilation/parse12967a.d(19): Error: function parse12967a.pre_w2 without 'this' cannot be inout
-fail_compilation/parse12967a.d(20): Error: function parse12967a.pre_s1 without 'this' cannot be shared
-fail_compilation/parse12967a.d(21): Error: function parse12967a.pre_s2 without 'this' cannot be shared
+fail_compilation/parse12967a.d(14): Error: function `parse12967a.pre_i1` without `this` cannot be `immutable`
+fail_compilation/parse12967a.d(15): Error: function `parse12967a.pre_i2` without `this` cannot be `immutable`
+fail_compilation/parse12967a.d(16): Error: function `parse12967a.pre_c1` without `this` cannot be `const`
+fail_compilation/parse12967a.d(17): Error: function `parse12967a.pre_c2` without `this` cannot be `const`
+fail_compilation/parse12967a.d(18): Error: function `parse12967a.pre_w1` without `this` cannot be `inout`
+fail_compilation/parse12967a.d(19): Error: function `parse12967a.pre_w2` without `this` cannot be `inout`
+fail_compilation/parse12967a.d(20): Error: function `parse12967a.pre_s1` without `this` cannot be `shared`
+fail_compilation/parse12967a.d(21): Error: function `parse12967a.pre_s2` without `this` cannot be `shared`
---
*/
immutable pre_i1() {}
@@ -23,14 +23,14 @@ shared void pre_s2() {}
/*
TEST_OUTPUT:
---
-fail_compilation/parse12967a.d(36): Error: function parse12967a.post_i1 without 'this' cannot be immutable
-fail_compilation/parse12967a.d(37): Error: function parse12967a.post_i2 without 'this' cannot be immutable
-fail_compilation/parse12967a.d(38): Error: function parse12967a.post_c1 without 'this' cannot be const
-fail_compilation/parse12967a.d(39): Error: function parse12967a.post_c2 without 'this' cannot be const
-fail_compilation/parse12967a.d(40): Error: function parse12967a.post_w1 without 'this' cannot be inout
-fail_compilation/parse12967a.d(41): Error: function parse12967a.post_w2 without 'this' cannot be inout
-fail_compilation/parse12967a.d(42): Error: function parse12967a.post_s1 without 'this' cannot be shared
-fail_compilation/parse12967a.d(43): Error: function parse12967a.post_s2 without 'this' cannot be shared
+fail_compilation/parse12967a.d(36): Error: function `parse12967a.post_i1` without `this` cannot be `immutable`
+fail_compilation/parse12967a.d(37): Error: function `parse12967a.post_i2` without `this` cannot be `immutable`
+fail_compilation/parse12967a.d(38): Error: function `parse12967a.post_c1` without `this` cannot be `const`
+fail_compilation/parse12967a.d(39): Error: function `parse12967a.post_c2` without `this` cannot be `const`
+fail_compilation/parse12967a.d(40): Error: function `parse12967a.post_w1` without `this` cannot be `inout`
+fail_compilation/parse12967a.d(41): Error: function `parse12967a.post_w2` without `this` cannot be `inout`
+fail_compilation/parse12967a.d(42): Error: function `parse12967a.post_s1` without `this` cannot be `shared`
+fail_compilation/parse12967a.d(43): Error: function `parse12967a.post_s2` without `this` cannot be `shared`
---
*/
auto post_i1() immutable {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/parse12967b.d b/gcc/testsuite/gdc.test/fail_compilation/parse12967b.d
index 60d9d09..064f297 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/parse12967b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/parse12967b.d
@@ -1,41 +1,45 @@
/*
TEST_OUTPUT:
---
-fail_compilation/parse12967b.d(24): Error: function parse12967b.C.pre_c without 'this' cannot be const
-fail_compilation/parse12967b.d(25): Error: function parse12967b.C.pre_c without 'this' cannot be const
-fail_compilation/parse12967b.d(26): Error: function parse12967b.C.pre_i without 'this' cannot be immutable
-fail_compilation/parse12967b.d(27): Error: function parse12967b.C.pre_i without 'this' cannot be immutable
-fail_compilation/parse12967b.d(28): Error: function parse12967b.C.pre_w without 'this' cannot be inout
-fail_compilation/parse12967b.d(29): Error: function parse12967b.C.pre_w without 'this' cannot be inout
-fail_compilation/parse12967b.d(30): Error: function parse12967b.C.pre_s without 'this' cannot be shared
-fail_compilation/parse12967b.d(31): Error: function parse12967b.C.pre_s without 'this' cannot be shared
-fail_compilation/parse12967b.d(33): Error: function parse12967b.C.post_c without 'this' cannot be const
-fail_compilation/parse12967b.d(34): Error: function parse12967b.C.post_c without 'this' cannot be const
-fail_compilation/parse12967b.d(35): Error: function parse12967b.C.post_i without 'this' cannot be immutable
-fail_compilation/parse12967b.d(36): Error: function parse12967b.C.post_i without 'this' cannot be immutable
-fail_compilation/parse12967b.d(37): Error: function parse12967b.C.post_w without 'this' cannot be inout
-fail_compilation/parse12967b.d(38): Error: function parse12967b.C.post_w without 'this' cannot be inout
-fail_compilation/parse12967b.d(39): Error: function parse12967b.C.post_s without 'this' cannot be shared
-fail_compilation/parse12967b.d(40): Error: function parse12967b.C.post_s without 'this' cannot be shared
+fail_compilation/parse12967b.d(24): Error: function `parse12967b.C.pre_c` without `this` cannot be `const`
+fail_compilation/parse12967b.d(25): Error: function `parse12967b.C.pre_i` without `this` cannot be `immutable`
+fail_compilation/parse12967b.d(26): Error: function `parse12967b.C.pre_w` without `this` cannot be `inout`
+fail_compilation/parse12967b.d(27): Error: function `parse12967b.C.pre_s` without `this` cannot be `shared`
+fail_compilation/parse12967b.d(29): Error: function `parse12967b.C.post_c` without `this` cannot be `const`
+fail_compilation/parse12967b.d(30): Error: function `parse12967b.C.post_i` without `this` cannot be `immutable`
+fail_compilation/parse12967b.d(31): Error: function `parse12967b.C.post_w` without `this` cannot be `inout`
+fail_compilation/parse12967b.d(32): Error: function `parse12967b.C.post_s` without `this` cannot be `shared`
+fail_compilation/parse12967b.d(37): Error: function `parse12967b.D.pre_c` without `this` cannot be `const`
+fail_compilation/parse12967b.d(38): Error: function `parse12967b.D.pre_i` without `this` cannot be `immutable`
+fail_compilation/parse12967b.d(39): Error: function `parse12967b.D.pre_w` without `this` cannot be `inout`
+fail_compilation/parse12967b.d(40): Error: function `parse12967b.D.pre_s` without `this` cannot be `shared`
+fail_compilation/parse12967b.d(41): Error: function `parse12967b.D.post_c` without `this` cannot be `const`
+fail_compilation/parse12967b.d(42): Error: function `parse12967b.D.post_i` without `this` cannot be `immutable`
+fail_compilation/parse12967b.d(43): Error: function `parse12967b.D.post_w` without `this` cannot be `inout`
+fail_compilation/parse12967b.d(44): Error: function `parse12967b.D.post_s` without `this` cannot be `shared`
---
*/
class C
{
const static pre_c() {}
- const static void pre_c() {}
immutable static pre_i() {}
- immutable static void pre_i() {}
inout static pre_w() {}
- inout static void pre_w() {}
shared static pre_s() {}
- shared static void pre_s() {}
static post_c() const {}
- static void post_c() const {}
static post_i() immutable {}
- static void post_i() immutable {}
static post_w() inout {}
- static void post_w() inout {}
static post_s() shared {}
+}
+
+class D
+{
+ const static void pre_c() {}
+ immutable static void pre_i() {}
+ inout static void pre_w() {}
+ shared static void pre_s() {}
+ static void post_c() const {}
+ static void post_i() immutable {}
+ static void post_w() inout {}
static void post_s() shared {}
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/parse19277.d b/gcc/testsuite/gdc.test/fail_compilation/parse19277.d
new file mode 100644
index 0000000..19dd747
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/parse19277.d
@@ -0,0 +1,20 @@
+/*
+REQUIRED_ARGS: -de
+TEST_OUTPUT:
+---
+fail_compilation/parse19277.d(13): Deprecation: storage class `ref` has no effect in type aliases
+fail_compilation/parse19277.d(14): Deprecation: storage class `__gshared` has no effect in type aliases
+fail_compilation/parse19277.d(15): Deprecation: storage class `static` has no effect in type aliases
+fail_compilation/parse19277.d(16): Deprecation: storage class `extern` has no effect in type aliases
+fail_compilation/parse19277.d(17): Deprecation: storage class `scope` has no effect in type aliases
+---
+*/
+
+alias T = ref int;
+alias U = __gshared int;
+alias V = static int;
+alias W = extern int;
+alias Dg = scope void delegate();
+
+alias F = ref pure nothrow @nogc @safe @live int function();
+alias G = ref pure nothrow @nogc @system @live int delegate();
diff --git a/gcc/testsuite/gdc.test/fail_compilation/parseStc.d b/gcc/testsuite/gdc.test/fail_compilation/parseStc.d
index e0ce2c3..c9c4288 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/parseStc.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/parseStc.d
@@ -1,9 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/parseStc.d(11): Error: found `;` when expecting `)`
-fail_compilation/parseStc.d(11): Error: found `)` when expecting `;` following statement
-fail_compilation/parseStc.d(12): Error: redundant attribute `const`
+fail_compilation/parseStc.d(12): Error: missing closing `)` after `if (x`
+fail_compilation/parseStc.d(12): Error: use `{ }` for an empty statement, not `;`
+fail_compilation/parseStc.d(12): Error: found `)` when expecting `;` following statement
+fail_compilation/parseStc.d(13): Error: redundant attribute `const`
---
*/
void test1()
@@ -15,9 +16,9 @@ void test1()
/*
TEST_OUTPUT:
---
-fail_compilation/parseStc.d(25): Error: redundant attribute `const`
fail_compilation/parseStc.d(26): Error: redundant attribute `const`
-fail_compilation/parseStc.d(27): Error: conflicting attribute `immutable`
+fail_compilation/parseStc.d(27): Error: redundant attribute `const`
+fail_compilation/parseStc.d(28): Error: conflicting attribute `immutable`
---
*/
void test2()
@@ -30,8 +31,8 @@ void test2()
/*
TEST_OUTPUT:
---
-fail_compilation/parseStc.d(37): Error: redundant attribute `const`
fail_compilation/parseStc.d(38): Error: redundant attribute `const`
+fail_compilation/parseStc.d(39): Error: redundant attribute `const`
---
*/
struct S3 { const const test3() {} }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/parseStc2.d b/gcc/testsuite/gdc.test/fail_compilation/parseStc2.d
index 5e9c446..936769a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/parseStc2.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/parseStc2.d
@@ -43,8 +43,8 @@ extern(C++, foo) extern(C++, bar) void f8() {} // OK
/*
TEST_OUTPUT:
---
-fail_compilation/parseStc2.d(50): Error: redundant protection attribute `public`
-fail_compilation/parseStc2.d(51): Error: conflicting protection attribute `public` and `private`
+fail_compilation/parseStc2.d(50): Error: redundant visibility attribute `public`
+fail_compilation/parseStc2.d(51): Error: conflicting visibility attribute `public` and `private`
---
*/
public public void f9() {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/parseStc3.d b/gcc/testsuite/gdc.test/fail_compilation/parseStc3.d
index 1417f94..d4c0aa0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/parseStc3.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/parseStc3.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/parseStc3.d(10): Deprecation: redundant attribute `pure`
-fail_compilation/parseStc3.d(11): Deprecation: redundant attribute `nothrow`
-fail_compilation/parseStc3.d(12): Deprecation: redundant attribute `@nogc`
-fail_compilation/parseStc3.d(13): Deprecation: redundant attribute `@property`
+fail_compilation/parseStc3.d(10): Error: redundant attribute `pure`
+fail_compilation/parseStc3.d(11): Error: redundant attribute `nothrow`
+fail_compilation/parseStc3.d(12): Error: redundant attribute `@nogc`
+fail_compilation/parseStc3.d(13): Error: redundant attribute `@property`
---
*/
pure void f1() pure {}
@@ -16,9 +16,9 @@ nothrow void f2() nothrow {}
/*
TEST_OUTPUT:
---
-fail_compilation/parseStc3.d(24): Deprecation: redundant attribute `@safe`
-fail_compilation/parseStc3.d(25): Deprecation: redundant attribute `@system`
-fail_compilation/parseStc3.d(26): Deprecation: redundant attribute `@trusted`
+fail_compilation/parseStc3.d(24): Error: redundant attribute `@safe`
+fail_compilation/parseStc3.d(25): Error: redundant attribute `@system`
+fail_compilation/parseStc3.d(26): Error: redundant attribute `@trusted`
---
*/
@safe void f6() @safe {}
@@ -49,11 +49,11 @@ TEST_OUTPUT:
fail_compilation/parseStc3.d(59): Error: conflicting attribute `@system`
fail_compilation/parseStc3.d(59): Error: conflicting attribute `@trusted`
fail_compilation/parseStc3.d(60): Error: conflicting attribute `@system`
-fail_compilation/parseStc3.d(60): Deprecation: redundant attribute `@system`
+fail_compilation/parseStc3.d(60): Error: redundant attribute `@system`
fail_compilation/parseStc3.d(61): Error: conflicting attribute `@safe`
-fail_compilation/parseStc3.d(61): Deprecation: redundant attribute `@system`
+fail_compilation/parseStc3.d(61): Error: redundant attribute `@system`
fail_compilation/parseStc3.d(62): Error: conflicting attribute `@safe`
-fail_compilation/parseStc3.d(62): Deprecation: redundant attribute `@trusted`
+fail_compilation/parseStc3.d(62): Error: redundant attribute `@trusted`
---
*/
@safe @system void f15() @trusted {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/parseStc4.d b/gcc/testsuite/gdc.test/fail_compilation/parseStc4.d
index fee3e08..4bd3a04 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/parseStc4.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/parseStc4.d
@@ -2,11 +2,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/parseStc4.d(14): Deprecation: redundant attribute `pure`
-fail_compilation/parseStc4.d(14): Deprecation: redundant attribute `nothrow`
+fail_compilation/parseStc4.d(14): Error: redundant attribute `pure`
+fail_compilation/parseStc4.d(14): Error: redundant attribute `nothrow`
fail_compilation/parseStc4.d(14): Error: conflicting attribute `@system`
-fail_compilation/parseStc4.d(14): Deprecation: redundant attribute `@nogc`
-fail_compilation/parseStc4.d(14): Deprecation: redundant attribute `@property`
+fail_compilation/parseStc4.d(14): Error: redundant attribute `@nogc`
+fail_compilation/parseStc4.d(14): Error: redundant attribute `@property`
---
*/
pure nothrow @safe @nogc @property
@@ -19,13 +19,14 @@ pure nothrow @system @nogc @property
/*
TEST_OUTPUT:
---
-fail_compilation/parseStc4.d(34): Deprecation: redundant attribute `const`
-fail_compilation/parseStc4.d(35): Deprecation: redundant attribute `const`
-fail_compilation/parseStc4.d(36): Deprecation: redundant attribute `const`
-fail_compilation/parseStc4.d(38): Deprecation: redundant attribute `pure`
-fail_compilation/parseStc4.d(39): Deprecation: redundant attribute `@safe`
-fail_compilation/parseStc4.d(40): Deprecation: redundant attribute `nothrow`
-fail_compilation/parseStc4.d(41): Error: conflicting attribute `@trusted`
+fail_compilation/parseStc4.d(35): Error: redundant attribute `const`
+fail_compilation/parseStc4.d(36): Error: redundant attribute `const`
+fail_compilation/parseStc4.d(36): Deprecation: `const` postblit is deprecated. Please use an unqualified postblit.
+fail_compilation/parseStc4.d(37): Error: redundant attribute `const`
+fail_compilation/parseStc4.d(39): Error: redundant attribute `pure`
+fail_compilation/parseStc4.d(40): Error: redundant attribute `@safe`
+fail_compilation/parseStc4.d(41): Error: redundant attribute `nothrow`
+fail_compilation/parseStc4.d(42): Error: conflicting attribute `@trusted`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/parseStc5.d b/gcc/testsuite/gdc.test/fail_compilation/parseStc5.d
index a274c6e..8c3718b6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/parseStc5.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/parseStc5.d
@@ -1,9 +1,8 @@
-// REQUIRED_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/parseStc5.d(11): Error: constructor cannot be static
-fail_compilation/parseStc5.d(12): Error: postblit cannot be static
+fail_compilation/parseStc5.d(10): Error: constructor cannot be static
+fail_compilation/parseStc5.d(11): Error: postblit cannot be `static`
---
*/
class C1
@@ -15,12 +14,12 @@ class C1
/*
TEST_OUTPUT:
---
+fail_compilation/parseStc5.d(27): Error: use `shared static this()` to declare a shared static constructor
fail_compilation/parseStc5.d(28): Error: use `shared static this()` to declare a shared static constructor
-fail_compilation/parseStc5.d(29): Error: use `shared static this()` to declare a shared static constructor
-fail_compilation/parseStc5.d(31): Error: use `shared static this()` to declare a shared static constructor
+fail_compilation/parseStc5.d(30): Error: use `shared static this()` to declare a shared static constructor
+fail_compilation/parseStc5.d(32): Error: use `shared static ~this()` to declare a shared static destructor
fail_compilation/parseStc5.d(33): Error: use `shared static ~this()` to declare a shared static destructor
-fail_compilation/parseStc5.d(34): Error: use `shared static ~this()` to declare a shared static destructor
-fail_compilation/parseStc5.d(36): Error: use `shared static ~this()` to declare a shared static destructor
+fail_compilation/parseStc5.d(35): Error: use `shared static ~this()` to declare a shared static destructor
---
*/
class C2 // wrong combinations of `shared`, `static`, and `~?this()`
@@ -39,8 +38,8 @@ class C2 // wrong combinations of `shared`, `static`, and `~?this()`
/*
TEST_OUTPUT:
---
-fail_compilation/parseStc5.d(48): Error: use `static this()` to declare a static constructor
-fail_compilation/parseStc5.d(49): Error: use `static ~this()` to declare a static destructor
+fail_compilation/parseStc5.d(47): Error: use `static this()` to declare a static constructor
+fail_compilation/parseStc5.d(48): Error: use `static ~this()` to declare a static destructor
---
*/
class C3 // wrong combinations of `static` and `~?this()`
@@ -52,11 +51,11 @@ class C3 // wrong combinations of `static` and `~?this()`
/*
TEST_OUTPUT:
---
+fail_compilation/parseStc5.d(63): Error: redundant attribute `shared`
fail_compilation/parseStc5.d(64): Error: redundant attribute `shared`
-fail_compilation/parseStc5.d(65): Error: redundant attribute `shared`
-fail_compilation/parseStc5.d(67): Error: redundant attribute `static`
+fail_compilation/parseStc5.d(66): Error: redundant attribute `static`
+fail_compilation/parseStc5.d(68): Error: redundant attribute `static shared`
fail_compilation/parseStc5.d(69): Error: redundant attribute `static shared`
-fail_compilation/parseStc5.d(70): Error: redundant attribute `static shared`
---
*/
class C4 // redundancy of `shared` and/or `static`
@@ -73,10 +72,10 @@ class C4 // redundancy of `shared` and/or `static`
/*
TEST_OUTPUT:
---
-fail_compilation/parseStc5.d(84): Error: static constructor cannot be `const`
-fail_compilation/parseStc5.d(85): Error: static destructor cannot be `const`
-fail_compilation/parseStc5.d(86): Error: shared static constructor cannot be `const`
-fail_compilation/parseStc5.d(87): Error: shared static destructor cannot be `const`
+fail_compilation/parseStc5.d(83): Error: static constructor cannot be `const`
+fail_compilation/parseStc5.d(84): Error: static destructor cannot be `const`
+fail_compilation/parseStc5.d(85): Error: shared static constructor cannot be `const`
+fail_compilation/parseStc5.d(86): Error: shared static destructor cannot be `const`
---
*/
class C5 // wrong MemberFunctionAttributes on `shared? static (con|de)structor`
diff --git a/gcc/testsuite/gdc.test/fail_compilation/pragmainline.d b/gcc/testsuite/gdc.test/fail_compilation/pragmainline.d
index 030f19a..6d935a0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/pragmainline.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/pragmainline.d
@@ -1,11 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/pragmainline.d(9): Error: pragma inline one boolean expression expected for `pragma(inline)`, not 3
-fail_compilation/pragmainline.d(10): Error: pragma inline pragma(`inline`, `true` or `false`) expected, not `"string"`
+fail_compilation/pragmainline.d(8): Error: pragma `inline` one boolean expression expected for `pragma(inline)`, not 3
---
*/
pragma(inline, 1,2,3) void bar();
-pragma(inline, "string") void baz();
+pragma(inline, "string") void baz(); // works now
diff --git a/gcc/testsuite/gdc.test/fail_compilation/pragmas.d b/gcc/testsuite/gdc.test/fail_compilation/pragmas.d
index 33a8921..25ab151 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/pragmas.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/pragmas.d
@@ -1,16 +1,10 @@
-/*
-REQUIRED_ARGS:
-PERMUTE_ARGS:
-*/
-
/************************************************************/
/*
TEST_OUTPUT:
---
-fail_compilation/pragmas.d(103): Error: boolean expression expected for pragma(inline)
-fail_compilation/pragmas.d(108): Error: boolean expression expected for pragma(inline)
-fail_compilation/pragmas.d(113): Error: pragma(inline, true or false) expected, not `"string"`
+fail_compilation/pragmas.d(103): Error: boolean expression expected for `pragma(inline)`
+fail_compilation/pragmas.d(108): Error: boolean expression expected for `pragma(inline)`
fail_compilation/pragmas.d(118): Error: unrecognized `pragma(unrecognized)`
---
*/
@@ -29,7 +23,7 @@ void test2()
void test3()
{
- pragma(inline, "string");
+ pragma(inline, "string"); // works now
}
void test4()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/previewin.d b/gcc/testsuite/gdc.test/fail_compilation/previewin.d
new file mode 100644
index 0000000..b3beaf4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/previewin.d
@@ -0,0 +1,42 @@
+/*
+REQUIRED_ARGS: -preview=in -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/previewin.d(4): Error: function `previewin.takeFunction(void function(in real) f)` is not callable using argument types `(void function(real x) pure nothrow @nogc @safe)`
+fail_compilation/previewin.d(4): cannot pass argument `__lambda1` of type `void function(real x) pure nothrow @nogc @safe` to parameter `void function(in real) f`
+fail_compilation/previewin.d(5): Error: function `previewin.takeFunction(void function(in real) f)` is not callable using argument types `(void function(const(real) x) pure nothrow @nogc @safe)`
+fail_compilation/previewin.d(5): cannot pass argument `__lambda2` of type `void function(const(real) x) pure nothrow @nogc @safe` to parameter `void function(in real) f`
+fail_compilation/previewin.d(6): Error: function `previewin.takeFunction(void function(in real) f)` is not callable using argument types `(void function(ref const(real) x) pure nothrow @nogc @safe)`
+fail_compilation/previewin.d(6): cannot pass argument `__lambda3` of type `void function(ref const(real) x) pure nothrow @nogc @safe` to parameter `void function(in real) f`
+fail_compilation/previewin.d(15): Error: scope variable `arg` assigned to non-scope `myGlobal`
+fail_compilation/previewin.d(16): Error: scope variable `arg` assigned to non-scope `myGlobal`
+fail_compilation/previewin.d(17): Error: scope variable `arg` may not be returned
+fail_compilation/previewin.d(18): Error: scope variable `arg` assigned to `escape` with longer lifetime
+fail_compilation/previewin.d(22): Error: returning `arg` escapes a reference to parameter `arg`
+fail_compilation/previewin.d(22): perhaps annotate the parameter with `return`
+---
+ */
+
+#line 1
+void main ()
+{
+ // No covariance without explicit `in`
+ takeFunction((real x) {});
+ takeFunction((const scope real x) {});
+ takeFunction((const scope ref real x) {});
+
+ tryEscape("Hello World"); // Yes by `tryEscape` is NG
+}
+
+void takeFunction(void function(in real) f);
+
+// Make sure things cannot be escaped (`scope` is applied)
+const(char)[] myGlobal;
+void tryEscape(in char[] arg) @safe { myGlobal = arg; }
+void tryEscape2(scope const char[] arg) @safe { myGlobal = arg; }
+const(char)[] tryEscape3(in char[] arg) @safe { return arg; }
+void tryEscape4(in char[] arg, ref const(char)[] escape) @safe { escape = arg; }
+// Okay: value type
+ulong[8] tryEscape5(in ulong[8] arg) @safe { return arg; }
+// NG: Ref
+ref const(ulong[8]) tryEscape6(in ulong[8] arg) @safe { return arg; }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/protattr1.d b/gcc/testsuite/gdc.test/fail_compilation/protattr1.d
index dbd2efa..f5976ff 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/protattr1.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/protattr1.d
@@ -1,7 +1,8 @@
/*
+EXTRA_FILES: protection/subpkg/test1.d
TEST_OUTPUT:
---
-fail_compilation/protection/subpkg/test1.d(3): Error: protection attribute 'package(undefined)' does not bind to one of ancestor packages of module `protection.subpkg.test1`
+fail_compilation/protection/subpkg/test1.d(3): Error: visibility attribute `package(undefined)` does not bind to one of ancestor packages of module `protection.subpkg.test1`
---
*/
import protection.subpkg.test1;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/protattr2.d b/gcc/testsuite/gdc.test/fail_compilation/protattr2.d
index cc36cc0..7b6704f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/protattr2.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/protattr2.d
@@ -1,7 +1,8 @@
/*
+EXTRA_FILES: protection/subpkg/test2.d
TEST_OUTPUT:
---
-fail_compilation/protection/subpkg/test2.d(3): Error: protection attribute 'package(protection.subpkg2)' does not bind to one of ancestor packages of module `protection.subpkg.test2`
+fail_compilation/protection/subpkg/test2.d(3): Error: visibility attribute `package(protection.subpkg2)` does not bind to one of ancestor packages of module `protection.subpkg.test2`
---
*/
import protection.subpkg.test2;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/protattr3.d b/gcc/testsuite/gdc.test/fail_compilation/protattr3.d
index 8f40b2e..acfc9f9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/protattr3.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/protattr3.d
@@ -1,4 +1,5 @@
/*
+EXTRA_FILES: protection/subpkg/test3.d
TEST_OUTPUT:
---
fail_compilation/protection/subpkg/test3.d(3): Error: `protection package` expected as dot-separated identifiers, got `123`
diff --git a/gcc/testsuite/gdc.test/fail_compilation/pull12941.d b/gcc/testsuite/gdc.test/fail_compilation/pull12941.d
new file mode 100644
index 0000000..b020868
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/pull12941.d
@@ -0,0 +1,31 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/pull12941.d(110): Error: `pull12941.foo` called with argument types `(int*)` matches both:
+fail_compilation/pull12941.d(101): `pull12941.foo(ref return scope int* p)`
+and:
+fail_compilation/pull12941.d(102): `pull12941.foo(out return scope int* p)`
+fail_compilation/pull12941.d(111): Error: function `pull12941.bar(return scope int* p)` is not callable using argument types `(int)`
+fail_compilation/pull12941.d(111): cannot pass argument `1` of type `int` to parameter `return scope int* p`
+fail_compilation/pull12941.d(112): Error: function `pull12941.abc(return ref int* p)` is not callable using argument types `(int)`
+fail_compilation/pull12941.d(112): cannot pass rvalue argument `1` of type `int` to parameter `return ref int* p`
+---
+ */
+
+/*********************************/
+// Tests for https://github.com/dlang/dmd/pull/12941
+
+#line 100
+
+int* foo(ref scope return int* p);
+int* foo(out scope return int* p);
+
+int* bar(scope return int* p);
+int* abc(ref return int* p);
+
+void test()
+{
+ int* p;
+ foo(p);
+ bar(1);
+ abc(1);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/reserved_version.d b/gcc/testsuite/gdc.test/fail_compilation/reserved_version.d
index 1fe4728..43998b9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/reserved_version.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/reserved_version.d
@@ -13,95 +13,108 @@ fail_compilation/reserved_version.d(112): Error: version identifier `Win32` is r
fail_compilation/reserved_version.d(113): Error: version identifier `Win64` is reserved and cannot be set
fail_compilation/reserved_version.d(114): Error: version identifier `linux` is reserved and cannot be set
fail_compilation/reserved_version.d(115): Error: version identifier `OSX` is reserved and cannot be set
-fail_compilation/reserved_version.d(116): Error: version identifier `FreeBSD` is reserved and cannot be set
-fail_compilation/reserved_version.d(117): Error: version identifier `OpenBSD` is reserved and cannot be set
-fail_compilation/reserved_version.d(118): Error: version identifier `NetBSD` is reserved and cannot be set
-fail_compilation/reserved_version.d(119): Error: version identifier `DragonFlyBSD` is reserved and cannot be set
-fail_compilation/reserved_version.d(120): Error: version identifier `BSD` is reserved and cannot be set
-fail_compilation/reserved_version.d(121): Error: version identifier `Solaris` is reserved and cannot be set
-fail_compilation/reserved_version.d(122): Error: version identifier `Posix` is reserved and cannot be set
-fail_compilation/reserved_version.d(123): Error: version identifier `AIX` is reserved and cannot be set
-fail_compilation/reserved_version.d(124): Error: version identifier `Haiku` is reserved and cannot be set
-fail_compilation/reserved_version.d(125): Error: version identifier `SkyOS` is reserved and cannot be set
-fail_compilation/reserved_version.d(126): Error: version identifier `SysV3` is reserved and cannot be set
-fail_compilation/reserved_version.d(127): Error: version identifier `SysV4` is reserved and cannot be set
-fail_compilation/reserved_version.d(128): Error: version identifier `Hurd` is reserved and cannot be set
-fail_compilation/reserved_version.d(129): Error: version identifier `Android` is reserved and cannot be set
-fail_compilation/reserved_version.d(130): Error: version identifier `PlayStation` is reserved and cannot be set
-fail_compilation/reserved_version.d(131): Error: version identifier `PlayStation4` is reserved and cannot be set
-fail_compilation/reserved_version.d(132): Error: version identifier `Cygwin` is reserved and cannot be set
-fail_compilation/reserved_version.d(133): Error: version identifier `MinGW` is reserved and cannot be set
-fail_compilation/reserved_version.d(134): Error: version identifier `FreeStanding` is reserved and cannot be set
-fail_compilation/reserved_version.d(135): Error: version identifier `X86` is reserved and cannot be set
-fail_compilation/reserved_version.d(136): Error: version identifier `X86_64` is reserved and cannot be set
-fail_compilation/reserved_version.d(137): Error: version identifier `ARM` is reserved and cannot be set
-fail_compilation/reserved_version.d(138): Error: version identifier `ARM_Thumb` is reserved and cannot be set
-fail_compilation/reserved_version.d(139): Error: version identifier `ARM_SoftFloat` is reserved and cannot be set
-fail_compilation/reserved_version.d(140): Error: version identifier `ARM_SoftFP` is reserved and cannot be set
-fail_compilation/reserved_version.d(141): Error: version identifier `ARM_HardFloat` is reserved and cannot be set
-fail_compilation/reserved_version.d(142): Error: version identifier `AArch64` is reserved and cannot be set
-fail_compilation/reserved_version.d(143): Error: version identifier `Epiphany` is reserved and cannot be set
-fail_compilation/reserved_version.d(144): Error: version identifier `PPC` is reserved and cannot be set
-fail_compilation/reserved_version.d(145): Error: version identifier `PPC_SoftFloat` is reserved and cannot be set
-fail_compilation/reserved_version.d(146): Error: version identifier `PPC_HardFloat` is reserved and cannot be set
-fail_compilation/reserved_version.d(147): Error: version identifier `PPC64` is reserved and cannot be set
-fail_compilation/reserved_version.d(148): Error: version identifier `IA64` is reserved and cannot be set
-fail_compilation/reserved_version.d(149): Error: version identifier `MIPS32` is reserved and cannot be set
-fail_compilation/reserved_version.d(150): Error: version identifier `MIPS64` is reserved and cannot be set
-fail_compilation/reserved_version.d(151): Error: version identifier `MIPS_O32` is reserved and cannot be set
-fail_compilation/reserved_version.d(152): Error: version identifier `MIPS_N32` is reserved and cannot be set
-fail_compilation/reserved_version.d(153): Error: version identifier `MIPS_O64` is reserved and cannot be set
-fail_compilation/reserved_version.d(154): Error: version identifier `MIPS_N64` is reserved and cannot be set
-fail_compilation/reserved_version.d(155): Error: version identifier `MIPS_EABI` is reserved and cannot be set
-fail_compilation/reserved_version.d(156): Error: version identifier `MIPS_SoftFloat` is reserved and cannot be set
-fail_compilation/reserved_version.d(157): Error: version identifier `MIPS_HardFloat` is reserved and cannot be set
-fail_compilation/reserved_version.d(158): Error: version identifier `NVPTX` is reserved and cannot be set
-fail_compilation/reserved_version.d(159): Error: version identifier `NVPTX64` is reserved and cannot be set
-fail_compilation/reserved_version.d(160): Error: version identifier `RISCV32` is reserved and cannot be set
-fail_compilation/reserved_version.d(161): Error: version identifier `RISCV64` is reserved and cannot be set
-fail_compilation/reserved_version.d(162): Error: version identifier `SPARC` is reserved and cannot be set
-fail_compilation/reserved_version.d(163): Error: version identifier `SPARC_V8Plus` is reserved and cannot be set
-fail_compilation/reserved_version.d(164): Error: version identifier `SPARC_SoftFloat` is reserved and cannot be set
-fail_compilation/reserved_version.d(165): Error: version identifier `SPARC_HardFloat` is reserved and cannot be set
-fail_compilation/reserved_version.d(166): Error: version identifier `SPARC64` is reserved and cannot be set
-fail_compilation/reserved_version.d(167): Error: version identifier `S390` is reserved and cannot be set
-fail_compilation/reserved_version.d(168): Error: version identifier `S390X` is reserved and cannot be set
-fail_compilation/reserved_version.d(169): Error: version identifier `SystemZ` is reserved and cannot be set
-fail_compilation/reserved_version.d(170): Error: version identifier `HPPA` is reserved and cannot be set
-fail_compilation/reserved_version.d(171): Error: version identifier `HPPA64` is reserved and cannot be set
-fail_compilation/reserved_version.d(172): Error: version identifier `SH` is reserved and cannot be set
-fail_compilation/reserved_version.d(173): Error: version identifier `Alpha` is reserved and cannot be set
-fail_compilation/reserved_version.d(174): Error: version identifier `Alpha_SoftFloat` is reserved and cannot be set
-fail_compilation/reserved_version.d(175): Error: version identifier `Alpha_HardFloat` is reserved and cannot be set
-fail_compilation/reserved_version.d(176): Error: version identifier `LittleEndian` is reserved and cannot be set
-fail_compilation/reserved_version.d(177): Error: version identifier `BigEndian` is reserved and cannot be set
-fail_compilation/reserved_version.d(178): Error: version identifier `ELFv1` is reserved and cannot be set
-fail_compilation/reserved_version.d(179): Error: version identifier `ELFv2` is reserved and cannot be set
-fail_compilation/reserved_version.d(180): Error: version identifier `CRuntime_Bionic` is reserved and cannot be set
-fail_compilation/reserved_version.d(181): Error: version identifier `CRuntime_DigitalMars` is reserved and cannot be set
-fail_compilation/reserved_version.d(182): Error: version identifier `CRuntime_Glibc` is reserved and cannot be set
-fail_compilation/reserved_version.d(183): Error: version identifier `CRuntime_Microsoft` is reserved and cannot be set
-fail_compilation/reserved_version.d(184): Error: version identifier `CRuntime_Musl` is reserved and cannot be set
-fail_compilation/reserved_version.d(185): Error: version identifier `CRuntime_UClibc` is reserved and cannot be set
-fail_compilation/reserved_version.d(186): Error: version identifier `D_Coverage` is reserved and cannot be set
-fail_compilation/reserved_version.d(187): Error: version identifier `D_Ddoc` is reserved and cannot be set
-fail_compilation/reserved_version.d(188): Error: version identifier `D_InlineAsm_X86` is reserved and cannot be set
-fail_compilation/reserved_version.d(189): Error: version identifier `D_InlineAsm_X86_64` is reserved and cannot be set
-fail_compilation/reserved_version.d(190): Error: version identifier `D_LP64` is reserved and cannot be set
-fail_compilation/reserved_version.d(191): Error: version identifier `D_X32` is reserved and cannot be set
-fail_compilation/reserved_version.d(192): Error: version identifier `D_HardFloat` is reserved and cannot be set
-fail_compilation/reserved_version.d(193): Error: version identifier `D_SoftFloat` is reserved and cannot be set
-fail_compilation/reserved_version.d(194): Error: version identifier `D_PIC` is reserved and cannot be set
-fail_compilation/reserved_version.d(195): Error: version identifier `D_SIMD` is reserved and cannot be set
-fail_compilation/reserved_version.d(196): Error: version identifier `D_Version2` is reserved and cannot be set
-fail_compilation/reserved_version.d(197): Error: version identifier `D_NoBoundsChecks` is reserved and cannot be set
-fail_compilation/reserved_version.d(200): Error: version identifier `all` is reserved and cannot be set
-fail_compilation/reserved_version.d(201): Error: version identifier `none` is reserved and cannot be set
-fail_compilation/reserved_version.d(202): Error: version identifier `CppRuntime_Clang` is reserved and cannot be set
-fail_compilation/reserved_version.d(203): Error: version identifier `CppRuntime_DigitalMars` is reserved and cannot be set
-fail_compilation/reserved_version.d(204): Error: version identifier `CppRuntime_Gcc` is reserved and cannot be set
-fail_compilation/reserved_version.d(205): Error: version identifier `CppRuntime_Microsoft` is reserved and cannot be set
-fail_compilation/reserved_version.d(206): Error: version identifier `CppRuntime_Sun` is reserved and cannot be set
+fail_compilation/reserved_version.d(116): Error: version identifier `iOS` is reserved and cannot be set
+fail_compilation/reserved_version.d(117): Error: version identifier `TVOS` is reserved and cannot be set
+fail_compilation/reserved_version.d(118): Error: version identifier `WatchOS` is reserved and cannot be set
+fail_compilation/reserved_version.d(119): Error: version identifier `FreeBSD` is reserved and cannot be set
+fail_compilation/reserved_version.d(120): Error: version identifier `OpenBSD` is reserved and cannot be set
+fail_compilation/reserved_version.d(121): Error: version identifier `NetBSD` is reserved and cannot be set
+fail_compilation/reserved_version.d(122): Error: version identifier `DragonFlyBSD` is reserved and cannot be set
+fail_compilation/reserved_version.d(123): Error: version identifier `BSD` is reserved and cannot be set
+fail_compilation/reserved_version.d(124): Error: version identifier `Solaris` is reserved and cannot be set
+fail_compilation/reserved_version.d(125): Error: version identifier `Posix` is reserved and cannot be set
+fail_compilation/reserved_version.d(126): Error: version identifier `AIX` is reserved and cannot be set
+fail_compilation/reserved_version.d(127): Error: version identifier `Haiku` is reserved and cannot be set
+fail_compilation/reserved_version.d(128): Error: version identifier `SkyOS` is reserved and cannot be set
+fail_compilation/reserved_version.d(129): Error: version identifier `SysV3` is reserved and cannot be set
+fail_compilation/reserved_version.d(130): Error: version identifier `SysV4` is reserved and cannot be set
+fail_compilation/reserved_version.d(131): Error: version identifier `Hurd` is reserved and cannot be set
+fail_compilation/reserved_version.d(132): Error: version identifier `Android` is reserved and cannot be set
+fail_compilation/reserved_version.d(133): Error: version identifier `PlayStation` is reserved and cannot be set
+fail_compilation/reserved_version.d(134): Error: version identifier `PlayStation4` is reserved and cannot be set
+fail_compilation/reserved_version.d(135): Error: version identifier `Cygwin` is reserved and cannot be set
+fail_compilation/reserved_version.d(136): Error: version identifier `MinGW` is reserved and cannot be set
+fail_compilation/reserved_version.d(137): Error: version identifier `FreeStanding` is reserved and cannot be set
+fail_compilation/reserved_version.d(138): Error: version identifier `X86` is reserved and cannot be set
+fail_compilation/reserved_version.d(139): Error: version identifier `X86_64` is reserved and cannot be set
+fail_compilation/reserved_version.d(140): Error: version identifier `ARM` is reserved and cannot be set
+fail_compilation/reserved_version.d(141): Error: version identifier `ARM_Thumb` is reserved and cannot be set
+fail_compilation/reserved_version.d(142): Error: version identifier `ARM_SoftFloat` is reserved and cannot be set
+fail_compilation/reserved_version.d(143): Error: version identifier `ARM_SoftFP` is reserved and cannot be set
+fail_compilation/reserved_version.d(144): Error: version identifier `ARM_HardFloat` is reserved and cannot be set
+fail_compilation/reserved_version.d(145): Error: version identifier `AArch64` is reserved and cannot be set
+fail_compilation/reserved_version.d(146): Error: version identifier `Epiphany` is reserved and cannot be set
+fail_compilation/reserved_version.d(147): Error: version identifier `PPC` is reserved and cannot be set
+fail_compilation/reserved_version.d(148): Error: version identifier `PPC_SoftFloat` is reserved and cannot be set
+fail_compilation/reserved_version.d(149): Error: version identifier `PPC_HardFloat` is reserved and cannot be set
+fail_compilation/reserved_version.d(150): Error: version identifier `PPC64` is reserved and cannot be set
+fail_compilation/reserved_version.d(151): Error: version identifier `IA64` is reserved and cannot be set
+fail_compilation/reserved_version.d(152): Error: version identifier `MIPS32` is reserved and cannot be set
+fail_compilation/reserved_version.d(153): Error: version identifier `MIPS64` is reserved and cannot be set
+fail_compilation/reserved_version.d(154): Error: version identifier `MIPS_O32` is reserved and cannot be set
+fail_compilation/reserved_version.d(155): Error: version identifier `MIPS_N32` is reserved and cannot be set
+fail_compilation/reserved_version.d(156): Error: version identifier `MIPS_O64` is reserved and cannot be set
+fail_compilation/reserved_version.d(157): Error: version identifier `MIPS_N64` is reserved and cannot be set
+fail_compilation/reserved_version.d(158): Error: version identifier `MIPS_EABI` is reserved and cannot be set
+fail_compilation/reserved_version.d(159): Error: version identifier `MIPS_SoftFloat` is reserved and cannot be set
+fail_compilation/reserved_version.d(160): Error: version identifier `MIPS_HardFloat` is reserved and cannot be set
+fail_compilation/reserved_version.d(161): Error: version identifier `NVPTX` is reserved and cannot be set
+fail_compilation/reserved_version.d(162): Error: version identifier `NVPTX64` is reserved and cannot be set
+fail_compilation/reserved_version.d(163): Error: version identifier `RISCV32` is reserved and cannot be set
+fail_compilation/reserved_version.d(164): Error: version identifier `RISCV64` is reserved and cannot be set
+fail_compilation/reserved_version.d(165): Error: version identifier `SPARC` is reserved and cannot be set
+fail_compilation/reserved_version.d(166): Error: version identifier `SPARC_V8Plus` is reserved and cannot be set
+fail_compilation/reserved_version.d(167): Error: version identifier `SPARC_SoftFloat` is reserved and cannot be set
+fail_compilation/reserved_version.d(168): Error: version identifier `SPARC_HardFloat` is reserved and cannot be set
+fail_compilation/reserved_version.d(169): Error: version identifier `SPARC64` is reserved and cannot be set
+fail_compilation/reserved_version.d(170): Error: version identifier `S390` is reserved and cannot be set
+fail_compilation/reserved_version.d(171): Error: version identifier `S390X` is reserved and cannot be set
+fail_compilation/reserved_version.d(172): Error: version identifier `SystemZ` is reserved and cannot be set
+fail_compilation/reserved_version.d(173): Error: version identifier `HPPA` is reserved and cannot be set
+fail_compilation/reserved_version.d(174): Error: version identifier `HPPA64` is reserved and cannot be set
+fail_compilation/reserved_version.d(175): Error: version identifier `SH` is reserved and cannot be set
+fail_compilation/reserved_version.d(176): Error: version identifier `Alpha` is reserved and cannot be set
+fail_compilation/reserved_version.d(177): Error: version identifier `Alpha_SoftFloat` is reserved and cannot be set
+fail_compilation/reserved_version.d(178): Error: version identifier `Alpha_HardFloat` is reserved and cannot be set
+fail_compilation/reserved_version.d(179): Error: version identifier `LittleEndian` is reserved and cannot be set
+fail_compilation/reserved_version.d(180): Error: version identifier `BigEndian` is reserved and cannot be set
+fail_compilation/reserved_version.d(181): Error: version identifier `ELFv1` is reserved and cannot be set
+fail_compilation/reserved_version.d(182): Error: version identifier `ELFv2` is reserved and cannot be set
+fail_compilation/reserved_version.d(183): Error: version identifier `CRuntime_Bionic` is reserved and cannot be set
+fail_compilation/reserved_version.d(184): Error: version identifier `CRuntime_DigitalMars` is reserved and cannot be set
+fail_compilation/reserved_version.d(185): Error: version identifier `CRuntime_Glibc` is reserved and cannot be set
+fail_compilation/reserved_version.d(186): Error: version identifier `CRuntime_Microsoft` is reserved and cannot be set
+fail_compilation/reserved_version.d(187): Error: version identifier `CRuntime_Musl` is reserved and cannot be set
+fail_compilation/reserved_version.d(188): Error: version identifier `CRuntime_Newlib` is reserved and cannot be set
+fail_compilation/reserved_version.d(189): Error: version identifier `CRuntime_UClibc` is reserved and cannot be set
+fail_compilation/reserved_version.d(190): Error: version identifier `CRuntime_WASI` is reserved and cannot be set
+fail_compilation/reserved_version.d(191): Error: version identifier `D_Coverage` is reserved and cannot be set
+fail_compilation/reserved_version.d(192): Error: version identifier `D_Ddoc` is reserved and cannot be set
+fail_compilation/reserved_version.d(193): Error: version identifier `D_InlineAsm_X86` is reserved and cannot be set
+fail_compilation/reserved_version.d(194): Error: version identifier `D_InlineAsm_X86_64` is reserved and cannot be set
+fail_compilation/reserved_version.d(195): Error: version identifier `D_LP64` is reserved and cannot be set
+fail_compilation/reserved_version.d(196): Error: version identifier `D_X32` is reserved and cannot be set
+fail_compilation/reserved_version.d(197): Error: version identifier `D_HardFloat` is reserved and cannot be set
+fail_compilation/reserved_version.d(198): Error: version identifier `D_SoftFloat` is reserved and cannot be set
+fail_compilation/reserved_version.d(199): Error: version identifier `D_PIC` is reserved and cannot be set
+fail_compilation/reserved_version.d(200): Error: version identifier `D_SIMD` is reserved and cannot be set
+fail_compilation/reserved_version.d(201): Error: version identifier `D_Version2` is reserved and cannot be set
+fail_compilation/reserved_version.d(202): Error: version identifier `D_NoBoundsChecks` is reserved and cannot be set
+fail_compilation/reserved_version.d(205): Error: version identifier `all` is reserved and cannot be set
+fail_compilation/reserved_version.d(206): Error: version identifier `none` is reserved and cannot be set
+fail_compilation/reserved_version.d(207): Error: version identifier `AsmJS` is reserved and cannot be set
+fail_compilation/reserved_version.d(208): Error: version identifier `Emscripten` is reserved and cannot be set
+fail_compilation/reserved_version.d(209): Error: version identifier `WebAssembly` is reserved and cannot be set
+fail_compilation/reserved_version.d(210): Error: version identifier `WASI` is reserved and cannot be set
+fail_compilation/reserved_version.d(211): Error: version identifier `CppRuntime_Clang` is reserved and cannot be set
+fail_compilation/reserved_version.d(212): Error: version identifier `CppRuntime_DigitalMars` is reserved and cannot be set
+fail_compilation/reserved_version.d(213): Error: version identifier `CppRuntime_Gcc` is reserved and cannot be set
+fail_compilation/reserved_version.d(214): Error: version identifier `CppRuntime_Microsoft` is reserved and cannot be set
+fail_compilation/reserved_version.d(215): Error: version identifier `CppRuntime_Sun` is reserved and cannot be set
+fail_compilation/reserved_version.d(216): Error: version identifier `D_PIE` is reserved and cannot be set
+fail_compilation/reserved_version.d(217): Error: version identifier `AVR` is reserved and cannot be set
+fail_compilation/reserved_version.d(218): Error: version identifier `D_PreConditions` is reserved and cannot be set
+fail_compilation/reserved_version.d(219): Error: version identifier `D_PostConditions` is reserved and cannot be set
---
*/
@@ -119,6 +132,9 @@ version = Win32;
version = Win64;
version = linux;
version = OSX;
+version = iOS;
+version = TVOS;
+version = WatchOS;
version = FreeBSD;
version = OpenBSD;
version = NetBSD;
@@ -188,7 +204,9 @@ version = CRuntime_DigitalMars;
version = CRuntime_Glibc;
version = CRuntime_Microsoft;
version = CRuntime_Musl;
+version = CRuntime_Newlib;
version = CRuntime_UClibc;
+version = CRuntime_WASI;
version = D_Coverage;
version = D_Ddoc;
version = D_InlineAsm_X86;
@@ -205,11 +223,19 @@ version = D_NoBoundsChecks;
//version = assert;
version = all;
version = none;
+version = AsmJS;
+version = Emscripten;
+version = WebAssembly;
+version = WASI;
version = CppRuntime_Clang;
version = CppRuntime_DigitalMars;
version = CppRuntime_Gcc;
version = CppRuntime_Microsoft;
version = CppRuntime_Sun;
+version = D_PIE;
+version = AVR;
+version = D_PreConditions;
+version = D_PostConditions;
// This should work though
debug = DigitalMars;
@@ -276,6 +302,8 @@ debug = SystemZ;
debug = HPPA;
debug = HPPA64;
debug = SH;
+debug = WebAssembly;
+debug = WASI;
debug = Alpha;
debug = Alpha_SoftFloat;
debug = Alpha_HardFloat;
@@ -288,7 +316,9 @@ debug = CRuntime_DigitalMars;
debug = CRuntime_Glibc;
debug = CRuntime_Microsoft;
debug = CRuntime_Musl;
+debug = CRuntime_Newlib;
debug = CRuntime_UClibc;
+debug = CRuntime_WASI;
debug = CppRuntime_Clang;
debug = CppRuntime_DigitalMars;
debug = CppRuntime_Gcc;
@@ -303,6 +333,7 @@ debug = D_X32;
debug = D_HardFloat;
debug = D_SoftFloat;
debug = D_PIC;
+debug = D_PIE;
debug = D_SIMD;
debug = D_Version2;
debug = D_NoBoundsChecks;
@@ -312,3 +343,6 @@ debug = all;
debug = none;
debug = D_P16;
debug = MSP430;
+debug = AVR;
+debug = D_PreConditions;
+debug = D_PostConditions;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/reserved_version_switch.d b/gcc/testsuite/gdc.test/fail_compilation/reserved_version_switch.d
index 0259273..6333309 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/reserved_version_switch.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/reserved_version_switch.d
@@ -34,6 +34,7 @@
// REQUIRED_ARGS: -version=ARM_SoftFP
// REQUIRED_ARGS: -version=ARM_HardFloat
// REQUIRED_ARGS: -version=AArch64
+// REQUIRED_ARGS: -version=AVR
// REQUIRED_ARGS: -version=Epiphany
// REQUIRED_ARGS: -version=PPC
// REQUIRED_ARGS: -version=PPC_SoftFloat
@@ -64,6 +65,8 @@
// REQUIRED_ARGS: -version=HPPA
// REQUIRED_ARGS: -version=HPPA64
// REQUIRED_ARGS: -version=SH
+// REQUIRED_ARGS: -version=WebAssembly
+// REQUIRED_ARGS: -version=WASI
// REQUIRED_ARGS: -version=Alpha
// REQUIRED_ARGS: -version=Alpha_SoftFloat
// REQUIRED_ARGS: -version=Alpha_HardFloat
@@ -76,7 +79,9 @@
// REQUIRED_ARGS: -version=CRuntime_Glibc
// REQUIRED_ARGS: -version=CRuntime_Microsoft
// REQUIRED_ARGS: -version=CRuntime_Musl
+// REQUIRED_ARGS: -version=CRuntime_Newlib
// REQUIRED_ARGS: -version=CRuntime_UClibc
+// REQUIRED_ARGS: -version=CRuntime_WASI
// REQUIRED_ARGS: -version=CppRuntime_Clang
// REQUIRED_ARGS: -version=CppRuntime_DigitalMars
// REQUIRED_ARGS: -version=CppRuntime_Gcc
@@ -98,6 +103,8 @@
// REQUIRED_ARGS: -version=assert
// REQUIRED_ARGS: -version=all
// REQUIRED_ARGS: -version=none
+// REQUIRED_ARGS: -version=D_PreConditions
+// REQUIRED_ARGS: -version=D_PostConditions
// REQUIRED_ARGS: -debug=DigitalMars
// REQUIRED_ARGS: -debug=GNU
// REQUIRED_ARGS: -debug=LDC
@@ -160,6 +167,8 @@
// REQUIRED_ARGS: -debug=HPPA
// REQUIRED_ARGS: -debug=HPPA64
// REQUIRED_ARGS: -debug=SH
+// REQUIRED_ARGS: -debug=WebAssembly
+// REQUIRED_ARGS: -debug=WASI
// REQUIRED_ARGS: -debug=Alpha
// REQUIRED_ARGS: -debug=Alpha_SoftFloat
// REQUIRED_ARGS: -debug=Alpha_HardFloat
@@ -172,7 +181,9 @@
// REQUIRED_ARGS: -debug=CRuntime_Glibc
// REQUIRED_ARGS: -debug=CRuntime_Microsoft
// REQUIRED_ARGS: -debug=CRuntime_Musl
+// REQUIRED_ARGS: -debug=CRuntime_Newlib
// REQUIRED_ARGS: -debug=CRuntime_UClibc
+// REQUIRED_ARGS: -debug=CRuntime_WASI
// REQUIRED_ARGS: -debug=CppRuntime_Clang
// REQUIRED_ARGS: -debug=CppRuntime_DigitalMars
// REQUIRED_ARGS: -debug=CppRuntime_Gcc
@@ -194,6 +205,8 @@
// REQUIRED_ARGS: -debug=assert
// REQUIRED_ARGS: -debug=all
// REQUIRED_ARGS: -debug=none
+// REQUIRED_ARGS: -debug=D_PreConditions
+// REQUIRED_ARGS: -debug=D_PostConditions
/*
TEST_OUTPUT:
---
@@ -231,6 +244,7 @@ Error: version identifier `ARM_SoftFloat` is reserved and cannot be set
Error: version identifier `ARM_SoftFP` is reserved and cannot be set
Error: version identifier `ARM_HardFloat` is reserved and cannot be set
Error: version identifier `AArch64` is reserved and cannot be set
+Error: version identifier `AVR` is reserved and cannot be set
Error: version identifier `Epiphany` is reserved and cannot be set
Error: version identifier `PPC` is reserved and cannot be set
Error: version identifier `PPC_SoftFloat` is reserved and cannot be set
@@ -261,6 +275,8 @@ Error: version identifier `SystemZ` is reserved and cannot be set
Error: version identifier `HPPA` is reserved and cannot be set
Error: version identifier `HPPA64` is reserved and cannot be set
Error: version identifier `SH` is reserved and cannot be set
+Error: version identifier `WebAssembly` is reserved and cannot be set
+Error: version identifier `WASI` is reserved and cannot be set
Error: version identifier `Alpha` is reserved and cannot be set
Error: version identifier `Alpha_SoftFloat` is reserved and cannot be set
Error: version identifier `Alpha_HardFloat` is reserved and cannot be set
@@ -273,7 +289,9 @@ Error: version identifier `CRuntime_DigitalMars` is reserved and cannot be set
Error: version identifier `CRuntime_Glibc` is reserved and cannot be set
Error: version identifier `CRuntime_Microsoft` is reserved and cannot be set
Error: version identifier `CRuntime_Musl` is reserved and cannot be set
+Error: version identifier `CRuntime_Newlib` is reserved and cannot be set
Error: version identifier `CRuntime_UClibc` is reserved and cannot be set
+Error: version identifier `CRuntime_WASI` is reserved and cannot be set
Error: version identifier `CppRuntime_Clang` is reserved and cannot be set
Error: version identifier `CppRuntime_DigitalMars` is reserved and cannot be set
Error: version identifier `CppRuntime_Gcc` is reserved and cannot be set
@@ -295,5 +313,7 @@ Error: version identifier `unittest` is reserved and cannot be set
Error: version identifier `assert` is reserved and cannot be set
Error: version identifier `all` is reserved and cannot be set
Error: version identifier `none` is reserved and cannot be set
+Error: version identifier `D_PreConditions` is reserved and cannot be set
+Error: version identifier `D_PostConditions` is reserved and cannot be set
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/retref2.d b/gcc/testsuite/gdc.test/fail_compilation/retref2.d
index 037c258..aaa5b41 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/retref2.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/retref2.d
@@ -1,11 +1,8 @@
-
-// REQUIRED_ARGS: -dip25
-
/*
TEST_OUTPUT:
---
-fail_compilation/retref2.d(21): Error: function retref2.D.foo does not override any function, did you mean to override 'retref2.C.foo'?
-fail_compilation/retref2.d(22): Error: function retref2.D.bar does not override any function, did you mean to override 'retref2.C.bar'?
+fail_compilation/retref2.d(18): Error: function `ref int retref2.D.foo(return ref int)` does not override any function, did you mean to override `ref int retref2.C.foo(ref int)`?
+fail_compilation/retref2.d(19): Error: function `ref scope int retref2.D.bar() return` does not override any function, did you mean to override `ref int retref2.C.bar()`?
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/retscope.d b/gcc/testsuite/gdc.test/fail_compilation/retscope.d
index 35efda3..64db4c8 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/retscope.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/retscope.d
@@ -1,28 +1,27 @@
/*
-REQUIRED_ARGS: -dip1000
-PERMUTE_ARGS:
+REQUIRED_ARGS: -preview=dip1000
TEST_OUTPUT:
---
-fail_compilation/retscope.d(23): Error: scope variable `p` may not be returned
-fail_compilation/retscope.d(33): Error: returning `b ? nested1(& i) : nested2(& j)` escapes a reference to local variable `j`
-fail_compilation/retscope.d(46): Error: scope variable `p` assigned to non-scope `q`
-fail_compilation/retscope.d(48): Error: address of variable `i` assigned to `q` with longer lifetime
-fail_compilation/retscope.d(49): Error: variadic variable `a` assigned to non-scope `b`
-fail_compilation/retscope.d(50): Error: reference to stack allocated value returned by `(*fp2)()` assigned to non-scope `q`
+fail_compilation/retscope.d(22): Error: scope variable `p` may not be returned
+fail_compilation/retscope.d(32): Error: returning `b ? nested1(& i) : nested2(& j)` escapes a reference to local variable `j`
+fail_compilation/retscope.d(45): Error: scope variable `p` assigned to non-scope `q`
+fail_compilation/retscope.d(47): Error: address of variable `i` assigned to `q` with longer lifetime
+fail_compilation/retscope.d(48): Error: scope variable `a` assigned to non-scope `b`
+fail_compilation/retscope.d(49): Error: address of struct temporary returned by `(*fp2)()` assigned to longer lived variable `q`
---
*/
-int* foo1(return scope int* p) { return p; } // ok
+int* foo1(return scope int* p) @safe { return p; } // ok
-int* foo2()(scope int* p) { return p; } // ok, 'return' is inferred
+int* foo2()(scope int* p) @safe { return p; } // ok, 'return' is inferred
alias foo2a = foo2!();
-int* foo3(scope int* p) { return p; } // error
+int* foo3(scope int* p) @safe { return p; } // error
-int* foo4(bool b)
+int* foo4(bool b) @safe
{
int i;
int j;
@@ -55,8 +54,8 @@ void test2(scope int* p, int[] a ...) @safe
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(76): Error: function retscope.HTTP.Impl.onReceive is @nogc yet allocates closures with the GC
-fail_compilation/retscope.d(78): retscope.HTTP.Impl.onReceive.__lambda1 closes over variable this at fail_compilation/retscope.d(76)
+fail_compilation/retscope.d(75): Error: function `retscope.HTTP.Impl.onReceive` is `@nogc` yet allocates closures with the GC
+fail_compilation/retscope.d(77): retscope.HTTP.Impl.onReceive.__lambda1 closes over variable this at fail_compilation/retscope.d(75)
---
*/
@@ -86,7 +85,7 @@ struct HTTP
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(97): Error: reference to local variable `sa` assigned to non-scope parameter `a` calling retscope.bar8
+fail_compilation/retscope.d(96): Error: reference to local variable `sa` assigned to non-scope parameter `a` calling retscope.bar8
---
*/
// https://issues.dlang.org/show_bug.cgi?id=8838
@@ -108,7 +107,7 @@ int[] bar8(int[] a) @safe
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(124): Error: returning `foo9(cast(char[])tmp)` escapes a reference to local variable `tmp`
+fail_compilation/retscope.d(123): Error: returning `foo9(cast(char[])tmp)` escapes a reference to local variable `tmp`
---
*/
@@ -129,7 +128,7 @@ char[] bar9() @safe
/*
//
//
-//fail_compilation/retscope.d(143): To enforce @safe compiler allocates a closure unless the opApply() uses 'scope'
+//fail_compilation/retscope.d(143): To enforce `@safe`, the compiler allocates a closure unless `opApply()` uses `scope`
//
*/
@@ -150,7 +149,7 @@ S10* test10()
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(159): Error: scope variable `this` may not be returned
+fail_compilation/retscope.d(158): Error: scope variable `this` may not be returned
---
*/
@@ -165,7 +164,7 @@ class C11
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(178): Error: address of variable `i` assigned to `p` with longer lifetime
+fail_compilation/retscope.d(177): Error: address of variable `i` assigned to `p` with longer lifetime
---
*/
@@ -182,7 +181,7 @@ void foo11() @safe
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(198): Error: scope variable `e` may not be returned
+fail_compilation/retscope.d(197): Error: scope variable `e` may not be returned
---
*/
@@ -202,7 +201,7 @@ void* escapeDg1(scope void* d) @safe
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(213): Error: scope variable `p` assigned to non-scope `e`
+fail_compilation/retscope.d(212): Error: scope variable `p` assigned to non-scope `e.e`
---
*/
struct Escaper3 { void* e; }
@@ -219,7 +218,7 @@ void* escape3 (scope void* p) @safe {
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(230): Error: scope variable `ptr` may not be returned
+fail_compilation/retscope.d(229): Error: scope variable `ptr` may not be returned
---
*/
@@ -235,10 +234,10 @@ void* funretscope(scope dg_t ptr) @safe
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(249): Error: cannot implicitly convert expression `__lambda1` of type `void* delegate() pure nothrow @nogc return @safe` to `void* delegate() @safe`
-fail_compilation/retscope.d(249): Error: cannot implicitly convert expression `__lambda1` of type `void* delegate() pure nothrow @nogc return @safe` to `void* delegate() @safe`
-fail_compilation/retscope.d(250): Error: cannot implicitly convert expression `__lambda2` of type `void* delegate() pure nothrow @nogc return @safe` to `void* delegate() @safe`
-fail_compilation/retscope.d(250): Error: cannot implicitly convert expression `__lambda2` of type `void* delegate() pure nothrow @nogc return @safe` to `void* delegate() @safe`
+fail_compilation/retscope.d(248): Error: cannot implicitly convert expression `__lambda2` of type `void* delegate() pure nothrow @nogc @safe` to `void* delegate() @safe`
+fail_compilation/retscope.d(248): Error: cannot implicitly convert expression `__lambda2` of type `void* delegate() pure nothrow @nogc @safe` to `void* delegate() @safe`
+fail_compilation/retscope.d(249): Error: cannot implicitly convert expression `__lambda4` of type `void* delegate() pure nothrow @nogc @safe` to `void* delegate() @safe`
+fail_compilation/retscope.d(249): Error: cannot implicitly convert expression `__lambda4` of type `void* delegate() pure nothrow @nogc @safe` to `void* delegate() @safe`
---
*/
@@ -255,7 +254,7 @@ void escape4() @safe
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(267): Error: cannot take address of scope local p in @safe function escape5
+fail_compilation/retscope.d(266): Error: cannot take address of `scope` local `p` in `@safe` function `escape5`
---
*/
@@ -272,7 +271,7 @@ void escape5() @safe
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(287): Error: returning `foo6(& b)` escapes a reference to local variable `b`
+fail_compilation/retscope.d(286): Error: returning `foo6(& b)` escapes a reference to local variable `b`
---
*/
@@ -308,7 +307,7 @@ char*[3] escape9(scope char*[] p) @safe { return p[0 .. 3]; }
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(320): Error: reference to local variable `i` assigned to non-scope `f`
+fail_compilation/retscope.d(319): Error: reference to local variable `i` assigned to non-scope `f`
---
*/
@@ -332,7 +331,7 @@ int* bar10( scope int** ptr ) @safe
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(343): Error: cannot take address of scope local aa in @safe function escape11
+fail_compilation/retscope.d(342): Error: cannot take address of `scope` local `aa` in `@safe` function `escape11`
---
*/
@@ -455,7 +454,7 @@ fail_compilation/retscope.d(1311): Error: scope variable `u2` assigned to `ek` w
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(1405): Error: reference to local variable `buf` assigned to non-scope parameter `unnamed` calling retscope.myprintf
+fail_compilation/retscope.d(1405): Error: reference to local variable `buf` assigned to non-scope parameter `__anonymous_param` calling retscope.myprintf
---
*/
@@ -473,7 +472,7 @@ fail_compilation/retscope.d(1405): Error: reference to local variable `buf` assi
/*
TEST_OUTPUT:
---
-fail_compilation/retscope.d(1509): Error: reference to stack allocated value returned by `(*fp15)()` assigned to non-scope parameter `unnamed`
+fail_compilation/retscope.d(1509): Error: reference to stack allocated value returned by `(*fp15)()` assigned to non-scope parameter `__anonymous_param`
---
*/
@@ -506,9 +505,9 @@ void foo16() @nogc nothrow
TEST_OUTPUT:
---
fail_compilation/retscope.d(1701): Error: cannot implicitly convert expression `& func` of type `int* function(int* p)` to `int* function(scope int* p)`
-fail_compilation/retscope.d(1702): Error: cannot implicitly convert expression `& func` of type `int* function(int* p)` to `int* function(return scope int* p)`
+fail_compilation/retscope.d(1702): Error: cannot implicitly convert expression `& func` of type `int* function(int* p)` to `int* function(return int* p)`
fail_compilation/retscope.d(1703): Error: cannot implicitly convert expression `& func` of type `int* function(int* p)` to `int* function(return scope int* p)`
-fail_compilation/retscope.d(1711): Error: cannot implicitly convert expression `& funcr` of type `int* function(return scope int* p)` to `int* function(scope int* p)`
+fail_compilation/retscope.d(1711): Error: cannot implicitly convert expression `& funcr` of type `int* function(return int* p)` to `int* function(scope int* p)`
fail_compilation/retscope.d(1716): Error: cannot implicitly convert expression `& funcrs` of type `int* function(return scope int* p)` to `int* function(scope int* p)`
---
*/
@@ -660,3 +659,31 @@ int test21()
foo22(s);
}
+/*********************************************
+TEST_OUTPUT:
+---
+fail_compilation/retscope.d(1907): Error: scope variable `x` assigned to `this` with longer lifetime
+fail_compilation/retscope.d(1913): Error: scope variable `x` may not be returned
+---
+*/
+#line 1900
+struct Constant
+{
+ int* member;
+
+ int* foo(scope Repeat!(int*) grid) @safe
+ {
+ foreach(ref x; grid)
+ member = x;
+
+ foreach(ref x; grid)
+ x = member;
+
+ foreach(ref x; grid)
+ return x;
+
+ return null;
+ }
+
+ alias Repeat(T...) = T;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/retscope2.d b/gcc/testsuite/gdc.test/fail_compilation/retscope2.d
index a565008..8e6e0a4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/retscope2.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/retscope2.d
@@ -1,6 +1,5 @@
/*
-REQUIRED_ARGS: -dip1000
-PERMUTE_ARGS:
+REQUIRED_ARGS: -preview=dip1000
TEST_OUTPUT:
---
fail_compilation/retscope2.d(102): Error: scope variable `s` assigned to `p` with longer lifetime
@@ -87,9 +86,9 @@ fail_compilation/retscope2.d(504): Error: scope variable `c` may not be returned
/*
TEST_OUTPUT:
---
-fail_compilation/retscope2.d(604): Error: scope variable `_param_0` assigned to non-scope parameter `unnamed` calling retscope2.foo600
-fail_compilation/retscope2.d(604): Error: scope variable `_param_1` assigned to non-scope parameter `unnamed` calling retscope2.foo600
-fail_compilation/retscope2.d(614): Error: template instance retscope2.test600!(int*, int*) error instantiating
+fail_compilation/retscope2.d(604): Error: scope variable `_param_0` assigned to non-scope parameter `__anonymous_param` calling retscope2.foo600
+fail_compilation/retscope2.d(604): Error: scope variable `_param_1` assigned to non-scope parameter `__anonymous_param` calling retscope2.foo600
+fail_compilation/retscope2.d(614): Error: template instance `retscope2.test600!(int*, int*)` error instantiating
---
*/
@@ -124,7 +123,7 @@ fail_compilation/retscope2.d(721): Error: returning `s.get1()` escapes a referen
#line 700
// https://issues.dlang.org/show_bug.cgi?id=17049
-@safe S700* get2(return ref scope S700 _this)
+@safe S700* get2(return ref S700 _this)
{
return &_this;
}
@@ -164,12 +163,12 @@ void foo800()
}
/*************************************************/
-/+
-/*
-XEST_OUTPUT:
+/*
+TEST_OUTPUT:
+---
fail_compilation/retscope2.d(907): Error: address of variable `this` assigned to `p17568` with longer lifetime
-
+---
*/
#line 900
@@ -183,14 +182,15 @@ struct T17568
p17568 = &a;
}
}
-+/
+
/*************************************************/
/*
TEST_OUTPUT:
---
-fail_compilation/retscope2.d(1005): Error: scope variable `p` assigned to `this` with longer lifetime
-fail_compilation/retscope2.d(1024): Error: scope variable `p` assigned to `d` with longer lifetime
+fail_compilation/retscope2.d(1005): Error: scope variable `p` assigned to non-scope `this._p`
+fail_compilation/retscope2.d(1021): Error: scope variable `p` assigned to non-scope `c._p`
+fail_compilation/retscope2.d(1024): Error: scope variable `p` assigned to non-scope `d._p`
---
*/
@@ -216,7 +216,7 @@ void test17428() @safe
int x;
int* p = &x;
scope C17428b c;
- c._p = p; // ok
+ c._p = p; // bad
C17428b d;
d._p = p; // bad
@@ -291,5 +291,28 @@ struct T17388
return t.foo();
}
+/****************************************************/
+/*
+TEST_OUTPUT:
+---
+fail_compilation/retscope2.d(1306): Error: copying `& i` into allocated memory escapes a reference to local variable `i`
+---
+*/
+
+#line 1300
+
+// https://issues.dlang.org/show_bug.cgi?id=17370
+
+void test1300() @safe
+{
+ int i;
+ auto p = new S1300(&i).oops;
+}
+
+struct S1300
+{
+ int* oops;
+// this(int* p) @safe { oops = p; }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/retscope3.d b/gcc/testsuite/gdc.test/fail_compilation/retscope3.d
new file mode 100644
index 0000000..130d49b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/retscope3.d
@@ -0,0 +1,130 @@
+/*
+REQUIRED_ARGS: -preview=dip1000
+*/
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/retscope3.d(2008): Error: copying `& i` into allocated memory escapes a reference to local variable `i`
+fail_compilation/retscope3.d(2017): Error: copying `S2000(& i)` into allocated memory escapes a reference to local variable `i`
+---
+*/
+
+#line 2000
+
+// https://issues.dlang.org/show_bug.cgi?id=17790
+
+@safe:
+
+int* bar1()
+{
+ int i;
+ int*[] arr = [ &i ];
+ return arr[0];
+}
+
+struct S2000 { int* p; }
+
+S2000 bar2()
+{
+ int i;
+ S2000[] arr = [ S2000(&i) ];
+ return arr[0];
+}
+
+void bar3(string[] u...) @safe pure nothrow @nogc
+{
+ foreach (str; u)
+ {
+ }
+}
+
+void bar4()
+{
+ static struct S { int* p; }
+ S[2][10] pairs;
+ foreach (ref pair; pairs)
+ {
+ }
+}
+
+/**********************************************/
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/retscope3.d(3027): Error: scope variable `l` assigned to `elem` with longer lifetime
+---
+*/
+
+#line 3000
+
+struct List
+{
+ Elem front() @safe return scope;
+
+ ~this() @trusted scope;
+
+ @disable this(this);
+
+ void* data;
+}
+
+struct Elem
+{
+ void* data;
+}
+
+List list() @trusted
+{
+ return List();
+}
+
+void test3000() @safe
+{
+ Elem elem;
+ {
+ auto l = list(); // inferred as scope
+ elem = l.front; // escapes, b/c l isn't scoped
+ }
+}
+
+/**********************************************/
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/retscope3.d(4003): Error: copying `u[]` into allocated memory escapes a reference to variadic parameter `u`
+fail_compilation/retscope3.d(4016): Error: storing reference to outer local variable `i` into allocated memory causes it to escape
+fail_compilation/retscope3.d(4025): Error: storing reference to stack allocated value returned by `makeSA()` into allocated memory causes it to escape
+---
+*/
+
+#line 4000
+
+void bar4000(int[1] u...) @safe
+{
+ int[][] n = [u[]];
+}
+
+void bar4001() @safe
+{
+ static int i;
+ int*[] n = [&i];
+}
+
+ref int bar4002(return ref int i) @safe
+{
+ void nested()
+ {
+ int*[] n = [&i];
+ }
+ return i;
+}
+
+int[3] makeSA() @safe;
+
+void bar4003() @safe
+{
+ int[][] a = [makeSA()[]];
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/retscope4.d b/gcc/testsuite/gdc.test/fail_compilation/retscope4.d
new file mode 100644
index 0000000..e5fc278
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/retscope4.d
@@ -0,0 +1,21 @@
+/*
+REQUIRED_ARGS: -de
+*/
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/retscope4.d(3007): Deprecation: slice of static array temporary returned by `func()` assigned to longer lived variable `a`
+---
+*/
+
+#line 3000
+
+// https://issues.dlang.org/show_bug.cgi?id=12625
+
+int[16] func();
+
+void foo()
+{
+ int[] a = func();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/retscope5.d b/gcc/testsuite/gdc.test/fail_compilation/retscope5.d
new file mode 100644
index 0000000..1f9906e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/retscope5.d
@@ -0,0 +1,26 @@
+/*
+REQUIRED_ARGS: -preview=dip1000
+*/
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/retscope5.d(5010): Error: reference `t` assigned to `p` with longer lifetime
+---
+*/
+
+#line 5000
+
+// https://issues.dlang.org/show_bug.cgi?id=17725
+
+void test() @safe
+{
+ int* p;
+ struct T {
+ int a;
+ }
+ void escape(ref T t) @safe {
+ p = &t.a; // should not compile
+ }
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/retscope6.d b/gcc/testsuite/gdc.test/fail_compilation/retscope6.d
new file mode 100644
index 0000000..47f216f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/retscope6.d
@@ -0,0 +1,233 @@
+/*
+REQUIRED_ARGS: -preview=dip1000
+*/
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/retscope6.d(6007): Error: copying `& i` into allocated memory escapes a reference to local variable `i`
+---
+*/
+
+#line 6000
+
+// https://issues.dlang.org/show_bug.cgi?id=17795
+
+int* test() @safe
+{
+ int i;
+ int*[][] arr = new int*[][](1);
+ arr[0] ~= &i;
+ return arr[0][0];
+}
+
+/* TEST_OUTPUT:
+---
+fail_compilation/retscope6.d(7034): Error: address of variable `i` assigned to `s` with longer lifetime
+fail_compilation/retscope6.d(7035): Error: address of variable `i` assigned to `s` with longer lifetime
+fail_compilation/retscope6.d(7025): Error: scope variable `_param_2` assigned to `t` with longer lifetime
+fail_compilation/retscope6.d(7037): Error: template instance `retscope6.S.emplace4!(int*)` error instantiating
+fail_compilation/retscope6.d(7037): Error: address of variable `i` assigned to `s` with longer lifetime
+---
+*/
+
+#line 7000
+
+alias T = int*;
+
+struct S
+{
+ T payload;
+
+ static void emplace(Args...)(ref S s, Args args) @safe
+ {
+ s.payload = args[0];
+ }
+
+ void emplace2(Args...)(Args args) @safe
+ {
+ payload = args[0];
+ }
+
+ static void emplace3(Args...)(S s, Args args) @safe
+ {
+ s.payload = args[0];
+ }
+
+ static void emplace4(Args...)(scope ref S s, scope out S t, scope Args args) @safe
+ {
+ s.payload = args[0];
+ t.payload = args[0];
+ }
+
+}
+
+void foo() @safe
+{
+ S s;
+ int i;
+ s.emplace(s, &i);
+ s.emplace2(&i);
+ s.emplace3(s, &i);
+ s.emplace4(s, s, &i);
+}
+
+
+/* TEST_OUTPUT:
+---
+fail_compilation/retscope6.d(8016): Error: address of variable `i` assigned to `p` with longer lifetime
+fail_compilation/retscope6.d(8031): Error: reference to local variable `i` assigned to non-scope parameter `p` calling retscope6.betty!().betty
+fail_compilation/retscope6.d(8031): Error: reference to local variable `j` assigned to non-scope parameter `q` calling retscope6.betty!().betty
+fail_compilation/retscope6.d(8048): Error: reference to local variable `j` assigned to non-scope parameter `q` calling retscope6.archie!().archie
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=19035
+
+#line 8000
+@safe
+{
+
+void escape(int*);
+
+/**********************/
+
+void frank()(ref scope int* p, int* s)
+{
+ p = s; // should error here
+}
+
+void testfrankly()
+{
+ int* p;
+ int i;
+ frank(p, &i);
+}
+
+/**********************/
+
+void betty()(int* p, int* q)
+{
+ p = q;
+ escape(p);
+}
+
+void testbetty()
+{
+ int i;
+ int j;
+ betty(&i, &j); // should error on i and j
+}
+
+/**********************/
+
+void archie()(int* p, int* q, int* r)
+{
+ p = q;
+ r = p;
+ escape(q);
+}
+
+void testarchie()
+{
+ int i;
+ int j;
+ int k;
+ archie(&i, &j, &k); // should error on j
+}
+
+}
+
+/* TEST_OUTPUT:
+---
+fail_compilation/retscope6.d(9022): Error: returning `fred(& i)` escapes a reference to local variable `i`
+---
+*/
+
+#line 9000
+
+@safe:
+
+alias T9 = S9!(); struct S9()
+{
+ this(int* q)
+ {
+ this.p = q;
+ }
+
+ int* p;
+}
+
+auto fred(int* r)
+{
+ return T9(r);
+}
+
+T9 testfred()
+{
+ int i;
+ auto j = fred(&i); // ok
+ return fred(&i); // error
+}
+
+/* TEST_OUTPUT:
+---
+fail_compilation/retscope6.d(10003): Error: scope variable `values` assigned to non-scope parameter `values` calling retscope6.escape
+---
+*/
+
+#line 10000
+
+void variadicCaller(int[] values...)
+{
+ escape(values);
+}
+
+void escape(int[] values) {}
+
+/* TEST_OUTPUT:
+---
+fail_compilation/retscope6.d(11004): Error: address of variable `buffer` assigned to `secret` with longer lifetime
+---
+*/
+
+#line 11000
+
+void hmac(scope ubyte[] secret)
+{
+ ubyte[10] buffer;
+ secret = buffer[];
+}
+
+/* TEST_OUTPUT:
+---
+fail_compilation/retscope6.d(12011): Error: reference to local variable `x` assigned to non-scope parameter `r` calling retscope6.escape_m_20150
+fail_compilation/retscope6.d(12022): Error: reference to local variable `x` assigned to non-scope parameter `r` calling retscope6.escape_c_20150
+---
+*/
+
+#line 12000
+
+// https://issues.dlang.org/show_bug.cgi?id=20150
+
+int* escape_m_20150(int* r) @safe pure
+{
+ return r;
+}
+
+int* f_m_20150() @safe
+{
+ int x = 42;
+ return escape_m_20150(&x);
+}
+
+const(int)* escape_c_20150(const int* r) @safe pure
+{
+ return r;
+}
+
+const(int)* f_c_20150() @safe
+{
+ int x = 42;
+ return escape_c_20150(&x);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/scope_class.d b/gcc/testsuite/gdc.test/fail_compilation/scope_class.d
new file mode 100644
index 0000000..b70e3eb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/scope_class.d
@@ -0,0 +1,21 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/scope_class.d(11): Error: functions cannot return `scope scope_class.C`
+---
+*/
+
+
+scope class C { int i; } // Notice the use of `scope` here
+
+C increment(C c)
+{
+ c.i++;
+ return c;
+}
+
+void main()
+{
+ scope C c = new C();
+ c.increment();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/scope_type.d b/gcc/testsuite/gdc.test/fail_compilation/scope_type.d
new file mode 100644
index 0000000..b087411
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/scope_type.d
@@ -0,0 +1,12 @@
+/*
+REQUIRED_ARGS: -de
+TEST_OUTPUT:
+---
+fail_compilation/scope_type.d(11): Deprecation: `scope` as a type constraint is deprecated. Use `scope` at the usage site.
+---
+*/
+
+
+scope class C { }
+scope interface I { }
+//scope struct S { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/shared.d b/gcc/testsuite/gdc.test/fail_compilation/shared.d
new file mode 100644
index 0000000..6011d17
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/shared.d
@@ -0,0 +1,227 @@
+/* REQUIRED_ARGS: -preview=nosharedaccess
+ * TEST_OUTPUT:
+---
+fail_compilation/shared.d(1010): Error: direct access to shared `j` is not allowed, see `core.atomic`
+fail_compilation/shared.d(1011): Error: direct access to shared `j` is not allowed, see `core.atomic`
+fail_compilation/shared.d(1012): Error: direct access to shared `*p` is not allowed, see `core.atomic`
+fail_compilation/shared.d(1013): Error: direct access to shared `a[0]` is not allowed, see `core.atomic`
+fail_compilation/shared.d(1014): Error: direct access to shared `s.si` is not allowed, see `core.atomic`
+fail_compilation/shared.d(1015): Error: direct access to shared `t.i` is not allowed, see `core.atomic`
+---
+*/
+
+#line 1000
+
+struct S
+{
+ shared(int) si;
+ int i;
+}
+
+int test1(shared int j, shared(int)* p, shared(int)[] a, ref S s, ref shared S t)
+{
+ int i;
+ j = i;
+ i = j;
+ i = *p;
+ i = a[0];
+ i = s.si;
+ return t.i;
+}
+
+/**************************************/
+
+void byref(ref shared int);
+void byptr(shared(int)*);
+
+shared int x;
+
+void test2()
+{
+ byref(x); // ok
+ byptr(&x); // ok
+}
+
+/**************************************/
+
+/*
+ * TEST_OUTPUT:
+---
+fail_compilation/shared.d(2008): Error: direct access to shared `i` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2009): Error: direct access to shared `j` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2010): Error: direct access to shared `k` is not allowed, see `core.atomic`
+---
+ */
+
+#line 2000
+
+void func(int);
+
+shared int i;
+
+void test3(shared int k)
+{
+ shared int j = void;
+ func(i);
+ func(j);
+ func(k);
+}
+
+/**************************************/
+
+void test4() // no errors for initialization
+{
+ shared int x;
+ shared int y = 3;
+}
+
+/*
+ * TEST_OUTPUT:
+---
+fail_compilation/shared.d(2105): Error: direct access to shared `*pi` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2112): Error: direct access to shared `**pi` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2136): Error: direct access to shared `*c` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2142): Error: direct access to shared `*c` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2148): Error: direct access to shared `*c` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2154): Error: direct access to shared `*c.c1` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2160): Error: direct access to shared `*c.c1.c1` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2181): Error: direct access to shared `k` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2187): Error: direct access to shared `k.k2.k1` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2194): Error: direct access to shared `(new shared(K2)).k1` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2202): Error: direct access to shared `c` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2206): Error: function `shared.test_inference_2` function returns `shared` but cannot be inferred `ref`
+fail_compilation/shared.d(2208): Error: returning `c` escapes a reference to parameter `c`
+fail_compilation/shared.d(2208): perhaps annotate the parameter with `return`
+fail_compilation/shared.d(2214): Error: function `shared.test_inference_3` function returns `shared` but cannot be inferred `ref`
+fail_compilation/shared.d(2216): return value `getSharedObject()` is not an lvalue
+fail_compilation/shared.d(2222): Error: direct access to shared `a` is not allowed, see `core.atomic`
+fail_compilation/shared.d(2220): Error: function `shared.test_inference_4` function returns `shared` but cannot be inferred `ref`
+fail_compilation/shared.d(2222): cannot implicitly convert `a` of type `shared(const(Object))` to `object.Object`
+fail_compilation/shared.d(2222): Error: cannot implicitly convert expression `a` of type `shared(const(Object))` to `object.Object`
+---
+ */
+#line 2100
+// Derived from https://issues.dlang.org/show_bug.cgi?id=20908
+ref shared(int) test20908()
+{
+ shared int* pi;
+ // Single indirection, but the pointer is `shared`
+ return *pi;
+}
+
+ref shared(int) test20908_2()
+{
+ shared(int*)* pi;
+ // Double indirection, external pointer is not `shared`
+ return **pi;
+}
+
+// DotVarExp tests: See matching tests in `compilable/shared.d`
+
+struct C1
+{
+ int value;
+}
+
+struct C2
+{
+ C1* c1;
+}
+
+struct C3
+{
+ C2 c1;
+ C2* c2;
+}
+
+// Reading a shared pointer: not okay
+ref shared(int) test_dotvarexp_1(return shared C1* c)
+{
+ return c.value;
+}
+
+// Ditto, but explicitly dereferenced
+ref shared(int) test_dotvarexp_2(return shared C1* c)
+{
+ return (*c).value;
+}
+
+// Even taking the address (which offset the pointers) requires a load
+shared(int)* test_dotvarexp_3(return shared C1* c)
+{
+ return &c.value;
+}
+
+// First level DotVarExp dereferencing
+ref shared(int) test_dotvarexp_4(return shared ref C2 c)
+{
+ return c.c1.value;
+}
+
+// Second level DotVarExp dereferencing
+ref shared(int) test_dotvarexp_5(return shared ref C3 c)
+{
+ return c.c1.c1.value;
+}
+
+class K1
+{
+ int value;
+}
+
+class K2
+{
+ shared K1 k1;
+}
+
+class K3
+{
+ K2 k2;
+}
+
+// A class is a pointer under the hood, and `shared` applies to the pointer
+ref shared(int) test_dotvarexp_6(return shared K1 k)
+{
+ return k.value;
+}
+
+// Using `k.ke.k1` would be okay, but not `value`
+ref shared(int) test_dotvarexp_7(return ref K3 k)
+{
+ return k.k2.k1.value;
+}
+
+// The returned value is `shared` so we shouldn't be able to access it
+// The pointer could already be shared, e.g. by the ctor
+ref shared(K1) test_newexp_1()
+{
+ return new shared(K2)().k1;
+}
+
+// Inference tests
+
+// Fails because no `ref`
+auto test_inference_1(return shared ref C3 c)
+{
+ return c;
+}
+
+// Fails because no `return` => Escapes
+auto ref test_inference_2(shared C3 c)
+{
+ return c;
+}
+
+shared(Object) getSharedObject() { assert(0); }
+
+// Fails because rvalue
+auto ref test_inference_3()
+{
+ return getSharedObject();
+}
+
+// Fails because `const` conversion
+auto ref Object test_inference_4(const return shared ref Object a)
+{
+ return a;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/skip.d b/gcc/testsuite/gdc.test/fail_compilation/skip.d
index c870e7e..0f3a9ec 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/skip.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/skip.d
@@ -2,8 +2,8 @@
* REQUIRED_ARGS: -de
* TEST_OUTPUT:
---
-fail_compilation/skip.d(21): Deprecation: 'switch' skips declaration of 'with' temporary at fail_compilation/skip.d(26)
-fail_compilation/skip.d(43): Deprecation: 'switch' skips declaration of variable skip.test14532.n at fail_compilation/skip.d(45)
+fail_compilation/skip.d(21): Error: `switch` skips declaration of `with` temporary at fail_compilation/skip.d(26)
+fail_compilation/skip.d(43): Error: `switch` skips declaration of variable `skip.test14532.n` at fail_compilation/skip.d(45)
---
*/
// https://issues.dlang.org/show_bug.cgi?id=10524
diff --git a/gcc/testsuite/gdc.test/fail_compilation/spell9644.d b/gcc/testsuite/gdc.test/fail_compilation/spell9644.d
index 383ec67..0c6d67b 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/spell9644.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/spell9644.d
@@ -1,17 +1,16 @@
// REQUIRED_ARGS: -o-
-// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/spell9644a.d imports/spell9644b.d
/*
TEST_OUTPUT:
---
-fail_compilation/spell9644.d(27): Error: undefined identifier `b`
-fail_compilation/spell9644.d(28): Error: undefined identifier `xx`
-fail_compilation/spell9644.d(29): Error: undefined identifier `cb`, did you mean variable `ab`?
-fail_compilation/spell9644.d(30): Error: undefined identifier `bc`, did you mean variable `abc`?
-fail_compilation/spell9644.d(31): Error: undefined identifier `ccc`
-fail_compilation/spell9644.d(33): Error: undefined identifier `cor2`, did you mean variable `cor1`?
-fail_compilation/spell9644.d(34): Error: undefined identifier `pua`, did you mean variable `pub`?
-fail_compilation/spell9644.d(35): Error: undefined identifier `priw`
+fail_compilation/spell9644.d(26): Error: undefined identifier `b`
+fail_compilation/spell9644.d(27): Error: undefined identifier `xx`
+fail_compilation/spell9644.d(28): Error: undefined identifier `cb`, did you mean variable `ab`?
+fail_compilation/spell9644.d(29): Error: undefined identifier `bc`, did you mean variable `abc`?
+fail_compilation/spell9644.d(30): Error: undefined identifier `ccc`
+fail_compilation/spell9644.d(32): Error: undefined identifier `cor2`, did you mean variable `cor1`?
+fail_compilation/spell9644.d(33): Error: undefined identifier `pua`, did you mean variable `pub`?
+fail_compilation/spell9644.d(34): Error: undefined identifier `priw`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/staticarrayoverflow.d b/gcc/testsuite/gdc.test/fail_compilation/staticarrayoverflow.d
index 6a5a16d..1305bc5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/staticarrayoverflow.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/staticarrayoverflow.d
@@ -2,14 +2,14 @@
REQUIRED_ARGS: -m64
TEST_OUTPUT:
---
-fail_compilation/staticarrayoverflow.d(24): Error: static array `S[1879048192]` size overflowed to 7516192768000
-fail_compilation/staticarrayoverflow.d(24): Error: variable `staticarrayoverflow.y` size overflow
-fail_compilation/staticarrayoverflow.d(26): Error: static array `S[8070450532247928832]` size overflowed to 8070450532247928832
-fail_compilation/staticarrayoverflow.d(26): Error: variable `staticarrayoverflow.a` size overflow
-fail_compilation/staticarrayoverflow.d(27): Error: static array `S[0][18446744073709551615LU]` size overflowed to 18446744073709551615
-fail_compilation/staticarrayoverflow.d(27): Error: variable `staticarrayoverflow.b` size overflow
-fail_compilation/staticarrayoverflow.d(28): Error: static array `S[0][4294967295]` size overflowed to 4294967295
-fail_compilation/staticarrayoverflow.d(28): Error: variable `staticarrayoverflow.c` size overflow
+fail_compilation/staticarrayoverflow.d(23): Error: static array `S[1879048192]` size overflowed to 7516192768000
+fail_compilation/staticarrayoverflow.d(23): Error: variable `staticarrayoverflow.y` size overflow
+fail_compilation/staticarrayoverflow.d(25): Error: static array `S[8070450532247928832]` size overflowed to 8070450532247928832
+fail_compilation/staticarrayoverflow.d(25): Error: variable `staticarrayoverflow.a` size overflow
+fail_compilation/staticarrayoverflow.d(26): Error: static array `S[0][18446744073709551615LU]` size overflowed to 18446744073709551615
+fail_compilation/staticarrayoverflow.d(26): Error: variable `staticarrayoverflow.b` size overflow
+fail_compilation/staticarrayoverflow.d(27): Error: static array `S[0][4294967295]` size overflowed to 4294967295
+fail_compilation/staticarrayoverflow.d(27): Error: variable `staticarrayoverflow.c` size overflow
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/staticforeach4.d b/gcc/testsuite/gdc.test/fail_compilation/staticforeach4.d
new file mode 100644
index 0000000..93ba6e4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/staticforeach4.d
@@ -0,0 +1,17 @@
+/*
+REQUIRED_ARGS: -verrors=context
+TEST_OUTPUT:
+---
+fail_compilation/staticforeach4.d(16): Error: index type `byte` cannot cover index range 0..257
+static foreach (byte a, int b; data) { }
+ ^
+fail_compilation/staticforeach4.d(17): Error: index type `byte` cannot cover index range 0..257
+static foreach (byte a, int b; fn()) { }
+ ^
+---
+*/
+immutable int[257] data = 1;
+int[257] fn() { return data; }
+
+static foreach (byte a, int b; data) { }
+static foreach (byte a, int b; fn()) { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/switches.d b/gcc/testsuite/gdc.test/fail_compilation/switches.d
index c96ddb2..da66d0e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/switches.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/switches.d
@@ -1,8 +1,3 @@
-/*
-REQUIRED_ARGS:
-PERMUTE_ARGS:
-*/
-
/************************************************************/
/*
@@ -29,7 +24,7 @@ void test1(int i)
/*
TEST_OUTPUT:
---
-fail_compilation/switches.d(205): Error: no case statement following goto case;
+fail_compilation/switches.d(205): Error: no `case` statement following `goto case;`
---
*/
@@ -50,7 +45,7 @@ void test2(int i)
/*
TEST_OUTPUT:
---
-fail_compilation/switches.d(302): Deprecation: 'switch' skips declaration of variable switches.test3.j at fail_compilation/switches.d(306)
+fail_compilation/switches.d(302): Error: `switch` skips declaration of variable `switches.test3.j` at fail_compilation/switches.d(306)
---
*/
@@ -72,3 +67,29 @@ void test3(int i)
}
+/************************************************************/
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/switches.d(404): Error: `switch` skips declaration of variable `switches.test.z` at fail_compilation/switches.d(406)
+---
+*/
+
+#line 400
+// https://issues.dlang.org/show_bug.cgi?id=18858
+
+int test(int n)
+{
+ final switch(n)
+ {
+ int z = 5;
+ enum e = 6;
+
+ case 1:
+ int y = 2;
+ return y;
+ }
+}
+
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test10.d b/gcc/testsuite/gdc.test/fail_compilation/test10.d
new file mode 100644
index 0000000..4c14257
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test10.d
@@ -0,0 +1,12 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test10.d(10): Error: found `else` without a corresponding `if`, `version` or `debug` statement
+---
+*/
+
+void test(int i)
+{
+ ++i;
+ else
+ ++i;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test1021.d b/gcc/testsuite/gdc.test/fail_compilation/test1021.d
new file mode 100644
index 0000000..0792545
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test1021.d
@@ -0,0 +1,171 @@
+/* REQUIRED_ARGS: -preview=dip1021
+ */
+
+@safe:
+
+/* TEST_OUTPUT:
+---
+fail_compilation/test1021.d(1009): Error: more than one mutable reference of `p` in arguments to `test1021.fooa()`
+fail_compilation/test1021.d(1010): Error: mutable and const references of `p` in arguments to `test1021.foob()`
+fail_compilation/test1021.d(1011): Error: mutable and const references of `p` in arguments to `test1021.fooc()`
+fail_compilation/test1021.d(1013): Error: more than one mutable reference of `p` in arguments to `test1021.fooe()`
+---
+*/
+
+#line 1000
+
+void fooa(int*, int*);
+void foob(const(int)*, int*);
+void fooc(int*, const(int)*);
+void food(const(int)*, const(int)*);
+void fooe(int*, ...);
+
+void test1(int* p)
+{
+ fooa(p, p); // error
+ foob(p, p); // error
+ fooc(p, p); // error
+ food(p, p); // ok
+ fooe(p, p); // error
+}
+
+/***********************************/
+
+/* TEST_OUTPUT:
+---
+fail_compilation/test1021.d(2010): Error: more than one mutable reference to `i` in arguments to `test1021.fopa()`
+fail_compilation/test1021.d(2011): Error: mutable and const references to `i` in arguments to `test1021.fopb()`
+fail_compilation/test1021.d(2012): Error: mutable and const references to `i` in arguments to `test1021.fopc()`
+fail_compilation/test1021.d(2014): Error: more than one mutable reference to `i` in arguments to `test1021.fope()`
+---
+*/
+
+#line 2000
+
+void fopa(ref int, scope int*);
+void fopb(ref int, scope const int*);
+void fopc(ref const int, scope int*);
+void fopd(ref const int, scope const int*);
+inout(int) fope(ref inout int, scope int*);
+void test2()
+{
+ int i;
+ @trusted int* toPtr(ref int i) { return &i; }
+ fopa(i, toPtr(i)); // error
+ fopb(i, toPtr(i)); // error
+ fopc(i, toPtr(i)); // error
+ fopd(i, toPtr(i)); // ok
+ fope(i, toPtr(i)); // error
+}
+
+/***********************************/
+
+/* TEST_OUTPUT:
+---
+fail_compilation/test1021.d(3015): Error: more than one mutable reference to `s` in arguments to `test1021.S.method()`
+fail_compilation/test1021.d(3019): Error: more than one mutable reference of `c` in arguments to `test1021.C.method()`
+---
+*/
+
+#line 3000
+
+struct S
+{
+ void method(ref S s);
+}
+
+class C
+{
+ void method(C c);
+}
+
+void test3()
+{
+ S s;
+ S* ps;
+ s.method(s); // error
+ ps.method(s); // ok
+
+ C c;
+ c.method(c); // error
+}
+
+/***********************************/
+
+/* TEST_OUTPUT:
+---
+fail_compilation/test1021.d(4008): Error: more than one mutable reference to `i` in arguments to `test1021.test4.nested()`
+---
+*/
+
+#line 4000
+
+void test4()
+{
+ int i, k;
+ int nested(ref int j)
+ {
+ return i + j;
+ }
+ nested(i); // error
+ nested(k); // ok
+}
+
+/***********************************/
+
+/* TEST_OUTPUT:
+---
+fail_compilation/test1021.d(5012): Error: more than one mutable reference of `s` in arguments to `test1021.foo5()`
+---
+*/
+
+#line 5000
+
+struct S5
+{
+ int i;
+ int* p;
+}
+
+void foo5(S5, S5);
+
+void test5()
+{
+ S5 s;
+ foo5(s, s);
+}
+
+alias A5 = void delegate() const;
+
+void foo5(A5, A5);
+
+void test5a()
+{
+ A5 a;
+ foo5(a, a);
+}
+
+alias B5 = void function();
+
+void foo5(B5, B5);
+
+void test5b()
+{
+ B5 b;
+ foo5(b, b);
+}
+
+struct S5c
+{
+ void function() fp;
+}
+
+void foo5(S5c, S5c);
+
+void test5c()
+{
+ S5c s;
+ foo5(s, s);
+}
+
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test11006.d b/gcc/testsuite/gdc.test/fail_compilation/test11006.d
new file mode 100644
index 0000000..e7257b7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test11006.d
@@ -0,0 +1,11 @@
+/* REQUIRED_ARGS: -main -de
+ * TEST_OUTPUT:
+---
+fail_compilation/test11006.d(10): Deprecation: cannot subtract pointers to different types: `void*` and `int*`.
+fail_compilation/test11006.d(10): while evaluating: `static assert(2L == 2L)`
+fail_compilation/test11006.d(11): Deprecation: cannot subtract pointers to different types: `int*` and `void*`.
+fail_compilation/test11006.d(11): while evaluating: `static assert(8L == 8L)`
+---
+ */
+static assert(cast(void*)8 - cast(int*) 0 == 2L);
+static assert(cast(int*) 8 - cast(void*)0 == 8L);
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test11047.d b/gcc/testsuite/gdc.test/fail_compilation/test11047.d
index ef8007d..2cbc9c6 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test11047.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test11047.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/test11047.d(11): Error: value of x is not known at compile time
-fail_compilation/test11047.d(11): Error: value of x is not known at compile time
+fail_compilation/test11047.d(11): Error: value of `x` is not known at compile time
+fail_compilation/test11047.d(11): Error: value of `x` is not known at compile time
---
*/
// https://issues.dlang.org/show_bug.cgi?id=11047
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test11176.d b/gcc/testsuite/gdc.test/fail_compilation/test11176.d
index 020d807..6c94b40 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test11176.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test11176.d
@@ -1,9 +1,8 @@
/*
-REQUIRED_ARGS: -de
TEST_OUTPUT:
---
-fail_compilation/test11176.d(12): Deprecation: b.ptr cannot be used in @safe code, use &b[0] instead
-fail_compilation/test11176.d(16): Deprecation: b.ptr cannot be used in @safe code, use &b[0] instead
+fail_compilation/test11176.d(12): Error: `b.ptr` cannot be used in `@safe` code, use `&b[0]` instead
+fail_compilation/test11176.d(16): Error: `b.ptr` cannot be used in `@safe` code, use `&b[0]` instead
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test12228.d b/gcc/testsuite/gdc.test/fail_compilation/test12228.d
new file mode 100644
index 0000000..522bceb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test12228.d
@@ -0,0 +1,21 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test12228.d(13): Error: Using `this` as a type is obsolete. Use `typeof(this)` instead
+fail_compilation/test12228.d(18): Error: no property `x` for type `object.Object`
+fail_compilation/test12228.d(19): Error: Using `super` as a type is obsolete. Use `typeof(super)` instead
+fail_compilation/test12228.d(20): Error: Using `super` as a type is obsolete. Use `typeof(super)` instead
+---
+*/
+
+class C
+{
+ shared(this) x;
+}
+
+class D : C
+{
+ alias x = typeof(super).x;
+ shared(super) a;
+ super b;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test12385.d b/gcc/testsuite/gdc.test/fail_compilation/test12385.d
new file mode 100644
index 0000000..cbba723
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test12385.d
@@ -0,0 +1,30 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test12385.d(29): Error: cannot modify `immutable` expression `unbundled.x`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=12385
+
+class BundledState
+{
+ string m_State;
+
+ int x = 3;
+
+ this(string state) immutable
+ {
+ m_State = state;
+ }
+}
+
+enum States : immutable(BundledState)
+{
+ unbundled = new immutable BundledState("bla"),
+}
+
+void main()
+{
+ States.unbundled.x = 6; // Modifies x.
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test12558.d b/gcc/testsuite/gdc.test/fail_compilation/test12558.d
new file mode 100644
index 0000000..5ff7c97
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test12558.d
@@ -0,0 +1,57 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test12558.d(32): Deprecation: `catch` statement without an exception specification is deprecated
+fail_compilation/test12558.d(32): use `catch(Throwable)` for old behavior
+fail_compilation/test12558.d(36): Deprecation: `catch` statement without an exception specification is deprecated
+fail_compilation/test12558.d(36): use `catch(Throwable)` for old behavior
+fail_compilation/test12558.d(43): Deprecation: `catch` statement without an exception specification is deprecated
+fail_compilation/test12558.d(43): use `catch(Throwable)` for old behavior
+fail_compilation/test12558.d(47): Deprecation: `catch` statement without an exception specification is deprecated
+fail_compilation/test12558.d(47): use `catch(Throwable)` for old behavior
+fail_compilation/test12558.d(56): Deprecation: `catch` statement without an exception specification is deprecated
+fail_compilation/test12558.d(56): use `catch(Throwable)` for old behavior
+fail_compilation/test12558.d(31): Error: `catch` statement without an exception specification is deprecated
+fail_compilation/test12558.d(31): use `catch(Throwable)` for old behavior
+fail_compilation/test12558.d(36): Error: `catch` statement without an exception specification is deprecated
+fail_compilation/test12558.d(36): use `catch(Throwable)` for old behavior
+fail_compilation/test12558.d(42): Error: `catch` statement without an exception specification is deprecated
+fail_compilation/test12558.d(42): use `catch(Throwable)` for old behavior
+fail_compilation/test12558.d(47): Error: `catch` statement without an exception specification is deprecated
+fail_compilation/test12558.d(47): use `catch(Throwable)` for old behavior
+---
+*/
+
+void main()
+{
+ auto handler = () { };
+
+ try {
+ assert(0);
+ } catch
+ handler();
+
+ try {
+ assert(0);
+ } catch {
+ handler();
+ }
+
+ try {
+ assert(0);
+ } catch
+ handler();
+
+ try {
+ assert(0);
+ } catch {
+ handler();
+ }
+}
+
+void foo()()
+{
+ try {}
+ catch
+ assert(false);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test12822.d b/gcc/testsuite/gdc.test/fail_compilation/test12822.d
index fe71098..510d9e2 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test12822.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test12822.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/test12822.d(13): Error: cannot modify delegate pointer in @safe code dg.ptr
-fail_compilation/test12822.d(14): Error: dg.funcptr cannot be used in @safe code
+fail_compilation/test12822.d(13): Error: cannot modify delegate pointer in `@safe` code `dg.ptr`
+fail_compilation/test12822.d(14): Error: `dg.funcptr` cannot be used in `@safe` code
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test13152.d b/gcc/testsuite/gdc.test/fail_compilation/test13152.d
index 814dcb7..8033e28 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test13152.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test13152.d
@@ -1,7 +1,8 @@
/*
+EXTRA_FILES: imports/test13152a.d imports/test13152b.d imports/test13152c.d imports/test13152d.d imports/test13152e.d imports/test13152f.d imports/test13152g.d imports/test13152h.d imports/test13152i.d imports/test13152j.d imports/test13152k.d imports/test13152l.d imports/test13152m.d imports/test13152n.d imports/test13152o.d imports/test13152p.d imports/test13152q.d imports/test13152r.d imports/test13152s.d imports/test13152t.d imports/test13152u.d imports/test13152v.d imports/test13152w.d imports/test13152x.d imports/test13152y.d imports/test13152z.d
TEST_OUTPUT:
---
-fail_compilation/test13152.d(11): Error: undefined identifier `x`
+fail_compilation/test13152.d(12): Error: undefined identifier `x`
---
*/
import imports.test13152a;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test13536.d b/gcc/testsuite/gdc.test/fail_compilation/test13536.d
index 800757d..e29861f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test13536.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test13536.d
@@ -1,10 +1,9 @@
/*
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/test13536.d(24): Error: field U.sysDg cannot access pointers in @safe code that overlap other fields
-fail_compilation/test13536.d(24): Error: address of variable `s` assigned to `u` with longer lifetime
-fail_compilation/test13536.d(25): Error: field U.safeDg cannot access pointers in @safe code that overlap other fields
+fail_compilation/test13536.d(23): Error: field `U.sysDg` cannot access pointers in `@safe` code that overlap other fields
+fail_compilation/test13536.d(23): Error: address of variable `s` assigned to `u` with longer lifetime
+fail_compilation/test13536.d(24): Error: field `U.safeDg` cannot access pointers in `@safe` code that overlap other fields
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test13537.d b/gcc/testsuite/gdc.test/fail_compilation/test13537.d
index 0e087dd..a92a7c1 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test13537.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test13537.d
@@ -1,11 +1,10 @@
/*
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/test13537.d(32): Error: field U.y cannot modify fields in @safe code that overlap fields with other storage classes
-fail_compilation/test13537.d(33): Error: field U.y cannot modify fields in @safe code that overlap fields with other storage classes
-fail_compilation/test13537.d(34): Error: field U.z cannot access pointers in @safe code that overlap other fields
-fail_compilation/test13537.d(35): Error: field U.y cannot modify fields in @safe code that overlap fields with other storage classes
+fail_compilation/test13537.d(31): Error: field `U.y` cannot modify fields in `@safe` code that overlap fields with other storage classes
+fail_compilation/test13537.d(32): Error: field `U.y` cannot modify fields in `@safe` code that overlap fields with other storage classes
+fail_compilation/test13537.d(33): Error: field `U.z` cannot access pointers in `@safe` code that overlap other fields
+fail_compilation/test13537.d(34): Error: field `U.y` cannot modify fields in `@safe` code that overlap fields with other storage classes
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test13667.d b/gcc/testsuite/gdc.test/fail_compilation/test13667.d
new file mode 100644
index 0000000..e63e21e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test13667.d
@@ -0,0 +1,101 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test13667.d(112): Error: cannot cast expression `this` of type `const(Array1!int)` to `Array1!int*`
+fail_compilation/test13667.d(116): Error: template instance `test13667.Array1!int` error instantiating
+fail_compilation/test13667.d(121): Error: cannot cast expression `this` of type `const(Array2!int)` to `B*`
+fail_compilation/test13667.d(125): Error: template instance `test13667.Array2!int` error instantiating
+fail_compilation/test13667.d(136): Error: cannot cast expression `this` of type `const(Array3!int)` to `C*`
+fail_compilation/test13667.d(140): Error: template instance `test13667.Array3!int` error instantiating
+fail_compilation/test13667.d(151): Error: cannot cast expression `this` of type `const(Array4!int)` to `D*`
+fail_compilation/test13667.d(155): Error: template instance `test13667.Array4!int` error instantiating
+fail_compilation/test13667.d(172): Error: cannot cast expression `this` of type `const(Array5!int)` to `F*`
+fail_compilation/test13667.d(176): Error: template instance `test13667.Array5!int` error instantiating
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=13667
+
+#line 100
+// 0, no error but also crashed before
+struct Array0(T)
+{
+ Array0!(T) impConv() const { return cast(typeof(return))this; }
+ alias impConv this;
+}
+
+alias AI0 = Array0!int;
+
+// 1
+struct Array1(T)
+{
+ Array1!(T) impConv() const { return *cast(typeof(return)*)this; }
+ alias impConv this;
+}
+
+alias AI1 = Array1!int;
+
+// 2
+struct Array2(T)
+{
+ B impConv() const { return cast(B*)this; }
+ alias impConv this;
+}
+
+alias AI2 = Array2!int;
+
+struct B
+{
+ AI2 get() { return AI2(); }
+ alias get this;
+}
+
+// 3
+struct Array3(T)
+{
+ C impConv() const { return cast(C*)this; }
+ alias impConv this;
+}
+
+alias AI3 = Array3!int;
+
+struct C
+{
+ C get() { return C(); }
+ alias get this;
+}
+
+// 4
+struct Array4(T)
+{
+ D impConv() const { return cast(D*)this; }
+ alias impConv this;
+}
+
+alias AI4 = Array4!int;
+
+struct D
+{
+ E get() { return E(); }
+ alias get this;
+}
+
+struct E
+{
+ AI4 ai;
+ alias ai this;
+}
+
+// 5: test enum based on struct, needed to use base type (toBasetype())
+struct Array5(T)
+{
+ F impConv() const { return cast(F*)this; }
+ alias impConv this;
+}
+
+alias AI5 = Array5!int;
+
+enum F : AI5
+{
+ f = AI5()
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test13786.d b/gcc/testsuite/gdc.test/fail_compilation/test13786.d
index 3b05dcc..3524875 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test13786.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test13786.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/test13786.d(14): Error: debug 123 level declaration must be at module level
-fail_compilation/test13786.d(15): Error: debug abc declaration must be at module level
-fail_compilation/test13786.d(16): Error: version 123 level declaration must be at module level
-fail_compilation/test13786.d(17): Error: version abc declaration must be at module level
-fail_compilation/test13786.d(20): Error: template instance test13786.T!() error instantiating
+fail_compilation/test13786.d(14): Error: debug `123` level declaration must be at module level
+fail_compilation/test13786.d(15): Error: debug `abc` declaration must be at module level
+fail_compilation/test13786.d(16): Error: version `123` level declaration must be at module level
+fail_compilation/test13786.d(17): Error: version `abc` declaration must be at module level
+fail_compilation/test13786.d(20): Error: template instance `test13786.T!()` error instantiating
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test13867.d b/gcc/testsuite/gdc.test/fail_compilation/test13867.d
index aebab2b..36543f9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test13867.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test13867.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/test13867.d(12): Error: function test13867.X.blah does not override any function, did you mean to override 'extern (C++) test13867.Base.blah'?
-fail_compilation/test13867.d(19): Error: function test13867.Z.blah does not override any function, did you mean to override 'extern (C++) test13867.Base.blah'?
+fail_compilation/test13867.d(12): Error: function `void test13867.X.blah()` does not override any function, did you mean to override `extern (C++) void test13867.Base.blah()`?
+fail_compilation/test13867.d(19): Error: function `void test13867.Z.blah()` does not override any function, did you mean to override `extern (C++) void test13867.Base.blah()`?
---
*/
extern (C++) class Base {
@@ -15,14 +15,14 @@ extern (C++) class Y : Base {
override void blah(){}
}
class Z : Base {
- alias blah = super.blah;
+ alias blah = typeof(super).blah;
override void blah(){}//Error
}
class O : Base {
extern (C++) override void blah(){}
}
extern (C++) class OK : Base {
- alias blah = super.blah;
+ alias blah = typeof(super).blah;
override void blah(){}
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test14064.d b/gcc/testsuite/gdc.test/fail_compilation/test14064.d
new file mode 100644
index 0000000..9513e47
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test14064.d
@@ -0,0 +1,15 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test14064.d(11): Error: `private` is a keyword, not an `@` attribute
+fail_compilation/test14064.d(12): Error: `deprecated` is a keyword, not an `@` attribute
+fail_compilation/test14064.d(13): Error: `pure` is a keyword, not an `@` attribute
+fail_compilation/test14064.d(14): Error: `nothrow` is a keyword, not an `@` attribute
+fail_compilation/test14064.d(15): Error: `in` is a keyword, not an `@` attribute
+---
+*/
+@private int v;
+@deprecated void foo();
+int goo() @pure;
+@nothrow unittest {};
+void zoom(@in int x);
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test14238.d b/gcc/testsuite/gdc.test/fail_compilation/test14238.d
index 2d5f586..e0d0b35 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test14238.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test14238.d
@@ -1,9 +1,8 @@
-/* REQUIRED_ARGS: -dip1000
- PERMUTE_ARGS:
+/* REQUIRED_ARGS: -preview=dip1000
TEST_OUTPUT:
---
-fail_compilation/test14238.d(21): Error: scope variable `fn` may not be returned
-fail_compilation/test14238.d(29): Error: escaping reference to stack allocated value returned by `&baz`
+fail_compilation/test14238.d(20): Error: scope variable `fn` may not be returned
+fail_compilation/test14238.d(28): Error: escaping reference to stack allocated value returned by `&baz`
---
*/
// https://issues.dlang.org/show_bug.cgi?id=14238
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test143.d b/gcc/testsuite/gdc.test/fail_compilation/test143.d
index c95ecc1..1a1ed70 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test143.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test143.d
@@ -4,7 +4,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/test143.d(19): Error: undefined identifier `x`
+fail_compilation/test143.d(20): Error: undefined identifier `x`
---
*/
module test143;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test14496.d b/gcc/testsuite/gdc.test/fail_compilation/test14496.d
index 8575e72..2835907 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test14496.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test14496.d
@@ -1,11 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/test14496.d(21): Error: variable test14496.foo.f void initializers for pointers not allowed in safe functions
-fail_compilation/test14496.d(24): Error: variable test14496.foo.Bar.foo void initializers for pointers not allowed in safe functions
-fail_compilation/test14496.d(28): Error: variable test14496.foo.Baz.x void initializers for pointers not allowed in safe functions
-fail_compilation/test14496.d(48): Error: variable test14496.sinister.bar void initializers for pointers not allowed in safe functions
-fail_compilation/test14496.d(49): Error: variable test14496.sinister.baz void initializers for pointers not allowed in safe functions
+fail_compilation/test14496.d(21): Error: variable `test14496.foo.f` `void` initializers for pointers not allowed in safe functions
+fail_compilation/test14496.d(24): Error: variable `test14496.foo.Bar.foo` `void` initializers for pointers not allowed in safe functions
+fail_compilation/test14496.d(28): Error: variable `test14496.foo.Baz.x` `void` initializers for pointers not allowed in safe functions
+fail_compilation/test14496.d(48): Error: variable `test14496.sinister.bar` `void` initializers for pointers not allowed in safe functions
+fail_compilation/test14496.d(49): Error: variable `test14496.sinister.baz` `void` initializers for pointers not allowed in safe functions
---
*/
// https://issues.dlang.org/show_bug.cgi?id=14496
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test14538.d b/gcc/testsuite/gdc.test/fail_compilation/test14538.d
index b0b76a7..1ad2126 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test14538.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test14538.d
@@ -1,9 +1,8 @@
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/test14538.d(19): Error: cannot implicitly convert expression `x ? cast(uint)this.fCells[x].code : 32u` of type `uint` to `Cell`
+fail_compilation/test14538.d(18): Error: cannot implicitly convert expression `x ? cast(uint)this.fCells[x].code : 32u` of type `uint` to `Cell`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15117.d b/gcc/testsuite/gdc.test/fail_compilation/test15117.d
deleted file mode 100644
index e6ce3b5..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/test15117.d
+++ /dev/null
@@ -1,30 +0,0 @@
-// REQUIRED_ARGS: -o-
-// PERMUTE_ARGS:
-// COMPILED_IMPORTS: imports/test15117a.d
-/*
-TEST_OUTPUT:
----
-fail_compilation/test15177.d-mixin-20(20): Error: `imports.test15117a.object` is not visible from module `test15177`
-fail_compilation/test15177.d(29): Error: template instance `test15177.RunApiTest!()` error instantiating
----
-*/
-
-import users = imports.test15117a;
-
-void RunApiTest(T...)()
-{
- foreach (name; __traits(allMembers, users))
- {
- // 3. list the name of TyepInfoStructDeclaration,
- // but it's just internal symbol and invisible.
- mixin("alias func = users . " ~ name ~ ";");
- }
-}
-
-void main()
-{
- // 1. run semantic3 of users.test_usr_1
- users.test_usr_1();
-
- RunApiTest!();
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15177.d b/gcc/testsuite/gdc.test/fail_compilation/test15177.d
new file mode 100644
index 0000000..b0ae7ae
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15177.d
@@ -0,0 +1,29 @@
+// REQUIRED_ARGS: -o-
+// COMPILED_IMPORTS: imports/test15117a.d
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test15177.d-mixin-19(19): Error: `imports.test15117a.object` is not visible from module `test15177`
+fail_compilation/test15177.d(28): Error: template instance `test15177.RunApiTest!()` error instantiating
+---
+*/
+
+import users = imports.test15117a;
+
+void RunApiTest(T...)()
+{
+ foreach (name; __traits(allMembers, users))
+ {
+ // 3. list the name of TyepInfoStructDeclaration,
+ // but it's just internal symbol and invisible.
+ mixin("alias func = users . " ~ name ~ ";");
+ }
+}
+
+void main()
+{
+ // 1. run semantic3 of users.test_usr_1
+ users.test_usr_1();
+
+ RunApiTest!();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15191.d b/gcc/testsuite/gdc.test/fail_compilation/test15191.d
index 55b09b7..1b3078f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test15191.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15191.d
@@ -1,18 +1,52 @@
/* TEST_OUTPUT:
+PERMUTE_ARGS -dip1000
---
-fail_compilation/test15191.d(17): Error: cannot take address of ref return of foo() in @safe function bar
+fail_compilation/test15191.d(31): Error: returning `&identity(x)` escapes a reference to local variable `x`
+fail_compilation/test15191.d(37): Error: returning `&identityPtr(x)` escapes a reference to local variable `x`
+fail_compilation/test15191.d(43): Error: cannot take address of `ref return` of `identityPtr()` in `@safe` function `addrOfRefTransitive`
+fail_compilation/test15191.d(43): Error: returning `&identityPtr(x)` escapes a reference to local variable `x`
---
*/
-
// https://issues.dlang.org/show_bug.cgi?id=15191
+// https://issues.dlang.org/show_bug.cgi?id=22519
-ref int foo(return ref int s)@safe
+@safe:
+ref int foo(return ref int s)
{
return s;
}
-int* bar(return ref int s) @safe
+int* bar(return ref int s)
{
return &foo(s);
}
+
+ref int identity(ref return int x) {return x;}
+ref int* identityPtr(ref return int* x) {return x;}
+
+int* addrOfRefEscape()
+{
+ int x;
+ return &identity(x);
+}
+
+int** addrOfRefSystem() @system
+{
+ int* x;
+ return &identityPtr(x);
+}
+
+int** addrOfRefTransitive()
+{
+ int* x;
+ return &identityPtr(x);
+}
+
+int gInt;
+ref int getGlobalInt() {return gInt;}
+
+int* addrOfRefGlobal()
+{
+ return &getGlobalInt();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15306.d b/gcc/testsuite/gdc.test/fail_compilation/test15306.d
index ad51371..ff532ae 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test15306.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15306.d
@@ -1,10 +1,8 @@
/*
-REQUIRED_ARGS:
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/test15306.d(17): Error: immutable delegate 'test15306.main.__dgliteral1' cannot access mutable data 'i'
-fail_compilation/test15306.d(21): Error: shared delegate 'test15306.main.__dgliteral2' cannot access non-shared data 'p'
+fail_compilation/test15306.d(15): Error: `immutable` delegate `test15306.main.__dgliteral2` cannot access mutable data `i`
+fail_compilation/test15306.d(19): Error: `shared` delegate `test15306.main.__dgliteral5` cannot access non-shared data `p`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15373.d b/gcc/testsuite/gdc.test/fail_compilation/test15373.d
new file mode 100644
index 0000000..1b3cecd
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15373.d
@@ -0,0 +1,22 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test15373.d(21): Error: Runtime type information is not supported for `extern(C++)` classes
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=15373
+
+// Using `typeid` on an `extern(C++) class` type is ok as it is evaluated at compile-time
+// See test/runnable/test15373.d
+
+// Using `typeid` on an `extern(C++) class` instance is not ok because `extern(C++) class`
+// instances are not rooted in `Object`
+
+extern(C++) class C { }
+
+void foo()
+{
+ C c = new C();
+ auto ti = typeid(c);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15399.d b/gcc/testsuite/gdc.test/fail_compilation/test15399.d
index bad3ed2..00ec33a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test15399.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15399.d
@@ -1,14 +1,14 @@
/* https://issues.dlang.org/show_bug.cgi?id=15399
TEST_OUTPUT:
---
-fail_compilation/test15399.d(31): Error: writing to misaligned pointer in field S1.ptr is not @safe
-fail_compilation/test15399.d(32): Error: writing to misaligned pointer in field S2.ptr is not @safe
-fail_compilation/test15399.d(33): Error: taking address of misaligned pointer in field S1.ptr is not @safe
-fail_compilation/test15399.d(34): Error: taking address of misaligned pointer in field S2.ptr is not @safe
-fail_compilation/test15399.d(35): Error: 'ref' of misaligned pointer in field S1.ptr is not @safe
-fail_compilation/test15399.d(36): Error: 'ref' of misaligned pointer in field S2.ptr is not @safe
-fail_compilation/test15399.d(37): Error: 'out' of misaligned pointer in field S1.ptr is not @safe
-fail_compilation/test15399.d(38): Error: 'out' of misaligned pointer in field S2.ptr is not @safe
+fail_compilation/test15399.d(32): Error: field `S1.ptr` cannot modify misaligned pointers in `@safe` code
+fail_compilation/test15399.d(33): Error: field `S2.ptr` cannot modify misaligned pointers in `@safe` code
+fail_compilation/test15399.d(34): Error: field `S1.ptr` cannot modify misaligned pointers in `@safe` code
+fail_compilation/test15399.d(35): Error: field `S2.ptr` cannot modify misaligned pointers in `@safe` code
+fail_compilation/test15399.d(36): Error: field `S1.ptr` cannot modify misaligned pointers in `@safe` code
+fail_compilation/test15399.d(37): Error: field `S2.ptr` cannot modify misaligned pointers in `@safe` code
+fail_compilation/test15399.d(38): Error: field `S1.ptr` cannot modify misaligned pointers in `@safe` code
+fail_compilation/test15399.d(39): Error: field `S2.ptr` cannot modify misaligned pointers in `@safe` code
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15544.d b/gcc/testsuite/gdc.test/fail_compilation/test15544.d
index 9757dbf..eeb4492 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test15544.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15544.d
@@ -1,10 +1,9 @@
/*
-REQUIRED_ARGS: -dip1000
-PERMUTE_ARGS:
+REQUIRED_ARGS: -preview=dip1000
TEST_OUTPUT:
---
-fail_compilation/test15544.d(21): Error: reference to local `this` assigned to non-scope `_del` in @safe code
-fail_compilation/test15544.d(23): Error: reference to local `this` assigned to non-scope `_del` in @safe code
+fail_compilation/test15544.d(20): Error: reference to local `this` assigned to non-scope `_del` in @safe code
+fail_compilation/test15544.d(22): Error: reference to local `this` assigned to non-scope `_del` in @safe code
---
*/
@@ -27,7 +26,7 @@ struct S {
/*
TEST_OUTPUT:
---
-fail_compilation/test15544.d(47): Error: reference to local `y` assigned to non-scope `dg` in @safe code
+fail_compilation/test15544.d(46): Error: reference to local `y` assigned to non-scope `dg` in @safe code
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15660.d b/gcc/testsuite/gdc.test/fail_compilation/test15660.d
new file mode 100644
index 0000000..c979bb5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15660.d
@@ -0,0 +1,22 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/test15660.d(20): Error: cannot implicitly convert expression `f(v)` of type `int[]` to `immutable(int[])`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=15660
+
+int[] f(ref void[] m) pure
+{
+ auto result = new int[5];
+ m = result;
+ return result;
+}
+
+void main()
+{
+ void[] v;
+ immutable x = f(v);
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15672.d b/gcc/testsuite/gdc.test/fail_compilation/test15672.d
index 19b5bf1..859521d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test15672.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15672.d
@@ -1,8 +1,8 @@
/*
* TEST_OUTPUT:
---
-fail_compilation/test15672.d(15): Error: cast from void[] to byte[] not allowed in safe code
-fail_compilation/test15672.d(25): Error: cast from void* to byte* not allowed in safe code
+fail_compilation/test15672.d(15): Error: cast from `void[]` to `byte[]` not allowed in safe code
+fail_compilation/test15672.d(25): Error: cast from `void*` to `byte*` not allowed in safe code
---
*/
// https://issues.dlang.org/show_bug.cgi?id=15672
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15703.d b/gcc/testsuite/gdc.test/fail_compilation/test15703.d
index cf24c3b..1665e85 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test15703.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15703.d
@@ -1,11 +1,10 @@
/*
REQUIRED_ARGS: -m32
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/test15703.d(17): Error: cast from Object[] to uint[] not allowed in safe code
-fail_compilation/test15703.d(19): Error: cast from object.Object to const(uint)* not allowed in safe code
-fail_compilation/test15703.d(22): Error: cast from uint[] to Object[] not allowed in safe code
+fail_compilation/test15703.d(16): Error: cast from `Object[]` to `uint[]` not allowed in safe code
+fail_compilation/test15703.d(18): Error: cast from `object.Object` to `const(uint)*` not allowed in safe code
+fail_compilation/test15703.d(21): Error: cast from `uint[]` to `Object[]` not allowed in safe code
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15704.d b/gcc/testsuite/gdc.test/fail_compilation/test15704.d
index 6b41906..d818033 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test15704.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15704.d
@@ -1,7 +1,7 @@
/*
* TEST_OUTPUT:
---
-fail_compilation/test15704.d(15): Error: cannot copy void[] to void[] in @safe code
+fail_compilation/test15704.d(15): Error: cannot copy `void[]` to `void[]` in `@safe` code
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15785.d b/gcc/testsuite/gdc.test/fail_compilation/test15785.d
index 474076f..23a3660 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test15785.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15785.d
@@ -1,8 +1,8 @@
-// PERMUTE_ARGS:
+// EXTRA_FILES: imports/test15785.d
/*
TEST_OUTPUT:
---
-fail_compilation/test15785.d(16): Error: no property `foo` for type `imports.test15785.Base`, did you mean `imports.test15785.Base.foo`?
+fail_compilation/test15785.d(16): Error: no property `foo` for type `imports.test15785.Base`
fail_compilation/test15785.d(17): Error: undefined identifier `bar`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15785b.d b/gcc/testsuite/gdc.test/fail_compilation/test15785b.d
index e09b4bf..910db18 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test15785b.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15785b.d
@@ -1,18 +1,17 @@
-// REQUIRED_ARGS:
-// PERMUTE_ARGS:
+// EXTRA_FILES: imports/test15785.d
/*
TEST_OUTPUT:
---
+fail_compilation/test15785b.d(14): Error: `imports.test15785.Base.T` is not visible from module `test15785b`
fail_compilation/test15785b.d(15): Error: `imports.test15785.Base.T` is not visible from module `test15785b`
-fail_compilation/test15785b.d(16): Error: `imports.test15785.Base.T` is not visible from module `test15785b`
-fail_compilation/test15785b.d(17): Error: `imports.test15785.IBase2.T` is not visible from module `test15785b`
+fail_compilation/test15785b.d(16): Error: `imports.test15785.IBase2.T` is not visible from module `test15785b`
---
*/
import imports.test15785;
class Derived : Base, IBase2
{
- super.T t;
+ typeof(super).T t;
Base.T t2;
IBase2.T t3;
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15897.d b/gcc/testsuite/gdc.test/fail_compilation/test15897.d
index aa22c10..e4ade7d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test15897.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15897.d
@@ -1,8 +1,9 @@
// REQUIRED_ARGS: -de
+// EXTRA_FILES: imports/test15897.d
/*
TEST_OUTPUT:
---
-fail_compilation/test15897.d(18): Error: no property `create` for type `imports.test15897.Cat`
+fail_compilation/test15897.d(19): Error: no property `create` for type `imports.test15897.Cat`
---
*/
module test15897;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15925.d b/gcc/testsuite/gdc.test/fail_compilation/test15925.d
index 9359859..88102ac 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test15925.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15925.d
@@ -1,5 +1,5 @@
-/* REQUIRED_ARGS:
-PERMUTE_ARGS:
+/*
+EXTRA_FILES: imports/imp15925.d
TEST_OUTPUT:
---
fail_compilation/test15925.d(18): Error: undefined identifier `X`
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15989.d b/gcc/testsuite/gdc.test/fail_compilation/test15989.d
index 29eab9c..a78dec4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test15989.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test15989.d
@@ -1,10 +1,9 @@
/*
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/test15989.d(40): Error: variable test15989.main.ctRegex : Unable to initialize enum with class or pointer to struct. Use static const variable instead.
-fail_compilation/test15989.d(49): Error: variable test15989.test.c : Unable to initialize enum with class or pointer to struct. Use static const variable instead.
-fail_compilation/test15989.d(50): Error: cannot use non-constant CTFE pointer in an initializer '&[3][0]'
+fail_compilation/test15989.d(39): Error: variable `test15989.main.ctRegex` : Unable to initialize enum with class or pointer to struct. Use static const variable instead.
+fail_compilation/test15989.d(48): Error: variable `test15989.test.c` : Unable to initialize enum with class or pointer to struct. Use static const variable instead.
+fail_compilation/test15989.d(49): Error: cannot use non-constant CTFE pointer in an initializer `new int(3)`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test16095.d b/gcc/testsuite/gdc.test/fail_compilation/test16095.d
index cb164f5..38a3a7d 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test16095.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test16095.d
@@ -1,11 +1,9 @@
/*
-REQUIRED_ARGS:
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/test16095.d(20): Error: shared method test16095.C.ping is not callable using a non-shared a
-fail_compilation/test16095.d(30): Error: shared method test16095.S.ping is not callable using a non-shared *a
-fail_compilation/test16095.d(43): Error: mutable method test16095.Foo.flip is not callable using a immutable foo
+fail_compilation/test16095.d(18): Error: `shared` method `test16095.C.ping` is not callable using a non-shared `a`
+fail_compilation/test16095.d(28): Error: `shared` method `test16095.S.ping` is not callable using a non-shared `*a`
+fail_compilation/test16095.d(41): Error: mutable method `test16095.Foo.flip` is not callable using a `immutable` `foo`
---
*/
// https://issues.dlang.org/show_bug.cgi?id=16095
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test16116.d b/gcc/testsuite/gdc.test/fail_compilation/test16116.d
index be6e786..d407aa3 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test16116.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test16116.d
@@ -1,9 +1,8 @@
/*
REQUIRED_ARGS: -m64
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/test16116.d(15): Error: incompatible types for ((v) * (i)): '__vector(short[8])' and 'int'
+fail_compilation/test16116.d(14): Error: incompatible types for `(v) * (i)`: `__vector(short[8])` and `int`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test16193.d b/gcc/testsuite/gdc.test/fail_compilation/test16193.d
index de65e8a..4124c43 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test16193.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test16193.d
@@ -1,15 +1,14 @@
/*
-REQUIRED_ARGS: -dip1000
-PERMUTE_ARGS:
+REQUIRED_ARGS: -preview=dip1000
TEST_OUTPUT:
---
-fail_compilation/test16193.d(39): Error: function test16193.abc is @nogc yet allocates closures with the GC
-fail_compilation/test16193.d(41): test16193.abc.__foreachbody1 closes over variable x at fail_compilation/test16193.d(40)
+fail_compilation/test16193.d(38): Error: function `test16193.abc` is `@nogc` yet allocates closures with the GC
+fail_compilation/test16193.d(40): test16193.abc.__foreachbody2 closes over variable x at fail_compilation/test16193.d(39)
---
*/
-//fail_compilation/test16193.d(22): To enforce @safe compiler allocates a closure unless the opApply() uses 'scope'
-//fail_compilation/test16193.d(34): To enforce @safe compiler allocates a closure unless the opApply() uses 'scope'
-//fail_compilation/test16193.d(41): To enforce @safe compiler allocates a closure unless the opApply() uses 'scope'
+//fail_compilation/test16193.d(22): To enforce `@safe`, the compiler allocates a closure unless `opApply()` uses `scope`
+//fail_compilation/test16193.d(34): To enforce `@safe`, the compiler allocates a closure unless `opApply()` uses `scope`
+//fail_compilation/test16193.d(41): To enforce `@safe`, the compiler allocates a closure unless `opApply()` uses `scope`
// https://issues.dlang.org/show_bug.cgi?id=16193
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test16195.d b/gcc/testsuite/gdc.test/fail_compilation/test16195.d
index 704974c..a315f33 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test16195.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test16195.d
@@ -1,7 +1,8 @@
/*
* TEST_OUTPUT:
---
-fail_compilation/test16195.d(13): Error: delete p is not @safe but is used in @safe function test
+fail_compilation/test16195.d(14): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+fail_compilation/test16195.d(14): Error: `delete p` is not `@safe` but is used in `@safe` function `test`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test16228.d b/gcc/testsuite/gdc.test/fail_compilation/test16228.d
index 63951e6..b862284 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test16228.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test16228.d
@@ -1,4 +1,4 @@
-/* REQUIRED_ARGS: -dip25
+/* REQUIRED_ARGS:
TEST_OUTPUT:
---
fail_compilation/test16228.d(23): Error: function `test16228.S.bar` `static` member has no `this` to which `return` can apply
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test16284.d b/gcc/testsuite/gdc.test/fail_compilation/test16284.d
new file mode 100644
index 0000000..77b73b0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test16284.d
@@ -0,0 +1,27 @@
+/* REQUIRED_ARGS: -preview=fieldwise
+TEST_OUTPUT:
+---
+fail_compilation/test16284.d(24): Error: reinterpretation through overlapped field `s` is not allowed in CTFE
+fail_compilation/test16284.d(27): called from here: `test()`
+fail_compilation/test16284.d(27): while evaluating: `static assert(test())`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=16284
+
+struct S {}
+
+struct T
+{
+ union {int i; S s;}
+ this(uint dummy) { s = S.init; }
+}
+
+bool test()
+{
+ auto t1 = T(0);
+ auto t2 = T(0);
+ return t1 == t2;
+}
+
+static assert(test());
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test16365.d b/gcc/testsuite/gdc.test/fail_compilation/test16365.d
index 067361b..a11807f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test16365.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test16365.d
@@ -1,11 +1,10 @@
-/* REQUIRED_ARGS:
- PERMUTE_ARGS:
- TEST_OUTPUT:
+/*
+TEST_OUTPUT:
---
-fail_compilation/test16365.d(22): Error: 'this' reference necessary to take address of member f1 in @safe function main
-fail_compilation/test16365.d(24): Error: cannot implicitly convert expression `&f2` of type `void delegate() pure nothrow @nogc @safe` to `void function() @safe`
-fail_compilation/test16365.d(28): Error: address of variable `s` assigned to `dg` with longer lifetime
-fail_compilation/test16365.d(29): Error: dg.funcptr cannot be used in @safe code
+fail_compilation/test16365.d(21): Error: `this` reference necessary to take address of member `f1` in `@safe` function `main`
+fail_compilation/test16365.d(23): Error: cannot implicitly convert expression `&f2` of type `void delegate() pure nothrow @nogc @safe` to `void function() @safe`
+fail_compilation/test16365.d(27): Error: address of variable `s` assigned to `dg` with longer lifetime
+fail_compilation/test16365.d(28): Error: `dg.funcptr` cannot be used in `@safe` code
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test16381.d b/gcc/testsuite/gdc.test/fail_compilation/test16381.d
index ed591bd..b854c27 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test16381.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test16381.d
@@ -1,9 +1,8 @@
/*
REQUIRED_ARGS: -m64
-PERMUTE_ARGS:
TEST_OUTPUT:
---
-fail_compilation/test16381.d(16): Error: foo() is not an lvalue
+fail_compilation/test16381.d(15): Error: `foo()` is not an lvalue and cannot be modified
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test16523.d b/gcc/testsuite/gdc.test/fail_compilation/test16523.d
index e5de7c1..78563c9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test16523.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test16523.d
@@ -1,8 +1,7 @@
-// REQUIRED_ARGS: -de
/*
TEST_OUTPUT:
---
-fail_compilation/test16523.d(13): Deprecation: case variables have to be const or immutable
+fail_compilation/test16523.d(12): Error: `case` variables have to be `const` or `immutable`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test16589.d b/gcc/testsuite/gdc.test/fail_compilation/test16589.d
index 205347b..7b1f14f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test16589.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test16589.d
@@ -1,20 +1,20 @@
-/* PERMUTE_ARGS:
-REQUIRED_ARGS: -dip1000
+/*
+REQUIRED_ARGS: -preview=dip1000
TEST_OUTPUT:
---
-fail_compilation/test16589.d(26): Error: returning `&this.data` escapes a reference to parameter `this`, perhaps annotate with `return`
-fail_compilation/test16589.d(31): Error: returning `&this` escapes a reference to parameter `this`, perhaps annotate with `return`
-fail_compilation/test16589.d(37): Error: returning `&s.data` escapes a reference to parameter `s`, perhaps annotate with `return`
-fail_compilation/test16589.d(42): Error: returning `&s` escapes a reference to parameter `s`, perhaps annotate with `return`
-fail_compilation/test16589.d(47): Error: returning `&s.data` escapes a reference to parameter `s`, perhaps annotate with `return`
-fail_compilation/test16589.d(52): Error: returning `& s` escapes a reference to parameter `s`, perhaps annotate with `return`
+fail_compilation/test16589.d(26): Error: returning `&this.data` escapes a reference to parameter `this`
+fail_compilation/test16589.d(26): perhaps annotate the parameter with `return`
+fail_compilation/test16589.d(31): Error: returning `&this` escapes a reference to parameter `this`
+fail_compilation/test16589.d(31): perhaps annotate the parameter with `return`
+fail_compilation/test16589.d(37): Error: returning `&s.data` escapes a reference to parameter `s`
+fail_compilation/test16589.d(37): perhaps annotate the parameter with `return`
+fail_compilation/test16589.d(42): Error: returning `&s` escapes a reference to parameter `s`
+fail_compilation/test16589.d(42): perhaps annotate the parameter with `return`
+fail_compilation/test16589.d(47): Error: returning `&s.data` escapes a reference to local variable `s`
+fail_compilation/test16589.d(52): Error: returning `& s` escapes a reference to local variable `s`
---
*/
-
-
-
-
// https://issues.dlang.org/show_bug.cgi?id=16589
struct S
@@ -61,5 +61,3 @@ class C
return &data;
}
}
-
-
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test16694.d b/gcc/testsuite/gdc.test/fail_compilation/test16694.d
new file mode 100644
index 0000000..1b15aa4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test16694.d
@@ -0,0 +1,8 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test16694.d(8): Error: cannot take address of imported symbol `bar` at compile time
+---
+*/
+export void bar();
+auto barptr = &bar;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17284.d b/gcc/testsuite/gdc.test/fail_compilation/test17284.d
new file mode 100644
index 0000000..a0ea05b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17284.d
@@ -0,0 +1,20 @@
+TEST_OUTPUT:
+---
+fail_compilation/test17284.d(1): Error: no identifier for declarator `TEST_OUTPUT`
+fail_compilation/test17284.d(1): Error: declaration expected, not `:`
+fail_compilation/test17284.d(12): Error: unrecognized declaration
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=17284
+
+class C { }
+union U { C c; int i; }
+
+@safe void func(T)(T t)
+{
+ t.c = new C;
+}
+
+pragma(msg, typeof(func!U));
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17380spec.d b/gcc/testsuite/gdc.test/fail_compilation/test17380spec.d
new file mode 100644
index 0000000..2456a59
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17380spec.d
@@ -0,0 +1,23 @@
+/* REQUIRED_ARGS: -verrors=spec
+TEST_OUTPUT:
+---
+(spec:1) fail_compilation/test17380spec.d(14): Error: cannot resolve identifier `ThisTypeDoesNotExistAndCrashesTheCompiler`
+(spec:1) fail_compilation/test17380spec.d(14): Error: no property `ThisTypeDoesNotExistAndCrashesTheCompiler` for type `test17380spec.Uint128`
+fail_compilation/test17380spec.d(14): Error: undefined identifier `ThisTypeDoesNotExistAndCrashesTheCompiler`
+---
+ */
+
+struct Int128
+{
+ Uint128 opCast()
+ {
+ return ThisTypeDoesNotExistAndCrashesTheCompiler;
+ }
+ alias opCast this;
+}
+
+struct Uint128
+{
+ Int128 opCast() { return Int128.init; }
+ alias opCast this;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17422.d b/gcc/testsuite/gdc.test/fail_compilation/test17422.d
index 4d203cb..7bb1315 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test17422.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17422.d
@@ -1,5 +1,5 @@
/*
-REQUIRED_ARGS: -dip1000
+REQUIRED_ARGS: -preview=dip1000
TEST_OUTPUT:
---
fail_compilation/test17422.d(23): Error: scope variable `p` may not be returned
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17423.d b/gcc/testsuite/gdc.test/fail_compilation/test17423.d
new file mode 100644
index 0000000..66a81c3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17423.d
@@ -0,0 +1,29 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/test17423.d(26): Error: reference to local `this` assigned to non-scope parameter `dlg` calling test17423.Bar.opApply
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=17423
+
+struct Bar
+{
+ int delegate(int) @safe myDlg;
+
+ auto opApply(int delegate(int) @safe dlg) @safe {
+ myDlg = dlg;
+ return 0;
+ }
+}
+
+struct Foo
+{
+ Bar o;
+ int i = 3;
+
+ this(int x) @safe {
+ foreach(_; o) { i = 0; }
+ i = x;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17425.d b/gcc/testsuite/gdc.test/fail_compilation/test17425.d
index f7628b8..77c4956 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test17425.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17425.d
@@ -1,7 +1,7 @@
/* TEST_OUTPUT:
---
fail_compilation/test17425.d(24): Error: parameter index must be in range 0..4 not 4
-fail_compilation/test17425.d(27): Error: first argument to `__traits(getParameterStorageClasses, i, 4)` is not a function
+fail_compilation/test17425.d(27): Error: first argument to `__traits(getParameterStorageClasses, i, 4)` is not a function or a function call
fail_compilation/test17425.d(29): Error: expression expected as second argument of `__traits(getParameterStorageClasses, foo, int)`
fail_compilation/test17425.d(31): Error: expected 2 arguments for `getParameterStorageClasses` but had 3
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17450.d b/gcc/testsuite/gdc.test/fail_compilation/test17450.d
index 58a5c7d..6d0e25a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test17450.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17450.d
@@ -1,9 +1,11 @@
/*
-REQUIRED_ARGS: -dip1000 -dip25
+REQUIRED_ARGS: -preview=dip1000
TEST_OUTPUT:
---
-fail_compilation/test17450.d(15): Error: returning `&s.bar` escapes a reference to parameter `s`, perhaps annotate with `return`
-fail_compilation/test17450.d(18): Error: returning `&this.bar` escapes a reference to parameter `this`, perhaps annotate with `return`
+fail_compilation/test17450.d(17): Error: returning `&s.bar` escapes a reference to parameter `s`
+fail_compilation/test17450.d(17): perhaps annotate the parameter with `return`
+fail_compilation/test17450.d(20): Error: returning `&this.bar` escapes a reference to parameter `this`
+fail_compilation/test17450.d(20): perhaps annotate the parameter with `return`
---
*/
// https://issues.dlang.org/show_bug.cgi?id=17450
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17451.d b/gcc/testsuite/gdc.test/fail_compilation/test17451.d
index fc2f2d2..a7ef88a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test17451.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17451.d
@@ -1,9 +1,9 @@
/* TEST_OUTPUT:
---
fail_compilation/test17451.d(22): Error: undefined identifier `allocator`
-fail_compilation/test17451.d(23): Error: `long` has no effect in expression `false`
-fail_compilation/test17451.d(30): Error: variable test17451.HashMap!(ThreadSlot).HashMap.__lambda2.v size of type ThreadSlot is invalid
-fail_compilation/test17451.d(44): Error: template instance test17451.HashMap!(ThreadSlot) error instantiating
+fail_compilation/test17451.d(23): Error: `false` has no effect
+fail_compilation/test17451.d(30): Error: variable `test17451.HashMap!(ThreadSlot).HashMap.__lambda2.v` size of type `ThreadSlot` is invalid
+fail_compilation/test17451.d(44): Error: template instance `test17451.HashMap!(ThreadSlot)` error instantiating
---
*/
@@ -20,7 +20,7 @@ struct ArraySet(Key)
~this()
{
try allocator;
- catch false; // should never happen
+ catch (Exception e) false; // should never happen
}
}
@@ -40,6 +40,6 @@ struct ThreadSlot {
ArraySet!Task tasks;
}
-class Libevent2ManualEvent {
+class Libevent2ManualEvent : ManualEvent {
HashMap!ThreadSlot m_waiters;
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17586.d b/gcc/testsuite/gdc.test/fail_compilation/test17586.d
new file mode 100644
index 0000000..fcfb7b7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17586.d
@@ -0,0 +1,14 @@
+/* REQUIRED_ARGS: -o- -de
+TEST_OUTPUT:
+---
+fail_compilation/test17586.d(13): Deprecation: `test17586.D.foo` is overriding the deprecated method `test17586.C.foo`
+---
+*/
+
+class C{
+ deprecated void foo(){}
+}
+
+class D : C{
+ override void foo(){}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17868.d b/gcc/testsuite/gdc.test/fail_compilation/test17868.d
new file mode 100644
index 0000000..4e55c2a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17868.d
@@ -0,0 +1,24 @@
+/*
+TEST_OUTPUT:
+----
+fail_compilation/test17868.d(10): Error: pragma `crt_constructor` takes no argument
+fail_compilation/test17868.d(11): Error: pragma `crt_constructor` takes no argument
+fail_compilation/test17868.d(12): Error: pragma `crt_constructor` takes no argument
+fail_compilation/test17868.d(13): Error: pragma `crt_constructor` takes no argument
+----
+ */
+pragma(crt_constructor, ctfe())
+pragma(crt_constructor, 1.5f)
+pragma(crt_constructor, "foobar")
+pragma(crt_constructor, S())
+void foo()
+{
+}
+
+int ctfe()
+{
+ __gshared int val;
+ return val;
+}
+
+struct S {}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17868b.d b/gcc/testsuite/gdc.test/fail_compilation/test17868b.d
new file mode 100644
index 0000000..7833b61
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17868b.d
@@ -0,0 +1,16 @@
+/*
+TEST_OUTPUT:
+----
+fail_compilation/test17868b.d(9): Error: pragma `crt_constructor` can only apply to a single declaration
+fail_compilation/test17868b.d(10): Error: function `test17868b.foo` must be `extern(C)` for `pragma(crt_constructor)`
+fail_compilation/test17868b.d(14): Error: function `test17868b.bar` must be `extern(C)` for `pragma(crt_constructor)`
+----
+ */
+pragma(crt_constructor):
+void foo()
+{
+}
+
+void bar()
+{
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17892.d b/gcc/testsuite/gdc.test/fail_compilation/test17892.d
new file mode 100644
index 0000000..aaa7ad3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17892.d
@@ -0,0 +1,32 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/test17892.d(27): Error: returning `s.pointer1()` escapes a reference to local variable `s`
+fail_compilation/test17892.d(29): Error: returning `s.pointer2()` escapes a reference to local variable `s`
+fail_compilation/test17892.d(31): Error: returning `s.pointer3()` escapes a reference to local variable `s`
+---
+*/
+
+
+// https://issues.dlang.org/show_bug.cgi?id=17892
+
+struct S
+{
+ @safe:
+ int x;
+ int[1] y;
+ auto pointer1() return { return &x; }
+ auto pointer2() return { return &y[0]; }
+ auto pointer3() return { return &y[0..1][0]; }
+}
+
+@safe int* testPointer(int b)
+{
+ S s;
+ if (b == 1)
+ return s.pointer1();
+ else if (b == 2)
+ return s.pointer2();
+ else
+ return s.pointer3();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17959.d b/gcc/testsuite/gdc.test/fail_compilation/test17959.d
new file mode 100644
index 0000000..cd2216f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17959.d
@@ -0,0 +1,21 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/test17959.d(18): Error: scope variable `this` assigned to non-scope `this.escape`
+fail_compilation/test17959.d(19): Error: scope variable `this` assigned to non-scope `this.f`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=17959
+
+class Foo
+{
+ void delegate () @safe escape;
+ Foo f;
+
+ void escfoo() @safe scope
+ {
+ this.escape = &this.escfoo;
+ f = this;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17977.d b/gcc/testsuite/gdc.test/fail_compilation/test17977.d
new file mode 100644
index 0000000..ff6bc1c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test17977.d
@@ -0,0 +1,20 @@
+/*
+https://issues.dlang.org/show_bug.cgi?id=15399
+REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/test17977.d(19): Error: address of variable `__slList3` assigned to `elem` with longer lifetime
+---
+*/
+
+@safe:
+struct List {
+ int* data;
+ ~this();
+ int* front() return;
+}
+
+void test()
+{
+ auto elem = List().front;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18130.d b/gcc/testsuite/gdc.test/fail_compilation/test18130.d
new file mode 100644
index 0000000..4309a6b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18130.d
@@ -0,0 +1,10 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test18130.d(8): Error: variable `test18130.foo.v` Zero-length `out` parameters are not allowed.
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=18130
+void foo(out byte[0] v)
+{
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18282.d b/gcc/testsuite/gdc.test/fail_compilation/test18282.d
new file mode 100644
index 0000000..b853801
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18282.d
@@ -0,0 +1,89 @@
+/* REQUIRED_ARGS: -preview=dip1000
+ TEST_OUTPUT:
+---
+fail_compilation/test18282.d(25): Error: scope variable `aa` may not be returned
+fail_compilation/test18282.d(34): Error: copying `& i` into allocated memory escapes a reference to local variable `i`
+fail_compilation/test18282.d(35): Error: copying `& i` into allocated memory escapes a reference to local variable `i`
+fail_compilation/test18282.d(36): Error: scope variable `staa` may not be returned
+fail_compilation/test18282.d(44): Error: copying `S2000(& i)` into allocated memory escapes a reference to local variable `i`
+fail_compilation/test18282.d(53): Error: copying `& i` into allocated memory escapes a reference to local variable `i`
+fail_compilation/test18282.d(53): Error: copying `& c` into allocated memory escapes a reference to local variable `c`
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=18282
+
+string* f() @safe
+{
+ scope string*[] ls;
+ return ls[0];
+}
+
+int* g() @safe
+{
+ scope int*[3] aa;
+ return aa[0];
+}
+
+@safe:
+
+auto bar1()
+{
+ int i = void;
+ int*[1] staa = [ &i ];
+ auto dyna = [ &i ];
+ int*[ ] dynb = [ &i ];
+ return staa[0];
+}
+
+struct S2000 { int* p; }
+
+S2000 bar2()
+{
+ int i;
+ S2000[] arr = [ S2000(&i) ];
+ return arr[0];
+}
+
+
+void bar3()
+{
+ int i;
+ char c;
+ char*[int*] aa = [ &i : &c ];
+}
+
+
+/******************************
+TEST_OUTPUT:
+---
+fail_compilation/test18282.d(1007): Error: copying `& foo` into allocated memory escapes a reference to local variable `foo`
+fail_compilation/test18282.d(1008): Error: copying `& foo` into allocated memory escapes a reference to local variable `foo`
+fail_compilation/test18282.d(1009): Error: copying `& foo` into allocated memory escapes a reference to local variable `foo`
+fail_compilation/test18282.d(1016): Error: copying `&this` into allocated memory escapes a reference to parameter variable `this`
+---
+*/
+
+#line 1000
+
+// https://issues.dlang.org/show_bug.cgi?id=18282
+
+void test18282() @safe
+{
+ string foo = "foo";
+ scope string*[] ls;
+ ls = ls ~ &foo;
+ ls = &foo ~ ls;
+ ls ~= &foo;
+}
+
+struct S
+{
+ auto fun()
+ {
+ arr ~= &this;
+ }
+
+ S*[] arr;
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18385.d b/gcc/testsuite/gdc.test/fail_compilation/test18385.d
new file mode 100644
index 0000000..3f87885
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18385.d
@@ -0,0 +1,31 @@
+/*
+REQUIRED_ARGS: -de
+TEST_OUTPUT:
+---
+fail_compilation/test18385.d(13): Deprecation: function `test18385.foo` cannot overload `extern(C)` function at fail_compilation/test18385.d(12)
+---
+*/
+
+
+extern (C):
+
+void foo(int) { }
+void foo(double) { }
+
+struct S
+{
+ static void foo(int) {}
+ static void foo(double) {}
+}
+
+void foo2(int) { }
+extern(D) void foo2(double) { } // OK as it has a different mangling
+
+void foo3(int) { }
+void foo3(double); // duplicate declarations are allowed
+
+void foo4();
+void foo4() { }
+
+extern(D) void foo5();
+extern(D) void foo5() { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18385b.d b/gcc/testsuite/gdc.test/fail_compilation/test18385b.d
new file mode 100644
index 0000000..f0b9d01
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18385b.d
@@ -0,0 +1,47 @@
+/*
+Previous implementation raised errors for overloads using alias declarations
+because they ignored the actual function name
+
+TEST_OUTPUT:
+---
+fail_compilation/test18385b.d(13): Error: `test18385b.S.foo` called with argument types `(int)` matches both:
+fail_compilation/test18385b.d(8): `test18385b.S.foo(int s)`
+and:
+fail_compilation/test18385b.d(3): `test18385b.foo(int s)`
+fail_compilation/test18385b.d(102): Error: `test18385b.bar` called with argument types `(int)` matches both:
+fail_compilation/test18385b.d(2): `test18385b.bar(int s)`
+and:
+fail_compilation/test18385b.d(3): `test18385b.foo(int s)`
+---
+*/
+#line 1
+
+void bar(int s) {}
+void foo(int s) {}
+alias bar = foo;
+
+struct S
+{
+ void foo(int s) {}
+ alias foo = bar;
+
+ void useEm()
+ {
+ foo(1);
+ }
+}
+
+// False positive in mutex.d when building druntime
+class Mutex
+{
+ this() {}
+ this() shared {}
+ this(Object obj) {}
+}
+
+#line 100
+void main()
+{
+ bar(0);
+ new Mutex();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18480.d b/gcc/testsuite/gdc.test/fail_compilation/test18480.d
new file mode 100644
index 0000000..49f306b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18480.d
@@ -0,0 +1,10 @@
+// REQUIRED_ARGS: -i
+/*
+TEST_OUTPUT:
+---
+fail_compilation/imports/test18480a.d(2): Error: `alias TestTemplate = TestTemplate;` cannot alias itself, use a qualified name to create an overload set
+---
+https://issues.dlang.org/show_bug.cgi?id=18480
+*/
+
+import imports.test18480a : TestTemplate;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18484.d b/gcc/testsuite/gdc.test/fail_compilation/test18484.d
new file mode 100644
index 0000000..678609b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18484.d
@@ -0,0 +1,26 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/test18484.d(19): Error: returning `x.bar()` escapes a reference to local variable `x`
+fail_compilation/test18484.d(24): Error: escaping reference to stack allocated value returned by `S(0)`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=18484
+
+struct S
+{
+ int* bar() return;
+ int i;
+}
+
+int* test1()
+{
+ auto x = S(); return x.bar(); // error
+}
+
+int* test2()
+{
+ return S().bar(); // error
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18554.d b/gcc/testsuite/gdc.test/fail_compilation/test18554.d
new file mode 100644
index 0000000..acbda50
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18554.d
@@ -0,0 +1,24 @@
+/* REQUIRED_ARGS: -preview=dip1000
+EXTRA_FILES: imports/imp18554.d
+TEST_OUTPUT:
+---
+fail_compilation/test18554.d(16): Error: struct `imp18554.S` variable `i` is not accessible from `@safe` code
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=18554
+
+import imports.imp18554;
+
+void test1() @safe
+{
+ S s;
+ s.tupleof[0] = 1;
+}
+
+void test2()
+{
+ S s;
+ s.tupleof[0] = 1;
+}
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18597.d b/gcc/testsuite/gdc.test/fail_compilation/test18597.d
new file mode 100644
index 0000000..66cde58
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18597.d
@@ -0,0 +1,27 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test18597.d(24): Error: field `Unaligned.p` cannot modify misaligned pointers in `@safe` code
+fail_compilation/test18597.d(25): Error: field `Unaligned.p` cannot assign to misaligned pointers in `@safe` code
+fail_compilation/test18597.d(26): Error: field `Unaligned.p` cannot assign to misaligned pointers in `@safe` code
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=18597
+
+@safe:
+
+align(1)
+struct Unaligned
+{
+align(1):
+ ubyte filler;
+ int* p;
+}
+
+void test()
+{
+ Unaligned u;
+ u.p = new int;
+ Unaligned v = Unaligned(0, new int);
+ Unaligned w = { p : new int };
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18607.d b/gcc/testsuite/gdc.test/fail_compilation/test18607.d
new file mode 100644
index 0000000..b3af393
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18607.d
@@ -0,0 +1,18 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test18607.d(10): Error: function `test18607.test!int.test` no `return exp;` or `assert(0);` at end of function
+& test
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=18607
+
+int* test(T...)() pure @safe {
+ L:foreach(_; T) {
+ continue L;
+ return null;
+ }
+}
+
+
+pragma(msg, &test!(int));
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18644.d b/gcc/testsuite/gdc.test/fail_compilation/test18644.d
new file mode 100644
index 0000000..20743ea
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18644.d
@@ -0,0 +1,25 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/test18644.d(15): Error: storing reference to stack allocated value returned by `foo()` into allocated memory causes it to escape
+fail_compilation/test18644.d(16): Error: escaping reference to stack allocated value returned by `foo()`
+fail_compilation/test18644.d(22): Error: escaping reference to stack allocated value returned by `foo()`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=18644
+
+@safe int* test1() {
+ int i;
+ int* foo() { return &i; }
+ int*[] b = [foo()];
+ return foo();
+}
+
+@safe ref int test2() {
+ int i;
+ ref int foo() { return i; }
+ return foo();
+}
+
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18708.d b/gcc/testsuite/gdc.test/fail_compilation/test18708.d
new file mode 100644
index 0000000..5c6f162
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18708.d
@@ -0,0 +1,64 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test18708.d(24): Error: one path skips field `s`
+fail_compilation/test18708.d(29): Error: one path skips field `s`
+fail_compilation/test18708.d(34): Error: one path skips field `s`
+fail_compilation/test18708.d(39): Error: one path skips field `s`
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=18708
+
+struct S { int y; @disable this(); }
+
+class C
+{
+ S s;
+
+ this(S t)
+ {
+ if (bar(s = t)) foo(); // OK
+ }
+
+ this(S t, int i)
+ {
+ i || bar(s = t);
+ }
+
+ this(S t, int i, int j)
+ {
+ i && bar(s = t);
+ }
+
+ this(S t, int i, long j)
+ {
+ i ? bar(s = t) : i;
+ }
+
+ this(S t, int i, byte j)
+ {
+ i ? i : bar(s = t);
+ }
+}
+
+int bar(S s);
+int foo();
+
+/***********************************/
+
+class E : Exception
+{
+ this(string msg, int line = 0, int pos = 0) pure nothrow @safe
+ {
+ if (line)
+ super("hello");
+ else
+ super(msg);
+ }
+
+ this(string msg, string file, size_t line) pure nothrow @safe
+ {
+ super(msg, file, line);
+ }
+}
+
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18736.d b/gcc/testsuite/gdc.test/fail_compilation/test18736.d
new file mode 100644
index 0000000..36c5fd8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18736.d
@@ -0,0 +1,23 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test18736.d(21): Error: constructor calls not allowed in loops or after labels
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=18736
+
+class A
+{
+ this(char c) { }
+
+ this(int i)
+ {
+ switch (i)
+ {
+ case 1: break;
+ case 2: .. case 4: break;
+ default: break;
+ }
+ this('c');
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test19097.d b/gcc/testsuite/gdc.test/fail_compilation/test19097.d
new file mode 100644
index 0000000..b5560f0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test19097.d
@@ -0,0 +1,56 @@
+/* REQUIRED_ARGS: -preview=dip1000
+ * TEST_OUTPUT:
+---
+fail_compilation/test19097.d(35): Error: scope variable `s` may not be returned
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=19097
+
+@safe:
+
+void betty(ref scope int* r, return scope int* p)
+{
+ r = p;
+}
+
+void freddy(out scope int* r, return scope int* p)
+{
+ r = p;
+}
+
+struct S
+{
+ int* a;
+ this(return scope int* b) scope { a = b; }
+
+ int* c;
+ void mem(return scope int* d) scope { c = d; }
+}
+
+S thorin()
+{
+ int i;
+ S s = S(&i); // should infer scope for s
+ return s; // so this should error
+}
+
+/************************/
+
+struct S2(T)
+{
+ int* p;
+
+ void silent(lazy void dg);
+
+ void foo()
+ {
+ char[] name;
+ silent(name = parseType());
+ }
+
+ char[] parseType(char[] name = null);
+}
+
+S2!int s2;
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test19107.d b/gcc/testsuite/gdc.test/fail_compilation/test19107.d
new file mode 100644
index 0000000..98858b4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test19107.d
@@ -0,0 +1,25 @@
+/*
+EXTRA_FILES: imports/imp19661.d imports/test19107a.d imports/test19107b.d
+TEST_OUTPUT:
+---
+fail_compilation/test19107.d(24): Error: template `test19107.all` cannot deduce function from argument types `!((c) => c)(string[])`
+fail_compilation/test19107.d(18): Candidate is: `all(alias pred, T)(T t)`
+ with `pred = __lambda2,
+ T = string[]`
+ must satisfy the following constraint:
+` is(typeof(I!pred(t)))`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=19107
+
+import imports.test19107b;
+
+void all(alias pred, T)(T t)
+ if (is(typeof(I!pred(t))))
+{ }
+
+void main(string[] args)
+{
+ args.all!(c => c);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test19112.d b/gcc/testsuite/gdc.test/fail_compilation/test19112.d
new file mode 100644
index 0000000..f5bd403
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test19112.d
@@ -0,0 +1,16 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test19112.d(13): Error: cannot implicitly convert expression `[123, 456]` of type `int[]` to `int[1]`
+fail_compilation/test19112.d(15): Error: cannot implicitly convert expression `a` of type `int[]` to `int[1]`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=19112
+
+void main()
+{
+ int[int[1]] aa;
+ int* p = [123, 456] in aa;
+ int[] a;
+ p = a in aa;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test19176.d b/gcc/testsuite/gdc.test/fail_compilation/test19176.d
new file mode 100644
index 0000000..ceceb74
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test19176.d
@@ -0,0 +1,26 @@
+/*
+REQUIRED_ARGS: -unittest
+TEST_OUTPUT:
+---
+fail_compilation/test19176.d(13): Error: argument `foo()` to __traits(getUnitTests) must be a module or aggregate, not a template
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=19176
+
+void main()
+{
+ __traits(getUnitTests, foo);
+}
+
+template foo()
+{
+ static if(true)
+ {
+ enum bar;
+ }
+ else
+ {
+ enum bar;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test19193.d b/gcc/testsuite/gdc.test/fail_compilation/test19193.d
new file mode 100644
index 0000000..9022776
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test19193.d
@@ -0,0 +1,22 @@
+/*
+REQUIRED_ARGS: -de
+TEST_OUTPUT
+---
+fail_compilation/test19193.d(13): Deprecation: enum member `test19193.T19193!int.A.b` is deprecated
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=19193
+
+void main ()
+{
+ cast(void)T19193!int.A.b;
+}
+
+template T19193(T)
+{
+ enum A
+ {
+ deprecated b
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test19473.d b/gcc/testsuite/gdc.test/fail_compilation/test19473.d
new file mode 100644
index 0000000..ba6024b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test19473.d
@@ -0,0 +1,31 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test19473.d(14): Error: union `test19473.P` no size because of forward reference
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=19473
+
+struct A {
+ P p;
+
+ struct UTpl() {
+ union {
+ P p;
+ }
+ }
+
+ alias U = UTpl!();
+}
+
+alias B = A.U;
+
+struct C {
+ union D {
+ B b;
+ }
+}
+
+union P {
+ C.D p;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test19646.d b/gcc/testsuite/gdc.test/fail_compilation/test19646.d
new file mode 100644
index 0000000..ee0b042
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test19646.d
@@ -0,0 +1,11 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test19646.d(11): Error: cast from `const(int)*` to `int*` not allowed in safe code
+---
+https://issues.dlang.org/show_bug.cgi?id=19646
+ */
+
+@safe:
+
+const x = 42;
+int* y = cast(int*)&x;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test19661.d b/gcc/testsuite/gdc.test/fail_compilation/test19661.d
new file mode 100644
index 0000000..369c0a8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test19661.d
@@ -0,0 +1,18 @@
+/*
+EXTRA_FILES: imports/imp19661.d
+TEST_OUTPUT:
+---
+fail_compilation/test19661.d(11): Error: variables cannot be initialized with an expression of type `void`. Use `void` initialization instead.
+---
+*/
+
+module ice19661;
+
+immutable bool testModule = testFunctionMembers!();
+
+void testFunctionMembers()() {
+ import imports.imp19661 : isFunction;
+ foreach(member; __traits(allMembers, ice19661)) {
+ bool b = isFunction!(__traits(getMember, ice19661, member));
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test19971.d b/gcc/testsuite/gdc.test/fail_compilation/test19971.d
new file mode 100644
index 0000000..f854362
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test19971.d
@@ -0,0 +1,17 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test19971.d(15): Error: function `test19971.f(int x)` is not callable using argument types `(string)`
+fail_compilation/test19971.d(15): cannot pass argument `"%s"` of type `string` to parameter `int x`
+fail_compilation/test19971.d(16): Error: function literal `__lambda1(int x)` is not callable using argument types `(string)`
+fail_compilation/test19971.d(16): cannot pass argument `"%s"` of type `string` to parameter `int x`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=19971
+
+void f(int x) {}
+void main()
+{
+ f("%s");
+ (int x) {} ("%s");
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20023.d b/gcc/testsuite/gdc.test/fail_compilation/test20023.d
new file mode 100644
index 0000000..909e699
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20023.d
@@ -0,0 +1,16 @@
+// REQUIRED_ARGS: -preview=dip1000 -preview=dip1008 -Ifail_compilation/extra-files
+// https://issues.dlang.org/show_bug.cgi?id=20023
+/*
+TEST_OUTPUT:
+---
+fail_compilation/imports/test20023b.d(8): Error: scope variable `e` may not be returned
+fail_compilation/test20023.d(15): Error: template instance `imports.test20023b.threw!()` error instantiating
+---
+*/
+import imports.test20023b;
+
+@safe:
+void main()
+{
+ threw!()();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20096.d b/gcc/testsuite/gdc.test/fail_compilation/test20096.d
new file mode 100644
index 0000000..159efc0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20096.d
@@ -0,0 +1,28 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test20096.d(15): Error: cannot `goto` into `try` block
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=20096
+
+void test()
+{
+ int x;
+
+ try {
+ L2:
+ goto L1;
+
+ try
+ {
+ L1:
+ ++x;
+ goto L2;
+ }
+ finally
+ {
+ ++x;
+ }
+ } finally {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20149.d b/gcc/testsuite/gdc.test/fail_compilation/test20149.d
new file mode 100644
index 0000000..af99a59
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20149.d
@@ -0,0 +1,34 @@
+/* REQUIRED_ARGS: -preview=dip1000
+ * TEST_OUTPUT:
+---
+fail_compilation/test20149.d(28): Error: escaping reference to stack allocated value returned by `S('\xff').this(1)`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=20149#c10
+
+@safe:
+
+struct S
+{
+ this(int){ }
+
+ char[] opSlice() return
+ {
+ return buf[];
+ }
+
+ char[4] buf;
+}
+
+S bar();
+
+char[] fun()
+{
+ return S(1)[];
+}
+
+void main()
+{
+ auto x = fun();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20245.d b/gcc/testsuite/gdc.test/fail_compilation/test20245.d
new file mode 100644
index 0000000..24a6f99
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20245.d
@@ -0,0 +1,43 @@
+/*
+REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/test20245.d(14): Error: scope variable `a` may not be returned
+fail_compilation/test20245.d(18): Error: cannot take address of `scope` parameter `x` in `@safe` function `foo`
+fail_compilation/test20245.d(33): Error: reference to local variable `price` assigned to non-scope `this.minPrice`
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=20245
+@safe int* foo(ref int x) {
+ int* a = &x;
+ return a;
+}
+
+@safe int** foo(ref scope int* x) {
+ int** a = &x;
+ return a;
+}
+
+@safe int* foo(return ref int x) {
+ int* a = &x;
+ return a;
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=21212
+class MinPointerRecorder
+{
+ int* minPrice;
+ void update(ref int price) @safe
+ {
+ minPrice = &price; // Should not compile.
+ }
+}
+
+void main() @safe
+{
+ auto r = new MinPointerRecorder;
+ () { int mp = 42; r.update(mp); } ();
+ () { ulong[1000] stomp = 13; } ();
+ auto x = *r.minPrice; // "13"
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20267.d b/gcc/testsuite/gdc.test/fail_compilation/test20267.d
new file mode 100644
index 0000000..996980a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20267.d
@@ -0,0 +1,31 @@
+/*
+EXTRA_FILES: imports/test20267.d
+TEST_OUTPUT:
+---
+fail_compilation/test20267.d(20): Error: variable `string` is used as a type
+fail_compilation/test20267.d(19): variable `string` is declared here
+fail_compilation/test20267.d(23): Error: variable `boolean` is used as a type
+fail_compilation/test20267.d(22): variable `boolean` is declared here
+fail_compilation/test20267.d(30): Error: variable `array` is used as a type
+fail_compilation/test20267.d(28): variable `array` is imported here from: `imports.test20267`
+fail_compilation/imports/test20267.d(3): variable `array` is declared here
+---
+*/
+
+alias boolean = bool;
+
+void foo(string[] args)
+{
+ immutable string = "bar";
+ string[] args2 = args;
+
+ bool boolean = true;
+ boolean b = false;
+}
+
+void bar()
+{
+ import imports.test20267 : array;
+
+ array foo;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20324.d b/gcc/testsuite/gdc.test/fail_compilation/test20324.d
new file mode 100644
index 0000000..c38e348
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20324.d
@@ -0,0 +1,16 @@
+/*
+REQUIRED_ARGS: -unittest
+TEST_OUTPUT:
+---
+fail_compilation/test20324.d(16): Error: argument `Test()` to __traits(getUnitTests) must be a module or aggregate, not a template
+fail_compilation/test20324.d(16): while evaluating `pragma(msg, __traits(getUnitTests, Test))`
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=20324
+
+template Test() {
+ unittest {
+ }
+}
+
+pragma(msg, __traits(getUnitTests, Test));
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20383.d b/gcc/testsuite/gdc.test/fail_compilation/test20383.d
new file mode 100644
index 0000000..88c56ee
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20383.d
@@ -0,0 +1,13 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test20383.d(11): Error: invalid array operation `cast(int[])data[] & [42]` (possible missing [])
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=20383
+
+ubyte[1] ice(ubyte[1] data)
+{
+ ubyte[1] result = data[] & [42];
+ return result;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20515.d b/gcc/testsuite/gdc.test/fail_compilation/test20515.d
new file mode 100644
index 0000000..cf4bbde
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20515.d
@@ -0,0 +1,18 @@
+// REQUIRED_ARGS: -verror-style=gnu
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test20515.d:16: Deprecation: function `test20515.foo` is deprecated
+fail_compilation/test20515.d:17: Error: undefined identifier `bar`
+---
+*/
+
+module test20515;
+
+deprecated void foo() { }
+
+void test()
+{
+ foo;
+ bar;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20549.d b/gcc/testsuite/gdc.test/fail_compilation/test20549.d
new file mode 100644
index 0000000..2cafc1b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20549.d
@@ -0,0 +1,12 @@
+/*
+TEST_OUTPUT:
+----
+fail_compilation/test20549.d(12): Error: variable `test.__a_field_0` variables cannot be of type `void`
+----
+*/
+
+module test;
+
+alias AliasSeq(T...) = T;
+
+enum a = AliasSeq!test;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20565.d b/gcc/testsuite/gdc.test/fail_compilation/test20565.d
new file mode 100644
index 0000000..5f21675
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20565.d
@@ -0,0 +1,19 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test20565.d(107): Error: function `test20565.test.box` the same declaration cannot be in multiple scopes with non-D linkage
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=20565
+
+#line 100
+
+void test()
+{
+ {
+ extern (C++) int box() { return 3; }
+ }
+ {
+ extern (C++) int box() { return 4; }
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20569.d b/gcc/testsuite/gdc.test/fail_compilation/test20569.d
new file mode 100644
index 0000000..a5ac98b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20569.d
@@ -0,0 +1,24 @@
+/* REQUIRED_ARGS: -preview=dip1000
+ TEST_OUTPUT:
+---
+fail_compilation/test20569.d(19): Error: cannot take address of `scope` local `s1` in `@safe` function `main`
+fail_compilation/test20569.d(23): Error: cannot take address of `scope` local `s2` in `@safe` function `main`
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=20569
+
+struct S
+{
+ int* pointer;
+}
+
+void main() @safe
+{
+ scope S s1;
+ scope int** p1 = &s1.pointer;
+
+ int x;
+ S s2 = S(&x);
+ auto p2 = &s2.pointer;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20610.d b/gcc/testsuite/gdc.test/fail_compilation/test20610.d
new file mode 100644
index 0000000..9bdeb20
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20610.d
@@ -0,0 +1,22 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test20610.d(20): Error: cannot modify `const` expression `field`
+---
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=20610
+
+struct S
+{
+ int what;
+}
+
+void main()
+{
+ S record;
+
+ foreach (const ref field; record.tupleof)
+ {
+ field = 10;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20626.d b/gcc/testsuite/gdc.test/fail_compilation/test20626.d
new file mode 100644
index 0000000..bd0bed8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20626.d
@@ -0,0 +1,22 @@
+/*
+REQUIRED_ARGS: -check=invariant=off
+TEST_OUTPUT:
+----
+fail_compilation/test20626.d(2): Error: expression `__unittest_L1_C1` has no type
+_error_
+const void()
+----
+
+https://issues.dlang.org/show_bug.cgi?id=20626
+*/
+
+#line 1
+unittest {}
+pragma(msg, typeof(__unittest_L1_C1));
+
+struct S
+{
+ invariant {}
+}
+
+pragma(msg, typeof(S.init.__invariant1));
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20696.d b/gcc/testsuite/gdc.test/fail_compilation/test20696.d
new file mode 100644
index 0000000..7cb96e5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20696.d
@@ -0,0 +1,21 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test20696.d(106): Error: function `test20696.S!().S.test` cannot retrieve its `.mangleof` while inferring attributes
+fail_compilation/test20696.d(106): while evaluating `pragma(msg, test.mangleof)`
+fail_compilation/test20696.d(111): Error: template instance `test20696.S!()` error instantiating
+---
+*/
+
+#line 100
+
+// https://issues.dlang.org/show_bug.cgi?id=20696
+
+struct S()
+{
+ int test() {
+ pragma(msg, test.mangleof);
+ return 3;
+ }
+}
+
+S!() s;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20719.d b/gcc/testsuite/gdc.test/fail_compilation/test20719.d
new file mode 100644
index 0000000..44d3d5a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20719.d
@@ -0,0 +1,32 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test20719.d(13): Error: struct `test20719.SumType` no size because of forward reference
+fail_compilation/test20719.d(32): Error: variable `test20719.isCopyable!(SumType).__lambda2.foo` size of type `SumType` is invalid
+fail_compilation/test20719.d(18): Error: template instance `test20719.isCopyable!(SumType)` error instantiating
+---
+*/
+struct SumType
+{
+ alias Types = AliasSeq!(typeof(this));
+ union Storage
+ {
+ Types[0] t;
+ }
+
+ Storage storage;
+
+ static if (isCopyable!(Types[0])) {}
+ static if (isAssignable!(Types[0])) {}
+}
+
+alias AliasSeq(TList...) = TList;
+
+enum isAssignable(Rhs) = __traits(compiles, lvalueOf = rvalueOf!Rhs);
+
+struct __InoutWorkaroundStruct {}
+
+T rvalueOf(T)();
+
+T lvalueOf()(__InoutWorkaroundStruct);
+
+enum isCopyable(S) = { S foo; };
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20998.d b/gcc/testsuite/gdc.test/fail_compilation/test20998.d
new file mode 100644
index 0000000..16eb026
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test20998.d
@@ -0,0 +1,120 @@
+// https://issues.dlang.org/show_bug.cgi?id=20998
+/*
+REQUIRED_ARGS: -verrors=context
+TEST_OUTPUT:
+---
+fail_compilation/test20998.d(76): Error: undefined identifier `invalid`
+X x = { invalid, 2, "asd" };
+ ^
+fail_compilation/test20998.d(76): Error: too many initializers for `X`
+X x = { invalid, 2, "asd" };
+ ^
+fail_compilation/test20998.d(83): Error: cannot implicitly convert expression `"a"` of type `string` to `int`
+X2 x2 = { ptr: null, "a", ptr: 2, 444 };
+ ^
+fail_compilation/test20998.d(83): Error: duplicate initializer for field `ptr`
+X2 x2 = { ptr: null, "a", ptr: 2, 444 };
+ ^
+fail_compilation/test20998.d(83): Error: too many initializers for `X2`
+X2 x2 = { ptr: null, "a", ptr: 2, 444 };
+ ^
+fail_compilation/test20998.d(90): Error: overlapping initialization for field `ptr` and `x`
+X3 x3 = { ptr: null, "a", ptr: 2, 444 };
+ ^
+fail_compilation/test20998.d(90): Error: cannot implicitly convert expression `"a"` of type `string` to `int`
+X3 x3 = { ptr: null, "a", ptr: 2, 444 };
+ ^
+fail_compilation/test20998.d(90): Error: duplicate initializer for field `ptr`
+X3 x3 = { ptr: null, "a", ptr: 2, 444 };
+ ^
+fail_compilation/test20998.d(90): Error: too many initializers for `X3`
+X3 x3 = { ptr: null, "a", ptr: 2, 444 };
+ ^
+fail_compilation/test20998.d(98): Error: field `X4.ptr` cannot assign to misaligned pointers in `@safe` code
+ X4 x4 = { ptr: null, "a", 444, ptr: 2, true };
+ ^
+fail_compilation/test20998.d(98): Error: cannot implicitly convert expression `"a"` of type `string` to `int`
+ X4 x4 = { ptr: null, "a", 444, ptr: 2, true };
+ ^
+fail_compilation/test20998.d(98): Error: too many initializers for `X4`
+ X4 x4 = { ptr: null, "a", 444, ptr: 2, true };
+ ^
+fail_compilation/test20998.d(102): called from here: `test()`
+auto e = test();
+ ^
+fail_compilation/test20998.d(104): Error: cannot implicitly convert expression `1` of type `int` to `void*`
+X2 a5 = { ptr: 1, ptr: 2, ptr: 444, ptr: 555 };
+ ^
+fail_compilation/test20998.d(104): Error: duplicate initializer for field `ptr`
+X2 a5 = { ptr: 1, ptr: 2, ptr: 444, ptr: 555 };
+ ^
+fail_compilation/test20998.d(104): Error: duplicate initializer for field `ptr`
+X2 a5 = { ptr: 1, ptr: 2, ptr: 444, ptr: 555 };
+ ^
+fail_compilation/test20998.d(104): Error: too many initializers for `X2`
+X2 a5 = { ptr: 1, ptr: 2, ptr: 444, ptr: 555 };
+ ^
+fail_compilation/test20998.d(107): Error: too many initializers for `X2`
+X2 c6 = { null, 2, true, null };
+ ^
+fail_compilation/test20998.d(116): Error: cannot implicitly convert expression `1` of type `int` to `immutable(char*)`
+ immutable Struct iStruct = {1, &ch};
+ ^
+fail_compilation/test20998.d(116): Error: too many initializers for `Struct`
+ immutable Struct iStruct = {1, &ch};
+ ^
+fail_compilation/test20998.d(120): called from here: `test2()`
+auto t = test2();
+ ^
+---
+*/
+
+struct X {
+ void* ptr;
+ int x;
+}
+X x = { invalid, 2, "asd" };
+
+struct X2 {
+ void* ptr;
+ int x;
+ bool y;
+}
+X2 x2 = { ptr: null, "a", ptr: 2, 444 };
+
+union X3 {
+ void* ptr;
+ int x;
+ bool y;
+}
+X3 x3 = { ptr: null, "a", ptr: 2, 444 };
+
+int test() @safe
+{
+ align (1) struct X4 {
+ void* ptr;
+ int x;
+ }
+ X4 x4 = { ptr: null, "a", 444, ptr: 2, true };
+ return 0;
+}
+
+auto e = test();
+
+X2 a5 = { ptr: 1, ptr: 2, ptr: 444, ptr: 555 };
+X2 b5 = { ptr: null, y: true };
+X2 c5 = { x: 2, true, ptr: null };
+X2 c6 = { null, 2, true, null };
+
+struct Struct {
+ char* chptr;
+}
+
+int test2()
+{
+ char ch = 'd';
+ immutable Struct iStruct = {1, &ch};
+ return 0;
+}
+
+auto t = test2();
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21093.d b/gcc/testsuite/gdc.test/fail_compilation/test21093.d
new file mode 100644
index 0000000..b85d0c3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21093.d
@@ -0,0 +1,56 @@
+// https://issues.dlang.org/show_bug.cgi?id=21093
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test21093.d(24): Error: function `test21093.LocalTime.hasDST` does not override any function
+fail_compilation/test21093.d(32): Error: class `test21093.LocalTime2` cannot implicitly generate a default constructor when base class `test21093.TimeZone2` is missing a default constructor
+fail_compilation/test21093.d(44): Error: function `test21093.LocalTime3.string` does not override any function
+fail_compilation/test21093.d(55): Error: cannot implicitly override base class method `test21093.TimeZone4.hasDST` with `test21093.LocalTime4.hasDST`; add `override` attribute
+---
+*/
+
+void fromUnixTime(immutable TimeZone tz = LocalTime()) { }
+void fromUnixTime(immutable TimeZone2 tz = LocalTime2()) { }
+void fromUnixTime(immutable TimeZone3 tz = LocalTime3()) { }
+void fromUnixTime(immutable TimeZone4 tz = LocalTime4()) { }
+
+class TimeZone
+{
+}
+
+class LocalTime : TimeZone
+{
+ static immutable(LocalTime) opCall() { }
+ override hasDST() { }
+}
+
+class TimeZone2
+{
+ this(string) { }
+}
+
+class LocalTime2 : TimeZone2
+{
+ static immutable(LocalTime2) opCall() { }
+}
+
+class TimeZone3
+{
+}
+
+class LocalTime3 : TimeZone3
+{
+ static immutable(LocalTime3) opCall() { }
+ override string () { }
+}
+
+class TimeZone4
+{
+ bool hasDST();
+}
+
+class LocalTime4 : TimeZone4
+{
+ static immutable(LocalTime4) opCall() { }
+ bool hasDST() { }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21096.d b/gcc/testsuite/gdc.test/fail_compilation/test21096.d
new file mode 100644
index 0000000..e32ad9c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21096.d
@@ -0,0 +1,13 @@
+// https://issues.dlang.org/show_bug.cgi?id=21096
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test21096.d(13): Error: identifier or new keyword expected following `(...)`.
+fail_compilation/test21096.d(13): Error: found `.` when expecting `]`
+fail_compilation/test21096.d(13): Error: no identifier for declarator `char`
+fail_compilation/test21096.d(13): Error: declaration expected, not `]`
+---
+*/
+
+char[(void*).];
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21198.d b/gcc/testsuite/gdc.test/fail_compilation/test21198.d
new file mode 100644
index 0000000..cab6fc8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21198.d
@@ -0,0 +1,24 @@
+// https://issues.dlang.org/show_bug.cgi?id=21198
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test21198.d(23): Error: Generating an `inout` copy constructor for `struct test21198.U` failed, therefore instances of it are uncopyable
+---
+*/
+
+struct S
+{
+ this(ref inout(S) other) inout {}
+}
+
+union U
+{
+ S s;
+}
+
+void fun()
+{
+ U original;
+ U copy = original;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21204.d b/gcc/testsuite/gdc.test/fail_compilation/test21204.d
new file mode 100644
index 0000000..8732cc0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21204.d
@@ -0,0 +1,23 @@
+// https://issues.dlang.org/show_bug.cgi?id=21204
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test21204.d(22): Error: Generating an `inout` copy constructor for `struct test21204.B` failed, therefore instances of it are uncopyable
+---
+*/
+
+struct A
+{
+ this(ref A other) {}
+}
+
+struct B
+{
+ A a;
+}
+
+void example()
+{
+ B b1;
+ B b2 = b1;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21246.d b/gcc/testsuite/gdc.test/fail_compilation/test21246.d
new file mode 100644
index 0000000..02c0b35
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21246.d
@@ -0,0 +1,19 @@
+// https://issues.dlang.org/show_bug.cgi?id=21246
+// EXTRA_FILES: imports/test21246.d
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test21246.d(16): Error: function `void test21246.C.set(Clock clock)` does not override any function, did you mean to override `void imports.test21246.B.set(imports.test21246.Clock clock)`?
+---
+*/
+module test21246;
+
+import imports.test21246;
+
+class Clock { }
+class C : B
+{
+ override void set (Clock clock) { }
+}
+
+void main () { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21259.d b/gcc/testsuite/gdc.test/fail_compilation/test21259.d
new file mode 100644
index 0000000..31dba3d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21259.d
@@ -0,0 +1,52 @@
+// https://issues.dlang.org/show_bug.cgi?id=21259
+// REQUIRED_ARGS: -de
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test21259.d(39): Deprecation: alias `test21259.Foo.width` is deprecated
+fail_compilation/test21259.d(40): Deprecation: alias `test21259.Foo2.width` is deprecated
+fail_compilation/test21259.d(41): Deprecation: variable `test21259.Foo3.bar` is deprecated
+fail_compilation/test21259.d(42): Deprecation: alias `test21259.Foo4.width` is deprecated
+---
+*/
+
+struct Foo
+{
+ int bar;
+ deprecated alias width = bar;
+}
+
+struct Foo2
+{
+ deprecated int bar;
+ deprecated alias width = bar;
+}
+
+struct Foo3
+{
+ deprecated int bar;
+}
+
+struct Foo4
+{
+ int bar;
+deprecated:
+ alias width = bar;
+}
+
+void main()
+{
+ Foo a = { width : 100};
+ Foo2 b = { width : 100};
+ Foo3 c = { bar : 100};
+ Foo4 d = { width : 100};
+}
+
+// deprecations inside a deprecated scope shouldn't be triggered
+deprecated void test()
+{
+ Foo a = { width : 100};
+ Foo2 b = { width : 100};
+ Foo3 c = { bar : 100};
+ Foo4 d = { width : 100};
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21319.d b/gcc/testsuite/gdc.test/fail_compilation/test21319.d
new file mode 100644
index 0000000..7298de2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21319.d
@@ -0,0 +1,12 @@
+// https://issues.dlang.org/show_bug.cgi?id=21319
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test21319.d(11): Error: circular reference to `test21319.C.c`
+---
+*/
+
+class C
+{
+ immutable C c = new C();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21380.d b/gcc/testsuite/gdc.test/fail_compilation/test21380.d
new file mode 100644
index 0000000..6a2da1b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21380.d
@@ -0,0 +1,46 @@
+// https://issues.dlang.org/show_bug.cgi?id=21380
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test21380.d(39): Error: partial template instance `MySerializer().serializeSinkType!int` has no value
+fail_compilation/test21380.d(44): Error: template instance `test21380.SupportSinkTypeSer!(MySerializer!int)` error instantiating
+---
+*/
+
+template isSomeFunction(T...)
+if (T.length == 1)
+{
+ static if (is(typeof(& T[0]) U : U*) && is(U == function) || is(typeof(& T[0]) U == delegate))
+ {
+ // T is a (nested) function symbol.
+ enum bool isSomeFunction = true;
+ }
+ else static if (is(T[0] W) || is(typeof(T[0]) W))
+ {
+ // T is an expression or a type. Take the type of it and examine.
+ static if (is(W F : F*) && is(F == function))
+ enum bool isSomeFunction = true; // function pointer
+ else
+ enum bool isSomeFunction = is(W == function) || is(W == delegate);
+ }
+ else
+ enum bool isSomeFunction = false;
+}
+
+struct MySerializer (T)
+{
+ void serializeSinkType(T2) (scope auto ref T2 record) {}
+}
+
+template SupportSinkTypeSer(SerT)
+{
+ /* Note: Partial template instance because it needs inference, in this case
+ it cannot infer 'auto ref' parameter */
+ enum SupportSinkTypeSer = isSomeFunction!(SerT.init.serializeSinkType!int);
+}
+
+int main()
+{
+ enum x = SupportSinkTypeSer!(MySerializer!int);
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21518.d b/gcc/testsuite/gdc.test/fail_compilation/test21518.d
new file mode 100644
index 0000000..59a9c3c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21518.d
@@ -0,0 +1,38 @@
+/*
+https://issues.dlang.org/show_bug.cgi?id=21518
+TEST_OUTPUT:
+---
+fail_compilation/test21518.d(19): Error: cannot implicitly convert expression `[dg]` of type `const(void delegate() pure nothrow @nogc @system)[]` to `void delegate() @safe[]`
+fail_compilation/test21518.d(23): Error: cannot implicitly convert expression `[dg]` of type `const(void delegate() pure nothrow @nogc @system)[]` to `const(void delegate() @safe)[]`
+fail_compilation/test21518.d(28): Error: cannot implicitly convert expression `sysA` of type `const(void delegate() @system)[]` to `const(void delegate() @safe)[]`
+fail_compilation/test21518.d(31): Error: cannot implicitly convert expression `sysA` of type `const(void delegate() @system)[]` to `const(void delegate() @safe)`
+fail_compilation/test21518.d(32): Error: cannot implicitly convert expression `dg` of type `const(void delegate() pure nothrow @nogc @system)` to `const(void delegate() @safe)`
+---
+*/
+
+void delegates()
+{
+ const dg = delegate() @system { int* p; int x; p = &x; };
+ // pragma(msg, typeof(dg)); // const(void delegate() pure nothrow @nogc @system)
+
+ // Correctly fails
+ void delegate() @safe[] arg2 = [ dg ];
+ void delegate() @system[] arg3 = [ dg ]; // But doesnt break this
+
+ // Previously ignored
+ const(void delegate() @safe)[] arg = [ dg ];
+ // pragma(msg, typeof(arg)); // const(void delegate() @safe)[]
+
+ // Also for variables, not only array literals
+ const(void delegate() @system)[] sysA = [ dg ];
+ const(void delegate() @safe)[] safeA = sysA;
+
+ // Original bug report:
+ func(sysA);
+ func(dg);
+}
+
+void func(const void delegate() @safe [] paramDGs...) @safe
+{
+ if (paramDGs.length > 0) paramDGs[0]();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21665.d b/gcc/testsuite/gdc.test/fail_compilation/test21665.d
new file mode 100644
index 0000000..a3a348d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21665.d
@@ -0,0 +1,31 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test21665.d(18): Error: variable `test21665.test1.s` `void` initializers for structs with invariants are not allowed in safe functions
+fail_compilation/test21665.d(30): Error: field `U.s` cannot access structs with invariants in `@safe` code that overlap other fields
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=21665
+
+struct ShortString {
+ private ubyte length;
+ private char[15] data;
+
+ invariant { assert(length <= data.length); }
+}
+
+@safe void test1() {
+ ShortString s = void;
+}
+
+union U
+{
+ int n;
+ ShortString s;
+}
+
+@safe void test2()
+{
+ U u;
+ u.s.length = 3;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21807.d b/gcc/testsuite/gdc.test/fail_compilation/test21807.d
new file mode 100644
index 0000000..9f56bf7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21807.d
@@ -0,0 +1,54 @@
+/*
+https://issues.dlang.org/show_bug.cgi?id=21807
+
+REQUIRED_ARGS: -de
+TEST_OUTPUT:
+---
+fail_compilation/test21807.d(11): Deprecation: slice of static array temporary returned by `getSArray()` assigned to longer lived variable `this.str`
+fail_compilation/test21807.d(12): Deprecation: slice of static array temporary returned by `getSArray()` assigned to longer lived variable `this.ca`
+---
+*/
+#line 1
+
+char[12] getSArray() pure;
+
+class Foo
+{
+ string str;
+ char[] ca;
+
+ this()
+ {
+ str = getSArray(); // Should probably be a type error
+ ca = getSArray();
+ }
+}
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test21807.d(117): Error: function `test21807.addr(return ref int b)` is not callable using argument types `(int)`
+fail_compilation/test21807.d(117): cannot pass rvalue argument `S(0).i` of type `int` to parameter `return ref int b`
+---
+*/
+#line 100
+
+struct S
+{
+ int i;
+}
+
+int* addr(return ref int b)
+{
+ return &b;
+}
+
+class Foo2
+{
+ int* ptr;
+
+ this()
+ {
+ ptr = addr(S().i); // struct temporary
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21912.d b/gcc/testsuite/gdc.test/fail_compilation/test21912.d
new file mode 100644
index 0000000..8dde98a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21912.d
@@ -0,0 +1,54 @@
+/*
+PERMUTE_ARGS: -preview=dip1000
+TEST_OUTPUT
+---
+fail_compilation/test21912.d(24): Error: function `test21912.escapeParam` is `@nogc` yet allocates closures with the GC
+fail_compilation/test21912.d(26): test21912.escapeParam.__lambda2 closes over variable i at fail_compilation/test21912.d(24)
+fail_compilation/test21912.d(29): Error: function `test21912.escapeAssign` is `@nogc` yet allocates closures with the GC
+fail_compilation/test21912.d(31): test21912.escapeAssign.__lambda3 closes over variable i at fail_compilation/test21912.d(29)
+fail_compilation/test21912.d(40): Error: function `test21912.escapeAssignRef` is `@nogc` yet allocates closures with the GC
+fail_compilation/test21912.d(42): test21912.escapeAssignRef.__lambda3 closes over variable i at fail_compilation/test21912.d(40)
+fail_compilation/test21912.d(51): Error: function `test21912.escapeParamInferred` is `@nogc` yet allocates closures with the GC
+fail_compilation/test21912.d(53): test21912.escapeParamInferred.__lambda2 closes over variable i at fail_compilation/test21912.d(51)
+---
+*/
+@nogc:
+
+alias Dg = @nogc int delegate();
+
+Dg identity(return scope Dg dg)
+{
+ return dg;
+}
+
+Dg escapeParam(int i)
+{
+ return identity(() => i);
+}
+
+Dg escapeAssign(int i, return scope Dg dg)
+{
+ dg = () => i;
+ return dg;
+}
+
+ref Dg identityR(ref return scope Dg dg)
+{
+ return dg;
+}
+
+ref Dg escapeAssignRef(int i, ref return scope Dg dg)
+{
+ dg = () => i;
+ return dg;
+}
+
+auto identityInferred(Dg dg)
+{
+ return dg;
+}
+
+Dg escapeParamInferred(int i)
+{
+ return identityInferred(() => i);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21930.d b/gcc/testsuite/gdc.test/fail_compilation/test21930.d
new file mode 100644
index 0000000..6c93243
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test21930.d
@@ -0,0 +1,27 @@
+// https://issues.dlang.org/show_bug.cgi?id=21930
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test21930.d(21): Error: variable `string` is used as a type
+fail_compilation/test21930.d(15): variable `string` is declared here
+fail_compilation/test21930.d(26): Error: constructor `test21930.R.this(string)` is not callable using argument types `()`
+---
+*/
+
+alias AliasSeq(T...) = T;
+
+alias TP(alias name) = AliasSeq!name;
+
+int string; // 'string' declared as a variable
+
+alias a = TP!(main);
+
+class R
+{
+ this(string) { } // so constructor have errors
+}
+
+@system main()
+{
+ new R;
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test22048.d b/gcc/testsuite/gdc.test/fail_compilation/test22048.d
new file mode 100644
index 0000000..e056068
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test22048.d
@@ -0,0 +1,10 @@
+// https://issues.dlang.org/show_bug.cgi?id=22048
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test22048.d(10): Error: unexpected identifier `p` in declarator
+---
+*/
+
+alias a = int p;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test22227.d b/gcc/testsuite/gdc.test/fail_compilation/test22227.d
new file mode 100644
index 0000000..ecffb69
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test22227.d
@@ -0,0 +1,16 @@
+/* REQUIRED_ARGS: -preview=dip1000
+TEST_OUTPUT:
+---
+fail_compilation/test22227.d(12): Error: scope variable `foo` may not be returned
+fail_compilation/test22227.d(14): Error: scope variable `foo` may not be returned
+---
+*/
+
+int[] foo() @safe
+{
+ if (scope foo = [1])
+ return foo;
+ while (scope foo = [1])
+ return foo;
+ return [];
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test22329.d b/gcc/testsuite/gdc.test/fail_compilation/test22329.d
new file mode 100644
index 0000000..237f9c7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test22329.d
@@ -0,0 +1,21 @@
+// https://issues.dlang.org/show_bug.cgi?id=22329
+// EXTRA_FILES: imports/imp22329.d
+/*
+TEST_OUTPUT:
+---
+fail_compilation/imports/imp22329.d(3): Error: no property `values` for type `test22329.Foo`
+fail_compilation/imports/imp22329.d(3): Error: incompatible types for `(arg) + (1)`: `Foo` and `int`
+fail_compilation/test22329.d(20): Error: template instance `imp22329.func!(Foo)` error instantiating
+---
+*/
+
+public struct Foo {
+ private int values;
+ alias values this;
+}
+
+void main()
+{
+ import imports.imp22329 : func;
+ func(Foo());
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test22361.d b/gcc/testsuite/gdc.test/fail_compilation/test22361.d
new file mode 100644
index 0000000..11255ff
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test22361.d
@@ -0,0 +1,11 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test22361.d(11): Error: unable to read module `this_module_does_not_exist`
+fail_compilation/test22361.d(11): Expected 'this_module_does_not_exist.d' or 'this_module_does_not_exist/package.d' in one of the following import paths:
+import path[0] = fail_compilation
+import path[1] = $p:druntime/import$
+import path[2] = $p:phobos$
+---
+*/
+import this_module_does_not_exist;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test22574.d b/gcc/testsuite/gdc.test/fail_compilation/test22574.d
new file mode 100644
index 0000000..2a7b884
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test22574.d
@@ -0,0 +1,12 @@
+//https://issues.dlang.org/show_bug.cgi?id=22574
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test22574.d(100): Error: undefined identifier `x`
+---
+*/
+#line 100
+template test(x* x)
+{
+
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test22593.d b/gcc/testsuite/gdc.test/fail_compilation/test22593.d
new file mode 100644
index 0000000..f90287e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test22593.d
@@ -0,0 +1,23 @@
+// https://issues.dlang.org/show_bug.cgi?id=22593
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test22593.d(14): Error: Cannot define both an rvalue constructor and a copy constructor for `struct Foo`
+fail_compilation/test22593.d(22): Template instance `__ctor!(immutable(Foo!int), immutable(Foo!int))` creates a rvalue constructor for `struct Foo`
+fail_compilation/test22593.d(22): Error: template instance `test22593.Foo!int.Foo.__ctor!(immutable(Foo!int), immutable(Foo!int))` error instantiating
+---
+*/
+
+struct Foo(T)
+{
+ this(Rhs, this This)(scope Rhs rhs){}
+
+ this(ref scope typeof(this) rhs){}
+}
+
+void main()
+{
+ immutable Foo!int a;
+ a.__ctor(a);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test314.d b/gcc/testsuite/gdc.test/fail_compilation/test314.d
index eb3f07d..26de737 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test314.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test314.d
@@ -1,5 +1,5 @@
/*
-REQUIRED_ARGS:
+EXTRA_FILES: imports/a314.d imports/b314.d imports/c314.d
TEST_OUTPUT:
---
fail_compilation/test314.d(19): Error: undefined identifier `renamed`
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test4838.d b/gcc/testsuite/gdc.test/fail_compilation/test4838.d
index 0bf0757..a135c79 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test4838.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test4838.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/test4838.d(13): Error: const/immutable/shared/inout/return attributes are only valid for non-static member functions
-fail_compilation/test4838.d(14): Error: const/immutable/shared/inout/return attributes are only valid for non-static member functions
-fail_compilation/test4838.d(15): Error: const/immutable/shared/inout/return attributes are only valid for non-static member functions
-fail_compilation/test4838.d(16): Error: const/immutable/shared/inout/return attributes are only valid for non-static member functions
-fail_compilation/test4838.d(17): Error: const/immutable/shared/inout/return attributes are only valid for non-static member functions
-fail_compilation/test4838.d(18): Error: const/immutable/shared/inout/return attributes are only valid for non-static member functions
+fail_compilation/test4838.d(13): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions
+fail_compilation/test4838.d(14): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions
+fail_compilation/test4838.d(15): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions
+fail_compilation/test4838.d(16): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions
+fail_compilation/test4838.d(17): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions
+fail_compilation/test4838.d(18): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test4946.d b/gcc/testsuite/gdc.test/fail_compilation/test4946.d
new file mode 100644
index 0000000..e19932b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test4946.d
@@ -0,0 +1,19 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test4946.d(13): Error: 'pure' cannot be placed after a template constraint
+fail_compilation/test4946.d(14): Error: 'const' cannot be placed after a template constraint
+fail_compilation/test4946.d(15): Error: 'immutable' cannot be placed after a template constraint
+fail_compilation/test4946.d(16): Error: 'inout' cannot be placed after a template constraint
+fail_compilation/test4946.d(17): Error: 'shared' cannot be placed after a template constraint
+fail_compilation/test4946.d(18): Error: 'nothrow' cannot be placed after a template constraint
+fail_compilation/test4946.d(19): Error: attributes cannot be placed after a template constraint
+---
+*/
+
+void bar1(int x)() if (x > 0) pure { int a;}
+void bar2(int x)() if (x > 0) const { int a;}
+void bar3(int x)() if (x > 0) immutable { int a;}
+void bar4(int x)() if (x > 0) inout { int a;}
+void bar5(int x)() if (x > 0) shared { int a;}
+void bar6(int x)() if (x > 0) nothrow { int a;}
+void bar7(int x)() if (x > 0) @safe { int a;}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test64.d b/gcc/testsuite/gdc.test/fail_compilation/test64.d
index bfc63f2..d10f669 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test64.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test64.d
@@ -1,11 +1,11 @@
/*
+EXTRA_FILES: imports/test64a.d
TEST_OUTPUT:
---
-fail_compilation/imports/test64a.d(1): Error: module imports from file fail_compilation/imports/test64a.d conflicts with package name imports
+fail_compilation/imports/test64a.d(1): Error: module `imports` from file fail_compilation/imports/test64a.d conflicts with package name imports
---
*/
-// PERMUTE_ARGS:
//import std.stdio;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test8556.d b/gcc/testsuite/gdc.test/fail_compilation/test8556.d
index 3490041..75c5c59 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test8556.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test8556.d
@@ -1,8 +1,11 @@
/*
TEST_OUTPUT:
---
-fail_compilation/test8556.d(21): Error: template instance test8556.Grab!(Circle!(uint[])) does not match template declaration Grab(Range) if (!isSliceable!Range)
-fail_compilation/test8556.d(52): Error: template instance test8556.grab!(Circle!(uint[])) error instantiating
+fail_compilation/test8556.d(24): Error: template instance `test8556.Grab!(Circle!(uint[]))` does not match template declaration `Grab(Range)`
+ with `Range = Circle!(uint[])`
+ must satisfy the following constraint:
+` !isSliceable!Range`
+fail_compilation/test8556.d(55): Error: template instance `test8556.grab!(Circle!(uint[]))` error instantiating
---
*/
@@ -34,7 +37,7 @@ struct Circle(Range)
{
//pragma(msg, typeof(opSlice)); // prints "fwdref err" with B, but doesn't with A
- printf("%d %d\n", i, j);
+ printf("%d %d\n", cast(int)i, cast(int)j);
assert(j >= i);
// 1. grabExactly curcular refers this opSlice.
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test9150.d b/gcc/testsuite/gdc.test/fail_compilation/test9150.d
index 650bcd4..e65afec 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test9150.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test9150.d
@@ -1,5 +1,5 @@
-// Issue 9150 - Mismatching static array length should be detected in foreach
-
+// https://issues.dlang.org/show_bug.cgi?id=9150
+// Mismatching static array length should be detected in foreach
/*
TEST_OUTPUT:
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test9176.d b/gcc/testsuite/gdc.test/fail_compilation/test9176.d
index 357d54f..62ae5c0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/test9176.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/test9176.d
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
-fail_compilation/test9176.d(14): Error: forward reference to inferred return type of function call 'get()'
-fail_compilation/test9176.d(10): while evaluating: `static assert(!false)`
+fail_compilation/test9176.d(14): Error: forward reference to inferred return type of function call `get()`
+fail_compilation/test9176.d(10): while evaluating: `static assert(!is(typeof(foo(S()))))`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/testCols.d b/gcc/testsuite/gdc.test/fail_compilation/testCols.d
index d072b3c..e5bff18 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/testCols.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/testCols.d
@@ -1,10 +1,9 @@
// REQUIRED_ARGS: -vcolumns
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/testCols.d(13,5): Error: undefined identifier `nonexistent`
+fail_compilation/testCols.d(12,5): Error: undefined identifier `nonexistent`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/testInference.d b/gcc/testsuite/gdc.test/fail_compilation/testInference.d
index 3a49c58..c0d5a05 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/testInference.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/testInference.d
@@ -137,7 +137,7 @@ immutable(void)* g10063(inout int* p) pure
/*
TEST_OUTPUT:
---
-fail_compilation/testInference.d(154): Error: pure function 'testInference.bar14049' cannot call impure function 'testInference.foo14049!int.foo14049'
+fail_compilation/testInference.d(154): Error: `pure` function `testInference.bar14049` cannot call impure function `testInference.foo14049!int.foo14049`
---
*/
auto impure14049() { static int i = 1; return i; }
@@ -157,7 +157,7 @@ void bar14049() pure
/*
TEST_OUTPUT:
---
-fail_compilation/testInference.d(166): Error: pure function 'testInference.f14160' cannot access mutable static data 'g14160'
+fail_compilation/testInference.d(166): Error: `pure` function `testInference.f14160` cannot access mutable static data `g14160`
---
*/
int g14160;
@@ -169,7 +169,7 @@ int* f14160() pure
/*
TEST_OUTPUT:
---
-fail_compilation/testInference.d(180): Error: pure function 'testInference.test12422' cannot call impure function 'testInference.test12422.bar12422!().bar12422'
+fail_compilation/testInference.d(180): Error: `pure` function `testInference.test12422` cannot call impure function `testInference.test12422.bar12422!().bar12422`
---
*/
int g12422;
@@ -183,8 +183,8 @@ void test12422() pure
/*
TEST_OUTPUT:
---
-fail_compilation/testInference.d(196): Error: pure function 'testInference.test13729a' cannot access mutable static data 'g13729'
-fail_compilation/testInference.d(206): Error: pure function 'testInference.test13729b' cannot call impure function 'testInference.test13729b.foo!().foo'
+fail_compilation/testInference.d(198): Error: `pure` function `testInference.test13729a` cannot call impure function `testInference.test13729a.foo`
+fail_compilation/testInference.d(206): Error: `pure` function `testInference.test13729b` cannot call impure function `testInference.test13729b.foo!().foo`
---
*/
int g13729;
@@ -193,9 +193,9 @@ void test13729a() pure
{
static void foo() // typed as impure
{
- g13729++; // disallowed
+ g13729++;
}
- foo();
+ foo(); // cannot call impure function
}
void test13729b() pure
{
@@ -209,10 +209,10 @@ void test13729b() pure
/*
TEST_OUTPUT:
---
-fail_compilation/testInference.d(225): Error: testInference.test17086 called with argument types (bool) matches both:
-fail_compilation/testInference.d(219): testInference.test17086!(bool, false).test17086(bool x)
+fail_compilation/testInference.d(225): Error: `testInference.test17086` called with argument types `(bool)` matches both:
+fail_compilation/testInference.d(219): `testInference.test17086!(bool, false).test17086(bool x)`
and:
-fail_compilation/testInference.d(220): testInference.test17086!(bool, false).test17086(bool y)
+fail_compilation/testInference.d(220): `testInference.test17086!(bool, false).test17086(bool y)`
---
*/
@@ -224,3 +224,16 @@ void test17086_call ()
bool f;
test17086(f);
}
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/testInference.d(238): Error: `pure` function `testInference.test20047_pure_function` cannot call impure function `testInference.test20047_pure_function.bug`
+---
+*/
+void test20047_impure_function() {}
+void test20047_pure_function() pure
+{
+ static void bug() { return test20047_impure_function(); }
+ bug();
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/testOpApply.d b/gcc/testsuite/gdc.test/fail_compilation/testOpApply.d
new file mode 100644
index 0000000..9203685
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/testOpApply.d
@@ -0,0 +1,161 @@
+/+
+TEST_OUTPUT:
+---
+fail_compilation/testOpApply.d(27): Error: `testOpApply.SameAttr.opApply` called with argument types `(int delegate(int i) pure nothrow @nogc @safe)` matches both:
+fail_compilation/testOpApply.d(13): `testOpApply.SameAttr.opApply(int delegate(int) @system dg)`
+and:
+fail_compilation/testOpApply.d(18): `testOpApply.SameAttr.opApply(int delegate(int) @system dg)`
+---
++/
+
+struct SameAttr
+{
+ int opApply(int delegate(int) @system dg) @system
+ {
+ return 0;
+ }
+
+ int opApply(int delegate(int) @system dg) @safe
+ {
+ return 0;
+ }
+}
+
+void testSameAttr() @safe
+{
+ SameAttr sa;
+ foreach (int i; sa) {}
+}
+
+/+
+TEST_OUTPUT:
+---
+fail_compilation/testOpApply.d(104): Error: `testOpApply.SameAttr.opApply` called with argument types `(int delegate(int i) pure nothrow @nogc @system)` matches both:
+fail_compilation/testOpApply.d(13): `testOpApply.SameAttr.opApply(int delegate(int) @system dg)`
+and:
+fail_compilation/testOpApply.d(18): `testOpApply.SameAttr.opApply(int delegate(int) @system dg)`
+---
++/
+#line 100
+
+void testSameAttr() @system
+{
+ SameAttr sa;
+ foreach (int i; sa) {}
+}
+
+/+
+TEST_OUTPUT:
+---
+fail_compilation/testOpApply.d(217): Error: `sa.opApply` matches more than one declaration:
+`fail_compilation/testOpApply.d(203)`: `int(int delegate(int) dg)`
+and:
+`fail_compilation/testOpApply.d(208)`: `int(int delegate(string) dg)`
+fail_compilation/testOpApply.d(217): Error: cannot uniquely infer `foreach` argument types
+---
++/
+#line 200
+
+struct DifferentTypes
+{
+ int opApply(int delegate(int) dg)
+ {
+ return 0;
+ }
+
+ int opApply(int delegate(string) dg)
+ {
+ return 0;
+ }
+}
+
+void testDifferentTypes()
+{
+ DifferentTypes sa;
+ foreach (i; sa) {}
+}
+
+/+
+TEST_OUTPUT:
+---
+fail_compilation/testOpApply.d(317): Error: `sa.opApply` matches more than one declaration:
+`fail_compilation/testOpApply.d(303)`: `int(int delegate(int) dg)`
+and:
+`fail_compilation/testOpApply.d(308)`: `int(int delegate(long) dg)`
+fail_compilation/testOpApply.d(317): Error: cannot uniquely infer `foreach` argument types
+---
++/
+#line 300
+
+struct CovariantTypes
+{
+ int opApply(int delegate(int) dg)
+ {
+ return 0;
+ }
+
+ int opApply(int delegate(long) dg)
+ {
+ return 0;
+ }
+}
+
+void testCovariantTypes()
+{
+ CovariantTypes sa;
+ foreach (i; sa) {}
+}
+
+/+
+See https://issues.dlang.org/show_bug.cgi?id=21683
+
+TEST_OUTPUT:
+---
+fail_compilation/testOpApply.d(420): Error: `sa.opApply` matches more than one declaration:
+`fail_compilation/testOpApply.d(404)`: `int(int delegate(int) dg)`
+and:
+`fail_compilation/testOpApply.d(410)`: `int(int delegate(ref int) dg)`
+fail_compilation/testOpApply.d(420): Error: cannot uniquely infer `foreach` argument types
+---
++/
+#line 400
+
+struct DifferentQualifiers
+{
+ int x;
+ int opApply(int delegate(int) dg)
+ {
+ x = 1;
+ return 0;
+ }
+
+ int opApply(int delegate(ref int) dg)
+ {
+ x = 2;
+ return 0;
+ }
+}
+
+void testDifferentQualifiers()
+{
+ DifferentQualifiers sa;
+ foreach (i; sa) {}
+}
+
+/+
+TEST_OUTPUT:
+---
+fail_compilation/testOpApply.d(504): Error: `sa.opApply` matches more than one declaration:
+`fail_compilation/testOpApply.d(404)`: `int(int delegate(int) dg)`
+and:
+`fail_compilation/testOpApply.d(410)`: `int(int delegate(ref int) dg)`
+fail_compilation/testOpApply.d(504): Error: cannot uniquely infer `foreach` argument types
+---
++/
+#line 500
+
+void testDifferentQualifiersRef()
+{
+ DifferentQualifiers sa;
+ foreach (ref i; sa) {}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test_switch_error.d b/gcc/testsuite/gdc.test/fail_compilation/test_switch_error.d
new file mode 100644
index 0000000..a0d1d12
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test_switch_error.d
@@ -0,0 +1,101 @@
+/++
+https://issues.dlang.org/show_bug.cgi?id=22514
+TEST_OUTPUT:
+---
+fail_compilation/test_switch_error.d(13): Error: undefined identifier `doesNotExist`
+fail_compilation/test_switch_error.d(16): Error: undefined identifier `alsoDoesNotExits`
+fail_compilation/test_switch_error.d(19): Error: duplicate `case 2` in `switch` statement
+---
+++/
+
+void test1()
+{
+ switch (doesNotExist)
+ {
+ case 1:
+ alsoDoesNotExits();
+ break;
+ case 2: break;
+ case 2: break;
+ }
+}
+
+/++
+TEST_OUTPUT:
+---
+fail_compilation/test_switch_error.d(105): Error: undefined identifier `doesNotExist`
+---
+++/
+#line 100
+
+enum foo = 1;
+
+void test2()
+{
+ switch (doesNotExist)
+ {
+ case foo: break;
+ }
+}
+
+/++
+TEST_OUTPUT:
+---
+fail_compilation/test_switch_error.d(206): Error: undefined identifier `a`
+fail_compilation/test_switch_error.d(207): Error: undefined identifier `b`
+---
+++/
+#line 200
+
+void test3()
+{
+
+ switch (1)
+ {
+ case a: break;
+ case b: break;
+ }
+}
+
+/++
+TEST_OUTPUT:
+---
+fail_compilation/test_switch_error.d(303): Error: undefined identifier `doesNotExits`
+---
+++/
+#line 300
+
+void test4()
+{
+ auto foo = doesNotExits();
+ switch (1)
+ {
+ case foo: break;
+ case foo: break;
+ }
+}
+
+/++
+TEST_OUTPUT:
+---
+fail_compilation/test_switch_error.d(405): Error: `case` variables have to be `const` or `immutable`
+fail_compilation/test_switch_error.d(412): Error: `case` variables not allowed in `final switch` statements
+---
+++/
+#line 400
+
+void test5(int i)
+{
+ switch (i)
+ {
+ case i: break;
+ default: break;
+ }
+
+ const int j = i;
+ final switch (i)
+ {
+ case j: break;
+
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/testpull1810.d b/gcc/testsuite/gdc.test/fail_compilation/testpull1810.d
index 141c9d2..73ac830 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/testpull1810.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/testpull1810.d
@@ -2,7 +2,9 @@
/*
TEST_OUTPUT:
---
-fail_compilation/testpull1810.d(19): Warning: statement is not reachable
+fail_compilation/testpull1810.d(21): Warning: statement is not reachable
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/testscopestatic.d b/gcc/testsuite/gdc.test/fail_compilation/testscopestatic.d
index 310e9fe..45e73c0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/testscopestatic.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/testscopestatic.d
@@ -1,10 +1,10 @@
/* TEST_OUTPUT:
---
-fail_compilation/testscopestatic.d(15): Error: variable testscopestatic.foo.p cannot be 'scope' and 'static'
-fail_compilation/testscopestatic.d(16): Error: variable testscopestatic.foo.b cannot be 'scope' and 'extern'
-fail_compilation/testscopestatic.d(17): Error: variable testscopestatic.foo.c cannot be 'scope' and '__gshared'
-fail_compilation/testscopestatic.d(21): Error: variable testscopestatic.foo.S.x field cannot be 'scope'
+fail_compilation/testscopestatic.d(15): Error: variable `testscopestatic.foo.p` cannot be `scope` and `static`
+fail_compilation/testscopestatic.d(16): Error: variable `testscopestatic.foo.b` cannot be `scope` and `extern`
+fail_compilation/testscopestatic.d(17): Error: variable `testscopestatic.foo.c` cannot be `scope` and `__gshared`
+fail_compilation/testscopestatic.d(21): Error: variable `testscopestatic.foo.S.x` field cannot be `scope`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/trait_loc_err.d b/gcc/testsuite/gdc.test/fail_compilation/trait_loc_err.d
index 8d5d480..c5d0579 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/trait_loc_err.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/trait_loc_err.d
@@ -2,14 +2,14 @@
TEST_OUTPUT:
---
fail_compilation/trait_loc_err.d(13): Error: can only get the location of a symbol, not `trait_loc_err`
-fail_compilation/trait_loc_err.d(14): Error: can only get the location of a symbol, not `std`
+fail_compilation/trait_loc_err.d(14): Error: can only get the location of a symbol, not `stdc`
---
*/
module trait_loc_err;
-import std.stdio;
+import core.stdc.stdio;
void main()
{
__traits(getLocation, __traits(parent, main));
- __traits(getLocation, __traits(parent, std.stdio));
+ __traits(getLocation, __traits(parent, core.stdc.stdio));
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/traits.d b/gcc/testsuite/gdc.test/fail_compilation/traits.d
index bee29ed..5b9daaa 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/traits.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/traits.d
@@ -11,6 +11,16 @@ fail_compilation/traits.d(200): Error: undefined identifier `imports.nonexistent
fail_compilation/traits.d(201): Error: undefined identifier `imports.nonexistent`
fail_compilation/traits.d(202): Error: expected 1 arguments for `isPackage` but had 0
fail_compilation/traits.d(203): Error: expected 1 arguments for `isModule` but had 0
+fail_compilation/traits.d(300): Error: In expression `__traits(allMembers, float)` `float` can't have members
+fail_compilation/traits.d(300): `float` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation
+fail_compilation/traits.d(306): Error: In expression `__traits(allMembers, TemplatedStruct)` struct `TemplatedStruct(T)` has no members
+fail_compilation/traits.d(306): `TemplatedStruct(T)` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation
+fail_compilation/traits.d(309): Error: In expression `__traits(derivedMembers, float)` `float` can't have members
+fail_compilation/traits.d(309): `float` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation
+fail_compilation/traits.d(316): Error: In expression `__traits(derivedMembers, TemplatedStruct)` struct `TemplatedStruct(T)` has no members
+fail_compilation/traits.d(316): `TemplatedStruct(T)` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation
+fail_compilation/traits.d(404): Error: function `traits.func1` circular reference in `__traits(GetCppNamespaces,...)`
+fail_compilation/traits.d(413): Error: function `traits.foo1.func1` circular reference in `__traits(GetCppNamespaces,...)`
---
*/
@@ -25,3 +35,84 @@ enum A2 = __traits(isPackage, imports.nonexistent);
enum B2 = __traits(isModule, imports.nonexistent);
enum C2 = __traits(isPackage);
enum D2 = __traits(isModule);
+
+interface Interface {}
+struct TemplatedStruct(T) {}
+struct Struct {}
+union Union {}
+class Class {}
+
+#line 300
+enum AM0 = __traits(allMembers, float); // compile error
+enum AM1 = __traits(allMembers, Struct); // no error
+enum AM2 = __traits(allMembers, Union); // no error
+enum AM3 = __traits(allMembers, Class); // no error
+enum AM4 = __traits(allMembers, Interface); // no error
+enum AM5 = __traits(allMembers, TemplatedStruct!float); // no error
+enum AM6 = __traits(allMembers, TemplatedStruct); // compile error
+enum AM7 = __traits(allMembers, mixin(__MODULE__)); // no error
+
+enum DM0 = __traits(derivedMembers, float); // compile error
+enum DM1 = __traits(derivedMembers, Struct); // no error
+enum DM2 = __traits(derivedMembers, Struct); // no error
+enum DM3 = __traits(derivedMembers, Union); // no error
+enum DM4 = __traits(derivedMembers, Class); // no error
+enum DM5 = __traits(derivedMembers, Interface); // no error
+enum DM6 = __traits(derivedMembers, TemplatedStruct!float); // no error
+enum DM7 = __traits(derivedMembers, TemplatedStruct); // compile error
+enum DM8 = __traits(derivedMembers, mixin(__MODULE__)); // no error
+
+#line 400
+extern(C++, "bar")
+extern(C++, __traits(getCppNamespaces, func1)) void func () {}
+
+extern(C++, "foo")
+extern(C++, __traits(getCppNamespaces, func2)) void func1 () {}
+
+extern(C++, "foobar")
+extern(C++, __traits(getCppNamespaces, func)) void func2 () {}
+
+extern(C++, bar1)
+extern(C++, __traits(getCppNamespaces, foo1.func1)) void func () {}
+
+extern(C++, foo1)
+extern(C++, __traits(getCppNamespaces, foobar1.func2)) void func1 () {}
+
+extern(C++, foobar1)
+extern(C++, __traits(getCppNamespaces, bar1.func)) void func2 () {}
+
+/********************************************
+https://issues.dlang.org/show_bug.cgi?id=21918
+
+TEST_OUTPUT:
+---
+fail_compilation/traits.d(501): Error: undefined identifier `T`
+fail_compilation/traits.d(502): while evaluating `pragma(msg, __traits(getParameterStorageClasses, yip, 0))`
+---
+*/
+#line 500
+
+auto yip(int f) {return T[];}
+pragma(msg, __traits(getParameterStorageClasses, yip, 0));
+
+
+/********************************************
+TEST_OUTPUT:
+---
+fail_compilation/traits.d(602): Error: expected 1 arguments for `hasCopyConstructor` but had 0
+fail_compilation/traits.d(602): while evaluating `pragma(msg, __traits(hasCopyConstructor))`
+fail_compilation/traits.d(603): Error: type expected as second argument of __traits `hasCopyConstructor` instead of `S()`
+fail_compilation/traits.d(603): while evaluating `pragma(msg, __traits(hasCopyConstructor, S()))`
+fail_compilation/traits.d(604): Error: expected 1 arguments for `hasPostblit` but had 0
+fail_compilation/traits.d(604): while evaluating `pragma(msg, __traits(hasPostblit))`
+fail_compilation/traits.d(605): Error: type expected as second argument of __traits `hasPostblit` instead of `S()`
+fail_compilation/traits.d(605): while evaluating `pragma(msg, __traits(hasPostblit, S()))`
+---
+*/
+#line 600
+
+struct S { this (ref S rhs) {} }
+pragma(msg, __traits(hasCopyConstructor));
+pragma(msg, __traits(hasCopyConstructor, S()));
+pragma(msg, __traits(hasPostblit));
+pragma(msg, __traits(hasPostblit, S()));
diff --git a/gcc/testsuite/gdc.test/fail_compilation/traits_child.d b/gcc/testsuite/gdc.test/fail_compilation/traits_child.d
index 7a0b75e..aeaf213 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/traits_child.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/traits_child.d
@@ -4,10 +4,8 @@
TEST_OUTPUT:
---
fail_compilation/traits_child.d(100): Error: expected 2 arguments for `child` but had 1
-fail_compilation/traits_child.d(101): Error: symbol or expression expected as first argument of __traits
-child` instead of `long`
-fail_compilation/traits_child.d(102): Error: symbol expected as second argument of __traits `child` inste
-d of `3`
+fail_compilation/traits_child.d(101): Error: symbol or expression expected as first argument of __traits `child` instead of `long`
+fail_compilation/traits_child.d(102): Error: symbol expected as second argument of __traits `child` instead of `3`
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/traits_initSymbol.d b/gcc/testsuite/gdc.test/fail_compilation/traits_initSymbol.d
new file mode 100644
index 0000000..94ff80a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/traits_initSymbol.d
@@ -0,0 +1,63 @@
+/********************************************
+TEST_OUTPUT:
+---
+fail_compilation/traits_initSymbol.d(105): Error: struct / class type expected as argument to __traits(initSymbol) instead of `int`
+fail_compilation/traits_initSymbol.d(106): Error: struct / class type expected as argument to __traits(initSymbol) instead of `S[2]`
+fail_compilation/traits_initSymbol.d(107): Error: struct / class type expected as argument to __traits(initSymbol) instead of `123`
+---
+*/
+#line 100
+
+struct S { int i = 4; }
+
+void test1()
+{
+ const void[] initInt = __traits(initSymbol, int);
+ const void[] initArray = __traits(initSymbol, S[2]);
+ const void[] initValue = __traits(initSymbol, 123);
+}
+
+/********************************************
+TEST_OUTPUT:
+---
+fail_compilation/traits_initSymbol.d(203): Error: cannot determine the address of the initializer symbol during CTFE
+fail_compilation/traits_initSymbol.d(203): called from here: `(*function () pure nothrow @nogc @safe => S)()`
+---
+*/
+#line 200
+
+void test2()
+{
+ enum initLen = (() => __traits(initSymbol, S))();
+}
+
+/********************************************
+TEST_OUTPUT:
+---
+fail_compilation/traits_initSymbol.d(305): Error: struct / class type expected as argument to __traits(initSymbol) instead of `traits_initSymbol.Interface`
+---
+*/
+#line 300
+
+interface Interface {}
+
+void test3()
+{
+ const void[] initInterface = __traits(initSymbol, Interface);
+}
+
+/********************************************
+TEST_OUTPUT:
+---
+fail_compilation/traits_initSymbol.d(404): Error: expected 1 arguments for `initSymbol` but had 0
+fail_compilation/traits_initSymbol.d(405): Error: expected 1 arguments for `initSymbol` but had 2
+---
+*/
+#line 400
+
+
+void test4()
+{
+ const void[] tmp = __traits(initSymbol);
+ const void[] tmo = __traits(initSymbol, Interface, S);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/typeerrors.d b/gcc/testsuite/gdc.test/fail_compilation/typeerrors.d
index ba80fdc..a93a49f 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/typeerrors.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/typeerrors.d
@@ -1,22 +1,22 @@
/*
-PERMUTE_ARGS:
TEST_OUTPUT:
---
fail_compilation/typeerrors.d(36): Error: tuple index 4 exceeds 4
-fail_compilation/typeerrors.d(38): Error: variable x cannot be read at compile time
-fail_compilation/typeerrors.d(39): Error: can't have array of void()
-fail_compilation/typeerrors.d(40): Error: cannot have array of scope typeerrors.C
-fail_compilation/typeerrors.d(41): Error: cannot have array of scope typeerrors.C
-fail_compilation/typeerrors.d(44): Error: int[5] is not an expression
-fail_compilation/typeerrors.d(46): Error: x is used as a type
-fail_compilation/typeerrors.d(47): Error: can't have associative array key of void()
-fail_compilation/typeerrors.d(48): Error: can't have associative array key of void
-fail_compilation/typeerrors.d(49): Error: cannot have array of scope typeerrors.C
-fail_compilation/typeerrors.d(50): Error: can't have associative array of void
-fail_compilation/typeerrors.d(51): Error: can't have associative array of void()
-fail_compilation/typeerrors.d(53): Error: cannot have parameter of type void
-fail_compilation/typeerrors.d(55): Error: slice [1..5] is out of range of [0..4]
-fail_compilation/typeerrors.d(56): Error: slice [2..1] is out of range of [0..4]
+fail_compilation/typeerrors.d(38): Error: variable `x` cannot be read at compile time
+fail_compilation/typeerrors.d(39): Error: cannot have array of `void()`
+fail_compilation/typeerrors.d(40): Error: cannot have array of scope `typeerrors.C`
+fail_compilation/typeerrors.d(41): Error: cannot have array of scope `typeerrors.C`
+fail_compilation/typeerrors.d(44): Error: `int[5]` is not an expression
+fail_compilation/typeerrors.d(46): Error: variable `x` is used as a type
+fail_compilation/typeerrors.d(37): variable `x` is declared here
+fail_compilation/typeerrors.d(47): Error: cannot have associative array key of `void()`
+fail_compilation/typeerrors.d(48): Error: cannot have associative array key of `void`
+fail_compilation/typeerrors.d(49): Error: cannot have array of scope `typeerrors.C`
+fail_compilation/typeerrors.d(50): Error: cannot have associative array of `void`
+fail_compilation/typeerrors.d(51): Error: cannot have associative array of `void()`
+fail_compilation/typeerrors.d(53): Error: cannot have parameter of type `void`
+fail_compilation/typeerrors.d(55): Error: slice `[1..5]` is out of range of [0..4]
+fail_compilation/typeerrors.d(56): Error: slice `[2..1]` is out of range of [0..4]
---
*/
@@ -55,4 +55,3 @@ void foo()
alias T2 = T[1 .. 5];
alias T3 = T[2 .. 1];
}
-
diff --git a/gcc/testsuite/gdc.test/fail_compilation/union_initialization.d b/gcc/testsuite/gdc.test/fail_compilation/union_initialization.d
new file mode 100644
index 0000000..36fc63a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/union_initialization.d
@@ -0,0 +1,88 @@
+/*
+https://issues.dlang.org/show_bug.cgi?id=20068
+
+TEST_OUTPUT:
+---
+fail_compilation/union_initialization.d(19): Error: field `B.p` cannot access pointers in `@safe` code that overlap other fields
+fail_compilation/union_initialization.d(25): Error: field `B.p` cannot access pointers in `@safe` code that overlap other fields
+---
+*/
+
+union B
+{
+ int i;
+ int* p;
+
+ @safe this(int* p)
+ {
+ this.p = p;
+ int* x = this.p;
+ }
+
+ @safe this(int** i)
+ {
+ this.p = null;
+ this.p = *i;
+ }
+}
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/union_initialization.d(109): Error: immutable field `p` initialized multiple times
+fail_compilation/union_initialization.d(108): Previous initialization is here.
+---
+*/
+#line 100
+
+union C
+{
+ int i;
+ immutable int* p;
+
+ @safe this(immutable int* p)
+ {
+ this.p = p;
+ this.p = null;
+ }
+}
+
+/*
+https://issues.dlang.org/show_bug.cgi?id=21229
+
+TEST_OUTPUT:
+---
+fail_compilation/union_initialization.d(223): Error: field `union_` must be initialized in constructor
+fail_compilation/union_initialization.d(223): Error: field `proxy` must be initialized in constructor
+---
+*/
+#line 200
+
+struct NeedsInit
+{
+ int var;
+ long lo;
+ @disable this();
+}
+
+union Union
+{
+ NeedsInit ni;
+}
+
+union Proxy
+{
+ Union union_;
+}
+
+struct S
+{
+ Union union_;
+ Proxy proxy;
+
+ this(int arg)
+ {
+ union_.ni.var = arg;
+ proxy.union_.ni.var = arg;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/vararg2.d b/gcc/testsuite/gdc.test/fail_compilation/vararg2.d
new file mode 100644
index 0000000..eb23558
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/vararg2.d
@@ -0,0 +1,23 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/vararg2.d(106): Error: function `vararg2.foo(int x, const return ...)` is not callable using argument types `(double)`
+fail_compilation/vararg2.d(106): cannot pass argument `1.0` of type `double` to parameter `int x`
+fail_compilation/vararg2.d(111): Error: function `vararg2.bar(int x, scope shared ...)` is not callable using argument types `(double)`
+fail_compilation/vararg2.d(111): cannot pass argument `1.0` of type `double` to parameter `int x`
+---
+*/
+
+#line 100
+
+int* foo(int x, return const ...);
+int* bar(int x, scope shared ...);
+
+void test1()
+{
+ foo(1.0);
+}
+
+void test2()
+{
+ bar(1.0);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/varargsstc.d b/gcc/testsuite/gdc.test/fail_compilation/varargsstc.d
new file mode 100644
index 0000000..674455b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/varargsstc.d
@@ -0,0 +1,11 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/varargsstc.d(102): Error: variadic parameter cannot have attributes `out ref`
+---
+ */
+
+#line 100
+
+int printf(const(char)*, const scope shared return ...);
+int printf(const(char)*, ref out scope immutable shared return ...);
+
diff --git a/gcc/testsuite/gdc.test/fail_compilation/verifyhookexist.d b/gcc/testsuite/gdc.test/fail_compilation/verifyhookexist.d
new file mode 100644
index 0000000..d7b8f66
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/verifyhookexist.d
@@ -0,0 +1,45 @@
+/*
+REQUIRED_ARGS: -checkaction=context
+EXTRA_SOURCES: extra-files/minimal/object.d
+*/
+
+/************************************************************/
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/verifyhookexist.d(22): Error: `object.__ArrayCast` not found. The current runtime does not support casting array of structs, or the runtime is corrupt.
+fail_compilation/verifyhookexist.d(28): Error: `object.__equals` not found. The current runtime does not support equal checks on arrays, or the runtime is corrupt.
+fail_compilation/verifyhookexist.d(29): Error: `object.__cmp` not found. The current runtime does not support comparing arrays, or the runtime is corrupt.
+fail_compilation/verifyhookexist.d(33): Error: `object._d_assert_fail` not found. The current runtime does not support generating assert messages, or the runtime is corrupt.
+fail_compilation/verifyhookexist.d(36): Error: `object.__switch` not found. The current runtime does not support switch cases on strings, or the runtime is corrupt.
+fail_compilation/verifyhookexist.d(41): Error: `object.__switch_error` not found. The current runtime does not support generating assert messages, or the runtime is corrupt.
+---
+*/
+
+struct MyStruct { int a, b; }
+MyStruct[] castToMyStruct(int[] arr) {
+ return cast(MyStruct[])arr;
+}
+
+void test() {
+ int[] arrA, arrB;
+
+ bool a = arrA[] == arrB[];
+ bool b = arrA < arrB;
+
+ {
+ int x = 1; int y = 1;
+ assert(x == y);
+ }
+
+ switch ("") {
+ default:
+ break;
+ }
+
+ final switch (0) {
+ case 1:
+ break;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/warn13679.d b/gcc/testsuite/gdc.test/fail_compilation/warn13679.d
index 0a92b76..74d4564 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/warn13679.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/warn13679.d
@@ -1,10 +1,11 @@
// REQUIRED_ARGS: -w
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/warn13679.d(14): Warning: cannot use foreach_reverse with an associative array
+fail_compilation/warn13679.d(15): Warning: cannot use `foreach_reverse` with an associative array
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/warn7444.d b/gcc/testsuite/gdc.test/fail_compilation/warn7444.d
index ec7d49c..025039a 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/warn7444.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/warn7444.d
@@ -1,10 +1,9 @@
// REQUIRED_ARGS: -w
-// PERMUTE_ARGS:
/*
TEST_OUTPUT:
---
-fail_compilation/warn7444.d(23): Error: cannot implicitly convert expression `e` of type `int` to `int[]`
+fail_compilation/warn7444.d(22): Error: cannot implicitly convert expression `e` of type `int` to `int[]`
---
*/
diff --git a/gcc/testsuite/gdc.test/runnable/A16.d b/gcc/testsuite/gdc.test/runnable/A16.d
index f653353..e89e714 100644
--- a/gcc/testsuite/gdc.test/runnable/A16.d
+++ b/gcc/testsuite/gdc.test/runnable/A16.d
@@ -1,6 +1,13 @@
-// EXTRA_SOURCES: imports/A16a.d
+/*
+EXTRA_SOURCES: imports/A16a.d
+RUN_OUTPUT:
+---
+class AA16
+class B16
+---
+*/
-import std.stdio;
+import core.stdc.stdio;
class AA16
{
diff --git a/gcc/testsuite/gdc.test/runnable/Same.d b/gcc/testsuite/gdc.test/runnable/Same.d
index 85025e7..a4c6f0f 100644
--- a/gcc/testsuite/gdc.test/runnable/Same.d
+++ b/gcc/testsuite/gdc.test/runnable/Same.d
@@ -1,5 +1,12 @@
-// EXTRA_SOURCES: imports/Other.d
-// PERMUTE_ARGS:
+/*
+EXTRA_SOURCES: imports/Other.d
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+Same
+other
+---
+*/
module Same; // makes no difference if removed
import core.stdc.stdio;
diff --git a/gcc/testsuite/gdc.test/runnable/a17.d b/gcc/testsuite/gdc.test/runnable/a17.d
index 79eeecf..21f4f38 100644
--- a/gcc/testsuite/gdc.test/runnable/a17.d
+++ b/gcc/testsuite/gdc.test/runnable/a17.d
@@ -1,8 +1,14 @@
-// EXTRA_SOURCES: imports/a17a.d
+/*
+EXTRA_SOURCES: imports/a17a.d
+RUN_OUTPUT:
+---
+barx
+---
+*/
module a17;
-import std.stdio;
+import core.stdc.stdio;
private import imports.a17a;
diff --git a/gcc/testsuite/gdc.test/runnable/a18.d b/gcc/testsuite/gdc.test/runnable/a18.d
index 4d8b000..f568982 100644
--- a/gcc/testsuite/gdc.test/runnable/a18.d
+++ b/gcc/testsuite/gdc.test/runnable/a18.d
@@ -1,6 +1,12 @@
-// COMPILE_SEPARATELY
-// EXTRA_SOURCES: imports/a18a.d
-// PERMUTE_ARGS:
+/*
+COMPILE_SEPARATELY
+EXTRA_SOURCES: imports/a18a.d
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+Test enumerator
+---
+*/
import imports.a18a;
diff --git a/gcc/testsuite/gdc.test/runnable/a21.d b/gcc/testsuite/gdc.test/runnable/a21.d
index 6b3be9d..65806c4 100644
--- a/gcc/testsuite/gdc.test/runnable/a21.d
+++ b/gcc/testsuite/gdc.test/runnable/a21.d
@@ -1,7 +1,14 @@
-// EXTRA_SOURCES: imports/a21a.d
-// PERMUTE_ARGS:
+/*
+EXTRA_SOURCES: imports/a21a.d
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+goodFunc
+badFunc
+---
+*/
-import std.stdio;
+import core.stdc.stdio;
import imports.a21a;
@@ -26,4 +33,3 @@ int main()
return 0;
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/aliasassign.d b/gcc/testsuite/gdc.test/runnable/aliasassign.d
new file mode 100644
index 0000000..986cccc
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/aliasassign.d
@@ -0,0 +1,31 @@
+
+
+template AliasSeq(T...) { alias AliasSeq = T; }
+
+template staticMap(alias F, T...)
+{
+ alias A = AliasSeq!();
+ static foreach (t; T)
+ A = AliasSeq!(A, F!t);
+ alias staticMap = A;
+}
+
+template Qual(alias T)
+{
+ alias Qual = T;
+}
+
+void test()
+{
+ int x = 3;
+ int y = 4;
+
+ alias XY = staticMap!(Qual, x, y);
+ assert(XY[0] == 3);
+ assert(XY[1] == 4);
+}
+
+void main()
+{
+ test();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/aliasthis.d b/gcc/testsuite/gdc.test/runnable/aliasthis.d
index ee8e6a1..db5913c 100644
--- a/gcc/testsuite/gdc.test/runnable/aliasthis.d
+++ b/gcc/testsuite/gdc.test/runnable/aliasthis.d
@@ -132,7 +132,7 @@ struct Iter
bool empty() { return true; }
void popFront() { }
ref Tup!(int, int) front() { return *new Tup!(int, int); }
- ref Iter opSlice() { return this; }
+ ref Iter opSlice() return { return this; }
}
void test4()
@@ -153,7 +153,7 @@ void test5()
}
/**********************************************/
-// 4617
+// https://issues.dlang.org/show_bug.cgi?id=4617
struct S4617
{
@@ -215,7 +215,7 @@ void test4617b()
}
/**********************************************/
-// 4773
+// https://issues.dlang.org/show_bug.cgi?id=4773
void test4773()
{
@@ -233,7 +233,7 @@ void test4773()
}
/**********************************************/
-// 5188
+// https://issues.dlang.org/show_bug.cgi?id=5188
void test5188()
{
@@ -434,7 +434,7 @@ void test7()
static assert(!__traits(compiles, { switch (c1) { default: } }));
static assert(!__traits(compiles, { switch (c3) { default: } }));
- // Bugzilla 12537: function arguments with IFTI
+ // https://issues.dlang.org/show_bug.cgi?id=12537: function arguments with IFTI
void eq12537()(Object lhs) {}
const C0 cc0;
const C1 cc1;
@@ -445,7 +445,8 @@ void test7()
}
/***************************************************/
-// 11875 - endless recursion in Type::deduceType
+// https://issues.dlang.org/show_bug.cgi?id=11875
+// endless recursion in Type::deduceType
struct T11875x(C)
{
@@ -467,7 +468,7 @@ class D11875c { T11875y!D11875b c; alias c this; }
static assert(is(D11875c : T11875y!D, D) && is(D == D11875b));
/***************************************************/
-// 11930
+// https://issues.dlang.org/show_bug.cgi?id=11930
class BarObj11930 {}
@@ -492,7 +493,7 @@ void test11930()
}
/***************************************************/
-// 2781
+// https://issues.dlang.org/show_bug.cgi?id=2781
struct Tuple2781a(T...) {
T data;
@@ -594,7 +595,7 @@ void test2781()
}
/**********************************************/
-// 6546
+// https://issues.dlang.org/show_bug.cgi?id=6546
void test6546()
{
@@ -643,7 +644,7 @@ void test6546()
}
/**********************************************/
-// 6736
+// https://issues.dlang.org/show_bug.cgi?id=6736
void test6736()
{
@@ -661,7 +662,7 @@ void test6736()
}
/**********************************************/
-// 2777
+// https://issues.dlang.org/show_bug.cgi?id=2777
struct ArrayWrapper(T) {
T[] array;
@@ -698,7 +699,7 @@ void test2777b()
}
/****************************************/
-// 2787
+// https://issues.dlang.org/show_bug.cgi?id=2787
struct Base2787
{
@@ -715,7 +716,7 @@ struct Derived2787
}
/***********************************/
-// 5679
+// https://issues.dlang.org/show_bug.cgi?id=5679
void test5679()
{
@@ -736,7 +737,7 @@ void test5679()
}
/***********************************/
-// 6508
+// https://issues.dlang.org/show_bug.cgi?id=6508
void test6508()
{
@@ -791,7 +792,7 @@ void test6508x()
}
/***********************************/
-// 6369
+// https://issues.dlang.org/show_bug.cgi?id=6369
void test6369a()
{
@@ -869,7 +870,7 @@ void test6369d()
}
/**********************************************/
-// 6434
+// https://issues.dlang.org/show_bug.cgi?id=6434
struct Variant6434{}
@@ -890,7 +891,7 @@ void test6434()
}
/**************************************/
-// 6366
+// https://issues.dlang.org/show_bug.cgi?id=6366
void test6366()
{
@@ -965,7 +966,7 @@ void test6366()
}
/***************************************************/
-// 6711
+// https://issues.dlang.org/show_bug.cgi?id=6711
void test6711()
{
@@ -989,7 +990,7 @@ void test6711()
}
/**********************************************/
-// 12161
+// https://issues.dlang.org/show_bug.cgi?id=12161
class A12161
{
@@ -1011,7 +1012,7 @@ void test12161()
}
/**********************************************/
-// 6759
+// https://issues.dlang.org/show_bug.cgi?id=6759
struct Range
{
@@ -1037,7 +1038,7 @@ void test6759()
}
/**********************************************/
-// 6479
+// https://issues.dlang.org/show_bug.cgi?id=6479
struct Memory6479
{
@@ -1053,7 +1054,7 @@ mixin template Wrapper6479()
}
/**********************************************/
-// 6832
+// https://issues.dlang.org/show_bug.cgi?id=6832
void test6832()
{
@@ -1071,7 +1072,7 @@ void test6832()
}
/**********************************************/
-// 6928
+// https://issues.dlang.org/show_bug.cgi?id=6928
void test6928()
{
@@ -1094,7 +1095,7 @@ void test6928()
}
/**********************************************/
-// 6929
+// https://issues.dlang.org/show_bug.cgi?id=6929
struct S6929
{
@@ -1114,7 +1115,7 @@ void test6929()
}
/***************************************************/
-// 7136
+// https://issues.dlang.org/show_bug.cgi?id=7136
void test7136()
{
@@ -1140,7 +1141,7 @@ void test7136()
}
/***************************************************/
-// 7731
+// https://issues.dlang.org/show_bug.cgi?id=7731
struct A7731
{
@@ -1183,7 +1184,7 @@ void test7731()
}
/***************************************************/
-// 7808
+// https://issues.dlang.org/show_bug.cgi?id=7808
struct Nullable7808(T)
{
@@ -1213,7 +1214,7 @@ void test7808()
}
/***************************************************/
-// 7945
+// https://issues.dlang.org/show_bug.cgi?id=7945
struct S7945
{
@@ -1232,7 +1233,8 @@ void test7945()
}
/***************************************************/
-// 15674 - alias this on out parameter, consistent with 7945 case
+// https://issues.dlang.org/show_bug.cgi?id=15674
+// alias this on out parameter, consistent with 7945 case
struct S15674
{
@@ -1251,7 +1253,7 @@ void test15674()
}
/***************************************************/
-// 7979
+// https://issues.dlang.org/show_bug.cgi?id=7979
void test7979()
{
@@ -1291,7 +1293,7 @@ void test7979()
}
/***************************************************/
-// 7992
+// https://issues.dlang.org/show_bug.cgi?id=7992
struct S7992
{
@@ -1314,7 +1316,7 @@ void test7992()
}
/***************************************************/
-// 8169
+// https://issues.dlang.org/show_bug.cgi?id=8169
void test8169()
{
@@ -1339,7 +1341,7 @@ void test8169()
}
/***************************************************/
-// 8735
+// https://issues.dlang.org/show_bug.cgi?id=8735
struct S8735(alias Arg)
{
@@ -1360,11 +1362,11 @@ void test8735()
int n = s;
assert(n == 1);
- // 11502 case
+ // https://issues.dlang.org/show_bug.cgi?id=11502
static void f(int i);
S8735!f sf;
- // 9709 case
+ // https://issues.dlang.org/show_bug.cgi?id=9709
alias A = Tuple9709!(1,int,"foo");
A a;
//static assert(A[0] == 1);
@@ -1376,7 +1378,7 @@ void test8735()
}
/***************************************************/
-// 9174
+// https://issues.dlang.org/show_bug.cgi?id=9174
void test9174()
{
@@ -1390,7 +1392,7 @@ void test9174()
}
/***************************************************/
-// 9177
+// https://issues.dlang.org/show_bug.cgi?id=9177
struct S9177
{
@@ -1400,7 +1402,7 @@ struct S9177
pragma(msg, is(S9177 : int));
/***************************************************/
-// 9858
+// https://issues.dlang.org/show_bug.cgi?id=9858
struct S9858()
{
@@ -1418,7 +1420,7 @@ void test9858()
}
/***************************************************/
-// 9873
+// https://issues.dlang.org/show_bug.cgi?id=9873
void test9873()
{
@@ -1453,7 +1455,7 @@ void test9873()
}
/***************************************************/
-// 10178
+// https://issues.dlang.org/show_bug.cgi?id=10178
void test10178()
{
@@ -1473,7 +1475,7 @@ void test10178()
}
/***************************************************/
-// 10179
+// https://issues.dlang.org/show_bug.cgi?id=10179
void test10179()
{
@@ -1493,7 +1495,7 @@ void test10179()
}
/***************************************************/
-// 9890
+// https://issues.dlang.org/show_bug.cgi?id=9890
void test9890()
{
@@ -1519,7 +1521,7 @@ void test9890()
}
/***************************************************/
-// 10004
+// https://issues.dlang.org/show_bug.cgi?id=10004
void test10004()
{
@@ -1541,7 +1543,7 @@ void test10004()
}
/***************************************************/
-// 10180
+// https://issues.dlang.org/show_bug.cgi?id=10180
template TypeTuple10180(TL...) { alias TypeTuple10180 = TL; }
@@ -1580,7 +1582,7 @@ void test10180()
}
/***************************************************/
-// 10456
+// https://issues.dlang.org/show_bug.cgi?id=10456
void test10456()
{
@@ -1596,7 +1598,7 @@ struct S10456
}
/***************************************************/
-// 11261
+// https://issues.dlang.org/show_bug.cgi?id=11261
template Tuple11261(Specs...)
{
@@ -1686,7 +1688,7 @@ void test11261()
}
/***************************************************/
-// 11333
+// https://issues.dlang.org/show_bug.cgi?id=11333
alias id11333(a...) = a;
@@ -1712,7 +1714,22 @@ void test11333()
}
/***************************************************/
-// 11800
+// https://issues.dlang.org/show_bug.cgi?id=11538
+
+struct NullableRef11538(T)
+{
+ T* _value;
+ inout(T) get() inout { return *_value; }
+ alias get this;
+}
+
+struct S11538
+{
+ NullableRef11538!S11538 parent;
+}
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11800
struct A11800
{
@@ -1739,7 +1756,7 @@ void test11800()
}
/***************************************************/
-// 12008
+// https://issues.dlang.org/show_bug.cgi?id=12008
struct RefCounted12008(T)
{
@@ -1792,7 +1809,7 @@ struct Group12008
}
/***************************************************/
-// 12038
+// https://issues.dlang.org/show_bug.cgi?id=12038
bool f12038(void* p) { return true; }
@@ -1803,7 +1820,7 @@ struct S12038
}
/***************************************************/
-// 13490
+// https://issues.dlang.org/show_bug.cgi?id=13490
struct S13490
{
@@ -1830,7 +1847,7 @@ void test13490()
}
/***************************************************/
-// 11355
+// https://issues.dlang.org/show_bug.cgi?id=11355
struct A11355
{
@@ -1855,7 +1872,7 @@ void test11355()
}
/***************************************************/
-// 13009
+// https://issues.dlang.org/show_bug.cgi?id=13009
struct T13009
{
@@ -1909,7 +1926,7 @@ void test13009()
}
/***************************************************/
-// 14806
+// https://issues.dlang.org/show_bug.cgi?id=14806
struct Nullable14806
{
@@ -1926,18 +1943,18 @@ struct Foo14806(T)
void test14806()
{
Foo14806!int a, b;
- assert(a != b);
+ assert(a == b);
// ==> a.tupleof != b.tupleof
// ==> a.bar != b.bar || a.baz.get() != b.baz.get()
Foo14806!string c, d;
- assert(c != d);
+ assert(c == d);
// ==> c.tupleof != d.tupleof
// ==> c.bar != d.bar || c.baz.get() != d.baz.get()
}
/***************************************************/
-// 14948
+// https://issues.dlang.org/show_bug.cgi?id=14948
struct RefCounted14948(T)
{
@@ -1967,7 +1984,7 @@ void test14948()
}
/***************************************************/
-// 15292
+// https://issues.dlang.org/show_bug.cgi?id=15292
struct NullableRef15292(T)
{
@@ -1998,6 +2015,129 @@ struct S15292
/***************************************************/
+struct S19284a { int x; }
+struct S19284b
+{
+ S19284a s;
+ alias s this;
+ int t;
+ void f()
+ {
+ void wrapped()
+ {
+ x = 1;
+ t = 1;
+ }
+ wrapped(); // <-- 'x' not found, whereas 's.x' works fine
+ }
+
+ void f1()
+ {
+ x = 2;
+ }
+
+ void f2()
+ {
+ int x;
+ void wrapped()
+ {
+ x = 7;
+ }
+ wrapped();
+ assert(x == 7);
+ }
+
+ void f3()
+ {
+ void wrapped()
+ {
+ void wrapped2()
+ {
+ x = 5;
+ }
+ wrapped2();
+ }
+ wrapped();
+ }
+}
+
+void test19284()
+{
+ S19284b t;
+
+ // nested function modifies alias this
+ t.f();
+ assert(t.x == 1);
+ assert(t.t == 1);
+
+ // member function modifies alias this
+ t.f1();
+ assert(t.x == 2);
+
+ // nested function does not modify alias this when it is shadowd by a local variable
+ t.f2();
+ assert(t.x == 2);
+
+ // multiple levels of nesting
+ t.f3();
+ assert(t.x == 5);
+}
+
+// 16633
+
+class Item
+{
+ alias children this;
+ Item[] children;
+ void populate()
+ {
+ children ~= new Item(); // Item is seen as []
+ assert(children.length == 1);
+ }
+}
+
+void test16633()
+{
+ Item root = new Item();
+ root.populate;
+}
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=13009
+
+struct RefCounted13009_2(T)
+{
+ ref T refCountedPayload()
+ {
+ assert(false);
+ }
+
+ ref inout(T) refCountedPayload() inout
+ {
+ assert(false);
+ }
+
+ alias refCountedPayload this;
+}
+
+struct S13009_2
+{
+ struct Payload
+ {
+ int[] data;
+ }
+
+ RefCounted13009_2!Payload payload;
+ alias X = typeof(payload.data[0]);
+
+ void foo()
+ {
+ payload.data[0] = 0;
+ }
+}
+
+/***************************************************/
+
int main()
{
test1();
@@ -2054,6 +2194,8 @@ int main()
test13490();
test11355();
test14806();
+ test19284();
+ test16633();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/arrayop.d b/gcc/testsuite/gdc.test/runnable/arrayop.d
index 8c6b083..4c0836a 100644
--- a/gcc/testsuite/gdc.test/runnable/arrayop.d
+++ b/gcc/testsuite/gdc.test/runnable/arrayop.d
@@ -48,28 +48,28 @@ template Floating(T)
abc = null;
A()[] = B()[] + C()[];
- assert(abc == "BCA");
+ assert(abc == "ABC");
assert(a[0] == 5);
assert(a[1] == 7);
assert(a[2] == 9);
abc = null;
A()[] = B()[] + 4;
- assert(abc == "BA");
+ assert(abc == "AB");
assert(a[0] == 5);
assert(a[1] == 6);
assert(a[2] == 7);
abc = null;
A()[] = 4 + B()[];
- assert(abc == "BA");
+ assert(abc == "AB");
assert(a[0] == 5);
assert(a[1] == 6);
assert(a[2] == 7);
abc = null;
A()[] = D() + B()[];
- assert(abc == "DBA");
+ assert(abc == "ADB");
assert(a[0] == 5);
assert(a[1] == 6);
assert(a[2] == 7);
@@ -77,7 +77,7 @@ template Floating(T)
a = [11, 22, 33];
abc = null;
A()[] += B()[];
- assert(abc == "BA");
+ assert(abc == "AB");
assert(a[0] == 12);
assert(a[1] == 24);
assert(a[2] == 36);
@@ -115,14 +115,14 @@ template Floating(T)
a = [11, 22, 33];
abc = null;
A()[] += 4 + B()[];
- assert(abc == "BA");
+ assert(abc == "AB");
assert(a[0] == 16);
assert(a[1] == 28);
assert(a[2] == 40);
abc = null;
A()[] = B()[] - C()[];
- assert(abc == "BCA");
+ assert(abc == "ABC");
printf("%Lg, %Lg, %Lg\n", cast(real)a[0], cast(real)a[1], cast(real)a[2]);
assert(a[0] == -3);
assert(a[1] == -3);
@@ -130,7 +130,7 @@ template Floating(T)
abc = null;
A()[] = -B()[] - C()[];
- assert(abc == "BCA");
+ assert(abc == "ABC");
printf("%Lg, %Lg, %Lg\n", cast(real)a[0], cast(real)a[1], cast(real)a[2]);
assert(a[0] == -5);
assert(a[1] == -7);
@@ -138,7 +138,7 @@ template Floating(T)
abc = null;
A()[] = B()[] + C()[] * 4;
- assert(abc == "BCA");
+ assert(abc == "ABC");
printf("%Lg, %Lg, %Lg\n", cast(real)a[0], cast(real)a[1], cast(real)a[2]);
assert(a[0] == 17);
assert(a[1] == 22);
@@ -146,7 +146,7 @@ template Floating(T)
abc = null;
A()[] = B()[] + C()[] * B()[];
- assert(abc == "BCBA");
+ assert(abc == "ABCB");
printf("%Lg, %Lg, %Lg\n", cast(real)a[0], cast(real)a[1], cast(real)a[2]);
assert(a[0] == 5);
assert(a[1] == 12);
@@ -154,7 +154,7 @@ template Floating(T)
abc = null;
A()[] = B()[] + C()[] / 2;
- assert(abc == "BCA");
+ assert(abc == "ABC");
printf("%Lg, %Lg, %Lg\n", cast(real)a[0], cast(real)a[1], cast(real)a[2]);
assert(a[0] == 3);
assert(a[1] == 4.5);
@@ -162,7 +162,7 @@ template Floating(T)
abc = null;
A()[] = B()[] + C()[] % 2;
- assert(abc == "BCA");
+ assert(abc == "ABC");
printf("%Lg, %Lg, %Lg\n", cast(real)a[0], cast(real)a[1], cast(real)a[2]);
assert(a[0] == 1);
assert(a[1] == 3);
@@ -226,28 +226,28 @@ template Integral(T)
abc = null;
A()[] = B()[] + C()[];
- assert(abc == "BCA");
+ assert(abc == "ABC");
assert(a[0] == 5);
assert(a[1] == 7);
assert(a[2] == 9);
abc = null;
A()[] = B()[] + 4;
- assert(abc == "BA");
+ assert(abc == "AB");
assert(a[0] == 5);
assert(a[1] == 6);
assert(a[2] == 7);
abc = null;
A()[] = 4 + B()[];
- assert(abc == "BA");
+ assert(abc == "AB");
assert(a[0] == 5);
assert(a[1] == 6);
assert(a[2] == 7);
abc = null;
A()[] = D() + B()[];
- assert(abc == "DBA");
+ assert(abc == "ADB");
assert(a[0] == 5);
assert(a[1] == 6);
assert(a[2] == 7);
@@ -255,7 +255,7 @@ template Integral(T)
a = [11, 22, 33];
abc = null;
A()[] += B()[];
- assert(abc == "BA");
+ assert(abc == "AB");
assert(a[0] == 12);
assert(a[1] == 24);
assert(a[2] == 36);
@@ -311,14 +311,14 @@ template Integral(T)
a = [11, 22, 33];
abc = null;
A()[] += 4 + B()[];
- assert(abc == "BA");
+ assert(abc == "AB");
assert(a[0] == 16);
assert(a[1] == 28);
assert(a[2] == 40);
abc = null;
A()[] = B()[] - C()[];
- assert(abc == "BCA");
+ assert(abc == "ABC");
printf("%lld, %lld, %lld\n", cast(long)a[0], cast(long)a[1], cast(long)a[2]);
assert(a[0] == -3);
assert(a[1] == -3);
@@ -326,7 +326,7 @@ template Integral(T)
abc = null;
A()[] = -B()[] - C()[];
- assert(abc == "BCA");
+ assert(abc == "ABC");
printf("%lld, %lld, %lld\n", cast(long)a[0], cast(long)a[1], cast(long)a[2]);
assert(a[0] == -5);
assert(a[1] == -7);
@@ -334,7 +334,7 @@ template Integral(T)
abc = null;
A()[] = B()[] + C()[] * 4;
- assert(abc == "BCA");
+ assert(abc == "ABC");
printf("%lld, %lld, %lld\n", cast(long)a[0], cast(long)a[1], cast(long)a[2]);
assert(a[0] == 17);
assert(a[1] == 22);
@@ -342,7 +342,7 @@ template Integral(T)
abc = null;
A()[] = B()[] + C()[] * B()[];
- assert(abc == "BCBA");
+ assert(abc == "ABCB");
printf("%lld, %lld, %lld\n", cast(long)a[0], cast(long)a[1], cast(long)a[2]);
assert(a[0] == 5);
assert(a[1] == 12);
@@ -350,7 +350,7 @@ template Integral(T)
abc = null;
A()[] = B()[] + C()[] / 2;
- assert(abc == "BCA");
+ assert(abc == "ABC");
printf("%lld, %lld, %lld\n", cast(long)a[0], cast(long)a[1], cast(long)a[2]);
assert(a[0] == 3);
assert(a[1] == 4);
@@ -358,7 +358,7 @@ template Integral(T)
abc = null;
A()[] = B()[] + C()[] % 2;
- assert(abc == "BCA");
+ assert(abc == "ABC");
printf("%lld, %lld, %lld\n", cast(long)a[0], cast(long)a[1], cast(long)a[2]);
assert(a[0] == 1);
assert(a[1] == 3);
@@ -366,28 +366,28 @@ template Integral(T)
abc = null;
A()[] = ~B()[];
- assert(abc == "BA");
- assert(a[0] == ~cast(T)1);
- assert(a[1] == ~cast(T)2);
- assert(a[2] == ~cast(T)3);
+ assert(abc == "AB");
+ assert(a[0] == cast(T) ~1);
+ assert(a[1] == cast(T) ~2);
+ assert(a[2] == cast(T) ~3);
abc = null;
A()[] = B()[] & 2;
- assert(abc == "BA");
+ assert(abc == "AB");
assert(a[0] == 0);
assert(a[1] == 2);
assert(a[2] == 2);
abc = null;
A()[] = B()[] | 2;
- assert(abc == "BA");
+ assert(abc == "AB");
assert(a[0] == 3);
assert(a[1] == 2);
assert(a[2] == 3);
abc = null;
A()[] = B()[] ^ 2;
- assert(abc == "BA");
+ assert(abc == "AB");
assert(a[0] == 3);
assert(a[1] == 0);
assert(a[2] == 1);
@@ -439,7 +439,7 @@ void test4662()
}
/***************************************************/
-// 5284
+// https://issues.dlang.org/show_bug.cgi?id=5284
void bug5284_1()
{
@@ -550,7 +550,7 @@ void test8390() {
}
/************************************************************************/
-// 8651
+// https://issues.dlang.org/show_bug.cgi?id=8651
void test8651()
{
@@ -605,7 +605,7 @@ void test8651()
}
/************************************************************************/
-// 9656
+// https://issues.dlang.org/show_bug.cgi?id=9656
void test9656()
{
@@ -628,14 +628,14 @@ void test9656()
{
int[] ma = [1,2,3];
- immutable ia = ma.dup;
+ immutable ia = ma.idup;
}
{
static struct V { int val; }
V[] ma = [V(1), V(2)];
- immutable ia = ma.dup;
+ immutable ia = ma.idup;
}
{
@@ -651,7 +651,7 @@ void test9656()
}
/************************************************************************/
-// 10282
+// https://issues.dlang.org/show_bug.cgi?id=10282
void test10282()
{
@@ -669,7 +669,7 @@ void test10282()
}
/************************************************************************/
-// 10433
+// https://issues.dlang.org/show_bug.cgi?id=10433
void test10433()
{
@@ -684,7 +684,7 @@ void test10433()
}
/************************************************************************/
-// 10684
+// https://issues.dlang.org/show_bug.cgi?id=10684
void test10684a()
{
@@ -716,7 +716,7 @@ void test10684b()
}
/************************************************************************/
-// 11376
+// https://issues.dlang.org/show_bug.cgi?id=11376
template TL11376(T...)
{
@@ -732,7 +732,7 @@ auto sumArrs11376(T0, T1)(T0[] a, T1[] b)
static assert(!__traits(compiles, sumArrs11376(TL11376!(string[], string).init)));
/************************************************************************/
-// 11525
+// https://issues.dlang.org/show_bug.cgi?id=11525
void test11525()
{
@@ -756,7 +756,7 @@ void test11525()
}
/************************************************************************/
-// 12250
+// https://issues.dlang.org/show_bug.cgi?id=12250
void f12250(inout int[] p, inout int[] q, int[] r)
{
@@ -774,7 +774,7 @@ void test12250()
}
/************************************************************************/
-// 12179
+// https://issues.dlang.org/show_bug.cgi?id=12179
void test12179()
{
@@ -792,7 +792,7 @@ void test12179()
foo(a[] |= a[]);
foo(a[] ^^= a[]);
- // from issue 11992
+ // from https://issues.dlang.org/show_bug.cgi?id=11992
int[] arr1;
int[][] arr2;
arr1 ~= (a[] = [1] + a[]); // OK
@@ -800,7 +800,7 @@ void test12179()
}
/************************************************************************/
-// 12780
+// https://issues.dlang.org/show_bug.cgi?id=12780
void test12780()
{
@@ -854,7 +854,7 @@ void test12780()
}
/************************************************************************/
-// 13497
+// https://issues.dlang.org/show_bug.cgi?id=13497
void test13497()
{
@@ -866,7 +866,7 @@ void test13497()
}
/************************************************************************/
-// 14649
+// https://issues.dlang.org/show_bug.cgi?id=14649
void test14649()
{
@@ -891,7 +891,7 @@ void test14649()
}
/************************************************************************/
-// 14851
+// https://issues.dlang.org/show_bug.cgi?id=14851
void test14851()
{
diff --git a/gcc/testsuite/gdc.test/runnable/auto1.d b/gcc/testsuite/gdc.test/runnable/auto1.d
index e68b063..ea02383 100644
--- a/gcc/testsuite/gdc.test/runnable/auto1.d
+++ b/gcc/testsuite/gdc.test/runnable/auto1.d
@@ -1,3 +1,16 @@
+/*
+RUN_OUTPUT:
+---
+Foo.~this()
+Foo.~this()
+Foo.~this()
+Foo.~this()
+A2.this()
+Hello world.
+A2.~this()
+Success
+---
+*/
import core.stdc.stdio;
diff --git a/gcc/testsuite/gdc.test/runnable/b10562.d b/gcc/testsuite/gdc.test/runnable/b10562.d
new file mode 100644
index 0000000..cf79d16
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/b10562.d
@@ -0,0 +1,93 @@
+void main()
+{
+ {
+ int[3] ok = 3;
+ assert(ok == [ 3, 3, 3]);
+
+ ok = 1;
+ assert(ok == [ 1, 1, 1]);
+
+ int[][] da2;
+ assert(da2 == []);
+ }
+ {
+ int[3][2] a;
+ assert(a == [ [ 0, 0, 0 ], [ 0, 0, 0 ] ]);
+
+ int[3][2] b = 4;
+ assert(b == [ [ 4, 4, 4 ], [ 4, 4, 4 ] ]);
+
+ // b = 9;
+ // assert(b == [ [ 9, 9, 9 ], [ 9, 9, 9 ] ]);
+
+ int[3][2] c = [ 1, 2, 3 ];
+ assert(c == [ [ 1, 2, 3 ], [ 1, 2, 3 ] ]);
+
+ c = [ 5, 6, 7 ];
+ assert(c == [ [ 5, 6, 7 ], [ 5, 6, 7 ] ]);
+
+ int[3][2] d = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+ assert(d == [ [ 1, 2, 3 ], [ 4, 5, 6 ] ]);
+ }
+ {
+ int[3][2][4] a;
+ assert(a == [ [ [ 0, 0, 0 ], [ 0, 0, 0 ] ],
+ [ [ 0, 0, 0 ], [ 0, 0, 0 ] ],
+ [ [ 0, 0, 0 ], [ 0, 0, 0 ] ],
+ [ [ 0, 0, 0 ], [ 0, 0, 0 ] ] ]);
+
+ // a = 1;
+ // assert(a == [ [ [ 1, 1, 1 ], [ 1, 1, 1 ] ],
+ // [ [ 1, 1, 1 ], [ 1, 1, 1 ] ],
+ // [ [ 1, 1, 1 ], [ 1, 1, 1 ] ],
+ // [ [ 1, 1, 1 ], [ 1, 1, 1 ] ] ]);
+
+ int[3][2][4] b = [ 1, 2, 3 ];
+ assert(b == [ [ [ 1, 2, 3 ], [ 1, 2, 3 ] ],
+ [ [ 1, 2, 3 ], [ 1, 2, 3 ] ],
+ [ [ 1, 2, 3 ], [ 1, 2, 3 ] ],
+ [ [ 1, 2, 3 ], [ 1, 2, 3 ] ] ]);
+
+ // b = [ 4, 5, 6];
+ // assert(b == [ [ [ 4, 5, 6 ], [ 4, 5, 6 ] ],
+ // [ [ 4, 5, 6 ], [ 4, 5, 6 ] ],
+ // [ [ 4, 5, 6 ], [ 4, 5, 6 ] ],
+ // [ [ 4, 5, 6 ], [ 4, 5, 6 ] ] ]);
+
+ int[3][2][4] c = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+ assert(c == [ [ [ 1, 2, 3 ], [ 4, 5, 6 ] ],
+ [ [ 1, 2, 3 ], [ 4, 5, 6 ] ],
+ [ [ 1, 2, 3 ], [ 4, 5, 6 ] ],
+ [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] ]);
+
+ c = [ [ 4, 5, 6 ], [ 7, 8, 9 ] ];
+ assert(c == [ [ [ 4, 5, 6 ], [ 7, 8, 9 ] ],
+ [ [ 4, 5, 6 ], [ 7, 8, 9 ] ],
+ [ [ 4, 5, 6 ], [ 7, 8, 9 ] ],
+ [ [ 4, 5, 6 ], [ 7, 8, 9 ] ] ]);
+ }
+ {
+ int[3] val = [4, 5, 6];
+ int[3][2][4] a = val[];
+
+ assert(a == [ [ [ 4, 5, 6 ], [ 4, 5, 6 ] ],
+ [ [ 4, 5, 6 ], [ 4, 5, 6 ] ],
+ [ [ 4, 5, 6 ], [ 4, 5, 6 ] ],
+ [ [ 4, 5, 6 ], [ 4, 5, 6 ] ] ]);
+ }
+ {
+ // https://issues.dlang.org/show_bug.cgi?id=10562
+ int[3] value = [ 1, 2, 3 ];
+ int[3][2] a = value; // <-- COMPILATION ERROR
+ assert(a == [ [ 1, 2, 3 ], [ 1, 2, 3 ] ]);
+ }
+ {
+ // https://issues.dlang.org/show_bug.cgi?id=20465
+ int[][3][2] arr;
+ assert(arr == [[ null, null, null ], [ null, null, null ]]);
+
+ // int[] slice = [ 1 ];
+ // arr = slice;
+ // assert(arr == [[ slice, slice, slice ], [ slice, slice, slice ]]);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/b16360.d b/gcc/testsuite/gdc.test/runnable/b16360.d
new file mode 100644
index 0000000..50c28e6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/b16360.d
@@ -0,0 +1,50 @@
+// REQUIRED_ARGS: -inline
+
+pragma(inline, true)
+auto foo()
+{
+ static struct U
+ {
+ int a = 42;
+ float b;
+ }
+ U u;
+ return u.a;
+}
+
+pragma(inline, true)
+T bitCast(T, S)(auto ref S s)
+{
+ union BitCaster
+ {
+ S ss;
+ T tt;
+ }
+ BitCaster bt;
+ bt.ss = s;
+ return bt.tt;
+}
+
+pragma(inline, true)
+int withFuncCalls()
+{
+ static struct WithFuncCalls
+ {
+ int v;
+ pragma(inline, true)
+ int call(){return v;}
+ pragma(inline, true)
+ void otherCall(){v++;}
+ }
+ auto bt = WithFuncCalls(50);
+ bt.v += -9;
+ bt.otherCall();
+ return bt.call();
+}
+
+void main()
+{
+ assert(foo == 42);
+ assert(bitCast!int(1.0f) == 0x3f800000);
+ assert(withFuncCalls() == 42);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/b18034.d b/gcc/testsuite/gdc.test/runnable/b18034.d
new file mode 100644
index 0000000..3981aaf
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/b18034.d
@@ -0,0 +1,28 @@
+// REQUIRED_ARGS: -O
+import core.simd;
+
+static if (__traits(compiles, { void16 a; ushort8 b; }))
+{
+ void check(void16 a)
+ {
+ foreach (x; (cast(ushort8)a).array)
+ {
+ assert(x == 1);
+ }
+ }
+
+ void make(ushort x)
+ {
+ ushort8 v = ushort8(x);
+ check(v);
+ }
+
+ void main()
+ {
+ make(1);
+ }
+}
+else
+{
+ void main() { }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/b19294.d b/gcc/testsuite/gdc.test/runnable/b19294.d
new file mode 100644
index 0000000..5700195
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/b19294.d
@@ -0,0 +1,163 @@
+alias T = MyStruct!float;
+
+struct MyStruct(U)
+{
+ U x;
+ U y;
+
+ this(U xx, U yy)
+ {
+ x = xx;
+ y = yy;
+ }
+
+ MyStruct!U opBinary(string op)(MyStruct!U z) const
+ {
+ alias C = typeof(return);
+ auto w = C(this.x, this.y);
+ return w.opOpAssign!(op)(z);
+ }
+
+ MyStruct!U opBinaryRight(string op)(MyStruct!U z) const
+ {
+ return opBinary!(op)(z);
+ }
+
+ ref MyStruct opOpAssign(string op, U)(const MyStruct!U z)
+ {
+ mixin ("x "~op~"= z.x;");
+ mixin ("y "~op~"= z.y;");
+ return this;
+ }
+
+ MyStruct!U opBinary(string op, R)(R z) const
+ if (is(R == int) || is(R == float))
+ {
+ alias C = typeof(return);
+ auto w = C(this.x, this.y);
+ return w.opOpAssign!(op)(z);
+ }
+
+ MyStruct!U opBinaryRight(string op, R)(R z) const
+ if (is(R == int) || is(R == float))
+ {
+ return opBinary!(op)(z);
+ }
+
+ ref MyStruct opOpAssign(string op, R)(const R z)
+ if (is(R == int) || is(R == float))
+ {
+ mixin ("x "~op~"= z;");
+ return this;
+ }
+}
+
+void main()
+{
+ T c = MyStruct!float(1.0f, 1.0f);
+ T[] arr = [T(1,1), T(2,2), T(3,3), T(4,4), T(5,5), T(6,6)];
+ T[] result = new T[arr.length];
+
+ // part 2
+
+ result[0] = c * c;
+ assert(result[0] == T(1, 1));
+
+ result[0] = arr[1] * arr[2];
+ assert(result[0] == T(6, 6));
+
+ int[] intarr = [6, 5, 4, 3, 2, 1];
+
+ result[] = arr[] * arr[];
+ assert(result[] == [T(1, 1), T(4, 4), T(9, 9), T(16, 16), T(25, 25), T(36, 36)]);
+
+ result[] = arr[] * 3;
+ assert(result[] == [T(3, 1), T(6, 2), T(9, 3), T(12, 4), T(15, 5), T(18, 6)]);
+ result[] = 3 * arr[];
+ assert(result[] == [T(3, 1), T(6, 2), T(9, 3), T(12, 4), T(15, 5), T(18, 6)]);
+
+ result[] = arr[];
+ result[1..3] = arr[1..3] * 2.0f;
+ assert(result[] == [T(1, 1), T(4, 2), T(6, 3), T(4, 4), T(5, 5), T(6, 6)]);
+ result[1..3] = 2.0f * arr[1..3];
+ assert(result[] == [T(1, 1), T(4, 2), T(6, 3), T(4, 4), T(5, 5), T(6, 6)]);
+
+ result[] = arr[];
+ result[1..$] = arr[1..$] * 2.0f;
+ assert(result[] == [T(1, 1), T(4, 2), T(6, 3), T(8, 4), T(10, 5), T(12, 6)]);
+ result[1..$] = 2.0f * arr[1..$];
+ assert(result[] == [T(1, 1), T(4, 2), T(6, 3), T(8, 4), T(10, 5), T(12, 6)]);
+
+ result[] = intarr[] * arr[];
+ assert(result[] == [T(6, 1), T(10, 2), T(12, 3), T(12, 4), T(10, 5), T(6, 6)]);
+ result[] = arr[] * intarr[];
+ assert(result[] == [T(6, 1), T(10, 2), T(12, 3), T(12, 4), T(10, 5), T(6, 6)]);
+
+ result[] = intarr[] * T(2,3);
+ assert(result[] == [T(12, 3), T(10, 3), T(8, 3), T(6, 3), T(4, 3), T(2, 3)]);
+ result[] = T(2,3) * intarr[];
+ assert(result[] == [T(12, 3), T(10, 3), T(8, 3), T(6, 3), T(4, 3), T(2, 3)]);
+
+ result[] = intarr[] * c;
+ assert(result[] == [T(6, 1), T(5, 1), T(4, 1), T(3, 1), T(2, 1), T(1, 1)]);
+ result[] = c * intarr[];
+ assert(result[] == [T(6, 1), T(5, 1), T(4, 1), T(3, 1), T(2, 1), T(1, 1)]);
+
+ result[] = arr[];
+ result[1..3] = intarr[1..3] * c;
+ assert(result[] == [T(1, 1), T(5, 1), T(4, 1), T(4, 4), T(5, 5), T(6, 6)]);
+ result[1..3] = c * intarr[1..3];
+ assert(result[] == [T(1, 1), T(5, 1), T(4, 1), T(4, 4), T(5, 5), T(6, 6)]);
+
+ result[1..$] = intarr[1..$] * c;
+ assert(result[] == [T(1, 1), T(5, 1), T(4, 1), T(3, 1), T(2, 1), T(1, 1)]);
+ result[1..$] = c * intarr[1..$];
+ assert(result[] == [T(1, 1), T(5, 1), T(4, 1), T(3, 1), T(2, 1), T(1, 1)]);
+
+ result[] = arr[];
+ result[1..3] = intarr[1..3] * arr[1..3];
+ assert(result[] == [T(1, 1), T(10, 2), T(12, 3), T(4, 4), T(5, 5), T(6, 6)]);
+ result[1..3] = arr[1..3] * intarr[1..3];
+ assert(result[] == [T(1, 1), T(10, 2), T(12, 3), T(4, 4), T(5, 5), T(6, 6)]);
+
+ result[] = [1,2,3,4,5,6] * c;
+ assert(result[] == [T(1, 1), T(2, 1), T(3, 1), T(4, 1), T(5, 1), T(6, 1)]);
+ result[] = c * [1,2,3,4,5,6];
+ assert(result[] == [T(1, 1), T(2, 1), T(3, 1), T(4, 1), T(5, 1), T(6, 1)]);
+
+ result[] = arr[] * [1,2,3,4,5,6];
+ assert(result[] == [T(1, 1), T(4, 2), T(9, 3), T(16, 4), T(25, 5), T(36, 6)]);
+ result[] = [1,2,3,4,5,6] * arr[];
+ assert(result[] == [T(1, 1), T(4, 2), T(9, 3), T(16, 4), T(25, 5), T(36, 6)]);
+
+ result[] = [c, 2 * c, 3 * c, 4 * c, 5 * c, 6 * c] * [c, 2 * c, 3 * c, 4 * c, 5 * c, 6 * c];
+ assert(result[] == [T(1, 1), T(4, 1), T(9, 1), T(16, 1), T(25, 1), T(36, 1)]);
+
+ result[] = [c, 2 * c, 3 * c, 4 * c, 5 * c, 6 * c] * [1,2,3,4,5,6];
+ assert(result[] == [T(1, 1), T(4, 1), T(9, 1), T(16, 1), T(25, 1), T(36, 1)]);
+ result[] = [1,2,3,4,5,6] * [c, 2 * c, 3 * c, 4 * c, 5 * c, 6 * c];
+ assert(result[] == [T(1, 1), T(4, 1), T(9, 1), T(16, 1), T(25, 1), T(36, 1)]);
+
+ result[] = arr[] * c;
+ assert(result[] == [T(1, 1), T(2, 2), T(3, 3), T(4, 4), T(5, 5), T(6, 6)]);
+ result[] = c * arr[];
+ assert(result[] == [T(1, 1), T(2, 2), T(3, 3), T(4, 4), T(5, 5), T(6, 6)]);
+
+ result[] = c * 3.0f * arr[];
+ assert(result[] == [T(3, 1), T(6, 2), T(9, 3), T(12, 4), T(15, 5), T(18, 6)]);
+ result[] = 3.0f * c * arr[];
+ assert(result[] == [T(3, 1), T(6, 2), T(9, 3), T(12, 4), T(15, 5), T(18, 6)]);
+
+ result[] = arr[] * 3.0f * c;
+ assert(result[] == [T(3, 1), T(6, 2), T(9, 3), T(12, 4), T(15, 5), T(18, 6)]);
+ // result[] = arr[] * c * 3.0f; //not ok
+ // assert(result[] == [T(3, 1), T(6, 2), T(9, 3), T(12, 4), T(15, 5), T(18, 6)]);
+
+ result[] = 3.0f * arr[] * c;
+ assert(result[] == [T(3, 1), T(6, 2), T(9, 3), T(12, 4), T(15, 5), T(18, 6)]);
+ // result[] = c * arr[] * 3.0f; //not ok
+ // assert(result[] == [T(3, 1), T(6, 2), T(9, 3), T(12, 4), T(15, 5), T(18, 6)]);
+
+ result[] = c * arr[] * c;
+ assert(result[] == [T(1, 1), T(2, 2), T(3, 3), T(4, 4), T(5, 5), T(6, 6)]);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/b19584.d b/gcc/testsuite/gdc.test/runnable/b19584.d
new file mode 100644
index 0000000..8eb790e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/b19584.d
@@ -0,0 +1,13 @@
+/*
+REQUIRED_ARGS: -O
+*/
+void main()
+{
+ int a = 711;
+ assert(182215 == (a | (a << 8)));
+ assert(182727 == (a * (1 + (1 << 8))));
+
+ int b = 31;
+ assert(511 == (b | (b << 4)));
+ assert(527 == (b * (1 + (1 << 4))));
+}
diff --git a/gcc/testsuite/gdc.test/runnable/b20470.d b/gcc/testsuite/gdc.test/runnable/b20470.d
new file mode 100644
index 0000000..73d8d10
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/b20470.d
@@ -0,0 +1,97 @@
+// https://issues.dlang.org/show_bug.cgi?id=20470
+
+alias AliasSeq(Args...) = Args;
+
+int g, h;
+
+void test0()
+{
+ static struct S
+ {
+ int a, b;
+ float c = 0, d = 0;
+ alias fields = AliasSeq!(a, b, c, d);
+ alias ints = AliasSeq!(a, b);
+ alias floats = AliasSeq!(c, d);
+ alias reversed = AliasSeq!(d, c, b, a);
+ alias globals = AliasSeq!(g, h);
+
+ alias properties = AliasSeq!(e, f);
+ @property int e() { return a; }
+ @property void e(int i) { a = i; }
+ @property float f() { return c; }
+ @property void f(float j) { c = j; }
+ }
+
+ S s;
+ assert(s.fields == AliasSeq!(0, 0, 0, 0));
+ s.ints = AliasSeq!(1, 2);
+ assert(s.fields == AliasSeq!(1, 2, 0, 0));
+ s.floats = AliasSeq!(3, 4);
+ assert(s.fields == AliasSeq!(1, 2, 3, 4));
+
+ int a, b;
+ float c, d;
+ AliasSeq!(d, c, b, a) = s.reversed;
+ assert(AliasSeq!(a, b, c, d) == AliasSeq!(1, 2, 3, 4));
+
+ s.globals = AliasSeq!(30, 40);
+ assert(g == 30 && h == 40);
+
+ // Propagating `this` to functions and properties within tuples will be a breaking change.
+ // See `test2()` below for an example of existing code that would need to be fixed.
+
+ //s.properties = AliasSeq!(11, 12);
+ //assert(s.e == 11 && s.f == 12);
+}
+
+class Nested(Vars...)
+{
+ int a, b;
+ alias outervars = Vars;
+ alias fields = AliasSeq!(a, b);
+ alias all = AliasSeq!(a, b, Vars);
+}
+
+auto makeNested()
+{
+ static class C
+ {
+ bool b;
+ double d;
+ auto nested() { return new Nested!(b, d)(); }
+ }
+ return new C().nested();
+}
+
+void test1()
+{
+ auto n = makeNested();
+ n.fields = AliasSeq!(1, 2);
+ n.outervars = AliasSeq!(true, 1.3);
+ assert(n.all == AliasSeq!(1, 2, true, 1.3));
+}
+
+void test2()
+{
+ // backwards compatibility test for functions within tuples
+
+ static struct S
+ {
+ void f();
+ void g();
+ alias funcs = AliasSeq!(f, g);
+ }
+
+ S s;
+ alias voidTf = void();
+ foreach (f; s.funcs)
+ static assert(is(typeof(f) == voidTf));
+}
+
+void main()
+{
+ test0();
+ test1();
+ test2();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/b20890.d b/gcc/testsuite/gdc.test/runnable/b20890.d
new file mode 100644
index 0000000..9b208da
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/b20890.d
@@ -0,0 +1,48 @@
+module b20890;
+// https://issues.dlang.org/show_bug.cgi?id=20890
+
+struct S0 { }
+void format0(string spec, S0[1] s)
+{
+ assert (spec == "lengthy");
+}
+struct S1 { ubyte m = 42; }
+void format1(string spec, S1[1] s)
+{
+ assert (spec == "lengthy");
+ assert (s[0].m == 42);
+}
+struct S2 { ushort m = 42; }
+void format2(string spec, S2[1] s)
+{
+ assert (spec == "lengthy");
+ assert (s[0].m == 42);
+}
+struct S4 { uint m = 42; }
+void format4(string spec, S4[1] s)
+{
+ assert (spec == "lengthy");
+ assert (s[0].m == 42);
+}
+struct S8 { ulong m = 42; }
+void format8(string spec, S8[1] s)
+{
+ assert (spec == "lengthy");
+ assert (s[0].m == 42);
+}
+struct S42 { ubyte[42] m = [42]; }
+void format42(string spec, S42[1] s)
+{
+ assert (spec == "lengthy");
+ assert (s[0].m[0] == 42);
+}
+
+void main()
+{
+ { S0[1] s; format0("lengthy", s); }
+ { S1[1] s; format1("lengthy", s); }
+ { S2[1] s; format2("lengthy", s); }
+ { S4[1] s; format4("lengthy", s); }
+ { S8[1] s; format8("lengthy", s); }
+ {S42[1] s;format42("lengthy", s); }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/b26.d b/gcc/testsuite/gdc.test/runnable/b26.d
index e32533b..54e28da 100644
--- a/gcc/testsuite/gdc.test/runnable/b26.d
+++ b/gcc/testsuite/gdc.test/runnable/b26.d
@@ -2,7 +2,7 @@
// EXTRA_SOURCES: imports/b26a.d
// PERMUTE_ARGS:
-// 382
+// https://issues.dlang.org/show_bug.cgi?id=382
struct List(T) {
interface A {}
diff --git a/gcc/testsuite/gdc.test/runnable/b6400.d b/gcc/testsuite/gdc.test/runnable/b6400.d
new file mode 100644
index 0000000..8b10184
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/b6400.d
@@ -0,0 +1,69 @@
+/* TEST_OUTPUT:
+---
+Foo
+Bar
+Foo
+Bar
+Bar
+Foo
+Bar
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=6400
+
+enum int base(string name) = 10 * (name[$-1] - '0');
+struct Foo { int opDispatch(string name)() { pragma(msg, "Foo"); return base!name + 1; } }
+struct Bar { int opDispatch(string name)() { pragma(msg, "Bar"); return base!name + 2; } }
+struct Baz { }
+
+void main()
+{
+ assert(test());
+ static assert(test());
+}
+
+bool test()
+{
+ auto foo = new Foo;
+ auto bar = new Bar;
+ auto baz = new Baz;
+
+ with (foo)
+ {
+ assert(f1() == 11);
+ with (baz) assert(f1() == 11);
+ with (bar)
+ {
+ assert(f2() == 22);
+ with (baz) assert(f2() == 22);
+ with (foo)
+ {
+ assert(f3() == 31);
+ with (baz) assert(f3() == 31);
+ with (bar)
+ {
+ assert(f4() == 42);
+ with (baz) assert(f4() == 42);
+ with (baz)
+ {
+ assert(f5() == 52);
+ with (baz) assert(f5() == 52);
+ }
+ with (foo)
+ {
+ assert(f6() == 61);
+ with (baz) assert(f6() == 61);
+ }
+ with (bar)
+ {
+ assert(f7() == 72);
+ with (baz) assert(f7() == 72);
+ }
+ }
+ }
+ }
+ }
+
+ return true;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/bench1.d b/gcc/testsuite/gdc.test/runnable/bench1.d
index 74b24a4..d19ba9a 100644
--- a/gcc/testsuite/gdc.test/runnable/bench1.d
+++ b/gcc/testsuite/gdc.test/runnable/bench1.d
@@ -1,5 +1,12 @@
-// REQUIRED_ARGS:
-// EXECUTE_ARGS: 10000
+/*
+REQUIRED_ARGS:
+EXECUTE_ARGS: 10000
+RUN_OUTPUT:
+---
+count = 10000
+70000
+---
+*/
extern(C) int printf(const char *, ...);
extern(C) int atoi(const char *);
@@ -18,7 +25,7 @@ extern(C) int atoi(const char *);
s ~= "hello\n";
for (loop = 0; loop < count; loop ++)
s ~= "h";
- printf ("%d\n", s.length);
+ printf ("%llu\n", cast(ulong) s.length);
//printf("%.*s\n", s[0..100]);
assert(s.length == count * (6 + 1));
s.length = 3;
@@ -27,4 +34,3 @@ extern(C) int atoi(const char *);
s.length = 1000;
return 0;
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/betterc.d b/gcc/testsuite/gdc.test/runnable/betterc.d
new file mode 100644
index 0000000..0da798b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/betterc.d
@@ -0,0 +1,202 @@
+/* REQUIRED_ARGS: -betterC
+ PERMUTE_ARGS:
+ */
+
+
+void test(int ij)
+{
+ assert(ij);
+#line 100 "anotherfile"
+ assert(ij,"it is not zero");
+}
+
+/*******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18010
+
+void test1()
+{
+ int[10] a1 = void;
+ int[10] a2 = void;
+ a1[] = a2[];
+}
+
+void test2(int[] a1, int[] a2)
+{
+ a1[] = a2[];
+}
+
+/*******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=17843
+
+struct S
+{
+ double d = 0.0;
+ int[] x;
+}
+
+/*******************************************/
+
+extern (C) void main()
+{
+ test(1);
+ test18472();
+ testRuntimeLowerings();
+ test18457();
+}
+
+/*******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=17605
+
+extern (C) void test17605()
+{
+ int a;
+ enum bool works = __traits(compiles, { a = 1; });
+ a = 1;
+}
+
+/*******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18472
+
+void test18472()
+{
+ version(D_LP64)
+ {
+ enum b = typeid(size_t) is typeid(ulong);
+ }
+ else
+ {
+ enum b = typeid(size_t) is typeid(uint);
+ }
+
+ assert(b);
+}
+
+/*******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18493
+
+struct S18493
+{
+ this(this) nothrow { } // Since this is attributed with `nothrow` there should be no error about using
+ // try-catch with -betterC
+ ~this() { }
+}
+
+struct S18493_2
+{
+ S18493 s1;
+ S18493 s2;
+}
+
+/******************************************************
+ * tests to ensure there is sufficient runtime support
+ * in imported object.d
+ */
+mixin template initArray()
+{
+ static if (is(T == bool))
+ {
+ T[6] a1 = [true, false, true, true, false, true];
+ }
+ else static if (is(T == Sint))
+ {
+ T[6] a1 = [Sint(1), Sint(2), Sint(3), Sint(1), Sint(2), Sint(3)];
+ }
+ else
+ {
+ T[6] a1 = [1,2,3,1,2,3];
+ }
+}
+
+struct Sint
+{
+ int x;
+ this(int v) { x = v;}
+}
+
+void testRuntimeLowerings()
+{
+ // test call to `object.__equals`
+ void test__equals(T)()
+ {
+ mixin initArray;
+
+ assert(a1[0..3] == a1[3..$]);
+ }
+
+ test__equals!int;
+ test__equals!uint;
+ test__equals!long;
+ test__equals!ulong;
+ test__equals!short;
+ test__equals!ushort;
+ test__equals!byte;
+ test__equals!dchar;
+ test__equals!wchar;
+ test__equals!ubyte;
+ test__equals!char;
+ test__equals!(const char);
+ test__equals!bool;
+ test__equals!Sint;
+
+ // test call to `object.__cmp`
+ void test__cmp(T)()
+ {
+ mixin initArray;
+
+ assert(a1[0..3] >= a1[3..$]);
+ assert(a1[0..3] <= a1[3..$]);
+ }
+
+ test__cmp!int;
+ test__cmp!uint;
+ test__cmp!long;
+ test__cmp!ulong;
+ test__cmp!short;
+ test__cmp!ushort;
+ test__cmp!byte;
+ test__cmp!dchar;
+ test__cmp!wchar;
+ test__cmp!ubyte;
+ test__cmp!char;
+ test__cmp!(const char);
+ test__cmp!bool;
+ test__cmp!Sint;
+
+ // test call to `object.__switch``
+ auto s = "abc";
+ switch(s)
+ {
+ case "abc":
+ break;
+ default:
+ break;
+ }
+}
+
+/**********************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18457
+
+__gshared int dtor;
+
+struct S18457
+{
+ int a = 3;
+ ~this() { a = 0; ++dtor; }
+}
+
+S18457 myFunction()
+{
+ S18457 s = S18457();
+ return s;
+}
+
+void test18457()
+{
+ {
+ S18457 s = myFunction();
+ assert(s.a == 3);
+ assert(dtor == 0);
+ }
+ assert(dtor == 1);
+}
+
diff --git a/gcc/testsuite/gdc.test/runnable/bettercUnittest.d b/gcc/testsuite/gdc.test/runnable/bettercUnittest.d
new file mode 100644
index 0000000..ace2c14
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/bettercUnittest.d
@@ -0,0 +1,38 @@
+/*
+REQUIRED_ARGS: -betterC -unittest
+PERMUTE_ARGS:
+EXTRA_SOURCES: extra-files/moreBettercUnittests.d
+*/
+
+import moreBettercUnittests;
+
+unittest
+{
+ sum |= 0x1;
+}
+
+unittest
+{
+ sum |= 0x10;
+}
+
+extern (C) int main()
+{
+ uint count;
+
+ static foreach (alias unit; __traits(getUnitTests, bettercUnittest))
+ {
+ unit();
+ count++;
+ }
+
+ static foreach (alias unit; __traits(getUnitTests, moreBettercUnittests))
+ {
+ unit();
+ count++;
+ }
+
+ assert(count == 4);
+ assert(sum == 0x1111);
+ return sum == 0x1111 ? 0 : 1;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/bitops.d b/gcc/testsuite/gdc.test/runnable/bitops.d
index eb51f0f..28a18c4 100644
--- a/gcc/testsuite/gdc.test/runnable/bitops.d
+++ b/gcc/testsuite/gdc.test/runnable/bitops.d
@@ -7,7 +7,7 @@ import core.bitop;
void test1()
{
- size_t array[2];
+ size_t[2] array;
uint x;
version (D_LP64)
size_t bitToUse = 67;
@@ -16,35 +16,35 @@ else
array[0] = 2;
array[1] = 0x100;
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+ printf("array = [0]:x%zx, [1]:x%zx\n", array[0], array[1]);
x = btc(array.ptr, bitToUse);
- printf("btc(array, %d) = %d\n", bitToUse, x);
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+ printf("btc(array, %zd) = %d\n", bitToUse, x);
+ printf("array = [0]:x%zx, [1]:x%zx\n", array[0], array[1]);
assert(x == 0);
assert(array[0] == 0x2 && array[1] == 0x108);
x = btc(array.ptr, bitToUse);
- printf("btc(array, %d) = %d\n", bitToUse, x);
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+ printf("btc(array, %zd) = %d\n", bitToUse, x);
+ printf("array = [0]:x%zx, [1]:x%zx\n", array[0], array[1]);
assert(x != 0);
assert(array[0] == 2 && array[1] == 0x100);
x = bts(array.ptr, bitToUse);
- printf("bts(array, %d) = %d\n", bitToUse, x);
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+ printf("bts(array, %zd) = %d\n", bitToUse, x);
+ printf("array = [0]:x%zx, [1]:x%zx\n", array[0], array[1]);
assert(x == 0);
assert(array[0] == 2 && array[1] == 0x108);
x = btr(array.ptr, bitToUse);
- printf("btr(array, %d) = %d\n", bitToUse, x);
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+ printf("btr(array, %zd) = %d\n", bitToUse, x);
+ printf("array = [0]:x%zx, [1]:x%zx\n", array[0], array[1]);
assert(x != 0);
assert(array[0] == 2 && array[1] == 0x100);
x = bt(array.ptr, 1);
printf("bt(array, 1) = %d\n", x);
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+ printf("array = [0]:x%zx, [1]:x%zx\n", array[0], array[1]);
assert(x != 0);
assert(array[0] == 2 && array[1] == 0x100);
}
@@ -69,17 +69,19 @@ void test2()
/*****************************************************/
version (DigitalMars)
-void test3()
-{ uint v;
- int b;
-
- b = inp(b);
- b = inpw(b);
- b = inpl(b);
-
- b = outp(v, cast(ubyte)b);
- b = outpw(v, cast(ushort)b);
- b = outpl(v, b);
+{
+ void test3()
+ { uint v;
+ int b;
+
+ b = inp(b);
+ b = inpw(b);
+ b = inpl(b);
+
+ b = outp(v, cast(ubyte)b);
+ b = outpw(v, cast(ushort)b);
+ b = outpl(v, b);
+ }
}
/*****************************************************/
@@ -95,25 +97,25 @@ void test4()
void test5()
{
- size_t array[2];
+ size_t[2] array;
array[0] = 2;
array[1] = 0x100;
printf("btc(array, 35) = %d\n", btc(array.ptr, 35));
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+ printf("array = [0]:x%zx, [1]:x%zx\n", array[0], array[1]);
printf("btc(array, 35) = %d\n", btc(array.ptr, 35));
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+ printf("array = [0]:x%zx, [1]:x%zx\n", array[0], array[1]);
printf("bts(array, 35) = %d\n", bts(array.ptr, 35));
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+ printf("array = [0]:x%zx, [1]:x%zx\n", array[0], array[1]);
printf("btr(array, 35) = %d\n", btr(array.ptr, 35));
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+ printf("array = [0]:x%zx, [1]:x%zx\n", array[0], array[1]);
printf("bt(array, 1) = %d\n", bt(array.ptr, 1));
- printf("array = [0]:x%x, [1]:x%x\n", array[0], array[1]);
+ printf("array = [0]:x%zx, [1]:x%zx\n", array[0], array[1]);
}
diff --git a/gcc/testsuite/gdc.test/runnable/bug11155.d b/gcc/testsuite/gdc.test/runnable/bug11155.d
index afe4208..b346ce2 100644
--- a/gcc/testsuite/gdc.test/runnable/bug11155.d
+++ b/gcc/testsuite/gdc.test/runnable/bug11155.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
-version(D_SIMD)
+static if (__traits(compiles, __vector(float[4])))
{
alias float4 = __vector(float[4]);
diff --git a/gcc/testsuite/gdc.test/runnable/bug19652.d b/gcc/testsuite/gdc.test/runnable/bug19652.d
new file mode 100644
index 0000000..e922b59
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/bug19652.d
@@ -0,0 +1,22 @@
+
+struct Base {
+ int i;
+}
+
+struct A {
+ Base base;
+ alias base this;
+}
+
+struct B {
+ A a;
+ alias a this;
+}
+
+auto otherTest(inout ref Base block) @nogc { assert(0); }
+auto otherTest(inout ref A block) @nogc {}
+
+void main() {
+ B* thingie;
+ otherTest(*thingie);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/bug7068.d b/gcc/testsuite/gdc.test/runnable/bug7068.d
index 70e351e..75ea5bf 100644
--- a/gcc/testsuite/gdc.test/runnable/bug7068.d
+++ b/gcc/testsuite/gdc.test/runnable/bug7068.d
@@ -1,4 +1,5 @@
-// PERMUTE_ARGS: -inline -g -O -d
+// REQUIRED_ARGS: -d
+// PERMUTE_ARGS: -inline -g -O
void main()
{
auto darray1 = new int*[](10);
diff --git a/gcc/testsuite/gdc.test/runnable/builtin.d b/gcc/testsuite/gdc.test/runnable/builtin.d
index 44817b1..a7f09a3 100644
--- a/gcc/testsuite/gdc.test/runnable/builtin.d
+++ b/gcc/testsuite/gdc.test/runnable/builtin.d
@@ -1,7 +1,5 @@
// RUNNABLE_PHOBOS_TEST
-
-import std.stdio;
-import std.math;
+import core.math;
import core.bitop;
version (DigitalMars)
@@ -12,30 +10,31 @@ version (DigitalMars)
version = AnyX86;
}
+bool isClose(real lhs, real rhs, real maxRelDiff = 1e-09L, real maxAbsDiff = 0.0)
+{
+ if (lhs == rhs)
+ return true;
+ if (lhs == lhs.infinity || rhs == rhs.infinity ||
+ lhs == -lhs.infinity || rhs == -rhs.infinity)
+ return false;
+
+ auto diff = fabs(lhs - rhs);
+ return diff <= maxRelDiff*fabs(lhs)
+ || diff <= maxRelDiff*fabs(rhs)
+ || diff <= maxAbsDiff;
+}
+
/*******************************************/
void test1()
{
- writefln("%a", sin(6.8L));
auto f = 6.8L;
- writefln("%a", sin(f));
assert(sin(f) == sin(6.8L));
- static assert(approxEqual(sin(6.8L), 0x1.f9f8d9aea10fdf1cp-2));
+ static assert(isClose(sin(6.8L), 0x1.f9f8d9aea10fdf1cp-2));
- writefln("%a", cos(6.8L));
f = 6.8L;
- writefln("%a", cos(f));
assert(cos(f) == cos(6.8L));
- static assert(approxEqual(cos(6.8L), 0x1.bd21aaf88dcfa13ap-1));
-
- writefln("%a", tan(6.8L));
- f = 6.8L;
- writefln("%a", tan(f));
- version (Win64)
- { }
- else
- assert(tan(f) == tan(6.8L));
- static assert(approxEqual(tan(6.8L), 0x1.22fd752af75cd08cp-1));
+ static assert(isClose(cos(6.8L), 0x1.bd21aaf88dcfa13ap-1));
}
/*******************************************/
@@ -55,7 +54,7 @@ void test2()
assert(i == 2);
}
-/**** Bug 5703 *****************************/
+/**** https://issues.dlang.org/show_bug.cgi?id=5703 ****/
static assert({
int a = 0x80;
@@ -113,7 +112,5 @@ int main()
test1();
test2();
test3();
-
- printf("Success\n");
return 0;
}
diff --git a/gcc/testsuite/gdc.test/runnable/cassert.d b/gcc/testsuite/gdc.test/runnable/cassert.d
deleted file mode 100644
index 8c76750..0000000
--- a/gcc/testsuite/gdc.test/runnable/cassert.d
+++ /dev/null
@@ -1,17 +0,0 @@
-/* REQUIRED_ARGS: -betterC
- PERMUTE_ARGS:
- */
-
-
-void test(int ij)
-{
- assert(ij);
-#line 100 "anotherfile"
- assert(ij,"it is not zero");
-}
-
-extern (C) int main()
-{
- test(1);
- return 0;
-}
diff --git a/gcc/testsuite/gdc.test/runnable/casting.d b/gcc/testsuite/gdc.test/runnable/casting.d
index 233cc94..1eb262c 100644
--- a/gcc/testsuite/gdc.test/runnable/casting.d
+++ b/gcc/testsuite/gdc.test/runnable/casting.d
@@ -1,9 +1,15 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
extern(C) int printf(const char*, ...);
template Seq(T...) { alias T Seq; }
/***************************************************/
-// 3133
+// https://issues.dlang.org/show_bug.cgi?id=3133
void test3133()
{
@@ -12,7 +18,7 @@ void test3133()
}
/***************************************************/
-// 7504
+// https://issues.dlang.org/show_bug.cgi?id=7504
void test7504() pure nothrow @safe
{
@@ -56,7 +62,7 @@ C7504 create7504(T...)(T input)
}
/***************************************************/
-// 8119
+// https://issues.dlang.org/show_bug.cgi?id=8119
struct S8119;
@@ -73,7 +79,7 @@ void test8119()
}
/***************************************************/
-// 8645
+// https://issues.dlang.org/show_bug.cgi?id=8645
template TypeTuple8645(TL...)
{
@@ -88,7 +94,7 @@ void test8645()
}
/***************************************************/
-// 10497
+// https://issues.dlang.org/show_bug.cgi?id=10497
struct S10497;
@@ -99,7 +105,7 @@ void test10497(S10497** s)
}
/***************************************************/
-// 10793
+// https://issues.dlang.org/show_bug.cgi?id=10793
struct RealFoo10793
{
@@ -116,7 +122,7 @@ void test10793()
}
/***************************************************/
-// 10834
+// https://issues.dlang.org/show_bug.cgi?id=10834
void test10834()
{
@@ -137,7 +143,7 @@ void test10834()
}
/***************************************************/
-// 10842
+// https://issues.dlang.org/show_bug.cgi?id=10842
template Test10842(F, T)
{
@@ -162,30 +168,12 @@ template Test10842(F, T)
void test10842()
{
- foreach (From; Seq!(bool, byte, ubyte, short, ushort, int, uint, long, ulong, float, double, real))
- {
- foreach (To; Seq!(ifloat, idouble, ireal))
- {
- if (!Test10842!(From, To).test())
- assert(0);
- }
- }
-
- foreach (From; Seq!(ifloat, idouble, ireal))
- {
- foreach (To; Seq!(/*bool*, */byte, ubyte, short, ushort, int, uint, long, ulong, float, double, real))
- {
- if (!Test10842!(From, To).test())
- assert(0);
- }
- }
-
if (!Test10842!(typeof(null), string).test()) // 10842
assert(0);
}
/***************************************************/
-// 11722
+// https://issues.dlang.org/show_bug.cgi?id=11722
class C11722
{
@@ -199,7 +187,7 @@ void test11722()
}
/***************************************************/
-// 14218
+// https://issues.dlang.org/show_bug.cgi?id=14218
void test14218()
{
@@ -214,18 +202,11 @@ void test14218()
version (DigitalMars)
{
// Questionable but currently accepted by DMD (but not GDC).
- foreach (To; Seq!( float, double, real,
- ifloat, idouble, ireal))
+ foreach (To; Seq!( float, double, real))
{
auto x = cast(To)null;
assert(x == 0); // 0i
}
-
- // Internal error: backend/el.c in el_long()
- //foreach (To; Seq!(cfloat, cdouble, creal))
- //{
- // static assert(!__traits(compiles, { auto x = cast(To)null; }));
- //}
}
}
diff --git a/gcc/testsuite/gdc.test/runnable/circular.d b/gcc/testsuite/gdc.test/runnable/circular.d
deleted file mode 100644
index 8fdc8aa..0000000
--- a/gcc/testsuite/gdc.test/runnable/circular.d
+++ /dev/null
@@ -1,25 +0,0 @@
-// REQUIRED_ARGS: -d
-// PERMUTE_ARGS: -dw
-// EXTRA_SOURCES: imports/circularA.d
-// This bug is typedef-specific.
-
-// Bugzilla 4543
-
-import core.stdc.stdio;
-import imports.circularA;
-
-class bclass {};
-alias bclass Tclass;
-
-struct bstruct {}
-alias bstruct Tstruct;
-
-
-/************************************/
-
-int main()
-{
- printf("Success\n");
- return 0;
-}
-
diff --git a/gcc/testsuite/gdc.test/runnable/closure.d b/gcc/testsuite/gdc.test/runnable/closure.d
index 1ed10e2..af304c1 100644
--- a/gcc/testsuite/gdc.test/runnable/closure.d
+++ b/gcc/testsuite/gdc.test/runnable/closure.d
@@ -689,7 +689,7 @@ void test22()
}
/************************************/
-// 1759
+// https://issues.dlang.org/show_bug.cgi?id=1759
void test1759()
{
@@ -724,7 +724,7 @@ void test1759()
}
/************************************/
-// 1841
+// https://issues.dlang.org/show_bug.cgi?id=1841
int delegate() foo1841()
{
@@ -768,7 +768,7 @@ void test1841()
}
/************************************/
-// 5911
+// https://issues.dlang.org/show_bug.cgi?id=5911
void writeln5911(const(char)[] str) {}
@@ -791,7 +791,7 @@ void test5911()
}
/************************************/
-// 9685
+// https://issues.dlang.org/show_bug.cgi?id=9685
auto get9685a(alias fun)()
{
@@ -844,7 +844,7 @@ void test9685b()
}
/************************************/
-// 12406
+// https://issues.dlang.org/show_bug.cgi?id=12406
auto createDg12406()
{
@@ -898,7 +898,7 @@ void test12406()
}
/************************************/
-// 14730
+// https://issues.dlang.org/show_bug.cgi?id=14730
void test14730()
{
diff --git a/gcc/testsuite/gdc.test/runnable/complex.d b/gcc/testsuite/gdc.test/runnable/complex.d
index 78fe574..50e793e 100644
--- a/gcc/testsuite/gdc.test/runnable/complex.d
+++ b/gcc/testsuite/gdc.test/runnable/complex.d
@@ -1,27 +1,43 @@
-// RUNNABLE_PHOBOS_TEST
-// PERMUTE_ARGS:
-
-import std.stdio;
-import std.math;
+/*
+REQUIRED_ARGS: -d
+TEST_OUTPUT:
+---
+---
+*/
+
+import core.stdc.math : isnan, signbit;
import core.stdc.stdio;
-/***************************************/
+template AliasSeq(T...) { alias T AliasSeq; }
-void test1()
-{
- creal c = 3.0 + 4.0i;
- c = sqrt(c);
- printf("re = %Lg, im = %Lg\n", c.re, c.im);
- assert(c.re == 2.0);
- assert(c.im == 1.0);
+/************************************/
- float f = sqrt(25.0f);
- assert(f == 5.0);
- double d = sqrt(4.0);
- assert(d == 2.0);
- real r = sqrt(9.0L);
- assert(r == 3.0);
-}
+static assert(-(6i) == -6i);
+static assert(-(1 + 6i) == -1 - 6i);
+
+static assert(!3.7i == 0);
+static assert(!0.0i == 1);
+static assert(!(2+3.7i) == 0);
+static assert(!(0+3.7i) == 0);
+static assert(!(2+0.0i) == 0);
+static assert(!(0+0.0i) == 1);
+
+static assert(-6i + 2i == -4i);
+static assert(6i - 1i == 5i);
+
+static assert((3.6 + 7.2i) / (1 + 0i) == 3.6 + 7.2i);
+static assert((3.6 + 7.2i) / (0.0 + 1i) == 7.2 - 3.6i);
+
+static assert((7.2i < 6.2i) == 0);
+
+static assert((7.2i == 6.2i) == 0);
+static assert((7.2i != 6.2i) == 1);
+
+static assert((7.2i == 7.2i) == 1);
+static assert((7.2i != 7.2i) == 0);
+
+static assert((5.1 is 5.1i) == 0);
+static assert((5.1 !is 5.1i) == 1);
/***************************************/
@@ -227,11 +243,11 @@ void test12()
{
real x = 3;
creal a = (2 + 4i) % 3;
- writeln(a);
+ printf("%Lg %Lgi\n", a.re, a.im);
assert(a == 2 + 1i);
creal b = (2 + 4i) % x;
- writeln(b);
+ printf("%Lg %Lgi\n", b.re, b.im);
assert(b == a);
}
@@ -241,7 +257,7 @@ void test13()
{
ireal a = 5i;
ireal b = a % 2;
- writeln(b);
+ printf("%Lg %Lgi\n", b.re, b.im);
assert(b == 1i);
}
@@ -405,6 +421,974 @@ void test15()
assert(bar15r(1.0L, 2.0Li) == 1.0L + 2.0Li);
}
+/************************************/
+
+void test16()
+{
+ real n = -0.0;
+ const real m = -0.0;
+
+ creal c = -0.0 + 3i;
+ creal d = n + 3i;
+ creal e = m + 3i;
+
+ assert(signbit(c.re) != 0);
+ assert(signbit(d.re) != 0);
+ assert(signbit(e.re) != 0);
+}
+
+/************************************/
+
+void test17()
+{
+ void test(cdouble v)
+ {
+ auto x2 = cdouble(v);
+ assert(x2 == v);
+ }
+ test(1.2+3.4i);
+}
+
+/************************************/
+
+template factorial18(float n, cdouble c, string sss, string ttt)
+{
+ static if (n == 1)
+ const float factorial18 = 1;
+ else
+ const float factorial18 = n * 2;
+}
+
+template bar18(wstring abc, dstring def)
+{
+ const int x = 3;
+}
+
+void test18()
+{
+ float f = factorial18!(4.25, 6.8+3i, "hello", null);
+ printf("%g\n", f);
+ assert(f == 8.5);
+ int i = bar18!("abc"w, "def"d).x;
+ printf("%d\n", i);
+ assert(i == 3);
+}
+
+/*****************************************/
+
+void test19()
+{
+ float f;
+ double d;
+ real r;
+
+ if (f > ifloat.max)
+ goto Loverflow;
+ if (d > ifloat.max)
+ goto Loverflow;
+ if (r > ifloat.max)
+ goto Loverflow;
+
+ if (ifloat.max < f)
+ goto Loverflow;
+ if (ifloat.max < d)
+ goto Loverflow;
+ if (ifloat.max < r)
+ goto Loverflow;
+
+ return;
+
+ Loverflow:
+ return;
+}
+
+/*****************************************/
+
+void test20()
+{
+ double d = 1;
+ cdouble cd = 1+0i;
+ assert(cd == 1.0 + 0i);
+}
+
+/*****************************************/
+
+void test21()
+{
+ cdouble[] a;
+ cdouble[] b;
+ foreach(ref cdouble d; b)
+ {
+ d = -a[0];
+ for(;;){}
+ }
+}
+
+/*************************************/
+
+void test22()
+{
+ static creal[] params = [1+0i, 3+0i, 5+0i];
+
+ printf("params[0] = %Lf + %Lfi\n", params[0].re, params[0].im);
+ printf("params[1] = %Lf + %Lfi\n", params[1].re, params[1].im);
+ printf("params[2] = %Lf + %Lfi\n", params[2].re, params[2].im);
+
+ creal[] sums = new creal[3];
+ sums[] = 0+0i;
+
+ foreach(creal d; params)
+ {
+ creal prod = d;
+
+ printf("prod = %Lf + %Lfi\n", prod.re, prod.im);
+ for(int i; i<2; i++)
+ {
+ sums[i] += prod;
+ prod *= d;
+ }
+ sums[2] += prod;
+ }
+
+ printf("sums[0] = %Lf + %Lfi", sums[0].re, sums[0].im);
+ assert(sums[0].re==9);
+ assert(sums[0].im==0);
+ assert(sums[1].re==35);
+ assert(sums[1].im==0);
+ assert(sums[2].re==153);
+ assert(sums[2].im==0);
+}
+
+/*******************************************/
+
+cdouble y23;
+
+cdouble f23(cdouble x)
+{
+ return (y23 = x);
+}
+
+void test23()
+{
+ f23(1.0+2.0i);
+ assert(y23 == 1.0+2.0i);
+}
+
+/*************************************/
+
+ifloat func_24_1(ifloat f, double d)
+{
+// f /= cast(cdouble)d;
+ return f;
+}
+
+ifloat func_24_2(ifloat f, double d)
+{
+ f = cast(ifloat)(f / cast(cdouble)d);
+ return f;
+}
+
+float func_24_3(float f, double d)
+{
+// f /= cast(cdouble)d;
+ return f;
+}
+
+float func_24_4(float f, double d)
+{
+ f = cast(float)(f / cast(cdouble)d);
+ return f;
+}
+
+void test24()
+{
+ ifloat f = func_24_1(10i, 8);
+ printf("%fi\n", f);
+// assert(f == 1.25i);
+
+ f = func_24_2(10i, 8);
+ printf("%fi\n", f);
+ assert(f == 1.25i);
+
+ float g = func_24_3(10, 8);
+ printf("%f\n", g);
+// assert(g == 1.25);
+
+ g = func_24_4(10, 8);
+ printf("%f\n", g);
+ assert(g == 1.25);
+}
+
+/*******************************************/
+
+void test25()
+{
+ ireal x = 4.0Li;
+ ireal y = 4.0Li;
+ ireal z = 4Li;
+ creal c = 4L + 0Li;
+}
+
+/*************************************/
+
+string toString26(cdouble z)
+{
+ char[ulong.sizeof*8] buf;
+
+ auto len = snprintf(buf.ptr, buf.sizeof, "%f+%fi", z.re, z.im);
+ return buf[0 .. len].idup;
+}
+
+void test26()
+{
+ static cdouble[] A = [1+0i, 0+1i, 1+1i];
+ string s;
+
+ foreach( cdouble z; A )
+ {
+ s = toString26(z);
+ printf("%.*s ", cast(int)s.length, s.ptr);
+ }
+ printf("\n");
+
+ for(int ii=0; ii<A.length; ii++ )
+ A[ii] += -1i*A[ii];
+
+ assert(A[0] == 1 - 1i);
+ assert(A[1] == 1 + 1i);
+ assert(A[2] == 2);
+
+ foreach( cdouble z; A )
+ {
+ s = toString26(z);
+ printf("%.*s ", cast(int)s.length, s.ptr);
+ }
+ printf("\n");
+}
+
+/*************************************/
+
+void test27()
+{
+ creal z = 1. + 2.0i;
+
+ real r = z.re;
+ assert(r == 1.0);
+
+ real i = z.im;
+ assert(i == 2.0);
+
+ assert(r.im == 0.0);
+ assert(r.re == 1.0);
+
+ assert(i.re == 2.0);
+ assert(i.im == 0.0i);
+}
+
+/*************************************/
+
+void test28()
+{
+ alias cdouble X;
+ X four = cast(X) (4.0i + 0.4);
+}
+
+/*************************************/
+
+void test29()
+{
+ ireal a = 6.5i % 3i;
+ printf("%Lfi %Lfi\n", a, a - .5i);
+ assert(a == .5i);
+
+ a = 6.5i % 3;
+ printf("%Lfi %Lfi\n", a, a - .5i);
+ assert(a == .5i);
+
+ real b = 6.5 % 3i;
+ printf("%Lf %Lf\n", b, b - .5);
+ assert(b == .5);
+
+ b = 6.5 % 3;
+ printf("%Lf %Lf\n", b, b - .5);
+ assert(b == .5);
+}
+
+/*************************************/
+
+void test30()
+{
+ cfloat f = 1+0i;
+ f %= 2fi;
+ printf("%f + %fi\n", f.re, f.im);
+ assert(f == 1 + 0i);
+
+ cdouble d = 1+0i;
+ d %= 2i;
+ printf("%f + %fi\n", d.re, d.im);
+ assert(d == 1 + 0i);
+
+ creal r = 1+0i;
+ r %= 2i;
+ printf("%Lf + %Lfi\n", r.re, r.im);
+ assert(r == 1 + 0i);
+}
+
+/*************************************/
+
+void test31()
+{
+ cfloat f = 1+0i;
+ f %= 2i;
+ printf("%f + %fi\n", f.re, f.im);
+ assert(f == 1);
+
+ cdouble d = 1+0i;
+ d = d % 2i;
+ printf("%f + %fi\n", d.re, d.im);
+ assert(d == 1);
+
+ creal r = 1+0i;
+ r = r % 2i;
+ printf("%Lf + %Lfi\n", r.re, r.im);
+ assert(r == 1);
+}
+
+/*************************************/
+
+void assertEqual(real* a, real* b, string file = __FILE__, size_t line = __LINE__)
+{
+ auto x = cast(ubyte*)a;
+ auto y = cast(ubyte*)b;
+
+ // Only compare the 10 value bytes, the padding bytes are of undefined
+ // value.
+ version (X86) enum count = 10;
+ else version (X86_64) enum count = 10;
+ else enum count = real.sizeof;
+ for (size_t i = 0; i < count; i++)
+ {
+ if (x[i] != y[i])
+ {
+ printf("%02zd: %02x %02x\n", i, x[i], y[i]);
+ import core.exception;
+ throw new AssertError(file, line);
+ }
+ }
+}
+
+void assertEqual(creal* a, creal* b, string file = __FILE__, size_t line = __LINE__)
+{
+ assertEqual(cast(real*)a, cast(real*)b, file, line);
+ assertEqual(cast(real*)a + 1, cast(real*)b + 1, file, line);
+}
+
+void test32()
+{
+ creal a = creal.nan;
+ creal b = real.nan + ireal.nan;
+ assertEqual(&a, &b);
+
+ real c= real.nan;
+ real d=a.re;
+ assertEqual(&c, &d);
+
+ d=a.im;
+ assertEqual(&c, &d);
+}
+
+/*************************************/
+
+void test33()
+{
+ creal a = creal.infinity;
+ creal b = real.infinity + ireal.infinity;
+ assertEqual(&a, &b);
+
+ real c = real.infinity;
+ real d=a.re;
+ assertEqual(&c, &d);
+
+ d=a.im;
+ assertEqual(&c, &d);
+}
+
+/*************************************/
+
+void test34()
+{
+ creal a = creal.nan;
+ creal b = creal.nan;
+ b = real.nan + ireal.nan;
+ assertEqual(&a, &b);
+
+ real c = real.nan;
+ real d=a.re;
+ assertEqual(&c, &d);
+
+ d=a.im;
+ assertEqual(&c, &d);
+}
+
+/*************************************/
+
+ireal x35;
+
+void foo35()
+{
+ x35 = -x35;
+}
+
+void bar35()
+{
+ return foo35();
+}
+
+void test35()
+{
+ x35=2i;
+ bar35();
+ assert(x35==-2i);
+}
+
+/*************************************/
+
+void test36()
+{
+ ireal imag = 2.5i;
+ printf ("test of imag*imag = %Lf\n",imag*imag);
+ assert(imag * imag == -6.25);
+}
+
+/*************************************/
+
+void test37()
+{
+ creal z1 = 1. - 2.0i;
+ ireal imag_part = z1.im/1i;
+}
+
+/***********************************/
+
+void test38()
+{
+ ireal imag = 2.5i;
+ //printf ("test of imag*imag = %Lf\n",imag*imag);
+ real f = imag * imag;
+ assert(f == -6.25);
+}
+
+/***********************************/
+
+void test39()
+{
+ creal z = 1 + 2.5i;
+ real e = z.im;
+
+ printf ("e = %Lf\n", e);
+ assert(e == 2.5);
+}
+
+/***********************************/
+
+void test40()
+{
+ ifloat b = cast(ifloat)1i;
+ assert(b == 1.0i);
+
+ ifloat c = 2fi;
+ assert(c == 2.0i);
+
+ c = 0fi;
+ assert(c == 0i);
+}
+
+/***************************************************/
+
+void test41()
+{
+ creal a=1.3L+9.7Li;
+ assert(a.re == 1.3L);
+ assert(a.im == 9.7L);
+}
+
+/***************************************************/
+
+void test42()
+{
+ creal c = 2.7L + 0i;
+ assert(c.re==2.7L);
+ assert(c.im==0.0L);
+}
+
+/***********************************/
+
+void test43()
+{
+ creal C,Cj;
+ real y1,x1;
+
+ C = x1 + y1*1i + Cj;
+ C = 1i*y1 + x1 + Cj;
+ C = Cj + 1i*y1 + x1;
+ C = y1*1i + Cj + x1;
+ C = 1i*y1 + Cj;
+ C = Cj + 1i*y1;
+}
+
+/***************************************************/
+
+void test44()
+{
+ ifloat f = 1.0fi;
+// f *= 2.0fi; // illegal but compiles
+ printf("%g\n", f);
+// assert(f == 0i);
+}
+
+/******************************************************/
+
+void test45()
+{
+ TypeInfo ti;
+
+ ti = typeid(ifloat[]);
+ assert(!(ti is null));
+ ti = typeid(idouble[]);
+ assert(!(ti is null));
+ ti = typeid(ireal[]);
+ assert(!(ti is null));
+
+ ti = typeid(cfloat[]);
+ assert(!(ti is null));
+ ti = typeid(cdouble[]);
+ assert(!(ti is null));
+ ti = typeid(creal[]);
+ assert(!(ti is null));
+}
+
+/******************************************************/
+
+void test46()
+{
+ TypeInfo ti = typeid(ifloat*);
+ assert(!(ti is null));
+ assert(ti.tsize==(ifloat*).sizeof);
+ assert(ti.toString()=="ifloat*");
+}
+
+/******************************************************/
+
+void test47()
+{
+ TypeInfo ti = typeid(cfloat*);
+ assert(!(ti is null));
+ assert(ti.tsize==(cfloat*).sizeof);
+ assert(ti.toString()=="cfloat*");
+}
+
+/******************************************************/
+
+void test48()
+{
+ TypeInfo ti = typeid(idouble*);
+ assert(!(ti is null));
+ assert(ti.tsize==(idouble*).sizeof);
+ assert(ti.toString()=="idouble*");
+}
+
+/******************************************************/
+
+void test49()
+{
+ TypeInfo ti = typeid(cdouble*);
+ assert(!(ti is null));
+ assert(ti.tsize==(cdouble*).sizeof);
+ assert(ti.toString()=="cdouble*");
+}
+
+/***********************************/
+
+void foo51(creal a)
+{
+ assert(a == -8i);
+}
+
+void test51()
+{
+ assert((2-2i)*(2-2i) == -8i);
+
+ cdouble a = (2-2i)*(2-2i);
+ assert(a == -8i);
+
+ foo51((2-2i)*(2-2i));
+}
+
+/******************************************************/
+
+void test52()
+{
+ TypeInfo ti = typeid(ireal*);
+ assert(!(ti is null));
+ assert(ti.tsize==(ireal*).sizeof);
+ assert(ti.toString()=="ireal*");
+}
+
+/******************************************************/
+
+void test53()
+{
+ TypeInfo ti = typeid(creal*);
+ assert(!(ti is null));
+ assert(ti.tsize==(creal*).sizeof);
+ assert(ti.toString()=="creal*");
+}
+
+/*******************************************/
+
+auto init(T)(T val) { return 1; }
+
+void test54()
+{
+ // See built-in 'init' property
+ assert(10i .init is idouble.nan);
+
+ // x.init() has parens, so it runs UFCS call
+ assert(10i .init() == 1);
+
+ // x.init!YYY matches templatized UFCS call.
+ assert(10i .init!idouble() == 1);
+}
+
+/*******************************************/
+
+creal x55;
+
+void foo55()
+{
+ x55 = -x55;
+}
+
+void bar55()
+{
+ return foo55();
+}
+
+void test55()
+{
+ x55 = 2.0L + 0.0Li;
+ bar55();
+ assert(x55 == -2.0L + 0.0Li);
+}
+
+/***************************************************/
+
+template Q(s...) { alias s q; }
+
+void test56()
+{
+ enum complex80 = Q!( 1+1.0i ).q.stringof;
+}
+
+/********************************************************/
+
+void test57()
+{
+ assert(__traits(isArithmetic, ifloat) == true);
+ assert(__traits(isArithmetic, idouble) == true);
+ assert(__traits(isArithmetic, ireal) == true);
+ assert(__traits(isArithmetic, cfloat) == true);
+ assert(__traits(isArithmetic, cdouble) == true);
+ assert(__traits(isArithmetic, creal) == true);
+
+ assert(__traits(isScalar, ifloat) == true);
+ assert(__traits(isScalar, idouble) == true);
+ assert(__traits(isScalar, ireal) == true);
+ assert(__traits(isScalar, cfloat) == true);
+ assert(__traits(isScalar, cdouble) == true);
+ assert(__traits(isScalar, creal) == true);
+
+ assert(__traits(isFloating, ifloat) == true);
+ assert(__traits(isFloating, idouble) == true);
+ assert(__traits(isFloating, ireal) == true);
+ assert(__traits(isFloating, cfloat) == true);
+ assert(__traits(isFloating, cdouble) == true);
+ assert(__traits(isFloating, creal) == true);
+
+ assert(__traits(isIntegral, ifloat) == false);
+ assert(__traits(isIntegral, idouble) == false);
+ assert(__traits(isIntegral, ireal) == false);
+ assert(__traits(isIntegral, cfloat) == false);
+ assert(__traits(isIntegral, cdouble) == false);
+ assert(__traits(isIntegral, creal) == false);
+
+ assert(__traits(isUnsigned, ifloat) == false);
+ assert(__traits(isUnsigned, idouble) == false);
+ assert(__traits(isUnsigned, ireal) == false);
+ assert(__traits(isUnsigned, cfloat) == false);
+ assert(__traits(isUnsigned, cdouble) == false);
+ assert(__traits(isUnsigned, creal) == false);
+
+ assert(__traits(isAssociativeArray, ifloat) == false);
+ assert(__traits(isAssociativeArray, idouble) == false);
+ assert(__traits(isAssociativeArray, ireal) == false);
+ assert(__traits(isAssociativeArray, cfloat) == false);
+ assert(__traits(isAssociativeArray, cdouble) == false);
+ assert(__traits(isAssociativeArray, creal) == false);
+
+ assert(__traits(isStaticArray, ifloat) == false);
+ assert(__traits(isStaticArray, idouble) == false);
+ assert(__traits(isStaticArray, ireal) == false);
+ assert(__traits(isStaticArray, cfloat) == false);
+ assert(__traits(isStaticArray, cdouble) == false);
+ assert(__traits(isStaticArray, creal) == false);
+
+ assert(__traits(isAbstractClass, ifloat) == false);
+ assert(__traits(isAbstractClass, idouble) == false);
+ assert(__traits(isAbstractClass, ireal) == false);
+ assert(__traits(isAbstractClass, cfloat) == false);
+ assert(__traits(isAbstractClass, cdouble) == false);
+ assert(__traits(isAbstractClass, creal) == false);
+}
+
+/*******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=3382
+
+real toreal(ireal x){ return x.im; }
+
+void test3382()
+{
+ assert(1.4i.toreal() == 1.4);
+}
+
+/***************************************************/
+
+alias ireal BUG3919;
+alias typeof(BUG3919.init*BUG3919.init) ICE3919;
+alias typeof(BUG3919.init/BUG3919.init) ICE3920;
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=8454
+
+double sqrt8454(double d) { return d/2; }
+void foo8454(cdouble m) {}
+
+void test8454()
+{
+ foo8454(0 - sqrt8454(1.0) * 1i);
+}
+
+/************************************/
+// https://issues.dlang.org/show_bug.cgi?id=9046
+
+void test9046()
+{
+ foreach (T; AliasSeq!(ifloat, idouble, ireal, cfloat, cdouble, creal))
+ foreach (U; AliasSeq!(T, const T, immutable T, shared T, shared const T, inout T, shared inout T))
+ {
+ static assert(is(typeof(U.init) == U));
+ }
+}
+
+/********************************************/
+// https://issues.dlang.org/show_bug.cgi?id=9112
+
+void test9112a() // T() and T(v)
+{
+ void test(T)(T v)
+ {
+ foreach (string qual; AliasSeq!("", "const ", "immutable "))
+ {
+ mixin("alias U = "~qual~T.stringof~";");
+ //pragma(msg, U);
+
+ mixin("auto x1 = "~qual~T.stringof~"();"); // U() default construction syntax
+ mixin("auto x2 = "~qual~T.stringof~"(v);"); // U(v)
+ static assert(!__traits(compiles, mixin(qual~T.stringof~"(v, v)"))); // U(v, v)
+ static assert(is(typeof(x1) == U));
+ static assert(is(typeof(x2) == U));
+ static if ( is(typeof(U.nan) : real)) assert( isnan(x1.re) && !isnan(x1.im), U.stringof);
+ static if ( is(typeof(U.nan) : ireal)) assert(!isnan(x1.re) && isnan(x1.im), U.stringof);
+ static if ( is(typeof(U.nan) : creal)) assert( isnan(x1.re) && isnan(x1.im), U.stringof);
+ static if (!is(typeof(U.nan))) assert( x1 == U.init, U.stringof);
+ assert(x2 == v, U.stringof);
+ }
+ }
+ test!(ifloat )(1.4142i);
+ test!(idouble)(1.4142i);
+ test!(ireal )(1.4142i);
+ test!(cfloat )(1.2+3.4i);
+ test!(cdouble)(1.2+3.4i);
+ test!(creal )(1.2+3.4i);
+
+ static assert(!__traits(compiles, double(3.14i)));
+}
+
+void test9112b() // new T(v)
+{
+ void test(T)(T v)
+ {
+ foreach (string qual; AliasSeq!("", "const ", "immutable "))
+ {
+ mixin("alias U = "~qual~T.stringof~";");
+ //pragma(msg, U);
+
+ mixin("auto p1 = new "~qual~T.stringof~"();"); // U() default construction syntax
+ mixin("auto p2 = new "~qual~T.stringof~"(v);"); // U(v)
+ static assert(!__traits(compiles, mixin("new "~qual~T.stringof~"(v, v)"))); // U(v, v)
+ static assert(is(typeof(p1) == U*));
+ static assert(is(typeof(p2) == U*));
+ assert( p1 !is null);
+ assert( p2 !is null);
+ auto x1 = *p1;
+ auto x2 = *p2;
+ static if ( is(typeof(U.nan) : real)) assert( isnan(x1.re) && !isnan(x1.im), U.stringof);
+ static if ( is(typeof(U.nan) : ireal)) assert(!isnan(x1.re) && isnan(x1.im), U.stringof);
+ static if ( is(typeof(U.nan) : creal)) assert( isnan(x1.re) && isnan(x1.im), U.stringof);
+ static if (!is(typeof(U.nan))) assert( x1 == U.init, U.stringof);
+ assert(x2 == v, U.stringof);
+ }
+ }
+
+ test!(ifloat )(1.4142i);
+ test!(idouble)(1.4142i);
+ test!(ireal )(1.4142i);
+ test!(cfloat )(1.2+3.4i);
+ test!(cdouble)(1.2+3.4i);
+ test!(creal )(1.2+3.4i);
+
+ static assert(!__traits(compiles, new double(3.14i)));
+}
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10639
+
+struct S1
+{
+ cdouble val;
+}
+
+void formatTest(S1 s, double re, double im)
+{
+ assert(s.val.re == re);
+ assert(s.val.im == im);
+}
+
+void test10639()
+{
+ S1 s = S1(3+2.25i);
+ formatTest(s, 3, 2.25);
+}
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=10842
+
+template Test10842(F, T)
+{
+ bool res;
+ F from()
+ {
+ res = true;
+ return F.init;
+ }
+ T to()
+ {
+ // The cast operand had incorrectly been eliminated
+ return cast(T)from();
+ }
+ bool test()
+ {
+ res = false;
+ to();
+ return res;
+ }
+}
+
+void test10842()
+{
+ foreach (From; AliasSeq!(bool, byte, ubyte, short, ushort, int, uint, long, ulong, float, double, real))
+ {
+ foreach (To; AliasSeq!(ifloat, idouble, ireal))
+ {
+ if (!Test10842!(From, To).test())
+ assert(0);
+ }
+ }
+
+ foreach (From; AliasSeq!(ifloat, idouble, ireal))
+ {
+ foreach (To; AliasSeq!(/*bool*, */byte, ubyte, short, ushort, int, uint, long, ulong, float, double, real))
+ {
+ if (!Test10842!(From, To).test())
+ assert(0);
+ }
+ }
+}
+
+/***************************************************/
+
+void test10927()
+{
+ static assert( (1+2i) ^^ 3 == -11 - 2i );
+ auto a = (1+2i) ^^ 3;
+}
+
+/******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=13252
+
+alias TypeTuple13252(T...) = T;
+
+static assert(is(typeof(TypeTuple13252!(cast(cfloat )(1 + 2i))[0]) == cfloat ));
+static assert(is(typeof(TypeTuple13252!(cast(cdouble)(1 + 2i))[0]) == cdouble));
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=14218
+
+void test14218()
+{
+ version (DigitalMars)
+ {
+ // Questionable but currently accepted by DMD (but not GDC).
+ foreach (To; AliasSeq!(ifloat, idouble, ireal))
+ {
+ auto x = cast(To)null;
+ assert(x == 0); // 0i
+ }
+
+ // Internal error: backend/el.c in el_long()
+ //foreach (To; AliasSeq!(cfloat, cdouble, creal))
+ //{
+ // static assert(!__traits(compiles, { auto x = cast(To)null; }));
+ //}
+ }
+}
+
+/******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15653
+
+alias TypeTuple15653(T...) = T;
+
+void test15653()
+{
+ void foo(U, T)(const T x) { static assert(is(T == U)); }
+ void bar(U, T)(immutable T x) { static assert(is(T == U)); }
+
+ struct X { int a; long[2] b; }
+ struct Y { int* a; long[] b; }
+
+ foreach (U; TypeTuple15653!(
+ ifloat, idouble, ireal,
+ cfloat, cdouble, creal))
+ {
+ foo!U(U.init); // OK
+ bar!U(U.init); // Was error, now OK
+
+ U u;
+ foo!U(u); // OK
+ bar!U(u); // Was error, now OK
+ }
+}
+
/***************************************/
// https://issues.dlang.org/show_bug.cgi?id=17087
@@ -427,11 +1411,108 @@ void test17677()
}
/***************************************/
+// https://issues.dlang.org/show_bug.cgi?id=17677
+
+float getreal_rcx(cfloat z)
+{
+ return z.re;
+}
+float getimag_rcx(cfloat z)
+{
+ return z.im;
+}
+
+float getreal_rdx(cfloat z, int)
+{
+ return z.re;
+}
+float getimag_rdx(cfloat z, int)
+{
+ return z.im;
+}
+
+float getreal_r8(cfloat z, int, int)
+{
+ return z.re;
+}
+float getimag_r8(cfloat z, int, int)
+{
+ return z.im;
+}
+
+float getreal_r9(cfloat z, int, int, int)
+{
+ return z.re;
+}
+float getimag_r9(cfloat z, int, int, int)
+{
+ return z.im;
+}
+
+float getreal_stack(cfloat z, int, int, int, int)
+{
+ return z.re;
+}
+float getimag_stack(cfloat z, int, int, int, int)
+{
+ return z.im;
+}
+
+void test18772a()
+{
+ cfloat[1] A;
+ float[1] B;
+ int i = 0;
+ A[0] = 2.0f + 4i;
+ B[0] = 3.0f;
+ assert(6.0 == getreal_rcx(A[i] * B[i]));
+ assert(12.0 == getimag_rcx(A[i] * B[i]));
+
+ assert(6.0 == getreal_rdx(A[i] * B[i], 1));
+ assert(12.0 == getimag_rdx(A[i] * B[i], 1));
+
+ assert(6.0 == getreal_r8(A[i] * B[i], 1, 2));
+ assert(12.0 == getimag_r8(A[i] * B[i], 1, 2));
+
+ assert(6.0 == getreal_r9(A[i] * B[i], 1, 2, 3));
+ assert(12.0 == getimag_r9(A[i] * B[i], 1, 2, 3));
+
+ assert(6.0 == getreal_stack(A[i] * B[i], 1, 2, 3, 4));
+ assert(12.0 == getimag_stack(A[i] * B[i], 1, 2, 3, 4));
+}
+
+void test18772b(T)()
+{
+ static auto getre0(T z)
+ {
+ return z.re;
+ }
+ static auto getim0(T z)
+ {
+ return z.im;
+ }
+
+ T z = 3 + 4i;
+ auto d = z.re;
+
+ assert(getre0(d * z) == d * 3);
+ assert(getim0(d * z) == d * 4);
+}
+
+void test18772()
+{
+ test18772a();
+
+ test18772b!cfloat();
+ test18772b!cdouble();
+ test18772b!creal();
+}
+
+/***************************************/
int main(char[][] args)
{
- test1();
test2();
test3();
test4();
@@ -454,10 +1535,59 @@ int main(char[][] args)
test7806();
test7976();
test15();
+ test16();
+ test17();
+ test18();
+ test19();
+ test20();
+ test21();
+ test22();
+ test23();
+ test24();
+ test25();
+ test26();
+ test27();
+ test28();
+ test29();
+ test30();
+ test31();
+ test32();
+ test33();
+ test34();
+ test35();
+ test36();
+ test37();
+ test38();
+ test39();
+ test40();
+ test41();
+ test42();
+ test43();
+ test44();
+ test45();
+ test46();
+ test47();
+ test48();
+ test49();
+ test51();
+ test52();
+ test53();
+ test54();
+ test55();
+ test56();
+ test57();
+ test8454();
+ test9046();
+ test9112a();
+ test9112b();
+ test10639();
+ test10842();
+ test14218();
+ test15653();
test17087();
test17677();
+ test18772();
printf("Success!\n");
return 0;
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/constfold.d b/gcc/testsuite/gdc.test/runnable/constfold.d
index 1d259f6..7857eaf 100644
--- a/gcc/testsuite/gdc.test/runnable/constfold.d
+++ b/gcc/testsuite/gdc.test/runnable/constfold.d
@@ -2,32 +2,17 @@
// RUNNABLE_PHOBOS_TEST
static assert(__LINE__ == 3); // fails as __LINE__ is 2
-import std.stdio;
-import std.math : signbit, sqrt;
+import core.stdc.math : signbit;
/************************************/
static assert(-(1) == -1);
-static assert(-(6i) == -6i);
-static assert(-(1 + 6i) == -1 - 6i);
static assert(!27 == 0);
static assert(!0 == 1);
static assert(!6.2 == 0);
static assert(!0.0 == 1);
-static assert(!3.7i == 0);
-static assert(!0.0i == 1);
-static assert(!(2+3.7i) == 0);
-static assert(!(0+3.7i) == 0);
-static assert(!(2+0.0i) == 0);
-static assert(!(0+0.0i) == 1);
-
-static assert(-6i + 2i == -4i);
-static assert(6i - 1i == 5i);
-
-static assert((3.6 + 7.2i) / (1 + 0i) == 3.6 + 7.2i);
-static assert((3.6 + 7.2i) / (0.0 + 1i) == 7.2 - 3.6i);
static assert((6 % 4) == 2);
static assert((6u % 4u) == 2u);
@@ -157,16 +142,9 @@ static assert((7.2 <= 6.2) == 0);
static assert((7.2 > 6.2) == 1);
static assert((7.2 >= 6.2) == 1);
-static assert((7.2i < 6.2i) == 0);
-
-
-static assert((7.2i == 6.2i) == 0);
-static assert((7.2i != 6.2i) == 1);
static assert((7.2 == 6.2) == 0);
static assert((7.2 != 6.2) == 1);
-static assert((7.2i == 7.2i) == 1);
-static assert((7.2i != 7.2i) == 0);
static assert((7.2 == 7.2) == 1);
static assert((7.2 != 7.2) == 0);
@@ -187,9 +165,6 @@ static assert((5.1 is 4.1) == 0);
static assert((5.1 !is 5.1) == 0);
static assert((5.1 !is 4.1) == 1);
-static assert((5.1 is 5.1i) == 0);
-static assert((5.1 !is 5.1i) == 1);
-
static assert((5 ? 2 : 3) == 2);
static assert((0 ? 2 : 3) == 3);
static assert((5.0 ? 2 : 3) == 2);
@@ -208,25 +183,6 @@ static assert(['a','b','c','d'] == "abcd");
static assert("efgh" == ['e','f','g','h']);
static assert("efgi" != ['e','f','g','h']);
-static assert((2 ^^ 8) == 256);
-static assert((3 ^^ 8.0) == 6561);
-static assert((4.0 ^^ 8) == 65536);
-static assert((5.0 ^^ 8.0) == 390625);
-
-static assert((0.5 ^^ 3) == 0.125);
-static assert((1.5 ^^ 3.0) == 3.375);
-static assert((2.5 ^^ 3) == 15.625);
-static assert((3.5 ^^ 3.0) == 42.875);
-
-static assert(((-2) ^^ -5.0) == -0.031250);
-static assert(((-2.0) ^^ -6) == 0.015625);
-static assert(((-2.0) ^^ -7.0) == -0.0078125);
-
-static assert((144 ^^ 0.5) == 12);
-static assert((1089 ^^ 0.5) == 33);
-static assert((1764 ^^ 0.5) == 42);
-static assert((650.25 ^^ 0.5) == 25.5);
-
void test1()
{
@@ -256,8 +212,6 @@ void test2()
{
float f = float.infinity;
int i = cast(int) f;
- writeln(i);
- writeln(cast(int)float.max);
assert(i == cast(int)float.max);
assert(i == 0x80000000);
}
@@ -270,19 +224,8 @@ void test3()
real n = -0.0;
const real m = -0.0;
- creal c = -0.0 + 3i;
- creal d = n + 3i;
- creal e = m + 3i;
-
- // should print "11111"
- writeln(signbit(n), signbit(m),
- signbit(c.re), signbit(d.re), signbit(e.re));
-
- assert(signbit(n) == 1);
- assert(signbit(m) == 1);
- assert(signbit(c.re) == 1);
- assert(signbit(d.re) == 1);
- assert(signbit(e.re) == 1);
+ assert(signbit(n) != 0);
+ assert(signbit(m) != 0);
}
/************************************/
@@ -354,7 +297,7 @@ int foo9() {
static assert(foo9()==2);
/************************************/
-// Bugzilla 6077
+// https://issues.dlang.org/show_bug.cgi?id=6077
void test6077() {
static string scat(string s1, string s2)
@@ -424,7 +367,7 @@ int test4()
static assert(test4() == 24666);
/************************************/
-// 8400
+// https://issues.dlang.org/show_bug.cgi?id=8400
void test8400()
{
@@ -434,7 +377,7 @@ void test8400()
}
/************************************/
-// 8939
+// https://issues.dlang.org/show_bug.cgi?id=8939
void foo8939(T)(ref T) { } // same for `auto ref`
void bar8939(ref const int) { }
@@ -486,7 +429,7 @@ class C8939regression
}
/************************************/
-// 9058
+// https://issues.dlang.org/show_bug.cgi?id=9058
template TypeTuple9058(TL...) { alias TypeTuple9058 = TL; }
template EnumMembers9058(T)
@@ -504,22 +447,7 @@ void test9058()
}
/************************************/
-// 11159
-
-void test11159()
-{
- import std.math : pow;
- enum ulong
- e_2_pow_64 = 2uL^^64,
- e_10_pow_19 = 10uL^^19,
- e_10_pow_20 = 10uL^^20;
- assert(e_2_pow_64 == pow(2uL, 64));
- assert(e_10_pow_19 == pow(10uL, 19));
- assert(e_10_pow_20 == pow(10uL, 20));
-}
-
-/************************************/
-// 12306
+// https://issues.dlang.org/show_bug.cgi?id=12306
void test12306()
{
@@ -540,7 +468,7 @@ void test12306()
}
/************************************/
-// 13977
+// https://issues.dlang.org/show_bug.cgi?id=13977
void test13977()
{
@@ -570,7 +498,7 @@ void test13977()
}
/************************************/
-// 13978
+// https://issues.dlang.org/show_bug.cgi?id=13978
void test13978()
{
@@ -616,7 +544,7 @@ void test3697or()
}
/************************************/
-// 14459
+// https://issues.dlang.org/show_bug.cgi?id=14459
void test14459()
{
@@ -665,11 +593,9 @@ int main()
test8400();
test8939();
test9058();
- test11159();
test13977();
test13978();
test14459();
- printf("Success\n");
return 0;
}
diff --git a/gcc/testsuite/gdc.test/runnable/cppdtor.d b/gcc/testsuite/gdc.test/runnable/cppdtor.d
new file mode 100644
index 0000000..0592d44
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/cppdtor.d
@@ -0,0 +1,143 @@
+/*
+https://issues.dlang.org/show_bug.cgi?id=21693
+
+RUN_OUTPUT:
+---
+CppA:
+1: CppA.~this
+CppB:
+2: CppB.~this
+2: CppA.~this
+CppC:
+3: CppC.~this
+3: CppB.~this
+3: CppA.~this
+CppC:
+4: CppC.~this
+4: CppB.~this
+4: CppA.~this
+CppNoDestruct:
+DA:
+1: DA.~this
+DB:
+2: DB.~this
+2: DA.~this
+DC:
+3: DC.~this
+3: DB.~this
+3: DA.~this
+DC:
+4: DC.~this
+4: DB.~this
+4: DA.~this
+---
+*/
+
+extern (C) int printf(scope const char*, ...);
+
+extern (C++) class CppA
+{
+ int num;
+ this(int num)
+ {
+ this.num = num;
+ }
+
+ ~this()
+ {
+ printf("%d: CppA.~this\n", num);
+ }
+}
+
+extern (C++) class CppB : CppA
+{
+ this(int num)
+ {
+ super(num);
+ }
+
+ ~this()
+ {
+ printf("%d: CppB.~this\n", num);
+ }
+}
+
+extern (C++) class CppC : CppB
+{
+ this(int num)
+ {
+ super(num);
+ }
+
+ ~this()
+ {
+ printf("%d: CppC.~this\n", num);
+ }
+}
+
+extern (D) class DA
+{
+ int num;
+ this(int num)
+ {
+ this.num = num;
+ }
+
+ ~this()
+ {
+ printf("%d: DA.~this\n", num);
+ }
+}
+
+extern (D) class DB : DA
+{
+ this(int num)
+ {
+ super(num);
+ }
+
+ ~this()
+ {
+ printf("%d: DB.~this\n", num);
+ }
+}
+
+extern (D) class DC : DB
+{
+ this(int num)
+ {
+ super(num);
+ }
+
+ ~this()
+ {
+ printf("%d: DC.~this\n", num);
+ }
+}
+
+extern (C++) class CppNoDestruct
+{
+ int num;
+ this(int num)
+ {
+ this.num = num;
+ }
+}
+
+void main()
+{
+ printf("CppA:\n"); { scope a = new CppA(1); }
+ printf("CppB:\n"); { scope CppA b = new CppB(2); }
+ printf("CppC:\n"); { scope CppA c = new CppC(3); }
+ printf("CppC:\n"); { scope CppB c2 = new CppC(4); }
+
+ printf("CppNoDestruct:\n");
+ {
+ scope const nd = new CppNoDestruct(1);
+ }
+
+ printf("DA:\n"); { scope a = new DA(1); }
+ printf("DB:\n"); { scope DA b = new DB(2); }
+ printf("DC:\n"); { scope DA c = new DC(3); }
+ printf("DC:\n"); { scope DB c2 = new DC(4); }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/ctorpowtests.d b/gcc/testsuite/gdc.test/runnable/ctorpowtests.d
index 89f846a..f2cf5d8 100644
--- a/gcc/testsuite/gdc.test/runnable/ctorpowtests.d
+++ b/gcc/testsuite/gdc.test/runnable/ctorpowtests.d
@@ -3,23 +3,32 @@
int magicVariable()
{
- if (__ctfe)
- return 3;
+ if (__ctfe)
+ return 3;
- shared int var = 2;
- return var;
+ shared int var = 2;
+ return var;
}
static assert(magicVariable()==3);
-void main()
+/************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11159
+
+void test11159()
{
- assert(!__ctfe);
- assert(magicVariable()==2);
+ import std.math : pow;
+ enum ulong
+ e_2_pow_64 = 2uL^^64,
+ e_10_pow_19 = 10uL^^19,
+ e_10_pow_20 = 10uL^^20;
+ assert(e_2_pow_64 == pow(2uL, 64));
+ assert(e_10_pow_19 == pow(10uL, 19));
+ assert(e_10_pow_20 == pow(10uL, 20));
}
-// bug 991 -- invalid.
-// bug 3500 -- is this related to 2127?
+// https://issues.dlang.org/show_bug.cgi?id=991 -- invalid.
+// https://issues.dlang.org/show_bug.cgi?id=3500 -- is this related to 2127?
// Tests for ^^
// TODO: These tests should not require import std.math.
@@ -32,6 +41,25 @@ static assert( 2.0 ^^ 3 == 8.0);
static assert( 2.0 ^^ 4 == 16.0);
static assert( 2 ^^ 4 == 16);
+static assert((2 ^^ 8) == 256);
+static assert((3 ^^ 8.0) == 6561);
+static assert((4.0 ^^ 8) == 65536);
+static assert((5.0 ^^ 8.0) == 390625);
+
+static assert((0.5 ^^ 3) == 0.125);
+static assert((1.5 ^^ 3.0) == 3.375);
+static assert((2.5 ^^ 3) == 15.625);
+static assert((3.5 ^^ 3.0) == 42.875);
+
+static assert(((-2) ^^ -5.0) == -0.031250);
+static assert(((-2.0) ^^ -6) == 0.015625);
+static assert(((-2.0) ^^ -7.0) == -0.0078125);
+
+static assert((144 ^^ 0.5) == 12);
+static assert((1089 ^^ 0.5) == 33);
+static assert((1764 ^^ 0.5) == 42);
+static assert((650.25 ^^ 0.5) == 25.5);
+
// Check the typing rules.
static assert( is (typeof(2.0^^7) == double));
static assert( is (typeof(7^^3) == int));
@@ -78,13 +106,16 @@ static assert( 2 ^^ 3 ^^ 2 == 2 ^^ 9);
static assert( 2.0 ^^ -3 ^^ 2 == 2.0 ^^ -9);
// 1 ^^ n is always 1, even if n is negative
-static assert( 1 ^^ -5 == 1);
+static assert( 1 ^^ -5.0 == 1);
-// -1 ^^ n gets transformed into n & 1 ? -1 : 1
-// even if n is negative
-static assert( (-1) ^^ -5 == -1);
-static assert( (-1) ^^ -4 == 1);
-static assert( (-1) ^^ 0 == 1);
+// -1.0 ^^ n is either 1 or -1 if n is integral.
+static assert( (-1.0) ^^ -5 == -1);
+static assert( (-1.0) ^^ -4 == 1);
+static assert( (-1.0) ^^ 0 == 1);
+// -1.0 ^^ n is otherwise always NaN.
+static assert( (-1.0) ^^ -5.5 is double.nan);
+static assert( (-1.0) ^^ -4.4 is double.nan);
+static assert( (-1.0) ^^ -0.1 is double.nan);
// n ^^ 0 is always 1
static assert( (-5) ^^ 0 == 1);
@@ -100,7 +131,7 @@ static assert( 9 ^^ -1.0 == 1.0 / 9);
static assert( !is(typeof(2 ^^ -5)));
static assert( !is(typeof((-2) ^^ -4)));
-// Bug 3535
+// https://issues.dlang.org/show_bug.cgi?id=3535
struct StructWithCtor
{
this(int _n) {
@@ -232,3 +263,12 @@ int anotherPowTest()
double x = 5.0;
return x^^4 > 2.0 ? 3: 2;
}
+
+/************************************/
+
+void main()
+{
+ assert(!__ctfe);
+ assert(magicVariable()==2);
+ test11159();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/declaration.d b/gcc/testsuite/gdc.test/runnable/declaration.d
index 0dbd287..5be76fa 100644
--- a/gcc/testsuite/gdc.test/runnable/declaration.d
+++ b/gcc/testsuite/gdc.test/runnable/declaration.d
@@ -15,7 +15,7 @@ Success
extern(C) int printf(const char*, ...);
/***************************************************/
-// 6475
+// https://issues.dlang.org/show_bug.cgi?id=6475
class Foo6475(Value)
{
@@ -34,7 +34,7 @@ void test6475()
}
/***************************************************/
-// 6905
+// https://issues.dlang.org/show_bug.cgi?id=6905
void test6905()
{
@@ -62,7 +62,7 @@ void test6905()
}
/***************************************************/
-// 7019
+// https://issues.dlang.org/show_bug.cgi?id=7019
struct S7019
{
@@ -106,7 +106,7 @@ void test7019()
}
/***************************************************/
-// 7239
+// https://issues.dlang.org/show_bug.cgi?id=7239
struct vec7239
{
@@ -145,7 +145,7 @@ void test10635()
}
/***************************************************/
-// 8123
+// https://issues.dlang.org/show_bug.cgi?id=8123
void test8123()
{
@@ -169,7 +169,7 @@ void test8123()
}
/***************************************************/
-// 8147
+// https://issues.dlang.org/show_bug.cgi?id=8147
enum A8147 { a, b, c }
@@ -195,7 +195,7 @@ void test8147()
}
/***************************************************/
-// 8410
+// https://issues.dlang.org/show_bug.cgi?id=8410
void test8410()
{
@@ -207,7 +207,7 @@ void test8410()
}
/***************************************************/
-// 8942
+// https://issues.dlang.org/show_bug.cgi?id=8942
alias const int A8942_0;
static assert(is(A8942_0 == const int)); // passes
@@ -230,7 +230,7 @@ void test8942()
}
/***************************************************/
-// 10144
+// https://issues.dlang.org/show_bug.cgi?id=10144
final class TNFA10144(char_t)
{
@@ -258,7 +258,7 @@ class C10144
/***************************************************/
-// 10142
+// https://issues.dlang.org/show_bug.cgi?id=10142
class File10142
{
@@ -291,7 +291,7 @@ void test10142()
}
/***************************************************/
-// 11421
+// https://issues.dlang.org/show_bug.cgi?id=11421
void test11421()
{
@@ -308,7 +308,7 @@ void test11421()
}
/***************************************************/
-// 13776
+// https://issues.dlang.org/show_bug.cgi?id=13776
enum a13776(T) = __traits(compiles, { T; });
@@ -364,7 +364,7 @@ void test13776()
}
/***************************************************/
-// 14090
+// https://issues.dlang.org/show_bug.cgi?id=14090
template Packed14090(Args...)
{
@@ -389,7 +389,7 @@ template RoundRobin14090()
alias roundRobin14090 = RoundRobin14090!();
/***************************************************/
-// 13950
+// https://issues.dlang.org/show_bug.cgi?id=13950
template Tuple13950(T...) { alias T Tuple13950; }
diff --git a/gcc/testsuite/gdc.test/runnable/delegate.d b/gcc/testsuite/gdc.test/runnable/delegate.d
index a371e1c..1eed53a 100644
--- a/gcc/testsuite/gdc.test/runnable/delegate.d
+++ b/gcc/testsuite/gdc.test/runnable/delegate.d
@@ -1,4 +1,19 @@
-// REQUIRED_ARGS:
+/*
+REQUIRED_ARGS:
+RUN_OUTPUT:
+---
+47 47
+47 47
+48 48
+48 48
+i = 1
+6
+here 3
+here 3
+here 3
+Success
+---
+*/
import core.stdc.stdio;
@@ -187,7 +202,7 @@ void test9()
}
/********************************************************/
-// 8257
+// https://issues.dlang.org/show_bug.cgi?id=8257
struct S8257 {
static int g() {
@@ -227,8 +242,8 @@ void test10()
class A12
{
public:
- int delegate(int, int) dgs[4];
- int function(int, int) fps[4];
+ int delegate(int, int)[4] dgs;
+ int function(int, int)[4] fps;
int delegate(int, int) dg;
int function(int, int) fp;
int f(int x, int y) {
@@ -263,7 +278,7 @@ void test12()
}
/********************************************************/
-// 1570
+// https://issues.dlang.org/show_bug.cgi?id=1570
class A13
{
@@ -291,7 +306,24 @@ void test13()
}
/********************************************************/
-// 2472
+
+enum dg14 = delegate { ++a14; b14 += 2; };
+
+int a14, b14;
+
+void test14()
+{
+ a14 = b14 = 10;
+
+ auto var = dg14;
+ var();
+
+ assert(a14 == 11);
+ assert(b14 == 12);
+}
+
+/********************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=2472
class A2472
{
@@ -348,6 +380,7 @@ int main()
test10();
test12();
test13();
+ test14();
test2472();
test8257();
testAssign();
diff --git a/gcc/testsuite/gdc.test/runnable/dhry.d b/gcc/testsuite/gdc.test/runnable/dhry.d
new file mode 100644
index 0000000..1eb463c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/dhry.d
@@ -0,0 +1,947 @@
+/*
+PERMUTE_ARGS:
+REQUIRED_ARGS: -release -O -g -inline
+DISABLED: freebsd dragonflybsd
+
+Deprecation caused by https://issues.dlang.org/show_bug.cgi?id=20645
+*/
+
+/*
+ *************************************************************************
+ *
+ * "DHRYSTONE" Benchmark Program
+ * -----------------------------
+ *
+ * Version: C, Version 2.1
+ *
+ * File: dhry.h (part 1 of 3)
+ *
+ * Date: May 25, 1988
+ *
+ * Author: Reinhold P. Weicker
+ * Siemens Nixdorf Inf. Syst.
+ * STM OS 32
+ * Otto-Hahn-Ring 6
+ * W-8000 Muenchen 83
+ * Germany
+ * Phone: [+49]-89-636-42436
+ * (8-17 Central European Time)
+ * UUCP: weicker@ztivax.uucp@unido.uucp
+ * Internet: weicker@ztivax.siemens.com
+ *
+ * Original Version (in Ada) published in
+ * "Communications of the ACM" vol. 27., no. 10 (Oct. 1984),
+ * pp. 1013 - 1030, together with the statistics
+ * on which the distribution of statements etc. is based.
+ *
+ * In this C version, the following C library functions are
+ * used:
+ * - strcpy, strcmp (inside the measurement loop)
+ * - printf, scanf (outside the measurement loop)
+ *
+ * Collection of Results:
+ * Reinhold Weicker (address see above) and
+ *
+ * Rick Richardson
+ * PC Research. Inc.
+ * 94 Apple Orchard Drive
+ * Tinton Falls, NJ 07724
+ * Phone: (201) 834-1378 (9-17 EST)
+ * UUCP: ...!uunet!pcrat!rick
+ *
+ * Please send results to Rick Richardson and/or Reinhold Weicker.
+ * Complete information should be given on hardware and software
+ * used. Hardware information includes: Machine type, CPU, type and
+ * size of caches; for microprocessors: clock frequency, memory speed
+ * (number of wait states). Software information includes: Compiler
+ * (and runtime library) manufacturer and version, compilation
+ * switches, OS version. The Operating System version may give an
+ * indication about the compiler; Dhrystone itself performs no OS
+ * calls in the measurement loop.
+ *
+ * The complete output generated by the program should be mailed
+ * such that at least some checks for correctness can be made.
+ *
+ *************************************************************************
+ *
+ * History: This version C/2.1 has been made for two reasons:
+ *
+ * 1) There is an obvious need for a common C version of
+ * Dhrystone, since C is at present the most popular system
+ * programming language for the class of processors
+ * (microcomputers, minicomputers) where Dhrystone is used
+ * most. There should be, as far as possible, only one C
+ * version of Dhrystone such that results can be compared
+ * without restrictions. In the past, the C versions
+ * distributed by Rick Richardson (Version 1.1) and by
+ * Reinhold Weicker had small (though not significant)
+ * differences.
+ *
+ * 2) As far as it is possible without changes to the
+ * Dhrystone statistics, optimizing compilers should be
+ * prevented from removing significant statements.
+ *
+ * This C version has been developed in cooperation with
+ * Rick Richardson (Tinton Falls, NJ), it incorporates many
+ * ideas from the "Version 1.1" distributed previously by
+ * him over the UNIX network Usenet.
+ * I also thank Chaim Benedelac (National Semiconductor),
+ * David Ditzel (SUN), Earl Killian and John Mashey (MIPS),
+ * Alan Smith and Rafael Saavedra-Barrera (UC at Berkeley)
+ * for their help with comments on earlier versions of the
+ * benchmark.
+ *
+ * Changes: In the initialization part, this version follows mostly
+ * Rick Richardson's version distributed via Usenet, not the
+ * version distributed earlier via floppy disk by Reinhold
+ * Weicker. As a concession to older compilers, names have
+ * been made unique within the first 8 characters. Inside the
+ * measurement loop, this version follows the version
+ * previously distributed by Reinhold Weicker.
+ *
+ * At several places in the benchmark, code has been added,
+ * but within the measurement loop only in branches that
+ * are not executed. The intention is that optimizing
+ * compilers should be prevented from moving code out of the
+ * measurement loop, or from removing code altogether. Since
+ * the statements that are executed within the measurement
+ * loop have NOT been changed, the numbers defining the
+ * "Dhrystone distribution" (distribution of statements,
+ * operand types and locality) still hold. Except for
+ * sophisticated optimizing compilers, execution times for
+ * this version should be the same as for previous versions.
+ *
+ * Since it has proven difficult to subtract the time for the
+ * measurement loop overhead in a correct way, the loop check
+ * has been made a part of the benchmark. This does have
+ * an impact - though a very minor one - on the distribution
+ * statistics which have been updated for this version.
+ *
+ * All changes within the measurement loop are described
+ * and discussed in the companion paper "Rationale for
+ * Dhrystone version 2".
+ *
+ * Because of the self-imposed limitation that the order and
+ * distribution of the executed statements should not be
+ * changed, there are still cases where optimizing compilers
+ * may not generate code for some statements. To a certain
+ * degree, this is unavoidable for small synthetic
+ * benchmarks. Users of the benchmark are advised to check
+ * code listings whether code is generated for all statements
+ * of Dhrystone.
+ *
+ * Version 2.1 is identical to version 2.0 distributed via
+ * the UNIX network Usenet in March 1988 except that it
+ * corrects some minor deficiencies that were found by users
+ * of version 2.0. The only change within the measurement
+ * loop is that a non-executed "else" part was added to the
+ * "if" statement in Func_3, and a non-executed "else" part
+ * removed from Proc_3.
+ *
+ *************************************************************************
+ *
+ * Defines: The following "Defines" are possible:
+ * -DROPT (default: Not defined)
+ * As an approximation to what an average C
+ * programmer might do, the "register" storage class
+ * is applied (if enabled by -DROPT)
+ * - for local variables, if they are used
+ * (dynamically) five or more times
+ * - for parameters if they are used (dynamically)
+ * six or more times
+ * Note that an optimal "register" strategy is
+ * compiler-dependent, and that "register"
+ * declarations do not necessarily lead to faster
+ * execution.
+ * -DNOSTRUCTASSIGN (default: Not defined)
+ * Define if the C compiler does not support
+ * assignment of structures.
+ * -DNOENUMS (default: Not defined)
+ * Define if the C compiler does not support
+ * enumeration types.
+ *
+ *************************************************************************
+ *
+ * Compilation model and measurement (IMPORTANT):
+ *
+ * This C version of Dhrystone consists of three files:
+ * - dhry.h (this file, containing global definitions and comments)
+ * - dhry_1.c (containing the code corresponding to Ada package Pack_1)
+ * - dhry_2.c (containing the code corresponding to Ada package Pack_2)
+ *
+ * The following "ground rules" apply for measurements:
+ * - Separate compilation
+ * - No procedure merging
+ * - Otherwise, compiler optimizations are allowed but should be
+ * indicated
+ * - Default results are those without register declarations
+ * See the companion paper "Rationale for Dhrystone Version 2" for a more
+ * detailed discussion of these ground rules.
+ *
+ * For 16-Bit processors (e.g. 80186, 80286), times for all compilation
+ * models ("small", "medium", "large" etc.) should be given if possible,
+ * together with a definition of these models for the compiler system
+ * used.
+ *
+ *************************************************************************
+ *
+ * Dhrystone (C version) statistics:
+ *
+ * [Comment from the first distribution, updated for version 2.
+ * Note that because of language differences, the numbers are slightly
+ * different from the Ada version.]
+ *
+ * The following program contains statements of a high level programming
+ * language (here: C) in a distribution considered representative:
+ *
+ * assignments 52 (51.0 %)
+ * control statements 33 (32.4 %)
+ * procedure, function calls 17 (16.7 %)
+ *
+ * 103 statements are dynamically executed. The program is balanced with
+ * respect to the three aspects:
+ *
+ * - statement type
+ * - operand type
+ * - operand locality
+ * operand global, local, parameter, or constant.
+ *
+ * The combination of these three aspects is balanced only approximately.
+ *
+ * 1. Statement Type:
+ * ----------------- number
+ *
+ * V1 = V2 9
+ * (incl. V1 = F(..)
+ * V = Constant 12
+ * Assignment, 7
+ * with array element
+ * Assignment, 6
+ * with record component
+ * --
+ * 34 34
+ *
+ * X = Y +|-|"&&"|"|" Z 5
+ * X = Y +|-|"==" Constant 6
+ * X = X +|- 1 3
+ * X = Y *|/ Z 2
+ * X = Expression, 1
+ * two operators
+ * X = Expression, 1
+ * three operators
+ * --
+ * 18 18
+ *
+ * if .... 14
+ * with "else" 7
+ * without "else" 7
+ * executed 3
+ * not executed 4
+ * for ... 7 | counted every time
+ * while ... 4 | the loop condition
+ * do ... while 1 | is evaluated
+ * switch ... 1
+ * break 1
+ * declaration with 1
+ * initialization
+ * --
+ * 34 34
+ *
+ * P (...) procedure call 11
+ * user procedure 10
+ * library procedure 1
+ * X = F (...)
+ * function call 6
+ * user function 5
+ * library function 1
+ * --
+ * 17 17
+ * ---
+ * 103
+ *
+ * The average number of parameters in procedure or function calls
+ * is 1.82 (not counting the function values as implicit parameters).
+ *
+ *
+ * 2. Operators
+ * ------------
+ * number approximate
+ * percentage
+ *
+ * Arithmetic 32 50.8
+ *
+ * + 21 33.3
+ * - 7 11.1
+ * * 3 4.8
+ * / (int div) 1 1.6
+ *
+ * Comparison 27 42.8
+ *
+ * == 9 14.3
+ * /= 4 6.3
+ * > 1 1.6
+ * < 3 4.8
+ * >= 1 1.6
+ * <= 9 14.3
+ *
+ * Logic 4 6.3
+ *
+ * && (AND-THEN) 1 1.6
+ * | (OR) 1 1.6
+ * ! (NOT) 2 3.2
+ *
+ * -- -----
+ * 63 100.1
+ *
+ *
+ * 3. Operand Type (counted once per operand reference):
+ * ---------------
+ * number approximate
+ * percentage
+ *
+ * Integer 175 72.3 %
+ * Character 45 18.6 %
+ * Pointer 12 5.0 %
+ * String30 6 2.5 %
+ * Array 2 0.8 %
+ * Record 2 0.8 %
+ * --- -------
+ * 242 100.0 %
+ *
+ * When there is an access path leading to the final operand (e.g. a
+ * record component), only the final data type on the access path is
+ * counted.
+ *
+ *
+ * 4. Operand Locality:
+ * -------------------
+ * number approximate
+ * percentage
+ *
+ * local variable 114 47.1 %
+ * global variable 22 9.1 %
+ * parameter 45 18.6 %
+ * value 23 9.5 %
+ * reference 22 9.1 %
+ * function result 6 2.5 %
+ * constant 55 22.7 %
+ * --- -------
+ * 242 100.0 %
+ *
+ *
+ * The program does not compute anything meaningful, but it is
+ * syntactically and semantically correct. All variables have a value
+ * assigned to them before they are used as a source operand.
+ *
+ * There has been no explicit effort to account for the effects of a
+ * cache, or to balance the use of long or short displacements for code
+ * or data.
+ *
+ *************************************************************************
+ */
+
+import core.stdc.stdio;
+import core.stdc.string;
+import core.stdc.stdlib;
+import std.string;
+
+
+/* Compiler and system dependent definitions: */
+
+const double Mic_secs_Per_Second = 1000000.0;
+ /* Berkeley UNIX C returns process times in seconds/HZ */
+
+enum {Ident_1, Ident_2, Ident_3, Ident_4, Ident_5}
+alias int Enumeration;
+ /* for boolean and enumeration types in Ada, Pascal */
+
+/* General definitions: */
+
+const int StrLen = 30;
+
+alias int One_Thirty;
+alias int One_Fifty;
+alias char Capital_Letter;
+alias bool Boolean;
+alias char[StrLen] Str_30;
+alias int[50] Arr_1_Dim;
+alias int[50][50] Arr_2_Dim;
+
+struct record
+{
+ record *Ptr_Comp;
+ Enumeration Discr;
+ union V {
+ struct V1 {
+ Enumeration Enum_Comp;
+ int Int_Comp;
+ char[StrLen] Str_Comp;
+ }
+ V1 var_1;
+ struct V2 {
+ Enumeration E_Comp_2;
+ char [StrLen] Str_2_Comp;
+ }
+ V2 var_2;
+ struct V3 {
+ char Ch_1_Comp;
+ char Ch_2_Comp;
+ }
+ V3 var_3;
+ }
+ V variant;
+}
+
+alias record Rec_Type;
+alias record *Rec_Pointer;
+
+
+/* Global Variables: */
+
+Rec_Pointer Ptr_Glob,
+ Next_Ptr_Glob;
+int Int_Glob;
+Boolean Bool_Glob;
+char Ch_1_Glob,
+ Ch_2_Glob;
+int[50] Arr_1_Glob;
+int[50][50] Arr_2_Glob;
+
+char[StrLen] Reg_Define = "Register option selected.";
+
+/* variables for time measurement: */
+
+const int Too_Small_Time = 2;
+ /* Measurements should last at least 2 seconds */
+
+double Begin_Time,
+ End_Time,
+ User_Time;
+
+double Microseconds,
+ Dhrystones_Per_Second,
+ Vax_Mips;
+
+/* end of variables for time measurement */
+
+
+void main ()
+/*****/
+
+ /* main program, corresponds to procedures */
+ /* Main and Proc_0 in the Ada version */
+{
+ One_Fifty Int_1_Loc;
+ One_Fifty Int_2_Loc;
+ One_Fifty Int_3_Loc;
+ char Ch_Index;
+ Enumeration Enum_Loc;
+ Str_30 Str_1_Loc;
+ Str_30 Str_2_Loc;
+ int Run_Index;
+ int Number_Of_Runs;
+
+/+
+ FILE *Ap;
+
+ /* Initializations */
+
+ if ((Ap = fopen("dhry.res","a+")) == null)
+ {
+ printf("Can not open dhry.res\n\n");
+ exit(1);
+ }
++/
+
+ Next_Ptr_Glob = cast(Rec_Pointer) malloc (Rec_Type.sizeof);
+ Ptr_Glob = cast(Rec_Pointer) malloc (Rec_Type.sizeof);
+
+ Ptr_Glob.Ptr_Comp = Next_Ptr_Glob;
+ Ptr_Glob.Discr = Ident_1;
+ Ptr_Glob.variant.var_1.Enum_Comp = Ident_3;
+ Ptr_Glob.variant.var_1.Int_Comp = 40;
+// strcpy (Ptr_Glob.variant.var_1.Str_Comp,
+// "DHRYSTONE PROGRAM, SOME STRING");
+// strcpy (Str_1_Loc, "DHRYSTONE PROGRAM, 1'ST STRING");
+ Ptr_Glob.variant.var_1.Str_Comp[] = "DHRYSTONE PROGRAM, SOME STRING";
+ Str_1_Loc[] = "DHRYSTONE PROGRAM, 1'ST STRING";
+
+ Arr_2_Glob [8][7] = 10;
+ /* Was missing in published program. Without this statement, */
+ /* Arr_2_Glob [8][7] would have an undefined value. */
+ /* Warning: With 16-Bit processors and Number_Of_Runs > 32000, */
+ /* overflow may occur for this array element. */
+
+ printf ("\n");
+ printf ("Dhrystone Benchmark, Version 2.1 (Language: D)\n");
+ printf ("\n");
+ printf ("Please give the number of runs through the benchmark: ");
+ {
+ int n;
+ //scanf ("%d", &n);
+ n = 10000000;
+ Number_Of_Runs = n;
+ }
+ printf ("\n");
+
+ printf ("Execution starts, %d runs through Dhrystone\n",Number_Of_Runs);
+
+ /***************/
+ /* Start timer */
+ /***************/
+
+ Begin_Time = dtime();
+
+ for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
+ {
+
+ Proc_5();
+ Proc_4();
+ /* Ch_1_Glob == 'A', Ch_2_Glob == 'B', Bool_Glob == true */
+ Int_1_Loc = 2;
+ Int_2_Loc = 3;
+ //strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
+ Str_2_Loc[] = "DHRYSTONE PROGRAM, 2'ND STRING";
+ Enum_Loc = Ident_2;
+ Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
+ /* Bool_Glob == 1 */
+ while (Int_1_Loc < Int_2_Loc) /* loop body executed once */
+ {
+ Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
+ /* Int_3_Loc == 7 */
+ Proc_7 (Int_1_Loc, Int_2_Loc, &Int_3_Loc);
+ /* Int_3_Loc == 7 */
+ Int_1_Loc += 1;
+ } /* while */
+ /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
+ Proc_8 (Arr_1_Glob, Arr_2_Glob, Int_1_Loc, Int_3_Loc);
+ /* Int_Glob == 5 */
+ Proc_1 (Ptr_Glob);
+ for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
+ /* loop body executed twice */
+ {
+ if (Enum_Loc == Func_1 (Ch_Index, 'C'))
+ /* then, not executed */
+ {
+ Proc_6 (Ident_1, &Enum_Loc);
+ //strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 3'RD STRING");
+ Str_2_Loc[] = "DHRYSTONE PROGRAM, 3'RD STRING";
+ Int_2_Loc = Run_Index;
+ Int_Glob = Run_Index;
+ }
+ }
+ /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
+ Int_2_Loc = Int_2_Loc * Int_1_Loc;
+ Int_1_Loc = Int_2_Loc / Int_3_Loc;
+ Int_2_Loc = 7 * (Int_2_Loc - Int_3_Loc) - Int_1_Loc;
+ /* Int_1_Loc == 1, Int_2_Loc == 13, Int_3_Loc == 7 */
+ Proc_2 (&Int_1_Loc);
+ /* Int_1_Loc == 5 */
+
+ } /* loop "for Run_Index" */
+
+ /**************/
+ /* Stop timer */
+ /**************/
+
+ End_Time = dtime();
+
+ printf ("Execution ends\n");
+ printf ("\n");
+ printf ("Final values of the variables used in the benchmark:\n");
+ printf ("\n");
+ printf ("Int_Glob: %d\n", Int_Glob);
+ printf (" should be: %d\n", 5);
+ printf ("Bool_Glob: %d\n", Bool_Glob);
+ printf (" should be: %d\n", 1);
+ printf ("Ch_1_Glob: %c\n", Ch_1_Glob);
+ printf (" should be: %c\n", 'A');
+ printf ("Ch_2_Glob: %c\n", Ch_2_Glob);
+ printf (" should be: %c\n", 'B');
+ printf ("Arr_1_Glob[8]: %d\n", Arr_1_Glob[8]);
+ printf (" should be: %d\n", 7);
+ printf ("Arr_2_Glob[8][7]: %d\n", Arr_2_Glob[8][7]);
+ printf (" should be: Number_Of_Runs + 10\n");
+ printf ("Ptr_Glob.\n");
+ printf (" Ptr_Comp: %d\n", cast(int) Ptr_Glob.Ptr_Comp);
+ printf (" should be: (implementation-dependent)\n");
+ printf (" Discr: %d\n", Ptr_Glob.Discr);
+ printf (" should be: %d\n", 0);
+ printf (" Enum_Comp: %d\n", Ptr_Glob.variant.var_1.Enum_Comp);
+ printf (" should be: %d\n", 2);
+ printf (" Int_Comp: %d\n", Ptr_Glob.variant.var_1.Int_Comp);
+ printf (" should be: %d\n", 17);
+ printf (" Str_Comp: %.*s\n", cast(int)Ptr_Glob.variant.var_1.Str_Comp.length, Ptr_Glob.variant.var_1.Str_Comp.ptr);
+ printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
+ printf ("Next_Ptr_Glob.\n");
+ printf (" Ptr_Comp: %d\n", cast(int) Next_Ptr_Glob.Ptr_Comp);
+ printf (" should be: (implementation-dependent), same as above\n");
+ printf (" Discr: %d\n", Next_Ptr_Glob.Discr);
+ printf (" should be: %d\n", 0);
+ printf (" Enum_Comp: %d\n", Next_Ptr_Glob.variant.var_1.Enum_Comp);
+ printf (" should be: %d\n", 1);
+ printf (" Int_Comp: %d\n", Next_Ptr_Glob.variant.var_1.Int_Comp);
+ printf (" should be: %d\n", 18);
+ printf (" Str_Comp: %.*s\n", cast(int)Next_Ptr_Glob.variant.var_1.Str_Comp.length, Next_Ptr_Glob.variant.var_1.Str_Comp.ptr);
+ printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
+ printf ("Int_1_Loc: %d\n", Int_1_Loc);
+ printf (" should be: %d\n", 5);
+ printf ("Int_2_Loc: %d\n", Int_2_Loc);
+ printf (" should be: %d\n", 13);
+ printf ("Int_3_Loc: %d\n", Int_3_Loc);
+ printf (" should be: %d\n", 7);
+ printf ("Enum_Loc: %d\n", Enum_Loc);
+ printf (" should be: %d\n", 1);
+ printf ("Str_1_Loc: %.*s\n", cast(int)Str_1_Loc.length, Str_1_Loc.ptr);
+ printf (" should be: DHRYSTONE PROGRAM, 1'ST STRING\n");
+ printf ("Str_2_Loc: %.*s\n", cast(int)Str_2_Loc.length, Str_2_Loc.ptr);
+ printf (" should be: DHRYSTONE PROGRAM, 2'ND STRING\n");
+ printf ("\n");
+
+ User_Time = End_Time - Begin_Time;
+
+ if (User_Time < Too_Small_Time)
+ {
+ printf ("Measured time too small to obtain meaningful results\n");
+ printf ("Please increase number of runs\n");
+ printf ("\n");
+ }
+ else
+ {
+ Microseconds = User_Time * Mic_secs_Per_Second
+ / cast(double) Number_Of_Runs;
+ Dhrystones_Per_Second = cast(double) Number_Of_Runs / User_Time;
+ Vax_Mips = Dhrystones_Per_Second / 1757.0;
+
+ printf ("Register option selected? NO\n");
+ strcpy(Reg_Define.ptr, "Register option not selected.");
+ printf ("Microseconds for one run through Dhrystone: ");
+ printf ("%7.1f \n", Microseconds);
+ printf ("Dhrystones per Second: ");
+ printf ("%10.1f \n", Dhrystones_Per_Second);
+ printf ("VAX MIPS rating = %10.3f \n",Vax_Mips);
+ printf ("\n");
+
+ /+
+ fprintf(Ap,"\n");
+ fprintf(Ap,"Dhrystone Benchmark, Version 2.1 (Language: D)\n");
+ fprintf(Ap,"%.*s\n",Reg_Define.length, Reg_Define.ptr);
+ fprintf(Ap,"Microseconds for one loop: %7.1f\n",Microseconds);
+ fprintf(Ap,"Dhrystones per second: %10.1f\n",Dhrystones_Per_Second);
+ fprintf(Ap,"VAX MIPS rating: %10.3f\n",Vax_Mips);
+ fclose(Ap);
+ +/
+
+ }
+
+}
+
+void Proc_1 (Rec_Pointer Ptr_Val_Par)
+/******************/
+
+ /* executed once */
+{
+ Rec_Pointer Next_Record = Ptr_Val_Par.Ptr_Comp;
+ /* == Ptr_Glob_Next */
+ /* Local variable, initialized with Ptr_Val_Par.Ptr_Comp, */
+ /* corresponds to "rename" in Ada, "with" in Pascal */
+
+ *Ptr_Val_Par.Ptr_Comp = *Ptr_Glob;
+ Ptr_Val_Par.variant.var_1.Int_Comp = 5;
+ Next_Record.variant.var_1.Int_Comp
+ = Ptr_Val_Par.variant.var_1.Int_Comp;
+ Next_Record.Ptr_Comp = Ptr_Val_Par.Ptr_Comp;
+ Proc_3 (&Next_Record.Ptr_Comp);
+ /* Ptr_Val_Par.Ptr_Comp.Ptr_Comp
+ == Ptr_Glob.Ptr_Comp */
+ if (Next_Record.Discr == Ident_1)
+ /* then, executed */
+ {
+ Next_Record.variant.var_1.Int_Comp = 6;
+ Proc_6 (Ptr_Val_Par.variant.var_1.Enum_Comp,
+ &Next_Record.variant.var_1.Enum_Comp);
+ Next_Record.Ptr_Comp = Ptr_Glob.Ptr_Comp;
+ Proc_7 (Next_Record.variant.var_1.Int_Comp, 10,
+ &Next_Record.variant.var_1.Int_Comp);
+ }
+ else /* not executed */
+ *Ptr_Val_Par = *Ptr_Val_Par.Ptr_Comp;
+} /* Proc_1 */
+
+void Proc_2 (One_Fifty *Int_Par_Ref)
+/******************/
+ /* executed once */
+ /* *Int_Par_Ref == 1, becomes 4 */
+{
+ One_Fifty Int_Loc;
+ Enumeration Enum_Loc;
+
+ Int_Loc = *Int_Par_Ref + 10;
+ do /* executed once */
+ if (Ch_1_Glob == 'A')
+ /* then, executed */
+ {
+ Int_Loc -= 1;
+ *Int_Par_Ref = Int_Loc - Int_Glob;
+ Enum_Loc = Ident_1;
+ } /* if */
+ while (Enum_Loc != Ident_1); /* true */
+} /* Proc_2 */
+
+
+void Proc_3 (Rec_Pointer *Ptr_Ref_Par)
+/******************/
+ /* executed once */
+ /* Ptr_Ref_Par becomes Ptr_Glob */
+
+{
+ if (Ptr_Glob != null)
+ /* then, executed */
+ *Ptr_Ref_Par = Ptr_Glob.Ptr_Comp;
+ Proc_7 (10, Int_Glob, &Ptr_Glob.variant.var_1.Int_Comp);
+} /* Proc_3 */
+
+void Proc_4 () /* without parameters */
+/*******/
+ /* executed once */
+{
+ Boolean Bool_Loc;
+
+ Bool_Loc = Ch_1_Glob == 'A';
+ Bool_Glob = Bool_Loc | Bool_Glob;
+ Ch_2_Glob = 'B';
+} /* Proc_4 */
+
+
+void Proc_5 () /* without parameters */
+/*******/
+ /* executed once */
+{
+ Ch_1_Glob = 'A';
+ Bool_Glob = false;
+} /* Proc_5 */
+
+
+void Proc_6 (Enumeration Enum_Val_Par, Enumeration *Enum_Ref_Par)
+/*********************************/
+ /* executed once */
+ /* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */
+{
+ *Enum_Ref_Par = Enum_Val_Par;
+ if (! Func_3 (Enum_Val_Par))
+ /* then, not executed */
+ *Enum_Ref_Par = Ident_4;
+ final switch (Enum_Val_Par)
+ {
+ case Ident_1:
+ *Enum_Ref_Par = Ident_1;
+ break;
+ case Ident_2:
+ if (Int_Glob > 100)
+ /* then */
+ *Enum_Ref_Par = Ident_1;
+ else *Enum_Ref_Par = Ident_4;
+ break;
+ case Ident_3: /* executed */
+ *Enum_Ref_Par = Ident_2;
+ break;
+ case Ident_4: break;
+ case Ident_5:
+ *Enum_Ref_Par = Ident_3;
+ break;
+ } /* switch */
+} /* Proc_6 */
+
+
+void Proc_7 (One_Fifty Int_1_Par_Val, One_Fifty Int_2_Par_Val, One_Fifty *Int_Par_Ref)
+/**********************************************/
+ /* executed three times */
+ /* first call: Int_1_Par_Val == 2, Int_2_Par_Val == 3, */
+ /* Int_Par_Ref becomes 7 */
+ /* second call: Int_1_Par_Val == 10, Int_2_Par_Val == 5, */
+ /* Int_Par_Ref becomes 17 */
+ /* third call: Int_1_Par_Val == 6, Int_2_Par_Val == 10, */
+ /* Int_Par_Ref becomes 18 */
+{
+ One_Fifty Int_Loc;
+
+ Int_Loc = Int_1_Par_Val + 2;
+ *Int_Par_Ref = Int_2_Par_Val + Int_Loc;
+} /* Proc_7 */
+
+
+void Proc_8 (ref Arr_1_Dim Arr_1_Par_Ref, ref Arr_2_Dim Arr_2_Par_Ref, int Int_1_Par_Val, int Int_2_Par_Val)
+/*********************************************************************/
+ /* executed once */
+ /* Int_Par_Val_1 == 3 */
+ /* Int_Par_Val_2 == 7 */
+{
+ One_Fifty Int_Index;
+ One_Fifty Int_Loc;
+
+ Int_Loc = Int_1_Par_Val + 5;
+ Arr_1_Par_Ref [Int_Loc] = Int_2_Par_Val;
+ Arr_1_Par_Ref [Int_Loc+1] = Arr_1_Par_Ref [Int_Loc];
+ Arr_1_Par_Ref [Int_Loc+30] = Int_Loc;
+ for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
+ Arr_2_Par_Ref [Int_Loc] [Int_Index] = Int_Loc;
+ Arr_2_Par_Ref [Int_Loc] [Int_Loc-1] += 1;
+ Arr_2_Par_Ref [Int_Loc+20] [Int_Loc] = Arr_1_Par_Ref [Int_Loc];
+ Int_Glob = 5;
+} /* Proc_8 */
+
+
+Enumeration Func_1 (Capital_Letter Ch_1_Par_Val, Capital_Letter Ch_2_Par_Val)
+/*************************************************/
+ /* executed three times */
+ /* first call: Ch_1_Par_Val == 'H', Ch_2_Par_Val == 'R' */
+ /* second call: Ch_1_Par_Val == 'A', Ch_2_Par_Val == 'C' */
+ /* third call: Ch_1_Par_Val == 'B', Ch_2_Par_Val == 'C' */
+{
+ Capital_Letter Ch_1_Loc;
+ Capital_Letter Ch_2_Loc;
+
+ Ch_1_Loc = Ch_1_Par_Val;
+ Ch_2_Loc = Ch_1_Loc;
+ if (Ch_2_Loc != Ch_2_Par_Val)
+ /* then, executed */
+ return (Ident_1);
+ else /* not executed */
+ {
+ Ch_1_Glob = Ch_1_Loc;
+ return (Ident_2);
+ }
+} /* Func_1 */
+
+
+Boolean Func_2 (Str_30 Str_1_Par_Ref, Str_30 Str_2_Par_Ref)
+/*************************************************/
+ /* executed once */
+ /* Str_1_Par_Ref == "DHRYSTONE PROGRAM, 1'ST STRING" */
+ /* Str_2_Par_Ref == "DHRYSTONE PROGRAM, 2'ND STRING" */
+{
+ One_Thirty Int_Loc;
+ Capital_Letter Ch_Loc;
+
+ Int_Loc = 2;
+ while (Int_Loc <= 2) /* loop body executed once */
+ if (Func_1 (Str_1_Par_Ref[Int_Loc],
+ Str_2_Par_Ref[Int_Loc+1]) == Ident_1)
+ /* then, executed */
+ {
+ Ch_Loc = 'A';
+ Int_Loc += 1;
+ } /* if, while */
+ if (Ch_Loc >= 'W' && Ch_Loc < 'Z')
+ /* then, not executed */
+ Int_Loc = 7;
+ if (Ch_Loc == 'R')
+ /* then, not executed */
+ return (true);
+ else /* executed */
+ {
+ //if (strcmp (Str_1_Par_Ref, Str_2_Par_Ref) > 0)
+ //if (memcmp (Str_1_Par_Ref, Str_2_Par_Ref, 30) > 0)
+ if (Str_1_Par_Ref > Str_2_Par_Ref)
+ /* then, not executed */
+ {
+ Int_Loc += 7;
+ Int_Glob = Int_Loc;
+ return (true);
+ }
+ else /* executed */
+ return (false);
+ } /* if Ch_Loc */
+} /* Func_2 */
+
+
+Boolean Func_3 (Enumeration Enum_Par_Val)
+/***************************/
+ /* executed once */
+ /* Enum_Par_Val == Ident_3 */
+{
+ Enumeration Enum_Loc;
+
+ Enum_Loc = Enum_Par_Val;
+ if (Enum_Loc == Ident_3)
+ /* then, executed */
+ return (true);
+ else /* not executed */
+ return (false);
+} /* Func_3 */
+
+version (Windows)
+{
+ import core.sys.windows.winbase;
+
+ double dtime()
+ {
+ double q;
+
+ q = cast(double)GetTickCount() * 1.0e-03;
+
+ return q;
+ }
+}
+
+version (linux)
+{
+ import core.stdc.time;
+
+ double dtime()
+ {
+ double q;
+
+ q = cast(double)time(null);
+
+ return q;
+ }
+}
+
+version (OSX) // supplied by Anders F Bjorklund
+{
+ import core.sys.posix.sys.time;
+
+ double dtime()
+ {
+ double q;
+ timeval tv;
+
+ gettimeofday(&tv,null);
+ q = cast(double)tv.tv_sec + cast(double)tv.tv_usec * 1.0e-6;
+
+ return q;
+ }
+}
+
+version (NetBSD)
+{
+ import core.sys.posix.sys.time;
+
+ double dtime()
+ {
+ double q;
+ timeval tv;
+
+ gettimeofday(&tv,null);
+ q = cast(double)tv.tv_sec + cast(double)tv.tv_usec * 1.0e-6;
+
+ return q;
+ }
+}
+
+version (OpenBSD)
+{
+ import core.sys.posix.sys.time;
+
+ double dtime()
+ {
+ double q;
+ timeval tv;
+
+ gettimeofday(&tv,null);
+ q = cast(double)tv.tv_sec + cast(double)tv.tv_usec * 1.0e-6;
+
+ return q;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/eh.d b/gcc/testsuite/gdc.test/runnable/eh.d
index b3077a2..7e7ec19 100644
--- a/gcc/testsuite/gdc.test/runnable/eh.d
+++ b/gcc/testsuite/gdc.test/runnable/eh.d
@@ -104,7 +104,7 @@ printf("catch, i = %d\n", i);
}
}
- printf("iterations %d totals: %ld, %ld\n", cIterations, total_x, total_nox);
+ printf("iterations %d totals: %lld, %lld\n", cIterations, total_x, total_nox);
}
int fn2_nox()
@@ -170,7 +170,7 @@ void test4()
catch(Exception e)
{
auto es = e.toString();
- printf("%.*s\n", es.length, es.ptr);
+ printf("%.*s\n", cast(int)es.length, es.ptr);
b++;
}
finally
@@ -213,7 +213,7 @@ void test4()
{
d++;
string es = e.toString;
- printf("%.*s\n", es.length, es.ptr);
+ printf("%.*s\n", cast(int)es.length, es.ptr);
}
assert(a == 2);
@@ -255,7 +255,7 @@ void test4()
{
q3++;
string es = e.toString;
- printf("%.*s\n", es.length, es.ptr);
+ printf("%.*s\n", cast(int)es.length, es.ptr);
}
assert(q0 == 1);
@@ -287,7 +287,7 @@ void test5()
result ~= cast(char)('a' + i);
}
}
- printf("--- %.*s", result.length, result.ptr);
+ printf("--- %.*s", cast(int)result.length, result.ptr);
if (result != "tctbta")
assert(0);
}
@@ -352,6 +352,38 @@ void test7()
/****************************************************
* Exception chaining tests. See also test4.d
+ * Don writes about the complexity:
+
+I can explain this, since I did the original implementation.
+When I originally implemented this, I discovered that the idea of
+"chained exceptions" was hopeless naive. The idea was that while
+processing one exception, if you encounter a second one, and you
+chain them together. Then you get a third, fourth, etc.
+
+The problem is that it's much more complicated than that. Each of
+the exceptions can be a chain of exceptions themselves. This means
+that you don't end up with a chain of exceptions, but rather a tree
+of exceptions. That's why there are those really nasty test cases
+in the test suite.
+
+The examples in the test suite are very difficult to understand if
+you expect it to be a simple chain!
+
+On the one hand, I was very proud that I was able to work out the
+barely-documented behaviour of Windows SEH, and it was really
+thorough. In the initial implementation, all the complexity
+was covered. It wasn't the bugfix-driven-development which dmd
+usually operates under <g>.
+
+But on the other hand, once you can see all of the complexity,
+exception chaining becomes much less convincing as a concept. Sure,
+the full exception tree is available in the final exception which
+you catch. But, is it of any use? I doubt it very much.
+It's pretty clearly a nett loss to the language, it increases
+complexity with negligible benefit. Fortunately in this case, the
+cost isn't really high.
+
+https://digitalmars.com/d/archives/digitalmars/D/Dicebot_on_leaving_D_It_is_anarchy_driven_development_in_all_its_317950.html#N318305
****************************************************/
int result1513;
@@ -379,6 +411,15 @@ void bug1513b()
assert(e.msg == "d");
assert(e.next.msg == "f");
assert(!e.next.next);
+ int i;
+ foreach (u; e)
+ {
+ if (i)
+ assert(u.msg == "f");
+ else
+ assert(u.msg == "d");
+ ++i;
+ }
}
}
@@ -658,7 +699,7 @@ void test9()
}
/****************************************************/
-// 10964
+// https://issues.dlang.org/show_bug.cgi?id=10964
void test10964()
{
@@ -836,6 +877,137 @@ void test17481()
/****************************************************/
+// a nothrow function, even though it is not marked as nothrow
+void test12()
+{
+ int i = 3;
+ try
+ {
+ try
+ {
+ ++i;
+ goto L10;
+ }
+ finally
+ {
+ i *= 2;
+ printf("f1\n");
+ }
+ }
+ finally
+ {
+ i += 5;
+ printf("f2\n");
+ }
+
+L10:
+ printf("3\n");
+ assert(i == (3 + 1) * 2 + 5);
+}
+
+/****************************************************/
+
+void foo13() { }
+
+void test13()
+{
+ int i = 3;
+ try
+ {
+ try
+ {
+ foo13(); // compiler assumes it throws
+ ++i;
+ goto L10;
+ }
+ finally
+ {
+ i *= 2;
+ printf("f1\n");
+ }
+ }
+ finally
+ {
+ i += 5;
+ printf("f2\n");
+ }
+
+L10:
+ printf("3\n");
+ assert(i == (3 + 1) * 2 + 5);
+}
+
+/****************************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=10966
+
+void bug10966a(void* p)
+{
+ void* pstart = p;
+
+ try
+ {
+ p = null;
+ throw new Exception("dummy");
+ }
+ catch (Throwable o)
+ {
+ assert(p != pstart);
+ }
+}
+
+void bug10966b()
+{
+ int x = 0;
+ int i = 0;
+ try
+ {
+ i = 1;
+ throw new Exception("dummy");
+ }
+ catch (Throwable o)
+ {
+ x = i;
+ }
+ assert(x == 1);
+}
+
+void test10966()
+{
+ int s;
+ bug10966a(&s);
+ bug10966b();
+}
+
+/****************************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=11049
+
+void test11049()
+{
+ int[] arr = [1,2,3];
+
+#line 4100 "foo"
+ try { auto n = arr[3]; }
+ catch (Error e)
+ {
+ //printf("e.file = %s\n", e.file.ptr);
+ assert(e.file == "foo"); // fails
+ assert(e.line == 4100);
+ }
+
+#line 4200 "bar"
+ try { auto a = arr[3..9]; }
+ catch (Error e)
+ {
+ //printf("e.file = %s\n", e.file.ptr);
+ assert(e.file == "bar"); // fails
+ assert(e.line == 4200);
+ }
+}
+
+/****************************************************/
+
int main()
{
printf("start\n");
@@ -860,6 +1032,10 @@ int main()
test10();
test11();
test17481();
+ test12();
+ test13();
+ test10966();
+ test11049();
printf("finish\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/entity1.d b/gcc/testsuite/gdc.test/runnable/entity1.d
index 3921193..feeb1ee 100644
--- a/gcc/testsuite/gdc.test/runnable/entity1.d
+++ b/gcc/testsuite/gdc.test/runnable/entity1.d
@@ -136,7 +136,7 @@ int main(){
return 0;
}
-// Bug 5221
+// https://issues.dlang.org/show_bug.cgi?id=5221
static assert('\&check;'==10003);
static assert('\&lsim;'==8818);
static assert('\&numero;'==8470);
diff --git a/gcc/testsuite/gdc.test/runnable/evalorder.d b/gcc/testsuite/gdc.test/runnable/evalorder.d
index 8b56cc7..6805ee2 100644
--- a/gcc/testsuite/gdc.test/runnable/evalorder.d
+++ b/gcc/testsuite/gdc.test/runnable/evalorder.d
@@ -1,3 +1,9 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
extern(C) int printf(const char*, ...);
void test14040()
diff --git a/gcc/testsuite/gdc.test/runnable/extra-files/lib13742a.d b/gcc/testsuite/gdc.test/runnable/extra-files/lib13742a.d
new file mode 100644
index 0000000..762559b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/extra-files/lib13742a.d
@@ -0,0 +1,6 @@
+module lib13742a;
+
+void performLocked(alias PROC)()
+{
+ PROC();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/extra-files/lib13742b.d b/gcc/testsuite/gdc.test/runnable/extra-files/lib13742b.d
new file mode 100644
index 0000000..03163b5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/extra-files/lib13742b.d
@@ -0,0 +1,8 @@
+module lib13742b;
+import lib13742a;
+
+void clear()
+{
+ void foo() {} // nested function
+ performLocked!foo; // template from other module (preceding on command line)
+}
diff --git a/gcc/testsuite/gdc.test/runnable/extra-files/minimal/object.d b/gcc/testsuite/gdc.test/runnable/extra-files/minimal/object.d
new file mode 100644
index 0000000..bc8b372
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/extra-files/minimal/object.d
@@ -0,0 +1,8 @@
+module object;
+
+extern(C) void _Dmain();
+
+extern(C) void main()
+{
+ _Dmain();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/extra-files/moreBettercUnittests.d b/gcc/testsuite/gdc.test/runnable/extra-files/moreBettercUnittests.d
new file mode 100644
index 0000000..1597a16
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/extra-files/moreBettercUnittests.d
@@ -0,0 +1,11 @@
+__gshared uint sum;
+
+unittest
+{
+ sum |= 0x100;
+}
+
+unittest
+{
+ sum |= 0x1000;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/extra-files/test13742.d b/gcc/testsuite/gdc.test/runnable/extra-files/test13742.d
new file mode 100644
index 0000000..3666bb2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/extra-files/test13742.d
@@ -0,0 +1,6 @@
+import lib13742b;
+
+void main()
+{
+ clear();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/extra-files/teststdio.txt b/gcc/testsuite/gdc.test/runnable/extra-files/teststdio.txt
deleted file mode 100644
index 9a5f6b1..0000000
--- a/gcc/testsuite/gdc.test/runnable/extra-files/teststdio.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-asdfasdf
-a
-sdf
-asdf
-
-
diff --git a/gcc/testsuite/gdc.test/runnable/fix20466.d b/gcc/testsuite/gdc.test/runnable/fix20466.d
new file mode 100644
index 0000000..afc8349
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/fix20466.d
@@ -0,0 +1,40 @@
+/* REQUIRED_ARGS: -O -fPIC
+ * DISABLED: win32 win64
+ */
+// https://issues.dlang.org/show_bug.cgi?id=20466
+
+extern (C++) final class Parameter
+{
+ ulong storageClass;
+ void* type;
+}
+
+extern (C++) final class IfStatement
+{
+ Parameter prm;
+}
+
+extern (C++) final class Visitor
+{
+ void visit(IfStatement s)
+ {
+ if (Parameter p = s.prm)
+ {
+ ulong stc = p.storageClass;
+ if (!p.type && !stc)
+ stc = 1L << 8;
+ assert(!(stc & (1L << 34)));
+ }
+ }
+}
+
+int main()
+{
+ auto p = new Parameter;
+ p.storageClass = 1L << 2;
+ auto s = new IfStatement;
+ s.prm = p;
+ auto v = new Visitor;
+ v.visit(s);
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/fix22115.d b/gcc/testsuite/gdc.test/runnable/fix22115.d
new file mode 100644
index 0000000..2344bcc
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/fix22115.d
@@ -0,0 +1,70 @@
+/* PERMUTE_ARGS: -O -inline
+ */
+// https://issues.dlang.org/show_bug.cgi?id=22115
+
+
+int sx;
+void sss() { ++sx; }
+
+static if (1)
+{
+ struct S { int a; }
+
+ void test1(S* s)
+ {
+ if (s.a == 3 ? s : null)
+ sss();
+ }
+}
+
+static if (1)
+{
+ extern (C++) class Exp
+ {
+ int a;
+
+ void func() { }
+ final inout(AddExp) isAddExp() inout { return a == 3 ? cast(typeof(return))this : null; }
+ }
+
+ extern (C++) class AddExp : Exp
+ {
+ }
+
+ void test2(Exp e)
+ {
+ if (e.isAddExp())
+ sss();
+ }
+}
+
+
+int main()
+{
+ static if (1)
+ {
+ S s;
+ s.a = 3;
+ test1(&s);
+ assert(sx == 1);
+ s.a = 2;
+ test1(&s);
+ assert(sx == 1);
+ }
+ sx = 1;
+
+ static if (1)
+ {
+ auto c = new AddExp();
+ c.a = 3;
+ test2(c);
+ assert(sx == 2);
+ auto ae = c.isAddExp();
+ assert(ae && ae.a == 3);
+ c.a = 2;
+ test2(c);
+ assert(sx == 2);
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/fix22372.d b/gcc/testsuite/gdc.test/runnable/fix22372.d
new file mode 100644
index 0000000..55864a0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/fix22372.d
@@ -0,0 +1,38 @@
+/* PERMUTE_ARGS: -O
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=22104
+
+struct S { int a1, a2, a3; }
+
+version (none)
+void throws2ndCall(ref S x);
+else
+{
+void throws2ndCall(ref S x)
+{
+ __gshared bool b;
+ if (b)
+ throw new Exception("n == 1");
+ b = true;
+}
+}
+
+void main() { foo(); }
+
+void foo()
+{
+ S[] arr = [S(), S()];
+ size_t i;
+ try
+ {
+ for (i = 0; i < 2; i++)
+ throws2ndCall(arr[i]);
+ }
+ catch (Exception o)
+ {
+ //printf("Exception: i = %lu\n", i);
+ assert(i == 1); // this fails
+ }
+}
+
diff --git a/gcc/testsuite/gdc.test/runnable/foreach.d b/gcc/testsuite/gdc.test/runnable/foreach.d
index 331c927..f0d1ea9 100644
--- a/gcc/testsuite/gdc.test/runnable/foreach.d
+++ b/gcc/testsuite/gdc.test/runnable/foreach.d
@@ -1,3 +1,22 @@
+/*
+RUN_OUTPUT:
+---
+u = 17
+u = 1
+u = 1
+u = 1
+u = 1
+a[0] = 21
+a[1] = 22
+a[2] = 23
+a[] = 21
+a[] = 22
+a[] = 23
+a = 63, b = 47, c = 83
+a = 63, b = 48, c = 83
+Success
+---
+*/
import core.stdc.stdio;
@@ -209,16 +228,26 @@ void test7()
a["foo"] = 3;
a["bar"] = 4;
+ bool sawBar, sawFoo;
foreach (string s, uint v; a)
{
- printf("a[%.*s] = %d\n", s.length, s.ptr, v);
if (s == "bar")
+ {
assert(v == 4);
+ assert(!sawBar);
+ sawBar = true;
+ }
else if (s == "foo")
+ {
assert(v == 3);
+ assert(!sawFoo);
+ sawFoo = true;
+ }
else
assert(0);
}
+ assert(sawBar);
+ assert(sawFoo);
}
diff --git a/gcc/testsuite/gdc.test/runnable/foreach2.d b/gcc/testsuite/gdc.test/runnable/foreach2.d
index 34edb41..b30d151 100644
--- a/gcc/testsuite/gdc.test/runnable/foreach2.d
+++ b/gcc/testsuite/gdc.test/runnable/foreach2.d
@@ -1,3 +1,9 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
import core.stdc.stdio;
diff --git a/gcc/testsuite/gdc.test/runnable/foreach3.d b/gcc/testsuite/gdc.test/runnable/foreach3.d
index e167217..3c9c288 100644
--- a/gcc/testsuite/gdc.test/runnable/foreach3.d
+++ b/gcc/testsuite/gdc.test/runnable/foreach3.d
@@ -1,9 +1,15 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
import core.stdc.stdio;
struct Foo
{
- uint array[2];
+ uint[2] array;
int opApply(int delegate(ref uint) dg)
{
diff --git a/gcc/testsuite/gdc.test/runnable/foreach4.d b/gcc/testsuite/gdc.test/runnable/foreach4.d
index 8c9d421..f2e1943 100644
--- a/gcc/testsuite/gdc.test/runnable/foreach4.d
+++ b/gcc/testsuite/gdc.test/runnable/foreach4.d
@@ -1,6 +1,4 @@
-// RUNNABLE_PHOBOS_TEST
import core.stdc.stdio;
-import std.stdio;
alias bool bit;
@@ -8,7 +6,7 @@ alias bool bit;
class Foo
{
- uint array[2];
+ uint[2] array;
int opApply(int delegate(ref uint) dg)
{
@@ -363,7 +361,7 @@ void test12()
j = 0;
foreach (size_t i, dchar d; "hello")
{
- printf("i = %d, d = x%x\n", i, d);
+ printf("i = %d, d = x%x\n", cast(int)i, d);
if (j == 0) assert(d == 'h');
if (j == 1) assert(d == 'e');
if (j == 2) assert(d == 'l');
@@ -397,7 +395,7 @@ void test13()
j = 0;
foreach (size_t i, wchar d; "hello")
{
- printf("i = %d, d = x%x\n", i, d);
+ printf("i = %d, d = x%x\n", cast(int)i, d);
if (j == 0) assert(d == 'h');
if (j == 1) assert(d == 'e');
if (j == 2) assert(d == 'l');
@@ -431,7 +429,7 @@ void test14()
j = 0;
foreach (size_t i, char d; cast(wstring)"hello")
{
- printf("i = %d, d = x%x\n", i, d);
+ printf("i = %d, d = x%x\n", cast(int)i, d);
if (j == 0) assert(d == 'h');
if (j == 1) assert(d == 'e');
if (j == 2) assert(d == 'l');
@@ -465,7 +463,7 @@ void test15()
j = 0;
foreach (size_t i, dchar d; cast(wstring)"hello")
{
- printf("i = %d, d = x%x\n", i, d);
+ printf("i = %d, d = x%x\n", cast(int)i, d);
if (j == 0) assert(d == 'h');
if (j == 1) assert(d == 'e');
if (j == 2) assert(d == 'l');
@@ -499,7 +497,7 @@ void test16()
j = 0;
foreach (size_t i, char d; cast(dstring)"hello")
{
- printf("i = %d, d = x%x\n", i, d);
+ printf("i = %d, d = x%x\n", cast(int)i, d);
if (j == 0) assert(d == 'h');
if (j == 1) assert(d == 'e');
if (j == 2) assert(d == 'l');
@@ -533,7 +531,7 @@ void test17()
j = 0;
foreach (size_t i, wchar d; cast(dstring)"hello")
{
- printf("i = %d, d = x%x\n", i, d);
+ printf("i = %d, d = x%x\n", cast(int)i, d);
if (j == 0) assert(d == 'h');
if (j == 1) assert(d == 'e');
if (j == 2) assert(d == 'l');
@@ -577,7 +575,7 @@ void test18()
void test19()
{
- string string = x"F0 9D 83 93";
+ string string = "\xF0\x9D\x83\x93";
int count=0;
dchar tmp;
@@ -615,18 +613,18 @@ void test20()
void foo21(string[] args)
{
- printf("args.length = %d\n", args.length);
+ printf("args.length = %d\n", cast(int)args.length);
assert(args.length == 3);
foreach (i, arg; args)
{
assert(typeid(typeof(i)) == typeid(size_t));
assert(typeid(typeof(arg)) == typeid(string));
- writefln("args[%d] = '%s'", i, arg);
+ printf("args[%d] = '%.*s'\n", cast(int)i, cast(int)arg.length, arg.ptr);
}
foreach (arg; args)
{
assert(typeid(typeof(arg)) == typeid(string));
- writefln("args[] = '%s'", arg);
+ printf("args[] = '%.*s'\n", cast(int)arg.length, arg.ptr);
}
}
@@ -654,24 +652,24 @@ void test22()
{
assert(typeid(typeof(key)) == typeid(string));
assert(typeid(typeof(value)) == typeid(int));
- writefln("map[%s] = %s", key, value);
+ printf("map[%.*s] = %d\n", cast(int)key.length, key.ptr, value);
}
foreach (key, int value; map)
{
assert(typeid(typeof(key)) == typeid(string));
assert(typeid(typeof(value)) == typeid(int));
- writefln("map[%s] = %s", key, value);
+ printf("map[%.*s] = %d\n", cast(int)key.length, key.ptr, value);
}
foreach (string key, value; map)
{
assert(typeid(typeof(key)) == typeid(string));
assert(typeid(typeof(value)) == typeid(int));
- writefln("map[%s] = %s", key, value);
+ printf("map[%.*s] = %d\n", cast(int)key.length, key.ptr, value);
}
foreach (value; map)
{
assert(typeid(typeof(value)) == typeid(int));
- writefln("map[] = %s", value);
+ printf("map[] = %d\n", value);
}
}
@@ -679,7 +677,7 @@ void test22()
class Foo23
{
- int array[2];
+ int[2] array;
int opApply(int delegate(ref int) dg)
{
@@ -719,7 +717,7 @@ void test23()
assert(typeid(typeof(u)) == typeid(int));
i++;
u++;
- //writefln("u = %d", u);
+ //printf("u = %d\n", u);
assert((i == 1) ? u == 74 : u == 83);
}
assert(i == 2);
@@ -732,7 +730,7 @@ void test23()
assert(typeid(typeof(u)) == typeid(int));
i++;
u++;
- writefln("u = %d", u);
+ //printf("u = %d\n", u);
assert((i == 3) ? u == 74 : u == 83);
assert(j == i - 3);
}
@@ -777,7 +775,6 @@ void test25()
{
foreach (string s; aarray)
{
- writeln(s);
assert(s == "b");
}
};
@@ -790,7 +787,7 @@ void test25()
struct Foo26
{
- uint array[2];
+ uint[2] array;
int forward(int delegate(ref uint) dg)
{
@@ -833,7 +830,7 @@ void test26()
foreach (u; &a.forward)
{
- writeln(u);
+ printf("%d\n", u);
i++;
u++;
}
@@ -843,7 +840,7 @@ void test26()
foreach (uint u; &a.reverse)
{
- writeln(u);
+ printf("%d\n", u);
}
}
diff --git a/gcc/testsuite/gdc.test/runnable/foreach5.d b/gcc/testsuite/gdc.test/runnable/foreach5.d
index 003a34a..59b88ec 100644
--- a/gcc/testsuite/gdc.test/runnable/foreach5.d
+++ b/gcc/testsuite/gdc.test/runnable/foreach5.d
@@ -1,4 +1,5 @@
/*
+EXTRA_FILES: imports/test15777a.d imports/test15777b.d
TEST_OUTPUT:
---
int
@@ -14,6 +15,8 @@ test7406()
extern(C) int printf(const char* fmt, ...);
+alias AliasSeq(X...) = X;
+
/***************************************/
void test1()
@@ -43,7 +46,7 @@ void test1()
}
/***************************************/
-// 2411
+// https://issues.dlang.org/show_bug.cgi?id=2411
struct S2411
{
@@ -68,7 +71,7 @@ void test2411()
}
/***************************************/
-// 2442
+// https://issues.dlang.org/show_bug.cgi?id=2442
template canForeach(T, E)
{
@@ -148,7 +151,7 @@ void test2442()
}
/***************************************/
-// 2443
+// https://issues.dlang.org/show_bug.cgi?id=2443
struct S2443
{
@@ -175,7 +178,7 @@ void test2443()
}
/***************************************/
-// 3187
+// https://issues.dlang.org/show_bug.cgi?id=3187
class Collection
{
@@ -200,7 +203,7 @@ void test3187()
}
/***************************************/
-// 4090
+// https://issues.dlang.org/show_bug.cgi?id=4090
void test4090a()
{
@@ -244,7 +247,7 @@ void test4090b()
}
/***************************************/
-// 5605
+// https://issues.dlang.org/show_bug.cgi?id=5605
struct MyRange
{
@@ -255,7 +258,7 @@ struct MyRange
return true;
}
- @property ref int front()
+ @property ref int front() return
{
return theOnlyOne;
}
@@ -282,7 +285,7 @@ void test5605()
}
/***************************************/
-// 7004
+// https://issues.dlang.org/show_bug.cgi?id=7004
void func7004(A...)(A args)
{
@@ -296,7 +299,7 @@ void test7004()
}
/***************************************/
-// 7406
+// https://issues.dlang.org/show_bug.cgi?id=7406
template TypeTuple7406(T...)
{
@@ -327,7 +330,7 @@ void test7406()
}
/***************************************/
-// 6659
+// https://issues.dlang.org/show_bug.cgi?id=6659
void test6659()
{
@@ -417,7 +420,7 @@ void test6659c()
/***************************************/
-// 10221
+// https://issues.dlang.org/show_bug.cgi?id=10221
void test10221()
{
@@ -446,7 +449,7 @@ void test10221()
}
/***************************************/
-// 7814
+// https://issues.dlang.org/show_bug.cgi?id=7814
struct File7814
{
@@ -475,7 +478,7 @@ void test7814()
}
/***************************************/
-// 10049
+// https://issues.dlang.org/show_bug.cgi?id=10049
struct ByLine10049
{
@@ -515,7 +518,7 @@ void test11955()
}
/******************************************/
-// 6652
+// https://issues.dlang.org/show_bug.cgi?id=6652
void test6652()
{
@@ -616,7 +619,7 @@ void test6652()
}
/***************************************/
-// 8595
+// https://issues.dlang.org/show_bug.cgi?id=8595
struct OpApply8595
{
@@ -636,7 +639,7 @@ string test8595()
}
/***************************************/
-// 9068
+// https://issues.dlang.org/show_bug.cgi?id=9068
struct Foo9068
{
@@ -723,7 +726,7 @@ loop_with_dtors:
}
/***************************************/
-// 11885
+// https://issues.dlang.org/show_bug.cgi?id=11885
struct Foo11885
{
@@ -810,7 +813,7 @@ loop_with_dtors:
}
/***************************************/
-// 10475
+// https://issues.dlang.org/show_bug.cgi?id=10475
void test10475a()
{
@@ -888,7 +891,7 @@ void test10475b()
}
/***************************************/
-// 11291
+// https://issues.dlang.org/show_bug.cgi?id=11291
void test11291()
{
@@ -917,7 +920,7 @@ void test11291()
}
/***************************************/
-// 12103
+// https://issues.dlang.org/show_bug.cgi?id=12103
alias TypeTuple12103(TL...) = TL;
@@ -945,7 +948,7 @@ void test12103()
}
/***************************************/
-// 12739
+// https://issues.dlang.org/show_bug.cgi?id=12739
struct S12739
{
@@ -963,7 +966,7 @@ void test12739() nothrow
}
/***************************************/
-// 12932
+// https://issues.dlang.org/show_bug.cgi?id=12932
void test12932() @nogc
{
@@ -976,7 +979,7 @@ void test12932() @nogc
}
/***************************************/
-// 13756
+// https://issues.dlang.org/show_bug.cgi?id=13756
void test13756()
{
@@ -1046,7 +1049,7 @@ void test13756()
}
/***************************************/
-// 14653
+// https://issues.dlang.org/show_bug.cgi?id=14653
static string result14653;
@@ -1098,6 +1101,81 @@ void test14653()
}
/***************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15777
+
+template funA15777()
+{
+ import imports.test15777a;
+ alias funA15777 = fun;
+}
+
+template funB15777()
+{
+ import imports.test15777b;
+ alias funB15777 = fun;
+}
+
+template funAB15777()
+{
+ import imports.test15777a;
+ import imports.test15777b;
+ alias funAB15777 = fun;
+}
+
+void foo15777(alias tpl)()
+{
+ alias seq = AliasSeq!(tpl!());
+ // Make alias of 'overload set' in tuple elements
+ static assert(seq.length == 1);
+ foreach (i, n; seq)
+ {
+ static assert(__traits(identifier, seq[i]) == "fun");
+ }
+}
+
+void test15777()
+{
+ foo15777!funA15777;
+ foo15777!funB15777;
+ foo15777!funAB15777;
+}
+
+/***************************************/
+// https://issues.dlang.org/show_bug.cgi?id=17041
+
+auto ref int[2] foo17041(A...)(auto ref A args)
+{
+ foreach(a; args)
+ {
+ a = [12, 22];
+ }
+ foreach(ref a; args)
+ {
+ a = [31, 41];
+ return args[0];
+ }
+}
+
+void test17041()
+{
+ int[2] x = [10, 20];
+ foreach(a; AliasSeq!(x))
+ {
+ a = [11, 21];
+ }
+ assert(x == [10, 20]); // test by value
+ foreach(ref a; AliasSeq!(x))
+ {
+ a = [30, 40];
+ }
+ assert(x == [30, 40]); // test by ref value
+
+ assert(foo17041(x) == [31, 41]); // test lvalue
+ assert(x == [31, 41]);
+ assert(foo17041(cast(int[2]) [10, 20]) == [31, 41]); // test rvalue
+}
+
+/***************************************/
int main()
{
@@ -1125,10 +1203,10 @@ int main()
test11291();
test12103();
test12739();
- printf("test12932()\n");
test12932();
test13756();
test14653();
+ test17041();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/funclit.d b/gcc/testsuite/gdc.test/runnable/funclit.d
index c299bad..25b4e6e 100644
--- a/gcc/testsuite/gdc.test/runnable/funclit.d
+++ b/gcc/testsuite/gdc.test/runnable/funclit.d
@@ -176,7 +176,7 @@ void test4()
// function/delegate inference + overload resolution
assert(nbaz4({ }) == 1);
assert(nbaz4({ v = 1; }) == 2);
- assert(nbaz4({ sfoo(); }) == 1); // Bugzilla 8836
+ assert(nbaz4({ sfoo(); }) == 1); // https://issues.dlang.org/show_bug.cgi?id=8836
assert(nbaz4({ nfoo(); }) == 2);
assert(tbaz4({ }) == 1);
@@ -354,7 +354,7 @@ void test11()
}
/***************************************************/
-// 3235
+// https://issues.dlang.org/show_bug.cgi?id=3235
void test3235()
{
@@ -365,7 +365,7 @@ void test3235()
}
/***************************************************/
-// 6714
+// https://issues.dlang.org/show_bug.cgi?id=6714
void foo6714x(int function (int, int) a){}
void bar6714x(int delegate (int, int) a){}
@@ -384,7 +384,7 @@ void test6714()
}
/***************************************************/
-// 7193
+// https://issues.dlang.org/show_bug.cgi?id=7193
void test7193()
{
@@ -394,7 +394,8 @@ void test7193()
}
/***************************************************/
-// 7207 : on CastExp
+// https://issues.dlang.org/show_bug.cgi?id=7207
+// on CastExp
void test7202()
{
@@ -403,7 +404,7 @@ void test7202()
}
/***************************************************/
-// 7288
+// https://issues.dlang.org/show_bug.cgi?id=7288
void test7288()
{
@@ -411,7 +412,7 @@ void test7288()
auto foo()
{
int x;
- return () => { return x; };
+ return () { return () => x; };
}
pragma(msg, typeof(&foo));
alias int delegate() pure nothrow @nogc @safe delegate() pure nothrow @nogc @safe delegate() pure nothrow @safe Dg;
@@ -420,7 +421,7 @@ void test7288()
}
/***************************************************/
-// 7499
+// https://issues.dlang.org/show_bug.cgi?id=7499
void test7499()
{
@@ -431,7 +432,7 @@ void test7499()
}
/***************************************************/
-// 7500
+// https://issues.dlang.org/show_bug.cgi?id=7500
void test7500()
{
@@ -440,7 +441,7 @@ void test7500()
}
/***************************************************/
-// 7525
+// https://issues.dlang.org/show_bug.cgi?id=7525
void test7525()
{
@@ -462,7 +463,7 @@ void test7525()
}
/***************************************************/
-// 7582
+// https://issues.dlang.org/show_bug.cgi?id=7582
void test7582()
{
@@ -474,7 +475,7 @@ void test7582()
}
/***************************************************/
-// 7649
+// https://issues.dlang.org/show_bug.cgi?id=7649
void test7649()
{
@@ -486,7 +487,7 @@ void test7649()
}
/***************************************************/
-// 7650
+// https://issues.dlang.org/show_bug.cgi?id=7650
void test7650()
{
@@ -513,7 +514,7 @@ void test7650()
}
/***************************************************/
-// 7705
+// https://issues.dlang.org/show_bug.cgi?id=7705
void test7705()
{
@@ -529,7 +530,7 @@ void test7705()
}
/***************************************************/
-// 7713
+// https://issues.dlang.org/show_bug.cgi?id=7713
void foo7713(T)(T delegate(in Object) dlg)
{}
@@ -539,7 +540,7 @@ void test7713()
}
/***************************************************/
-// 7743
+// https://issues.dlang.org/show_bug.cgi?id=7743
auto foo7743a()
{
@@ -564,7 +565,7 @@ void test7743()
}
/***************************************************/
-// 7761
+// https://issues.dlang.org/show_bug.cgi?id=7761
enum dg7761 = (int a) pure => 2 * a;
@@ -575,7 +576,7 @@ void test7761()
}
/***************************************************/
-// 7941
+// https://issues.dlang.org/show_bug.cgi?id=7941
void test7941()
{
@@ -583,7 +584,7 @@ void test7941()
}
/***************************************************/
-// 8005
+// https://issues.dlang.org/show_bug.cgi?id=8005
void test8005()
{
@@ -615,7 +616,7 @@ void test8198()
}
/***************************************************/
-// 8226
+// https://issues.dlang.org/show_bug.cgi?id=8226
immutable f8226 = (int x) => x * 2;
@@ -625,7 +626,7 @@ void test8226()
}
/***************************************************/
-// 8241
+// https://issues.dlang.org/show_bug.cgi?id=8241
auto exec8241a(alias a = function(x) => x, T...)(T as)
{
@@ -644,7 +645,7 @@ void test8241()
}
/***************************************************/
-// 8242
+// https://issues.dlang.org/show_bug.cgi?id=8242
template exec8242(alias a, T...)
{
@@ -664,7 +665,7 @@ void test8242()
}
/***************************************************/
-// 8315
+// https://issues.dlang.org/show_bug.cgi?id=8315
void test8315()
{
@@ -677,7 +678,7 @@ if (is(typeof(pred(1)) == bool))
{}
/***************************************************/
-// 8397
+// https://issues.dlang.org/show_bug.cgi?id=8397
void test8397()
{
@@ -688,7 +689,7 @@ void test8397()
}
/***************************************************/
-// 8496
+// https://issues.dlang.org/show_bug.cgi?id=8496
void test8496()
{
@@ -700,7 +701,7 @@ void test8496()
}
/***************************************************/
-// 8575
+// https://issues.dlang.org/show_bug.cgi?id=8575
template tfunc8575(func...)
{
@@ -720,7 +721,7 @@ void test8575()
}
/***************************************************/
-// 9153
+// https://issues.dlang.org/show_bug.cgi?id=9153
void writeln9153(string s){}
@@ -737,7 +738,7 @@ void test9153()
}
/***************************************************/
-// 9393
+// https://issues.dlang.org/show_bug.cgi?id=9393
template ifThrown9393a(E)
{
@@ -761,7 +762,7 @@ void test9393()
}
/***************************************************/
-// 9415
+// https://issues.dlang.org/show_bug.cgi?id=9415
void test9415()
{
@@ -771,7 +772,7 @@ void test9415()
}
/***************************************************/
-// 9628
+// https://issues.dlang.org/show_bug.cgi?id=9628
template TypeTuple9628(TL...) { alias TypeTuple9628 = TL; }
void map9628(alias func)() { func(0); }
@@ -805,7 +806,7 @@ void test9628()
}
/***************************************************/
-// 9928
+// https://issues.dlang.org/show_bug.cgi?id=9928
void test9928()
{
@@ -813,7 +814,7 @@ void test9928()
}
/***************************************************/
-// 10133
+// https://issues.dlang.org/show_bug.cgi?id=10133
ptrdiff_t countUntil10133(alias pred, R)(R haystack)
{
@@ -855,7 +856,7 @@ void test10133()
}
/***************************************************/
-// 10219
+// https://issues.dlang.org/show_bug.cgi?id=10219
void test10219()
{
@@ -904,7 +905,7 @@ void test10219()
}
/***************************************************/
-// 10288
+// https://issues.dlang.org/show_bug.cgi?id=10288
T foo10288(T)(T x)
{
@@ -934,7 +935,7 @@ void test10288() @safe pure nothrow
}
/***************************************************/
-// 10666
+// https://issues.dlang.org/show_bug.cgi?id=10666
struct S10666
{
@@ -954,7 +955,7 @@ void foo10666(S10666 s1)
}
/***************************************************/
-// 11081
+// https://issues.dlang.org/show_bug.cgi?id=11081
T ifThrown11081(E : Throwable, T)(T delegate(E) errorHandler)
{
@@ -972,7 +973,7 @@ void test11081()
}
/***************************************************/
-// 11220
+// https://issues.dlang.org/show_bug.cgi?id=11220
int parsePrimaryExp11220(int x)
{
@@ -986,7 +987,7 @@ typeof(handler(1)) parseAmbig11220(alias handler)()
}
/***************************************************/
-// 11230
+// https://issues.dlang.org/show_bug.cgi?id=11230
template map11230(fun...)
{
@@ -1022,7 +1023,7 @@ C11230 visit11230()
}
/***************************************************/
-// 10336
+// https://issues.dlang.org/show_bug.cgi?id=10336
struct S10336
{
@@ -1041,7 +1042,7 @@ void test10336()
}
/***************************************************/
-// 10928
+// https://issues.dlang.org/show_bug.cgi?id=10928
struct D10928
{
@@ -1065,7 +1066,7 @@ void test10928()
}
/***************************************************/
-// 11661
+// https://issues.dlang.org/show_bug.cgi?id=11661
void test11661()
{
@@ -1074,7 +1075,7 @@ void test11661()
}
/***************************************************/
-// 11774
+// https://issues.dlang.org/show_bug.cgi?id=11774
void f11774(T, R)(R delegate(T[]) dg)
{
@@ -1091,7 +1092,7 @@ void test11774()
}
/***************************************************/
-// 12421
+// https://issues.dlang.org/show_bug.cgi?id=12421
void test12421()
{
@@ -1145,7 +1146,7 @@ void test12421()
}
/***************************************************/
-// 12508
+// https://issues.dlang.org/show_bug.cgi?id=12508
interface A12508(T)
{
@@ -1182,7 +1183,7 @@ void test12508()
}
/***************************************************/
-// 13879
+// https://issues.dlang.org/show_bug.cgi?id=13879
void test13879()
{
@@ -1194,7 +1195,7 @@ void test13879()
}
/***************************************************/
-// 14745
+// https://issues.dlang.org/show_bug.cgi?id=14745
void test14745()
{
@@ -1216,7 +1217,7 @@ void test14745()
}
/***************************************************/
-// 15794
+// https://issues.dlang.org/show_bug.cgi?id=15794
struct Foo15794
{
diff --git a/gcc/testsuite/gdc.test/runnable/functype.d b/gcc/testsuite/gdc.test/runnable/functype.d
index 7aa7efd..28e2709 100644
--- a/gcc/testsuite/gdc.test/runnable/functype.d
+++ b/gcc/testsuite/gdc.test/runnable/functype.d
@@ -183,7 +183,7 @@ void testxx()
}
/***************************************************/
-// 3646
+// https://issues.dlang.org/show_bug.cgi?id=3646
int bar3646(int x = 10) { printf("bar %d\n", x); return x; }
int bam3646(int y) { printf("bam %d\n", y); return y; }
@@ -215,7 +215,7 @@ void test3646()
}
/***************************************************/
-// 3866
+// https://issues.dlang.org/show_bug.cgi?id=3866
void test3866()
{
@@ -230,7 +230,7 @@ void test3866()
}
/***************************************************/
-// 8579
+// https://issues.dlang.org/show_bug.cgi?id=8579
void test8579()
{
@@ -254,7 +254,7 @@ void test8579()
}
/***************************************************/
-// 14210
+// https://issues.dlang.org/show_bug.cgi?id=14210
string foo14210a(DT)(string name, DT dg)
{
@@ -274,7 +274,7 @@ void test14210()
}
/***************************************************/
-// 10734
+// https://issues.dlang.org/show_bug.cgi?id=10734
// There's no platform independent export symbol, so
// test just only in Win32.
@@ -297,7 +297,7 @@ void test10734()
}
/***************************************************/
-// 14656
+// https://issues.dlang.org/show_bug.cgi?id=14656
void test14656()
{
diff --git a/gcc/testsuite/gdc.test/runnable/hello.d b/gcc/testsuite/gdc.test/runnable/hello.d
index 88adaa4..b46f59d 100644
--- a/gcc/testsuite/gdc.test/runnable/hello.d
+++ b/gcc/testsuite/gdc.test/runnable/hello.d
@@ -5,8 +5,8 @@ extern(C) int printf(const char*, ...);
int main(char[][] args)
{
printf("hello world\n");
- printf("args.length = %d\n", args.length);
+ printf("args.length = %zd\n", args.length);
for (int i = 0; i < args.length; i++)
- printf("args[%d] = '%.*s'\n", i, args[i].length, args[i].ptr);
+ printf("args[%d] = '%.*s'\n", i, cast(int)args[i].length, args[i].ptr);
return 0;
}
diff --git a/gcc/testsuite/gdc.test/runnable/helloUTF8.d b/gcc/testsuite/gdc.test/runnable/helloUTF8.d
index 78f3bcd..aed6613 100644
--- a/gcc/testsuite/gdc.test/runnable/helloUTF8.d
+++ b/gcc/testsuite/gdc.test/runnable/helloUTF8.d
@@ -1,4 +1,10 @@
-// PERMUTE_ARGS:
+/*
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+hello world
+---
+*/
extern(C) int printf(const char *, ...);
diff --git a/gcc/testsuite/gdc.test/runnable/ice15030.d b/gcc/testsuite/gdc.test/runnable/ice15030.d
index 5925e74..5c9587c 100644
--- a/gcc/testsuite/gdc.test/runnable/ice15030.d
+++ b/gcc/testsuite/gdc.test/runnable/ice15030.d
@@ -1,6 +1,7 @@
// REQUIRED_ARGS: -unittest -boundscheck=off
// PERMUTE_ARGS:
// EXTRA_SOURCES: imports/a15030.d imports/b15030.d
+// EXTRA_FILES: imports/std15030algo.d
void main() {}
diff --git a/gcc/testsuite/gdc.test/runnable/ice21696.d b/gcc/testsuite/gdc.test/runnable/ice21696.d
new file mode 100644
index 0000000..8b7a81e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/ice21696.d
@@ -0,0 +1,23 @@
+module ice21696;
+
+// https://issues.dlang.org/show_bug.cgi?id=21696
+
+double[1][1] func(double[1][1] stuff = [[1.0]])
+{
+ bool myFunc()
+ {
+ if (stuff[])
+ return true;
+ return false;
+ }
+
+ if (!myFunc())
+ assert(false);
+
+ return stuff;
+}
+
+int main()
+{
+ return func() != [[1.0]];
+}
diff --git a/gcc/testsuite/gdc.test/runnable/ice21727.d b/gcc/testsuite/gdc.test/runnable/ice21727.d
new file mode 100644
index 0000000..5b5745f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/ice21727.d
@@ -0,0 +1,46 @@
+// REQUIRED_ARGS: -m64 -O -inline
+// DISABLED: win32 linux32 freebsd32 osx32 netbsd32 dragonflybsd32
+// https://issues.dlang.org/show_bug.cgi?id=21727
+
+import core.simd;
+
+@nogc nothrow pure @safe:
+
+struct Float4
+{
+ float4 mVector;
+
+ pragma(inline, false) ref typeof(this) doubleInPlace() return
+ @nogc nothrow pure @safe
+ {
+ mVector = mVector + mVector;
+ return this;
+ }
+}
+
+pragma(inline, false) Float4 identity(Float4 a)
+{
+ return a;
+}
+
+pragma(inline, true) Float4 twoTimes(const ref Float4 a)
+{
+ version (D_SIMD)
+ return Float4(cast(float4) __simd(XMM.ADDPS, a.mVector, a.mVector));
+ else // Allow non-DMD compilers to compile this test.
+ return Float4(a.mVector + a.mVector);
+}
+
+pragma(inline, false) Float4 fourTimes(const Float4 a)
+{
+ auto x = identity(a);
+ auto y = x.doubleInPlace(); // This crashed in dmd.backend.cgxmm.xmmload.
+ auto z = twoTimes(y);
+ return z;
+}
+
+void main()
+{
+ const c = fourTimes(Float4([5,7,11,13]));
+ assert(c.mVector.array == [20, 28, 44, 52]);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/ifti.d b/gcc/testsuite/gdc.test/runnable/ifti.d
index 6d66975..0c94946c 100644
--- a/gcc/testsuite/gdc.test/runnable/ifti.d
+++ b/gcc/testsuite/gdc.test/runnable/ifti.d
@@ -1,27 +1,26 @@
-// RUNNABLE_PHOBOS_TEST
-import std.stdio;
+extern (C) int printf(const scope char*, ...);
struct S {
int x = 3;
- void fun(T)(T x) { writefln("S.fun(%s)(%s)",typeid(T),x); this.x += x; }
+ void fun(T)(T x) { printf("S.fun(%s)(%d)\n", T.stringof.ptr, x); this.x += x; }
}
class Tst(TST, int v = 2) {
int x = 3;
int z = 4;
- final private void proc(int x) { writefln("proc(%s) -> %s",x,this.x); }
- void fun(T)(T x) { writefln("fun(%s)(%s) -> %s",typeid(T),x,this.x);}
- void fun()() { writefln("fun()() -> %s",this.x); }
- void fun2()() { writefln("fun2"); }
+ final private void proc(int x) { printf("proc(%d) -> %d\n", x, this.x); }
+ void fun(T)(T x) { printf("fun(%s)(%d) -> %d\n", T.stringof.ptr, x, this.x);}
+ void fun()() { printf("fun()() -> %d\n", this.x); }
+ void fun2()() { printf("fun2\n"); }
class Inner {
int y = 99;
Tst outer;
void f3() { z = 55; }
// Make sure the correct this-ptr is used
- void f1() { writefln("Inner.f1"); proc(-11); outer.proc(-11); }
- void f2() { writefln("Inner.f2"); fun(-17); outer.fun(-17); }
+ void f1() { printf("Inner.f1\n"); proc(-11); outer.proc(-11); }
+ void f2() { printf("Inner.f2\n"); fun(-17); outer.fun(-17); }
}
Inner inner;
@@ -30,38 +29,36 @@ class Tst(TST, int v = 2) {
inner.outer = this;
}
- void callInnerf1() { writefln("callInnerf1"); inner.f1(); }
- void callInnerf2() { writefln("callInnerf2"); inner.f2(); }
+ void callInnerf1() { printf("callInnerf1\n"); inner.f1(); }
+ void callInnerf2() { printf("callInnerf2\n"); inner.f2(); }
//
- void opAdd(T)(T x) { this.x += x; writefln("opAdd(%s)",x); }
- void opPos()() { writefln("opPos()"); }
- //void opPos() { writefln("xxx"); }
- void opIndex(T)(T x) { writefln("opIndex[%s]",x); }
+ void opBinary(string op : "+", T)(T x) { this.x += x; printf("opAdd(%d)\n", x); }
+ void opUnary(string op : "+")() { printf("opPos()\n"); }
+ //void opPos() { printf("xxx"); }
+ void opIndex(T)(T x) { printf("opIndex[%d]\n",x); }
void opIndex(A,B,C)(A a, B b, C c) {
- writefln("opIndex[(%s)%s,(%s)%s,(%s)%s]",typeid(A),a,
- typeid(B),b,typeid(C),c);
+ printf("opIndex[(%s) %d, (%s) %d, (%s) %d]\n", A.stringof.ptr, a,
+ B.stringof.ptr,b,C.stringof.ptr,c);
}
-
static if (v > 1) {
- void opCall(A = int, B = float)(A a = 1, B b = 8.2) { writefln("opCall(%s,%s)",a,b); this.x++; }
-
+ void opCall(A = int, B = float)(A a = 1, B b = 8.2) { printf("opCall(%d, %d)\n",a,b); this.x++; }
}
- void opSlice(A,B)(A a, B b) { writefln("opSlice(%s,%s)",a,b); }
- void opSlice()() { writefln("opSlice()"); }
+ void opSlice(A,B)(A a, B b) { printf("opSlice(%d, %d)\n",a,b); }
+ void opSlice()() { printf("opSlice()\n"); }
void opIndexAssign(A,B)(A a, B b) {
- writefln("opIndexAssign((%s)%s,(%s)%s)",typeid(A),a,typeid(B),b);
+ printf("opIndexAssign((%s) %d, (%s) %d)\n", A.stringof.ptr, a, B.stringof.ptr, b);
}
void opSliceAssign(A,B,C)(A a, B b, C c) {
- writefln("opSliceAssign(%s,%s,%s)",a,b,c);
+ printf("opSliceAssign(%.s, %d, %d)\n", a.length, a.ptr, b, c);
}
- bool opEquals(A)(A x) { writefln("opEquals((%s))",typeid(A));return true; }
+ bool opEquals(A)(A x) { printf("opEquals((%s))\n", A.stringof.ptr); return true; }
int opApply(T)(int delegate(ref T)dg) {
for (int i = 0; i < 5; i++) {
@@ -103,8 +100,6 @@ void main() {
t[];
t[1..2];
u[1..2.5];
- t[1i] = 5;
- t[-4.5..7i] = "hello";
t == t;
auto b = t != t; // without assignment -> "! has no effect in expression"
t == u;
@@ -112,10 +107,10 @@ void main() {
u == u;
b = u != u;
foreach(int i;t) {
- writefln("%s",i);
+ printf("%d\n", i);
}
foreach(double i;t) {
- writefln("%s",i);
+ printf("%g\n", i);
}
}
diff --git a/gcc/testsuite/gdc.test/runnable/implicit.d b/gcc/testsuite/gdc.test/runnable/implicit.d
index 9170b04..75b992c 100644
--- a/gcc/testsuite/gdc.test/runnable/implicit.d
+++ b/gcc/testsuite/gdc.test/runnable/implicit.d
@@ -1,5 +1,17 @@
-// RUNNABLE_PHOBOS_TEST
-import std.stdio;
+/*
+TEST_OUTPUT:
+---
+runnable/implicit.d(162): Deprecation: slice of static array temporary returned by `pureMaker3c()` assigned to longer lived variable `z1`
+runnable/implicit.d(163): Deprecation: slice of static array temporary returned by `pureMaker3c()` assigned to longer lived variable `z2`
+---
+
+RUN_OUTPUT:
+---
+Success
+---
+*/
+
+import core.stdc.stdio;
/***********************************/
@@ -150,7 +162,8 @@ void testDIP29_3()
immutable z1 = pureMaker3c()[];
immutable z2 = pureMaker3c()[0..2];
- // Issue 12467 - conversion from lvalue of mutable static array to immutable slice
+ // https://issues.dlang.org/show_bug.cgi?id=12467
+ // conversion from lvalue of mutable static array to immutable slice
char[3] arr = "foo";
static assert(!__traits(compiles, { string str = arr[]; }));
}
@@ -182,11 +195,11 @@ void testDIP29_4()
}
/***********************************/
-// 14155
+// https://issues.dlang.org/show_bug.cgi?id=14155
immutable int g14155;
-static this() { g14155 = 1; }
+shared static this() { g14155 = 1; }
int* make14155m ( int* p) pure { return null; }
const(int*) make14155c ( const(int*) p) pure { return &g14155; }
@@ -232,7 +245,7 @@ void test14155_for_testDIP29_4()
}
/***********************************/
-// 14141
+// https://issues.dlang.org/show_bug.cgi?id=14141
struct S14141
{
@@ -265,7 +278,7 @@ int*[] pureFoo() pure { return null; }
void testDIP29_5() pure
{
- { char[] s; immutable x = s.dup; }
+ { char[] s; immutable x = s.idup; }
{ immutable x = (cast(int*[])null).dup; }
{ immutable x = pureFoo(); }
{ immutable x = pureFoo().dup; }
@@ -396,7 +409,7 @@ void testDIP29_6()
}));
}
-// 14155
+// https://issues.dlang.org/show_bug.cgi?id=14155
void test14155_for_testDIP29_6()
{
@@ -417,7 +430,7 @@ void test14155_for_testDIP29_6()
}
/***********************************/
-// 13640
+// https://issues.dlang.org/show_bug.cgi?id=13640
struct S13640
{
@@ -437,7 +450,7 @@ struct S13640
}
/***********************************/
-// 15778
+// https://issues.dlang.org/show_bug.cgi?id=15778
void test15778()
{
@@ -477,5 +490,5 @@ void main()
testDIP29_6();
test15778();
- writefln("Success");
+ printf("Success\n");
}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/A16a.d b/gcc/testsuite/gdc.test/runnable/imports/A16a.d
index 9f385cc..e60acdc 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/A16a.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/A16a.d
@@ -1,6 +1,6 @@
import A16;
-import std.stdio;
+import core.stdc.stdio;
class B16 : AA16
{
diff --git a/gcc/testsuite/gdc.test/runnable/imports/Other.d b/gcc/testsuite/gdc.test/runnable/imports/Other.d
index cd523c0..81d846f 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/Other.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/Other.d
@@ -2,13 +2,12 @@ module imports.Other; // makes no difference if removed
import Same;
import core.stdc.stdio;
-class Other : Same // segfault
-// class Other : Same.Same //***UGLY ALERT*** but doesn't segfault
+class Other : Same.Same
{
-this()
-{
-printf("other\n");
-}
+ this()
+ {
+ printf("other\n");
+ }
}
int main()
diff --git a/gcc/testsuite/gdc.test/runnable/imports/a12037.d b/gcc/testsuite/gdc.test/runnable/imports/a12037.d
index 7c25d87..3d6e456 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/a12037.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/a12037.d
@@ -19,29 +19,28 @@ private template CustomFloatParams(uint precision, uint exponentWidth)
) CustomFloatParams;
}
-struct CustomFloat(uint precision, uint exponentWidth)
-if ((1 + precision + exponentWidth) % 8 == 0 && precision + exponentWidth > 0)
+private union ToBinary(F)
+if (is(typeof(CustomFloatParams!(F.sizeof*8))) || is(F == real))
{
-private:
- union ToBinary(F)
- if (is(typeof(CustomFloatParams!(F.sizeof*8))) || is(F == real))
- {
- F set;
+ F set;
- // If on Linux or Mac, where 80-bit reals are padded, ignore the
- // padding.
- CustomFloat!(CustomFloatParams!(min(F.sizeof*8, 80))) get;
+ // If on Linux or Mac, where 80-bit reals are padded, ignore the
+ // padding.
+ CustomFloat!(CustomFloatParams!(min(F.sizeof*8, 80))) get;
- // Convert F to the correct binary type.
- static typeof(get) opCall(F value)
- {
- ToBinary r;
- r.set = value;
- return r.get;
- }
- alias get this;
+ // Convert F to the correct binary type.
+ static typeof(get) opCall(F value)
+ {
+ ToBinary r;
+ r.set = value;
+ return r.get;
}
+ alias get this;
+}
+struct CustomFloat(uint precision, uint exponentWidth)
+if ((1 + precision + exponentWidth) % 8 == 0 && precision + exponentWidth > 0)
+{
public:
@property bool sign() { return 1; }
@property void sign(bool) {}
@@ -65,7 +64,7 @@ public:
@property F get(F)()
if (is(F == float) || is(F == double) || is(F == real))
{
- ToBinary!F result;
+ ToBinary result;
return F.init;
}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/a21a.d b/gcc/testsuite/gdc.test/runnable/imports/a21a.d
index 8ba1462..ded47da 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/a21a.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/a21a.d
@@ -1,6 +1,6 @@
module imports.a21a;
-import std.stdio;
+import core.stdc.stdio;
import a21;
template GoodMixin()
diff --git a/gcc/testsuite/gdc.test/runnable/imports/another_module_with_tests.d b/gcc/testsuite/gdc.test/runnable/imports/another_module_with_tests.d
new file mode 100644
index 0000000..5329004
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/another_module_with_tests.d
@@ -0,0 +1,4 @@
+module imports.another_module_with_tests;
+unittest {}
+unittest {}
+unittest { assert(false); }
diff --git a/gcc/testsuite/gdc.test/runnable/imports/depsprot_default.d b/gcc/testsuite/gdc.test/runnable/imports/depsprot_default.d
deleted file mode 100644
index 2d5de35..0000000
--- a/gcc/testsuite/gdc.test/runnable/imports/depsprot_default.d
+++ /dev/null
@@ -1 +0,0 @@
-void pack() {}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/depsprot_private.d b/gcc/testsuite/gdc.test/runnable/imports/depsprot_private.d
deleted file mode 100644
index be063dd..0000000
--- a/gcc/testsuite/gdc.test/runnable/imports/depsprot_private.d
+++ /dev/null
@@ -1 +0,0 @@
-void priv() {}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/depsprot_public.d b/gcc/testsuite/gdc.test/runnable/imports/depsprot_public.d
deleted file mode 100644
index ad18eaf..0000000
--- a/gcc/testsuite/gdc.test/runnable/imports/depsprot_public.d
+++ /dev/null
@@ -1 +0,0 @@
-void pub() {}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/module_with_tests.d b/gcc/testsuite/gdc.test/runnable/imports/module_with_tests.d
new file mode 100644
index 0000000..c0372ab
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/module_with_tests.d
@@ -0,0 +1,2 @@
+module imports.module_with_tests;
+unittest {} unittest { assert(false); }
diff --git a/gcc/testsuite/gdc.test/runnable/imports/pubprivtmpla.d b/gcc/testsuite/gdc.test/runnable/imports/pubprivtmpla.d
new file mode 100644
index 0000000..f68bdd7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/pubprivtmpla.d
@@ -0,0 +1,8 @@
+module pubprivtmpla;
+
+struct S
+{
+ private int m = 42;
+ private int _get()() { return m; }
+ public alias get = _get!();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/std11file.d b/gcc/testsuite/gdc.test/runnable/imports/std11file.d
new file mode 100644
index 0000000..76d43be
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/std11file.d
@@ -0,0 +1,6 @@
+module imports.std11file;
+
+string getcwd() @trusted
+{
+ return "/dlang/test/runnable";
+}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/std15017variant.d b/gcc/testsuite/gdc.test/runnable/imports/std15017variant.d
index f6f7f5e..cf5dbf1 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/std15017variant.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/std15017variant.d
@@ -1,6 +1,6 @@
module imports.std15017variant;
-struct VariantN(size_t maxDataSize)
+struct VariantN(uint maxDataSize)
{
VariantN opAssign() { return this; }
diff --git a/gcc/testsuite/gdc.test/runnable/imports/template_ovs1.d b/gcc/testsuite/gdc.test/runnable/imports/template_ovs1.d
index a4b2ecf..465e74c 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/template_ovs1.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/template_ovs1.d
@@ -1,7 +1,8 @@
module imports.template_ovs1;
/***************************************************/
-// 1900 - template overload set
+// https://issues.dlang.org/show_bug.cgi?id=1900
+// template overload set
auto foo1900a(int num) { return 1; }
auto foo1900b(T)(T arg) if (is(T : const(char)[])) { return 2; }
@@ -34,7 +35,7 @@ auto merge1900(T)(int)
}
/***************************************************/
-// 1900
+// https://issues.dlang.org/show_bug.cgi?id=1900
class AClass1900 {}
template Traits1900(T : AClass1900) { enum name = "AClass"; }
@@ -47,12 +48,12 @@ template Value1900b(T) if (is(T == double)) { enum Value1900b = 1; }
void Value1900b() {}
/***************************************************/
-// 8352
+// https://issues.dlang.org/show_bug.cgi?id=8352
Range remove8352a(alias pred, Range)(Range range) { return range; }
void remove8352b(in char[] name) {}
/***************************************************/
-// 10658
+// https://issues.dlang.org/show_bug.cgi?id=10658
template Val10658(int n) { enum Val10658 = 1; }
diff --git a/gcc/testsuite/gdc.test/runnable/imports/template_ovs2.d b/gcc/testsuite/gdc.test/runnable/imports/template_ovs2.d
index 5b92568..1c9500c 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/template_ovs2.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/template_ovs2.d
@@ -1,7 +1,8 @@
module imports.template_ovs2;
/***************************************************/
-// 1900 - template overload set
+// https://issues.dlang.org/show_bug.cgi?id=1900
+// template overload set
auto foo1900a(T)(T arg) if (is(T : const(char)[])) { return 2; }
auto foo1900b(int num) { return 1; }
@@ -34,7 +35,7 @@ auto merge1900(T)(string)
}
/***************************************************/
-// 1900
+// https://issues.dlang.org/show_bug.cgi?id=1900
class BClass1900 {}
template Traits1900(T : BClass1900) { enum name = "BClass"; }
@@ -47,12 +48,12 @@ template Value1900b(T) if (is(T == string)) { enum Value1900b = 2; }
void Value1900b() {}
/***************************************************/
-// 8352
+// https://issues.dlang.org/show_bug.cgi?id=8352
void remove8352a(in char[] name) {}
Range remove8352b(alias pred, Range)(Range range) { return range; }
/***************************************************/
-// 10658
+// https://issues.dlang.org/show_bug.cgi?id=10658
template Val10658(long n) { enum Val10658 = 2; }
diff --git a/gcc/testsuite/gdc.test/runnable/imports/template_ovs3.d b/gcc/testsuite/gdc.test/runnable/imports/template_ovs3.d
index ca76914..75beeb9 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/template_ovs3.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/template_ovs3.d
@@ -1,7 +1,8 @@
module imports.template_ovs3;
/***************************************************/
-// 1900 - template overload set
+// https://issues.dlang.org/show_bug.cgi?id=1900
+// template overload set
import imports.template_ovs1;
import imports.template_ovs2;
@@ -31,6 +32,6 @@ struct S1900
}
/***************************************************/
-// 1900
+// https://issues.dlang.org/show_bug.cgi?id=1900
struct Traits1900(T) if (!is(T == class)) { enum name = "any"; }
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test11931a.d b/gcc/testsuite/gdc.test/runnable/imports/test11931a.d
index 152b38a..f43ac4f 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/test11931a.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/test11931a.d
@@ -1,7 +1,5 @@
module imports.test11931a;
-import std.stdio;
-
import imports.test11931d;
import imports.test11931b;
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test11931d.d b/gcc/testsuite/gdc.test/runnable/imports/test11931d.d
index 7a3ed39..dc9bbb1 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/test11931d.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/test11931d.d
@@ -1,7 +1,20 @@
module imports.test11931d;
-import std.array;
-import std.algorithm;
+template filter(alias pred)
+{
+ auto filter(Range)(Range r)
+ {
+ struct FilterResult
+ {
+ Range array()
+ {
+ return data;
+ }
+ Range data;
+ }
+ return FilterResult(r);
+ }
+}
struct ConnectionPoint
{
@@ -26,5 +39,5 @@ struct Signal(T, A...)
private:
alias D = T delegate(A);
- D _arr[];
+ D[] _arr;
}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test13a.d b/gcc/testsuite/gdc.test/runnable/imports/test13a.d
index 4b00277..4512e41 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/test13a.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/test13a.d
@@ -17,7 +17,7 @@ template Ordinal(T) {
public T clamp(T item, T lower, T upper)
in {
assert(lower <= upper);
- } body {
+ } do {
return max(min(item, upper), lower);
}
}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test15777a.d b/gcc/testsuite/gdc.test/runnable/imports/test15777a.d
new file mode 100644
index 0000000..55ae716
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test15777a.d
@@ -0,0 +1 @@
+void fun() {}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test15777b.d b/gcc/testsuite/gdc.test/runnable/imports/test15777b.d
new file mode 100644
index 0000000..55ae716
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test15777b.d
@@ -0,0 +1 @@
+void fun() {}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test17181a.d b/gcc/testsuite/gdc.test/runnable/imports/test17181a.d
new file mode 100644
index 0000000..c080e96
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test17181a.d
@@ -0,0 +1,10 @@
+module imports.test17181a;
+
+int a = 0;
+static this() { a = 1; }
+
+T abc(T)(T i)
+{
+ import imports.test17181b;
+ return i;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test17181b.d b/gcc/testsuite/gdc.test/runnable/imports/test17181b.d
new file mode 100644
index 0000000..25e6088
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test17181b.d
@@ -0,0 +1,3 @@
+module imports.test17181b;
+import imports.test17181a;
+static this() { a = 2; }
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test17181c.d b/gcc/testsuite/gdc.test/runnable/imports/test17181c.d
new file mode 100644
index 0000000..1722711
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test17181c.d
@@ -0,0 +1,7 @@
+module imports.test17181c;
+
+int getA()()
+{
+ import imports.test17181a;
+ return a;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test18868_a.d b/gcc/testsuite/gdc.test/runnable/imports/test18868_a.d
new file mode 100644
index 0000000..275cf22
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test18868_a.d
@@ -0,0 +1,3 @@
+shared static this() { }
+import imports.test18868_fls;
+alias floop = FLS!(int);
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test18868_fls.d b/gcc/testsuite/gdc.test/runnable/imports/test18868_fls.d
new file mode 100644
index 0000000..4714205
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test18868_fls.d
@@ -0,0 +1,33 @@
+module imports.test18868_fls;
+
+template FLS(T)
+{
+ int ctorcount = 0;
+ int dtorcount = 0;
+ int sharedctorcount = 0;
+ int shareddtorcount = 0;
+
+ static this()
+ {
+ assert(ctorcount == 0);
+ ctorcount += 1;
+ }
+
+ static ~this()
+ {
+ assert(dtorcount == 0);
+ dtorcount += 1;
+ }
+
+ shared static this()
+ {
+ assert(sharedctorcount == 0);
+ sharedctorcount += 1;
+ }
+
+ shared static ~this()
+ {
+ assert(shareddtorcount == 0);
+ shareddtorcount += 1;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test19655b.d b/gcc/testsuite/gdc.test/runnable/imports/test19655b.d
new file mode 100644
index 0000000..83d3c9d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test19655b.d
@@ -0,0 +1,8 @@
+import test19655c;
+import test19655d;
+class Garply: Grault
+{ }
+void main()
+{
+ (new Garply).func;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test19655c.d b/gcc/testsuite/gdc.test/runnable/imports/test19655c.d
new file mode 100644
index 0000000..f69b7d9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test19655c.d
@@ -0,0 +1,8 @@
+import test19655f;
+import test19655e;
+import test19655a: Corge;
+class Foo
+{
+ int[Foo] map;
+ void fun0(Corge) { }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test19655d.d b/gcc/testsuite/gdc.test/runnable/imports/test19655d.d
new file mode 100644
index 0000000..9928644
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test19655d.d
@@ -0,0 +1,14 @@
+import test19655f;
+import test19655g;
+class Grault: Bar
+{
+ void func()
+ {
+ func2;
+ }
+ void func1()
+ {
+ assert(false, "func1 was never called");
+ }
+ void func2() { }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test19655e.d b/gcc/testsuite/gdc.test/runnable/imports/test19655e.d
new file mode 100644
index 0000000..d497fff
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test19655e.d
@@ -0,0 +1,2 @@
+import test19655c;
+int[Foo] map;
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test19655f.d b/gcc/testsuite/gdc.test/runnable/imports/test19655f.d
new file mode 100644
index 0000000..32a58f8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test19655f.d
@@ -0,0 +1,2 @@
+import test19655c;
+import test19655g;
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test19655g.d b/gcc/testsuite/gdc.test/runnable/imports/test19655g.d
new file mode 100644
index 0000000..d1cacfe
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test19655g.d
@@ -0,0 +1,3 @@
+import test19655c;
+class Bar: Foo
+{ }
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test24a.d b/gcc/testsuite/gdc.test/runnable/imports/test24a.d
index e606f1c..d7ca719 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/test24a.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/test24a.d
@@ -1,3 +1,3 @@
module imports.test24a;
-public import std.string;
+public import imports.test24c;
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test24b.d b/gcc/testsuite/gdc.test/runnable/imports/test24b.d
index dcb380f..507a848 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/test24b.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/test24b.d
@@ -1,3 +1,3 @@
module imports.test24b;
-public import std.string;
+public import imports.test24c;
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test24c.d b/gcc/testsuite/gdc.test/runnable/imports/test24c.d
new file mode 100644
index 0000000..a6ffee0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/imports/test24c.d
@@ -0,0 +1,6 @@
+module imports.test24c;
+
+immutable(Char)[] format(Char, Args...)(in Char[] fmt, Args args)
+{
+ return "3";
+}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test27a.d b/gcc/testsuite/gdc.test/runnable/imports/test27a.d
index 75c945d..8a68a16 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/test27a.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/test27a.d
@@ -1,10 +1,17 @@
module imports.test27a;
-import std.variant;
+struct Variant
+{
+ this(T)(T)
+ {
+ }
+}
-class myClass(T) {
+class myClass(T)
+{
public:
- void func(T v) {
+ void func(T v)
+ {
Variant b = Variant(v);
}
}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test39a.d b/gcc/testsuite/gdc.test/runnable/imports/test39a.d
index 84a1530..4150eaf 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/test39a.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/test39a.d
@@ -6,7 +6,7 @@ class Test (T)
{
final void show (in T[] msg)
{
- printf ("%.*s\n", msg.length, msg.ptr);
+ printf ("%.*s\n", cast(int)msg.length, msg.ptr);
}
}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test40a.d b/gcc/testsuite/gdc.test/runnable/imports/test40a.d
index b688b9f..d894f45 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/test40a.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/test40a.d
@@ -1,6 +1,6 @@
module imports.test40a;
-import std.stdio;
+import core.stdc.stdio;
template Mix()
{
@@ -8,7 +8,7 @@ template Mix()
{
auto context = new Context;
auto ts = context.toString;
- printf("context: %.*s %p\n", ts.length, ts.ptr, context);
+ printf("context: %.*s %p\n", cast(int)ts.length, ts.ptr, context);
context.func!(typeof(this))();
printf("returning from opCall\n");
}
@@ -23,8 +23,8 @@ class Bar
void someFunc(string z)
{
- printf("str length: %d\n", z.length);
- printf("str: '%.*s'\n", z.length, z.ptr);
+ printf("str length: %zd\n", z.length);
+ printf("str: '%.*s'\n", cast(int)z.length, z.ptr);
}
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test45a.d b/gcc/testsuite/gdc.test/runnable/imports/test45a.d
index df3b852..d466cbe 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/test45a.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/test45a.d
@@ -1,6 +1,6 @@
module imports.test45a;
-import std.stdio;
+import core.stdc.stdio;
int foo()
{
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test45b.d b/gcc/testsuite/gdc.test/runnable/imports/test45b.d
index 371a162..d1b0c34 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/test45b.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/test45b.d
@@ -1,6 +1,6 @@
module imports.test45b;
-import std.stdio;
+import core.stdc.stdio;
int foo(int i)
{
diff --git a/gcc/testsuite/gdc.test/runnable/imports/test49a.d b/gcc/testsuite/gdc.test/runnable/imports/test49a.d
index 57baf4b..cb9c952 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/test49a.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/test49a.d
@@ -1,6 +1,6 @@
module imports.test49a;
-import std.stdio;
+import core.stdc.stdio;
int x;
diff --git a/gcc/testsuite/gdc.test/runnable/imports/testmod2a.d b/gcc/testsuite/gdc.test/runnable/imports/testmod2a.d
index a59d12c..a715811 100644
--- a/gcc/testsuite/gdc.test/runnable/imports/testmod2a.d
+++ b/gcc/testsuite/gdc.test/runnable/imports/testmod2a.d
@@ -1,7 +1,7 @@
module imports.testmod2a;
/**********************************/
-// bug 1904
+// https://issues.dlang.org/show_bug.cgi?id=1904
// testmod.d
private void bar(alias a)() {}
diff --git a/gcc/testsuite/gdc.test/runnable/inclusive_incontracts.d b/gcc/testsuite/gdc.test/runnable/inclusive_incontracts.d
new file mode 100644
index 0000000..7670b24
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/inclusive_incontracts.d
@@ -0,0 +1,80 @@
+// REQUIRED_ARGS: -preview=inclusiveincontracts
+// PERMUTE_ARGS: -O -inline
+
+import core.exception : AssertError;
+
+void main()
+{
+ basic_test;
+ multiple_incontracts_test;
+}
+
+void basic_test()
+{
+ class A
+ {
+ void foo() @nogc
+ in (true, "foo")
+ {
+ }
+ }
+
+ class B : A
+ {
+ override void foo() @nogc
+ in (false, "nope not foo")
+ {
+ }
+ }
+
+ auto b = new B;
+
+ try
+ {
+ b.foo;
+ throw new Exception("Assert expected.");
+ }
+ catch (AssertError assertError)
+ {
+ assert(assertError.line == 25); // line of invalid in-contract
+ assert(assertError.msg == "Logic error: in-contract was tighter than parent in-contract");
+ }
+}
+
+void multiple_incontracts_test()
+{
+ class A
+ {
+ void foo(int a, int b)
+ in (a > 0, "A::a")
+ in (b > 0, "B::b")
+ {
+ }
+ }
+
+ class B : A
+ {
+ override void foo(int a, int b)
+ in (a >= 0, "B::a")
+ in (b > 0, "B::b")
+ {
+ }
+ }
+
+ auto b = new B;
+
+ b.foo(0, 2);
+ try
+ {
+ b.foo(0, 0);
+ throw new Exception("Assert expected.");
+ }
+ catch (AssertError assertError) {
+ /**
+ * Having found that the looser contract in B is not fulfilled, we try
+ * the stricter contract in A. As that one is also violated, we error.
+ */
+ assert(assertError.line == 49);
+ assert(assertError.msg == "A::a");
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/inline.d b/gcc/testsuite/gdc.test/runnable/inline.d
index d3bb0a9..19be479 100644
--- a/gcc/testsuite/gdc.test/runnable/inline.d
+++ b/gcc/testsuite/gdc.test/runnable/inline.d
@@ -1,3 +1,14 @@
+/*
+RUN_OUTPUT:
+---
+7
+83
+4
+4
+1.000000 2.000000 3.000000
+Success
+---
+*/
import core.stdc.stdio;
@@ -145,7 +156,7 @@ void test7()
/************************************/
-// 10833
+// https://issues.dlang.org/show_bug.cgi?id=10833
string fun10833(T...)()
{
foreach (v ; T)
@@ -159,7 +170,7 @@ void test10833()
}
/************************************/
-// Bugzilla 4825
+// https://issues.dlang.org/show_bug.cgi?id=4825
int a8() {
int r;
@@ -178,7 +189,7 @@ void test8() {
}
/************************************/
-// 4841
+// https://issues.dlang.org/show_bug.cgi?id=4841
auto fun4841a()
{
@@ -264,7 +275,7 @@ void test4841()
}
/************************************/
-// 7261
+// https://issues.dlang.org/show_bug.cgi?id=7261
struct AbstractTask
{
@@ -287,7 +298,7 @@ struct Task
}
/************************************/
-// 9356
+// https://issues.dlang.org/show_bug.cgi?id=9356
void test9356()
{
@@ -302,7 +313,7 @@ void test9356()
}
/************************************/
-// 12079
+// https://issues.dlang.org/show_bug.cgi?id=12079
void test12079()
{
@@ -312,7 +323,7 @@ void test12079()
}
/************************************/
-// 12243
+// https://issues.dlang.org/show_bug.cgi?id=12243
char f12243() { return 'a'; }
@@ -323,7 +334,7 @@ void test12243()
}
/************************************/
-// 11201
+// https://issues.dlang.org/show_bug.cgi?id=11201
struct Foo11201
{
@@ -343,7 +354,7 @@ void test11201()
}
/************************************/
-// 11223
+// https://issues.dlang.org/show_bug.cgi?id=11223
struct Tuple11223(T...)
{
@@ -382,7 +393,7 @@ void test3918()
}
/************************************/
-// 11314
+// https://issues.dlang.org/show_bug.cgi?id=11314
struct Tuple11314(T...)
{
@@ -406,7 +417,7 @@ void test11314()
}
/************************************/
-// 11224
+// https://issues.dlang.org/show_bug.cgi?id=11224
S11224* ptr11224;
@@ -438,7 +449,7 @@ void test11224()
}
/************************************/
-// 11322
+// https://issues.dlang.org/show_bug.cgi?id=11322
bool b11322;
uint n11322;
@@ -460,7 +471,7 @@ void test11322()
}
/************************************/
-// 11394
+// https://issues.dlang.org/show_bug.cgi?id=11394
debug(NRVO) static void* p11394a, p11394b, p11394c;
@@ -497,7 +508,7 @@ void test11394()
}
/**********************************/
-// 12080
+// https://issues.dlang.org/show_bug.cgi?id=12080
class TZ12080 {}
@@ -521,7 +532,7 @@ class Foo12080
public ST12080 sysTime()
out {}
- body
+ do
{
if (quux)
return ST12080();
@@ -533,7 +544,7 @@ class Foo12080
}
/**********************************/
-// 13503
+// https://issues.dlang.org/show_bug.cgi?id=13503
void f13503a(string[] s...)
{
@@ -559,7 +570,7 @@ void test13503()
}
/**********************************/
-// 14267
+// https://issues.dlang.org/show_bug.cgi?id=14267
// EXTRA_SOURCES: imports/a14267.d
import imports.a14267;
@@ -584,7 +595,7 @@ void test14267()
}
/**********************************/
-// 13244
+// https://issues.dlang.org/show_bug.cgi?id=13244
struct MapResult13244(alias fun)
{
@@ -610,7 +621,7 @@ void test13244()
}
/**********************************/
-// 14306
+// https://issues.dlang.org/show_bug.cgi?id=14306
struct MapResult(alias fun)
{
@@ -656,7 +667,7 @@ void test14306()
}
/**********************************/
-// 14754
+// https://issues.dlang.org/show_bug.cgi?id=14754
auto aafunc14754(string k)
{
@@ -694,7 +705,7 @@ void test14754()
}
/**********************************/
-// 14606
+// https://issues.dlang.org/show_bug.cgi?id=14606
struct S14606
{
@@ -729,7 +740,7 @@ void test14606()
}
/**********************************/
-// 14753
+// https://issues.dlang.org/show_bug.cgi?id=14753
pragma(inline)
void test14753(string) { }
@@ -754,7 +765,7 @@ void test14975()
}
/**********************************/
-// 15210
+// https://issues.dlang.org/show_bug.cgi?id=15210
struct BigInt15210 {}
@@ -809,7 +820,7 @@ void test7625()
}
/**********************************/
-// 9785 partial fix
+// https://issues.dlang.org/show_bug.cgi?id=9785 partial fix
void test9785()
{
@@ -829,7 +840,7 @@ void test9785()
/**********************************/
-// 9785 partial fix
+// https://issues.dlang.org/show_bug.cgi?id=9785 partial fix
void test9785_2() {
int j = 3;
@@ -849,7 +860,7 @@ void test9785_2() {
}
/**********************************/
-// 9785 partial fix
+// https://issues.dlang.org/show_bug.cgi?id=9785 partial fix
void test9785_3() @nogc
{
@@ -879,7 +890,7 @@ void test9785_3() @nogc
}
/**********************************/
-// 15207
+// https://issues.dlang.org/show_bug.cgi?id=15207
struct Vec15207
{
@@ -923,7 +934,7 @@ void test15207()
}
/**********************************/
-// 15253
+// https://issues.dlang.org/show_bug.cgi?id=15253
struct MessageType15253
{
@@ -946,7 +957,7 @@ struct ProtoPackage15253
}
/**********************************/
-// 15296
+// https://issues.dlang.org/show_bug.cgi?id=15296
static int x15296;
@@ -1132,7 +1143,7 @@ int main()
test15296b();
test15296c();
test17676();
-
+
printf("Success\n");
return 0;
}
diff --git a/gcc/testsuite/gdc.test/runnable/inner.d b/gcc/testsuite/gdc.test/runnable/inner.d
index e1be7b9..7bf59d2 100644
--- a/gcc/testsuite/gdc.test/runnable/inner.d
+++ b/gcc/testsuite/gdc.test/runnable/inner.d
@@ -1,5 +1,5 @@
-// RUNNABLE_PHOBOS_TEST
-import std.stdio;
+
+import core.stdc.stdio;
/*******************************************************/
@@ -591,7 +591,7 @@ class Foo18
{
void doSayHello()
{
- writefln("Betty");
+ printf("Betty\n");
sayHello();
}
}
@@ -599,7 +599,7 @@ class Foo18
void sayHello()
{
- writefln("Hello");
+ printf("Hello\n");
}
}
@@ -614,7 +614,7 @@ class Foo182 : Foo18
void test18()
{
Foo182 foo = new Foo182();
- writefln("This should print Hello:");
+ printf("This should print Hello:\n");
foo.bar.doSayHello();
}
@@ -627,7 +627,7 @@ class Foo19
{
void doSayHello()
{
- writefln("Betty");
+ printf("Betty\n");
sayHello();
}
}
@@ -635,7 +635,7 @@ class Foo19
void sayHello()
{
- writefln("Hello");
+ printf("Hello\n");
}
this()
@@ -651,7 +651,7 @@ class Foo192 : Foo19
void test19()
{
Foo192 foo = new Foo192();
- writefln("This should print Hello:");
+ printf("This should print Hello:\n");
foo.bar.doSayHello();
}
@@ -796,7 +796,7 @@ struct S7426
}
/*******************************************************/
-// 14046
+// https://issues.dlang.org/show_bug.cgi?id=14046
class A14046
{
@@ -828,7 +828,7 @@ void test14046()
}
/*******************************************************/
-// 15839
+// https://issues.dlang.org/show_bug.cgi?id=15839
class AnimatedProgress15839(bool makeClosure)
{
diff --git a/gcc/testsuite/gdc.test/runnable/interface.d b/gcc/testsuite/gdc.test/runnable/interface.d
index dab7beb..78a712e 100644
--- a/gcc/testsuite/gdc.test/runnable/interface.d
+++ b/gcc/testsuite/gdc.test/runnable/interface.d
@@ -1,3 +1,10 @@
+/*
+TEST_OUTPUT:
+---
+runnable/interface.d(41): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+runnable/interface.d(55): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+---
+*/
import core.stdc.stdio;
@@ -79,7 +86,7 @@ void test3()
j.f();
K3 k = a;
k.f();
- assert(&j.f == &k.f); // Bugzilla 3706
+ assert(&j.f == &k.f); // https://issues.dlang.org/show_bug.cgi?id=3706
}
/*******************************************/
diff --git a/gcc/testsuite/gdc.test/runnable/interface2.d b/gcc/testsuite/gdc.test/runnable/interface2.d
index 85adf65..328f839 100644
--- a/gcc/testsuite/gdc.test/runnable/interface2.d
+++ b/gcc/testsuite/gdc.test/runnable/interface2.d
@@ -1,4 +1,11 @@
// PERMUTE_ARGS:
+/*
+TEST_OUTPUT:
+---
+runnable/interface2.d(47): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+runnable/interface2.d(98): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+---
+*/
extern(C) int printf(const char*, ...);
@@ -27,7 +34,7 @@ void test1()
printf("f = %p\n", f);
assert(cast(void*)b !is cast(void*)f);
- printf("f.class = '%.*s'\n", f.classinfo.name.length, f.classinfo.name.ptr);
+ printf("f.class = '%.*s'\n", cast(int)f.classinfo.name.length, f.classinfo.name.ptr);
assert(f.classinfo.name == "interface2.Foo");
f.bar();
@@ -341,7 +348,7 @@ class B12 : A12
{
printf("B12.clone()\n");
}
- body
+ do
{
return ia;
}
@@ -395,7 +402,7 @@ class B13 : A13
{
printf("B13.clone()\n");
}
- body { return ia; }
+ do { return ia; }
}
void test13()
@@ -662,11 +669,11 @@ void test19()
assert(cast(void*)c + (3*(void*).sizeof) == cast(void*)ifoo);
string s = ifoo.classinfo.name;
- printf("%.*s\n", s.length, s.ptr);
+ printf("%.*s\n", cast(int)s.length, s.ptr);
assert(s == "interface2.IFoo19");
s = (cast(Object)ifoo).toString;
- printf("%.*s\n", s.length, s.ptr);
+ printf("%.*s\n", cast(int)s.length, s.ptr);
assert(s == "interface2.Child19");
}
@@ -923,7 +930,8 @@ void test27()
}
/*******************************************************/
-// 1747 & 2013
+// https://issues.dlang.org/show_bug.cgi?id=1747
+// https://issues.dlang.org/show_bug.cgi?id=2013
void test1747()
{
@@ -1009,14 +1017,14 @@ bool foo4088(Test4088 x, Test4088 y)
}
/*******************************************************/
-// 7950
+// https://issues.dlang.org/show_bug.cgi?id=7950
template TypeTuple7950(T...){alias T TypeTuple7950;}
interface I7950a {} // ok
interface I7950b : I7950a, TypeTuple7950!() {} // fail
/*******************************************************/
-// 10007
+// https://issues.dlang.org/show_bug.cgi?id=10007
struct A10007 {}
@@ -1032,7 +1040,7 @@ class Foo10007 : IFoo10007
}
/*******************************************************/
-// 10744
+// https://issues.dlang.org/show_bug.cgi?id=10744
interface A10744
{
@@ -1065,7 +1073,7 @@ interface Baz10744 { }
interface Qux10744 : Baz10744 { }
/*******************************************************/
-// 11034
+// https://issues.dlang.org/show_bug.cgi?id=11034
class A11034(T)
{
diff --git a/gcc/testsuite/gdc.test/runnable/interface3.d b/gcc/testsuite/gdc.test/runnable/interface3.d
index f748f72..f0de22c 100644
--- a/gcc/testsuite/gdc.test/runnable/interface3.d
+++ b/gcc/testsuite/gdc.test/runnable/interface3.d
@@ -1,4 +1,10 @@
-// PERMUTE_ARGS:
+/*
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+OK
+---
+*/
extern(C) int printf(const char*, ...);
@@ -71,5 +77,3 @@ int main()
assert(Newline.OKset == 1);
return 0;
}
-
-
diff --git a/gcc/testsuite/gdc.test/runnable/interpret.d b/gcc/testsuite/gdc.test/runnable/interpret.d
index fe44744..d8059d3 100644
--- a/gcc/testsuite/gdc.test/runnable/interpret.d
+++ b/gcc/testsuite/gdc.test/runnable/interpret.d
@@ -1,4 +1,4 @@
-/* RUNNABLE_PHOBOS_TEST
+/*
TEST_OUTPUT:
---
true
@@ -17,7 +17,8 @@ tfoo
Crash!
---
*/
-import std.stdio;
+
+import core.stdc.stdio;
template Tuple(A...)
{
@@ -813,7 +814,7 @@ void test36()
string someCompileTimeFunction()
{
- return "writefln(\"Wowza!\");";
+ return "printf(\"Wowza!\n\");";
}
void test37()
@@ -871,7 +872,6 @@ string UpToSpace(string x)
void test40()
{
const y = UpToSpace("first space was after first");
- writeln(y);
assert(y == "first");
}
@@ -893,7 +893,6 @@ int foo41(int i)
void test41()
{
const y = foo41(3);
- writeln(y);
assert(y == 6);
}
@@ -915,7 +914,6 @@ int foo42(int i)
void test42()
{
const y = foo42(3);
- writeln(y);
assert(y == 6);
}
@@ -937,7 +935,6 @@ int bar(string a)
void test43()
{
const int foo = bar("a b c d");
- writeln(foo);
assert(foo == 28);
}
@@ -963,11 +960,11 @@ void test45()
/************************************************/
-const int foo46[5] = [0,1,2,3,4];
+const int[5] foo46 = [0,1,2,3,4];
void test46()
{
- writeln(eval!(foo46[3]));
+ printf("%d\n", eval!(foo46[3]));
}
/************************************************/
@@ -1017,7 +1014,6 @@ dstring testd49(dstring input)
void test49()
{
static x = testd49("hello");
- writeln(x);
assert(x == "el");
}
@@ -1126,26 +1122,29 @@ bool equals54(string a, string b)
/************************************************/
-const string foo55[2] = ["a", "b"];
+const string[2] foo55 = ["a", "b"];
string retsth55(int i) { return foo55[i]; }
void test55()
{
- writeln(eval!(foo55[0]));
- writeln(eval!(retsth55(0)));
+ enum res1 = eval!(foo55[0]);
+ printf("%.*s\n", cast(int)res1.length, res1.ptr);
+ enum res2 = eval!(retsth55(0));
+ printf("%.*s\n", cast(int)res2.length, res2.ptr);
}
/************************************************/
string retsth56(int i)
{
- static const string foo[2] = ["a", "b"];
+ static const string[2] foo = ["a", "b"];
return foo[i];
}
void test56()
{
- writeln(eval!(retsth56(0)));
+ enum result = eval!(retsth56(0));
+ printf("%.*s\n", cast(int)result.length, result.ptr);
}
/************************************************/
@@ -1178,7 +1177,6 @@ void test58()
assert(b.length == 2);
assert(b[0] == 2);
assert(b[1] == 3);
- writeln(b);
}
/************************************************/
@@ -1622,7 +1620,6 @@ const string s83 = mixItemList83();
void test83()
{
- writeln(s83);
assert(s83 == "item");
}
@@ -1813,7 +1810,7 @@ string foo90(string a, string b)
void test90()
{
static const string xxx = foo90("A", "xxx");
- printf("%.*s\n", xxx.length, xxx.ptr);
+ printf("%.*s\n", cast(int)xxx.length, xxx.ptr);
assert(xxx == "A");
}
@@ -2199,12 +2196,12 @@ struct Q
{
int x;
char y;
- int opAddAssign(int w)
+ int opOpAssign(string op)(int w) if (op == "+")
{
x += w;
return x + w;
}
- Q opSubAssign(int w)
+ Q opOpAssign(string op)(int w) if (op == "-")
{
x -= w;
version(D_Version2) { mixin("return this;"); } else { mixin("return *this;"); }
@@ -2300,7 +2297,7 @@ static assert(memtest8() == 6 + 17);
// --------- CTFE REF PASSING TESTS --------
-// Bugzilla 1950 - CTFE doesn't work correctly for structs passed by ref
+// https://issues.dlang.org/show_bug.cgi?id=1950 - CTFE doesn't work correctly for structs passed by ref
struct S1950
{
int x;
@@ -2412,7 +2409,8 @@ int nested2(int x)
static assert(nested2(7) == 17 + 8 + 10);
-// 1605 D1 & D2. break in switch with goto breaks in ctfe
+// https://issues.dlang.org/show_bug.cgi?id=1605
+// D1 & D2. break in switch with goto breaks in ctfe
int bug1605()
{
int i = 0;
@@ -2430,7 +2428,8 @@ int bug1605()
static assert(bug1605() == 27);
-// 2564. D2 only. CTFE: the index in a tuple foreach is uninitialized (bogus error)
+// https://issues.dlang.org/show_bug.cgi?id=2564
+// D2 only. CTFE: the index in a tuple foreach is uninitialized (bogus error)
// NOTE: Beware of optimizer bug 3264.
int bug2564()
@@ -2444,7 +2443,8 @@ int bug2564()
static int bug2564b = bug2564();
-// 1461 D1 + D2. Local variable as template alias parameter breaks CTFE
+// https://issues.dlang.org/show_bug.cgi?id=1461
+// D1 + D2. Local variable as template alias parameter breaks CTFE
void bug1461()
{
int x;
@@ -2620,7 +2620,7 @@ int delegtest6()
{
DelegStruct s;
s.a = 5;
- FoolishStruct k[3];
+ FoolishStruct[3] k;
DelegType u = &s.bar;
k[1].z = u;
return k[1].z(3);
@@ -2655,8 +2655,9 @@ static assert(lazyTest2(17) == 18);
version(D_Version2)
{
-// Bug 4020 and 4027 are D2 only
-
+// https://issues.dlang.org/show_bug.cgi?id=4020
+// https://issues.dlang.org/show_bug.cgi?id=4027
+// D2 only
struct PostblitCrash
{
int x;
@@ -2814,7 +2815,7 @@ void bug4257b()
}
/************************************************/
-// 5117
+// https://issues.dlang.org/show_bug.cgi?id=5117
static int dummy5117 = test5117();
@@ -2853,7 +2854,7 @@ int test5117b()
assert(s.value == 1); // fails, value == 0
return 0;
}
-ref S5117b getRef5117b(ref S5117b s) { return s; }
+ref S5117b getRef5117b(return ref S5117b s) { return s; }
struct S5117b
{
@@ -2862,7 +2863,7 @@ struct S5117b
}
/************************************************/
-// 6439
+// https://issues.dlang.org/show_bug.cgi?id=6439
struct A6439
{
@@ -2902,7 +2903,7 @@ static assert(!is(typeof(Compileable!(
}(3)
))));
-// 6504 regression
+// https://issues.dlang.org/show_bug.cgi?id=6504 regression
void test6504()
{
for (int i = 0; i < 3; ++i)
@@ -2913,7 +2914,7 @@ void test6504()
}
}
-// 8818 regression
+// https://issues.dlang.org/show_bug.cgi?id=8818 regression
void test8818()
{
static bool test()
@@ -3148,7 +3149,7 @@ void test108()
}
*/
-/***** Bug 5678 *********************************/
+/***** https://issues.dlang.org/show_bug.cgi?id=5678 *****/
/*
struct Bug5678
@@ -3185,7 +3186,7 @@ struct Test110s { this(int, int, int){} }
auto test110 = [Test110f(1, Test110s(1, 2, 3))];
/************************************************/
-// 6907
+// https://issues.dlang.org/show_bug.cgi?id=6907
int test6907()
{
@@ -3219,7 +3220,7 @@ int test6907()
static assert(test6907());
/************************************************/
-// 9023
+// https://issues.dlang.org/show_bug.cgi?id=9023
bool test9023()
{
@@ -3244,7 +3245,7 @@ bool test9023()
static assert(test9023());
/************************************************/
-// 15817
+// https://issues.dlang.org/show_bug.cgi?id=15817
S[] split15817(S)(S s)
{
@@ -3292,11 +3293,11 @@ void test9954()
}
/************************************************/
-// 10483
+// https://issues.dlang.org/show_bug.cgi?id=10483
struct Bug10483
{
- int val[3][4];
+ int[3][4] val;
}
struct Outer10483
@@ -3340,7 +3341,7 @@ void test112()
}
/************************************************/
-// 10687
+// https://issues.dlang.org/show_bug.cgi?id=10687
enum Foo10687 : uint { A, B, C, D, E }
immutable uint[5][] m10687 = [[0, 1, 2, 3, 4]];
@@ -3363,7 +3364,6 @@ void test113()
static void compare(real a, real b)
{
- writefln("compare(%30.30f, %30.30f);", a, b);
assert(fabs(a - b) < 128 * real.epsilon);
}
@@ -3399,7 +3399,7 @@ void test113()
}
/************************************************/
-// 14140
+// https://issues.dlang.org/show_bug.cgi?id=14140
struct S14140
{
@@ -3442,7 +3442,7 @@ void test14140()
}
/************************************************/
-// 14862
+// https://issues.dlang.org/show_bug.cgi?id=14862
struct S14862
{
@@ -3470,7 +3470,7 @@ void test14862()
}
/************************************************/
-// 15681
+// https://issues.dlang.org/show_bug.cgi?id=15681
void test15681()
{
@@ -3544,6 +3544,146 @@ void testToPrec()
/************************************************/
+auto test20366()
+{
+ const(char)[] s = ['h', 'e', 'l', '\xef', '\xbd', '\x8c', 'o'];
+
+ foreach_reverse (dchar c; s)
+ {
+ }
+
+ return true;
+}
+static assert(test20366());
+
+/************************************************/
+
+bool test20400()
+{
+ char[] s = cast(char[])"1234";
+ char[] ret = s[2 .. $];
+ ret.length += 1;
+ ret[$-1] = '5';
+ assert(ret == "345");
+
+ return true;
+}
+static assert(test20400());
+
+/************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=21878
+
+struct A21878
+{
+ int i;
+ ref inout(int) opIndex(size_t idx) inout return { return i; }
+}
+
+struct B21878
+{
+ A21878[1] a;
+ ref inout(int) opIndex(size_t idx) inout return { return a[0][idx]; }
+}
+
+bool ctfeFunc21878()
+{
+ A21878 a;
+ a[0] = 42;
+ assert(a[0] == 42); // OK
+
+ B21878 b;
+ b[0] = 42;
+ assert(b[0] == 42); // OK <- fails
+
+ return true;
+}
+
+void test21878()
+{
+ enum eval = ctfeFunc21878();
+ ctfeFunc21878(); // succeeds at runtime
+}
+
+/************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=20133
+
+void bar20133(ref string text)
+{
+ text = text[1 .. $];
+ assert(text.length < 3);
+ if (text.length == 2) assert(text == "oo");
+ if (text.length == 1) assert(text == "o");
+ if (text.length == 0) assert(text == "");
+ string tcopy = text;
+ if (tcopy.length > 0)
+ bar20133(tcopy);
+ assert(tcopy.length < 2);
+ if (tcopy.length == 1) assert(tcopy == "o");
+ if (tcopy.length == 0) assert(tcopy == "");
+}
+
+void bar20133_2(ref string text)
+{
+ auto ptext = &text;
+ *ptext = text[1 .. $];
+ assert(text.length < 3);
+ if (text.length == 2) assert(text == "oo");
+ if (text.length == 1) assert(text == "o");
+ if (text.length == 0) assert(text == "");
+ string tcopy = text;
+ if (tcopy.length > 0)
+ bar20133_2(tcopy);
+ assert(tcopy.length < 2);
+ if (tcopy.length == 1) assert(tcopy == "o");
+ if (tcopy.length == 0) assert(tcopy == "");
+}
+
+alias fun20133 = {
+ string input = "foo";
+ bar20133(input);
+ assert(input == "oo");
+ return input;
+};
+
+alias fun20133_2 = {
+ string input = "foo";
+ bar20133_2(input);
+ assert(input == "oo");
+ return input;
+};
+
+void test20133()
+{
+ enum ctest = fun20133();
+ enum ctest2 = fun20133_2();
+ auto rtest = fun20133();
+ auto rtest2 = fun20133_2();
+}
+
+/************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=22530
+
+class D22530 { }
+
+class C22530
+{
+ D22530 y = new D22530;
+ alias y this;
+}
+
+void test22530()
+{
+ // fixed
+ static assert(cast(D22530)(new C22530) is null);
+ static assert((1 ? cast(D22530)(new C22530) : new D22530) is null);
+
+ // runtime version already works
+ assert(cast(D22530)(new C22530) is null);
+ assert((1 ? cast(D22530)(new C22530) : new D22530) is null);
+}
+
+/************************************************/
+
int main()
{
test1();
@@ -3667,6 +3807,11 @@ int main()
test14140();
test14862();
test15681();
+ test20366();
+ test20400();
+ test21878();
+ test20133();
+ test22530();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/interpret2.d b/gcc/testsuite/gdc.test/runnable/interpret2.d
index 38242a7..77bc25c 100644
--- a/gcc/testsuite/gdc.test/runnable/interpret2.d
+++ b/gcc/testsuite/gdc.test/runnable/interpret2.d
@@ -1,5 +1,11 @@
-
-//import std.stdio;
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
+
+//import core.stdc.stdio;
extern(C) int printf(const char*, ...);
template Tuple(A...)
@@ -52,7 +58,7 @@ void test1()
assert(z1 == 8194);
}
-/***** Bug 2850 *********************************/
+/***** https://issues.dlang.org/show_bug.cgi?id=2850 *****/
/* These tests are not passing, and shouldn't pass. A non-first field in a union
being initialized cannot be converted to an expression, at least not until there are
@@ -122,11 +128,11 @@ void test2()
}
}
-/***** Bug 3779 *********************************/
+/***** https://issues.dlang.org/show_bug.cgi?id=3779 *****/
static const bug3779 = ["123"][0][$-1];
-/***** Bug 1880 *********************************/
+/***** https://issues.dlang.org/show_bug.cgi?id=1880 *****/
enum Property1880 {First=1,Second=2}
diff --git a/gcc/testsuite/gdc.test/runnable/issue16995.d b/gcc/testsuite/gdc.test/runnable/issue16995.d
new file mode 100644
index 0000000..3b028d4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/issue16995.d
@@ -0,0 +1,42 @@
+// REQUIRED_ARGS: -unittest
+// COMPILE_SEPARATELY
+// EXTRA_SOURCES: imports/module_with_tests.d imports/another_module_with_tests.d
+
+import imports.module_with_tests;
+import imports.another_module_with_tests;
+import core.exception: AssertError;
+
+shared static this()
+{
+ import core.runtime: Runtime, UnitTestResult;
+ Runtime.extendedModuleUnitTester = () => UnitTestResult.pass;
+}
+
+void main()
+{
+ foreach(i, ut; __traits(getUnitTests, imports.module_with_tests))
+ {
+ try
+ {
+ ut();
+ assert(i == 0, "2nd unittest should fail");
+ }
+ catch(AssertError e)
+ {
+ assert(i == 1, "Only 2nd unittest should fail");
+ }
+ }
+
+ foreach(i, ut; __traits(getUnitTests, imports.another_module_with_tests))
+ {
+ try
+ {
+ ut();
+ assert(i == 0 || i == 1, "3rd unittest should fail");
+ }
+ catch(AssertError e)
+ {
+ assert(i == 2, "Only 3rd unittest should fail");
+ }
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/issue8671.d b/gcc/testsuite/gdc.test/runnable/issue8671.d
deleted file mode 100644
index c28e63b..0000000
--- a/gcc/testsuite/gdc.test/runnable/issue8671.d
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUNNABLE_PHOBOS_TEST
-import std.random;
-void main()
-{
- double t = 1.0 - uniform(0.0, 1.0);
-}
diff --git a/gcc/testsuite/gdc.test/runnable/lazy.d b/gcc/testsuite/gdc.test/runnable/lazy.d
index c184619..0bd8f96 100644
--- a/gcc/testsuite/gdc.test/runnable/lazy.d
+++ b/gcc/testsuite/gdc.test/runnable/lazy.d
@@ -1,6 +1,5 @@
-// RUNNABLE_PHOBOS_TEST
import core.vararg;
-import std.stdio;
+import core.stdc.stdio;
/*********************************************************/
@@ -105,9 +104,14 @@ void bar3(...)
assert(va_arg!int(_argptr) == 14);
}
+void arr3(...)
+{
+ assert(_arguments.length == 1);
+ assert(va_arg!(int[])(_argptr) == [1,0,0,0,0,0,0,0,0,9]);
+}
+
void abc3(int* p)
{
- writeln(*p);
assert(*p == 3);
}
@@ -115,15 +119,13 @@ void test3()
{
int x = 3;
dotimes3(10, abc3(&x));
- dotimes3(10, write(++x));
- writeln();
+ dotimes3(10, ++x);
dotimes3(1, bar3(++x));
int[10] a = new int[10];
a[0] = 1;
a[$ - 1] = 9;
- dotimes3(3, write(a[0..$]));
- writeln();
+ dotimes3(3, arr3(a[0..$]));
}
/*********************************************************/
@@ -133,7 +135,6 @@ int p4;
void foo4(void* delegate()[] dgs...)
{
assert(dgs.length == 4);
- writefln("%s %s", dgs[0](), cast(void*)&p4);
assert(dgs[0]() == cast(void*)&p4);
assert(dgs[1]() == cast(void*)&p4);
assert(dgs[2]() == null);
@@ -144,7 +145,6 @@ void test4()
{
void *abc()
{
- writeln(cast(void*)&p4);
return cast(void*)&p4;
}
@@ -254,7 +254,7 @@ void test6682()
}
/*********************************************************/
-// 9109
+// https://issues.dlang.org/show_bug.cgi?id=9109
void test9109()
{
@@ -269,7 +269,7 @@ void test9109()
}
/*********************************************************/
-// 15835
+// https://issues.dlang.org/show_bug.cgi?id=15835
class C15835 {}
diff --git a/gcc/testsuite/gdc.test/runnable/lexer.d b/gcc/testsuite/gdc.test/runnable/lexer.d
index c16d7b3..ee2fef8 100644
--- a/gcc/testsuite/gdc.test/runnable/lexer.d
+++ b/gcc/testsuite/gdc.test/runnable/lexer.d
@@ -53,7 +53,7 @@ void test7()
}
/*********************************************************/
-// 4633
+// https://issues.dlang.org/show_bug.cgi?id=4633
template Types(alias v)
{
@@ -71,7 +71,7 @@ void test8()
/*********************************************************/
-// bug 6584
+// https://issues.dlang.org/show_bug.cgi?id=6584
version(9223372036854775807){}
debug(9223372036854775807){}
diff --git a/gcc/testsuite/gdc.test/runnable/link11069a.d b/gcc/testsuite/gdc.test/runnable/link11069a.d
index 01b923e..e31cfa0 100644
--- a/gcc/testsuite/gdc.test/runnable/link11069a.d
+++ b/gcc/testsuite/gdc.test/runnable/link11069a.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/std11069array.d imports/std11069container.d imports/std11069range.d imports/std11069typecons.d
// REQUIRED_ARGS: -noboundscheck
// <-- To remove necessity of _D7imports13std11069array7__arrayZ
diff --git a/gcc/testsuite/gdc.test/runnable/link11127.d b/gcc/testsuite/gdc.test/runnable/link11127.d
index 0ce963d..0e5118f 100644
--- a/gcc/testsuite/gdc.test/runnable/link11127.d
+++ b/gcc/testsuite/gdc.test/runnable/link11127.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/link11127a.d
import imports.link11127a;
void main()
diff --git a/gcc/testsuite/gdc.test/runnable/link12037.d b/gcc/testsuite/gdc.test/runnable/link12037.d
index ce5b17f..ca3e3c7 100644
--- a/gcc/testsuite/gdc.test/runnable/link12037.d
+++ b/gcc/testsuite/gdc.test/runnable/link12037.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/a12037.d
import imports.a12037;
alias CustomFloat!(10, 5) Float16;
diff --git a/gcc/testsuite/gdc.test/runnable/link12144.d b/gcc/testsuite/gdc.test/runnable/link12144.d
index 9092556..e7bcf86 100644
--- a/gcc/testsuite/gdc.test/runnable/link12144.d
+++ b/gcc/testsuite/gdc.test/runnable/link12144.d
@@ -1,5 +1,11 @@
// COMPILE_SEPARATELY: -g
// EXTRA_SOURCES: imports/link12144a.d
+/*
+TEST_OUTPUT:
+---
+runnable/imports/link12144a.d(31): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+---
+*/
import imports.link12144a;
diff --git a/gcc/testsuite/gdc.test/runnable/link13043.d b/gcc/testsuite/gdc.test/runnable/link13043.d
index 2969074..561651f 100644
--- a/gcc/testsuite/gdc.test/runnable/link13043.d
+++ b/gcc/testsuite/gdc.test/runnable/link13043.d
@@ -1,5 +1,5 @@
// PERMUTE_ARGS: -g -inline -version=bug -release -O
-
+// EXTRA_FILES: imports/link13043a.d
import imports.link13043a;
void main() {}
diff --git a/gcc/testsuite/gdc.test/runnable/link13350.d b/gcc/testsuite/gdc.test/runnable/link13350.d
index bceb4b8..2a2b40b 100644
--- a/gcc/testsuite/gdc.test/runnable/link13350.d
+++ b/gcc/testsuite/gdc.test/runnable/link13350.d
@@ -1,3 +1,9 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
extern (C) int printf(const(char*) fmt, ...);
static int foo();
diff --git a/gcc/testsuite/gdc.test/runnable/link13415.d b/gcc/testsuite/gdc.test/runnable/link13415.d
index 00b39d1..782bb6b 100644
--- a/gcc/testsuite/gdc.test/runnable/link13415.d
+++ b/gcc/testsuite/gdc.test/runnable/link13415.d
@@ -1,7 +1,13 @@
-// EXTRA_SOURCES: imports/link13415a.d
-// REQUIRED_ARGS: -inline
-// PERMUTE_ARGS: -allinst -unittest -debug
-// COMPILE_SEPARATELY
+/*
+EXTRA_SOURCES: imports/link13415a.d
+REQUIRED_ARGS: -inline
+PERMUTE_ARGS: -allinst -unittest -debug
+COMPILE_SEPARATELY
+RUN_OUTPUT:
+---
+i = 77;
+---
+*/
import imports.link13415a;
diff --git a/gcc/testsuite/gdc.test/runnable/link14074a.d b/gcc/testsuite/gdc.test/runnable/link14074a.d
index eaf1c89..200e810 100644
--- a/gcc/testsuite/gdc.test/runnable/link14074a.d
+++ b/gcc/testsuite/gdc.test/runnable/link14074a.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/link14074x.d
// EXTRA_SOURCES: imports/link14074y.d
import imports.link14074x;
import imports.link14074y;
diff --git a/gcc/testsuite/gdc.test/runnable/link14074b.d b/gcc/testsuite/gdc.test/runnable/link14074b.d
index fea2369..a05ecdc 100644
--- a/gcc/testsuite/gdc.test/runnable/link14074b.d
+++ b/gcc/testsuite/gdc.test/runnable/link14074b.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/link14074z.d
import imports.link14074z;
void main()
diff --git a/gcc/testsuite/gdc.test/runnable/link14541.d b/gcc/testsuite/gdc.test/runnable/link14541.d
index 433b9d7..7877a34 100644
--- a/gcc/testsuite/gdc.test/runnable/link14541.d
+++ b/gcc/testsuite/gdc.test/runnable/link14541.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/link14541traits.d
import imports.link14541traits;
void main()
diff --git a/gcc/testsuite/gdc.test/runnable/link14992.d b/gcc/testsuite/gdc.test/runnable/link14992.d
index 2da97b9..d024b5f 100644
--- a/gcc/testsuite/gdc.test/runnable/link14992.d
+++ b/gcc/testsuite/gdc.test/runnable/link14992.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/a14992.d
import imports.a14992; // do not link
int test()
diff --git a/gcc/testsuite/gdc.test/runnable/link15017.d b/gcc/testsuite/gdc.test/runnable/link15017.d
index ec3304e..16187a8 100644
--- a/gcc/testsuite/gdc.test/runnable/link15017.d
+++ b/gcc/testsuite/gdc.test/runnable/link15017.d
@@ -1,5 +1,11 @@
// COMPILE_SEPARATELY
// EXTRA_SOURCES: imports/std15017variant.d
+/*
+TEST_OUTPUT:
+---
+runnable/link15017.d(48): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+---
+*/
import imports.std15017variant;
@@ -40,6 +46,7 @@ void test()
// OK <- in DeleteExp::semantic
Variant10* p10;
delete p10;
+ static assert(Variant10.__dtor.mangleof == "_D7imports15std15017variant__T8VariantNVki10ZQp6__dtorMFNaNbNiNfZv");
}
void main() {}
diff --git a/gcc/testsuite/gdc.test/runnable/link6574.d b/gcc/testsuite/gdc.test/runnable/link6574.d
index 53e95f2..0f633f3 100644
--- a/gcc/testsuite/gdc.test/runnable/link6574.d
+++ b/gcc/testsuite/gdc.test/runnable/link6574.d
@@ -15,14 +15,18 @@ import imports.testmangle;
enum Method { A, B, }
+@safe @nogc pure nothrow:
+
+enum FZi = "FNaNbNiNfZi"; // pure nothrow @nogc @safe
+
int foo(Method method = Method.A)()
{
- static assert(foo.mangleof == "_D8link6574"~tl!"28"~"__T3fooVE"~id!("8link6574","Qs")~"6Methodi0Z"~id!("3foo","Qs")~"FZi");
+ static assert(foo.mangleof == "_D8link6574"~tl!"28"~"__T3fooVE"~id!("8link6574","Qs")~"6Methodi0Z"~id!("3foo","Qs")~FZi);
return 10 * foo!method();
}
int foo(Method method : Method.A)()
{
- static assert(foo.mangleof == "_D8link6574"~tl!"29"~"__T3fooHVE"~id!("8link6574","Qt")~"6Methodi0Z"~id!("3foo","Qt")~"FZi");
+ static assert(foo.mangleof == "_D8link6574"~tl!"29"~"__T3fooHVE"~id!("8link6574","Qt")~"6Methodi0Z"~id!("3foo","Qt")~FZi);
return 2;
}
int foo(Method method : Method.B)()
@@ -33,7 +37,7 @@ int foo(Method method : Method.B)()
int bar(Method method = Method.B)()
{
- static assert(bar.mangleof == "_D8link6574"~tl!"28"~"__T3barVE"~id!("8link6574","Qs")~"6Methodi1Z"~id!("3bar","Qs")~"FZi");
+ static assert(bar.mangleof == "_D8link6574"~tl!"28"~"__T3barVE"~id!("8link6574","Qs")~"6Methodi1Z"~id!("3bar","Qs")~FZi);
return 10 * bar!method();
}
int bar(Method method : Method.A)()
@@ -43,7 +47,7 @@ int bar(Method method : Method.A)()
}
int bar(Method method : Method.B)()
{
- static assert(bar.mangleof == "_D8link6574"~tl!"29"~"__T3barHVE"~id!("8link6574","Qt")~"6Methodi1Z"~id!("3bar","Qt")~"FZi");
+ static assert(bar.mangleof == "_D8link6574"~tl!"29"~"__T3barHVE"~id!("8link6574","Qt")~"6Methodi1Z"~id!("3bar","Qt")~FZi);
return 3;
}
diff --git a/gcc/testsuite/gdc.test/runnable/link7745.d b/gcc/testsuite/gdc.test/runnable/link7745.d
index fb36a9a..9a0eccf 100644
--- a/gcc/testsuite/gdc.test/runnable/link7745.d
+++ b/gcc/testsuite/gdc.test/runnable/link7745.d
@@ -15,6 +15,6 @@ static assert(forceSemantic7745());
void f(C c) { auto x = &c.asdfg; }
void main() {
- // extra test for bug 4820
+ // https://issues.dlang.org/show_bug.cgi?id=4820
nextis!(int)();
}
diff --git a/gcc/testsuite/gdc.test/runnable/literal.d b/gcc/testsuite/gdc.test/runnable/literal.d
index 60bac91..99b1777 100644
--- a/gcc/testsuite/gdc.test/runnable/literal.d
+++ b/gcc/testsuite/gdc.test/runnable/literal.d
@@ -1,3 +1,9 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
extern(C) int printf(const char*, ...);
@@ -165,7 +171,7 @@ void test2()
}
/***************************************************/
-// 13907
+// https://issues.dlang.org/show_bug.cgi?id=13907
void f13907_1(wchar[1] a) {}
void f13907_2(wchar[2] a) {}
@@ -185,8 +191,8 @@ void test13907()
static assert(!__traits(compiles, { f13907_1("\U00010000" ); }));
f13907_2("\U00010000"w);
f13907_2("\U00010000");
- f13907_3("\U00010000"w); // Re-enable implicit length extension, from issue 13999
- f13907_3("\U00010000" ); // Re-enable implicit length extension, from issue 13999
+ f13907_3("\U00010000"w); // Re-enable implicit length extension, from https://issues.dlang.org/show_bug.cgi?id=13999
+ f13907_3("\U00010000" ); // Re-enable implicit length extension, from https://issues.dlang.org/show_bug.cgi?id=13999
assert(f13907_12("a") == 1);
assert(f13907_12("ab") == 2);
@@ -210,13 +216,13 @@ void test13907()
static wchar[20] wsa = "hello world"; // ok
static dchar[20] dsa = "hello world"; // ok
- // Bugzilla 13966
+ // https://issues.dlang.org/show_bug.cgi?id=13966
string[1][] arr;
arr ~= ["class"];
enum immutable(char[5]) sarrstr = "class";
arr ~= [sarrstr];
- // Bugzilla 13999
+ // https://issues.dlang.org/show_bug.cgi?id=13999
string[dchar[2]] aa13999 = ["ã‚": "bar"];
assert(aa13999["ã‚"] == "bar");
dchar[2] key13999 = "ã‚";
@@ -225,6 +231,16 @@ void test13907()
assert(aa13999[key13999] == "bar");
}
+ulong op12950(ulong v){return v + 12950;}
+
+void test12950()
+{
+ assert(0x00_00_00_01.op12950() == 12951);
+ assert(0x00_00_00_01UL.op12950() == 12951);
+ assert(0b00_00_00_01.op12950() == 12951);
+ assert(0b00_00_00_01UL.op12950() == 12951);
+}
+
/***************************************************/
int main()
@@ -232,6 +248,7 @@ int main()
test1();
test2();
test13907();
+ test12950();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/loopunroll.d b/gcc/testsuite/gdc.test/runnable/loopunroll.d
index 19e2db2..b614d1b 100644
--- a/gcc/testsuite/gdc.test/runnable/loopunroll.d
+++ b/gcc/testsuite/gdc.test/runnable/loopunroll.d
@@ -1,5 +1,22 @@
-
-/* PERMUTE_ARGS: -O
+/*
+PERMUTE_ARGS: -O
+RUN_OUTPUT:
+---
+0
+45
+45
+45
+45
+45
+45
+45
+10
+45
+0
+5
+45
+45
+---
*/
import core.stdc.stdio;
diff --git a/gcc/testsuite/gdc.test/runnable/m1.d b/gcc/testsuite/gdc.test/runnable/m1.d
index 49a3d15..5689ffd 100644
--- a/gcc/testsuite/gdc.test/runnable/m1.d
+++ b/gcc/testsuite/gdc.test/runnable/m1.d
@@ -1,9 +1,15 @@
-// EXTRA_SOURCES: imports/m1a.d
-// PERMUTE_ARGS:
+/*
+EXTRA_SOURCES: imports/m1a.d
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+Success
+---
+*/
module m1;
-import std.stdio;
+import core.stdc.stdio;
import imports.m1a;
diff --git a/gcc/testsuite/gdc.test/runnable/manboy.d b/gcc/testsuite/gdc.test/runnable/manboy.d
index 0386226..8e53307 100644
--- a/gcc/testsuite/gdc.test/runnable/manboy.d
+++ b/gcc/testsuite/gdc.test/runnable/manboy.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
-import std.stdio;
+import core.stdc.stdio;
int a(int k, lazy int x1, lazy int x2, lazy int x3, lazy int x4, lazy int x5)
{
diff --git a/gcc/testsuite/gdc.test/runnable/mangle.d b/gcc/testsuite/gdc.test/runnable/mangle.d
index 9a8420a..7599e0e 100644
--- a/gcc/testsuite/gdc.test/runnable/mangle.d
+++ b/gcc/testsuite/gdc.test/runnable/mangle.d
@@ -14,7 +14,8 @@ false
import imports.testmangle;
/***************************************************/
-// 10077 - pragma(mangle)
+// https://issues.dlang.org/show_bug.cgi?id=10077
+// pragma(mangle)
pragma(mangle, "_test10077a_") int test10077a;
static assert(test10077a.mangleof == "_test10077a_");
@@ -54,7 +55,7 @@ void test10077i()
}
/***************************************************/
-// 13050
+// https://issues.dlang.org/show_bug.cgi?id=13050
void func13050(int);
template decl13050(Arg)
@@ -79,7 +80,7 @@ static assert(is(typeof(&problem13050!int) == void function(int)));
static assert(is(typeof(&workaround13050!int) == void function(int)));
/***************************************************/
-// 2774
+// https://issues.dlang.org/show_bug.cgi?id=2774
int foo2774(int n) { return 0; }
static assert(foo2774.mangleof == "_D6mangle7foo2774FiZi");
@@ -100,7 +101,7 @@ void test2774()
}
/*******************************************/
-// 8847
+// https://issues.dlang.org/show_bug.cgi?id=8847
auto S8847()
{
@@ -294,7 +295,7 @@ static assert(typeof(f8847a()).mangleof == "S6mangle6f8847aFNaZ1S");
static assert(typeof(f8847b()).mangleof == "S6mangle6f8847bFNaZ1S");
/*******************************************/
-// 12352
+// https://issues.dlang.org/show_bug.cgi?id=12352
auto bar12352()
{
@@ -325,7 +326,7 @@ static assert(typeof(baz12352()) .mangleof == "C6mangle8baz12352FZ1C");
static assert(typeof(baz12352()).func.mangleof == "_D6mangle8baz12352FZ1C4funcMFZv");
/*******************************************/
-// 9525
+// https://issues.dlang.org/show_bug.cgi?id=9525
void f9525(T)(in T*) { }
@@ -334,27 +335,29 @@ void test9525()
enum result1 = "S6mangle8test9525FZ"~tl!"26"~"__T5test1S"~tl!"13"~id!("6mangle","QBc")~"5f9525Z"~id!("5test1","Qr")~"MFZ1S";
enum result2 = "S6mangle8test9525FZ"~tl!"26"~"__T5test2S"~tl!"13"~id!("6mangle","QBc")~"5f9525Z"~id!("5test2","Qr")~"MFNaNbZ1S";
- void test1(alias a)()
+ bool test1(alias a)()
{
static struct S {}
static assert(S.mangleof == result1);
S s;
a(&s); // Error: Cannot convert &S to const(S*) at compile time
+ return true;
}
- static assert((test1!f9525(), true));
+ enum evalTest1 = test1!f9525();
- void test2(alias a)() pure nothrow
+ bool test2(alias a)() pure nothrow
{
static struct S {}
static assert(S.mangleof == result2);
S s;
a(&s); // Error: Cannot convert &S to const(S*) at compile time
+ return true;
}
- static assert((test2!f9525(), true));
+ enum evalTest2 = test2!f9525();
}
/******************************************/
-// 10249
+// https://issues.dlang.org/show_bug.cgi?id=10249
template Seq10249(T...) { alias Seq10249 = T; }
@@ -390,7 +393,7 @@ static: // necessary to make overloaded symbols accessible via __traits(getOverl
}
/*******************************************/
-// 11718
+// https://issues.dlang.org/show_bug.cgi?id=11718
struct Ty11718(alias sym) {}
@@ -431,7 +434,7 @@ void test11718()
}
/*******************************************/
-// 11776
+// https://issues.dlang.org/show_bug.cgi?id=11776
struct S11776(alias fun) { }
@@ -454,7 +457,7 @@ void test11776()
}
/***************************************************/
-// 12044
+// https://issues.dlang.org/show_bug.cgi?id=12044
struct S12044(T)
{
@@ -481,7 +484,7 @@ void test12044()
}
/*******************************************/
-// 12217
+// https://issues.dlang.org/show_bug.cgi?id=12217
void test12217(int)
{
@@ -499,7 +502,7 @@ void test12217(int)
void test12217() {}
/***************************************************/
-// 12231
+// https://issues.dlang.org/show_bug.cgi?id=12231
void func12231a()()
if (is(typeof({
@@ -599,6 +602,13 @@ void fooB(void delegate (void delegate()) scope dg)
//pragma(msg, fooB.mangleof);
static assert(typeof(fooA).mangleof != typeof(fooB).mangleof);
+
+/***************************************************/
+
+@live int testLive() { return 42; }
+
+static assert(testLive.mangleof == "_D6mangle8testLiveFNmZi");
+
/***************************************************/
alias noreturn = typeof(*null);
@@ -608,6 +618,12 @@ static assert(funcd.mangleof == "_D6mangle5funcdFPFZNnZi");
/***************************************************/
+struct S21753 { void function() f1; }
+void fun21753(S21753 v)() {}
+alias fl21753 = (){};
+static assert((fun21753!(S21753(fl21753))).mangleof == "_D6mangle__T8fun21753VSQv6S21753S1f_DQBj10" ~ fl21753.stringof ~ "MFNaNbNiNfZvZQCbQp");
+
+/***************************************************/
void main()
{
test10077h();
diff --git a/gcc/testsuite/gdc.test/runnable/mars1.d b/gcc/testsuite/gdc.test/runnable/mars1.d
index 4d17d33..c981334 100644
--- a/gcc/testsuite/gdc.test/runnable/mars1.d
+++ b/gcc/testsuite/gdc.test/runnable/mars1.d
@@ -1,259 +1,36 @@
/*
-RUNNABLE_PHOBOS_TEST
REQUIRED_ARGS: -mcpu=native
-PERMUTE_ARGS: -O -inline
+PERMUTE_ARGS: -O -inline -release
*/
import core.stdc.stdio;
-void testgoto()
-{
- int i;
-
- i = 3;
- goto L4;
-L3: i++;
- goto L5;
-L4: goto L3;
-L5: assert(i == 4);
-}
-
-int testswitch()
-{
- int i;
-
- i = 3;
- switch (i)
- {
- case 0:
- case 1:
- default:
- assert(0);
- case 3:
- break;
- }
- return 0;
-}
-
-void testdo()
-{
- int x = 0;
-
- do
- {
- x++;
- } while (x < 10);
- printf("x == %d\n", x);
- assert(x == 10);
-}
-
-
-void testbreak()
-{ int i, j;
-
- Louter:
- for (i = 0; i < 10; i++)
- {
- for (j = 0; j < 10; j++)
- {
- if (j == 3)
- break Louter;
- }
- }
-
- printf("i = %d, j = %d\n", i, j);
- assert(i == 0);
- assert(j == 3);
-}
+template tuple(A...) { alias tuple = A; }
///////////////////////
-int foo(string s)
-{
- int i;
-
- i = 0;
- switch (s)
- {
- case "hello":
- i = 1;
- break;
- case "goodbye":
- i = 2;
- break;
- case "goodb":
- i = 3;
- break;
- default:
- i = 10;
- break;
- }
- return i;
-}
-
-
-void teststringswitch()
-{ int i;
-
- i = foo("hello");
- printf("i = %d\n", i);
- assert(i == 1);
-
- i = foo("goodbye");
- printf("i = %d\n", i);
- assert(i == 2);
-
- i = foo("goodb");
- printf("i = %d\n", i);
- assert(i == 3);
-
- i = foo("huzzah");
- printf("i = %d\n", i);
- assert(i == 10);
-}
-
-
-///////////////////////
+// https://github.com/dlang/dmd/pull/11441
-struct Foo
+long sdiv1(long l)
{
- int a;
- char b;
- long c;
+ return l / 2;
}
-Foo test(Foo f)
+int sdiv2(int i)
{
- f.a += 1;
- f.b += 3;
- f.c += 4;
- return f;
+ return i / 2;
}
-
-void teststrarg()
+void testsdiv2()
{
- Foo g;
- g.a = 1;
- g.b = 2;
- g.c = 3;
-
- Foo q;
- q = test(g);
- assert(q.a == 2);
- assert(q.b == 5);
- assert(q.c == 7);
+ assert(sdiv1(10) == 5);
+ assert(sdiv1(-10) == -5);
+ assert(sdiv2(10) == 5);
+ assert(sdiv2(-10) == -5);
}
///////////////////////
-align (1) struct Foo1
-{
- align (1):
- int a;
- char b;
- long c;
-}
-
-struct Foo2
-{
- int a;
- char b;
- long c;
-}
-
-struct Foo3
-{
- int a;
- align (1) char b;
- long c;
-}
-
-struct Foo4
-{
- int a;
- struct { char b; }
- long c;
-}
-
-void testsizes()
-{
- printf("%d\n", Foo1.sizeof);
- assert(Foo1.a.offsetof == 0);
- assert(Foo1.b.offsetof == 4);
- assert(Foo1.c.offsetof == 5);
- assert(Foo1.sizeof == 13);
-
- assert(Foo2.a.offsetof == 0);
- assert(Foo2.b.offsetof == 4);
- assert(Foo2.c.offsetof == 8);
- assert(Foo2.sizeof == 16);
-
- assert(Foo3.a.offsetof == 0);
- assert(Foo3.b.offsetof == 4);
- assert(Foo3.c.offsetof == 8);
- assert(Foo3.b.sizeof == 1);
- assert(Foo3.sizeof == 16);
-
- assert(Foo4.sizeof == 16);
-}
-
-///////////////////////
-
-size_t cond11565(size_t val)
-{
- return val ? size_t.max : 0;
-}
-
-void test11565()
-{
- assert(cond11565(true) == size_t.max);
-}
-
-///////////////////////
-
-int[3] array1 = [1:1,2,0:3];
-
-void testarrayinit()
-{
- assert(array1[0] == 3);
- assert(array1[1] == 1);
- assert(array1[2] == 2);
-}
-
-///////////////////////
-
-void test13023(ulong n)
-{
- static void func(bool b) {}
-
- ulong k = 0;
-
- func(k >= n / 2);
-
- if (k >= n / 2)
- assert(0);
-}
-
-///////////////////////
-
-struct U { int a; union { char c; int d; } long b; }
-
-U f = { b:3, d:0x22222222, a:1 };
-
-void testU()
-{
- assert(f.b == 3);
- assert(f.d == 0x22222222);
- assert(f.c == 0x22);
- assert(f.a == 1);
- assert(f.sizeof == 16);
- assert(U.sizeof == 16);
-}
-
-
-///////////////////////
-
void testulldiv()
{
__gshared ulong[4][] vectors =
@@ -280,19 +57,18 @@ void testulldiv()
{
ulong q = vectors[i][0] / vectors[i][1];
if (q != vectors[i][2])
- printf("[%d] %lld / %lld = %lld, should be %lld\n",
- vectors[i][0], vectors[i][1], q, vectors[i][2]);
+ printf("[%zd] %lld / %lld = %lld, should be %lld\n",
+ i, vectors[i][0], vectors[i][1], q, vectors[i][2]);
ulong r = vectors[i][0] % vectors[i][1];
if (r != vectors[i][3])
- printf("[%d] %lld %% %lld = %lld, should be %lld\n",
+ printf("[%zd] %lld %% %lld = %lld, should be %lld\n",
i, vectors[i][0], vectors[i][1], r, vectors[i][3]);
}
}
////////////////////////////////////////////////////////////////////////
-
uint udiv10(uint x)
{
return x / 10;
@@ -427,307 +203,498 @@ void testfastudiv()
////////////////////////////////////////////////////////////////////////
-void vfunc() {}
-
-void test12095(int k)
-{
- int e = 0;
- e ? k || assert(0) : !e || vfunc();
- e ? k || assert(0) : e && vfunc();
- !e ? !e || vfunc() : k || assert(0);
+// https://issues.dlang.org/show_bug.cgi?id=14936
+
+long sldiv1 (long x) { return x / (1L << 1); }
+long sldiv2 (long x) { return x / (1L << 2); }
+long sldiv3 (long x) { return x / (1L << 3); }
+long sldiv7 (long x) { return x / (1L << 7); }
+long sldiv8 (long x) { return x / (1L << 8); }
+long sldiv9 (long x) { return x / (1L << 9); }
+long sldiv30(long x) { return x / (1L << 30); }
+long sldiv31(long x) { return x / (1L << 31); }
+long sldiv32(long x) { return x / (1L << 32); }
+long sldiv33(long x) { return x / (1L << 33); }
+long sldiv34(long x) { return x / (1L << 34); }
+long sldiv62(long x) { return x / (1L << 62); }
+long sldiv63(long x) { return x / (1L << 63); }
+
+void testsldiv()
+{
+ /* Test special div code for signed long divide
+ * by power of 2 for 32 bit targets.
+ */
+
+ // printf("63 = %llx\n", sldiv63(-0x7FFF_F8FF_FF3F_2FFFL));
+
+ static foreach (C; tuple!(
+ 1,2,3,10,300,1000,
+ 4_1001_2030_0030,
+ 0x7FFF_F8FF_FF3F_2FFFL))
+ {
+ /* Check if runtime computation matches compile time
+ */
+ assert(sldiv1 ( C) == C / (1L << 1));
+ assert(sldiv1 (-C) == -C / (1L << 1));
+ assert(sldiv2 ( C) == C / (1L << 2));
+ assert(sldiv2 (-C) == -C / (1L << 2));
+ assert(sldiv3 ( C) == C / (1L << 3));
+ assert(sldiv3 (-C) == -C / (1L << 3));
+ assert(sldiv7 ( C) == C / (1L << 7));
+ assert(sldiv7 (-C) == -C / (1L << 7));
+ assert(sldiv8 ( C) == C / (1L << 8));
+ assert(sldiv8 (-C) == -C / (1L << 8));
+ assert(sldiv9 ( C) == C / (1L << 9));
+ assert(sldiv9 (-C) == -C / (1L << 9));
+
+ assert(sldiv30( C) == C / (1L << 30));
+ assert(sldiv30(-C) == -C / (1L << 30));
+ assert(sldiv31( C) == C / (1L << 31));
+ assert(sldiv31(-C) == -C / (1L << 31));
+ assert(sldiv32( C) == C / (1L << 32));
+ assert(sldiv32(-C) == -C / (1L << 32));
+ assert(sldiv33( C) == C / (1L << 33));
+ assert(sldiv33(-C) == -C / (1L << 33));
+ assert(sldiv34( C) == C / (1L << 34));
+ assert(sldiv34(-C) == -C / (1L << 34));
+ assert(sldiv62( C) == C / (1L << 62));
+ assert(sldiv62(-C) == -C / (1L << 62));
+ assert(sldiv63( C) == C / (1L << 63));
+ assert(sldiv63(-C) == -C / (1L << 63));
+ }
}
+////////////////////////////////////////////////////////////////////////
+
+// https://issues.dlang.org/show_bug.cgi?id=14936
+
+long slmod1 (long x) { return x % (1L << 1); }
+long slmod2 (long x) { return x % (1L << 2); }
+long slmod3 (long x) { return x % (1L << 3); }
+long slmod7 (long x) { return x % (1L << 7); }
+long slmod8 (long x) { return x % (1L << 8); }
+long slmod9 (long x) { return x % (1L << 9); }
+long slmod30(long x) { return x % (1L << 30); }
+long slmod31(long x) { return x % (1L << 31); }
+long slmod32(long x) { return x % (1L << 32); }
+long slmod33(long x) { return x % (1L << 33); }
+long slmod34(long x) { return x % (1L << 34); }
+long slmod62(long x) { return x % (1L << 62); }
+long slmod63(long x) { return x % (1L << 63); }
+
+void testslmod()
+{
+ static foreach (C; tuple!(
+ 1,2,3,10,300,1000,
+ 4_1001_2030_0030,
+ 0x7FFF_F8FF_FF3F_2FFFL))
+ {
+ /* Check if runtime computation matches compile time
+ */
+ assert(slmod1 ( C) == C % (1L << 1));
+ assert(slmod1 (-C) == -C % (1L << 1));
+ assert(slmod2 ( C) == C % (1L << 2));
+ assert(slmod2 (-C) == -C % (1L << 2));
+ assert(slmod3 ( C) == C % (1L << 3));
+ assert(slmod3 (-C) == -C % (1L << 3));
+ assert(slmod7 ( C) == C % (1L << 7));
+ assert(slmod7 (-C) == -C % (1L << 7));
+ assert(slmod8 ( C) == C % (1L << 8));
+ assert(slmod8 (-C) == -C % (1L << 8));
+ assert(slmod9 ( C) == C % (1L << 9));
+ assert(slmod9 (-C) == -C % (1L << 9));
+
+ assert(slmod30( C) == C % (1L << 30));
+ assert(slmod30(-C) == -C % (1L << 30));
+ assert(slmod31( C) == C % (1L << 31));
+ assert(slmod31(-C) == -C % (1L << 31));
+ assert(slmod32( C) == C % (1L << 32));
+ assert(slmod32(-C) == -C % (1L << 32));
+ assert(slmod33( C) == C % (1L << 33));
+ assert(slmod33(-C) == -C % (1L << 33));
+ assert(slmod34( C) == C % (1L << 34));
+ assert(slmod34(-C) == -C % (1L << 34));
+ assert(slmod62( C) == C % (1L << 62));
+ assert(slmod62(-C) == -C % (1L << 62));
+ assert(slmod63( C) == C % (1L << 63));
+ assert(slmod63(-C) == -C % (1L << 63));
+ }
+}
////////////////////////////////////////////////////////////////////////
+T divC(int C, T)(T x)
+{
+ T y = x;
+ y /= C;
+ assert(y == x / C);
+ y = x;
+ y /= -C;
+ assert(y == x / -C);
+ return x / C;
+}
-bool test3918a( float t, real u )
+T modC(int C, T)(T x)
{
- printf("%f\n", u );
- return t && u;
+ T y = x;
+ y %= C;
+ assert(y == x % C);
+ y = x;
+ y %= -C;
+ assert(y == x % -C);
+ return x % C;
}
-bool test3918b( real t, float u )
+T remquoC(int C, T)(T x)
{
- printf("%f\n", t );
- return t && u;
+ return (x / C) | (x % C);
}
-void test3918()
+void testfastdiv()
{
- assert(test3918a(float.nan, real.nan));
- assert(test3918b(real.nan, float.nan));
+ static int z = 0; // prevent constant folding by optimizer
+
+ static foreach (T; tuple!(int, long, uint, ulong))
+ {{
+ T u = 10000;
+ T r;
+ static foreach (C; tuple!(10, 14, 14007, -10, -14, -14007))
+ {
+ r = divC!C(u); assert(r == u / (z + C));
+ r = modC!C(u); assert(r == u % (z + C));
+ r = remquoC!C(u); assert(r == ((u / (z + C) | (u % (z + C)))));
+ }
+ }}
}
////////////////////////////////////////////////////////////////////////
-int div10(int x)
-{
- return x / 10;
-}
+/* Test the pattern:
+ * replace ((i / C1) / C2) with (i / (C1 * C2))
+ * when e1 is 0 or 1 and (i2-i1) is a power of 2.
+ */
-int div14(int x)
+void divdiv(T, T C1, T C2)(T i)
{
- return x / 14;
+ auto a = (i / C1) / C2;
+ auto b = i / (C1 * C2);
+ if (a != b) assert(0);
}
-int div14007(int x)
+void testdivdiv()
{
- return x / 14007;
+ divdiv!(int,10,20)(30);
+ divdiv!(uint,10,20)(30);
+ divdiv!(long,10,20)(30);
+ divdiv!(ulong,10,20)(30);
+
+ divdiv!(int,-10,20)(30);
+ divdiv!(long,-10,20)(30);
+
+ divdiv!(int,-10,-20)(-30);
+ divdiv!(long,-10,-20)(-30);
}
-int mod10(int x)
+////////////////////////////////////////////////////////////////////////
+
+void testdivcmp()
{
- return x % 10;
+ // https://github.com/dlang/dmd/pull/7128
+ static bool foo(uint a, uint b)
+ {
+ return cast(bool)(a / b); // convert / to >=
+ }
+
+ assert(!foo(3, 4));
+ assert(foo(4, 4));
+ assert(foo(5, 4));
}
-int mod14(int x)
+/////////////////////////////////////////////////////
+
+void testgoto()
{
- return x % 14;
+ int i;
+
+ i = 3;
+ goto L4;
+L3: i++;
+ goto L5;
+L4: goto L3;
+L5: assert(i == 4);
}
-int mod14007(int x)
+int testswitch()
{
- return x % 14007;
+ int i;
+
+ i = 3;
+ switch (i)
+ {
+ case 0:
+ case 1:
+ default:
+ assert(0);
+ case 3:
+ break;
+ }
+ return 0;
}
-int remquo10(int x)
+void testdo()
{
- return (x / 10) | (x % 10);
+ int x = 0;
+
+ do
+ {
+ x++;
+ } while (x < 10);
+ printf("x == %d\n", x);
+ assert(x == 10);
}
-int remquo14(int x)
-{
- return (x / 14) | (x % 14);
+
+void testbreak()
+{ int i, j;
+
+ Louter:
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 10; j++)
+ {
+ if (j == 3)
+ break Louter;
+ }
+ }
+
+ printf("i = %d, j = %d\n", i, j);
+ assert(i == 0);
+ assert(j == 3);
}
-int remquo14007(int x)
+///////////////////////
+
+int foo(string s)
{
- return (x / 14007) | (x % 14007);
+ int i;
+
+ i = 0;
+ switch (s)
+ {
+ case "hello":
+ i = 1;
+ break;
+ case "goodbye":
+ i = 2;
+ break;
+ case "goodb":
+ i = 3;
+ break;
+ default:
+ i = 10;
+ break;
+ }
+ return i;
}
-////////////////////
-int mdiv10(int x)
-{
- return x / -10;
+void teststringswitch()
+{ int i;
+
+ i = foo("hello");
+ printf("i = %d\n", i);
+ assert(i == 1);
+
+ i = foo("goodbye");
+ printf("i = %d\n", i);
+ assert(i == 2);
+
+ i = foo("goodb");
+ printf("i = %d\n", i);
+ assert(i == 3);
+
+ i = foo("huzzah");
+ printf("i = %d\n", i);
+ assert(i == 10);
}
-int mdiv14(int x)
+
+///////////////////////
+
+struct Foo
{
- return x / -14;
+ int a;
+ char b;
+ long c;
}
-int mdiv14007(int x)
+Foo test(Foo f)
{
- return x / -14007;
+ f.a += 1;
+ f.b += 3;
+ f.c += 4;
+ return f;
}
-int mmod10(int x)
+
+void teststrarg()
{
- return x % -10;
+ Foo g;
+ g.a = 1;
+ g.b = 2;
+ g.c = 3;
+
+ Foo q;
+ q = test(g);
+ assert(q.a == 2);
+ assert(q.b == 5);
+ assert(q.c == 7);
}
-int mmod14(int x)
+///////////////////////
+
+align (1) struct Foo1
{
- return x % -14;
+ align (1):
+ int a;
+ char b;
+ long c;
}
-int mmod14007(int x)
+struct Foo2
{
- return x % -14007;
+ int a;
+ char b;
+ long c;
}
-int mremquo10(int x)
+struct Foo3
{
- return (x / -10) | (x % -10);
+ int a;
+ align (1) char b;
+ long c;
}
-int mremquo14(int x)
+struct Foo4
{
- return (x / -14) | (x % -14);
+ int a;
+ struct { char b; }
+ long c;
}
-int mremquo14007(int x)
+void testsizes()
{
- return (x / -14007) | (x % -14007);
-}
+ printf("%zd\n", Foo1.sizeof);
+ assert(Foo1.a.offsetof == 0);
+ assert(Foo1.b.offsetof == 4);
+ assert(Foo1.c.offsetof == 5);
+ assert(Foo1.sizeof == 13);
-////////////////////
+ assert(Foo2.a.offsetof == 0);
+ assert(Foo2.b.offsetof == 4);
+ assert(Foo2.c.offsetof == 8);
+ assert(Foo2.sizeof == 16);
+ assert(Foo3.a.offsetof == 0);
+ assert(Foo3.b.offsetof == 4);
+ assert(Foo3.c.offsetof == 8);
+ assert(Foo3.b.sizeof == 1);
+ assert(Foo3.sizeof == 16);
-long ldiv10(long x)
-{
- return x / 10;
+ assert(Foo4.sizeof == 16);
}
-long ldiv14(long x)
-{
- return x / 14;
-}
+///////////////////////
-long ldiv14007(long x)
+size_t cond11565(size_t val)
{
- return x / 14007;
+ return val ? size_t.max : 0;
}
-long lmod10(long x)
+void test11565()
{
- return x % 10;
+ assert(cond11565(true) == size_t.max);
}
-long lmod14(long x)
-{
- return x % 14;
-}
+///////////////////////
-long lmod14007(long x)
-{
- return x % 14007;
-}
+int[3] array1 = [1:1,2,0:3];
-long lremquo10(long x)
+void testarrayinit()
{
- return (x / 10) | (x % 10);
+ assert(array1[0] == 3);
+ assert(array1[1] == 1);
+ assert(array1[2] == 2);
}
-long lremquo14(long x)
-{
- return (x / 14) | (x % 14);
-}
+///////////////////////
-long lremquo14007(long x)
+void test13023(ulong n)
{
- return (x / 14007) | (x % 14007);
+ static void func(bool b) {}
+
+ ulong k = 0;
+
+ func(k >= n / 2);
+
+ if (k >= n / 2)
+ assert(0);
}
+///////////////////////
-////////////////////
+struct U { int a; union { char c; int d; } long b; }
+U f = { b:3, d:0x22222222, a:1 };
-long mldiv10(long x)
+void testU()
{
- return x / -10;
+ assert(f.b == 3);
+ assert(f.d == 0x22222222);
+ assert(f.c == 0x22);
+ assert(f.a == 1);
+ assert(f.sizeof == 16);
+ assert(U.sizeof == 16);
}
-long mldiv14(long x)
-{
- return x / -14;
-}
-long mldiv14007(long x)
-{
- return x / -14007;
-}
+////////////////////////////////////////////////////////////////////////
-long mlmod10(long x)
-{
- return x % -10;
-}
+void vfunc() {}
-long mlmod14(long x)
+void test12095(int k)
{
- return x % -14;
+ int e = 0;
+ e ? k || assert(0) : !e || vfunc();
+ e ? k || assert(0) : e && vfunc();
+ !e ? !e || vfunc() : k || assert(0);
}
-long mlmod14007(long x)
-{
- return x % -14007;
-}
-long mlremquo10(long x)
-{
- return (x / -10) | (x % -10);
-}
+////////////////////////////////////////////////////////////////////////
+
-long mlremquo14(long x)
+bool test3918a( float t, real u )
{
- return (x / -14) | (x % -14);
+ printf("%Lf\n", u );
+ return t && u;
}
-long mlremquo14007(long x)
+bool test3918b( real t, float u )
{
- return (x / -14007) | (x % -14007);
+ printf("%Lf\n", t );
+ return t && u;
}
-
-
-void testfastdiv()
+void test3918()
{
- {
- static int x10 = 10;
- static int x14 = 14;
- static int x14007 = 14007;
-
- int u = 10000;
- int r;
- r = div10(u); assert(r == u/x10);
- r = div14(u); assert(r == u/x14);
- r = div14007(u); assert(r == u/x14007);
- r = mod10(u); assert(r == u%x10);
- r = mod14(u); assert(r == u%x14);
- r = mod14007(u); assert(r == u%x14007);
- r = remquo10(u); assert(r == ((u/x10)|(u%x10)));
- r = remquo14(u); assert(r == ((u/x14)|(u%x14)));
- r = remquo14007(u); assert(r == ((u/x14007)|(u%x14007)));
- }
- {
- static int t10 = -10;
- static int t14 = -14;
- static int t14007 = -14007;
-
- int u = 10000;
- int r;
- r = mdiv10(u); assert(r == u/t10);
- r = mdiv14(u); assert(r == u/t14);
- r = mdiv14007(u); assert(r == u/t14007);
- r = mmod10(u); assert(r == u%t10);
- r = mmod14(u); assert(r == u%t14);
- r = mmod14007(u); assert(r == u%t14007);
- r = mremquo10(u); assert(r == ((u/t10)|(u%t10)));
- r = mremquo14(u); assert(r == ((u/t14)|(u%t14)));
- r = mremquo14007(u); assert(r == ((u/t14007)|(u%t14007)));
- }
- {
- static long y10 = 10;
- static long y14 = 14;
- static long y14007 = 14007;
-
- long u = 10000;
- long r;
- r = ldiv10(u); assert(r == u/y10);
- r = ldiv14(u); assert(r == u/y14);
- r = ldiv14007(u); assert(r == u/y14007);
- r = lmod10(u); assert(r == u%y10);
- r = lmod14(u); assert(r == u%y14);
- r = lmod14007(u); assert(r == u%y14007);
- r = lremquo10(u); assert(r == ((u/y10)|(u%y10)));
- r = lremquo14(u); assert(r == ((u/y14)|(u%y14)));
- r = lremquo14007(u); assert(r == ((u/y14007)|(u%y14007)));
- }
- {
- static long z10 = -10;
- static long z14 = -14;
- static long z14007 = -14007;
-
- long u = 10000;
- long r;
- r = mldiv10(u); assert(r == u/z10);
- r = mldiv14(u); assert(r == u/z14);
- r = mldiv14007(u); assert(r == u/z14007);
- r = mlmod10(u); assert(r == u%z10);
- r = mlmod14(u); assert(r == u%z14);
- r = mlmod14007(u); assert(r == u%z14007);
- r = mlremquo10(u); assert(r == ((u/z10)|(u%z10)));
- r = mlremquo14(u); assert(r == ((u/z14)|(u%z14)));
- r = mlremquo14007(u); assert(r == ((u/z14007)|(u%z14007)));
- }
+ assert(test3918a(float.nan, real.nan));
+ assert(test3918b(real.nan, float.nan));
}
////////////////////////////////////////////////////////////////////////
-
T docond1(T)(T l, ubyte thresh, ubyte val) {
l += (thresh < val);
return l;
@@ -1041,25 +1008,6 @@ void testshrshl()
////////////////////////////////////////////////////////////////////////
-struct S1
-{
- cdouble val;
-}
-
-void formatTest(S1 s, double re, double im)
-{
- assert(s.val.re == re);
- assert(s.val.im == im);
-}
-
-void test10639()
-{
- S1 s = S1(3+2.25i);
- formatTest(s, 3, 2.25);
-}
-
-////////////////////////////////////////////////////////////////////////
-
bool bt10715(in uint[] ary, size_t bitnum)
{
return !!(ary[bitnum >> 5] & 1 << (bitnum & 31)); // uses bt
@@ -1245,6 +1193,19 @@ void test9449()
if (arr[0].g != 4.0) assert(0);
}
+struct Point9449x
+{
+ float f = 0.0;
+ double g = 0.0;
+}
+
+void test9449x()
+{
+ Point9449x[1] arr;
+ if (arr[0].f != 0.0) assert(0);
+ if (arr[0].g != 0.0) assert(0);
+}
+
////////////////////////////////////////////////////////////////////////
// https://issues.dlang.org/show_bug.cgi?id=12057
@@ -1351,18 +1312,6 @@ void test14829()
////////////////////////////////////////////////////////////////////////
-void test2()
-{
- void test(cdouble v)
- {
- auto x2 = cdouble(v);
- assert(x2 == v);
- }
- test(1.2+3.4i);
-}
-
-////////////////////////////////////////////////////////////////////////
-
void test3()
{
int[6] a;
@@ -1374,7 +1323,7 @@ void test3()
}
////////////////////////////////////////////////////////////////////////
-// 14782
+// https://issues.dlang.org/show_bug.cgi?id=14782
void test14782()
@@ -1477,7 +1426,7 @@ void test4()
double sumKBN(double s = 0.0)
{
- import std.math : fabs;
+ import core.math : fabs;
double c = 0.0;
foreach(double x; [1, 1e100, 1, -1e100])
{
@@ -1547,35 +1496,6 @@ void test16102()
////////////////////////////////////////////////////////////////////////
-
-/* Test the pattern:
- * replace ((i / C1) / C2) with (i / (C1 * C2))
- * when e1 is 0 or 1 and (i2-i1) is a power of 2.
- */
-
-void divdiv(T, T C1, T C2)(T i)
-{
- auto a = (i / C1) / C2;
- auto b = i / (C1 * C2);
- if (a != b) assert(0);
-}
-
-void testdivdiv()
-{
- divdiv!(int,10,20)(30);
- divdiv!(uint,10,20)(30);
- divdiv!(long,10,20)(30);
- divdiv!(ulong,10,20)(30);
-
- divdiv!(int,-10,20)(30);
- divdiv!(long,-10,20)(30);
-
- divdiv!(int,-10,-20)(-30);
- divdiv!(long,-10,-20)(-30);
-}
-
-////////////////////////////////////////////////////////////////////////
-
void test5a(ulong x, ulong y)
{
int a;
@@ -1663,8 +1583,904 @@ void testeqeqranges()
////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=16189
+
+void test16189()
+{
+ ubyte[9][1] data;
+ uint a = 0;
+ loop:
+ data[0] = data[a];
+ a--;
+ bool b = false;
+ if (b) goto loop;
+ assert(a == -1); // was failing with -O
+}
+
+
+////////////////////////////////////////////////////////////////////////
+
+// https://issues.dlang.org/show_bug.cgi?id=16997
+
+void test16997()
+{
+ /* Exhaustively test all signed and unsigned byte promotions for
+ * - + and ~
+ */
+ for (int i = 0; i < 256; ++i)
+ {
+ ubyte c = cast(ubyte)i;
+
+ int i1 = cast(int)(~c);
+ int i2 = cast(int)(~cast(int)c);
+
+ //printf("%d, %d\n", i1, i2);
+ assert(i1 == i2);
+
+ i1 = cast(int)(+c);
+ i2 = cast(int)(+cast(int)c);
+ assert(i1 == i2);
+
+ i1 = cast(int)(-c);
+ i2 = cast(int)(-cast(int)c);
+ assert(i1 == i2);
+ }
+
+ for (int i = 0; i < 256; ++i)
+ {
+ byte c = cast(byte)i;
+
+ int i1 = cast(int)(~c);
+ int i2 = cast(int)(~cast(int)c);
+
+ //printf("%d, %d\n", i1, i2);
+ assert(i1 == i2);
+
+ i1 = cast(int)(+c);
+ i2 = cast(int)(+cast(int)c);
+ assert(i1 == i2);
+
+ i1 = cast(int)(-c);
+ i2 = cast(int)(-cast(int)c);
+ assert(i1 == i2);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void test18315() // https://issues.dlang.org/show_bug.cgi?id=18315
+{
+ int i = int.min;
+ bool b = i > 0;
+ assert(!b);
+ b = 0 < i;
+ assert(!b);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+// https://issues.dlang.org/show_bug.cgi?id=18461
+
+void test18461()
+{
+ import core.bitop;
+
+ size_t test_val = 0b0001_0000;
+
+ if (bt(&test_val, 4) == 0)
+ assert(false);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void test18730() // https://issues.dlang.org/show_bug.cgi?id=18730
+{
+ static if (size_t.sizeof == 8)
+ {
+ static int bt18730_64_64(in ulong* p, ulong bitnum) pure @system
+ {
+ return ((p[bitnum >> 6] & (1L << (bitnum & 63)))) != 0;
+ }
+ static int bt18730_64_32(in ulong* p, uint bitnum) pure @system
+ {
+ return ((p[bitnum >> 6] & (1L << (bitnum & 63)))) != 0;
+ }
+ static int bt18730_32_64(in uint* p, ulong bitnum) pure @system
+ {
+ return ((p[bitnum >> 5] & (1 << (bitnum & 31)))) != 0;
+ }
+
+ // Check that bt_64_64 uses a 64-bit register for the offset.
+ {
+ enum bitIndex = int.max + 1L;
+ auto a = new ulong[](bitIndex / 64 + 1);
+ a[bitIndex / 64] = 1;
+ assert(bt18730_64_64(a.ptr, bitIndex));
+ assert(!bt18730_64_64(a.ptr, bitIndex + 1));
+ assert(!bt18730_64_64(a.ptr, bitIndex - 1));
+ }
+ // Check that bt_64_32 uses a 32-bit register for the offset.
+ {
+ static int f(ulong* p, ulong bitnum)
+ {
+ return bt18730_64_32(p, cast(uint) bitnum);
+ }
+ enum bitIndex = uint.max + 1L;
+ assert(cast(uint) bitIndex == 0);
+ ulong s = 1;
+ assert(f(&s, bitIndex));
+ }
+ /* Check that bt_32_64 does not become a 64-bit bt instruction. Would lead
+ to a segfault when trying to load 8 bytes while only 4 are accessible. */
+ version (Posix)
+ {{
+ import core.sys.posix.sys.mman;
+ import core.sys.posix.unistd;
+ // Allocate two pages.
+ immutable sz = 2 * sysconf(_SC_PAGESIZE);
+ auto m = mmap(null, sz, PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0);
+ // Discard the higher page. It becomes unreadable.
+ munmap(m + sz / 2, sz / 2);
+ // Try looking at the last 4 bytes of the readable page.
+ uint* p = cast(uint*) (m + sz / 2 - uint.sizeof);
+ bt18730_32_64(p, 0);
+ munmap(m, sz / 2); // Free the readable page.
+ }}
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void test19497() // https://issues.dlang.org/show_bug.cgi?id=19497
+{
+ {
+ ubyte[1024] data;
+ ushort* ushortPtr = cast(ushort*) data.ptr;
+ *ushortPtr++ = 0xfe00;
+ printf("ushortPtr(%p)\n", ushortPtr);
+ fflush(stdout);
+ }
+
+ alias Seq(stuff ...) = stuff;
+ static foreach (T; Seq!(ubyte, ushort, uint, ulong, byte, short, int, long))
+ {{
+ T[2] data = 0x2A;
+ T* q = &data[0];
+ *q++ = cast(T) 0x1122334455667788;
+ if (*q != 0x2A) assert(false);
+ }}
+
+ {
+ static int toStringz(string s) { return s.length > 0 ? s[0] : 0; }
+ static void toAStringz(in string[] a, int* az)
+ {
+ foreach (string s; a)
+ {
+ *az++ = toStringz(s);
+ }
+ }
+ string[1] sa = ["abc"];
+ int[2] tgt = 0x2a;
+ toAStringz(sa[], tgt.ptr);
+ if (tgt[0] != 'a') assert(false);
+ if (tgt[1] != 0x2a) assert(false);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+
+// https://issues.dlang.org/show_bug.cgi?id=18794
+
+bool method18794(size_t* p)
+{
+ int bitIdx = 0;
+ func18794();
+ return (*p & (1UL << bitIdx)) != 0;
+}
+
+void func18794() {}
+
+void prep18794()
+{
+ asm {}
+ ulong[2] x = -1;
+}
+
+void test18794()
+{
+ prep18794();
+ size_t s;
+ method18794(&s);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+/* Test the optimization
+ * (e1+c)-e2 => (e1-e2)+c
+ */
+
+void testelmin()
+{
+ static void foo(int i)
+ {
+ static ubyte[4] bar()
+ {
+ ubyte[4] array;
+ foreach (i, ref a; array)
+ a = cast(ubyte)(i + 1);
+ return array;
+ }
+
+ static void test(int i, ubyte* p)
+ {
+ foreach (j; 0 .. 4)
+ assert(p[i * 4 + j] == j + 1);
+ }
+
+ ubyte[32] data;
+ data[i*4..(i+1)*4] = bar(); // optimize to single MOV
+
+ test(i, data.ptr);
+ }
+
+ foo(4);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+const(char)* fastpar(string s)
+{
+ return s.ptr + s.length;
+}
+
+void testfastpar()
+{
+ string s = "abcde";
+ auto p = fastpar(s);
+ assert(*p == 0);
+}
+
+////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=20363
+
+ulong foo20363(double d)
+{
+ ulong u = * cast(ulong*) &d;
+ return (u >> 1) & 1;
+}
+
+void test20363()
+{
+ ulong u = 0b10;
+ if (foo20363(*cast(double*) &u) == 0)
+ assert(false);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+
+T testfooa(T)(T value)
+{
+ return 10 - (value * 57); // gets rewritten into (value*-57)+10
+}
+
+T testfoob(T)(T value)
+{
+ return (value * -57) + 10;
+}
+
+void testNegConst()
+{
+ assert(testfooa(1) == -47);
+ assert(testfoob(1) == -47);
+ assert(testfooa(1.0) == -47);
+ assert(testfoob(1.0) == -47);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+// https://issues.dlang.org/show_bug.cgi?id=16317
+
+int add8ret3(ref int s)
+{
+ s += 8;
+ return 3;
+}
+
+int binAdd(int val)
+{
+ val = val + add8ret3(val);
+ return val;
+}
+
+void test16317()
+{
+ assert(binAdd(1) == (1 + 3));
+ static assert(binAdd(1) == (1 + 3));
+}
+
+////////////////////////////////////////////////////////////////////////
+
+// https://issues.dlang.org/show_bug.cgi?id=20050
+
+int test20050_g = 0;
+void test20050_impure_function_1() { ++test20050_g; }
+void function() test20050_get_impure_function() pure
+{
+ static void impure_function_2()
+ {
+ ++test20050_g;
+ test20050_impure_function_1();
+ }
+ return &impure_function_2;
+}
+void test20050()
+{
+ auto f = test20050_get_impure_function();
+ f();
+ assert(test20050_g == 2);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+// https://github.com/dlang/dmd/pull/11238
+
+int testCpStatic1(int y)
+{
+ __gshared int yyy = 7;
+ auto x = yyy; // no copy-propagation
+ if (y)
+ return x;
+ return x + 3;
+}
+
+void testCpStatic()
+{
+ assert(testCpStatic1(1) == 7);
+ assert(testCpStatic1(0) == 10);
+}
+
+////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=20991
+
+int x7;
+
+void bar7(int i)
+{
+ assert(i == x7);
+ ++x7;
+}
+
+void test7()
+{
+ for (int i = 0; i <= 1; ++i)
+ bar7(i);
+ assert(x7 == 2);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+// https://github.com/dlang/dmd/pull/11388
+
+ushort byteswap(ushort x) pure
+{
+ // Should be detected and XCHG instruction generated
+ return cast(ushort) (((x >> 8) & 0xFF) | ((x << 8) & 0xFF00u));
+}
+
+void testbyteswap()
+{
+ assert(byteswap(0xF234) == 0x34F2);
+ static ushort xx = 0xF234;
+ assert(byteswap(xx) == 0x34F2);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+// These should all be recognized by the compiler and generate ROL or ROR
+// instructions.
+
+uint rol32(uint x, uint n)
+{
+ return (x << n) | (x >> (32 - n));
+}
+
+uint ror32(uint x, uint n)
+{
+ return (x >> n) | (x << (32 - n));
+}
+
+ulong rol64(ulong x, uint n)
+{
+ return (x << n) | (x >> (64 - n));
+}
+
+ulong ror64(ulong x, uint n)
+{
+ return (x >> n) | (x << (64 - n));
+}
+
+void testrolror()
+{
+ assert(ror32(0x0123_4567u, 4) == 0x7012_3456);
+ assert(rol32(0x7012_3456u, 4) == 0x0123_4567);
+
+ assert(ror64(0x0123_4567_89AB_CDEFuL, 4) == 0xF012_3456_789A_BCDE);
+ assert(rol64(0xF012_3456_789A_BCDEuL, 4) == 0x0123_4567_89AB_CDEF);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+// https://issues.dlang.org/show_bug.cgi?id=20162
+
+void test20162()
+{
+ static long f(long a)
+ {
+ assert(a == -1L);
+ return a;
+ }
+
+ foreach (i; 1 .. 2)
+ {
+ foreach (j; 0 .. 2)
+ {
+ printf("%d %d %llx\n", i,
+ ((i != 0) ? -1 : +1),
+ f((i != 0) ? -1 : +1));
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=3713
+
+int star1(int i)
+{
+ return i ? star1(i - 1) : 0;
+}
+
+int star2(int i)
+{
+ return i == 0 ? 0 : star2(i - 1);
+}
+
+int star3(int i)
+{
+ if (i == 0)
+ return 0;
+ return i == 2 ? star3(i - 2) : star3(i - 1);
+}
+
+int star4(int i)
+{
+ return (i == 0) ? 0
+ : i != 2 ? star4(i - 1)
+ : star4(i - 2);
+}
+
+void test3713()
+{
+ assert(star1(10) == 0);
+ assert(star2(10) == 0);
+ assert(star3(10) == 0);
+ assert(star4(10) == 0);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void testsbbrex()
+{
+ // special code is generated for these two cases
+ static long foolt(dchar c)
+ {
+ return c < 0x10000 ? 1 : 2;
+ }
+
+ static long fooge(uint c)
+ {
+ return c >= 0x10000 ? 1L : 2L;
+ }
+
+ assert(foolt(0) == 1);
+ assert(foolt(0x10000) == 2);
+ assert(fooge(0) == 2);
+ assert(fooge(0x10000) == 1);
+}
+
+
+////////////////////////////////////////////////////////////////////////
+
+// https://issues.dlang.org/show_bug.cgi?id=19846
+
+alias Void = byte[0];
+static immutable Void VOID; // = [];
+
+__gshared int x19846;
+
+Void print19846()
+{
+ //printf("This should print\n");
+ x19846 = 3;
+ return VOID;
+}
+
+Void identity19846(Void value, out int i)
+{
+ i = 7;
+ return value;
+}
+
+void test19846()
+{
+ int i;
+ identity19846(print19846(), i);
+ //printf("i = %d\n", i);
+ assert(x19846 == 3);
+ assert(i == 7);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+// Some tests for OPmemcpy
+
+enum N = 128;
+
+ubyte[N] def()
+{
+ ubyte[N] array;
+ foreach (i, ref a; array)
+ a = cast(ubyte)(i + 1);
+ return array;
+}
+
+
+void ghi(ubyte* p)
+{
+ foreach (i; 0 .. N)
+ assert(p[i] == i + 1);
+}
+
+void testmemcpy()
+{
+ ubyte[N] bits;
+ ubyte[N] bits2;
+ bits2[0..N] = bits[0..N] = def();
+ ghi(bits.ptr);
+ ghi(bits2.ptr);
+
+ __gshared size_t n = N;
+ ubyte[N] bits3;
+ ubyte[N] bits4;
+ bits4[0..n] = bits3[0..n] = def();
+ ghi(bits3.ptr);
+ ghi(bits4.ptr);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+
+/* Test all the cases of uses of LEA for multiplication by a constant
+ */
+
+T testlea(uint C, T)(T x, T y)
+{
+ y = y * C; // cdmul()
+ x *= C; // cdmulass()
+ return x + y;
+}
+
+void testleax(uint C)(uint X, uint Y)
+{
+ assert(testlea!C(X,Y) == C * (X + Y));
+ assert(testlea!C(cast(long)X,cast(long)Y) == cast(long)C*X + cast(long)C*Y);
+}
+
+void testMulLea()
+{
+ testleax!3(10,11);
+ testleax!5(10,11);
+ testleax!6(10,11);
+ testleax!9(10,11);
+
+ testleax!10(10,11);
+ testleax!12(10,11);
+ testleax!18(10,11);
+ testleax!20(10,11);
+ testleax!24(10,11);
+ testleax!36(10,11);
+ testleax!40(10,11);
+ testleax!72(10,11);
+
+ testleax!37(10,11);
+ testleax!74(10,11);
+ testleax!13(10,11);
+ testleax!26(10,11);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+/* Test *= of register pair
+ */
+
+void testMulAssPair()
+{
+ static ulong pow(ulong x, int m)
+ {
+ ulong v = x;
+ ulong p = 1;
+ while (1)
+ {
+ if (m & 1)
+ p *= v;
+ m >>= 1;
+ if (!m)
+ break;
+ v *= v;
+ }
+ return p;
+ }
+
+ enum ulong e_10_pow_19 = 10uL^^19;
+ assert(e_10_pow_19 == pow(10uL, 19));
+}
+
+////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=21038
+
+const(wchar)* x21038 = "xz";
+const(dchar)* name21038 = "abcd";
+
+void test21038()
+{
+ assert((cast(size_t) x21038) % wchar.sizeof == 0);
+ assert((cast(size_t) name21038) % dchar.sizeof == 0);
+}
+
+////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=21325
+
+real f21325(const real x) pure @safe nothrow @nogc
+{
+ return (x != 0.0L) ? x : real.nan;
+}
+
+void test21325() @safe
+{
+ ulong x = 0uL;
+ while(true)
+ {
+ const y = f21325(x); // should set y to real.nan
+
+ assert(y != y);
+
+ if (++x)
+ return; // good
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=16274
+
+extern(C) int pair(short a, ushort b, byte c, ubyte d);
+
+struct S
+{
+ // provide alternate implementation of .pair()
+ pragma(mangle, "pair")
+ extern(C) static void pair(int a, int b, int c, int d)
+ {
+ //printf("%d %d %d %d\n", a, b, c, d);
+ assert(a == -1);
+ assert(b == 2);
+ assert(c == -3);
+ assert(d == 4);
+ }
+}
+
+void test16274()
+{
+ version (X86_64)
+ pair(-1, 2, -3, 4);
+ version (X86)
+ pair(-1, 2, -3, 4);
+}
+
+////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=16268
+
+void test16268()
+{
+ static void f(byte x)
+ {
+ for (byte i = 0; i <= x && i >= 0; ++i)
+ {
+ assert(i >= 0);
+ assert(i != -1);
+ //printf("%d\n", i);
+ }
+ }
+
+ f(byte.max);
+}
+
+////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=11435
+
+void test11435a()
+{
+ alias T = byte;
+
+ static void fun(T c, T b, int v)
+ {
+ }
+
+ static void abc(T[] b)
+ {
+ fun(b[0], b[1], 0);
+ }
+
+ version(Windows)
+ {
+ import core.sys.windows.windows;
+ auto p = VirtualAlloc(null, 4096, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
+ }
+ else
+ {
+ import core.sys.posix.sys.mman;
+ auto p = mmap(null, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0L);
+ }
+ assert(p);
+ auto px = (cast(T*)(p + 4096 - 2 * T.sizeof));
+ abc(px[0..2]);
+}
+
+void test11435b()
+{
+ import core.sys.windows.windows;
+ alias T = short;
+
+ static void fun(T c, T b, int v)
+ {
+ }
+
+ static void abc(T[] b)
+ {
+ fun(b[0], b[1], 0);
+ }
+
+ version(Windows)
+ {
+ import core.sys.windows.windows;
+ auto p = VirtualAlloc(null, 4096, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
+ }
+ else
+ {
+ import core.sys.posix.sys.mman;
+ auto p = mmap(null, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0L);
+ }
+ assert(p);
+ auto px = (cast(T*)(p + 4096 - 2 * T.sizeof));
+ abc(px[0..2]);
+}
+
+////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=21513
+
+struct Stuff
+{
+ size_t c; // declare after items and not crash !
+ ubyte[1] items;
+}
+
+void grow(ref Stuff stuff)
+{
+ with (stuff)
+ {
+ const oldCapacity = c;
+ items.ptr[0..oldCapacity] = items.ptr[0..0]; // use literal 0 instead of
+ items.ptr[0] = 0; // oldcapacity and no crash !
+ }
+}
+
+void test21513()
+{
+ Stuff stuff;
+ grow(stuff);
+}
+
+////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=21526
+
+double f21256(double a, double b) {
+ double c = a + b;
+ return c;
+}
+
+void test21256()
+{
+ union DX
+ {
+ double d;
+ ulong l;
+ }
+
+ DX a, b;
+ a.l = 0x4341c37937e08000;
+ b.l = 0x4007ffcb923a29c7;
+
+ DX r;
+ r.d = f21256(a.d, b.d);
+ //if (r.d != 0x1.1c37937e08001p+53)
+ //printf("r = %A should be 0x1.1c37937e08001p+53 %A\n", r.d, 0x1.1c37937e08001p+53);
+ //assert(r == 0x1.1c37937e08001p+53);
+
+ // cannot seem to get the two to produce the same value
+ assert(r.l == 0x4341c37937e08001 || // value using XMM
+ r.l == 0x4341c37937e08002); // value using x87
+}
+
+////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=21816
+
+bool test21816a(float t)
+{
+ return cast(bool)t;
+}
+
+void test21816()
+{
+ assert(test21816a(float.nan));
+}
+
+////////////////////////////////////////////////////////////////////////
+// https://issues.dlang.org/show_bug.cgi?id=21835
+
+struct Point21835
+{
+ float f = 3.0;
+ double d = 4.0;
+ real r = 5.0;
+}
+
+void test21835y()
+{
+ Point21835[1] arr;
+ if (arr[0].f != 3.0) assert(0);
+ if (arr[0].d != 4.0) assert(0);
+ if (arr[0].r != 5.0) assert(0);
+}
+
+struct Point21835x
+{
+ float f = 0.0;
+ double d = 0.0;
+ real r = 0.0;
+}
+
+void test21835()
+{
+ test21835y();
+ Point21835x[1] arr;
+ if (arr[0].f != 0.0) assert(0);
+ if (arr[0].d != 0.0) assert(0);
+ if (arr[0].r != 0.0) assert(0);
+}
+
+////////////////////////////////////////////////////////////////////////
+
int main()
{
+ // All the various integer divide tests
+ testsdiv2();
+ testulldiv();
+ testfastudiv();
+ testsldiv();
+ testslmod();
+ testfastdiv();
+ testdivdiv();
+ testdivcmp();
+
testgoto();
testswitch();
testdo();
@@ -1675,11 +2491,8 @@ int main()
testsizes();
testarrayinit();
testU();
- testulldiv();
testbittest();
test8658();
- testfastudiv();
- testfastdiv();
test3918();
test12051();
testdocond();
@@ -1695,18 +2508,17 @@ int main()
test13190();
test13485();
test14436();
- test10639();
test10715();
test10678();
test7565();
test13023(0x10_0000_0000);
test12833();
test9449();
+ test9449x();
test12057();
test13784();
test14220();
test14829();
- test2();
test3();
test14782();
test14987();
@@ -1717,10 +2529,44 @@ int main()
test13474();
test16699();
test16102();
- testdivdiv();
test5();
test6();
testeqeqranges();
+ test16189();
+ test16997();
+ test18315();
+ test18461();
+ test18730();
+ test19497();
+ test18794();
+ testelmin();
+ testfastpar();
+ test20363();
+ testNegConst();
+ test16317();
+ test20050();
+ testCpStatic();
+ test7();
+ testbyteswap();
+ testrolror();
+ test20162();
+ test3713();
+ testsbbrex();
+ test19846();
+ testmemcpy();
+ testMulLea();
+ testMulAssPair();
+ test21038();
+ test21325();
+ test16274();
+ test16268();
+ test11435a();
+ test11435b();
+ test21513();
+ test21256();
+ test21816();
+ test21835();
+
printf("Success\n");
return 0;
}
diff --git a/gcc/testsuite/gdc.test/runnable/minimal.d b/gcc/testsuite/gdc.test/runnable/minimal.d
new file mode 100644
index 0000000..2f2df71
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/minimal.d
@@ -0,0 +1,8 @@
+// DFLAGS:
+// PERMUTE_ARGS:
+// REQUIRED_ARGS: -defaultlib=
+// EXTRA_SOURCES: extra-files/minimal/object.d
+
+// This test ensures an empty main can be built and executed with a minimal runtime
+
+void main() { }
diff --git a/gcc/testsuite/gdc.test/runnable/minimal2.d b/gcc/testsuite/gdc.test/runnable/minimal2.d
new file mode 100644
index 0000000..7319463
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/minimal2.d
@@ -0,0 +1,46 @@
+// DFLAGS:
+// REQUIRED_ARGS: -defaultlib=
+// EXTRA_SOURCES: extra-files/minimal/object.d
+
+// This test ensures that interfaces and classes can be used in a minimal
+// runtime as long as they only contain shared static members. Non-shared
+// static members would require a thread-local storage (TLS) implementation.
+
+interface I
+{
+ shared static int i;
+}
+
+class A : I
+{
+ shared static int a;
+}
+
+class B : A
+{
+ shared static int b;
+
+ static int sumAll()
+ {
+ return b + a + i;
+ }
+}
+
+void poorMansAssert(bool condition)
+{
+ if (!condition)
+ {
+ static char* hlt;
+ *hlt = 0;
+ }
+}
+
+void main()
+{
+ B.i = 32;
+ B.a = 42;
+ B.b = 52;
+
+ poorMansAssert(B.i == 32 || B.a == 42 || B.b == 52);
+ poorMansAssert(B.sumAll() == (32 + 42 + 52));
+}
diff --git a/gcc/testsuite/gdc.test/runnable/mixin1.d b/gcc/testsuite/gdc.test/runnable/mixin1.d
index 9d88fbd..d8b5516 100644
--- a/gcc/testsuite/gdc.test/runnable/mixin1.d
+++ b/gcc/testsuite/gdc.test/runnable/mixin1.d
@@ -1,7 +1,61 @@
-// RUNNABLE_PHOBOS_TEST
+/*
+TEST_OUTPUT:
+---
+runnable/mixin1.d(948): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+---
+
+RUN_OUTPUT:
+---
+Foo3.func()
+Code3.func()
+Foo4.func()
+Foo5.func()
+b.x = 5
+x = 5
+duff_for(1, 11)
+fid = 1, 2
+foo12
+foo12
+foo13 j = 1
+foo13 j = 1
+x14 = 6
+x15 = 6
+bar15() = 5
+x16 = 6
+bar() = 5
+x17 = 5
+b.x17 = 5
+x17 = 3
+x17 = 5
+x17 = 4
+x17 = 3
+x17 = 5
+in C20.f()
+B22.foo()
+5
+5
+a = 0
+int
+int
+int
+int
+foo 1
+foo 2
+0 0
+two
+one
+one
+Class39 dtor
+Mixed-in dtor
+Mixed-in dtor
+Base39 dtor
+Success
+---
+*/
+
module mixin1;
-import std.stdio;
+import core.stdc.stdio;
alias TypeTuple(T...) = T;
@@ -680,7 +734,11 @@ class A30
{
this(Type[] arr)
{
- foreach(Type v; arr) writeln(typeid(typeof(v)));
+ foreach(Type v; arr)
+ {
+ const str = typeid(typeof(v)).toString();
+ printf("%.*s\n", cast(int)str.length, str.ptr);
+ }
}
}
@@ -744,11 +802,6 @@ template T33( int i )
printf("foo %d\n", i );
return i;
}
- int opCall()
- {
- printf("opCall %d\n", i );
- return i;
- }
}
@@ -766,10 +819,6 @@ void test33()
assert(i == 1);
i = c1.t2.foo();
assert(i == 2);
- i = c1.t1();
- assert(i == 1);
- i = c1.t2();
- assert(i == 2);
}
@@ -825,7 +874,6 @@ struct Foo36
void test36()
{
Foo36 f;
- printf("f.sizeof = %d\n", f.sizeof);
assert(f.sizeof == 12);
f.a = 1;
@@ -932,7 +980,7 @@ class Class39 : Base39
void test39()
{
- auto test = new Class39;
+ scope test = new Class39;
}
@@ -974,7 +1022,7 @@ void test41()
}
/*******************************************/
-// 2245
+// https://issues.dlang.org/show_bug.cgi?id=2245
template TCALL2245a(ARGS...)
{
@@ -1044,7 +1092,7 @@ void test2245()
}
/*******************************************/
-// 2481
+// https://issues.dlang.org/show_bug.cgi?id=2481
template M2481() { int i; }
class Z2481a { struct { mixin M2481!(); } }
@@ -1058,7 +1106,7 @@ void test2481()
}
/*******************************************/
-// 2740
+// https://issues.dlang.org/show_bug.cgi?id=2740
interface IFooable2740
{
@@ -1144,7 +1192,7 @@ void test42()
}
/*******************************************/
-// 7744
+// https://issues.dlang.org/show_bug.cgi?id=7744
class ZeroOrMore7744(Expr)
{
@@ -1165,7 +1213,7 @@ mixin(q{
});
/*******************************************/
-// 8032
+// https://issues.dlang.org/show_bug.cgi?id=8032
mixin template T8032()
{
@@ -1193,7 +1241,7 @@ class B8032b : A8032b
}
/*********************************************/
-// 9417
+// https://issues.dlang.org/show_bug.cgi?id=9417
mixin template Foo9417()
{
@@ -1209,7 +1257,7 @@ void test9417()
}
/*******************************************/
-// 11487
+// https://issues.dlang.org/show_bug.cgi?id=11487
template X11487()
{
@@ -1236,7 +1284,7 @@ class C11487
}
/*******************************************/
-// 11767
+// https://issues.dlang.org/show_bug.cgi?id=11767
mixin template M11767()
{
@@ -1262,7 +1310,7 @@ void test11767()
}
/*******************************************/
-// 12023
+// https://issues.dlang.org/show_bug.cgi?id=12023
void Delete12023(Object obj) {}
@@ -1303,7 +1351,7 @@ void test12023()
}
/*******************************************/
-// 14243
+// https://issues.dlang.org/show_bug.cgi?id=14243
mixin template Mix14243a(int n)
{
@@ -1397,7 +1445,7 @@ int test14243()
static assert(test14243()); // changed to be workable
/*******************************************/
-// 10492
+// https://issues.dlang.org/show_bug.cgi?id=10492
class TestClass10492 {}
diff --git a/gcc/testsuite/gdc.test/runnable/mixin2.d b/gcc/testsuite/gdc.test/runnable/mixin2.d
index 26a2352..7679bbe 100644
--- a/gcc/testsuite/gdc.test/runnable/mixin2.d
+++ b/gcc/testsuite/gdc.test/runnable/mixin2.d
@@ -1,4 +1,4 @@
-/* RUNNABLE_PHOBOS_TEST
+/*
TEST_OUTPUT:
---
hello
@@ -31,7 +31,7 @@ hey
Success
---
*/
-import std.stdio;
+import core.stdc.stdio;
/*********************************************/
@@ -53,7 +53,7 @@ void test2()
mixin("
int x = 3;
for (int i = 0; i < 10; i++)
- writeln(x + i, ++j);
+ printf(\"%d%d\n\", x + i, ++j);
");
assert(j == 10);
}
@@ -64,7 +64,7 @@ mixin("int abc3 = 5;");
void test3()
{
- writeln(abc3);
+ printf("%d\n", abc3);
assert(abc3 == 5);
}
@@ -73,24 +73,24 @@ void test3()
mixin("
void test4()
{
- writeln(\"test4\");
+ printf(\"test4\n\");
" ~ "}");
/*********************************************/
int x5;
-scope class Foo5
+class Foo5
{
this ()
{
- writeln ("Constructor");
+ printf ("Constructor\n");
assert(x5 == 0);
x5++;
}
~this ()
{
- writeln ("Destructor");
+ printf ("Destructor\n");
assert(x5 == 2);
x5++;
}
@@ -100,7 +100,7 @@ void test5()
{
{
mixin ("scope Foo5 f = new Foo5;\n");
- writeln (" Inside Scope");
+ printf (" Inside Scope\n");
assert(x5 == 1);
x5++;
}
@@ -194,7 +194,7 @@ void test10()
}
/*********************************************/
-// 7560
+// https://issues.dlang.org/show_bug.cgi?id=7560
class Base7560
{
@@ -213,7 +213,7 @@ class Derived7560 : Base7560
}
/*********************************************/
-// 10577
+// https://issues.dlang.org/show_bug.cgi?id=10577
enum sync10577;
@@ -267,7 +267,7 @@ class derived10577 : base10577
}
/*********************************************/
-// 10583
+// https://issues.dlang.org/show_bug.cgi?id=10583
enum sync10583;
@@ -329,7 +329,7 @@ void test7156()
}
/*********************************************/
-// 7553
+// https://issues.dlang.org/show_bug.cgi?id=7553
template Foo7553()
{
@@ -358,7 +358,7 @@ void test7553()
}
/*********************************************/
-// 13479
+// https://issues.dlang.org/show_bug.cgi?id=13479
mixin template F13479()
{
@@ -392,5 +392,5 @@ void main()
test7156();
test13479();
- writeln("Success");
+ printf("Success\n");
}
diff --git a/gcc/testsuite/gdc.test/runnable/mod1.d b/gcc/testsuite/gdc.test/runnable/mod1.d
index 3efb0cf..46b14ed 100644
--- a/gcc/testsuite/gdc.test/runnable/mod1.d
+++ b/gcc/testsuite/gdc.test/runnable/mod1.d
@@ -1,5 +1,11 @@
-// PERMUTE_ARGS:
-// EXTRA_SOURCES: imports/mod2.d
+/*
+PERMUTE_ARGS:
+EXTRA_SOURCES: imports/mod2.d
+RUN_OUTPUT:
+---
+EvilOne
+---
+*/
// mod1.d
diff --git a/gcc/testsuite/gdc.test/runnable/nan.d b/gcc/testsuite/gdc.test/runnable/nan.d
index b229fd5..d4e4ae4 100644
--- a/gcc/testsuite/gdc.test/runnable/nan.d
+++ b/gcc/testsuite/gdc.test/runnable/nan.d
@@ -20,6 +20,43 @@ static assert(!(ed1 <= ed2));
bool b;
+
+T byCTFE(T)()
+{
+ T x;
+ return x;
+}
+
+bool bittst(const ubyte[] ba, uint pos)
+{
+ uint mask = 1 << (pos % 8);
+ version(LittleEndian)
+ return (ba[pos / 8] & mask) != 0;
+ else
+ return (ba[$ - 1 - pos / 8] & mask) != 0;
+}
+
+void test2(T)()
+{
+ T a = T.init, b = T.nan;
+ assert(a is b);
+
+ enum c = byCTFE!T();
+ assert(a is c);
+
+ static if (T.mant_dig == 64 && T.max_exp == 16384)
+ enum size = 10; // x87, exclude padding
+ else
+ enum size = T.sizeof;
+ const pa = (cast(ubyte*) &a)[0 .. size];
+
+ // the highest 2 bits of the mantissa should be set, everything else zero
+ assert(bittst(pa, T.mant_dig - 1));
+ assert(bittst(pa, T.mant_dig - 2));
+ foreach(p; 0..T.mant_dig - 2)
+ assert(!bittst(pa, p));
+}
+
bool test()
{
real r1 = real.nan;
@@ -53,5 +90,8 @@ bool test()
void main()
{
- assert(test());
+ assert(test());
+ test2!float();
+ test2!double();
+ test2!real();
}
diff --git a/gcc/testsuite/gdc.test/runnable/nested.d b/gcc/testsuite/gdc.test/runnable/nested.d
index 6b2fcb0..4c99c59 100644
--- a/gcc/testsuite/gdc.test/runnable/nested.d
+++ b/gcc/testsuite/gdc.test/runnable/nested.d
@@ -863,8 +863,8 @@ class Foo35
//writefln("y = %s", y);
assert(x == 42);
assert(y == 43);
- //static assert(is(typeof(this.outer) == void*)); // Bugzilla 14442
- static assert(is(typeof(this.outer) == Foo35)); // Bugzilla 15839
+ //static assert(is(typeof(this.outer) == void*)); // https://issues.dlang.org/show_bug.cgi?id=14442
+ static assert(is(typeof(this.outer) == Foo35)); // https://issues.dlang.org/show_bug.cgi?id=15839
}
};
}
@@ -1485,7 +1485,20 @@ void test55()
}
/*******************************************/
-// 4401
+
+enum dg56 = delegate { return 5; };
+
+void test56()
+{
+ auto inner() {
+ return dg56();
+ }
+
+ assert(inner() == 5);
+}
+
+/*******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=4401
void test4401()
{
@@ -1542,7 +1555,7 @@ void test7428(){
}
/*******************************************/
-// 4612
+// https://issues.dlang.org/show_bug.cgi?id=4612
struct S4612a(alias x)
{
@@ -1604,7 +1617,7 @@ void test7199()
}
/*******************************************/
-// 7965
+// https://issues.dlang.org/show_bug.cgi?id=7965
void test7965()
{
@@ -1662,7 +1675,7 @@ void test7965a()
}
/*******************************************/
-// 8188
+// https://issues.dlang.org/show_bug.cgi?id=8188
mixin template Print8188(b...)
{
@@ -1687,7 +1700,7 @@ void test8188()
}
/*******************************************/
-// 5082
+// https://issues.dlang.org/show_bug.cgi?id=5082
struct S5082 { float x; }
@@ -1714,7 +1727,7 @@ void test5082()
/*******************************************/
-// 8194
+// https://issues.dlang.org/show_bug.cgi?id=8194
void test8194()
{
@@ -1727,7 +1740,7 @@ void test8194()
}
/*******************************************/
-// 8339
+// https://issues.dlang.org/show_bug.cgi?id=8339
template map8339a(fun...)
{
@@ -1822,7 +1835,7 @@ void test8339c()
}
/*******************************************/
-// 8704
+// https://issues.dlang.org/show_bug.cgi?id=8704
void check8704(T, int num)()
{
@@ -1849,7 +1862,7 @@ void test8704()
}
/*******************************************/
-// 8923
+// https://issues.dlang.org/show_bug.cgi?id=8923
void test8923a()
{
@@ -2029,7 +2042,7 @@ void test8923c()
}
/*******************************************/
-// 9003
+// https://issues.dlang.org/show_bug.cgi?id=9003
void test9003()
{
@@ -2072,7 +2085,7 @@ void test9003()
}
/*******************************************/
-// 9006
+// https://issues.dlang.org/show_bug.cgi?id=9006
void test9006()
{
@@ -2101,7 +2114,7 @@ void test9006()
}
/*******************************************/
-// 9035
+// https://issues.dlang.org/show_bug.cgi?id=9035
void test9035()
{
@@ -2144,7 +2157,7 @@ void test9035a()
}
/*******************************************/
-// 9036
+// https://issues.dlang.org/show_bug.cgi?id=9036
void test9036()
{
@@ -2201,7 +2214,7 @@ void test8863()
+/
/*******************************************/
-// 8774
+// https://issues.dlang.org/show_bug.cgi?id=8774
void popFront8774()
{
@@ -2274,7 +2287,7 @@ void test8832()
}
/*******************************************/
-// 9315
+// https://issues.dlang.org/show_bug.cgi?id=9315
auto test9315()
{
@@ -2287,7 +2300,7 @@ auto test9315()
}
/*******************************************/
-// 9244
+// https://issues.dlang.org/show_bug.cgi?id=9244
void test9244()
{
@@ -2298,7 +2311,7 @@ void test9244()
}
/*******************************************/
-// 10495
+// https://issues.dlang.org/show_bug.cgi?id=10495
struct X10495
{
@@ -2321,7 +2334,7 @@ class C10495
}
/*******************************************/
-// 11385
+// https://issues.dlang.org/show_bug.cgi?id=11385
auto map11385(alias fun, R)(R range)
{
@@ -2354,6 +2367,12 @@ enum foo11297 = function (int x)
xmap!(y => x)(7);
};
+enum goo11297 = delegate (int x)
+ {
+ //int bar(int y) { return x; } xmap!bar(7);
+ xmap!(y => x)(7);
+ };
+
void xreduce(alias f)()
{
f(4);
@@ -2362,10 +2381,11 @@ void xreduce(alias f)()
void test11297()
{
xreduce!foo11297();
+ xreduce!goo11297();
}
/*******************************************/
-// 11886
+// https://issues.dlang.org/show_bug.cgi?id=11886
struct Lambda11886(alias fun)
{
@@ -2388,7 +2408,7 @@ void test11886()
}
/*******************************************/
-// 12234
+// https://issues.dlang.org/show_bug.cgi?id=12234
void test12234()
{
@@ -2407,7 +2427,7 @@ void test12234()
}
/*******************************************/
-// 12981
+// https://issues.dlang.org/show_bug.cgi?id=12981
template Mix12981(T)
{
@@ -2425,7 +2445,7 @@ class B12981
}
/*******************************************/
-// 13861
+// https://issues.dlang.org/show_bug.cgi?id=13861
struct Foo13861(alias f)
{
@@ -2444,7 +2464,7 @@ void test13861()
}
/*******************************************/
-// 14398
+// https://issues.dlang.org/show_bug.cgi?id=14398
void test14398()
{
@@ -2479,7 +2499,7 @@ void test14398()
}
/*******************************************/
-// 14846
+// https://issues.dlang.org/show_bug.cgi?id=14846
void foo14846(Dg)(scope Dg code)
{
@@ -2509,14 +2529,14 @@ void test14846()
}
/*******************************************/
-// 15422
+// https://issues.dlang.org/show_bug.cgi?id=15422
class App15422(T)
{
this() {}
auto test1(T val)
- in {} body // necessary to reproduce the crash
+ in {} do // necessary to reproduce the crash
{
struct Foo
{
@@ -2544,7 +2564,7 @@ class App15422(T)
}
auto test2(T val)
- //in {} body
+ //in {} do
{
int closVar;
struct Foo
@@ -2662,7 +2682,7 @@ void test15422b()
}
/***************************************************/
-// 15757
+// https://issues.dlang.org/show_bug.cgi?id=15757
template map15757(fun...)
{
@@ -2703,6 +2723,45 @@ void test15757() @safe
/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19384
+
+struct Vec
+{
+ uint item;
+
+ ref uint august() return
+ {
+ return item;
+ // commenting next line removes bug
+ foreach(ref val; range()) return val;
+ assert(false);
+ }
+
+ uint* august2() return
+ {
+ return &item;
+ foreach(ref val; range()) return &val;
+ assert(false);
+ }
+}
+
+struct range
+{
+ int opApply(scope int delegate(ref uint) dg) { return 0; }
+}
+
+void test19384()
+{
+ Vec preds = Vec(0xDEAD);
+ void* ptr2 = &preds.august();
+ void* ptr3 = preds.august2();
+ assert(&preds == ptr2);
+ assert(&preds == ptr3);
+}
+
+
+/***************************************************/
+
int main()
{
test1();
@@ -2760,6 +2819,7 @@ int main()
test53();
test54();
test55();
+ test56();
test4401();
test7428();
test4612();
@@ -2797,6 +2857,7 @@ int main()
test15422a();
test15422b();
test15757();
+ test19384();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/newdel.d b/gcc/testsuite/gdc.test/runnable/newdel.d
index 21f7809..3729b2e 100644
--- a/gcc/testsuite/gdc.test/runnable/newdel.d
+++ b/gcc/testsuite/gdc.test/runnable/newdel.d
@@ -1,4 +1,10 @@
// PERMUTE_ARGS:
+/*
+TEST_OUTPUT:
+---
+runnable/newdel.d(46): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+---
+*/
import core.stdc.stdio;
import core.stdc.stdlib;
@@ -9,18 +15,6 @@ class Foo
{
static uint flags;
- new(size_t sz, int x)
- { void* p;
-
- printf("Foo.new(sz = %d, x = %d)\n", sz, x);
- assert(sz == Foo.classinfo.initializer.length);
- assert(x == 5);
-
- p = core.stdc.stdlib.malloc(sz);
- flags |= 4;
- return p;
- }
-
this()
{
printf("this() %p\n", this);
@@ -34,13 +28,6 @@ class Foo
flags |= 1;
}
- delete(void* p)
- {
- printf("delete %p\n", p);
- free(p);
- flags |= 2;
- }
-
int a = 3;
int b = 4;
int d = 56;
@@ -50,61 +37,22 @@ void test1()
{
Foo f;
- f = new(5) Foo;
+ f = new Foo();
assert(f.a == 36);
assert(f.b == 4);
assert(f.d == 56);
- assert(Foo.flags == 4);
-
- delete f;
- assert(Foo.flags == 7);
-}
-
-
-/*********************************************/
-
-struct Foo2
-{
- static uint flags;
-
- new(size_t sz, int x)
- { void* p;
-
- printf("Foo2.new(sz = %d, x = %d)\n", sz, x);
- assert(sz == Foo2.sizeof);
- assert(x == 5);
-
- p = core.stdc.stdlib.malloc(sz);
- flags |= 4;
- return p;
- }
-
- delete(void *p)
- {
- printf("p = %p\n", p);
- flags |= 2;
- core.stdc.stdlib.free(p);
- }
-}
+ assert(Foo.flags == 0);
-void test2()
-{
- Foo2 *f = new(5) Foo2();
-
- printf("f = %p\n", f);
delete f;
- assert(Foo2.flags == 6);
+ assert(Foo.flags == 1);
}
-
/*********************************************/
int main()
{
test1();
- test2();
printf("Success\n");
return 0;
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/nogc.d b/gcc/testsuite/gdc.test/runnable/nogc.d
index 8214e96..c9a58b7 100644
--- a/gcc/testsuite/gdc.test/runnable/nogc.d
+++ b/gcc/testsuite/gdc.test/runnable/nogc.d
@@ -1,3 +1,9 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
extern(C) int printf(const char*, ...);
@@ -9,7 +15,7 @@ extern(C) int printf(const char*, ...);
}
/***********************/
-// 3032
+// https://issues.dlang.org/show_bug.cgi?id=3032
void test3032() @nogc
{
@@ -23,7 +29,7 @@ void test3032() @nogc
}
/***********************/
-// 12642
+// https://issues.dlang.org/show_bug.cgi?id=12642
__gshared int[1] data12642;
@@ -44,7 +50,7 @@ void test12642() @nogc
}
/***********************/
-// 12936
+// https://issues.dlang.org/show_bug.cgi?id=12936
void test12936() @nogc
{
diff --git a/gcc/testsuite/gdc.test/runnable/noreturn1.d b/gcc/testsuite/gdc.test/runnable/noreturn1.d
index 447ea28..1da0479 100644
--- a/gcc/testsuite/gdc.test/runnable/noreturn1.d
+++ b/gcc/testsuite/gdc.test/runnable/noreturn1.d
@@ -66,9 +66,56 @@ void test2()
/*****************************************/
+struct BasicStruct
+{
+ int firstInt;
+ noreturn noRet;
+ long lastLong;
+}
+
+struct AlignedStruct
+{
+ int firstInt;
+ align(16) noreturn noRet;
+ long lastLong;
+}
+
+void takeBasic(BasicStruct bs)
+{
+ assert(bs.firstInt == 13);
+ assert(bs.lastLong == 42);
+
+ assert(&bs.noRet == (&bs.firstInt + 1));
+}
+
+void takeAligned(AlignedStruct as)
+{
+ assert(as.firstInt == 99);
+ assert(as.lastLong == 0xDEADBEEF);
+
+ assert(&as.noRet == &as.lastLong);
+}
+
+void test3()
+{
+ {
+ BasicStruct bs;
+ bs.firstInt = 13;
+ bs.lastLong = 42;
+ takeBasic(bs);
+ }
+ {
+ AlignedStruct as;
+ as.firstInt = 99;
+ as.lastLong = 0xDEADBEEF;
+ takeAligned(as);
+ }
+}
+
int main()
{
test1();
test2();
+ test3();
return 0;
}
diff --git a/gcc/testsuite/gdc.test/runnable/noreturn2.d b/gcc/testsuite/gdc.test/runnable/noreturn2.d
new file mode 100644
index 0000000..1d3d362
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/noreturn2.d
@@ -0,0 +1,220 @@
+/*
+PERMUTE_ARGS: -O -inline
+RUN_OUTPUT:
+---
+getAndPrintS
+---
+*/
+
+import core.stdc.stdio;
+import core.exception : AssertError;
+
+/*****************************************/
+
+// noreturn is inferred for functions that always throw
+// The code must not strip the destructor when calling a noreturn function
+
+struct WithDtor
+{
+ __gshared int destroyed;
+
+ int num;
+
+ int acceptNoreturn(int a, int b, int c)
+ {
+ puts("unreachable");
+ return num + a + b + c;
+ }
+
+ ~this()
+ {
+ destroyed += num;
+ }
+}
+
+noreturn doesThrow()
+{
+ WithDtor wd = WithDtor(1);
+ throw new Exception("");
+}
+
+noreturn callDoesThrow()
+{
+ WithDtor wd = WithDtor(2);
+ doesThrow();
+}
+
+
+void testDtors()
+{
+ try
+ {
+ callDoesThrow();
+ assert(0);
+ } catch (Exception e) {}
+
+ assert(WithDtor.destroyed == 3);
+}
+
+/*****************************************************************************/
+
+/// Verifies that `func` throws a `Throwable` with `message` at `line`
+void testAssertFailure(size_t expLine, string expMsg, void function() func, size_t callLine = __LINE__)
+{
+ void enforce(bool check, string error)
+ {
+ if (!check)
+ throw new AssertError(error, __FILE__, callLine);
+ }
+
+ bool caught;
+ try
+ {
+ func();
+ }
+ catch (Throwable t)
+ {
+ // Save members because t might be overwritten by an Assertion failure below
+ string actFile = t.file;
+ size_t actLine = t.line;
+ string actMsg = t.msg;
+ caught = true;
+
+ scope (failure)
+ {
+ printf("\nfile = \"%.*s\"\nline = %zu\nmsg = \"%.*s\"\n\n",
+ cast(int) actFile.length, actFile.ptr,
+ actLine,
+ cast(int) actMsg.length, actMsg.ptr
+ );
+ fflush(stdout);
+ }
+
+ enforce(actFile == __FILE__, "Wrong file");
+ enforce(actLine == expLine, "Wrong line");
+ enforce(actMsg == expMsg, "Wrong message");
+ }
+
+ enforce(caught, "No Throwable was thrown!");
+}
+
+void testAccess()
+{
+ enum msg = "Accessed expression of type `noreturn`";
+
+ // FIXME: Another assertion failure in the backend trying to generate noreturn.sizeof = 0 byte assignment
+ version (FIXME)
+ testAssertFailure(__LINE__ + 3, msg, function noreturn()
+ {
+ noreturn a;
+ noreturn b = a;
+ });
+
+ if (false) // read does not assert!
+ testAssertFailure(__LINE__ + 3, msg, function noreturn()
+ {
+ noreturn a;
+ int b = a;
+ assert(false, "Unreachable!"); // Statement above not detected as noreturn
+ });
+
+ testAssertFailure(__LINE__ + 2, msg, function noreturn()
+ {
+ cast(noreturn) 1;
+ });
+
+ version (FIXME)
+ testAssertFailure(__LINE__ + 3, msg, function noreturn()
+ {
+ noreturn a;
+ noreturn b = cast(noreturn) 1;
+ });
+
+ if (false) // Read does not assert
+ testAssertFailure(__LINE__ + 3, msg, function noreturn()
+ {
+ noreturn a;
+ return a;
+ });
+
+ if (false) // Read does not assert
+ testAssertFailure(__LINE__ + 4, msg, function noreturn()
+ {
+ static void foo(noreturn) {}
+ noreturn a;
+ foo(a);
+ assert(false, "Unreachable!"); // Ditto
+ });
+}
+
+/*****************************************/
+
+void testFuncCall()
+{
+ enum msg = "Called abort()";
+ enum line = __LINE__ + 1;
+ static noreturn abort() { assert(0, msg); }
+
+ // Canaries to check for side effects
+ __gshared int countLeft, countRight;
+
+ scope (failure) printf("countLeft = %d\ncountRight = %d\n", countLeft, countRight);
+
+
+ // D function arguments are evaluated left to right
+ testAssertFailure(line, msg, function()
+ {
+ static void acceptNoreturnD(int, int, int) { puts("unreachable"); }
+
+ acceptNoreturnD(countLeft++, abort(), countRight++);
+ });
+
+ assert(countLeft == 1);
+ assert(countRight == 0);
+
+// // C function arguments are still evaluated left to right
+// // Despite them being push in reverse order
+ testAssertFailure(line, msg, function()
+ {
+ static extern(C) void acceptNoreturnC(int, int, int) { puts("unreachable"); }
+
+ acceptNoreturnC(countLeft++, abort(), countRight++);
+
+ assert(false);
+ });
+
+ assert(countLeft == 2);
+ assert(countRight == 0);
+
+ WithDtor.destroyed = 0;
+
+ testAssertFailure(__LINE__ + 2, "Error", function()
+ {
+ static WithDtor getS() { assert(false, "Error"); }
+
+ getS().acceptNoreturn(countLeft++, abort(), countRight++);
+ });
+
+ assert(countLeft == 2); // No changes
+ assert(countRight == 0);
+ assert(WithDtor.destroyed == 0); // No temporary to destruct
+
+ testAssertFailure(line, msg, function()
+ {
+ static WithDtor getAndPrintS() { puts("getAndPrintS"); return WithDtor(1); }
+
+ getAndPrintS().acceptNoreturn(countLeft++, abort(), countRight++);
+ });
+
+ assert(countLeft == 3);
+ assert(countRight == 0);
+ assert(WithDtor.destroyed == 1);
+}
+
+int main()
+{
+ testDtors();
+ testAccess();
+ testFuncCall();
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/nulltype.d b/gcc/testsuite/gdc.test/runnable/nulltype.d
index 7a1f1c3..87d7940 100644
--- a/gcc/testsuite/gdc.test/runnable/nulltype.d
+++ b/gcc/testsuite/gdc.test/runnable/nulltype.d
@@ -58,7 +58,7 @@ void test2()
}
/**********************************************/
-// 5899
+// https://issues.dlang.org/show_bug.cgi?id=5899
auto f5899(bool b)
{
@@ -91,7 +91,7 @@ static assert(is(typeof(h5899) R == return) && is(R == int[]));
pragma(msg, typeof(h5899));
/**********************************************/
-// 7278
+// https://issues.dlang.org/show_bug.cgi?id=7278
struct Foo7278(string s)
{
@@ -109,7 +109,7 @@ void test7278()
}
/**********************************************/
-// 8221
+// https://issues.dlang.org/show_bug.cgi?id=8221
class A8221
{
@@ -130,7 +130,7 @@ void test8221()
}
/***************************************************/
-// 8589
+// https://issues.dlang.org/show_bug.cgi?id=8589
void test8589()
{
@@ -157,7 +157,7 @@ void test8589()
}
/**********************************************/
-// 9385
+// https://issues.dlang.org/show_bug.cgi?id=9385
void test9385()
{
@@ -167,7 +167,7 @@ void test9385()
}
/**********************************************/
-// 12203
+// https://issues.dlang.org/show_bug.cgi?id=12203
void test12203()
{
diff --git a/gcc/testsuite/gdc.test/runnable/opdisp.d b/gcc/testsuite/gdc.test/runnable/opdisp.d
index f84a0ec..6aca559 100644
--- a/gcc/testsuite/gdc.test/runnable/opdisp.d
+++ b/gcc/testsuite/gdc.test/runnable/opdisp.d
@@ -1,3 +1,9 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
extern (C) int printf(const char* fmt, ...);
int pass(int n){ return n; }
@@ -265,7 +271,7 @@ void test6()
}
/**********************************************/
-// 7578
+// https://issues.dlang.org/show_bug.cgi?id=7578
struct Foo7578
{
diff --git a/gcc/testsuite/gdc.test/runnable/opover.d b/gcc/testsuite/gdc.test/runnable/opover.d
index 66270f4..633981e 100644
--- a/gcc/testsuite/gdc.test/runnable/opover.d
+++ b/gcc/testsuite/gdc.test/runnable/opover.d
@@ -1,5 +1,29 @@
+/*
+RUN_OUTPUT:
+---
+i = 1
+Writer.opShl(char[])
+BinaryWriter.opShl(int)
+a + 1 = 2
+1 + a = 2
+a + b = 3
+b + a = 3
+i = 64
+12
+534
+A::opShl(int 4)
+4A::opShl(char[])
+ A::opShl(int 12)
+12A::opShl(char[])
+
+B::opShl_r(A)
+Success
+---
+*/
// Test operator overloading
+// Ignore deprecation warnings for D1 style operator overloading
+// TRANSFORM_OUTPUT: remove_lines("Deprecation: `op")
import core.stdc.stdio;
@@ -776,7 +800,7 @@ class A13
A13 opShl(string x)
{
printf("A::opShl(char[])\n");
- printf("%.*s", x.length, x.ptr);
+ printf("%.*s", cast(int)x.length, x.ptr);
return this;
}
}
@@ -821,7 +845,7 @@ void test14()
/**************************************/
-// 3983
+// https://issues.dlang.org/show_bug.cgi?id=3983
struct Fug
{
@@ -849,7 +873,7 @@ void test15()
}
/**************************************/
-// 4953
+// https://issues.dlang.org/show_bug.cgi?id=4953
struct S4953a
{
@@ -907,7 +931,7 @@ void test4953d()
}
/**************************************/
-// 4993
+// https://issues.dlang.org/show_bug.cgi?id=4993
// reduced from the bug report
struct Bar4993
@@ -924,7 +948,7 @@ void test4993()
}
/**************************************/
-// 8133
+// https://issues.dlang.org/show_bug.cgi?id=8133
void test8133()
{
@@ -942,7 +966,7 @@ void test8133()
}
/**************************************/
-// 8522
+// https://issues.dlang.org/show_bug.cgi?id=8522
struct Point8522
{
@@ -961,7 +985,7 @@ void test8522()
}
/**************************************/
-// 12778
+// https://issues.dlang.org/show_bug.cgi?id=12778
struct Vec12778X
{
@@ -1009,7 +1033,7 @@ void test12778()
}
/**************************************/
-// 14343
+// https://issues.dlang.org/show_bug.cgi?id=14343
struct S14343a
{
@@ -1049,7 +1073,7 @@ void test14343()
}
/**************************************/
-// 14344
+// https://issues.dlang.org/show_bug.cgi?id=14344
struct S14344
{
@@ -1080,7 +1104,41 @@ class C14344
}
/**************************************/
+// https://issues.dlang.org/show_bug.cgi?id=1547
+struct A
+{
+ int b;
+ static A opCall(int k)
+ {
+ assert(0);
+ }
+ this(int) {}
+}
+
+void fun(A k = 2) {}
+
+void test1547()
+{
+ fun();
+}
+/**************************************/
+// https://issues.dlang.org/show_bug.cgi?id=20475
+struct S20475
+{
+ string[2] x;
+}
+
+void test20475()
+{
+ auto s = S20475(["abc", "bcd"]);
+ auto t = S20475(["abc", ""]);
+ string u = "abcd";
+ t.x[1] = u[1..$];
+ assert(s == t);
+}
+
+/**************************************/
int main()
{
test1();
@@ -1098,6 +1156,7 @@ int main()
test13();
test14();
test15();
+ test1547();
test4953a();
test4953b();
test4953c();
@@ -1105,6 +1164,7 @@ int main()
test4993();
test8133();
test8522();
+ test20475();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/opover2.d b/gcc/testsuite/gdc.test/runnable/opover2.d
index 78fa04c..dfc0352 100644
--- a/gcc/testsuite/gdc.test/runnable/opover2.d
+++ b/gcc/testsuite/gdc.test/runnable/opover2.d
@@ -1,5 +1,5 @@
-// PERMUTE_ARGS: -inline -O -property
-// REQUIRED_ARGS: -dip25
+// PERMUTE_ARGS: -inline -O
+// REQUIRED_ARGS: -preview=fieldwise
// Test operator overloading
@@ -21,7 +21,7 @@ class A
{
string opUnary(string s)()
{
- printf("A.opUnary!(%.*s)\n", s.length, s.ptr);
+ printf("A.opUnary!(%.*s)\n", cast(int)s.length, s.ptr);
return s;
}
}
@@ -50,7 +50,7 @@ class A2
T opCast(T)()
{
auto s = T.stringof;
- printf("A.opCast!(%.*s)\n", s.length, s.ptr);
+ printf("A.opCast!(%.*s)\n", cast(int)s.length, s.ptr);
return T.init;
}
}
@@ -73,20 +73,20 @@ struct A3
{
int opBinary(string s)(int i)
{
- printf("A.opBinary!(%.*s)\n", s.length, s.ptr);
+ printf("A.opBinary!(%.*s)\n", cast(int)s.length, s.ptr);
return 0;
}
int opBinaryRight(string s)(int i) if (s == "/" || s == "*")
{
- printf("A.opBinaryRight!(%.*s)\n", s.length, s.ptr);
+ printf("A.opBinaryRight!(%.*s)\n", cast(int)s.length, s.ptr);
return 0;
}
T opCast(T)()
{
auto s = T.stringof;
- printf("A.opCast!(%.*s)\n", s.length, s.ptr);
+ printf("A.opCast!(%.*s)\n", cast(int)s.length, s.ptr);
return T.init;
}
}
@@ -108,14 +108,14 @@ struct A4
{
int opUnary(string s)()
{
- printf("A.opUnary!(%.*s)\n", s.length, s.ptr);
+ printf("A.opUnary!(%.*s)\n", cast(int)s.length, s.ptr);
return 0;
}
T opCast(T)()
{
auto s = T.stringof;
- printf("A.opCast!(%.*s)\n", s.length, s.ptr);
+ printf("A.opCast!(%.*s)\n", cast(int)s.length, s.ptr);
return T.init;
}
}
@@ -145,14 +145,14 @@ class A5
int opUnary(string s)()
{
- printf("A.opUnary!(%.*s)\n", s.length, s.ptr);
+ printf("A.opUnary!(%.*s)\n", cast(int)s.length, s.ptr);
return 0;
}
T opCast(T)()
{
auto s = T.stringof;
- printf("A.opCast!(%.*s)\n", s.length, s.ptr);
+ printf("A.opCast!(%.*s)\n", cast(int)s.length, s.ptr);
return T.init;
}
}
@@ -296,31 +296,31 @@ struct A8
{
int opUnary(string s)()
{
- printf("A.opUnary!(%.*s)\n", s.length, s.ptr);
+ printf("A.opUnary!(%.*s)\n", cast(int)s.length, s.ptr);
return 0;
}
int opIndexUnary(string s, T)(T i)
{
- printf("A.opIndexUnary!(%.*s)(%d)\n", s.length, s.ptr, i);
+ printf("A.opIndexUnary!(%.*s)(%d)\n", cast(int)s.length, s.ptr, i);
return 0;
}
int opIndexUnary(string s, T)(T i, T j)
{
- printf("A.opIndexUnary!(%.*s)(%d, %d)\n", s.length, s.ptr, i, j);
+ printf("A.opIndexUnary!(%.*s)(%d, %d)\n", cast(int)s.length, s.ptr, i, j);
return 0;
}
int opSliceUnary(string s)()
{
- printf("A.opSliceUnary!(%.*s)()\n", s.length, s.ptr);
+ printf("A.opSliceUnary!(%.*s)()\n", cast(int)s.length, s.ptr);
return 0;
}
int opSliceUnary(string s, T)(T i, T j)
{
- printf("A.opSliceUnary!(%.*s)(%d, %d)\n", s.length, s.ptr, i, j);
+ printf("A.opSliceUnary!(%.*s)(%d, %d)\n", cast(int)s.length, s.ptr, i, j);
return 0;
}
}
@@ -344,31 +344,31 @@ struct A9
{
int opOpAssign(string s)(int i)
{
- printf("A.opOpAssign!(%.*s)\n", s.length, s.ptr);
+ printf("A.opOpAssign!(%.*s)\n", cast(int)s.length, s.ptr);
return 0;
}
int opIndexOpAssign(string s, T)(int v, T i)
{
- printf("A.opIndexOpAssign!(%.*s)(%d, %d)\n", s.length, s.ptr, v, i);
+ printf("A.opIndexOpAssign!(%.*s)(%d, %d)\n", cast(int)s.length, s.ptr, v, i);
return 0;
}
int opIndexOpAssign(string s, T)(int v, T i, T j)
{
- printf("A.opIndexOpAssign!(%.*s)(%d, %d, %d)\n", s.length, s.ptr, v, i, j);
+ printf("A.opIndexOpAssign!(%.*s)(%d, %d, %d)\n", cast(int)s.length, s.ptr, v, i, j);
return 0;
}
int opSliceOpAssign(string s)(int v)
{
- printf("A.opSliceOpAssign!(%.*s)(%d)\n", s.length, s.ptr, v);
+ printf("A.opSliceOpAssign!(%.*s)(%d)\n", cast(int)s.length, s.ptr, v);
return 0;
}
int opSliceOpAssign(string s, T)(int v, T i, T j)
{
- printf("A.opSliceOpAssign!(%.*s)(%d, %d, %d)\n", s.length, s.ptr, v, i, j);
+ printf("A.opSliceOpAssign!(%.*s)(%d, %d, %d)\n", cast(int)s.length, s.ptr, v, i, j);
return 0;
}
}
@@ -468,7 +468,7 @@ int bug4913()
static assert(bug4913() == 83);
/**************************************/
-// 5551
+// https://issues.dlang.org/show_bug.cgi?id=5551
struct Foo11 {
Foo11 opUnary(string op:"++")() {
@@ -486,7 +486,7 @@ void test11()
}
/**************************************/
-// 4099
+// https://issues.dlang.org/show_bug.cgi?id=4099
struct X4099
{
@@ -672,7 +672,7 @@ void test17()
}
/**************************************/
-// 3789
+// https://issues.dlang.org/show_bug.cgi?id=3789
bool test3789()
{
@@ -728,7 +728,7 @@ bool test3789()
auto ua2 = UnionA([1,2,3]);
assert(ua1.u.x is ua2.u.x);
assert(ua1.u.x != ua2.u.x);
- assert(ua1 == ua2);
+ assert(ua1 != ua2);
ua1.u.x = 1.0;
ua2.u.x = 1.0;
assert(ua1.u.x is ua2.u.x);
@@ -755,7 +755,7 @@ bool test3789()
ub2.u.a = [1,2,3].dup;
assert(ub1.u.a !is ub2.u.a);
assert(ub1.u.a == ub2.u.a);
- assert(ub1 != ub2);
+ assert(ub1 == ub2);
ub2.u.a = ub1.u.a;
assert(ub1.u.a is ub2.u.a);
assert(ub1.u.a == ub2.u.a);
@@ -789,44 +789,27 @@ bool test3789()
}
static assert(test3789());
-/**************************************/
-// 10037
-
-struct S10037
-{
- bool opEquals(ref const S10037) { assert(0); }
-}
-
-struct T10037
+struct S
{
- S10037 s;
- // Compiler should not generate 'opEquals' here implicitly:
+ bool opEquals(ref const S) { return false; }
}
-struct Sub10037(TL...)
+struct T
{
- TL data;
+ S s;
int value;
alias value this;
}
-void test10037()
+void test11161()
{
- S10037 s;
- T10037 t;
- static assert( __traits(hasMember, S10037, "opEquals"));
- static assert(!__traits(hasMember, T10037, "opEquals"));
- assert(thrown!Error(s == s));
- assert(thrown!Error(t == t));
-
- Sub10037!(S10037) lhs;
- Sub10037!(S10037) rhs;
- static assert(!__traits(hasMember, Sub10037!(S10037), "opEquals"));
- assert(lhs == rhs); // lowered to: lhs.value == rhs.value
+ T t1, t2;
+ assert(t1.tupleof != t2.tupleof);
+ assert(t1 != t2); // fails
}
/**************************************/
-// 5810
+// https://issues.dlang.org/show_bug.cgi?id=5810
struct Bug5810
{
@@ -840,7 +823,7 @@ struct Foo5810
}
/**************************************/
-// 6798
+// https://issues.dlang.org/show_bug.cgi?id=6798
struct Tuple6798(T...)
{
@@ -1013,7 +996,7 @@ void test6798()
}
/**************************************/
-// 12382
+// https://issues.dlang.org/show_bug.cgi?id=12382
struct S12382
{
@@ -1041,7 +1024,7 @@ void test12382()
}
/**************************************/
-// 12904
+// https://issues.dlang.org/show_bug.cgi?id=12904
struct S12904
{
@@ -1080,7 +1063,7 @@ void test12904()
}
/**************************************/
-// 7641
+// https://issues.dlang.org/show_bug.cgi?id=7641
mixin template Proxy7641(alias a)
{
@@ -1110,7 +1093,7 @@ void test7641()
}
/**************************************/
-// 8434
+// https://issues.dlang.org/show_bug.cgi?id=8434
void test8434()
{
@@ -1338,7 +1321,7 @@ void test19()
}
/**************************************/
-// 9453
+// https://issues.dlang.org/show_bug.cgi?id=9453
struct Foo9453
{
@@ -1360,7 +1343,7 @@ void test9453()
}
/**************************************/
-// 9496
+// https://issues.dlang.org/show_bug.cgi?id=9496
struct S9496
{
@@ -1392,7 +1375,7 @@ void test9496()
}
/**************************************/
-// 9689
+// https://issues.dlang.org/show_bug.cgi?id=9689
struct B9689(T)
{
@@ -1418,7 +1401,7 @@ void test9689()
}
/**************************************/
-// 9694
+// https://issues.dlang.org/show_bug.cgi?id=9694
struct S9694
{
@@ -1438,7 +1421,7 @@ void test9694()
}
/**************************************/
-// 10064
+// https://issues.dlang.org/show_bug.cgi?id=10064
void test10064()
{
@@ -1465,7 +1448,7 @@ void test10064()
}
/**************************************/
-// 12585
+// https://issues.dlang.org/show_bug.cgi?id=12585
void test12585()
{
@@ -1504,7 +1487,7 @@ void test12585()
}
/**************************************/
-// 10394
+// https://issues.dlang.org/show_bug.cgi?id=10394
void test10394()
{
@@ -1533,7 +1516,7 @@ void test10394()
}
/**************************************/
-// 10597
+// https://issues.dlang.org/show_bug.cgi?id=10597
struct R10597
{
@@ -1577,7 +1560,7 @@ void test10597()
}
/**************************************/
-// 10567
+// https://issues.dlang.org/show_bug.cgi?id=10567
// doesn't require thunk
struct S10567x1n { int value; int opCmp(ref const S10567x1n rhs) const { return 0; } }
@@ -1662,13 +1645,6 @@ void test10567()
S sy = S(2);
assert(!(sx < sy) && !(sx > sy));
assert(sx.opCmp(sy) == 0);
-
- try
- {
- auto x = typeid(S).compare(&sx, &sy);
- assert(0);
- }
- catch (Error e) { assert(e.msg[$-15 .. $] == "not implemented"); }
}
/+
foreach (S; Seq!(S10567d1, S10567d2))
@@ -1690,7 +1666,7 @@ void test10567()
}
/**************************************/
-// 11062
+// https://issues.dlang.org/show_bug.cgi?id=11062
struct S11062ia
{
@@ -1734,7 +1710,7 @@ void test11062()
}
/**************************************/
-// 11311
+// https://issues.dlang.org/show_bug.cgi?id=11311
void test11311()
{
@@ -1791,7 +1767,7 @@ void test11311()
}
/**************************************/
-// 12193
+// https://issues.dlang.org/show_bug.cgi?id=12193
void test12193()
{
@@ -1810,7 +1786,7 @@ void test12193()
}
/**************************************/
-// 14057
+// https://issues.dlang.org/show_bug.cgi?id=14057
struct W14057
{
@@ -1936,7 +1912,7 @@ void test20d()
}
/**************************************/
-// 14624
+// https://issues.dlang.org/show_bug.cgi?id=14624
void test14624()
{
@@ -1981,7 +1957,7 @@ void test14624()
}
/**************************************/
-// 14625
+// https://issues.dlang.org/show_bug.cgi?id=14625
void test14625()
{
@@ -2033,7 +2009,7 @@ int main()
test16();
test17();
test3789();
- test10037();
+ test11161();
test6798();
test12904();
test7641();
@@ -2061,4 +2037,3 @@ int main()
printf("Success\n");
return 0;
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/opover3.d b/gcc/testsuite/gdc.test/runnable/opover3.d
index c6de5d7..7146826 100644
--- a/gcc/testsuite/gdc.test/runnable/opover3.d
+++ b/gcc/testsuite/gdc.test/runnable/opover3.d
@@ -125,7 +125,7 @@ void test4()
}
/**************************************/
-// 12070
+// https://issues.dlang.org/show_bug.cgi?id=12070
void test12070()
{
@@ -160,7 +160,7 @@ void test12070()
}
/**************************************/
-// 12124
+// https://issues.dlang.org/show_bug.cgi?id=12124
struct S12124
{
diff --git a/gcc/testsuite/gdc.test/runnable/overload.d b/gcc/testsuite/gdc.test/runnable/overload.d
index f8fa7d5..c413ade 100644
--- a/gcc/testsuite/gdc.test/runnable/overload.d
+++ b/gcc/testsuite/gdc.test/runnable/overload.d
@@ -1,5 +1,13 @@
-// EXTRA_SOURCES: imports/ovs1528a.d imports/ovs1528b.d
-// EXTRA_SOURCES: imports/template_ovs1.d imports/template_ovs2.d imports/template_ovs3.d
+/*
+REQUIRED_ARGS: -preview=rvaluerefparam
+EXTRA_SOURCES: imports/ovs1528a.d imports/ovs1528b.d
+EXTRA_SOURCES: imports/template_ovs1.d imports/template_ovs2.d imports/template_ovs3.d
+EXTRA_FILES: imports/m8668a.d imports/m8668b.d imports/m8668c.d
+RUN_OUTPUT:
+---
+Success
+---
+*/
import imports.template_ovs1;
import imports.template_ovs2;
@@ -12,7 +20,7 @@ template Id( T){ alias T Id; }
template Id(alias A){ alias A Id; }
/***************************************************/
-// 1528
+// https://issues.dlang.org/show_bug.cgi?id=1528
int foo1528(long){ return 1; }
int foo1528(int[]){ return 2; }
@@ -313,7 +321,7 @@ void test1528d()
}
/***************************************************/
-// 1680
+// https://issues.dlang.org/show_bug.cgi?id=1680
struct S1680
{
@@ -360,7 +368,7 @@ void test1680()
}
/***************************************************/
-// 7418
+// https://issues.dlang.org/show_bug.cgi?id=7418
int foo7418(uint a) { return 1; }
int foo7418(char[] a) { return 2; }
@@ -378,7 +386,7 @@ void test7418()
}
/***************************************************/
-// 7552
+// https://issues.dlang.org/show_bug.cgi?id=7552
struct S7552
{
@@ -434,7 +442,7 @@ void test7552()
}
/***************************************************/
-// 8668
+// https://issues.dlang.org/show_bug.cgi?id=8668
import imports.m8668a;
import imports.m8668c; //replace with m8668b to make it work
@@ -446,7 +454,7 @@ void test8668()
}
/***************************************************/
-// 8943
+// https://issues.dlang.org/show_bug.cgi?id=8943
void test8943()
{
@@ -461,7 +469,7 @@ void test8943()
}
/***************************************************/
-// 9410
+// https://issues.dlang.org/show_bug.cgi?id=9410
struct S {}
int foo(float f, ref S s) { return 1; }
@@ -470,11 +478,17 @@ void test9410()
{
S s;
assert(foo(1, s ) == 1); // works fine. Print: ref
- assert(foo(1, S()) == 2); // Fails with: Error: S() is not an lvalue
+
+ /* With the rvalue to ref param change, this calls the 'ref' version
+ * because both are the same match level, but the 'ref' version is
+ * considered "more specialized", as the non-ref version undergoes
+ * a "conversion" to call the ref version.
+ */
+ assert(foo(1, S()) == 1);
}
/***************************************************/
-// 10171
+// https://issues.dlang.org/show_bug.cgi?id=10171
struct B10171(T) { static int x; }
@@ -484,7 +498,8 @@ void test10171()
}
/***************************************************/
-// 1900 - template overload set
+// https://issues.dlang.org/show_bug.cgi?id=1900
+// template overload set
void test1900a()
{
@@ -623,7 +638,7 @@ void test1900e()
}
/***************************************************/
-// 1900
+// https://issues.dlang.org/show_bug.cgi?id=1900
void test1900()
{
@@ -669,7 +684,7 @@ mixin Foo1900!(char) B1900;
alias Bar1900!(int) bar1900; // error
/***************************************************/
-// 7780
+// https://issues.dlang.org/show_bug.cgi?id=7780
mixin template A7780()
{
@@ -710,7 +725,7 @@ void test7849()
}
/***************************************************/
-// 8352
+// https://issues.dlang.org/show_bug.cgi?id=8352
void test8352()
{
@@ -721,7 +736,7 @@ void test8352()
}
/***************************************************/
-// 8441
+// https://issues.dlang.org/show_bug.cgi?id=8441
mixin template T8441a(string i)
{
@@ -819,7 +834,7 @@ void test8441c()
}
/***************************************************/
-// 9235
+// https://issues.dlang.org/show_bug.cgi?id=9235
template FlowEvaluator9235()
{
@@ -893,7 +908,7 @@ void test9235b()
}
/***************************************************/
-// 10658
+// https://issues.dlang.org/show_bug.cgi?id=10658
alias Val10658 = imports.template_ovs1.Val10658;
alias Val10658 = imports.template_ovs2.Val10658;
@@ -1009,7 +1024,7 @@ void test11785()
}
/***************************************************/
-// 11915
+// https://issues.dlang.org/show_bug.cgi?id=11915
int f11915( int) { return 1; }
int f11915(ref int) { return 2; }
@@ -1025,7 +1040,7 @@ void test11915()
}
/***************************************************/
-// 11916
+// https://issues.dlang.org/show_bug.cgi?id=11916
auto f11916(T)( T) { return 1; }
auto f11916(T)(out T) if (false) { return 2; }
@@ -1054,12 +1069,12 @@ void test11916()
}
/***************************************************/
-// 13783
+// https://issues.dlang.org/show_bug.cgi?id=13783
enum E13783 { a = 5 }
inout(int) f( inout(int) t) { return t * 2; }
-ref inout(int) f(ref inout(int) t) { return t; }
+ref inout(int) f(return ref inout(int) t) { return t; }
void test13783()
{
@@ -1068,7 +1083,7 @@ void test13783()
}
/***************************************************/
-// 14858
+// https://issues.dlang.org/show_bug.cgi?id=14858
int foo14858()() { return 1; }
int bar14858(int) { return 2; }
@@ -1083,7 +1098,7 @@ void test14858()
}
/***************************************************/
-// 14989
+// https://issues.dlang.org/show_bug.cgi?id=14989
template Foo14989(T) if (is(T == int)) { enum Foo14989 = 1; }
template Bar14989(T) if (is(T == double)) { enum Bar14989 = 2; }
@@ -1136,7 +1151,7 @@ void test14989()
}
/***************************************************/
-// 14965
+// https://issues.dlang.org/show_bug.cgi?id=14965
auto f14965a1() { return f14965a1(123); }
int f14965a1(int x) { return x; }
@@ -1212,6 +1227,40 @@ void test14965()
}
/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=21481
+
+struct S21481
+{
+ void funB2(char a) {}
+ alias funB = funB2;
+ // template as first symbol in overload set and overloading an alias
+ void funB()(float t) {}
+ void funB(int b) {} // function was lost -> OK now
+}
+
+void test21481()
+{
+ static assert(__traits(getOverloads, S21481, "funB", true).length == 3);
+}
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=21522
+
+struct S21522
+{
+ // alias to template as first symbol in overload set
+ void funA2()(int a) {}
+ void funA2(char a) {} // function was lost -> OK now
+ alias funA = funA2;
+ void funA(float b) {}
+}
+
+void test21522()
+{
+ static assert(__traits(getOverloads, S21522, "funA", true).length == 3);
+}
+
+/***************************************************/
int main()
{
@@ -1247,6 +1296,8 @@ int main()
test13783();
test14858();
test14965();
+ test21481();
+ test21522();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/previewin.d b/gcc/testsuite/gdc.test/runnable/previewin.d
new file mode 100644
index 0000000..12a0551
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/previewin.d
@@ -0,0 +1,189 @@
+// REQUIRED_ARGS: -preview=dip1000 -preview=in
+
+void main ()
+{
+ testWithAllAttributes();
+ testForeach();
+}
+
+void testWithAllAttributes() @safe pure nothrow @nogc
+{
+ // Used to test dtors
+ bool isTestOver = false;
+
+ // rvalues
+ testin1(42);
+ testin2((ulong[64]).init);
+ testin3(ValueT(42));
+ testin3(RefT(42));
+ testin4((ValueT[64]).init);
+ testin4([RefT(42), RefT(84), RefT(126), RefT(4)]);
+ testin5(NonCopyable(true));
+ testin6(WithPostblit(true));
+ testin7(WithCopyCtor(true));
+ isTestOver = false;
+ testin8(WithDtor(&isTestOver), &isTestOver);
+ isTestOver = false;
+
+ // lvalues
+ uint a1;
+ ulong[64] a2;
+ ValueT a3;
+ ValueT[64] a4;
+ RefT a5;
+ RefT[4] a6;
+ NonCopyable a7 = NonCopyable(true);
+ WithPostblit a8;
+ WithCopyCtor a9;
+ WithDtor a10 = WithDtor(&isTestOver);
+
+ testin1(a1);
+ testin2(a2);
+ testin3(a3);
+ testin3(a5);
+ testin4(a4);
+ testin4(a6);
+ testin5(a7);
+ testin6(a8);
+ testin7(a9);
+ isTestOver = false;
+ testin8(a10, null);
+
+ // Arguments are all values, no `ref` needed
+ testin9(int.init);
+ testin9(char.init, ubyte.init, short.init, int.init, size_t.init);
+ // Arguments are all refs
+ testin9(a2, a4, a5, a6, a7, a8, a9, a10);
+ testin9(NonCopyable(true), WithPostblit(true), WithCopyCtor(true));
+ // Mixed values and ref
+ testin9(char.init, ubyte.init, a2, a4, a5, a6, a7, a8, a9, a10, size_t.init);
+
+ // With dtor
+ isTestOver = false;
+ testin10(&isTestOver, NonCopyable(true), WithPostblit(true),
+ WithCopyCtor(true), WithDtor(&isTestOver));
+ isTestOver = true;
+}
+
+void testForeach() @safe pure
+{
+ int testCallNC (in NonCopyable k, in NonCopyable v)
+ {
+ assert(k == v);
+ return k.value - v.value;
+ }
+
+ NonCopyable[NonCopyable] nc;
+ nc[NonCopyable(0)] = NonCopyable(0);
+ nc[NonCopyable(42)] = NonCopyable(42);
+ nc[NonCopyable(int.min)] = NonCopyable(int.min);
+ nc[NonCopyable(int.max)] = NonCopyable(int.max);
+ foreach (ref k, const ref v; nc)
+ {
+ assert(k.value == v.value);
+ assert(testCallNC(k, v) == 0);
+ }
+ assert(nc == nc);
+ assert(nc.length == 4);
+
+ RefT[RefT] rt;
+ rt[RefT(42)] = RefT(42);
+ rt[RefT(4)] = RefT(4);
+ rt[RefT(242)] = RefT(242);
+ rt[RefT(24)] = RefT(24);
+ foreach (k, v; rt)
+ assert(k.value == v.value);
+ assert(rt == rt);
+
+ static struct Msg
+ {
+ ubyte[3] value;
+ const(char)[] msg;
+ }
+
+ static void testMsg (in Msg k_func, in Msg v_func)
+ {
+ assert(k_func.value == v_func.value);
+ assert(k_func.msg == v_func.msg);
+ assert(k_func == v_func);
+ }
+
+ Msg[Msg] msg;
+ msg[Msg([1, 2, 3], "123")] = Msg([1, 2, 3], "123");
+ msg[Msg([42, 4, 2], "4242")] = Msg([42, 4, 2], "4242");
+ msg[Msg([242, 4, 0], "2424")] = Msg([242, 4, 0], "2424");
+ foreach (ref k_loop, ref v_loop; msg)
+ testMsg(k_loop, v_loop);
+}
+
+struct ValueT { int value; }
+struct RefT { ulong[64] value; }
+
+struct NonCopyable
+{
+ @safe pure nothrow @nogc:
+
+ int value;
+ this(int b) { this.value = b; }
+
+ @disable this(this);
+ @disable this(ref NonCopyable);
+}
+
+struct WithPostblit
+{
+ int value;
+ this(this) @safe pure nothrow @nogc { assert(0); }
+}
+
+struct WithCopyCtor
+{
+ @safe pure nothrow @nogc:
+
+ int value;
+ this(int b) { this.value = b; }
+ this(ref WithCopyCtor) { assert(0); }
+}
+
+struct WithDtor
+{
+ bool* value;
+ ~this() scope @safe pure nothrow @nogc { assert(*value); }
+}
+
+@safe pure nothrow @nogc:
+
+// By value
+void testin1(in uint p) { static assert(!__traits(isRef, p)); }
+// By ref because of size
+void testin2(in ulong[64] p) { static assert(__traits(isRef, p)); }
+// By value or ref depending on size
+void testin3(in ValueT p) { static assert(!__traits(isRef, p)); }
+void testin3(in RefT p) { static assert(__traits(isRef, p)); }
+// By ref because of size
+void testin4(in ValueT[64] p) { static assert(__traits(isRef, p)); }
+void testin4(in RefT[4] p) { static assert(__traits(isRef, p)); }
+
+// By ref because of non-copyability
+void testin5(in NonCopyable noncopy) { static assert(__traits(isRef, noncopy)); }
+static assert(testin5.mangleof == "_D9previewin7testin5FNaNbNiNfIKSQBe11NonCopyableZv"); // incl. `ref`
+// By ref because of postblit
+void testin6(in WithPostblit withpostblit) { static assert(__traits(isRef, withpostblit)); }
+// By ref because of copy ctor
+void testin7(in WithCopyCtor withcopy) { static assert(__traits(isRef, withcopy)); }
+// By ref because of dtor
+void testin8(in WithDtor withdtor, scope bool* isTestOver)
+{
+ static assert(__traits(isRef, withdtor));
+ if (isTestOver)
+ *isTestOver = true;
+}
+
+// Allow to test various tuples (e.g. `(int, int)` and `(int, WithDtor)`)
+// `ref` is only applied to the members which need it
+void testin9(T...)(in T args) {}
+void testin10(T...)(scope bool* isTestOver, in T args)
+{
+ if (isTestOver)
+ *isTestOver = true;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/printargs.d b/gcc/testsuite/gdc.test/runnable/printargs.d
index f4fc703..7d4d916 100644
--- a/gcc/testsuite/gdc.test/runnable/printargs.d
+++ b/gcc/testsuite/gdc.test/runnable/printargs.d
@@ -3,12 +3,12 @@
extern(C) int printf(const char*, ...);
-int main(char args[][])
+int main(char[][] args)
{
int i;
for (i = 0; i < args.length; i++)
- printf("args[%d] = '%.*s'\n", i, args[i].length, args[i].ptr);
+ printf("args[%d] = '%.*s'\n", i, cast(int)args[i].length, args[i].ptr);
assert(args[1] == "A");
assert(args[2] == "B");
diff --git a/gcc/testsuite/gdc.test/runnable/property.d b/gcc/testsuite/gdc.test/runnable/property.d
index 4fd3af4..661bd68 100644
--- a/gcc/testsuite/gdc.test/runnable/property.d
+++ b/gcc/testsuite/gdc.test/runnable/property.d
@@ -26,12 +26,12 @@ int test1()
}
/******************************************/
-// 6259
+// https://issues.dlang.org/show_bug.cgi?id=6259
struct S6259
{
private int m_prop;
- ref const(int) prop() { return m_prop; }
+ ref const(int) prop() return { return m_prop; }
void prop(int v) { m_prop = v; }
}
diff --git a/gcc/testsuite/gdc.test/runnable/property2.d b/gcc/testsuite/gdc.test/runnable/property2.d
index 1c5cf30..275729f 100644
--- a/gcc/testsuite/gdc.test/runnable/property2.d
+++ b/gcc/testsuite/gdc.test/runnable/property2.d
@@ -1,4 +1,3 @@
-// PERMUTE_ARGS: -property
/*
TEST_OUTPUT:
---
@@ -19,23 +18,13 @@ RUN_OUTPUT:
Success
---
*/
-
extern (C) int printf(const char* fmt, ...);
-// Is -property option specified?
-enum enforceProperty = !__traits(compiles, {
- int prop(){ return 1; }
- int n = prop;
-});
-
/*******************************************/
template select(alias v1, alias v2)
{
- static if (enforceProperty)
- enum select = v1;
- else
- enum select = v2;
+ enum select = v2;
}
struct Test(int N)
@@ -48,32 +37,28 @@ struct Test(int N)
ref foo(){ getset = 1; return value; }
enum result = select!(0, 1);
- // -property test.d(xx): Error: not a property foo
- // (no option) prints "getter"
+ // prints "getter"
}
static if (N == 1)
{
ref foo(int x){ getset = 2; value = x; return value; }
enum result = select!(0, 2);
- // -property test.d(xx): Error: not a property foo
- // (no option) prints "setter"
+ // prints "setter"
}
static if (N == 2)
{
@property ref foo(){ getset = 1; return value; }
enum result = select!(1, 1);
- // -property prints "getter"
- // (no option) prints "getter"
+ // prints "getter"
}
static if (N == 3)
{
@property ref foo(int x){ getset = 2; value = x; return value; }
enum result = select!(2, 2);
- // -property prints "setter"
- // (no option) prints "setter"
+ // prints "setter"
}
@@ -83,8 +68,7 @@ struct Test(int N)
ref foo(int x){ getset = 2; value = x; return value; }
enum result = select!(0, 2);
- // -property test.d(xx): Error: not a property foo
- // (no option) prints "setter"
+ // prints "setter"
}
static if (N == 5)
{
@@ -92,8 +76,7 @@ struct Test(int N)
ref foo(int x){ getset = 2; value = x; return value; }
enum result = select!(0, 0);
- // -property test.d(xx): Error: cannot overload both property and non-property functions
- // (no option) test.d(xx): Error: cannot overload both property and non-property functions
+ // test.d(xx): Error: cannot overload both property and non-property functions
}
static if (N == 6)
{
@@ -101,8 +84,7 @@ struct Test(int N)
@property ref foo(int x){ getset = 2; value = x; return value; }
enum result = select!(0, 0);
- // -property test.d(xx): Error: cannot overload both property and non-property functions
- // (no option) test.d(xx): Error: cannot overload both property and non-property functions
+ // test.d(xx): Error: cannot overload both property and non-property functions
}
static if (N == 7)
{
@@ -110,8 +92,7 @@ struct Test(int N)
@property ref foo(int x){ getset = 2; value = x; return value; }
enum result = select!(2, 2);
- // -property prints "setter"
- // (no option) prints "setter"
+ // prints "setter"
}
}
@@ -153,7 +134,7 @@ void test1()
}
/*******************************************/
-// 7722
+// https://issues.dlang.org/show_bug.cgi?id=7722
class Foo7722 {}
void spam7722(Foo7722 f) {}
@@ -161,10 +142,7 @@ void spam7722(Foo7722 f) {}
void test7722()
{
auto f = new Foo7722;
- static if (enforceProperty)
- static assert(!__traits(compiles, f.spam7722));
- else
- f.spam7722;
+ f.spam7722;
}
/*******************************************/
@@ -179,10 +157,7 @@ void test7722()
assert(dg(0) == v);
}
- static if (enforceProperty)
- checkImpl!(v1)();
- else
- checkImpl!(v2)();
+ checkImpl!(v2)();
}
struct S {}
@@ -292,7 +267,7 @@ void test7722b()
}
/*******************************************/
-// 7174
+// https://issues.dlang.org/show_bug.cgi?id=7174
void test7174()
{
@@ -301,7 +276,7 @@ void test7174()
}
/***************************************************/
-// 7274
+// https://issues.dlang.org/show_bug.cgi?id=7274
@property foo7274(){ return "test"; }
@property bar7274(){ return "kernel32.lib"; }
@@ -316,7 +291,7 @@ void test7274()
}
/***************************************************/
-// 7275
+// https://issues.dlang.org/show_bug.cgi?id=7275
void test7275()
{
@@ -333,7 +308,7 @@ void test7275()
}
/*****************************************/
-// 7538
+// https://issues.dlang.org/show_bug.cgi?id=7538
void test7538()
{
@@ -478,7 +453,7 @@ void test7538()
}
/*****************************************/
-// 8251
+// https://issues.dlang.org/show_bug.cgi?id=8251
struct S8251
{
@@ -515,13 +490,13 @@ void test8251()
}
/*****************************************/
-// 9063
+// https://issues.dlang.org/show_bug.cgi?id=9063
@property bool foo9063(){ return true; }
static assert(foo9063);
/*****************************************/
-// 9234
+// https://issues.dlang.org/show_bug.cgi?id=9234
class Fizz9234
{
@@ -533,7 +508,7 @@ struct Foo9234(alias F) {}
struct Foo9234(string thunk) {}
/*****************************************/
-// 10103
+// https://issues.dlang.org/show_bug.cgi?id=10103
mixin template Getter10103()
{
@@ -577,7 +552,7 @@ void test10103()
}
/*****************************************/
-// 10197
+// https://issues.dlang.org/show_bug.cgi?id=10197
template OriginalType10197(T)
{
diff --git a/gcc/testsuite/gdc.test/runnable/pubprivtmpl.d b/gcc/testsuite/gdc.test/runnable/pubprivtmpl.d
new file mode 100644
index 0000000..992f04f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/pubprivtmpl.d
@@ -0,0 +1,20 @@
+// EXTRA_SOURCES: imports/pubprivtmpla.d
+
+module pubprivtmpl;
+
+// Idiom: public alias to private template
+// This idiom was discovered while refactoring access.d. The idiom was not being used in any DLang repository
+// but was being used by a few projects in the D ecosystem. It is unkown at this time if this idiom is permitted
+// by design or by accident. This test was added to DMD to prevent regressions in those projects that utilize this
+// idiom. See also:
+// https://issues.dlang.org/show_bug.cgi?id=4533
+// https://issues.dlang.org/show_bug.cgi?id=11173
+
+import pubprivtmpla;
+
+void main()
+{
+ auto s = S();
+ auto v = s.get();
+ assert(v == 42);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/runnable.exp b/gcc/testsuite/gdc.test/runnable/runnable.exp
index 134d067..4584aca 100644
--- a/gcc/testsuite/gdc.test/runnable/runnable.exp
+++ b/gcc/testsuite/gdc.test/runnable/runnable.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 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/gdc.test/runnable/s2ir.d b/gcc/testsuite/gdc.test/runnable/s2ir.d
index 29cfc96..840e6de 100644
--- a/gcc/testsuite/gdc.test/runnable/s2ir.d
+++ b/gcc/testsuite/gdc.test/runnable/s2ir.d
@@ -1,5 +1,14 @@
-// RUNNABLE_PHOBOS_TEST
-import std.stdio;
+/*
+RUN_OUTPUT:
+---
+hello
+world
+foo
+Success
+---
+*/
+
+import core.stdc.stdio;
/***********************************/
@@ -17,6 +26,8 @@ void test1()
}
version(D_PIC)
{}
+ else version (D_PIE)
+ {}
else
{
asm
@@ -43,7 +54,7 @@ int main()
a[2] = "foo";
foreach (string s; a)
- writefln(s);
+ printf("%.*s\n", cast(int)s.length, s.ptr);
switch (1)
{
@@ -92,6 +103,6 @@ int main()
default: assert(0);
}
- writefln("Success\n");
+ printf("Success\n");
return 0;
}
diff --git a/gcc/testsuite/gdc.test/runnable/sctor.d b/gcc/testsuite/gdc.test/runnable/sctor.d
index 7d640c0..b587e6e 100644
--- a/gcc/testsuite/gdc.test/runnable/sctor.d
+++ b/gcc/testsuite/gdc.test/runnable/sctor.d
@@ -1,5 +1,11 @@
-// REQUIRED_ARGS:
-// PERMUTE_ARGS: -w -d -de -dw
+/*
+REQUIRED_ARGS: -w -de
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+Success
+---
+*/
extern(C) int printf(const char*, ...);
@@ -117,7 +123,7 @@ struct S4
}
/***************************************************/
-// 8117
+// https://issues.dlang.org/show_bug.cgi?id=8117
struct S8117
{
@@ -136,7 +142,7 @@ void test8117()
}
/***************************************************/
-// 9665
+// https://issues.dlang.org/show_bug.cgi?id=9665
struct X9665
{
@@ -182,7 +188,7 @@ void test9665()
}
/***************************************************/
-// 11246
+// https://issues.dlang.org/show_bug.cgi?id=11246
struct Foo11246
{
@@ -223,7 +229,7 @@ void test11246()
}
/***************************************************/
-// 13515
+// https://issues.dlang.org/show_bug.cgi?id=13515
Object[string][100] aa13515;
@@ -253,7 +259,7 @@ void test13515()
}
/***************************************************/
-// 14409
+// https://issues.dlang.org/show_bug.cgi?id=14409
class B14409 { this(int) {} }
class C14409 : B14409
@@ -268,7 +274,7 @@ class C14409 : B14409
}
/***************************************************/
-// 14376
+// https://issues.dlang.org/show_bug.cgi?id=14376
auto map14376()
{
@@ -294,7 +300,7 @@ struct S14376
}
/***************************************************/
-// 14351
+// https://issues.dlang.org/show_bug.cgi?id=14351
class B14351
{
@@ -317,7 +323,7 @@ class D14351c : B14351
}
/***************************************************/
-// 14450
+// https://issues.dlang.org/show_bug.cgi?id=14450
struct S14450a // non-template struct + non template ctors - OK
{
@@ -366,7 +372,7 @@ void test14450()
}
/***************************************************/
-// 14944
+// https://issues.dlang.org/show_bug.cgi?id=14944
static int[2] tbl14944;
@@ -386,7 +392,8 @@ void test14944()
}
/***************************************************/
-// 15258 - a field initialization affects other overlapped fields
+// https://issues.dlang.org/show_bug.cgi?id=15258
+// a field initialization affects other overlapped fields
class C15258
{
@@ -403,18 +410,62 @@ class C15258
}
/***************************************************/
-// 15665
+// https://issues.dlang.org/show_bug.cgi?id=15869
-scope class C15665 (V)
+struct Set {
+ @disable this(this);
+ int value = 0;
+}
+
+Set clobber(ref Set a) {
+ Set ret; // <- This overwrites *a, i.e. &ret is the same as a
+ ret.value = a.value; // <- Now a.value is 0
+ return ret;
+}
+
+struct XX {
+ Set a = Set(1);
+ this(int n) {
+ a = clobber(a); // fix is to make this an assignment, not a construction
+ }
+}
+void test15869()
{
- this () {}
+ Set a = Set(1);
+ a = clobber(a);
+ assert(a.value == 1);
+
+ XX xx = XX(0);
+ assert(xx.a.value == 1);
}
-void test15665()
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19389
+
+struct Foo19389 {
+ int x;
+
+ this(int dummy) { x = dummy; }
+}
+
+struct Bar19389 {
+ Foo19389 a;
+ Foo19389 b;
+
+ this(int dummy) {
+ a = (b = Foo19389(dummy));
+ }
+}
+
+
+void test19389()
{
- scope foo = new C15665!int;
+ Bar19389 bar = Bar19389(7);
+ assert(bar.a.x == 7);
+ assert(bar.b.x == 7); // fails
}
+
/***************************************************/
int main()
@@ -425,7 +476,8 @@ int main()
test13515();
test14450();
test14944();
- test15665();
+ test15869();
+ test19389();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/sctor2.d b/gcc/testsuite/gdc.test/runnable/sctor2.d
new file mode 100644
index 0000000..a2367cf
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/sctor2.d
@@ -0,0 +1,20 @@
+// REQUIRED_ARGS: -w -de
+// PERMUTE_ARGS:
+
+/***************************************************/
+// 15665
+
+scope class C15665 (V)
+{
+ this () {}
+}
+
+void test15665()
+{
+ scope foo = new C15665!int;
+}
+
+void main()
+{
+ test15665();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/sdtor.d b/gcc/testsuite/gdc.test/runnable/sdtor.d
index 3edf8cf..56c5125 100644
--- a/gcc/testsuite/gdc.test/runnable/sdtor.d
+++ b/gcc/testsuite/gdc.test/runnable/sdtor.d
@@ -1,4 +1,5 @@
// PERMUTE_ARGS: -unittest -O -release -inline -fPIC -g
+// REQUIRED_ARGS: -preview=dtorfields
/*
TEST_OUTPUT:
---
@@ -16,7 +17,7 @@ S7353
import core.vararg;
-extern (C) int printf(const(char*) fmt, ...);
+extern (C) int printf(const(char*) fmt, ...) nothrow;
template TypeTuple(T...) { alias TypeTuple = T; }
@@ -38,23 +39,6 @@ void test1()
/**********************************/
-int sdtor2;
-
-struct S2
-{
- ~this() { printf("~S2()\n"); sdtor2++; }
- delete(void* p) { assert(sdtor2 == 1); printf("S2.delete()\n"); sdtor2++; }
-}
-
-void test2()
-{
- S2* s = new S2();
- delete s;
- assert(sdtor2 == 2);
-}
-
-/**********************************/
-
int sdtor3;
struct S3
@@ -1185,7 +1169,7 @@ void test45()
}
/**********************************/
-// 3986
+// https://issues.dlang.org/show_bug.cgi?id=3986
struct SiberianHamster
{
@@ -1200,7 +1184,7 @@ void test46()
}
/**********************************/
-// 8741
+// https://issues.dlang.org/show_bug.cgi?id=8741
struct Vec8741
{
@@ -1351,12 +1335,12 @@ void test52()
A52 b = a.copy();
printf("a: %p, b: %p\n", &a, &b);
}
- printf("s = '%.*s'\n", s52.length, s52.ptr);
+ printf("s = '%.*s'\n", cast(int)s52.length, s52.ptr);
assert(s52 == "cabb");
}
/**********************************/
-// 4339
+// https://issues.dlang.org/show_bug.cgi?id=4339
struct A53 {
invariant() { }
@@ -1520,7 +1504,7 @@ void test56()
}
/**********************************/
-// 5859
+// https://issues.dlang.org/show_bug.cgi?id=5859
int dtor_cnt = 0;
struct S57
@@ -1669,7 +1653,7 @@ void test57()
}
/**********************************/
-// 5574
+// https://issues.dlang.org/show_bug.cgi?id=5574
struct foo5574a
{
@@ -1690,7 +1674,7 @@ struct bar5574b
}
/**********************************/
-// 5777
+// https://issues.dlang.org/show_bug.cgi?id=5777
int sdtor58 = 0;
S58* ps58;
@@ -1716,7 +1700,7 @@ void test58()
}
/**********************************/
-// 6308
+// https://issues.dlang.org/show_bug.cgi?id=6308
struct C59
{
@@ -1749,7 +1733,7 @@ void test59()
}
/**********************************/
-// 5737
+// https://issues.dlang.org/show_bug.cgi?id=5737
void test5737()
{
@@ -1785,7 +1769,7 @@ void test5737()
}
/**********************************/
-// 6119
+// https://issues.dlang.org/show_bug.cgi?id=6119
void test6119()
{
@@ -1817,7 +1801,7 @@ void test6119()
}
/**********************************/
-// 6364
+// https://issues.dlang.org/show_bug.cgi?id=6364
struct Foo6364
{
@@ -1843,7 +1827,7 @@ void test6364()
}
/**********************************/
-// 6499
+// https://issues.dlang.org/show_bug.cgi?id=6499
struct S6499
{
@@ -1852,18 +1836,18 @@ struct S6499
this(string s)
{
m = s;
- printf("Constructor - %.*s\n", m.length, m.ptr);
+ printf("Constructor - %.*s\n", cast(int)m.length, m.ptr);
if (m == "foo") { ++sdtor; assert(sdtor == 1); }
if (m == "bar") { ++sdtor; assert(sdtor == 2); }
}
this(this)
{
- printf("Postblit - %.*s\n", m.length, m.ptr);
+ printf("Postblit - %.*s\n", cast(int)m.length, m.ptr);
assert(0);
}
~this()
{
- printf("Destructor - %.*s\n", m.length, m.ptr);
+ printf("Destructor - %.*s\n", cast(int)m.length, m.ptr);
if (m == "bar") { assert(sdtor == 2); --sdtor; }
if (m == "foo") { assert(sdtor == 1); --sdtor; }
}
@@ -1957,7 +1941,7 @@ void test60()
}
/**********************************/
-// 4316
+// https://issues.dlang.org/show_bug.cgi?id=4316
struct A4316
{
@@ -1990,7 +1974,7 @@ void test6177()
/**********************************/
-// 6470
+// https://issues.dlang.org/show_bug.cgi?id=6470
struct S6470
{
@@ -2021,7 +2005,7 @@ void test6470()
}
/**********************************/
-// 6636
+// https://issues.dlang.org/show_bug.cgi?id=6636
struct S6636
{
@@ -2043,7 +2027,7 @@ void test6636()
}
/**********************************/
-// 6637
+// https://issues.dlang.org/show_bug.cgi?id=6637
struct S6637
{
@@ -2062,7 +2046,7 @@ void test6637()
}
/**********************************/
-// 7353
+// https://issues.dlang.org/show_bug.cgi?id=7353
struct S7353
{
@@ -2101,7 +2085,7 @@ void test7353()
}
/**********************************/
-// 8036
+// https://issues.dlang.org/show_bug.cgi?id=8036
struct S8036a
{
@@ -2142,7 +2126,7 @@ void test61()
}
/**********************************/
-// 7506
+// https://issues.dlang.org/show_bug.cgi?id=7506
void test7506()
{
@@ -2172,7 +2156,7 @@ void test7506()
}
/**********************************/
-// 7516
+// https://issues.dlang.org/show_bug.cgi?id=7516
struct S7516
{
@@ -2295,7 +2279,7 @@ void test7516e()
}
/**********************************/
-// 7530
+// https://issues.dlang.org/show_bug.cgi?id=7530
void test7530()
{
@@ -2352,7 +2336,7 @@ void test62()
}
/**********************************/
-// 7579
+// https://issues.dlang.org/show_bug.cgi?id=7579
void test7579a()
{
@@ -2425,7 +2409,7 @@ void test7579b()
}
/**********************************/
-// 8335
+// https://issues.dlang.org/show_bug.cgi?id=8335
struct S8335
{
@@ -2471,7 +2455,7 @@ void test8335()
}
/**********************************/
-// 8356
+// https://issues.dlang.org/show_bug.cgi?id=8356
void test8356()
{
@@ -2493,7 +2477,7 @@ void test8356()
}
/**********************************/
-// 8475
+// https://issues.dlang.org/show_bug.cgi?id=8475
T func8475(T)(T x) @safe pure
{
@@ -2535,7 +2519,7 @@ Foo9320 test9320(Foo9320 a, Foo9320 b, Foo9320 c) {
}
/**********************************/
-// 9386
+// https://issues.dlang.org/show_bug.cgi?id=9386
struct Test9386
{
@@ -2548,21 +2532,21 @@ struct Test9386
this(string name)
{
this.name = name;
- printf("Created %.*s...\n", name.length, name.ptr);
+ printf("Created %.*s...\n", cast(int)name.length, name.ptr);
assert(i + 1 < op.length);
op[i++] = 'a';
}
this(this)
{
- printf("Copied %.*s...\n", name.length, name.ptr);
+ printf("Copied %.*s...\n", cast(int)name.length, name.ptr);
assert(i + 1 < op.length);
op[i++] = 'b';
}
~this()
{
- printf("Deleted %.*s\n", name.length, name.ptr);
+ printf("Deleted %.*s\n", cast(int)name.length, name.ptr);
assert(i + 1 < op.length);
op[i++] = 'c';
}
@@ -2592,7 +2576,7 @@ void test9386()
printf("----\n");
foreach (Test9386 test; tests)
{
- printf("\tForeach %.*s\n", test.name.length, test.name.ptr);
+ printf("\tForeach %.*s\n", cast(int)test.name.length, test.name.ptr);
Test9386.op[Test9386.i++] = 'x';
}
@@ -2603,7 +2587,7 @@ void test9386()
printf("----\n");
foreach (ref Test9386 test; tests)
{
- printf("\tForeach %.*s\n", test.name.length, test.name.ptr);
+ printf("\tForeach %.*s\n", cast(int)test.name.length, test.name.ptr);
Test9386.op[Test9386.i++] = 'x';
}
assert(Test9386.sop == "xxxx");
@@ -2625,8 +2609,8 @@ void test9386()
printf("----\n");
foreach (Test9386 k, Test9386 v; tests)
{
- printf("\tForeach %.*s : %.*s\n", k.name.length, k.name.ptr,
- v.name.length, v.name.ptr);
+ printf("\tForeach %.*s : %.*s\n", cast(int)k.name.length, k.name.ptr,
+ cast(int)v.name.length, v.name.ptr);
Test9386.op[Test9386.i++] = 'x';
}
@@ -2637,8 +2621,8 @@ void test9386()
printf("----\n");
foreach (Test9386 k, ref Test9386 v; tests)
{
- printf("\tForeach %.*s : %.*s\n", k.name.length, k.name.ptr,
- v.name.length, v.name.ptr);
+ printf("\tForeach %.*s : %.*s\n", cast(int)k.name.length, k.name.ptr,
+ cast(int)v.name.length, v.name.ptr);
Test9386.op[Test9386.i++] = 'x';
}
assert(Test9386.sop == "bxcbxcbxcbxc");
@@ -2648,7 +2632,7 @@ void test9386()
}
/**********************************/
-// 9441
+// https://issues.dlang.org/show_bug.cgi?id=9441
auto x9441 = X9441(0.123);
@@ -2697,7 +2681,7 @@ struct Data
~this()
{
- printf("%d\n", _store._count);
+ printf("%zd\n", _store._count);
--_store._count;
}
}
@@ -2711,7 +2695,7 @@ void test9720()
}
/**********************************/
-// 9899
+// https://issues.dlang.org/show_bug.cgi?id=9899
struct S9899
{
@@ -2729,7 +2713,7 @@ void test9899() @safe pure nothrow
}
/**********************************/
-// 9907
+// https://issues.dlang.org/show_bug.cgi?id=9907
void test9907()
{
@@ -2746,13 +2730,13 @@ void test9907()
void opAssign(SX rhs)
{
- printf("%08X(%d) from Rvalue %08X(%d)\n", &this.i, this.i, &rhs.i, rhs.i);
+ printf("%08zX(%d) from Rvalue %08zX(%d)\n", cast(size_t)&this.i, this.i, cast(size_t)&rhs.i, rhs.i);
++assign;
}
void opAssign(ref SX rhs)
{
- printf("%08X(%d) from Lvalue %08X(%d)\n", &this.i, this.i, &rhs.i, rhs.i);
+ printf("%08zX(%d) from Lvalue %08zX(%d)\n", cast(size_t)&this.i, this.i, cast(size_t)&rhs.i, rhs.i);
assert(0);
}
@@ -2760,7 +2744,7 @@ void test9907()
{
~this()
{
- printf("destroying %08X(%d)\n", &this.i, this.i);
+ printf("destroying %08zX(%d)\n", cast(size_t)&this.i, this.i);
++dtor;
}
}
@@ -2793,12 +2777,12 @@ void test9907()
}
/**********************************/
-// 9985
+// https://issues.dlang.org/show_bug.cgi?id=9985
struct S9985
{
ubyte* b;
- ubyte buf[128];
+ ubyte[128] buf;
this(this) { assert(0); }
static void* ptr;
@@ -2864,7 +2848,7 @@ void test17457()
}
/**********************************/
-// 9994
+// https://issues.dlang.org/show_bug.cgi?id=9994
void test9994()
{
@@ -2884,7 +2868,7 @@ void test9994()
}
/**********************************/
-// 10053
+// https://issues.dlang.org/show_bug.cgi?id=10053
struct S10053A
{
@@ -2898,7 +2882,7 @@ struct S10053B
}
/**********************************/
-// 10055
+// https://issues.dlang.org/show_bug.cgi?id=10055
void test10055a()
{
@@ -2999,7 +2983,7 @@ void test10055b()
}
/**********************************/
-// 10160
+// https://issues.dlang.org/show_bug.cgi?id=10160
struct S10160 { this(this) {} }
@@ -3013,7 +2997,7 @@ void test10160()
}
/**********************************/
-// 10094
+// https://issues.dlang.org/show_bug.cgi?id=10094
void test10094()
{
@@ -3035,7 +3019,7 @@ void test10094()
}
/**********************************/
-// 10079
+// https://issues.dlang.org/show_bug.cgi?id=10079
// dtor || postblit
struct S10079a
@@ -3082,7 +3066,7 @@ static assert(__traits(compiles, &check10079!S10079e));
static assert(__traits(compiles, &check10079!S10079f));
/**********************************/
-// 10244
+// https://issues.dlang.org/show_bug.cgi?id=10244
void test10244()
{
@@ -3110,7 +3094,7 @@ void test10244()
}
/**********************************/
-// 10694
+// https://issues.dlang.org/show_bug.cgi?id=10694
struct Foo10694 { ~this() { } }
@@ -3126,7 +3110,7 @@ void test10694() pure
}
/**********************************/
-// 10787
+// https://issues.dlang.org/show_bug.cgi?id=10787
int global10787;
@@ -3145,7 +3129,7 @@ shared static ~this() nothrow pure @safe
}
/**********************************/
-// 10789
+// https://issues.dlang.org/show_bug.cgi?id=10789
struct S10789
{
@@ -3212,7 +3196,7 @@ void test10789()
}
/**********************************/
-// 10972
+// https://issues.dlang.org/show_bug.cgi?id=10972
int test10972()
{
@@ -3276,7 +3260,7 @@ int test10972()
static assert(test10972()); // CTFE
/**********************************/
-// 11134
+// https://issues.dlang.org/show_bug.cgi?id=11134
void test11134()
{
@@ -3312,7 +3296,7 @@ void test11134()
}
/**********************************/
-// 11197
+// https://issues.dlang.org/show_bug.cgi?id=11197
struct S11197a
{
@@ -3346,7 +3330,7 @@ void fun7474(T...)() { T x; }
void test7474() { fun7474!S7474(); }
/**********************************/
-// 11286
+// https://issues.dlang.org/show_bug.cgi?id=11286
struct A11286
{
@@ -3364,7 +3348,7 @@ void test11286()
}
/**********************************/
-// 11505
+// https://issues.dlang.org/show_bug.cgi?id=11505
struct Foo11505
{
@@ -3384,7 +3368,7 @@ void test11505()
}
/**********************************/
-// 12045
+// https://issues.dlang.org/show_bug.cgi?id=12045
bool test12045()
{
@@ -3435,7 +3419,7 @@ bool test12045()
static assert(test12045());
/**********************************/
-// 12591
+// https://issues.dlang.org/show_bug.cgi?id=12591
struct S12591(T)
{
@@ -3458,7 +3442,7 @@ void test12591()
}
/**********************************/
-// 12660
+// https://issues.dlang.org/show_bug.cgi?id=12660
struct X12660
{
@@ -3499,7 +3483,7 @@ void test12660() @nogc
}
/**********************************/
-// 12686
+// https://issues.dlang.org/show_bug.cgi?id=12686
struct Foo12686
{
@@ -3527,7 +3511,7 @@ void test12686()
}
/**********************************/
-// 13089
+// https://issues.dlang.org/show_bug.cgi?id=13089
struct S13089
{
@@ -3687,7 +3671,7 @@ void test13586()
}
/**********************************/
-// 14443
+// https://issues.dlang.org/show_bug.cgi?id=14443
T enforce14443(E : Throwable = Exception, T)(T value)
{
@@ -3831,7 +3815,10 @@ void test14443()
}
/**********************************/
-// 13661, 14022, 14023 - postblit/dtor call on static array assignment
+// postblit/dtor call on static array assignment
+// https://issues.dlang.org/show_bug.cgi?id=13661
+// https://issues.dlang.org/show_bug.cgi?id=14022
+// https://issues.dlang.org/show_bug.cgi?id=14023
bool test13661()
{
@@ -4039,7 +4026,7 @@ bool test14023()
static assert(test14023());
/************************************************/
-// 13669 - dtor call on static array variable
+// https://issues.dlang.org/show_bug.cgi?id=13669 - dtor call on static array variable
bool test13669()
{
@@ -4084,7 +4071,7 @@ void test13095()
}
/**********************************/
-// 14264
+// https://issues.dlang.org/show_bug.cgi?id=14264
void test14264()
{
@@ -4116,7 +4103,7 @@ void test14264()
}
/**********************************/
-// 14686
+// https://issues.dlang.org/show_bug.cgi?id=14686
int test14686()
{
@@ -4160,7 +4147,7 @@ int test14686()
static assert(test14686());
/**********************************/
-// 14815
+// https://issues.dlang.org/show_bug.cgi?id=14815
int test14815()
{
@@ -4222,7 +4209,7 @@ void test16197() {
}
/**********************************/
-// 14860
+// https://issues.dlang.org/show_bug.cgi?id=14860
int test14860()
{
@@ -4245,7 +4232,39 @@ int test14860()
static assert(test14860());
/**********************************/
-// 14696
+// https://issues.dlang.org/show_bug.cgi?id=14246
+
+struct A14246 {
+ int a = 3;
+ static string s;
+ this( int var ) { printf("A()\n"); a += var; s ~= "a"; }
+
+ ~this() { printf("~A()\n"); s ~= "b"; }
+}
+
+struct B14246 {
+ int i;
+ A14246 a;
+
+ this( int var ) {
+ A14246.s ~= "c";
+ a = A14246(var+1);
+ throw new Exception("An exception");
+ }
+}
+
+void test14246() {
+ try {
+ auto b = B14246(2);
+ } catch( Exception ex ) {
+ printf("Caught ex\n");
+ A14246.s ~= "d";
+ }
+ assert(A14246.s == "cabd");
+}
+
+/**********************************/
+// https://issues.dlang.org/show_bug.cgi?id=14696
void test14696(int len = 2)
{
@@ -4351,10 +4370,12 @@ void test14696(int len = 2)
check({ foo(len == 2 ? makeS(1).get(len != 2 ? makeS(2).get() : null) : null); }, "makeS(1).get(1).foo.dtor(1).");
check({ foo(len != 2 ? makeS(1).get(len == 2 ? makeS(2).get() : null) : null); }, "foo.");
check({ foo(len != 2 ? makeS(1).get(len != 2 ? makeS(2).get() : null) : null); }, "foo.");
+ check({ foo(len == 2 ? makeS(makeS(2).n - 1).get() : null); }, "makeS(2).makeS(1).get(1).foo.dtor(1).dtor(2).");
+ check({ foo(len != 2 ? makeS(makeS(2).n - 1).get() : null); }, "foo.");
}
/**********************************/
-// 14838
+// https://issues.dlang.org/show_bug.cgi?id=14838
int test14838() pure nothrow @safe
{
@@ -4408,6 +4429,21 @@ static assert(test14838());
/**********************************/
+// https://issues.dlang.org/show_bug.cgi?id=14639
+
+struct Biggy {
+ ulong[50000] a;
+ @disable this(this);
+}
+
+__gshared Biggy biggy;
+
+void test14639() {
+ biggy = Biggy.init;
+}
+
+/**********************************/
+
struct S63
{
private long p = 87;
@@ -4501,7 +4537,7 @@ void test65()
}
/**********************************/
-// 15661
+// https://issues.dlang.org/show_bug.cgi?id=15661
struct X15661
{
@@ -4542,10 +4578,253 @@ void test15661()
/**********************************/
-int main()
+// https://issues.dlang.org/show_bug.cgi?id=18045
+
+struct A18045
+{
+ nothrow:
+ __gshared int r;
+ int state;
+ this(this) { printf("postblit: A(%d)\n", state); r += 1; }
+ ~this() { printf("dtor: A(%d)\n", state); r *= 3; }
+}
+
+A18045 fun18045() nothrow
+{
+ __gshared a = A18045(42);
+ return a;
+}
+
+void test18045() nothrow
+{
+ alias A = A18045;
+
+ __gshared a = A(-42);
+ if (fun18045() == a)
+ assert(0);
+ else
+ assert(A.r == 3);
+
+ A.r = 0;
+ if (a == fun18045())
+ assert(0);
+ else
+ assert(A.r == 3);
+}
+
+/**********************************/
+
+struct S66
+{
+ ~this() { }
+}
+
+nothrow void notthrow() { }
+
+class C66
{
+ S66 s;
+
+ this() nothrow { notthrow(); }
+}
+
+/**********************************/
+// https://issues.dlang.org/show_bug.cgi?id=16652
+
+struct Vector
+{
+ this(ubyte a)
+ {
+ pragma(inline, false);
+ buf = a;
+ }
+
+ ~this()
+ {
+ pragma(inline, false);
+ buf = 0;
+ }
+
+ ubyte buf;
+}
+
+int bar16652(ubyte* v)
+{
+ pragma(inline, true);
+ assert(*v == 1);
+ return 0;
+}
+
+void test16652()
+{
+ bar16652(&Vector(1).buf);
+}
+
+
+/**********************************/
+// https://issues.dlang.org/show_bug.cgi?id=19676
+
+void test19676()
+{
+ static struct S
+ {
+ __gshared int count;
+ ~this() { ++count; }
+ }
+
+ static S foo() { return S(); }
+
+ static void test1()
+ {
+ cast(void)foo();
+ }
+
+ static void test2()
+ {
+ foo();
+ }
+
test1();
+ assert(S.count == 1);
test2();
+ assert(S.count == 2);
+}
+
+/**********************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=14708
+
+__gshared bool dtor14078 = false;
+
+struct S14078
+{
+ int n;
+
+ void* get(void* p = null)
+ {
+ return null;
+ }
+
+ ~this()
+ {
+ //printf("dtor\n");
+ dtor14078 = true;
+ }
+}
+
+S14078 makeS14078(int n)
+{
+ return S14078(n);
+}
+
+void foo14078(void* x)
+{
+ throw new Exception("fail!");
+}
+
+void test(int len = 2)
+{
+ foo14078(makeS14078(1).get());
+ // A temporary is allocated on stack for the
+ // return value from makeS14078(1).
+ // When foo14078 throws exception, it's dtor should be called
+ // during unwinding stack, but it does not happen in Win64.
+}
+
+void test14078()
+{
+ try
+ {
+ test();
+ } catch (Exception e) {}
+ assert(dtor14078); // fails!
+}
+
+/**********************************/
+
+void test67()
+{
+ char[] deleted;
+
+ struct S
+ {
+ char* p;
+
+ ~this() { deleted ~= *p; }
+
+ void opAssign(S rhs)
+ {
+ // swap
+ char* tmp = p;
+ this.p = rhs.p;
+ rhs.p = tmp;
+ }
+ }
+
+ char a = 'a', b = 'b';
+ {
+ S s = S(&a);
+ s = S(&b);
+ }
+ assert(deleted == "ab", deleted);
+}
+
+/**********************************/
+
+void test68()
+{
+ static struct S
+ {
+ int i;
+ bool opEquals(S) { return false; }
+ ~this() {}
+ }
+
+ assert(S(0) != S(1));
+}
+
+/**********************************/
+
+// https://github.com/dlang/dmd/pull/12012
+
+extern (C++)
+{
+struct S12012
+{
+ int* ctr;
+ ~this() { }
+}
+
+void bar12012(int value, S12012 s)
+{
+}
+
+S12012 abc12012(ref S12012 s)
+{
+ s.ctr = null;
+ return s;
+}
+
+int def12012(ref S12012 s)
+{
+ return *s.ctr; // seg fault is here
+}
+
+void testPR12012()
+{
+ int i;
+ S12012 s = S12012(&i);
+ // def must be executed before abc else seg fault
+ bar12012(def12012(s), abc12012(s));
+}
+}
+
+/**********************************/
+
+int main()
+{
+ test1();
+
test3();
test4();
test5();
@@ -4666,12 +4945,21 @@ int main()
test14815();
test16197();
test14860();
+ test14246();
test14696();
test14838();
+ test14639();
test63();
test64();
test65();
test15661();
+ test18045();
+ test16652();
+ test19676();
+ test14078();
+ test67();
+ test68();
+ testPR12012();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/sroa13220.d b/gcc/testsuite/gdc.test/runnable/sroa13220.d
new file mode 100644
index 0000000..2cec666
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/sroa13220.d
@@ -0,0 +1,103 @@
+/* REQUIRED_ARGS: -O -inline -noboundscheck
+ */
+// https://github.com/dlang/pull/13220
+
+version (D_SIMD)
+{
+
+mixin template VectorOps(VectorType, ArrayType: BaseType[N], BaseType, size_t N)
+{
+ enum Count = N;
+ alias Base = BaseType;
+
+ BaseType* ptr() return pure nothrow @nogc
+ {
+ return array.ptr;
+ }
+
+ // Unary operators
+ VectorType opUnary(string op)() pure nothrow @safe @nogc
+ {
+ VectorType res = void;
+ mixin("res.array[] = " ~ op ~ "array[];");
+ return res;
+ }
+
+ // Binary operators
+ VectorType opBinary(string op)(VectorType other) pure const nothrow @safe @nogc
+ {
+ VectorType res = void;
+ mixin("res.array[] = array[] " ~ op ~ " other.array[];");
+ return res;
+ }
+
+ // Assigning a BaseType value
+ void opAssign(BaseType e) pure nothrow @safe @nogc
+ {
+ array[] = e;
+ }
+
+ // Assigning a static array
+ void opAssign(ArrayType v) pure nothrow @safe @nogc
+ {
+ array[] = v[];
+ }
+
+ void opOpAssign(string op)(VectorType other) pure nothrow @safe @nogc
+ {
+ mixin("array[] " ~ op ~ "= other.array[];");
+ }
+
+ // Assigning a dyn array
+ this(ArrayType v) pure nothrow @safe @nogc
+ {
+ array[] = v[];
+ }
+
+ // Broadcast constructor
+ this(BaseType x) pure nothrow @safe @nogc
+ {
+ array[] = x;
+ }
+
+ ref inout(BaseType) opIndex(size_t i) inout pure nothrow @safe @nogc
+ {
+ return array[i];
+ }
+}
+
+// Note: can't be @safe with this signature
+Vec loadUnaligned(Vec)(const(BaseType!Vec)* pvec) @trusted
+{
+ // Since this vector is emulated, it doesn't have alignement constraints
+ // and as such we can just cast it.
+ return *cast(Vec*)(pvec);
+}
+
+private template BaseType(V)
+{
+ alias typeof( ( { V v; return v; }()).array[0]) BaseType;
+}
+
+struct int4
+{
+ int[4] array;
+ mixin VectorOps!(int4, int[4]);
+}
+
+alias __m128i = int4;
+}
+
+int main()
+{
+ version (D_SIMD)
+ {
+ int4 A = [1, 2, 3, 4];
+ int4 ia = A;
+ ia.ptr[2] = 5;
+ int4 C = ia;
+ int[4] result = [1, 2, 5, 4];
+ assert(C.array == result);
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/statictor.d b/gcc/testsuite/gdc.test/runnable/statictor.d
index 7e34bd1..b00277b 100644
--- a/gcc/testsuite/gdc.test/runnable/statictor.d
+++ b/gcc/testsuite/gdc.test/runnable/statictor.d
@@ -1,7 +1,19 @@
-// PERMUTE_ARGS:
-// POST_SCRIPT: runnable/extra-files/statictor-postscript.sh
+/*
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+shared static this()
+Foo static ctor
+static ctor
+Bar static ctor
+Bar static dtor
+static dtor
+Foo static dtor
+shared static this()
+---
+*/
-private import std.stdio;
+private import core.stdc.stdio;
class Foo
{
@@ -29,7 +41,7 @@ class Bar
}
/***********************************************/
-// 6677
+// https://issues.dlang.org/show_bug.cgi?id=6677
int global6677;
@@ -50,7 +62,7 @@ shared static this() nothrow pure @safe
}
/***********************************************/
-// 7533
+// https://issues.dlang.org/show_bug.cgi?id=7533
struct Foo7533(int n)
{
pure static this() { }
@@ -64,4 +76,3 @@ int main()
{
return 0;
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/stress.d b/gcc/testsuite/gdc.test/runnable/stress.d
index a8c6c91..66373c4 100644
--- a/gcc/testsuite/gdc.test/runnable/stress.d
+++ b/gcc/testsuite/gdc.test/runnable/stress.d
@@ -83,10 +83,10 @@ void MDCHAR()
str[idx] = str[idx] ~ "TEST LINE\n";
}
- if(str.length != ITERS) printf("Length Error: %d\n",str.length);
- if(str[0].length != 10) printf("Length Error: %d\n",str[0].length);
- if(str[ITERS-1].sizeof != (typ[]).sizeof) printf("Size Error: %d\n",str[ITERS-1].sizeof);
- if(str[ITERS-1][0].sizeof != (typ).sizeof) printf("Size Error: %d\n",str[ITERS-1][0].sizeof);
+ if(str.length != ITERS) printf("Length Error: %zd\n",str.length);
+ if(str[0].length != 10) printf("Length Error: %zd\n",str[0].length);
+ if(str[ITERS-1].sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",str[ITERS-1].sizeof);
+ if(str[ITERS-1][0].sizeof != (typ).sizeof) printf("Size Error: %zd\n",str[ITERS-1][0].sizeof);
foreach(s; str) {
size_t lstart;
@@ -131,8 +131,8 @@ void CHAR()
str = str ~ "TEST LINE\n";
}
- if(str.length != (ITERS * 10)) printf("Length Error: %d\n",str.length);
- if(str.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",str.sizeof);
+ if(str.length != (ITERS * 10)) printf("Length Error: %zd\n",str.length);
+ if(str.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",str.sizeof);
size_t lstart;
foreach(size_t idx, char c; str) {
@@ -156,8 +156,8 @@ void WCHAR()
str = str ~ toUTF16(cast(char[])"TEST LINE\n");
}
- if(str.length != (ITERS * 10)) printf("Length Error: %d\n",str.length);
- if(str.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",str.sizeof);
+ if(str.length != (ITERS * 10)) printf("Length Error: %zd\n",str.length);
+ if(str.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",str.sizeof);
size_t lstart;
foreach(size_t idx, char c; str) {
@@ -181,8 +181,8 @@ void DCHAR()
str = str ~ toUTF32(cast(char[])"TEST LINE\n");
}
- if(str.length != (ITERS * 10)) printf("Length Error: %d\n",str.length);
- if(str.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",str.sizeof);
+ if(str.length != (ITERS * 10)) printf("Length Error: %zd\n",str.length);
+ if(str.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",str.sizeof);
size_t lstart;
foreach(size_t idx, char c; str) {
@@ -206,8 +206,8 @@ void BYTE()
a ~= idx;
}
- if(a.length != ITERS) printf("Length Error: %d\n",a.length);
- if(a.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",a.sizeof);
+ if(a.length != ITERS) printf("Length Error: %zd\n",a.length);
+ if(a.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",a.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(a[idx] != idx) {
printf("a Data Error: %d\n",a[idx]);
@@ -218,8 +218,8 @@ void BYTE()
typ[] b = a[];
- if(b.length != ITERS) printf("Length Error: %d\n",b.length);
- if(b.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",b.sizeof);
+ if(b.length != ITERS) printf("Length Error: %zd\n",b.length);
+ if(b.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",b.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(b[idx] != idx) {
printf("b Data Error: %d\n",b[idx]);
@@ -230,8 +230,8 @@ void BYTE()
c = a[0..ITERS/2] ~ b[ITERS/2..$];
- if(c.length != ITERS) printf("Length Error: %d\n",c.length);
- if(c.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",c.sizeof);
+ if(c.length != ITERS) printf("Length Error: %zd\n",c.length);
+ if(c.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",c.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(c[idx] != idx) {
printf("c Data Error: %d\n",c[idx]);
@@ -250,8 +250,8 @@ void UBYTE()
a ~= idx;
}
- if(a.length != ITERS) printf("Length Error: %d\n",a.length);
- if(a.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",a.sizeof);
+ if(a.length != ITERS) printf("Length Error: %zd\n",a.length);
+ if(a.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",a.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(a[idx] != idx) {
printf("a Data Error: %d\n",a[idx]);
@@ -262,8 +262,8 @@ void UBYTE()
typ[] b = a[];
- if(b.length != ITERS) printf("Length Error: %d\n",b.length);
- if(b.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",b.sizeof);
+ if(b.length != ITERS) printf("Length Error: %zd\n",b.length);
+ if(b.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",b.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(b[idx] != idx) {
printf("b Data Error: %d\n",b[idx]);
@@ -275,8 +275,8 @@ void UBYTE()
c = a[0..ITERS/2] ~ b[ITERS/2..$];
- if(c.length != ITERS) printf("Length Error: %d\n",c.length);
- if(c.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",c.sizeof);
+ if(c.length != ITERS) printf("Length Error: %zd\n",c.length);
+ if(c.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",c.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(c[idx] != idx) {
printf("c Data Error: %d\n",c[idx]);
@@ -295,8 +295,8 @@ void SHORT()
a ~= idx;
}
- if(a.length != ITERS) printf("Length Error: %d\n",a.length);
- if(a.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",a.sizeof);
+ if(a.length != ITERS) printf("Length Error: %zd\n",a.length);
+ if(a.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",a.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(a[idx] != idx) {
printf("a Data Error: %d\n",a[idx]);
@@ -306,8 +306,8 @@ void SHORT()
typ[] b = a[];
- if(b.length != ITERS) printf("Length Error: %d\n",b.length);
- if(b.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",b.sizeof);
+ if(b.length != ITERS) printf("Length Error: %zd\n",b.length);
+ if(b.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",b.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(b[idx] != idx) {
printf("b Data Error: %d\n",b[idx]);
@@ -319,8 +319,8 @@ void SHORT()
c = a[0..ITERS/2] ~ b[ITERS/2..$];
- if(c.length != ITERS) printf("Length Error: %d\n",c.length);
- if(c.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",c.sizeof);
+ if(c.length != ITERS) printf("Length Error: %zd\n",c.length);
+ if(c.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",c.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(c[idx] != idx) {
printf("c Data Error: %d\n",c[idx]);
@@ -339,8 +339,8 @@ void USHORT()
a ~= idx;
}
- if(a.length != ITERS) printf("Length Error: %d\n",a.length);
- if(a.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",a.sizeof);
+ if(a.length != ITERS) printf("Length Error: %zd\n",a.length);
+ if(a.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",a.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(a[idx] != idx) {
printf("a Data Error: %d\n",a[idx]);
@@ -350,8 +350,8 @@ void USHORT()
typ[] b = a[];
- if(b.length != ITERS) printf("Length Error: %d\n",b.length);
- if(b.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",b.sizeof);
+ if(b.length != ITERS) printf("Length Error: %zd\n",b.length);
+ if(b.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",b.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(b[idx] != idx) {
printf("b Data Error: %d\n",b[idx]);
@@ -363,8 +363,8 @@ void USHORT()
c = a[0..ITERS/2] ~ b[ITERS/2..$];
- if(c.length != ITERS) printf("Length Error: %d\n",c.length);
- if(c.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",c.sizeof);
+ if(c.length != ITERS) printf("Length Error: %zd\n",c.length);
+ if(c.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",c.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(c[idx] != idx) {
printf("c Data Error: %d\n",c[idx]);
@@ -383,8 +383,8 @@ void INT()
a ~= idx;
}
- if(a.length != ITERS) printf("Length Error: %d\n",a.length);
- if(a.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",a.sizeof);
+ if(a.length != ITERS) printf("Length Error: %zd\n",a.length);
+ if(a.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",a.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(a[idx] != idx) {
printf("a Data Error: %d\n",a[idx]);
@@ -395,8 +395,8 @@ void INT()
typ[] b = a[];
- if(b.length != ITERS) printf("Length Error: %d\n",b.length);
- if(b.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",b.sizeof);
+ if(b.length != ITERS) printf("Length Error: %zd\n",b.length);
+ if(b.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",b.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(b[idx] != idx) {
printf("b Data Error: %d\n",b[idx]);
@@ -408,8 +408,8 @@ void INT()
c = a[0..ITERS/2] ~ b[ITERS/2..$];
- if(c.length != ITERS) printf("Length Error: %d\n",c.length);
- if(c.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",c.sizeof);
+ if(c.length != ITERS) printf("Length Error: %zd\n",c.length);
+ if(c.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",c.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(c[idx] != idx) {
printf("c Data Error: %d\n",c[idx]);
@@ -428,8 +428,8 @@ void UINT()
a ~= idx;
}
- if(a.length != ITERS) printf("Length Error: %d\n",a.length);
- if(a.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",a.sizeof);
+ if(a.length != ITERS) printf("Length Error: %zd\n",a.length);
+ if(a.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",a.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(a[idx] != idx) {
printf("a Data Error: %d\n",a[idx]);
@@ -440,8 +440,8 @@ void UINT()
typ[] b = a[];
- if(b.length != ITERS) printf("Length Error: %d\n",b.length);
- if(b.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",b.sizeof);
+ if(b.length != ITERS) printf("Length Error: %zd\n",b.length);
+ if(b.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",b.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(b[idx] != idx) {
printf("b Data Error: %d\n",b[idx]);
@@ -453,8 +453,8 @@ void UINT()
c = a[0..ITERS/2] ~ b[ITERS/2..$];
- if(c.length != ITERS) printf("Length Error: %d\n",c.length);
- if(c.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",c.sizeof);
+ if(c.length != ITERS) printf("Length Error: %zd\n",c.length);
+ if(c.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",c.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(c[idx] != idx) {
printf("c Data Error: %d\n",c[idx]);
@@ -473,22 +473,22 @@ void LONG()
a ~= idx;
}
- if(a.length != ITERS) printf("Length Error: %d\n",a.length);
- if(a.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",a.sizeof);
+ if(a.length != ITERS) printf("Length Error: %zd\n",a.length);
+ if(a.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",a.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(a[idx] != idx) {
- printf("a Data Error: %d\n",a[idx]);
+ printf("a Data Error: %lld\n",a[idx]);
break;
}
}
typ[] b = a[];
- if(b.length != ITERS) printf("Length Error: %d\n",b.length);
- if(b.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",b.sizeof);
+ if(b.length != ITERS) printf("Length Error: %zd\n",b.length);
+ if(b.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",b.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(b[idx] != idx) {
- printf("b Data Error: %d\n",b[idx]);
+ printf("b Data Error: %lld\n",b[idx]);
break;
}
}
@@ -497,11 +497,11 @@ void LONG()
c = a[0..ITERS/2] ~ b[ITERS/2..$];
- if(c.length != ITERS) printf("Length Error: %d\n",c.length);
- if(c.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",c.sizeof);
+ if(c.length != ITERS) printf("Length Error: %zd\n",c.length);
+ if(c.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",c.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(c[idx] != idx) {
- printf("c Data Error: %d\n",c[idx]);
+ printf("c Data Error: %lld\n",c[idx]);
break;
}
}
@@ -517,22 +517,22 @@ void ULONG()
a ~= idx;
}
- if(a.length != ITERS) printf("Length Error: %d\n",a.length);
- if(a.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",a.sizeof);
+ if(a.length != ITERS) printf("Length Error: %zd\n",a.length);
+ if(a.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",a.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(a[idx] != idx) {
- printf("a Data Error: %d\n",a[idx]);
+ printf("a Data Error: %lld\n",a[idx]);
break;
}
}
typ[] b = a[];
- if(b.length != ITERS) printf("Length Error: %d\n",b.length);
- if(b.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",b.sizeof);
+ if(b.length != ITERS) printf("Length Error: %zd\n",b.length);
+ if(b.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",b.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(b[idx] != idx) {
- printf("b Data Error: %d\n",b[idx]);
+ printf("b Data Error: %lld\n",b[idx]);
break;
}
}
@@ -541,11 +541,11 @@ void ULONG()
c = a[0..ITERS/2] ~ b[ITERS/2..$];
- if(c.length != ITERS) printf("Length Error: %d\n",c.length);
- if(c.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",c.sizeof);
+ if(c.length != ITERS) printf("Length Error: %zd\n",c.length);
+ if(c.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",c.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(c[idx] != idx) {
- printf("c Data Error: %d\n",c[idx]);
+ printf("c Data Error: %lld\n",c[idx]);
break;
}
}
@@ -561,22 +561,22 @@ void FLOAT()
a ~= idx;
}
- if(a.length != ITERS) printf("Length Error: %d\n",a.length);
- if(a.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",a.sizeof);
+ if(a.length != ITERS) printf("Length Error: %zd\n",a.length);
+ if(a.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",a.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(a[idx] != idx) {
- printf("a Data Error: %d\n",a[idx]);
+ printf("a Data Error: %g\n",a[idx]);
break;
}
}
typ[] b = a[];
- if(b.length != ITERS) printf("Length Error: %d\n",b.length);
- if(b.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",b.sizeof);
+ if(b.length != ITERS) printf("Length Error: %zd\n",b.length);
+ if(b.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",b.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(b[idx] != idx) {
- printf("b Data Error: %d\n",b[idx]);
+ printf("b Data Error: %g\n",b[idx]);
break;
}
}
@@ -585,11 +585,11 @@ void FLOAT()
c = a[0..ITERS/2] ~ b[ITERS/2..$];
- if(c.length != ITERS) printf("Length Error: %d\n",c.length);
- if(c.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",c.sizeof);
+ if(c.length != ITERS) printf("Length Error: %zd\n",c.length);
+ if(c.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",c.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(c[idx] != idx) {
- printf("c Data Error: %d\n",c[idx]);
+ printf("c Data Error: %g\n",c[idx]);
break;
}
}
@@ -605,22 +605,22 @@ void DOUBLE()
a ~= idx;
}
- if(a.length != ITERS) printf("Length Error: %d\n",a.length);
- if(a.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",a.sizeof);
+ if(a.length != ITERS) printf("Length Error: %zd\n",a.length);
+ if(a.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",a.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(a[idx] != idx) {
- printf("a Data Error: %d\n",a[idx]);
+ printf("a Data Error: %g\n",a[idx]);
break;
}
}
typ[] b = a[];
- if(b.length != ITERS) printf("Length Error: %d\n",b.length);
- if(b.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",b.sizeof);
+ if(b.length != ITERS) printf("Length Error: %zd\n",b.length);
+ if(b.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",b.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(b[idx] != idx) {
- printf("b Data Error: %d\n",b[idx]);
+ printf("b Data Error: %g\n",b[idx]);
break;
}
}
@@ -629,11 +629,11 @@ void DOUBLE()
c = a[0..ITERS/2] ~ b[ITERS/2..$];
- if(c.length != ITERS) printf("Length Error: %d\n",c.length);
- if(c.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",c.sizeof);
+ if(c.length != ITERS) printf("Length Error: %zd\n",c.length);
+ if(c.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",c.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(c[idx] != idx) {
- printf("c Data Error: %d\n",c[idx]);
+ printf("c Data Error: %g\n",c[idx]);
break;
}
}
@@ -649,22 +649,22 @@ void REAL()
a ~= idx;
}
- if(a.length != ITERS) printf("Length Error: %d\n",a.length);
- if(a.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",a.sizeof);
+ if(a.length != ITERS) printf("Length Error: %zd\n",a.length);
+ if(a.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",a.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(a[idx] != idx) {
- printf("a Data Error: %d\n",a[idx]);
+ printf("a Data Error: %Lg\n",a[idx]);
break;
}
}
typ[] b = a[];
- if(b.length != ITERS) printf("Length Error: %d\n",b.length);
- if(b.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",b.sizeof);
+ if(b.length != ITERS) printf("Length Error: %zd\n",b.length);
+ if(b.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",b.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(b[idx] != idx) {
- printf("b Data Error: %d\n",b[idx]);
+ printf("b Data Error: %Lg\n",b[idx]);
break;
}
}
@@ -673,11 +673,11 @@ void REAL()
c = a[0..ITERS/2] ~ b[ITERS/2..$];
- if(c.length != ITERS) printf("Length Error: %d\n",c.length);
- if(c.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",c.sizeof);
+ if(c.length != ITERS) printf("Length Error: %zd\n",c.length);
+ if(c.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",c.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(c[idx] != idx) {
- printf("c Data Error: %d\n",c[idx]);
+ printf("c Data Error: %Lg\n",c[idx]);
break;
}
}
@@ -694,8 +694,8 @@ void CLASS()
a ~= tc;
}
- if(a.length != ITERS) printf("Length Error: %d\n",a.length);
- if(a.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",a.sizeof);
+ if(a.length != ITERS) printf("Length Error: %zd\n",a.length);
+ if(a.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",a.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(a[idx].i != idx) {
printf("a Data Error: %d\n",a[idx].i);
@@ -705,8 +705,8 @@ void CLASS()
typ[] b = a[];
- if(b.length != ITERS) printf("Length Error: %d\n",b.length);
- if(b.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",b.sizeof);
+ if(b.length != ITERS) printf("Length Error: %zd\n",b.length);
+ if(b.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",b.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(b[idx].i != idx) {
printf("b Data Error: %d\n",b[idx].i);
@@ -717,8 +717,8 @@ void CLASS()
typ[] c;
c = a[0..ITERS/2] ~ b[ITERS/2..$];
- if(c.length != ITERS) printf("Length Error: %d\n",c.length);
- if(c.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",c.sizeof);
+ if(c.length != ITERS) printf("Length Error: %zd\n",c.length);
+ if(c.sizeof != (typ[]).sizeof) printf("Size Error: %zd\n",c.sizeof);
for(int idx = 0; idx < ITERS; idx++) {
if(c[idx].i != idx) {
printf("c Data Error: %d\n",c[idx].i);
diff --git a/gcc/testsuite/gdc.test/runnable/structlit.d b/gcc/testsuite/gdc.test/runnable/structlit.d
index 38af612..d4a6bd6 100644
--- a/gcc/testsuite/gdc.test/runnable/structlit.d
+++ b/gcc/testsuite/gdc.test/runnable/structlit.d
@@ -1,4 +1,12 @@
-import std.stdio;
+/*
+REQUIRED_ARGS: -preview=rvaluerefparam
+RUN_OUTPUT:
+---
+Success
+---
+*/
+
+import core.stdc.stdio;
struct S
{
@@ -318,13 +326,13 @@ int waz14(S)(ref S s) { return 2; }
void test14()
{
- // can not bind rvalue-sl with ref
- static assert(!__traits(compiles, foo14(S14a(0))));
- static assert(!__traits(compiles, foo14(S14b(0))));
- static assert(!__traits(compiles, hoo14(S14a(0))));
- static assert(!__traits(compiles, hoo14(S14b(0))));
- static assert(!__traits(compiles, poo14(S14a(0))));
- static assert(!__traits(compiles, poo14(S14b(0))));
+ // can bind rvalue-sl with ref
+ foo14(S14a(0));
+ foo14(S14b(0));
+ hoo14(S14a(0));
+ hoo14(S14b(0));
+ poo14(S14a(0));
+ poo14(S14b(0));
// still can bind rvalue-sl with non-ref
bar14(S14a(0));
@@ -491,7 +499,7 @@ void test15c()
auto c2 = new immutable C(1);
}
-void test15d() // Bugzilla 9974
+void test15d() // https://issues.dlang.org/show_bug.cgi?id=9974
{
class CM { this() {} }
auto cm = new CM();
@@ -525,7 +533,7 @@ void test15d() // Bugzilla 9974
shared const ssc = new shared const SSC(1);
}
-void test15e() // Bugzilla 10005
+void test15e() // https://issues.dlang.org/show_bug.cgi?id=10005
{
// struct literal
static struct S
@@ -642,7 +650,7 @@ void test9993b()
}
/********************************************/
-// 1914
+// https://issues.dlang.org/show_bug.cgi?id=1914
struct Bug1914a
{
@@ -703,7 +711,7 @@ void test3198and1914()
}
/********************************************/
-// 14996
+// https://issues.dlang.org/show_bug.cgi?id=14996
enum E14996a : string { confirm = "confirm" }
enum E14996b : long[] { confirm = [1,2,3,4] }
@@ -715,7 +723,7 @@ struct S14996
}
/********************************************/
-// 2427
+// https://issues.dlang.org/show_bug.cgi?id=2427
void test2427()
{
@@ -755,7 +763,7 @@ void test5885()
}
/********************************************/
-// 5889
+// https://issues.dlang.org/show_bug.cgi?id=5889
struct S5889a { int n; }
struct S5889b { this(int n){} }
@@ -812,7 +820,7 @@ void test5889()
}
/********************************************/
-// 4147
+// https://issues.dlang.org/show_bug.cgi?id=4147
struct S4247
{
@@ -829,7 +837,7 @@ void test4247()
}
/********************************************/
-// 6937
+// https://issues.dlang.org/show_bug.cgi?id=6937
void test6937()
{
@@ -885,7 +893,7 @@ void test6937()
}
/********************************************/
-// 12681
+// https://issues.dlang.org/show_bug.cgi?id=12681
struct HasUnion12774
{
@@ -930,7 +938,7 @@ bool test12681()
static assert(test12681());
/********************************************/
-// 3991
+// https://issues.dlang.org/show_bug.cgi?id=3991
union X3991
{
@@ -940,8 +948,8 @@ union X3991
union Y3991
{
- int a = void;
dchar b = 'a';
+ int a = void;
}
union Z3991
@@ -962,7 +970,7 @@ void test3991()
}
/********************************************/
-// 7727
+// https://issues.dlang.org/show_bug.cgi?id=7727
union U7727A1 { int i; double d; }
union U7727A2 { int i = 123; double d; }
@@ -990,7 +998,7 @@ void test7727()
{ U7727A2 u = { i: 1024, d: 1.225 }; }
));
-// Blocked by issue 1432
+// Blocked by https://issues.dlang.org/show_bug.cgi?id=1432
// { U7727A3 u; assert(u.d == 2.5); }
// { U7727A3 u = { i: 1024 }; assert(u.i == 1024); }
// { U7727A3 u = { d: 1.225 }; assert(u.d == 1.225); }
@@ -1012,7 +1020,7 @@ void test7727()
{ U7727B2 u = { i: 1024, d: 1.225 }; }
));
-// Blocked by issue 1432
+// Blocked by https://issues.dlang.org/show_bug.cgi?id=1432
// { U7727B3 u; assert(u.i == 123); }
// { U7727B3 u = { i: 1024 }; assert(u.i == 1024); }
// { U7727B3 u = { d: 1.225 }; assert(u.d == 1.225); }
@@ -1058,7 +1066,7 @@ void test7727b()
}
/********************************************/
-// 7929
+// https://issues.dlang.org/show_bug.cgi?id=7929
void test7929()
{
@@ -1076,7 +1084,7 @@ void test7929()
}
/********************************************/
-// 7021
+// https://issues.dlang.org/show_bug.cgi?id=7021
struct S7021
{
@@ -1091,7 +1099,7 @@ void test7021()
}
/********************************************/
-// 8738
+// https://issues.dlang.org/show_bug.cgi?id=8738
void test8738()
{
@@ -1108,7 +1116,7 @@ void test8738()
}
/********************************************/
-// 8763
+// https://issues.dlang.org/show_bug.cgi?id=8763
void test8763()
{
@@ -1128,7 +1136,7 @@ void test8763()
}
/********************************************/
-// 8902
+// https://issues.dlang.org/show_bug.cgi?id=8902
union U8902 { int a, b; }
@@ -1146,7 +1154,7 @@ void test8902()
}
/********************************************/
-// 9116
+// https://issues.dlang.org/show_bug.cgi?id=9116
void test9116()
{
@@ -1167,7 +1175,7 @@ void test9116()
}
/********************************************/
-// 9293
+// https://issues.dlang.org/show_bug.cgi?id=9293
void test9293()
{
@@ -1192,7 +1200,7 @@ void test9293()
}
/********************************************/
-// 9566
+// https://issues.dlang.org/show_bug.cgi?id=9566
void test9566()
{
@@ -1205,7 +1213,7 @@ void test9566()
}
/********************************************/
-// 9775
+// https://issues.dlang.org/show_bug.cgi?id=9775
enum Month9775 : ubyte { jan = 1, }
struct Date9775
@@ -1227,7 +1235,7 @@ enum Date9775 date9775e1 = Date9775(2012, 12, 21);
enum date9775e2 = Date9775(2012, 12, 21);
/********************************************/
-// 11105
+// https://issues.dlang.org/show_bug.cgi?id=11105
struct S11105
{
@@ -1240,7 +1248,7 @@ void test11105()
}
/********************************************/
-// 11147
+// https://issues.dlang.org/show_bug.cgi?id=11147
struct V11147
{
@@ -1273,7 +1281,7 @@ void test11147()
}
/********************************************/
-// 11256
+// https://issues.dlang.org/show_bug.cgi?id=11256
struct S11256 { @disable this(); }
@@ -1311,7 +1319,7 @@ void test11256()
}
/********************************************/
-// 11269
+// https://issues.dlang.org/show_bug.cgi?id=11269
struct Atom
{
@@ -1336,7 +1344,7 @@ void test11269()
}
/********************************************/
-// 11427
+// https://issues.dlang.org/show_bug.cgi?id=11427
struct S11427
{
@@ -1356,7 +1364,7 @@ int foo11427() @safe
}
/********************************************/
-// 12011
+// https://issues.dlang.org/show_bug.cgi?id=12011
struct S12011a
{
@@ -1379,7 +1387,7 @@ void test12011()
}
/********************************************/
-// 13021
+// https://issues.dlang.org/show_bug.cgi?id=13021
void test13021()
{
@@ -1417,7 +1425,7 @@ void test13021()
}
/********************************************/
-// 14556
+// https://issues.dlang.org/show_bug.cgi?id=14556
enum E14556 { a = 1 }
diff --git a/gcc/testsuite/gdc.test/runnable/template1.d b/gcc/testsuite/gdc.test/runnable/template1.d
index 51f96bf..ed237d8 100644
--- a/gcc/testsuite/gdc.test/runnable/template1.d
+++ b/gcc/testsuite/gdc.test/runnable/template1.d
@@ -715,7 +715,7 @@ public template TRange29(T) {
recursing = false;
}
}
- } body {
+ } do {
return contains(other.lower()) || contains(other.upper()) || other.includes(this);
}
public bool includes(Range other)
@@ -723,7 +723,7 @@ public template TRange29(T) {
assert(other !is null);
} out (result) {
assert(result == (contains(other.lower()) && contains(other.upper())));
- } body {
+ } do {
return contains(other.lower()) && contains(other.upper());
}
}
@@ -771,22 +771,22 @@ void test30()
assert(i == 3);
copystr.copy(s, "Here it comes");
- printf("%.*s\n", s.length, s.ptr);
+ printf("%.*s\n", cast(int)s.length, s.ptr);
assert(s == "Here it comes");
}
/******************************************/
-import std.string;
+import core.demangle;
template Foo31(alias X)
{
- alias X.toStringz y;
+ alias X.demangle y;
}
void test31()
{
- alias Foo31!(std.string) bar;
+ alias Foo31!(core.demangle) bar;
}
@@ -1367,7 +1367,7 @@ void test56()
{
alias CT56!(int) Ct;
Ct.C c= new Ct.C();
- printf("%.*s\n", c.arrArr[0].length, c.arrArr[0].ptr);
+ printf("%.*s\n", cast(int)c.arrArr[0].length, c.arrArr[0].ptr);
assert(c.arrArr[0] == "foo");
}
@@ -1449,15 +1449,15 @@ void test60()
B60!(int, long).Thing thing1;
B60!(int).Thing thing2;
- printf("thing1.sizeof: %u\n", thing1.sizeof);
- printf("thing2.sizeof: %u\n", thing2.sizeof);
+ printf("thing1.sizeof: %zu\n", thing1.sizeof);
+ printf("thing2.sizeof: %zu\n", thing2.sizeof);
assert(thing1.sizeof == long.alignof + long.sizeof);
assert(thing2.sizeof == 8);
C60!(int /*,A60*/ ) container1;
- printf("container1.sizeof: %u\n", container1.sizeof);
+ printf("container1.sizeof: %zu\n", container1.sizeof);
assert(container1.sizeof == (void*).sizeof);
}
@@ -1554,7 +1554,7 @@ void test64()
}
/******************************************/
-// http://www.digitalmars.com/d/archives/28052.html
+// https://www.digitalmars.com/d/archives/28052.html
alias int value_type;
@@ -1604,7 +1604,7 @@ template Foo67(alias T)
{
void Foo67()
{
- printf("T = '%.*s'\n", T.length, T.ptr);
+ printf("T = '%.*s'\n", cast(int)T.length, T.ptr);
assert(T == "hello");
}
}
@@ -1620,7 +1620,7 @@ void test67()
/******************************************/
template T68(int a) {
- int vec[a];
+ int[a] vec;
}
void test68()
@@ -1637,7 +1637,7 @@ void test68()
size_t printx(string s)
{
- printf("s = '%.*s'\n", s.length, s.ptr);
+ printf("s = '%.*s'\n", cast(int)s.length, s.ptr);
return s.length;
}
@@ -1735,8 +1735,8 @@ void test72()
static ulong[5] a = [0,1,2,3,4];
static uint[5] b = [0,1,2,3,4];
char[] r;
- r = foo72!(ulong[5])(a); printf("%.*s\n", r.length, r.ptr);
- r = foo72!(uint[5])(b); printf("%.*s\n", r.length, r.ptr);
+ r = foo72!(ulong[5])(a); printf("%.*s\n", cast(int)r.length, r.ptr);
+ r = foo72!(uint[5])(b); printf("%.*s\n", cast(int)r.length, r.ptr);
}
@@ -1923,7 +1923,7 @@ specialization:: first int
/******************************************/
-// http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2117
+// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/2117.html
class Conversion(T,U){
alias char Small;
diff --git a/gcc/testsuite/gdc.test/runnable/template13478.d b/gcc/testsuite/gdc.test/runnable/template13478.d
index 7fa7a18..b7b9709 100644
--- a/gcc/testsuite/gdc.test/runnable/template13478.d
+++ b/gcc/testsuite/gdc.test/runnable/template13478.d
@@ -1,3 +1,5 @@
+// EXTRA_FILES: imports/template13478a.d imports/template13478b.d
+
/// Tests emission of templates also referenced in speculative contexts.
/// Failure triggered with -inline.
module template13478;
diff --git a/gcc/testsuite/gdc.test/runnable/template2.d b/gcc/testsuite/gdc.test/runnable/template2.d
index 3adaeae..234cb71 100644
--- a/gcc/testsuite/gdc.test/runnable/template2.d
+++ b/gcc/testsuite/gdc.test/runnable/template2.d
@@ -1,17 +1,16 @@
-// RUNNABLE_PHOBOS_TEST
// original post to the D newsgroup:
-// http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=D&artnum=10554&header
+// https://www.digitalmars.com/d/archives/10510.html#N10554
// Test to manipulate 3D vectors, in D!
// by Sean L Palmer (seanpalmer@directvinternet.com)
// This code is released without any warranty. Use at your own risk.
import core.stdc.stdio;
-import std.math : sqrt;
+import core.math : sqrt;
template VecTemplate(tfloat, int dim:3)
{
struct Vector
{
- tfloat d[dim];
+ tfloat[dim] d;
version(none)
{
@@ -21,24 +20,24 @@ template VecTemplate(tfloat, int dim:3)
bool opEquals(Vector b) { for (int i=0; i<dim; ++i) if (d[i] != b.d[i]) return
false; return true; }
// negate (-a)
- Vector opNeg() { Vector r; for (int i=0; i<dim; ++i) r.d[i] = -d[i]; return
+ Vector opUnary(string op : "-")() { Vector r; for (int i=0; i<dim; ++i) r.d[i] = -d[i]; return
r; }
// complement (~a)
- Vector opCom() { Vector r; for (int i=0; i<dim; ++i) r.d[i] = d[(i+1)%dim];
+ Vector opUnary(string op : "~")() { Vector r; for (int i=0; i<dim; ++i) r.d[i] = d[(i+1)%dim];
d[0] = -d[0]; return r; }
// add (a + b)
- Vector opAdd(Vector b) { Vector r; r.d[] = d[] + b.d[]; return r; }
+ Vector opBinary(string op : "+")(Vector b) { Vector r; r.d[] = d[] + b.d[]; return r; }
// addto (a += b)
- Vector opAddAssign(Vector b) { d[] += b.d[]; return r; }
+ Vector opOpAssign(string op : "+")(Vector b) { d[] += b.d[]; return r; }
// subtract (a - b)
- Vector opSub(Vector b) { Vector r; r.d[] = d[] - b.d[]; return r; }
+ Vector opBinary(string op : "-")(Vector b) { Vector r; r.d[] = d[] - b.d[]; return r; }
// multiply by scalar (a * 2.0)
- Vector opMul(tfloat b) { Vector r; for (int i=0; i<dim; ++i) r.d[i] = d[i]
+ Vector opBinary(string op : "*")(tfloat b) { Vector r; for (int i=0; i<dim; ++i) r.d[i] = d[i]
* b; return r; }
// divide by scalar (a / b)
- Vector opDiv(tfloat b) { return *this * (1/b); }
+ Vector opBinary(string op : "/")(tfloat b) { return *this * (1/b); }
// dot product (a * b)
- tfloat opMul(Vector b) { tfloat r=0; for (int i=0; i<dim; ++i) r += d[i];
+ tfloat opBinary(string op : "*")(Vector b) { tfloat r=0; for (int i=0; i<dim; ++i) r += d[i];
return r; }
// outer product (a ^ b)
//Vector opXor(Vector b) { Vector r; for (int i=0; i<dim; ++i) r += d[i]; return r; }
@@ -49,27 +48,27 @@ return r; }
const bool opEquals(ref const Vector b) { for (int i=0; i<dim; ++i) if (d[i] != b.d[i]) return
false; return true; }
// negate (-a)
- Vector opNeg() { Vector r; for (int i=0; i<dim; ++i) r.d[i] = -d[i]; return
+ Vector opUnary(string op : "-")() { Vector r; for (int i=0; i<dim; ++i) r.d[i] = -d[i]; return
r; }
// complement (~a)
- Vector opCom() { Vector r; for (int i=0; i<dim; ++i) r.d[i] = d[(i+1)%dim];
+ Vector opUnary(string op : "~")() { Vector r; for (int i=0; i<dim; ++i) r.d[i] = d[(i+1)%dim];
d[0] = -d[0]; return r; }
// add (a + b)
- Vector opAdd(Vector b) { Vector r; for (int i=0; i<dim; ++i) r.d[i] = d[i] +
+ Vector opBinary(string op : "+")(Vector b) { Vector r; for (int i=0; i<dim; ++i) r.d[i] = d[i] +
b.d[i]; return r; }
// addto (a += b)
- Vector opAddAssign(Vector b) { for (int i=0; i<dim; ++i) d[i] += b.d[i]; return
+ Vector opOpAssign(string op : "+")(Vector b) { for (int i=0; i<dim; ++i) d[i] += b.d[i]; return
this; }
// subtract (a - b)
- Vector opSub(Vector b) { Vector r; for (int i=0; i<dim; ++i) r.d[i] = d[i] -
+ Vector opBinary(string op : "-")(Vector b) { Vector r; for (int i=0; i<dim; ++i) r.d[i] = d[i] -
b.d[i]; return r; }
// multiply by scalar (a * 2.0)
- Vector opMul(tfloat b) { Vector r; for (int i=0; i<dim; ++i) r.d[i] = d[i] *
+ Vector opBinary(string op : "*")(tfloat b) { Vector r; for (int i=0; i<dim; ++i) r.d[i] = d[i] *
b; return r; }
// divide by scalar (a / b)
- Vector opDiv(tfloat b) { return this * (1/b); }
+ Vector opBinary(string op : "/")(tfloat b) { return this * (1/b); }
// dot product (a * b)
- tfloat opMul(Vector b) { tfloat r=0; for (int i=0; i<dim; ++i) r += d[i];
+ tfloat opBinary(string op : "*")(Vector b) { tfloat r=0; for (int i=0; i<dim; ++i) r += d[i];
return r; }
// outer product (a ^ b)
//Vector opXor(Vector b) { Vector r; for (int i=0; i<dim; ++i) r += d[i]; return r; }
@@ -110,6 +109,3 @@ int main(char[][] args)
printf("closing\n");
return 0;
}
-
-
-
diff --git a/gcc/testsuite/gdc.test/runnable/template4.d b/gcc/testsuite/gdc.test/runnable/template4.d
index 0381d89..ae02c18 100644
--- a/gcc/testsuite/gdc.test/runnable/template4.d
+++ b/gcc/testsuite/gdc.test/runnable/template4.d
@@ -1,4 +1,4 @@
-/* RUNNABLE_PHOBOS_TEST
+/*
TEST_OUTPUT:
---
This actually gets evaluated!
@@ -10,7 +10,6 @@ Alias Test instantiated
Alias Test instantiated
---
*/
-import std.stdio;
import core.stdc.stdio;
/*********************************************************/
@@ -246,31 +245,6 @@ void test6()
/*********************************************************/
-template factorial7(float n, cdouble c, string sss, string ttt)
-{
- static if (n == 1)
- const float factorial7 = 1;
- else
- const float factorial7 = n * 2;
-}
-
-template bar7(wstring abc, dstring def)
-{
- const int x = 3;
-}
-
-void test7()
-{
- float f = factorial7!(4.25, 6.8+3i, "hello", null);
- printf("%g\n", f);
- assert(f == 8.5);
- int i = bar7!("abc"w, "def"d).x;
- printf("%d\n", i);
- assert(i == 3);
-}
-
-/*********************************************************/
-
template whale(string walrus)
{
const char [] whale = walrus;
@@ -449,20 +423,15 @@ template horse(string w)
void test14()
{
bool lion = zebra!("a");
- writeln(lion);
assert(!lion);
lion = zebra!("aqb");
- writeln(lion);
assert(lion);
lion = horse!("a");
- writeln(lion);
assert(lion);
lion = horse!("aqb");
- writeln(lion);
assert(lion);
lion = horse!("ab");
- writeln(lion);
assert(!lion);
}
@@ -529,7 +498,7 @@ void test16()
{
for (int i=0; i<smallfactorials.length; ++i)
{
- writefln("%d %d", i, smallfactorials[i]);
+ printf("%d %d\n", i, smallfactorials[i]);
assert(smallfactorials[i] == testtable[i]);
}
}
@@ -621,7 +590,7 @@ template sqrt(real x, real root = x/2, int ntries = 0)
void test20()
{
real x = sqrt!(2);
- writefln("%.20g", x); // 1.4142135623730950487
+ printf("%.20Lg\n", x); // 1.4142135623730950487
}
/*********************************************************/
@@ -642,7 +611,7 @@ uint foo21()
void test21()
{
auto i = foo21();
- writeln(i);
+ printf("%d\n", i);
assert(i == 1871483972);
}
@@ -826,10 +795,14 @@ void test31()
i2s[1] = "Hello";
i2s[5] = "There";
- writeln( i2s.get31(1, "yeh") );
- writeln( i2s.get31(2, "default") );
- writeln( i2s.get31(1) );
- writeln( i2s.get31(2) );
+ auto result = i2s.get31(1, "yeh");
+ printf("%.*s\n", cast(int)result.length, result.ptr);
+ result = i2s.get31(2, "default");
+ printf("%.*s\n", cast(int)result.length, result.ptr);
+ result = i2s.get31(1);
+ printf("%.*s\n", cast(int)result.length, result.ptr);
+ result = i2s.get31(2);
+ printf("%.*s\n", cast(int)result.length, result.ptr);
}
/*********************************************************/
@@ -860,7 +833,7 @@ struct Composer(T) {
}
return result;
}
- public void opAddAssign(Fun f) {
+ public void opOpAssign(string op)(Fun f) if (op == "+") {
funs ~= f;
}
}
@@ -904,14 +877,14 @@ void test33() {
comp += delegate double (double x) { return x/3.0;};
comp += delegate double (double x) { return x*x;};
comp += (double x) => x + 1.0;
- writefln("%f", comp(2.0));
+ printf("%f\n", comp(2.0));
// Try function objects
Composer!(double) comp2;
comp2 += tofp!(div3!(double))();
comp2 += tofp!(square!(double))();
comp2 += tofp!(plus1!(double))();
- writefln("%f", comp2( 2.0));
+ printf("%f\n", comp2( 2.0));
}
/*********************************************************/
@@ -1035,7 +1008,7 @@ void instantiate4652()
}
/*********************************************************/
-// 7589
+// https://issues.dlang.org/show_bug.cgi?id=7589
struct T7589(T)
{
@@ -1062,7 +1035,7 @@ void test39()
}
/*********************************************************/
-// 6701
+// https://issues.dlang.org/show_bug.cgi?id=6701
uint foo_6701(uint v:0)() { return 1; }
uint foo_6701(uint v)() { return 0; }
@@ -1076,7 +1049,7 @@ void test6701()
}
/******************************************/
-// 7469
+// https://issues.dlang.org/show_bug.cgi?id=7469
struct Foo7469a(int x) { }
struct Foo7469b(int x) { }
@@ -1142,7 +1115,6 @@ int main()
test4();
test5();
test6();
- test7();
test8();
test9();
test10();
diff --git a/gcc/testsuite/gdc.test/runnable/template9.d b/gcc/testsuite/gdc.test/runnable/template9.d
index 486eb67..cb3de5b 100644
--- a/gcc/testsuite/gdc.test/runnable/template9.d
+++ b/gcc/testsuite/gdc.test/runnable/template9.d
@@ -1,4 +1,5 @@
-/* RUNNABLE_PHOBOS_TEST
+/*
+REQUIRED_ARGS: -preview=rvaluerefparam
PERMUTE_ARGS:
EXTRA_FILES: imports/testmangle.d
TEST_OUTPUT:
@@ -123,19 +124,23 @@ void test4()
/**********************************/
-import std.stdio:writefln;
-
template foo5(T,S)
{
void foo5(T t, S s) {
- writefln("typeof(T)=",typeid(T)," typeof(S)=",typeid(S));
+ const tstr = typeid(T).toString();
+ const sstr = typeid(S).toString();
+ printf("typeof(T)=%.*s typeof(S)=%.*s\n",
+ cast(int)tstr.length, tstr.ptr, cast(int)sstr.length, sstr.ptr);
}
}
template bar5(T,S)
{
void bar5(S s) {
- writefln("typeof(T)=",typeid(T),"typeof(S)=",typeid(S));
+ const tstr = typeid(T).toString();
+ const sstr = typeid(S).toString();
+ printf("typeof(T)=%.*s typeof(S)=%.*s\n",
+ cast(int)tstr.length, tstr.ptr, cast(int)sstr.length, sstr.ptr);
}
}
@@ -200,7 +205,7 @@ void test7()
}
/**********************************/
-// 5946
+// https://issues.dlang.org/show_bug.cgi?id=5946
template TTest8()
{
@@ -217,7 +222,7 @@ void test8()
}
/**********************************/
-// 693
+// https://issues.dlang.org/show_bug.cgi?id=693
template TTest9(alias sym)
{
@@ -236,7 +241,7 @@ void test9()
}
/**********************************/
-// 1780
+// https://issues.dlang.org/show_bug.cgi?id=1780
template Tuple1780(Ts ...) { alias Ts Tuple1780; }
@@ -253,7 +258,7 @@ void test1780()
}
/**********************************/
-// 1659
+// https://issues.dlang.org/show_bug.cgi?id=1659
class Foo1659 { }
class Bar1659 : Foo1659 { }
@@ -267,7 +272,7 @@ void test1659()
}
/**********************************/
-// 2025
+// https://issues.dlang.org/show_bug.cgi?id=2025
struct S2025 {}
void f2025() {}
@@ -294,7 +299,7 @@ static assert(Baz2025!S2025 == 1); // 2 -> 1
static assert(Baz2025!f2025 == 2);
/**********************************/
-// 3608
+// https://issues.dlang.org/show_bug.cgi?id=3608
template foo3608(T, U){}
@@ -318,7 +323,7 @@ void test3608()
}
/**********************************/
-// 5015
+// https://issues.dlang.org/show_bug.cgi?id=5015
import breaker;
@@ -333,7 +338,7 @@ template _ElemType(T) {
}
/**********************************/
-// 5185
+// https://issues.dlang.org/show_bug.cgi?id=5185
class C5185(V)
{
@@ -349,7 +354,7 @@ void test5185()
}
/**********************************/
-// 5893
+// https://issues.dlang.org/show_bug.cgi?id=5893
class C5893
{
@@ -372,7 +377,7 @@ void test5893()
}
/**********************************/
-// 5988
+// https://issues.dlang.org/show_bug.cgi?id=5988
template Templ5988(alias T)
{
@@ -388,7 +393,7 @@ Templ5988!C5988b foo5988b; // Uncomment version
void test5988b() { C5988b!int a; } // Works
/**********************************/
-// 6404
+// https://issues.dlang.org/show_bug.cgi?id=6404
// receive only rvalue
void rvalue(T)(auto ref T x) if (!__traits(isRef, x)) {}
@@ -416,7 +421,7 @@ void test6404()
}
/**********************************/
-// 2246
+// https://issues.dlang.org/show_bug.cgi?id=2246
class A2246(T,d){
T p;
@@ -452,7 +457,7 @@ void test2246(){
}
/**********************************/
-// 2296
+// https://issues.dlang.org/show_bug.cgi?id=2296
void foo2296(size_t D)(int[D] i...){}
void test2296()
@@ -461,7 +466,7 @@ void test2296()
}
/**********************************/
-// 1684
+// https://issues.dlang.org/show_bug.cgi?id=1684
template Test1684( uint memberOffset ){}
@@ -494,7 +499,7 @@ void bug4984() {
}
/***************************************/
-// 2579
+// https://issues.dlang.org/show_bug.cgi?id=2579
void foo2579(T)(T delegate(in Object) dlg)
{
@@ -506,7 +511,7 @@ void test2579()
}
/**********************************/
-// 2803
+// https://issues.dlang.org/show_bug.cgi?id=2803
auto foo2803(T)(T t = 0) { return t; }
@@ -576,7 +581,7 @@ void test2803()
}
/**********************************/
-// 6613
+// https://issues.dlang.org/show_bug.cgi?id=6613
alias Tuple6613(T...) = T;
@@ -592,13 +597,14 @@ void test6613()
}
/**********************************/
-// 4953
+// https://issues.dlang.org/show_bug.cgi?id=4953
void bug4953(T = void)(short x) {}
static assert(is(typeof(bug4953(3))));
/**********************************/
-// 5886 & 5393
+// https://issues.dlang.org/show_bug.cgi?id=5886
+// https://issues.dlang.org/show_bug.cgi?id=5393
mixin template Foo5886(T)
{
@@ -666,7 +672,7 @@ void test5393()
}
/**********************************/
-// 5896
+// https://issues.dlang.org/show_bug.cgi?id=5896
struct X5896
{
@@ -691,7 +697,7 @@ void test5896()
}
/**********************************/
-// 6312
+// https://issues.dlang.org/show_bug.cgi?id=6312
void h6312() {}
@@ -715,7 +721,7 @@ void test6312()
}
/**********************************/
-// 6825
+// https://issues.dlang.org/show_bug.cgi?id=6825
void test6825()
{
@@ -731,7 +737,7 @@ void test6825()
}
/**********************************/
-// 6789
+// https://issues.dlang.org/show_bug.cgi?id=6789
template isStaticArray6789(T)
{
@@ -751,7 +757,7 @@ void test6789()
}
/**********************************/
-// 2778
+// https://issues.dlang.org/show_bug.cgi?id=2778
struct ArrayWrapper2778(T)
{
@@ -806,7 +812,7 @@ void test2778get()
static struct S
{
ubyte[] val = [1,2,3];
- @property ref ubyte[] get(){ return val; }
+ @property ref ubyte[] get() return { return val; }
alias get this;
}
S s;
@@ -814,7 +820,7 @@ void test2778get()
}
/**********************************/
-// 6208
+// https://issues.dlang.org/show_bug.cgi?id=6208
int getRefNonref(T)(ref T s){ return 1; }
int getRefNonref(T)( T s){ return 2; }
@@ -929,7 +935,7 @@ void test6208c()
}
/**********************************/
-// 6805
+// https://issues.dlang.org/show_bug.cgi?id=6805
struct T6805
{
@@ -941,7 +947,7 @@ struct T6805
static assert(is(T6805.xxx.Type == int));
/**********************************/
-// 6738
+// https://issues.dlang.org/show_bug.cgi?id=6738
struct Foo6738
{
@@ -960,7 +966,7 @@ void test6738()
}
/**********************************/
-// 7498
+// https://issues.dlang.org/show_bug.cgi?id=7498
template IndexMixin(){
void insert(T)(T value){ }
@@ -976,7 +982,7 @@ class MultiIndexContainer{
}
/**********************************/
-// 6780
+// https://issues.dlang.org/show_bug.cgi?id=6780
@property int foo6780()(){ return 10; }
@@ -993,7 +999,7 @@ void test6780()
}
/**********************************/
-// 6810
+// https://issues.dlang.org/show_bug.cgi?id=6810
int f6810(int n)(int) { return 1;}
int f6810(U...)(U) { assert(0); }
@@ -1007,7 +1013,7 @@ void test6810()
}
/**********************************/
-// 6891
+// https://issues.dlang.org/show_bug.cgi?id=6891
struct S6891(int N, T)
{
@@ -1021,7 +1027,7 @@ void test6891()
}
/**********************************/
-// 6994
+// https://issues.dlang.org/show_bug.cgi?id=6994
struct Foo6994
{
@@ -1044,7 +1050,7 @@ void test6994()
}
/**********************************/
-// 6764
+// https://issues.dlang.org/show_bug.cgi?id=6764
enum N6764 = 1; //use const for D1
@@ -1064,7 +1070,8 @@ void test6764()
}
/**********************************/
-// 3467 & 6806
+// https://issues.dlang.org/show_bug.cgi?id=3467
+// https://issues.dlang.org/show_bug.cgi?id=6806
struct Foo3467( uint n )
{
@@ -1087,11 +1094,11 @@ void test3467()
a1 ~ a2; // line 7, Error
}
-struct TS6806(size_t n) { pragma(msg, typeof(n)); }
+struct TS6806(uint n) { pragma(msg, typeof(n)); }
static assert(is(TS6806!(1u) == TS6806!(1)));
/**********************************/
-// 4413
+// https://issues.dlang.org/show_bug.cgi?id=4413
struct Foo4413
{
@@ -1112,7 +1119,7 @@ void test4413()
}
/**********************************/
-// 4675
+// https://issues.dlang.org/show_bug.cgi?id=4675
template isNumeric(T)
{
@@ -1130,7 +1137,7 @@ void test4675()
}
/**********************************/
-// 5525
+// https://issues.dlang.org/show_bug.cgi?id=5525
template foo5525(T)
{
@@ -1146,7 +1153,7 @@ void test5525()
}
/**********************************/
-// 5801
+// https://issues.dlang.org/show_bug.cgi?id=5801
int a5801;
void bar5801(T = double)(typeof(a5801) i) {}
@@ -1158,7 +1165,7 @@ void test5801()
}
/**********************************/
-// 5832
+// https://issues.dlang.org/show_bug.cgi?id=5832
struct Bar5832(alias v) {}
@@ -1188,7 +1195,7 @@ static assert( isBar5832b!(Bar5832!1234));
static assert(!isBar5832c!(Bar5832!1234));
/**********************************/
-// 2550
+// https://issues.dlang.org/show_bug.cgi?id=2550
template pow10_2550(long n)
{
@@ -1246,7 +1253,7 @@ void test10()
}
/**********************************/
-// 3092
+// https://issues.dlang.org/show_bug.cgi?id=3092
template Foo3092(A...)
{
@@ -1255,7 +1262,7 @@ template Foo3092(A...)
static assert(is(Foo3092!(int, "foo") == int));
/**********************************/
-// 7037
+// https://issues.dlang.org/show_bug.cgi?id=7037
struct Foo7037 {}
struct Bar7037 { Foo7037 f; alias f this; }
@@ -1270,7 +1277,7 @@ void test7037()
}
/**********************************/
-// 7110
+// https://issues.dlang.org/show_bug.cgi?id=7110
struct S7110
{
@@ -1304,7 +1311,7 @@ alias T7110!( (e7110[0]) ) D1; // passes
alias T7110!( e7110[0] ) D2; // fails: e7110 must be an array or pointer type, not S7110
/**********************************/
-// 7124
+// https://issues.dlang.org/show_bug.cgi?id=7124
template StaticArrayOf(T : E[dim], E, size_t dim)
{
@@ -1336,7 +1343,7 @@ void test7124()
}
/**********************************/
-// 7359
+// https://issues.dlang.org/show_bug.cgi?id=7359
bool foo7359(T)(T[] a ...)
{
@@ -1350,7 +1357,7 @@ void test7359()
}
/**********************************/
-// 7363
+// https://issues.dlang.org/show_bug.cgi?id=7363
template t7363()
{
@@ -1382,7 +1389,7 @@ alias S4371!("hi!") t;
static if (is(t U == S4371!(U))) { }
/**********************************/
-// 7416
+// https://issues.dlang.org/show_bug.cgi?id=7416
void t7416(alias a)() if(is(typeof(a())))
{}
@@ -1393,7 +1400,7 @@ void test7416() {
}
/**********************************/
-// 7563
+// https://issues.dlang.org/show_bug.cgi?id=7563
class Test7563
{
@@ -1411,7 +1418,7 @@ void test7563()
}
/**********************************/
-// 7572
+// https://issues.dlang.org/show_bug.cgi?id=7572
class F7572
{
@@ -1430,7 +1437,7 @@ void test7572()
}
/**********************************/
-// 7580
+// https://issues.dlang.org/show_bug.cgi?id=7580
struct S7580(T)
{
@@ -1462,7 +1469,7 @@ void test7580()
}
/**********************************/
-// 7585
+// https://issues.dlang.org/show_bug.cgi?id=7585
extern(C) alias void function() Callback;
@@ -1499,7 +1506,7 @@ void test7585()
}
/**********************************/
-// 7643
+// https://issues.dlang.org/show_bug.cgi?id=7643
template T7643(A...){ alias A T7643; }
@@ -1508,7 +1515,7 @@ alias T7643!(long, "x", string, "y") Specs7643;
alias T7643!( Specs7643[] ) U7643; // Error: tuple A is used as a type
/**********************************/
-// 7671
+// https://issues.dlang.org/show_bug.cgi?id=7671
inout(int)[3] id7671n1 ( inout(int)[3] );
inout( U )[n] id7671x1(U, size_t n)( inout( U )[n] );
@@ -1526,7 +1533,7 @@ void test7671()
}
/************************************/
-// 7672
+// https://issues.dlang.org/show_bug.cgi?id=7672
T foo7672(T)(T a){ return a; }
@@ -1540,7 +1547,7 @@ void test7672(inout(int[]) a = null, inout(int*) p = null)
}
/**********************************/
-// 7684
+// https://issues.dlang.org/show_bug.cgi?id=7684
U[] id7684(U)( U[] );
shared(U[]) id7684(U)( shared(U[]) );
@@ -1552,7 +1559,7 @@ void test7684()
}
/**********************************/
-// 7694
+// https://issues.dlang.org/show_bug.cgi?id=7694
void match7694(alias m)()
{
@@ -1573,7 +1580,7 @@ struct T7694
}
/**********************************/
-// 7755
+// https://issues.dlang.org/show_bug.cgi?id=7755
template to7755(T)
{
@@ -1628,7 +1635,7 @@ void test11b()
}
/**********************************/
-// 7769
+// https://issues.dlang.org/show_bug.cgi?id=7769
void f7769(K)(inout(K) value){}
void test7769()
@@ -1637,7 +1644,7 @@ void test7769()
}
/**********************************/
-// 7812
+// https://issues.dlang.org/show_bug.cgi?id=7812
template A7812(T...) {}
@@ -1651,7 +1658,7 @@ template D7812()
static assert(!__traits(compiles, D7812!()));
/**********************************/
-// 7873
+// https://issues.dlang.org/show_bug.cgi?id=7873
inout(T)* foo(T)(inout(T)* t)
{
@@ -1671,7 +1678,7 @@ void test7873()
}
/**********************************/
-// 7933
+// https://issues.dlang.org/show_bug.cgi?id=7933
struct Boo7933(size_t dim){int a;}
struct Baa7933(size_t dim)
@@ -1690,7 +1697,7 @@ void test7933()
}
/**********************************/
-// 8094
+// https://issues.dlang.org/show_bug.cgi?id=8094
struct Tuple8094(T...) {}
@@ -1728,14 +1735,14 @@ void test12()
}
/**********************************/
-// 14290
+// https://issues.dlang.org/show_bug.cgi?id=14290
struct Foo14290(int i) {}
alias Foo14290a = Foo14290!1;
static assert(!is(Foo14290!2 == Foo14290a!T, T...));
/**********************************/
-// 8125
+// https://issues.dlang.org/show_bug.cgi?id=8125
void foo8125(){}
@@ -1823,7 +1830,7 @@ void test15()
}
/**********************************/
-// 8129
+// https://issues.dlang.org/show_bug.cgi?id=8129
class X8129 {}
class A8129 {}
@@ -1857,7 +1864,7 @@ void test8129()
}
/**********************************/
-// 8238
+// https://issues.dlang.org/show_bug.cgi?id=8238
void test8238()
{
@@ -1873,7 +1880,7 @@ void test8238()
}
/**********************************/
-// 8669
+// https://issues.dlang.org/show_bug.cgi?id=8669
struct X8669
{
@@ -1939,7 +1946,7 @@ void test8669()
}
/**********************************/
-// 8833
+// https://issues.dlang.org/show_bug.cgi?id=8833
template TypeTuple8833(T...) { alias TypeTuple = T; }
@@ -1956,7 +1963,7 @@ void test8833()
}
/**********************************/
-// 8976
+// https://issues.dlang.org/show_bug.cgi?id=8976
void f8976(ref int) { }
@@ -1971,17 +1978,17 @@ void h8976()()
g8976!()();
}
-static assert(! __traits(compiles, h8976!()() ) ); // causes error
-static assert(!is(typeof( h8976!()() )));
+static assert( __traits(compiles, h8976!()() ) ); // causes error
+static assert(is(typeof( h8976!()() )));
void test8976()
{
- static assert(! __traits(compiles, h8976!()() ) );
- static assert(!is(typeof( h8976!()() )));
+ static assert( __traits(compiles, h8976!()() ) );
+ static assert(is(typeof( h8976!()() )));
}
/****************************************/
-// 8940
+// https://issues.dlang.org/show_bug.cgi?id=8940
const int n8940; // or `immutable`
static this() { n8940 = 3; }
@@ -2002,7 +2009,8 @@ void test8940()
}
/**********************************/
-// 6969 + 8990
+// https://issues.dlang.org/show_bug.cgi?id=6969
+// https://issues.dlang.org/show_bug.cgi?id=8990
class A6969() { alias C6969!() C1; }
class B6969 { alias A6969!() A1; }
@@ -2013,7 +2021,7 @@ struct B8990(T) { A8990!T* a; }
struct C8990 { B8990!C8990* b; }
/**********************************/
-// 9018
+// https://issues.dlang.org/show_bug.cgi?id=9018
template Inst9018(alias Template, T)
{
@@ -2029,7 +2037,7 @@ static assert(!__traits(compiles, Inst9018!(Template9018, int))); // Assert pass
static assert(!__traits(compiles, Inst9018!(Template9018, int))); // Assert fails
/**********************************/
-// 9022
+// https://issues.dlang.org/show_bug.cgi?id=9022
class C9022
{
@@ -2074,7 +2082,7 @@ void test9022()
}
/**********************************/
-// 9026
+// https://issues.dlang.org/show_bug.cgi?id=9026
mixin template node9026()
{
@@ -2107,7 +2115,7 @@ void test9026()
}
/**********************************/
-// 9038
+// https://issues.dlang.org/show_bug.cgi?id=9038
mixin template Foo9038()
{
@@ -2142,7 +2150,7 @@ void test9038()
}
/**********************************/
-// 9050
+// https://issues.dlang.org/show_bug.cgi?id=9050
struct A9050(T) {}
@@ -2159,7 +2167,7 @@ auto foo9050()(A9050!int base) pure
auto s9050 = foo9050(A9050!int());
/**********************************/
-// 10936 (dup of 9050)
+// https://issues.dlang.org/show_bug.cgi?id=10936 (dup of 9050)
struct Vec10936(string s)
{
@@ -2178,7 +2186,7 @@ struct Vec10936(string s)
Vec10936!"" v;
/**********************************/
-// 9076
+// https://issues.dlang.org/show_bug.cgi?id=9076
template forward9076(args...)
{
@@ -2193,7 +2201,7 @@ void test9076()
}
/**********************************/
-// 9083
+// https://issues.dlang.org/show_bug.cgi?id=9083
template isFunction9083(X...) if (X.length == 1)
{
@@ -2231,7 +2239,7 @@ class C9083
}
/**********************************/
-// 9100
+// https://issues.dlang.org/show_bug.cgi?id=9100
template Id(alias A) { alias Id = A; }
template ErrId(alias A) { static assert(0); }
@@ -2287,7 +2295,7 @@ void test9100()
}
/**********************************/
-// 9101
+// https://issues.dlang.org/show_bug.cgi?id=9101
class Node9101
{
@@ -2300,7 +2308,7 @@ class Node9101
enum x9101 = __traits(compiles, Node9101.ForwardCtorNoId!());
/**********************************/
-// 9124
+// https://issues.dlang.org/show_bug.cgi?id=9124
struct Foo9124a(N...)
{
@@ -2353,7 +2361,7 @@ void test9124b()
}
/**********************************/
-// 9143
+// https://issues.dlang.org/show_bug.cgi?id=9143
struct Foo9143a(bool S, bool L)
{
@@ -2392,7 +2400,7 @@ void test9143()
}
/**********************************/
-// 9266
+// https://issues.dlang.org/show_bug.cgi?id=9266
template Foo9266(T...)
{
@@ -2408,7 +2416,7 @@ void test9266()
}
/**********************************/
-// 9361
+// https://issues.dlang.org/show_bug.cgi?id=9361
struct Unit9361(A)
{
@@ -2429,7 +2437,7 @@ void test9361()
}
/**********************************/
-// 9536
+// https://issues.dlang.org/show_bug.cgi?id=9536
struct S9536
{
@@ -2450,7 +2458,7 @@ void test9536()
}
/**********************************/
-// 9578
+// https://issues.dlang.org/show_bug.cgi?id=9578
template t9578(alias f) { void tf()() { f(); } }
@@ -2467,7 +2475,7 @@ void test9578()
}
/**********************************/
-// 9596
+// https://issues.dlang.org/show_bug.cgi?id=9596
int foo9596a(K, V)(inout( V [K])) { return 1; }
int foo9596a(K, V)(inout(shared(V) [K])) { return 2; }
@@ -2499,7 +2507,7 @@ void test9596()
}
/******************************************/
-// 9806
+// https://issues.dlang.org/show_bug.cgi?id=9806
struct S9806a(alias x)
{
@@ -2535,7 +2543,7 @@ alias S9806c!1 One9806c;
alias S9806c!0.Next!() OneAgain9806c;
/******************************************/
-// 9837
+// https://issues.dlang.org/show_bug.cgi?id=9837
void test9837()
{
@@ -2576,7 +2584,7 @@ void test9837()
}
/******************************************/
-// 9874
+// https://issues.dlang.org/show_bug.cgi?id=9874
bool foo9874() { return true; }
void bar9874(T)(T) if (foo9874()) {} // OK
@@ -2667,7 +2675,7 @@ void test9885()
}
/******************************************/
-// 9971
+// https://issues.dlang.org/show_bug.cgi?id=9971
void goo9971()()
{
@@ -2691,7 +2699,7 @@ void test9971()
}
/******************************************/
-// 9977
+// https://issues.dlang.org/show_bug.cgi?id=9977
void test9977()
{
@@ -2730,7 +2738,7 @@ static assert(T8848b!([1:2,3:4]) == [1:2,3:4]);
static assert(T8848c!(null) == null);
/******************************************/
-// 9990
+// https://issues.dlang.org/show_bug.cgi?id=9990
auto initS9990() { return "hi"; }
@@ -2739,7 +2747,7 @@ class C9990(alias init) {}
alias SC9990 = C9990!(initS9990);
/******************************************/
-// 10067
+// https://issues.dlang.org/show_bug.cgi?id=10067
struct assumeSize10067(alias F) {}
@@ -2753,7 +2761,7 @@ template useItemAt10067(size_t idx, T)
useItemAt10067!(0, char) mapS10067;
/******************************************/
-// 4072
+// https://issues.dlang.org/show_bug.cgi?id=4072
void bug4072(T)(T x)
if (is(typeof(bug4072(x))))
@@ -2762,7 +2770,7 @@ void bug4072(T)(T x)
static assert(!is(typeof(bug4072(7))));
/******************************************/
-// 10074
+// https://issues.dlang.org/show_bug.cgi?id=10074
template foo10074(F)
{
@@ -2777,7 +2785,7 @@ bool foo10074(F)(F f)
static assert(!is(typeof(foo10074(1))));
/******************************************/
-// 10083
+// https://issues.dlang.org/show_bug.cgi?id=10083
// [a-c] IFTI can find syntactic eponymous member
template foo10083a(T)
@@ -2867,7 +2875,7 @@ void test10083()
}
/******************************************/
-// 10134
+// https://issues.dlang.org/show_bug.cgi?id=10134
template ReturnType10134(alias func)
{
@@ -2914,7 +2922,7 @@ template b10134()
pragma(msg, getResultType10134!(a10134!()));
/******************************************/
-// 10313
+// https://issues.dlang.org/show_bug.cgi?id=10313
void test10313()
{
@@ -2933,7 +2941,7 @@ void test10313()
}
/******************************************/
-// 10498
+// https://issues.dlang.org/show_bug.cgi?id=10498
template triggerIssue10498a()
{
@@ -2985,7 +2993,7 @@ void test10498b()
}
/******************************************/
-// 10537
+// https://issues.dlang.org/show_bug.cgi?id=10537
struct Iota10537
{
@@ -3010,7 +3018,7 @@ dstring rewriteCode10537(dstring code)
}
/******************************************/
-// 10558
+// https://issues.dlang.org/show_bug.cgi?id=10558
template Template10558() {}
@@ -3029,7 +3037,7 @@ template foo10558(alias T)
}
/******************************************/
-// 10592
+// https://issues.dlang.org/show_bug.cgi?id=10592
void test10592()
{
@@ -3058,7 +3066,7 @@ void test10592()
}
/******************************************/
-// 11242
+// https://issues.dlang.org/show_bug.cgi?id=11242
inout(T[]) fromString11242(T)(inout(char[]) s, T[] dst)
{
@@ -3072,7 +3080,7 @@ void test11242()
}
/******************************************/
-// 10811
+// https://issues.dlang.org/show_bug.cgi?id=10811
void foo10811a(R1, R2)(R1, R2) {}
template foo10811a(alias pred) { void foo10811a(R1, R2)(R1, R2) {} }
@@ -3090,7 +3098,7 @@ void test10811()
}
/******************************************/
-// 10969
+// https://issues.dlang.org/show_bug.cgi?id=10969
template A10969(T, U...) { alias A10969 = T; }
void foo10969(T, U...)(A10969!(T, U) a) {}
@@ -3105,7 +3113,7 @@ void test10969()
}
/******************************************/
-// 11271
+// https://issues.dlang.org/show_bug.cgi?id=11271
struct SmartPtr11271(T)
{
@@ -3120,7 +3128,7 @@ void test11271()
}
/******************************************/
-// 11533
+// https://issues.dlang.org/show_bug.cgi?id=11533
version (none)
{
@@ -3171,7 +3179,7 @@ void test11533()
}
/******************************************/
-// 11553
+// https://issues.dlang.org/show_bug.cgi?id=11553
struct Pack11553(T ...)
{
@@ -3226,7 +3234,7 @@ static if ( hl11553!(Pack11553!(5))) { pragma(msg, "All good 2"); }
static if (!hl11553!(Pack11553!( ))) { pragma(msg, "All good 3"); }
/******************************************/
-// 11818
+// https://issues.dlang.org/show_bug.cgi?id=11818
enum E11818 { e0, e1 }
@@ -3244,13 +3252,13 @@ void test11818()
}
/******************************************/
-// 11843
+// https://issues.dlang.org/show_bug.cgi?id=11843
void test11843()
{
struct Foo
{
- int x[string];
+ int[string] x;
}
struct Bar(alias foo) {}
@@ -3268,7 +3276,7 @@ void test11843()
}
/******************************************/
-// 11872
+// https://issues.dlang.org/show_bug.cgi?id=11872
class Foo11872
{
@@ -3299,7 +3307,7 @@ void test11872()
}
/******************************************/
-// 12042
+// https://issues.dlang.org/show_bug.cgi?id=12042
struct S12042
{
@@ -3324,7 +3332,7 @@ int test12042()
static assert(test12042());
/******************************************/
-// 12077
+// https://issues.dlang.org/show_bug.cgi?id=12077
struct S12077(A) {}
@@ -3336,7 +3344,7 @@ alias U12077( T : Base!Args, alias Base, Args...) = Base;
static assert(__traits(isSame, U12077!(S12077!int), S12077));
/******************************************/
-// 12262
+// https://issues.dlang.org/show_bug.cgi?id=12262
template Inst12262(T) { int x; }
@@ -3347,7 +3355,7 @@ static assert(fqnSym12262!(Inst12262!(Object)) == 2);
static assert(fqnSym12262!(Inst12262!(Object).x) == 1);
/******************************************/
-// 12264
+// https://issues.dlang.org/show_bug.cgi?id=12264
struct S12264(A) {}
@@ -3372,7 +3380,7 @@ static assert(TY12264!(S12264!int) == 2);
static assert(TZ12264!(S12264!int) == 2);
/******************************************/
-// 12122
+// https://issues.dlang.org/show_bug.cgi?id=12122
enum N12122 = 1;
@@ -3385,7 +3393,7 @@ void test12122()
}
/******************************************/
-// 12186
+// https://issues.dlang.org/show_bug.cgi?id=12186
template map_front12186(fun...)
{
@@ -3406,7 +3414,7 @@ void test12186()
}
/******************************************/
-// 12207
+// https://issues.dlang.org/show_bug.cgi?id=12207
void test12207()
{
@@ -3421,7 +3429,7 @@ void test12207()
}
/******************************************/
-// 12263
+// https://issues.dlang.org/show_bug.cgi?id=12263
template A12263(alias a) { int x; }
template B12263(alias a) { int x; }
@@ -3435,7 +3443,7 @@ static assert(fqnSym12263!(A12263!(Object)));
static assert(fqnSym12263!(B12263!(Object)));
/******************************************/
-// 12290
+// https://issues.dlang.org/show_bug.cgi?id=12290
void test12290()
{
@@ -3520,7 +3528,7 @@ void test12290()
}
/******************************************/
-// 12292
+// https://issues.dlang.org/show_bug.cgi?id=12292
void test12292()
{
@@ -3532,7 +3540,7 @@ void test12292()
}
/******************************************/
-// 12376
+// https://issues.dlang.org/show_bug.cgi?id=12376
static auto encode12376(size_t sz)(dchar ch) if (sz > 1)
{
@@ -3545,7 +3553,7 @@ void test12376()
}
/******************************************/
-// 12447
+// https://issues.dlang.org/show_bug.cgi?id=12447
enum test12447(string str) = str; // [1]
string test12447(T...)(T args) if (T.length) { return args[0]; } // [2]
@@ -3560,7 +3568,7 @@ static assert(test12447("foo") == "foo");
static assert(test12447!("bar") == "bar");
/******************************************/
-// 12651
+// https://issues.dlang.org/show_bug.cgi?id=12651
alias TemplateArgsOf12651(alias T : Base!Args, alias Base, Args...) = Args;
@@ -3569,7 +3577,7 @@ struct S12651(T) { }
static assert(!__traits(compiles, TemplateArgsOf12651!(S12651!int, S, float)));
/******************************************/
-// 12719
+// https://issues.dlang.org/show_bug.cgi?id=12719
struct A12719
{
@@ -3598,7 +3606,7 @@ struct W12719(R)
W12719!int a12719;
/******************************************/
-// 12746
+// https://issues.dlang.org/show_bug.cgi?id=12746
template foo12746()
{
@@ -3620,7 +3628,7 @@ void test12746()
}
/******************************************/
-// 12748
+// https://issues.dlang.org/show_bug.cgi?id=12748
void foo12748(S, C : typeof(S.init[0]))(S s, C c)
{
@@ -3632,7 +3640,7 @@ void test12748()
}
/******************************************/
-// 9708
+// https://issues.dlang.org/show_bug.cgi?id=9708
struct S9708
{
@@ -3646,13 +3654,13 @@ void test9708()
}
/******************************************/
-// 12880
+// https://issues.dlang.org/show_bug.cgi?id=12880
void f12880(T)(in T value) { static assert(is(T == string)); }
void test12880() { f12880(string.init); }
/******************************************/
-// 13087
+// https://issues.dlang.org/show_bug.cgi?id=13087
struct Vec13087
{
@@ -3674,7 +3682,7 @@ template component13087(alias vec, char c)
}
/******************************************/
-// 13127
+// https://issues.dlang.org/show_bug.cgi?id=13127
/+void test13127(inout int = 0)
{
@@ -3895,7 +3903,7 @@ void test13127a()
}
/******************************************/
-// 13159
+// https://issues.dlang.org/show_bug.cgi?id=13159
template maxSize13159(T...)
{
@@ -3924,7 +3932,7 @@ struct Node13159
}
/******************************************/
-// 13180
+// https://issues.dlang.org/show_bug.cgi?id=13180
void test13180()
{
@@ -3962,7 +3970,7 @@ void test13180()
}
/******************************************/
-// 13204
+// https://issues.dlang.org/show_bug.cgi?id=13204
struct A13204(uint v)
{
@@ -3994,7 +4002,7 @@ void test13204()
}
/******************************************/
-// 8462 (dup of 13204)
+// https://issues.dlang.org/show_bug.cgi?id=8462 (dup of 13204)
alias FP8462 = void function(C8462.Type arg);
@@ -4005,7 +4013,7 @@ class C8462
}
/******************************************/
-// 13218
+// https://issues.dlang.org/show_bug.cgi?id=13218
template isCallable13218(T...)
if (T.length == 1)
@@ -4039,7 +4047,7 @@ struct R13218
}
/******************************************/
-// 13219
+// https://issues.dlang.org/show_bug.cgi?id=13219
struct Map13219(V) {}
@@ -4059,7 +4067,7 @@ void test13219()
}
/******************************************/
-// 13223
+// https://issues.dlang.org/show_bug.cgi?id=13223
void test13223()
{
@@ -4125,7 +4133,7 @@ void test13223a()
}
/******************************************/
-// 13235
+// https://issues.dlang.org/show_bug.cgi?id=13235
struct Tuple13235(T...)
{
@@ -4171,7 +4179,7 @@ void test13235()
}
/******************************************/
-// 13252
+// https://issues.dlang.org/show_bug.cgi?id=13252
alias TypeTuple13252(T...) = T;
@@ -4181,9 +4189,6 @@ static assert(is(typeof(TypeTuple13252!(cast(long)1)[0]) == long));
static assert(is(typeof(TypeTuple13252!(cast(float )3.14)[0]) == float ));
static assert(is(typeof(TypeTuple13252!(cast(double)3.14)[0]) == double));
-static assert(is(typeof(TypeTuple13252!(cast(cfloat )(1 + 2i))[0]) == cfloat ));
-static assert(is(typeof(TypeTuple13252!(cast(cdouble)(1 + 2i))[0]) == cdouble));
-
static assert(is(typeof(TypeTuple13252!(cast(string )null)[0]) == string ));
static assert(is(typeof(TypeTuple13252!(cast(string[])null)[0]) == string[])); // OK <- NG
@@ -4198,7 +4203,7 @@ static assert(is(typeof(TypeTuple13252!(const S13252())[0]) == const(S13
static assert(is(typeof(TypeTuple13252!(immutable S13252())[0]) == immutable(S13252))); // OK <- NG
/******************************************/
-// 13294
+// https://issues.dlang.org/show_bug.cgi?id=13294
void test13294()
{
@@ -4218,7 +4223,7 @@ void test13294()
f(src, dst);
}
- // 13351
+ // https://issues.dlang.org/show_bug.cgi?id=13351
T add(T)(in T x, in T y)
{
T z;
@@ -4232,7 +4237,7 @@ void test13294()
}
/******************************************/
-// 13299
+// https://issues.dlang.org/show_bug.cgi?id=13299
struct Foo13299
{
@@ -4263,7 +4268,7 @@ void test13299()
}
/******************************************/
-// 13333
+// https://issues.dlang.org/show_bug.cgi?id=13333
template AliasThisTypeOf13333(T)
{
@@ -4315,7 +4320,7 @@ void test13333()
}
/******************************************/
-// 13374
+// https://issues.dlang.org/show_bug.cgi?id=13374
int f13374(alias a)() { return 1; }
int f13374(string s)() { return 2; }
@@ -4328,7 +4333,7 @@ void test13374()
}
/******************************************/
-// 14109
+// https://issues.dlang.org/show_bug.cgi?id=14109
string f14109() { return "a"; }
string g14109()() { return "a"; }
@@ -4340,7 +4345,7 @@ alias Y14109 = S14109!(g14109!());
static assert(is(X14109 == Y14109));
/******************************************/
-// 13378
+// https://issues.dlang.org/show_bug.cgi?id=13378
struct Vec13378(size_t n, T, string as)
{
@@ -4356,7 +4361,7 @@ void test13378()
}
/******************************************/
-// 13379
+// https://issues.dlang.org/show_bug.cgi?id=13379
void test13379()
{
@@ -4395,7 +4400,7 @@ MinType13379!T min13379(T...)(T args) // #4 MinType!uint (speculative && thist
}
/******************************************/
-// 13417
+// https://issues.dlang.org/show_bug.cgi?id=13417
struct V13417(size_t N, E, alias string AS)
{
@@ -4412,7 +4417,7 @@ void test13417()
}
/******************************************/
-// 13484
+// https://issues.dlang.org/show_bug.cgi?id=13484
int foo13484()(void delegate() hi) { return 1; }
int foo13484(T)(void delegate(T) hi) { return 2; }
@@ -4424,7 +4429,7 @@ void test13484()
}
/******************************************/
-// 13675
+// https://issues.dlang.org/show_bug.cgi?id=13675
enum E13675;
@@ -4440,7 +4445,7 @@ void test13675()
}
/******************************************/
-// 13694
+// https://issues.dlang.org/show_bug.cgi?id=13694
auto foo13694(T)(string A, T[] G ...) { return 1; }
auto foo13694(T)(string A, long E, T[] G ...) { return 2; }
@@ -4456,7 +4461,7 @@ void test13694()
}
/******************************************/
-// 13760
+// https://issues.dlang.org/show_bug.cgi?id=13760
void test13760()
{
@@ -4468,7 +4473,7 @@ void test13760()
}
/******************************************/
-// 13714
+// https://issues.dlang.org/show_bug.cgi?id=13714
struct JSONValue13714
{
@@ -4497,7 +4502,7 @@ void test13714()
}
/******************************************/
-// 13807
+// https://issues.dlang.org/show_bug.cgi?id=13807
T f13807(T)(inout(T)[] arr)
{
@@ -4512,7 +4517,7 @@ void test13807()
}
/******************************************/
-// 14174
+// https://issues.dlang.org/show_bug.cgi?id=14174
import imports.testmangle;
struct Config14174(a, b) {}
@@ -4521,6 +4526,7 @@ struct N14174 {}
alias defConfig14174 = Config14174!(N14174, N14174);
+@safe @nogc pure nothrow
void accepter14174a(Config : Config14174!(T) = defConfig14174, T...)()
{
static assert(equalDemangle(accepter14174a.mangleof,
@@ -4528,9 +4534,10 @@ void accepter14174a(Config : Config14174!(T) = defConfig14174, T...)()
"accepter14174a"~
"HTS7breaker51__T11Config14174TS7breaker6N14174TS7breaker6N14174Z11Config14174TS7breaker6N14174TS7breaker6N14174Z14"~
"accepter14174a"~
- "FZv"));
+ "FNaNbNiNfZv"));
}
+@safe @nogc pure nothrow
void accepter14174b(Config : Config14174!(T) = defConfig14174, T...)()
{
static assert(equalDemangle(accepter14174b.mangleof,
@@ -4538,17 +4545,18 @@ void accepter14174b(Config : Config14174!(T) = defConfig14174, T...)()
"accepter14174b"~
"HTS7breaker51__T11Config14174TS7breaker6N14174TS7breaker6N14174Z11Config14174TS7breaker6N14174TS7breaker6N14174Z14"~
"accepter14174b"~
- "FZv"));
+ "FNaNbNiNfZv"));
}
void test14174()
{
- accepter14174a!()(); // ok
- accepter14174b(); // error
+ accepter14174a!()();
+
+ accepter14174b!()();
}
/******************************************/
-// 14836
+// https://issues.dlang.org/show_bug.cgi?id=14836
template a14836x(alias B, C...)
{
@@ -4571,7 +4579,7 @@ void test14836()
}
/******************************************/
-// 14357
+// https://issues.dlang.org/show_bug.cgi?id=14357
template Qux14357(T : U*, U : V*, V)
{
@@ -4583,7 +4591,7 @@ template Qux14357(T : U*, U : V*, V)
static assert(!__traits(compiles, Qux14357!(float**, int*)));
/******************************************/
-// 14481
+// https://issues.dlang.org/show_bug.cgi?id=14481
template someT14481(alias e)
{
@@ -4602,7 +4610,7 @@ struct Hoge14481
}
/******************************************/
-// 14520
+// https://issues.dlang.org/show_bug.cgi?id=14520
template M14520(alias a) { enum M14520 = 1; }
template M14520(string s) { enum M14520 = 2; }
@@ -4616,7 +4624,7 @@ static assert(M14520!f14520b == 1);
static assert(M14520!f14520c == 1);
/******************************************/
-// 14568
+// https://issues.dlang.org/show_bug.cgi?id=14568
struct Interval14568()
{
@@ -4659,7 +4667,8 @@ template SubOps14568(Args...)
struct Nat14568 { mixin SubOps14568!(null); }
/******************************************/
-// 14603, 14604
+// https://issues.dlang.org/show_bug.cgi?id=14603
+// https://issues.dlang.org/show_bug.cgi?id=14604
struct S14603
{
@@ -4683,7 +4692,7 @@ alias c14604 = Id14604!(S14604.opDispatch!"go"); // ok
alias d14604 = Id14604!(S14604.go); // issue 14604, 'Error: template instance opDispatch!"go" cannot resolve forward reference'
/******************************************/
-// 14735
+// https://issues.dlang.org/show_bug.cgi?id=14735
enum CS14735 { yes, no }
@@ -4697,7 +4706,7 @@ void test14735()
{
char[64] buf;
- // Supported from 2.063: (http://dlang.org/changelog#implicitarraycast)
+ // Supported from 2.063: (https://dlang.org/changelog/2.063.html#implicitarraycast)
assert(indexOf14735a(buf[0..32], '\0') == 2);
assert(indexOf14735b(buf[0..32], '\0') == 2);
@@ -4707,7 +4716,7 @@ void test14735()
}
/******************************************/
-// 14743
+// https://issues.dlang.org/show_bug.cgi?id=14743
class A14743
{
@@ -4716,7 +4725,7 @@ class A14743
}
/******************************************/
-// 14802
+// https://issues.dlang.org/show_bug.cgi?id=14802
void test14802()
{
@@ -4756,7 +4765,7 @@ void test14802()
}
/******************************************/
-// 14886
+// https://issues.dlang.org/show_bug.cgi?id=14886
void test14886()
{
@@ -4778,9 +4787,9 @@ void test14886()
}
/******************************************/
-// 15156
+// https://issues.dlang.org/show_bug.cgi?id=15156
-// 15156
+// https://issues.dlang.org/show_bug.cgi?id=15156
auto f15116a(T)(string s, string arg2) { return 1; }
auto f15116b(T)(int i, string arg2) { return 2; }
@@ -4798,7 +4807,7 @@ void test15116()
}
/******************************************/
-// 15152
+// https://issues.dlang.org/show_bug.cgi?id=15152
void test15152()
{
@@ -4814,7 +4823,7 @@ void test15152()
}
/******************************************/
-// 15352
+// https://issues.dlang.org/show_bug.cgi?id=15352
struct S15352(T, T delegate(uint idx) supplier)
{
@@ -4844,7 +4853,7 @@ void test15352()
}
/******************************************/
-// 15623
+// https://issues.dlang.org/show_bug.cgi?id=15623
struct WithFoo15623a { void foo() {} }
struct WithFoo15623b { void foo() {} }
@@ -4875,7 +4884,7 @@ static assert( __traits(compiles, { alias Baz = CallsFoo15623!WithFoo15623d; ret
static assert(!__traits(compiles, { alias Baz = CallsFoo15623!WithoutFoo15623d; return Baz.init; }()));
/******************************************/
-// 15781
+// https://issues.dlang.org/show_bug.cgi?id=15781
void test15781()
{
@@ -4898,6 +4907,133 @@ void test15781()
}
/******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=16042
+
+struct Foo16042 {}
+
+auto map16042(alias func, T)(T t)
+{
+ return func(t);
+}
+
+auto toChars16042(R)(R r) if (is(R == int[]))
+{
+ Foo16042 f;
+ assert(toChars16042(f) == 1); // OK
+ assert(map16042!(toChars16042)(f) == 1); // OK <- NG
+ assert(map16042!((toChars16042))(f) == 1); // OK
+}
+
+auto toChars16042(Foo16042 f)
+{
+ return 1;
+}
+
+void test16042()
+{
+ [1].toChars16042();
+}
+
+// ---
+
+auto fn16042(R)(R r) if (is(R == int[])) {}
+auto fn16042(Foo16042 f) { return 1; }
+
+struct Namespace16042
+{
+ alias fn = fn16042!(int[]);
+}
+
+void test16042b()
+{
+ Foo16042 f;
+
+ with (Namespace16042)
+ {
+ static assert(!__traits(compiles, fn(f))); // NG
+ static assert(!__traits(compiles, map16042!(fn)(f))); // should be NG -> actually NG
+ static assert(!__traits(compiles, map16042!((fn))(f))); // NG
+ }
+}
+
+/******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15243
+
+struct S15243(Types...)
+{
+ void apply1(U)(U delegate(Types[0]) f0) {}
+
+ void apply2(U)(U delegate(Types) f0) {}
+
+ void apply3(U)(U delegate(Types[1..$]) f0) {}
+}
+
+void test15243()
+{
+ int f1(int) { return 0; }
+ int f2(int, long) { return 0; }
+ int f3(long, string) { return 0; }
+
+ S15243!(int) s1;
+ s1.apply1(&f1);
+ s1.apply2(&f1);
+
+ S15243!(int, long) s2;
+ s2.apply2(&f2);
+
+ S15243!(int, long, string) s3;
+ s3.apply3(&f3);
+}
+
+/******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15653
+
+alias TypeTuple15653(T...) = T;
+
+void test15653()
+{
+ void foo(U, T)(const T x) { static assert(is(T == U)); }
+ void bar(U, T)(immutable T x) { static assert(is(T == U)); }
+
+ struct X { int a; long[2] b; }
+ struct Y { int* a; long[] b; }
+
+ foreach (U; TypeTuple15653!( byte, short, int, long,
+ ubyte, ushort, uint, ulong,
+ float, double, real,
+ void delegate(),
+ int[2], X, X[2]))
+ {
+ foo!U(U.init); // OK
+ bar!U(U.init); // Was error, now OK
+
+ U u;
+ foo!U(u); // OK
+ bar!U(u); // Was error, now OK
+ }
+
+ foreach (U; TypeTuple15653!(void*, int**, long[], double*[2]))
+ {
+ foo!U(U.init); // OK
+ bar!U(U.init); // Was error, now OK
+
+ U u;
+ foo!U(u);
+ static assert(!__traits(compiles, bar!U(u)), U.stringof);
+ }
+
+ foreach (U; TypeTuple15653!(Object, Y, Y[2], int[int]))
+ {
+ foo!U(U.init); // OK
+ static assert(!__traits(compiles, bar!U(U.init)), U.stringof);
+
+ U u;
+ foo!U(u); // OK
+ static assert(!__traits(compiles, bar!U(u)), U.stringof);
+ }
+}
+
+/******************************************/
int main()
{
@@ -5011,6 +5147,10 @@ int main()
test14735();
test14802();
test15116();
+ test16042();
+ test16042b();
+ test15243();
+ test15653();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/test10.d b/gcc/testsuite/gdc.test/runnable/test10.d
index 671a61a..b9f8885 100644
--- a/gcc/testsuite/gdc.test/runnable/test10.d
+++ b/gcc/testsuite/gdc.test/runnable/test10.d
@@ -1,4 +1,10 @@
-// EXTRA_SOURCES: imports/test10a.d
+/*
+EXTRA_SOURCES: imports/test10a.d
+RUN_OUTPUT:
+---
+it is 32
+---
+*/
import imports.test10a;
diff --git a/gcc/testsuite/gdc.test/runnable/test10378.d b/gcc/testsuite/gdc.test/runnable/test10378.d
index f83ece1..8ad457a 100644
--- a/gcc/testsuite/gdc.test/runnable/test10378.d
+++ b/gcc/testsuite/gdc.test/runnable/test10378.d
@@ -1,4 +1,4 @@
-
+// EXTRA_FILES: imports/bar10378.d
int writeln() { return 3; }
struct S {
diff --git a/gcc/testsuite/gdc.test/runnable/test10619.d b/gcc/testsuite/gdc.test/runnable/test10619.d
new file mode 100644
index 0000000..4156289
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test10619.d
@@ -0,0 +1,38 @@
+/*
+https://issues.dlang.org/show_bug.cgi?id=10619
+
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+1
+2
+3
+4
+---
+*/
+
+void main()
+{
+ {
+ int x = 1;
+ print!x();
+ }
+ {
+ int x = 2;
+ print!x();
+ }
+ {
+ static int y = 3;
+ print!y();
+ }
+ {
+ static int y = 4;
+ print!y();
+ }
+}
+
+void print(alias symbol)()
+{
+ import core.stdc.stdio : printf;
+ printf("%d\n", symbol);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test10736.d b/gcc/testsuite/gdc.test/runnable/test10736.d
index 55b6f53..0b70606 100644
--- a/gcc/testsuite/gdc.test/runnable/test10736.d
+++ b/gcc/testsuite/gdc.test/runnable/test10736.d
@@ -1,5 +1,12 @@
-// EXTRA_SOURCES: imports/test10736a.d
-// EXTRA_SOURCES: imports/test10736b.d
+/*
+EXTRA_SOURCES: imports/test10736a.d
+EXTRA_SOURCES: imports/test10736b.d
+EXTRA_FILES: imports/test10736c.d
+RUN_OUTPUT:
+---
+success
+---
+*/
import imports.test10736a;
import imports.test10736b;
diff --git a/gcc/testsuite/gdc.test/runnable/test10942.d b/gcc/testsuite/gdc.test/runnable/test10942.d
index 0d48946..8c45c20 100644
--- a/gcc/testsuite/gdc.test/runnable/test10942.d
+++ b/gcc/testsuite/gdc.test/runnable/test10942.d
@@ -1,16 +1,22 @@
-// RUNNABLE_PHOBOS_TEST
// REQUIRED_ARGS: -g
-import std.string;
-
string getEnum(size_t count)
{
string en;
en ~= "enum KeyCode\n { \n";
- foreach (i; 0 .. count)
+ foreach (i; 1 .. count + 1)
{
- en ~= format(" memb_%s = %s,\n", i+1, i+1);
+ char[4] buffer;
+ int start = buffer.length;
+
+ while (i > 0)
+ {
+ buffer[--start] = cast(char) ('0' + (i % 10));
+ i /= 10;
+ }
+ char[] id = buffer[start .. $];
+ en ~= "memb_" ~ id ~ " = " ~ id ~ ",\n";
}
en ~= "} ";
diff --git a/gcc/testsuite/gdc.test/runnable/test11.d b/gcc/testsuite/gdc.test/runnable/test11.d
index 0d916c1..abaae37 100644
--- a/gcc/testsuite/gdc.test/runnable/test11.d
+++ b/gcc/testsuite/gdc.test/runnable/test11.d
@@ -1,5 +1,5 @@
-// RUNNABLE_PHOBOS_TEST
// REQUIRED_ARGS:
+// EXTRA_SOURCES: imports/std11file.d
extern(C) int printf(const char*, ...);
extern(C) size_t strlen(const char*);
@@ -531,14 +531,14 @@ struct NODE27 {
shared(NODE27) *next;
}
-static shared NODE27 nodetbl[3] =
+static shared NODE27[3] nodetbl =
[
{ 0,cast(shared(NODE27)*)nodetbl + 1},
{ 0,cast(shared(NODE27)*)nodetbl + 2},
{ 0,null}
];
-static shared NODE27 nodetbl2[3] = [
+static shared NODE27[3] nodetbl2 = [
{ 0,&nodetbl2[1]},
{ 0,&nodetbl2[2]},
{ 0,null}
@@ -682,7 +682,7 @@ void test35()
try {
alias Foo35!( Bar35 ) filter;
} catch (Exception e) {
- printf( "Exception %.*s", e.msg.length, e.msg.ptr );
+ printf( "Exception %.*s", cast(int)e.msg.length, e.msg.ptr );
} finally {
printf( "Done0." );
}
@@ -886,7 +886,7 @@ void test45()
char[5] foo;
foo[] = "hello";
- printf("'%.*s'\n", foo.length, foo.ptr);
+ printf("'%.*s'\n", cast(int)foo.length, foo.ptr);
func45(cast(string)foo);
}
@@ -1182,15 +1182,15 @@ void test62()
class A63
{
- private import std.file;
- alias std.file.getcwd getcwd;
+ private import imports.std11file;
+ alias imports.std11file.getcwd getcwd;
}
void test63()
{
A63 f = new A63();
auto s = f.getcwd();
- printf("%.*s\n", s.length, s.ptr);
+ printf("%.*s\n", cast(int)s.length, s.ptr);
}
@@ -1229,7 +1229,7 @@ void test65()
}
/**************************************/
-// 8809
+// https://issues.dlang.org/show_bug.cgi?id=8809
void test8809()
{
@@ -1298,7 +1298,7 @@ void test8809()
}
/**************************************/
-// 9734
+// https://issues.dlang.org/show_bug.cgi?id=9734
void test9734()
{
diff --git a/gcc/testsuite/gdc.test/runnable/test11447c.d b/gcc/testsuite/gdc.test/runnable/test11447c.d
index d09e3d2..ecec3e5 100644
--- a/gcc/testsuite/gdc.test/runnable/test11447c.d
+++ b/gcc/testsuite/gdc.test/runnable/test11447c.d
@@ -1,6 +1,7 @@
// COMPILE_SEPARATELY
// EXTRA_SOURCES: imports/c11447.d
-// PERMUTE_ARGS: -allinst -w -debug -g
+// REQUIRED_ARGS: -w
+// PERMUTE_ARGS: -allinst -debug -g
import imports.c11447;
diff --git a/gcc/testsuite/gdc.test/runnable/test11863.d b/gcc/testsuite/gdc.test/runnable/test11863.d
index c1285b3..f6446aa 100644
--- a/gcc/testsuite/gdc.test/runnable/test11863.d
+++ b/gcc/testsuite/gdc.test/runnable/test11863.d
@@ -1,6 +1,6 @@
// COMPILE_SEPARATELY
// EXTRA_SOURCES: imports/std11863conv.d
-// EXTRA_FILES: imports/std11863format.d
+// EXTRA_FILES: imports/std11863bitmanip.d imports/std11863format.d
import imports.std11863conv;
diff --git a/gcc/testsuite/gdc.test/runnable/test11934.d b/gcc/testsuite/gdc.test/runnable/test11934.d
new file mode 100644
index 0000000..4ab65d2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test11934.d
@@ -0,0 +1,22 @@
+void main()
+{
+ struct Struct11934
+ {
+ this(int i) { instances++; }
+ this(this) { instances++; }
+ ~this() { instances--; }
+ static size_t instances = 0;
+ }
+
+ struct Range11934
+ {
+ void popFront() { cnt++; }
+ @property front() { return Struct11934(0); }
+ @property empty() { return cnt >= 10; }
+ size_t cnt;
+ }
+
+ foreach(ref i; Range11934()) { }
+
+ assert(Struct11934.instances == 0);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test12.d b/gcc/testsuite/gdc.test/runnable/test12.d
index eb7e422..01c7486 100644
--- a/gcc/testsuite/gdc.test/runnable/test12.d
+++ b/gcc/testsuite/gdc.test/runnable/test12.d
@@ -1,4 +1,3 @@
-// RUNNABLE_PHOBOS_TEST
// PERMUTE_ARGS: -unittest -O -release -inline -fPIC -g
extern(C) int printf(const char*, ...);
@@ -156,7 +155,7 @@ int[] fun(int i)
{
assert(result[0] == 2);
}
- body
+ do
{
char result;
int[] res = new int[10];
@@ -312,15 +311,15 @@ void test12()
class A13
{
- int opShl(char* v) { return 1; }
- int opShl(string v) { return 2; }
+ int opBinary(string op : "<<")(char* v) { return 1; }
+ int opBinary(string op : "<<")(string v) { return 2; }
}
void test13()
{
A13 a = new A13();
int i;
- i = a.opShl(cast(string)"");
+ i = a << cast(string) "";
assert(i == 2);
i = a << cast(string)"";
assert(i == 2);
@@ -366,32 +365,32 @@ union U6
void test14()
{
- printf("%d %d %d\n", U1.a.offsetof, U1.b.offsetof, U1.sizeof);
+ printf("%zd %zd %zd\n", U1.a.offsetof, U1.b.offsetof, U1.sizeof);
assert(U1.a.offsetof == 0);
assert(U1.b.offsetof == 0);
assert(U1.sizeof == 4);
- printf("%d %d %d\n", U2.a.offsetof, U2.b.offsetof, U2.sizeof);
+ printf("%zd %zd %zd\n", U2.a.offsetof, U2.b.offsetof, U2.sizeof);
assert(U2.a.offsetof == 0);
assert(U2.b.offsetof == 0);
assert(U2.sizeof == 8);
- printf("%d %d %d\n", U3.a.offsetof, U3.b.offsetof, U3.sizeof);
+ printf("%zd %zd %zd\n", U3.a.offsetof, U3.b.offsetof, U3.sizeof);
assert(U3.a.offsetof == 0);
assert(U3.b.offsetof == 0);
assert(U3.sizeof == 8);
- printf("%d %d %d\n", U4.a.offsetof, U4.b.offsetof, U4.sizeof);
+ printf("%zd %zd %zd\n", U4.a.offsetof, U4.b.offsetof, U4.sizeof);
assert(U4.a.offsetof == 0);
assert(U4.b.offsetof == 0);
assert(U4.sizeof == 4);
- printf("%d %d %d\n", U5.a.offsetof, U5.b.offsetof, U5.sizeof);
+ printf("%zd %zd %zd\n", U5.a.offsetof, U5.b.offsetof, U5.sizeof);
assert(U5.a.offsetof == 0);
assert(U5.b.offsetof == 0);
assert(U5.sizeof == 8);
- printf("%d %d %d\n", U6.a.offsetof, U6.b.offsetof, U6.sizeof);
+ printf("%zd %zd %zd\n", U6.a.offsetof, U6.b.offsetof, U6.sizeof);
assert(U6.a.offsetof == 0);
assert(U6.b.offsetof == 0);
assert(U6.sizeof == 8);
@@ -434,7 +433,7 @@ class Cout17
printf("%d",x);
return this;
}
- alias set opShl;
+ alias opBinary(string op : "<<") = set;
}
void test17()
@@ -671,9 +670,9 @@ void test31()
printf("%s\n", foo.ptr);
auto s = typeid(typeof(foo.ptr)).toString();
- printf("%.*s\n", s.length, s.ptr);
+ printf("%.*s\n", cast(int)s.length, s.ptr);
s = typeid(char*).toString();
- printf("%.*s\n", s.length, s.ptr);
+ printf("%.*s\n", cast(int)s.length, s.ptr);
assert(typeid(typeof(foo.ptr)) == typeid(immutable(char)*));
}
@@ -689,7 +688,7 @@ class Qwert32
void foo()
{
- printf("yuiop = %d, asdfg = %d\n", Qwert32.yuiop.offsetof, Qwert32.asdfg.offsetof);
+ printf("yuiop = %zd, asdfg = %zd\n", Qwert32.yuiop.offsetof, Qwert32.asdfg.offsetof);
version(D_LP64)
{
assert(Qwert32.yuiop.offsetof == 16);
@@ -778,7 +777,7 @@ void test36()
{
A36 a = new A36;
- printf("A36.sizeof = %d\n", a.classinfo.initializer.length);
+ printf("A36.sizeof = %zd\n", a.classinfo.initializer.length);
printf("%d\n", a.s);
printf("%d\n", a.a);
printf("%d\n", a.b);
@@ -819,7 +818,7 @@ class Foo38
{
static void display_name()
{
- printf("%.*s\n", Object.classinfo.name.length, Object.classinfo.name.ptr);
+ printf("%.*s\n", cast(int)Object.classinfo.name.length, Object.classinfo.name.ptr);
assert(Object.classinfo.name == "object.Object");
assert(super.classinfo.name == "object.Object");
assert(this.classinfo.name == "test12.Foo38");
@@ -833,7 +832,7 @@ void test38()
/**************************************/
-// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/2409.html
+// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/2409.html
class C39
{
@@ -951,31 +950,28 @@ struct Shell
const int opCmp(ref const Shell s)
{
- import std.algorithm;
- return std.algorithm.cmp(this.str, s.str);
+ // Obviously not Unicode-aware...
+ foreach (const i, const a; this.str)
+ {
+ const b = s.str[i];
+ if (a < b) return -1;
+ if (a > b) return 1;
+ }
+
+ if (this.str.length < s.str.length) return -1;
+ if (this.str.length > s.str.length) return 1;
+ return 0;
}
}
void test45()
{
- import std.algorithm;
-
- Shell[3] a;
-
- a[0].str = "hello";
- a[1].str = "betty";
- a[2].str = "fred";
-
- a[].sort;
-
- foreach (Shell s; a)
- {
- printf("%.*s\n", s.str.length, s.str.ptr);
- }
+ Shell a = Shell("hello");
+ Shell b = Shell("betty");
+ Shell c = Shell("fred");
- assert(a[0].str == "betty");
- assert(a[1].str == "fred");
- assert(a[2].str == "hello");
+ assert(a > b);
+ assert(b < c);
}
/**************************************/
@@ -1153,7 +1149,7 @@ void test55()
void writefln(string s)
{
- printf("%.*s\n", s.length, s.ptr);
+ printf("%.*s\n", cast(int)s.length, s.ptr);
}
void test58()
diff --git a/gcc/testsuite/gdc.test/runnable/test12486.d b/gcc/testsuite/gdc.test/runnable/test12486.d
new file mode 100644
index 0000000..a0a6e2c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test12486.d
@@ -0,0 +1,18 @@
+module test12486;
+
+struct S { enum a = 1; } // or `const` but not for all types
+
+S f(ref int i)
+{
+ ++i;
+ return S();
+}
+
+void main()
+{
+ int i = 2;
+ assert(f(i).a == 1);
+ // ensure that f(i) was actually called, even though
+ // a is a statically known property of the returned type
+ assert(i == 3);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test14874.d b/gcc/testsuite/gdc.test/runnable/test14874.d
index 470a93c..fa69211 100644
--- a/gcc/testsuite/gdc.test/runnable/test14874.d
+++ b/gcc/testsuite/gdc.test/runnable/test14874.d
@@ -1,38 +1,38 @@
-// REQUIRED_ARGS: -dip25
-
-template indexOfReturn(T...)
-{
- static if (T.length == 0)
- {
- enum indexOfReturn = -1;
- }
- else static if (T[$ - 1] == "return")
- {
- enum indexOfReturn = T.length - 1;
- }
- else
- {
- enum indexOfReturn = indexOfReturn!(T[0..$-1]);
- }
-}
-
-struct Test
-{
- int n;
-
- ref int getN() return
- {
- return n;
- }
-
- int getNNonReturn()
- {
- return n;
- }
-}
-
-void main()
-{
- assert(indexOfReturn!(__traits(getFunctionAttributes, Test.getN)) != -1);
- assert(indexOfReturn!(__traits(getFunctionAttributes, Test.getNNonReturn)) == -1);
-}
+// REQUIRED_ARGS:
+
+template indexOfReturn(T...)
+{
+ static if (T.length == 0)
+ {
+ enum indexOfReturn = -1;
+ }
+ else static if (T[$ - 1] == "return")
+ {
+ enum indexOfReturn = T.length - 1;
+ }
+ else
+ {
+ enum indexOfReturn = indexOfReturn!(T[0..$-1]);
+ }
+}
+
+struct Test
+{
+ int n;
+
+ ref int getN() return
+ {
+ return n;
+ }
+
+ int getNNonReturn()
+ {
+ return n;
+ }
+}
+
+void main()
+{
+ assert(indexOfReturn!(__traits(getFunctionAttributes, Test.getN)) != -1);
+ assert(indexOfReturn!(__traits(getFunctionAttributes, Test.getNNonReturn)) == -1);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test15.d b/gcc/testsuite/gdc.test/runnable/test15.d
index 405171e..70e3a82 100644
--- a/gcc/testsuite/gdc.test/runnable/test15.d
+++ b/gcc/testsuite/gdc.test/runnable/test15.d
@@ -1,13 +1,10 @@
-// RUNNABLE_PHOBOS_TEST
-// REQUIRED_ARGS:
-// EXTRA_FILES: extra-files/test15.txt
+/*
+REQUIRED_ARGS: -Jrunnable/extra-files
+EXTRA_FILES: extra-files/test15.txt
+*/
-import std.array;
-import core.stdc.math : cos, fabs, sin, sqrt;
+import core.math;
import core.vararg;
-import std.math: rndtol, rint;
-import std.string;
-import std.stdio : File;
extern (C)
{
@@ -46,9 +43,9 @@ void test6()
void test7()
{
string s = `hello"there'you`;
- printf("s = '%.*s'\n", s.length, s.ptr);
+ printf("s = '%.*s'\n", cast(int)s.length, s.ptr);
assert(s == "hello\"there'you");
- ubyte[] b = cast(ubyte[])x"8B 7D f4 0d";
+ ubyte[] b = cast(ubyte[])"\x8B\x7D\xf4\x0d";
for (int i = 0; i < b.length; i++)
printf("b[%d] = x%02x\n", i, b[i]);
assert(b.length == 4);
@@ -95,7 +92,7 @@ struct Pair
return this;
}
- Pair opDiv(Pair other)
+ Pair opBinary(string op)(Pair other) if (op == "/")
{
Pair result;
@@ -206,8 +203,8 @@ class A15
List2.rehash;
}
private:
- int delegate(in int arg1) List1[char[]];
- int List2[char []];
+ int delegate(in int arg1)[char[]] List1;
+ int[char []] List2;
}
void test15()
@@ -223,7 +220,7 @@ void test16()
uint c = 200000;
while (c--)
a ~= 'x';
- //printf("a = '%.*s'\n", a.length, a.ptr);
+ //printf("a = '%.*s'\n", cast(int)a.length, a.ptr);
}
@@ -266,7 +263,7 @@ void test19()
int foo20(string s,char d) { return 1; }
int foo20(string s,double d) { return 2; }
-int foo20(string s,cdouble d) { return 3; }
+int foo20(string s,long d) { return 3; }
void test20()
{
@@ -280,10 +277,47 @@ void test20()
void test21()
{
+ // Minimalistic byLine implementation
+ static struct Lines
+ {
+ private string text, line;
+ this(string text)
+ {
+ this.text = text;
+ popFront();
+ }
+
+ bool empty() const { return text == ""; }
+
+ string front() const
+ {
+ assert(!empty);
+ return line;
+ }
+
+ void popFront()
+ {
+ assert(!empty);
+ foreach (const idx; 0 .. text.length)
+ {
+ if (text[idx] == '\n')
+ {
+ line = text[0..idx];
+ text = text[idx + 1..$];
+ return;
+ }
+ }
+
+ line = text;
+ text = null;
+ }
+ }
+
+ static immutable string file = import(`test15.txt`);
+
int[string] esdom;
- auto f = File("runnable/extra-files/test15.txt", "r");
- foreach(it; f.byLine())
+ foreach(it; Lines(file))
esdom[it.idup] = 0;
esdom.rehash;
@@ -362,16 +396,16 @@ void test25()
void test26()
{
- string[] instructions = std.array.split("a;b;c", ";");
+ string[] instructions =[ "a", "b", "c" ];
foreach(ref string instr; instructions)
{
- std.string.strip(instr);
+ instr = instr[];
}
foreach(string instr; instructions)
{
- printf("%.*s\n", instr.length, instr.ptr);
+ printf("%.*s\n", cast(int)instr.length, instr.ptr);
}
}
@@ -402,7 +436,7 @@ void test27()
void foo28(ClassInfo ci)
{
- printf("%.*s\n", ci.name.length, ci.name.ptr);
+ printf("%.*s\n", cast(int)ci.name.length, ci.name.ptr);
static int i;
switch (i++)
@@ -481,7 +515,7 @@ void test30()
/************************************/
-// http://www.digitalmars.com/d/archives/18204.html
+// https://www.digitalmars.com/d/archives/18204.html
// DMD0.050 also failed with alias.
alias int recls_bool_t;
@@ -786,7 +820,7 @@ class C44
void test44()
{
C44 c= new C44();
- printf("%.*s\n", c.arrArr[0].length, c.arrArr[0].ptr);
+ printf("%.*s\n", cast(int)c.arrArr[0].length, c.arrArr[0].ptr);
assert(c.arrArr[0] == "foo");
}
@@ -815,11 +849,11 @@ union A46
void test46()
{
A46 a;
- printf("%d\n", cast(byte*)&a.c - cast(byte*)&a);
- printf("%d\n", cast(byte*)&a.s - cast(byte*)&a);
- printf("%d\n", cast(byte*)&a.l - cast(byte*)&a);
- printf("%d\n", cast(byte*)&a.a - cast(byte*)&a);
- printf("%d\n", cast(byte*)&a.f - cast(byte*)&a);
+ printf("%td\n", cast(byte*)&a.c - cast(byte*)&a);
+ printf("%td\n", cast(byte*)&a.s - cast(byte*)&a);
+ printf("%td\n", cast(byte*)&a.l - cast(byte*)&a);
+ printf("%td\n", cast(byte*)&a.a - cast(byte*)&a);
+ printf("%td\n", cast(byte*)&a.f - cast(byte*)&a);
assert(cast(byte*)&a.c == cast(byte*)&a);
assert(cast(byte*)&a.s == cast(byte*)&a);
@@ -1044,9 +1078,9 @@ void test56()
/************************************/
-void det(float mat[][])
+void det(float[][] mat)
{
- float newmat[][];
+ float[][] newmat;
size_t i = newmat[0 .. (mat.length - 1)].length;
}
@@ -1099,7 +1133,6 @@ void test59()
class Foo60
{
int x;
-static:
this() { x = 3; }
~this() { }
}
@@ -1117,16 +1150,13 @@ void test60()
class StdString
{
- alias std.string.format toString;
+ alias nearest = core.math.rint;
}
void test61()
{
- int i = 123;
StdString g = new StdString();
- string s = g.toString("%s", i);
- printf("%.*s\n", s.length, s.ptr);
- assert(s == "123");
+ assert(g.nearest(123.1) == 123);
}
@@ -1366,6 +1396,38 @@ void test72()
assert(foos.length == 1);
}
+/************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19758
+
+void test19758()
+{
+ byte[1] a = [1];
+ int b = 0;
+
+ // If delete this 4 lines, the result is correct.
+ if (a[b] == 0)
+ {
+ a[b] = 0;
+ if (1 << b) { }
+ }
+
+ if ((a[b] & 0xFF) == 0)
+ {
+ assert((a[b] & 0xFF) == 0);
+ }
+}
+
+/************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19968
+
+@safe void test19968()
+{
+ int[2] array = [16, 678];
+ union U { int i; bool b; }
+ U u;
+ u.i = 0xDEADBEEF;
+ assert(array[u.b] == 678);
+}
/************************************/
@@ -1436,6 +1498,8 @@ int main()
test70();
test71();
test72();
+ test19758();
+ test19968();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/test15079.d b/gcc/testsuite/gdc.test/runnable/test15079.d
index 5316d73..e0fea97 100644
--- a/gcc/testsuite/gdc.test/runnable/test15079.d
+++ b/gcc/testsuite/gdc.test/runnable/test15079.d
@@ -1,3 +1,4 @@
+// EXTRA_FILES: imports/a15079.d
module test15079;
import imports.a15079;
diff --git a/gcc/testsuite/gdc.test/runnable/test15373.d b/gcc/testsuite/gdc.test/runnable/test15373.d
new file mode 100644
index 0000000..13144b7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test15373.d
@@ -0,0 +1,15 @@
+// https://issues.dlang.org/show_bug.cgi?id=15373
+
+// Using `typeid` on an `extern(C++) class` type is fine as it is evaluated at compile-time
+
+// Using `typeid` on an `extern(C++) class` instance is not ok because `extern(C++) class`
+// instances are not rooted in `Object`. See test/fail_compilation/test15373.d
+
+extern(C++) class C
+{ }
+
+void main()
+{
+ auto Cti = typeid(C);
+ assert(Cti.name == "test15373.C");
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test15568.d b/gcc/testsuite/gdc.test/runnable/test15568.d
new file mode 100644
index 0000000..d21ede2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test15568.d
@@ -0,0 +1,58 @@
+// REQUIRED_ARGS: -unittest -main -O
+// https://issues.dlang.org/show_bug.cgi?id=15568
+
+auto filter(alias pred)(D[])
+{
+ struct FilterResult
+ {
+ void popFront()
+ {
+ pred(null);
+ }
+
+ D[] array()
+ {
+ return null;
+ }
+ }
+ return FilterResult();
+}
+
+class A
+{
+ B foo(C c, D[] ds, bool f)
+ in
+ {
+ assert(c !is null);
+ }
+ do
+ {
+ D[] ds2 = ds.filter!(a => c).array;
+
+ return new B(ds2, f);
+ }
+}
+
+class B
+{
+ this(D[], bool)
+ {
+ }
+}
+
+class C
+{
+}
+
+struct D
+{
+}
+
+unittest
+{
+ auto a = new A;
+ C c = new C;
+
+ a.foo(c, null, false);
+}
+
diff --git a/gcc/testsuite/gdc.test/runnable/test15862.d b/gcc/testsuite/gdc.test/runnable/test15862.d
new file mode 100644
index 0000000..87e2560
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test15862.d
@@ -0,0 +1,39 @@
+// https://issues.dlang.org/show_bug.cgi?id=15862
+
+/*
+PERMUTE_ARGS:
+REQUIRED_ARGS: -O -release
+*/
+
+
+int* p() pure nothrow {return new int;}
+int[] a() pure nothrow {return [0];}
+Object o() pure nothrow {return new Object;}
+
+auto pa() pure nothrow {return new int;}
+
+void main()
+{
+ {
+ int* p1 = p();
+ int* p2 = p();
+
+ if (p1 is p2) assert(0);
+
+ int[] a1 = a();
+ int[] a2 = a();
+
+ if (a1 is a2) assert(0);
+
+ Object o1 = o();
+ Object o2 = o();
+
+ if (o1 is o2) assert(0);
+ }
+ {
+ auto p1 = pa();
+ auto p2 = pa();
+
+ if (p1 is p2) assert(0);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test16047.d b/gcc/testsuite/gdc.test/runnable/test16047.d
new file mode 100644
index 0000000..eff2db3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test16047.d
@@ -0,0 +1,17 @@
+// https://issues.dlang.org/show_bug.cgi?id=16047
+module test16047;
+
+void main()
+{
+ Reassignable[int][int] aa;
+
+ aa[0][0] = Reassignable.init;
+ aa[s()][0] = Reassignable.init; // range violation
+}
+
+struct Reassignable
+{
+ void opAssign(Reassignable) {}
+}
+
+int s() { return 1; }
diff --git a/gcc/testsuite/gdc.test/runnable/test16115.d b/gcc/testsuite/gdc.test/runnable/test16115.d
index c8ad464..8cd9c6a 100644
--- a/gcc/testsuite/gdc.test/runnable/test16115.d
+++ b/gcc/testsuite/gdc.test/runnable/test16115.d
@@ -25,7 +25,7 @@ auto call()
else // assert error
{
//return n = tagx, null;
- return n = Test.tag, null;
+ return n = Test.tag;
//return n = Test.tag;
}
}
diff --git a/gcc/testsuite/gdc.test/runnable/test16140.d b/gcc/testsuite/gdc.test/runnable/test16140.d
new file mode 100644
index 0000000..3004945
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test16140.d
@@ -0,0 +1,32 @@
+// https://issues.dlang.org/show_bug.cgi?id=16140
+
+int fun()
+{
+ static int count = 0;
+ if (count == 3)
+ {
+ count = 0;
+ return 0;
+ }
+ ++count;
+ return count;
+}
+
+void main()
+{
+ uint[] res;
+ while(auto value = fun())
+ res ~= value;
+ assert(res == [1, 2, 3]);
+
+ res.length = 0;
+ while(uint value = fun())
+ res ~= value;
+ assert(res == [1, 2, 3]);
+
+ res.length = 0;
+ while(const value = fun())
+ res ~= value;
+ assert(res == [1, 2, 3]);
+}
+
diff --git a/gcc/testsuite/gdc.test/runnable/test16555.d b/gcc/testsuite/gdc.test/runnable/test16555.d
new file mode 100644
index 0000000..78db1f7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test16555.d
@@ -0,0 +1,20 @@
+// https://issues.dlang.org/show_bug.cgi?id=16555
+
+void outer(
+ double x,
+ double a, double b, double c, double d,
+ double e, double f, double g, double h)
+{
+ assert(x == 999.0 && a == 1 && b == 2 && c == 3 && d == 4
+ && e == 5 && f == 6 && g == 7 && h == 8);
+}
+
+void main()
+{
+ void inner(double x)
+ {
+ outer(x, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0);
+ }
+
+ inner(999.0);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test16579.d b/gcc/testsuite/gdc.test/runnable/test16579.d
new file mode 100644
index 0000000..e42ead9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test16579.d
@@ -0,0 +1,57 @@
+// REQUIRED_ARGS: -unittest
+// PERMUTE_ARGS:
+// https://issues.dlang.org/show_bug.cgi?id=16579
+
+struct Thing
+{
+ enum Instance = Thing();
+ int a = 42;
+
+ void iter()
+ {
+ assert(this.a == 42);
+ }
+}
+
+void main()
+{
+ return Thing.Instance.iter; // Added 'return'
+}
+
+// From https://issues.dlang.org/show_bug.cgi?id=16576
+
+alias a = test2!();
+alias b = test3!();
+
+
+template test2()
+{
+ struct Thing{
+ static enum Instance = Thing([0, 1, 2, 3]);
+ int[] array;
+ void iter(in string str) const{
+ foreach(j, tup; this.array) assert(tup == j);
+ assert(this.array && this.array.length == 4);
+ }
+ }
+ unittest{
+ auto test(in string str){return Thing.Instance.iter(str);}
+ test("?");
+ }
+}
+
+template test3()
+{
+ struct Thing{
+ static enum Instance = Thing([0, 1, 2, 3]);
+ int[] array;
+ void iter() const{
+ foreach(j, tup; this.array) assert(tup == j);
+ assert(this.array && this.array.length == 4);
+ }
+ }
+ unittest{
+ auto test(){return Thing.Instance.iter();}
+ test();
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test17.d b/gcc/testsuite/gdc.test/runnable/test17.d
index 58873a0..4b17ede 100644
--- a/gcc/testsuite/gdc.test/runnable/test17.d
+++ b/gcc/testsuite/gdc.test/runnable/test17.d
@@ -5,15 +5,15 @@ extern(C) int printf(const char*, ...);
void ulog(string s)
{
- printf("%.*s\n",s.length, s.ptr);
+ printf("%.*s\n",cast(int)s.length, s.ptr);
fflush(stdout);
}
int open()
{
char *s;
- char abs[2000];
- char qu[100];
+ char[2000] abs;
+ char[100] qu;
int a;
ulog("reaches this only 9 times of 10!\n");
return 0;
@@ -22,7 +22,7 @@ int open()
int yhenda()
{
- char MEM[2200];
+ char[2200] MEM;
int a;
ulog("point(2.1) \n");
open();
diff --git a/gcc/testsuite/gdc.test/runnable/test17072.d b/gcc/testsuite/gdc.test/runnable/test17072.d
index 0ad0410..2c5977f 100644
--- a/gcc/testsuite/gdc.test/runnable/test17072.d
+++ b/gcc/testsuite/gdc.test/runnable/test17072.d
@@ -1,6 +1,6 @@
/*
REQUIRED_ARGS: -inline
-PERMUTE_ARGS: -release -O -dip25
+PERMUTE_ARGS: -release -O
*/
// https://issues.dlang.org/show_bug.cgi?id=17072
diff --git a/gcc/testsuite/gdc.test/runnable/test17073.d b/gcc/testsuite/gdc.test/runnable/test17073.d
deleted file mode 100644
index 82df219..0000000
--- a/gcc/testsuite/gdc.test/runnable/test17073.d
+++ /dev/null
@@ -1,13 +0,0 @@
-struct S0
-{
- int x = void;
-}
-struct S1
-{
- S0 x = S0(42);
-}
-void main()
-{
- S1 x;
- assert(x.x.x == 42);
-}
diff --git a/gcc/testsuite/gdc.test/runnable/test17181.d b/gcc/testsuite/gdc.test/runnable/test17181.d
new file mode 100644
index 0000000..59ee895
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17181.d
@@ -0,0 +1,12 @@
+// EXTRA_SOURCES: imports/test17181a.d imports/test17181b.d
+
+module test17181;
+import imports.test17181a;
+
+int foo()
+{
+ return imports.test17181a.abc(1);
+}
+
+static this() { assert(a == 2); }
+void main() {}
diff --git a/gcc/testsuite/gdc.test/runnable/test17181b.d b/gcc/testsuite/gdc.test/runnable/test17181b.d
new file mode 100644
index 0000000..5e4a4be
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17181b.d
@@ -0,0 +1,16 @@
+// EXTRA_SOURCES: imports/test17181a.d
+// EXTRA_FILES: imports/test17181c.d
+module test17181b;
+
+import imports.test17181c; // only imported, not compiled
+ // => must not be in ModuleInfo.importedModules
+
+static this()
+{
+ // By instantiating the getA template, its local imports.test17181a
+ // import is added to this module (not to imports.test17181c), and its
+ // module ctor must have run already.
+ assert(imports.test17181c.getA!() == 1);
+}
+
+void main() {}
diff --git a/gcc/testsuite/gdc.test/runnable/test17246.d b/gcc/testsuite/gdc.test/runnable/test17246.d
new file mode 100644
index 0000000..2d51720
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17246.d
@@ -0,0 +1,50 @@
+/* REQUIRED_ARGS:
+ * OPTIONAL_ARGS:
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=17246
+
+struct Foo
+{
+ int* rc;
+ this(int val)
+ {
+ rc = new int;
+ (*rc) = 1;
+ }
+ this(this)
+ {
+ (*rc)++;
+ }
+ ~this()
+ {
+ if (rc)
+ {
+ assert(*rc > 0);
+ (*rc)--;
+ }
+ }
+}
+
+struct Bar
+{
+ Foo foo;
+ this(Foo foo, bool)
+ {
+ this.foo = foo;
+ }
+}
+
+bool fun(bool val) { return !val; }
+
+auto genBar(bool flag)
+{
+ return flag ? Bar() : Bar(Foo(10), fun(!flag));
+}
+
+int main(string[] args)
+{
+ auto bar = genBar(args.length == 0);
+ return 0;
+}
+
diff --git a/gcc/testsuite/gdc.test/runnable/test17258.d b/gcc/testsuite/gdc.test/runnable/test17258.d
new file mode 100644
index 0000000..1e86c95
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17258.d
@@ -0,0 +1,33 @@
+class ByNameC(alias Var)
+{
+ alias var = Var;
+}
+
+struct ByNameS(alias Var)
+{
+ alias var = Var;
+ ubyte value = 1;
+}
+
+void main()
+{
+ ulong x;
+ ByNameS!x v;
+ ubyte w = 2;
+
+ v.var = 0xAA_BB; /* stomps over v.value and w */
+
+ assert(w == 2);
+ assert(v.value == 1);
+ //printf("%x\n", w); /* prints "aa", should be 2 */
+ //printf("%x\n", v.value); /* prints "bb", should be 1 */
+
+ auto c = new ByNameC!x;
+ c.var = 0xAA_BB; /* stomps over c.__vptr */
+
+ assert(*cast(ulong*)c != 0xAA_BB);
+ //printf("%x\n", *cast(ulong*)c); /* prints "aabb", should be pointer value */
+
+ assert(x == 0xAA_BB);
+ //printf("%lx\n", x); /* prints 0, should be "aabb" */
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test17337.d b/gcc/testsuite/gdc.test/runnable/test17337.d
new file mode 100644
index 0000000..f817eb7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17337.d
@@ -0,0 +1,23 @@
+// REQUIRED_ARGS: -mcpu=native
+
+static if (__traits(compiles, __vector(ubyte[16])))
+{
+ alias ubyte16 = __vector(ubyte[16]);
+
+ ubyte16 bug(ubyte val)
+ {
+ immutable ubyte16 a = 0, b = val;
+ return b;
+ }
+
+ void main()
+ {
+ bug(0);
+ }
+}
+else
+{
+ void main()
+ {
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test17338.d b/gcc/testsuite/gdc.test/runnable/test17338.d
index 5c5012f..1c937be 100644
--- a/gcc/testsuite/gdc.test/runnable/test17338.d
+++ b/gcc/testsuite/gdc.test/runnable/test17338.d
@@ -1,25 +1,23 @@
// PERMUTE_ARGS:
+
+// COMDAT folding increases runtime by > 80x
+// REQUIRED_ARGS(windows): -L/OPT:NOICF
+
+// Apparently omf or optlink does not support more than 32767 symbols.
+// DISABLED: win32
+
// Generate \sum_{i=0}^{14} 2^i = 32767 template instantiations
// (each with 3 sections) to use more than 64Ki sections in total.
-version (Win32)
+
+size_t foo(size_t i, size_t mask)()
{
- // Apparently omf or optlink does not support more than 32767 symbols.
- void main()
- {
- }
+ static if (i == 14)
+ return mask;
+ else
+ return foo!(i + 1, mask) + foo!(i + 1, mask | (1UL << i));
}
-else
-{
- size_t foo(size_t i, size_t mask)()
- {
- static if (i == 14)
- return mask;
- else
- return foo!(i + 1, mask) + foo!(i + 1, mask | (1UL << i));
- }
- void main()
- {
- assert(foo!(0, 0) != 0);
- }
+void main()
+{
+ assert(foo!(0, 0) != 0);
}
diff --git a/gcc/testsuite/gdc.test/runnable/test17373.d b/gcc/testsuite/gdc.test/runnable/test17373.d
deleted file mode 100644
index 93753ba..0000000
--- a/gcc/testsuite/gdc.test/runnable/test17373.d
+++ /dev/null
@@ -1,20 +0,0 @@
-interface Foo { void visit (int); }
-interface Bar { void visit(double); }
-interface FooBar : Foo, Bar {}
-static assert(__traits(getOverloads, FooBar, "visit").length == 2);
-
-interface Fbar { void visit(char); void visit(double); }
-interface Triple : Foo, Bar, Fbar {}
-static assert(__traits(getOverloads, Triple, "visit").length == 3);
-
-interface InheritanceMadness : FooBar, Triple {}
-static assert(__traits(getOverloads, Triple, "visit").length == 3);
-
-interface Simple
-{
- int square(int);
- real square(real);
-}
-static assert(__traits(getOverloads, Simple, "square").length == 2);
-
-void main() {}
diff --git a/gcc/testsuite/gdc.test/runnable/test17559.d b/gcc/testsuite/gdc.test/runnable/test17559.d
new file mode 100644
index 0000000..a759f15
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17559.d
@@ -0,0 +1,84 @@
+// REQUIRED_ARGS: -g
+// REQUIRED_ARGS(linux freebsd dragonflybsd): -L-export-dynamic
+// PERMUTE_ARGS:
+// DISABLED: osx
+
+import core.stdc.stdio;
+
+void main()
+{
+ fun(1);
+ fun(2);
+ fun(3);
+#line 30
+ fun(4);
+
+ foo(1, 10);
+ foo(2, 10);
+ foo(3, 10);
+#line 40
+ foo(4, 10);
+}
+
+void fun(int n, int defParam = 10)
+{
+ try
+ {
+ if (n == 4)
+ throw new Exception("fun");
+ }
+ catch(Exception e)
+ {
+ string s = e.toString();
+ printf("%.*s\n", cast(int)s.length, s.ptr);
+ int line = lineInMain(e.toString());
+ assert(line >= 30 && line <= 32); // return address might be next statement
+ }
+}
+
+void foo(int n, int m)
+{
+ try
+ {
+ if (n == 4)
+ throw new Exception("foo");
+ }
+ catch(Exception e)
+ {
+ string s = e.toString();
+ printf("%.*s\n", cast(int)s.length, s.ptr);
+ int line = lineInMain(e.toString());
+ assert(line >= 40 && line <= 41); // return address might be next statement
+ }
+}
+
+int lineInMain(string msg)
+{
+ // find line number of _Dmain in stack trace
+ // on linux: file.d:line _Dmain [addr]
+ // on windows: addr in _Dmain at file.d(line)
+ int line = 0;
+ bool mainFound = false;
+ for (size_t pos = 0; pos + 6 < msg.length; pos++)
+ {
+ if (msg[pos] == '\n')
+ {
+ line = 0;
+ mainFound = false;
+ }
+ else if ((msg[pos] == ':' || msg[pos] == '(') && line == 0)
+ {
+ for (pos++; pos < msg.length && msg[pos] >= '0' && msg[pos] <= '9'; pos++)
+ line = line * 10 + msg[pos] - '0';
+ if (line > 0 && mainFound)
+ return line;
+ }
+ else if (msg[pos .. pos + 6] == "_Dmain" || msg[pos .. pos + 6] == "D main")
+ {
+ mainFound = true;
+ if (line > 0 && mainFound)
+ return line;
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test17684.d b/gcc/testsuite/gdc.test/runnable/test17684.d
index 4734d96..d42baac 100644
--- a/gcc/testsuite/gdc.test/runnable/test17684.d
+++ b/gcc/testsuite/gdc.test/runnable/test17684.d
@@ -74,6 +74,20 @@ bool boolTest(T)()
assert(t == boolValue);
assert(boolValue == t);
+ t = true; // tests inferType
+ auto inferredValue = t;
+ assert(inferredValue == true);
+
+ t = true; // tests function argument
+ bool functionCall(bool test)
+ {
+ return test;
+ }
+ assert(t == functionCall(t));
+
+ t = true; // tests CastExp
+ assert(t == cast(bool)t);
+
t = true;
return t; // tests ReturnStatement
}
@@ -97,6 +111,9 @@ int intTest(T)()
assert(t <= 42);
assert(42 >= t);
+ t = 42; // tests CastExp
+ assert(42 == cast(int)t);
+
// These currently don't work for properties due to https://issues.dlang.org/show_bug.cgi?id=8006
static if (!(typeid(T) is typeid(StructProperty!int)) && !(typeid(T) is typeid(ClassProperty!int)))
{
diff --git a/gcc/testsuite/gdc.test/runnable/test17868.d b/gcc/testsuite/gdc.test/runnable/test17868.d
new file mode 100644
index 0000000..4609440
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17868.d
@@ -0,0 +1,45 @@
+/*
+REQUIRED_ARGS: -betterC
+RUN_OUTPUT:
+---
+init
+init
+main
+fini
+fini
+---
+*/
+
+import core.stdc.stdio;
+
+extern(C):
+
+pragma(crt_constructor)
+void init()
+{
+ puts("init");
+}
+
+pragma(crt_destructor)
+void fini2()
+{
+ puts("fini");
+}
+
+pragma(crt_constructor)
+void foo()
+{
+ puts("init");
+}
+
+pragma(crt_destructor)
+void bar()
+{
+ puts("fini");
+}
+
+int main()
+{
+ puts("main");
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test17868b.d b/gcc/testsuite/gdc.test/runnable/test17868b.d
new file mode 100644
index 0000000..d28cae2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17868b.d
@@ -0,0 +1,52 @@
+/*
+REQUIRED_ARGS: -betterC
+RUN_OUTPUT:
+---
+init
+init
+main
+fini
+fini
+---
+*/
+
+import core.stdc.stdio;
+
+extern(C):
+
+pragma(crt_constructor)
+pragma(crt_destructor)
+void ctor_dtor_1()
+{
+ __gshared bool initialized;
+ puts(initialized ? "fini" : "init");
+ initialized = true;
+}
+
+pragma(crt_constructor)
+__gshared int var; // ignored for anything but functions
+
+pragma(crt_constructor)
+{
+ version (all) void init()
+ {
+ puts("init");
+ }
+}
+
+template fini()
+{
+ pragma(crt_destructor)
+ void fini()
+ {
+ puts("fini");
+ }
+}
+
+alias instantiate = fini!();
+
+int main()
+{
+ puts("main");
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test17885.d b/gcc/testsuite/gdc.test/runnable/test17885.d
new file mode 100644
index 0000000..a6e521b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17885.d
@@ -0,0 +1,11 @@
+module test17885;
+
+struct T { ulong a, b; }
+T f() { return T(); }
+
+void main()
+{
+ int[T] set = [f(): 0];
+ set.remove(f());
+ assert(f() !in set);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test17940.d b/gcc/testsuite/gdc.test/runnable/test17940.d
new file mode 100644
index 0000000..1ea43db
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17940.d
@@ -0,0 +1,46 @@
+// PERMUTE_ARGS: -O
+
+// https://issues.dlang.org/show_bug.cgi?id=17940
+
+struct Array
+{
+ long length;
+ long ptr;
+}
+
+struct Struct
+{
+ bool b = true;
+}
+
+void fun1(int)
+{
+}
+
+void fun2(Array arr, int, int)
+{
+ assert(!arr.length);
+}
+
+void fn(Struct* str)
+{
+ Array arr;
+ if (!str)
+ {
+ return;
+ }
+ if (str)
+ {
+ fun1(str.b);
+ }
+ if (str.b)
+ {
+ fun2(arr, str.b, 0);
+ }
+}
+
+void main()
+{
+ Struct s;
+ fn(&s);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test17943.d b/gcc/testsuite/gdc.test/runnable/test17943.d
new file mode 100644
index 0000000..7ec2665
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17943.d
@@ -0,0 +1,9 @@
+// REQUIRED_ARGS: -O
+
+void main()
+{
+ int[32] data;
+ auto p1 = data.ptr + 0;
+ auto p2 = data.ptr + 3;
+ assert(p2 - p1 == 3);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test17965.d b/gcc/testsuite/gdc.test/runnable/test17965.d
new file mode 100644
index 0000000..2937d6d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17965.d
@@ -0,0 +1,29 @@
+/***************************************/
+// https://issues.dlang.org/show_bug.cgi?id=17965
+
+import core.stdc.math;
+
+struct Point{double x,y;}
+
+Point foo10()
+{
+ Point result = Point(1.0, 2.0);
+ return result;
+}
+
+Point foo20()
+{
+ Point result;
+ return result;
+}
+
+void main()
+{
+ auto p = foo10();
+ assert(p.x == 1.0);
+ assert(p.y == 2.0);
+
+ auto q = foo20();
+ assert(isnan(q.x));
+ assert(isnan(q.y));
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test18054.d b/gcc/testsuite/gdc.test/runnable/test18054.d
new file mode 100644
index 0000000..610dff1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test18054.d
@@ -0,0 +1,41 @@
+/+
+REQUIRED_ARGS: -d
+RUN_OUTPUT:
+---
+float: 1 == 1
+double: 1 == 1
+real: 1 == 1
+ifloat: 1 == 1
+idouble: 1 == 1
+ireal: 1 == 1
+cfloat: 1 == 1
+cdouble: 1 == 1
+creal: 1 == 1
+---
++/
+
+import core.stdc.stdio : printf;
+
+void test(T, string lit)()
+{
+ T d = mixin(lit);
+ bool runtime = cast(bool) d;
+ bool folded = cast(bool) mixin(lit);
+
+ printf((T.stringof ~ ": %d == %d\n\0").ptr, runtime, folded);
+}
+
+void main()
+{
+ test!(float, "0.5f");
+ test!(double, "0.5" );
+ test!(real, "0.5L");
+
+ test!(ifloat, "0.5i");
+ test!(idouble, "0.5i");
+ test!(ireal, "0.5i");
+
+ test!(cfloat, "0.3 + 0.5i");
+ test!(cdouble, "0.3 + 0.5i");
+ test!(creal, "0.3 + 0.5i");
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test18296.d b/gcc/testsuite/gdc.test/runnable/test18296.d
new file mode 100644
index 0000000..0f7ac7e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test18296.d
@@ -0,0 +1,24 @@
+// REQUIRED_ARGS: -cov
+// PERMUTE_ARGS: -fPIC
+alias AliasSeq(Args...) = Args;
+
+struct Duration
+{
+ this(long hnsecs)
+ {
+ _hnsecs = hnsecs;
+ }
+
+
+ long _hnsecs;
+}
+
+void main()
+{
+ foreach(U; AliasSeq!(Duration, const Duration))
+ {
+ const Duration t = 42;
+ U u = t;
+ assert(t._hnsecs == u._hnsecs);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test18534.d b/gcc/testsuite/gdc.test/runnable/test18534.d
new file mode 100644
index 0000000..8d4653d
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test18534.d
@@ -0,0 +1,18 @@
+/* REQUIRED_ARGS: -O
+ * PERMUTE_ARGS:
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=18534
+
+auto blah(char ch) { return ch; }
+
+auto foo(int i)
+{
+ return blah(i ? 'A' : 'A');
+}
+
+void main()
+{
+ auto c = foo(0);
+ assert(c == 'A');
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test18545.d b/gcc/testsuite/gdc.test/runnable/test18545.d
new file mode 100644
index 0000000..fc3d24a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test18545.d
@@ -0,0 +1,63 @@
+module test18545;
+
+enum Constness
+{
+ Mutable,
+ Const,
+ Immutable,
+}
+
+enum Cases = [Constness.Mutable, Constness.Const, Constness.Immutable];
+
+void main()
+{
+ static foreach (from; Cases)
+ {
+ static foreach (to; Cases)
+ {
+ test!(from, to)();
+ }
+ }
+}
+
+void test(Constness from, Constness to)()
+{
+ struct S {
+ int i;
+
+ @property int get() const { return 0; }
+
+ alias get this;
+ }
+
+ static if (from == Constness.Mutable)
+ {
+ alias ConstS = S;
+ }
+ else static if (from == Constness.Const)
+ {
+ alias ConstS = const(S);
+ }
+ else
+ {
+ alias ConstS = immutable(S);
+ }
+
+ ConstS s1 = S(42);
+
+ // this should reinterpret-cast, NOT call the implicit constructor with .get!
+ static if (to == Constness.Mutable)
+ {
+ auto s2 = cast() s1;
+ }
+ else static if (to == Constness.Const)
+ {
+ const s2 = cast(const) s1;
+ }
+ else static if (to == Constness.Immutable)
+ {
+ immutable s2 = cast(immutable) s1;
+ }
+
+ assert(s2.i == s1.i, "Bug 18545 occurred casting from "~from.stringof~" to "~to.stringof);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test18746.d b/gcc/testsuite/gdc.test/runnable/test18746.d
new file mode 100644
index 0000000..a2cf38b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test18746.d
@@ -0,0 +1,16 @@
+// https://issues.dlang.org/show_bug.cgi?id=18746
+
+struct S {}
+
+S f(ref int i)
+{
+ ++i;
+ return S();
+}
+
+void main()
+{
+ int i = 2;
+ assert(f(i) == S());
+ assert(i == 3); /* failed before patch, i = 2; should pass */
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test18868.d b/gcc/testsuite/gdc.test/runnable/test18868.d
new file mode 100644
index 0000000..b0085c0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test18868.d
@@ -0,0 +1,9 @@
+/*
+COMPILE_SEPARATELY
+EXTRA_SOURCES: imports/test18868_a.d imports/test18868_fls.d
+PERMUTE_ARGS:
+*/
+
+import imports.test18868_fls;
+alias floop = FLS!(int);
+void main() {}
diff --git a/gcc/testsuite/gdc.test/runnable/test18868_2.d b/gcc/testsuite/gdc.test/runnable/test18868_2.d
new file mode 100644
index 0000000..a90ec1f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test18868_2.d
@@ -0,0 +1,13 @@
+mixin(genCtor("666")); mixin(genCtor("777"));
+
+int i;
+
+string genCtor(string a)
+{
+ return "static this() { i += " ~ a ~ "; }";
+}
+
+void main()
+{
+ assert(i == 0 + 666 + 777);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test18868_3.d b/gcc/testsuite/gdc.test/runnable/test18868_3.d
new file mode 100644
index 0000000..ed6f172
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test18868_3.d
@@ -0,0 +1,16 @@
+static foreach(s; ["666", "777", "888"])
+{
+ mixin(genCtor(s));
+}
+
+int i;
+
+string genCtor(string a)
+{
+ return "static this() { i += " ~ a ~ "; }";
+}
+
+void main()
+{
+ assert(i == 0 + 666 + 777 + 888);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test18880.d b/gcc/testsuite/gdc.test/runnable/test18880.d
new file mode 100644
index 0000000..c275ef2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test18880.d
@@ -0,0 +1,20 @@
+/* REQUIRED_ARGS: -unittest
+ PERMUTE_ARGS:
+ */
+
+static foreach(s; ["666", "777", "888"])
+{
+ mixin(genTest(s));
+}
+
+int i;
+
+string genTest(string a)
+{
+ return "unittest { i += " ~ a ~ "; }";
+}
+
+void main()
+{
+ assert(i == 0 + 666 + 777 + 888);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test18916.d b/gcc/testsuite/gdc.test/runnable/test18916.d
new file mode 100644
index 0000000..0e844ad
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test18916.d
@@ -0,0 +1,22 @@
+struct Line
+{
+ int line;
+ alias line this;
+
+ this(int line)
+ {
+ this.line = line;
+ }
+}
+
+void foo(Line line1 = __LINE__, int line2 = __LINE__, int line3 = int(__LINE__))
+{
+ assert(line1 == 12);
+ assert(line2 == 21);
+ assert(line3 == 12);
+}
+
+void main()
+{
+ foo();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19.d b/gcc/testsuite/gdc.test/runnable/test19.d
index b9360ee..372d32f 100644
--- a/gcc/testsuite/gdc.test/runnable/test19.d
+++ b/gcc/testsuite/gdc.test/runnable/test19.d
@@ -128,8 +128,8 @@ int[] test6_1(int[] a)
void test6()
{
printf("test6()\n");
- int b[3];
- int a[];
+ int[3] b;
+ int[] a;
b[0] = 0;
b[1] = 1;
@@ -144,7 +144,7 @@ void test6()
class OutBuffer7
{
- char data[];
+ char[] data;
uint offset;
void write(const(char) *p, uint nbytes)
@@ -161,7 +161,7 @@ void test7()
OutBuffer7 ob = new OutBuffer7;
ob.data = new char[10];
- printf("ob.data.length = %d\n", ob.data.length);
+ printf("ob.data.length = %zd\n", ob.data.length);
assert(ob.data.length == 10);
for (i = 0; i < 10; i++)
assert(ob.data[i] == char.init);
@@ -169,14 +169,14 @@ void test7()
printf("test7.1()\n");
ob.data[] = '-';
printf("test7.2()\n");
- printf("ob.data[] = '%.*s'\n", ob.data.length, ob.data.ptr);
+ printf("ob.data[] = '%.*s'\n", cast(int)ob.data.length, ob.data.ptr);
for (i = 0; i < 10; i++)
assert(ob.data[i] == '-');
ob.offset = 3;
ob.write("foo", 3);
- printf("ob.data.length = %d\n", ob.data.length);
- printf("ob.data[] = '%.*s'\n", ob.data.length, ob.data.ptr);
+ printf("ob.data.length = %zd\n", ob.data.length);
+ printf("ob.data[] = '%.*s'\n", cast(int)ob.data.length, ob.data.ptr);
for (i = 0; i < 10; i++)
{
if (i < 3 || i >= 6)
@@ -404,7 +404,7 @@ void test20()
}
/* ================================ */
-// 7848
+// https://issues.dlang.org/show_bug.cgi?id=7848
@safe pure nothrow void func7848() {}
@@ -414,7 +414,7 @@ void test20()
}
/* ================================ */
-// 8128
+// https://issues.dlang.org/show_bug.cgi?id=8128
int flag8128 = 0;
diff --git a/gcc/testsuite/gdc.test/runnable/test19086.d b/gcc/testsuite/gdc.test/runnable/test19086.d
new file mode 100644
index 0000000..026aee4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19086.d
@@ -0,0 +1,64 @@
+// REQUIRED_ARGS: -g
+// REQUIRED_ARGS(linux freebsd dragonflybsd): -L-export-dynamic
+// PERMUTE_ARGS:
+// DISABLED: osx
+
+void run19086()
+{
+ long x = 1;
+ int y = 0;
+#line 20
+ throw newException();
+}
+
+// moved here to keep run19086 short
+Exception newException() { return new Exception("hi"); }
+
+void test19086()
+{
+ try
+ {
+ run19086();
+ }
+ catch(Exception e)
+ {
+ int line = findLineStackTrace(e.toString(), "run19086");
+ assert(line >= 20 && line <= 21);
+ }
+}
+
+int findLineStackTrace(string msg, string func)
+{
+ // find line number of _Dmain in stack trace
+ // on linux: file.d:line _Dmain [addr]
+ // on windows: addr in _Dmain at file.d(line)
+ int line = 0;
+ bool found = false;
+ for (size_t pos = 0; pos + func.length < msg.length; pos++)
+ {
+ if (msg[pos] == '\n')
+ {
+ line = 0;
+ found = false;
+ }
+ else if ((msg[pos] == ':' || msg[pos] == '(') && line == 0)
+ {
+ for (pos++; pos < msg.length && msg[pos] >= '0' && msg[pos] <= '9'; pos++)
+ line = line * 10 + msg[pos] - '0';
+ if (line > 0 && found)
+ return line;
+ }
+ else if (msg[pos .. pos + func.length] == func)
+ {
+ found = true;
+ if (line > 0 && found)
+ return line;
+ }
+ }
+ return 0;
+}
+
+void main()
+{
+ test19086();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19122.d b/gcc/testsuite/gdc.test/runnable/test19122.d
new file mode 100644
index 0000000..369f5dd
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19122.d
@@ -0,0 +1,46 @@
+// https://issues.dlang.org/show_bug.cgi?id=19122
+struct HasDestructor
+{
+ ~this()
+ {
+ assert(0);
+ }
+ this(this)
+ {
+ assert(0);
+ }
+}
+
+struct S
+{
+ union
+ {
+ int i;
+ HasDestructor h;
+ }
+}
+
+struct S2
+{
+ union
+ {
+ align(1)
+ {
+ int i;
+ HasDestructor h;
+ }
+ }
+}
+
+void main()
+{
+ {
+ S s;
+ s = s;
+ }
+
+ {
+ S2 s2;
+ s2 = s2;
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19185.d b/gcc/testsuite/gdc.test/runnable/test19185.d
new file mode 100644
index 0000000..d5a1e5e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19185.d
@@ -0,0 +1,22 @@
+// https://issues.dlang.org/show_bug.cgi?id=19185
+
+int fun()
+{
+ int x = 2;
+ struct A
+ {
+ int a;
+ this(int a)
+ {
+ this.a = a + x; // segault here
+ }
+ }
+
+ A a = 5;
+ return a.a;
+}
+
+void main()
+{
+ assert(fun() == 7);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19192.d b/gcc/testsuite/gdc.test/runnable/test19192.d
new file mode 100644
index 0000000..24f2450
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19192.d
@@ -0,0 +1,18 @@
+// https://issues.dlang.org/show_bug.cgi?id=19192
+interface Foo
+{
+ Foo covariant();
+}
+
+abstract class Frop : Foo {}
+
+class Bar : Frop
+{
+ Bar covariant() { return this; }
+}
+
+void main()
+{
+ Foo foo = new Bar;
+ assert(foo is foo.covariant());
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19223.d b/gcc/testsuite/gdc.test/runnable/test19223.d
new file mode 100644
index 0000000..6faa59b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19223.d
@@ -0,0 +1,38 @@
+
+static if (__traits(compiles, __vector(int[4])))
+{
+ alias int4 = __vector(int[4]);
+
+ int fn(const int[4] x)
+ {
+ int sum = 0;
+ foreach (i; x) sum += i;
+ return sum;
+ }
+
+ // https://issues.dlang.org/show_bug.cgi?id=19223
+ void test19223()
+ {
+ int4 v1 = int4.init;
+ assert(fn(v1.array) == 0);
+ assert(fn(int4.init.array) == 0);
+ }
+
+ // https://issues.dlang.org/show_bug.cgi?id=19607
+ void test19607()
+ {
+ int4 v1 = 1;
+ assert(fn(v1.array) == 4);
+ assert(fn(int4(2).array) == 8);
+ }
+
+ void main ()
+ {
+ test19223();
+ test19607();
+ }
+}
+else
+{
+ void main() { }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19251.d b/gcc/testsuite/gdc.test/runnable/test19251.d
new file mode 100644
index 0000000..9e0b9d4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19251.d
@@ -0,0 +1,20 @@
+string result;
+
+struct A
+{
+ int[] a;
+ immutable(A) fun()
+ {
+ result ~= "Yo";
+ return immutable A([7]);
+ }
+
+ alias fun this;
+}
+
+void main()
+{
+ A a;
+ immutable A b = a; // error: cannot implicitly convert expression a of type A to immutable(A)
+ assert(result == "Yo");
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19317.d b/gcc/testsuite/gdc.test/runnable/test19317.d
new file mode 100644
index 0000000..a5633b8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19317.d
@@ -0,0 +1,32 @@
+// REQUIRED_ARGS: -preview=dip1008
+// https://issues.dlang.org/show_bug.cgi?id=19317
+
+class MyException: Exception {
+ static int numInstances;
+ this(string msg) {
+ super(msg);
+ ++numInstances;
+ }
+
+ ~this() {
+ --numInstances;
+ }
+}
+
+void main() {
+ assert(MyException.numInstances == 0);
+
+ try
+ throw new MyException("oops");
+ catch(MyException _)
+ assert(MyException.numInstances == 1);
+
+ assert(MyException.numInstances == 0);
+
+ try
+ throw new MyException("oops I did it again");
+ catch(MyException)
+ assert(MyException.numInstances == 1);
+
+ assert(MyException.numInstances == 0);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19386.d b/gcc/testsuite/gdc.test/runnable/test19386.d
new file mode 100644
index 0000000..3e3157a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19386.d
@@ -0,0 +1,36 @@
+struct Thing
+{
+ this(int* i)
+ {
+ ptr = i;
+ (*ptr)++;
+ }
+
+ ~this()
+ {
+ (*ptr)--;
+ }
+
+ T opCast(T : bool)()
+ {
+ return false;
+ }
+
+ int* ptr;
+}
+
+Thing makeThing(int* p)
+{
+ return Thing(p);
+}
+
+void main()
+{
+ int i;
+ {
+ if (auto t = makeThing(&i)) // destructor not called
+ {
+ }
+ }
+ assert(i == 0);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19393.d b/gcc/testsuite/gdc.test/runnable/test19393.d
new file mode 100644
index 0000000..4226bbd
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19393.d
@@ -0,0 +1,37 @@
+string result;
+
+struct S
+{
+ this(this)
+ {
+ result ~= "A";
+ }
+
+ ~this()
+ {
+ result ~= "B";
+ }
+}
+
+void foo(const(S)[] ar...)
+{
+ /* postblit gets called on this initialization,
+ * then when the function returns, the destructor
+ * gets called => result = "AB";
+ */
+ auto d = ar[0];
+}
+
+void bar()
+{
+ /* S(null) needs to be destroyed after the function call,
+ * that means that another `B` is appended => result = "ABB"
+ */
+ foo(S());
+}
+
+void main()
+{
+ bar();
+ assert(result == "ABB");
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19441.d b/gcc/testsuite/gdc.test/runnable/test19441.d
new file mode 100644
index 0000000..5dcb573
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19441.d
@@ -0,0 +1,24 @@
+// https://issues.dlang.org/show_bug.cgi?id=19441
+struct S1
+{
+ int a;
+ long b;
+ alias a this;
+}
+
+struct S2
+{
+ S1 v;
+ alias v this;
+}
+
+void main()
+{
+ auto x = S2(S1(1, 12345678));
+ assert(x.a == 1 && x.b == 12345678); // prints: 1 12345678
+ S1 y;
+ y = x;
+ assert(y.a == 1 && y.b == 12345678);
+ y = x.v;
+ assert(y.a == 1 && y.b == 12345678);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19476.d b/gcc/testsuite/gdc.test/runnable/test19476.d
new file mode 100644
index 0000000..3143c20
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19476.d
@@ -0,0 +1,18 @@
+// https://issues.dlang.org/show_bug.cgi?id=19476
+
+mixin template operators() {
+ int foo(int op = 1, T)(T rhs) {
+ return 1;
+ }
+}
+
+struct S {
+ mixin operators ops;
+ int foo(int op = 1, T)(T a) {
+ return ops.foo!1(a);
+ }
+}
+
+void main() {
+ S.init.foo(S.init);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19639.d b/gcc/testsuite/gdc.test/runnable/test19639.d
new file mode 100644
index 0000000..36b7630
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19639.d
@@ -0,0 +1,22 @@
+enum EMPTY_STRING = ""[0..0];
+enum SMALL_STRING = "a"[0..1];
+
+void main()
+{
+ {
+ char[64] buf = EMPTY_STRING;
+ foreach (c; buf) assert(c == 0);
+ buf[$-1] = 'e';
+ buf = EMPTY_STRING;
+ assert(buf[$-1] == 0);
+ }
+
+ {
+ char[64] buf = SMALL_STRING;
+ assert(buf[0] == 'a');
+ foreach (c; buf[1..$]) assert(c == 0);
+ buf[$-1] = 'e';
+ buf = SMALL_STRING;
+ assert(buf[$-1] == 0);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19655a.d b/gcc/testsuite/gdc.test/runnable/test19655a.d
new file mode 100644
index 0000000..fc63639
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19655a.d
@@ -0,0 +1,10 @@
+/*
+REQUIRED_ARGS: -Irunnable/imports
+PERMUTE_ARGS:
+COMPILE_SEPARATELY:
+EXTRA_SOURCES: imports/test19655b.d imports/test19655c.d imports/test19655d.d imports/test19655e.d imports/test19655f.d imports/test19655g.d
+*/
+
+import test19655g;
+class Corge
+{ }
diff --git a/gcc/testsuite/gdc.test/runnable/test19672.d b/gcc/testsuite/gdc.test/runnable/test19672.d
new file mode 100644
index 0000000..8f5f50b
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19672.d
@@ -0,0 +1,21 @@
+// https://issues.dlang.org/show_bug.cgi?id=19672
+
+struct S
+{
+ ulong c;
+ bool b; // removing this prevents bug
+}
+
+// increase the struct size at least to 17 bytes also prevents the bug.
+
+void main()
+{
+ S[1] a = [S(42)];
+ assert(a[0].c == 42); /* Passes. */
+ f(a);
+}
+
+void f(S[1] a)
+{
+ assert(a[0].c == 42); /* Fails. */
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19679.d b/gcc/testsuite/gdc.test/runnable/test19679.d
new file mode 100644
index 0000000..18b050c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19679.d
@@ -0,0 +1,21 @@
+void delegate() foo()
+{
+ size_t value = 0;
+
+ void check()
+ {
+ assert(value == 0);
+ }
+
+ void nest1()
+ {
+ void nest2() { check(); }
+ nest2();
+ }
+ return &nest1;
+}
+
+void main()
+{
+ foo()();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19688.d b/gcc/testsuite/gdc.test/runnable/test19688.d
new file mode 100644
index 0000000..9cc4dd7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19688.d
@@ -0,0 +1,13 @@
+/* TEST_OUTUT:
+---
+---
+*/
+void test(string s = __FUNCTION__ ~ __MODULE__ ~ __FUNCTION__)
+{
+ assert(s == "test19688.maintest19688test19688.main");
+}
+
+void main()
+{
+ test();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19729.d b/gcc/testsuite/gdc.test/runnable/test19729.d
new file mode 100644
index 0000000..b959c71
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19729.d
@@ -0,0 +1,61 @@
+//https://issues.dlang.org/show_bug.cgi?id=19729
+// PERMUTE_ARGS:
+module test19729;
+
+mixin template Templ(T)
+{
+ this(T t)
+ {
+ }
+}
+
+class C // original TC
+{
+ mixin Templ!int;
+ mixin Templ!string;
+}
+
+class D // named
+{
+ mixin Templ!int ti;
+ mixin Templ!string ts;
+}
+
+class E // top level ctor wins
+{
+ bool topLevelWins;
+ mixin Templ!int;
+ this(int){topLevelWins = true;}
+}
+
+class F // top level ctor wins even if not exact match
+{
+ bool topLevelWins;
+ mixin Templ!ubyte;
+ this(int){topLevelWins = true;}
+}
+
+class G // same as F but change lexicographical order
+{
+ bool topLevelWins;
+ this(int){topLevelWins = true;}
+ mixin Templ!ubyte;
+}
+
+void main()
+{
+ auto c0 = new C("should work");
+ auto c1 = new C(42);
+
+ auto d0 = new D("should work");
+ auto d1 = new D(42);
+
+ auto e = new E(0);
+ assert(e.topLevelWins);
+
+ auto f = new F(ubyte(0));
+ assert(f.topLevelWins);
+
+ auto g = new G(ubyte(0));
+ assert(g.topLevelWins);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19734.d b/gcc/testsuite/gdc.test/runnable/test19734.d
index efa7da3..7342920 100644
--- a/gcc/testsuite/gdc.test/runnable/test19734.d
+++ b/gcc/testsuite/gdc.test/runnable/test19734.d
@@ -9,15 +9,13 @@ class C19734
{
// Invalid 'this' parameter because of applied 'extern' storage class.
void testin(typeof(this) p)
- in { assert(this is p); }
- body
+ in(this is p)
{
}
// Undefined reference to __result.
int testout()
- out { assert(__result == 2); }
- body
+ out(; __result == 2)
{
return 2;
}
diff --git a/gcc/testsuite/gdc.test/runnable/test19774.d b/gcc/testsuite/gdc.test/runnable/test19774.d
new file mode 100644
index 0000000..940a07c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19774.d
@@ -0,0 +1,43 @@
+// https://issues.dlang.org/show_bug.cgi?id=19774
+C bar()
+{
+ return C(42);
+}
+
+C foo()
+{
+ return bar()[1];
+}
+
+C gun()
+{
+ return bar()[$];
+}
+
+struct C
+{
+ int x;
+
+ ~this()
+ {
+ x = 0;
+ }
+
+ int opDollar()
+ {
+ return 1;
+ }
+
+ C opIndex(int a)
+ {
+ return this;
+ }
+}
+
+void main()
+{
+ auto c = foo();
+ assert(c.x == 42); /* fails; should pass */
+ auto d = gun();
+ assert(d.x == 42);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19782.d b/gcc/testsuite/gdc.test/runnable/test19782.d
new file mode 100644
index 0000000..a24d841
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19782.d
@@ -0,0 +1,23 @@
+// https://issues.dlang.org/show_bug.cgi?id=19782
+class Inner
+{
+ int a;
+}
+
+class Outer
+{
+ Inner inner; alias inner this;
+ this(Inner i) { inner = i; }
+}
+
+void main()
+{
+ Inner[] inners = [];
+ inners ~= new Inner;
+ inners ~= new Outer(new Inner); // Appends null
+
+ foreach(inner; inners)
+ {
+ assert(inner.a == 0);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19822.d b/gcc/testsuite/gdc.test/runnable/test19822.d
new file mode 100644
index 0000000..8f0e3f1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19822.d
@@ -0,0 +1,29 @@
+// https://issues.dlang.org/show_bug.cgi?id=19822
+struct Quat
+{
+ static struct Vec { int x; }
+
+ union
+ {
+ Vec v;
+ struct { float x; }
+ }
+
+ static Quat identity()
+ {
+ Quat q;
+ q.x = 1.0f;
+ return q;
+ }
+}
+
+struct QuatContainerWithIncompatibleInit
+{
+ Quat q = Quat.identity;
+}
+
+void main()
+{
+ QuatContainerWithIncompatibleInit c;
+ assert(c.q.x == 1.0f); // fails
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19825.d b/gcc/testsuite/gdc.test/runnable/test19825.d
new file mode 100644
index 0000000..a4f85ca
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19825.d
@@ -0,0 +1,42 @@
+struct JSONValue
+{
+ TaggedUnion payload;
+}
+
+struct TaggedUnion
+{
+ size_t[2] m_data;
+ int m_kind;
+
+ JSONValue opIndex(size_t i)
+ {
+ return JSONValue();
+ }
+}
+
+void yap(lazy JSONValue arg)
+{
+ arg();
+}
+
+struct Foo
+{
+ int a;
+ string name;
+}
+
+Foo makeFoo()
+{
+ JSONValue root;
+ yap(root.payload[0]
+ .payload[0]
+ .payload[0]);
+
+ Foo foo;
+ return foo;
+}
+
+void main()
+{
+ auto foo = makeFoo();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test19891.d b/gcc/testsuite/gdc.test/runnable/test19891.d
new file mode 100644
index 0000000..08e51bc
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test19891.d
@@ -0,0 +1,13 @@
+int g;
+
+void fun(R)(auto ref int a, auto ref R r = g, auto ref int b = 1)
+{
+ ++r;
+}
+
+void main()
+{
+ fun(10, 2);
+ fun(10);
+ assert(g == 1);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test20.d b/gcc/testsuite/gdc.test/runnable/test20.d
index 0e21e30..5a1985a 100644
--- a/gcc/testsuite/gdc.test/runnable/test20.d
+++ b/gcc/testsuite/gdc.test/runnable/test20.d
@@ -1,3 +1,9 @@
+/*
+TEST_OUTPUT:
+---
+runnable/test20.d(448): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+---
+*/
import core.vararg;
extern(C) int printf(const char*, ...);
@@ -72,7 +78,7 @@ struct A4
void test4()
{
- printf("A4.sizeof = %d\n", A4.sizeof);
+ printf("A4.sizeof = %zd\n", A4.sizeof);
assert(A4.sizeof == 1 * int.sizeof);
A4 q;
@@ -213,7 +219,7 @@ void test10()
/*****************************************/
-scope class T11
+class T11
{
this(){}
~this(){}
@@ -270,7 +276,7 @@ void test13()
void write14(bool[] c)
{
- printf("[%2d]: ", c.length);
+ printf("[%2zd]: ", c.length);
foreach (bool x; c)
printf("%d,", x);
printf("\n");
@@ -334,12 +340,6 @@ int y16;
class C16
{
- new(size_t size, byte blah){
- void* v = (new byte[C16.classinfo.initializer.length]).ptr;
- y16 = 1;
- assert(blah == 3);
- return v;
- }
int x;
this()
{
@@ -349,8 +349,7 @@ class C16
void test16()
{
- C16 c = new(3) C16;
- assert(y16 == 1);
+ C16 c = new C16();
assert(c.x == 4);
}
@@ -491,34 +490,6 @@ void test22()
/*****************************************/
-void test23()
-{
- float f;
- double d;
- real r;
-
- if (f > ifloat.max)
- goto Loverflow;
- if (d > ifloat.max)
- goto Loverflow;
- if (r > ifloat.max)
- goto Loverflow;
-
- if (ifloat.max < f)
- goto Loverflow;
- if (ifloat.max < d)
- goto Loverflow;
- if (ifloat.max < r)
- goto Loverflow;
-
- return;
-
- Loverflow:
- return;
-}
-
-/*****************************************/
-
interface I24 { }
void test24()
@@ -583,15 +554,6 @@ void test29()
/*****************************************/
-void test30()
-{
- double d = 1;
- cdouble cd = 1+0i;
- assert(cd == 1.0 + 0i);
-}
-
-/*****************************************/
-
void foo31(...)
{
byte b = va_arg!byte(_argptr);
@@ -743,7 +705,7 @@ void test42()
string string1 = "ワロスw";
string string2 = r"ワロスw";
string string3 = `ワロスw`;
- string string4 = x"E3 83 AF E3 83 AD E3 82 B9 EF BD 97";
+ string string4 = "\xE3\x83\xAF\xE3\x83\xAD\xE3\x82\xB9\xEF\xBD\x97";
assert(string1.length==master.length);
@@ -806,7 +768,7 @@ struct S45
{
double x = 0, y = 0;
static S45 opCall(int i) { S45 r; r.x = i; return r; }
- S45 opMul(S45 s)
+ S45 opBinary(string op)(S45 s) if (op == "*")
{
S45 r;
r.x = x * s.x;
@@ -842,11 +804,11 @@ void test45()
{
S45 s = S45(10);
S45 val = pow!(S45)(s,2);
- printf("x = %2.2lf, y = %2.2lf\n", val.x, val.y);
+ printf("x = %2.2f, y = %2.2f\n", val.x, val.y);
assert(val.x == 100);
assert(val.y == 0);
double d = pow!(double)(10,3);
- printf("%2.2lf\n", d);
+ printf("%2.2f\n", d);
assert(d == 1000);
}
@@ -873,19 +835,6 @@ void test46()
/*****************************************/
-void test47()
-{
- cdouble[] a;
- cdouble[] b;
- foreach(ref cdouble d; b)
- {
- d = -a[0];
- for(;;){}
- }
-}
-
-/*****************************************/
-
string foo48(string s)
{
return s;
@@ -915,7 +864,7 @@ void test49()
{
int i = void;
//printf("i = %d\n", i);
- int[10] a = void;
+ int[10] a;
foreach (int x; a)
{
printf("\tx = %d\n", x);
@@ -938,7 +887,7 @@ void test51()
{
bool[9][3] qwert;
- printf("qwert.sizeof = %d\n", qwert.sizeof);
+ printf("qwert.sizeof = %zd\n", qwert.sizeof);
for (int i = 0; i < 3; i++)
for (int j = 0; j < 9; j++)
@@ -987,13 +936,13 @@ const char[3][13] month = [
void test53()
{
- printf("%.*s\n", month[1].length, month[1].ptr);
- printf("%.*s\n", month[2].length, month[2].ptr);
- printf("%.*s\n", month[3].length, month[3].ptr);
- printf("%.*s\n", month[4].length, month[4].ptr);
- printf("%.*s\n", month[5].length, month[5].ptr);
- printf("%.*s\n", month[6].length, month[6].ptr);
- printf("%.*s\n", month[8].length, month[8].ptr);
+ printf("%.*s\n", cast(int)month[1].length, month[1].ptr);
+ printf("%.*s\n", cast(int)month[2].length, month[2].ptr);
+ printf("%.*s\n", cast(int)month[3].length, month[3].ptr);
+ printf("%.*s\n", cast(int)month[4].length, month[4].ptr);
+ printf("%.*s\n", cast(int)month[5].length, month[5].ptr);
+ printf("%.*s\n", cast(int)month[6].length, month[6].ptr);
+ printf("%.*s\n", cast(int)month[8].length, month[8].ptr);
assert(month[1] == "Jan");
assert(month[2] == "Feb");
@@ -1032,7 +981,7 @@ struct S54
return S54.foo() * S54.foo();
}
- S54 opMul(S54 s)
+ S54 opBinary(string op)(S54 s) if (op == "*")
{
return s;
}
@@ -1052,12 +1001,12 @@ void test55()
str = str ~ c;
uvw = c ~ uvw;
- printf("%.*s\n", str.length, str.ptr);
+ printf("%.*s\n", cast(int)str.length, str.ptr);
assert(str == "a");
assert(uvw == "a");
c = 'b';
- printf("%.*s\n", str.length, str.ptr);
+ printf("%.*s\n", cast(int)str.length, str.ptr);
assert(str == "a");
assert(uvw == "a");
}
@@ -1199,7 +1148,7 @@ void foo61(real[] arr)
for (size_t j = i; j >= i; j -= i)
{
// interesting results follow from this:
- printf("%d ", i);
+ printf("%zd ", i);
// it prints a _lot_ of ones
arr[j] = arr[j - i];
@@ -1253,14 +1202,12 @@ int main()
test20();
test21();
test22();
- test23();
test24();
test25();
test26();
test27();
test28();
test29();
- test30();
test31();
test33();
test34();
@@ -1274,7 +1221,6 @@ int main()
test44();
test45();
test46();
- test47();
test48();
test49();
test50();
@@ -1294,4 +1240,3 @@ int main()
printf("Success\n");
return 0;
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/test20025.d b/gcc/testsuite/gdc.test/runnable/test20025.d
new file mode 100644
index 0000000..9abee45
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test20025.d
@@ -0,0 +1,21 @@
+// https://issues.dlang.org/show_bug.cgi?id=20025
+struct B
+{
+ static int value = 77;
+ alias value this;
+
+ this(ref return scope inout B rhs) inout { }
+}
+
+void test(int x)
+{
+ assert(x == 77);
+}
+
+int main()
+{
+ B b;
+ test(b);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test20036.d b/gcc/testsuite/gdc.test/runnable/test20036.d
new file mode 100644
index 0000000..640de19
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test20036.d
@@ -0,0 +1,10 @@
+
+__gshared int x = 7;
+__gshared int*[70000] px = &x;
+
+void main()
+{
+ foreach(p; px)
+ assert(p && *p == 7);
+}
+
diff --git a/gcc/testsuite/gdc.test/runnable/test20130.d b/gcc/testsuite/gdc.test/runnable/test20130.d
new file mode 100644
index 0000000..09eaee3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test20130.d
@@ -0,0 +1,44 @@
+// https://issues.dlang.org/show_bug.cgi?id=20130
+
+void main() {
+ auto a1 = cast(char[]) "12345678";
+ auto a2 = cast(wchar[]) "12345678"; // Or cast(string|wstring|dstring).
+ auto a3 = cast(dchar[]) "12345678"; // Encoding conversion.
+ assert(a1.length == 8);
+ assert(a2.length == 8);
+ assert(a3.length == 8);
+
+ auto b1 = cast(char[]) "12345678"c;
+ auto b2 = cast(wchar[]) "12345678"c;
+ auto b3 = cast(dchar[]) "12345678"c;
+ assert(b1.length == 8);
+ assert(b2.length == 4);
+ assert(b3.length == 2);
+
+ auto c1 = cast(char[]) "12345678"w;
+ auto c2 = cast(wchar[]) "12345678"w;
+ auto c3 = cast(dchar[]) "12345678"w;
+ assert(c1.length == 16);
+ assert(c2.length == 8);
+ assert(c3.length == 4);
+
+ auto d1 = cast(char[]) "12345678"d;
+ auto d2 = cast(wchar[]) "12345678"d;
+ auto d3 = cast(dchar[]) "12345678"d;
+ assert(d1.length == 32);
+ assert(d2.length == 16);
+ assert(d3.length == 8);
+
+ auto a = cast(uint[]) "12345678";
+ auto b = cast(uint[]) "12345678"d;
+ auto c = cast(uint[]) "12345678"w;
+ auto d = cast(const char[5][]) "12345";
+ auto e = cast(const wchar[2][]) "12345678";
+ immutable f = cast(immutable(uint)[]) "123456789012";
+ assert(a.length == 2);
+ assert(b.length == 8);
+ assert(c.length == 4);
+ assert(d.length == 1);
+ assert(e.length == 2);
+ assert(f.length == 3);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test20401.d b/gcc/testsuite/gdc.test/runnable/test20401.d
new file mode 100644
index 0000000..c3b6072
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test20401.d
@@ -0,0 +1,20 @@
+// https://issues.dlang.org/show_bug.cgi?id=20401
+
+void main()
+{
+ int i;
+ assert(&passthrough(i) == &i);
+}
+
+ref int passthrough(return ref int i)
+{
+ return get().flag ? i : i;
+}
+
+S get() { return S(); }
+
+struct S
+{
+ bool flag;
+ ~this(){}
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test20565.d b/gcc/testsuite/gdc.test/runnable/test20565.d
new file mode 100644
index 0000000..47a8db3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test20565.d
@@ -0,0 +1,18 @@
+// https://issues.dlang.org/show_bug.cgi?id=20565
+
+void main()
+{
+ {
+ int temp(T)() { return 3; }
+ assert(temp!int() == 3);
+ }
+ {
+ int temp(T)() { return 4; }
+ assert(temp!int() == 4);
+ }
+ {
+ int temp(T)() { return 5; }
+ assert(temp!int() == 5);
+ }
+}
+
diff --git a/gcc/testsuite/gdc.test/runnable/test20649.d b/gcc/testsuite/gdc.test/runnable/test20649.d
new file mode 100644
index 0000000..6c645e6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test20649.d
@@ -0,0 +1,15 @@
+struct S { int i; }
+
+auto f()
+{
+ S[] ss;
+ ss.length = 1;
+ return 0;
+}
+
+enum a = f();
+
+void main()
+{
+ f();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test20855.d b/gcc/testsuite/gdc.test/runnable/test20855.d
new file mode 100644
index 0000000..30152fe
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test20855.d
@@ -0,0 +1,27 @@
+// PERMUTE_ARGS: -O
+// https://issues.dlang.org/show_bug.cgi?id=20855
+
+string exp()
+{
+ string s = "a = b + c * d + a;";
+ foreach (i; 0 .. 9)
+ s = s ~ s;
+ return s;
+}
+
+int test()
+{
+ auto a=1, b=2, c=3, d=4;
+ mixin(exp());
+ return a;
+}
+
+import core.stdc.stdio;
+
+int main()
+{
+ int a = test();
+ printf("a = %d\n", a);
+ assert(test() == 7169);
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test20893.d b/gcc/testsuite/gdc.test/runnable/test20893.d
new file mode 100644
index 0000000..18a83aa
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test20893.d
@@ -0,0 +1,21 @@
+// REQUIRED_ARGS: -O -inline
+//
+// https://issues.dlang.org/show_bug.cgi?id=20893
+// caused by https://github.com/dlang/dmd/pull/9722
+
+int f(int n)
+{
+ foreach (i; 0..n) {}
+ return 10;
+}
+
+int c(int a, int b)
+{
+ return (f(a) * 1L * f(b)) % 1000;
+}
+
+void main()
+{
+ int[] a = [1];
+ assert(c(2 - 1, 2) == 100);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test21039.d b/gcc/testsuite/gdc.test/runnable/test21039.d
new file mode 100644
index 0000000..c58600f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21039.d
@@ -0,0 +1,27 @@
+// https://issues.dlang.org/show_bug.cgi?id=21039
+
+class Inner {}
+
+class Outer {
+ Inner inner;
+ alias inner this;
+ this(Inner i) { inner = i; }
+}
+
+void main() {
+ auto inner = new Inner;
+ auto outer = new Outer(new Inner);
+
+ // implicit cast goes through 'alias this'
+
+ Inner inner1 = outer; // Already does it
+ assert(inner1);
+
+ Inner[] inners = [inner, outer]; // Fixed
+
+ assert(inners[0], "first element is null");
+ assert(inners[1], "second element is null");
+
+ Inner inner2 = 1 ? outer : inner; // Fixed
+ assert(inner2);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test21040.d b/gcc/testsuite/gdc.test/runnable/test21040.d
new file mode 100644
index 0000000..8e5ee56
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21040.d
@@ -0,0 +1,61 @@
+// REQUIRED_ARGS:
+// PERMUTE_ARGS: -mcpu=native
+// https://issues.dlang.org/show_bug.cgi?id=21040
+
+import core.simd;
+
+alias AliasSeq(A ...) = A;
+
+void main()
+{
+ static foreach (T; AliasSeq!(
+ float[8], float[4], double[4], double[2],
+ byte[32], ubyte[32], byte[16], ubyte[16],
+ short[16], ushort[16], short[8], ushort[8],
+ int[8], uint[8], int[4], uint[4],
+ long[4], ulong[4], long[2], ulong[2],
+ void[32], void[16]))
+ {
+ static if (__traits(compiles, __vector(T)))
+ {{
+ __vector(T) v;
+
+ static if (__traits(compiles, { __vector(T) x = 2; }))
+ v = 2;
+ static if (__traits(compiles, { __vector(T) x; x = +x; }))
+ v = +v;
+ static if (__traits(compiles, { __vector(T) x; x = -x; }))
+ v = -v;
+ static if (__traits(compiles, { __vector(T) x; x = x + x; }))
+ v = v + v;
+ static if (__traits(compiles, { __vector(T) x; x += 2; }))
+ v += 2;
+ static if (__traits(compiles, { __vector(T) x; x = x - x; }))
+ v = v - v;
+ static if (__traits(compiles, { __vector(T) x; x -= 2; }))
+ v -= 2;
+ static if (__traits(compiles, { __vector(T) x; x = x * x; }))
+ v = v * v;
+ static if (__traits(compiles, { __vector(T) x; x *= 2; }))
+ v *= 2;
+ static if (__traits(compiles, { __vector(T) x; x = x / x; }))
+ v = v / v;
+ static if (__traits(compiles, { __vector(T) x; x /= 2; }))
+ v /= 2;
+ static if (__traits(compiles, { __vector(T) x; x = x & x; }))
+ v = v & v;
+ static if (__traits(compiles, { __vector(T) x; x &= 2; }))
+ v &= 2;
+ static if (__traits(compiles, { __vector(T) x; x = x | x; }))
+ v = v | v;
+ static if (__traits(compiles, { __vector(T) x; x |= 2; }))
+ v |= 2;
+ static if (__traits(compiles, { __vector(T) x; x = x ^ x; }))
+ v = v ^ v;
+ static if (__traits(compiles, { __vector(T) x; x ^= 2; }))
+ v ^= 2;
+ static if (__traits(compiles, { __vector(T) x; x = ~x; }))
+ v = ~v;
+ }}
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test21120.d b/gcc/testsuite/gdc.test/runnable/test21120.d
new file mode 100644
index 0000000..2714bfc
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21120.d
@@ -0,0 +1,27 @@
+// https://issues.dlang.org/show_bug.cgi?id=21120
+
+module one.two.three;
+
+struct S {}
+
+struct StructTemplate(T)
+{
+ int a = 123; // non-zero initialized
+
+ ref const(StructTemplate) getInitSymbol()
+ {
+ return initSymbol!StructTemplate;
+ }
+}
+
+template initSymbol(T)
+{
+ pragma(mangle, "_D" ~ T.mangleof[1..$] ~ "6__initZ")
+ extern immutable T initSymbol;
+}
+
+void main()
+{
+ StructTemplate!S inst;
+ assert(inst.getInitSymbol() == inst);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test21357.d b/gcc/testsuite/gdc.test/runnable/test21357.d
new file mode 100644
index 0000000..de219e9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21357.d
@@ -0,0 +1,35 @@
+// https://issues.dlang.org/show_bug.cgi?id=21357
+// PERMUTE_ARGS:
+struct BatchState
+{
+ int[10] arr;
+
+ BatchState copy()
+ {
+ auto ret = BatchState(arr);
+ arr[0] += 1;
+ return ret;
+ }
+}
+
+struct GrayArea
+{
+ BatchState low;
+
+ this(this)
+ {
+ low = low.copy;
+ }
+}
+
+void main()
+{
+ GrayArea a;
+ a.low.arr[0] = 1;
+ GrayArea b;
+ b.low.arr[0] = 4;
+ b = a; // calls the postblit
+
+ assert(a.low.arr[0] == 1);
+ assert(b.low.arr[0] == 1);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test21367.d b/gcc/testsuite/gdc.test/runnable/test21367.d
new file mode 100644
index 0000000..96e8d6c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21367.d
@@ -0,0 +1,47 @@
+// https://issues.dlang.org/show_bug.cgi?id=21367
+
+string result = "";
+
+struct RCArray(T)
+{
+ T* data;
+ this(this)
+ {
+ result ~= "A";
+ }
+ ~this()
+ {
+ result ~= "B";
+ }
+}
+
+struct Variant(T...)
+{
+ union
+ {
+ T payload;
+ }
+ this(this)
+ {
+ result ~= "C";
+ }
+
+ ~this()
+ {
+ result ~= "D";
+ }
+}
+
+alias Ft = Variant!(RCArray!double, RCArray!int);
+
+void fun(Ft a) {}
+void main()
+{
+ Ft a;
+ Ft b = a;
+}
+
+static ~this()
+{
+ assert(result == "CDD");
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test21403.d b/gcc/testsuite/gdc.test/runnable/test21403.d
new file mode 100644
index 0000000..15314b0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21403.d
@@ -0,0 +1,72 @@
+// https://issues.dlang.org/show_bug.cgi?id=21403
+
+/***********************************************/
+
+int[] cat11ret3(ref int[] s)
+{
+ s ~= 11;
+ return [3];
+}
+
+int[] doit1(int[] val)
+{
+ (val ~= cat11ret3(val)) ~= 7;
+ return val;
+}
+
+void test1()
+{
+ static assert(doit1([2]) == [2, 11, 3, 7]);
+ assert(doit1([2]) == [2, 11, 3, 7]);
+}
+
+/***********************************************/
+
+char catbretc(ref char[] s)
+{
+ s ~= 'b';
+ return 'c';
+}
+
+char[] doit2(char[] val)
+{
+ (val ~= catbretc(val)) ~= 'd';
+ return val;
+}
+
+void test2()
+{
+ static assert(doit2(['a']) == ['a', 'b', 'c', 'd']);
+ assert(doit2(['a']) == ['a', 'b', 'c', 'd']);
+}
+
+/***********************************************/
+
+int cat2ret3(ref int[] s)
+{
+ s ~= 2;
+ return 3;
+}
+
+int[] doit2(int[] val)
+{
+ (val ~= cat2ret3(val)) ~= 4;
+ return val;
+}
+
+void test3()
+{
+ static assert(doit2([1]) == [1, 2, 3, 4]);
+ assert(doit2([1]) == [1, 2, 3, 4]);
+}
+
+/***********************************************/
+
+int main()
+{
+ test1();
+ test2();
+ test3();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test21424.d b/gcc/testsuite/gdc.test/runnable/test21424.d
new file mode 100644
index 0000000..72abd3f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21424.d
@@ -0,0 +1,12 @@
+// https://issues.dlang.org/show_bug.cgi?id=21424
+
+void main()
+{
+ ubyte[10] buf;
+ size_t pos = 0;
+ size_t num = 5;
+ buf[pos++] += num;
+ assert(pos == 1);
+ assert(buf[0] == 5);
+ assert(buf[1] == 0);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test21479.d b/gcc/testsuite/gdc.test/runnable/test21479.d
new file mode 100644
index 0000000..84612ab
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21479.d
@@ -0,0 +1,28 @@
+// https://issues.dlang.org/show_bug.cgi?id=21479
+enum Side
+{
+ left,
+ right
+}
+
+struct Both(T)
+{
+ T left;
+ T right;
+
+ ref T get(Side side)
+ {
+ return side == Side.left ? left : right;
+ }
+}
+
+void main()
+{
+ Both!(int[]) t;
+ t.get(Side.left) ~= 1;
+ assert (t.left.length == 1);
+
+ t.get(Side.right) ~= 1;
+ t.get(Side.right) ~= 2;
+ assert (t.right.length == 2);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test21515.d b/gcc/testsuite/gdc.test/runnable/test21515.d
new file mode 100644
index 0000000..09aea83
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21515.d
@@ -0,0 +1,81 @@
+// https://issues.dlang.org/show_bug.cgi?id=21515
+// DISABLED: win32 win64
+
+// ABI layout of native complex
+struct _Complex(T) { T re; T im; }
+
+// Special enum definitions.
+version (Posix)
+{
+ align(float.alignof) enum __c_complex_float : _Complex!float;
+ align(double.alignof) enum __c_complex_double : _Complex!double;
+ align(real.alignof) enum __c_complex_real : _Complex!real;
+}
+else
+{
+ align(float.sizeof * 2) enum __c_complex_float : _Complex!float;
+ align(double.sizeof * 2) enum __c_complex_double : _Complex!double;
+ align(real.alignof) enum __c_complex_real : _Complex!real;
+}
+alias complex_float = __c_complex_float;
+alias complex_double = __c_complex_double;
+alias complex_real = __c_complex_real;
+
+extern(D) complex_float dcomplexf() { return typeof(return)(2, 1); }
+extern(D) complex_double dcomplex() { return typeof(return)(2, 1); }
+extern(D) complex_real dcomplexl() { return typeof(return)(2, 1); }
+
+extern(D) void dcomplexf(complex_float c) { assert(c.re == 2 && c.im == 1); }
+extern(D) void dcomplex(complex_double c) { assert(c.re == 2 && c.im == 1); }
+extern(D) void dcomplexl(complex_real c) { assert(c.re == 2 && c.im == 1); }
+
+extern(C) complex_float ccomplexf() { return typeof(return)(2, 1); }
+extern(C) complex_double ccomplex() { return typeof(return)(2, 1); }
+extern(C) complex_real ccomplexl() { return typeof(return)(2, 1); }
+
+extern(C) void ccomplexf2(complex_float c) { assert(c.re == 2 && c.im == 1); }
+extern(C) void ccomplex2(complex_double c) { assert(c.re == 2 && c.im == 1); }
+extern(C) void ccomplexl2(complex_real c) { assert(c.re == 2 && c.im == 1); }
+
+extern(C++) complex_float cpcomplexf() { return typeof(return)(2, 1); }
+extern(C++) complex_double cpcomplex() { return typeof(return)(2, 1); }
+extern(C++) complex_real cpcomplexl() { return typeof(return)(2, 1); }
+
+extern(C++) void cpcomplexf(complex_float c) { assert(c.re == 2 && c.im == 1); }
+extern(C++) void cpcomplex(complex_double c) { assert(c.re == 2 && c.im == 1); }
+extern(C++) void cpcomplexl(complex_real c) { assert(c.re == 2 && c.im == 1); }
+
+int main()
+{
+ auto a1 = dcomplexf();
+ auto b1 = dcomplex();
+ auto c1 = dcomplexl();
+ assert(a1.re == 2 && a1.im == 1);
+ assert(b1.re == 2 && b1.im == 1);
+ assert(c1.re == 2 && c1.im == 1);
+ dcomplexf(a1);
+ dcomplex(b1);
+ dcomplexl(c1);
+
+ auto a2 = ccomplexf();
+ auto b2 = ccomplex();
+ auto c2 = ccomplexl();
+ assert(a2.re == 2 && a2.im == 1);
+ assert(b2.re == 2 && b2.im == 1);
+ assert(c2.re == 2 && c2.im == 1);
+ ccomplexf2(a2);
+ ccomplex2(b2);
+ ccomplexl2(c2);
+
+ auto a3 = cpcomplexf();
+ auto b3 = cpcomplex();
+ auto c3 = cpcomplexl();
+ assert(a3.re == 2 && a3.im == 1);
+ assert(b3.re == 2 && b3.im == 1);
+ assert(c3.re == 2 && c3.im == 1);
+ cpcomplexf(a3);
+ cpcomplex(b3);
+ cpcomplexl(c3);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test21586.d b/gcc/testsuite/gdc.test/runnable/test21586.d
new file mode 100644
index 0000000..6af695c
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21586.d
@@ -0,0 +1,31 @@
+/*
+RUN_OUTPUT:
+---
+this
+~this 1
+---
+*/
+// https://issues.dlang.org/show_bug.cgi?id=21586
+
+import core.stdc.stdio : printf;
+
+struct S
+{
+ this(int arg)
+ {
+ a = arg;
+ printf("this\n");
+ }
+
+ ~this()
+ {
+ printf("~this %d\n", a);
+ }
+
+ int a;
+}
+
+void main()
+{
+ auto s = true ? S(1) : S(0);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test21822.d b/gcc/testsuite/gdc.test/runnable/test21822.d
new file mode 100644
index 0000000..f0a020a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21822.d
@@ -0,0 +1,18 @@
+// https://issues.dlang.org/show_bug.cgi?id=21822
+
+bool testAliasedString()
+{
+ auto a = soundexer();
+ auto b = soundexer();
+ return a == b;
+}
+
+char[4] soundexer()
+{
+ return "M365";
+}
+
+void main()
+{
+ assert(testAliasedString());
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test21833.d b/gcc/testsuite/gdc.test/runnable/test21833.d
new file mode 100644
index 0000000..dd59a8e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21833.d
@@ -0,0 +1,30 @@
+// REQUIRED_ARGS: -O -inline
+// https://issues.dlang.org/show_bug.cgi?id=20855
+
+void testit()
+{
+ pragma(inline, false);
+ short[4] arr = [-1, 6, 0, 4];
+ long1 A = *cast(long1*)(arr.ptr);
+ assert(_mm_extract_pi16(A, 0) == 65535);
+}
+
+struct short4
+{
+ short[4] array;
+}
+
+struct long1
+{
+ long[1] array;
+}
+
+int _mm_extract_pi16 (long1 a, int imm8)
+{
+ return cast(ushort)((cast(short4)a).array[imm8]);
+}
+
+void main()
+{
+ testit();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test22.d b/gcc/testsuite/gdc.test/runnable/test22.d
index 2aabb4d..38a9cc3 100644
--- a/gcc/testsuite/gdc.test/runnable/test22.d
+++ b/gcc/testsuite/gdc.test/runnable/test22.d
@@ -1,7 +1,5 @@
-// RUNNABLE_PHOBOS_TEST
// REQUIRED_ARGS:
-import std.math: poly;
import core.stdc.stdarg;
extern(C)
@@ -18,7 +16,7 @@ extern(C)
/*************************************/
-// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/4766.html
+// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/4766.html
// Only with -O
real randx()
@@ -119,67 +117,6 @@ void test5()
/*************************************/
-void test6()
-{
- ireal a = 6.5i % 3i;
- printf("%Lfi %Lfi\n", a, a - .5i);
- assert(a == .5i);
-
- a = 6.5i % 3;
- printf("%Lfi %Lfi\n", a, a - .5i);
- assert(a == .5i);
-
- real b = 6.5 % 3i;
- printf("%Lf %Lf\n", b, b - .5);
- assert(b == .5);
-
- b = 6.5 % 3;
- printf("%Lf %Lf\n", b, b - .5);
- assert(b == .5);
-}
-
-/*************************************/
-
-void test7()
-{
- cfloat f = 1+0i;
- f %= 2fi;
- printf("%f + %fi\n", f.re, f.im);
- assert(f == 1 + 0i);
-
- cdouble d = 1+0i;
- d %= 2i;
- printf("%f + %fi\n", d.re, d.im);
- assert(d == 1 + 0i);
-
- creal r = 1+0i;
- r %= 2i;
- printf("%Lf + %Lfi\n", r.re, r.im);
- assert(r == 1 + 0i);
-}
-
-/*************************************/
-
-void test8()
-{
- cfloat f = 1+0i;
- f %= 2i;
- printf("%f + %fi\n", f.re, f.im);
- assert(f == 1);
-
- cdouble d = 1+0i;
- d = d % 2i;
- printf("%f + %fi\n", d.re, d.im);
- assert(d == 1);
-
- creal r = 1+0i;
- r = r % 2i;
- printf("%Lf + %Lfi\n", r.re, r.im);
- assert(r == 1);
-}
-
-/*************************************/
-
class A9
{
this(int[] params ...)
@@ -219,7 +156,7 @@ void test10()
{
auto i = 5u;
auto s = typeid(typeof(i)).toString;
- printf("%.*s\n", s.length, s.ptr);
+ printf("%.*s\n", cast(int)s.length, s.ptr);
assert(typeid(typeof(i)) == typeid(uint));
}
@@ -233,103 +170,6 @@ void test11()
/*************************************/
-void assertEqual(real* a, real* b, string file = __FILE__, size_t line = __LINE__)
-{
- auto x = cast(ubyte*)a;
- auto y = cast(ubyte*)b;
-
- // Only compare the 10 value bytes, the padding bytes are of undefined
- // value.
- version (X86) enum count = 10;
- else version (X86_64) enum count = 10;
- else enum count = real.sizeof;
- for (size_t i = 0; i < count; i++)
- {
- if (x[i] != y[i])
- {
- printf("%02d: %02x %02x\n", i, x[i], y[i]);
- import core.exception;
- throw new AssertError(file, line);
- }
- }
-}
-
-void assertEqual(creal* a, creal* b, string file = __FILE__, size_t line = __LINE__)
-{
- assertEqual(cast(real*)a, cast(real*)b, file, line);
- assertEqual(cast(real*)a + 1, cast(real*)b + 1, file, line);
-}
-
-void test12()
-{
- creal a = creal.nan;
- creal b = real.nan + ireal.nan;
- assertEqual(&a, &b);
-
- real c= real.nan;
- real d=a.re;
- assertEqual(&c, &d);
-
- d=a.im;
- assertEqual(&c, &d);
-}
-
-/*************************************/
-
-void test13()
-{
- creal a = creal.infinity;
- creal b = real.infinity + ireal.infinity;
- assertEqual(&a, &b);
-
- real c = real.infinity;
- real d=a.re;
- assertEqual(&c, &d);
-
- d=a.im;
- assertEqual(&c, &d);
-}
-
-/*************************************/
-
-void test14()
-{
- creal a = creal.nan;
- creal b = creal.nan;
- b = real.nan + ireal.nan;
- assertEqual(&a, &b);
-
- real c = real.nan;
- real d=a.re;
- assertEqual(&c, &d);
-
- d=a.im;
- assertEqual(&c, &d);
-}
-
-/*************************************/
-
-ireal x15;
-
-void foo15()
-{
- x15 = -x15;
-}
-
-void bar15()
-{
- return foo15();
-}
-
-void test15()
-{
- x15=2i;
- bar15();
- assert(x15==-2i);
-}
-
-/*************************************/
-
real x16;
void foo16()
@@ -358,7 +198,7 @@ class Bar17
class Foo17
{
- void opAdd (Bar17 b) {}
+ void opBinary(string op : "+") (Bar17 b) {}
}
void test17()
@@ -427,41 +267,6 @@ void test21()
/*************************************/
-void test22()
-{
- static creal[] params = [1+0i, 3+0i, 5+0i];
-
- printf("params[0] = %Lf + %Lfi\n", params[0].re, params[0].im);
- printf("params[1] = %Lf + %Lfi\n", params[1].re, params[1].im);
- printf("params[2] = %Lf + %Lfi\n", params[2].re, params[2].im);
-
- creal[] sums = new creal[3];
- sums[] = 0+0i;
-
- foreach(creal d; params)
- {
- creal prod = d;
-
- printf("prod = %Lf + %Lfi\n", prod.re, prod.im);
- for(int i; i<2; i++)
- {
- sums[i] += prod;
- prod *= d;
- }
- sums[2] += prod;
- }
-
- printf("sums[0] = %Lf + %Lfi", sums[0].re, sums[0].im);
- assert(sums[0].re==9);
- assert(sums[0].im==0);
- assert(sums[1].re==35);
- assert(sums[1].im==0);
- assert(sums[2].re==153);
- assert(sums[2].im==0);
-}
-
-/*************************************/
-
const int c23 = b23 * b23;
const int a23 = 1;
const int b23 = a23 * 3;
@@ -480,51 +285,6 @@ void test23()
/*************************************/
-ifloat func_24_1(ifloat f, double d)
-{
-// f /= cast(cdouble)d;
- return f;
-}
-
-ifloat func_24_2(ifloat f, double d)
-{
- f = cast(ifloat)(f / cast(cdouble)d);
- return f;
-}
-
-float func_24_3(float f, double d)
-{
-// f /= cast(cdouble)d;
- return f;
-}
-
-float func_24_4(float f, double d)
-{
- f = cast(float)(f / cast(cdouble)d);
- return f;
-}
-
-void test24()
-{
- ifloat f = func_24_1(10i, 8);
- printf("%fi\n", f);
-// assert(f == 1.25i);
-
- f = func_24_2(10i, 8);
- printf("%fi\n", f);
- assert(f == 1.25i);
-
- float g = func_24_3(10, 8);
- printf("%f\n", g);
-// assert(g == 1.25);
-
- g = func_24_4(10, 8);
- printf("%f\n", g);
- assert(g == 1.25);
-}
-
-/*************************************/
-
template cat(int n)
{
const int dog = n;
@@ -541,48 +301,11 @@ void test25()
/*************************************/
-string toString26(cdouble z)
-{
- char[ulong.sizeof*8] buf;
-
- auto len = snprintf(buf.ptr, buf.sizeof, "%f+%fi", z.re, z.im);
- return buf[0 .. len].idup;
-}
-
-void test26()
-{
- static cdouble[] A = [1+0i, 0+1i, 1+1i];
- string s;
-
- foreach( cdouble z; A )
- {
- s = toString26(z);
- printf("%.*s ", s.length, s.ptr);
- }
- printf("\n");
-
- for(int ii=0; ii<A.length; ii++ )
- A[ii] += -1i*A[ii];
-
- assert(A[0] == 1 - 1i);
- assert(A[1] == 1 + 1i);
- assert(A[2] == 2);
-
- foreach( cdouble z; A )
- {
- s = toString26(z);
- printf("%.*s ", s.length, s.ptr);
- }
- printf("\n");
-}
-
-/*************************************/
-
void test27()
{ int x;
string s = (int*function(int ...)[]).mangleof;
- printf("%.*s\n", s.length, s.ptr);
+ printf("%.*s\n", cast(int)s.length, s.ptr);
assert((int*function(int ...)[]).mangleof == "APFiXPi");
assert(typeof(x).mangleof == "i");
assert(x.mangleof == "_D6test226test27FZ1xi");
@@ -590,20 +313,12 @@ void test27()
/*************************************/
-void test28()
-{
- alias cdouble X;
- X four = cast(X) (4.0i + 0.4);
-}
-
-/*************************************/
-
void test29()
{
ulong a = 10_000_000_000_000_000,
b = 1_000_000_000_000_000;
- printf("test29\n%lx\n%lx\n%lx\n", a, b, a / b);
+ printf("test29\n%llx\n%llx\n%llx\n", a, b, a / b);
assert((a / b) == 10);
}
@@ -666,7 +381,7 @@ struct particle
float yg; /* Y Gravity */
}
-particle particles[10000];
+particle[10000] particles;
void test32()
{
@@ -923,7 +638,7 @@ in
{
assert(A.length > 0);
}
-body
+do
{
version (D_InlineAsm_X86)
{
@@ -1086,7 +801,7 @@ in
{
assert(A.length > 0);
}
-body
+do
{
ptrdiff_t i = A.length - 1;
real r = A[i];
@@ -1101,19 +816,17 @@ body
void test47()
{
real x = 3.1;
- static real pp[] = [56.1, 32.7, 6];
+ static real[] pp = [56.1, 32.7, 6];
real r;
printf("The result should be %Lf\n",(56.1L + (32.7L + 6L * x) * x));
printf("The C version outputs %Lf\n", poly_c(x, pp));
printf("The asm version outputs %Lf\n", poly_asm(x, pp));
- printf("The std.math version outputs %Lf\n", poly(x, pp));
r = (56.1L + (32.7L + 6L * x) * x);
assert(r == poly_c(x, pp));
version (D_InlineAsm_X86)
assert(r == poly_asm(x, pp));
- assert(r == poly(x, pp));
}
/*************************************/
@@ -1211,28 +924,36 @@ void test52()
}
/*************************************/
-import std.stdio;
-import core.stdc.stdarg;
void myfunc(int a1, ...) {
va_list argument_list;
TypeInfo argument_type;
string sa; int ia; double da;
- writefln("%d variable arguments", _arguments.length);
- writefln("argument types %s", _arguments);
+ assert(_arguments.length == 9);
+
va_start(argument_list, a1);
for (int i = 0; i < _arguments.length; ) {
if ((argument_type=_arguments[i++]) == typeid(string)) {
va_arg(argument_list, sa);
- writefln("%d) string arg = '%s', length %d", i+1, sa.length<=20? sa : "?", sa.length);
+ switch (i)
+ {
+ case 1: assert(sa == "2"); break;
+ case 7: assert(sa == "8"); break;
+ case 8: assert(sa == "9"); break;
+ case 9: assert(sa == "10"); break;
+ default:
+ printf("i = %d\n", i);
+ assert(false);
+ }
} else if (argument_type == typeid(int)) {
va_arg(argument_list, ia);
- writefln("%d) int arg = %d", i+1, ia);
+ assert(ia == i+1);
} else if (argument_type == typeid(double)) {
va_arg(argument_list, da);
- writefln("%d) double arg = %f", i+1, da);
+ const e = i+1;
+ assert((e - 0.0001) < da && da < (e + 0.0001));
} else {
- throw new Exception("invalid argument type");
+ assert(false, argument_type.toString());
}
}
va_end(argument_list);
@@ -1248,6 +969,24 @@ void test6758() {
/*************************************/
+real f18573() { return 1; }
+
+void test18573()
+{
+ cast(void) f18573();
+ cast(void) f18573();
+ cast(void) f18573();
+ cast(void) f18573();
+ cast(void) f18573();
+ cast(void) f18573();
+ cast(void) f18573();
+
+ real b = 2;
+ assert(b == 2); /* fails; should pass */
+}
+
+/*************************************/
+
int main()
{
test1();
@@ -1255,29 +994,18 @@ int main()
test3();
test4();
test5();
- test6();
- test7();
- test8();
test9();
test10();
test11();
- test12();
- test13();
- test14();
- test15();
test16();
test17();
test18();
test19();
test20();
test21();
- test22();
test23();
- test24();
test25();
- test26();
test27();
- test28();
test29();
test30();
test31();
@@ -1305,6 +1033,7 @@ int main()
test51();
test52();
test6758();
+ test18573();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/test22205.d b/gcc/testsuite/gdc.test/runnable/test22205.d
new file mode 100644
index 0000000..78abf2f
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test22205.d
@@ -0,0 +1,17 @@
+// REQUIRED_ARGS: -debug
+
+void main() nothrow
+{
+ debug
+ {
+ try
+ {
+ throw new Exception("2");
+ }
+ catch (Exception) {}
+ catch (Throwable)
+ {
+ assert(0);
+ }
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test22209.d b/gcc/testsuite/gdc.test/runnable/test22209.d
new file mode 100644
index 0000000..f2a4bd5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test22209.d
@@ -0,0 +1,21 @@
+// https://issues.dlang.org/show_bug.cgi?id=22209
+
+struct U { size_t[4] a; }
+
+struct S
+{
+ int x;
+ U u;
+ alias u this;
+}
+
+U foo()
+{
+ S s = S(42, U([1, 2, 3, 4]));
+ return s;
+}
+
+void main()
+{
+ assert(foo().a[0] == 1);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test22227.d b/gcc/testsuite/gdc.test/runnable/test22227.d
new file mode 100644
index 0000000..7ef53c3
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test22227.d
@@ -0,0 +1,16 @@
+// REQUIRED_ARGS: -debug -O -release
+// https://issues.dlang.org/show_bug.cgi?id=22277
+
+bool secret = false;
+
+void free(immutable void* x) pure nothrow
+{
+ debug secret = true;
+}
+
+void main()
+{
+ free(null);
+ if (!secret)
+ assert(0);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test22278.d b/gcc/testsuite/gdc.test/runnable/test22278.d
new file mode 100644
index 0000000..72332a4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test22278.d
@@ -0,0 +1,24 @@
+/*
+REQUIRED_ARGS: -release
+PERMUTE_ARGS: -check=in=on -check=out=on
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=22278
+
+bool resultIn;
+bool resultOut;
+
+void foo22278()
+ in { resultIn = true; }
+ out { resultOut = true; }
+do {}
+
+int main()
+{
+ foo22278();
+
+ version(D_PreConditions) assert(resultIn); else assert(!resultIn);
+ version(D_PostConditions) assert(resultOut); else assert(!resultOut);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test23.d b/gcc/testsuite/gdc.test/runnable/test23.d
index abf8e37..f1fd4a6 100644
--- a/gcc/testsuite/gdc.test/runnable/test23.d
+++ b/gcc/testsuite/gdc.test/runnable/test23.d
@@ -1,14 +1,8 @@
-// RUNNABLE_PHOBOS_TEST
-// REQUIRED_ARGS:
-
module test;
import core.vararg;
import core.stdc.stdlib;
-import std.stdio;
-import std.string;
-import core.stdc.stdlib;
-
+import core.stdc.stdio;
/*******************************************/
@@ -69,13 +63,6 @@ void test3()
/*******************************************/
-void test4()
-{
- writeln("",true);
-}
-
-/*******************************************/
-
void test5()
{
int[] qwert = new int[6];
@@ -228,9 +215,9 @@ void test11()
{
Foo11 fooIt = new Foo11();
if (fooIt !is null)
- writefln("fooIt should be valid");
+ printf("fooIt should be valid\n");
fooIt.f.foo();
- writefln("it worked");
+ printf("it worked\n");
}
/*******************************************/
@@ -251,7 +238,7 @@ struct B12 {
void test12()
{
A12 a;
- printf("%d\n", A12.sizeof);
+ printf("%zd\n", A12.sizeof);
assert(A12.sizeof == 12);
}
@@ -272,7 +259,7 @@ interface Father {}
class Mother {
Father test() {
- writefln("Called Mother.test!");
+ printf("Called Mother.test!\n");
return new Child(42);
}
}
@@ -283,7 +270,7 @@ class Child : Mother, Father {
this(int d) { data = d; }
override Child test() {
- writefln("Called Child.test!");
+ printf("Called Child.test!\n");
return new Child(69);
}
}
@@ -294,7 +281,7 @@ void test14()
Mother childsMum = aChild;
Child childsChild = aChild.test();
Child mumsChild = cast(Child) childsMum.test();
- writefln("Success2");
+ printf("Success2\n");
}
@@ -335,27 +322,6 @@ void test15()
/*******************************************/
-creal x16;
-
-void foo16()
-{
- x16 = -x16;
-}
-
-void bar16()
-{
- return foo16();
-}
-
-void test16()
-{
- x16 = 2.0L + 0.0Li;
- bar16();
- assert(x16 == -2.0L + 0.0Li);
-}
-
-/*******************************************/
-
void test17()
{
version(D_InlineAsm_X86_64)
@@ -557,15 +523,12 @@ void test25()
char[6] cstr = "123456"c;
auto str1 = cast(wchar[3])(cstr);
- writefln("str1: ", (cast(char[])str1).length , " : ", (cast(char[])str1));
assert(cast(char[])str1 == "123456"c);
auto str2 = cast(wchar[3])("789abc"c);
- writefln("str2: ", (cast(char[])str2).length , " : ", (cast(char[])str2));
assert(cast(char[])str2 == "789abc"c);
auto str3 = cast(wchar[3])("defghi");
- writefln("str3: ", (cast(char[])str3).length , " : ", (cast(char[])str3));
version (LittleEndian)
assert(cast(char[])str3 == "d\000e\000f\000"c);
version (BigEndian)
@@ -631,26 +594,20 @@ uint intRes()
void test28()
{
- auto s = std.string.format("%s", "abc123"[intRes() % $] );
- writefln( "%s", s );
- assert(s == "2");
+ auto s = "abc123"[intRes() % $];
+ assert(s == '2');
static const char[] foo = "abc123";
- s = std.string.format("%s", foo[intRes() % $] );
- assert(s == "2");
-
+ assert(foo[intRes() % $] == '2');
static string bar = "abc123";
- s = std.string.format("%s", bar[intRes() % $] );
- assert(s == "2");
+ assert(bar[intRes() % $] == '2');
const char[] abc = "abc123";
- s = std.string.format("%s", abc[intRes() % $] );
- assert(s == "2");
+ assert(abc[intRes() % $] == '2');
string def = "abc123";
- s = std.string.format("%s", def[intRes() % $] );
- assert(s == "2");
+ assert(def[intRes() % $] == '2');
}
/*******************************************/
@@ -703,72 +660,6 @@ void test31()
/*******************************************/
-class Foo32
-{
- static void* ps;
-
- new (size_t sz)
- {
- void* p = core.stdc.stdlib.malloc(sz);
- printf("new(sz = %d) = %p\n", sz, p);
- ps = p;
- return p;
- }
-
- delete(void* p)
- {
- printf("delete(p = %p)\n", p);
- assert(p == ps);
- if (p) core.stdc.stdlib.free(p);
- }
-}
-
-void test32()
-{
- Foo32 f = new Foo32;
- delete f;
-}
-
-/*******************************************/
-
-class Foo33
-{
-// this() { printf("this()\n"); }
-// ~this() { printf("~this()\n"); }
-
- static void* ps;
- static int del;
-
- new (size_t sz, int i)
- {
- void* p = core.stdc.stdlib.malloc(sz);
- printf("new(sz = %d) = %p\n", sz, p);
- ps = p;
- return p;
- }
-
- delete(void* p)
- {
- printf("delete(p = %p)\n", p);
- assert(p == ps);
- if (p) core.stdc.stdlib.free(p);
- del += 1;
- }
-}
-
-void foo33()
-{
- scope Foo33 f = new(3) Foo33;
-}
-
-void test33()
-{
- foo33();
- assert(Foo33.del == 1);
-}
-
-/*******************************************/
-
struct o_O { int a; }
union O_O { int a; }
class O_o { int a; }
@@ -806,12 +697,6 @@ void test37()
{
Foo37 f = new Foo37();
- writefln("Foo.array[0] = %s", f.array[0] );
- writefln("Foo.array[1] = %s", f.array[1] );
- writefln("Foo.array[2] = %s", f.array[2] );
- writefln("Foo.array[3] = %s", f.array[3] );
- writefln("Foo.count = %s", f.count );
-
assert(f.array[0] == 1.0);
assert(f.array[1] == 1.0);
assert(f.array[2] == 1.0);
@@ -831,7 +716,7 @@ in
checkParameters();
}
-body
+do
{
}
@@ -848,7 +733,7 @@ void delegate() foo39()
void dg()
{
- writefln("delegate!");
+ printf("delegate!\n");
assert(a == 3);
}
}).dg;
@@ -1019,7 +904,8 @@ void test45()
buffer[i] -= cast(char)'a' - 'A'; // segfault here
}
}
- writeln(buffer);
+
+ assert(buffer == "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
}
/*******************************************/
@@ -1189,10 +1075,10 @@ bool[void[]] reg57;
void addToReg57(const(void)[] a, int b, bool v)
{
if (!v)
- writefln("X");
+ printf("X\n");
auto key = a~(cast(void*)&b)[0..4];
reg57[cast(immutable(void)[])key] = v;
- writefln("OK");
+ printf("OK\n");
}
void test57()
@@ -1232,10 +1118,9 @@ struct S59
void test59()
{ S59 s;
- writefln("s = %s", s);
string p;
- p = std.string.format("s = %s", s);
+ p = "s = " ~ s.toString();
assert(p == "s = foo");
}
@@ -1263,11 +1148,13 @@ void test60()
void test61()
{
int[][] f = [[1,2],[3,4]];
+ assert(f.length == 2);
+ assert(f[0].length == 2);
+ assert(f[1].length == 2);
assert(f[0][0] == 1);
assert(f[0][1] == 2);
assert(f[1][0] == 3);
assert(f[1][1] == 4);
- writeln(f);
}
/*******************************************/
@@ -1304,7 +1191,7 @@ void test63()
arr = [1] ~ 2;
// runtime crash, the length == 1
- printf("%d\n", arr.length);
+ printf("%zd\n", arr.length);
assert (arr.length == 2);
assert(arr[0] == 1);
assert(arr[1] == 2);
@@ -1333,7 +1220,6 @@ void test64()
foreach_reverse(v; x)
{
- writeln(v);
assert(j == v);
j--;
}
@@ -1342,7 +1228,6 @@ void test64()
j = 4;
foreach_reverse(i, v; x)
{
- writefln("[%s] = %s", i, v);
assert(i + 1 == j);
assert(j == v);
j--;
@@ -1411,11 +1296,11 @@ void test69()
auto n = new NoBug;
auto n2 = new NoBug2;
- writefln("bug %d", b.t);
+ printf("bug %d\n", b.t);
assert(b.t == 1);
- writefln("nobug %d", n.t);
+ printf("nobug %d\n", n.t);
assert(n.t == 2);
- writefln("nobug2 %d", n2.t);
+ printf("nobug2 %d\n", n2.t);
assert(n2.t == 3);
}
@@ -1428,8 +1313,6 @@ void test70()
}
static const char[0] altsep;
- string s = std.string.format("test%spath", altsep);
- assert(s == "testpath");
foo(altsep);
}
@@ -1502,7 +1385,6 @@ void main()
test1();
test2();
test3();
- test4();
test5();
test6();
test7();
@@ -1514,7 +1396,6 @@ void main()
test13();
test14();
test15();
- test16();
test17();
test18();
test19();
@@ -1530,8 +1411,8 @@ void main()
test29();
test30();
test31();
- test32();
- test33();
+
+
test34();
test37();
test38();
diff --git a/gcc/testsuite/gdc.test/runnable/test24.d b/gcc/testsuite/gdc.test/runnable/test24.d
index 2f31d75..d41d060 100644
--- a/gcc/testsuite/gdc.test/runnable/test24.d
+++ b/gcc/testsuite/gdc.test/runnable/test24.d
@@ -1,5 +1,5 @@
-// RUNNABLE_PHOBOS_TEST
// EXTRA_SOURCES: imports/test24a.d imports/test24b.d
+// EXTRA_FILES: imports/test24c.d
// PERMUTE_ARGS:
// REQUIRED_ARGS:
@@ -7,5 +7,5 @@ import imports.test24a, imports.test24b;
void main()
{
- string hi = std.string.format("%s", 3);
+ string hi = imports.test24c.format("%s", 3);
}
diff --git a/gcc/testsuite/gdc.test/runnable/test27.d b/gcc/testsuite/gdc.test/runnable/test27.d
index a3e76ea..b45c132 100644
--- a/gcc/testsuite/gdc.test/runnable/test27.d
+++ b/gcc/testsuite/gdc.test/runnable/test27.d
@@ -1,4 +1,3 @@
-// RUNNABLE_PHOBOS_TEST
// COMPILE_SEPARATELY
// EXTRA_SOURCES: imports/test27a.d
// PERMUTE_ARGS:
diff --git a/gcc/testsuite/gdc.test/runnable/test28.d b/gcc/testsuite/gdc.test/runnable/test28.d
index 5355c2c..8fb60b9 100644
--- a/gcc/testsuite/gdc.test/runnable/test28.d
+++ b/gcc/testsuite/gdc.test/runnable/test28.d
@@ -1,11 +1,7 @@
-// RUNNABLE_PHOBOS_TEST
module test;
+import core.stdc.stdio;
import core.vararg;
-import std.stdio;
-import std.string;
-
-extern(C) int printf(const char*, ...);
/*******************************************/
@@ -117,41 +113,24 @@ void test8()
{
int[] test;
test.length = 10;
- // Show address of array start and its length (10)
- writefln("%s %s", cast(uint)test.ptr, test.length);
+ assert(test.length == 10);
+ assert(test.ptr != null);
test.length = 1;
- // Show address of array start and its length (1)
- writefln("%s %s", cast(uint)test.ptr, test.length);
+ assert(test.length == 1);
+ assert(test.ptr != null);
test.length = 8;
- // Show address of array start and its length (8)
- writefln("%s %s", cast(uint)test.ptr, test.length);
+ assert(test.length == 8);
+ assert(test.ptr != null);
test.length = 0;
- // Shows 0 and 0!
- writefln("%s %s", cast(uint)test.ptr, test.length);
assert(test.length == 0);
assert(test.ptr != null);
}
/*******************************************/
-cdouble y9;
-
-cdouble f9(cdouble x)
-{
- return (y9 = x);
-}
-
-void test9()
-{
- f9(1.0+2.0i);
- assert(y9 == 1.0+2.0i);
-}
-
-/*******************************************/
-
class CBase10
{
this() { }
@@ -227,10 +206,10 @@ void test14()
void func15(...)
in {
- writefln("Arguments len = %d\n", _arguments.length);
+ printf("Arguments len = %d\n", cast(int)_arguments.length);
assert(_arguments.length == 2);
}
-body {
+do {
}
@@ -402,11 +381,9 @@ void test22()
void test23()
{
auto t=['a','b','c','d'];
- writeln(typeid(typeof(t)));
assert(is(typeof(t) == char[]));
const t2=['a','b','c','d','e'];
- writeln(typeid(typeof(t2)));
assert(is(typeof(t2) == const(const(char)[])));
}
@@ -424,16 +401,6 @@ void test24()
/*******************************************/
-void test25()
-{
- ireal x = 4.0Li;
- ireal y = 4.0Li;
- ireal z = 4Li;
- creal c = 4L + 0Li;
-}
-
-/*******************************************/
-
struct Foo26
{
int a;
@@ -688,7 +655,6 @@ template a34(string name, T...)
string localchar;
foreach (a34; T)
{
- writefln(`hello`);
localchar ~= a34.mangleof;
}
return localchar;
@@ -697,7 +663,7 @@ template a34(string name, T...)
void test34()
{
- writeln(a34!("Adf"[], typeof("adf"),uint)("Adf"[],"adf",1234));
+ assert(a34!("Adf"[], typeof("adf"),uint)("Adf"[],"adf",1234) == "Ayak");
}
/*******************************************/
@@ -722,7 +688,6 @@ template a36(AnotherT,string name,T...){
AnotherT localchar;
foreach(a;T)
{
- writefln(`hello`);
localchar~=a.mangleof;
}
return cast(AnotherT)localchar;
@@ -734,7 +699,7 @@ void test36()
string b="adf";
uint i=123;
char[3] c="Adf";
- writeln(a36!(typeof(b),"Adf")());
+ assert(a36!(typeof(b),"Adf")() == "");
}
/*******************************************/
@@ -780,8 +745,7 @@ void test39()
{
void print(string[] strs)
{
- writeln(strs);
- assert(format("%s", strs) == `["Matt", "Andrew"]`);
+ assert(strs == ["Matt", "Andrew"]);
}
print(["Matt", "Andrew"]);
@@ -803,7 +767,7 @@ void test40()
with (c.propName)
{
- writeln(toString());
+ assert(toString() == "test.test40.C");
}
auto foo = c.propName;
@@ -829,7 +793,7 @@ void test41()
assert(x3 == 1);
//test [0 .. 2] = 'b'; // this line should assert
- writef ("%s\n", test.ptr [0 .. 2]);
+ assert(test.ptr[0 .. 2] == "ba");
}
/*******************************************/
@@ -846,6 +810,12 @@ void test42()
/*******************************************/
+void vararg43(string fmt, ...)
+{
+ assert(_arguments[0] is typeid(const string));
+ assert(va_arg!(const string)(_argptr) == "hello");
+}
+
struct A43
{
static const MY_CONST_STRING = "hello";
@@ -854,7 +824,7 @@ struct A43
{
// This will either print garbage or throw a UTF exception.
// But if never_called() is commented out, then it will work.
- writefln("%s", MY_CONST_STRING);
+ vararg43("%s", MY_CONST_STRING);
}
}
@@ -862,7 +832,7 @@ void never_called43()
{
// This can be anything; there just needs to be a reference to
// A43.MY_CONST_STRING somewhere.
- writefln("%s", A43.MY_CONST_STRING);
+ vararg43("%s", A43.MY_CONST_STRING);
}
void test43()
@@ -873,6 +843,12 @@ void test43()
/*******************************************/
+void vararg44(string fmt, ...)
+{
+ assert(_arguments[0] is typeid(const string));
+ assert(va_arg!(const string)(_argptr) == "hello");
+}
+
class A44
{
static const MY_CONST_STRING = "hello";
@@ -881,7 +857,7 @@ class A44
{
// This will either print garbage or throw a UTF exception.
// But if never_called() is commented out, then it will work.
- writefln("%s", MY_CONST_STRING);
+ vararg44("%s", MY_CONST_STRING);
}
}
@@ -889,7 +865,7 @@ void never_called44()
{
// This can be anything; there just needs to be a reference to
// A44.MY_CONST_STRING somewhere.
- writefln("%s", A44.MY_CONST_STRING);
+ vararg44("%s", A44.MY_CONST_STRING);
}
void test44()
@@ -941,9 +917,9 @@ void test47()
void test48()
{
Object o = new Object();
- printf("%.*s\n", typeof(o).classinfo.name.length, typeof(o).classinfo.name.ptr);
- printf("%.*s\n", (typeof(o)).classinfo.name.length, (typeof(o)).classinfo.name.ptr);
- printf("%.*s\n", (Object).classinfo.name.length, (Object).classinfo.name.ptr);
+ printf("%.*s\n", cast(int)typeof(o).classinfo.name.length, typeof(o).classinfo.name.ptr);
+ printf("%.*s\n", cast(int)(typeof(o)).classinfo.name.length, (typeof(o)).classinfo.name.ptr);
+ printf("%.*s\n", cast(int)(Object).classinfo.name.length, (Object).classinfo.name.ptr);
}
/*******************************************/
@@ -1076,13 +1052,11 @@ void test58()
static S a = {i: 1};
static S b;
- writefln("a.bar: %s, %s", a.bar, a.abc);
assert(a.i == 1);
assert(a.bar[0] == 4);
assert(a.bar[1] == 4);
assert(a.bar[2] == 4);
assert(a.bar[3] == 4);
- writefln("b.bar: %s, %s", b.bar, b.abc);
assert(b.i == 0);
assert(b.bar[0] == 4);
assert(b.bar[1] == 4);
@@ -1093,10 +1067,18 @@ void test58()
/*******************************************/
+void vararg59(...)
+{
+ if (_arguments[0] is typeid(size_t))
+ assert(va_arg!size_t(_argptr) == 454);
+ else
+ assert(va_arg!string(_argptr) == "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234");
+}
+
void bug59(string s)()
{
- writeln(s);
- writeln(s.length);
+ vararg59(s);
+ vararg59(s.length);
}
void test59()
@@ -1139,7 +1121,6 @@ void test62()
Vector62 a;
a.set(1,2,24);
a = a * 2;
- writeln(a.x, a.y, a.z);
assert(a.x == 2);
assert(a.y == 4);
assert(a.z == 48);
@@ -1158,7 +1139,7 @@ struct Vector62
z = _z;
}
- Vector62 opMul(float s)
+ Vector62 opBinary(string op : "*")(float s)
{
Vector62 ret;
ret.x = x*s;
@@ -1191,8 +1172,6 @@ void test63()
{
Data63 d; d.x = 1; d.y = 2;
d = frob(d);
- writeln(d.x);
- writeln(d.y);
assert(d.x == 3 && d.y == -1);
}
@@ -1200,8 +1179,8 @@ void test63()
class Foo64
{
- this() { writefln("Foo64 created"); }
- ~this() { writefln("Foo64 destroyed"); }
+ this() { }
+ ~this() { }
}
template Mix64()
@@ -1249,6 +1228,49 @@ void test65()
/*******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18576
+
+void delegate() callback;
+
+struct S66 {
+ int x;
+ @disable this(this);
+
+ this(int x) {
+ this.x = x;
+ callback = &inc;
+ }
+ void inc() {
+ x++;
+ }
+}
+
+auto f66()
+{
+ return g66(); // RVO should be done
+}
+
+auto g66()
+{
+ return h66(); // RVO should be done
+}
+
+auto h66()
+{
+ return S66(100);
+}
+
+void test18576()
+{
+ auto s = f66();
+ printf("%p vs %p\n", &s, callback.ptr);
+ callback();
+ printf("s.x = %d\n", s.x);
+ assert(s.x == 101);
+ assert(&s == callback.ptr);
+}
+
+/*******************************************/
void main()
{
@@ -1261,7 +1283,6 @@ void main()
test6();
test7();
test8();
- test9();
test10();
test11();
test12();
@@ -1276,7 +1297,6 @@ void main()
test22();
test23();
test24();
- test25();
test26();
test27();
test28();
@@ -1315,6 +1335,7 @@ void main()
test63();
test64();
test65();
+ test18576();
printf("Success\n");
}
diff --git a/gcc/testsuite/gdc.test/runnable/test29.d b/gcc/testsuite/gdc.test/runnable/test29.d
index 9156c91..03c81c6 100644
--- a/gcc/testsuite/gdc.test/runnable/test29.d
+++ b/gcc/testsuite/gdc.test/runnable/test29.d
@@ -1,6 +1,12 @@
-// COMPILE_SEPARATELY
-// EXTRA_SOURCES: imports/test29a.d imports/test29b.d
-// PERMUTE_ARGS:
+/*
+COMPILE_SEPARATELY
+EXTRA_SOURCES: imports/test29a.d imports/test29b.d
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+42
+---
+*/
import imports.test29a;
import imports.test29b;
@@ -10,4 +16,3 @@ extern(C) int printf(const char*, ...);
void main() {
printf("%d\n", qwert);
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/test3.d b/gcc/testsuite/gdc.test/runnable/test3.d
index 11f66c6..4c6b9de 100644
--- a/gcc/testsuite/gdc.test/runnable/test3.d
+++ b/gcc/testsuite/gdc.test/runnable/test3.d
@@ -34,7 +34,7 @@ int main(string[] args)
a.bar = "hello";
a.bar = baz ~ "betty";
- printf("a.bar = '%.*s'\n", a.bar.length, a.bar.ptr);
+ printf("a.bar = '%.*s'\n", cast(int)a.bar.length, a.bar.ptr);
assert(a.bar == "lolobetty");
return 0;
}
diff --git a/gcc/testsuite/gdc.test/runnable/test30.d b/gcc/testsuite/gdc.test/runnable/test30.d
index 085311a..384ff4c 100644
--- a/gcc/testsuite/gdc.test/runnable/test30.d
+++ b/gcc/testsuite/gdc.test/runnable/test30.d
@@ -1,4 +1,4 @@
-// 444
+// https://issues.dlang.org/show_bug.cgi?id=444
int main()
{
diff --git a/gcc/testsuite/gdc.test/runnable/test34.d b/gcc/testsuite/gdc.test/runnable/test34.d
index e38ab1c..dee6609 100644
--- a/gcc/testsuite/gdc.test/runnable/test34.d
+++ b/gcc/testsuite/gdc.test/runnable/test34.d
@@ -1,18 +1,8 @@
-// RUNNABLE_PHOBOS_TEST
-/*
-TEST_OUTPUT:
----
-Object
----
-*/
-
module test34;
-import std.stdio;
-import std.string;
-import std.format;
import core.exception;
-
+import core.stdc.stdio;
+import core.vararg;
/************************************************/
@@ -26,16 +16,12 @@ void test1()
auto hfoo = ti_foo.toHash();
auto hbar = ti_bar.toHash();
- writefln("typeid(Foo).toHash: ", hfoo);
- writefln("typeid(Bar).toHash: ", hbar);
assert(hfoo != hbar);
auto e = (ti_foo == ti_bar);
- writefln("opEquals: ", e ? "equal" : "not equal");
assert(!e);
auto c = (ti_foo.opCmp(ti_bar) == 0);
- writefln("opCmp: ", c ? "equal" : "not equal");
assert(!c);
}
@@ -63,7 +49,6 @@ Struct[1] table;
Struct getfirst()
{
foreach(v; table) {
- writeln(v.langID);
assert(v.langID == 1);
return v;
}
@@ -73,7 +58,6 @@ Struct getfirst()
Struct getsecond()
{
foreach(ref v; table) {
- writeln(v.langID);
assert(v.langID == 1);
return v;
}
@@ -85,11 +69,9 @@ void test3()
table[0].langID = 1;
auto v = getfirst();
- writeln(v.langID);
assert(v.langID == 1);
v = getsecond();
- writeln(v.langID);
assert(v.langID == 1);
}
@@ -198,11 +180,6 @@ template parseInteger(string s)
void test7()
{
- writeln(parseUinteger!("1234abc").value);
- writeln(parseUinteger!("1234abc").rest);
- writeln(parseInteger!("-1234abc").value);
- writeln(parseInteger!("-1234abc").rest);
-
assert(parseUinteger!("1234abc").value == "1234");
assert(parseUinteger!("1234abc").rest == "abc");
assert(parseInteger!("-1234abc").value == "-1234");
@@ -284,10 +261,8 @@ class B34 : A34 { }
void test11()
{
A34 test=new B34;
- writefln("Test is ", test.toString);
assert(test.toString == "test34.B34");
A34 test_2=cast(A34)(new B34);
- writefln("Test 2 is ", test_2.toString);
assert(test_2.toString == "test34.B34");
}
@@ -357,7 +332,6 @@ struct Iterator16(T : Basic16!(T, U), U)
{
static void Foo()
{
- writeln(typeid(T), typeid(U));
assert(is(T == int));
assert(is(U == float));
}
@@ -529,11 +503,8 @@ template Mang(alias F)
template moo(alias A)
{
- pragma(msg," ");
const string a = Mang!(A).mangledname;
- pragma(msg," ");
static assert(Mang!(A).mangledname == a); // FAILS !!!
- pragma(msg," ");
}
void test27()
@@ -658,10 +629,39 @@ struct Vector34
public string toString()
{
- return std.string.format("<%f, %f, %f>", x, y, z);
+ return formatImpl("<%f, %f, %f>", x, y, z);
+ }
+
+ private static string formatImpl(string fmt, ...)
+ {
+ string ret = "<";
+ bool comma;
+ foreach (arg; _arguments)
+ {
+ assert(arg is typeid(float));
+ if (comma)
+ ret ~= ", ";
+ auto f = va_arg!float(_argptr);
+ if (f == 1)
+ ret ~= "1.000000";
+ else if (f == 0)
+ ret ~= "0.000000";
+ else
+ assert(0);
+ comma = true;
+ }
+ ret ~= ">";
+ return ret;
}
}
+string format34(string fmt, ...)
+{
+ assert(_arguments[0] is typeid(Vector34));
+ auto arg = va_arg!Vector34(_argptr);
+ return arg.toString();
+}
+
class Foo34
{
private Vector34 v;
@@ -679,17 +679,12 @@ class Foo34
private void bar()
{
auto s = foobar();
- writef("Returned: %s\n", s);
- assert(std.string.format("%s", s) == "<1.000000, 0.000000, 0.000000>");
+ assert(format34("%s", s) == "<1.000000, 0.000000, 0.000000>");
}
public Vector34 foobar()
{
- writef("Returning %s\n", v);
-
return v;
- Vector34 b = Vector34();
- return b;
}
}
@@ -704,18 +699,18 @@ void test34()
void foo35()
{
- uint a;
- uint b;
- uint c;
- extern (Windows) int function(int i, int j, int k) xxx;
+ uint a;
+ uint b;
+ uint c;
+ extern (Windows) int function(int i, int j, int k) xxx;
- a = 1;
- b = 2;
- c = 3;
+ a = 1;
+ b = 2;
+ c = 3;
- xxx = cast(typeof(xxx))(a + b);
- throw new Exception("xxx");
- xxx( 4, 5, 6 );
+ xxx = cast(typeof(xxx))(a + b);
+ throw new Exception("xxx");
+ xxx( 4, 5, 6 );
}
void test35()
@@ -737,7 +732,7 @@ void test37()
{
synchronized
{
- writefln("Hello world!");
+ printf("Hello world!\n");
}
}
}
@@ -768,7 +763,7 @@ static Rect sizeTest(bool empty) {
}
void print38(Rect r) {
- writefln("(%d, %d)-(%d, %d)", r.left, r.top, r.right, r.bottom);
+ printf("(%d, %d)-(%d, %d)\n", r.left, r.top, r.right, r.bottom);
assert(r.left == 0);
assert(r.right == 0);
assert(r.top == 0);
@@ -781,37 +776,66 @@ Rect defaultRect() {
/************************************************/
+void varargs39(...)
+{
+ if (_arguments[0] is typeid(double[]))
+ {
+ auto arg = va_arg!(double[])(_argptr);
+ assert(arg.length == 1 && arg[0] == 1 || arg[0] == 2);
+ }
+ else if (_arguments[0] is typeid(double[][]))
+ {
+ auto arg = va_arg!(double[][])(_argptr);
+ assert(arg == [[1],[2]]);
+ }
+ else if (_arguments[0] is typeid(double[1][]))
+ {
+ auto arg = va_arg!(double[1][])(_argptr);
+ assert(arg == [[1], [2]]);
+ }
+ else
+ assert(0);
+}
+
void test39()
{
double[][] foo = [[1.0],[2.0]];
- writeln(foo[0]); // --> [1] , ok
- writeln(foo[1]); // --> [2] , ok
-
- writeln(foo); // --> [[1],4.63919e-306] ack!
- writefln("%s", foo); // --> ditto
- auto f = std.string.format("%s", foo);
- assert(f == "[[1], [2]]");
+ varargs39(foo[0]); // --> [1] , ok
+ varargs39(foo[1]); // --> [2] , ok
+ varargs39(foo); // --> [[1],4.63919e-306] ack!
double[1][2] bar;
bar[0][0] = 1.0;
bar[1][0] = 2.0;
- writeln(bar); // Error: Access violation
- auto r = std.string.format("%s", bar);
- assert(r == "[[1], [2]]");
+ varargs39(bar); // Error: Access violation
}
/************************************************/
+void varargs40(...)
+{
+ if (_arguments[0] is typeid(int[char]))
+ {
+ auto x = va_arg!(int[char])(_argptr);
+ assert(x == ['b':123]);
+ }
+ else if (_arguments[0] is typeid(int))
+ {
+ auto x = va_arg!int(_argptr);
+ assert(x == 123);
+ }
+ else
+ assert(0);
+}
+
void test40()
{
int[char] x;
x['b'] = 123;
- writeln(x);
- auto r = std.string.format("%s", x);
- assert(r == "['b':123]");
- writeln(x['b']);
+ varargs40(x);
+ varargs40(x['b']);
}
/************************************************/
@@ -855,12 +879,28 @@ void test44()
/************************************************/
+void varargs45(...)
+{
+ if (_arguments[0] is typeid(const(char[3])[]))
+ {
+ auto a = va_arg!(const(char[3])[])(_argptr);
+ assert(a == ["abc", "def"]);
+ }
+ else if (_arguments[0] is typeid(const(char)[][]))
+ {
+ auto b = va_arg!(const(char)[][])(_argptr);
+ assert(b == ["abc", "def"]);
+ }
+ else
+ assert(0);
+}
+
void test45()
{
- //char[3][] a = ["abc", "def"];
- //writefln(a);
- //char[][2] b = ["abc", "def"];
- //writefln(b);
+ const(char)[3][] a = ["abc", "def"];
+ varargs45(a);
+ const(char)[][2] b = ["abc", "def"];
+ varargs45(b);
}
/************************************************/
@@ -981,26 +1021,22 @@ void test49()
version (all)
{
- writefln("Before test 1: ", a.v);
- if (a == a.init) { writeln(a.v,"(a==a.init)"); assert(0); }
- else { writeln(a.v,"(a!=a.init)"); assert(a.v == 10); }
+ if (a == a.init) { assert(0); }
+ else { assert(a.v == 10); }
}
else
{
- writefln("Before test 1: ", a.v);
- if (a == a.init) { writeln(a.v,"(a==a.init)"); assert(a.v == 10); }
- else { writeln(a.v,"(a!=a.init)"); assert(0); }
+ if (a == a.init) { assert(a.v == 10); }
+ else { assert(0); }
}
a.v = 100;
- writefln("Before test 2: ", a.v);
- if (a == a.init) { writeln(a.v,"(a==a.init)"); assert(0); }
- else { writeln(a.v,"(a!=a.init)"); assert(a.v == 100); }
+ if (a == a.init) { assert(0); }
+ else { assert(a.v == 100); }
a = A(1000);
- writefln("Before test 3: ", a.v);
- if (a == a.init) { writeln(a.v,"(a==a.init)"); assert(0); }
- else { writeln(a.v,"(a!=a.init)"); assert(a.v == 1000); }
+ if (a == a.init) { assert(0); }
+ else { assert(a.v == 1000); }
version (all)
assert(a.init.v == 0);
@@ -1044,14 +1080,6 @@ struct TestStruct
void func53(TestStruct[2] testarg)
{
- writeln(testarg[0].dummy0);
- writeln(testarg[0].dummy1);
- writeln(testarg[0].dummy2);
-
- writeln(testarg[1].dummy0);
- writeln(testarg[1].dummy1);
- writeln(testarg[1].dummy2);
-
assert(testarg[0].dummy0 == 0);
assert(testarg[0].dummy1 == 1);
assert(testarg[0].dummy2 == 2);
@@ -1061,11 +1089,10 @@ void func53(TestStruct[2] testarg)
assert(testarg[1].dummy2 == 2);
}
-TestStruct m53[2];
+TestStruct[2] m53;
void test53()
{
- writeln(&m53);
func53(m53);
}
@@ -1076,13 +1103,11 @@ void test54()
double a = 0;
double b = 1;
// Internal error: ..\ztc\cg87.c 3233
-// a += (1? b: 1+1i)*1i;
- writeln(a);
-// assert(a == 0);
+ a += ((1? b: 1+1i)*1i).re;
+ assert(a == 0);
// Internal error: ..\ztc\cod2.c 1680
-// a += (b?1:b-1i)*1i;
- writeln(a);
-// assert(a == 0);
+ a += ((b?1:b-1i)*1i).re;
+ assert(a == 0);
}
/************************************************/
@@ -1101,7 +1126,7 @@ void test55()
/************************************************/
template t56() { alias Object t56; }
-pragma(msg, t56!().stringof);
+static assert(t56!().stringof == "Object");
void test56()
{
@@ -1115,9 +1140,6 @@ void test57()
static if (is(AA T : T[U], U : const char[]))
{
- writeln(typeid(T));
- writeln(typeid(U));
-
assert(is(T == long));
assert(is(U == const(char)[]));
}
@@ -1129,9 +1151,7 @@ void test57()
static if (is(int[10] W : W[V], int V))
{
- writeln(typeid(W));
assert(is(W == int));
- writeln(V);
assert(V == 10);
}
@@ -1295,7 +1315,7 @@ void main()
test61();
test62();
- writefln("Success");
+ printf("Success\n");
}
diff --git a/gcc/testsuite/gdc.test/runnable/test3449.d b/gcc/testsuite/gdc.test/runnable/test3449.d
index d330cb9..8d38918 100644
--- a/gcc/testsuite/gdc.test/runnable/test3449.d
+++ b/gcc/testsuite/gdc.test/runnable/test3449.d
@@ -1,6 +1,6 @@
/******************************************/
-// 3449
+// https://issues.dlang.org/show_bug.cgi?id=3449
template TypeTuple(T...) { alias TypeTuple = T; }
@@ -13,6 +13,10 @@ static this()
{
mg1 = 10;
cg1 = 10;
+}
+
+shared static this()
+{
ig1 = 10;
}
static assert(!__traits(compiles, { static assert(mg1 == 0); }));
@@ -89,7 +93,7 @@ void test3449()
}
/******************************************/
-// 10643
+// https://issues.dlang.org/show_bug.cgi?id=10643
struct S10643
{
diff --git a/gcc/testsuite/gdc.test/runnable/test3574a.d b/gcc/testsuite/gdc.test/runnable/test3574a.d
index c2283f7..c6122e7 100644
--- a/gcc/testsuite/gdc.test/runnable/test3574a.d
+++ b/gcc/testsuite/gdc.test/runnable/test3574a.d
@@ -6,7 +6,7 @@ out
{
g = 100;
}
-body
+do
{
return;
// expected return code == 0
diff --git a/gcc/testsuite/gdc.test/runnable/test3574b.d b/gcc/testsuite/gdc.test/runnable/test3574b.d
index d239ab6..b256c64 100644
--- a/gcc/testsuite/gdc.test/runnable/test3574b.d
+++ b/gcc/testsuite/gdc.test/runnable/test3574b.d
@@ -6,7 +6,7 @@ out
{
g = 100;
}
-body
+do
{
//return;
// expected return code == 0
diff --git a/gcc/testsuite/gdc.test/runnable/test3574c.d b/gcc/testsuite/gdc.test/runnable/test3574c.d
index 2974da5..f93e22a 100644
--- a/gcc/testsuite/gdc.test/runnable/test3574c.d
+++ b/gcc/testsuite/gdc.test/runnable/test3574c.d
@@ -6,7 +6,7 @@ void main()
//{
// g = 100;
//}
-//body
+//do
{
return;
// expected return code == 0
diff --git a/gcc/testsuite/gdc.test/runnable/test3574d.d b/gcc/testsuite/gdc.test/runnable/test3574d.d
index 0eaf2dd..7976b34 100644
--- a/gcc/testsuite/gdc.test/runnable/test3574d.d
+++ b/gcc/testsuite/gdc.test/runnable/test3574d.d
@@ -6,7 +6,7 @@ void main()
//{
// g = 100;
//}
-//body
+//do
{
//return;
// expected return code == 0
diff --git a/gcc/testsuite/gdc.test/runnable/test37.d b/gcc/testsuite/gdc.test/runnable/test37.d
index f4a4547..08305cb 100644
--- a/gcc/testsuite/gdc.test/runnable/test37.d
+++ b/gcc/testsuite/gdc.test/runnable/test37.d
@@ -1,14 +1,15 @@
-// RUNNABLE_PHOBOS_TEST
// PERMUTE_ARGS:
// REQUIRED_ARGS: -Jrunnable/extra-files
// EXTRA_FILES: extra-files/foo37.txt extra-files/std14198/uni.d
-import std.stdio;
+import core.stdc.stdio;
void main()
{
- writefln(import("foo37.txt"));
+ auto s = import("foo37.txt");
+ printf("%.*s\n", cast(int)s.length, s.ptr);
// also want to ensure that we can access
// imports in a subdirectory of the -J path
- writefln(import("std14198/uni.d"));
+ s = import("std14198/uni.d");
+ printf("%.*s\n", cast(int)s.length, s.ptr);
}
diff --git a/gcc/testsuite/gdc.test/runnable/test38.d b/gcc/testsuite/gdc.test/runnable/test38.d
index 4fc728d..4c76e9f 100644
--- a/gcc/testsuite/gdc.test/runnable/test38.d
+++ b/gcc/testsuite/gdc.test/runnable/test38.d
@@ -1,8 +1,14 @@
-// COMPILE_SEPARATELY
-// EXTRA_SOURCES: imports/test38a.d
-// PERMUTE_ARGS:
+/*
+COMPILE_SEPARATELY
+EXTRA_SOURCES: imports/test38a.d
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+b = 49, 49
+---
+*/
-import std.stdio;
+import core.stdc.stdio;
import imports.test38a;
void main()
diff --git a/gcc/testsuite/gdc.test/runnable/test4.d b/gcc/testsuite/gdc.test/runnable/test4.d
index 1d03572..9811254 100644
--- a/gcc/testsuite/gdc.test/runnable/test4.d
+++ b/gcc/testsuite/gdc.test/runnable/test4.d
@@ -1,5 +1,11 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS:
+/*
+TEST_OUTPUT:
+---
+runnable/test4.d(717): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+---
+*/
import core.exception;
import core.stdc.math;
@@ -48,17 +54,17 @@ void test1()
void test2()
{
- byte foo1[5];
- ubyte foo2[6];
- short foo3[7];
- ushort foo4[8];
- int foo5[9];
- uint foo6[10];
- long foo7[11];
- ulong foo8[12];
- float foo9[13];
- double foo10[14];
- real foo11[15];
+ byte[5] foo1;
+ ubyte[6] foo2;
+ short[7] foo3;
+ ushort[8] foo4;
+ int[9] foo5;
+ uint[10] foo6;
+ long[11] foo7;
+ ulong[12] foo8;
+ float[13] foo9;
+ double[14] foo10;
+ real[15] foo11;
int i;
@@ -96,17 +102,17 @@ void test2()
void test3()
{
- byte foo1[5] = 20;
- ubyte foo2[6] = 21;
- short foo3[7] = 22;
- ushort foo4[8] = 23;
- int foo5[9] = 24;
- uint foo6[10] = 25;
- long foo7[11] = 26;
- ulong foo8[12] = 27;
- float foo9[13] = 28;
- double foo10[14] = 29;
- real foo11[15] = 30;
+ byte[5] foo1 = 20;
+ ubyte[6] foo2 = 21;
+ short[7] foo3 = 22;
+ ushort[8] foo4 = 23;
+ int[9] foo5 = 24;
+ uint[10] foo6 = 25;
+ long[11] foo7 = 26;
+ ulong[12] foo8 = 27;
+ float[13] foo9 = 28;
+ double[14] foo10 = 29;
+ real[15] foo11 = 30;
int i;
@@ -257,13 +263,13 @@ struct TestVectors
string replace;
};
-TestVectors tva[] =
+TestVectors[] tva =
[
{ pattern:"(a)\\1", input:"abaab", result:"y", format:"&", replace:"aa" },
{ pattern:"abc", input:"abc", result:"y", format:"&", replace:"abc" },
];
-TestVectors tvs[2] =
+TestVectors[2] tvs =
[
{ pattern:"(a)\\1", input:"abaab", result:"y", format:"&", replace:"aa" },
{ pattern:"abc", input:"abc", result:"y", format:"&", replace:"abc" },
@@ -360,8 +366,8 @@ const uint MAX_PATH1 = 260;
enum { MAX_PATH2 = 261 }
struct WIN32_FIND_DATA {
- char cFileName1[MAX_PATH1];
- char cFileName2[MAX_PATH2];
+ char[MAX_PATH1] cFileName1;
+ char[MAX_PATH2] cFileName2;
}
void test11()
@@ -502,10 +508,10 @@ void test15()
struct GUID { // size is 16
align(1):
- uint Data1;
- ushort Data2;
- ushort Data3;
- ubyte Data4[8];
+ uint Data1;
+ ushort Data2;
+ ushort Data3;
+ ubyte[8] Data4;
}
@@ -543,26 +549,7 @@ void test16()
/* ================================ */
-void test17()
-{
- creal z = 1. + 2.0i;
-
- real r = z.re;
- assert(r == 1.0);
-
- real i = z.im;
- assert(i == 2.0);
-
- assert(r.im == 0.0);
- assert(r.re == 1.0);
-
- assert(i.re == 2.0);
- assert(i.im == 0.0i);
-}
-
-/* ================================ */
-
-private const uint crc_table[256] = [
+private const uint[256] crc_table = [
0x00000000u, 0x77073096u, 0xee0e612cu, 0x990951bau, 0x076dc419u,
0x2d02ef8du
];
@@ -640,24 +627,6 @@ void test20()
/* ================================ */
-void test21()
-{
- ireal imag = 2.5i;
- printf ("test of imag*imag = %Lf\n",imag*imag);
- assert(imag * imag == -6.25);
-}
-
-/* ================================ */
-
-void test22()
-{
- creal z1 = 1. - 2.0i;
- ireal imag_part = z1.im/1i;
-}
-
-
-/* ================================ */
-
int def23(int x, int y)
{
return x * y;
@@ -978,11 +947,11 @@ void test43()
{
string s;
- s = __FILE__; printf("file = '%.*s'\n", s.length, s.ptr);
+ s = __FILE__; printf("file = '%.*s'\n", cast(int)s.length, s.ptr);
printf("line = %d\n", __LINE__);
- s = __DATE__; printf("date = '%.*s'\n", s.length, s.ptr);
- s = __TIME__; printf("time = '%.*s'\n", s.length, s.ptr);
- s = __TIMESTAMP__; printf("timestamp = '%.*s'\n", s.length, s.ptr);
+ s = __DATE__; printf("date = '%.*s'\n", cast(int)s.length, s.ptr);
+ s = __TIME__; printf("time = '%.*s'\n", cast(int)s.length, s.ptr);
+ s = __TIMESTAMP__; printf("timestamp = '%.*s'\n", cast(int)s.length, s.ptr);
}
/* ================================ */
@@ -1143,7 +1112,10 @@ class Cout{
Cout set(int x){
return this;
}
- alias set opShl;
+ Cout opBinary(string op)(int x) if (op == "<<")
+ {
+ return set(x);
+ }
}
void test49()
@@ -1250,7 +1222,7 @@ void test54()
}
catch(Exception e)
{
- printf("catch %.*s\n", e.msg.length, e.msg.ptr);
+ printf("catch %.*s\n", cast(int)e.msg.length, e.msg.ptr);
assert(e.msg == "first");
assert(e.next.msg == "second");
}
@@ -1270,7 +1242,7 @@ void foo55()
catch (Exception e)
{
printf("inner catch %p\n", e);
- printf("e.msg == %.*s\n", e.msg.length, e.msg.ptr);
+ printf("e.msg == %.*s\n", cast(int)e.msg.length, e.msg.ptr);
assert(e.msg == "second");
//assert(e.msg == "first");
//assert(e.next.msg == "second");
@@ -1404,6 +1376,46 @@ void test59()
/* ================================ */
+// https://issues.dlang.org/show_bug.cgi?id=10664
+
+Exception collectExceptionE(int delegate () expression, ref int result)
+{
+ try
+ {
+ result = expression();
+ }
+ catch (Exception e)
+ {
+ return e;
+ }
+ return null;
+}
+
+RangeError collectExceptionR(int delegate () expression, ref int result)
+{
+ try
+ {
+ result = expression();
+ }
+ catch (RangeError e)
+ {
+ return e;
+ }
+ return null;
+}
+
+void test10664()
+{
+ int b;
+ int foo() { throw new Exception("blah"); }
+ assert(collectExceptionE(&foo, b));
+
+ int[] a = new int[3];
+ int goo() { return a[4]; }
+ collectExceptionR(&goo, b);
+}
+
+/* ================================ */
int main()
@@ -1424,12 +1436,9 @@ int main()
test14();
//test15();
test16();
- test17();
test18();
test19();
test20();
- test21();
- test22();
test23();
test24();
// test26();
@@ -1465,6 +1474,7 @@ int main()
test57();
test58();
test59();
+ test10664();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/test40.d b/gcc/testsuite/gdc.test/runnable/test40.d
index 528162b..2c1069d 100644
--- a/gcc/testsuite/gdc.test/runnable/test40.d
+++ b/gcc/testsuite/gdc.test/runnable/test40.d
@@ -2,7 +2,7 @@
// PERMUTE_ARGS:
// REQUIRED_ARGS:
-import std.stdio;
+import core.stdc.stdio;
import imports.test40a;
class Foo {
diff --git a/gcc/testsuite/gdc.test/runnable/test42.d b/gcc/testsuite/gdc.test/runnable/test42.d
index e887fae..57045ba 100644
--- a/gcc/testsuite/gdc.test/runnable/test42.d
+++ b/gcc/testsuite/gdc.test/runnable/test42.d
@@ -1,4 +1,4 @@
-/* RUNNABLE_PHOBOS_TEST
+/*
REQUIRED_ARGS:
TEST_OUTPUT:
---
@@ -13,10 +13,10 @@ C6test427test219FZ8__mixin11C
*/
module test42;
-import std.stdio;
+
import core.stdc.stdio;
-import std.string;
import core.memory;
+import core.vararg;
/***************************************************/
@@ -61,7 +61,7 @@ void test2()
void test3()
{
auto i = mixin("__LINE__");
- writefln("%d", i);
+ printf("%d\n", i);
assert(i == 63);
}
@@ -94,7 +94,8 @@ void test5()
}
/***************************************************/
-// Bug 1200. One case moved to deprecate1.d
+// https://issues.dlang.org/show_bug.cgi?id=1200
+// One case moved to deprecate1.d
void foo6a() {
do
@@ -162,8 +163,8 @@ void test8()
void test9()
{
- writeln(long.max.stringof);
- writeln(ulong.max.stringof);
+ //writeln(long.max.stringof);
+ //writeln(ulong.max.stringof);
assert(long.max.stringof == "9223372036854775807L");
assert(ulong.max.stringof == "18446744073709551615LU");
}
@@ -205,7 +206,7 @@ void test12()
assert((foo ~ cast(char[])"foo").length == foo.length + 1);
assert((cast(char[])"foo" ~ foo).length == foo.length + 1);
- printf("%d\n", (foo ~ cast(char[])"foo")[0].length);
+ printf("%zd\n", (foo ~ cast(char[])"foo")[0].length);
assert((foo ~ [cast(char[])"foo"]).length == foo.length + 1);
@@ -421,7 +422,7 @@ void test25()
int[10] arrayA = [0,1,2,3,4,5,6,7,8,9];
foreach(int i; arrayA)
{
- writeln(i);
+ printf("%d\n", i);
}
}
@@ -532,11 +533,11 @@ struct S35
void test35()
{ S35 s;
auto t = typeid(S35);
- writefln("s = %s", s);
- writefln("s = %s", t);
+ //writefln("s = %s", s);
+ //writefln("s = %s", t);
auto tis = cast(TypeInfo_Struct)t;
- writefln("s = %s", tis);
- writefln("s = %s", tis.xtoString);
+ //writefln("s = %s", tis);
+ //writefln("s = %s", tis.xtoString);
assert(tis.xtoString != null);
}
@@ -660,16 +661,6 @@ void test43()
/***************************************************/
-void test44()
-{
- ifloat f = 1.0fi;
-// f *= 2.0fi; // illegal but compiles
- writefln("%s", f);
-// assert(f == 0i);
-}
-
-/***************************************************/
-
int foo45(int i)
{
if(i==0){
@@ -685,7 +676,7 @@ void test45()
assert(foo45(0)==2);
try{
foo45(1);
- }catch{
+ }catch(Throwable){
return cast(void)0;
}
assert(0);
@@ -819,7 +810,7 @@ void test54()
string[] k=["adf","AsdfadSF","dfdsfassdf"];
foreach(d;k)
{
- printf("%.*s\n", d.length, d.ptr);
+ printf("%.*s\n", cast(int)d.length, d.ptr);
string foo() {assert(d!="");return d;}
func54(&foo);
func54(delegate string() {assert(d!="");return d;});
@@ -827,7 +818,7 @@ void test54()
}
/***************************************************/
-// bug 1767
+// https://issues.dlang.org/show_bug.cgi?id=1767
class DebugInfo
{
@@ -862,7 +853,7 @@ void test56()
void writecrossing(bool goal)
{
- writeln(goal?"escape":"return");
+ goal ? printf("escape\n") : printf("return\n");
}
void test57()
@@ -1313,15 +1304,15 @@ class C79
void test79()
{
C79 c = new C79();
- writeln(c.__vptr);
- writeln(c.__vptr[0]);
- writeln(cast(void*)c.classinfo);
+// writeln(c.__vptr);
+// writeln(c.__vptr[0]);
+// writeln(cast(void*)c.classinfo);
assert(c.__vptr[0] == cast(void*)c.classinfo);
- writeln(c.__monitor);
+// writeln(c.__monitor);
assert(c.__monitor == null);
synchronized (c)
{
- writeln(c.__monitor);
+// writeln(c.__monitor);
assert(c.__monitor !is null);
}
}
@@ -1396,7 +1387,7 @@ void test83()
void test84()
{
int[0][10] arr;
- printf("%u\n", &arr[9] - &arr[0]);
+ printf("%tu\n", &arr[9] - &arr[0]);
auto i = &arr[9] - &arr[0];
assert(i == 0);
}
@@ -1615,11 +1606,11 @@ void test96()
void test97()
{
const short[] ct = cast(short[]) [cast(byte)1, 1];
- writeln(ct);
+// writeln(ct);
assert(ct.length == 2 && ct[0] == 1 && ct[1] == 1);
short[] rt = cast(short[]) [cast(byte)1, cast(byte)1].dup;
- writeln(rt);
+// writeln(rt);
assert(rt.length == 1 && rt[0] == 257);
}
@@ -1751,7 +1742,7 @@ void test105()
{
Templ!(int).Type x;
auto s = Templ!(int).XXX;
- writeln(s);
+ printf("%.*s\n", cast(int)s.length, s.ptr);
assert(s == "i");
}
@@ -1793,7 +1784,7 @@ void test108()
void test109()
{
- double x[] = new double[1];
+ double[] x = new double[1];
assert(x[0] != 0);
}
@@ -1860,7 +1851,7 @@ struct VariantN
void bar(int value, int i)
{
- int args[2] = [ VariantN(value), VariantN(i) ];
+ int[2] args = [ VariantN(value), VariantN(i) ];
}
}
@@ -2100,7 +2091,7 @@ void test129()
}
/***************************************************/
-// 12725
+// https://issues.dlang.org/show_bug.cgi?id=12725
struct R12725(R : E[], E)
{
@@ -2118,7 +2109,7 @@ void test12725()
}
/***************************************************/
-// 12728
+// https://issues.dlang.org/show_bug.cgi?id=12728
struct Matrix12728(T, uint m, uint n = m, ubyte f = 0)
{
@@ -2226,7 +2217,7 @@ void test135()
void test136()
{
- struct S { int i[3]; }
+ struct S { int[3] i; }
enum S s = S(8);
const int i = s.i[2];
assert(i == 8);
@@ -2286,7 +2277,7 @@ void test140()
class Foo141 {
Foo141 next;
void start()
- in { assert (!next); } body
+ in { assert (!next); } do
{
void* p = cast(void*)this;
}
@@ -2426,7 +2417,7 @@ bool foo150()
}
/***************************************************/
-// 3521
+// https://issues.dlang.org/show_bug.cgi?id=3521
void crash(int x)
{
@@ -2724,7 +2715,7 @@ enum FwdEnum : int
}
/***************************************************/
-// 3740
+// https://issues.dlang.org/show_bug.cgi?id=3740
abstract class Address {
abstract int nameLen();
@@ -2848,12 +2839,6 @@ double[100_000] arr = 0.0;
/***************************************************/
-alias ireal BUG3919;
-alias typeof(BUG3919.init*BUG3919.init) ICE3919;
-alias typeof(BUG3919.init/BUG3919.init) ICE3920;
-
-/***************************************************/
-
struct S179 {
char a, b, c, d;
}
@@ -2935,7 +2920,7 @@ void test181()
}
/***************************************************/
-// 4042
+// https://issues.dlang.org/show_bug.cgi?id=4042
template isQObjectType(T)
{
@@ -3193,7 +3178,7 @@ void test197()
/***************************************************/
-void test198() // Bugzilla 4506
+void test198() // https://issues.dlang.org/show_bug.cgi?id=4506
{
int c = 1;
for (int k = 0; k < 2; k++) {
@@ -3204,7 +3189,7 @@ void test198() // Bugzilla 4506
/***************************************************/
-// Bugzilla 4514
+// https://issues.dlang.org/show_bug.cgi?id=4514
void g199(void delegate(void*, void*) d) { }
struct X199 {
@@ -3216,7 +3201,7 @@ struct X199 {
}
/***************************************************/
-// Bugzilla 4443
+// https://issues.dlang.org/show_bug.cgi?id=4443
struct Struct4443
{
@@ -3241,10 +3226,10 @@ void test200()
/***************************************************/
-// Bugzilla 2931
+// https://issues.dlang.org/show_bug.cgi?id=2931
struct Bug2931 {
- int val[3][4];
+ int[4][3] val;
}
struct Outer2931 {
@@ -3290,10 +3275,9 @@ void test201() {
/***************************************************/
// This was the original varargs example in std.vararg
-import core.vararg;
void foo202(int x, ...) {
- printf("%d arguments\n", _arguments.length);
+ printf("%zd arguments\n", _arguments.length);
for (int i = 0; i < _arguments.length; i++) {
int j = va_arg!(int)(_argptr);
printf("\t%d\n", j);
@@ -3302,7 +3286,7 @@ void foo202(int x, ...) {
}
void fooRef202(ref int x, ...) {
- printf("%d arguments\n", _arguments.length);
+ printf("%zd arguments\n", _arguments.length);
for (int i = 0; i < _arguments.length; i++) {
int j = va_arg!(int)(_argptr);
printf("\t%d\n", j);
@@ -3321,7 +3305,7 @@ void test202()
}
/***************************************************/
-// Bugzilla 1418
+// https://issues.dlang.org/show_bug.cgi?id=1418
class A203
{
@@ -3343,22 +3327,22 @@ void test203()
auto b = a.new B203;
auto c = new C203;
- writeln(a.tupleof); // prints: A
- writeln(b.tupleof); // prints: B main.A
- writeln(c.tupleof); // prints: C 0000
+// writeln(a.tupleof); // prints: A
+// writeln(b.tupleof); // prints: B main.A
+// writeln(c.tupleof); // prints: C 0000
assert(a.tupleof.length == 1 && a.tupleof[0] == 'A');
assert(b.tupleof.length == 1 && b.tupleof[0] == 'B');
assert(c.tupleof.length == 1 && c.tupleof[0] == 'C');
}
/***************************************************/
-// Bugzilla 4516
+// https://issues.dlang.org/show_bug.cgi?id=4516
struct A204 { B204 b; }
enum B204 { Z }
/***************************************************/
-// Bugzilla 4503
+// https://issues.dlang.org/show_bug.cgi?id=4503
class Collection205(T) { }
ICollection c;
@@ -3451,13 +3435,13 @@ template Bug6602B(U) {
enum bug6602Compiles = __traits(compiles, Bug6602A!short);
/***************************************************/
-// Bugzilla 3493
+// https://issues.dlang.org/show_bug.cgi?id=3493
const bar209 = foo209;
const int * foo209 = null;
/***************************************************/
-// 3418
+// https://issues.dlang.org/show_bug.cgi?id=3418
void test210()
{
@@ -3482,7 +3466,7 @@ void test212()
}
/***************************************************/
-// 4768
+// https://issues.dlang.org/show_bug.cgi?id=4768
struct A213 { B213 b; }
enum B213 { Z213 = 2 }
@@ -3515,7 +3499,6 @@ void test215()
{
class C {}
enum assocarrayliteral = Q!( [1:2] ).q.stringof;
- enum complex80 = Q!( 1+1.0i ).q.stringof;
//enum dottype = Q!( C.Object.toString ).q.stringof;
enum halt = 0.stringof; // ICE w/ -release
//enum remove = Q!( [1:2].remove(1) ).q.stringof;
@@ -3523,7 +3506,7 @@ void test215()
}
/***************************************************/
-// 4941
+// https://issues.dlang.org/show_bug.cgi?id=4941
template T216(_...) { alias _ T216; }
size_t mid216(size_t n) { return n/2; }
@@ -3558,7 +3541,7 @@ void test217()
}
/***************************************************/
-// 2954
+// https://issues.dlang.org/show_bug.cgi?id=2954
void test218()
{
@@ -3574,7 +3557,7 @@ void test218()
}
/***************************************************/
-// 2206
+// https://issues.dlang.org/show_bug.cgi?id=2206
template T219(U) {
class C {}
@@ -3593,7 +3576,7 @@ void test219()
/***************************************************/
-// 2206
+// https://issues.dlang.org/show_bug.cgi?id=2206
class D220 {}
@@ -3606,9 +3589,9 @@ void test220()
mixin T220!(int);
// all print 8
- writeln(T220!(int).C.classinfo.initializer.length);
- writeln(C.classinfo.initializer.length);
- writeln(D220.classinfo.initializer.length);
+// writeln(T220!(int).C.classinfo.initializer.length);
+// writeln(C.classinfo.initializer.length);
+// writeln(D220.classinfo.initializer.length);
auto c = new C; // segfault in _d_newclass
}
@@ -3677,7 +3660,7 @@ synchronized shared class C5105
}
/***************************************************/
-// 5145
+// https://issues.dlang.org/show_bug.cgi?id=5145
interface I221{
void bla();
@@ -3692,7 +3675,7 @@ class A221 : B221
{
final override I221 sync()
in { assert( valid ); }
- body
+ do
{
return null;
}
@@ -3702,7 +3685,7 @@ class B221 : J221
{
override I221 sync()
in { assert( valid ); }
- body
+ do
{
return null;
}
@@ -3729,7 +3712,7 @@ template Bug3276_b(alias W) {
alias Bug3276_b!(Bug3276) Bug3276_c;
/***************************************************/
-// 5294
+// https://issues.dlang.org/show_bug.cgi?id=5294
void foo222(int) {}
@@ -3757,7 +3740,7 @@ void test223()
}
/***************************************************/
-// 4379
+// https://issues.dlang.org/show_bug.cgi?id=4379
template BigTuple(U...) {
alias U BigTuple;
@@ -3777,7 +3760,7 @@ void test224()
}
/***************************************************/
-// 3681
+// https://issues.dlang.org/show_bug.cgi?id=3681
public final class A3681 {
private this() {
@@ -3876,7 +3859,7 @@ static assert(mixin(ice4390()) == ``);
static assert(mixin(ice4390()) == ``);
/***************************************************/
-// 190
+// https://issues.dlang.org/show_bug.cgi?id=190
alias int avocado;
void eat(avocado x225 = .x225);
@@ -3887,7 +3870,7 @@ void test225()
}
/***************************************************/
-// 5534
+// https://issues.dlang.org/show_bug.cgi?id=5534
void doStuff(byte start, byte end, uint increment = 1U) {
auto output = new byte[3];
@@ -3903,7 +3886,7 @@ void test226() {
}
/***************************************************/
-// 5536
+// https://issues.dlang.org/show_bug.cgi?id=5536
void test227()
{
@@ -3914,7 +3897,7 @@ void test227()
}
/***************************************************/
-// 4017
+// https://issues.dlang.org/show_bug.cgi?id=4017
struct _A
{
@@ -3926,7 +3909,7 @@ const A_SIZE = (A4017.sizeof);
alias _A A4017;
/***************************************************/
-// 5455
+// https://issues.dlang.org/show_bug.cgi?id=5455
void thrw(Data *s) {
throw new Exception("xxx");
@@ -3959,7 +3942,7 @@ struct Resp {
}
/**************************************/
-// 5571
+// https://issues.dlang.org/show_bug.cgi?id=5571
void test228() {
auto b = new bool;
@@ -3968,7 +3951,7 @@ void test228() {
}
/***************************************************/
-// 5572
+// https://issues.dlang.org/show_bug.cgi?id=5572
void doSynchronized() {
printf("In doSynchronized() 1: %p\n", cast(void*) global229);
@@ -3994,10 +3977,10 @@ void test229() {
/***************************************************/
-static immutable real negtab[14] =
+static immutable real[14] negtab =
[ 1e-4096L,1e-2048L,1e-1024L,1e-512L,1e-256L,1e-128L,1e-64L,1e-32L,
1e-16L,1e-8L,1e-4L,1e-2L,1e-1L,1.0L ];
-static immutable real postab[13] =
+static immutable real[13] postab =
[ 1e+4096L,1e+2048L,1e+1024L,1e+512L,1e+256L,1e+128L,1e+64L,1e+32L,
1e+16L,1e+8L,1e+4L,1e+2L,1e+1L ];
@@ -4095,7 +4078,7 @@ void bug5717()
}
/***************************************************/
-// 3086
+// https://issues.dlang.org/show_bug.cgi?id=3086
class X231 {
void a() {}
@@ -4115,7 +4098,7 @@ void test231() {
}
/***************************************************/
-// 4140
+// https://issues.dlang.org/show_bug.cgi?id=4140
const A232 = [1,2,3];
const B232 = A232[1..A232.length];
@@ -4133,7 +4116,7 @@ void test232()
}
/***************************************************/
-// 1389
+// https://issues.dlang.org/show_bug.cgi?id=1389
void test233()
{
@@ -4142,7 +4125,7 @@ void test233()
}
/***************************************************/
-// 5735
+// https://issues.dlang.org/show_bug.cgi?id=5735
struct A234 {}
@@ -4204,7 +4187,7 @@ void bug6184()
{
bool cmp(ref int[3] a, ref int[3] b)
{
- return a is b;
+ return a[] is b[];
}
static struct Ary
@@ -4224,7 +4207,7 @@ void bug6184()
}
/***************************************************/
-// 6229
+// https://issues.dlang.org/show_bug.cgi?id=6229
int test6229()
{
@@ -4288,13 +4271,13 @@ void test236()
/***************************************************/
-// 4460
+// https://issues.dlang.org/show_bug.cgi?id=4460
void test237()
{
foreach (s, i; [ "a":1, "b":2 ])
{
- writeln(s, i);
+ //writeln(s, i);
}
}
@@ -4327,7 +4310,7 @@ void test238()
}
/***************************************************/
-// 5239
+// https://issues.dlang.org/show_bug.cgi?id=5239
struct S239 { int x; }
@@ -4353,22 +4336,25 @@ void test6506() {
}
/***************************************************/
-// 6505
+// https://issues.dlang.org/show_bug.cgi?id=6505
double foo240() {
return 1.0;
}
void test240() {
- double a = foo240();
- double b = foo240();
- double x = a*a + a*a + a*a + a*a + a*a + a*a + a*a +
+ double a = void;
+ double b = void;
+ double x = void;
+ a = foo240();
+ b = foo240();
+ x = a*a + a*a + a*a + a*a + a*a + a*a + a*a +
a*b + a*b;
assert(x > 0);
}
/***************************************************/
-// 6563
+// https://issues.dlang.org/show_bug.cgi?id=6563
int foo6563(float a, float b, float c, float d, float e, float f, float g, float h)
{
@@ -4480,7 +4466,7 @@ void test6189() {
}
/***************************************************/
-// 6997
+// https://issues.dlang.org/show_bug.cgi?id=6997
long fun6997(long a,long b,long c)
{
@@ -4517,6 +4503,7 @@ void test6997()
auto x = S6997().foo();
}
+
/***************************************************/
ubyte foo7026(uint n) {
@@ -4584,7 +4571,7 @@ struct Point6881
}
/***************************************************/
-// 7212
+// https://issues.dlang.org/show_bug.cgi?id=7212
void foo7212(scope int delegate(int a) dg)
{
}
@@ -4612,7 +4599,7 @@ void test242()
}
/***************************************************/
-// 7290
+// https://issues.dlang.org/show_bug.cgi?id=7290
void foo7290a(alias dg)()
{
@@ -4634,11 +4621,13 @@ void test7290()
int add = 2;
scope dg = (int a) => a + add;
+ // This will break with -preview=dip1000 because a closure will no longer be allocated
assert(GC.addrOf(dg.ptr) == null);
foo7290a!dg();
foo7290b(dg);
- foo7290c(dg);
+ foo7290c(dg); // this will fail with -preview=dip1000 and @safe because a scope delegate gets
+ // assigned to @system delegate, but no closure was allocated
}
/***************************************************/
@@ -4651,7 +4640,7 @@ void test7367()
}
/***************************************************/
-// 7375
+// https://issues.dlang.org/show_bug.cgi?id=7375
class A7375 {}
class B7375(int i) : A7375 {}
@@ -4833,7 +4822,7 @@ void test243() {
}
/***************************************************/
-// 7742
+// https://issues.dlang.org/show_bug.cgi?id=7742
struct Foo7742 {
static immutable f = Foo7742(1, 2);
@@ -4855,7 +4844,7 @@ void test7742()
}
/***************************************************/
-// 7807
+// https://issues.dlang.org/show_bug.cgi?id=7807
interface Interface7807
{
@@ -4890,7 +4879,7 @@ void test7807()
}
/***************************************************/
-// 7815
+// https://issues.dlang.org/show_bug.cgi?id=7815
enum Closure {
Matrix
@@ -4985,7 +4974,7 @@ struct Foo7974
}
/***************************************************/
-// 4155
+// https://issues.dlang.org/show_bug.cgi?id=4155
float getnanf() { return float.nan; }
@@ -5000,7 +4989,7 @@ void test4155()
}
/***************************************************/
-// 7911
+// https://issues.dlang.org/show_bug.cgi?id=7911
struct Klass7911
{
@@ -5020,7 +5009,7 @@ void test7911()
}
/***************************************************/
-// 8429
+// https://issues.dlang.org/show_bug.cgi?id=8429
static if(true)
version = Foo8429;
@@ -5028,7 +5017,7 @@ static if(true)
version(Foo8429) {}
/***************************************************/
-// 8069
+// https://issues.dlang.org/show_bug.cgi?id=8069
interface I8069
{
@@ -5044,7 +5033,7 @@ struct A8069
}
/***************************************************/
-// 8095
+// https://issues.dlang.org/show_bug.cgi?id=8095
void bug8095(int p0, int *p1, int z, int edx, int *p4, int p5)
{
@@ -5068,7 +5057,7 @@ void test8095() {
}
/***************************************************/
-// 8091
+// https://issues.dlang.org/show_bug.cgi?id=8091
int solve1(int n) {
int a;
@@ -5114,7 +5103,7 @@ void test6189_2()
}
/***************************************************/
-// 8199
+// https://issues.dlang.org/show_bug.cgi?id=8199
version (D_InlineAsm_X86_64)
{
@@ -5126,6 +5115,8 @@ else version (D_InlineAsm_X86)
version = Check;
version (OSX)
enum Align = 0xC;
+// version (linux)
+// enum Align = 0xC;
}
void onFailure()
@@ -5167,6 +5158,21 @@ void test8199()
}
/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=13285
+void test13285()
+{
+ static struct S
+ {
+ ~this()
+ {
+ checkAlign();
+ }
+ }
+ S s; // correct alignment of RSP when calling ~this()
+ S(); // incorrect alignment
+}
+
+/***************************************************/
void test246()
{
@@ -5178,15 +5184,7 @@ void test246()
}
/***************************************************/
-
-double sqrt8454(double d) { return d/2; }
-void foo8454(cdouble m) {}
-void test8454() {
- foo8454(0 - sqrt8454(1.0) * 1i);
-}
-
-/***************************************************/
-// 8423
+// https://issues.dlang.org/show_bug.cgi?id=8423
struct S8423
{
@@ -5217,8 +5215,7 @@ public:
ubyte size = value < (0x7fU << 0 ) ? 1 :
value < (0x7fU << 14) ? 2 :
3;
- import std.stdio;
- writeln(size);
+ printf("%u\n", size);
assert(size == 2);
}
}
@@ -5336,7 +5333,7 @@ void test247()
}
/***************************************************/
-// 8340
+// https://issues.dlang.org/show_bug.cgi?id=8340
void test8340(){
byte[] ba = [1,2,3,4,5];
@@ -5356,7 +5353,7 @@ void test8340(){
}
/***************************************************/
-// 8376
+// https://issues.dlang.org/show_bug.cgi?id=8376
void test8376() {
int i = 0;
@@ -5392,7 +5389,7 @@ void test8987(){
}
/***************************************************/
-// 8796
+// https://issues.dlang.org/show_bug.cgi?id=8796
int* wrong8796(int* p)
{
@@ -5409,7 +5406,7 @@ void test8796()
}
/***************************************************/
-// 9171
+// https://issues.dlang.org/show_bug.cgi?id=9171
ulong bitcomb9171(ulong v)
{
@@ -5447,7 +5444,7 @@ void test9171()
}
/***************************************************/
-// 9248
+// https://issues.dlang.org/show_bug.cgi?id=9248
void test9248()
{
@@ -5458,7 +5455,7 @@ void test9248()
}
/***************************************************/
-// 14682
+// https://issues.dlang.org/show_bug.cgi?id=14682
void test14682a()
{
@@ -5562,8 +5559,9 @@ void test14682b()
{ auto x = [[[[]]]] ~ a3; static assert(is(typeof(x) == typeof(a3)[])); assert(x == r4b); } // fix
}
+
/***************************************************/
-// 9739
+// https://issues.dlang.org/show_bug.cgi?id=9739
class Foo9739
{
@@ -5580,7 +5578,7 @@ void test9739()
}
/***************************************************/
-// 6057
+// https://issues.dlang.org/show_bug.cgi?id=6057
void test6057()
{
enum Foo { A=1, B=2 }
@@ -5665,7 +5663,7 @@ void testreal_to_ulong()
static assert(false, "Test not implemented for this architecture");
auto v = r2ulong(adjust * 1.1);
- writefln("%s %s %s", adjust, v, u + u/10);
+ //writefln("%s %s %s", adjust, v, u + u/10);
//assert(v == 10145709240540253389UL);
}
@@ -5808,7 +5806,7 @@ void test251()
}
/***************************************************/
-// 9387
+// https://issues.dlang.org/show_bug.cgi?id=9387
void bug9387a(double x) { }
@@ -5866,10 +5864,15 @@ void test4414() {
assert(x == 7);
}
{
- auto x = bytes4414()[0..4];
+ auto u = bytes4414();
+ auto x = u[0..4];
if (x[0] != 7 || x[1] != 8 || x[2] != 9 || x[3] != 10)
assert(0);
}
+ assert(bytes4414()[0] == 7);
+ assert(bytes4414()[1] == 8);
+ assert(bytes4414()[2] == 9);
+ assert(bytes4414()[3] == 10);
}
/***************************************************/
@@ -5882,7 +5885,7 @@ void test9844() {
}
/***************************************************/
-// 10628
+// https://issues.dlang.org/show_bug.cgi?id=10628
abstract class B10628
{
@@ -5905,7 +5908,7 @@ void test10628()
}
/***************************************************/
-// 11265
+// https://issues.dlang.org/show_bug.cgi?id=11265
struct S11265
{
@@ -5956,8 +5959,6 @@ void test10633()
/***************************************************/
-import std.stdio;
-
void _assertEq (ubyte lhs, short rhs, string msg, string file, size_t line)
{
immutable result = lhs == rhs;
@@ -5966,9 +5967,9 @@ void _assertEq (ubyte lhs, short rhs, string msg, string file, size_t line)
{
string op = "==";
if(msg.length > 0)
- writefln(`_assertEq failed: [%s] is not [%s].`, lhs, rhs);
+ printf("_assertEq failed: [%u] is not [%d].\n", lhs, rhs);
else
- writefln(`_assertEq failed: [%s] is not [%s]: %s`, lhs, rhs, msg);
+ printf("_assertEq failed: [%u] is not [%d]: %.*s\n", lhs, rhs, cast(int)msg.length, msg.ptr);
}
assert(result);
@@ -5998,7 +5999,7 @@ void test10642()
}
/***************************************************/
-// 11581
+// https://issues.dlang.org/show_bug.cgi?id=11581
alias TT11581(T...) = T;
@@ -6036,7 +6037,7 @@ void test11581()
}
/***************************************************/
-// 7436
+// https://issues.dlang.org/show_bug.cgi?id=7436
void test7436()
{
@@ -6047,7 +6048,7 @@ void test7436()
}
/***************************************************/
-// 12138
+// https://issues.dlang.org/show_bug.cgi?id=12138
struct S12138
{
@@ -6064,7 +6065,7 @@ label:
}
/***************************************************/
-// 14430
+// https://issues.dlang.org/show_bug.cgi?id=14430
void setCookie(long x = 1L << 32L, string y = null){
assert(y.ptr is null);
@@ -6075,7 +6076,7 @@ void test14430(){
}
/***************************************************/
-// 14510
+// https://issues.dlang.org/show_bug.cgi?id=14510
alias Vector14510 = ulong[3];
@@ -6118,7 +6119,7 @@ double entropy2(double[] probs)
__gshared int x;
++x;
if (!p) continue;
- import std.math : log2;
+ import core.stdc.math : log2;
result -= p * log2(p);
}
return result;
@@ -6126,7 +6127,6 @@ double entropy2(double[] probs)
void test16530()
{
- import std.stdio;
if (entropy2([1.0, 0, 0]) != 0.0)
assert(0);
}
@@ -6144,9 +6144,42 @@ void test252()
}
/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7997
+
+void test7997()
+{
+ __gshared int[0] foos;
+ foreach (f; foos) {}
+}
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=5332
+
+int[0] arr5332;
+
+void test5332()
+{
+ auto a = arr5332;
+}
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=11742
+
+const int x11472 = void;
+
+static this() { x11472 = 10; }
+
+void test11472()
+{
+ assert(x11472 == 10);
+}
+
+
+/***************************************************/
int main()
{
+ checkAlign();
test1();
test2();
test3();
@@ -6188,7 +6221,6 @@ int main()
test41();
test42();
test43();
- test44();
test45();
test46();
test47();
@@ -6404,7 +6436,6 @@ int main()
test6189_2();
test8199();
test246();
- test8454();
test8423();
test8496();
test8840();
@@ -6443,8 +6474,11 @@ int main()
test16027();
test16530();
test252();
+ test7997();
+ test5332();
+ test11472();
+ test13285();
- writefln("Success");
+ printf("Success\n");
return 0;
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/test42a.d b/gcc/testsuite/gdc.test/runnable/test42a.d
index 0bb98ef..10c09b3 100644
--- a/gcc/testsuite/gdc.test/runnable/test42a.d
+++ b/gcc/testsuite/gdc.test/runnable/test42a.d
@@ -1,4 +1,10 @@
-// PERMUTE_ARGS:
+/*
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+Success
+---
+*/
module test42;
@@ -312,4 +318,3 @@ int main()
printf("Success\n");
return 0;
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/test435.d b/gcc/testsuite/gdc.test/runnable/test435.d
index 4dcabd1..700e9fd 100644
--- a/gcc/testsuite/gdc.test/runnable/test435.d
+++ b/gcc/testsuite/gdc.test/runnable/test435.d
@@ -1,3 +1,9 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
import core.stdc.stdio;
class A
@@ -65,7 +71,7 @@ void test1()
//------------------------------------------------------------------------------
-// bug 435.
+// https://issues.dlang.org/show_bug.cgi?id=435.
class B
{
int i;
@@ -90,7 +96,7 @@ void test2()
//------------------------------------------------------------------------------
-// bug 4905
+// https://issues.dlang.org/show_bug.cgi?id=4905
class C2
{
string x;
@@ -114,7 +120,7 @@ void test3()
//------------------------------------------------------------------------------
-// bug 4531 test case 2
+// https://issues.dlang.org/show_bug.cgi?id=4531 test case 2
class MyError : Exception
{
this(T...)(T msg)
@@ -139,5 +145,3 @@ void main()
test4();
printf("Success\n");
}
-
-
diff --git a/gcc/testsuite/gdc.test/runnable/test45.d b/gcc/testsuite/gdc.test/runnable/test45.d
index 49fa548..d36b378 100644
--- a/gcc/testsuite/gdc.test/runnable/test45.d
+++ b/gcc/testsuite/gdc.test/runnable/test45.d
@@ -1,5 +1,17 @@
-// EXTRA_SOURCES: imports/test45a.d imports/test45b.d
-// PERMUTE_ARGS:
+/*
+EXTRA_SOURCES: imports/test45a.d imports/test45b.d
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+foo()
+foo(int)
+foo()
+foo()
+foo(int)
+bar(t)
+bar(t,i)
+---
+*/
import imports.test45a;
import imports.test45b;
diff --git a/gcc/testsuite/gdc.test/runnable/test48.d b/gcc/testsuite/gdc.test/runnable/test48.d
index 827d681..36160e5 100644
--- a/gcc/testsuite/gdc.test/runnable/test48.d
+++ b/gcc/testsuite/gdc.test/runnable/test48.d
@@ -1,7 +1,7 @@
// EXTRA_SOURCES: imports/test48a.d
// PERMUTE_ARGS:
-import std.stdio;
+import core.stdc.stdio;
import imports.test48a;
void main()
@@ -16,28 +16,28 @@ void main()
printf("i = %d\n", i);
assert(i == 6);
- printf("a = %d %d %d\n", S.tupleof.offsetof);
+ printf("a = %zd %zd %zd\n", S.tupleof.offsetof);
auto o = S.tupleof.offsetof;
assert(o[0] == 0);
assert(o[1] == 4);
assert(o[2] == 8);
- printf("a = %d %d %d\n", S.tupleof[0].offsetof, S.tupleof[1].offsetof, S.tupleof[2].offsetof);
+ printf("a = %zd %zd %zd\n", S.tupleof[0].offsetof, S.tupleof[1].offsetof, S.tupleof[2].offsetof);
assert(S.tupleof[0].offsetof == 0);
assert(S.tupleof[1].offsetof == 4);
assert(S.tupleof[2].offsetof == 8);
auto offset0 = cast(void*)&s.tupleof[0] - cast(void*)&s;
- printf("offset0 = %d\n", offset0);
+ printf("offset0 = %td\n", offset0);
assert(offset0 == 0);
auto offset1 = cast(void*)&s.tupleof[1] - cast(void*)&s;
- printf("offset1 = %d\n", offset1);
+ printf("offset1 = %td\n", offset1);
assert(offset1 == 4);
auto offset2 = cast(void*)&s.tupleof[2] - cast(void*)&s;
- printf("offset2 = %d\n", offset2);
+ printf("offset2 = %td\n", offset2);
assert(offset2 == 8);
- int t1[S.tupleof.offsetof[1]];
+ int[S.tupleof.offsetof[1]] t1;
assert(t1.length == 4);
}
diff --git a/gcc/testsuite/gdc.test/runnable/test49.d b/gcc/testsuite/gdc.test/runnable/test49.d
index fc80d61..641d196 100644
--- a/gcc/testsuite/gdc.test/runnable/test49.d
+++ b/gcc/testsuite/gdc.test/runnable/test49.d
@@ -1,6 +1,13 @@
-// COMPILE_SEPARATELY
-// EXTRA_SOURCES: imports/test49a.d
-// PERMUTE_ARGS:
+/*
+COMPILE_SEPARATELY
+EXTRA_SOURCES: imports/test49a.d
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+static this()
+static ~this()
+---
+*/
import imports.test49a;
@@ -9,4 +16,3 @@ alias Foo!(int) foo;
void main()
{
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/test5.d b/gcc/testsuite/gdc.test/runnable/test5.d
index 7d9769d..a14b4b1 100644
--- a/gcc/testsuite/gdc.test/runnable/test5.d
+++ b/gcc/testsuite/gdc.test/runnable/test5.d
@@ -40,7 +40,7 @@ class bar : foo
int def(foo f)
{
- printf("def(%p), %p\n", f, (cast(int*)f)[0]);
+ printf("def(%p), %d\n", f, (cast(int*)f)[0]);
assert(f.testc(3) == 50);
assert(f.testd(7) == 54);
assert(f.testd(10) == 57);
@@ -49,7 +49,7 @@ int def(foo f)
void abc(bar b)
{
- printf("abc(%p), %p\n", b, (cast(int*)b)[3]);
+ printf("abc(%p), %d\n", b, (cast(int*)b)[3]);
def(b);
}
@@ -57,8 +57,8 @@ int main()
{
bar b = new bar();
- printf("b.size = x%x\n", b.classinfo.initializer.length);
- printf("bar.size = x%x\n", bar.classinfo.initializer.length);
+ printf("b.size = x%zx\n", b.classinfo.initializer.length);
+ printf("bar.size = x%zx\n", bar.classinfo.initializer.length);
assert(b.classinfo.initializer.length == bar.classinfo.initializer.length);
abc(b);
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/test52.d b/gcc/testsuite/gdc.test/runnable/test52.d
index 2a906d0..85b8d67 100644
--- a/gcc/testsuite/gdc.test/runnable/test52.d
+++ b/gcc/testsuite/gdc.test/runnable/test52.d
@@ -1,29 +1,36 @@
-// PERMUTE_ARGS:
+/*
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+count = 3
+---
+*/
-// 2311
+// https://issues.dlang.org/show_bug.cgi?id=2311
-extern(C)
+extern(C) int printf(const char*, ...);
+
+__gshared ulong count;
+
+shared static ~this()
{
- void exit(int);
- int printf(const char*, ...);
+ printf("count = %llu\n", count);
+ assert(count == 3);
}
-struct X()
+template X(uint idx)
{
- static this()
- {
- printf("this()\n");
- }
- static ~this()
- {
- printf("~this()\n");
- exit(0);
- }
+ static ~this()
+ {
+ assert(count == idx);
+ ++count;
+ }
}
-static ~this()
+void main()
{
- printf("g: ~this()\n");
+ // Instantiate module destructors in reverse order
+ alias x = X!(2);
+ alias y = X!(1);
+ alias z = X!(0);
}
-
-int main() { alias X!() x; return 1; }
diff --git a/gcc/testsuite/gdc.test/runnable/test5305.d b/gcc/testsuite/gdc.test/runnable/test5305.d
deleted file mode 100644
index ff52936..0000000
--- a/gcc/testsuite/gdc.test/runnable/test5305.d
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUNNABLE_PHOBOS_TEST
-// https://issues.dlang.org/show_bug.cgi?id=5305
-
-import std.math;
-void map(real function(real) f) { }
-int main() { map(&sqrt); return 0; }
-
-
diff --git a/gcc/testsuite/gdc.test/runnable/test60.d b/gcc/testsuite/gdc.test/runnable/test60.d
deleted file mode 100644
index cfd92b2..0000000
--- a/gcc/testsuite/gdc.test/runnable/test60.d
+++ /dev/null
@@ -1,23 +0,0 @@
-// RUNNABLE_PHOBOS_TEST
-import std.stdio;
-import std.algorithm;
-
-void test1()
-{
- int[] a = [1,2,3,4,5];
- writeln( remove!("a < 3")(a) );
-}
-
-void test2()
-{
- auto arr = [1,2,3,4,5];
- auto m = map!"a + 1"(filter!"a < 4"(arr));
-}
-
-void main()
-{
- test1();
- test2();
-
- writeln("Success");
-}
diff --git a/gcc/testsuite/gdc.test/runnable/test61.d b/gcc/testsuite/gdc.test/runnable/test61.d
index 6e09769..016e9a0 100644
--- a/gcc/testsuite/gdc.test/runnable/test61.d
+++ b/gcc/testsuite/gdc.test/runnable/test61.d
@@ -1,7 +1,7 @@
// PERMUTE_ARGS:
// EXTRA_SOURCES: imports/test61a.d
-// Bugzilla 6556
+// https://issues.dlang.org/show_bug.cgi?id=6556
debug=BUG;
diff --git a/gcc/testsuite/gdc.test/runnable/test6795.d b/gcc/testsuite/gdc.test/runnable/test6795.d
new file mode 100644
index 0000000..7e44fd4
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test6795.d
@@ -0,0 +1,26 @@
+// https://issues.dlang.org/show_bug.cgi?id=6795
+void check6795()
+{
+ enum int[] array = [0];
+ // PostExp
+ assert(array[0]++ == 0);
+ assert(array[0]-- == 0);
+ // PreExp
+ assert(++array[0] == 1);
+ assert(--array[0] == -1);
+ // BinAssignExp
+ assert((array[0] += 3) == 3);
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=21312
+void check21312()
+{
+ auto p = &[123][0];
+ assert(*p == 123);
+}
+
+void main()
+{
+ check6795();
+ check21312();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test711.d b/gcc/testsuite/gdc.test/runnable/test711.d
new file mode 100644
index 0000000..b9fae4e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test711.d
@@ -0,0 +1,51 @@
+// https://issues.dlang.org/show_bug.cgi?id=711
+string result;
+
+template Mixer()
+{
+ override void test()
+ {
+ result ~= "A";
+ }
+}
+
+class Foo
+{
+ void test()
+ {
+ result ~= "B";
+ }
+}
+
+class Bar : Foo
+{
+ mixin Mixer!() mixer;
+ override void test()
+ {
+ result ~= "C";
+ mixer.test();
+ }
+}
+
+class Bar2 : Foo
+{
+ override void test()
+ {
+ result ~= "C";
+ mixer.test();
+ }
+ mixin Mixer!() mixer;
+}
+
+void main()
+{
+ Bar f = new Bar();
+ f.test();
+ assert(result == "CA");
+
+ result = "";
+
+ Bar2 f2 = new Bar2();
+ f2.test();
+ assert(result == "CA");
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test7452.d b/gcc/testsuite/gdc.test/runnable/test7452.d
index cc04529..de591f3 100644
--- a/gcc/testsuite/gdc.test/runnable/test7452.d
+++ b/gcc/testsuite/gdc.test/runnable/test7452.d
@@ -1,3 +1,9 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
import core.stdc.stdio : printf;
//------------------------------------------------------------------------------
@@ -71,5 +77,3 @@ int main()
printf("Success\n");
return 0;
}
-
-
diff --git a/gcc/testsuite/gdc.test/runnable/test7511.d b/gcc/testsuite/gdc.test/runnable/test7511.d
index 0d19f54..bb87995 100644
--- a/gcc/testsuite/gdc.test/runnable/test7511.d
+++ b/gcc/testsuite/gdc.test/runnable/test7511.d
@@ -1,7 +1,13 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
extern(C) int printf(const char*, ...);
/**********************************/
-// 7511
+// https://issues.dlang.org/show_bug.cgi?id=7511
struct S7511(T)
{
@@ -186,7 +192,7 @@ void test7511d()
}
/**********************************/
-// 9952
+// https://issues.dlang.org/show_bug.cgi?id=9952
@system void writeln9952(int) {} // impure throwable
@@ -214,7 +220,7 @@ void test9952()
}
/**********************************/
-// 10373
+// https://issues.dlang.org/show_bug.cgi?id=10373
template isMutable10373(T)
{
@@ -294,7 +300,7 @@ void test10373()
}
/**********************************/
-// 10329
+// https://issues.dlang.org/show_bug.cgi?id=10329
auto foo10329(T)(T arg)
{
@@ -326,7 +332,7 @@ void test10329() pure nothrow @safe
}
/**********************************/
-// 11896
+// https://issues.dlang.org/show_bug.cgi?id=11896
class Foo11896a(T = int)
{
@@ -393,7 +399,7 @@ void test11896c()
}
/**********************************/
-// 12392
+// https://issues.dlang.org/show_bug.cgi?id=12392
void f12392(T)() {}
alias fa12392 = f12392;
diff --git a/gcc/testsuite/gdc.test/runnable/test7932.d b/gcc/testsuite/gdc.test/runnable/test7932.d
index 245cf17..22aa279 100644
--- a/gcc/testsuite/gdc.test/runnable/test7932.d
+++ b/gcc/testsuite/gdc.test/runnable/test7932.d
@@ -1,6 +1,6 @@
-// 7932
+// https://issues.dlang.org/show_bug.cgi?id=7932
-import std.stdio;
+import core.stdc.stdio;
size_t N;
@@ -13,7 +13,7 @@ class C
cast(void*) this, &n, n);
assert (N == n);
}
- body
+ do
{
int dummy;
//printf("\n");
diff --git a/gcc/testsuite/gdc.test/runnable/test8.d b/gcc/testsuite/gdc.test/runnable/test8.d
index 4927bbc..7d66eb6 100644
--- a/gcc/testsuite/gdc.test/runnable/test8.d
+++ b/gcc/testsuite/gdc.test/runnable/test8.d
@@ -1,3 +1,9 @@
+/*
+TEST_OUTPUT:
+---
+runnable/test8.d(261): Deprecation: identity comparison of static arrays implicitly coerces them to slices, which are compared by reference
+---
+*/
module testxxx8;
@@ -167,28 +173,6 @@ void test8()
/***********************************/
-void test9()
-{
- ireal imag = 2.5i;
- //printf ("test of imag*imag = %Lf\n",imag*imag);
- real f = imag * imag;
- assert(f == -6.25);
-}
-
-/***********************************/
-
-void test10()
-{
- creal z = 1 + 2.5i;
- real e = z.im;
-
- printf ("e = %Lf\n", e);
- assert(e == 2.5);
-}
-
-
-/***********************************/
-
class Foo11
{
public:
@@ -316,11 +300,11 @@ void test17()
string s;
s = passString();
- printf("passString() = %.*s\n", s.length, s.ptr);
+ printf("passString() = %.*s\n", cast(int)s.length, s.ptr);
assert(s == "First stringConcatenated with second");
s = butThisWorks();
- printf("butThisWorks() = %.*s\n", s.length, s.ptr);
+ printf("butThisWorks() = %.*s\n", cast(int)s.length, s.ptr);
assert(s == "Third stringConcatenated with fourth");
}
@@ -453,7 +437,7 @@ in
out (result)
{
}
-body
+do
{ int i = 5;
while (i)
@@ -607,21 +591,6 @@ void test34()
assert(b[i][j] == 16);
}
-
-/***********************************/
-
-void test35()
-{
- ifloat b = cast(ifloat)1i;
- assert(b == 1.0i);
-
- ifloat c = 2fi;
- assert(c == 2.0i);
-
- c = 0fi;
- assert(c == 0i);
-}
-
/***********************************/
string itoa(int i)
@@ -646,7 +615,7 @@ void test36()
{
string s = testa36(26, 47, "a", "b", "c");
- printf("s = '%.*s'\n", s.length, s.ptr);
+ printf("s = '%.*s'\n", cast(int)s.length, s.ptr);
assert(s == "string 0;26string 1;47string 2;26string 3;");
}
@@ -668,7 +637,7 @@ void test37()
void test38()
{
int n = atoi("1");
- static char flags[8192 + 1];
+ static char[8192 + 1] flags;
long i, k;
int count = 0;
@@ -698,7 +667,7 @@ void test38()
}
catch(Throwable)
{
- printf("Exception: %d\n", k);
+ printf("Exception: %lld\n", k);
assert(0);
}
}
@@ -776,21 +745,6 @@ void test42()
/***********************************/
-void test43()
-{
- creal C,Cj;
- real y1,x1;
-
- C = x1 + y1*1i + Cj;
- C = 1i*y1 + x1 + Cj;
- C = Cj + 1i*y1 + x1;
- C = y1*1i + Cj + x1;
- C = 1i*y1 + Cj;
- C = Cj + 1i*y1;
-}
-
-/***********************************/
-
int x44;
class A44 {
@@ -883,46 +837,6 @@ void test50()
/***********************************/
-/+
-void foo51(creal a)
-{
- writeln(a);
- assert(a == -8i);
-}
-
-void test51()
-{
- cdouble a = (2-2i)*(2-2i);
-
- // This fails
- writeln(a);
- assert(a == -8i);
-
- // This works
- writeln((2-2i)*(2-2i));
-
- // This fails
- foo51((2-2i)*(2-2i));
-}
-+/
-
-void foo51(creal a)
-{
- assert(a == -8i);
-}
-
-void test51()
-{
- assert((2-2i)*(2-2i) == -8i);
-
- cdouble a = (2-2i)*(2-2i);
- assert(a == -8i);
-
- foo51((2-2i)*(2-2i));
-}
-
-/***********************************/
-
int main()
{
test1();
@@ -933,8 +847,6 @@ int main()
test6();
test7();
test8();
- test9();
- test10();
test11();
test12();
test13();
@@ -956,21 +868,18 @@ int main()
test32();
test33();
test34();
- test35();
test36();
test37();
test38();
test39();
test40();
test42();
- test43();
test44();
test45();
test46();
test48();
test49();
test50();
- test51();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/test809.d b/gcc/testsuite/gdc.test/runnable/test809.d
new file mode 100644
index 0000000..efe4a37
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test809.d
@@ -0,0 +1,13 @@
+// https://issues.dlang.org/show_bug.cgi?id=809
+void test(lazy int dg)
+{
+ int delegate() dg_ = &dg;
+ assert(dg_() == 7);
+ assert(dg == dg_());
+}
+
+void main()
+{
+ int a = 7;
+ test(a);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test8544.d b/gcc/testsuite/gdc.test/runnable/test8544.d
index 7c47e86..0b8b86b 100644
--- a/gcc/testsuite/gdc.test/runnable/test8544.d
+++ b/gcc/testsuite/gdc.test/runnable/test8544.d
@@ -1,6 +1,6 @@
// EXECUTE_ARGS: foo bar doo
// PERMUTE_ARGS:
-import std.stdio;
+import core.stdc.stdio;
import std.conv;
import core.runtime;
diff --git a/gcc/testsuite/gdc.test/runnable/test9259.d b/gcc/testsuite/gdc.test/runnable/test9259.d
index f870f63..abad02b 100644
--- a/gcc/testsuite/gdc.test/runnable/test9259.d
+++ b/gcc/testsuite/gdc.test/runnable/test9259.d
@@ -1,4 +1,5 @@
-// PERMUTE_ARGS: -inline -release -g -O -d -dw -de
+// REQUIRED_ARGS: -de
+// PERMUTE_ARGS: -inline -release -g -O
void test(int*[] arr...)
{
diff --git a/gcc/testsuite/gdc.test/runnable/test9271.d b/gcc/testsuite/gdc.test/runnable/test9271.d
index 3ce7fc8..b10b575 100644
--- a/gcc/testsuite/gdc.test/runnable/test9271.d
+++ b/gcc/testsuite/gdc.test/runnable/test9271.d
@@ -1,5 +1,5 @@
// PERMUTE_ARGS:
-
+// EXTRA_FILES: imports/test9271a.d
import algorithm = imports.test9271a;
bool any(alias predicate, Range)(Range range)
diff --git a/gcc/testsuite/gdc.test/runnable/testCopyCtor.d b/gcc/testsuite/gdc.test/runnable/testCopyCtor.d
new file mode 100644
index 0000000..9d86bdc
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/testCopyCtor.d
@@ -0,0 +1,159 @@
+string result;
+
+struct A
+{
+ this(ref A rhs)
+ {
+ result ~= "A";
+ }
+ this(ref immutable A rhs)
+ {
+ result ~= "B";
+ }
+ this(ref const A rhs)
+ {
+ result ~= "C";
+ }
+ this(ref A rhs) immutable
+ {
+ result ~= "D";
+ }
+ this(ref const A rhs) shared
+ {
+ result ~= "E";
+ }
+ this(ref A rhs) shared
+ {
+ result ~= "F";
+ }
+ this(ref shared A rhs) immutable
+ {
+ result ~= "G";
+ }
+ this(ref shared A rhs) shared
+ {
+ result ~= "H";
+ }
+}
+
+// copy constructor correctly uses function declaration overload resolution
+void test1()
+{
+ result = "";
+ A a;
+ A a1 = a;
+ immutable A a2 = a;
+ const A a3 = a2;
+ shared A a4 = a3;
+ A a5 = a3;
+ assert(result == "ADBEC");
+}
+
+// copy constructor has priority over alias this
+struct B
+{
+ B fun(immutable B)
+ {
+ return B();
+ }
+
+ this(ref immutable B rhs)
+ {
+ result ~= "A";
+ }
+ alias fun this;
+}
+
+void test2()
+{
+ result = "";
+ immutable B a;
+ B a1 = a;
+ assert(result == "A");
+}
+
+// arguments and return values correctly call the copy constructor
+shared(A) fun(A x)
+{
+ return x;
+}
+
+immutable(A) fun2(shared A x)
+{
+ return x;
+}
+
+void test3()
+{
+ result = "";
+ A a1;
+ shared A a2 = fun(a1);
+ immutable A a3 = fun2(a2);
+ assert(result == "AFHG");
+}
+
+// nested structs
+int fun()
+{
+ int x = 1;
+ struct A
+ {
+ struct B
+ {
+ int x2 = 2;
+ }
+
+ B b;
+ int x1;
+
+ this(int x)
+ {
+ this.x1 = x;
+ b = B(3);
+ }
+ this(ref A rhs)
+ {
+ this.x1 = rhs.x1 + rhs.b.x2 + x;
+ }
+ }
+
+ A a = A(2);
+ A b = a;
+ return b.x1;
+}
+
+void test4()
+{
+ assert(fun() == 6);
+}
+
+// generated copy constructor
+struct X
+{
+ this(ref inout(X) rhs) inout
+ {
+ result ~= "A";
+ }
+}
+
+struct Y
+{
+ X a;
+}
+
+void test5()
+{
+ result = "";
+ Y b1;
+ Y b2 = b1;
+ assert(result == "A");
+}
+
+void main()
+{
+ test1();
+ test2();
+ test3();
+ test4();
+ test5();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/testOpApply.d b/gcc/testsuite/gdc.test/runnable/testOpApply.d
new file mode 100644
index 0000000..285365e
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/testOpApply.d
@@ -0,0 +1,171 @@
+/* PERMUTE_ARGS: -preview=dip1000
+ */
+
+// https://issues.dlang.org/show_bug.cgi?id=15624
+
+struct Foo {
+ int x;
+ int opApply(int delegate(int, string, string) @safe dg) @safe {
+ x = 1;
+ return 0;
+ }
+ int opApply(int delegate(int, string, string) @system dg) @system {
+ x = 2;
+ return 0;
+ }
+}
+
+void testSafe() @safe {
+ Foo foo;
+ foreach (i, k, v; foo) {
+ }
+ assert(foo.x == 1);
+}
+
+void testSystem() @system {
+ Foo foo;
+ foreach (i, k, v; foo) {
+ }
+ assert(foo.x == 2);
+}
+
+void test() @system
+{
+ Foo f;
+
+ int dgsafe (int x, string s, string t) @safe { return 1; }
+ int dgsystem(int x, string s, string t) @system { return 1; }
+
+ f.opApply(&dgsafe);
+ assert(f.x == 1);
+ f.opApply(&dgsystem);
+ assert(f.x == 2);
+}
+
+int main()
+{
+ testSafe();
+ testSystem();
+ test();
+ testDifferentTypes();
+ testSameAttributes();
+ testInverseAttributes();
+ return 0;
+}
+
+void testDifferentTypes()
+{
+ static struct DifferentTypes
+ {
+ int x;
+ int opApply(int delegate(int) dg) @safe {
+ x = 1;
+ return 0;
+ }
+ int opApply(int delegate(long) dg) @safe {
+ x = 2;
+ return 0;
+ }
+ }
+
+ DifferentTypes dt;
+ foreach (int i; dt) {}
+ assert(dt.x == 1);
+
+ foreach (long i; dt) {}
+ assert(dt.x == 2);
+}
+
+void testSameAttributes()
+{
+ static struct SameAttributes
+ {
+ int x;
+ int opApply(int delegate(int) @system dg) @safe {
+ x = 1;
+ return 0;
+ }
+ int opApply(int delegate(int) @safe dg) @safe {
+ x = 2;
+ return 0;
+ }
+ }
+
+ static void safe() @safe
+ {
+ SameAttributes sa;
+ foreach (i; sa) {}
+ assert(sa.x == 2);
+ }
+ safe();
+
+ static void system() @system
+ {
+ SameAttributes sa;
+ foreach (i; sa) {}
+ assert(sa.x == 1);
+ }
+ system();
+}
+
+// Not useful but enabled by the associated patch
+void testInverseAttributes()
+{
+ static struct InverseAttributes
+ {
+ int x;
+ int opApply(int delegate(int) @system dg) @safe {
+ x = 1;
+ return 0;
+ }
+ int opApply(int delegate(int) @safe dg) @system {
+ x = 2;
+ return 0;
+ }
+ }
+
+ static void system() @system
+ {
+ InverseAttributes sa;
+ foreach (i; sa) {}
+ assert(sa.x == 1);
+ }
+ system();
+
+ static void safe() @safe
+ {
+ InverseAttributes sa;
+ (() @trusted { foreach (i; sa) {} })();
+ assert(sa.x == 2);
+ }
+ safe();
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20907
+Lockstep!() lockstep()
+{
+ return Lockstep!()();
+}
+
+struct Lockstep()
+{
+ int opApply(int delegate(int) callback) @system
+ {
+ return 0;
+ }
+
+ int opApply(int delegate(int) pure nothrow @nogc @safe callback) pure nothrow @nogc @safe
+ {
+ return 0;
+ }
+}
+
+void foo0()
+{
+ foreach (x; lockstep()) {}
+}
+
+void foo1()
+{
+ foreach (x; lockstep()) {}
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test_dip1006.d b/gcc/testsuite/gdc.test/runnable/test_dip1006.d
new file mode 100644
index 0000000..c785e21
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test_dip1006.d
@@ -0,0 +1,38 @@
+// REQUIRED_ARGS: -check=in=off -check=out=off -check=invariant=off
+// PERMUTE_ARGS:
+class C
+{
+ int foo(int a)
+ in { assert(a != 0); } // skipped
+ out(res) { assert(res != 0); } // skipped
+ do
+ {
+ return a;
+ }
+
+ invariant // skipped
+ {
+ assert(false);
+ }
+
+ void bar(int a)
+ {
+ assert(a != 0); // triggered
+ }
+}
+
+void main()
+{
+ import core.exception : AssertError;
+
+ auto c = new C;
+ c.foo(0);
+
+ bool catched;
+ try
+ c.bar(0);
+ catch (AssertError e)
+ catched = true;
+ if (!catched)
+ assert(0);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/test_dip1006b.d b/gcc/testsuite/gdc.test/runnable/test_dip1006b.d
new file mode 100644
index 0000000..e167768
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test_dip1006b.d
@@ -0,0 +1,35 @@
+// REQUIRED_ARGS: -check=in=off -check=invariant=off
+// PERMUTE_ARGS:
+class C
+{
+ int foo(int a)
+ in { assert(a != 0); } // skipped
+ out(res) { assert(res != 0, "out"); } // triggered
+ do
+ {
+ return a;
+ }
+
+ invariant // skipped
+ {
+ assert(false);
+ }
+}
+
+void main()
+{
+ import core.exception : AssertError;
+
+ auto c = new C;
+ bool catched;
+ try
+ c.foo(0);
+ catch (AssertError e)
+ {
+ assert(e.msg == "out");
+ catched = e.msg == "out";
+ }
+
+ if (!catched)
+ assert(0);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/testaa.d b/gcc/testsuite/gdc.test/runnable/testaa.d
index 34cc705..75d5414 100644
--- a/gcc/testsuite/gdc.test/runnable/testaa.d
+++ b/gcc/testsuite/gdc.test/runnable/testaa.d
@@ -1,4 +1,3 @@
-// RUNNABLE_PHOBOS_TEST
// PERMUTE_ARGS: -fPIC
/* Test associative arrays */
@@ -7,11 +6,10 @@ extern(C) int printf(const char*, ...);
extern(C) int memcmp(const void *s1, const void *s2, size_t n);
import core.memory; // for GC.collect
-import std.random; // for uniform random numbers
/************************************************/
-int nametable[char[]];
+int[char[]] nametable;
void insert(string name, int value)
{
@@ -272,9 +270,9 @@ struct S12
void test12()
{
S12[] x;
- printf("size %d\n",S12.sizeof);
- printf("align %d\n",S12.alignof);
- printf("offset %d\n",S12.description.offsetof);
+ printf("size %zd\n",S12.sizeof);
+ printf("align %zd\n",S12.alignof);
+ printf("offset %zd\n",S12.description.offsetof);
for (int i=0;i<3;i++) {
S12 s;
@@ -294,8 +292,8 @@ void test12()
x ~= s;
*/
GC.collect();
- printf("%.*s\n",x[0].font_face.length,x[0].font_face.ptr);
- printf("%.*s\n",x[1].font_face.length,x[1].font_face.ptr);
+ printf("%.*s\n", cast(int)x[0].font_face.length, x[0].font_face.ptr);
+ printf("%.*s\n", cast(int)x[1].font_face.length, x[1].font_face.ptr);
}
@@ -316,7 +314,7 @@ void test13()
string[] key = array.keys;
assert(key.length==3);
- bool have[3];
+ bool[3] have;
assert(!have[0]);
assert(!have[1]);
@@ -424,13 +422,9 @@ void test16()
{
int[int] aa;
- Random gen;
for (int i = 0; i < 50000; i++)
{
- int key = uniform(0, int.max, gen);
- int value = uniform(0, int.max, gen);
-
- aa[key] = value;
+ aa[i] = i;
}
int[] keys = aa.keys;
@@ -442,7 +436,7 @@ void test16()
assert(k in aa);
j += aa[k];
}
- printf("test16 = %d\n", j);
+ assert(j == 1249975000);
int m;
foreach (k, v; aa)
@@ -471,10 +465,7 @@ void test16()
for (int i = 0; i < 1000; i++)
{
- int key2 = uniform(0, int.max, gen);
- int value2 = uniform(0, int.max, gen);
-
- aa[key2] = value2;
+ aa[i] = i;
}
foreach(k; aa)
{
@@ -494,7 +485,7 @@ void dummy17()
{
}
-int bb17[string];
+int[string] bb17;
int foo17()
{
@@ -558,14 +549,14 @@ void test19()
printf("%d\n", keys[1]);
auto vs = aa.values;
- printf("%.*s\n", vs[0].length, vs[0].ptr);
- printf("%.*s\n", vs[1].length, vs[1].ptr);
+ printf("%.*s\n", cast(int)vs[0].length, vs[0].ptr);
+ printf("%.*s\n", cast(int)vs[1].length, vs[1].ptr);
string aavalue_typeid = typeid(typeof(aa.values)).toString();
- printf("%.*s\n", aavalue_typeid.length, aavalue_typeid.ptr);
+ printf("%.*s\n", cast(int)aavalue_typeid.length, aavalue_typeid.ptr);
- printf("%.*s\n", aa[3].length, aa[3].ptr);
- printf("%.*s\n", aa[4].length, aa[4].ptr);
+ printf("%.*s\n", cast(int)aa[3].length, aa[3].ptr);
+ printf("%.*s\n", cast(int)aa[4].length, aa[4].ptr);
}
/************************************************/
@@ -582,14 +573,14 @@ void test20()
printf("%d\n", keys[1]);
auto values = aa.values;
- printf("%.*s\n", values[0].length, values[0].ptr);
- printf("%.*s\n", values[1].length, values[1].ptr);
+ printf("%.*s\n", cast(int)values[0].length, values[0].ptr);
+ printf("%.*s\n", cast(int)values[1].length, values[1].ptr);
string aavalue_typeid = typeid(typeof(aa.values)).toString();
- printf("%.*s\n", aavalue_typeid.length, aavalue_typeid.ptr);
+ printf("%.*s\n", cast(int)aavalue_typeid.length, aavalue_typeid.ptr);
- printf("%.*s\n", aa[3].length, aa[3].ptr);
- printf("%.*s\n", aa[4].length, aa[4].ptr);
+ printf("%.*s\n", cast(int)aa[3].length, aa[3].ptr);
+ printf("%.*s\n", cast(int)aa[4].length, aa[4].ptr);
}
/************************************************/
@@ -783,7 +774,7 @@ void test4826c()
}
/************************************************/
-// 5131
+// https://issues.dlang.org/show_bug.cgi?id=5131
struct ICE5131
{
@@ -799,7 +790,7 @@ void test5131()
}
/************************************************/
-// 6178
+// https://issues.dlang.org/show_bug.cgi?id=6178
bool test6178a()
{
@@ -1036,7 +1027,7 @@ void test6178x()
}
/************************************************/
-// 10595
+// https://issues.dlang.org/show_bug.cgi?id=10595
struct S10595
{
@@ -1073,14 +1064,13 @@ void test10595()
Wrap10595[int] wrap;
wrap[0] = Wrap10595();
- wrap[0] = 0; // note: using 'alias this' to assign
assert(wrap[0].s.test()); // failure
}
}
/************************************************/
-// 10970
+// https://issues.dlang.org/show_bug.cgi?id=10970
struct RefCounted10970(T) //if (!is(T == class))
{
@@ -1119,7 +1109,7 @@ void test10970()
}
/************************************************/
-// 6433
+// https://issues.dlang.org/show_bug.cgi?id=6433
void test6433()
{
@@ -1138,7 +1128,7 @@ void test6433()
}
/************************************************/
-// 6612
+// https://issues.dlang.org/show_bug.cgi?id=6612
void test6612()
{
@@ -1150,7 +1140,7 @@ void test6612()
}
/************************************************/
-// 7365
+// https://issues.dlang.org/show_bug.cgi?id=7365
struct TickDuration
{
@@ -1197,7 +1187,7 @@ void test6799()
}
/************************************************/
-// 11359
+// https://issues.dlang.org/show_bug.cgi?id=11359
void test11359()
{
@@ -1213,7 +1203,7 @@ void test11359()
}
/************************************************/
-// 11730
+// https://issues.dlang.org/show_bug.cgi?id=11730
struct SysTime11730
{
@@ -1246,7 +1236,7 @@ void test11730()
}
/************************************************/
-// 14089
+// https://issues.dlang.org/show_bug.cgi?id=14089
struct S14089
{
@@ -1263,7 +1253,7 @@ void test14089()
}
/************************************************/
-// 14144
+// https://issues.dlang.org/show_bug.cgi?id=14144
struct JSON14144
{
@@ -1291,7 +1281,7 @@ void test14144()
}
/************************************************/
-// 14321
+// https://issues.dlang.org/show_bug.cgi?id=14321
void test14321()
{
@@ -1330,6 +1320,20 @@ void test14321()
}
/************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19112
+
+void test19112()
+{
+ int[int[1]] aa;
+ aa[[2]] = 1;
+ assert([2] in aa);
+
+ int[int[]] aa2 = [[1, 2, 3]: 4];
+ int[3] k = [1, 2, 3];
+ assert(*(k in aa2) == 4);
+}
+
+/************************************************/
int main()
{
@@ -1380,6 +1384,7 @@ int main()
test11730();
test14089();
test14321();
+ test19112();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/testaa2.d b/gcc/testsuite/gdc.test/runnable/testaa2.d
index 17de167..ba8ceec 100644
--- a/gcc/testsuite/gdc.test/runnable/testaa2.d
+++ b/gcc/testsuite/gdc.test/runnable/testaa2.d
@@ -1,16 +1,26 @@
-// RUNNABLE_PHOBOS_TEST
-// PERMUTE_ARGS:
+/*
+RUNNABLE_PHOBOS_TEST
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+foo()
+foo() 2
+foo() 3
+foo() 4
+Success
+---
+*/
extern(C) int printf(const char*, ...);
/************************************************/
-int a[string];
+int[string] a;
size_t foo(immutable char [3] s)
{
printf("foo()\n");
- int b[string];
+ int[string] b;
string[] key;
int[] value;
printf("foo() 2\n");
@@ -23,7 +33,7 @@ size_t foo(immutable char [3] s)
void foo2()
{
- int c[string];
+ int[string] c;
string[] key;
int[] value;
int i;
@@ -51,10 +61,9 @@ void foo2()
value = c.values;
assert(value.length == 2);
- for (i = 0; i < key.length; i++)
- {
- printf("c[\"%.*s\"] = %d\n", key[i].length, key[i].ptr, value[i]);
- }
+ const fooIndex = key[1] == "foo";
+ assert(key[fooIndex] == "foo" && value[fooIndex] == 3);
+ assert(key[1 - fooIndex] == "bar" && value[1 - fooIndex] == 4);
assert("foo" in c);
c.remove("foo");
@@ -70,7 +79,6 @@ void foo2()
void testaa()
{
size_t i = foo("abc");
- printf("i = %d\n", i);
assert(i == 0);
foo2();
@@ -107,7 +115,7 @@ void test4523()
}
/************************************************/
-// 3825
+// https://issues.dlang.org/show_bug.cgi?id=3825
import std.math; // necessary for ^^=
void test3825()
@@ -257,7 +265,7 @@ void test3825x()
}
/************************************************/
-// 10106
+// https://issues.dlang.org/show_bug.cgi?id=10106
struct GcPolicy10106 {}
diff --git a/gcc/testsuite/gdc.test/runnable/testaa3.d b/gcc/testsuite/gdc.test/runnable/testaa3.d
index 3e3ae96..4aac1fb 100644
--- a/gcc/testsuite/gdc.test/runnable/testaa3.d
+++ b/gcc/testsuite/gdc.test/runnable/testaa3.d
@@ -315,7 +315,7 @@ int[int] testRetx()
void aafunc(int[int] aa) {}
/***************************************************/
-// 12214
+// https://issues.dlang.org/show_bug.cgi?id=12214
void test12214() pure nothrow
{
@@ -324,7 +324,8 @@ void test12214() pure nothrow
}
/***************************************************/
-// 12220 & 12221
+// https://issues.dlang.org/show_bug.cgi?id=12220
+// https://issues.dlang.org/show_bug.cgi?id=12221
void test12220()
{
@@ -338,7 +339,7 @@ void test12220()
}
/***************************************************/
-// 12403
+// https://issues.dlang.org/show_bug.cgi?id=12403
void test12403()
{
diff --git a/gcc/testsuite/gdc.test/runnable/testabi.d b/gcc/testsuite/gdc.test/runnable/testabi.d
deleted file mode 100644
index c50dfbd..0000000
--- a/gcc/testsuite/gdc.test/runnable/testabi.d
+++ /dev/null
@@ -1,926 +0,0 @@
-// PERMUTE_ARGS: -release -g
-
-version(Windows) {}
-else version(X86_64)
-{
- /* uncomment to enable tests! */
- //version = Run_X86_64_Tests;
-}
-
-extern (C) int printf(const char*, ...);
-
-template tuple(A...) { alias A tuple; }
-
-alias byte B;
-alias short S;
-alias int I;
-alias long L;
-alias float F;
-alias double D;
-alias real R;
-
-// Single Type
-
-struct b { B a; }
-struct bb { B a,b; }
-struct bbb { B a,b,c; }
-struct bbbb { B a,b,c,d; }
-struct bbbbb { B a,b,c,d, e; }
-struct b6 { B a,b,c,d, e,f; }
-struct b7 { B a,b,c,d, e,f,g; }
-struct b8 { B a,b,c,d, e,f,g,h; }
-struct b9 { B a,b,c,d, e,f,g,h, i; }
-struct b10 { B a,b,c,d, e,f,g,h, i,j; }
-struct b11 { B a,b,c,d, e,f,g,h, i,j,k; }
-struct b12 { B a,b,c,d, e,f,g,h, i,j,k,l; }
-struct b13 { B a,b,c,d, e,f,g,h, i,j,k,l, m; }
-struct b14 { B a,b,c,d, e,f,g,h, i,j,k,l, m,n; }
-struct b15 { B a,b,c,d, e,f,g,h, i,j,k,l, m,n,o; }
-struct b16 { B a,b,c,d, e,f,g,h, i,j,k,l, m,n,o,p; }
-struct b17 { B a,b,c,d, e,f,g,h, i,j,k,l, m,n,o,p, q; }
-struct b18 { B a,b,c,d, e,f,g,h, i,j,k,l, m,n,o,p, q,r; }
-struct b19 { B a,b,c,d, e,f,g,h, i,j,k,l, m,n,o,p, q,r,s; }
-struct b20 { B a,b,c,d, e,f,g,h, i,j,k,l, m,n,o,p, q,r,s,t;}
-
-struct s { S a; }
-struct ss { S a,b; }
-struct sss { S a,b,c; }
-struct ssss { S a,b,c,d; }
-struct sssss { S a,b,c,d, e; }
-struct s6 { S a,b,c,d, e,f; }
-struct s7 { S a,b,c,d, e,f,g; }
-struct s8 { S a,b,c,d, e,f,g,h; }
-struct s9 { S a,b,c,d, e,f,g,h, i; }
-struct s10 { S a,b,c,d, e,f,g,h, i,j;}
-
-struct i { I a; } struct l { L a; }
-struct ii { I a,b; } struct ll { L a,b; }
-struct iii { I a,b,c; } struct lll { L a,b,c; }
-struct iiii { I a,b,c,d; } struct llll { L a,b,c,d; }
-struct iiiii { I a,b,c,d,e; } struct lllll { L a,b,c,d,e; }
-
-struct f { F a; } struct d { D a; }
-struct ff { F a,b; } struct dd { D a,b; }
-struct fff { F a,b,c; } struct ddd { D a,b,c; }
-struct ffff { F a,b,c,d; } struct dddd { D a,b,c,d; }
-struct fffff { F a,b,c,d,e; } struct ddddd { D a,b,c,d,e; }
-
-// Mixed Size
-
-struct js { I a; S b; }
-struct iss { I a; S b,c; }
-struct si { S a; I b; }
-struct ssi { S a,b; I c; }
-struct sis { S a; I b; S c; }
-
-struct ls { L a; S b; }
-struct lss { L a; S b,c; }
-struct sl { S a; L b; }
-struct ssl { S a,b; L c; }
-struct sls { S a; L b; S c; }
-
-struct li { L a; I b; }
-struct lii { L a; I b,c; }
-struct il { I a; L b; }
-struct iil { I a,b; L c; }
-struct ili { I a; L b; I c; }
-
-struct df { D a; F b; }
-struct dff { D a; F b,c; }
-struct fd { F a; D b; }
-struct ffd { F a,b; D c; }
-struct fdf { F a; D b; F c; }
-
-// Mixed Types
-
-struct fi { F a; I b; }
-struct fii { F a; I b,c; }
-struct jf { I a; F b; }
-struct iif { I a,b; F c; }
-struct ifi { I a; F b; I c; }
-
-struct ffi { F a,b; I c; }
-struct ffii { F a,b; I c,d; }
-struct iff { I a; F b,c; }
-struct iiff { I a,b; F c,d; }
-struct ifif { I a; F b; I c; F d;}
-
-struct di { D a; I b; }
-struct dii { D a; I b,c; }
-struct id { I a; D b; }
-struct iid { I a,b; D c; }
-struct idi { I a; D b; I c; }
-
-// Real ( long double )
-
-struct r { R a; }
-struct rr { R a,b; }
-struct rb { R a; B b; }
-struct rf { R a; F b; }
-struct fr { F a; R b; }
-
- // Int Registers only
-alias tuple!( b,bb,bbb,bbbb,bbbbb,
- b6, b7, b8, b9, b10,
- b11,b12,b13,b14,b15,
- b16,b17,b18,b19,b20,
- s,ss,sss,ssss,sssss,
- s6, s7, s8, s9, s10,
- i,ii,iii,iiii,iiiii,
- l,ll,lll,llll,lllll,
- //
- js,iss,si,ssi, sis,
- ls,lss,sl,ssl, sls,
- li,lii,il,iil, ili,
- fi,fii,jf,iif, ifi,
- ffi,ffii,iff,iiff,ifif, // INT_END
-
- // SSE registers only
- f,ff,fff,ffff,fffff,
- d,dd,ddd,dddd,ddddd,
- //
- df,dff,fd,ffd, fdf, // SSE_END
-
- // Int and SSE
- di, dii,id, iid, idi, // MIX_END
- // ---
- ) ALL_T;
-
-enum INT_END = 65;
-enum SSE_END = 80;
-enum MIX_END = ALL_T.length;
-
- // x87
-alias tuple!( r,rr,rb,rf,fr,
- // ---
- ) R_T;
-//"r","rr","rb","rf","fr",
-
-
-string[] ALL_S=[
- "b","bb","bbb","bbbb","bbbbb",
- "b6", "b7", "b8", "b9", "b10",
- "b11","b12","b13","b14","b15",
- "b16","b17","b18","b19","b20",
- "s","ss","sss","ssss","sssss",
- "s6","s7","s8","s9" , "s10",
- "i","ii","iii","iiii","iiiii",
- "l","ll","lll","llll","lllll",
- // ---
- "js","iss","si","ssi", "sis",
- "ls","lss","sl","ssl", "sls",
- "li","lii","il","iil", "ili",
- "fi","fii","jf","iif", "ifi",
- "ffi","ffii","iff","iiff","ifif",
- // ---
- "f","ff","fff","ffff","fffff",
- "d","dd","ddd","dddd","ddddd",
- "df","dff","fd","ffd", "dfd",
- // ---
- "di","dii","id","iid","idi",
- ];
-
-/* ***********************************************************************
- All
- ************************************************************************/
-// test1 Struct passing and return
-
-int[MIX_END] results_1;
-
-T test1_out(T)( )
-{
- T t;
- foreach( i, ref e; t.tupleof ) e = i+1;
- return t;
-}
-T test1_inout(T)( T t)
-{
- foreach( i, ref e; t.tupleof ) e += 10;
- return t;
-}
-
-void test1_call_out(T)( int n )
-{
- T t1;
- foreach( i, ref e; t1.tupleof ) e = i+1;
- T t2 = test1_out!(T)();
-
- if( t1 == t2 ) results_1[n] |= 1;
-}
-void test1_call_inout(T)( int n )
-{
- T t1;
- foreach( i, ref e; t1.tupleof ) e = i+1;
- T t2 = test1_inout!(T)( t1 );
- foreach( i, ref e; t1.tupleof ) e += 10;
-
- if( t1 == t2 ) results_1[n] |= 2;
-}
-
-void D_test1( )
-{
- // Run Tests
- foreach( n, T; ALL_T )
- {
- test1_call_out!(T)(n);
- test1_call_inout!(T)(n);
- }
-
- bool pass = true;
- foreach( i, r; results_1 )
- {
- if( ~r & 1 )
- {
- pass = false;
- printf( "Test1 out %s \tFail\n", ALL_S[i].ptr );
- }
- if( ~r & 2 )
- {
- pass = false;
- printf( "Test1 inout %s \tFail\n", ALL_S[i].ptr );
- }
- }
- assert( pass );
-
- results_1[0..5] = 0;
- foreach( n, T; R_T )
- {
- test1_call_out!(T)(n);
- test1_call_inout!(T)(n);
- }
-}
-
-/************************************************************************/
-// based on runnable/test23.d : test44()
-// Return Struct into an Array
-
-struct S1
-{ int i,j;
-
- static S1 foo(int x)
- { S1 s;
- s.i = x;
- return s;
-} }
-struct S2
-{ int i,j,k;
-
- static S2 foo(int x)
- { S2 s;
- s.i = x;
- return s;
-} }
-struct S3
-{ float i,j;
-
- static S3 foo(int x)
- { S3 s;
- s.i = x;
- return s;
-} }
-struct S4
-{ float i,j,k;
-
- static S4 foo(int x)
- { S4 s;
- s.i = x;
- return s;
-} }
-struct S5
-{ float i,j;
- int k;
-
- static S5 foo(float x)
- { S5 s;
- s.i = x;
- return s;
-} }
-
-void D_test2()
-{
- S1[] s1;
- S2[] s2;
- S3[] s3;
- S4[] s4;
- S5[] s5;
-
- s1 = s1 ~ S1.foo(6); s1 = s1 ~ S1.foo(1);
- s2 = s2 ~ S2.foo(6); s2 = s2 ~ S2.foo(1);
- s3 = s3 ~ S3.foo(6); s3 = s3 ~ S3.foo(1);
- s4 = s4 ~ S4.foo(6); s4 = s4 ~ S4.foo(1);
- s5 = s5 ~ S5.foo(6); s5 = s5 ~ S5.foo(1);
-
- assert( s1.length == 2 );
- assert( s1[0].i == 6 );
- assert( s1[1].i == 1 );
-
- assert( s2.length == 2 );
- assert( s2[0].i == 6 );
- assert( s2[1].i == 1 );
-
-/+ // These Fail on Mainline DMD64 ( Should pass! )
- assert( s3.length == 2 );
- assert( s3[0].i == 6 );
- assert( s3[1].i == 1 );
-
- assert( s4.length == 2 );
- assert( s4[0].i == 6 );
- assert( s4[1].i == 1 );
-+/
- assert( s5.length == 2 );
- assert( s5[0].i == 6 );
- assert( s5[1].i == 1 );
-
-}
-
-/* ***********************************************************************
- X86_64
- ************************************************************************/
-
-version(Run_X86_64_Tests)
-{
-
-
-struct TEST
-{
- immutable int num;
- immutable string desc;
- bool[MIX_END] result;
-}
-
-/**
- * 0 = Should Fail
- * 1 = Should Pass
- */
-immutable int[MIX_END] expected =
- [
- 1,1,1,1,1, // b
- 1,1,1,1,1, // b6
- 1,1,1,1,1, // b11
- 1,0,0,0,0, // b16
-
- 1,1,1,1,1, // s
- 1,1,1,0,0, // s6
- 1,1,1,1,0, // i
- 1,1,0,0,0, // l
- 1,1,1,1,1, // si mix
- 1,1,1,1,0, // sl
- 1,1,1,1,0, // il
- 1,1,1,1,1, // int and float
- 1,1,1,1,1, // int and float
-
- // SSE regs only
- 1,1,1,1,0, // f
- 1,1,0,0,0, // d
- 1,1,1,1,0, // float and double
-
- // SSE + INT regs
- 1,1,1,1,0, // int and double
- ];
-
-
-/**
- * Describes value expected in registers
- *
- * null means do not test
- * ( because value is passed on the stack ).
- */
-
-immutable long[][] RegValue =
- [
-/* 0 b */ [ 0x0000000000000001, ],
-/* 1 bb */ [ 0x0000000000000201, ],
-/* 2 bbb */ [ 0x0000000000030201, ],
-/* 3 bbbb */ [ 0x0000000004030201, ],
-/* 4 bbbbb */ [ 0x0000000504030201, ],
-/* 5 b6 */ [ 0x0000060504030201, ],
-/* 6 b7 */ [ 0x0007060504030201, ],
-/* 7 b8 */ [ 0x0807060504030201, ],
-/* 8 b9 */ [ 0x0807060504030201, 0x0000000000000009 ],
-/* 9 b10 */ [ 0x0807060504030201, 0x0000000000000a09 ],
-/* 10 b11 */ [ 0x0807060504030201, 0x00000000000b0a09 ],
-/* 11 b12 */ [ 0x0807060504030201, 0x000000000c0b0a09 ],
-/* 12 b13 */ [ 0x0807060504030201, 0x0000000d0c0b0a09 ],
-/* 13 b14 */ [ 0x0807060504030201, 0x00000e0d0c0b0a09 ],
-/* 14 b15 */ [ 0x0807060504030201, 0x000f0e0d0c0b0a09 ],
-/* 15 b16 */ [ 0x0807060504030201, 0x100f0e0d0c0b0a09 ],
-/* 16 b17 */ null,
-/* 17 b18 */ null,
-/* 18 b19 */ null,
-/* 19 b20 */ null,
-/* 20 s */ [ 0x0000000000000001, ],
-/* 21 ss */ [ 0x0000000000020001, ],
-/* 22 sss */ [ 0x0000000300020001, ],
-/* 23 ssss */ [ 0x0004000300020001, ],
-/* 24 sssss */ [ 0x0004000300020001, 0x0000000000000005 ],
-/* 25 s6 */ [ 0x0004000300020001, 0x0000000000060005 ],
-/* 26 s7 */ [ 0x0004000300020001, 0x0000000700060005 ],
-/* 27 s8 */ [ 0x0004000300020001, 0x0008000700060005 ],
-/* 28 s9 */ null,
-/* 29 s10 */ null,
-/* 30 i */ [ 0x0000000000000001, ],
-/* 31 ii */ [ 0x0000000200000001, ],
-/* 32 iii */ [ 0x0000000200000001, 0x0000000000000003 ],
-/* 33 iiii */ [ 0x0000000200000001, 0x0000000400000003 ],
-/* 34 iiiii */ null,
-/* 35 l */ [ 0x0000000000000001, ],
-/* 36 ll */ [ 0x0000000000000001, 0x0000000000000002 ],
-/* 37 lll */ null,
-/* 38 llll */ null,
-/* 39 lllll */ null,
-
-/* 40 js */ [ 0x0000000200000001, ],
-/* 41 iss */ [ 0x0003000200000001, ],
-/* 42 si */ [ 0x0000000200000001, ],
-/* 43 ssi */ [ 0x0000000300020001, ],
-/* 44 sis */ [ 0x0000000200000001, 0x0000000000000003 ],
-/* 45 ls */ [ 0x0000000000000001, 0x0000000000000002 ],
-/* 46 lss */ [ 0x0000000000000001, 0x0000000000030002 ],
-/* 47 sl */ [ 0x0000000000000001, 0x0000000000000002 ],
-/* 48 ssl */ [ 0x0000000000020001, 0x0000000000000003 ],
-/* 49 sls */ null,
-/* 50 li */ [ 0x0000000000000001, 0x0000000000000002 ],
-/* 51 lii */ [ 0x0000000000000001, 0x0000000300000002 ],
-/* 52 il */ [ 0x0000000000000001, 0x0000000000000002 ],
-/* 53 iil */ [ 0x0000000200000001, 0x0000000000000003 ],
-/* 54 ili */ null,
-
-/* 55 fi */ [ 0x000000023f800000, ],
-/* 56 fii */ [ 0x000000023f800000, 0x0000000000000003 ],
-/* 57 jf */ [ 0x4000000000000001, ],
-/* 58 iif */ [ 0x0000000200000001, 0x0000000040400000 ],
-/* 59 ifi */ [ 0x4000000000000001, 0x0000000000000003 ],
-
-/* 60 ffi */ [ 0x0000000000000003, 0x400000003f800000 ],
-/* 61 ffii */ [ 0x0000000400000003, 0x400000003f800000 ],
-/* 62 iff */ [ 0x4000000000000001, 0x0000000040400000 ],
-/* 63 iiff */ [ 0x0000000200000001, 0x4080000040400000 ],
-/* 64 ifif */ [ 0x4000000000000001, 0x4080000000000003 ],
-
-/* 65 f */ [ 0x000000003f800000, ],
-/* 66 ff */ [ 0x400000003f800000, ],
-/* 67 fff */ [ 0x400000003f800000, 0x0000000040400000 ],
-/* 68 ffff */ [ 0x400000003f800000, 0x4080000040400000 ],
-/* 69 fffff */ null,
-/* 70 d */ [ 0x3ff0000000000000, ],
-/* 71 dd */ [ 0x3ff0000000000000, 0x4000000000000000 ],
-/* 72 ddd */ null,
-/* 73 dddd */ null,
-/* 74 ddddd */ null,
-
-/* 75 df */ [ 0x3ff0000000000000, 0x0000000040000000 ],
-/* 76 dff */ [ 0x3ff0000000000000, 0x4040000040000000 ],
-/* 77 fd */ [ 0x000000003f800000, 0x4000000000000000 ],
-/* 78 ffd */ [ 0x400000003f800000, 0x4008000000000000 ],
-/* 79 fdf */ null,
-
-/* 80 di */ [ 0x3ff0000000000000, 0x0000000000000002 ],
-/* 81 dii */ [ 0x3ff0000000000000, 0x0000000300000002 ],
-/* 82 id */ [ 0x4000000000000000, 0x0000000000000001 ],
-/* 83 iid */ [ 0x4008000000000000, 0x0000000200000001 ],
-/* 84 idi */ null,
- ];
-
-/* Have to do it this way for OSX: Issue 7354 */
-__gshared long[2] dump;
-
-/**
- * Generate Register capture
- */
-string gen_reg_capture( int n, string registers )( )
-{
- if( RegValue[n] == null ) return "return;";
-
- string[] REG = mixin(registers); // ["RDI","RSI"];
-
- // Which type of compare
- static if(n < INT_END)
- enum MODE = 1; // Int
- else static if(n < SSE_END)
- enum MODE = 2; // Float
- else enum MODE = 3; // Mix
-
- /* Begin */
-
- string code = "asm {\n";
-
- final switch( MODE )
- {
- case 1: code ~= "mov [dump], "~REG[0]~";\n";
- REG = REG[1..$];
- break;
- case 2:
- case 3: code ~= "movq [dump], XMM0;\n";
- }
-
- if( RegValue[n].length == 2 )
- final switch( MODE )
- {
- case 1:
- case 3: code ~= "mov [dump+8], "~REG[0]~";\n";
- break;
- case 2: code ~= "movq [dump+8], XMM1;\n";
- } else {
- code ~= "xor R8, R8;\n";
- code ~= "mov [dump+8], R8;\n";
- }
-
- return code ~ "}\n";
-}
-
-/**
- * Check the results
- */
-bool check( TEST data )
-{
- bool pass = true;
- foreach( i, e; expected )
- {
- if( data.result[i] != (e & 1) )
- {
- printf( "Test%d %s \tFail\n", data.num, ALL_S[i].ptr);
- pass = false;
- }
- }
- return pass;
-}
-
-/************************************************************************/
-
-// test1 Return Struct in Registers
-// ( if RDI == 12 we have no hidden pointer )
-
-TEST data1 = { 1, "RDI hidden pointer" };
-
-T test1_asm( T, int n )( int i )
-{
- asm {
-
- cmp EDI, 12;
- je L1;
-
- leave; ret;
- }
-L1:
- data1.result[n] = true;
-}
-
-void test1()
-{
- printf("\nRunning iasm Test 1 ( %s )\n", data1.desc.ptr);
-
- foreach( int n, T; ALL_T )
- test1_asm!(T,n)(12);
-
- check( data1 );
-}
-
-/************************************************************************/
-// test2 Pass Struct in Registers
-// ( if RDI == 0 we have no stack pointer )
-
-TEST data2 = { 2, "RDI struct pointer" };
-
-T test2_asm( T, int n )( T t )
-{
- asm {
-
- mov [dump], RDI;
- mov [dump+8], RSP;
- cmp EDI, 0; // TODO test RDI is a ptr to stack ? ?
- je L1;
-
- leave; ret;
- }
-L1:
- data2.result[n] = true;
-}
-T test2f_asm( T, int n )( T t, int x )
-{
- asm {
-
- cmp EDI, 12;
- je L1;
-
- leave; ret;
- }
-L1:
- data2.result[n] = true;
-}
-
-void test2()
-{
- printf("\nRunning iasm Test 2 ( %s )\n", data2.desc.ptr);
-
- // Integer
- foreach( int n, T; ALL_T ) {
- T t = { 0 };
- test2_asm!(T,n)( t );
- }
-
- // float alternative test
- foreach( int n, T; ALL_T[INT_END..SSE_END] )
- {
- enum n2 = n + INT_END;
- data2.result[n2] = false;
- test2f_asm!(T,n2)( T.init, 12 );
- }
-
- check( data2 );
-}
-
-/************************************************************************/
-// test3
-
-TEST data3 = { 3, "Check Return Register value" };
-
-void test3_run( T, int n )( )
-{
- test3_ret!T();
- mixin( gen_reg_capture!(n,`["RAX","RDX"]`)() );
-
- //dbg!(T,n)( );
-
- enum len = RegValue[n].length;
- if( dump[0..len] == RegValue[n] )
- data3.result[n] = true;
-}
-
-T test3_ret( T )( )
-{
- T t;
- foreach( i, ref e; t.tupleof ) e = i+1;
- return t;
-}
-
-void test3()
-{
- printf("\nRunning iasm Test 3 ( %s )\n", data3.desc.ptr);
-
- foreach( int n, T; ALL_T )
- test3_run!(T,n)( );
-
- check( data3 );
-}
-
-/************************************************************************/
-// test4
-
-TEST data4 = { 4, "Check Input Register value" };
-
-void test4_run( T, int n )( T t )
-{
- mixin( gen_reg_capture!(n,`["RDI","RSI"]`)() );
-
- //dbg!(T,n)( );
-
- enum len = RegValue[n].length;
- if( dump[0..len] == RegValue[n] )
- data4.result[n] = true;
-}
-
-void dbg( T, int n )( )
-{
- import std.stdio;
- writefln( "D %s\t[ %16x, %16x ]", T.stringof, dump[0], dump[1], );
- writef( "C %s\t[ %16x", T.stringof, RegValue[n][0] );
- if( RegValue[n].length == 2 )
- writef( ", %16x", RegValue[n][1] );
- writefln( " ]" );
-}
-void test4()
-{
- printf("\nRunning iasm Test 4 ( %s )\n", data4.desc.ptr);
-
- foreach( int n, T; ALL_T )
- {
- T t;
- foreach( i, ref e; t.tupleof ) e = i+1;
- test4_run!(T,n)( t );
- }
- check( data4 );
-}
-
-
-} // end version(Run_X86_64_Tests)
-
-/************************************************************************/
-
-
-void main()
-{
- D_test1();
- D_test2();
-
- version(Run_X86_64_Tests)
- {
- test1();
- test2();
- test3();
- test4();
- }
-}
-
-/+
-/**
- * C code to generate the table RegValue
- */
-string c_generate_returns()
-{
- string value = " 1, 2, 3, 4, 5, 6, 7, 8, 9,10,"
- "11,12,13,14,15,16,17,18,19,20,";
-
- string code = "#include \"cgen.h\"\n";
-
- // Generate return functions
- foreach( int n, T; ALL_T )
- {
- auto Ts = T.stringof;
- auto len = T.tupleof.length;
-
- code ~= "struct "~Ts~" func_ret_"~Ts~"(void) { \n";
- code ~= "struct "~Ts~" x = { ";
- code ~= value[0..len*3] ~ " };\n";
- code ~= "return x;\n}\n";
- }
- return code;
-}
-string c_generate_pass()
-{
- string value = " 1, 2, 3, 4, 5, 6, 7, 8, 9,10,"
- "11,12,13,14,15,16,17,18,19,20,";
-
- string code;
-
- // Generate return functions
- foreach( int n, T; ALL_T )
- {
- auto Ts = T.stringof;
- auto len = T.tupleof.length;
-
- code ~= "void func_pass_"~Ts~"( struct "~Ts~" x ) {\n";
- ////////////////
- // Which type of compare
- static if(n < INT_END)
- enum MODE = 1; // Int
- else static if(n < SSE_END)
- enum MODE = 2; // Float
- else enum MODE = 3; // Mix
-
- auto nn = n.stringof;
-
- /* Begin */
-
- code ~= "asm(\n";
- final switch( MODE )
- {
- case 1:
- code ~= `"movq %rdi, reg\n" "movq %rsi, reg+8\n"`;
- break;
- case 2:
- code ~= `"movq %xmm0, reg\n" "movq %xmm1, reg+8\n"`;
- break;
- case 3:
- code ~= `"movq %xmm0, reg\n" "movq %rdi, reg+8\n"`;
- }
- code ~= "\n);\n";
- code ~= "}\n";
-
- ////////////////
- code ~= "void func_call_"~Ts~"( void ) {\n";
- code ~= "struct "~Ts~" x = { ";
- code ~= value[0..len*3] ~ " };\n";
- code ~= "func_pass_"~Ts~"( x );\n}\n";
- }
- return code;
-}
-string c_generate_main()
-{
- string code = "void main() {\n";
-
- foreach( int n, T; ALL_T )
- {
- // Which type of compare
- static if(n < INT_END)
- enum MODE = 1; // Int
- else static if(n < SSE_END)
- enum MODE = 2; // Float
- else enum MODE = 3; // Mix
-
- auto nn = n.stringof;
- auto Ts = T.stringof;
-
- /* Begin */
-
- code ~= `printf("/* %3d `~Ts~`\t*/ ", `~nn~`);`"\n";
- if( !(expected[n] & 1) )
- {
- code ~= `printf("null,\n");`"\n";
- continue;
- }
- code ~= "asm(\n";
- code ~= `"call func_ret_`~Ts~`\n"`"\n";
- final switch( MODE )
- {
- case 1:
- code ~= `"movq %rax, reg\n" "movq %rdx, reg+8\n"`;
- break;
- case 2:
- code ~= `"movq %xmm0, reg\n" "movq %xmm1, reg+8\n"`;
- break;
- case 3:
- code ~= `"movq %xmm0, reg\n" "movq %rax, reg+8\n"`;
- }
- code ~= "\n);\n";
-
- code ~= `printf("[ 0x%016lx", reg.r1 );`"\n";
-
- if( T.sizeof > 8 || MODE == 3 )
- code ~= `printf(", 0x%016lx ],\n", reg.r2 );`"\n";
- else code ~= `printf(", %015c ],\n", ' ' );`"\n";
- }
-
- foreach( int n, T; ALL_T )
- {
- // Which type of compare
- static if(n < INT_END)
- enum MODE = 1; // Int
- else static if(n < SSE_END)
- enum MODE = 2; // Float
- else enum MODE = 3; // Mix
-
- auto nn = n.stringof;
- auto Ts = T.stringof;
-
- /* Begin */
-
- code ~= `printf("/* %3d `~Ts~`\t*/ ", `~nn~`);`"\n";
- if( !(expected[n] & 1) )
- {
- code ~= `printf("null,\n");`"\n";
- continue;
- }
- code ~= "func_call_"~Ts~"();\n";
-
- code ~= `printf("[ 0x%016lx", reg.r1 );`"\n";
-
- if( T.sizeof > 8 || MODE == 3 )
- code ~= `printf(", 0x%016lx ],\n", reg.r2 );`"\n";
- else code ~= `printf(", %015c ],\n", ' ' );`"\n";
- }
-
-
- return code ~ "}";
-}
-pragma(msg, c_generate_returns() );
-pragma(msg, c_generate_pass() );
-pragma(msg, c_generate_main() );
-// +/
-
-/+
-/**
- * Generate Functions that pass/return each Struct type
- *
- * ( Easier to look at objdump this way )
- */
-string d_generate_functions( )
-{
- string code = "extern(C) {";
-
- // pass
- foreach( s; ALL_T )
- {
- string ss = s.stringof;
-
- code ~= "void func_in_"~ss~"( "~ss~" t ) { t.a = 12; }\n";
- }
- // return
- foreach( s; ALL_T[0..10] )
- {
- string ss = s.stringof;
-
- code ~= `
- auto func_out_`~ss~`()
- {
- `~ss~` t;
- foreach( i, ref e; t.tupleof ) e = i+1;
- return t;
- }`;
- }
- // pass & return
- foreach( s; ALL_T[0..10] )
- {
- string ss = s.stringof;
-
- code ~= `
- auto func_inout_`~ss~`( `~ss~` t )
- {
- foreach( i, ref e; t.tupleof ) e += 10;
- return t;
- }`;
- }
- return code ~ "\n} // extern(C)\n";
-}
-//pragma( msg, d_generate_functions() );
-mixin( d_generate_functions() );
-// +/
diff --git a/gcc/testsuite/gdc.test/runnable/testaliascast.d b/gcc/testsuite/gdc.test/runnable/testaliascast.d
new file mode 100644
index 0000000..c55f820
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/testaliascast.d
@@ -0,0 +1,63 @@
+// https://issues.dlang.org/show_bug.cgi?id=11294
+
+string result;
+
+extern(C) void rt_finalize(void *ptr, bool det=true);
+void clear(T)(T obj) if (is(T == class))
+{
+ rt_finalize(cast(void*)obj);
+}
+
+class A
+{
+ ~this() { result ~= "A"; }
+ string dummy = "0";
+}
+
+class B
+{
+ A a;
+ string dummy = "0";
+ alias a this;
+ ~this() { result ~= "B"; }
+}
+
+void test11294()
+{
+ auto a = new A;
+ auto b = new B;
+ b.a = a;
+ result ~= b.dummy;
+ clear(b);
+ result ~= a.dummy;
+ result ~= "END";
+ clear(a);
+
+ assert(result == "0B0ENDA");
+}
+
+
+// https://issues.dlang.org/show_bug.cgi?id=13392
+void foo(T)(T t)
+{
+ void* p = cast(void*) t; //Callas alias this
+}
+
+class X {}
+
+class Y
+{
+ alias a this;
+ @property X a(){assert(0);} //Here
+}
+
+void test13392()
+{
+ foo(B.init);
+}
+
+void main()
+{
+ test11294();
+ test13392();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/testappend.d b/gcc/testsuite/gdc.test/runnable/testappend.d
index cbdae36..f8bff3e 100644
--- a/gcc/testsuite/gdc.test/runnable/testappend.d
+++ b/gcc/testsuite/gdc.test/runnable/testappend.d
@@ -1,4 +1,18 @@
-// PERMUTE_ARGS:
+/*
+PERMUTE_ARGS:
+TEST_OUTPUT:
+---
+runnable/testappend.d(54): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+runnable/testappend.d(55): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+runnable/testappend.d(76): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+runnable/testappend.d(77): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+---
+
+RUN_OUTPUT:
+---
+Success
+---
+*/
import core.stdc.stdio;
import core.stdc.math : isnan;
diff --git a/gcc/testsuite/gdc.test/runnable/testarray.d b/gcc/testsuite/gdc.test/runnable/testarray.d
index 4784f47..02bf771 100644
--- a/gcc/testsuite/gdc.test/runnable/testarray.d
+++ b/gcc/testsuite/gdc.test/runnable/testarray.d
@@ -3,7 +3,7 @@
import core.memory;
-// see http://forum.dlang.org/thread/4BB6296E.6050506@digitalmars.com for more info
+// see https://forum.dlang.org/thread/4BB6296E.6050506@digitalmars.com for more info
// failure case for bug fixed by druntime rev 282
// how it works:
diff --git a/gcc/testsuite/gdc.test/runnable/testassert.d b/gcc/testsuite/gdc.test/runnable/testassert.d
new file mode 100644
index 0000000..30fe8d9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/testassert.d
@@ -0,0 +1,380 @@
+/*
+REQUIRED_ARGS: -checkaction=context -preview=dip1000
+PERMUTE_ARGS: -O -g -inline
+*/
+
+void test8765()
+{
+ string msg;
+ try
+ {
+ int a = 0;
+ assert(a);
+ }
+ catch (Throwable e)
+ {
+ // no-message -> assert expression
+ msg = e.msg;
+ }
+ assert(msg == "0 != true");
+}
+
+ void test9255()
+{
+ string file;
+ try
+ {
+ int x = 0;
+ assert(x);
+ }
+ catch (Throwable e)
+ {
+ file = e.file;
+ }
+
+ version(Windows)
+ assert(file && file == r"runnable\testassert.d");
+ else
+ assert(file && file == "runnable/testassert.d");
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20114
+void test20114()
+{
+ // Function call returning simple type
+ static int fun() {
+ static int i = 0;
+ assert(i++ == 0);
+ return 3;
+ }
+
+ const a = getMessage(assert(fun() == 4));
+ assert(a == "3 != 4");
+
+ // Function call returning complex type with opEquals
+ static struct S
+ {
+ bool opEquals(const int x) const
+ {
+ return false;
+ }
+ }
+
+ static S bar()
+ {
+ static int i = 0;
+ assert(i++ == 0);
+ return S.init;
+ }
+
+ const b = getMessage(assert(bar() == 4));
+ assert(b == "S() != 4");
+
+ // Non-call expression with side effects
+ int i = 0;
+ const c = getMessage(assert(++i == 0));
+ assert(c == "1 != 0");
+}
+
+version (DigitalMars) version (Win64) version = DMD_Win64;
+
+void test20375() @safe
+{
+ static struct RefCounted
+ {
+ // Force temporary through "impure" generator function
+ static RefCounted create() @trusted
+ {
+ __gshared int counter = 0;
+ return RefCounted(++counter > 0);
+ }
+
+ static int instances;
+ static int postblits;
+
+ this(bool) @safe
+ {
+ instances++;
+ }
+
+ this(this) @safe
+ {
+ instances++;
+ postblits++;
+ }
+
+ ~this() @safe
+ {
+ // make the dtor non-nothrow (we are tracking clean-ups during AssertError unwinding)
+ if (postblits > 100)
+ throw new Exception("");
+ assert(instances > 0);
+ instances--;
+ }
+
+ bool opEquals(RefCounted) @safe
+ {
+ return true;
+ }
+ }
+
+ {
+ auto a = RefCounted.create();
+ RefCounted.instances++; // we're about to construct an instance below, increment manually
+ assert(a == RefCounted()); // both operands are pure expressions => no temporaries
+ }
+
+ assert(RefCounted.instances == 0);
+ assert(RefCounted.postblits == 0);
+
+ {
+ auto a = RefCounted.create();
+ assert(a == RefCounted.create()); // impure rhs is promoted to a temporary lvalue => copy for a.opEquals(rhs)
+ }
+
+ assert(RefCounted.instances == 0);
+ assert(RefCounted.postblits == 1);
+ RefCounted.postblits = 0;
+
+ {
+ const msg = getMessage(assert(RefCounted.create() != RefCounted.create())); // both operands promoted to temporary lvalues
+ assert(msg == "RefCounted() == RefCounted()");
+ }
+
+ version (DMD_Win64) // FIXME: temporaries apparently not destructed when unwinding via AssertError
+ {
+ assert(RefCounted.instances >= 0 && RefCounted.instances <= 2);
+ RefCounted.instances = 0;
+ }
+ else
+ assert(RefCounted.instances == 0);
+ assert(RefCounted.postblits == 1);
+ RefCounted.postblits = 0;
+
+ static int numGetLvalImpureCalls = 0;
+ ref RefCounted getLvalImpure() @trusted
+ {
+ numGetLvalImpureCalls++;
+ __gshared lval = RefCounted(); // not incrementing RefCounted.instances
+ return lval;
+ }
+
+ {
+ const msg = getMessage(assert(getLvalImpure() != getLvalImpure())); // both operands promoted to ref temporaries
+ assert(msg == "RefCounted() == RefCounted()");
+ }
+
+ assert(numGetLvalImpureCalls == 2);
+ assert(RefCounted.instances == 0);
+ assert(RefCounted.postblits == 1);
+ RefCounted.postblits = 0;
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=21471
+void test21471()
+{
+ {
+ static struct S
+ {
+ S get()() const { return this; }
+ }
+
+ static auto f(S s) { return s; }
+
+ auto s = S();
+ assert(f(s.get) == s);
+ }
+ {
+ pragma(inline, true)
+ real exp(real x) pure nothrow
+ {
+ return x;
+ }
+
+ bool isClose(int lhs, real rhs) pure nothrow
+ {
+ return false;
+ }
+ auto c = 0;
+ assert(!isClose(c, exp(1)));
+ }
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=20581
+void test20581() @safe
+{
+ static auto retro(return scope int[] s) @safe
+ {
+ static struct R
+ {
+ int[] source;
+ }
+ return R(s);
+ }
+
+ int[5] a = [ 1, 2, 3, 4, 5 ];
+ // Creates ref temporary __assertTmpXXXX for source
+ // Error: address of variable a assigned to __assertOp27 with longer lifetime
+ assert(retro(a[]).source is a[]);
+}
+
+string getMessage(T)(lazy T expr) @trusted
+{
+ try
+ {
+ expr();
+ return null;
+ }
+ catch (Throwable t)
+ {
+ return t.msg;
+ }
+}
+
+void testMixinExpression() @safe
+{
+ static struct S
+ {
+ bool opEquals(S) @safe { return true; }
+ }
+
+ const msg = getMessage(assert(mixin("S() != S()")));
+ assert(msg == "S() == S()");
+}
+
+void testUnaryFormat()
+{
+ int zero = 0, one = 1;
+ assert(getMessage(assert(zero)) == "0 != true");
+ assert(getMessage(assert(!one)) == "1 == true");
+
+ assert(getMessage(assert(!cast(int) 1.5)) == "1 == true");
+
+ assert(getMessage(assert(!!__ctfe)) == "assert(__ctfe) failed!");
+
+ static struct S
+ {
+ int i;
+ bool opCast() const
+ {
+ return i < 2;
+ }
+ }
+
+ assert(getMessage(assert(S(4))) == "S(4) != true");
+
+ S s = S(4);
+ assert(getMessage(assert(*&s)) == "S(4) != true");
+
+ assert(getMessage(assert(--(++zero))) == "0 != true");
+}
+
+void testAssignments()
+{
+ int a = 1;
+ int b = 2;
+ assert(getMessage(assert(a -= --b)) == "0 != true");
+
+ static ref int c()
+ {
+ static int counter;
+ counter++;
+ return counter;
+ }
+
+ assert(getMessage(assert(--c())) == "0 != true");
+}
+
+/// https://issues.dlang.org/show_bug.cgi?id=21472
+void testTupleFormat()
+{
+ alias AliasSeq(T...) = T;
+
+ // Default usage
+ {
+ alias a = AliasSeq!(1, "ab");
+ alias b = AliasSeq!(false, "xyz");
+ assert(getMessage(assert(a == b)) == `(1, "ab") != (false, "xyz")`);
+ }
+
+ // Single elements work but are not formatted as tuples
+ // Is this acceptable? (a workaround would probably require a
+ // different name for the tuple formatting hook)
+ {
+ alias a = AliasSeq!(1, "ab", []);
+ alias b = AliasSeq!(false, "xyz", [1]);
+ assert(getMessage(assert(a == b)) == `(1, "ab", []) != (false, "xyz", [1])`);
+ }
+
+ // Also works with tupleof (as taken from the bug report)
+ {
+ static struct Var { int a, b; }
+ const a = Var(1, 2);
+ const b = Var(3, 4);
+ const msg = getMessage(assert(a.tupleof == b.tupleof));
+ assert(msg == `(1, 2) != (3, 4)`);
+ }
+
+ // Also works when creating temporaries for the TupleExp
+ {
+ static struct S
+ {
+ int a, b;
+ }
+
+ static S get()
+ {
+ static int i;
+ return S(i++, i++);
+ }
+
+ auto a = get().tupleof;
+ auto b = get().tupleof;
+
+ string msg = getMessage(assert(a == b));
+ assert(msg == `(0, 1) != (2, 3)`);
+
+ msg = getMessage(assert(get().tupleof == AliasSeq!(2, 3)));
+ assert(msg == `(4, 5) != (2, 3)`);
+
+ msg = getMessage(assert(get().tupleof == get().tupleof));
+ assert(msg == `(6, 7) != (8, 9)`);
+ }
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=21682
+void testStaticOperators()
+{
+ static class environment {
+ static bool opCmp(scope const(char)[] name)
+ {
+ return false;
+ }
+
+ static bool opBinaryRight(string op : "in")(scope const(char)[] name)
+ {
+ return false;
+ }
+ }
+
+ string msg = getMessage(assert(environment < "Hello"));
+ assert(msg == `"environment" >= "Hello"`);
+
+ msg = getMessage(assert("Hello" in environment));
+ assert(msg == `"Hello" !in "environment"`);
+}
+
+void main()
+{
+ test8765();
+ test9255();
+ test20114();
+ test20375();
+ test21471();
+ test20581();
+ testMixinExpression();
+ testUnaryFormat();
+ testAssignments();
+ testTupleFormat();
+ testStaticOperators();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/testassert_debug.d b/gcc/testsuite/gdc.test/runnable/testassert_debug.d
new file mode 100644
index 0000000..8817a96
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/testassert_debug.d
@@ -0,0 +1,26 @@
+/*
+https://issues.dlang.org/show_bug.cgi?id=21598
+
+REQUIRED_ARGS: -checkaction=context -debug
+PERMUTE_ARGS:
+*/
+
+void main()
+{
+ bool caught;
+ try
+ assert(foo(1));
+ catch (Throwable)
+ caught = true;
+
+ assert(caught);
+ assert(counter == 1);
+}
+
+__gshared int counter;
+
+int foo(int i) pure nothrow
+{
+ debug counter++;
+ return i - 1;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/testassign.d b/gcc/testsuite/gdc.test/runnable/testassign.d
index b000967..f47d2b2 100644
--- a/gcc/testsuite/gdc.test/runnable/testassign.d
+++ b/gcc/testsuite/gdc.test/runnable/testassign.d
@@ -1,4 +1,5 @@
/*
+REQUIRED_ARGS: -preview=rvaluerefparam
TEST_OUTPUT:
---
\ S1 S2a S2b S3a S3b S4a S4b
@@ -23,7 +24,7 @@ import core.stdc.stdio;
template TypeTuple(T...){ alias T TypeTuple; }
/***************************************************/
-// 2625
+// https://issues.dlang.org/show_bug.cgi?id=2625
struct Pair {
immutable uint g1;
@@ -36,7 +37,7 @@ void test1() {
}
/***************************************************/
-// 5327
+// https://issues.dlang.org/show_bug.cgi?id=5327
struct ID
{
@@ -154,12 +155,12 @@ void test3()
}
/***************************************************/
-// 3511
+// https://issues.dlang.org/show_bug.cgi?id=3511
struct S4
{
private int _prop = 42;
- ref int property() { return _prop; }
+ ref int property() return { return _prop; }
}
void test4()
@@ -177,11 +178,11 @@ struct S5
int mX;
string mY;
- ref int x()
+ ref int x() return
{
return mX;
}
- ref string y()
+ ref string y() return
{
return mY;
}
@@ -230,7 +231,7 @@ void test5()
}
/***************************************************/
-// 4424
+// https://issues.dlang.org/show_bug.cgi?id=4424
void test4424()
{
@@ -242,7 +243,7 @@ void test4424()
}
/***************************************************/
-// 6174
+// https://issues.dlang.org/show_bug.cgi?id=6174
struct CtorTest6174(Data)
{
@@ -464,12 +465,12 @@ void test6174c()
static assert(!is(typeof({
int func1a(int n)
in{ n = 10; }
- body { return n; }
+ do { return n; }
})));
static assert(!is(typeof({
int func1b(int n)
out(r){ r = 20; }
- body{ return n; }
+ do{ return n; }
})));
struct DataX
@@ -479,18 +480,18 @@ void test6174c()
static assert(!is(typeof({
DataX func2a(DataX n)
in{ n.x = 10; }
- body { return n; }
+ do { return n; }
})));
static assert(!is(typeof({
DataX func2b(DataX n)
in{}
out(r){ r.x = 20; }
- body{ return n; }
+ do{ return n; }
})));
}
/***************************************************/
-// 6216
+// https://issues.dlang.org/show_bug.cgi?id=6216
void test6216a()
{
@@ -658,7 +659,7 @@ void test6216e()
}
/***************************************************/
-// 6286
+// https://issues.dlang.org/show_bug.cgi?id=6286
void test6286()
{
@@ -672,7 +673,7 @@ void test6286()
}
/***************************************************/
-// 6336
+// https://issues.dlang.org/show_bug.cgi?id=6336
void test6336()
{
@@ -701,7 +702,7 @@ void test6336()
}
/***************************************************/
-// 8783
+// https://issues.dlang.org/show_bug.cgi?id=8783
struct Foo8783
{
@@ -719,7 +720,7 @@ static this()
}
/***************************************************/
-// 9077
+// https://issues.dlang.org/show_bug.cgi?id=9077
struct S9077a
{
@@ -735,17 +736,17 @@ struct S9077b
}
/***************************************************/
-// 9140
+// https://issues.dlang.org/show_bug.cgi?id=9140
immutable(int)[] bar9140()
out(result) {
foreach (ref r; result) {}
-} body {
+} do {
return null;
}
/***************************************************/
-// 9154
+// https://issues.dlang.org/show_bug.cgi?id=9154
struct S9154a
{
@@ -770,7 +771,7 @@ void test9154()
}
/***************************************************/
-// 9258
+// https://issues.dlang.org/show_bug.cgi?id=9258
class A9258 {}
class B9258 : A9258 // Error: class test.B9258 identity assignment operator overload is illegal
@@ -797,7 +798,7 @@ class E9258 : A9258
}
/***************************************************/
-// 9416
+// https://issues.dlang.org/show_bug.cgi?id=9416
struct S9416
{
@@ -818,7 +819,7 @@ void test9416()
}
/***************************************************/
-// 9658
+// https://issues.dlang.org/show_bug.cgi?id=9658
struct S9658
{
@@ -830,7 +831,7 @@ struct S9658
}
/***************************************************/
-// 11187
+// https://issues.dlang.org/show_bug.cgi?id=11187
void test11187()
{
@@ -850,7 +851,7 @@ void test11187()
}
/***************************************************/
-// 12131
+// https://issues.dlang.org/show_bug.cgi?id=12131
struct X12131
{
@@ -872,7 +873,7 @@ void test12131() pure
}
/***************************************************/
-// 12211
+// https://issues.dlang.org/show_bug.cgi?id=12211
void test12211()
{
@@ -891,12 +892,12 @@ void test12211()
// array ops should make rvalue
int[3] sa, sb;
void bar(ref int[]) {}
- static assert(!__traits(compiles, bar(sa[] = sb[])));
- static assert(!__traits(compiles, bar(sa[] += sb[])));
+ static assert(__traits(compiles, bar(sa[] = sb[])));
+ static assert(__traits(compiles, bar(sa[] += sb[])));
}
/***************************************************/
-// 4791 (dup of 12212)
+// https://issues.dlang.org/show_bug.cgi?id=4791 (dup of 12212)
void test4791()
{
@@ -925,7 +926,7 @@ void test4791()
}
/***************************************************/
-// 12212
+// https://issues.dlang.org/show_bug.cgi?id=12212
void test12212()
{
@@ -1013,7 +1014,7 @@ void test12212()
}
/***************************************************/
-// 12650
+// https://issues.dlang.org/show_bug.cgi?id=12650
void test12650()
{
@@ -1083,7 +1084,7 @@ void test12650()
}
/***************************************************/
-// 13044
+// https://issues.dlang.org/show_bug.cgi?id=13044
void test13044()
{
@@ -1106,7 +1107,7 @@ void test13044()
}
/***************************************************/
-// 12500
+// https://issues.dlang.org/show_bug.cgi?id=12500
void test12500()
{
@@ -1115,7 +1116,7 @@ void test12500()
}
/***************************************************/
-// 14672
+// https://issues.dlang.org/show_bug.cgi?id=14672
void test14672()
{
@@ -1150,7 +1151,7 @@ void test14672()
}
/***************************************************/
-// 15044
+// https://issues.dlang.org/show_bug.cgi?id=15044
void destroy15044(T)(ref T obj)
{
@@ -1166,7 +1167,7 @@ struct V15044
{
}
- RC15044!V15044 dup()
+ RC15044!V15044 dup() return
{
return RC15044!V15044(&this);
}
diff --git a/gcc/testsuite/gdc.test/runnable/testbitarray.d b/gcc/testsuite/gdc.test/runnable/testbitarray.d
deleted file mode 100644
index 8a34f88..0000000
--- a/gcc/testsuite/gdc.test/runnable/testbitarray.d
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUNNABLE_PHOBOS_TEST
-// PERMUTE_ARGS:
-
-import std.bitmanip;
-
-void main() {
- BitArray a;
- a.length = 5;
- foreach (ref bool b; a) {
- assert (b == 0);
- b = 1;
- }
- foreach (bool b; a)
- assert (b == 1); // FAILS, they're all 0
-}
-
-
diff --git a/gcc/testsuite/gdc.test/runnable/testbounds.d b/gcc/testsuite/gdc.test/runnable/testbounds.d
index b23c88f..bb9e54d 100644
--- a/gcc/testsuite/gdc.test/runnable/testbounds.d
+++ b/gcc/testsuite/gdc.test/runnable/testbounds.d
@@ -1,3 +1,9 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
// REQUIRED_ARGS:
// Test array bounds checking
@@ -179,44 +185,63 @@ void test1()
}
/******************************************/
-// 13976
+// https://issues.dlang.org/show_bug.cgi?id=13976
void test13976()
{
int[] da = new int[](10);
int[10] sa;
- size_t l = 0; // upperInRange
- size_t u = 9; // | lowerLessThan
- // | | check code
- { auto s = da[l .. u]; } // 0 0 (u <= 10 && l <= u )
- { auto s = da[1 .. u]; } // 0 0 (u <= 10 && l <= u )
- { auto s = da[l .. 10]; } // 0 0 (u <= 10 && l <= u )
- { auto s = da[1 .. u%5]; } // 0 0 (u <= 10 && l <= u%5)
-
- { auto s = da[l .. u]; } // 0 0 (u <= 10 && l <= u)
- { auto s = da[0 .. u]; } // 0 1 (u <= 10 )
- { auto s = da[l .. 10]; } // 0 0 (u <= 10 && l <= u)
- { auto s = da[0 .. u%5]; } // 0 1 (u%5 <= 10 )
-
- { auto s = sa[l .. u]; } // 0 0 (u <= 10 && l <= u )
- { auto s = sa[1 .. u]; } // 0 0 (u <= 10 && l <= u )
- { auto s = sa[l .. 10]; } // 1 0 ( l <= u )
- { auto s = sa[1 .. u%5]; } // 1 0 ( l <= u%5)
-
- { auto s = sa[l .. u]; } // 0 0 (u <= 10 && l <= u )
- { auto s = sa[0 .. u]; } // 0 1 (u <= 10 )
- { auto s = sa[l .. 10]; } // 1 0 ( l <= 10)
- { auto s = sa[0 .. u%5]; } // 1 1 NULL
+ enum size_t two = 2;
+ enum size_t five = 5;
+ size_t lb = 0; // upperInRange
+ size_t ub = 9; // | lowerLessThan
+ // | | check code
+ { auto s = da[lb .. ub]; } // 0 0 (ub <= $ && lb <= ub )
+ { auto s = da[1 .. ub]; } // 0 0 (ub <= $ && 1 <= ub )
+ { auto s = da[lb .. 10]; } // 0 0 (10 <= $ && lb <= 10 )
+ { auto s = da[1 .. ub%5]; } // 0 0 (ub%5 <= $ && 1 <= ub%5)
+
+ { auto s = da[lb .. ub]; } // 0 0 (ub <= $ && lb <= ub )
+ { auto s = da[0 .. ub]; } // 0 1 (ub <= $ )
+ { auto s = da[lb .. 10]; } // 0 0 (10 <= $ && lb <= 10 )
+ { auto s = da[0 .. ub%5]; } // 0 1 (ub%5 <= $ )
+
+ { auto s = da[0 .. 0]; } // 1 1 NULL
+ { auto s = da[0 .. $]; } // 1 1 NULL
+ { auto s = da[1 .. $]; } // 1 0 ( 1 <= $ )
+ { auto s = da[$ .. $]; } // 1 0 ( $ <= $ )
+ { auto s = da[0 .. $/two]; } // 0 1 ($/2 <= $ )
+ { auto s = da[$/two .. $]; } // 1 0 ( $/2 <= $ )
+ { auto s = da[$/five .. $/two]; } // 0 0 ($/2 <= $ && $/5 <= $/2)
+
+ { auto s = sa[lb .. ub]; } // 0 0 (ub <= 10 && lb <= ub )
+ { auto s = sa[1 .. ub]; } // 0 0 (ub <= 10 && 1 <= ub )
+ { auto s = sa[lb .. 10]; } // 1 0 ( lb <= 10 )
+ { auto s = sa[1 .. ub%5]; } // 1 0 ( 1 <= ub%5)
+
+ { auto s = sa[lb .. ub]; } // 0 0 (ub <= 10 && lb <= ub )
+ { auto s = sa[0 .. ub]; } // 0 1 (ub <= 10 )
+ { auto s = sa[lb .. 10]; } // 1 0 ( lb <= 10 )
+ { auto s = sa[0 .. ub%5]; } // 1 1 NULL
+
+ { auto s = sa[0 .. 0]; } // 1 1 NULL
+ { auto s = sa[0 .. $]; } // 1 1 NULL
+ { auto s = sa[1 .. $]; } // 1 1 NULL
+ { auto s = sa[$ .. $]; } // 1 1 NULL
+ { auto s = sa[0 .. $/two]; } // 1 1 NULL
+ { auto s = sa[$/two .. $]; } // 1 1 NULL
+ { auto s = sa[$/five .. $/two]; } // 1 1 NULL
int* p = new int[](10).ptr;
- { auto s = p[0 .. u]; } // 1 1 NULL
- { auto s = p[l .. u]; } // 1 0 (l <= u)
- { auto s = p[0 .. u%5]; } // 1 1 NULL
- { auto s = p[1 .. u%5]; } // 1 0 (l <= u%5)
+ { auto s = p[0 .. ub]; } // 1 1 NULL
+ { auto s = p[lb .. ub]; } // 1 0 (lb <= ub )
+ { auto s = p[0 .. ub%5]; } // 1 1 NULL
+ { auto s = p[1 .. ub%5]; } // 1 0 (1 <= ub%5)
+ { auto s = p[0 .. 0]; } // 1 1 NULL
}
/******************************************/
-// 3652
+// https://issues.dlang.org/show_bug.cgi?id=3652
void test3652()
{
@@ -340,7 +365,7 @@ void test3652b() @safe
}
/**********************************/
-// 9654
+// https://issues.dlang.org/show_bug.cgi?id=9654
auto foo9654a(ref char[8] str) { return str; }
auto foo9654b(ref const char[8] str) { return str; }
@@ -364,7 +389,7 @@ static assert( is(typeof(baz9654b("testinfo")) == const char[8]));
static assert( is(typeof(baz9654c("testinfo")) == immutable char[8]));
/******************************************/
-// 9712
+// https://issues.dlang.org/show_bug.cgi?id=9712
auto func9712(T)(T[2] arg) { return arg; }
static assert(is(typeof(func9712([1,2])) == int[2]));
@@ -373,7 +398,7 @@ auto deduceLength9712(T,size_t n)(T[n] a) { return a; }
static assert(is(typeof(deduceLength9712([1,2,3])) == int[3]));
/******************************************/
-// 9743
+// https://issues.dlang.org/show_bug.cgi?id=9743
void test9743()
{
@@ -436,7 +461,7 @@ void test9743()
}
/******************************************/
-// 9747
+// https://issues.dlang.org/show_bug.cgi?id=9747
void foo9747A(T)(T[4]) {}
void foo9747C(size_t dim)(char[dim]) {}
@@ -454,7 +479,7 @@ void test9747()
}
/******************************************/
-// 12876
+// https://issues.dlang.org/show_bug.cgi?id=12876
void test12876()
{
@@ -467,24 +492,24 @@ void test12876()
}
/******************************************/
-// 13775
+// https://issues.dlang.org/show_bug.cgi?id=13775
void test13775()
{
ubyte[4] ubytes = [1,2,3,4];
- // CT-known slicing (issue 3652)
+ // CT-known slicing (https://issues.dlang.org/show_bug.cgi?id=3652)
auto ok1 = cast(ubyte[2]) ubytes[0 .. 2];
assert(ok1 == [1, 2]);
- // CT-known slicing with implicit conversion of SliceExp::e1 (issue 13154)
+ // CT-known slicing with implicit conversion of SliceExp::e1 (https://issues.dlang.org/show_bug.cgi?id=13154)
enum double[] arr = [1.0, 2.0, 3.0];
auto ok2 = cast(float[2]) [1.0, 2.0, 3.0][0..2];
auto ok3 = cast(float[2]) arr[1..3]; // currently this is accepted
assert(ok2 == [1f, 2f]);
assert(ok3 == [2f, 3f]);
- // CT-known slicing with type coercing (issue 13775)
+ // CT-known slicing with type coercing (https://issues.dlang.org/show_bug.cgi?id=13775)
auto ok4 = cast( byte[2]) ubytes[0 .. 2]; // CT-known slicing + type coercing
auto ok5 = cast(short[1]) ubytes[0 .. 2]; // CT-known slicing + type coercing
assert(ok4 == [1, 2]);
@@ -493,6 +518,29 @@ void test13775()
}
/******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15889
+// Array bounds check should report index and length
+void test15889()
+{
+ int[] a = new int[2];
+
+ try {
+ a[3] = 40;
+ } catch (ArrayIndexError e) {
+ assert(e.index == 3);
+ assert(e.length == 2);
+ }
+
+ try {
+ a[1 .. 4] = 50;
+ } catch (ArraySliceError e) {
+ assert(e.lower == 1);
+ assert(e.upper == 4);
+ assert(e.length == 2);
+ }
+}
+
+/******************************************/
int main()
{
@@ -504,6 +552,7 @@ int main()
test9743();
test9747();
test13775();
+ test15889();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/testbtst.d b/gcc/testsuite/gdc.test/runnable/testbtst.d
new file mode 100644
index 0000000..a6967f6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/testbtst.d
@@ -0,0 +1,156 @@
+/* PERMUTE_ARGS: -O
+ * https://issues.dlang.org/show_bug.cgi?id=19813
+ */
+
+struct BitArray
+{
+ import core.bitop : btc, bts, btr, bsf, bt;
+
+ size_t _len;
+ size_t* _ptr;
+ enum bitsPerSizeT = size_t.sizeof * 8;
+
+ static size_t lenToDim(size_t len) @nogc pure nothrow @safe
+ {
+ return (len + (bitsPerSizeT-1)) / bitsPerSizeT;
+ }
+
+ this(in bool[] ba) nothrow pure
+ {
+ length = ba.length;
+ foreach (i, b; ba)
+ {
+ if (b)
+ bts(_ptr, i);
+ else
+ btr(_ptr, i);
+ }
+ }
+
+ @property size_t length(size_t newlen) pure nothrow @system
+ {
+ if (newlen != _len)
+ {
+ size_t olddim = lenToDim(_len);
+ immutable newdim = lenToDim(newlen);
+
+ if (newdim != olddim)
+ {
+ // Create a fake array so we can use D's realloc machinery
+ auto b = _ptr[0 .. olddim];
+ b.length = newdim; // realloc
+ _ptr = b.ptr;
+ }
+
+ _len = newlen;
+ }
+ return _len;
+ }
+
+ int opCmp(ref BitArray a2) const @nogc pure nothrow
+ {
+ const lesser = this._len < a2._len ? &this : &a2;
+ immutable fullWords = lesser._len / lesser.bitsPerSizeT;
+ immutable endBits = lesser._len % lesser.bitsPerSizeT;
+ auto p1 = this._ptr;
+ auto p2 = a2._ptr;
+
+ foreach (i; 0 .. fullWords)
+ {
+ if (p1[i] != p2[i])
+ {
+ return p1[i] & (size_t(1) << bsf(p1[i] ^ p2[i])) ? 1 : -1;
+ }
+ }
+
+ if (endBits)
+ {
+ immutable i = fullWords;
+ immutable diff = p1[i] ^ p2[i];
+ if (diff)
+ {
+ immutable index = bsf(diff);
+ if (index < endBits)
+ {
+ // This gets optimized into OPbtst, and was doing it incorrectly
+ return p1[i] & (size_t(1) << index) ? 1 : -1;
+ }
+ }
+ }
+
+ return -1;
+ }
+}
+
+void test1()
+{
+ bool[] ba = [1,0,1,0,1];
+ bool[] bd = [1,0,1,1,1];
+
+ auto a = BitArray(ba);
+ auto d = BitArray(bd);
+
+ assert(a < d);
+}
+
+/***************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=18748
+
+int bt_32_imm(in uint* p)
+{
+ enum bitnum = 1;
+ return ((p[bitnum >> 5] & (1 << (bitnum & 31)))) != 0;
+}
+
+void test18748()
+{
+ version (linux)
+ {
+ import core.sys.posix.sys.mman;
+ import core.sys.posix.unistd;
+ // Allocate two pages.
+ immutable sz = 2 * sysconf(_SC_PAGESIZE);
+ auto m = mmap(null, sz, PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0);
+ // Discard the higher page. It becomes unreadable.
+ munmap(m + sz / 2, sz / 2);
+ // Try looking at the last 4 bytes of the readable page.
+ uint* p = cast(uint*) (m + sz / 2 - uint.sizeof);
+ bt_32_imm(p);
+ munmap(m, sz / 2); // Free the readable page.
+ }
+}
+
+/***************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=18749
+
+ulong f(ulong* p, uint shift)
+{
+ return (*p >> shift) & 1;
+}
+
+ulong g(ulong* p, ulong shift)
+{
+ return f(p, cast(uint) shift);
+}
+
+void test18749()
+{
+ enum shift = uint.max + 1L;
+ assert(cast(uint) shift == 0);
+ ulong s = 1;
+ assert(g(&s, shift));
+}
+
+
+/***************************************/
+
+int main()
+{
+ test1();
+ test18748();
+ test18749();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/testcgelem.d b/gcc/testsuite/gdc.test/runnable/testcgelem.d
new file mode 100644
index 0000000..617e3fb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/testcgelem.d
@@ -0,0 +1,47 @@
+/*
+REQUIRED_ARGS: -mcpu=native
+PERMUTE_ARGS: -O -inline -release
+*/
+
+/***
+ * Do coverage testing of cgelem.d
+ * Check coverage here:
+ * https://codecov.io/gh/dlang/dmd/src/master/src/dmd/backend/cgelem.d
+ */
+
+import core.stdc.stdio;
+
+template tuple(A...) { alias tuple = A; }
+
+/*************************************************/
+
+void test_eladdr()
+{
+ // & (*p1 = e) => ((*(t = p1) = e), t)
+ int i = 4;
+ int* p1 = &i;
+ int e = 5;
+ auto x = &(*p1 = e);
+ assert(i == 5);
+ assert(x == p1);
+}
+
+/*************************************************/
+
+void test_elneg()
+{
+ static int i = 3;
+ int j = - -i;
+ assert(i == j);
+}
+
+/*************************************************/
+
+int main()
+{
+ test_eladdr();
+ test_elneg();
+
+ printf("Success\n");
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/testclass.d b/gcc/testsuite/gdc.test/runnable/testclass.d
index c5480da..cd8dd84 100644
--- a/gcc/testsuite/gdc.test/runnable/testclass.d
+++ b/gcc/testsuite/gdc.test/runnable/testclass.d
@@ -1,7 +1,13 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
extern(C) int printf(const char*, ...);
/******************************************/
-// 12078
+// https://issues.dlang.org/show_bug.cgi?id=12078
class B12078(T)
{
@@ -26,7 +32,7 @@ void test12078()
}
/******************************************/
-// 12143
+// https://issues.dlang.org/show_bug.cgi?id=12143
class Node12143
{
@@ -39,7 +45,7 @@ class Type12143 : Node12143 {}
class Class12143 : Type12143 {}
/***************************************************/
-// 13353
+// https://issues.dlang.org/show_bug.cgi?id=13353
interface Base13353(T)
{
@@ -57,7 +63,7 @@ class Concrete13353 : Derived13353
}
/***************************************************/
-// 15733
+// https://issues.dlang.org/show_bug.cgi?id=15733
class CStmt15733 : CNode15733 {}
class CDecl15733 : CStmt15733 {}
@@ -71,8 +77,48 @@ template IMix(T){ mixin("static " ~ T.stringof ~ " x;"); }
/***************************************************/
+// https://issues.dlang.org/show_bug.zip?id=20716
+
+extern(C++):
+
+struct S20716
+{
+ void* s;
+ ~this() {}
+ // or this(this) {}
+}
+
+interface I20716
+{
+ S20716 x();
+}
+
+final class C20716 : I20716
+{
+ int l = 3;
+
+ S20716 x()
+ {
+ //printf("this = %p, %p\n", this, &this.l);
+ assert(l == 3); //fails
+ return S20716.init;
+ }
+}
+
+extern(D):
+
+void test20716()
+{
+ auto s = new C20716().x;
+ auto t = new C20716().I20716.x;
+}
+
+/***************************************************/
+
int main()
{
+ test20716();
+
printf("Success\n");
return 0;
}
diff --git a/gcc/testsuite/gdc.test/runnable/testconst.d b/gcc/testsuite/gdc.test/runnable/testconst.d
index 7ec4245..764bb1b 100644
--- a/gcc/testsuite/gdc.test/runnable/testconst.d
+++ b/gcc/testsuite/gdc.test/runnable/testconst.d
@@ -53,7 +53,7 @@ template TypeTuple(T...) { alias T TypeTuple; }
void showf(string f)
{
- printf("%.*s\n", f.length, f.ptr);
+ printf("%.*s\n", cast(int)f.length, f.ptr);
}
/************************************/
@@ -626,7 +626,7 @@ class C42
void test42()
{
- printf("%d\n", C42.classinfo.initializer.length);
+ printf("%zd\n", C42.classinfo.initializer.length);
assert(C42.classinfo.initializer.length == 12 + (void*).sizeof +
(void*).sizeof);
C42 c = new C42;
@@ -963,7 +963,7 @@ void test56()
{
S56 s;
S56 t;
- printf("S56.sizeof = %d\n", S56.sizeof);
+ printf("S56.sizeof = %zd\n", S56.sizeof);
//t = s;
}
@@ -1574,7 +1574,7 @@ void test87()
}
/************************************/
-// 2751
+// https://issues.dlang.org/show_bug.cgi?id=2751
void test88(immutable(int[3]) a)
@@ -1603,7 +1603,7 @@ void test88(immutable(int[3]) a)
}
/************************************/
-// 3748
+// https://issues.dlang.org/show_bug.cgi?id=3748
// version = error8;
// version = error11;
@@ -1878,7 +1878,7 @@ void test3748c(inout int = 1)
}
/************************************/
-// 4968
+// https://issues.dlang.org/show_bug.cgi?id=4968
void test4968()
{
@@ -1924,7 +1924,7 @@ void test4968()
}
/************************************/
-// 1961
+// https://issues.dlang.org/show_bug.cgi?id=1961
inout(char)[] strstr(inout(char)[] source, const(char)[] pattern)
{
@@ -2042,7 +2042,7 @@ void test88()
}
/************************************/
-// 4251
+// https://issues.dlang.org/show_bug.cgi?id=4251
void test4251a()
{
@@ -2185,7 +2185,7 @@ void test4251b()
}
/************************************/
-// 5473
+// https://issues.dlang.org/show_bug.cgi?id=5473
void test5473()
{
@@ -2227,7 +2227,7 @@ void test5473()
}
/************************************/
-// 5493
+// https://issues.dlang.org/show_bug.cgi?id=5493
void test5493()
{
@@ -2282,7 +2282,7 @@ void test5493()
}
/************************************/
-// 5493 + inout
+// https://issues.dlang.org/show_bug.cgi?id=5493 + inout
void test5493inout()
{
@@ -2330,7 +2330,7 @@ void test5493inout()
}
/************************************/
-// 6782
+// https://issues.dlang.org/show_bug.cgi?id=6782
struct Tuple6782(T...)
{
@@ -2368,7 +2368,7 @@ void test6782()
}
/************************************/
-// 6864
+// https://issues.dlang.org/show_bug.cgi?id=6864
int fn6864( const int n) { return 1; }
int fn6864(shared int n) { return 2; }
@@ -2387,7 +2387,7 @@ void test6864()
}
/************************************/
-// 6865
+// https://issues.dlang.org/show_bug.cgi?id=6865
shared(inout(int)) foo6865(shared(inout(int)) n){ return n; }
void test6865()
@@ -2397,7 +2397,7 @@ void test6865()
}
/************************************/
-// 6866
+// https://issues.dlang.org/show_bug.cgi?id=6866
struct S6866
{
@@ -2414,7 +2414,7 @@ void test6866()
}
/************************************/
-// 6867
+// https://issues.dlang.org/show_bug.cgi?id=6867
inout(char)[] test6867(inout(char)[] a)
{
@@ -2428,7 +2428,7 @@ inout(char)[] test6867(inout(char)[] a)
}
/************************************/
-// 6870
+// https://issues.dlang.org/show_bug.cgi?id=6870
void test6870()
{
@@ -2440,7 +2440,8 @@ void test6870()
}
/************************************/
-// 6338, 6922
+// https://issues.dlang.org/show_bug.cgi?id=6338
+// https://issues.dlang.org/show_bug.cgi?id=6922
alias int T;
@@ -2468,7 +2469,7 @@ static assert(is( inout(shared(immutable(T))) == immutable(T) ));
static assert(is( inout(immutable(shared(T))) == immutable(T) ));
/************************************/
-// 6912
+// https://issues.dlang.org/show_bug.cgi?id=6912
void test6912()
{
@@ -2585,7 +2586,7 @@ void test6912()
}
/************************************/
-// 6930
+// https://issues.dlang.org/show_bug.cgi?id=6930
void test6930a()
{
@@ -2657,7 +2658,7 @@ void test6930b(inout int = 0)
}
/************************************/
-// 11868
+// https://issues.dlang.org/show_bug.cgi?id=11868
void f11868(A...)(A) { }
@@ -2673,7 +2674,7 @@ void test11868()
}
/************************************/
-// 11924
+// https://issues.dlang.org/show_bug.cgi?id=11924
inout(StringType) localize11924(StringType)(inout StringType str, string locale)
{
@@ -2695,7 +2696,7 @@ struct S11924
}
/************************************/
-// 11966
+// https://issues.dlang.org/show_bug.cgi?id=11966
inout(char)[] stripped11966 (inout(char)[] path)
{
@@ -2721,7 +2722,7 @@ void test11966()
}
/************************************/
-// 14788
+// https://issues.dlang.org/show_bug.cgi?id=14788
auto make14788(K, V)(inout V[K] aa)
{
@@ -2740,7 +2741,7 @@ void test14788()
}
/************************************/
-// 12089
+// https://issues.dlang.org/show_bug.cgi?id=12089
void foo12089(inout(char[]) a)
{
@@ -2754,7 +2755,7 @@ void decodeImpl12089(S)(auto ref S str)
{}
/************************************/
-// 12524
+// https://issues.dlang.org/show_bug.cgi?id=12524
inout(int) dup12524(inout(const(int)) val)
{
@@ -2771,7 +2772,7 @@ void test12524(inout(int))
}
/************************************/
-// 6941
+// https://issues.dlang.org/show_bug.cgi?id=6941
static assert((const(shared(int[])[])).stringof == "const(shared(int[])[])"); // fail
static assert((const(shared(int[])[])).stringof != "const(shared(const(int[]))[])"); // fail
@@ -2780,7 +2781,7 @@ static assert((inout(shared(int[])[])).stringof == "inout(shared(int[])[])");
static assert((inout(shared(int[])[])).stringof != "inout(shared(inout(int[]))[])"); // fail
/************************************/
-// 6872
+// https://issues.dlang.org/show_bug.cgi?id=6872
static assert((shared(inout(int)[])).stringof == "shared(inout(int)[])");
static assert((shared(inout(const(int)[]))).stringof == "shared(inout(const(int)[]))");
@@ -2788,7 +2789,7 @@ static assert((shared(inout(const(int)[])[])).stringof == "shared(inout(const(in
static assert((shared(inout(const(immutable(int)[])[])[])).stringof == "shared(inout(const(immutable(int)[])[])[])");
/************************************/
-// 6939
+// https://issues.dlang.org/show_bug.cgi?id=6939
void test6939()
{
@@ -2808,7 +2809,7 @@ void test6939()
}
/************************************/
-// 6940
+// https://issues.dlang.org/show_bug.cgi?id=6940
void test6940()
{
@@ -2830,7 +2831,7 @@ void test6940()
}
/************************************/
-// 6982
+// https://issues.dlang.org/show_bug.cgi?id=6982
void test6982()
{
@@ -2847,7 +2848,7 @@ void test6982()
}
/************************************/
-// 7038
+// https://issues.dlang.org/show_bug.cgi?id=7038
static assert(is(S7038 == const));
const struct S7038{ int x; }
@@ -2859,9 +2860,11 @@ static assert(is(S7038b == shared));
immutable struct S7038c{ int x; }
static assert(is(S7038c == immutable));
-static assert(!is(C7038 == const));
+// https://issues.dlang.org/show_bug.cgi?id=22515
+// Classes fixed for consistency with structs
+static assert(is(C7038 == const));
const class C7038{ int x; }
-static assert(!is(C7038 == const));
+static assert(is(C7038 == const));
void test7038()
{
@@ -2870,12 +2873,12 @@ void test7038()
static assert(is(typeof(s.x) == const int));
C7038 c;
- static assert(!is(typeof(c) == const));
+ static assert(is(typeof(c) == const));
static assert(is(typeof(c.x) == const int));
}
/************************************/
-// 7105
+// https://issues.dlang.org/show_bug.cgi?id=7105
void copy(inout(int)** tgt, inout(int)* src){ *tgt = src; }
@@ -2909,11 +2912,11 @@ void test7105()
}
/************************************/
-// 7202
+// https://issues.dlang.org/show_bug.cgi?id=7202
void test7202()
{
- void writeln(string s) @system { printf("%.*s\n", s.length, s.ptr); }
+ void writeln(string s) @system { printf("%.*s\n", cast(int)s.length, s.ptr); }
void delegate() @system x = { writeln("I am @system"); };
void delegate() @safe y = { };
auto px = &x;
@@ -2924,7 +2927,7 @@ void test7202()
}
/************************************/
-// 7554
+// https://issues.dlang.org/show_bug.cgi?id=7554
T outer7554(T)(immutable T function(T) pure foo) pure {
pure int inner() {
@@ -2957,7 +2960,7 @@ void test7518() {
}
/************************************/
-// 7669
+// https://issues.dlang.org/show_bug.cgi?id=7669
shared(inout U)[n] id7669(U, size_t n)( shared(inout U)[n] );
void test7669()
@@ -2966,7 +2969,7 @@ void test7669()
}
/************************************/
-// 7757
+// https://issues.dlang.org/show_bug.cgi?id=7757
inout(int) foo7757a(int x, lazy inout(int) def) { return def; }
inout(int)[] foo7757b(int x, lazy inout(int)[] def) { return def; }
@@ -2999,7 +3002,7 @@ void test7757()
}
/************************************/
-// 8098
+// https://issues.dlang.org/show_bug.cgi?id=8098
class Outer8098
{
@@ -3033,7 +3036,7 @@ void test8098()
}
/************************************/
-// 8099
+// https://issues.dlang.org/show_bug.cgi?id=8099
void test8099()
{
@@ -3068,7 +3071,7 @@ void test8099()
}
/************************************/
-// 8201
+// https://issues.dlang.org/show_bug.cgi?id=8201
void test8201()
{
@@ -3080,7 +3083,7 @@ void test8201()
}
/************************************/
-// 8212
+// https://issues.dlang.org/show_bug.cgi?id=8212
struct S8212 { int x; }
@@ -3095,7 +3098,7 @@ void test8212()
}
/************************************/
-// 8366
+// https://issues.dlang.org/show_bug.cgi?id=8366
class B8366
{
@@ -3115,7 +3118,7 @@ class C8366a : B8366
class C8366b : B8366
{
bool foo(in Object o) { return false; }
- alias super.foo foo;
+ alias typeof(super).foo foo;
bool foo(in Object o) immutable { return false; }
bool foo(in Object o) shared { return false; }
bool foo(in Object o) shared const { return false; }
@@ -3146,7 +3149,7 @@ void test8366()
}
/************************************/
-// 8408
+// https://issues.dlang.org/show_bug.cgi?id=8408
template hasMutableIndirection8408(T)
{
@@ -3211,18 +3214,20 @@ void test8408()
struct T2 { S2 s; }
struct T3 { S1 s1; S2 s2; }
- test!(int , true )();
- test!(int[3], true )();
+/*
+ test!(int , false)();
+ test!(int[3], false)();
test!(C , false)();
- test!(S1 , true )();
+ test!(S1 , false)();
test!(S2 , false)();
- test!(T1 , true )();
+ test!(T1 , false)();
test!(T2 , false)();
test!(T3 , false)();
+*/
}
/************************************/
-// 8688
+// https://issues.dlang.org/show_bug.cgi?id=8688
void test8688()
{
@@ -3236,7 +3241,7 @@ void test8688()
}
/************************************/
-// 10946 (regression by fixing bug 8688, from 2.061)
+// https://issues.dlang.org/show_bug.cgi?id=10946 (regression by fixing bug 8688, from 2.061)
enum xlen10946 = 4;
alias immutable(char)[xlen10946] e3;
@@ -3246,12 +3251,12 @@ alias immutable(char)[vlen10946] i3;
alias immutable(char[vlen10946]) i4; // NG -> OK
/************************************/
-// 9046
+// https://issues.dlang.org/show_bug.cgi?id=9046
void test9046()
{
foreach (T; TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong, char, wchar, dchar,
- float, double, real, ifloat, idouble, ireal, cfloat, cdouble, creal))
+ float, double, real))
foreach (U; TypeTuple!(T, const T, immutable T, shared T, shared const T, inout T, shared inout T))
{
static assert(is(typeof(U.init) == U));
@@ -3285,7 +3290,7 @@ void test9046()
}
/************************************/
-// 9090
+// https://issues.dlang.org/show_bug.cgi?id=9090
void test9090()
{
@@ -3296,7 +3301,7 @@ void test9090()
}
/************************************/
-// 9461
+// https://issues.dlang.org/show_bug.cgi?id=9461
void test9461()
{
@@ -3328,15 +3333,15 @@ void test9209() {
}
/************************************/
-// 10758
+// https://issues.dlang.org/show_bug.cgi?id=10758
struct X10758
{
static:
inout(int) screwUpVal(ref inout(int) wx) { return wx; }
- ref inout(int) screwUpRef(ref inout(int) wx) { return wx; }
- inout(int)* screwUpPtr(ref inout(int) wx) { return &wx; }
- inout(int)[] screwUpArr(ref inout(int) wx) { return (&wx)[0 .. 1]; }
+ ref inout(int) screwUpRef(return ref inout(int) wx) { return wx; }
+ inout(int)* screwUpPtr(return ref inout(int) wx) { return &wx; }
+ inout(int)[] screwUpArr(return ref inout(int) wx) { return (&wx)[0 .. 1]; }
}
struct S10758
@@ -3471,7 +3476,7 @@ void test10758(ref inout(int) wx, inout(int)* wp, inout(int)[] wa, inout(S10758)
}
/************************************/
-// 10761
+// https://issues.dlang.org/show_bug.cgi?id=10761
inout(int)* function(inout(int)*) fptr10761(inout(int)*)
{
@@ -3545,7 +3550,7 @@ void test10761()
}
/************************************/
-// 11226
+// https://issues.dlang.org/show_bug.cgi?id=11226
void test11226()
{
@@ -3573,7 +3578,7 @@ void test11226()
}
/************************************/
-// 11257
+// https://issues.dlang.org/show_bug.cgi?id=11257
struct R11257
{
@@ -3590,7 +3595,7 @@ void test11257()
}
/************************************/
-// 11215
+// https://issues.dlang.org/show_bug.cgi?id=11215
shared(inout(void)**) f11215(inout int);
@@ -3598,7 +3603,7 @@ static assert(is(typeof(f11215(0)) == shared(void**)));
static assert(is(typeof(f11215((const int).init)) == shared(const(void)**)));
/************************************/
-// 11489
+// https://issues.dlang.org/show_bug.cgi?id=11489
void test11489(inout int = 0)
{
@@ -3671,7 +3676,7 @@ void test11489(inout int = 0)
}
/************************************/
-// 11768
+// https://issues.dlang.org/show_bug.cgi?id=11768
void test11768(inout int = 0)
{
@@ -3683,7 +3688,7 @@ void test11768(inout int = 0)
}
/************************************/
-// 12403
+// https://issues.dlang.org/show_bug.cgi?id=12403
void test12403()
{
@@ -3698,7 +3703,7 @@ void test12403()
}
/************************************/
-// 13011
+// https://issues.dlang.org/show_bug.cgi?id=13011
void test13011()
{
@@ -3712,7 +3717,7 @@ void test13011()
}
/************************************/
-// 13030
+// https://issues.dlang.org/show_bug.cgi?id=13030
void va13030(Args...)(const Args args) {}
@@ -3722,7 +3727,8 @@ void func13030(int delegate(int n) a)
}
/************************************/
-// 13802 & 13803
+// https://issues.dlang.org/show_bug.cgi?id=13802
+// https://issues.dlang.org/show_bug.cgi?id=13803
static assert(( string ).stringof == "string" );
static assert(( string[] ).stringof == "string[]" );
diff --git a/gcc/testsuite/gdc.test/runnable/testcontracts.d b/gcc/testsuite/gdc.test/runnable/testcontracts.d
index f99a10a..ba0dc69 100644
--- a/gcc/testsuite/gdc.test/runnable/testcontracts.d
+++ b/gcc/testsuite/gdc.test/runnable/testcontracts.d
@@ -1,5 +1,21 @@
-// PERMUTE_ARGS: -inline -g -O
-
+/* PERMUTE_ARGS: -inline -g -O
+TEST_OUTPUT:
+---
+runnable/testcontracts.d(323): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+runnable/testcontracts.d(324): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+runnable/testcontracts.d(325): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+runnable/testcontracts.d(326): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+runnable/testcontracts.d(328): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+runnable/testcontracts.d(329): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+runnable/testcontracts.d(330): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+runnable/testcontracts.d(331): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+runnable/testcontracts.d(502): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+runnable/testcontracts.d(503): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+runnable/testcontracts.d(504): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+runnable/testcontracts.d(505): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+runnable/testcontracts.d(505): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
+---
+*/
extern(C) int printf(const char*, ...);
/*******************************************/
@@ -192,7 +208,7 @@ void test5()
}
/*******************************************/
-// 3273
+// https://issues.dlang.org/show_bug.cgi?id=3273
// original case
struct Bug3273
@@ -205,7 +221,7 @@ struct Bug3273
ref int func3273()
out(r)
{
- // Regression check of issue 3390
+ // Regression check of https://issues.dlang.org/show_bug.cgi?id=3390
static assert(!__traits(compiles, r = 1));
}
do
@@ -223,7 +239,7 @@ void test6()
/*******************************************/
/+
-// http://d.puremagic.com/issues/show_bug.cgi?id=3722
+// https://issues.dlang.org/show_bug.cgi?id=3722
class Bug3722A
{
@@ -318,13 +334,13 @@ void test9()
/*******************************************/
-auto test10() body { return 3; }
-auto test11()() body { return 3; }
+auto test10() do { return 3; }
+auto test11()() do { return 3; }
auto test12()
{
- auto test10() body { return 3; }
- auto test11()() body { return 3; }
+ auto test10() do { return 3; }
+ auto test11()() do { return 3; }
return 3;
}
@@ -335,7 +351,7 @@ void test13()
}
/*******************************************/
-// 4785
+// https://issues.dlang.org/show_bug.cgi?id=4785
int cnt;
@@ -360,7 +376,7 @@ void test4785()
}
/*******************************************/
-// 5039
+// https://issues.dlang.org/show_bug.cgi?id=5039
class C5039 {
int x;
@@ -375,7 +391,7 @@ class C5039 {
}
/*******************************************/
-// 5204
+// https://issues.dlang.org/show_bug.cgi?id=5204
interface IFoo5204
{
@@ -388,7 +404,7 @@ class Foo5204 : IFoo5204
}
/*******************************************/
-// 6417
+// https://issues.dlang.org/show_bug.cgi?id=6417
class Bug6417
{
@@ -422,7 +438,7 @@ void test6417()
}
/*******************************************/
-// 6549
+// https://issues.dlang.org/show_bug.cgi?id=6549
class C6549
{
@@ -472,7 +488,7 @@ void test6549()
}
/*******************************************/
-// 7218
+// https://issues.dlang.org/show_bug.cgi?id=7218
void test7218()
{
@@ -491,7 +507,55 @@ void test7218()
}
/*******************************************/
-// 7517
+// https://issues.dlang.org/show_bug.cgi?id=7335
+
+class A7335
+{
+ int mValue = 10;
+
+ void setValue(int newValue)
+ in { }
+ out { assert(mValue == 3); }
+ do
+ {
+ mValue = newValue;
+ }
+}
+
+class B7335 : A7335
+{
+ override void setValue(int newValue)
+ in { assert(false); }
+ out { assert(mValue == 3); }
+ do
+ {
+ mValue = newValue;
+ }
+}
+
+class C7335 : A7335
+{
+ override void setValue(int newValue)
+ in { int a = newValue; }
+ out { assert(mValue == 3); }
+ do
+ {
+ mValue = newValue;
+ }
+}
+
+void test7335()
+{
+ A7335 aObject = new B7335();
+ aObject.setValue(3);
+
+ A7335 bObject = new C7335();
+ bObject.setValue(3); // <<<<< will crash because undefined mValue in the
+ // A7335.setValue().out-block.
+}
+
+/*******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7517
void test7517()
{
@@ -575,7 +639,7 @@ void test7517()
}
/*******************************************/
-// 7699
+// https://issues.dlang.org/show_bug.cgi?id=7699
class P7699
{
@@ -589,7 +653,7 @@ class D7699 : P7699
}
/*******************************************/
-// 7883
+// https://issues.dlang.org/show_bug.cgi?id=7883
// Segmentation fault
class AA7883
@@ -665,7 +729,7 @@ class DC7883 : CC7883
}
/*******************************************/
-// 7892
+// https://issues.dlang.org/show_bug.cgi?id=7892
struct S7892
{
@@ -695,7 +759,7 @@ class C7892
}
/*******************************************/
-// 8066
+// https://issues.dlang.org/show_bug.cgi?id=8066
struct CLCommandQueue
{
@@ -709,7 +773,7 @@ struct CLCommandQueue
}
/*******************************************/
-// 8073
+// https://issues.dlang.org/show_bug.cgi?id=8073
struct Container8073
{
@@ -748,7 +812,7 @@ void test8073()
}
/*******************************************/
-// 8093
+// https://issues.dlang.org/show_bug.cgi?id=8093
void test8093()
{
@@ -785,7 +849,7 @@ void test8093()
}
/*******************************************/
-// 9383
+// https://issues.dlang.org/show_bug.cgi?id=9383
class A9383
{
@@ -871,7 +935,8 @@ void test9383()
}
/*******************************************/
-// 15524 - Different from issue 9383 cases, closed variable size is bigger than REGSIZE.
+// https://issues.dlang.org/show_bug.cgi?id=15524
+// Different from issue 9383 cases, closed variable size is bigger than REGSIZE.
class A15524
{
@@ -1004,7 +1069,7 @@ class Test15524b
}
/*******************************************/
-// 10479
+// https://issues.dlang.org/show_bug.cgi?id=10479
class B10479
{
@@ -1018,7 +1083,7 @@ class D10479 : B10479
}
/*******************************************/
-// 10596
+// https://issues.dlang.org/show_bug.cgi?id=10596
class Foo10596
{
@@ -1028,7 +1093,7 @@ class Foo10596
}
/*******************************************/
-// 10721
+// https://issues.dlang.org/show_bug.cgi?id=10721
class Foo10721
{
@@ -1049,7 +1114,7 @@ struct Bar10721
}
/*******************************************/
-// 10981
+// https://issues.dlang.org/show_bug.cgi?id=10981
class C10981
{
@@ -1060,7 +1125,7 @@ class C10981
}
/*******************************************/
-// 14779
+// https://issues.dlang.org/show_bug.cgi?id=14779
class C14779
{
@@ -1079,6 +1144,79 @@ void test14779()
}
/*******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15984
+
+I15984 i15984;
+C15984 c15984;
+
+void check15984(T)(const char* s, T this_, int i)
+{
+ printf("%s this = %p, i = %d\n", s, this_, i);
+ static if (is(T == I15984)) assert(this_ is i15984);
+ else static if (is(T == C15984)) assert(this_ is c15984);
+ else static assert(0);
+ assert(i == 5);
+}
+
+interface I15984
+{
+ void f1(int i)
+ in { check15984("I.f1.i", this, i); assert(0); }
+ out { check15984("I.f1.o", this, i); }
+
+ int[3] f2(int i)
+ in { check15984("I.f2.i", this, i); assert(0); }
+ out { check15984("I.f2.o", this, i); }
+
+ void f3(int i)
+ in { void nested() { check15984("I.f3.i", this, i); } nested(); assert(0); }
+ out { void nested() { check15984("I.f3.o", this, i); } nested(); }
+
+ void f4(out int i, lazy int j)
+ in { }
+ out { }
+}
+
+class C15984 : I15984
+{
+ void f1(int i)
+ in { check15984("C.f1.i", this, i); }
+ out { check15984("C.f1.o", this, i); }
+ do { check15984("C.f1 ", this, i); }
+
+ int[3] f2(int i)
+ in { check15984("C.f2.i", this, i); }
+ out { check15984("C.f2.o", this, i); }
+ do { check15984("C.f2 ", this, i); return [0,0,0]; }
+
+ void f3(int i)
+ in { void nested() { check15984("C.f3.i", this, i); } nested(); }
+ out { void nested() { check15984("C.f3.o", this, i); } nested(); }
+ do { check15984("C.f3 ", this, i); }
+
+ void f4(out int i, lazy int j)
+ in { assert(0); }
+ do { i = 10; }
+}
+
+void test15984()
+{
+ c15984 = new C15984;
+ i15984 = c15984;
+ printf("i = %p\n", i15984);
+ printf("c = %p\n", c15984);
+ printf("====\n");
+ i15984.f1(5);
+ printf("====\n");
+ i15984.f2(5);
+ printf("====\n");
+ i15984.f3(5);
+ int i;
+ i15984.f4(i, 1);
+ assert(i == 10);
+}
+
+/*******************************************/
//******************************************/
// DIP 1009
@@ -1170,6 +1308,7 @@ int main()
test6417();
test6549();
test7218();
+ test7335();
test7517();
test8073();
test8093();
@@ -1177,6 +1316,7 @@ int main()
test15524();
test15524a();
test14779();
+ test15984();
dip1009_1(1);
dip1009_2(1);
dip1009_3(1);
diff --git a/gcc/testsuite/gdc.test/runnable/testdefault_after_variadic.d b/gcc/testsuite/gdc.test/runnable/testdefault_after_variadic.d
new file mode 100644
index 0000000..f0bade2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/testdefault_after_variadic.d
@@ -0,0 +1,98 @@
+/*
+PERMUTE_ARGS:
+*/
+
+version (with_phobos) import std.conv : text;
+
+struct Tuple(T...)
+{
+ T expand;
+ alias expand this;
+}
+
+auto tuple(T...)(T t)
+{
+ return Tuple!T(t);
+}
+
+void fun0(U, T...)(U gold, int b_gold, T a, int b)
+{
+ assert(tuple(a) == gold);
+ assert(b == b_gold);
+}
+
+void fun(U, T...)(U gold, T a, int b = 1)
+{
+ assert(tuple(a) == gold);
+ assert(b == 1);
+}
+
+void fun2(U, V, T...)(U gold, V gold2, T a, string file = __FILE__, int line = __LINE__)
+{
+ assert(tuple(a) == gold);
+ assert(tuple(file, line) == gold2);
+}
+
+void fun3(int[] gold, int[] a...)
+{
+ assert(gold == a);
+}
+
+void fun4(T...)(size_t length_gold, int b_gold, T a, int b = 1)
+{
+ assert(T.length == length_gold);
+ assert(b == b_gold);
+}
+
+// Example in changelog
+string log(T...)(T a, string file = __FILE__, int line = __LINE__)
+{
+ return text(file, ":", line, " ", a);
+}
+
+void fun_constraint(T...)(T a, string b = "bar") if (T.length == 1)
+{
+}
+
+/+
+NOTE: this is disallowed by the parser:
+void fun5(int[] gold, int[] a ..., int b = 1)
+{
+ assert(gold==a);
+ assert(b==1);
+}
++/
+
+void main()
+{
+ fun0(tuple(10), 7, 10, 7);
+
+ fun(tuple());
+ fun(tuple(10), 10);
+ fun(tuple(10, 11), 10, 11);
+
+ fun2(tuple(10), tuple(__FILE__, __LINE__), 10);
+
+ fun3([1, 2, 3], 1, 2, 3);
+
+ fun_constraint(1);
+ assert(!__traits(compiles, fun_constraint(1, "baz")));
+
+ version (with_phobos)
+ assert(log(10, "abc") == text(__FILE__, ":", __LINE__, " 10abc"));
+
+ // IFTI: `b` is always default-set
+ fun4(0, 1);
+ fun4(1, 1, 10);
+ fun4(2, 1, 10, 11);
+
+ // with explicit instantiation, and default-set `b`
+ fun4!int(1, 1, 10);
+ fun4!(int, int)(2, 1, 10, 11);
+
+ // with explicit instantiation, and over-ridden `b`
+ fun4!int(1, 100, 10, 100);
+ fun4!(int, int)(2, 100, 10, 11, 100);
+
+ // fun5([1,2,3], 1,2,3);
+}
diff --git a/gcc/testsuite/gdc.test/runnable/testdstress.d b/gcc/testsuite/gdc.test/runnable/testdstress.d
index a416b8a..6ca5500 100644
--- a/gcc/testsuite/gdc.test/runnable/testdstress.d
+++ b/gcc/testsuite/gdc.test/runnable/testdstress.d
@@ -1,5 +1,10 @@
-// RUNNABLE_PHOBOS_TEST
// PERMUTE_ARGS:
+/*
+TEST_OUTPUT:
+---
+runnable/testdstress.d(666): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
+---
+*/
module run.module_01;
@@ -8,6 +13,7 @@ import core.exception;
import core.vararg;
extern(C) void* malloc(size_t size);
+extern(C) int printf(const char*, ...);
/* ================================ */
@@ -23,7 +29,7 @@ void test1()
assert(1);
}out (result){
assert(result.i==1);
- }body{
+ }do{
MyStruct s;
s.i = 1;
return s;
@@ -37,7 +43,7 @@ void foo2()
in{
assert(0);
}
-body{
+do{
}
void test2()
@@ -452,7 +458,7 @@ void test21()
/* ================================ */
-scope class AutoClass{
+class AutoClass{
}
void test22()
@@ -467,7 +473,7 @@ void test22()
int status23;
-scope class C23{
+class C23{
~this(){
assert(status23==0);
status23--;
@@ -493,7 +499,7 @@ void test23()
int status24;
-scope class C24{
+class C24{
this(){
assert(status24==0);
status24+=2;
@@ -525,7 +531,7 @@ void test24()
/* ================================ */
struct S25{
- S25 opSub(int i) { S25 s; return s; }
+ S25 opBinary(string op)(int i) if (op == "-") { S25 s; return s; }
}
struct GeomObject{
@@ -539,7 +545,7 @@ void extractTriangles(GeomObject g)
void foobar()
{
g.mesh - g.xlate;
- //g.mesh.opSub(g.xlate);
+ //g.mesh.opBinary!("-")(g.xlate);
}
foobar();
@@ -672,7 +678,7 @@ void test30()
void test31()
{
- string str = x"F0 9D 83 93"; // utf-8 for U+1D0D3
+ string str = "\xF0\x9D\x83\x93"; // utf-8 for U+1D0D3
int count=0;
dchar tmp;
@@ -686,8 +692,6 @@ void test31()
/* ================================ */
-import std.stdio;
-
union MyUnion32
{
int i;
@@ -698,31 +702,12 @@ void test32()
{
TypeInfo ti = typeid(MyUnion32*);
assert(!(ti is null));
- writefln("%s %d %d", ti.toString(), ti.tsize, (MyUnion32*).sizeof);
assert(ti.tsize==(MyUnion32*).sizeof);
assert(ti.toString()=="run.module_01.MyUnion32*");
}
/* ================================ */
-void test33()
-{
- creal a=1.3L+9.7Li;
- assert(a.re == 1.3L);
- assert(a.im == 9.7L);
-}
-
-/* ================================ */
-
-void test34()
-{
- creal c = 2.7L + 0i;
- assert(c.re==2.7L);
- assert(c.im==0.0L);
-}
-
-/* ================================ */
-
void test35()
{
try{
@@ -845,15 +830,8 @@ int counter41;
class C41{
this(){
printf("this: counter41 = %d\n", counter41);
- assert(counter41==1);
- counter41+=2;
- }
-
- new(size_t size){
- printf("new: size = %d\n", size);
assert(counter41==0);
- counter41++;
- return malloc(size);
+ counter41+=2;
}
}
@@ -862,7 +840,7 @@ void test41()
C41 c;
assert(counter41==0);
c = new C41();
- assert(counter41==3);
+ assert(counter41==2);
}
/* ================================ */
@@ -917,8 +895,6 @@ int main()
test30();
test31();
test32();
- test33();
- test34();
test35();
test36();
test37();
diff --git a/gcc/testsuite/gdc.test/runnable/testdt.d b/gcc/testsuite/gdc.test/runnable/testdt.d
index 8224abc..4b5338f 100644
--- a/gcc/testsuite/gdc.test/runnable/testdt.d
+++ b/gcc/testsuite/gdc.test/runnable/testdt.d
@@ -2,7 +2,7 @@
/******************************************/
-static int bigarray[100][100];
+static int[100][100] bigarray;
void test1()
{
@@ -17,7 +17,7 @@ void test1()
}
/******************************************/
-// 10629
+// https://issues.dlang.org/show_bug.cgi?id=10629
class Foo10629 {}
@@ -27,7 +27,7 @@ struct Bar10629
}
/******************************************/
-// 11233
+// https://issues.dlang.org/show_bug.cgi?id=11233
struct S11233
{
@@ -35,7 +35,7 @@ struct S11233
}
/******************************************/
-// 11672
+// https://issues.dlang.org/show_bug.cgi?id=11672
void test11672()
{
@@ -50,7 +50,7 @@ void test11672()
}
/******************************************/
-// 12509
+// https://issues.dlang.org/show_bug.cgi?id=12509
struct A12509
{
@@ -62,7 +62,7 @@ struct B12509
}
/******************************************/
-// 13505
+// https://issues.dlang.org/show_bug.cgi?id=13505
class C13505 { void[10] x; }
struct S13505 { void[10] x; }
@@ -74,7 +74,7 @@ void test13505()
}
/******************************************/
-// 14699
+// https://issues.dlang.org/show_bug.cgi?id=14699
struct S14699a { ubyte[0][10] values; }
struct S14699b { S14699a tbl; }
@@ -88,7 +88,7 @@ void test14699()
}
/******************************************/
-// 14805
+// https://issues.dlang.org/show_bug.cgi?id=14805
struct S14805
{
@@ -97,7 +97,7 @@ struct S14805
auto a14805 = new S14805[513*513];
/******************************************/
-// 15664
+// https://issues.dlang.org/show_bug.cgi?id=15664
struct Data15664A
{
diff --git a/gcc/testsuite/gdc.test/runnable/testenum.d b/gcc/testsuite/gdc.test/runnable/testenum.d
index 0532744..a752951 100644
--- a/gcc/testsuite/gdc.test/runnable/testenum.d
+++ b/gcc/testsuite/gdc.test/runnable/testenum.d
@@ -109,7 +109,7 @@ void test6()
}
/**********************************************/
-// 2407
+// https://issues.dlang.org/show_bug.cgi?id=2407
int i2407;
@@ -223,7 +223,7 @@ void test2407()
}
/**********************************************/
-// 3096
+// https://issues.dlang.org/show_bug.cgi?id=3096
void test3096()
{
@@ -252,30 +252,30 @@ void test3096()
}
/**********************************************/
-// 7719
+// https://issues.dlang.org/show_bug.cgi?id=7719
enum foo7719 = bar7719;
enum { bar7719 = 1 }
/**********************************************/
-// 9845
+// https://issues.dlang.org/show_bug.cgi?id=9845
enum { A9845 = B9845 }
enum { B9845 = 1 }
/**********************************************/
-// 9846
+// https://issues.dlang.org/show_bug.cgi?id=9846
const int A9846 = B9846;
enum { B9846 = 1 }
/**********************************************/
-// 10105
+// https://issues.dlang.org/show_bug.cgi?id=10105
enum E10105 : char[1] { a = "a" }
/**********************************************/
-// 10113
+// https://issues.dlang.org/show_bug.cgi?id=10113
enum E10113 : string
{
@@ -299,7 +299,7 @@ void test10113()
}
/**********************************************/
-// 10503
+// https://issues.dlang.org/show_bug.cgi?id=10503
@property int octal10503(string num)()
{
@@ -313,7 +313,7 @@ enum
}
/**********************************************/
-// 10505
+// https://issues.dlang.org/show_bug.cgi?id=10505
enum
{
@@ -331,7 +331,7 @@ static assert(is(typeof(d10505) == int));
static assert(is(typeof(e10505) == typeof(null)));
/**********************************************/
-// 10561
+// https://issues.dlang.org/show_bug.cgi?id=10561
void test10561()
{
@@ -367,7 +367,7 @@ void test10561()
}
/**********************************************/
-// 10612
+// https://issues.dlang.org/show_bug.cgi?id=10612
int[E10612] ie10612;
E10612[int] ei10612;
@@ -376,7 +376,7 @@ E10612[E10612] ee10612;
enum E10612 { a }
/**********************************************/
-// 10788
+// https://issues.dlang.org/show_bug.cgi?id=10788
enum v10788 = e10788;
enum : int { e10788 }
@@ -417,7 +417,7 @@ void test8()
}
/**********************************************/
-// 13220
+// https://issues.dlang.org/show_bug.cgi?id=13220
enum E13220a;
@(1) enum E13220b;
diff --git a/gcc/testsuite/gdc.test/runnable/testfile.d b/gcc/testsuite/gdc.test/runnable/testfile.d
deleted file mode 100644
index 6f56804..0000000
--- a/gcc/testsuite/gdc.test/runnable/testfile.d
+++ /dev/null
@@ -1,25 +0,0 @@
-// RUNNABLE_PHOBOS_TEST
-// PERMUTE_ARGS:
-
-import std.file;
-import std.stdio;
-
-/***********************************************/
-
-void test1()
-{
- auto p = std.file.getcwd();
-
- writefln("%s '%s'\n", p.length, p);
- assert(p[$ - 1] != 0);
-}
-
-/***********************************************/
-
-int main()
-{
- test1();
-
- printf("Success\n");
- return 0;
-}
diff --git a/gcc/testsuite/gdc.test/runnable/testfloat.d b/gcc/testsuite/gdc.test/runnable/testfloat.d
new file mode 100644
index 0000000..e9fe397
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/testfloat.d
@@ -0,0 +1,239 @@
+/* PERMUTE_ARGS: -O
+ * Test floating point code generation
+ */
+
+import core.stdc.stdio;
+import core.stdc.stdlib;
+
+double value_1() {
+ return 1;
+}
+
+double value_2() {
+ return 2;
+}
+
+/***************************************/
+
+void testcse1(T)() // common subexpressions
+{
+ T a = value_1();
+ T b = value_2();
+ T x = a*a + a*a + a*a + a*a + a*a + a*a + a*a +
+ a*b + a*b;
+ printf("%g\n", cast(double)x); // destroy scratch reg contents
+ T y = a*a + a*a + a*a + a*a + a*a + a*a + a*a +
+ a*b + a*b;
+ assert(x == 11);
+ assert(x == y);
+}
+
+void test240()
+{
+ testcse1!float();
+ testcse1!double();
+ testcse1!real();
+}
+
+/***************************************/
+
+void testcse2(T)() // common subexpressions
+{
+ T a = value_1();
+ T b = value_2();
+ T x = a*a + a*a + a*a + a*a + a*a + a*a + a*a +
+ a*b + a*b + 1;
+ printf("%g\n", cast(double)x); // destroy scratch reg contents
+ int i = (a*a + a*a + a*a + a*a + a*a + a*a + a*a + a*b + a*b) != 0;
+ assert(i);
+ assert(x == 12);
+}
+
+void test241()
+{
+ testcse2!float();
+ testcse2!double();
+ testcse2!real();
+}
+
+/***************************************/
+
+void test1(float f)
+{
+ real r = f;
+ double d = f;
+}
+
+void test2(long l)
+{
+ real r = l;
+ double d = l;
+}
+
+void test3(float f)
+{
+ real r = f * f;
+ double d = f * f;
+}
+
+void test3(long l)
+{
+ real r = l * l;
+ double d = l * l;
+}
+
+/***************************************/
+
+double foo4(int i, double d)
+{
+ return ((i << 1) - d) + ((i << 1) - d);
+}
+
+void test4()
+{
+ double d = foo4(3, 4);
+ assert(d == 4);
+}
+
+/***************************************/
+
+import core.math; // trigger use of sqrt intrinsic
+
+void test5x(double p)
+{
+ bool b = p >= 0;
+ double mean = (1 - p) / p;
+ double skew = sqrt(1 - p);
+}
+
+void test5()
+{
+ test5x(2);
+}
+
+/***************************************/
+
+import core.math; // trigger use of sqrt intrinsic
+
+void dstatsEnforce(bool, string) { }
+
+ulong invNegBinomCDF(double pVal, ulong n, double p)
+{
+ dstatsEnforce(p >= 0 && p <= 1,
+ "p must be between 0, 1 for negative binomial distribution.");
+ dstatsEnforce(pVal >= 0 && pVal <= 1,
+ "P-values must be between 0, 1.");
+
+ // Normal or gamma approx, then adjust.
+ double mean = n * (1 - p) / p;
+ double var = n * (1 - p) / (p * p);
+ double skew = (2 - p) / sqrt(n * (1 - p));
+ double kk = 4.0L / (skew * skew);
+ double theta = sqrt(var / kk);
+ double offset = (kk * theta) - mean + 0.5L;
+ ulong guess;
+ return 0;
+}
+
+void test6()
+{
+ invNegBinomCDF(2.0, 3, 4.0);
+}
+
+/***************************************/
+
+float expDigamma(F)(in F x)
+{
+ return x;
+}
+
+float nextDown(float f) { return f; }
+
+void test7()
+{
+ foreach (i; 1 .. 2)
+ {
+ assert(expDigamma(float(i)) >= expDigamma(float(i).nextDown));
+ }
+}
+
+/***************************************/
+
+void foo8_1(double x)
+{
+ printf("x = %g\n", x);
+ assert(x == 0);
+}
+
+void foo8_2(double x)
+{
+ printf("x = %g\n", x);
+ assert(x != 0);
+}
+
+void test8()
+{
+ foo8_1(0.0);
+ foo8_2(1.0);
+}
+
+/***************************************/
+
+void test9()
+{
+ double a = 9;
+ double b = 3;
+ double c = a * b + 1;
+ double d = a + b + 1;
+ printf("%g %g\n", c, d); // clobber XMM registers
+ assert(c == 28 && d == 13);
+ double e = a * b - 1;
+ double f = a + b - 1; // reload 2 CSEs
+ printf("%g %g\n", e, f);
+ assert(e == 26 && f == 11);
+}
+
+/***************************************/
+// https://issues.dlang.org/show_bug.cgi?id=20349
+
+double f20349(double a, int b)
+{
+ import core.math;
+ return core.math.sqrt(-a / b) / b;
+}
+
+void test20349()
+{
+ assert(f20349(-9, 1) == 3);
+}
+
+/****************************************/
+// https://issues.dlang.org/show_bug.cgi?id=20963
+
+void test20963()
+{
+ ulong v = 0xE3251BACB112CB8B;
+ double d = cast(double)v;
+ printf("%a\n", d); //0x1.c64a37596225ap+63
+ assert(d == 0x1.c64a375962259p+63);
+}
+
+/***************************************/
+
+
+int main()
+{
+ test240();
+ test241();
+ test4();
+ test5();
+ test6();
+ test7();
+ test8();
+ test9();
+ test20349();
+ test20963();
+
+ printf("Success\n");
+ return EXIT_SUCCESS;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/testformat.d b/gcc/testsuite/gdc.test/runnable/testformat.d
deleted file mode 100644
index 74f4095..0000000
--- a/gcc/testsuite/gdc.test/runnable/testformat.d
+++ /dev/null
@@ -1,126 +0,0 @@
-// RUNNABLE_PHOBOS_TEST
-// PERMUTE_ARGS:
-
-import std.stdio;
-import std.string;
-
-/*************************************************************/
-
-void test1()
-{
- double x = 1e6;
- float f;
- double d;
- real r;
-
- while (x > 1e-5)
- { double y = x / 101.0;
-
- std.stdio.writef("x = %g\t%f\t%e\n",x/101.0,x/101.0,x/101.0);
- x /= 10.0;
- }
-
- double a = 123456789.0;
- for (int i = 20; i--; a /= 10)
- std.stdio.writef("%20.6g|%20.6e|%20.6f\n",a,a,a);
-
- std.stdio.writef("%e %e %e %e\n",float.nan,double.nan,real.nan,double.infinity);
- std.stdio.writef("%e %e %e\n",-float.nan,-double.nan,-double.infinity);
- std.stdio.writef("%-5E %5E %E\n",float.nan,double.nan,double.infinity);
-
- std.stdio.writef("%f %f %f\n",float.nan,double.nan,double.infinity);
- std.stdio.writef("%f %f %f\n",-float.nan,-double.nan,-double.infinity);
- std.stdio.writef("%+F %+ F %F\n",float.nan,double.nan,double.infinity);
-
- std.stdio.writef("%g %g %g\n",float.nan,double.nan,double.infinity);
- std.stdio.writef("%g %g %g\n",-float.nan,-double.nan,-double.infinity);
- std.stdio.writef("% G %G %G\n",float.nan,double.nan,double.infinity);
-
- r = 0x1.AAp+3L;
- std.stdio.writef(" r = %g\n", r);
- std.stdio.writef(" r = %a\n", r);
- std.stdio.writef(" r = %A\n", r);
-
- d = 0x1.AAp+3;
- std.stdio.writef(" d = %.5a\n", d);
- std.stdio.writef(" d = %A\n", d);
-
- f = 0x1.AAp+3f;
- std.stdio.writef(" f = %a\n", f);
- std.stdio.writef(" f = %A\n", f);
-
- f = 0x1.FFp+3f;
- std.stdio.writef(" f = %.1a\n", f);
- std.stdio.writef(" f = %A\n", f);
-
- r = 0;
- std.stdio.writef(" r = %a\n", r);
- std.stdio.writef(" r = %A\n", r);
-
- std.stdio.writef("%e\n", 1e+300);
- std.stdio.writef("%.0f\n%.307f\n", 1e+300, 1e-300);
- std.stdio.writef("%.0A\n%.307A\n", 1e+300, 1e-300);
-}
-
-/*************************************************************/
-
-void test2()
-{
- writefln("%o", 9);
- assert(std.string.format("%o", 9) == "11");
- assert(std.string.format("%o", 10) == "12");
- assert(std.string.format("%b", 9) == "1001");
- assert(std.string.format("%b", 10) == "1010");
-}
-
-
-/*************************************************************/
-
-void test3()
-{
- Object e = new Exception("hello");
- writeln(e.toString());
- //assert(e.toString() == "object.Exception: hello");
- //assert(format(e) == "object.Exception: hello");
-
- alias char[] xstring;
- assert(format(cast(xstring)"world") == "world");
-}
-
-/*************************************************************/
-
-void test4()
-{
- const char[][] x = ["%s","123"];
- writeln(x);
- assert(std.string.format("%s", x) == `["%s", "123"]`);
-}
-
-/*************************************************************/
-
-void test5()
-{
- int[int] foo;
-
- foo[1] = 2;
- foo[7] = 28;
-
- writefln("%s", foo);
-
- void[0] v;
- assert(format("%s", v) == "[]");
-}
-
-/*************************************************************/
-
-int main()
-{
- test1();
- test2();
- test3();
- test4();
- test5();
-
- std.stdio.writefln("Success");
- return 0;
-}
diff --git a/gcc/testsuite/gdc.test/runnable/testgc2.d b/gcc/testsuite/gdc.test/runnable/testgc2.d
index 0d7ab8c..f107f1c 100644
--- a/gcc/testsuite/gdc.test/runnable/testgc2.d
+++ b/gcc/testsuite/gdc.test/runnable/testgc2.d
@@ -1,4 +1,10 @@
-// PERMUTE_ARGS:
+/*
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+Success
+---
+*/
module testgc2;
@@ -7,30 +13,34 @@ import core.exception : OutOfMemoryError;
/*******************************************/
+__gshared ulong counter;
+
void test1()
{
- printf("This should not take a while\n");
try
{
long[] l = new long[ptrdiff_t.max];
- printf("%lu\n", cast(ulong)l.capacity); // Make sure l is not optimized out.
+ counter += l.capacity; // Make sure l is not optimized out.
assert(0);
}
catch (OutOfMemoryError o)
{
}
- printf("This may take a while\n");
+ assert(counter == 0);
+
try
{
byte[] b = new byte[size_t.max / 3];
- printf("%lu\n", cast(ulong)b.capacity); // Make sure b is not optimized out.
+ counter += b.capacity; // Make sure b is not optimized out.
version (Windows)
assert(0);
}
catch (OutOfMemoryError o)
{
}
+
+ assert(counter >= 0);
}
/*******************************************/
@@ -41,5 +51,3 @@ void main()
printf("Success\n");
}
-
-
diff --git a/gcc/testsuite/gdc.test/runnable/testgc3.d b/gcc/testsuite/gdc.test/runnable/testgc3.d
index 88232fe..300888f 100644
--- a/gcc/testsuite/gdc.test/runnable/testgc3.d
+++ b/gcc/testsuite/gdc.test/runnable/testgc3.d
@@ -1,5 +1,11 @@
-// PERMUTE_ARGS:
-// REQUIRED_ARGS:
+/*
+PERMUTE_ARGS:
+REQUIRED_ARGS:
+RUN_OUTPUT:
+---
+finished
+---
+*/
import core.stdc.stdio;
@@ -21,4 +27,3 @@ void main()
printf("finished\n");
aa[] = null;
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/testinvariant.d b/gcc/testsuite/gdc.test/runnable/testinvariant.d
index 93d66ef..d3b3b6f 100644
--- a/gcc/testsuite/gdc.test/runnable/testinvariant.d
+++ b/gcc/testsuite/gdc.test/runnable/testinvariant.d
@@ -17,7 +17,7 @@ int testinvariant()
printf("hello\n");
Foo f = new Foo();
printf("f = %p\n", f);
- printf("f.sizeof = x%x\n", Foo.sizeof);
+ printf("f.sizeof = x%zx\n", Foo.sizeof);
printf("f.classinfo = %p\n", f.classinfo);
printf("f.classinfo._invariant = %p\n", f.classinfo.base);
f.test();
@@ -26,7 +26,7 @@ int testinvariant()
}
/***************************************************/
-// 6453
+// https://issues.dlang.org/show_bug.cgi?id=6453
void test6453()
{
@@ -107,7 +107,7 @@ void test6453()
}
/***************************************************/
-// 13113
+// https://issues.dlang.org/show_bug.cgi?id=13113
struct S13113
{
@@ -140,7 +140,7 @@ void test13113()
}
/***************************************************/
-// 13147
+// https://issues.dlang.org/show_bug.cgi?id=13147
version (D_InlineAsm_X86)
enum x86iasm = true;
diff --git a/gcc/testsuite/gdc.test/runnable/testkeyword.d b/gcc/testsuite/gdc.test/runnable/testkeyword.d
index 79f2c29..5fb4d44 100644
--- a/gcc/testsuite/gdc.test/runnable/testkeyword.d
+++ b/gcc/testsuite/gdc.test/runnable/testkeyword.d
@@ -97,8 +97,8 @@ void main(string[] args) nothrow
auto funcLiteral = (int x, int y)
{
- enum thisFunc = "testkeyword.main.__lambda3";
- enum thisFunc2 = "testkeyword.main.__lambda3(int x, int y)";
+ enum thisFunc = "testkeyword.main.__lambda5";
+ enum thisFunc2 = "testkeyword.main.__lambda5(int x, int y)";
static assert(getFuncArgFile() == thisFile);
static assert(getFuncArgLine() == 104);
diff --git a/gcc/testsuite/gdc.test/runnable/testline.d b/gcc/testsuite/gdc.test/runnable/testline.d
index 5b84204..cbf536c 100644
--- a/gcc/testsuite/gdc.test/runnable/testline.d
+++ b/gcc/testsuite/gdc.test/runnable/testline.d
@@ -1,4 +1,3 @@
-// RUNNABLE_PHOBOS_TEST
// PERMUTE_ARGS:
// $HeadURL$
@@ -7,7 +6,6 @@
module dstress.run.line_token_03;
-import std.stdio;
import core.exception;
int main(){
@@ -22,8 +20,6 @@ int main(){
assert(0);
}
-import std.stdio;
-
/*
* @WARNING@: this code depends on the phobos implementation.
* char[]s returned by wrong assertions have to look like:
@@ -39,6 +35,5 @@ void checkFileSpec(Object o){
}
}
-writeln(str);
assert(str[start .. start+3]=="(1)");
}
diff --git a/gcc/testsuite/gdc.test/runnable/testmain.d b/gcc/testsuite/gdc.test/runnable/testmain.d
index 4619bde..d615e10 100644
--- a/gcc/testsuite/gdc.test/runnable/testmain.d
+++ b/gcc/testsuite/gdc.test/runnable/testmain.d
@@ -1,5 +1,6 @@
// REQUIRED_ARGS: -main
+// PERMUTE_ARGS: -betterC
void foo() { }
diff --git a/gcc/testsuite/gdc.test/runnable/testmainb.d b/gcc/testsuite/gdc.test/runnable/testmainb.d
new file mode 100644
index 0000000..d6452ec
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/testmainb.d
@@ -0,0 +1,15 @@
+/*
+Test that -main does nothing when main is already defined
+
+REQUIRED_ARGS: -main
+RUN_OUTPUT:
+---
+Success
+---
+*/
+extern(C) int printf(const char*, ...);
+
+void main()
+{
+ printf("Success\n");
+}
diff --git a/gcc/testsuite/gdc.test/runnable/testminit.d b/gcc/testsuite/gdc.test/runnable/testminit.d
index 52c99bb..92c2d3a 100644
--- a/gcc/testsuite/gdc.test/runnable/testminit.d
+++ b/gcc/testsuite/gdc.test/runnable/testminit.d
@@ -1,5 +1,14 @@
-// EXTRA_SOURCES: imports/testminitAA.d imports/testminitBB.d
-// PERMUTE_ARGS:
+/*
+EXTRA_SOURCES: imports/testminitAA.d imports/testminitBB.d
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+AA
+BB
+hello
+Success
+---
+*/
import core.stdc.stdio;
diff --git a/gcc/testsuite/gdc.test/runnable/testmmfile.d b/gcc/testsuite/gdc.test/runnable/testmmfile.d
deleted file mode 100644
index 6a9d6e9..0000000
--- a/gcc/testsuite/gdc.test/runnable/testmmfile.d
+++ /dev/null
@@ -1,120 +0,0 @@
-// RUNNABLE_PHOBOS_TEST
-// PERMUTE_ARGS:
-// REQUIRED_ARGS:
-
-import std.file;
-import std.mmfile;
-
-int main()
-{
- static string name = "test.tmp";
- static string s = "abcd";
-
- write(name, s);
-
- { scope MmFile mmf = new MmFile(name);
- string p;
-
- assert(mmf[0] == 'a');
- p = cast(string)mmf[];
- //printf("p.length = %d\n", p.length);
- assert(p[1] == 'b');
- p = cast(string)mmf[0 .. 4];
- assert(p[2] == 'c');
- }
-
- { scope MmFile mmf = new MmFile(name, MmFile.Mode.read, 0, null);
- string p;
-
- assert(mmf[0] == 'a');
- p = cast(string)mmf[];
- //printf("p.length = %d\n", p.length);
- assert(mmf.length == 4);
- assert(p[1] == 'b');
- p = cast(string)mmf[0 .. 4];
- assert(p[2] == 'c');
- }
-
- remove(name);
-
- { scope MmFile mmf = new MmFile(name, MmFile.Mode.readWriteNew, 4, null);
- char[] p;
-
- p = cast(char[])mmf[];
- p[] = "1234";
- mmf[3] = '5';
- assert(mmf[2] == '3');
- assert(mmf[3] == '5');
- }
-
- { string p = cast(string)read(name);
-
- assert(p[] == "1235");
- }
-
- { scope MmFile mmf = new MmFile(name, MmFile.Mode.readWriteNew, 4, null);
- char[] p;
-
- p = cast(char[])mmf[];
- p[] = "5678";
- mmf[3] = '5';
- assert(mmf[2] == '7');
- assert(mmf[3] == '5');
- assert(cast(string)mmf[] == "5675");
- }
-
- { string p = cast(string)read(name);
-
- assert(p[] == "5675");
- }
-
- { scope MmFile mmf = new MmFile(name, MmFile.Mode.readWrite, 4, null);
- char[] p;
-
- p = cast(char[])mmf[];
- assert(cast(char[])mmf[] == "5675");
- p[] = "9102";
- mmf[2] = '5';
- assert(cast(string)mmf[] == "9152");
- }
-
- { string p = cast(string)read(name);
-
- assert(p[] == "9152");
- }
-
- remove(name);
-
- { scope MmFile mmf = new MmFile(name, MmFile.Mode.readWrite, 4, null);
- char[] p;
-
- p = cast(char[])mmf[];
- p[] = "abcd";
- mmf[2] = '5';
- assert(cast(string)mmf[] == "ab5d");
- }
-
- { string p = cast(string)read(name);
-
- assert(p[] == "ab5d");
- }
-
- { scope MmFile mmf = new MmFile(name, MmFile.Mode.readCopyOnWrite, 4, null);
- char[] p;
-
- p = cast(char[])mmf[];
- assert(cast(string)mmf[] == "ab5d");
- p[] = "9102";
- mmf[2] = '5';
- assert(cast(string)mmf[] == "9152");
- }
-
- { string p = cast(string)read(name);
-
- assert(p[] == "ab5d");
- }
-
- remove(name);
-
- return 0;
-}
diff --git a/gcc/testsuite/gdc.test/runnable/testmod2.d b/gcc/testsuite/gdc.test/runnable/testmod2.d
index c03a8c7..111696a 100644
--- a/gcc/testsuite/gdc.test/runnable/testmod2.d
+++ b/gcc/testsuite/gdc.test/runnable/testmod2.d
@@ -1,7 +1,7 @@
// EXTRA_SOURCES: imports/testmod2a.d
/**********************************/
-// bug 1904
+// https://issues.dlang.org/show_bug.cgi?id=1904
import imports.testmod2a;
void main()
diff --git a/gcc/testsuite/gdc.test/runnable/testpic.d b/gcc/testsuite/gdc.test/runnable/testpic.d
index 60f6775..ef3ab86 100644
--- a/gcc/testsuite/gdc.test/runnable/testpic.d
+++ b/gcc/testsuite/gdc.test/runnable/testpic.d
@@ -1,4 +1,5 @@
-// PERMUTE_ARGS: -fPIC -O
+// PERMUTE_ARGS: -fPIC -O -fPIE
+// DISABLED: win32 win64
extern (C) int printf(const char*, ...);
@@ -44,10 +45,26 @@ void test17034()
/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=20441
+
+const(char)* moo(const (char) *s)
+{
+ return s;
+}
+
+void test20441()
+{
+ const(char) *x = "abc".ptr;
+ assert( moo(x) - x == 0 );
+}
+
+/***************************************************/
+
int main()
{
test11310();
test17034();
+ test20441();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/testptrref.d b/gcc/testsuite/gdc.test/runnable/testptrref.d
index 5bcf444..c616d57 100644
--- a/gcc/testsuite/gdc.test/runnable/testptrref.d
+++ b/gcc/testsuite/gdc.test/runnable/testptrref.d
@@ -7,15 +7,11 @@ version(CRuntime_Microsoft)
extern __gshared uint _DP_end;
extern __gshared uint _TP_beg;
extern __gshared uint _TP_end;
- extern int _tls_start;
- extern int _tls_end;
}
alias _DPbegin = _DP_beg;
alias _DPend = _DP_end;
alias _TPbegin = _TP_beg;
alias _TPend = _TP_end;
- alias _tlsstart = _tls_start;
- alias _tlsend = _tls_end;
__gshared void[] dataSection;
shared static this()
@@ -26,6 +22,15 @@ version(CRuntime_Microsoft)
dataSection = findImageSection(".data");
}
+ void[] tlsRange;
+ static this()
+ {
+ import core.internal.traits : externDFunc;
+ alias initTLSRanges = externDFunc!("rt.sections_win64.initTLSRanges",
+ void[] function() nothrow @nogc);
+ tlsRange = initTLSRanges();
+ }
+
version = ptrref_supported;
}
else version(Win32)
@@ -39,6 +44,13 @@ else version(Win32)
extern int _tlsstart;
extern int _tlsend;
}
+
+ void[] tlsRange;
+ static this()
+ {
+ tlsRange = (cast(void*)&_tlsstart)[0.. cast(void*)&_tlsend - cast(void*)&_tlsstart];
+ }
+
version = ptrref_supported;
}
@@ -91,13 +103,13 @@ void main()
version(ptrref_supported):
bool findTlsPtr(const(void)* ptr)
-{
+{
debug(PRINT) printf("findTlsPtr %p\n", ptr);
for (uint* p = &_TPbegin; p < &_TPend; p++)
{
- void* addr = cast(void*) &_tlsstart + *p;
+ void* addr = tlsRange.ptr + *p;
debug(PRINT) printf(" try %p\n", addr);
- assert(addr < &_tlsend);
+ assert(*p < tlsRange.length);
if (addr == ptr)
return true;
}
@@ -126,6 +138,9 @@ void testRefPtr()
debug(PRINT) printf("&_DPbegin %p\n", &_DPbegin);
debug(PRINT) printf("&_DPend %p\n", &_DPend);
+ debug(PRINT) printf("&_TPbegin %p\n", &_TPbegin);
+ debug(PRINT) printf("&_TPend %p\n", &_TPend);
+
assert(!findDataPtr(cast(void*)&sharedInt));
assert(!findTlsPtr(&tlsInt));
diff --git a/gcc/testsuite/gdc.test/runnable/testptrref_gc.d b/gcc/testsuite/gdc.test/runnable/testptrref_gc.d
new file mode 100644
index 0000000..3bd6bf5
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/testptrref_gc.d
@@ -0,0 +1,3 @@
+// REQUIRED_ARGS: -lowmem -Jrunnable
+// EXTRA_FILES: testptrref.d
+mixin(import("testptrref.d"));
diff --git a/gcc/testsuite/gdc.test/runnable/testreturn.d b/gcc/testsuite/gdc.test/runnable/testreturn.d
index fcebf79..42b93ba 100644
--- a/gcc/testsuite/gdc.test/runnable/testreturn.d
+++ b/gcc/testsuite/gdc.test/runnable/testreturn.d
@@ -1,9 +1,15 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
extern(C) int printf(const char*, ...);
alias TypeTuple(T...) = T;
/***************************************************/
-// 13336
+// https://issues.dlang.org/show_bug.cgi?id=13336
struct S13336
{
@@ -96,7 +102,7 @@ out(r)
assert(r == (f ? sx : sy));
result13336 = r;
}
-body
+do
{
mixin(fbody13336);
}
@@ -109,7 +115,7 @@ out(r)
assert(r == (f ? sx : sy));
result13336 = r;
}
-body
+do
{
mixin(fbody13336);
}
@@ -150,7 +156,7 @@ void test13336()
}
/***************************************************/
-// 15018
+// https://issues.dlang.org/show_bug.cgi?id=15018
struct S15018(int n)
{
diff --git a/gcc/testsuite/gdc.test/runnable/testrightthis.d b/gcc/testsuite/gdc.test/runnable/testrightthis.d
index 32879ce..e5d7ba3 100644
--- a/gcc/testsuite/gdc.test/runnable/testrightthis.d
+++ b/gcc/testsuite/gdc.test/runnable/testrightthis.d
@@ -474,7 +474,7 @@ void test7()
}
/********************************************************/
-// 4350
+// https://issues.dlang.org/show_bug.cgi?id=4350
template Mix4350() { int b; }
@@ -509,7 +509,7 @@ void test4350()
}
/********************************************************/
-// 6430
+// https://issues.dlang.org/show_bug.cgi?id=6430
auto bug6430(int a)
{
@@ -528,7 +528,7 @@ auto bug6430(int a, int b)
}
/********************************************************/
-// 9619
+// https://issues.dlang.org/show_bug.cgi?id=9619
struct Foo9619 { int x; }
void test9619()
@@ -540,7 +540,7 @@ void test9619()
}
/********************************************************/
-// 9633
+// https://issues.dlang.org/show_bug.cgi?id=9633
class Foo9633
{
@@ -573,7 +573,7 @@ void test9633()
}
/********************************************************/
-// 11245
+// https://issues.dlang.org/show_bug.cgi?id=11245
struct Vec11245
{
@@ -589,7 +589,7 @@ class Bar11245
}
/********************************************************/
-// 11614
+// https://issues.dlang.org/show_bug.cgi?id=11614
struct Tuple11614(T...)
{
@@ -613,7 +613,7 @@ struct Foo11614
}
/********************************************************/
-// 11993
+// https://issues.dlang.org/show_bug.cgi?id=11993
struct S11993
{
@@ -634,7 +634,7 @@ void test11993()
}
/********************************************************/
-// 15934
+// https://issues.dlang.org/show_bug.cgi?id=15934
class B15934
{
diff --git a/gcc/testsuite/gdc.test/runnable/testsafe.d b/gcc/testsuite/gdc.test/runnable/testsafe.d
index cec4c0f..11813a0 100644
--- a/gcc/testsuite/gdc.test/runnable/testsafe.d
+++ b/gcc/testsuite/gdc.test/runnable/testsafe.d
@@ -1,6 +1,6 @@
// PERMUTE_ARGS:
-//http://d.puremagic.com/issues/show_bug.cgi?id=5415
+//https://issues.dlang.org/show_bug.cgi?id=5415
@safe
void pointercast()
@@ -31,7 +31,7 @@ void pointercast2()
@safe
void pointerarithmetic()
-{//http://d.puremagic.com/issues/show_bug.cgi?id=4132
+{//https://issues.dlang.org/show_bug.cgi?id=4132
void* a;
int b;
@@ -137,7 +137,7 @@ struct uD
}
@safe
-void safeunions() // improved for issue 11510
+void safeunions() // improved for https://issues.dlang.org/show_bug.cgi?id=11510
{
SafeUnion1 su1;
SafeUnion2 su2;
@@ -197,11 +197,6 @@ void safeexception()
try {}
catch(Throwable e) {}
}));
-
- static assert(!__traits(compiles, () @safe {
- try {}
- catch {}
- }));
}
@safe
@@ -278,7 +273,7 @@ void use__gshared()
@safe
void voidinitializers()
-{//http://d.puremagic.com/issues/show_bug.cgi?id=4885
+{//https://issues.dlang.org/show_bug.cgi?id=4885
static assert(!__traits(compiles, () @safe { uint* ptr = void; } ));
static assert( __traits(compiles, () @safe { uint i = void; } ));
static assert( __traits(compiles, () @safe { uint[2] a = void; } ));
@@ -295,14 +290,14 @@ void voidinitializers()
@safe
void pointerindex()
-{//http://d.puremagic.com/issues/show_bug.cgi?id=9195
+{//https://issues.dlang.org/show_bug.cgi?id=9195
static assert(!__traits(compiles, () @safe { int* p; auto a = p[30]; }));
static assert( __traits(compiles, () @safe{ int* p; auto a = p[0]; }));
}
@safe
void basiccast()
-{//http://d.puremagic.com/issues/show_bug.cgi?id=5088
+{//https://issues.dlang.org/show_bug.cgi?id=5088
auto a = cast(int)cast(const int)1;
auto b = cast(real)cast(const int)1;
auto c = cast(real)cast(const real)2.0;
@@ -415,7 +410,7 @@ void classcast()
}
/***************************************************/
-// 6278
+// https://issues.dlang.org/show_bug.cgi?id=6278
@safe
{
@@ -423,18 +418,18 @@ void classcast()
class A6278 {
int test()
in { assert(0); }
- body { return 1; }
+ do { return 1; }
}
class B6278 : A6278 {
override int test()
in { assert(0); }
- body { return 1; }
+ do { return 1; }
}
}
/***************************************************/
-// 7803
+// https://issues.dlang.org/show_bug.cgi?id=7803
@safe int f7803() {
scope(success) {/* ... */}
@@ -447,13 +442,13 @@ nothrow int g7803() {
}
/***************************************************/
-// 6405
+// https://issues.dlang.org/show_bug.cgi?id=6405
void foo6405(int[][] args...) @trusted { }
void test6405() @safe { foo6405([1,2,3], [1,2,3]); }
/***************************************************/
-// 12502
+// https://issues.dlang.org/show_bug.cgi?id=12502
void test12502() @safe
{
@@ -495,4 +490,3 @@ void main()
{
test14162();
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/testscope.d b/gcc/testsuite/gdc.test/runnable/testscope.d
index ca5c4c9..32d66b5 100644
--- a/gcc/testsuite/gdc.test/runnable/testscope.d
+++ b/gcc/testsuite/gdc.test/runnable/testscope.d
@@ -1,5 +1,5 @@
// PERMUTE_ARGS:
-// REQUIRED_ARGS: -d -dip1000
+// REQUIRED_ARGS: -d -preview=dip1000
extern(C) int printf(const char*, ...);
@@ -293,8 +293,6 @@ void test11()
static int* p;
static int i;
bar11(p, &i);
-
- bar11((i,p), &i); // comma expressions are deprecated, but need to test them
}
/********************************************/
@@ -302,7 +300,7 @@ void test11()
int test17432(scope int delegate() dg)
{
- return dg();
+ return dg();
}
// stripped down version of std.traits.Parameters
@@ -342,6 +340,53 @@ template test14(T)
test14!(char[] function(return char[])) x14;
/********************************************/
+// https://issues.dlang.org/show_bug.cgi?id=17935
+
+struct ByChunk(IO)
+{
+@safe:
+ ~this() scope
+ {}
+
+ ubyte[] buf;
+ IO io;
+}
+
+struct IO
+{
+ ~this() @safe @nogc scope
+ {}
+}
+
+@safe @nogc void test17395()
+{
+ ubyte[256] buf;
+ auto chunks = ByChunk!IO(buf[], IO());
+ chunks.__xdtor(); // auto-generated inclusive (fields and struct) dtor
+}
+
+/********************************************/
+// https://issues.dlang.org/show_bug.cgi?id=20569
+
+void test20569() @safe
+{
+ static struct S
+ {
+ int value;
+ int* pointer;
+ }
+
+ /* explicit `scope`: */
+ scope S s1;
+ scope int* p1 = &s1.value;
+
+ /* inferred `scope`: */
+ int x;
+ S s2 = S(0, &x);
+ int* p2 = &s2.value;
+}
+
+/********************************************/
void main()
{
@@ -359,6 +404,8 @@ void main()
test7049();
test16747();
test11();
+ test17395();
+ test20569();
printf("Success\n");
}
diff --git a/gcc/testsuite/gdc.test/runnable/testscope2.d b/gcc/testsuite/gdc.test/runnable/testscope2.d
index 85282c2..1b8cf29 100644
--- a/gcc/testsuite/gdc.test/runnable/testscope2.d
+++ b/gcc/testsuite/gdc.test/runnable/testscope2.d
@@ -1,5 +1,4 @@
-// RUNNABLE_PHOBOS_TEST
-// REQUIRED_ARGS: -dip25
+// REQUIRED_ARGS:
/*
TEST_OUTPUT:
---
@@ -30,7 +29,7 @@ pragma(msg, "foo4 ", typeof(&SS.foo4));
void test3()
{
- version (all)
+ version (none)
{
import std.stdio;
writeln(SS.foo1.mangleof);
@@ -52,7 +51,7 @@ void test3()
assert(SS.foo4.mangleof == "_D10testscope22SS4foo4MFNcNkKNgPiZi");
// Test scope pretty-printing
- assert(typeof(SS.foo1).stringof == "ref return ulong(return ref int* delegate() return p)");
+ assert(typeof(SS.foo1).stringof == "ref ulong(return ref int* delegate() return p) return");
assert(typeof(SS.foo2).stringof == "ref int(return ref int delegate() p)");
assert(typeof(SS.foo3).stringof == "ref int(return ref inout(int*) p)");
assert(typeof(SS.foo4).stringof == "ref int(return ref inout(int*) p)");
@@ -255,4 +254,3 @@ void main()
test11();
printf("Success\n");
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/testsignals.d b/gcc/testsuite/gdc.test/runnable/testsignals.d
deleted file mode 100644
index c2fbcee..0000000
--- a/gcc/testsuite/gdc.test/runnable/testsignals.d
+++ /dev/null
@@ -1,114 +0,0 @@
-// RUNNABLE_PHOBOS_TEST
-import std.stdio;
-import std.signals;
-
-class Observer
-{ // our slot
- void watch(string msg, int i)
- {
- writefln("Observed msg '%s' and value %s", msg, i);
- }
-
- void watch2(int i, int j)
- {
- writefln("Observed msg %s,%s", i, j);
- }
-}
-
-class Foo
-{
- int value() { return _value; }
-
- int value(int v)
- {
- if (v != _value)
- { _value = v;
- // call all the connected slots with the two parameters
- emit("setting new value", v);
- }
- return v;
- }
-
- // Mix in all the code we need to make Foo into a signal
- mixin Signal!(string, int);
-
- private :
- int _value;
-}
-
-void test1()
-{
- Foo a = new Foo;
- Observer o = new Observer;
-
- a.value = 3; // should not call o.watch()
- a.connect(&o.watch); // o.watch is the slot
- a.value = 4; // should call o.watch()
- a.disconnect(&o.watch); // o.watch is no longer a slot
- a.value = 5; // so should not call o.watch()
- a.connect(&o.watch); // connect again
- a.value = 6; // should call o.watch()
- delete o; // destroying o should automatically disconnect it
- a.value = 7; // should not call o.watch()
-}
-
-/******************************************/
-
-class Input
-{
- mixin Signal!(int, int) click;
- mixin Signal!(char) keyDown;
-}
-
-void test2()
-{
- Observer o = new Observer();
- Input a = new Input();
- a.click.connect(&o.watch2);
- a.click.emit(5,6);
-}
-
-/******************************************/
-
-class Args3
-{
- int foo;
-}
-
-class Base3
-{
- ~this()
- {
- writefln("Base3 dtor!");
- }
-}
-
-class Test3 : Base3
-{
- mixin Signal!(Args3) A;
- mixin Signal!(Args3) B;
-
- ~this()
- {
- writefln("Test3 dtor");
- }
-}
-
-
-void test3()
-{
- auto test = new Test3;
-}
-
-
-/******************************************/
-
-int main()
-{
- test1();
- test2();
- test3();
-
- printf("Success\n");
- return 0;
-}
diff --git a/gcc/testsuite/gdc.test/runnable/testsocket.d b/gcc/testsuite/gdc.test/runnable/testsocket.d
deleted file mode 100644
index d061929..0000000
--- a/gcc/testsuite/gdc.test/runnable/testsocket.d
+++ /dev/null
@@ -1,51 +0,0 @@
-// RUNNABLE_PHOBOS_TEST
-// PERMUTE_ARGS:
-
-import std.stdio;
-import std.socket;
-
-class Connection
-{
- private
- {
- Socket sock;
- }
-
- void connect (string host, ushort port)
- {
- sock.connect (new InternetAddress (host, port));
- }
-
- void poll ()
- {
- SocketSet rset = new SocketSet (1); /** XXX: here is the bug */
-
- rset.reset ();
- rset.add (sock);
- }
-
- this ()
- {
-
- sock = new TcpSocket;
- sock.blocking = false;
- }
-}
-
-int main ()
-{
- try
- {
- Connection ns;
- ns = new Connection ();
- ns.connect ("localhost", 80);
- ns.poll ();
- delete ns;
- }
- catch(SocketException e)
- {
- }
- return 0;
-}
-
-
diff --git a/gcc/testsuite/gdc.test/runnable/teststdio.d b/gcc/testsuite/gdc.test/runnable/teststdio.d
deleted file mode 100644
index d340f21..0000000
--- a/gcc/testsuite/gdc.test/runnable/teststdio.d
+++ /dev/null
@@ -1,34 +0,0 @@
-// RUNNABLE_PHOBOS_TEST
-// PERMUTE_ARGS:
-// EXTRA_FILES: extra-files/teststdio.txt
-
-import std.stdio;
-import core.stdc.stdio;
-
-void main()
-{
- auto f = std.stdio.File("runnable/extra-files/teststdio.txt", "r");
- FILE* fp = f.getFP();
- string buf;
- int i;
- do
- {
- buf = f.readln('\n');
- foreach (c; buf)
- printf("%x\n", c);
- printf("\n");
- switch (i)
- {
- case 0: assert(buf == "asdfasdf\n"); break;
- case 1: assert(buf == "a\n"); break;
- case 2: assert(buf == "sdf\n"); break;
- case 3: assert(buf == "asdf\n"); break;
- case 4: assert(buf == "\n"); break;
- case 5: assert(buf == "\n"); break;
- case 6: assert(buf == null); break;
- default: assert(0);
- }
- i++;
- } while (!feof(fp));
- //fclose(fp);
-}
diff --git a/gcc/testsuite/gdc.test/runnable/testswitch.d b/gcc/testsuite/gdc.test/runnable/testswitch.d
index 02633a8..c7b9378 100644
--- a/gcc/testsuite/gdc.test/runnable/testswitch.d
+++ b/gcc/testsuite/gdc.test/runnable/testswitch.d
@@ -308,7 +308,7 @@ void bar14(A...)(int i)
{
goto case;
case A[j]:
- printf("a = %d, A[%d] = %d\n", a, j, A[j]);
+ printf("a = %d, A[%zd] = %d\n", a, j, A[j]);
}
break;
default:
@@ -356,10 +356,14 @@ int foo15(int i)
static this()
{
X15 = 4;
- Y15 = 4;
Z15 = 5;
}
+shared static this()
+{
+ Y15 = 4;
+}
+
void test15()
{
auto i = foo15(3);
@@ -465,7 +469,7 @@ int wrongcode3139(int x)
static assert(wrongcode3139(-5)==3);
-// bug 3139
+// https://issues.dlang.org/show_bug.cgi?id=3139
static assert(!is(typeof(
(long x) { switch(x) { case long.max: .. case -long.max:
default:} return 4; }(3)
@@ -499,7 +503,7 @@ void test7358()
}
/*****************************************/
-// 9263
+// https://issues.dlang.org/show_bug.cgi?id=9263
void test9263()
{
@@ -622,7 +626,7 @@ void test23()
}
/*****************************************/
-// 14352
+// https://issues.dlang.org/show_bug.cgi?id=14352
int transmogrify14352(int input)
{
@@ -659,7 +663,8 @@ void test14352()
}
/*****************************************/
-// Issue 14587 - DMD 2.067.1 generating crashing binary on OSX
+// https://issues.dlang.org/show_bug.cgi?id=14587
+// DMD 2.067.1 generating crashing binary on OSX
struct Card {
int value;
@@ -680,7 +685,8 @@ void test14587() {
}
/*****************************************/
-// Issue 15396 - static immutable not recognized as constant within switch statement
+// https://issues.dlang.org/show_bug.cgi?id=15396
+// static immutable not recognized as constant within switch statement
void test15396()
{
@@ -702,6 +708,33 @@ void test15396()
}
/*****************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15538
+
+struct S15538
+{
+ int a = 0;
+ int b = 1;
+}
+
+int f15538(S15538 s)
+{
+ switch (s.a)
+ {
+ case 0: return 10;
+ case 1: return 20;
+ case 2: return 30;
+ case 3: return 40;
+ default: return 99;
+ }
+}
+
+void test15538()
+{
+ S15538 s;
+ assert(f15538(s) == 10); /* fails */
+}
+
+/*****************************************/
int main()
{
@@ -732,6 +765,7 @@ int main()
test14352();
test14587();
test15396();
+ test15538();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/testthread.d b/gcc/testsuite/gdc.test/runnable/testthread.d
index 4ae4395..139a891 100644
--- a/gcc/testsuite/gdc.test/runnable/testthread.d
+++ b/gcc/testsuite/gdc.test/runnable/testthread.d
@@ -49,7 +49,7 @@ int main()
assert(f.x == 3);
int i;
- Thread tx[5];
+ Thread[5] tx;
for (i = 0; i < tx.length; i++)
tx[i] = new Thread(&f.bar);
for (i = 0; i < tx.length; i++)
diff --git a/gcc/testsuite/gdc.test/runnable/testthread2.d b/gcc/testsuite/gdc.test/runnable/testthread2.d
index 93aace6..53f8a3b 100644
--- a/gcc/testsuite/gdc.test/runnable/testthread2.d
+++ b/gcc/testsuite/gdc.test/runnable/testthread2.d
@@ -1,11 +1,5 @@
-// RUNNABLE_PHOBOS_TEST
// PERMUTE_ARGS:
-import std.algorithm : map;
-import std.random : Random, uniform, unpredictableSeed;
-import std.range : repeat;
-import std.stdio : writeln;
-
// Quick, dirty and inefficient AA using linear search, useful for testing.
struct LinearAA(K, V) {
K[] keys;
@@ -33,7 +27,7 @@ struct LinearAA(K, V) {
return val;
}
- V* opIn_r(K key) {
+ V* opBinaryRight(string op : "in")(K key) {
foreach(i, k; keys) {
if(key == k) {
return values.ptr + i;
@@ -67,24 +61,35 @@ struct LinearAA(K, V) {
}
}
-void main() {
- Random gen;
- uint[] seed;
- gen.seed(map!((a) {
- seed ~= unpredictableSeed;
- return seed[$-1]; })(repeat(0)));
- writeln(seed);
+extern (C) int rand();
+
+uint random(const uint max = uint.max)
+{
+ version (Windows)
+ {
+ // RAND_MAX is quite low for windows, extend the range by
+ // abusing multiple random values and rounding errors.
+ const a = rand(), b = rand();
+ const c = a < b ? double(a) / b : double(b) / a;
+ return (cast(int) (c * max)) % max;
+ }
+ else
+ return rand() % max;
+}
+
+void main()
+{
foreach(iter; 0..10) { // Bug only happens after a few iterations.
- writeln(iter);
+
uint[size_t] builtin;
LinearAA!(size_t, uint) linAA;
uint[] nums = new uint[100_000];
foreach(ref num; nums) {
- num = uniform(0U, uint.max, gen);
+ num = random();
}
foreach(i; 0..10_000) {
- auto index = uniform(0, nums.length, gen);
+ auto index = random(cast(uint) nums.length);
if(index in builtin) {
assert(index in linAA);
assert(builtin[index] == nums[index]);
diff --git a/gcc/testsuite/gdc.test/runnable/testtypeid.d b/gcc/testsuite/gdc.test/runnable/testtypeid.d
index ebdda30..d3f4503 100644
--- a/gcc/testsuite/gdc.test/runnable/testtypeid.d
+++ b/gcc/testsuite/gdc.test/runnable/testtypeid.d
@@ -1,6 +1,6 @@
-// RUNNABLE_PHOBOS_TEST
+
import core.vararg;
-import std.stdio;
+import core.stdc.stdio;
/******************************************************/
@@ -18,10 +18,10 @@ FOO3 foox3;
void foo3(int x, ...)
{
- printf("%d arguments\n", _arguments.length);
+ printf("%zd arguments\n", _arguments.length);
for (int i = 0; i < _arguments.length; i++)
{
- writeln(_arguments[i].toString());
+ //writeln(_arguments[i].toString());
if (_arguments[i] is typeid(int))
{
@@ -76,20 +76,6 @@ void test4()
ti = typeid(real[]);
assert(!(ti is null));
- ti = typeid(ifloat[]);
- assert(!(ti is null));
- ti = typeid(idouble[]);
- assert(!(ti is null));
- ti = typeid(ireal[]);
- assert(!(ti is null));
-
- ti = typeid(cfloat[]);
- assert(!(ti is null));
- ti = typeid(cdouble[]);
- assert(!(ti is null));
- ti = typeid(creal[]);
- assert(!(ti is null));
-
ti = typeid(void);
assert(!(ti is null));
ti = typeid(void[]);
@@ -210,26 +196,6 @@ void test16()
/******************************************************/
-void test17()
-{
- TypeInfo ti = typeid(ifloat*);
- assert(!(ti is null));
- assert(ti.tsize==(ifloat*).sizeof);
- assert(ti.toString()=="ifloat*");
-}
-
-/******************************************************/
-
-void test18()
-{
- TypeInfo ti = typeid(cfloat*);
- assert(!(ti is null));
- assert(ti.tsize==(cfloat*).sizeof);
- assert(ti.toString()=="cfloat*");
-}
-
-/******************************************************/
-
void test19()
{
TypeInfo ti = typeid(double*);
@@ -240,26 +206,6 @@ void test19()
/******************************************************/
-void test20()
-{
- TypeInfo ti = typeid(idouble*);
- assert(!(ti is null));
- assert(ti.tsize==(idouble*).sizeof);
- assert(ti.toString()=="idouble*");
-}
-
-/******************************************************/
-
-void test21()
-{
- TypeInfo ti = typeid(cdouble*);
- assert(!(ti is null));
- assert(ti.tsize==(cdouble*).sizeof);
- assert(ti.toString()=="cdouble*");
-}
-
-/******************************************************/
-
void test22()
{
TypeInfo ti = typeid(real*);
@@ -270,26 +216,6 @@ void test22()
/******************************************************/
-void test23()
-{
- TypeInfo ti = typeid(ireal*);
- assert(!(ti is null));
- assert(ti.tsize==(ireal*).sizeof);
- assert(ti.toString()=="ireal*");
-}
-
-/******************************************************/
-
-void test24()
-{
- TypeInfo ti = typeid(creal*);
- assert(!(ti is null));
- assert(ti.tsize==(creal*).sizeof);
- assert(ti.toString()=="creal*");
-}
-
-/******************************************************/
-
void test25()
{
TypeInfo ti = typeid(char*);
@@ -367,10 +293,10 @@ class Bar32 { long y = 4; }
void printargs(int x, ...)
{
- printf("%d arguments\n", _arguments.length);
+ printf("%zd arguments\n", _arguments.length);
for (int i = 0; i < _arguments.length; i++)
{
- writeln(_arguments[i].toString());
+ //writeln(_arguments[i].toString());
if (_arguments[i] == typeid(int))
{
@@ -506,7 +432,7 @@ void test40()
}
/******************************************************/
-// 9442
+// https://issues.dlang.org/show_bug.cgi?id=9442
class C
{
@@ -526,7 +452,7 @@ void test9442()
}
/******************************************************/
-// 10451
+// https://issues.dlang.org/show_bug.cgi?id=10451
struct Foo10451;
@@ -543,7 +469,7 @@ void test10451()
}
/******************************************************/
-// 11010
+// https://issues.dlang.org/show_bug.cgi?id=11010
struct S11010 { S11010* p; }
@@ -567,7 +493,7 @@ void test11010()
}
/******************************************************/
-// 13045
+// https://issues.dlang.org/show_bug.cgi?id=13045
void test13045a()
{
@@ -623,7 +549,7 @@ void test13045b()
}
/******************************************************/
-// 15680
+// https://issues.dlang.org/show_bug.cgi?id=15680
void test15680()
{
@@ -651,14 +577,8 @@ int main()
test14();
test15();
test16();
- test17();
- test18();
test19();
- test20();
- test21();
test22();
- test23();
- test24();
test25();
test26();
test27();
diff --git a/gcc/testsuite/gdc.test/runnable/traits.d b/gcc/testsuite/gdc.test/runnable/traits.d
index 9d14ecd..ddd5059 100644
--- a/gcc/testsuite/gdc.test/runnable/traits.d
+++ b/gcc/testsuite/gdc.test/runnable/traits.d
@@ -1,4 +1,3 @@
-// RUNNABLE_PHOBOS_TEST
/*
PERMUTE_ARGS:
EXTRA_FILES: imports/a9546.d
@@ -17,7 +16,7 @@ __lambda1
module traits;
-import std.stdio;
+import core.stdc.stdio;
alias int myint;
struct S { void bar() { } int x = 4; static int z = 5; }
@@ -34,7 +33,6 @@ struct D1 { @disable void true_(); void false_(){} }
void test1()
{
auto t = __traits(isArithmetic, int);
- writeln(t);
assert(t == true);
assert(__traits(isArithmetic) == false);
@@ -61,12 +59,6 @@ void test1()
assert(__traits(isArithmetic, float) == true);
assert(__traits(isArithmetic, double) == true);
assert(__traits(isArithmetic, real) == true);
- assert(__traits(isArithmetic, ifloat) == true);
- assert(__traits(isArithmetic, idouble) == true);
- assert(__traits(isArithmetic, ireal) == true);
- assert(__traits(isArithmetic, cfloat) == true);
- assert(__traits(isArithmetic, cdouble) == true);
- assert(__traits(isArithmetic, creal) == true);
assert(__traits(isArithmetic, char) == true);
assert(__traits(isArithmetic, wchar) == true);
assert(__traits(isArithmetic, dchar) == true);
@@ -81,7 +73,6 @@ void test1()
void test2()
{
auto t = __traits(isScalar, int);
- writeln(t);
assert(t == true);
assert(__traits(isScalar) == false);
@@ -108,12 +99,6 @@ void test2()
assert(__traits(isScalar, float) == true);
assert(__traits(isScalar, double) == true);
assert(__traits(isScalar, real) == true);
- assert(__traits(isScalar, ifloat) == true);
- assert(__traits(isScalar, idouble) == true);
- assert(__traits(isScalar, ireal) == true);
- assert(__traits(isScalar, cfloat) == true);
- assert(__traits(isScalar, cdouble) == true);
- assert(__traits(isScalar, creal) == true);
assert(__traits(isScalar, char) == true);
assert(__traits(isScalar, wchar) == true);
assert(__traits(isScalar, dchar) == true);
@@ -147,12 +132,6 @@ void test3()
assert(__traits(isIntegral, float) == false);
assert(__traits(isIntegral, double) == false);
assert(__traits(isIntegral, real) == false);
- assert(__traits(isIntegral, ifloat) == false);
- assert(__traits(isIntegral, idouble) == false);
- assert(__traits(isIntegral, ireal) == false);
- assert(__traits(isIntegral, cfloat) == false);
- assert(__traits(isIntegral, cdouble) == false);
- assert(__traits(isIntegral, creal) == false);
assert(__traits(isIntegral, char) == true);
assert(__traits(isIntegral, wchar) == true);
assert(__traits(isIntegral, dchar) == true);
@@ -185,12 +164,6 @@ void test4()
assert(__traits(isFloating, float) == true);
assert(__traits(isFloating, double) == true);
assert(__traits(isFloating, real) == true);
- assert(__traits(isFloating, ifloat) == true);
- assert(__traits(isFloating, idouble) == true);
- assert(__traits(isFloating, ireal) == true);
- assert(__traits(isFloating, cfloat) == true);
- assert(__traits(isFloating, cdouble) == true);
- assert(__traits(isFloating, creal) == true);
assert(__traits(isFloating, char) == false);
assert(__traits(isFloating, wchar) == false);
assert(__traits(isFloating, dchar) == false);
@@ -223,12 +196,6 @@ void test5()
assert(__traits(isUnsigned, float) == false);
assert(__traits(isUnsigned, double) == false);
assert(__traits(isUnsigned, real) == false);
- assert(__traits(isUnsigned, ifloat) == false);
- assert(__traits(isUnsigned, idouble) == false);
- assert(__traits(isUnsigned, ireal) == false);
- assert(__traits(isUnsigned, cfloat) == false);
- assert(__traits(isUnsigned, cdouble) == false);
- assert(__traits(isUnsigned, creal) == false);
assert(__traits(isUnsigned, char) == true);
assert(__traits(isUnsigned, wchar) == true);
assert(__traits(isUnsigned, dchar) == true);
@@ -261,12 +228,6 @@ void test6()
assert(__traits(isAssociativeArray, float) == false);
assert(__traits(isAssociativeArray, double) == false);
assert(__traits(isAssociativeArray, real) == false);
- assert(__traits(isAssociativeArray, ifloat) == false);
- assert(__traits(isAssociativeArray, idouble) == false);
- assert(__traits(isAssociativeArray, ireal) == false);
- assert(__traits(isAssociativeArray, cfloat) == false);
- assert(__traits(isAssociativeArray, cdouble) == false);
- assert(__traits(isAssociativeArray, creal) == false);
assert(__traits(isAssociativeArray, char) == false);
assert(__traits(isAssociativeArray, wchar) == false);
assert(__traits(isAssociativeArray, dchar) == false);
@@ -299,12 +260,6 @@ void test7()
assert(__traits(isStaticArray, float) == false);
assert(__traits(isStaticArray, double) == false);
assert(__traits(isStaticArray, real) == false);
- assert(__traits(isStaticArray, ifloat) == false);
- assert(__traits(isStaticArray, idouble) == false);
- assert(__traits(isStaticArray, ireal) == false);
- assert(__traits(isStaticArray, cfloat) == false);
- assert(__traits(isStaticArray, cdouble) == false);
- assert(__traits(isStaticArray, creal) == false);
assert(__traits(isStaticArray, char) == false);
assert(__traits(isStaticArray, wchar) == false);
assert(__traits(isStaticArray, dchar) == false);
@@ -338,12 +293,6 @@ void test8()
assert(__traits(isAbstractClass, float) == false);
assert(__traits(isAbstractClass, double) == false);
assert(__traits(isAbstractClass, real) == false);
- assert(__traits(isAbstractClass, ifloat) == false);
- assert(__traits(isAbstractClass, idouble) == false);
- assert(__traits(isAbstractClass, ireal) == false);
- assert(__traits(isAbstractClass, cfloat) == false);
- assert(__traits(isAbstractClass, cdouble) == false);
- assert(__traits(isAbstractClass, creal) == false);
assert(__traits(isAbstractClass, char) == false);
assert(__traits(isAbstractClass, wchar) == false);
assert(__traits(isAbstractClass, dchar) == false);
@@ -400,18 +349,16 @@ void test13()
auto j = __traits(getMember, S, "z");
assert(j == 5);
- writeln(__traits(hasMember, s, "x"));
assert(__traits(hasMember, s, "x") == true);
assert(__traits(hasMember, S, "z") == true);
assert(__traits(hasMember, S, "aaa") == false);
auto k = __traits(classInstanceSize, C);
- writeln(k);
assert(k == C.classinfo.initializer.length);
}
/********************************************************/
-// 7123
+// https://issues.dlang.org/show_bug.cgi?id=7123
private struct DelegateFaker7123(F)
{
@@ -443,7 +390,6 @@ class D14
void test14()
{
auto a = [__traits(derivedMembers, D14)];
- writeln(a);
assert(a == ["__ctor","__dtor","foo", "__xdtor"]);
}
@@ -461,12 +407,15 @@ void test15()
{
D15 d = new D15();
- foreach (t; __traits(getVirtualFunctions, D15, "foo"))
- writeln(typeid(typeof(t)));
+ assert(__traits(getVirtualFunctions, D15, "foo").length == 2);
+ assert(typeid(typeof(__traits(getVirtualFunctions, D15, "foo")[0])).toString()
+ == "void function()");
+ assert(typeid(typeof(__traits(getVirtualFunctions, D15, "foo")[1])).toString()
+ == "int function(int)");
alias typeof(__traits(getVirtualFunctions, D15, "foo")) b;
- foreach (t; b)
- writeln(typeid(t));
+ assert(typeid(b[0]).toString() == "void function()");
+ assert(typeid(b[1]).toString() == "int function(int)");
auto i = __traits(getVirtualFunctions, d, "foo")[1](1);
assert(i == 2);
@@ -485,8 +434,8 @@ void test16()
assert(__traits(isSame, foo16, bar16) == false);
assert(__traits(isSame, foo16, S16) == false);
assert(__traits(isSame, S16, S16) == true);
- assert(__traits(isSame, std, S16) == false);
- assert(__traits(isSame, std, std) == true);
+ assert(__traits(isSame, core, S16) == false);
+ assert(__traits(isSame, core, core) == true);
}
/********************************************************/
@@ -508,7 +457,7 @@ void test17()
assert(__traits(compiles, typeof(1)) == true);
assert(__traits(compiles, S17.s1) == true);
assert(__traits(compiles, S17.s3) == false);
- assert(__traits(compiles, 1,2,3,int,long,std) == true);
+ assert(__traits(compiles, 1,2,3,int,long,core) == true);
assert(__traits(compiles, 3[1]) == false);
assert(__traits(compiles, 1,2,3,int,long,3[1]) == false);
}
@@ -525,7 +474,6 @@ interface D18
void test18()
{
auto a = __traits(allMembers, D18);
- writeln(a);
assert(a.length == 1);
}
@@ -546,11 +494,10 @@ class C19
void test19()
{
auto a = __traits(allMembers, C19);
- writeln(a);
assert(a.length == 9);
foreach( m; __traits(allMembers, C19) )
- writeln(m);
+ printf("%.*s\n", cast(int)m.length, m.ptr);
}
@@ -603,12 +550,14 @@ void test22()
{
D22 d = new D22();
- foreach (t; __traits(getOverloads, D22, "foo"))
- writeln(typeid(typeof(t)));
+ assert(typeid(typeof(__traits(getOverloads, D22, "foo")[0])).toString()
+ == "void function()");
+ assert(typeid(typeof(__traits(getOverloads, D22, "foo")[1])).toString()
+ == "int function(int)");
alias typeof(__traits(getOverloads, D22, "foo")) b;
- foreach (t; b)
- writeln(typeid(t));
+ assert(typeid(b[0]).toString() == "void function()");
+ assert(typeid(b[1]).toString() == "int function(int)");
auto i = __traits(getOverloads, d, "foo")[1](1);
assert(i == 2);
@@ -642,7 +591,7 @@ struct Test24
static assert(__traits(getVisibility, __traits(getOverloads, Test24, "test24")[1]) == "private");
/********************************************************/
-// 1369
+// https://issues.dlang.org/show_bug.cgi?id=1369
void test1369()
{
@@ -698,7 +647,7 @@ static assert([__traits(allMembers, S2234b)] == ["x"]);
static assert([__traits(allMembers, S2234c)] == ["foo"]);
/********************************************************/
-// 5878
+// https://issues.dlang.org/show_bug.cgi?id=5878
template J5878(A)
{
@@ -735,7 +684,7 @@ static assert([__traits(allMembers,Test6674)] == [
"toString","toHash","opCmp","opEquals","Monitor","factory"]);
/********************************************************/
-// 6073
+// https://issues.dlang.org/show_bug.cgi?id=6073
struct S6073 {}
@@ -747,13 +696,13 @@ alias T6073!(__traits(parent, S6073)) U6073; // error
static assert(__traits(isSame, V6073, U6073)); // same instantiation == same arguemnts
/********************************************************/
-// 7027
+// https://issues.dlang.org/show_bug.cgi?id=7027
struct Foo7027 { int a; }
static assert(!__traits(compiles, { return Foo7027.a; }));
/********************************************************/
-// 9213
+// https://issues.dlang.org/show_bug.cgi?id=9213
class Foo9213 { int a; }
static assert(!__traits(compiles, { return Foo9213.a; }));
@@ -795,7 +744,7 @@ static assert(__traits(isVirtualMethod, FF.YYY));
static assert(__traits(getVirtualMethods, FF, "YYY").length == 1);
/********************************************************/
-// 7608
+// https://issues.dlang.org/show_bug.cgi?id=7608
struct S7608a(bool T)
{
@@ -820,7 +769,7 @@ void test7608()
}
/********************************************************/
-// 7858
+// https://issues.dlang.org/show_bug.cgi?id=7858
void test7858()
{
@@ -857,7 +806,7 @@ void test7858()
}
/********************************************************/
-// 8971
+// https://issues.dlang.org/show_bug.cgi?id=8971
template Tuple8971(TL...){ alias TL Tuple8971; }
@@ -873,7 +822,7 @@ class A8971
}
/********************************************************/
-// 8972
+// https://issues.dlang.org/show_bug.cgi?id=8972
struct A8972
{
@@ -956,7 +905,7 @@ void getVisibility()
}
/********************************************************/
-// 9546
+// https://issues.dlang.org/show_bug.cgi?id=9546
void test9546()
{
@@ -1007,7 +956,7 @@ void test9546()
}
/********************************************************/
-// 9091
+// https://issues.dlang.org/show_bug.cgi?id=9091
template isVariable9091(X...) if (X.length == 1)
{
@@ -1153,7 +1102,7 @@ void test9237()
}
/*************************************************************/
-// 5978
+// https://issues.dlang.org/show_bug.cgi?id=5978
void test5978()
{
@@ -1178,7 +1127,7 @@ void test7408()
}
/*************************************************************/
-// 9552
+// https://issues.dlang.org/show_bug.cgi?id=9552
class C9552
{
@@ -1225,7 +1174,7 @@ void test9136()
}
/********************************************************/
-// 9939
+// https://issues.dlang.org/show_bug.cgi?id=9939
struct Test9939
{
@@ -1245,7 +1194,7 @@ struct Test9939
static assert([__traits(allMembers, Test9939)] == ["f", "A", "B", "NamedEnum"]);
/********************************************************/
-// 10043
+// https://issues.dlang.org/show_bug.cgi?id=10043
void test10043()
{
@@ -1255,7 +1204,7 @@ void test10043()
}
/********************************************************/
-// 10096
+// https://issues.dlang.org/show_bug.cgi?id=10096
struct S10096X
{
@@ -1270,7 +1219,7 @@ struct S10096X
this(this) {}
~this() {}
- string getStr() in { assert(str); } out(r) { assert(r == str); } body { return str; }
+ string getStr() in(str) out(r; r == str) { return str; }
}
static assert(
[__traits(allMembers, S10096X)] ==
@@ -1288,7 +1237,7 @@ class C10096X
this(int) {}
~this() {}
- string getStr() in { assert(str); } out(r) { assert(r == str); } body { return str; }
+ string getStr() in(str) out(r; r == str) { return str; }
}
static assert(
[__traits(allMembers, C10096X)] ==
@@ -1341,117 +1290,6 @@ void test_getUnitTests ()
/********************************************************/
-void test_getFunctionAttributes()
-{
- alias tuple(T...) = T;
-
- struct S
- {
- int noF() { return 0; }
- int constF() const { return 0; }
- int immutableF() immutable { return 0; }
- int inoutF() inout { return 0; }
- int sharedF() shared { return 0; }
-
- int x;
- ref int refF() { return x; }
- int propertyF() @property { return 0; }
- int nothrowF() nothrow { return 0; }
- int nogcF() @nogc { return 0; }
-
- int systemF() @system { return 0; }
- int trustedF() @trusted { return 0; }
- int safeF() @safe { return 0; }
-
- int pureF() pure { return 0; }
- }
-
- static assert(__traits(getFunctionAttributes, S.noF) == tuple!("@system"));
- static assert(__traits(getFunctionAttributes, typeof(S.noF)) == tuple!("@system"));
-
- static assert(__traits(getFunctionAttributes, S.constF) == tuple!("const", "@system"));
- static assert(__traits(getFunctionAttributes, typeof(S.constF)) == tuple!("const", "@system"));
-
- static assert(__traits(getFunctionAttributes, S.immutableF) == tuple!("immutable", "@system"));
- static assert(__traits(getFunctionAttributes, typeof(S.immutableF)) == tuple!("immutable", "@system"));
-
- static assert(__traits(getFunctionAttributes, S.inoutF) == tuple!("inout", "@system"));
- static assert(__traits(getFunctionAttributes, typeof(S.inoutF)) == tuple!("inout", "@system"));
-
- static assert(__traits(getFunctionAttributes, S.sharedF) == tuple!("shared", "@system"));
- static assert(__traits(getFunctionAttributes, typeof(S.sharedF)) == tuple!("shared", "@system"));
-
- static assert(__traits(getFunctionAttributes, S.refF) == tuple!("ref", "@system"));
- static assert(__traits(getFunctionAttributes, typeof(S.refF)) == tuple!("ref", "@system"));
-
- static assert(__traits(getFunctionAttributes, S.propertyF) == tuple!("@property", "@system"));
- static assert(__traits(getFunctionAttributes, typeof(&S.propertyF)) == tuple!("@property", "@system"));
-
- static assert(__traits(getFunctionAttributes, S.nothrowF) == tuple!("nothrow", "@system"));
- static assert(__traits(getFunctionAttributes, typeof(S.nothrowF)) == tuple!("nothrow", "@system"));
-
- static assert(__traits(getFunctionAttributes, S.nogcF) == tuple!("@nogc", "@system"));
- static assert(__traits(getFunctionAttributes, typeof(S.nogcF)) == tuple!("@nogc", "@system"));
-
- static assert(__traits(getFunctionAttributes, S.systemF) == tuple!("@system"));
- static assert(__traits(getFunctionAttributes, typeof(S.systemF)) == tuple!("@system"));
-
- static assert(__traits(getFunctionAttributes, S.trustedF) == tuple!("@trusted"));
- static assert(__traits(getFunctionAttributes, typeof(S.trustedF)) == tuple!("@trusted"));
-
- static assert(__traits(getFunctionAttributes, S.safeF) == tuple!("@safe"));
- static assert(__traits(getFunctionAttributes, typeof(S.safeF)) == tuple!("@safe"));
-
- static assert(__traits(getFunctionAttributes, S.pureF) == tuple!("pure", "@system"));
- static assert(__traits(getFunctionAttributes, typeof(S.pureF)) == tuple!("pure", "@system"));
-
- int pure_nothrow() nothrow pure { return 0; }
- static ref int static_ref_property() @property { return *(new int); }
- ref int ref_property() @property { return *(new int); }
- void safe_nothrow() @safe nothrow { }
-
- static assert(__traits(getFunctionAttributes, pure_nothrow) == tuple!("pure", "nothrow", "@nogc", "@safe"));
- static assert(__traits(getFunctionAttributes, typeof(pure_nothrow)) == tuple!("pure", "nothrow", "@nogc", "@safe"));
-
- static assert(__traits(getFunctionAttributes, static_ref_property) == tuple!("pure", "nothrow", "@property", "ref", "@safe"));
- static assert(__traits(getFunctionAttributes, typeof(&static_ref_property)) == tuple!("pure", "nothrow", "@property", "ref", "@safe"));
-
- static assert(__traits(getFunctionAttributes, ref_property) == tuple!("pure", "nothrow", "@property", "ref", "@safe"));
- static assert(__traits(getFunctionAttributes, typeof(&ref_property)) == tuple!("pure", "nothrow", "@property", "ref", "@safe"));
-
- static assert(__traits(getFunctionAttributes, safe_nothrow) == tuple!("pure", "nothrow", "@nogc", "@safe"));
- static assert(__traits(getFunctionAttributes, typeof(safe_nothrow)) == tuple!("pure", "nothrow", "@nogc", "@safe"));
-
- struct S2
- {
- int pure_const() const pure { return 0; }
- int pure_sharedconst() const shared pure { return 0; }
- }
-
- static assert(__traits(getFunctionAttributes, S2.pure_const) == tuple!("const", "pure", "@system"));
- static assert(__traits(getFunctionAttributes, typeof(S2.pure_const)) == tuple!("const", "pure", "@system"));
-
- static assert(__traits(getFunctionAttributes, S2.pure_sharedconst) == tuple!("const", "shared", "pure", "@system"));
- static assert(__traits(getFunctionAttributes, typeof(S2.pure_sharedconst)) == tuple!("const", "shared", "pure", "@system"));
-
- static assert(__traits(getFunctionAttributes, (int a) { }) == tuple!("pure", "nothrow", "@nogc", "@safe"));
- static assert(__traits(getFunctionAttributes, typeof((int a) { })) == tuple!("pure", "nothrow", "@nogc", "@safe"));
-
- auto safeDel = delegate() @safe { };
- static assert(__traits(getFunctionAttributes, safeDel) == tuple!("pure", "nothrow", "@nogc", "@safe"));
- static assert(__traits(getFunctionAttributes, typeof(safeDel)) == tuple!("pure", "nothrow", "@nogc", "@safe"));
-
- auto trustedDel = delegate() @trusted { };
- static assert(__traits(getFunctionAttributes, trustedDel) == tuple!("pure", "nothrow", "@nogc", "@trusted"));
- static assert(__traits(getFunctionAttributes, typeof(trustedDel)) == tuple!("pure", "nothrow", "@nogc", "@trusted"));
-
- auto systemDel = delegate() @system { };
- static assert(__traits(getFunctionAttributes, systemDel) == tuple!("pure", "nothrow", "@nogc", "@system"));
- static assert(__traits(getFunctionAttributes, typeof(systemDel)) == tuple!("pure", "nothrow", "@nogc", "@system"));
-}
-
-/********************************************************/
-
class TestIsOverrideFunctionBase
{
void bar () {}
@@ -1469,7 +1307,8 @@ void test_isOverrideFunction ()
}
/********************************************************/
-// 11711 - Add __traits(getAliasThis)
+// https://issues.dlang.org/show_bug.cgi?id=11711
+// Add __traits(getAliasThis)
alias TypeTuple(T...) = T;
@@ -1492,11 +1331,15 @@ void test11711()
static assert(__traits(getAliasThis, S2) == TypeTuple!("var"));
static assert(is(typeof(__traits(getMember, S2.init, __traits(getAliasThis, S2)[0]))
== TypeTuple!(int, string)));
+
+ // https://issues.dlang.org/show_bug.cgi?id=19439
+ // Return empty tuple for non-aggregate types.
+ static assert(__traits(getAliasThis, int).length == 0);
}
/********************************************************/
-// Issue 12278
+// https://issues.dlang.org/show_bug.cgi?id=12278
class Foo12278
{
@@ -1511,7 +1354,7 @@ struct InPlace12278(T)
}
/********************************************************/
-// 12571
+// https://issues.dlang.org/show_bug.cgi?id=12571
mixin template getScopeName12571()
{
@@ -1525,7 +1368,7 @@ void test12571()
}
/********************************************************/
-// 12237
+// https://issues.dlang.org/show_bug.cgi?id=12237
auto f12237(T)(T a)
{
@@ -1564,7 +1407,7 @@ void async(ARGS...)(ARGS)
alias test17495 = async!(int, int);
/********************************************************/
-// 15094
+// https://issues.dlang.org/show_bug.cgi?id=15094
void test15094()
{
@@ -1638,11 +1481,10 @@ int main()
test9136();
test10096();
test_getUnitTests();
- test_getFunctionAttributes();
test_isOverrideFunction();
test12237();
test15094();
- writeln("Success");
+ printf("Success\n");
return 0;
}
diff --git a/gcc/testsuite/gdc.test/runnable/traits_child.d b/gcc/testsuite/gdc.test/runnable/traits_child.d
index 056b8f1..bea8511 100644
--- a/gcc/testsuite/gdc.test/runnable/traits_child.d
+++ b/gcc/testsuite/gdc.test/runnable/traits_child.d
@@ -64,7 +64,7 @@ alias cm = C.m;
alias cmset = C.m.set;
-// adapted from http://thecybershadow.net/d/dconf2017/#/21
+// adapted from https://thecybershadow.net/d/dconf2017/#/21
struct S { string a, b, c; }
static string printField(alias field)()
diff --git a/gcc/testsuite/gdc.test/runnable/traits_getPointerBitmap.d b/gcc/testsuite/gdc.test/runnable/traits_getPointerBitmap.d
index 512bcea..3c5a4bd 100644
--- a/gcc/testsuite/gdc.test/runnable/traits_getPointerBitmap.d
+++ b/gcc/testsuite/gdc.test/runnable/traits_getPointerBitmap.d
@@ -1,8 +1,7 @@
module traits_getPointerBitmap;
-import std.stdio;
-static import std.traits;
+import core.stdc.stdio;
// version = RTInfo;
// debug = LOG;
@@ -190,7 +189,7 @@ class N
union U
{
- size_t data[4];
+ size_t[4] data;
Large*[] arr; // { length, ptr }
struct
@@ -210,8 +209,6 @@ void testRTInfo()
testType!(int) ([ 0b0 ]);
testType!(long) ([ 0b00 ]);
testType!(double) ([ 0b00 ]);
- testType!(ifloat) ([ 0b0 ]);
- testType!(cdouble) ([ 0b0000 ]);
testType!(dg) ([ 0b01 ]);
testType!(fn) ([ 0b0 ]);
testType!(S!fn) ([ 0b100 ]);
diff --git a/gcc/testsuite/gdc.test/runnable/traits_getUnitTests.d b/gcc/testsuite/gdc.test/runnable/traits_getUnitTests.d
index 38295ae..2786917 100644
--- a/gcc/testsuite/gdc.test/runnable/traits_getUnitTests.d
+++ b/gcc/testsuite/gdc.test/runnable/traits_getUnitTests.d
@@ -62,7 +62,7 @@ void test_getUnitTestsFromImport ()
static assert(__traits(getUnitTests, mixin("imports.traits_getUnitTests_import")).length == 1);
}
-// 11358
+// https://issues.dlang.org/show_bug.cgi?id=11358
debug { }
enum len11358 = __traits(getUnitTests, mixin(__MODULE__)).length;
diff --git a/gcc/testsuite/gdc.test/runnable/traits_initSymbol.d b/gcc/testsuite/gdc.test/runnable/traits_initSymbol.d
new file mode 100644
index 0000000..0385d98
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/traits_initSymbol.d
@@ -0,0 +1,119 @@
+struct Zero
+{
+ int x;
+}
+
+void testZero()
+{
+ auto zeroInit = __traits(initSymbol, Zero);
+ static assert(is(typeof(zeroInit) == const(void[])));
+
+ assert(zeroInit.ptr is null);
+ assert(zeroInit.length == Zero.sizeof);
+}
+
+struct NonZero
+{
+ long x = 1;
+}
+
+void testNonZero()
+{
+ auto nonZeroInit = __traits(initSymbol, NonZero);
+ static assert(is(typeof(nonZeroInit) == const(void[])));
+
+ assert(nonZeroInit.ptr);
+ assert(nonZeroInit.length == NonZero.sizeof);
+ assert(cast(const(long[])) nonZeroInit == [1L]);
+}
+
+class C
+{
+ short x = 123;
+}
+
+void testClass()
+{
+ auto cInit = __traits(initSymbol, C);
+ static assert(is(typeof(cInit) == const(void[])));
+
+ assert(cInit.ptr);
+ assert(cInit.length == __traits(classInstanceSize, C));
+
+ scope c = new C;
+ assert((cast(void*) c)[0 .. cInit.length] == cInit);
+}
+
+struct AlignedStruct
+{
+ short s = 5;
+ // 2 byte padding
+ align(4) char c = 'c';
+ // 3 byte padding
+ int i = 4;
+ // reduced alignment
+ align(1) long l = 0xDEADBEEF;
+}
+
+void testAlignedStruct()
+{
+ auto init = __traits(initSymbol, AlignedStruct);
+
+ assert(init.ptr);
+ assert(init.length == AlignedStruct.sizeof);
+
+ version (GNU)
+ AlignedStruct exp = AlignedStruct();
+ else
+ AlignedStruct exp;
+ assert(init == (cast(void*) &exp)[0 .. AlignedStruct.sizeof]);
+
+}
+
+class AlignedClass : C
+{
+ short s = 5;
+ // 2 byte padding
+ align(4) char c = 'c';
+ // 3 byte padding
+ int i = 4;
+ // reduced alignment
+ align(1) long l = 0xDEADBEEF;
+}
+
+void testAlignedClass()
+{
+ auto init = __traits(initSymbol, AlignedClass);
+
+ assert(init.ptr);
+ assert(init.length == __traits(classInstanceSize, AlignedClass));
+
+ scope ac = new AlignedClass();
+ assert(init == (cast(void*) ac)[0 .. init.length]);
+}
+
+extern (C++) class ExternCppClass
+{
+ int i = 4;
+}
+
+void testExternCppClass()
+{
+ auto init = __traits(initSymbol, ExternCppClass);
+
+ assert(init.ptr);
+ assert(init.length == __traits(classInstanceSize, ExternCppClass));
+
+ scope ac = new ExternCppClass();
+ assert(init == (cast(void*) ac)[0 .. init.length]);
+}
+
+void main()
+{
+ testZero();
+ testNonZero();
+ testClass();
+ testAlignedStruct();
+ testAlignedClass();
+ testExternCppClass();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/tuple_default_parameters.d b/gcc/testsuite/gdc.test/runnable/tuple_default_parameters.d
new file mode 100644
index 0000000..a725d31
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/tuple_default_parameters.d
@@ -0,0 +1,64 @@
+void main()
+{
+ assert(func(1,0) == 1);
+ assert(func(1) == 1);
+ assert(func2() == 0);
+
+ assert(func3() == 15);
+ assert(func3(2) == 10);
+ assert(func3(2, 1) == 2);
+
+ assert(func4() == 15);
+
+ assert(func5() == 86);
+ assert(func5(1) == 84);
+ assert(func5(1, 2) == 81);
+ assert(func5(1, 2, 3) == 80);
+ assert(func5(1, 2, 3, 4) == 74);
+ assert(func5(1, 2, 3, 4, 0) == 69);
+ assert(func5(1, 2, 3, 4, 0, 5) == 68);
+ assert(func5(1, 2, 3, 4, 0, 5, 6) == 32);
+ assert(func5(1, 2, 3, 4, 0, 5, 6, 7) == 37);
+ assert(func5(1, 2, 3, 4, 0, 5, 6, 7, 8) == 42);
+ assert(func5(1, 2, 3, 4, 0, 5, 6, 7, 8, 9) == 46);
+}
+
+template AliasSeq(TList...)
+{
+ alias AliasSeq = TList;
+}
+
+T func(T)(T value, AliasSeq!(int) params = AliasSeq!(0))
+{
+ return value;
+}
+
+int func2(AliasSeq!(int) params = AliasSeq!(0))
+{
+ return 0;
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=21258
+int func3(AliasSeq!(int, int) args = AliasSeq!(3, 5))
+{
+ return args[0] * args[1];
+}
+
+size_t func4(AliasSeq!(int, string) args = AliasSeq!(3, "hello"))
+{
+ return args[0] * args[1].length;
+}
+
+int func5(AliasSeq!(int, int, int) a1 = AliasSeq!(3, 5, 4),
+ AliasSeq!(int, int, int) a2 = AliasSeq!(10, 5, 6),
+ int a3 = 42,
+ AliasSeq!(int, int, int) a4 = AliasSeq!(2, 3, 5),
+ int a5 = 1,
+ )
+{
+ return a1[0] + a1[1] + a1[2] +
+ a2[0] + a2[1] + a2[2] +
+ a3 +
+ a4[0] + a4[1] + a4[2] +
+ a5;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/uda.d b/gcc/testsuite/gdc.test/runnable/uda.d
index a01a5ca..1d01098 100644
--- a/gcc/testsuite/gdc.test/runnable/uda.d
+++ b/gcc/testsuite/gdc.test/runnable/uda.d
@@ -286,7 +286,7 @@ void test12()
}
/************************************************/
-// 9178
+// https://issues.dlang.org/show_bug.cgi?id=9178
void test9178()
{
@@ -297,7 +297,7 @@ void test9178()
}
/************************************************/
-// 9652
+// https://issues.dlang.org/show_bug.cgi?id=9652
struct Bug9652
{
@@ -353,7 +353,7 @@ struct Bug9652
}
/************************************************/
-// 9741
+// https://issues.dlang.org/show_bug.cgi?id=9741
import imports.a9741;
@@ -364,7 +364,7 @@ alias X9741 = ShowAttributes!(B9741);
@A9741 struct B9741 {}
/************************************************/
-// 12160
+// https://issues.dlang.org/show_bug.cgi?id=12160
auto before12160(alias Hook)(string) { return 0; }
@@ -384,7 +384,7 @@ void test12160()
}
/************************************************/
-// 10208
+// https://issues.dlang.org/show_bug.cgi?id=10208
@( 10) enum int x10208_01 = 100;
@( 20) int x10208_02;
@@ -416,7 +416,8 @@ static assert(__traits(getAttributes, x10208_13)[0] == 130); // Error -> OK
static assert(__traits(getAttributes, x10208_14)[0] == 140); // Error -> OK
/************************************************/
-// 11677, 11678
+// https://issues.dlang.org/show_bug.cgi?id=11677
+// https://issues.dlang.org/show_bug.cgi?id=11678
bool test_uda(alias func)() @safe
{
@@ -445,7 +446,7 @@ static assert(test_uda!func11678b());
static assert(test_uda!func11678c());
/************************************************/
-// 11678
+// https://issues.dlang.org/show_bug.cgi?id=11678
class C11678
{
@@ -460,7 +461,7 @@ static ~this() @(10) @(20) {}
shared static ~this() @(10) @(20) {}
/************************************************/
-// 11679
+// https://issues.dlang.org/show_bug.cgi?id=11679
void test11679()
{
@@ -469,7 +470,7 @@ void test11679()
}
/************************************************/
-// 11680
+// https://issues.dlang.org/show_bug.cgi?id=11680
@(10) gvar11680 = 1; // OK <- NG
@(10) gfun11680() {} // OK <- NG
@@ -481,7 +482,7 @@ void test11680()
}
/************************************************/
-// 11844
+// https://issues.dlang.org/show_bug.cgi?id=11844
auto make_encode11844(T, string name)()
{
@@ -687,7 +688,62 @@ void test20()
}
/************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=20831
+void foo20831(int f, float, @("test") string s = "test") {}
+
+static if(is(typeof(foo20831) Params20831 == __parameters))
+ static assert([__traits(getAttributes, Params20831[1..2])] == []);
+
+/************************************************/
+
+/************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15804
+
+template test15804()
+{
+ alias AliasSeq(T...) = T;
+
+ @(42) struct Foo(D) {}
+ auto fooFac(T)()
+ {
+ static assert(__traits(getAttributes, Foo) == AliasSeq!42);
+ static assert(__traits(getAttributes, Foo!int) == AliasSeq!42);
+ return Foo!T();
+ }
+
+ auto booFac(T)()
+ {
+ @(43) struct Boo {}
+ static assert(__traits(getAttributes, Boo) == AliasSeq!43);
+ return Boo();
+ }
+
+ auto barFac(T)()
+ {
+ @(44) struct Bar(D) {}
+ static assert(__traits(getAttributes, Bar) == AliasSeq!44); // Fixed
+ static assert(__traits(getAttributes, Bar!int) == AliasSeq!44);
+ return Bar!T();
+ }
+
+ auto bazFac(T)()
+ {
+ @(45) static struct Baz(D) {}
+ static assert(__traits(getAttributes, Baz) == AliasSeq!45); // Fixed
+ static assert(__traits(getAttributes, Baz!int) == AliasSeq!45);
+ return Baz!T();
+ }
+
+ auto foo = fooFac!int;
+ auto boo = booFac!int;
+ auto bar = barFac!int;
+ auto baz = bazFac!int;
+}
+
+alias a15804 = test15804!();
+
+/************************************************/
int main()
{
diff --git a/gcc/testsuite/gdc.test/runnable/ufcs.d b/gcc/testsuite/gdc.test/runnable/ufcs.d
index e09c531..8fd7bb2 100644
--- a/gcc/testsuite/gdc.test/runnable/ufcs.d
+++ b/gcc/testsuite/gdc.test/runnable/ufcs.d
@@ -129,7 +129,6 @@ void test3()
assert([1] .init == null);
assert([1:1].init == null);
assert(1.0 .init is double.nan);
- assert(10i .init is idouble.nan);
assert('c' .init == 0xFF);
assert("s" .init == null);
@@ -138,7 +137,6 @@ void test3()
assert([1] .init() == 1);
assert([1:1].init() == 1);
assert(1.0 .init() == 1);
- assert(10i .init() == 1);
assert('c' .init() == 1);
assert("s" .init() == 1);
@@ -147,7 +145,6 @@ void test3()
assert([1] .init!(int[])() == 1);
assert([1:1].init!(int[int])() == 1);
assert(1.0 .init!double() == 1);
- assert(10i .init!idouble() == 1);
assert('c' .init!char() == 1);
assert("s" .init!string() == 1);
@@ -199,6 +196,7 @@ void test5()
{
// f5_1 .. f5_5 are symbols which declared in module scope
assert(100.f5_1() == 1);
+ assert(001.f5_1() == 1); // https://issues.dlang.org/show_bug.cgi?id=8346
assert("s".f5_2() == 2);
assert(1.4.f5_3() == 3);
assert(100.f5_4() == 1);
@@ -422,9 +420,7 @@ class C5 : B5
}
/*******************************************/
-// 662
-
-import std.stdio,std.string, std.conv;
+// https://issues.dlang.org/show_bug.cgi?id=662
enum Etest
{
@@ -450,6 +446,10 @@ int test(Etest test)
//{
// return cast(int)i;
//}
+string to(T)(int i) {
+ assert(i == 22);
+ return "22";
+}
void test682()
{
@@ -465,16 +465,56 @@ void test682()
}
/*******************************************/
-// 3382
-
-import std.range, std.algorithm;
+// https://issues.dlang.org/show_bug.cgi?id=3382
@property T twice(T)(T x){ return x * x; }
-real toreal(ireal x){ return x.im; }
char toupper(char c){ return ('a'<=c && c<='z') ? cast(char)(c - 'a' + 'A') : c; }
@property ref T setter(T)(ref T x, T v){ x = v; return x; }
+auto iota(T)(T min, T max)
+{
+ static struct Result
+ {
+ T cur, end;
+
+ T front() { return cur; }
+ bool empty() { return front == end; }
+ void popFront() { cur++; }
+ }
+ return Result(min, max);
+}
+
+auto map(string s, R)(R range)
+{
+ static struct Result
+ {
+ R source;
+ auto front() { auto a = source.front; return mixin(s); }
+ alias source this;
+ }
+ return Result(range);
+}
+
+auto filter(string s, R)(R range)
+{
+ static struct Result
+ {
+ R source;
+ alias source this;
+ void popFront()
+ {
+ while (true)
+ {
+ auto a = source.front;
+ if (mixin(s)) break;
+ source.popFront();
+ }
+ }
+ }
+ return Result(range);
+}
+
void test3382()
{
auto r = iota(0, 10).map!"a*3"().filter!"a%2 != 0"();
@@ -483,17 +523,29 @@ void test3382()
assert(10.twice == 100);
assert(0.5.twice == 0.25);
- assert(1.4i.toreal() == 1.4);
assert('c'.toupper() == 'C');
}
/*******************************************/
-// 6185
+// https://issues.dlang.org/show_bug.cgi?id=6185
-void test6185()
+ref T front(T)(T[] array) { return array[0]; }
+bool empty(T)(T[] array) { return array.length == 0; }
+void popFront(T)(ref T[] array) { array = array[1..$]; }
+
+bool equal(T, U)(T t, U u)
{
- import std.algorithm;
+ while (true)
+ {
+ if (t.empty) return u.empty;
+ if (u.empty || t.front != u.front) return false;
+ t.popFront();
+ u.popFront();
+ }
+}
+void test6185()
+{
auto r1 = [1,2,3].map!"a*2";
assert(equal(r1, [2,4,6]));
@@ -502,7 +554,7 @@ void test6185()
}
/*******************************************/
-// 6070
+// https://issues.dlang.org/show_bug.cgi?id=6070
enum test6070a = ["test"].foo6070();
enum test6070b = foo6070(["test"]);
@@ -510,13 +562,13 @@ enum test6070b = foo6070(["test"]);
string foo6070(string[] s) { return ""; }
/*******************************************/
-// 7670
+// https://issues.dlang.org/show_bug.cgi?id=7670
struct A7670
{
double x;
}
-@property ref double y7670(ref A7670 a)
+@property ref double y7670(return ref A7670 a)
{
return a.x;
}
@@ -528,7 +580,7 @@ void test7670()
}
/*******************************************/
-// 7703
+// https://issues.dlang.org/show_bug.cgi?id=7703
void f7703(T)(T a) { }
void test7703()
@@ -541,9 +593,9 @@ void test7703()
}
/*******************************************/
-// 7773
+// https://issues.dlang.org/show_bug.cgi?id=7773
-//import std.stdio;
+//import core.stdc.stdio;
void writeln7773(int n){}
void test7773()
{
@@ -552,7 +604,7 @@ void test7773()
}
/*******************************************/
-// 7943
+// https://issues.dlang.org/show_bug.cgi?id=7943
struct Foo7943
{
@@ -570,7 +622,7 @@ void test7943()
}
/*******************************************/
-// 8180
+// https://issues.dlang.org/show_bug.cgi?id=8180
int writeln8180(T...)(T args) { return 1; }
@@ -587,7 +639,7 @@ void test8180()
}
/*******************************************/
-// 8245
+// https://issues.dlang.org/show_bug.cgi?id=8245
string toStr8245(immutable(char)* p) { return null; }
@property string asStr8245(immutable(char)* p) { return null; }
@@ -600,7 +652,7 @@ void test8245()
}
/*******************************************/
-// 8252
+// https://issues.dlang.org/show_bug.cgi?id=8252
bool f(int x) { return !x; }
@@ -611,7 +663,7 @@ void test8252()
}
/*******************************************/
-// 8453
+// https://issues.dlang.org/show_bug.cgi?id=8453
T[] sort8453(T)(T[] a) { return a; }
@@ -623,7 +675,7 @@ void test8453()
}
/*******************************************/
-// 8503
+// https://issues.dlang.org/show_bug.cgi?id=8503
void α8503(int i) {}
@@ -634,7 +686,7 @@ void test8503()
}
/*******************************************/
-// 9014
+// https://issues.dlang.org/show_bug.cgi?id=9014
@property ref int foo9014(int[] a)
{
@@ -649,7 +701,7 @@ void test9014()
}
/*******************************************/
-// 9590
+// https://issues.dlang.org/show_bug.cgi?id=9590
auto func9590(E)(lazy E expr) { }
@@ -666,7 +718,7 @@ void test9590()
}
/*******************************************/
-// 9946
+// https://issues.dlang.org/show_bug.cgi?id=9946
size_t count9946(alias x)(int[] haystack)
{
@@ -682,7 +734,7 @@ void test9946()
}
/*******************************************/
-// 10618
+// https://issues.dlang.org/show_bug.cgi?id=10618
template Temp10618(T)
{
@@ -695,7 +747,7 @@ void test10618()
}
/*******************************************/
-// 10003
+// https://issues.dlang.org/show_bug.cgi?id=10003
void foo10003(void *p) {}
void test10003()
@@ -705,7 +757,7 @@ void test10003()
}
/*******************************************/
-// 10041
+// https://issues.dlang.org/show_bug.cgi?id=10041
auto writeln10041(T...)(T args) { return typeof(args[0]).stringof; }
@@ -717,7 +769,7 @@ void test10041()
}
/*******************************************/
-// 10047
+// https://issues.dlang.org/show_bug.cgi?id=10047
struct Typedef10047(T)
{
@@ -737,7 +789,7 @@ void test10047()
}
/*******************************************/
-// 10166
+// https://issues.dlang.org/show_bug.cgi?id=10166
auto foo10166()
{
@@ -752,7 +804,7 @@ void bar10166(alias handler, T)(T t, int i)
void buzz10166() {}
/*******************************************/
-// 10526
+// https://issues.dlang.org/show_bug.cgi?id=10526
struct S10526
{
@@ -781,7 +833,7 @@ void test10526()
}
/********************************************************/
-// 10609
+// https://issues.dlang.org/show_bug.cgi?id=10609
int foo10609(int x) { return x; }
@@ -794,7 +846,7 @@ void test10609()
}
/*******************************************/
-// 11312
+// https://issues.dlang.org/show_bug.cgi?id=11312
struct S11312;
@@ -809,7 +861,7 @@ void test11312()
}
/*******************************************/
-// 15123
+// https://issues.dlang.org/show_bug.cgi?id=15123
auto keys15123(K, V)(V[K] aa) { return [1]; }
auto values15123(K, V)(V[K] aa) { return [2]; }
diff --git a/gcc/testsuite/gdc.test/runnable/uniformctor.d b/gcc/testsuite/gdc.test/runnable/uniformctor.d
index d56c782..6cd4582 100644
--- a/gcc/testsuite/gdc.test/runnable/uniformctor.d
+++ b/gcc/testsuite/gdc.test/runnable/uniformctor.d
@@ -1,10 +1,16 @@
+/*
+RUN_OUTPUT:
+---
+Success
+---
+*/
extern(C) int printf(const char*, ...);
template TypeTuple(TL...) { alias TypeTuple = TL; }
import core.stdc.math : isnan;
/********************************************/
-// 9112
+// https://issues.dlang.org/show_bug.cgi?id=9112
void test9112a() // T() and T(v)
{
@@ -40,19 +46,12 @@ void test9112a() // T() and T(v)
test!( float )(3.14);
test!( double)(3.14);
test!( real )(3.14);
- test!(ifloat )(1.4142i);
- test!(idouble)(1.4142i);
- test!(ireal )(1.4142i);
- test!(cfloat )(1.2+3.4i);
- test!(cdouble)(1.2+3.4i);
- test!(creal )(1.2+3.4i);
test!( char )('A');
test!(wchar )('A');
test!(dchar )('A');
test!(bool )(true);
static assert(!__traits(compiles, int(1.42))); // in curre,t this is disallowed
- static assert(!__traits(compiles, double(3.14i)));
{
int x;
@@ -107,12 +106,6 @@ void test9112b() // new T(v)
test!( float )(3.14);
test!( double)(3.14);
test!( real )(3.14);
- test!(ifloat )(1.4142i);
- test!(idouble)(1.4142i);
- test!(ireal )(1.4142i);
- test!(cfloat )(1.2+3.4i);
- test!(cdouble)(1.2+3.4i);
- test!(creal )(1.2+3.4i);
test!( char )('A');
test!(wchar )('A');
test!(dchar )('A');
@@ -138,7 +131,6 @@ void test9112b() // new T(v)
static assert(!__traits(compiles, new const int(1, 2)));
static assert(!__traits(compiles, new int(1.42))); // in curre,t this is disallowed
- static assert(!__traits(compiles, new double(3.14i)));
// int(1) in directly on statement scope should be parsed as an expression, but
// would fail to compile because of "has no effect" error.
diff --git a/gcc/testsuite/gdc.test/runnable/unique_typeinfo_names.d b/gcc/testsuite/gdc.test/runnable/unique_typeinfo_names.d
new file mode 100644
index 0000000..120f8ff
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/unique_typeinfo_names.d
@@ -0,0 +1,93 @@
+module unique_typeinfo_names;
+
+// https://issues.dlang.org/show_bug.cgi?id=22149
+void structs()
+{
+ static struct Foo(T) {}
+
+ auto foo()
+ {
+ struct S {}
+ return Foo!S();
+ }
+
+ auto bar()
+ {
+ struct S {}
+ return Foo!S();
+ }
+
+ auto f = foo();
+ auto b = bar();
+
+ assert(typeid(f) != typeid(b));
+ assert(typeid(f).name != typeid(b).name);
+
+ assert(typeid(f).mangledName == typeof(f).mangleof);
+ assert(typeid(b).mangledName == typeof(b).mangleof);
+ assert(typeid(f).name == "unique_typeinfo_names.structs().Foo!(unique_typeinfo_names.structs().foo().S).Foo");
+ assert(typeid(b).name == "unique_typeinfo_names.structs().Foo!(unique_typeinfo_names.structs().bar().S).Foo");
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=22150
+void classes()
+{
+ static class Foo(T) {}
+
+ static auto foo()
+ {
+ struct S {}
+ return new Foo!S();
+ }
+
+ static auto bar()
+ {
+ struct S {}
+ return new Foo!S();
+ }
+
+ auto f = foo();
+ auto b = bar();
+
+ assert(typeid(f) != typeid(b));
+ assert(typeid(f).name != typeid(b).name);
+
+ assert(typeid(f).name == "unique_typeinfo_names.classes.Foo!(unique_typeinfo_names.classes.foo.S).Foo");
+ assert(typeid(b).name == "unique_typeinfo_names.classes.Foo!(unique_typeinfo_names.classes.bar.S).Foo");
+}
+
+void interfaces()
+{
+ static interface IFoo(T) {}
+ static class Foo(T) : IFoo!T {}
+
+ static auto foo()
+ {
+ struct S {}
+ IFoo!S r = new Foo!S();
+ return r;
+ }
+
+ static auto bar()
+ {
+ struct S {}
+ IFoo!S r = new Foo!S();
+ return r;
+ }
+
+ auto f = foo();
+ auto b = bar();
+
+ assert(typeid(f) != typeid(b));
+ assert(typeid(f).name != typeid(b).name);
+
+ assert(typeid(f).name == "unique_typeinfo_names.interfaces.IFoo!(unique_typeinfo_names.interfaces.foo.S).IFoo");
+ assert(typeid(b).name == "unique_typeinfo_names.interfaces.IFoo!(unique_typeinfo_names.interfaces.bar.S).IFoo");
+}
+
+void main()
+{
+ structs();
+ classes();
+ interfaces();
+}
diff --git a/gcc/testsuite/gdc.test/runnable/variadic.d b/gcc/testsuite/gdc.test/runnable/variadic.d
index 984d896..2d0736d 100644
--- a/gcc/testsuite/gdc.test/runnable/variadic.d
+++ b/gcc/testsuite/gdc.test/runnable/variadic.d
@@ -672,7 +672,7 @@ void test61()
template Tuple63(T...){
alias T Tuple63;
}
-// Bugzilla 3336
+// https://issues.dlang.org/show_bug.cgi?id=3336
static assert(!is(int[ Tuple63!(int, int) ]));
void test63()
@@ -691,7 +691,7 @@ void test1411()
}
/***************************************/
-// Bugzilla 4444
+// https://issues.dlang.org/show_bug.cgi?id=4444
void test4444()
{
@@ -701,7 +701,7 @@ void test4444()
}
/***************************************/
-// 13864
+// https://issues.dlang.org/show_bug.cgi?id=13864
struct Tuple13864(T...)
{
@@ -721,7 +721,7 @@ void test13864()
}
/***************************************/
-// 4884
+// https://issues.dlang.org/show_bug.cgi?id=4884
struct A4884(T...)
{
@@ -736,7 +736,7 @@ void test4884()
}
/***************************************/
-// 4920
+// https://issues.dlang.org/show_bug.cgi?id=4920
struct Test4920(parameters_...)
{
@@ -751,7 +751,7 @@ void test4920()
}
/***************************************/
-// 4940
+// https://issues.dlang.org/show_bug.cgi?id=4940
template Tuple4940(T...)
{
@@ -777,7 +777,7 @@ struct S4940add
long x;
}
-ref S4940add get4940add(ref S4940add s){ return s; }
+ref S4940add get4940add(return ref S4940add s){ return s; }
void test4940add()
{
@@ -787,7 +787,7 @@ void test4940add()
}
/***************************************/
-// 6530
+// https://issues.dlang.org/show_bug.cgi?id=6530
struct S6530
{
@@ -876,7 +876,7 @@ void testCopy()
}
/***************************************/
-// 6700
+// https://issues.dlang.org/show_bug.cgi?id=6700
template bug6700(TList ...) {
const int bug6700 = 2;
@@ -886,7 +886,7 @@ TypeTuple!(int, long) TT6700;
static assert(bug6700!( (TT6700[1..$]) )==2);
/***************************************/
-// 6966
+// https://issues.dlang.org/show_bug.cgi?id=6966
template X6966(T...)
{
@@ -896,7 +896,7 @@ static assert(is(X6966!(int) == const(int)));
static assert(is(X6966!(int, 0) == const(int)));
/***************************************/
-// 7233
+// https://issues.dlang.org/show_bug.cgi?id=7233
struct Foo7233 { int x, y; }
Foo7233[] front7233(Foo7233[][] a)
@@ -920,7 +920,7 @@ void test7233()
}
/***************************************/
-// 7263
+// https://issues.dlang.org/show_bug.cgi?id=7263
template TypeTuple7263(T...){ alias T TypeTuple7263; }
@@ -940,13 +940,13 @@ void test7263()
}
/***************************************/
-// 8244
+// https://issues.dlang.org/show_bug.cgi?id=8244
TypeTuple!(int,int)[] x8244;
static assert(is(typeof(x8244) == TypeTuple!(int, int)));
/***************************************/
-// 9017
+// https://issues.dlang.org/show_bug.cgi?id=9017
template X9017(Args...)
{
@@ -974,13 +974,13 @@ void test9017()
}
/***************************************/
-// 10279
+// https://issues.dlang.org/show_bug.cgi?id=10279
void foo10279(int[][] strs...) @trusted { }
void bar10279() @safe { foo10279(); }
/***************************************/
-// 13508
+// https://issues.dlang.org/show_bug.cgi?id=13508
struct S13508
{
@@ -1001,7 +1001,7 @@ void test13508() @safe @nogc
}
/***************************************/
-// 14395
+// https://issues.dlang.org/show_bug.cgi?id=14395
int v2u14395(uint[1] ar...)
{
@@ -1019,7 +1019,7 @@ void test14395()
}
/***************************************/
-// 10414
+// https://issues.dlang.org/show_bug.cgi?id=10414
void foo10414(void delegate()[] ...) { }
@@ -1057,7 +1057,7 @@ void test14179()
}
/***************************************/
-// 10722
+// https://issues.dlang.org/show_bug.cgi?id=10722
struct S10722
{
diff --git a/gcc/testsuite/gdc.test/runnable/version.d b/gcc/testsuite/gdc.test/runnable/version.d
index 67da188..1186e4c 100644
--- a/gcc/testsuite/gdc.test/runnable/version.d
+++ b/gcc/testsuite/gdc.test/runnable/version.d
@@ -1,5 +1,12 @@
-// PERMUTE_ARGS:
-// REQUIRED_ARGS: -version=3 -version=foo
+/*
+PERMUTE_ARGS:
+REQUIRED_ARGS: -version=3 -version=foo
+RUN_OUTPUT:
+---
+i = 2
+i = 2
+---
+*/
extern(C) int printf(const char*, ...);
@@ -64,4 +71,3 @@ int main()
test2();
return 0;
}
-
diff --git a/gcc/testsuite/gdc.test/runnable/warning1.d b/gcc/testsuite/gdc.test/runnable/warning1.d
index 9dcbea9..537088e 100644
--- a/gcc/testsuite/gdc.test/runnable/warning1.d
+++ b/gcc/testsuite/gdc.test/runnable/warning1.d
@@ -120,7 +120,7 @@ nothrow int foo6()
}
/******************************************/
-// 6518
+// https://issues.dlang.org/show_bug.cgi?id=6518
template TypeTuple(T...) { alias T TypeTuple; }
void test6518()
@@ -134,7 +134,7 @@ void test6518()
}
/******************************************/
-// 7232
+// https://issues.dlang.org/show_bug.cgi?id=7232
bool test7232()
{
@@ -154,7 +154,7 @@ struct S9332
}
/******************************************/
-// 13201
+// https://issues.dlang.org/show_bug.cgi?id=13201
class C13201
{
diff --git a/gcc/testsuite/gdc.test/runnable/wc.d b/gcc/testsuite/gdc.test/runnable/wc.d
index 8f847c5..69d3cf8 100644
--- a/gcc/testsuite/gdc.test/runnable/wc.d
+++ b/gcc/testsuite/gdc.test/runnable/wc.d
@@ -37,14 +37,14 @@ int main (string[] args)
inword = 0;
++c_cnt;
}
- printf ("%8lu%8lu%8lu %.*s\n", l_cnt, w_cnt, c_cnt, arg.length, arg.ptr);
+ printf ("%8u%8u%8u %.*s\n", l_cnt, w_cnt, c_cnt, cast(int)arg.length, arg.ptr);
l_total += l_cnt;
w_total += w_cnt;
c_total += c_cnt;
}
if (args.length > 2)
{
- printf ("--------------------------------------\n%8lu%8lu%8lu total",
+ printf ("--------------------------------------\n%8u%8u%8u total",
l_total, w_total, c_total);
}
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/wc2.d b/gcc/testsuite/gdc.test/runnable/wc2.d
index a97c6fa..97fcdee 100644
--- a/gcc/testsuite/gdc.test/runnable/wc2.d
+++ b/gcc/testsuite/gdc.test/runnable/wc2.d
@@ -54,7 +54,7 @@ int main (string[] args)
{ string w = input[wstart .. input.length];
dictionary[w]++;
}
- printf("%8lu%8lu%8lu %.*s\n", l_cnt, w_cnt, c_cnt, arg.length, arg.ptr);
+ printf("%8u%8u%8u %.*s\n", l_cnt, w_cnt, c_cnt, cast(int)arg.length, arg.ptr);
l_total += l_cnt;
w_total += w_cnt;
c_total += c_cnt;
@@ -62,14 +62,14 @@ int main (string[] args)
if (args.length > 2)
{
- printf("--------------------------------------\n%8lu%8lu%8lu total",
+ printf("--------------------------------------\n%8u%8u%8u total",
l_total, w_total, c_total);
}
printf("--------------------------------------\n");
foreach (string word1; dictionary.keys)
{
- printf("%3d %.*s\n", dictionary[word1], word1.length, word1.ptr);
+ printf("%3d %.*s\n", dictionary[word1], cast(int)word1.length, word1.ptr);
}
return 0;
}
diff --git a/gcc/testsuite/gdc.test/runnable/whetstone.d b/gcc/testsuite/gdc.test/runnable/whetstone.d
new file mode 100644
index 0000000..9145c74
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/whetstone.d
@@ -0,0 +1,231 @@
+/*
+PERMUTE_ARGS: -O
+*/
+
+/*
+ WHETSTONE BENCHMARK PROGRAM
+
+ This program uses a carefully chosen mix of instructions typical of
+ scientific (floating point) calculations.
+
+ See H.J. Curnow and B.A. Wichmann,
+ "A Synthetic Benchmark", Computer J., V19 #1, Feb. 1976, pp. 43-49.
+
+ Table of times for various computers in <info-ibmpc>whetst.answers
+ compiled by Richard Gillmann (GILLMANN@ISIB)
+
+Whetstone Fortran Benchmark
+(I=10, optimization off, CPU seconds)
+
+DEC 1.1 sec DECsystem 2060 (TOPS-20 v4, F66)
+PR1ME 1.4 sec PR1ME 750 (PRIMOS v18.1, F66)
+PR1ME 1.5 sec PR1ME 750 (PRIMOS v18.1, F77)
+DEC 2.1 sec VAX 11/780 (Unix, F77)
+Apollo 6.2 sec 10 MHz MC68000 w/hardware float. point (AEGIS v4.0, F77)
+Apollo 13.1 sec 10 MHz MC68000 w/software float. point (AEGIS v4.0, F77)
+Intel 16.0 sec 8086/8087 (286WD Micro Development System,Intel FORTRAN)
+IBM 16.0 sec 4.77 MHz 8088 PC w/8087 (DOS 2, Microsoft F77/3.10)
+Z80 124.0 sec 4 MHz Z80 with Microsoft Fortran, CP/M
+IBM 268.9 sec 4.77 MHz 8088 PC ($NODEBUG) (DOS 1, Microsoft F77/1.0)
+Intel 390.0 sec 8086 alone (286WD Micro Development System,Intel FORTRAN)
+
+Table compiled by Richard Gillmann (Gillmann@ISIB).
+*/
+
+import core.stdc.stdio;
+import core.stdc.time;
+import core.stdc.math;
+
+double t, t1, t2;
+double[5] e1;
+int j, k, l;
+
+int main()
+{
+ clock_t start, stop;
+ double x1, x2, x3, x4, x, y, z;
+ int i, isave, n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12;
+
+ start = clock();
+
+/* I=10 CORRESPONDS TO ONE MILLION WHETSTONE INSTRUCTIONS */
+
+ i = 10;
+ t1 = 0.50025000;
+ t = 0.499975000;
+ t2 = 2.0000;
+ isave = i;
+ n1 = 0;
+ n2 = 12 * i;
+ n3 = 14 * i;
+ n4 = 348 * i;
+ n5 = 0;
+ n6 = 210 * i;
+ n7 = 32 * i;
+ n8 = 899 * i;
+ n9 = 516 * i;
+ n10 = 0;
+ n11 = 93 * i;
+ n12 = 0;
+ x1 = 1.0;
+ x2 = -1.0;
+ x3 = -1.0;
+ x4 = -1.0;
+ for (i = 1; i <= n1; i++)
+ {
+ x1 = (x1+x2+x3-x4)*t;
+ x2 = (x1+x2-x3+x4)*t;
+ x3 = (x1-x2+x3+x4)*t;
+ x4 = (-x1+x2+x3+x4)*t;
+ }
+ auto s = pout(n1,n1,n1,x1,x2,x3,x4);
+ assert(s[] == " 0 0 0 1.0000e+00 -1.0000e+00 -1.0000e+00 -1.0000e+00");
+
+ e1[1] = 1.0;
+ e1[2] = -1.0;
+ e1[3] = -1.0;
+ e1[4] = -1.0;
+
+ for (i = 1; i <= n2; i++)
+ {
+ e1[1] = (e1[1]+e1[2]+e1[3]-e1[4])*t;
+ e1[2] = (e1[1]+e1[2]-e1[3]+e1[4])*t;
+ e1[3] = (e1[1]-e1[2]+e1[3]+e1[4])*t;
+ e1[4] = (-e1[1]+e1[2]+e1[3]+e1[4])*t;
+ }
+ pout(n2,n3,n2,e1[1],e1[2],e1[3],e1[4]);
+ assert(s == " 120 140 120 -6.8342e-02 -4.6264e-01 -7.2972e-01 -1.1240e+00");
+
+ for (i = 1; i <= n3; i++)
+ {
+ pa(e1);
+ }
+ pout(n3,n2,n2,e1[1],e1[2],e1[3],e1[4]);
+ assert(s == " 140 120 120 -5.5336e-02 -4.4744e-01 -7.1097e-01 -1.1031e+00");
+
+ j = 1;
+ for (i = 1; i <= n4; i++)
+ {
+ j = (j-1) ? 3 : 2;
+ j = (j-2 < 0) ? 0 : 1;
+ j = (j-1 < 0) ? 1 : 0;
+ }
+ pout(n4, j, j, x1, x2, x3, x4);
+ assert(s == " 3480 0 0 1.0000e+00 -1.0000e+00 -1.0000e+00 -1.0000e+00");
+
+ j = 1;
+ k = 2;
+ l = 3;
+ for (i = 1; i <= n6; i++)
+ {
+ j = j*(k-j)*(l-k);
+ k = l*k-(l-j)*k;
+ l = (l-k)*(k+j);
+ e1[l-1] = j+k+l;
+ e1[k-1] = j*k*l;
+ }
+ pout(n6,j,k,e1[1],e1[2],e1[3],e1[4]);
+ assert(s == " 2100 1 2 6.0000e+00 6.0000e+00 -7.1097e-01 -1.1031e+00");
+
+ x = 0.5;
+ y = 0.5;
+ for (i = 1; i <= n7; i++)
+ {
+ x = t * atan(t2* sin(x)* cos(x) /
+ ( cos(x+y)+ cos(x-y)-1.0 ));
+ y = t * atan(t2* sin(y)* cos(y) /
+ ( cos(x+y)+ cos(x-y)-1.0 ));
+ }
+ pout(n7, j, k, x, x, y, y);
+ assert(s == " 320 1 2 4.9041e-01 4.9041e-01 4.9039e-01 4.9039e-01");
+
+ x = 1.0;
+ y = 1.0;
+ z = 1.0;
+
+ for (i = 1; i <= n8; i++)
+ {
+ z = p3(x, y);
+ }
+ pout(n8, j, k, x, y, z, z);
+ assert(s == " 8990 1 2 1.0000e+00 1.0000e+00 9.9994e-01 9.9994e-01");
+
+ j = 1;
+ k = 2;
+ l = 3;
+ e1[1] = 1.0;
+ e1[2] = 2.0;
+ e1[3] = 3.0;
+
+ for (i = 1; i <= n9; i++)
+ {
+ p0();
+ }
+ pout(n9, j, k, e1[1], e1[2], e1[3], e1[4]);
+ assert(s == " 5160 1 2 3.0000e+00 2.0000e+00 3.0000e+00 -1.1031e+00");
+
+ j = 2;
+ k = 3;
+
+ for (i = 1; i <= n10; i++)
+ {
+ j = j + k;
+ k = j + k;
+ j = j - k;
+ k = k - j - j;
+ }
+ pout(n10, j, k, x1, x2, x3, x4);
+ assert(s == " 0 2 3 1.0000e+00 -1.0000e+00 -1.0000e+00 -1.0000e+00");
+
+ x = 0.75;
+
+ for (i = 1; i <= n11; i++)
+ {
+ x = sqrt( exp( log(x) / t1));
+ }
+
+ pout(n11,j,k,x,x,x,x);
+ assert(s == " 930 2 3 8.3467e-01 8.3467e-01 8.3467e-01 8.3467e-01");
+
+ stop = clock();
+
+ version (none)
+ printf("Elapsed time = %d.%02d seconds\n",
+ cast(int)(stop - start)/CLOCKS_PER_SEC,
+ cast(int)(stop - start)%CLOCKS_PER_SEC);
+ return 0;
+}
+
+void pa(double[] e)
+{
+ for (j = 0; j < 6; j++)
+ {
+ e[1] = (e[1] + e[2] + e[3] - e[4]) * t;
+ e[2] = (e[1] + e[2] - e[3] + e[4]) * t;
+ e[3] = (e[1] - e[2] + e[3] + e[4]) * t;
+ e[4] = (-e[1] + e[2] + e[3] + e[4]) / t2;
+ }
+}
+
+void p0()
+{
+ e1[j] = e1[k];
+ e1[k] = e1[l];
+ e1[l] = e1[j];
+}
+
+double p3(double x, double y)
+{
+ x = t * (x + y);
+ y = t * (x + y);
+ return (x + y) / t2;
+}
+
+char[] pout(int n, int j, int k, double x1, double x2, double x3, double x4)
+{
+ __gshared char[80] result;
+ const len = sprintf(result.ptr, " %7d %7d %7d %12.4e %12.4e %12.4e %12.4e",
+ n, j, k, x1, x2, x3, x4);
+ printf("%s\n", result.ptr);
+ return result[0 .. len];
+}
diff --git a/gcc/testsuite/gdc.test/runnable/xdtor.d b/gcc/testsuite/gdc.test/runnable/xdtor.d
index df3a4d1..d4b6e2b 100644
--- a/gcc/testsuite/gdc.test/runnable/xdtor.d
+++ b/gcc/testsuite/gdc.test/runnable/xdtor.d
@@ -79,8 +79,34 @@ void test2() @safe @nogc nothrow
assert(Counter.cnt == 1);
}
+struct Bar17257(E)
+{
+ ~this() @safe @nogc nothrow
+ {
+ assert(__traits(hasMember, E, "__xdtor"));
+ }
+}
+
+struct Foo17257A
+{
+ Bar17257!Foo17257A foo;
+ ~this() @safe @nogc nothrow {}
+}
+
+struct Foo17257B
+{
+ Bar17257!Foo17257B foo;
+}
+
+void test3() @safe @nogc nothrow
+{
+ Foo17257A foo17257A;
+ Foo17257B foo17257B;
+}
+
void main()
{
test1();
test2();
+ test3();
}
diff --git a/gcc/testsuite/gdc.test/runnable/xpostblit.d b/gcc/testsuite/gdc.test/runnable/xpostblit.d
index b364c4c..8f8a59d 100644
--- a/gcc/testsuite/gdc.test/runnable/xpostblit.d
+++ b/gcc/testsuite/gdc.test/runnable/xpostblit.d
@@ -70,8 +70,67 @@ void test2() @safe @nogc nothrow
assert(Counter.cnt == 1);
}
+/****************************************************************
+ This test is intended to verify the exception safety of field
+ postblits
+*/
+string trace = "";
+
+struct FieldThrow
+{
+ string name;
+ this(string n)
+ {
+ name = n;
+ }
+
+ bool throwExcept;
+ this(this)
+ {
+ if (throwExcept)
+ {
+ throw new Exception("");
+ }
+ }
+
+ ~this() { trace ~= name ~ ".dtor"; }
+}
+
+struct S
+{
+ auto f1 = FieldThrow("f1");
+ FieldThrow[2] f2f3= [FieldThrow("f2"), FieldThrow("f3")];
+ auto f4 = FieldThrow("f4");
+}
+
+void test3()
+{
+ trace = "";
+
+ S s1;
+
+ // Cause `s1.f4`'s postblit to throw
+ s1.f4.throwExcept = true;
+
+ try
+ {
+ // `s`'s postblit will be a combination of `f1`, `f2f3`, and `f4`'s
+ // postblit in that order. However, `f4`'s postblit will throw,
+ // causing `s1.f2f3` and `s1.f1`'s destructors to execute in that
+ // order
+ S s2 = s1;
+ }
+ catch(Exception ex){ }
+
+ // Confirm the field destructors were called and were called in the
+ // corrrect order
+ assert(trace == "f3.dtor" ~ "f2.dtor" ~ "f1.dtor");
+}
+/****************************************************************************/
+
void main()
{
test1();
test2();
+ test3();
}
diff --git a/gcc/testsuite/gdc.test/runnable/xtest46.d b/gcc/testsuite/gdc.test/runnable/xtest46.d
index bf19f57..a66e00f 100644
--- a/gcc/testsuite/gdc.test/runnable/xtest46.d
+++ b/gcc/testsuite/gdc.test/runnable/xtest46.d
@@ -1,5 +1,5 @@
-// RUNNABLE_PHOBOS_TEST
-// PERMUTE_ARGS: -unittest -O -release -inline -fPIC -g
+// REQUIRED_ARGS: -preview=rvaluerefparam
+//
/* TEST_OUTPUT:
---
Boo!double
@@ -33,14 +33,14 @@ TFunction1: extern (C) void function()
---
*/
-import std.stdio;
+//import std.stdio;
import core.stdc.stdio;
/******************************************/
struct S
{
- int opStar() { return 7; }
+ int opUnary(string op)() if (op == "*") { return 7; }
}
void test1()
@@ -76,29 +76,6 @@ void bar2(D)(const(void)* arg)
D obj = *cast(D*) arg;
}
-/***************************************************/
-
-void test3()
-{
- version (unittest)
- {
- printf("unittest!\n");
- }
- else
- {
- printf("no unittest!\n");
- }
-
- version (assert)
- {
- printf("assert!\n");
- }
- else
- {
- printf("no assert!\n");
- }
-}
-
/***************************************************/
@@ -160,7 +137,7 @@ struct T6
S6 s;
int b = 7;
- S6* opDot()
+ S6* opDot() return
{
return &s;
}
@@ -217,7 +194,7 @@ void test7()
void foo8(int n1 = __LINE__ + 0, int n2 = __LINE__, string s = __FILE__)
{
assert(n1 < n2);
- printf("n1 = %d, n2 = %d, s = %.*s\n", n1, n2, s.length, s.ptr);
+ printf("n1 = %d, n2 = %d, s = %.*s\n", n1, n2, cast(int)s.length, s.ptr);
}
void test8()
@@ -230,7 +207,7 @@ void test8()
void foo9(int n1 = __LINE__ + 0, int n2 = __LINE__, string s = __FILE__)()
{
assert(n1 < n2);
- printf("n1 = %d, n2 = %d, s = %.*s\n", n1, n2, s.length, s.ptr);
+ printf("n1 = %d, n2 = %d, s = %.*s\n", n1, n2, cast(int)s.length, s.ptr);
}
void test9()
@@ -564,7 +541,7 @@ void test27()
/***************************************************/
-ref int foo28(ref int x) { return x; }
+ref int foo28(return ref int x) { return x; }
void test28()
{
@@ -687,13 +664,13 @@ void test34()
/***************************************************/
-ref int foo35(bool condition, ref int lhs, ref int rhs)
+ref int foo35(bool condition, return ref int lhs, return ref int rhs)
{
if ( condition ) return lhs;
return rhs;
}
-ref int bar35()(bool condition, ref int lhs, ref int rhs)
+ref int bar35()(bool condition, return ref int lhs, return ref int rhs)
{
if ( condition ) return lhs;
return rhs;
@@ -874,7 +851,7 @@ void test44()
}
/***************************************************/
-// 2006
+// https://issues.dlang.org/show_bug.cgi?id=2006
void test2006()
{
@@ -887,7 +864,7 @@ void test2006()
}
/***************************************************/
-// 8442
+// https://issues.dlang.org/show_bug.cgi?id=8442
void test8442()
{
@@ -988,7 +965,7 @@ void test48()
}
/***************************************************/
-// 6408
+// https://issues.dlang.org/show_bug.cgi?id=6408
static assert(!is(typeof(string[0..1].init)));
static assert(is(typeof(string[].init) == string[]));
@@ -1009,7 +986,7 @@ static assert(is(typeof(TT6408!(int, int)[0..$].init) == TT6408!(int, int)));
static assert(is(typeof(TT6408!(int, int)[$-1].init) == int));
/***************************************************/
-// 9409
+// https://issues.dlang.org/show_bug.cgi?id=9409
template TT9409(T...) { alias T TT9409; }
@@ -1028,7 +1005,7 @@ struct S49
this( string name )
{
- printf( "(ctor) &%.*s.x = %p\n", name.length, name.ptr, &x );
+ printf( "(ctor) &%.*s.x = %p\n", cast(int)name.length, name.ptr, &x );
p = cast(void*)&x;
}
@@ -1198,7 +1175,8 @@ pure immutable(T)[] fooPT(T)(immutable(T)[] x, immutable(T)[] y){
void test61()
{
- writeln(fooPT("p", "c"));
+ auto s = fooPT("p", "c");
+ printf("%.*s\n", cast(int)s.length, s.ptr);
}
/***************************************************/
@@ -1347,7 +1325,7 @@ void test67()
void test68()
{
- digestToString(cast(ubyte[16])x"c3fcd3d76192e4007dfb496cca67e13b");
+ digestToString(cast(ubyte[16])"\xc3\xfc\xd3\xd7\x61\x92\xe4\x00\x7d\xfb\x49\x6c\xca\x67\xe1\x3b");
}
void digestToString(const ubyte[16] digest)
@@ -1360,7 +1338,7 @@ void digestToString(const ubyte[16] digest)
void test69()
{
- digestToString69(cast(ubyte[16])x"c3fcd3d76192e4007dfb496cca67e13b");
+ digestToString69(cast(ubyte[16])"\xc3\xfc\xd3\xd7\x61\x92\xe4\x00\x7d\xfb\x49\x6c\xca\x67\xe1\x3b");
}
void digestToString69(ref const ubyte[16] digest)
@@ -1776,7 +1754,7 @@ void test86()
/***************************************************/
-// Bugzilla 3379
+// https://issues.dlang.org/show_bug.cgi?id=3379
T1[] find(T1, T2)(T1[] longer, T2[] shorter)
if (is(typeof(longer[0 .. 1] == shorter) : bool))
@@ -1832,7 +1810,7 @@ struct S88
{
void opDispatch(string s, T)(T i)
{
- printf("S.opDispatch('%.*s', %d)\n", s.length, s.ptr, i);
+ printf("S.opDispatch('%.*s', %d)\n", cast(int)s.length, s.ptr, i);
}
}
@@ -1840,7 +1818,7 @@ class C88
{
void opDispatch(string s)(int i)
{
- printf("C.opDispatch('%.*s', %d)\n", s.length, s.ptr, i);
+ printf("C.opDispatch('%.*s', %d)\n", cast(int)s.length, s.ptr, i);
}
}
@@ -1874,7 +1852,7 @@ void test89() {
int bar() { return x; }
}
X s;
- printf("%d\n", s.sizeof);
+ printf("%zd\n", s.sizeof);
assert(s.sizeof == 4);
}
@@ -2053,8 +2031,8 @@ void test96()
{
S96!([12, 3]) s1;
S96!([1, 23]) s2;
- writeln(s1.content);
- writeln(s2.content);
+ //writeln(s1.content);
+ //writeln(s2.content);
assert(!is(typeof(s1) == typeof(s2)));
}
@@ -2105,7 +2083,7 @@ void test99()
}
/***************************************************/
-// 5081
+// https://issues.dlang.org/show_bug.cgi?id=5081
void test5081()
{
@@ -2222,7 +2200,7 @@ void test104()
/***************************************************/
-ref int bump105(ref int x) { return ++x; }
+ref int bump105(return ref int x) { return ++x; }
void test105()
{
@@ -2246,8 +2224,8 @@ pure int genFactorials(int n) {
void test107()
{
int[6] a;
- writeln(a);
- writeln(a.init);
+ //writeln(a);
+ //writeln(a.init);
assert(a.init == [0,0,0,0,0,0]);
}
@@ -2289,7 +2267,7 @@ int test11247()
/***************************************************/
-// 3716
+// https://issues.dlang.org/show_bug.cgi?id=3716
void test111()
{
auto k1 = true ? [1,2] : []; // OK
@@ -2302,7 +2280,7 @@ void test111()
}
/***************************************************/
-// 658
+// https://issues.dlang.org/show_bug.cgi?id=658
void test658()
{
@@ -2333,7 +2311,7 @@ void test3069()
}
/***************************************************/
-// 4303
+// https://issues.dlang.org/show_bug.cgi?id=4303
template foo112() if (__traits(compiles,undefined))
{
@@ -2405,7 +2383,7 @@ template foo114(fun...)
pragma(msg, typeof(foo114!"a + b"([1,2,3])));
/***************************************************/
-// Bugzilla 3935
+// https://issues.dlang.org/show_bug.cgi?id=3935
struct Foo115 {
void opBinary(string op)(Foo other) {
@@ -2421,7 +2399,7 @@ void test115()
}
/***************************************************/
-// Bugzilla 2477
+// https://issues.dlang.org/show_bug.cgi?id=2477
void foo116(T,)(T t) { T x; }
@@ -2458,7 +2436,7 @@ void test1891()
}
/***************************************************/
-// Bugzilla 4291
+// https://issues.dlang.org/show_bug.cgi?id=4291
void test117() pure
{
@@ -2474,7 +2452,7 @@ template declareFunction()
}
/***************************************************/
-// Bugzilla 4177
+// https://issues.dlang.org/show_bug.cgi?id=4177
pure real log118(real x) {
if (__ctfe)
@@ -2510,7 +2488,7 @@ pure void test120()
}
/***************************************************/
-// 4866
+// https://issues.dlang.org/show_bug.cgi?id=4866
immutable int[3] statik = [ 1, 2, 3 ];
enum immutable(int)[] dynamic = statik;
@@ -2523,7 +2501,7 @@ static if (! is(typeof(dynamic) == immutable(int)[]))
pragma(msg, "!! ", typeof(dynamic));
/***************************************************/
-// 2943
+// https://issues.dlang.org/show_bug.cgi?id=2943
struct Foo2943
{
@@ -2545,7 +2523,7 @@ void test122()
}
/***************************************************/
-// 4641
+// https://issues.dlang.org/show_bug.cgi?id=4641
struct S123 {
int i;
@@ -2558,7 +2536,7 @@ void test123() {
}
/***************************************************/
-// 2451
+// https://issues.dlang.org/show_bug.cgi?id=2451
struct Foo124 {
int z = 3;
@@ -2585,21 +2563,6 @@ void test124() {
/***************************************************/
-void test3022()
-{
- static class Foo3022
- {
- new(size_t)
- {
- assert(0);
- }
- }
-
- scope x = new Foo3022;
-}
-
-/***************************************************/
-
void doNothing() {}
void bug5071(short d, ref short c) {
@@ -2681,7 +2644,7 @@ alias const MyInt4434[3] IceConstInt4434;
alias immutable string[] Bug4830;
/***************************************************/
-// 4254
+// https://issues.dlang.org/show_bug.cgi?id=4254
void bub(const inout int other) {}
@@ -2703,12 +2666,12 @@ void bug4915c()
}
/***************************************************/
-// 5164
+// https://issues.dlang.org/show_bug.cgi?id=5164
static if (is(int Q == int, Z...)) { }
/***************************************************/
-// 5195
+// https://issues.dlang.org/show_bug.cgi?id=5195
alias typeof(foo5195) food5195;
const int * foo5195 = null;
@@ -2727,7 +2690,7 @@ void test5332() { auto x = var5332; }
}
/***************************************************/
-// 5191
+// https://issues.dlang.org/show_bug.cgi?id=5191
struct Foo129
{
@@ -2750,15 +2713,15 @@ void test129()
assert(foo.value == 5);
foo.add(2);
- writeln(foo.value);
+ printf("%d\n", foo.value);
assert(foo.value == 7);
foo.add(3);
- writeln(foo.value);
+ printf("%d\n", foo.value);
assert(foo.value == 10);
foo.add(3);
- writeln(foo.value);
+ printf("%d\n", foo.value);
assert(foo.value == 13);
void delegate (int) nothrow dg = &foo.add!(int);
@@ -2767,7 +2730,7 @@ void test129()
}
/***************************************************/
-// 6169
+// https://issues.dlang.org/show_bug.cgi?id=6169
auto ctfefunc6169() { return "{}"; }
enum ctfefptr6169 = &ctfefunc6169;
@@ -2813,7 +2776,7 @@ void test6169() pure @safe
}
/***************************************************/
-// 10506
+// https://issues.dlang.org/show_bug.cgi?id=10506
void impureFunc10506() {}
string join10506(RoR)(RoR ror)
@@ -2847,7 +2810,7 @@ immutable struct S3598
}
/***************************************************/
-// 4211
+// https://issues.dlang.org/show_bug.cgi?id=4211
@safe struct X130
{
@@ -2885,7 +2848,7 @@ alias Return!( __traits(getOverloads, I4217, "square")[1] ) S4217;
static assert(! is(R4217 == S4217));
/***************************************************/
-// 5094
+// https://issues.dlang.org/show_bug.cgi?id=5094
void test131()
{
@@ -2913,7 +2876,7 @@ void test7545()
}
/***************************************************/
-// 5020
+// https://issues.dlang.org/show_bug.cgi?id=5020
void test132()
{
@@ -2928,7 +2891,7 @@ struct S132
}
/***************************************************/
-// 5343
+// https://issues.dlang.org/show_bug.cgi?id=5343
struct Tuple5343(Specs...)
{
@@ -2944,7 +2907,7 @@ alias Tuple5343!(A5343) TA5343;
alias S5343!(A5343) SA5343;
/***************************************************/
-// 5365
+// https://issues.dlang.org/show_bug.cgi?id=5365
interface IFactory
{
@@ -2987,7 +2950,7 @@ void test133()
}
/***************************************************/
-// 5365
+// https://issues.dlang.org/show_bug.cgi?id=5365
class B134
{
@@ -3020,7 +2983,7 @@ void test134()
}
/***************************************************/
-// 5025
+// https://issues.dlang.org/show_bug.cgi?id=5025
struct S135 {
void delegate() d;
@@ -3034,7 +2997,7 @@ void test135()
}
/***************************************************/
-// 5545
+// https://issues.dlang.org/show_bug.cgi?id=5545
bool enforce136(bool value, lazy const(char)[] msg = null) {
if(!value) {
@@ -3052,7 +3015,7 @@ struct Perm {
foreach(elem; input) {
enforce136(i < 3);
perm[i++] = elem;
- std.stdio.stderr.writeln(i); // Never gets incremented. Stays at 0.
+ printf("%d\n", i); // Never gets incremented. Stays at 0.
}
}
}
@@ -3060,12 +3023,12 @@ struct Perm {
void test136() {
byte[] stuff = [0, 1, 2];
auto perm2 = Perm(stuff);
- writeln(perm2.perm); // Prints [2, 0, 0]
+ //writeln(perm2.perm); // Prints [2, 0, 0]
assert(perm2.perm[] == [0, 1, 2]);
}
/***************************************************/
-// 4097
+// https://issues.dlang.org/show_bug.cgi?id=4097
void foo4097() { }
alias typeof(&foo4097) T4097;
@@ -3074,7 +3037,7 @@ static assert(is(T4097 X : X*) && is(X == function));
static assert(!is(X));
/***************************************************/
-// 5798
+// https://issues.dlang.org/show_bug.cgi?id=5798
void assign9(ref int lhs) pure {
lhs = 9;
@@ -3099,7 +3062,7 @@ int test137(){
/***************************************************/
-// 9366
+// https://issues.dlang.org/show_bug.cgi?id=9366
static assert(!is(typeof((void[]).init ~ cast(void)0)));
static assert(!is(typeof(cast(void)0 ~ (void[]).init)));
@@ -3146,7 +3109,8 @@ void test3822()
/***************************************************/
-// 5939, 5940
+// https://issues.dlang.org/show_bug.cgi?id=5939
+// https://issues.dlang.org/show_bug.cgi?id=5940
template map(fun...)
{
@@ -3176,7 +3140,7 @@ void test139()
/***************************************************/
-// 5966
+// https://issues.dlang.org/show_bug.cgi?id=5966
string[] foo5966(string[] a)
{
@@ -3187,7 +3151,7 @@ string[] foo5966(string[] a)
enum var5966 = foo5966([""]);
/***************************************************/
-// 5975
+// https://issues.dlang.org/show_bug.cgi?id=5975
int foo5975(wstring replace)
{
@@ -3199,7 +3163,7 @@ int foo5975(wstring replace)
enum X5975 = foo5975("X"w);
/***************************************************/
-// 5965
+// https://issues.dlang.org/show_bug.cgi?id=5965
template mapx(fun...) if (fun.length >= 1)
{
@@ -3232,7 +3196,7 @@ void bug5976()
}
/***************************************************/
-// 5771
+// https://issues.dlang.org/show_bug.cgi?id=5771
struct S141
{
@@ -3253,7 +3217,7 @@ class test5498_C : test5498_A {}
static assert(is(typeof([test5498_B.init, test5498_C.init]) == test5498_A[]));
/***************************************************/
-// 3688
+// https://issues.dlang.org/show_bug.cgi?id=3688
struct S142
{
@@ -3290,7 +3254,7 @@ void test142()
}
/***************************************************/
-// 6072
+// https://issues.dlang.org/show_bug.cgi?id=6072
static assert({
if (int x = 5) {}
@@ -3298,7 +3262,7 @@ static assert({
}());
/***************************************************/
-// 5959
+// https://issues.dlang.org/show_bug.cgi?id=5959
int n;
@@ -3318,7 +3282,7 @@ void test143()
}
/***************************************************/
-// 6119
+// https://issues.dlang.org/show_bug.cgi?id=6119
void startsWith(alias pred) () if (is(typeof(pred('c', 'd')) : bool))
{
@@ -3349,18 +3313,18 @@ void test146()
}
/***************************************************/
-// 5856
+// https://issues.dlang.org/show_bug.cgi?id=5856
struct X147
{
- void f() { writeln("X.f mutable"); }
- void f() const { writeln("X.f const"); }
+ void f() { printf("X.f mutable\n"); }
+ void f() const { printf("X.f const\n"); }
- void g()() { writeln("X.g mutable"); }
- void g()() const { writeln("X.g const"); }
+ void g()() { printf("X.g mutable\n"); }
+ void g()() const { printf("X.g const\n"); }
- void opOpAssign(string op)(int n) { writeln("X+= mutable"); }
- void opOpAssign(string op)(int n) const { writeln("X+= const"); }
+ void opOpAssign(string op)(int n) { printf("X+= mutable\n"); }
+ void opOpAssign(string op)(int n) const { printf("X+= const\n"); }
}
void test147()
@@ -3465,7 +3429,7 @@ void test13182()
}
/***************************************************/
-// 5897
+// https://issues.dlang.org/show_bug.cgi?id=5897
struct A148{ int n; }
struct B148{
@@ -3493,7 +3457,7 @@ void test148()
}
/***************************************************/
-// 4969
+// https://issues.dlang.org/show_bug.cgi?id=4969
class MyException : Exception
{
@@ -3519,7 +3483,7 @@ void cantthrow() nothrow
}
/***************************************************/
-// 2356
+// https://issues.dlang.org/show_bug.cgi?id=2356
void test2356()
{
@@ -3565,7 +3529,7 @@ void test2356()
}
/***************************************************/
-// 13652
+// https://issues.dlang.org/show_bug.cgi?id=13652
void test13652()
{
@@ -3633,7 +3597,7 @@ void test13652()
}
/***************************************************/
-// 11238
+// https://issues.dlang.org/show_bug.cgi?id=11238
void test11238()
{
@@ -3676,18 +3640,18 @@ class A2540
class B2540 : A2540
{
int b;
- override super.X foo() { return 1; }
+ override typeof(super).X foo() { return 1; }
- alias this athis;
- alias this.b thisb;
- alias super.a supera;
- alias super.foo superfoo;
- alias this.foo thisfoo;
+ alias typeof(this) athis;
+ alias typeof(this).b thisb;
+ alias typeof(super).a supera;
+ alias typeof(super).foo superfoo;
+ alias typeof(this).foo thisfoo;
}
struct X2540
{
- alias this athis;
+ alias typeof(this) athis;
}
void test2540()
@@ -3726,12 +3690,12 @@ B14348 test14348()
}
/***************************************************/
-// 7295
+// https://issues.dlang.org/show_bug.cgi?id=7295
struct S7295
{
int member;
- @property ref int refCountedPayload() { return member; }
+ @property ref int refCountedPayload() return { return member; }
alias refCountedPayload this;
}
@@ -3745,24 +3709,20 @@ void bar7295() pure
}
/***************************************************/
-// 5659
+// https://issues.dlang.org/show_bug.cgi?id=5659
void test149()
{
- import std.traits;
-
char a;
immutable(char) b;
static assert(is(typeof(true ? a : b) == const(char)));
static assert(is(typeof([a, b][0]) == const(char)));
-
- static assert(is(CommonType!(typeof(a), typeof(b)) == const(char)));
}
/***************************************************/
-// 1373
+// https://issues.dlang.org/show_bug.cgi?id=1373
void func1373a(){}
@@ -3815,7 +3775,7 @@ nothrow void test151()
@property int eoo() { return 1; }
@property auto ref hoo(int i) { return i; }
-// 3359
+// https://issues.dlang.org/show_bug.cgi?id=3359
int goo(int i) pure { return i; }
auto ioo(int i) pure { return i; }
@@ -3829,7 +3789,7 @@ class A152 {
auto eoo(int i) shared { return i; }
}
-// 4706
+// https://issues.dlang.org/show_bug.cgi?id=4706
struct Foo152(T) {
@property auto ref front() {
@@ -3846,7 +3806,7 @@ void test152() {
}
/***************************************************/
-// 6733
+// https://issues.dlang.org/show_bug.cgi?id=6733
void bug6733(int a, int b) pure nothrow { }
void test6733() {
@@ -3856,7 +3816,7 @@ void test6733() {
}
/***************************************************/
-// 3799
+// https://issues.dlang.org/show_bug.cgi?id=3799
void test153()
{
@@ -3868,7 +3828,7 @@ void test153()
}
/***************************************************/
-// 3632
+// https://issues.dlang.org/show_bug.cgi?id=3632
void test154() {
@@ -3905,7 +3865,7 @@ void test6545()
}
/***************************************************/
-// 3147
+// https://issues.dlang.org/show_bug.cgi?id=3147
void test155()
@@ -3924,7 +3884,7 @@ void test155()
}
/***************************************************/
-// 2486
+// https://issues.dlang.org/show_bug.cgi?id=2486
void test2486()
{
@@ -3932,7 +3892,7 @@ void test2486()
int[] arr = [1,2,3];
foo(arr); //OK
- static assert(!__traits(compiles, foo(arr[1..2]))); // should be NG
+ static assert(__traits(compiles, foo(arr[1..2])));
struct S
{
@@ -3943,7 +3903,7 @@ void test2486()
s[];
// opSlice should return rvalue
static assert(is(typeof(&S.opSlice) == int[] function() pure nothrow @nogc @safe));
- static assert(!__traits(compiles, foo(s[]))); // should be NG
+ static assert(__traits(compiles, foo(s[])));
}
/***************************************************/
@@ -3963,7 +3923,7 @@ void test15080()
}
/***************************************************/
-// 2521
+// https://issues.dlang.org/show_bug.cgi?id=2521
immutable int val = 23;
const int val2 = 23;
@@ -4011,7 +3971,7 @@ void test5554()
}
/***************************************************/
-// 5962
+// https://issues.dlang.org/show_bug.cgi?id=5962
struct S156
{
@@ -4044,7 +4004,7 @@ void test6708(const ref int y)
}
/***************************************************/
-// 4258
+// https://issues.dlang.org/show_bug.cgi?id=4258
struct Vec4258 {
Vec4258 opOpAssign(string Op)(auto ref Vec4258 other) if (Op == "+") {
@@ -4097,7 +4057,7 @@ static assert(!is(typeof(Bar4258.init += 1)));
static assert(!is(typeof(1 + Baz4258.init)));
/***************************************************/
-// 4539
+// https://issues.dlang.org/show_bug.cgi?id=4539
void test4539()
{
@@ -4118,20 +4078,20 @@ void test4539()
assert(s[4] == 0x61);
}
- static assert(!__traits(compiles, foo1("hello")));
+ static assert(__traits(compiles, foo1("hello")));
static assert(!__traits(compiles, foo2("hello")));
static assert(!__traits(compiles, foo3("hello")));
// same as test68, 69, 70
foo4("hello");
- foo5(cast(ubyte[5])x"c3fcd3d761");
+ foo5(cast(ubyte[5])"\xc3\xfc\xd3\xd7\x61");
//import std.conv;
//static assert(!__traits(compiles, parse!int("10") == 10));
}
/***************************************************/
-// 1471
+// https://issues.dlang.org/show_bug.cgi?id=1471
void test1471()
{
@@ -4147,14 +4107,6 @@ static assert(!is(typeof(bug6389 = bug6389)));
/***************************************************/
-void test10927()
-{
- static assert( (1+2i) ^^ 3 == -11 - 2i );
- auto a = (1+2i) ^^ 3;
-}
-
-/***************************************************/
-
void test4963()
{
struct Value {
@@ -4178,7 +4130,7 @@ pure int test4031()
}
/***************************************************/
-// 5437
+// https://issues.dlang.org/show_bug.cgi?id=5437
template EnumMembers5437(E)
{
@@ -4203,7 +4155,7 @@ void test5437()
}
/***************************************************/
-// 1962
+// https://issues.dlang.org/show_bug.cgi?id=1962
void test1962()
@@ -4213,12 +4165,12 @@ void test1962()
}
/***************************************************/
-// 6228
-
+// https://issues.dlang.org/show_bug.cgi?id=6228
void test6228()
{
- const(int)* ptr;
+ int val;
+ const(int)* ptr = &val;
const(int) temp;
auto x = (*ptr) ^^ temp;
}
@@ -4308,7 +4260,7 @@ void test6264()
}
/***************************************************/
-// 5046
+// https://issues.dlang.org/show_bug.cgi?id=5046
void test5046()
{
@@ -4328,7 +4280,7 @@ S5046!(p, T) makeS5046(alias p, T)()
}
/***************************************************/
-// 6335
+// https://issues.dlang.org/show_bug.cgi?id=6335
struct S6335
{
@@ -4428,7 +4380,7 @@ void test6293() {
}
/***************************************************/
-// 3733
+// https://issues.dlang.org/show_bug.cgi?id=3733
class C3733
{
@@ -4444,7 +4396,7 @@ void test3733()
}
/***************************************************/
-// 4392
+// https://issues.dlang.org/show_bug.cgi?id=4392
class C4392
{
@@ -4460,7 +4412,7 @@ void test4392()
}
/***************************************************/
-// 6220
+// https://issues.dlang.org/show_bug.cgi?id=6220
void test6220() {
struct Foobar { real x; real y; real z;}
@@ -4473,7 +4425,7 @@ void test6220() {
}
/***************************************************/
-// 5799
+// https://issues.dlang.org/show_bug.cgi?id=5799
void test5799()
{
@@ -4483,7 +4435,7 @@ void test5799()
}
/***************************************************/
-// 6529
+// https://issues.dlang.org/show_bug.cgi?id=6529
enum Foo6529 : char { A='a' }
ref const(Foo6529) func6529(const(Foo6529)[] arr){ return arr[0]; }
@@ -4536,7 +4488,7 @@ void test157()
}
/***************************************************/
-// 6473
+// https://issues.dlang.org/show_bug.cgi?id=6473
struct Eins6473
{
@@ -4634,7 +4586,7 @@ void test6578()
}
/***************************************************/
-// 6630
+// https://issues.dlang.org/show_bug.cgi?id=6630
void test6630()
{
@@ -4674,7 +4626,7 @@ void test199()
}
/***************************************************/
-// 6690
+// https://issues.dlang.org/show_bug.cgi?id=6690
T useLazy6690(T)(lazy T val)
{
@@ -4694,7 +4646,7 @@ template Hoge6691()
immutable static int[int] dict;
immutable static int value;
- static this()
+ shared static this()
{
dict = [1:1, 2:2];
value = 10;
@@ -4716,13 +4668,14 @@ void test10626()
double[2] a = v[] * ++z;
double[2] b = v[] * --z;
double[2] c = v[] * y.u;
- double[2] d = v[] * (x[] = 3, x[0]);
+ x[] = 3;
+ double[2] d = v[] * x[0];
double[2] e = v[] * (v[] ~ z)[0];
}
/***************************************************/
-// 2953
+// https://issues.dlang.org/show_bug.cgi?id=2953
template Tuple2953(T...)
{
@@ -4743,7 +4696,7 @@ void test2953()
}
/***************************************************/
-// 2997
+// https://issues.dlang.org/show_bug.cgi?id=2997
abstract class B2997 { void foo(); }
interface I2997 { void bar(); }
@@ -4758,7 +4711,7 @@ void test2997()
}
/***************************************************/
-// 6596
+// https://issues.dlang.org/show_bug.cgi?id=6596
extern (C) int function() pfunc6596;
extern (C) int cfunc6596(){ return 0; }
@@ -4767,7 +4720,7 @@ static assert(typeof(cfunc6596).stringof == "extern (C) int()");
/***************************************************/
-// 4423
+// https://issues.dlang.org/show_bug.cgi?id=4423
struct S4423
{
@@ -4813,7 +4766,7 @@ void test4423()
}
/***************************************************/
-// 4647
+// https://issues.dlang.org/show_bug.cgi?id=4647
interface Timer
{
@@ -4903,7 +4856,7 @@ void test1064()
}
/***************************************************/
-// 5696
+// https://issues.dlang.org/show_bug.cgi?id=5696
template Seq5696(T...){ alias T Seq5696; }
template Pred5696(T) { alias T Pred5696; } // TOKtemplate
@@ -4931,7 +4884,7 @@ void test5696()
}
/***************************************************/
-// 5933
+// https://issues.dlang.org/show_bug.cgi?id=5933
int dummyfunc5933();
alias typeof(dummyfunc5933) FuncType5933;
@@ -4950,7 +4903,7 @@ static assert(is(typeof(S5933d.x) == FuncType5933));
class C5933a { auto x() { return 0; } }
-static assert(is(typeof(&(new C5933b()).x) == int delegate()));
+static assert(is(typeof(&(new C5933b()).x) == int delegate() pure nothrow @nogc @safe));
class C5933b { auto x() { return 0; } }
//static assert(is(typeof((new C5933b()).x) == FuncType5933));
@@ -4962,7 +4915,7 @@ class C5933d { auto x() { return 0; } }
static assert(is(typeof(C5933d.x) == FuncType5933));
/***************************************************/
-// 6084
+// https://issues.dlang.org/show_bug.cgi?id=6084
template TypeTuple6084(T...){ alias T TypeTuple6084; }
void test6084()
@@ -4973,7 +4926,7 @@ void test6084()
}
/***************************************************/
-// 6763
+// https://issues.dlang.org/show_bug.cgi?id=6763
template TypeTuple6763(TList...)
{
@@ -4994,20 +4947,20 @@ void test6763()
f6763(0); //With D2: Error: function main.f ((ref const const(int) _param_0)) is not callable using argument types (int)
c6763(0);
- r6763(n); static assert(!__traits(compiles, r6763(0)));
+ r6763(n); static assert(__traits(compiles, r6763(0)));
i6763(0);
o6763(n); static assert(!__traits(compiles, o6763(0)));
- // 6755
+ // https://issues.dlang.org/show_bug.cgi?id=6755
static assert(typeof(f6763).stringof == "void(int _param_0)");
static assert(typeof(c6763).stringof == "void(const(int) _param_0)");
static assert(typeof(r6763).stringof == "void(ref int _param_0)");
- static assert(typeof(i6763).stringof == "void(const(int) _param_0)");
+ static assert(typeof(i6763).stringof == "void(in int _param_0)");
static assert(typeof(o6763).stringof == "void(out int _param_0)");
}
/***************************************************/
-// 6695
+// https://issues.dlang.org/show_bug.cgi?id=6695
struct X6695
{
@@ -5044,7 +4997,7 @@ struct X6695
}
/***************************************************/
-// 6087
+// https://issues.dlang.org/show_bug.cgi?id=6087
template True6087(T)
{
@@ -5061,7 +5014,7 @@ struct Bar6087
}
/***************************************************/
-// 6848
+// https://issues.dlang.org/show_bug.cgi?id=6848
class Foo6848 {}
@@ -5094,7 +5047,7 @@ else
static assert(!__traits(compiles, { cent x; }));
/***************************************************/
-// 6847
+// https://issues.dlang.org/show_bug.cgi?id=6847
template True6847(T)
{
@@ -5110,7 +5063,7 @@ class Bar6847 : Foo6847
}
/***************************************************/
-// http://d.puremagic.com/issues/show_bug.cgi?id=6488
+// https://issues.dlang.org/show_bug.cgi?id=6488
struct TickDuration
{
@@ -5144,7 +5097,7 @@ void test6488()
}
/***************************************************/
-// 6565
+// https://issues.dlang.org/show_bug.cgi?id=6565
void foo6565(out int[2][2] m) {}
@@ -5156,7 +5109,7 @@ void test6565()
}
/***************************************************/
-// 6836
+// https://issues.dlang.org/show_bug.cgi?id=6836
template map6836(fun...) if (fun.length >= 1)
{
@@ -5194,7 +5147,7 @@ void test5448()
}
/***************************************************/
-// 6837
+// https://issues.dlang.org/show_bug.cgi?id=6837
struct Ref6837a(T)
{
@@ -5232,7 +5185,7 @@ void test6837()
}
/***************************************************/
-// 6927
+// https://issues.dlang.org/show_bug.cgi?id=6927
@property int[] foo6927()
{
@@ -5286,7 +5239,7 @@ struct Interval6753{ int a,b; }
}
/***************************************************/
-// 6859
+// https://issues.dlang.org/show_bug.cgi?id=6859
class Parent6859
{
@@ -5299,7 +5252,7 @@ public:
{
assert(isHage);
}
- body { }
+ do { }
}
class Child6859 : Parent6859
@@ -5322,7 +5275,7 @@ void test6859()
}
/***************************************************/
-// 6910
+// https://issues.dlang.org/show_bug.cgi?id=6910
template Test6910(alias i, B)
{
@@ -5371,7 +5324,7 @@ void fun12503()
b = null;
return;
}
- catch
+ catch(Throwable)
{
}
}
@@ -5387,7 +5340,7 @@ void test12503()
}
/***************************************************/
-// 6902
+// https://issues.dlang.org/show_bug.cgi?id=6902
void test6902()
{
@@ -5407,7 +5360,7 @@ void test6902()
}
/***************************************************/
-// 6330
+// https://issues.dlang.org/show_bug.cgi?id=6330
struct S6330
{
@@ -5444,7 +5397,7 @@ void test8269()
}
/***************************************************/
-// 5311
+// https://issues.dlang.org/show_bug.cgi?id=5311
class C5311
{
@@ -5487,7 +5440,7 @@ static void breaksPure5311b(S5311 x) pure
}
/***************************************************/
-// 6868
+// https://issues.dlang.org/show_bug.cgi?id=6868
@property bool empty6868(T)(in T[] a) @safe pure nothrow
{
@@ -5504,7 +5457,7 @@ void test6868()
}
/***************************************************/
-// 2856
+// https://issues.dlang.org/show_bug.cgi?id=2856
struct foo2856 { static void opIndex(int i) { printf("foo\n"); } }
struct bar2856(T) { static void opIndex(int i) { printf("bar\n"); } }
@@ -5539,7 +5492,7 @@ void test13947()
}
/***************************************************/
-// 3091
+// https://issues.dlang.org/show_bug.cgi?id=3091
void test3091(inout int = 0)
{
@@ -5563,7 +5516,7 @@ void test3091(inout int = 0)
}
/***************************************************/
-// 6837
+// https://issues.dlang.org/show_bug.cgi?id=6837
template Id6837(T)
{
@@ -5573,7 +5526,7 @@ static assert(is(Id6837!(shared const int) == shared const int));
static assert(is(Id6837!(shared inout int) == shared inout int));
/***************************************************/
-// 6056 fixup
+// https://issues.dlang.org/show_bug.cgi?id=6056 fixup
template ParameterTypeTuple6056(func)
{
@@ -5599,7 +5552,7 @@ void test6056()
}
/***************************************************/
-// 6356
+// https://issues.dlang.org/show_bug.cgi?id=6356
int f6356()(int a)
{
@@ -5619,13 +5572,13 @@ void test6356()
}
/***************************************************/
-// 7108
+// https://issues.dlang.org/show_bug.cgi?id=7108
static assert(!__traits(hasMember, int, "x"));
static assert( __traits(hasMember, int, "init"));
/***************************************************/
-// 7073
+// https://issues.dlang.org/show_bug.cgi?id=7073
void test7073()
{
@@ -5636,7 +5589,7 @@ void test7073()
}
/***************************************************/
-// 7104
+// https://issues.dlang.org/show_bug.cgi?id=7104
void test7104()
{
@@ -5645,7 +5598,7 @@ void test7104()
}
/***************************************************/
-// 7150
+// https://issues.dlang.org/show_bug.cgi?id=7150
struct A7150
{
@@ -5669,7 +5622,7 @@ void test7150()
}
/***************************************************/
-// 7159
+// https://issues.dlang.org/show_bug.cgi?id=7159
alias void delegate() Void7159;
@@ -5683,7 +5636,7 @@ class HomeController7159 {
}
/***************************************************/
-// 7160
+// https://issues.dlang.org/show_bug.cgi?id=7160
class HomeController {
static if (false) {
@@ -5699,7 +5652,7 @@ void test7160()
{}
/***************************************************/
-// 7168
+// https://issues.dlang.org/show_bug.cgi?id=7168
void test7168()
{
@@ -5720,7 +5673,7 @@ void test7168()
}
/***************************************************/
-// 7170
+// https://issues.dlang.org/show_bug.cgi?id=7170
T to7170(T)(string x) { return 1; }
void test7170()
@@ -5730,7 +5683,7 @@ void test7170()
}
/***************************************************/
-// 7196
+// https://issues.dlang.org/show_bug.cgi?id=7196
auto foo7196(int x){return x;}
auto foo7196(double x){return x;}
@@ -5742,7 +5695,7 @@ void test7196()
}
/***************************************************/
-// 7285
+// https://issues.dlang.org/show_bug.cgi?id=7285
int[2] spam7285()
{
@@ -5759,7 +5712,7 @@ void test7285()
}
/***************************************************/
-// 14737
+// https://issues.dlang.org/show_bug.cgi?id=14737
void test14737()
{
@@ -5783,7 +5736,7 @@ void test14737()
}
/***************************************************/
-// 7321
+// https://issues.dlang.org/show_bug.cgi?id=7321
void test7321()
{
@@ -5810,13 +5763,13 @@ class B158 : A158
}
/***************************************************/
-// 9231
+// https://issues.dlang.org/show_bug.cgi?id=9231
class B9231 { void foo() inout pure {} }
class D9231 : B9231 { override void foo() inout {} }
/***************************************************/
-// 3282
+// https://issues.dlang.org/show_bug.cgi?id=3282
class Base3282
{
@@ -5848,7 +5801,7 @@ void test3282()
}
/***************************************************/
-// 7534
+// https://issues.dlang.org/show_bug.cgi?id=7534
class C7534
{
@@ -5877,7 +5830,8 @@ void test7534()
}
/***************************************************/
-// 7534 + return type covariance
+// https://issues.dlang.org/show_bug.cgi?id=7534
+// return type covariance
class X7534 {}
class Y7534 : X7534
@@ -5913,7 +5867,7 @@ void test7534cov()
}
/***************************************************/
-// 7562
+// https://issues.dlang.org/show_bug.cgi?id=7562
static struct MyInt
{
@@ -5946,7 +5900,7 @@ void test13427(void* buffer = alloca(100))
}
/***************************************************/
-// 7583
+// https://issues.dlang.org/show_bug.cgi?id=7583
template Tup7583(E...) { alias E Tup7583; }
@@ -5966,7 +5920,7 @@ int bug7583() {
static assert (bug7583());
/***************************************************/
-// 7618
+// https://issues.dlang.org/show_bug.cgi?id=7618
void test7618(const int x = 1)
{
@@ -5984,7 +5938,7 @@ void test7618(const int x = 1)
}
/***************************************************/
-// 7621
+// https://issues.dlang.org/show_bug.cgi?id=7621
void test7621()
{
@@ -5996,7 +5950,7 @@ void test7621()
}
/***************************************************/
-// 7682
+// https://issues.dlang.org/show_bug.cgi?id=7682
template ConstOf7682(T)
{
@@ -6017,7 +5971,7 @@ void test7682()
}
/***************************************************/
-// 7735
+// https://issues.dlang.org/show_bug.cgi?id=7735
void a7735(void[][] data...)
{
@@ -6055,7 +6009,7 @@ struct A7823 {
void test7823(A7823 a = A7823.b) { }
/***************************************************/
-// 7871
+// https://issues.dlang.org/show_bug.cgi?id=7871
struct Tuple7871
{
@@ -6076,7 +6030,7 @@ void test7871()
}
/***************************************************/
-// 7906
+// https://issues.dlang.org/show_bug.cgi?id=7906
void test7906()
{
@@ -6084,7 +6038,7 @@ void test7906()
}
/***************************************************/
-// 7907
+// https://issues.dlang.org/show_bug.cgi?id=7907
template Id7907(E)
{
@@ -6101,7 +6055,7 @@ void test7907()
}
/***************************************************/
-// 1175
+// https://issues.dlang.org/show_bug.cgi?id=1175
class A1175
{
@@ -6116,28 +6070,7 @@ class B1175 : A1175
}
/***************************************************/
-// 7983
-
-class A7983 {
- void f() {
- g7983(this);
- }
- unittest {
- }
-}
-
-void g7983(T)(T a)
-{
- foreach (name; __traits(allMembers, T)) {
- pragma(msg, name);
- static if (__traits(compiles, &__traits(getMember, a, name)))
- {
- }
- }
-}
-
-/***************************************************/
-// 8004
+// https://issues.dlang.org/show_bug.cgi?id=8004
void test8004()
{
@@ -6146,7 +6079,7 @@ void test8004()
}
/***************************************************/
-// 8064
+// https://issues.dlang.org/show_bug.cgi?id=8064
void test8064()
{
@@ -6159,7 +6092,7 @@ void test8064()
}
/***************************************************/
-// 8220
+// https://issues.dlang.org/show_bug.cgi?id=8220
void foo8220(int){}
static assert(!__traits(compiles, foo8220(typeof(0)))); // fail
@@ -6200,7 +6133,7 @@ void test159()
}
/***************************************************/
-// 8283
+// https://issues.dlang.org/show_bug.cgi?id=8283
struct Foo8283 {
this(long) { }
@@ -6222,7 +6155,7 @@ void test8283() {
/***************************************************/
-// 8395
+// https://issues.dlang.org/show_bug.cgi?id=8395
struct S8395
{
@@ -6238,7 +6171,7 @@ void test8395()
}
/***************************************************/
-// 5749
+// https://issues.dlang.org/show_bug.cgi?id=5749
void test5749()
{
@@ -6286,7 +6219,7 @@ void test5749()
}
/***************************************************/
-// 8396
+// https://issues.dlang.org/show_bug.cgi?id=8396
void test8396()
{
@@ -6380,7 +6313,7 @@ void test160()
}
/***************************************************/
-// 8437
+// https://issues.dlang.org/show_bug.cgi?id=8437
class Cgi8437
{
@@ -6394,7 +6327,7 @@ class Cgi8437
}
/***************************************************/
-// 8665
+// https://issues.dlang.org/show_bug.cgi?id=8665
auto foo8665a(bool val)
{
@@ -6441,7 +6374,7 @@ void test8108()
}
/***************************************************/
-// 8360
+// https://issues.dlang.org/show_bug.cgi?id=8360
struct Foo8360
{
@@ -6482,7 +6415,7 @@ void test8360()
}
/***************************************************/
-// 8361
+// https://issues.dlang.org/show_bug.cgi?id=8361
struct Foo8361
{
@@ -6496,7 +6429,8 @@ void test8361()
}
/***************************************************/
-// 6141 + 8526
+// https://issues.dlang.org/show_bug.cgi?id=6141
+// https://issues.dlang.org/show_bug.cgi?id=8526
void test6141()
{
@@ -6569,7 +6503,7 @@ void test161()
}
/***************************************************/
-// 7175
+// https://issues.dlang.org/show_bug.cgi?id=7175
void test7175()
{
@@ -6580,7 +6514,7 @@ void test7175()
}
/***************************************************/
-// 8819
+// https://issues.dlang.org/show_bug.cgi?id=8819
void test8819()
{
@@ -6603,7 +6537,7 @@ void test8819()
}
/***************************************************/
-// 8897
+// https://issues.dlang.org/show_bug.cgi?id=8897
class C8897
{
@@ -6614,7 +6548,7 @@ class C8897
template M8897 ( E ) { }
/***************************************************/
-// 8917
+// https://issues.dlang.org/show_bug.cgi?id=8917
void test8917()
{
@@ -6624,7 +6558,7 @@ void test8917()
}
/***************************************************/
-// 8945
+// https://issues.dlang.org/show_bug.cgi?id=8945
struct S8945 // or `class`, or `union`
{
@@ -6746,7 +6680,7 @@ struct X164()
/***************************************************/
-// 9428
+// https://issues.dlang.org/show_bug.cgi?id=9428
void test9428()
{
@@ -6783,7 +6717,7 @@ void test9428()
}
/***************************************************/
-// 9477
+// https://issues.dlang.org/show_bug.cgi?id=9477
template Tuple9477(T...) { alias T Tuple9477; }
template Select9477(bool b, T, U) { static if (b) alias T Select9477; else alias U Select9477; }
@@ -6793,14 +6727,14 @@ void test9477()
static bool isEq (T1, T2)(T1 s1, T2 s2) { return s1 == s2; }
static bool isNeq(T1, T2)(T1 s1, T2 s2) { return s1 != s2; }
- // Must be outside the loop due to http://d.puremagic.com/issues/show_bug.cgi?id=9748
+ // Must be outside the loop due to https://issues.dlang.org/show_bug.cgi?id=9748
int order;
- // Must be outside the loop due to http://d.puremagic.com/issues/show_bug.cgi?id=9756
+ // Must be outside the loop due to https://issues.dlang.org/show_bug.cgi?id=9756
auto checkOrder(bool dyn, uint expected)()
{
assert(order==expected);
order++;
- // Use temporary ("v") to work around http://d.puremagic.com/issues/show_bug.cgi?id=9402
+ // Use temporary ("v") to work around https://issues.dlang.org/show_bug.cgi?id=9402
auto v = cast(Select9477!(dyn, string, char[1]))"a";
return v;
}
@@ -6808,7 +6742,7 @@ void test9477()
foreach (b1; Tuple9477!(false, true))
foreach (b2; Tuple9477!(false, true))
{
- version (D_PIC) {} else // Work around http://d.puremagic.com/issues/show_bug.cgi?id=9754
+ version (D_PIC) {} else version (D_PIE) {} else // Work around https://issues.dlang.org/show_bug.cgi?id=9754
{
assert( isEq (cast(Select9477!(b1, string, char[0]))"" , cast(Select9477!(b2, string, char[0]))"" ));
assert(!isNeq(cast(Select9477!(b1, string, char[0]))"" , cast(Select9477!(b2, string, char[0]))"" ));
@@ -6853,7 +6787,7 @@ void test9477()
}
/***************************************************/
-// 9504
+// https://issues.dlang.org/show_bug.cgi?id=9504
struct Bar9504
{
@@ -6884,7 +6818,7 @@ Bar9504 test9504()
}
/***************************************************/
-// 9538
+// https://issues.dlang.org/show_bug.cgi?id=9538
void test9538()
{
@@ -6893,7 +6827,7 @@ void test9538()
}
/***************************************************/
-// 9539
+// https://issues.dlang.org/show_bug.cgi?id=9539
void test9539()
{
@@ -6911,7 +6845,7 @@ void test9539()
}
/***************************************************/
-// 9700
+// https://issues.dlang.org/show_bug.cgi?id=9700
mixin template Proxy9700(alias a)
{
@@ -6931,7 +6865,7 @@ void test9700()
}
/***************************************************/
-// 9834
+// https://issues.dlang.org/show_bug.cgi?id=9834
struct Event9834
{
@@ -6955,7 +6889,7 @@ void test9834()
}
/***************************************************/
-// 9859
+// https://issues.dlang.org/show_bug.cgi?id=9859
void test9859(inout int[] arr)
{
@@ -6999,7 +6933,7 @@ void test9859(inout int[] arr)
}
/***************************************************/
-// 9912
+// https://issues.dlang.org/show_bug.cgi?id=9912
template TypeTuple9912(Stuff...)
{
@@ -7021,7 +6955,7 @@ struct S9912
}
/***************************************************/
-// 9883
+// https://issues.dlang.org/show_bug.cgi?id=9883
struct S9883
{
@@ -7041,7 +6975,7 @@ void test9883()
/***************************************************/
-// 10091
+// https://issues.dlang.org/show_bug.cgi?id=10091
struct S10091
{
@@ -7064,7 +6998,7 @@ label:
}
/***************************************************/
-// 9130
+// https://issues.dlang.org/show_bug.cgi?id=9130
class S9130 { void bar() { } }
@@ -7078,7 +7012,7 @@ struct Function
@property void meta(alias m)()
{
static Function md;
- printf("length = %d\n", md.ai.length);
+ printf("length = %zd\n", md.ai.length);
printf("ptr = %p\n", md.ai.ptr);
md.ai[0] = 0;
}
@@ -7090,14 +7024,14 @@ void test9130()
}
/***************************************************/
-// 10390
+// https://issues.dlang.org/show_bug.cgi?id=10390
class C10390 { this() { this.c = this; } C10390 c; }
const c10390 = new C10390();
pragma(msg, c10390);
/***************************************************/
-// 10542
+// https://issues.dlang.org/show_bug.cgi?id=10542
class B10542
{
@@ -7114,7 +7048,7 @@ void test10542() nothrow pure @safe
}
/***************************************************/
-// 10539
+// https://issues.dlang.org/show_bug.cgi?id=10539
void test10539()
{
@@ -7193,7 +7127,7 @@ void test11075()
}
/***************************************************/
-// 11181
+// https://issues.dlang.org/show_bug.cgi?id=11181
void test11181()
{
@@ -7207,7 +7141,7 @@ void test11181()
}
/***************************************************/
-// 11317
+// https://issues.dlang.org/show_bug.cgi?id=11317
void test11317()
{
@@ -7217,13 +7151,13 @@ void test11317()
}
void test(ref uint x) {}
- static assert(!__traits(compiles, test(fun())));
+ static assert(__traits(compiles, test(fun())));
assert(fun() == 0);
}
/***************************************************/
-// 11888
+// https://issues.dlang.org/show_bug.cgi?id=11888
void test11888()
{
@@ -7248,7 +7182,7 @@ void test11888()
}
/***************************************************/
-// 12036
+// https://issues.dlang.org/show_bug.cgi?id=12036
template T12036(alias a)
{
@@ -7268,7 +7202,7 @@ void test12036()
}
/***************************************************/
-// 12153
+// https://issues.dlang.org/show_bug.cgi?id=12153
void test12153()
{
@@ -7284,7 +7218,7 @@ void test12153()
}
/***************************************************/
-// 12498
+// https://issues.dlang.org/show_bug.cgi?id=12498
string a12498()
{
@@ -7301,7 +7235,7 @@ void test12498()
}
/***************************************************/
-// 12900
+// https://issues.dlang.org/show_bug.cgi?id=12900
struct A12900
{
@@ -7316,7 +7250,22 @@ void test12900()
}
/***************************************************/
-// 12937
+// https://issues.dlang.org/show_bug.cgi?id=12929
+
+struct Foo12929
+{
+ union { }
+ int var;
+}
+
+struct Bar12929
+{
+ struct { }
+ int var;
+}
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=12937
void test12937()
{
@@ -7325,7 +7274,7 @@ void test12937()
}
/***************************************************/
-// 13154
+// https://issues.dlang.org/show_bug.cgi?id=13154
void test13154()
{
@@ -7341,7 +7290,7 @@ void test13154()
}
/***************************************************/
-// 13437
+// https://issues.dlang.org/show_bug.cgi?id=13437
ubyte[4] foo13437() { return [1,2,3,4]; }
@@ -7353,7 +7302,7 @@ void test13437()
}
/***************************************************/
-// 13472
+// https://issues.dlang.org/show_bug.cgi?id=13472
class A13472
{
@@ -7369,7 +7318,7 @@ void test13472()
}
/***************************************************/
-// 13476
+// https://issues.dlang.org/show_bug.cgi?id=13476
template ParameterTypeTuple13476(func...)
{
@@ -7416,16 +7365,16 @@ void test13476()
}
/***************************************************/
-// 14038
+// https://issues.dlang.org/show_bug.cgi?id=14038
static immutable ubyte[string] wordsAA14038;
-static this()
+shared static this()
{
wordsAA14038["zero"] = 0;
}
/***************************************************/
-// 14192
+// https://issues.dlang.org/show_bug.cgi?id=14192
void test14192()
{
@@ -7434,7 +7383,7 @@ void test14192()
}
/***************************************************/
-// 13720
+// https://issues.dlang.org/show_bug.cgi?id=13720
struct FracSec13720
{
@@ -7461,7 +7410,7 @@ void test13720()
}
/***************************************************/
-// 13952
+// https://issues.dlang.org/show_bug.cgi?id=13952
struct Reg13952
{
@@ -7507,7 +7456,7 @@ void test13952()
}
/***************************************************/
-// 14165
+// https://issues.dlang.org/show_bug.cgi?id=14165
class Foo14165
{
@@ -7516,7 +7465,7 @@ class Foo14165
}
/***************************************************/
-// 13985
+// https://issues.dlang.org/show_bug.cgi?id=13985
interface I13985
{
@@ -7552,7 +7501,7 @@ void test13985()
}
/***************************************************/
-// 14211
+// https://issues.dlang.org/show_bug.cgi?id=14211
extern(C++) // all derived classes won't have invariants
class B14211
@@ -7574,7 +7523,7 @@ void test14211()
}
/***************************************************/
-// 14552
+// https://issues.dlang.org/show_bug.cgi?id=14552
template map14552(fun...)
{
@@ -7608,7 +7557,7 @@ class Outer14552
}
/***************************************************/
-// 14853
+// https://issues.dlang.org/show_bug.cgi?id=14853
struct Queue14853(T)
{
@@ -7641,7 +7590,7 @@ void test14853()
}
/********************************************************/
-// 15045
+// https://issues.dlang.org/show_bug.cgi?id=15045
void test15045()
{
@@ -7700,7 +7649,7 @@ void test15045()
}
/***************************************************/
-// 15116
+// https://issues.dlang.org/show_bug.cgi?id=15116
alias TypeTuple15116(T...) = T;
@@ -7722,7 +7671,7 @@ void test15116()
}
/***************************************************/
-// 15117
+// https://issues.dlang.org/show_bug.cgi?id=15117
template Mix15117()
{
@@ -7737,7 +7686,7 @@ struct S15117
}
/***************************************************/
-// 15126
+// https://issues.dlang.org/show_bug.cgi?id=15126
struct Json15126
{
@@ -7754,7 +7703,7 @@ template isCustomSerializable15126(T)
alias bug15126 = isCustomSerializable15126!Json15126;
/***************************************************/
-// 15141
+// https://issues.dlang.org/show_bug.cgi?id=15141
class A15141
{
@@ -7772,7 +7721,7 @@ void test15141()
}
/***************************************************/
-// 15366
+// https://issues.dlang.org/show_bug.cgi?id=15366
enum E15366 : bool { A, B };
@@ -7791,7 +7740,7 @@ struct S15366
}
/***************************************************/
-// 15369
+// https://issues.dlang.org/show_bug.cgi?id=15369
struct MsgTable15369
{
@@ -7856,7 +7805,7 @@ void test15638()
}
/***************************************************/
-// 15961
+// https://issues.dlang.org/show_bug.cgi?id=15961
struct SliceOverIndexed15961(T)
{
@@ -7877,13 +7826,26 @@ struct Grapheme15961
}
/***************************************************/
-// 16022
+// https://issues.dlang.org/show_bug.cgi?id=16022
bool test16022()
{
enum Type { Colon, Comma }
Type type;
- return type == Type.Colon, type == Type.Comma;
+ return type == Type.Comma;
+}
+
+bool test16022_structs()
+{
+ struct A
+ {
+ int i;
+ string s;
+ }
+
+ enum Type { Colon = A(0, "zero"), Comma = A(1, "one") }
+ Type type;
+ return type == Type.Comma;
}
/***************************************************/
@@ -7918,7 +7880,7 @@ void test16466()
real r;
}
real r;
- printf("S.alignof: %x, r.alignof: %x\n", S.alignof, r.alignof);
+ printf("S.alignof: %zx, r.alignof: %zx\n", S.alignof, r.alignof);
assert(S.alignof == r.alignof);
}
@@ -7961,8 +7923,9 @@ void test17349()
{
static struct S
{
- int bar(void delegate(ref int*)) { return 1; }
- int bar(void delegate(ref const int*)) const { return 2; }
+ // Specify attribute inferred for dg1/dg2
+ int bar(void delegate(ref int*) pure nothrow @nogc @safe) { return 1; }
+ int bar(void delegate(ref const int*) pure nothrow @nogc @safe) const { return 2; }
}
void dg1(ref int*) { }
@@ -7991,13 +7954,30 @@ struct S17915(T)
T owner;
}
+void test18232()
+{
+ static struct Canary
+ {
+ int x = 0x900D_900D;
+ }
+ union U
+ {
+ Canary method()
+ {
+ Canary c;
+ return c;
+ }
+ }
+ U u;
+ assert(u.method() == Canary.init);
+}
+
/***************************************************/
int main()
{
test1();
test2();
- test3();
test4();
test5();
test6();
@@ -8214,7 +8194,7 @@ int main()
test6733();
test6813();
test6859();
- test3022();
+
test6910();
test6902();
test6330();
@@ -8312,6 +8292,7 @@ int main()
test16408();
test17349();
test17915();
+ test18232();
printf("Success\n");
return 0;
diff --git a/gcc/testsuite/gdc.test/runnable/xtest46_gc.d b/gcc/testsuite/gdc.test/runnable/xtest46_gc.d
new file mode 100644
index 0000000..14b82a0
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/xtest46_gc.d
@@ -0,0 +1,37 @@
+/*
+REQUIRED_ARGS: -lowmem -Jrunnable -preview=rvaluerefparam
+EXTRA_FILES: xtest46.d
+TEST_OUTPUT:
+---
+Boo!double
+Boo!int
+true
+int
+!! immutable(int)[]
+int(int i, long j = 7L)
+long
+C10390(C10390(<recursion>))
+tuple(height)
+tuple(get, get)
+tuple(clear)
+tuple(draw, draw)
+runnable/xtest46_gc.d-mixin-$n$(185): Deprecation: `opDot` is deprecated. Use `alias this`
+runnable/xtest46_gc.d-mixin-$n$(187): Deprecation: `opDot` is deprecated. Use `alias this`
+runnable/xtest46_gc.d-mixin-$n$(188): Deprecation: `opDot` is deprecated. Use `alias this`
+runnable/xtest46_gc.d-mixin-$n$(190): Deprecation: `opDot` is deprecated. Use `alias this`
+runnable/xtest46_gc.d-mixin-$n$(217): Deprecation: `opDot` is deprecated. Use `alias this`
+runnable/xtest46_gc.d-mixin-$n$(219): Deprecation: `opDot` is deprecated. Use `alias this`
+runnable/xtest46_gc.d-mixin-$n$(220): Deprecation: `opDot` is deprecated. Use `alias this`
+runnable/xtest46_gc.d-mixin-$n$(222): Deprecation: `opDot` is deprecated. Use `alias this`
+const(int)
+string[]
+double[]
+double[]
+{}
+tuple("m")
+true
+TFunction1: extern (C) void function()
+---
+*/
+
+mixin(import("xtest46.d"));
diff --git a/gcc/testsuite/gdc.test/runnable/xtest47.d b/gcc/testsuite/gdc.test/runnable/xtest47.d
new file mode 100644
index 0000000..42cabaf9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/xtest47.d
@@ -0,0 +1,67 @@
+// PERMUTE_ARGS: -unittest
+/* TEST_OUTPUT:
+---
+f
+toString
+toHash
+opCmp
+opEquals
+Monitor
+factory
+---
+*/
+
+import core.stdc.stdio;
+
+/***************************************************/
+
+void test3()
+{
+ version (unittest)
+ {
+ printf("unittest!\n");
+ }
+ else
+ {
+ printf("no unittest!\n");
+ }
+
+ version (assert)
+ {
+ printf("assert!\n");
+ }
+ else
+ {
+ printf("no assert!\n");
+ }
+}
+
+/***************************************************/
+// https://issues.dlang.org/show_bug.cgi?id=7983
+
+class A7983 {
+ void f() {
+ g7983(this);
+ }
+ unittest {
+ }
+}
+
+void g7983(T)(T a)
+{
+ foreach (name; __traits(allMembers, T)) {
+ pragma(msg, name);
+ static if (__traits(compiles, &__traits(getMember, a, name)))
+ {
+ }
+ }
+}
+
+/***************************************************/
+
+int main()
+{
+ test3();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/xtest55.d b/gcc/testsuite/gdc.test/runnable/xtest55.d
index 4b295d8..f976520 100644
--- a/gcc/testsuite/gdc.test/runnable/xtest55.d
+++ b/gcc/testsuite/gdc.test/runnable/xtest55.d
@@ -1,7 +1,6 @@
-// RUNNABLE_PHOBOS_TEST
// PERMUTE_ARGS:
-import core.memory, std.stdio;
+import core.memory, core.stdc.stdio;
Stuff* stuff1;
@@ -16,9 +15,9 @@ int main()
auto bar = new byte[1024 * 1024];
auto stuff2 = new Stuff;
stuff2.num = 2;
- writeln(stuff1, "\t", stuff2); // Same address.
+ printf("%p\t%p\n", stuff1, stuff2); // Same address.
assert(stuff1 != stuff2);
- writeln(stuff1.num, "\t", stuff2.num); // Both 2.
+ printf("%d\t%d\n", stuff1.num, stuff2.num); // Both 2.
assert(stuff1.num == 1);
return 0;
}
diff --git a/gcc/testsuite/gdc.test/runnable/xtestenum.d b/gcc/testsuite/gdc.test/runnable/xtestenum.d
index fa812a1..ce77782 100644
--- a/gcc/testsuite/gdc.test/runnable/xtestenum.d
+++ b/gcc/testsuite/gdc.test/runnable/xtestenum.d
@@ -1,4 +1,11 @@
-// PERMUTE_ARGS:
+/*
+PERMUTE_ARGS:
+RUN_OUTPUT:
+---
+foo
+Success
+---
+*/
extern(C) int printf(const char*, ...);
@@ -45,7 +52,7 @@ enum E3 : string
void test3()
{
- printf("%.*s\n", E3.E3a.length, E3.E3a.ptr);
+ printf("%.*s\n", cast(int)E3.E3a.length, E3.E3a.ptr);
assert(E3.E3a == "foo");
assert(E3.E3b == "bar");
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/abi_tags.d b/gcc/testsuite/gdc.test/runnable_cxx/abi_tags.d
new file mode 100644
index 0000000..80eead2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/abi_tags.d
@@ -0,0 +1,139 @@
+/*
+ * Test C++ abi-tag name mangling.
+ * They are a C++11 feature required to bind `std::string`,
+ * introduced in G++ 5.1 / clang++ 3.9
+ * https://issues.dlang.org/show_bug.cgi?id=19949
+ *
+ * DISABLED: win32 win64
+ * REQUIRED_ARGS: -extern-std=c++11
+ * EXTRA_CPP_SOURCES: abi_tags.cpp
+ * CXXFLAGS: -std=c++11
+ */
+
+#line 100
+import core.attribute;
+
+alias Tuple(A...) = A;
+enum foo_bar = gnuAbiTag("foo", "bar");
+
+extern(C++)
+{
+ @gnuAbiTag("tag1") struct Tagged1 {}
+ @gnuAbiTag("tag2") struct Tagged2 {}
+ @gnuAbiTag("tag1") struct Tagged1Too {}
+
+ // Note: Outer tags do not propagate, unlike in C++
+ @gnuAbiTag("tag1", "tag2") struct Tagged1_2
+ {
+ @gnuAbiTag("tag1", "tag2", "tag3") struct Tagged3
+ {
+ // _ZN9Tagged1_2B4tag1B4tag27Tagged3B4tag37Tagged4B4tag4Ev
+ @gnuAbiTag("tag1", "tag2", "tag3", "tag4") int Tagged4 ();
+
+ int value;
+ }
+ }
+
+ extern __gshared Tagged1_2 inst1;
+ extern __gshared Tagged1_2.Tagged3 inst2;
+
+ Tagged1_2 func0(int a);
+ Tagged1_2 func1(Tagged1_2 a);
+ Tagged1_2 func2(Tagged1 a);
+ Tagged1_2 func3(Tagged2 a);
+ Tagged1_2 func4(Tagged2 a, Tagged1 b);
+ Tagged1_2.Tagged3 func5(Tagged2 a, Tagged1 b);
+ void func6(Tagged2 a, Tagged2 b, Tagged1 c, Tagged1_2 d);
+ T func7(T)(T a, int);
+ void func8 (Tagged1, Tagged1Too);
+
+ @foo_bar struct S
+ {
+ int i;
+ }
+
+ @foo_bar extern __gshared int a;
+
+ extern __gshared S b;
+
+ @foo_bar int f();
+
+ S gs(int);
+ S gss(S, int);
+
+ @foo_bar S fss(S, int);
+
+ T gt(T)(int);
+ T gtt(T)(T, int);
+
+ @foo_bar T ft(T)(int);
+
+ @foo_bar T ftt(T)(T, int);
+
+ @("abc") extern(C++, "N")
+ {
+ @gnuAbiTag("AAA", "foo")
+ template K(int i)
+ {
+ @gnuAbiTag("bar", "AAA", "foo")
+ struct K
+ {
+ int i;
+ this(int);
+ }
+ }
+ }
+
+ //K!i fk(int i)(int);
+ K!1 fk1(int);
+
+ extern __gshared K!10 k10;
+
+ @gnuAbiTag("ENN") enum E0 { a = 0xa, }
+ E0 fe();
+ E0 fei(int i)();
+
+ void initVars();
+}
+
+void main()
+{
+ inst1 = func0(42);
+ assert(inst2.value == 42);
+ inst2 = func5(Tagged2.init, Tagged1.init);
+ assert(inst2.value == 420);
+ func1(inst1);
+ func2(Tagged1.init);
+ func3(Tagged2.init);
+ func4(Tagged2.init, Tagged1.init);
+
+ func6(Tagged2.init, Tagged2.init, Tagged1.init, Tagged1_2.init);
+ func7(Tagged1_2.init, 42);
+ func8(Tagged1.init, Tagged1Too.init);
+
+ initVars();
+ assert(a == 10);
+ assert(b.i == 20);
+ assert(k10.i == 30);
+
+ assert(f() == 0xf);
+ assert(gs(1).i == 1+0xe0);
+ assert(gss(S(1), 1).i == 2+0xe0);
+ assert(fss(S(1), 1).i == 2+0xf);
+ assert(gt!S(1).i == 1+0xe0);
+ assert(gtt!S(S(1), 1).i == 2+0xe0);
+
+ // Bug: Template parameter tags get double mangled
+ version(none)
+ {
+ assert(ft!S(1).i == 1+0xf); // GCC inconsistent
+ assert(ftt!S(S(1), 1).i == 2+0xf); // GCC inconsistent
+ }
+ //assert(fk!0(1).i == 1+0xf);
+ assert(fk1(1).i == 2+0xf);
+ version(gcc6)
+ {
+ assert(fei!0() == E0.a); // GCC only
+ assert(fe() == E0.a); // GCC only
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/cpp11.d b/gcc/testsuite/gdc.test/runnable_cxx/cpp11.d
new file mode 100644
index 0000000..6951dec
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/cpp11.d
@@ -0,0 +1,70 @@
+// DISABLED: win32
+// REQUIRED_ARGS: -extern-std=c++11
+// EXTRA_CPP_SOURCES: cpp11.cpp
+// CXXFLAGS(osx linux freebsd openbsd netbsd dragonflybsd solaris): -std=c++11
+
+// Disabled on win32 because the compiler is too old
+
+/****************************************/
+alias nullptr_t = typeof(null);
+
+// Only run on OSX/Win64 because the compilers are too old
+// and nullptr_t gets substituted
+version (FreeBSD)
+ version = IgnoreNullptrTest;
+version (linux)
+ version = IgnoreNullptrTest;
+
+version (IgnoreNullptrTest) { void test17() {} }
+else
+{
+ extern (C++) void testnull(nullptr_t);
+ extern (C++) void testnullnull(nullptr_t, nullptr_t);
+
+ void test17()
+ {
+ testnull(null);
+ testnullnull(null, null);
+ }
+}
+
+/****************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19658
+
+enum i8_19658 : byte { a }
+enum u8_19658 : ubyte { a }
+enum i16_19658 : short { a }
+enum u16_19658 : ushort { a }
+enum i32_19658 : int { a }
+enum u32_19658 : uint { a }
+enum i64_19658 : long { a }
+enum u64_19658 : ulong { a }
+
+extern(C++) void test19658_i8(i8_19658);
+extern(C++) void test19658_u8(u8_19658);
+extern(C++) void test19658_i16(i16_19658);
+extern(C++) void test19658_u16(u16_19658);
+extern(C++) void test19658_i32(i32_19658);
+extern(C++) void test19658_u32(u32_19658);
+extern(C++) void test19658_i64(i64_19658);
+extern(C++) void test19658_u64(u64_19658);
+
+void test19658()
+{
+ test19658_i8(i8_19658.a);
+ test19658_u8(u8_19658.a);
+ test19658_i16(i16_19658.a);
+ test19658_u16(u16_19658.a);
+ test19658_i32(i32_19658.a);
+ test19658_u32(u32_19658.a);
+ test19658_i64(i64_19658.a);
+ test19658_u64(u64_19658.a);
+}
+
+/****************************************/
+
+void main()
+{
+ test17();
+ test19658();
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/cpp_abi_tests.d b/gcc/testsuite/gdc.test/runnable_cxx/cpp_abi_tests.d
index 83e1cff..c677d6e 100644
--- a/gcc/testsuite/gdc.test/runnable_cxx/cpp_abi_tests.d
+++ b/gcc/testsuite/gdc.test/runnable_cxx/cpp_abi_tests.d
@@ -1,4 +1,14 @@
// EXTRA_CPP_SOURCES: cpp_abi_tests.cpp
+// CXXFLAGS(linux freebsd osx netbsd dragonflybsd): -std=c++11
+
+// N.B MSVC doesn't have a C++11 switch, but it defaults to the latest fully-supported standard
+// N.B MSVC 2013 doesn't support char16_t/char32_t
+
+version(Posix)
+ enum __c_wchar_t : dchar;
+else version(Windows)
+ enum __c_wchar_t : wchar;
+alias wchar_t = __c_wchar_t;
extern(C++) {
@@ -7,11 +17,43 @@ struct S
float a = 1;
}
+struct S18784
+{
+ int i;
+ this(int);
+}
+
+extern(C++, std)
+{
+ struct test19248_ {int a = 42;}
+}
+extern(C++, `std`)
+{
+ struct test19248 {int a = 34;}
+}
+
+struct Sdtor
+{
+ extern __gshared int counter;
+ ~this();
+}
+void consume(Sdtor);
+void consume2(Sdtor value){}
+void doConsume2(ref Sdtor);
+
+struct SPack(Args...)
+{
+ int i;
+}
+alias SInt = SPack!int;
+
bool passthrough(bool value);
byte passthrough(byte value);
ubyte passthrough(ubyte value);
char passthrough(char value);
+wchar passthrough(wchar value);
dchar passthrough(dchar value);
+wchar_t passthrough(wchar_t value);
short passthrough(short value);
ushort passthrough(ushort value);
int passthrough(int value);
@@ -21,12 +63,17 @@ ulong passthrough(ulong value);
float passthrough(float value);
double passthrough(double value);
S passthrough(S value);
+test19248 passthrough(const(test19248) value);
+std.test19248_ passthrough(const(std.test19248_) value);
+SInt passthrough(SInt value);
bool passthrough_ptr(bool *value);
byte passthrough_ptr(byte *value);
ubyte passthrough_ptr(ubyte *value);
char passthrough_ptr(char *value);
+wchar passthrough_ptr(wchar *value);
dchar passthrough_ptr(dchar *value);
+wchar_t passthrough_ptr(wchar_t *value);
short passthrough_ptr(short *value);
ushort passthrough_ptr(ushort *value);
int passthrough_ptr(int *value);
@@ -36,12 +83,17 @@ ulong passthrough_ptr(ulong *value);
float passthrough_ptr(float *value);
double passthrough_ptr(double *value);
S passthrough_ptr(S *value);
+test19248 passthrough_ptr(const(test19248)* value);
+std.test19248_ passthrough_ptr(const(std.test19248_)* value);
+SInt passthrough_ptr(SInt *value);
bool passthrough_ref(ref bool value);
byte passthrough_ref(ref byte value);
ubyte passthrough_ref(ref ubyte value);
char passthrough_ref(ref char value);
+wchar passthrough_ref(ref wchar value);
dchar passthrough_ref(ref dchar value);
+wchar_t passthrough_ref(ref wchar_t value);
short passthrough_ref(ref short value);
ushort passthrough_ref(ref ushort value);
int passthrough_ref(ref int value);
@@ -51,6 +103,9 @@ ulong passthrough_ref(ref ulong value);
float passthrough_ref(ref float value);
double passthrough_ref(ref double value);
S passthrough_ref(ref S value);
+test19248 passthrough_ref(ref const(test19248) value);
+std.test19248_ passthrough_ref(ref const(std.test19248_) value);
+SInt passthrough_ref(ref SInt value);
}
template IsSigned(T)
@@ -86,7 +141,7 @@ template IsBoolean(T)
template IsSomeChar(T)
{
- enum IsSomeChar = is(T==char) || is(T==dchar);
+ enum IsSomeChar = is(T==char) || is(T==wchar) || is(T==dchar) || is(T==wchar_t);
}
void check(T)(T actual, T expected)
@@ -138,13 +193,50 @@ T[] values(T)()
return values;
}
+extern(C++, `ns1`)
+ {
+ // C++: `const char*, const char**`
+ int constFunction1(const(char)*, const(char)**);
+ // C++: `const char*, const char* const*`
+ int constFunction2(const(char)*, const(char*)*);
+ // C++: `const char* const, const char* const* const*`
+ int constFunction3(const(char*), const(char**)*);
+ // C++: `const char* const, const char* const* const* const`
+ int constFunction4(const(char*), const(char***));
+}
+
+extern(C++)
+{
+ struct SmallStruct
+ {
+ int i;
+ this(int i) { this.i = i; }
+ this(ref const SmallStruct); // implemented in C++
+ }
+ void smallStructTest(SmallStruct p);
+ void smallStructCallBack(SmallStruct p)
+ {
+ assert(p.i == 62);
+ }
+}
+
void main()
{
foreach(bool val; values!bool()) check(val);
foreach(byte val; values!byte()) check(val);
foreach(ubyte val; values!ubyte()) check(val);
foreach(char val; values!char()) check(val);
+version(CppRuntime_DigitalMars){} else
+version(CppRuntime_Microsoft)
+{
+// TODO: figure out how to detect VS2013 which doesn't support char16_t/char32_t
+}
+else
+{
+ foreach(wchar val; values!wchar()) check(val);
foreach(dchar val; values!dchar()) check(val);
+}
+ foreach(wchar_t val; values!wchar_t()) check(val);
foreach(short val; values!short()) check(val);
foreach(ushort val; values!ushort()) check(val);
foreach(int val; values!int()) check(val);
@@ -154,4 +246,26 @@ void main()
foreach(float val; values!float()) check(val);
foreach(double val; values!double()) check(val);
check(S());
+ check(test19248());
+ check(std.test19248_());
+ check(SInt());
+
+ assert(constFunction1(null, null) == 1);
+ assert(constFunction2(null, null) == 2);
+ assert(constFunction3(null, null) == 3);
+ assert(constFunction4(null, null) == 42);
+
+ auto ss = SmallStruct(42);
+ smallStructTest(ss);
+ assert(ss.i == 42);
+ assert(S18784(1).i == 1);
+
+ {
+ Sdtor sd;
+ assert(Sdtor.counter == 0);
+ consume(sd);
+ assert(Sdtor.counter == 1);
+ doConsume2(sd);
+ assert(Sdtor.counter == 2);
+ }
}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/cpp_stdlib.d b/gcc/testsuite/gdc.test/runnable_cxx/cpp_stdlib.d
new file mode 100644
index 0000000..dd7bb11
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/cpp_stdlib.d
@@ -0,0 +1,58 @@
+// DISABLED: win32 win64
+// EXTRA_CPP_SOURCES: cpp_stdlib.cpp
+// CXXFLAGS(osx linux freebsd openbsd netbsd dragonflybsd solaris): -std=c++11
+import core.stdc.stdio;
+
+// Disabled on windows because it needs bindings
+
+version (CppRuntime_Clang)
+{
+ extern(C++, `std`, `__1`)
+ {
+ struct allocator(T);
+ struct vector (T, A = allocator!T);
+ struct array (T, size_t N);
+ }
+}
+else
+{
+ extern(C++, `std`)
+ {
+ struct allocator(T);
+ struct vector (T, A = allocator!T);
+ struct array (T, size_t N);
+ }
+}
+
+extern(C++):
+
+ref T identity (T) (ref T v);
+T** identityPP (T) (T** v);
+vector!T* getVector (T) (size_t length, const T* ptr);
+array!(T, N)* getArray(T, size_t N) (const T* ptr);
+
+void main ()
+{
+ int i = 42;
+ float f = 21.0f;
+
+ int* pi = &i;
+ float* pf = &f;
+
+ assert(42 == identity(i));
+ assert(21.0f == identity(f));
+ assert(&pi == identityPP(&pi));
+ assert(&pf == identityPP(&pf));
+
+ auto vi = getVector(1, &i);
+ auto vf = getVector(3, [f, f, f].ptr);
+ assert(vi !is null);
+ assert(vf !is null);
+
+ auto ai = getArray!(int, 4)([2012, 10, 11, 42].ptr);
+ auto af = getArray!(float, 4)([42.0f, 21.0f, 14.0f, 1957.0f].ptr);
+ assert(ai !is null);
+ assert(af !is null);
+
+ printf("Success\n");
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/cppa.d b/gcc/testsuite/gdc.test/runnable_cxx/cppa.d
index cb576ba..c60d6c6 100644
--- a/gcc/testsuite/gdc.test/runnable_cxx/cppa.d
+++ b/gcc/testsuite/gdc.test/runnable_cxx/cppa.d
@@ -1,9 +1,18 @@
// PERMUTE_ARGS: -g
// EXTRA_CPP_SOURCES: cppb.cpp
+// EXTRA_FILES: extra-files/cppb.h
+// CXXFLAGS(linux freebsd osx netbsd dragonflybsd): -std=c++11
+// druntime isn't linked, this prevents missing symbols '_d_arraybounds_slicep':
+// REQUIRED_ARGS: -checkaction=C
+// Filter a spurious warning on Semaphore:
+// TRANSFORM_OUTPUT: remove_lines("warning: relocation refers to discarded section")
+
+// N.B MSVC doesn't have a C++11 switch, but it defaults to the latest fully-supported standard
import core.stdc.stdio;
import core.stdc.stdarg;
import core.stdc.config;
+import core.stdc.stdint;
extern (C++)
int foob(int i, int j, int k);
@@ -152,7 +161,7 @@ extern (C) int foosize6();
void test6()
{
S6 f = foo6();
- printf("%d %d\n", foosize6(), S6.sizeof);
+ printf("%d %zd\n", foosize6(), S6.sizeof);
assert(foosize6() == S6.sizeof);
version (X86)
{
@@ -176,7 +185,7 @@ struct S
void test7()
{
- printf("%d %d\n", foo7(), S.sizeof);
+ printf("%d %zd\n", foo7(), S.sizeof);
assert(foo7() == S.sizeof);
}
@@ -191,7 +200,7 @@ void test8()
}
/****************************************/
-// 4059
+// https://issues.dlang.org/show_bug.cgi?id=4059
struct elem9 { }
@@ -249,14 +258,7 @@ extern(C++) void check13956(S13956 arg0, int arg1, int arg2, int arg3, int arg4,
assert(arg3 == 3);
assert(arg4 == 4);
assert(arg5 == 5);
- version (OSX)
- {
- version (D_LP64)
- assert(arg6 == 6);
- // fails on OSX 32-bit
- }
- else
- assert(arg6 == 6);
+ assert(arg6 == 6);
}
void test13956()
@@ -265,7 +267,7 @@ void test13956()
}
/****************************************/
-// 5148
+// https://issues.dlang.org/show_bug.cgi?id=5148
extern (C++)
{
@@ -342,7 +344,7 @@ void testvalist()
}
/****************************************/
-// 12825
+// https://issues.dlang.org/show_bug.cgi?id=12825
extern(C++) class C12825
{
@@ -440,44 +442,70 @@ void test13161()
version (linux)
{
- extern(C++, __gnu_cxx)
+ static if (__traits(getTargetInfo, "cppStd") < 201703)
{
- struct new_allocator(T)
+ // See note on std::allocator below.
+ extern(C++, __gnu_cxx)
{
- alias size_type = size_t;
- static if (is(T : char))
- void deallocate(T*, size_type) { }
- else
- void deallocate(T*, size_type);
+ struct new_allocator(T)
+ {
+ alias size_type = size_t;
+ static if (is(T : char))
+ void deallocate(T*, size_type) { }
+ else
+ void deallocate(T*, size_type);
+ }
}
}
}
extern (C++, std)
{
- struct allocator(T)
+ version (linux)
+ {
+ static if (__traits(getTargetInfo, "cppStd") >= 201703)
+ {
+ // std::allocator no longer derives from __gnu_cxx::new_allocator,
+ // it derives from std::__new_allocator instead.
+ struct __new_allocator(T)
+ {
+ alias size_type = size_t;
+ static if (is(T : char))
+ void deallocate(T*, size_type) { }
+ else
+ void deallocate(T*, size_type);
+ }
+ }
+ }
+
+ extern (C++, class) struct allocator(T)
{
version (linux)
{
alias size_type = size_t;
void deallocate(T* p, size_type sz)
- { (cast(__gnu_cxx.new_allocator!T*)&this).deallocate(p, sz); }
+ {
+ static if (__traits(getTargetInfo, "cppStd") >= 201703)
+ (cast(std.__new_allocator!T*)&this).deallocate(p, sz);
+ else
+ (cast(__gnu_cxx.new_allocator!T*)&this).deallocate(p, sz);
+ }
}
}
- version (linux)
+ class vector(T, A = allocator!T)
{
- class vector(T, A = allocator!T)
- {
- final void push_back(ref const T);
- }
+ final void push_back(ref const T);
+ }
- struct char_traits(T)
- {
- }
+ struct char_traits(T)
+ {
+ }
+ version (CppRuntime_Gcc)
+ {
// https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
- version (none)
+ static if (__traits(getTargetInfo, "cppStd") >= 201103)
{
extern (C++, __cxx11)
{
@@ -488,27 +516,33 @@ extern (C++, std)
}
else
{
- struct basic_string(T, C = char_traits!T, A = allocator!T)
+ extern (C++, class) struct basic_string(T, C = char_traits!T, A = allocator!T)
{
}
}
-
- struct basic_istream(T, C = char_traits!T)
+ }
+ else
+ {
+ extern (C++, class) struct basic_string(T, C = char_traits!T, A = allocator!T)
{
}
+ }
- struct basic_ostream(T, C = char_traits!T)
- {
- }
+ struct basic_istream(T, C = char_traits!T)
+ {
+ }
- struct basic_iostream(T, C = char_traits!T)
- {
- }
+ struct basic_ostream(T, C = char_traits!T)
+ {
+ }
+
+ struct basic_iostream(T, C = char_traits!T)
+ {
}
class exception { }
- // 14956
+ // https://issues.dlang.org/show_bug.cgi?id=14956
extern(C++, N14956)
{
struct S14956 { }
@@ -584,8 +618,10 @@ extern(C++)
{
bool f13289_cpp_test();
+
wchar_t f13289_cpp_wchar_t(wchar_t);
+
wchar f13289_d_wchar(wchar ch)
{
if (ch <= 'z' && ch >= 'a')
@@ -681,6 +717,7 @@ void test16()
{
mylong ld = 5;
ld = testl(ld);
+ printf("ld = %lld, mylong.sizeof = %lld\n", cast(long)ld, cast(long)mylong.sizeof);
assert(ld == 5 + mylong.sizeof);
}
{
@@ -694,13 +731,16 @@ void test16()
static assert(__c_long.max == long.max);
static assert(__c_long.min == long.min);
static assert(__c_long.init == long.init);
+
static assert(__c_ulong.max == ulong.max);
static assert(__c_ulong.min == ulong.min);
static assert(__c_ulong.init == ulong.init);
+
__c_long cl = 0;
cl = cl + 1;
long l = cl;
cl = l;
+
__c_ulong cul = 0;
cul = cul + 1;
ulong ul = cul;
@@ -711,13 +751,16 @@ void test16()
static assert(__c_long.max == int.max);
static assert(__c_long.min == int.min);
static assert(__c_long.init == int.init);
+
static assert(__c_ulong.max == uint.max);
static assert(__c_ulong.min == uint.min);
static assert(__c_ulong.init == uint.init);
+
__c_long cl = 0;
cl = cl + 1;
int i = cl;
cl = i;
+
__c_ulong cul = 0;
cul = cul + 1;
uint u = cul;
@@ -767,7 +810,7 @@ extern(C++, N13337.M13337)
}
/****************************************/
-// 14195
+// https://issues.dlang.org/show_bug.cgi?id=14195
struct Delegate1(T) {}
struct Delegate2(T1, T2) {}
@@ -793,7 +836,7 @@ void test14195()
/****************************************/
-// 14200
+// https://issues.dlang.org/show_bug.cgi?id=14200
template Tuple14200(T...)
{
@@ -810,7 +853,7 @@ void test14200()
}
/****************************************/
-// 14956
+// https://issues.dlang.org/show_bug.cgi?id=14956
extern(C++) void test14956(S14956 s);
@@ -869,13 +912,13 @@ void testVtable()
/****************************************/
/* problems detected by fuzzer */
-extern(C++) void fuzz1_cppvararg(long arg10, long arg11, bool arg12);
-extern(C++) void fuzz1_dvararg(long arg10, long arg11, bool arg12)
+extern(C++) void fuzz1_cppvararg(int64_t arg10, int64_t arg11, bool arg12);
+extern(C++) void fuzz1_dvararg(int64_t arg10, int64_t arg11, bool arg12)
{
fuzz1_checkValues(arg10, arg11, arg12);
}
-extern(C++) void fuzz1_checkValues(long arg10, long arg11, bool arg12)
+extern(C++) void fuzz1_checkValues(int64_t arg10, int64_t arg11, bool arg12)
{
assert(arg10 == 103);
assert(arg11 == 104);
@@ -892,13 +935,13 @@ void fuzz1()
}
////////
-extern(C++) void fuzz2_cppvararg(ulong arg10, ulong arg11, bool arg12);
-extern(C++) void fuzz2_dvararg(ulong arg10, ulong arg11, bool arg12)
+extern(C++) void fuzz2_cppvararg(uint64_t arg10, uint64_t arg11, bool arg12);
+extern(C++) void fuzz2_dvararg(uint64_t arg10, uint64_t arg11, bool arg12)
{
fuzz2_checkValues(arg10, arg11, arg12);
}
-extern(C++) void fuzz2_checkValues(ulong arg10, ulong arg11, bool arg12)
+extern(C++) void fuzz2_checkValues(uint64_t arg10, uint64_t arg11, bool arg12)
{
assert(arg10 == 103);
assert(arg11 == 104);
@@ -915,13 +958,22 @@ void fuzz2()
}
////////
-extern(C++) void fuzz3_cppvararg(wchar arg10, wchar arg11, bool arg12);
-extern(C++) void fuzz3_dvararg(wchar arg10, wchar arg11, bool arg12)
+version(CppRuntime_DigitalMars)
+ enum UNICODE = false;
+else version(CppRuntime_Microsoft)
+ enum UNICODE = false; //VS2013 doesn't support them
+else
+ enum UNICODE = true;
+
+static if (UNICODE)
+{
+extern(C++) void fuzz3_cppvararg(wchar arg10, dchar arg11, bool arg12);
+extern(C++) void fuzz3_dvararg(wchar arg10, dchar arg11, bool arg12)
{
fuzz2_checkValues(arg10, arg11, arg12);
}
-extern(C++) void fuzz3_checkValues(wchar arg10, wchar arg11, bool arg12)
+extern(C++) void fuzz3_checkValues(wchar arg10, dchar arg11, bool arg12)
{
assert(arg10 == 103);
assert(arg11 == 104);
@@ -931,17 +983,18 @@ extern(C++) void fuzz3_checkValues(wchar arg10, wchar arg11, bool arg12)
void fuzz3()
{
wchar arg10 = 103;
- wchar arg11 = 104;
+ dchar arg11 = 104;
bool arg12 = false;
fuzz3_dvararg(arg10, arg11, arg12);
fuzz3_cppvararg(arg10, arg11, arg12);
}
+}
void fuzz()
{
fuzz1();
fuzz2();
- fuzz3();
+ static if (UNICODE) fuzz3();
}
/****************************************/
@@ -1038,7 +1091,7 @@ void testeh3()
}
/****************************************/
-// 15576
+// https://issues.dlang.org/show_bug.cgi?id=15576
extern (C++, ns15576)
{
@@ -1056,7 +1109,7 @@ void test15576()
}
/****************************************/
-// 15579
+// https://issues.dlang.org/show_bug.cgi?id=15579
extern (C++)
{
@@ -1138,7 +1191,7 @@ void test15579()
}
/****************************************/
-// 15610
+// https://issues.dlang.org/show_bug.cgi?id=15610
extern(C++) class Base2
{
@@ -1164,7 +1217,7 @@ void test15610()
}
/******************************************/
-// 15455
+// https://issues.dlang.org/show_bug.cgi?id=15455
struct X6
{
@@ -1209,9 +1262,9 @@ void test15455()
}
/****************************************/
-// 15372
+// https://issues.dlang.org/show_bug.cgi?id=15372
-extern(C++) int foo15372(T)(T v);
+extern(C++) int foo15372(T)(int v);
void test15372()
{
@@ -1221,7 +1274,7 @@ void test15372()
}
/****************************************/
-// 15802
+// https://issues.dlang.org/show_bug.cgi?id=15802
extern(C++) {
template Foo15802(T) {
@@ -1237,9 +1290,10 @@ void test15802()
}
/****************************************/
-// 16536 - mangling mismatch on OSX
+// https://issues.dlang.org/show_bug.cgi?id=16536
+// mangling mismatch on OSX
-version(OSX) extern(C++) ulong pass16536(ulong);
+version(OSX) extern(C++) uint64_t pass16536(uint64_t);
void test16536()
{
@@ -1247,6 +1301,347 @@ void test16536()
}
/****************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15589
+// extern(C++) virtual destructors are not put in vtbl[]
+
+extern(C++)
+{
+ class A15589
+ {
+ extern(D) static int[] dtorSeq;
+ struct S
+ {
+ this(int x) { this.x = x; }
+ ~this() { dtorSeq ~= x; }
+ int x;
+ }
+ int foo() { return 100; } // shift dtor to slot 1
+ ~this() { dtorSeq ~= 10; }
+ S s1 = S(1);
+ S s2 = S(2);
+ }
+ class B15589 : A15589
+ {
+ int bar() { return 200;} // add an additional function AFTER the dtor at slot 2
+ ~this() { dtorSeq ~= 20; }
+ S s3 = S(3);
+ }
+
+ void test15589b(A15589 p);
+}
+
+void test15589()
+{
+ A15589 c = new B15589;
+ assert(A15589.dtorSeq == null);
+ assert(c.foo() == 100);
+ assert((cast(B15589)c).bar() == 200);
+ c.__xdtor(); // virtual dtor call
+ assert(A15589.dtorSeq[] == [ 20, 3, 10, 2, 1 ]); // destroyed full hierarchy!
+
+ A15589.dtorSeq = null;
+ test15589b(c);
+ assert(A15589.dtorSeq[] == [ 20, 3, 10, 2, 1 ]); // destroyed full hierarchy!
+}
+
+extern(C++)
+{
+ class Cpp15589Base
+ {
+ public:
+ final ~this();
+
+ void nonVirtual();
+ int a;
+ }
+
+ class Cpp15589Derived : Cpp15589Base
+ {
+ public:
+ this();
+ final ~this();
+ int b;
+ }
+
+ class Cpp15589BaseVirtual
+ {
+ public:
+ void beforeDtor();
+
+ this();
+ ~this();
+
+ void afterDtor();
+ int c = 1;
+ }
+
+ class Cpp15589DerivedVirtual : Cpp15589BaseVirtual
+ {
+ public:
+ this();
+ ~this();
+
+ override void afterDtor();
+
+ int d;
+ }
+
+ class Cpp15589IntroducingVirtual : Cpp15589Base
+ {
+ public:
+ this();
+ void beforeIntroducedVirtual();
+ ~this();
+ void afterIntroducedVirtual(int);
+
+ int e;
+ }
+
+ struct Cpp15589Struct
+ {
+ ~this();
+ int s;
+ }
+
+ void trace15589(int ch)
+ {
+ traceBuf[traceBufPos++] = cast(char) ch;
+ }
+}
+
+__gshared char[32] traceBuf;
+__gshared size_t traceBufPos;
+
+// workaround for https://issues.dlang.org/show_bug.cgi?id=18986
+version(OSX)
+ enum cppCtorReturnsThis = false;
+else version(FreeBSD)
+ enum cppCtorReturnsThis = false;
+else
+ enum cppCtorReturnsThis = true;
+
+mixin template scopeAllocCpp(C)
+{
+ static if (cppCtorReturnsThis)
+ scope C ptr = new C;
+ else
+ {
+ ubyte[__traits(classInstanceSize, C)] data;
+ C ptr = (){ auto p = cast(C) data.ptr; p.__ctor(); return p; }();
+ }
+}
+
+void test15589b()
+{
+ traceBufPos = 0;
+ {
+ Cpp15589Struct struc = Cpp15589Struct();
+ mixin scopeAllocCpp!Cpp15589Derived derived;
+ mixin scopeAllocCpp!Cpp15589DerivedVirtual derivedVirtual;
+ mixin scopeAllocCpp!Cpp15589IntroducingVirtual introducingVirtual;
+
+ // `scope` instances are destroyed automatically
+ static if (!cppCtorReturnsThis)
+ {
+ introducingVirtual.ptr.destroy();
+ derivedVirtual.ptr.destroy();
+ derived.ptr.destroy();
+ }
+ }
+ printf("traceBuf15589 %.*s\n", cast(int)traceBufPos, traceBuf.ptr);
+ assert(traceBuf[0..traceBufPos] == "IbVvBbs");
+}
+
+/****************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=18928
+// Win64: extern(C++) bad codegen, wrong calling convention
+
+extern(C++) struct Small18928
+{
+ int x;
+}
+
+extern(C++) class CC18928
+{
+ Small18928 getVirtual(); // { return S(3); }
+ final Small18928 getFinal(); // { return S(4); }
+ static Small18928 getStatic(); // { return S(5); }
+}
+
+extern(C++) CC18928 newCC18928();
+
+void test18928()
+{
+ auto cc = newCC18928();
+ Small18928 v = cc.getVirtual();
+ assert(v.x == 3);
+ Small18928 f = cc.getFinal();
+ assert(f.x == 4);
+ Small18928 s = cc.getStatic();
+ assert(s.x == 5);
+}
+
+/****************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18953
+// Win32: extern(C++) struct destructor not called correctly through runtime
+
+extern(C++)
+struct S18953
+{
+ char x;
+ ~this() nothrow @nogc { traceBuf[traceBufPos++] = x; }
+}
+
+void test18953()
+{
+ traceBufPos = 0;
+ S18953[] arr = new S18953[3];
+ arr[1].x = '1';
+ arr[2].x = '2';
+ arr.length = 1;
+ assumeSafeAppend(arr); // destroys arr[1] and arr[2]
+ printf("traceBuf18953 %.*s\n", cast(int)traceBufPos, traceBuf.ptr);
+ assert(traceBuf[0..traceBufPos] == "21");
+}
+
+/****************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=18966
+
+extern(C++):
+class Base18966
+{
+ this() @safe nothrow;
+ ~this() @safe;
+ void vf();
+ int x;
+}
+
+class Derived18966 : Base18966
+{
+ override void vf() { x = 200; }
+}
+
+class Explicit18966 : Base18966
+{
+ this() @safe { super(); }
+ override void vf() { x = 250; }
+}
+
+class Implicit18966 : Base18966
+{
+ this() nothrow {}
+ override void vf() { x = 300; }
+}
+
+// test vptr in full ctor chain of mixed D/C++ class hierarchies
+
+// TODO: Make this a D class and let C++ derive from it. This works on Windows,
+// but results in linker errors on Posix due to extra base ctor (`C2`
+// mangling) being called by the B ctor.
+class A18966 // in C++
+{
+ char[8] calledOverloads = 0;
+ int i;
+ this();
+ void foo();
+}
+
+class B18966 : A18966 // in C++
+{
+ this();
+ override void foo();
+}
+
+class C18966 : B18966
+{
+ this() { foo(); }
+ override void foo() { calledOverloads[i++] = 'C'; }
+}
+
+class D18966 : C18966
+{
+ this() { foo(); }
+ override void foo() { calledOverloads[i++] = 'D'; }
+}
+
+void test18966()
+{
+ Derived18966 d = new Derived18966;
+ assert(d.x == 10);
+ d.vf();
+ assert(d.x == 200);
+
+ Explicit18966 e = new Explicit18966;
+ assert(e.x == 10);
+ e.vf();
+ assert(e.x == 250);
+
+ Implicit18966 i = new Implicit18966;
+ assert(i.x == 10);
+ i.vf();
+ assert(i.x == 300);
+
+ // TODO: Allocating + constructing a C++ class with the D GC is not
+ // supported on Posix. The returned pointer (probably from C++ ctor)
+ // seems to be an offset and not the actual object address.
+ version (Windows)
+ {
+ auto a = new A18966;
+ assert(a.calledOverloads[0..2] == "A\0");
+
+ auto b = new B18966;
+ assert(b.calledOverloads[0..3] == "AB\0");
+ }
+
+ auto c = new C18966;
+ assert(c.calledOverloads[0..4] == "ABC\0");
+
+ auto d2 = new D18966;
+ // note: the vptr semantics in ctors of extern(C++) classes may be revised (to "ABCD")
+ assert(d2.calledOverloads[0..5] == "ABDD\0");
+}
+
+/****************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=19134
+
+class Base19134
+{
+ int a = 123;
+ this() { a += 42; }
+ int foo() const { return a; }
+}
+
+class Derived19134 : Base19134
+{
+ int b = 666;
+ this()
+ {
+ a *= 2;
+ b -= 6;
+ }
+ override int foo() const { return b; }
+}
+
+void test19134()
+{
+ static const d = new Derived19134;
+ assert(d.a == (123 + 42) * 2);
+ assert(d.b == 666 - 6);
+ assert(d.foo() == 660);
+}
+
+// https://issues.dlang.org/show_bug.cgi?id=18955
+alias std_string = std.basic_string!(char);
+
+extern(C++) void callback18955(ref const(std_string) str)
+{
+}
+extern(C++) void test18955();
+
+/****************************************/
void main()
{
@@ -1290,6 +1685,13 @@ void main()
test15372();
test15802();
test16536();
+ test15589();
+ test15589b();
+ test18928();
+ test18953();
+ test18966();
+ test19134();
+ test18955();
printf("Success\n");
}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/externmangle.d b/gcc/testsuite/gdc.test/runnable_cxx/externmangle.d
index 9099f94..ef132dc 100644
--- a/gcc/testsuite/gdc.test/runnable_cxx/externmangle.d
+++ b/gcc/testsuite/gdc.test/runnable_cxx/externmangle.d
@@ -1,4 +1,8 @@
// EXTRA_CPP_SOURCES: externmangle.cpp
+// REQUIRED_ARGS: -extern-std=c++11
+
+import core.stdc.config;
+import core.stdc.stdint;
extern(C++):
@@ -122,7 +126,16 @@ interface Module
public static int dim(Array!Module*);
};
-ulong testlongmangle(int a, uint b, long c, ulong d);
+uint64_t testlongmangle(int a, uint b, int64_t c, uint64_t d);
+cpp_ulong testCppLongMangle(cpp_long a, cpp_ulong b);
+cpp_ulonglong testCppLongLongMangle(cpp_longlong a, cpp_ulonglong b);
+
+// direct size_t/ptrdiff_t interop is fine except on 32-bit OS X
+version (OSX) { version (D_LP64) {} else version = OSX_32; }
+version (OSX_32)
+ cpp_size_t testCppSizeTMangle(cpp_ptrdiff_t a, cpp_size_t b);
+else
+ size_t testCppSizeTMangle(ptrdiff_t a, size_t b);
__gshared extern int[2][2][2] test31;
__gshared extern int* test32;
@@ -224,6 +237,40 @@ void test39()
assert(result == 0);
}
+extern(C++, "foo", "bar", "baz") int doStuff(int);
+
+version(CppRuntime_DigitalMars) // DMC doesn't support c++11
+{
+ void test40() {}
+ void test41() {}
+}
+else
+{
+ void test40();
+
+ void foovargs(T...)(T args)
+ {
+ static if (is(T[0] == char*))
+ {
+ assert(*args[0] == 'a');
+ }
+ else
+ {
+ float ret = args[0] + args[1];
+ assert(ret == 3.0f);
+ }
+ }
+
+ alias FooVargs = foovargs!(int, float);
+ alias FooVargs2 = foovargs!(char*);
+
+ void test41();
+ void make_shared_poc(T, Args...)(ref Args args)
+ {
+ assert(args[0] + args[1] == 3);
+ }
+ alias Make_Shared_Poc = make_shared_poc!(int, int, int);
+}
void main()
{
@@ -280,6 +327,9 @@ void main()
assert(Module.dim(&arr2) == 20);
assert(testlongmangle(1, 2, 3, 4) == 10);
+ assert(testCppLongMangle(1, 2) == 3);
+ assert(testCppLongLongMangle(3, 4) == 7);
+ assert(testCppSizeTMangle(3, 4) == 7);
assert(test31 == [[[1, 1], [1, 1]], [[1, 1], [1, 1]]]);
assert(test32 == null);
@@ -311,4 +361,9 @@ void main()
assert(t38.test(1, 2, 3) == 1);
Test38.dispose(t38);
test39();
+
+ assert(doStuff(2) == 4);
+
+ test40();
+ test41();
}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/externmangle2.d b/gcc/testsuite/gdc.test/runnable_cxx/externmangle2.d
index 74beb25..e003c95 100644
--- a/gcc/testsuite/gdc.test/runnable_cxx/externmangle2.d
+++ b/gcc/testsuite/gdc.test/runnable_cxx/externmangle2.d
@@ -1,164 +1,156 @@
// EXTRA_CPP_SOURCES: externmangle2.cpp
+// DISABLED: win
-version(Windows)
+extern(C++):
+
+struct Test32NS1
{
- void main()
+ struct Foo(X)
{
+ X *v;
}
-}
-else
-{
- extern(C++):
-
- struct Test32NS1
- {
- struct Foo(X)
- {
- X *v;
- }
- struct Bar(X)
- {
- X *v;
- }
+ struct Bar(X)
+ {
+ X *v;
+ }
- };
+};
- struct Test32NS2
+struct Test32NS2
+{
+ struct Foo(X)
{
- struct Foo(X)
- {
- X *v;
- }
- };
+ X *v;
+ }
+};
- struct Test32(alias Y, alias Z)
- {
- Y!(int)* field;
- };
+struct Test32(alias Y, alias Z)
+{
+ Y!(int)* field;
+};
- void test32a(Test32!(Test32NS1.Foo, Test32NS1.Foo) arg);
- void test32b(Test32!(Test32NS1.Foo, Test32NS1.Bar) arg);
- void test32c(Test32!(Test32NS1.Foo, Test32NS2.Foo) arg);
- void test32d(Test32!(Test32NS1.Foo, Test32NS2.Foo) arg1, Test32!(Test32NS2.Foo, Test32NS1.Foo) arg2);
+void test32a(Test32!(Test32NS1.Foo, Test32NS1.Foo) arg);
+void test32b(Test32!(Test32NS1.Foo, Test32NS1.Bar) arg);
+void test32c(Test32!(Test32NS1.Foo, Test32NS2.Foo) arg);
+void test32d(Test32!(Test32NS1.Foo, Test32NS2.Foo) arg1, Test32!(Test32NS2.Foo, Test32NS1.Foo) arg2);
- interface XXX
- {
- }
+interface XXX
+{
+}
- void test33a(XXX, XXX*);
+void test33a(XXX, XXX*);
- struct Test33(alias A, alias B)
- {
- }
+struct Test33(alias A, alias B)
+{
+}
- /*
- void test33(XXX, Test33!(test33a, test33a) arg, XXX);
+/*
+void test33(XXX, Test33!(test33a, test33a) arg, XXX);
- struct Test34(alias A)
- {
- };
+struct Test34(alias A)
+{
+};
- struct Test34A
- {
- static void foo(int);
- };
+struct Test34A
+{
+ static void foo(int);
+};
- void test34(Test34!(Test34A.foo) arg);
- */
+void test34(Test34!(Test34A.foo) arg);
+*/
- __gshared extern int test36;
+__gshared extern int test36;
- /*
- struct Test37(alias A)
- {
- };
+/*
+struct Test37(alias A)
+{
+};
- struct Test37A
- {
- __gshared extern int t38;
- };
+struct Test37A
+{
+ __gshared extern int t38;
+};
- void test37(Test37!(test36) arg);
- void test38(Test37!(Test37A.t38) arg);
- */
+void test37(Test37!(test36) arg);
+void test38(Test37!(Test37A.t38) arg);
+*/
- struct Test39
+struct Test39
+{
+ struct T39A(X)
{
- struct T39A(X)
- {
- }
}
+}
- struct T39A
- {
- }
+struct T39A
+{
+}
- void test39(Test39.T39A!(.T39A));
+void test39(Test39.T39A!(.T39A));
- version(none)
+version(none)
+{
+ version(Posix) //Only for g++ with -std=c++0x and Visual Studio 2013+
{
- version(Posix) //Only for g++ with -std=c++0x and Visual Studio 2013+
- {
-
- struct Test40(T, V...)
- {
- }
+ struct Test40(T, V...)
+ {
- void test40(Test40!(int, double, void))
- {
- }
}
- else version(Win64) //Only for g++ with -std=c++0x and Visual Studio 2013+
+
+ void test40(Test40!(int, double, void))
{
+ }
+ }
+ else version(Win64) //Only for g++ with -std=c++0x and Visual Studio 2013+
+ {
- struct Test40(T, V...)
- {
+ struct Test40(T, V...)
+ {
- }
+ }
- void test40(Test40!(int, double, void))
- {
- }
+ void test40(Test40!(int, double, void))
+ {
}
}
+}
- __gshared extern const XXX test41;
- struct Test42
- {
- __gshared extern const XXX test42;
- }
- __gshared extern int[4] test43;
- const(XXX) test44();
+__gshared extern const XXX test41;
+struct Test42
+{
+ __gshared extern const XXX test42;
+}
+__gshared extern int[4] test43;
+const(XXX) test44();
- void main()
- {
- test32a(Test32!(Test32NS1.Foo, Test32NS1.Foo)());
- test32b(Test32!(Test32NS1.Foo, Test32NS1.Bar)());
- test32c(Test32!(Test32NS1.Foo, Test32NS2.Foo)());
- test32d(Test32!(Test32NS1.Foo, Test32NS2.Foo)(), Test32!(Test32NS2.Foo, Test32NS1.Foo)());
+void main()
+{
+ test32a(Test32!(Test32NS1.Foo, Test32NS1.Foo)());
+ test32b(Test32!(Test32NS1.Foo, Test32NS1.Bar)());
+ test32c(Test32!(Test32NS1.Foo, Test32NS2.Foo)());
+ test32d(Test32!(Test32NS1.Foo, Test32NS2.Foo)(), Test32!(Test32NS2.Foo, Test32NS1.Foo)());
- //test33a(null, null);
- //test33(null, Test33!(test33a, test33a)(), null);
+ //test33a(null, null);
+ //test33(null, Test33!(test33a, test33a)(), null);
- //test34(Test34!(Test34A.foo)());
+ //test34(Test34!(Test34A.foo)());
- assert(test36 == 36);
+ assert(test36 == 36);
- //test37(Test37!(test36)());
- //test38(Test37!(Test37A.t38)());
- test39(Test39.T39A!(.T39A)());
+ //test37(Test37!(test36)());
+ //test38(Test37!(Test37A.t38)());
+ test39(Test39.T39A!(.T39A)());
- assert(test41 is null);
- assert(Test42.test42 is null);
- assert(test43 == [1, 2, 3, 4]);
- auto ptr = &test44;
- }
+ assert(test41 is null);
+ assert(Test42.test42 is null);
+ assert(test43 == [1, 2, 3, 4]);
+ auto ptr = &test44;
}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/abi_tags.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/abi_tags.cpp
new file mode 100644
index 0000000..a161f05
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/abi_tags.cpp
@@ -0,0 +1,146 @@
+/*
+ * Test C++ abi-tag name mangling.
+ * https://issues.dlang.org/show_bug.cgi?id=19949
+ *
+ * ABI tags are only supported on Linux & OSX,
+ * however OSX doesn't use it in its standard library.
+ *
+ * Requires at minimum Clang 3.9.0 or GCC 5.1
+ */
+
+struct [[gnu::abi_tag("tag1")]] Tagged1 {};
+struct [[gnu::abi_tag("tag2")]] Tagged2 {};
+
+struct [[gnu::abi_tag("tag1", "tag2")]] Tagged1_2
+{
+ struct [[gnu::abi_tag("tag3")]] Tagged3
+ {
+ Tagged3(int value_) : value(value_) {}
+
+ // _ZN9Tagged1_2B4tag1B4tag27Tagged3B4tag37Tagged4B4tag4Ev
+ [[gnu::abi_tag("tag4")]]
+ int Tagged4 () { return this->value; }
+
+ int value;
+ };
+};
+struct [[gnu::abi_tag("tag1")]] Tagged1Too {};
+
+// _Z5inst1B4tag1B4tag2
+Tagged1_2 inst1;
+// _Z5inst2B4tag1B4tag2B4tag3
+Tagged1_2::Tagged3 inst2(42);
+
+// _Z5func0B4tag1B4tag2i
+Tagged1_2 func0(int a) { return Tagged1_2(); }
+// _Z5func19Tagged1_2B4tag1B4tag2
+Tagged1_2 func1(Tagged1_2 a) { return a; }
+// _Z5func2B4tag27Tagged1B4tag1
+Tagged1_2 func2(Tagged1 a) { return Tagged1_2(); }
+// _Z5func3B4tag17Tagged2B4tag2
+Tagged1_2 func3(Tagged2 a) { return Tagged1_2(); }
+// _Z5func47Tagged2B4tag27Tagged1B4tag1
+Tagged1_2 func4(Tagged2 a, Tagged1 b) { return Tagged1_2(); }
+// _Z5func5B4tag37Tagged2B4tag27Tagged1B4tag1
+Tagged1_2::Tagged3 func5(Tagged2 a, Tagged1 b) { return Tagged1_2::Tagged3(420); }
+// _Z5func67Tagged2B4tag2S_7Tagged1B4tag19Tagged1_2B4tag1B4tag2
+void func6(Tagged2 a, Tagged2 b, Tagged1 c, Tagged1_2 d) {}
+// With T=Tagged1_2: _Z5func7I9Tagged1_2B4tag1B4tag2ET_S1_i
+template<typename T>
+T func7(T a, int) { return a; }
+// _Z5func87Tagged1B4tag110Tagged1TooB4tag1
+void func8 (Tagged1, Tagged1Too) {}
+
+// Explicitly instantiate the above templates.
+template Tagged1_2 func7<Tagged1_2>(Tagged1_2, int);
+
+struct [[gnu::abi_tag("foo", "bar")]] S
+{
+public:
+ int i;
+ S(int);
+};
+
+S::S(int i) : i(i) {}
+
+[[gnu::abi_tag("foo", "bar")]]
+int a;
+
+S b(0);
+
+[[gnu::abi_tag("foo", "bar")]]
+int f() { return 0xf; }
+
+S gs(int i) { return S(i + 0xe0); }
+S gss(S s, int i) { return S(i + s.i + 0xe0); }
+
+[[gnu::abi_tag("foo", "bar")]]
+S fss(S s, int i) { return S(i + s.i + 0xf); }
+
+template <class T>
+T gt(int i) { return T(i + 0xe0); }
+
+template <class T>
+T gtt(T t, int i) { return T(i + t.i + 0xe0); }
+
+
+template <class T>
+[[gnu::abi_tag("foo", "bar")]] /* GCC is inconsistent here, <= 6 matches clang but >= 7 is different */
+T ft(int i) { return T(i + 0xf); }
+
+template <class T>
+[[gnu::abi_tag("foo", "bar")]] /* GCC is inconsistent here, <= 6 matches clang but >= 7 is different */
+T ftt(T t, int i) { return T(i + t.i + 0xf); }
+
+#ifdef __clang__
+inline namespace [[gnu::abi_tag("AAA")]] N
+#else
+inline namespace N [[gnu::abi_tag("AAA")]]
+#endif
+{
+ template <int>
+ struct [[gnu::abi_tag("foo", "bar")]] K
+ {
+ public:
+ int i;
+ K(int i);
+ };
+}
+
+template <int j>
+K<j>::K(int i) : i(i) {}
+
+// Note: This does not include the 'AAA' in the mangling
+// template <int j>
+// K<j> fk(int i) { return K<j>(i + j + 0xf); }
+
+K<1> fk1(int i) { return K<1>(i + 1 + 0xf); }
+
+K<10> k10(0);
+
+void initVars()
+{
+ a = 10;
+ b = S(20);
+ k10 = K<10>(30);
+}
+
+// doesn't compile on GCC < 6, and not at all on Clang (tested with 9.0.1)
+#if __GNUC__ >= 6
+enum [[gnu::abi_tag("ENN")]] E0
+{ E0a = 0xa };
+
+E0 fe() { return E0a; }
+
+template<int>
+E0 fei() { return E0a; }
+#endif
+
+// Explicitly instantiate the above templates.
+template S gt<S>(int);
+template S gtt<S>(S, int);
+template S ft<S>(int);
+template S ftt<S>(S, int);
+#if __GNUC__ >= 6
+template E0 fei<0>();
+#endif
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/c14203.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/c14203.cpp
new file mode 100644
index 0000000..059d0ee
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/c14203.cpp
@@ -0,0 +1,2 @@
+
+float func1() { return 73; }
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp11.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp11.cpp
new file mode 100644
index 0000000..88aa719
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp11.cpp
@@ -0,0 +1,35 @@
+#include <assert.h>
+#include <cstddef>
+#include <cstdint>
+
+void testnull(std::nullptr_t n)
+{
+ assert(n == nullptr);
+}
+
+void testnullnull(std::nullptr_t n1, std::nullptr_t n2)
+{
+ assert(n1 == nullptr);
+ assert(n2 == nullptr);
+}
+
+/****************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19658
+
+enum class i8_19658 : std::int8_t;
+enum class u8_19658 : std::uint8_t;
+enum class i16_19658 : std::int16_t;
+enum class u16_19658 : std::uint16_t;
+enum class i32_19658 : std::int32_t;
+enum class u32_19658 : std::uint32_t;
+enum class i64_19658 : std::int64_t;
+enum class u64_19658 : std::uint64_t;
+
+void test19658_i8(i8_19658) {}
+void test19658_u8(u8_19658) {}
+void test19658_i16(i16_19658) {}
+void test19658_u16(u16_19658) {}
+void test19658_i32(i32_19658) {}
+void test19658_u32(u32_19658) {}
+void test19658_i64(i64_19658) {}
+void test19658_u64(u64_19658) {}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp19179.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp19179.cpp
new file mode 100644
index 0000000..3ca23c1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp19179.cpp
@@ -0,0 +1,15 @@
+// https://issues.dlang.org/show_bug.cgi?id=19179
+
+struct SmallStruct { int x, y; };
+
+SmallStruct test_small(SmallStruct);
+void test_small_noret(SmallStruct);
+
+void cppmain()
+{
+ SmallStruct s;
+ s.x = 10;
+ s.y = 20;
+ test_small(s);
+ test_small_noret(s);
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp22287.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp22287.cpp
new file mode 100644
index 0000000..ba7b25a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp22287.cpp
@@ -0,0 +1,337 @@
+#include <assert.h>
+
+class X
+{
+public:
+ virtual ~X();
+ int i;
+};
+
+X::~X()
+{
+}
+
+class Y : public X
+{
+};
+
+class A
+{
+public:
+ virtual ~A();
+ virtual int f1() const;
+
+ int i;
+};
+
+class I
+{
+public:
+ virtual int f2() const = 0;
+ virtual X *f4() = 0;
+};
+
+class B : public A, public I
+{
+public:
+ virtual int f1() const;
+ virtual int f2() const;
+ virtual int f3() const;
+ virtual X *f4();
+};
+
+class C : public B
+{
+public:
+ virtual int f1() const;
+ virtual int f2() const;
+ virtual int f3() const;
+ virtual Y *f4();
+};
+
+#ifdef _WIN32
+class D : public B
+{
+public:
+ virtual int f1() const;
+ virtual int f2() const;
+ virtual int f3() const;
+ virtual Y *f4();
+};
+
+class E : public B
+{
+public:
+ virtual int f1() const;
+ virtual int f2() const;
+ virtual int f3() const;
+ virtual Y *f4();
+};
+#endif
+
+A::~A()
+{
+}
+
+int A::f1() const
+{
+ return i + 11;
+}
+
+int B::f1() const
+{
+ return i + 21;
+}
+
+int B::f2() const
+{
+ return i + 22;
+}
+
+int B::f3() const
+{
+ return i + 23;
+}
+
+X *B::f4()
+{
+ X *r = new X;
+ r->i = i + 24;
+ return r;
+}
+
+int C::f1() const
+{
+ return i + 31;
+}
+
+int C::f2() const
+{
+ return i + 32;
+}
+
+int C::f3() const
+{
+ return i + 33;
+}
+
+Y *C::f4()
+{
+ Y *r = new Y;
+ r->i = i + 34;
+ return r;
+}
+
+I *createIFromCPP(char type, int i)
+{
+ switch (type)
+ {
+ case 'B':
+ {
+ B *b = new B();
+ b->i = i;
+ return b;
+ }
+ case 'C':
+ {
+ C *c = new C();
+ c->i = i;
+ return c;
+ }
+#ifdef _WIN32
+ case 'D':
+ {
+ D *d = new D();
+ d->i = i;
+ return d;
+ }
+ case 'E':
+ {
+ E *e = new E();
+ e->i = i;
+ return e;
+ }
+#endif
+ default:
+ return 0;
+ }
+}
+
+B *createBFromCPP(char type, int i)
+{
+ switch (type)
+ {
+ case 'B':
+ {
+ B *b = new B();
+ b->i = i;
+ return b;
+ }
+ case 'C':
+ {
+ C *c = new C();
+ c->i = i;
+ return c;
+ }
+#ifdef _WIN32
+ case 'D':
+ {
+ D *d = new D();
+ d->i = i;
+ return d;
+ }
+ case 'E':
+ {
+ E *e = new E();
+ e->i = i;
+ return e;
+ }
+#endif
+ default:
+ return 0;
+ }
+}
+
+C *createCFromCPP(int i)
+{
+ C *c = new C();
+ c->i = i;
+ return c;
+}
+
+#ifdef _WIN32
+D *createDFromCPP(int i)
+{
+ D *d = new D();
+ d->i = i;
+ return d;
+}
+
+E *createEFromCPP(int i)
+{
+ E *e = new E();
+ e->i = i;
+ return e;
+}
+#endif
+
+I *createIFromD(char type, int i);
+B *createBFromD(char type, int i);
+C *createCFromD(int i);
+#ifdef _WIN32
+D *createDFromD(int i);
+E *createEFromD(int i);
+#endif
+
+void runCPPTests()
+{
+ {
+ B *b = new B();
+ b->i = 100;
+ assert(b->f1() == 121);
+ assert(b->f2() == 122);
+ assert(b->f3() == 123);
+ assert(b->f4()->i == 124);
+ }
+ {
+ C *c = new C();
+ c->i = 100;
+ assert(c->f1() == 131);
+ assert(c->f2() == 132);
+ assert(c->f3() == 133);
+ assert(c->f4()->i == 134);
+ }
+#ifdef _WIN32
+ {
+ D *d = new D();
+ d->i = 100;
+ assert(d->f1() == 141);
+ assert(d->f2() == 142);
+ assert(d->f3() == 143);
+ assert(d->f4()->i == 144);
+ }
+ {
+ E *e = new E();
+ e->i = 100;
+ assert(e->f1() == 151);
+ assert(e->f2() == 152);
+ assert(e->f3() == 153);
+ assert(e->f4()->i == 154);
+ }
+#endif
+ {
+ I *i = createIFromD('B', 100);
+ assert(i->f2() == 122);
+ assert(i->f4()->i == 124);
+ }
+ {
+ I *i = createIFromD('C', 100);
+ assert(i->f2() == 132);
+ assert(i->f4()->i == 134);
+ }
+#ifdef _WIN32
+ {
+ I *i = createIFromD('D', 100);
+ assert(i->f2() == 142);
+ assert(i->f4()->i == 144);
+ }
+ {
+ I *i = createIFromD('E', 100);
+ assert(i->f2() == 152);
+ assert(i->f4()->i == 154);
+ }
+#endif
+ {
+ B *b = createBFromD('B', 100);
+ assert(b->f1() == 121);
+ assert(b->f2() == 122);
+ assert(b->f3() == 123);
+ assert(b->f4()->i == 124);
+ }
+ {
+ B *b = createBFromD('C', 100);
+ assert(b->f1() == 131);
+ assert(b->f2() == 132);
+ assert(b->f3() == 133);
+ assert(b->f4()->i == 134);
+ }
+#ifdef _WIN32
+ {
+ B *b = createBFromD('D', 100);
+ assert(b->f1() == 141);
+ assert(b->f2() == 142);
+ assert(b->f3() == 143);
+ assert(b->f4()->i == 144);
+ }
+ {
+ B *b = createBFromD('E', 100);
+ assert(b->f1() == 151);
+ assert(b->f2() == 152);
+ assert(b->f3() == 153);
+ assert(b->f4()->i == 154);
+ }
+#endif
+ {
+ C *c = createCFromD(100);
+ assert(c->f1() == 131);
+ assert(c->f2() == 132);
+ assert(c->f3() == 133);
+ assert(c->f4()->i == 134);
+ }
+#ifdef _WIN32
+ {
+ D *d = createDFromD(100);
+ assert(d->f1() == 141);
+ assert(d->f2() == 142);
+ assert(d->f3() == 143);
+ assert(d->f4()->i == 144);
+ }
+ {
+ E *e = createEFromD(100);
+ assert(e->f1() == 151);
+ assert(e->f2() == 152);
+ assert(e->f3() == 153);
+ assert(e->f4()->i == 154);
+ }
+#endif
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp7925.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp7925.cpp
new file mode 100644
index 0000000..f3a9a85
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp7925.cpp
@@ -0,0 +1,103 @@
+#include <stdarg.h>
+#include <assert.h>
+
+class C1
+{
+public:
+ virtual ~C1();
+
+ int i;
+
+ int f0();
+ int f1(int a);
+ int f2(int a, int b);
+ virtual int f3(int a, int b);
+ int f4(int a, ...);
+};
+
+C1::~C1()
+{
+}
+
+int C1::f0()
+{
+ return i;
+}
+
+int C1::f1(int a)
+{
+ return i + a;
+}
+
+int C1::f2(int a, int b)
+{
+ return i + a + b;
+}
+
+int C1::f3(int a, int b)
+{
+ return i + a + b;
+}
+
+int C1::f4(int a, ...)
+{
+ int r = i + a;
+ int last = a;
+
+ va_list argp;
+ va_start(argp, a);
+ while (last)
+ {
+ last = va_arg(argp, int);
+ r += last;
+ }
+ va_end(argp);
+ return r;
+}
+
+C1 *createC1()
+{
+ return new C1();
+}
+
+class C2
+{
+public:
+ virtual ~C2();
+
+ int i;
+
+ int f0();
+ int f1(int a);
+ int f2(int a, int b);
+ virtual int f3(int a, int b);
+ int f4(int a, ...);
+};
+
+C2 *createC2();
+
+void runCPPTests()
+{
+ C2 *c2 = createC2();
+ c2->i = 100;
+ assert(c2->f0() == 100);
+ assert(c2->f1(1) == 101);
+ assert(c2->f2(20, 3) == 123);
+ assert(c2->f3(20, 3) == 123);
+ assert(c2->f4(20, 3, 0) == 123);
+
+ int (C2::*fp0)() = &C2::f0;
+ int (C2::*fp1)(int) = &C2::f1;
+ int (C2::*fp2)(int, int) = &C2::f2;
+ int (C2::*fp3)(int, int) = &C2::f3;
+#ifndef __DMC__
+ int (C2::*fp4)(int, ...) = &C2::f4;
+#endif
+ assert((c2->*(fp0))() == 100);
+ assert((c2->*(fp1))(1) == 101);
+ assert((c2->*(fp2))(20, 3) == 123);
+ assert((c2->*(fp3))(20, 3) == 123);
+#ifndef __DMC__
+ assert((c2->*(fp4))(20, 3, 0) == 123);
+#endif
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp_abi_tests.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp_abi_tests.cpp
index 63f74a2..8ba6139 100644
--- a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp_abi_tests.cpp
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp_abi_tests.cpp
@@ -1,11 +1,51 @@
+#include <assert.h>
+
struct S{
float a;
};
+namespace std
+{
+ struct test19248_ {int a;}; // Remove when `extern(C++, ns)` is gone
+ struct test19248 {int a;};
+};
+
+#ifdef __DMC__
+// DMC doesn't support c++11
+#elif defined (_MSC_VER) && _MSC_VER <= 1800
+// MSVC2013 doesn't support char16_t/char32_t
+#else
+#define TEST_UNICODE
+#endif
+
+struct S18784
+{
+ int i;
+ S18784(int n);
+};
+
+S18784::S18784(int n) : i(n) {}
+
+#ifdef __DMC__ // DMC doesn't support c++11
+template <class>
+#else
+template <class...>
+#endif
+struct SPack
+{
+ int i;
+};
+
+typedef SPack<int> SInt;
+
bool passthrough(bool value) { return value; }
signed char passthrough(signed char value) { return value; }
unsigned char passthrough(unsigned char value) { return value; }
char passthrough(char value) { return value; }
+#ifdef TEST_UNICODE
+char16_t passthrough(char16_t value) { return value; }
+char32_t passthrough(char32_t value) { return value; }
+#endif
wchar_t passthrough(wchar_t value) { return value; }
short passthrough(short value) { return value; }
unsigned short passthrough(unsigned short value) { return value; }
@@ -18,11 +58,18 @@ unsigned long long passthrough(unsigned long long value) { return value; }
float passthrough(float value) { return value; }
double passthrough(double value) { return value; }
S passthrough(S value) { return value; }
+std::test19248 passthrough(const std::test19248 value) { return value; }
+std::test19248_ passthrough(const std::test19248_ value) { return value; }
+SInt passthrough(SInt value) { return value; }
bool passthrough_ptr(bool *value) { return *value; }
signed char passthrough_ptr(signed char *value) { return *value; }
unsigned char passthrough_ptr(unsigned char *value) { return *value; }
char passthrough_ptr(char *value) { return *value; }
+#ifdef TEST_UNICODE
+char16_t passthrough_ptr(char16_t *value) { return *value; }
+char32_t passthrough_ptr(char32_t *value) { return *value; }
+#endif
wchar_t passthrough_ptr(wchar_t *value) { return *value; }
short passthrough_ptr(short *value) { return *value; }
unsigned short passthrough_ptr(unsigned short *value) { return *value; }
@@ -35,11 +82,18 @@ unsigned long long passthrough_ptr(unsigned long long *value) { return *value; }
float passthrough_ptr(float *value) { return *value; }
double passthrough_ptr(double *value) { return *value; }
S passthrough_ptr(S *value) { return *value; }
+std::test19248 passthrough_ptr(const std::test19248 *value) { return *value; }
+std::test19248_ passthrough_ptr(const std::test19248_ *value) { return *value; }
+SInt passthrough_ptr(SInt *value) { return *value; }
bool passthrough_ref(bool &value) { return value; }
signed char passthrough_ref(signed char &value) { return value; }
unsigned char passthrough_ref(unsigned char &value) { return value; }
char passthrough_ref(char &value) { return value; }
+#ifdef TEST_UNICODE
+char16_t passthrough_ref(char16_t &value) { return value; }
+char32_t passthrough_ref(char32_t &value) { return value; }
+#endif
wchar_t passthrough_ref(wchar_t &value) { return value; }
short passthrough_ref(short &value) { return value; }
unsigned short passthrough_ref(unsigned short &value) { return value; }
@@ -52,6 +106,55 @@ unsigned long long passthrough_ref(unsigned long long &value) { return value; }
float passthrough_ref(float &value) { return value; }
double passthrough_ref(double &value) { return value; }
S passthrough_ref(S &value) { return value; }
+std::test19248 passthrough_ref(const std::test19248 &value) { return value; }
+std::test19248_ passthrough_ref(const std::test19248_ &value) { return value; }
+SInt passthrough_ref(SInt &value) { return value; }
+
+namespace ns1
+{
+ // D: `char*, const(char)**`
+ int constFunction1(const char*, const char**) { return 1; }
+ // D: `const(char)*, const(char*)*`
+ int constFunction2(const char*, const char* const*) { return 2; }
+ // D: `const(char*), const(char**)*`
+ int constFunction3(const char* const, const char* const* const*) { return 3; }
+ // D: `const(char*), const(char***)`
+ int constFunction4(const char* const, const char* const* const* const) { return 42; }
+};
+
+struct SmallStruct
+{
+ int i;
+ SmallStruct(int); // implemented in D
+ SmallStruct(const SmallStruct &);
+};
+SmallStruct::SmallStruct(const SmallStruct &rhs)
+ : i(rhs.i + 10) {}
+void smallStructCallBack(SmallStruct p);
+void smallStructTest(SmallStruct p)
+{
+ assert(p.i == 52);
+
+ smallStructCallBack(p);
+ assert(p.i == 52);
+}
+
+struct Sdtor
+{
+ static int counter;
+ ~Sdtor();
+};
+
+Sdtor::~Sdtor() { ++counter; }
+int Sdtor::counter = 0;
+
+void consume(Sdtor value) {}
+
+void consume2(Sdtor value);
+void doConsume2(Sdtor& value)
+{
+ consume2(value);
+}
// Uncomment when mangling is fixed
// typedef void(*fn0)();
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp_stdlib.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp_stdlib.cpp
new file mode 100644
index 0000000..deb027a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cpp_stdlib.cpp
@@ -0,0 +1,47 @@
+#include <array>
+#include <string>
+#include <vector>
+
+template<typename T>
+T& identity (T& v) { return v; }
+template<typename T>
+T** identityPP (T** v) { return v; }
+
+template<typename T>
+std::vector<T>* getVector(size_t len, const T* ptr)
+{
+ std::vector<T>* ret = new std::vector<T>(len);
+ for (size_t i = 0; i < len; ++i)
+ (*ret)[i] = ptr[i];
+ return ret;
+}
+
+std::string* getString(int len, const char* ptr)
+{
+ return new std::string(ptr, len);
+}
+
+template<typename T, size_t N>
+std::array<T, N>* getArray(const T* ptr)
+{
+ std::array<T, N>* ret = new std::array<T, N>();
+ for (size_t x = 0; x < N; ++x)
+ (*ret)[x] = ptr[x];
+ return ret;
+}
+
+// Explicit instantiations, so they are callable outside this compilation unit.
+template int** identityPP<int>(int**);
+template float** identityPP<float>(float**);
+template int& identity<int>(int&);
+template float& identity<float>(float&);
+
+template std::vector<int>* getVector<int>(size_t, const int*);
+template std::vector<float>* getVector<float>(size_t, const float*);
+//typedef std::vector<float> svf_t;
+//template std::vector<svf_t>* getVector<svf_t>(size_t, const svf_t*);
+
+template std::array<int, 4>* getArray<int, 4>(const int*);
+template std::array<float, 4>* getArray<float, 4>(const float*);
+//typedef Foo<int, 42> fi42_t;
+//template std::array<fi42_t, 4> getArray<fi42_t, 4>(const fi42_t*);
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.cpp
index 823c660..ea4fb1c 100644
--- a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.cpp
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.cpp
@@ -1,41 +1,11 @@
-/*
-GCC 5.1 introduced new implementations of std::string and std::list:
-
-https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
-
-This causes e.g. std::string to be actually defined as
-std::__cxx11::string.
-
-On machines with GCC 5.1, this manifests as a linker error when
-running the cppa.d / cppb.cpp test:
-
-cppa.o: In function `_D4cppa6test14FZv':
-cppa.d:(.text._D4cppa6test14FZv+0x11): undefined reference to `foo14a(std::string*)'
-cppa.d:(.text._D4cppa6test14FZv+0x18): undefined reference to `foo14b(std::basic_string<int, std::char_traits<int>, std::allocator<int> >*)'
-cppa.d:(.text._D4cppa6test14FZv+0x3a): undefined reference to `foo14f(std::char_traits<char>*, std::string*, std::string*)'
-cppa.o: In function `_D4cppa7testeh3FZv':
-cppa.d:(.text._D4cppa7testeh3FZv+0x19): undefined reference to `throwle()'
-collect2: error: ld returned 1 exit status
---- errorlevel 1
-
-When the .cpp file is compiled with g++ 5.3.0, the actual function
-signatures in the cppb.o object file are:
-
-foo14a(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)
-foo14b(std::__cxx11::basic_string<int, std::char_traits<int>, std::allocator<int> >*)
-foo14f(std::char_traits<char>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)
-
-Fortunately, it is easily possible to disable the new feature
-by defining _GLIBCXX_USE_CXX11_ABI as 0 before including any standard
-headers.
-*/
-#define _GLIBCXX_USE_CXX11_ABI 0
-
#include <stdio.h>
+#include <stdint.h>
#include <assert.h>
#include <exception>
#include <cstdarg>
+#include "cppb.h"
+
/**************************************/
int foo(int i, int j, int k);
@@ -268,13 +238,13 @@ void foo8(const char *p)
}
/**************************************/
-// 4059
+// https://issues.dlang.org/show_bug.cgi?id=4059
struct elem9 { };
void foobar9(elem9*, elem9*) { }
/**************************************/
-// 5148
+// https://issues.dlang.org/show_bug.cgi?id=5148
void foo10(const char*, const char*) { }
void foo10(const int, const int) { }
@@ -347,7 +317,7 @@ size_t getoffset13161a()
/****************************************************/
-#if __linux__ || __APPLE__ || __FreeBSD__
+#if __linux__ || __APPLE__ || __FreeBSD__ || __DragonFly__
#include <memory>
#include <vector>
#include <string>
@@ -403,36 +373,30 @@ wchar_t f13289_cpp_wchar_t(wchar_t ch)
return ch;
}
}
-
-#if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun || __NetBSD__
-unsigned short f13289_d_wchar(unsigned short ch);
-wchar_t f13289_d_dchar(wchar_t ch);
-#elif _WIN32
-wchar_t f13289_d_wchar(wchar_t ch);
-unsigned int f13289_d_dchar(unsigned int ch);
+#ifdef __DMC__
+// DMC doesn't support c++11
+#elif defined (_MSC_VER) //&& _MSC_VER <= 1800
+// MSVC2013 doesn't support char16_t/char32_t
+#else
+#define TEST_UNICODE
+#endif
+#ifdef TEST_UNICODE
+char16_t f13289_d_wchar(char16_t ch);
+char32_t f13289_d_dchar(char32_t ch);
#endif
-
wchar_t f13289_d_wchar_t(wchar_t ch);
bool f13289_cpp_test()
{
if (!(f13289_d_wchar_t(L'e') == L'E')) return false;
if (!(f13289_d_wchar_t(L'F') == L'F')) return false;
-#if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun || __NetBSD__
- if (!(f13289_d_wchar((unsigned short)'c') == (unsigned short)'C')) return false;
- if (!(f13289_d_wchar((unsigned short)'D') == (unsigned short)'D')) return false;
- if (!(f13289_d_dchar(L'e') == L'E')) return false;
- if (!(f13289_d_dchar(L'F') == L'F')) return false;
- return true;
-#elif _WIN32
- if (!(f13289_d_wchar(L'c') == L'C')) return false;
- if (!(f13289_d_wchar(L'D') == L'D')) return false;
- if (!(f13289_d_dchar((unsigned int)'e') == (unsigned int)'E')) return false;
- if (!(f13289_d_dchar((unsigned int)'F') == (unsigned int)'F')) return false;
- return true;
-#else
- return false;
+#ifdef TEST_UNICODE
+ if (!(f13289_d_wchar(u'c') == u'C')) return false;
+ if (!(f13289_d_wchar(u'D') == u'D')) return false;
+ if (!(f13289_d_dchar(U'e') == U'E')) return false;
+ if (!(f13289_d_dchar(U'F') == U'F')) return false;
#endif
+ return true;
}
/******************************************/
@@ -499,7 +463,7 @@ namespace N13337 {
}
/****************************************/
-// 14195
+// https://issues.dlang.org/show_bug.cgi?id=14195
template <typename T>
struct Delegate1 {};
@@ -518,17 +482,17 @@ void test14195a(Delegate1<void()> func) {}
void test14195b(Delegate2<int(float, double), int(float, double)> func) {}
/******************************************/
-// 14200
+// https://issues.dlang.org/show_bug.cgi?id=14200
void test14200a(int a) {};
void test14200b(float a, int b, double c) {};
/******************************************/
-// 14956
+// https://issues.dlang.org/show_bug.cgi?id=14956
namespace std {
namespace N14956 {
- struct S14956 { };
+ struct S14956 { };
}
}
@@ -577,35 +541,26 @@ Visitor2* getVisitor2()
/******************************************/
// issues detected by fuzzer
-#if _LP64
-#define longlong long
-#else
-#define longlong long long
-#endif
-void fuzz1_checkValues(longlong arg10, longlong arg11, bool arg12);
-void fuzz1_cppvararg(longlong arg10, longlong arg11, bool arg12)
+void fuzz1_checkValues(int64_t arg10, int64_t arg11, bool arg12);
+void fuzz1_cppvararg(int64_t arg10, int64_t arg11, bool arg12)
{
fuzz1_checkValues(arg10, arg11, arg12);
}
-void fuzz2_checkValues(unsigned longlong arg10, unsigned longlong arg11, bool arg12);
-void fuzz2_cppvararg(unsigned longlong arg10, unsigned longlong arg11, bool arg12)
+void fuzz2_checkValues(uint64_t arg10, uint64_t arg11, bool arg12);
+void fuzz2_cppvararg(uint64_t arg10, uint64_t arg11, bool arg12)
{
fuzz2_checkValues(arg10, arg11, arg12);
}
-#if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun || __NetBSD__
-#define wchar unsigned short
-#elif _WIN32
-#define wchar wchar_t
-#endif
-
-void fuzz3_checkValues(wchar arg10, wchar arg11, bool arg12);
-void fuzz3_cppvararg(wchar arg10, wchar arg11, bool arg12)
+#ifdef TEST_UNICODE
+void fuzz3_checkValues(char16_t arg10, char32_t arg11, bool arg12);
+void fuzz3_cppvararg(char16_t arg10, char32_t arg11, bool arg12)
{
fuzz3_checkValues(arg10, arg11, arg12);
}
+#endif
/******************************************/
@@ -620,7 +575,7 @@ void throwit()
/******************************************/
-#if linux
+#if __linux__
#include <stdexcept>
void throwle()
@@ -632,10 +587,10 @@ void throwle()
#endif
/******************************************/
-// 15579
+// https://issues.dlang.org/show_bug.cgi?id=15579
/******************************************/
-// 15579
+// https://issues.dlang.org/show_bug.cgi?id=15579
class Base
{
@@ -710,7 +665,7 @@ Interface *cppfooi(Interface *i)
}
/******************************************/
-// 15610
+// https://issues.dlang.org/show_bug.cgi?id=15610
class Base2
{
@@ -738,7 +693,7 @@ void Derived2::f()
}
/******************************************/
-// 15455
+// https://issues.dlang.org/show_bug.cgi?id=15455
struct X6
{
@@ -766,7 +721,7 @@ void test15455b(X8 s)
}
/******************************************/
-// 15372
+// https://issues.dlang.org/show_bug.cgi?id=15372
template <typename T>
int foo15372(int value)
@@ -776,11 +731,11 @@ int foo15372(int value)
void test15372b()
{
- int t = foo15372<int>(1);
+ int t = foo15372<int>(1);
}
/****************************************/
-// 15576
+// https://issues.dlang.org/show_bug.cgi?id=15576
namespace ns15576
{
@@ -793,7 +748,7 @@ namespace ns15576
}
/****************************************/
-// 15802
+// https://issues.dlang.org/show_bug.cgi?id=15802
template <typename T>
class Foo15802
@@ -807,16 +762,174 @@ public:
void test15802b()
{
- int t = Foo15802<int>::boo(1);
+ int t = Foo15802<int>::boo(1);
}
/****************************************/
-// 16536 - mangling mismatch on OSX
+// https://issues.dlang.org/show_bug.cgi?id=16536
+// mangling mismatch on OSX
#if defined(__APPLE__)
-__UINTMAX_TYPE__ pass16536(__UINTMAX_TYPE__ a)
+uint64_t pass16536(uint64_t a)
{
return a;
}
#endif
+
+/****************************************/
+// https://issues.dlang.org/show_bug.cgi?id=15589
+// extern(C++) virtual destructors are not put in vtbl[]
+
+class A15589
+{
+public:
+ struct S
+ {
+ public:
+ int x;
+ };
+ virtual int foo();
+ virtual ~A15589();
+ S s1;
+ S s2;
+};
+class B15589 : public A15589
+{
+public:
+ virtual int bar();
+ virtual ~B15589();
+ S s3;
+};
+
+void test15589b(A15589 *p)
+{
+ assert(p->foo() == 100);
+ assert(((B15589*)p)->bar() == 200);
+ p->~A15589();
+}
+
+
+/////////////////
+void trace15589(int ch);
+
+Cpp15589Base::~Cpp15589Base()
+{
+ trace15589('b');
+}
+
+Cpp15589Derived::Cpp15589Derived()
+{
+ b = 1;
+}
+
+Cpp15589Derived::~Cpp15589Derived()
+{
+ trace15589('B');
+}
+
+Cpp15589BaseVirtual::Cpp15589BaseVirtual()
+{
+ c = 2;
+}
+
+Cpp15589BaseVirtual::~Cpp15589BaseVirtual()
+{
+ trace15589('v');
+}
+
+Cpp15589DerivedVirtual::Cpp15589DerivedVirtual()
+{
+ d = 3;
+}
+
+Cpp15589DerivedVirtual::~Cpp15589DerivedVirtual()
+{
+ trace15589('V');
+}
+
+Cpp15589IntroducingVirtual::Cpp15589IntroducingVirtual()
+{
+ e = 4;
+}
+
+Cpp15589IntroducingVirtual::~Cpp15589IntroducingVirtual()
+{
+ trace15589('I');
+}
+
+Cpp15589Struct::~Cpp15589Struct()
+{
+ trace15589('s');
+}
+
+/****************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18928
+
+struct Small18928
+{
+ int x;
+};
+
+class CC18928
+{
+public:
+ virtual Small18928 getVirtual();
+ Small18928 getFinal();
+ static Small18928 getStatic();
+};
+
+Small18928 CC18928::getVirtual() { Small18928 s = {3}; return s; }
+Small18928 CC18928::getFinal() { Small18928 s = {4}; return s; }
+Small18928 CC18928::getStatic() { Small18928 s = {5}; return s; }
+
+CC18928* newCC18928()
+{
+ return new CC18928();
+}
+
+/****************************************/
+// https://issues.dlang.org/show_bug.cgi?id=18966
+Base18966::Base18966() { x = 10; }
+Base18966::~Base18966() {}
+void Base18966::vf()
+{
+ x = 100;
+}
+
+A18966::A18966() : calledOverloads(/*zero-init*/), i(0) { foo(); }
+void A18966::foo() { calledOverloads[i++] = 'A'; }
+
+B18966::B18966() { foo(); }
+void B18966::foo() { calledOverloads[i++] = 'B'; }
+
+#if _WIN32 // otherwise defined in C header files!
+// https://issues.dlang.org/show_bug.cgi?id=18955
+namespace std
+{
+ template<typename Char>
+ struct char_traits
+ {
+ };
+ template<typename Char>
+ class allocator
+ {
+ };
+ template<typename Char, typename Traits, typename Alloc>
+ class basic_string
+ {
+ };
+ typedef basic_string<char, char_traits<char>, allocator<char> > string;
+}
+#endif // _WIN32
+
+void callback18955(const std::string& s);
+
+void test18955()
+{
+ std::string s;
+// TODO: on OSX and FreeBSD, std is mangled as std::__1
+#if !__APPLE__ && !__FreeBSD__
+ callback18955(s);
+#endif
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.h b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.h
new file mode 100644
index 0000000..2ace632
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.h
@@ -0,0 +1,83 @@
+// avoid declaration in cpp file so the C/C++ compiler does no assume
+// these are inaccessible from elsewhere
+class Cpp15589Base
+{
+public:
+ ~Cpp15589Base();
+
+ virtual void nonVirtual() {}
+ int a;
+};
+
+class Cpp15589Derived : public Cpp15589Base
+{
+public:
+ Cpp15589Derived();
+ ~Cpp15589Derived();
+ int b;
+};
+
+class Cpp15589BaseVirtual
+{
+public:
+ virtual void beforeDtor() {}
+
+ Cpp15589BaseVirtual();
+ virtual ~Cpp15589BaseVirtual();
+
+ virtual void afterDtor() {}
+ int c;
+};
+
+class Cpp15589DerivedVirtual : public Cpp15589BaseVirtual
+{
+public:
+ Cpp15589DerivedVirtual(); // explicit C++ ctor needed, see https://issues.dlang.org/show_bug.cgi?id=18966
+ virtual ~Cpp15589DerivedVirtual();
+
+ virtual void afterDtor() {}
+
+ int d;
+};
+
+class Cpp15589IntroducingVirtual : public Cpp15589Base
+{
+public:
+ Cpp15589IntroducingVirtual();
+ virtual void beforeIntroducedVirtual() {}
+ virtual ~Cpp15589IntroducingVirtual();
+ virtual void afterIntroducedVirtual(int) {}
+
+ int e;
+};
+
+struct Cpp15589Struct
+{
+ ~Cpp15589Struct();
+ int s;
+};
+
+class Base18966
+{
+public:
+ Base18966();
+ virtual ~Base18966();
+ virtual void vf();
+ int x;
+};
+
+class A18966
+{
+public:
+ char calledOverloads[8];
+ int i;
+ A18966();
+ virtual void foo();
+};
+
+class B18966 : public A18966
+{
+public:
+ B18966();
+ void foo() /*override*/;
+};
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/externmangle.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/externmangle.cpp
index da3e844..37c98ea 100644
--- a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/externmangle.cpp
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/externmangle.cpp
@@ -1,3 +1,4 @@
+#include <stddef.h>
#include <stdint.h>
template<class X>
@@ -194,17 +195,25 @@ int Module::dim(Array<Module*>* arr)
return arr->dim;
}
-#if _LP64
-unsigned long testlongmangle(int32_t a, uint32_t b, long c, unsigned long d)
+uint64_t testlongmangle(int a, unsigned int b, int64_t c, uint64_t d)
{
return a + b + c + d;
}
-#else
-unsigned long long testlongmangle(int a, unsigned int b, long long c, unsigned long long d)
+
+unsigned long testCppLongMangle(long a, unsigned long b)
{
- return a + b + c + d;
+ return a + b;
+}
+
+unsigned long long testCppLongLongMangle(long long a, unsigned long long b)
+{
+ return a + b;
+}
+
+size_t testCppSizeTMangle(ptrdiff_t a, size_t b)
+{
+ return a + b;
}
-#endif
int test31[2][2][2] = {1, 1, 1, 1, 1, 1, 1, 1};
int *test32 = 0;
@@ -401,4 +410,40 @@ int test39cpp(C2<char>* c2, S2<int>* s2)
if (s2->value() != otherS2->value())
return 2;
return 0;
-} \ No newline at end of file
+}
+
+namespace foo
+{
+ namespace bar
+ {
+ namespace baz
+ {
+ int doStuff(int i)
+ {
+ return i * 2;
+ }
+ }
+ }
+}
+
+#ifndef __DMC__ // DMC doesn't support c++11
+template<typename ...T> void foovargs(T... args);
+
+void test40()
+{
+ foovargs<int, float>(1, 2.0f);
+ char c = 'a';
+ foovargs<char*>(&c);
+}
+
+template<typename T, typename ...Args>
+void make_shared_poc(Args&... args);
+
+void test41()
+{
+ int a = 1;
+ int b = 2;
+ make_shared_poc<int, int, int>(a, b);
+
+}
+#endif
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/stdint.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/stdint.cpp
new file mode 100644
index 0000000..1f5d605
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/stdint.cpp
@@ -0,0 +1,8 @@
+#include <stdint.h>
+
+int testCppI8Mangle (int8_t, uint8_t, int_least8_t, uint_least8_t, int_fast8_t, uint_fast8_t) { return 1; }
+int testCppI16Mangle(int16_t, uint16_t, int_least16_t, uint_least16_t, int_fast16_t, uint_fast16_t) { return 2; }
+int testCppI32Mangle(int32_t, uint32_t, int_least32_t, uint_least32_t, int_fast32_t, uint_fast32_t) { return 3; }
+int testCppI64Mangle(int64_t, uint64_t, int_least64_t, uint_least64_t, int_fast64_t, uint_fast64_t) { return 4; }
+int testCppIntPtrMangle(intptr_t, uintptr_t) { return 5; }
+int testCppIntMaxMangle(intmax_t, uintmax_t) { return 6; }
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/test20652.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/test20652.cpp
new file mode 100644
index 0000000..91ab66a
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/test20652.cpp
@@ -0,0 +1,34 @@
+#if defined(__DMC__) // DMC doesn't support immintrin.h
+#else
+
+#include <assert.h>
+
+// Inline the typedef of __m128 instead of including immintrin.h.
+#if defined(__GNUC__) || defined(__clang__)
+typedef float __m128 __attribute__((__vector_size__(16), __may_alias__));
+
+#elif defined(_MSC_VER)
+typedef union __declspec(intrin_type) __declspec(align(16)) __m128 {
+ float m128_f32[4];
+} __m128;
+
+#else
+#error "Unknown vendor"
+#endif
+
+void test20652(const __m128& a)
+{
+ union
+ {
+ __m128 value;
+ float array[4];
+ } b;
+ b.value = a;
+
+ assert(b.array[0] == 1);
+ assert(b.array[1] == 1);
+ assert(b.array[2] == 1);
+ assert(b.array[3] == 1);
+}
+
+#endif
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/test21515.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/test21515.cpp
index 076777a..71c624e 100644
--- a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/test21515.cpp
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/test21515.cpp
@@ -7,17 +7,17 @@ union cdouble_t { _Complex double z; struct { double re; double im; }; };
union creal_t { _Complex long double z; struct { long double re; long double im; }; };
// extern(C) tests
-extern "C" _Complex float ccomplexf() { return 2.0f+I; }
-extern "C" _Complex double ccomplex() { return 2.0+I; }
-extern "C" _Complex long double ccomplexl() { return 2.0L+I; }
+extern "C" _Complex float ccomplexf() { return {2.0f, 1.0f}; }
+extern "C" _Complex double ccomplex() { return {2.0, 1.0}; }
+extern "C" _Complex long double ccomplexl() { return {2.0L, 1.0L}; }
extern "C" void ccomplexf2(_Complex float c) { cfloat_t z = {c}; assert(z.re == 2 && z.im == 1); }
extern "C" void ccomplex2(_Complex double c) { cdouble_t z = {c}; assert(z.re == 2 && z.im == 1); }
extern "C" void ccomplexl2(_Complex long double c) { creal_t z = {c}; assert(z.re == 2 && z.im == 1); }
// extern(C++) tests
-_Complex float cpcomplexf() { return 2.0f+I; }
-_Complex double cpcomplex() { return 2.0+I; }
-_Complex long double cpcomplexl() { return 2.0L+I; }
+_Complex float cpcomplexf() { return {2.0f, 1.0f}; }
+_Complex double cpcomplex() { return {2.0, 1.0}; }
+_Complex long double cpcomplexl() { return {2.0L, 1.0L}; }
void cpcomplexf(_Complex float c) { cfloat_t z = {c}; assert(z.re == 2 && z.im == 1); }
void cpcomplex(_Complex double c) { cdouble_t z = {c}; assert(z.re == 2 && z.im == 1); }
void cpcomplexl(_Complex long double c) { creal_t z = {c}; assert(z.re == 2 && z.im == 1); }
@@ -30,21 +30,21 @@ struct wrap_complexl { _Complex long double c; };
wrap_complexf wcomplexf()
{
wrap_complexf s;
- s.c = 2.0f+I;
+ s.c = {2.0f, 1.0f};
return s;
}
wrap_complex wcomplex()
{
wrap_complex s;
- s.c = 2.0+I;
+ s.c = {2.0, 1.0};
return s;
}
wrap_complexl wcomplexl()
{
wrap_complexl s;
- s.c = 2.0L+I;
+ s.c = {2.0L, 1.0L};
return s;
}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/test6716.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/test6716.cpp
new file mode 100644
index 0000000..2528b18
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/test6716.cpp
@@ -0,0 +1,13 @@
+
+int test6716(int magic);
+
+extern "C" int rt_init();
+extern "C" int rt_term();
+
+int main(int argc, char*argv[])
+{
+ rt_init();
+ int rc = test6716(12345);
+ rt_term();
+ return rc;
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/runnable_cxx.exp b/gcc/testsuite/gdc.test/runnable_cxx/runnable_cxx.exp
index ecb8c3e..70dfd66 100644
--- a/gcc/testsuite/gdc.test/runnable_cxx/runnable_cxx.exp
+++ b/gcc/testsuite/gdc.test/runnable_cxx/runnable_cxx.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 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/gdc.test/runnable_cxx/stdint.d b/gcc/testsuite/gdc.test/runnable_cxx/stdint.d
new file mode 100644
index 0000000..e599425
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/stdint.d
@@ -0,0 +1,24 @@
+// EXTRA_CPP_SOURCES: stdint.cpp
+
+module stdint_test;
+
+import core.stdc.stdint;
+
+extern(C++):
+
+int testCppI8Mangle (int8_t, uint8_t, int_least8_t, uint_least8_t, int_fast8_t, uint_fast8_t);
+int testCppI16Mangle(int16_t, uint16_t, int_least16_t, uint_least16_t, int_fast16_t, uint_fast16_t);
+int testCppI32Mangle(int32_t, uint32_t, int_least32_t, uint_least32_t, int_fast32_t, uint_fast32_t);
+int testCppI64Mangle(int64_t, uint64_t, int_least64_t, uint_least64_t, int_fast64_t, uint_fast64_t);
+int testCppIntPtrMangle(intptr_t, uintptr_t);
+int testCppIntMaxMangle(intmax_t, uintmax_t);
+
+void main()
+{
+ assert(testCppI8Mangle (1, 2, 3, 4, 5, 6) == 1);
+ assert(testCppI16Mangle(1, 2, 3, 4, 5, 6) == 2);
+ assert(testCppI32Mangle(1, 2, 3, 4, 5, 6) == 3);
+ assert(testCppI64Mangle(1, 2, 3, 4, 5, 6) == 4);
+ assert(testCppIntPtrMangle(1, 2) == 5);
+ assert(testCppIntMaxMangle(1, 2) == 6);
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/test14203.d b/gcc/testsuite/gdc.test/runnable_cxx/test14203.d
new file mode 100644
index 0000000..3b29c66
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/test14203.d
@@ -0,0 +1,22 @@
+// EXTRA_CPP_SOURCES: c14203.cpp
+
+
+/************************************************/
+
+// https://issues.dlang.org/show_bug.cgi?id=14203
+
+extern (C++) float func1();
+
+void test14203()
+{
+ assert(func1() == 73);
+}
+
+/************************************************/
+
+int main()
+{
+ test14203();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/test19179.d b/gcc/testsuite/gdc.test/runnable_cxx/test19179.d
new file mode 100644
index 0000000..6bdccfd
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/test19179.d
@@ -0,0 +1,32 @@
+// EXTRA_CPP_SOURCES: cpp19179.cpp
+
+// https://issues.dlang.org/show_bug.cgi?id=19179
+
+import core.stdc.stdio;
+
+extern(C++) struct SmallStruct { int x = 10, y = 20; }
+
+extern (C++)
+SmallStruct test_small(SmallStruct s)
+{
+ printf("%d %d\n", s.x, s.y); // prints: invalid memory
+ assert(s.x == 10);
+ assert(s.y == 20);
+ return s;
+}
+
+extern (C++)
+void test_small_noret(SmallStruct s)
+{
+ printf("%d %d\n", s.x, s.y); // prints: 10 20
+ assert(s.x == 10);
+ assert(s.y == 20);
+}
+
+extern (C++) void cppmain();
+
+int main()
+{
+ cppmain();
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/test20652.d b/gcc/testsuite/gdc.test/runnable_cxx/test20652.d
new file mode 100644
index 0000000..68bb0a7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/test20652.d
@@ -0,0 +1,23 @@
+// https://issues.dlang.org/show_bug.cgi?id=20652
+// EXTRA_CPP_SOURCES: test20652.cpp
+
+import core.simd;
+
+version (CRuntime_DigitalMars) // DMC doesn't support immintrin.h
+{
+ void main() {}
+}
+else static if (!__traits(compiles, float4)) // No __vector support
+{
+ void main() {}
+}
+else
+{
+ extern(C++) void test20652(ref const float4);
+
+ void main()
+ {
+ float4 f4 = 1;
+ test20652(f4);
+ }
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/test21515.d b/gcc/testsuite/gdc.test/runnable_cxx/test21515.d
index cc44207..e548456 100644
--- a/gcc/testsuite/gdc.test/runnable_cxx/test21515.d
+++ b/gcc/testsuite/gdc.test/runnable_cxx/test21515.d
@@ -1,5 +1,6 @@
// https://issues.dlang.org/show_bug.cgi?id=21515
// EXTRA_CPP_SOURCES: test21515.cpp
+// CXXFLAGS: -std=c++11
// DISABLED: win32 win64
// ABI layout of native complex
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/test22287.d b/gcc/testsuite/gdc.test/runnable_cxx/test22287.d
new file mode 100644
index 0000000..a0c7475
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/test22287.d
@@ -0,0 +1,327 @@
+// EXTRA_CPP_SOURCES: cpp22287.cpp
+
+extern(C++):
+
+class X
+{
+public:
+ ~this();
+ int i;
+}
+
+class Y : X
+{
+}
+
+class A
+{
+ ~this();
+ int f1() const;
+
+ int i;
+}
+
+interface I
+{
+ int f2() const;
+ X f4();
+}
+
+class B : A, I
+{
+ override int f1() const;
+ override int f2() const;
+ int f3() const;
+ override X f4();
+}
+
+class C : B
+{
+ override int f1() const;
+ override int f2() const;
+ override int f3() const;
+ override Y f4();
+}
+
+version(Windows)
+{
+class D : B
+{
+ override int f1() const
+ {
+ return i + 41;
+ }
+
+ override int f2() const
+ {
+ return i + 42;
+ }
+
+ override int f3() const
+ {
+ return i + 43;
+ }
+
+ override Y f4()
+ {
+ Y r = new Y;
+ r.i = i + 44;
+ return r;
+ }
+}
+
+mixin template MixinE()
+{
+ override int f1() const
+ {
+ return i + 51;
+ }
+
+ override int f2() const
+ {
+ return i + 52;
+ }
+
+ override int f3() const
+ {
+ return i + 53;
+ }
+
+ override Y f4()
+ {
+ Y r = new Y;
+ r.i = i + 54;
+ return r;
+ }
+}
+
+class E : B
+{
+ mixin MixinE;
+}
+}
+
+I createIFromCPP(char type, int i);
+B createBFromCPP(char type, int i);
+C createCFromCPP(int i);
+version(Windows)
+{
+D createDFromCPP(int i);
+E createEFromCPP(int i);
+}
+
+I createIFromD(char type, int i)
+{
+ switch (type)
+ {
+ case 'B':
+ {
+ B b = new B();
+ b.i = i;
+ return b;
+ }
+ case 'C':
+ {
+ C c = new C();
+ c.i = i;
+ return c;
+ }
+ version(Windows)
+ {
+ case 'D':
+ {
+ D d = new D();
+ d.i = i;
+ return d;
+ }
+ case 'E':
+ {
+ E e = new E();
+ e.i = i;
+ return e;
+ }
+ }
+ default:
+ return null;
+ }
+}
+
+B createBFromD(char type, int i)
+{
+ switch (type)
+ {
+ case 'B':
+ {
+ B b = new B();
+ b.i = i;
+ return b;
+ }
+ case 'C':
+ {
+ C c = new C();
+ c.i = i;
+ return c;
+ }
+ version(Windows)
+ {
+ case 'D':
+ {
+ D d = new D();
+ d.i = i;
+ return d;
+ }
+ case 'E':
+ {
+ E e = new E();
+ e.i = i;
+ return e;
+ }
+ }
+ default:
+ return null;
+ }
+}
+
+C createCFromD(int i)
+{
+ C c = new C();
+ c.i = i;
+ return c;
+}
+
+version(Windows)
+{
+D createDFromD(int i)
+{
+ D d = new D();
+ d.i = i;
+ return d;
+}
+
+E createEFromD(int i)
+{
+ E e = new E();
+ e.i = i;
+ return e;
+}
+}
+
+void runCPPTests();
+
+extern(D) void main()
+{
+ {
+ B b = new B();
+ b.i = 100;
+ assert(b.f1() == 121);
+ assert(b.f2() == 122);
+ assert(b.f3() == 123);
+ assert(b.f4().i == 124);
+ }
+ {
+ C c = new C();
+ c.i = 100;
+ assert(c.f1() == 131);
+ assert(c.f2() == 132);
+ assert(c.f3() == 133);
+ assert(c.f4().i == 134);
+ }
+ version(Windows)
+ {
+ {
+ D d = new D();
+ d.i = 100;
+ assert(d.f1() == 141);
+ assert(d.f2() == 142);
+ assert(d.f3() == 143);
+ assert(d.f4().i == 144);
+ }
+ {
+ E e = new E();
+ e.i = 100;
+ assert(e.f1() == 151);
+ assert(e.f2() == 152);
+ assert(e.f3() == 153);
+ assert(e.f4().i == 154);
+ }
+ }
+ {
+ I i = createIFromCPP('B', 100);
+ assert(i.f2() == 122);
+ assert(i.f4().i == 124);
+ }
+ {
+ I i = createIFromCPP('C', 100);
+ assert(i.f2() == 132);
+ assert(i.f4().i == 134);
+ }
+ version(Windows)
+ {
+ {
+ I i = createIFromCPP('D', 100);
+ assert(i.f2() == 142);
+ assert(i.f4().i == 144);
+ }
+ {
+ I i = createIFromCPP('E', 100);
+ assert(i.f2() == 152);
+ assert(i.f4().i == 154);
+ }
+ }
+ {
+ B b = createBFromCPP('B', 100);
+ assert(b.f1() == 121);
+ assert(b.f2() == 122);
+ assert(b.f3() == 123);
+ assert(b.f4().i == 124);
+ }
+ {
+ B b = createBFromCPP('C', 100);
+ assert(b.f1() == 131);
+ assert(b.f2() == 132);
+ assert(b.f3() == 133);
+ assert(b.f4().i == 134);
+ }
+ version(Windows)
+ {
+ {
+ B b = createBFromCPP('D', 100);
+ assert(b.f1() == 141);
+ assert(b.f2() == 142);
+ assert(b.f3() == 143);
+ assert(b.f4().i == 144);
+ }
+ {
+ B b = createBFromCPP('E', 100);
+ assert(b.f1() == 151);
+ assert(b.f2() == 152);
+ assert(b.f3() == 153);
+ assert(b.f4().i == 154);
+ }
+ }
+ {
+ C c = createCFromCPP(100);
+ assert(c.f1() == 131);
+ assert(c.f2() == 132);
+ assert(c.f3() == 133);
+ assert(c.f4().i == 134);
+ }
+ version(Windows)
+ {
+ {
+ D d = createDFromCPP(100);
+ assert(d.f1() == 141);
+ assert(d.f2() == 142);
+ assert(d.f3() == 143);
+ assert(d.f4().i == 144);
+ }
+ {
+ E e = createEFromCPP(100);
+ assert(e.f1() == 151);
+ assert(e.f2() == 152);
+ assert(e.f3() == 153);
+ assert(e.f4().i == 154);
+ }
+ }
+ runCPPTests();
+}
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/test6716.d b/gcc/testsuite/gdc.test/runnable_cxx/test6716.d
new file mode 100644
index 0000000..edda423
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/test6716.d
@@ -0,0 +1,20 @@
+// EXTRA_CPP_SOURCES: test6716.cpp
+
+version(Windows)
+{
+ // without main, there is no implicit reference to the runtime library
+ // other platforms pass the runtime library on the linker command line
+ version(CRuntime_Microsoft)
+ version(Win64)
+ pragma(lib, "phobos64");
+ else
+ pragma(lib, "phobos32mscoff");
+ else
+ pragma(lib, "phobos");
+}
+
+extern(C++) int test6716(int magic)
+{
+ assert(magic == 12345);
+ return 0;
+} \ No newline at end of file
diff --git a/gcc/testsuite/gdc.test/runnable_cxx/test7925.d b/gcc/testsuite/gdc.test/runnable_cxx/test7925.d
new file mode 100644
index 0000000..2f52826
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable_cxx/test7925.d
@@ -0,0 +1,151 @@
+// EXTRA_CPP_SOURCES: cpp7925.cpp
+
+/*
+Exclude -O due to a codegen bug on OSX:
+https://issues.dlang.org/show_bug.cgi?id=22556
+
+PERMUTE_ARGS(osx): -inline -release -g
+*/
+
+import core.vararg;
+
+extern(C++) class C1
+{
+public:
+ ~this();
+
+ int i;
+
+ final int f0();
+ final int f1(int a);
+ final int f2(int a, int b);
+ int f3(int a, int b);
+ final int f4(int a, ...);
+};
+
+extern(C++) C1 createC1();
+
+extern(C++) class C2
+{
+public:
+ ~this()
+ {
+ }
+
+ int i;
+
+ final int f0()
+ {
+ return i;
+ }
+
+ final int f1(int a)
+ {
+ return i + a;
+ }
+
+ final int f2(int a, int b)
+ {
+ return i + a + b;
+ }
+
+ int f3(int a, int b)
+ {
+ return i + a + b;
+ }
+
+ final int f4(int a, ...)
+ {
+ int r = i + a;
+ int last = a;
+
+ va_list argp;
+ va_start(argp, a);
+ while (last)
+ {
+ last = va_arg!int(argp);
+ r += last;
+ }
+ va_end(argp);
+ return r;
+ }
+};
+
+extern(C++) C2 createC2()
+{
+ return new C2;
+}
+
+auto callMember(alias F, Params...)(__traits(parent, F) obj, Params params)
+{
+ static if(__traits(getFunctionVariadicStyle, F) == "stdarg")
+ enum varargSuffix = ", ...";
+ else
+ enum varargSuffix = "";
+
+ static if(is(typeof(&F) R == return) && is(typeof(F) P == __parameters))
+ mixin("extern(" ~ __traits(getLinkage, F) ~ ") R delegate(P" ~ varargSuffix ~ ") dg;");
+ dg.funcptr = &F;
+ dg.ptr = cast(void*)obj;
+ return dg(params);
+}
+
+extern(C++) void runCPPTests();
+
+void main()
+{
+ C1 c1 = createC1();
+ c1.i = 100;
+ assert(c1.f0() == 100);
+ assert(c1.f1(1) == 101);
+ assert(c1.f2(20, 3) == 123);
+ assert(c1.f3(20, 3) == 123);
+ assert(c1.f4(20, 3, 0) == 123);
+
+ auto dg0 = &c1.f0;
+ auto dg1 = &c1.f1;
+ auto dg2 = &c1.f2;
+ auto dg3 = &c1.f3;
+ auto dg4 = &c1.f4;
+ assert(dg0() == 100);
+ assert(dg1(1) == 101);
+ assert(dg2(20, 3) == 123);
+ assert(dg3(20, 3) == 123);
+ assert(dg4(20, 3, 0) == 123);
+
+ assert(callMember!(C1.f0)(c1) == 100);
+ assert(callMember!(C1.f1)(c1, 1) == 101);
+ assert(callMember!(C1.f2)(c1, 20, 3) == 123);
+ assert(callMember!(C1.f3)(c1, 20, 3) == 123);
+ assert(callMember!(C1.f4)(c1, 20, 3, 0) == 123);
+
+ int i;
+ extern(C++) void delegate() lamdba1 = () {
+ i = 5;
+ };
+ lamdba1();
+ assert(i == 5);
+
+ extern(C++) int function(int, int) lamdba2 = (int a, int b) {
+ return a + b;
+ };
+ assert(lamdba2(3, 4) == 7);
+
+ extern(C++) void delegate(int, ...) lamdba3 = (int a, ...) {
+ i = a;
+ int last = a;
+
+ va_list argp;
+ va_start(argp, a);
+ while (last)
+ {
+ last = va_arg!int(argp);
+ i += last;
+ }
+ va_end(argp);
+ };
+ lamdba3(1000, 200, 30, 4, 0);
+ assert(i == 1234);
+
+ runCPPTests();
+}
diff --git a/gcc/testsuite/gfortran.dg/allocate_with_mold_4.f90 b/gcc/testsuite/gfortran.dg/allocate_with_mold_4.f90
new file mode 100644
index 0000000..d545fe1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocate_with_mold_4.f90
@@ -0,0 +1,24 @@
+program A_M
+ implicit none
+ real, parameter :: C(5:10) = 5.0
+ real, dimension (:), allocatable :: A, B
+ allocate (A(6))
+ call Init (A)
+contains
+ subroutine Init ( A )
+ real, dimension ( -1 : ), intent ( in ) :: A
+ integer, dimension ( 1 ) :: lb_B
+
+ allocate (B, mold = A)
+ if (any (lbound (B) /= lbound (A))) stop 1
+ if (any (ubound (B) /= ubound (A))) stop 2
+ if (any (shape (B) /= shape (A))) stop 3
+ if (size (B) /= size (A)) stop 4
+ deallocate (B)
+ allocate (B, mold = C)
+ if (any (lbound (B) /= lbound (C))) stop 5
+ if (any (ubound (B) /= ubound (C))) stop 6
+ if (any (shape (B) /= shape (C))) stop 7
+ if (size (B) /= size (C)) stop 8
+end
+end
diff --git a/gcc/testsuite/gfortran.dg/allocate_with_source_26.f90 b/gcc/testsuite/gfortran.dg/allocate_with_source_26.f90
index 28f24fc..323c8a3 100644
--- a/gcc/testsuite/gfortran.dg/allocate_with_source_26.f90
+++ b/gcc/testsuite/gfortran.dg/allocate_with_source_26.f90
@@ -34,23 +34,23 @@ program p
if (lbound(p1, 1) /= 3 .or. ubound(p1, 1) /= 4 &
.or. lbound(p2, 1) /= 3 .or. ubound(p2, 1) /= 4 &
.or. lbound(p3, 1) /= 1 .or. ubound(p3, 1) /= 2 &
- .or. lbound(p4, 1) /= 7 .or. ubound(p4, 1) /= 8 &
+ .or. lbound(p4, 1) /= 1 .or. ubound(p4, 1) /= 2 &
.or. p1(3)%i /= 43 .or. p1(4)%i /= 56 &
.or. p2(3)%i /= 43 .or. p2(4)%i /= 56 &
.or. p3(1)%i /= 43 .or. p3(2)%i /= 56 &
- .or. p4(7)%i /= 11 .or. p4(8)%i /= 12) then
+ .or. p4(1)%i /= 11 .or. p4(2)%i /= 12) then
call abort()
endif
!write(*,*) lbound(a,1), ubound(a,1) ! prints 1 3
!write(*,*) lbound(b,1), ubound(b,1) ! prints 1 3
- !write(*,*) lbound(c,1), ubound(c,1) ! prints 3 5
+ !write(*,*) lbound(c,1), ubound(c,1) ! prints 1 3
!write(*,*) lbound(d,1), ubound(d,1) ! prints 1 5
!write(*,*) lbound(e,1), ubound(e,1) ! prints 1 6
if (lbound(a,1) /= 1 .or. ubound(a,1) /= 3 &
.or. lbound(b,1) /= 1 .or. ubound(b,1) /= 3 &
- .or. lbound(c,1) /= 3 .or. ubound(c,1) /= 5 &
+ .or. lbound(c,1) /= 1 .or. ubound(c,1) /= 3 &
.or. lbound(d,1) /= 1 .or. ubound(d,1) /= 5 &
.or. lbound(e,1) /= 1 .or. ubound(e,1) /= 6) then
call abort()
diff --git a/gcc/testsuite/gfortran.dg/altreturn_11.f90 b/gcc/testsuite/gfortran.dg/altreturn_11.f90
new file mode 100644
index 0000000..be42971
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/altreturn_11.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-prune-output "Obsolescent feature: Alternate-return argument" }
+! PR fortran/99256 - ICE in variable_check
+! Contributed by G.Steimetz
+
+program test
+ use iso_c_binding
+ type(c_ptr) :: i
+ type(c_funptr) :: p
+ call move_alloc (*1, *2) ! { dg-error "ALTERNATE RETURN" }
+ call c_f_pointer (i, *1) ! { dg-error "ALTERNATE RETURN" }
+ call c_f_procpointer (p, *2) ! { dg-error "ALTERNATE RETURN" }
+1 continue
+2 stop
+end
diff --git a/gcc/testsuite/gfortran.dg/analyzer/analyzer.exp b/gcc/testsuite/gfortran.dg/analyzer/analyzer.exp
index 6d3a40c..3548ae2 100644
--- a/gcc/testsuite/gfortran.dg/analyzer/analyzer.exp
+++ b/gcc/testsuite/gfortran.dg/analyzer/analyzer.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 Free Software Foundation, Inc.
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gfortran.dg/argument_checking_26.f90 b/gcc/testsuite/gfortran.dg/argument_checking_26.f90
new file mode 100644
index 0000000..2b765c5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/argument_checking_26.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+! PR fortran/104212 - ICE in transformational_result
+! Contributed by G.Steinmetz
+
+program p
+ logical, parameter :: a(*,*) = reshape([.true.,.false.], shape=[1,2])
+ real, parameter :: r(*,*) = reshape([1.,2.], shape=[1,2])
+ print *, parity(a)
+ print *, parity(a, dim=1)
+ print *, parity(a, dim=[1]) ! { dg-error "must be a scalar" }
+ print *, norm2 (r)
+ print *, norm2 (r, dim=1)
+ print *, norm2 (r, dim=[1]) ! { dg-error "must be a scalar" }
+end
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_54.f90 b/gcc/testsuite/gfortran.dg/array_constructor_54.f90
new file mode 100644
index 0000000..44d2f9f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_54.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original -Warray-temporaries" }
+! { dg-final { scan-tree-dump-not "stride" "original" } }
+! Verify that no temporary array is generated for a constant array constructor
+! See e.g. PR fortran/102717, PR fortran/102787
+
+program p
+ integer, parameter :: a(*) = [1,2,3,4]
+ integer, parameter :: b(2,3) = reshape([1,2,3,4,5,6], shape (b))
+ print *, [a]
+ print *, [a( : ) ]
+ print *, [a( ::1)]
+ print *, [a( ::2)]
+ print *, [a(1:2:1)]
+ print *, [a(4:1:-2)]
+ print *, [a([3,2])]
+ print *, [a,1]
+ print *, [1,a]
+ print *, [a,a]
+ print *, [b(:,3:1:-2)]
+ print *, [1,b(1,[2,1,3])]
+ print *, [a,b]
+end
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_55.f90 b/gcc/testsuite/gfortran.dg/array_constructor_55.f90
new file mode 100644
index 0000000..52142cb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_55.f90
@@ -0,0 +1,55 @@
+! { dg-do run }
+! PR fortran/66193 - ICE for initialisation of some non-zero-sized arrays
+! Testcase by G.Steinmetz
+
+program p
+ implicit none
+ call s1
+ call s2
+ call s3
+ call s4
+contains
+ subroutine s1
+ integer(8), parameter :: z1(2) = 10 + [ integer(8) :: [ integer(4) ::],1,2]
+ integer(8) :: z2(2) = 10 + [ integer(8) :: [ integer(4) ::],1,2]
+ integer(8) :: z3(2)
+ z3 = 10 + [ integer(8) :: [ integer(4) :: ], 1, 2 ]
+ if ( z1(1) /= 11 .or. z1(2) /= 12 ) stop 1
+ if ( z2(1) /= 11 .or. z2(2) /= 12 ) stop 2
+ if ( z3(1) /= 11 .or. z3(2) /= 12 ) stop 3
+ end subroutine s1
+
+ subroutine s2
+ logical(8), parameter :: z1(3) = .true. .or. &
+ [ logical(8) :: [ logical(4) :: ], .false., .false., .true. ]
+ logical(8) :: z2(3) = .true. .or. &
+ [ logical(8) :: [ logical(4) :: ], .false., .false., .true. ]
+ logical(8) :: z3(3)
+ z3 = .true. .or. &
+ [ logical(8) :: [ logical(4) :: ], .false., .false., .true. ]
+ if ( .not. all(z1) ) stop 11
+ if ( .not. all(z2) ) stop 12
+ if ( .not. all(z3) ) stop 13
+ end subroutine s2
+
+ subroutine s3
+ real(8), parameter :: eps = 4.0_8 * epsilon(1.0_8)
+ real(8), parameter :: z1(2) = 10. + [ real(8) :: [ real(4) :: ], 1., 2. ]
+ real(8) :: z2(2) = 10. + [ real(8) :: [ real(4) :: ], 1., 2. ]
+ real(8) :: z3(2)
+ z3 = 10.0 + [ real(8) :: [ real(4) :: ], 1.0, 2.0 ]
+
+ if ( abs(1-z1(1)/11) > eps ) stop 21
+ if ( abs(1-z1(2)/12) > eps ) stop 22
+ if ( abs(1-z2(1)/11) > eps ) stop 23
+ if ( abs(1-z2(2)/12) > eps ) stop 24
+ if ( abs(1-z3(1)/11) > eps ) stop 25
+ if ( abs(1-z3(2)/12) > eps ) stop 26
+ end subroutine s3
+
+ subroutine s4
+ real, parameter :: x(3) = 2.0 * [real :: 1, (2), 3]
+ real, parameter :: y(2) = [real :: 1, (2)] + 10.0
+ real, parameter :: z(2) = [real ::(1),(2)] + 10.0
+ end subroutine s4
+end program p
diff --git a/gcc/testsuite/gfortran.dg/asan/asan.exp b/gcc/testsuite/gfortran.dg/asan/asan.exp
index ac3ff0b..67f8cf4 100644
--- a/gcc/testsuite/gfortran.dg/asan/asan.exp
+++ b/gcc/testsuite/gfortran.dg/asan/asan.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gfortran.dg/bessel_3.f90 b/gcc/testsuite/gfortran.dg/bessel_3.f90
index 8817725..51e11e9 100644
--- a/gcc/testsuite/gfortran.dg/bessel_3.f90
+++ b/gcc/testsuite/gfortran.dg/bessel_3.f90
@@ -9,10 +9,10 @@ print *, SIN (1.0)
print *, BESSEL_J0(1.0) ! { dg-error "has no IMPLICIT type" })
print *, BESSEL_J1(1.0) ! { dg-error "has no IMPLICIT type" }
print *, BESSEL_JN(1,1.0) ! { dg-error "has no IMPLICIT type|Type mismatch" }
-print *, BESSEL_JN(1,2,1.0) ! { dg-error "has no IMPLICIT type|Type mismatch" }
+print *, BESSEL_JN(1,2,1.0) ! { dg-error "has no IMPLICIT type|Type mismatch|More actual than formal" }
print *, BESSEL_Y0(1.0) ! { dg-error "has no IMPLICIT type" }
print *, BESSEL_Y1(1.0) ! { dg-error "has no IMPLICIT type" }
print *, BESSEL_YN(1,1.0) ! { dg-error "has no IMPLICIT type|Type mismatch" }
-print *, BESSEL_YN(1,2,1.0) ! { dg-error "has no IMPLICIT type|Type mismatch" }
+print *, BESSEL_YN(1,2,1.0) ! { dg-error "has no IMPLICIT type|Type mismatch|More actual than formal" }
end
diff --git a/gcc/testsuite/gfortran.dg/bound_simplification_7.f90 b/gcc/testsuite/gfortran.dg/bound_simplification_7.f90
new file mode 100644
index 0000000..3efecdf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bound_simplification_7.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! PR fortran/103392 - ICE in simplify_bound
+
+program p
+ integer, allocatable :: a(1:1) ! { dg-error "deferred shape or assumed rank" }
+ integer :: b(1) = lbound(a) ! { dg-error "does not reduce" }
+ integer :: c(1) = ubound(a) ! { dg-error "does not reduce" }
+end
+
+subroutine s(x, y)
+ type t
+ integer :: i(3)
+ end type t
+ type(t), pointer :: x(:)
+ type(t), allocatable :: y(:)
+ integer, parameter :: m(1) = ubound (x(1)% i)
+ integer :: n(1) = ubound (y(1)% i)
+end subroutine s
diff --git a/gcc/testsuite/gfortran.dg/c-interop/c-interop.exp b/gcc/testsuite/gfortran.dg/c-interop/c-interop.exp
index 3bc2a9f..31a7eda 100644
--- a/gcc/testsuite/gfortran.dg/c-interop/c-interop.exp
+++ b/gcc/testsuite/gfortran.dg/c-interop/c-interop.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gfortran.dg/c-interop/c407b-2.f90 b/gcc/testsuite/gfortran.dg/c-interop/c407b-2.f90
index 3d3cd63..4f9f6c7 100644
--- a/gcc/testsuite/gfortran.dg/c-interop/c407b-2.f90
+++ b/gcc/testsuite/gfortran.dg/c-interop/c407b-2.f90
@@ -78,11 +78,11 @@ subroutine s2 (x, y)
end select
! relational operations
- if (x & ! { dg-error "Assumed.type" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ if (x & ! { dg-error "Assumed.type" "pr101337" }
.eq. y) then ! { dg-error "Assumed.type" }
return
end if
- if (.not. (x & ! { dg-error "Assumed.type" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ if (.not. (x & ! { dg-error "Assumed.type" "pr101337" }
.ne. y)) then ! { dg-error "Assumed.type" }
return
end if
@@ -99,7 +99,7 @@ subroutine s2 (x, y)
! arithmetic
i = x + 1 ! { dg-error "Assumed.type" }
i = -y ! { dg-error "Assumed.type" }
- i = (x & ! { dg-error "Assumed.type" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ i = (x & ! { dg-error "Assumed.type" "pr101337" }
+ y) ! { dg-error "Assumed.type" }
! computed go to
@@ -131,19 +131,19 @@ subroutine s3 (x, y)
i = exponent (x) ! { dg-error "Assumed.type" }
if (extends_type_of (x, & ! { dg-error "Assumed.type" }
- y)) then ! { dg-error "Assumed.type" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ y)) then ! { dg-error "Assumed.type" "pr101337" }
return
end if
if (same_type_as (x, & ! { dg-error "Assumed.type" }
- y)) then ! { dg-error "Assumed.type" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ y)) then ! { dg-error "Assumed.type" "pr101337" }
return
end if
i = storage_size (x) ! { dg-error "Assumed.type" }
i = iand (x, & ! { dg-error "Assumed.type" }
- y) ! { dg-error "Assumed.type" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ y) ! { dg-error "Assumed.type" "pr101337" }
i = kind (x) ! { dg-error "Assumed.type" }
diff --git a/gcc/testsuite/gfortran.dg/c-interop/c535b-2.f90 b/gcc/testsuite/gfortran.dg/c-interop/c535b-2.f90
index 2dafd44..4d99f7f 100644
--- a/gcc/testsuite/gfortran.dg/c-interop/c535b-2.f90
+++ b/gcc/testsuite/gfortran.dg/c-interop/c535b-2.f90
@@ -57,18 +57,18 @@ subroutine test_calls (x, y)
! Make sure each invalid argument produces a diagnostic.
! scalar dummies
call f (x, & ! { dg-error "(A|a)ssumed.rank" }
- y) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ y) ! { dg-error "(A|a)ssumed.rank" "pr101337" }
! assumed-rank dummies
call g (x, y) ! OK
! assumed-size dummies
call h (x, & ! { dg-error "(A|a)ssumed.rank" "pr101334" }
- y) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ y) ! { dg-error "(A|a)ssumed.rank" "pr101337" }
! assumed-shape dummies
call i (x, & ! { dg-error "(A|a)ssumed.rank" }
- y) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ y) ! { dg-error "(A|a)ssumed.rank" "pr101337" }
! fixed-size array dummies
call j (x, & ! { dg-error "(A|a)ssumed.rank" "pr101334" }
- y) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ y) ! { dg-error "(A|a)ssumed.rank" "pr101337" }
end subroutine
! Check that you can't use an assumed-rank array variable in an array
@@ -81,7 +81,7 @@ subroutine test_designators (x)
call f (x(1), 1) ! { dg-error "(A|a)ssumed.rank" }
call g (x(1:3:1), & ! { dg-error "(A|a)ssumed.rank" }
- x) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ x)
end subroutine
! Check that you can't use an assumed-rank array variable in elemental
@@ -122,7 +122,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
z = x + y ! OK
c & ! { dg-error "(A|a)ssumed.rank" }
- = a & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = a & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
+ b ! { dg-error "(A|a)ssumed.rank" }
z = x + i ! OK
c & ! { dg-error "(A|a)ssumed.rank" }
@@ -133,7 +133,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
z = x - y ! OK
c & ! { dg-error "(A|a)ssumed.rank" }
- = a & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = a & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
- b ! { dg-error "(A|a)ssumed.rank" }
z = x - i ! OK
c & ! { dg-error "(A|a)ssumed.rank" }
@@ -144,7 +144,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
z = x * y ! OK
c & ! { dg-error "(A|a)ssumed.rank" }
- = a & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = a & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
* b ! { dg-error "(A|a)ssumed.rank" }
z = x * i ! OK
c & ! { dg-error "(A|a)ssumed.rank" }
@@ -155,7 +155,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
z = x / y ! OK
c & ! { dg-error "(A|a)ssumed.rank" }
- = a & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = a & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
/ b ! { dg-error "(A|a)ssumed.rank" }
z = x / i ! OK
c & ! { dg-error "(A|a)ssumed.rank" }
@@ -166,7 +166,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
z = x ** y ! OK
c & ! { dg-error "(A|a)ssumed.rank" }
- = a & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = a & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
** b ! { dg-error "(A|a)ssumed.rank" }
z = x ** i ! OK
c & ! { dg-error "(A|a)ssumed.rank" }
@@ -179,7 +179,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
r = x .eq. y ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
- = a & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = a & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
.eq. b ! { dg-error "(A|a)ssumed.rank" }
r = x .eq. i ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
@@ -190,7 +190,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
r = x .ne. y ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
- = a & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = a & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
.ne. b ! { dg-error "(A|a)ssumed.rank" }
r = x .ne. i ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
@@ -201,7 +201,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
r = x .lt. y ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
- = a & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = a & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
.lt. b ! { dg-error "(A|a)ssumed.rank" }
r = x .lt. i ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
@@ -212,7 +212,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
r = x .le. y ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
- = a & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = a & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
.le. b ! { dg-error "(A|a)ssumed.rank" }
r = x .le. i ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
@@ -223,7 +223,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
r = x .gt. y ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
- = a & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = a & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
.gt. b ! { dg-error "(A|a)ssumed.rank" }
r = x .gt. i ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
@@ -234,7 +234,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
r = x .ge. y ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
- = a & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = a & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
.ge. b ! { dg-error "(A|a)ssumed.rank" }
r = x .ge. i ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
@@ -253,7 +253,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
r = p .and. q ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
- = l & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = l & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
.and. m ! { dg-error "(A|a)ssumed.rank" }
r = p .and. j ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
@@ -264,7 +264,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
r = p .or. q ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
- = l & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = l & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
.or. m ! { dg-error "(A|a)ssumed.rank" }
r = p .or. j ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
@@ -275,7 +275,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
r = p .eqv. q ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
- = l & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = l & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
.eqv. m ! { dg-error "(A|a)ssumed.rank" }
r = p .eqv. j ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
@@ -286,7 +286,7 @@ subroutine test_expressions (a, b, c, l, m, n, x, y, z, p, q, r, s, i, j)
r = p .neqv. q ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
- = l & ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ = l & ! { dg-error "(A|a)ssumed.rank" "pr101337" }
.neqv. m ! { dg-error "(A|a)ssumed.rank" }
r = p .neqv. j ! OK
n & ! { dg-error "(A|a)ssumed.rank" }
@@ -320,7 +320,7 @@ subroutine test_intrinsics (i1, i2, r1, r2, c1, c2, l1, l2, s1, s2)
! trig, hyperbolic, other math functions
r1 & ! { dg-error "(A|a)ssumed.rank" }
= atan2 (r1, & ! { dg-error "(A|a)ssumed.rank" }
- r2) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ r2) ! { dg-error "(A|a)ssumed.rank" "pr101337" }
r1 & ! { dg-error "(A|a)ssumed.rank" }
= atan (r2) ! { dg-error "(A|a)ssumed.rank" }
c1 & ! { dg-error "(A|a)ssumed.rank" }
@@ -335,7 +335,7 @@ subroutine test_intrinsics (i1, i2, r1, r2, c1, c2, l1, l2, s1, s2)
! bit operations
l1 & ! { dg-error "(A|a)ssumed.rank" }
= blt (i1, & ! { dg-error "(A|a)ssumed.rank" }
- i2) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ i2) ! { dg-error "(A|a)ssumed.rank" "pr101337" }
l1 & ! { dg-error "(A|a)ssumed.rank" }
= btest (i1, 0) ! { dg-error "(A|a)ssumed.rank" }
i1 & ! { dg-error "(A|a)ssumed.rank" }
@@ -348,7 +348,7 @@ subroutine test_intrinsics (i1, i2, r1, r2, c1, c2, l1, l2, s1, s2)
= char (i1) ! { dg-error "(A|a)ssumed.rank" }
c1 & ! { dg-error "(A|a)ssumed.rank" }
= cmplx (r1, & ! { dg-error "(A|a)ssumed.rank" }
- r2) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ r2) ! { dg-error "(A|a)ssumed.rank" "pr101337" }
i1 & ! { dg-error "(A|a)ssumed.rank" }
= floor (r1) ! { dg-error "(A|a)ssumed.rank" }
r1 & ! { dg-error "(A|a)ssumed.rank" }
@@ -357,16 +357,16 @@ subroutine test_intrinsics (i1, i2, r1, r2, c1, c2, l1, l2, s1, s2)
! reductions
l = any (l2) ! { dg-error "(A|a)ssumed.rank" }
r = dot_product (r1, & ! { dg-error "(A|a)ssumed.rank" }
- r2) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ r2) ! { dg-error "(A|a)ssumed.rank" "pr101337" }
i = iall (i2, & ! { dg-error "(A|a)ssumed.rank" }
- l2) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ l2) ! { dg-error "(A|a)ssumed.rank" "pr101337" }
! string operations
s1 & ! { dg-error "(A|a)ssumed.rank" }
= adjustr (s2) ! { dg-error "(A|a)ssumed.rank" }
i1 & ! { dg-error "(A|a)ssumed.rank" }
= index (c1, & ! { dg-error "(A|a)ssumed.rank" }
- c2) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ c2) ! { dg-error "(A|a)ssumed.rank" "pr101337" }
! misc
i1 & ! { dg-error "(A|a)ssumed.rank" }
@@ -374,12 +374,12 @@ subroutine test_intrinsics (i1, i2, r1, r2, c1, c2, l1, l2, s1, s2)
i = findloc (r1, 0.0) ! { dg-error "(A|a)ssumed.rank" }
r1 & ! { dg-error "(A|a)ssumed.rank" }
= matmul (r1, & ! { dg-error "(A|a)ssumed.rank" }
- r2) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ r2) ! { dg-error "(A|a)ssumed.rank" "pr101337" }
r1 & ! { dg-error "(A|a)ssumed.rank" }
= reshape (r2, [10, 3]) ! { dg-error "(A|a)ssumed.rank" }
i1 & ! { dg-error "(A|a)ssumed.rank" }
= sign (i1, & ! { dg-error "(A|a)ssumed.rank" }
- i2) ! { dg-error "(A|a)ssumed.rank" "pr101337, failure to diagnose both operands" { xfail *-*-*} }
+ i2) ! { dg-error "(A|a)ssumed.rank" "pr101337" }
s1 & ! { dg-error "(A|a)ssumed.rank" }
= transpose (s2) ! { dg-error "(A|a)ssumed.rank" }
diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103287-1.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103287-1.f90
new file mode 100644
index 0000000..aeca52f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c-interop/pr103287-1.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+
+subroutine g
+ call s([1])
+end
+subroutine h(x)
+ integer, pointer :: x(..)
+ call s(x) ! { dg-error "Assumed-rank argument requires an explicit interface" }
+end
diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103287-2.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103287-2.f90
new file mode 100644
index 0000000..0e724b8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c-interop/pr103287-2.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+
+subroutine g
+ call s(1)
+end
+subroutine h(x)
+ integer, pointer :: x(..)
+ call s(x) ! { dg-error "Assumed-rank argument requires an explicit interface" }
+end
diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-1.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-1.f90
new file mode 100644
index 0000000..52d8835
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-1.f90
@@ -0,0 +1,23 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! This program used to ICE in gimplification on the call to S, because it
+! was trying to copy out the array after the call to something that wasn't
+! an lvalue.
+
+program p
+ integer, pointer :: z(:)
+ integer, target :: x(3) = [1, 2, 3]
+ z => x
+ call s(shape(z))
+contains
+ subroutine s(x) bind(c)
+ integer, contiguous :: x(:)
+ end
+end
+
+! It should not emit any copy loops, just the loop for inlining SHAPE.
+! { dg-final { scan-tree-dump-times "while \\(1\\)" 1 "original" } }
+
+! It should not emit code to check the contiguous property.
+! { dg-final { scan-tree-dump-not "contiguous\\.\[0-9\]+" "original" } }
diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-2.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-2.f90
new file mode 100644
index 0000000..771d81d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-2.f90
@@ -0,0 +1,20 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! Check that copy loops to ensure contiguity of transpose result are
+! still generated after fixing pr103390, and that it does not ICE.
+
+program p
+ integer, pointer :: z(:,:)
+ integer, target :: x(3,3) = reshape ([1, 2, 3, 4, 5, 6, 7, 8, 9], shape(x))
+ z => x
+ call s(transpose(z))
+contains
+ subroutine s(x) bind(c)
+ integer, contiguous :: x(:,:)
+ end
+end
+
+! Expect 2 nested copy loops both before and after the call to S.
+! { dg-final { scan-tree-dump-times "while \\(1\\)" 4 "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-3.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-3.f90
new file mode 100644
index 0000000..bd35011
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-3.f90
@@ -0,0 +1,29 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! Check that copy loops to ensure contiguity of the result of a function
+! that returns a non-pointer array are generated properly after fixing
+! pr103390, and that it does not ICE. In this case no copying is required.
+
+program p
+ integer, pointer :: z(:)
+ integer, target :: x(3) = [1, 2, 3]
+ z => x
+ call s(i(z))
+contains
+ function i(x)
+ integer :: i(3)
+ integer, pointer :: x(:)
+ i = x
+ end
+ subroutine s(x) bind(c)
+ integer, contiguous :: x(:)
+ end
+end
+
+! Expect one loop to copy the array contents to a temporary in function i.
+! { dg-final { scan-tree-dump-times "while \\(1\\)" 1 "original" } }
+
+! It should not emit code to check the contiguous property.
+! { dg-final { scan-tree-dump-not "contiguous\\.\[0-9\]+" "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-4.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-4.f90
new file mode 100644
index 0000000..b8b64ed
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-4.f90
@@ -0,0 +1,25 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! Check that copy loops to ensure contiguity of the result of a function
+! that returns a pointer to an array are generated properly after fixing
+! pr103390, and that it does not ICE.
+
+program p
+ integer, pointer :: z(:)
+ integer, target :: x(3) = [1, 2, 3]
+ z => x
+ call s(i(z))
+contains
+ function i(x)
+ integer, pointer :: i(:)
+ integer, pointer :: x(:)
+ i => x
+ end
+ subroutine s(x) bind(c)
+ integer, contiguous :: x(:)
+ end
+end
+
+! Expect a copy loop both before and after the call to S.
+! { dg-final { scan-tree-dump-times "while \\(1\\)" 2 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-5.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-5.f90
new file mode 100644
index 0000000..c87b979
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-5.f90
@@ -0,0 +1,26 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! Check that copy loops to ensure contiguity of the result of a function
+! that returns a pointer to an array are generated properly after fixing
+! pr103390, and that it does not ICE. This variant is for an intent(in)
+! dummy argument so no copy-out is needed, only copy-in.
+
+program p
+ integer, pointer :: z(:)
+ integer, target :: x(3) = [1, 2, 3]
+ z => x
+ call s(i(z))
+contains
+ function i(x)
+ integer, pointer :: i(:)
+ integer, pointer :: x(:)
+ i => x
+ end
+ subroutine s(x) bind(c)
+ integer, contiguous, intent(in) :: x(:)
+ end
+end
+
+! Expect a copy loop before the call to S.
+! { dg-final { scan-tree-dump-times "while \\(1\\)" 1 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-6.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-6.f90
new file mode 100644
index 0000000..394525b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-6.f90
@@ -0,0 +1,22 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! Check that copy loops to ensure contiguity of transpose result are
+! generated properly after fixing pr103390, and that it does not ICE.
+! This variant is for an intent(in) dummy argument so no copy-out
+! is needed, only copy-in.
+
+program p
+ integer, pointer :: z(:,:)
+ integer, target :: x(3,3) = reshape ([1, 2, 3, 4, 5, 6, 7, 8, 9], shape(x))
+ z => x
+ call s(transpose(z))
+contains
+ subroutine s(x) bind(c)
+ integer, contiguous, intent(in) :: x(:,:)
+ end
+end
+
+! Expect 2 nested copy loops before the call to S.
+! { dg-final { scan-tree-dump-times "while \\(1\\)" 2 "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-7.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-7.f90
new file mode 100644
index 0000000..d86dc79
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-7.f90
@@ -0,0 +1,19 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! Check that copy loops to ensure contiguity of the result of an array
+! section expression are generated properly after fixing pr103390, and
+! that it does not ICE.
+
+program p
+ integer, pointer :: z(:)
+ integer :: A(5) = [1, 2, 3, 4, 5]
+ call s(A(::2))
+contains
+ subroutine s(x) bind(c)
+ integer, contiguous :: x(:)
+ end
+end
+
+! Expect copy loops before and after the call to S.
+! { dg-final { scan-tree-dump-times "while \\(1\\)" 2 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-8.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-8.f90
new file mode 100644
index 0000000..3a3b3a8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-8.f90
@@ -0,0 +1,20 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! Check that copy loops to ensure contiguity of the result of an array
+! section expression are generated properly after fixing pr103390,
+! and that it does not ICE. This case is for an intent(in)
+! dummy so no copy-out should occur, only copy-in.
+
+program p
+ integer, pointer :: z(:)
+ integer, parameter :: A(5) = [1, 2, 3, 4, 5]
+ call s(A(::2))
+contains
+ subroutine s(x) bind(c)
+ integer, contiguous, intent(in) :: x(:)
+ end
+end
+
+! Expect a copy loop before the call to S.
+! { dg-final { scan-tree-dump-times "while \\(1\\)" 1 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-9.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-9.f90
new file mode 100644
index 0000000..0d655b5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-9.f90
@@ -0,0 +1,26 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! Check that copy loops to ensure contiguity of the result of an elemental
+! array-valued expression are generated properly after fixing pr103390,
+! and that it does not ICE.
+
+program p
+ integer, pointer :: z(:)
+ integer :: a(3) = [1, 2, 3];
+ integer :: b(3) = [4, 5, 6];
+ call s(a + b);
+contains
+ subroutine s(x) bind(c)
+ integer, contiguous :: x(:)
+ end
+end
+
+! We only expect one loop before the call, to fill in the contiguous
+! temporary. No copy-out is needed since the temporary is effectively
+! an rvalue.
+! { dg-final { scan-tree-dump-times "while \\(1\\)" 1 "original" } }
+
+! It should not emit code to check the contiguous property.
+! { dg-final { scan-tree-dump-not "contiguous\\.\[0-9\]+" "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/c_char_tests_3.f90 b/gcc/testsuite/gfortran.dg/c_char_tests_3.f90
new file mode 100644
index 0000000..9fc0714
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_char_tests_3.f90
@@ -0,0 +1,51 @@
+! { dg-do run }
+! { dg-additional-sources c_char_tests_3_c.c }
+!
+! PR fortran/103828
+! Check that we can pass many function args as C char, which are interoperable
+! with both INTEGER(C_SIGNED_CHAR) and CHARACTER(C_CHAR).
+
+subroutine test_int (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) bind(c)
+ use, intrinsic :: iso_c_binding
+ implicit none
+ integer(c_signed_char), value :: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o
+
+ if (a /= iachar('a')) stop 1
+ if (b /= iachar('b')) stop 2
+ if (c /= iachar('c')) stop 3
+ if (d /= iachar('d')) stop 4
+ if (e /= iachar('e')) stop 5
+ if (f /= iachar('f')) stop 6
+ if (g /= iachar('g')) stop 7
+ if (h /= iachar('h')) stop 8
+ if (i /= iachar('i')) stop 9
+ if (j /= iachar('j')) stop 10
+ if (k /= iachar('k')) stop 11
+ if (l /= iachar('l')) stop 12
+ if (m /= iachar('m')) stop 13
+ if (n /= iachar('n')) stop 14
+ if (o /= iachar('o')) stop 15
+end subroutine
+
+subroutine test_char (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) bind(c)
+ use, intrinsic :: iso_c_binding
+ implicit none
+ character(kind=c_char, len=1), value :: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o
+
+ if (a /= 'a') stop 101
+ if (b /= 'b') stop 102
+ if (c /= 'c') stop 103
+ if (d /= 'd') stop 104
+ if (e /= 'e') stop 105
+ if (f /= 'f') stop 106
+ if (g /= 'g') stop 107
+ if (h /= 'h') stop 108
+ if (i /= 'i') stop 109
+ if (j /= 'j') stop 110
+ if (k /= 'k') stop 111
+ if (l /= 'l') stop 112
+ if (m /= 'm') stop 113
+ if (n /= 'n') stop 114
+ if (o /= 'o') stop 115
+end subroutine
+
diff --git a/gcc/testsuite/gfortran.dg/c_char_tests_3_c.c b/gcc/testsuite/gfortran.dg/c_char_tests_3_c.c
new file mode 100644
index 0000000..1c86a54
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_char_tests_3_c.c
@@ -0,0 +1,16 @@
+void test_char (char, char, char, char, char,
+ char, char, char, char, char,
+ char, char, char, char, char);
+
+void test_int (char, char, char, char, char,
+ char, char, char, char, char,
+ char, char, char, char, char);
+
+int main (void) {
+ test_char ('a', 'b', 'c', 'd', 'e',
+ 'f', 'g', 'h', 'i', 'j',
+ 'k', 'l', 'm', 'n', 'o');
+ test_int ('a', 'b', 'c', 'd', 'e',
+ 'f', 'g', 'h', 'i', 'j',
+ 'k', 'l', 'm', 'n', 'o');
+}
diff --git a/gcc/testsuite/gfortran.dg/c_char_tests_4.f90 b/gcc/testsuite/gfortran.dg/c_char_tests_4.f90
new file mode 100644
index 0000000..512948a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_char_tests_4.f90
@@ -0,0 +1,90 @@
+! { dg-do run }
+!
+! PR fortran/103828
+! Check that we can pass many function args as C char, which are interoperable
+! with both INTEGER(C_SIGNED_CHAR) and CHARACTER(C_CHAR).
+
+program test
+ use, intrinsic :: iso_c_binding, only : c_signed_char, c_char
+ implicit none
+
+ interface
+ ! In order to perform this test, we cheat and pretend to give each function
+ ! the other one's prototype. It should still work, because all arguments
+ ! are interoperable with C char.
+
+ subroutine test1 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) bind(c, name='test_int')
+ import c_char
+ character(kind=c_char, len=1), value :: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o
+ end subroutine test1
+
+ subroutine test2 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) bind(c, name='test_char')
+ import c_signed_char
+ integer(kind=c_signed_char), value :: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o
+ end subroutine test2
+
+ end interface
+
+ call test1('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o')
+ call test2(ichar('a', kind=c_signed_char), &
+ ichar('b', kind=c_signed_char), &
+ ichar('c', kind=c_signed_char), &
+ ichar('d', kind=c_signed_char), &
+ ichar('e', kind=c_signed_char), &
+ ichar('f', kind=c_signed_char), &
+ ichar('g', kind=c_signed_char), &
+ ichar('h', kind=c_signed_char), &
+ ichar('i', kind=c_signed_char), &
+ ichar('j', kind=c_signed_char), &
+ ichar('k', kind=c_signed_char), &
+ ichar('l', kind=c_signed_char), &
+ ichar('m', kind=c_signed_char), &
+ ichar('n', kind=c_signed_char), &
+ ichar('o', kind=c_signed_char))
+
+end program test
+
+subroutine test_int (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) bind(c)
+ use, intrinsic :: iso_c_binding, only : c_signed_char
+ implicit none
+ integer(c_signed_char), value :: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o
+
+ if (a /= iachar('a')) stop 1
+ if (b /= iachar('b')) stop 2
+ if (c /= iachar('c')) stop 3
+ if (d /= iachar('d')) stop 4
+ if (e /= iachar('e')) stop 5
+ if (f /= iachar('f')) stop 6
+ if (g /= iachar('g')) stop 7
+ if (h /= iachar('h')) stop 8
+ if (i /= iachar('i')) stop 9
+ if (j /= iachar('j')) stop 10
+ if (k /= iachar('k')) stop 11
+ if (l /= iachar('l')) stop 12
+ if (m /= iachar('m')) stop 13
+ if (n /= iachar('n')) stop 14
+ if (o /= iachar('o')) stop 15
+end subroutine
+
+subroutine test_char (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) bind(c)
+ use, intrinsic :: iso_c_binding, only : c_char
+ implicit none
+ character(kind=c_char, len=1), value :: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o
+
+ if (a /= 'a') stop 101
+ if (b /= 'b') stop 102
+ if (c /= 'c') stop 103
+ if (d /= 'd') stop 104
+ if (e /= 'e') stop 105
+ if (f /= 'f') stop 106
+ if (g /= 'g') stop 107
+ if (h /= 'h') stop 108
+ if (i /= 'i') stop 109
+ if (j /= 'j') stop 110
+ if (k /= 'k') stop 111
+ if (l /= 'l') stop 112
+ if (m /= 'm') stop 113
+ if (n /= 'n') stop 114
+ if (o /= 'o') stop 115
+end subroutine
+
diff --git a/gcc/testsuite/gfortran.dg/c_char_tests_5.f90 b/gcc/testsuite/gfortran.dg/c_char_tests_5.f90
new file mode 100644
index 0000000..c7a1c6e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_char_tests_5.f90
@@ -0,0 +1,49 @@
+! { dg-do run }
+! { dg-options "-fbackslash" }
+!
+! PR fortran/103828
+! Check that we can C char with non-ASCII values, which are interoperable
+! with both INTEGER(C_SIGNED_CHAR) and CHARACTER(C_CHAR).
+
+program test
+ use, intrinsic :: iso_c_binding, only : c_signed_char, c_char
+ implicit none
+
+ interface
+ ! In order to perform this test, we cheat and pretend to give each function
+ ! the other one's prototype. It should still work, because all arguments
+ ! are interoperable with C char.
+
+ subroutine test1 (a) bind(c, name='test_int')
+ import c_char
+ character(kind=c_char, len=1), value :: a
+ end subroutine test1
+
+ subroutine test2 (a) bind(c, name='test_char')
+ import c_signed_char
+ integer(kind=c_signed_char), value :: a
+ end subroutine test2
+
+ end interface
+
+ call test1('\xA3')
+ call test2(-93_c_signed_char)
+
+end program test
+
+subroutine test_int (a) bind(c)
+ use, intrinsic :: iso_c_binding, only : c_signed_char
+ implicit none
+ integer(c_signed_char), value :: a
+
+ if (a /= iachar('\xA3', kind=c_signed_char)) stop 1
+end subroutine
+
+subroutine test_char (a) bind(c)
+ use, intrinsic :: iso_c_binding, only : c_char
+ implicit none
+ character(kind=c_char, len=1), value :: a
+
+ if (a /= '\xA3') stop 101
+end subroutine
+
diff --git a/gcc/testsuite/gfortran.dg/co_reduce_2.f90 b/gcc/testsuite/gfortran.dg/co_reduce_2.f90
new file mode 100644
index 0000000..42bd02a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/co_reduce_2.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+! PR 103054 - wrong keyword name.
+! Original test case by Damian Rouson.
+program main
+ implicit none
+ logical :: co_all= .true.
+ call co_reduce(co_all, operator=both) ! { dg-error "Cannot find keyword" }
+ call co_reduce(co_all, operation=both)
+contains
+ logical pure function both(lhs,rhs)
+ logical, intent(in) :: lhs, rhs
+ both = lhs .and. rhs
+ end function
+end
diff --git a/gcc/testsuite/gfortran.dg/coarray/caf.exp b/gcc/testsuite/gfortran.dg/coarray/caf.exp
index b13aaca..8683a2a 100644
--- a/gcc/testsuite/gfortran.dg/coarray/caf.exp
+++ b/gcc/testsuite/gfortran.dg/coarray/caf.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2021 Free Software Foundation, Inc.
+# Copyright (C) 2011-2022 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/coarray_49.f90 b/gcc/testsuite/gfortran.dg/coarray_49.f90
new file mode 100644
index 0000000..370e3fd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_49.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib" }
+! PR fortran/101565 - ICE in gfc_simplify_image_index
+! Contributed by G. Steinmetz
+
+program p
+ integer :: x[*]
+ print *, image_index (x, [1.0]) ! { dg-error "shall be INTEGER" }
+end
diff --git a/gcc/testsuite/gfortran.dg/coarray_collectives_14.f90 b/gcc/testsuite/gfortran.dg/coarray_collectives_14.f90
index 6d53411..15679ee 100644
--- a/gcc/testsuite/gfortran.dg/coarray_collectives_14.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_collectives_14.f90
@@ -63,10 +63,10 @@ program test
call co_reduce(caf, dt%arg3) ! { dg-error "shall have two arguments" }
call co_reduce(caf, elem) ! { dg-error "ELEMENTAL non-INTRINSIC procedure 'elem' is not allowed as an actual argument" }
call co_reduce(caf, dt%elem) ! { dg-error "ELEMENTAL procedure pointer component 'elem' is not allowed as an actual argument" }
- call co_reduce(caf, realo) ! { dg-error "A argument at .1. has type INTEGER.4. but the function passed as OPERATOR at .2. returns REAL.4." }
- call co_reduce(caf, dt%realo) ! { dg-error "A argument at .1. has type INTEGER.4. but the function passed as OPERATOR at .2. returns REAL.4." }
- call co_reduce(caf, int8) ! { dg-error "A argument at .1. has type INTEGER.4. but the function passed as OPERATOR at .2. returns INTEGER.8." }
- call co_reduce(caf, dt%int8) ! { dg-error "A argument at .1. has type INTEGER.4. but the function passed as OPERATOR at .2. returns INTEGER.8." }
+ call co_reduce(caf, realo) ! { dg-error "A argument at .1. has type INTEGER.4. but the function passed as OPERATION at .2. returns REAL.4." }
+ call co_reduce(caf, dt%realo) ! { dg-error "A argument at .1. has type INTEGER.4. but the function passed as OPERATION at .2. returns REAL.4." }
+ call co_reduce(caf, int8) ! { dg-error "A argument at .1. has type INTEGER.4. but the function passed as OPERATION at .2. returns INTEGER.8." }
+ call co_reduce(caf, dt%int8) ! { dg-error "A argument at .1. has type INTEGER.4. but the function passed as OPERATION at .2. returns INTEGER.8." }
call co_reduce(caf, arr) ! { dg-error "scalar nonallocatable nonpointer arguments and return a nonallocatable nonpointer scalar" }
call co_reduce(caf, dt%arr) ! { dg-error "scalar nonallocatable nonpointer arguments and return a nonallocatable nonpointer scalar" }
call co_reduce(caf, ptr) ! { dg-error "scalar nonallocatable nonpointer arguments and return a nonallocatable nonpointer scalar" }
@@ -83,10 +83,10 @@ program test
call co_reduce(caf, dt%tgt) ! { dg-error "shall have the TARGET attribute either for none or both arguments" }
call co_reduce(c4, char44) ! OK
call co_reduce(c4, dt%char44) ! OK
- call co_reduce(c3, char34) ! { dg-error "character length of the A argument at .1. and of the arguments of the OPERATOR at .2. shall be the same" }
- call co_reduce(c3, dt%char34) ! { dg-error "character length of the A argument at .1. and of the arguments of the OPERATOR at .2. shall be the same" }
- call co_reduce(c4, char34) ! { dg-error "The character length of the A argument at .1. and of the function result of the OPERATOR at .2. shall be the same" }
- call co_reduce(c4, dt%char34) ! { dg-error "The character length of the A argument at .1. and of the function result of the OPERATOR at .2. shall be the same" }
+ call co_reduce(c3, char34) ! { dg-error "character length of the A argument at .1. and of the arguments of the OPERATION at .2. shall be the same" }
+ call co_reduce(c3, dt%char34) ! { dg-error "character length of the A argument at .1. and of the arguments of the OPERATION at .2. shall be the same" }
+ call co_reduce(c4, char34) ! { dg-error "The character length of the A argument at .1. and of the function result of the OPERATION at .2. shall be the same" }
+ call co_reduce(c4, dt%char34) ! { dg-error "The character length of the A argument at .1. and of the function result of the OPERATION at .2. shall be the same" }
contains
pure integer function valid(x,y)
diff --git a/gcc/testsuite/gfortran.dg/coarray_collectives_16.f90 b/gcc/testsuite/gfortran.dg/coarray_collectives_16.f90
index 683bedd..8419cf9 100644
--- a/gcc/testsuite/gfortran.dg/coarray_collectives_16.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_collectives_16.f90
@@ -15,9 +15,9 @@ program test
character(len=99) :: val3
integer :: res
- call co_reduce(val1, operator=fr, result_image=num_images(), stat=stat1, errmsg=errmesg1)
- call co_reduce(val2, operator=gz, result_image=4, stat=stat2, errmsg=errmesg2)
- call co_reduce(val3, operator=hc, result_image=res,stat=stat3, errmsg=errmesg3)
+ call co_reduce(val1, operation=fr, result_image=num_images(), stat=stat1, errmsg=errmesg1)
+ call co_reduce(val2, operation=gz, result_image=4, stat=stat2, errmsg=errmesg2)
+ call co_reduce(val3, operation=hc, result_image=res,stat=stat3, errmsg=errmesg3)
contains
pure real function fr(x,y)
real, value :: x, y
diff --git a/gcc/testsuite/gfortran.dg/coarray_collectives_18.f90 b/gcc/testsuite/gfortran.dg/coarray_collectives_18.f90
new file mode 100644
index 0000000..c83899d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_collectives_18.f90
@@ -0,0 +1,37 @@
+! { dg-do compile }
+! { dg-additional-options "-fdump-tree-original -fcoarray=lib" }
+!
+! PR 103970
+! Test case inspired by code submitted by Damian Rousson
+
+program main
+
+ implicit none
+
+ type foo_t
+ integer i
+ integer, allocatable :: j
+ end type
+
+ type(foo_t) foo
+ integer, parameter :: source_image = 1
+
+ if (this_image() == source_image) then
+ foo = foo_t(2,3)
+ else
+ allocate(foo%j)
+ end if
+ call co_broadcast(foo, source_image)
+
+ if ((foo%i /= 2) .or. (foo%j /= 3)) error stop 1
+ sync all
+
+end program
+
+! Wrong code generation produced too many temp descriptors
+! leading to stacked descriptors handed to the co_broadcast.
+! This lead to access to non exsitant memory in opencoarrays.
+! In single image mode just checking for reduced number of
+! descriptors is possible, i.e., execute always works.
+! { dg-final { scan-tree-dump-times "desc\\.\[0-9\]+" 12 "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/coarray_collectives_9.f90 b/gcc/testsuite/gfortran.dg/coarray_collectives_9.f90
index f53eb4e..ee3902c 100644
--- a/gcc/testsuite/gfortran.dg/coarray_collectives_9.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_collectives_9.f90
@@ -26,10 +26,10 @@ program test
end interface
call co_broadcast("abc") ! { dg-error "Missing actual argument 'source_image' in call to 'co_broadcast'" }
- call co_reduce("abc") ! { dg-error "Missing actual argument 'operator' in call to 'co_reduce'" }
+ call co_reduce("abc") ! { dg-error "Missing actual argument 'operation' in call to 'co_reduce'" }
call co_broadcast(1, source_image=1) ! { dg-error "'a' argument of 'co_broadcast' intrinsic at .1. must be a variable" }
- call co_reduce(a=1, operator=red_f) ! { dg-error "'a' argument of 'co_reduce' intrinsic at .1. must be a variable" }
- call co_reduce(a=val, operator=red_f2) ! { dg-error "OPERATOR argument at \\(1\\) must be a PURE function" }
+ call co_reduce(a=1, operation=red_f) ! { dg-error "'a' argument of 'co_reduce' intrinsic at .1. must be a variable" }
+ call co_reduce(a=val, operation=red_f2) ! { dg-error "OPERATION argument at \\(1\\) must be a PURE function" }
call co_broadcast(val, source_image=[1,2]) ! { dg-error "must be a scalar" }
call co_broadcast(val, source_image=1.0) ! { dg-error "must be INTEGER" }
diff --git a/gcc/testsuite/gfortran.dg/date_and_time_1.f90 b/gcc/testsuite/gfortran.dg/date_and_time_1.f90
new file mode 100644
index 0000000..9424e50
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/date_and_time_1.f90
@@ -0,0 +1,35 @@
+! PR libfortran/98507
+! { dg-do run }
+
+program demo_time_and_date
+ implicit none
+ character(8) :: date
+ character(10) :: time
+ character(5) :: zone
+ integer :: val(8)
+ integer :: h, m
+
+ call date_and_time(values=val)
+
+ if (val(1) < 2000 .or. val(1) > 2100) stop 1
+ if (val(2) < 1 .or. val(2) > 12) stop 2
+ if (val(3) < 1 .or. val(3) > 31) stop 3
+
+ ! Maximum offset is 14 hours (UTC+14)
+ if (val(4) < -14*60 .or. val(4) > 14*60) stop 4
+
+ if (val(5) < 0 .or. val(5) > 23) stop 5
+ if (val(6) < 0 .or. val(6) > 59) stop 6
+ if (val(7) < 0 .or. val(7) > 60) stop 7
+ if (val(8) < 0 .or. val(8) > 999) stop 8
+
+ call date_and_time(zone=zone)
+ if (len(zone) /= 0) then
+ ! If ZONE is present, it should present the same information as
+ ! given in VALUES(4)
+ if (len(zone) /= 5) stop 9
+ read(zone(1:3),*) h
+ read(zone(4:5),*) m
+ if (val(4) /= 60*h+m) stop 10
+ endif
+end
diff --git a/gcc/testsuite/gfortran.dg/debug/debug.exp b/gcc/testsuite/gfortran.dg/debug/debug.exp
index a9c1e56..b616305 100644
--- a/gcc/testsuite/gfortran.dg/debug/debug.exp
+++ b/gcc/testsuite/gfortran.dg/debug/debug.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 Free Software Foundation, Inc.
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gfortran.dg/dec_math_5.f90 b/gcc/testsuite/gfortran.dg/dec_math_5.f90
new file mode 100644
index 0000000..dee2de4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dec_math_5.f90
@@ -0,0 +1,104 @@
+! { dg-do run }
+! { dg-additional-options "-std=gnu" }
+! { dg-require-effective-target fortran_real_10 }
+! { dg-require-effective-target fortran_real_16 }
+
+program p
+ implicit none
+ integer, parameter :: ep = selected_real_kind (17) ! real(10)
+ real(4) :: a1, e1 = 1.e-5
+ real(8) :: b1, e2 = 1.e-14
+ real(ep) :: c1, e3 = 1.e-17
+ real(16) :: d1, e4 = 1.e-30
+
+ a1 = 1; a1 = atand(a1)
+ b1 = 1; b1 = atand(b1)
+ c1 = 1; c1 = atand(c1)
+ d1 = 1; d1 = atand(d1)
+! print '(4(F15.11))', a1, b1, c1, d1
+ if (abs(a1 - 45) > e1) stop 1
+ if (abs(b1 - 45) > e2) stop 2
+ if (abs(c1 - 45) > e3) stop 3
+ if (abs(d1 - 45) > e4) stop 4
+
+ a1 = 0.5; a1 = asind(a1)
+ b1 = 0.5; b1 = asind(b1)
+ c1 = 0.5; c1 = asind(c1)
+ d1 = 0.5; d1 = asind(d1)
+ if (abs(a1 - 30) > e1) stop 5
+ if (abs(b1 - 30) > e2) stop 6
+ if (abs(c1 - 30) > e3) stop 7
+ if (abs(d1 - 30) > e4) stop 8
+
+ a1 = 0.5; a1 = acosd(a1)
+ b1 = 0.5; b1 = acosd(b1)
+ c1 = 0.5; c1 = acosd(c1)
+ d1 = 0.5; d1 = acosd(d1)
+ if (abs(a1 - 60) > e1) stop 9
+ if (abs(b1 - 60) > e2) stop 10
+ if (abs(c1 - 60) > e3) stop 11
+ if (abs(d1 - 60) > e4) stop 12
+
+ a1 = 45; a1 = tand(a1)
+ b1 = 45; b1 = tand(b1)
+ c1 = 45; c1 = tand(c1)
+ d1 = 45; d1 = tand(d1)
+ if (abs(a1 - 1) > e1) stop 13
+ if (abs(b1 - 1) > e2) stop 14
+ if (abs(c1 - 1) > e3) stop 15
+ if (abs(d1 - 1) > e4) stop 16
+
+ a1 = 60; a1 = tand(a1)
+ b1 = 60; b1 = tand(b1)
+ c1 = 60; c1 = tand(c1)
+ d1 = 60; d1 = tand(d1)
+ if (abs(a1 - sqrt (3._4) ) > e1) stop 17
+ if (abs(b1 - sqrt (3._8) ) > e2) stop 18
+ if (abs(c1 - sqrt (3._ep)) > e3) stop 19
+ if (abs(d1 - sqrt (3._16)) > e4) stop 20
+
+ a1 = 45; a1 = cotand(a1)
+ b1 = 45; b1 = cotand(b1)
+ c1 = 45; c1 = cotand(c1)
+ d1 = 45; d1 = cotand(d1)
+ if (abs(a1 - 1) > e1) stop 21
+ if (abs(b1 - 1) > e2) stop 22
+ if (abs(c1 - 1) > e3) stop 23
+ if (abs(d1 - 1) > e4) stop 24
+
+ a1 = 30; a1 = cotand(a1)
+ b1 = 30; b1 = cotand(b1)
+ c1 = 30; c1 = cotand(c1)
+ d1 = 30; d1 = cotand(d1)
+ if (abs(a1 - sqrt (3._4) ) > e1) stop 25
+ if (abs(b1 - sqrt (3._8) ) > e2) stop 26
+ if (abs(c1 - sqrt (3._ep)) > e3) stop 27
+ if (abs(d1 - sqrt (3._16)) > e4) stop 28
+
+ a1 = 1; a1 = atan2d(a1, a1)
+ b1 = 1; b1 = atan2d(b1, b1)
+ c1 = 1; c1 = atan2d(c1, c1)
+ d1 = 1; d1 = atan2d(d1, d1)
+ if (abs(a1 - 45) > e1) stop 29
+ if (abs(b1 - 45) > e2) stop 30
+ if (abs(c1 - 45) > e3) stop 31
+ if (abs(d1 - 45) > e4) stop 32
+
+ a1 = 30; a1 = sind(a1)
+ b1 = 30; b1 = sind(b1)
+ c1 = 30; c1 = sind(c1)
+ d1 = 30; d1 = sind(d1)
+ if (abs(a1 - 0.5) > e1) stop 33
+ if (abs(b1 - 0.5) > e2) stop 34
+ if (abs(c1 - 0.5) > e3) stop 35
+ if (abs(d1 - 0.5) > e4) stop 36
+
+ a1 = 60; a1 = cosd(a1)
+ b1 = 60; b1 = cosd(b1)
+ c1 = 60; c1 = cosd(c1)
+ d1 = 60; d1 = cosd(d1)
+ if (abs(a1 - 0.5) > e1) stop 37
+ if (abs(b1 - 0.5) > e2) stop 38
+ if (abs(c1 - 0.5) > e3) stop 39
+ if (abs(d1 - 0.5) > e4) stop 40
+end program p
diff --git a/gcc/testsuite/gfortran.dg/dg.exp b/gcc/testsuite/gfortran.dg/dg.exp
index 0668981..bd7ad95 100644
--- a/gcc/testsuite/gfortran.dg/dg.exp
+++ b/gcc/testsuite/gfortran.dg/dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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/diagnostic-format-json-1.F90 b/gcc/testsuite/gfortran.dg/diagnostic-format-json-1.F90
index 606fe0f..2993f7c 100644
--- a/gcc/testsuite/gfortran.dg/diagnostic-format-json-1.F90
+++ b/gcc/testsuite/gfortran.dg/diagnostic-format-json-1.F90
@@ -9,6 +9,7 @@
! { dg-regexp "\"kind\": \"error\"" }
! { dg-regexp "\"column-origin\": 1" }
+! { dg-regexp "\"escape-source\": false" }
! { dg-regexp "\"message\": \"#error message\"" }
! { dg-regexp "\"caret\": \{" }
diff --git a/gcc/testsuite/gfortran.dg/diagnostic-format-json-2.F90 b/gcc/testsuite/gfortran.dg/diagnostic-format-json-2.F90
index 56615f0..1681462 100644
--- a/gcc/testsuite/gfortran.dg/diagnostic-format-json-2.F90
+++ b/gcc/testsuite/gfortran.dg/diagnostic-format-json-2.F90
@@ -9,6 +9,7 @@
! { dg-regexp "\"kind\": \"warning\"" }
! { dg-regexp "\"column-origin\": 1" }
+! { dg-regexp "\"escape-source\": false" }
! { dg-regexp "\"message\": \"#warning message\"" }
! { dg-regexp "\"option\": \"-Wcpp\"" }
! { dg-regexp "\"option_url\": \"\[^\n\r\"\]*#index-Wcpp\"" }
diff --git a/gcc/testsuite/gfortran.dg/diagnostic-format-json-3.F90 b/gcc/testsuite/gfortran.dg/diagnostic-format-json-3.F90
index 5021475..f0a67de 100644
--- a/gcc/testsuite/gfortran.dg/diagnostic-format-json-3.F90
+++ b/gcc/testsuite/gfortran.dg/diagnostic-format-json-3.F90
@@ -9,6 +9,7 @@
! { dg-regexp "\"kind\": \"error\"" }
! { dg-regexp "\"column-origin\": 1" }
+! { dg-regexp "\"escape-source\": false" }
! { dg-regexp "\"message\": \"#warning message\"" }
! { dg-regexp "\"option\": \"-Werror=cpp\"" }
! { dg-regexp "\"option_url\": \"\[^\n\r\"\]*#index-Wcpp\"" }
diff --git a/gcc/testsuite/gfortran.dg/do_check_18.f90 b/gcc/testsuite/gfortran.dg/do_check_18.f90
new file mode 100644
index 0000000..b06112a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_check_18.f90
@@ -0,0 +1,27 @@
+! { dg-do compile }
+! PR103718,
+! PR103719 - ICE in doloop_contained_procedure_code
+! Contributed by G.Steinmetz
+
+subroutine s1
+ integer :: i
+ do i = 1, 2
+ call s
+ end do
+contains
+ subroutine s
+ integer :: n
+ inquire (iolength=n) 0 ! valid
+ end
+end
+
+subroutine s2
+ integer :: i
+ do i = 1, 2
+ call s
+ end do
+contains
+ subroutine s
+ shape(1) = 0 ! { dg-error "Non-variable expression" }
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/do_check_19.f90 b/gcc/testsuite/gfortran.dg/do_check_19.f90
new file mode 100644
index 0000000..1373a73
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_check_19.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+! { dg-prune-output "Obsolescent feature: Alternate-return argument" }
+! PR fortran/103717 - ICE in doloop_code
+! Contributed by G.Steinmetz
+
+program p
+ integer :: i
+ do i = 1, 2
+ call s(i) ! { dg-error "Missing alternate return specifier" }
+ end do
+contains
+ subroutine s(*)
+ end
+end
+
+recursive subroutine s(*)
+ integer :: i
+ do i = 1, 2
+ call s(i) ! { dg-error "Missing alternate return specifier" }
+ end do
+end
diff --git a/gcc/testsuite/gfortran.dg/do_subscript_3.f90 b/gcc/testsuite/gfortran.dg/do_subscript_3.f90
index 2f62f58..8f7183e 100644
--- a/gcc/testsuite/gfortran.dg/do_subscript_3.f90
+++ b/gcc/testsuite/gfortran.dg/do_subscript_3.f90
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-O0" }
! PR fortran/91424
! Check that only one warning is issued inside blocks, and that
! warnings are also issued for contained subroutines.
diff --git a/gcc/testsuite/gfortran.dg/eoshift_9.f90 b/gcc/testsuite/gfortran.dg/eoshift_9.f90
new file mode 100644
index 0000000..f711b04
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/eoshift_9.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! PR fortran/104331 - ICE in gfc_simplify_eoshift
+! Contributed by G.Steinmetz
+
+program p
+ character(3), parameter :: a(:) = ['123'] ! { dg-error "deferred shape" }
+ character(3), parameter :: b(*) = eoshift(a, 1)
+end
diff --git a/gcc/testsuite/gfortran.dg/external_implicit_none_3.f08 b/gcc/testsuite/gfortran.dg/external_implicit_none_3.f08
new file mode 100644
index 0000000..329deed
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/external_implicit_none_3.f08
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-std=f2018" }
+! Tests fix for PR100972 - Fails to warn about missing EXTERNAL attribute
+! Contributed by Gerhard Steinmetz
+
+program p
+ implicit none (external)
+ real, external :: f
+ real :: a
+ real :: b
+ integer :: i
+ character :: c
+ a = f() ! OK
+ b = g() ! { dg-error "Missing explicit declaration with EXTERNAL attribute" }
+ i = h() ! { dg-error "Missing explicit declaration with EXTERNAL attribute" }
+ c = j() ! { dg-error "Missing explicit declaration with EXTERNAL attribute" }
+end
diff --git a/gcc/testsuite/gfortran.dg/extract_recip_1.f b/gcc/testsuite/gfortran.dg/extract_recip_1.f
index f70157c..74d42a4 100644
--- a/gcc/testsuite/gfortran.dg/extract_recip_1.f
+++ b/gcc/testsuite/gfortran.dg/extract_recip_1.f
@@ -1,5 +1,5 @@
! { dg-do compile }
-! { dg-options "-Ofast -fdump-tree-optimized-raw" }
+! { dg-options "-Ofast -fno-tree-vectorize -fdump-tree-optimized-raw" }
SUBROUTINE F(N,X,Y,Z,A,B)
DIMENSION X(4,4), Y(4), Z(4)
diff --git a/gcc/testsuite/gfortran.dg/g77/README b/gcc/testsuite/gfortran.dg/g77/README
index f90f4a5..c2e1566 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-2021 Free Software Foundation, Inc.
+Copyright (C) 2004-2022 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/goacc-gomp/goacc-gomp.exp b/gcc/testsuite/gfortran.dg/goacc-gomp/goacc-gomp.exp
index e7d7603..11b85d1 100644
--- a/gcc/testsuite/gfortran.dg/goacc-gomp/goacc-gomp.exp
+++ b/gcc/testsuite/gfortran.dg/goacc-gomp/goacc-gomp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gfortran.dg/goacc/array-with-dt-1.f90 b/gcc/testsuite/gfortran.dg/goacc/array-with-dt-1.f90
index 4a3ff0e..136e42a 100644
--- a/gcc/testsuite/gfortran.dg/goacc/array-with-dt-1.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/array-with-dt-1.f90
@@ -1,10 +1,15 @@
+! { dg-additional-options -Wuninitialized }
+
type t
integer, allocatable :: A(:,:)
end type t
type(t), allocatable :: b(:)
+! { dg-note {'b' declared here} {} { target *-*-* } .-1 }
!$acc update host(b)
+! { dg-warning {'b\.dim\[0\]\.ubound' is used uninitialized} {} { target *-*-* } .-1 }
+! { dg-warning {'b\.dim\[0\]\.lbound' is used uninitialized} {} { target *-*-* } .-2 }
!$acc update host(b(:))
!$acc update host(b(1)%A)
!$acc update host(b(1)%A(:,:))
diff --git a/gcc/testsuite/gfortran.dg/goacc/array-with-dt-2.f90 b/gcc/testsuite/gfortran.dg/goacc/array-with-dt-2.f90
index 807580d..58f4ce8 100644
--- a/gcc/testsuite/gfortran.dg/goacc/array-with-dt-2.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/array-with-dt-2.f90
@@ -1,10 +1,15 @@
+! { dg-additional-options -Wuninitialized }
+
type t
integer, allocatable :: A(:,:)
end type t
type(t), allocatable :: b(:)
+! { dg-note {'b' declared here} {} { target *-*-* } .-1 }
!$acc update host(b(::2))
+! { dg-warning {'b\.dim\[0\]\.ubound' is used uninitialized} {} { target *-*-* } .-1 }
+! { dg-warning {'b\.dim\[0\]\.lbound' is used uninitialized} {} { target *-*-* } .-2 }
!$acc update host(b(1)%A(::3,::4))
end
diff --git a/gcc/testsuite/gfortran.dg/goacc/array-with-dt-3.f90 b/gcc/testsuite/gfortran.dg/goacc/array-with-dt-3.f90
index dcb6365..d1fa010 100644
--- a/gcc/testsuite/gfortran.dg/goacc/array-with-dt-3.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/array-with-dt-3.f90
@@ -1,3 +1,5 @@
+! { dg-additional-options -Wuninitialized }
+
type t2
integer :: A(200,200)
end type t2
@@ -6,9 +8,15 @@ type t
end type t
type(t2),allocatable :: c(:)
+! { dg-note {'c' declared here} {} { target *-*-* } .-1 }
+! { dg-note {'c\.offset' was declared here} {} { target *-*-* } .-2 }
type(t), allocatable :: d(:)
+! { dg-note {'d' declared here} {} { target *-*-* } .-1 }
+! { dg-note {'d\.offset' was declared here} {} { target *-*-* } .-2 }
!$acc exit data delete(c(1)%A)
+! { dg-warning {'c\.offset' is used uninitialized} {} { target *-*-* } .-1 }
!$acc exit data delete(d(1)%A)
+! { dg-warning {'d\.offset' is used uninitialized} {} { target *-*-* } .-1 }
end
diff --git a/gcc/testsuite/gfortran.dg/goacc/array-with-dt-4.f90 b/gcc/testsuite/gfortran.dg/goacc/array-with-dt-4.f90
index 637d5f5..ac00535 100644
--- a/gcc/testsuite/gfortran.dg/goacc/array-with-dt-4.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/array-with-dt-4.f90
@@ -1,3 +1,5 @@
+! { dg-additional-options -Wuninitialized }
+
type t4
integer, allocatable :: quux(:)
end type t4
@@ -12,7 +14,10 @@ type t
end type t
type(t), allocatable :: c(:)
+! { dg-note {'c' declared here} {} { target *-*-* } .-1 }
!$acc enter data copyin(c(5)%foo(4)%bar(3)%qux(2)%quux(:))
+! { dg-warning {'c\.offset' is used uninitialized} {} { target *-*-* } .-1 }
!$acc exit data delete(c(5)%foo(4)%bar(3)%qux(2)%quux(:))
+! { dg-warning {'c\.offset' is used uninitialized} {} { target *-*-* } .-1 }
end
diff --git a/gcc/testsuite/gfortran.dg/goacc/array-with-dt-5.f90 b/gcc/testsuite/gfortran.dg/goacc/array-with-dt-5.f90
index 900587b..ba60ca7 100644
--- a/gcc/testsuite/gfortran.dg/goacc/array-with-dt-5.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/array-with-dt-5.f90
@@ -1,3 +1,5 @@
+! { dg-additional-options -Wuninitialized }
+
type t2
integer :: bar
end type t2
@@ -6,7 +8,9 @@ type t
end type t
type(t) :: c
+! { dg-note {'c' declared here} {} { target *-*-* } .-1 }
!$acc enter data copyin(c%foo)
+! { dg-warning {'c\.foo' is used uninitialized} {} { target *-*-* } .-1 }
end
diff --git a/gcc/testsuite/gfortran.dg/goacc/classify-kernels-parloops.f95 b/gcc/testsuite/gfortran.dg/goacc/classify-kernels-parloops.f95
new file mode 100644
index 0000000..b8c2d99
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc/classify-kernels-parloops.f95
@@ -0,0 +1,43 @@
+! Check offloaded function's attributes and classification for OpenACC
+! kernels.
+
+! { dg-additional-options "--param openacc-kernels=parloops" }
+
+! { dg-additional-options "-O2" }
+! { dg-additional-options "-fopt-info-optimized-omp" }
+! { dg-additional-options "-fdump-tree-ompexp" }
+! { dg-additional-options "-fdump-tree-parloops1-all" }
+! { dg-additional-options "-fdump-tree-oaccloops" }
+
+! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
+! aspects of that functionality.
+
+program main
+ implicit none
+ integer, parameter :: n = 1024
+ integer, dimension (0:n-1) :: a, b, c
+ integer :: i
+
+ call setup(a, b)
+
+ !$acc kernels copyin (a(0:n-1), b(0:n-1)) copyout (c(0:n-1)) ! { dg-message "optimized: assigned OpenACC gang loop parallelism" }
+ do i = 0, n - 1
+ c(i) = a(i) + b(i)
+ end do
+ !$acc end kernels
+end program main
+
+! Check the offloaded function's attributes.
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels, omp target entrypoint\\)\\)" 1 "ompexp" } }
+
+! Check that exactly one OpenACC kernels construct is analyzed, and that it
+! can be parallelized.
+! { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 1 "parloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint\\)\\)" 1 "parloops1" } }
+! { dg-final { scan-tree-dump-not "FAILED:" "parloops1" } }
+
+! Check the offloaded function's classification and compute dimensions (will
+! always be 1 x 1 x 1 for non-offloading compilation).
+! { dg-final { scan-tree-dump-times "(?n)Function is parallelized OpenACC kernels offload" 1 "oaccloops" } }
+! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint\\)\\)" 1 "oaccloops" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized-parloops.f95 b/gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized-parloops.f95
new file mode 100644
index 0000000..3773327
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized-parloops.f95
@@ -0,0 +1,47 @@
+! Check offloaded function's attributes and classification for unparallelized
+! OpenACC kernels.
+
+! { dg-additional-options "--param openacc-kernels=parloops" }
+
+! { dg-additional-options "-O2" }
+! { dg-additional-options "-fopt-info-optimized-omp" }
+! { dg-additional-options "-fdump-tree-ompexp" }
+! { dg-additional-options "-fdump-tree-parloops1-all" }
+! { dg-additional-options "-fdump-tree-oaccloops" }
+
+! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
+! aspects of that functionality.
+
+program main
+ implicit none
+ integer, parameter :: n = 1024
+ integer, dimension (0:n-1) :: a, b, c
+ integer :: i
+
+ ! An "external" mapping of loop iterations/array indices makes the loop
+ ! unparallelizable.
+ integer, external :: f
+
+ call setup(a, b)
+
+ !$acc kernels copyin (a(0:n-1), b(0:n-1)) copyout (c(0:n-1)) ! { dg-message "optimized: assigned OpenACC seq loop parallelism" }
+ do i = 0, n - 1
+ c(i) = a(f (i)) + b(f (i))
+ end do
+ !$acc end kernels
+end program main
+
+! Check the offloaded function's attributes.
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels, omp target entrypoint\\)\\)" 1 "ompexp" } }
+
+! Check that exactly one OpenACC kernels construct is analyzed, and that it
+! can't be parallelized.
+! { dg-final { scan-tree-dump-times "FAILED:" 1 "parloops1" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(, , \\), oacc kernels, omp target entrypoint\\)\\)" 1 "parloops1" } }
+! { dg-final { scan-tree-dump-not "SUCCESS: may be parallelized" "parloops1" } }
+
+! Check the offloaded function's classification and compute dimensions (will
+! always be 1 x 1 x 1 for non-offloading compilation).
+! { dg-final { scan-tree-dump-times "(?n)Function is unparallelized OpenACC kernels offload" 1 "oaccloops" } }
+! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops" } }
+! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc kernels, omp target entrypoint\\)\\)" 1 "oaccloops" } }
diff --git a/gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized.f95 b/gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized.f95
index 3fb48b3..ee8e289 100644
--- a/gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized.f95
@@ -1,8 +1,10 @@
! Check offloaded function's attributes and classification for unparallelized
! OpenACC kernels.
+! { dg-additional-options "--param openacc-kernels=decompose" }
+
! { dg-additional-options "-O2" }
-! { dg-additional-options "-fopt-info-optimized-omp" }
+! { dg-additional-options "-fopt-info-all-omp" }
! { dg-additional-options "-fdump-tree-ompexp" }
! { dg-additional-options "-fdump-tree-parloops1-all" }
! { dg-additional-options "-fdump-tree-oaccloops" }
@@ -23,6 +25,7 @@ program main
call setup(a, b)
!$acc kernels copyin (a(0:n-1), b(0:n-1)) copyout (c(0:n-1)) ! { dg-message "optimized: assigned OpenACC seq loop parallelism" }
+ ! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
do i = 0, n - 1
c(i) = a(f (i)) + b(f (i))
end do
diff --git a/gcc/testsuite/gfortran.dg/goacc/classify-kernels.f95 b/gcc/testsuite/gfortran.dg/goacc/classify-kernels.f95
index 6c8d298..a4bcca0 100644
--- a/gcc/testsuite/gfortran.dg/goacc/classify-kernels.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/classify-kernels.f95
@@ -1,8 +1,10 @@
! Check offloaded function's attributes and classification for OpenACC
! kernels.
+! { dg-additional-options "--param openacc-kernels=decompose" }
+
! { dg-additional-options "-O2" }
-! { dg-additional-options "-fopt-info-optimized-omp" }
+! { dg-additional-options "-fopt-info-all-omp" }
! { dg-additional-options "-fdump-tree-ompexp" }
! { dg-additional-options "-fdump-tree-parloops1-all" }
! { dg-additional-options "-fdump-tree-oaccloops" }
@@ -19,6 +21,7 @@ program main
call setup(a, b)
!$acc kernels copyin (a(0:n-1), b(0:n-1)) copyout (c(0:n-1)) ! { dg-message "optimized: assigned OpenACC gang loop parallelism" }
+ ! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
do i = 0, n - 1
c(i) = a(i) + b(i)
end do
diff --git a/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-1.f90 b/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-1.f90
index e4d360e..ac45856 100644
--- a/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-1.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-1.f90
@@ -1,3 +1,5 @@
+! { dg-additional-options -Wuninitialized }
+
type :: type1
character(len=35) :: a
end type type1
diff --git a/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-2.f90 b/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-2.f90
index cca6443..f4f791d 100644
--- a/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-2.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-2.f90
@@ -1,3 +1,5 @@
+! { dg-additional-options -Wuninitialized }
+
type :: type1
character(len=35,kind=4) :: a
end type type1
diff --git a/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-3.f90 b/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-3.f90
index 2bab497..a523d4f 100644
--- a/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-3.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-3.f90
@@ -1,5 +1,7 @@
! { dg-additional-options "-fdump-tree-gimple" }
+! { dg-additional-options -Wuninitialized }
+
type :: type1
character(len=35) :: a
end type type1
@@ -12,10 +14,16 @@ type(type1) :: foo
type(type2) :: bar
type(type1), pointer :: pfoo
+! { dg-note {'pfoo' was declared here} {} { target *-*-* } .-1 }
type(type2), pointer :: pbar
+! { dg-note {'pbar' was declared here} {} { target *-*-* } .-1 }
class(type1), pointer :: cfoo
+! { dg-note {'cfoo' declared here} {} { target *-*-* } .-1 }
+! { dg-note {'cfoo\._data' was declared here} {} { target *-*-* } .-2 }
class(type2), pointer :: cbar
+! { dg-note {'cbar' declared here} {} { target *-*-* } .-1 }
+! { dg-note {'cbar\._data' was declared here} {} { target *-*-* } .-2 }
class(type1), allocatable :: acfoo
class(type2), allocatable :: acbar
@@ -24,10 +32,14 @@ class(type2), allocatable :: acbar
!$acc enter data copyin(bar%b)
!$acc enter data copyin(pfoo%a)
+! { dg-warning {'pfoo' is used uninitialized} {} { target *-*-* } .-1 }
!$acc enter data copyin(pbar%b)
+! { dg-warning {'pbar' is used uninitialized} {} { target *-*-* } .-1 }
!$acc enter data copyin(cfoo%a)
+! { dg-warning {'cfoo\._data' is used uninitialized} {} { target *-*-* } .-1 }
!$acc enter data copyin(cbar%b)
+! { dg-warning {'cbar\._data' is used uninitialized} {} { target *-*-* } .-1 }
!$acc enter data copyin(acfoo%a)
!$acc enter data copyin(acbar%b)
diff --git a/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-4.f90 b/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-4.f90
index cfe4006..a95e3fa 100644
--- a/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-4.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-4.f90
@@ -1,5 +1,7 @@
! { dg-additional-options "-fdump-tree-gimple" }
+! { dg-additional-options -Wuninitialized }
+
type :: type1
character(len=35,kind=4) :: a
end type type1
@@ -12,10 +14,16 @@ type(type1) :: foo
type(type2) :: bar
type(type1), pointer :: pfoo
+! { dg-note {'pfoo' was declared here} {} { target *-*-* } .-1 }
type(type2), pointer :: pbar
+! { dg-note {'pbar' was declared here} {} { target *-*-* } .-1 }
class(type1), pointer :: cfoo
+! { dg-note {'cfoo' declared here} {} { target *-*-* } .-1 }
+! { dg-note {'cfoo\._data' was declared here} {} { target *-*-* } .-2 }
class(type2), pointer :: cbar
+! { dg-note {'cbar' declared here} {} { target *-*-* } .-1 }
+! { dg-note {'cbar\._data' was declared here} {} { target *-*-* } .-2 }
class(type1), allocatable :: acfoo
class(type2), allocatable :: acbar
@@ -24,10 +32,14 @@ class(type2), allocatable :: acbar
!$acc enter data copyin(bar%b)
!$acc enter data copyin(pfoo%a)
+! { dg-warning {'pfoo' is used uninitialized} {} { target *-*-* } .-1 }
!$acc enter data copyin(pbar%b)
+! { dg-warning {'pbar' is used uninitialized} {} { target *-*-* } .-1 }
!$acc enter data copyin(cfoo%a)
+! { dg-warning {'cfoo\._data' is used uninitialized} {} { target *-*-* } .-1 }
!$acc enter data copyin(cbar%b)
+! { dg-warning {'cbar\._data' is used uninitialized} {} { target *-*-* } .-1 }
!$acc enter data copyin(acfoo%a)
!$acc enter data copyin(acbar%b)
diff --git a/gcc/testsuite/gfortran.dg/goacc/derived-classtypes-1.f95 b/gcc/testsuite/gfortran.dg/goacc/derived-classtypes-1.f95
index 85a2e1d..6d88039 100644
--- a/gcc/testsuite/gfortran.dg/goacc/derived-classtypes-1.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/derived-classtypes-1.f95
@@ -1,3 +1,5 @@
+! { dg-additional-options -Wuninitialized }
+
type :: type1
integer :: a
end type type1
diff --git a/gcc/testsuite/gfortran.dg/goacc/derived-types-2.f90 b/gcc/testsuite/gfortran.dg/goacc/derived-types-2.f90
index d01583f..505e0b4 100644
--- a/gcc/testsuite/gfortran.dg/goacc/derived-types-2.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/derived-types-2.f90
@@ -1,3 +1,5 @@
+! { dg-additional-options -Wuninitialized }
+
module bar
type :: type1
real(8), pointer, public :: p(:) => null()
diff --git a/gcc/testsuite/gfortran.dg/goacc/finalize-1.f b/gcc/testsuite/gfortran.dg/goacc/finalize-1.f
index b706b38..1e5bf0b 100644
--- a/gcc/testsuite/gfortran.dg/goacc/finalize-1.f
+++ b/gcc/testsuite/gfortran.dg/goacc/finalize-1.f
@@ -20,8 +20,8 @@
! { dg-final { scan-tree-dump-times "(?n)#pragma omp target oacc_exit_data map\\(delete:del_f \\\[len: \[0-9\]+\\\]\\) finalize$" 1 "gimple" } }
!$ACC EXIT DATA FINALIZE DELETE (del_f_p(2:5))
-! { dg-final { scan-tree-dump-times "(?n)#pragma acc exit data map\\(release:\\*\\(c_char \\*\\) parm\\.0\\.data \\\[len: \[^\\\]\]+\\\]\\) map\\(to:del_f_p \\\[pointer set, len: \[0-9\]+\\\]\\) map\\(alloc:\\(integer\\(kind=1\\)\\\[0:\\\] \\* restrict\\) del_f_p\\.data \\\[pointer assign, bias: \\(.*int.*\\) parm\\.0\\.data - \\(.*int.*\\) del_f_p\\.data\\\]\\) finalize;$" 1 "original" } }
-! { dg-final { scan-tree-dump-times "(?n)#pragma omp target oacc_exit_data map\\(delete:MEM\\\[\\(c_char \\*\\)\[^\\\]\]+\\\] \\\[len: \[^\\\]\]+\\\]\\) map\\(to:del_f_p \\\[pointer set, len: \[0-9\]+\\\]\\) map\\(alloc:del_f_p\\.data \\\[pointer assign, bias: \[^\\\]\]+\\\]\\) finalize$" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "(?n)#pragma acc exit data map\\(release:\\*\\(integer\\(kind=.\\)\\\[0:\\\] \\*\\) parm\\.0\\.data \\\[len: \[^\\\]\]+\\\]\\) map\\(to:del_f_p \\\[pointer set, len: \[0-9\]+\\\]\\) map\\(alloc:\\(integer\\(kind=1\\)\\\[0:\\\] \\* restrict\\) del_f_p\\.data \\\[pointer assign, bias: \\(.*int.*\\) parm\\.0\\.data - \\(.*int.*\\) del_f_p\\.data\\\]\\) finalize;$" 1 "original" } }
+! { dg-final { scan-tree-dump-times "(?n)#pragma omp target oacc_exit_data map\\(delete:MEM <\[^>\]+> \\\[\\(integer\\(kind=.\\)\\\[0:\\\] \\*\\)_\[0-9\]+\\\] \\\[len: \[^\\\]\]+\\\]\\) map\\(to:del_f_p \\\[pointer set, len: \[0-9\]+\\\]\\) map\\(alloc:del_f_p\\.data \\\[pointer assign, bias: \[^\\\]\]+\\\]\\) finalize$" 1 "gimple" } }
!$ACC EXIT DATA COPYOUT (cpo_r)
! { dg-final { scan-tree-dump-times "(?n)#pragma acc exit data map\\(from:cpo_r\\);$" 1 "original" } }
@@ -32,6 +32,6 @@
! { dg-final { scan-tree-dump-times "(?n)#pragma omp target oacc_exit_data map\\(force_from:cpo_f \\\[len: \[0-9\]+\\\]\\) finalize$" 1 "gimple" } }
!$ACC EXIT DATA COPYOUT (cpo_f_p(4:10)) FINALIZE
-! { dg-final { scan-tree-dump-times "(?n)#pragma acc exit data map\\(from:\\*\\(c_char \\*\\) parm\\.1\\.data \\\[len: \[^\\\]\]+\\\]\\) map\\(to:cpo_f_p \\\[pointer set, len: \[0-9\]+\\\]\\) map\\(alloc:\\(integer\\(kind=1\\)\\\[0:\\\] \\* restrict\\) cpo_f_p\\.data \\\[pointer assign, bias: \\(.*int.*\\) parm\\.1\\.data - \\(.*int.*\\) cpo_f_p\\.data\\\]\\) finalize;$" 1 "original" } }
-! { dg-final { scan-tree-dump-times "(?n)#pragma omp target oacc_exit_data map\\(force_from:MEM\\\[\\(c_char \\*\\)\[^\\\]\]+\\\] \\\[len: \[^\\\]\]+\\\]\\) map\\(to:cpo_f_p \\\[pointer set, len: \[0-9\]+\\\]\\) map\\(alloc:cpo_f_p\\.data \\\[pointer assign, bias: \[^\\\]\]+\\\]\\) finalize$" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "(?n)#pragma acc exit data map\\(from:\\*\\(integer\\(kind=.\\)\\\[0:\\\] \\*\\) parm\\.1\\.data \\\[len: \[^\\\]\]+\\\]\\) map\\(to:cpo_f_p \\\[pointer set, len: \[0-9\]+\\\]\\) map\\(alloc:\\(integer\\(kind=1\\)\\\[0:\\\] \\* restrict\\) cpo_f_p\\.data \\\[pointer assign, bias: \\(.*int.*\\) parm\\.1\\.data - \\(.*int.*\\) cpo_f_p\\.data\\\]\\) finalize;$" 1 "original" } }
+! { dg-final { scan-tree-dump-times "(?n)#pragma omp target oacc_exit_data map\\(force_from:MEM <\[^>\]+> \\\[\\(integer\\(kind=.\\)\\\[0:\\\] \\*\\)_\[0-9\]+\\\] \\\[len: \[^\\\]\]+\\\]\\) map\\(to:cpo_f_p \\\[pointer set, len: \[0-9\]+\\\]\\) map\\(alloc:cpo_f_p\\.data \\\[pointer assign, bias: \[^\\\]\]+\\\]\\) finalize$" 1 "gimple" } }
END SUBROUTINE f
diff --git a/gcc/testsuite/gfortran.dg/goacc/goacc.exp b/gcc/testsuite/gfortran.dg/goacc/goacc.exp
index 4b7d31c..c4e9588 100644
--- a/gcc/testsuite/gfortran.dg/goacc/goacc.exp
+++ b/gcc/testsuite/gfortran.dg/goacc/goacc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gfortran.dg/goacc/host_data-tree.f95 b/gcc/testsuite/gfortran.dg/goacc/host_data-tree.f95
index e575890..9517ce4 100644
--- a/gcc/testsuite/gfortran.dg/goacc/host_data-tree.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/host_data-tree.f95
@@ -1,10 +1,14 @@
! { dg-additional-options "-fdump-tree-original -fdump-tree-gimple" }
+! { dg-additional-options -Wuninitialized }
+
program test
implicit none
integer, pointer :: p
+ ! { dg-note {'p' was declared here} {} { target *-*-* } .-1 }
!$acc host_data use_device(p)
+ ! { dg-warning {'p' is used uninitialized} {} { target *-*-* } .-1 }
! { dg-final { scan-tree-dump-times "(?n)#pragma acc host_data use_device_ptr\\(p\\)$" 1 "original" } }
! { dg-final { scan-tree-dump-times "(?n)#pragma omp target oacc_host_data use_device_ptr\\(p\\)$" 1 "gimple" } }
!$acc end host_data
diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95
index ddaf7f8..1a26844 100644
--- a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95
@@ -1,10 +1,16 @@
! Test OpenACC 'kernels' construct decomposition.
! { dg-additional-options "-fopt-info-omp-all" }
+
! { dg-additional-options "-fdump-tree-gimple" }
+
! { dg-additional-options "--param=openacc-kernels=decompose" }
! { dg-additional-options "-fdump-tree-omp_oacc_kernels_decompose" }
+! { dg-additional-options "--param=openacc-privatization=noisy" }
+! Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types):
+! { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} }
+
! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
! aspects of that functionality.
@@ -14,7 +20,7 @@
! passed to 'incr' may be unset, and in that case, it will be set to [...]",
! so to maintain compatibility with earlier Tcl releases, we manually
! initialize counter variables:
-! { dg-line l_dummy[variable c_loop_i 0] }
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0] }
! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
! "WARNING: dg-line var l_dummy defined, but not used".
@@ -24,30 +30,36 @@ program main
integer, dimension (1:N) :: a
integer :: i, sum
- !$acc kernels copyin(a(1:N)) copy(sum)
- ! { dg-bogus "optimized: assigned OpenACC seq loop parallelism" "TODO" { xfail *-*-* } .-1 }
+ !$acc kernels copyin(a(1:N)) copy(sum) ! { dg-line l_compute[incr c_compute] }
+ ! { dg-note {variable 'sum\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute }
+ ! { dg-bogus "optimized: assigned OpenACC seq loop parallelism" "TODO" { xfail *-*-* } l_compute$c_compute }
!TODO Is this maybe the report that belongs to the XFAILed report further down? */
!$acc loop ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = 1, N
sum = sum + a(i)
end do
- sum = sum + 1 ! { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" }
+ ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
+ sum = sum + 1
a(1) = a(1) + 1
!$acc loop independent ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-message "note: parallelized loop nest in OpenACC 'kernels' region" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC gang vector loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = 1, N
sum = sum + a(i)
end do
- if (sum .gt. 10) then ! { dg-message "note: beginning 'parloops' part in OpenACC 'kernels' region" }
+ ! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
+ if (sum .gt. 10) then
!$acc loop ! { dg-line l_loop_i[incr c_loop_i] }
! { dg-missed "unparallelized loop nest in OpenACC 'kernels' region: it's executed conditionally" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
!TODO { dg-optimized "assigned OpenACC seq loop parallelism" "TODO" { xfail *-*-* } l_loop_i$c_loop_i }
do i = 1, N
sum = sum + a(i)
@@ -55,7 +67,8 @@ program main
end if
!$acc loop auto ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = 1, N
sum = sum + a(i)
diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95
index 238482b..5999013 100644
--- a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95
@@ -1,9 +1,14 @@
! Test OpenACC 'kernels' construct decomposition.
! { dg-additional-options "-fopt-info-omp-all" }
+
! { dg-additional-options "--param=openacc-kernels=decompose" }
! { dg-additional-options "-O2" } for 'parloops'.
+! { dg-additional-options "--param=openacc-privatization=noisy" }
+! Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types):
+! { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} }
+
! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
! aspects of that functionality.
@@ -13,7 +18,7 @@
! passed to 'incr' may be unset, and in that case, it will be set to [...]",
! so to maintain compatibility with earlier Tcl releases, we manually
! initialize counter variables:
-! { dg-line l_dummy[variable c_loop_i 0 c_loop_j 0 c_loop_k 0 c_part 0] }
+! { dg-line l_dummy[variable c_compute 0 c_loop_i 0 c_loop_j 0 c_loop_k 0 c_part 0] }
! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
! "WARNING: dg-line var l_dummy defined, but not used".
@@ -36,7 +41,8 @@ program main
integer :: a(N), b(N), c(N)
!$acc kernels
- x = 0 ! { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" }
+ ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
+ x = 0
y = 0
y_l = x < 10
z = x
@@ -44,14 +50,17 @@ program main
;
!$acc end kernels
- !$acc kernels ! { dg-optimized "assigned OpenACC gang loop parallelism" }
- do i = 1, N ! { dg-message "note: beginning 'parloops' part in OpenACC 'kernels' region" }
+ !$acc kernels ! { dg-line l_compute[incr c_compute] }
+ ! { dg-optimized {assigned OpenACC gang loop parallelism} {} { target *-*-* } l_compute$c_compute }
+ ! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
+ do i = 1, N
a(i) = 0
end do
!$acc end kernels
!$acc kernels loop ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = 1, N
b(i) = a(N - i + 1)
@@ -59,47 +68,55 @@ program main
!$acc kernels
!$acc loop ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = 1, N
b(i) = a(N - i + 1)
end do
!$acc loop ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = 1, N
c(i) = a(i) * b(i)
end do
- a(z) = 0 ! { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" }
+ ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
+ a(z) = 0
!$acc loop ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-message "note: forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {forwarded loop nest in OpenACC 'kernels' region to 'parloops' for analysis} {} { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = 1, N
c(i) = c(i) + a(i)
end do
!$acc loop seq ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-message "note: parallelized loop nest in OpenACC 'kernels' region" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = 1 + 1, N
c(i) = c(i) + c(i - 1)
end do
!$acc end kernels
- !$acc kernels
+ !$acc kernels ! { dg-line l_compute[incr c_compute] }
!TODO What does this mean?
- !TODO { dg-optimized "assigned OpenACC worker vector loop parallelism" "" { target *-*-* } .-2 }
+ !TODO { dg-optimized "assigned OpenACC worker vector loop parallelism" "" { target *-*-* } l_compute$c_compute }
!$acc loop independent ! { dg-line l_loop_i[incr c_loop_i] }
- ! { dg-message "note: parallelized loop nest in OpenACC 'kernels' region" "" { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i }
+ ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i }
! { dg-optimized "assigned OpenACC gang loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i }
do i = 1, N
!$acc loop independent ! { dg-line l_loop_j[incr c_loop_j] }
+ ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
! { dg-optimized "assigned OpenACC worker loop parallelism" "" { target *-*-* } l_loop_j$c_loop_j }
do j = 1, N
!$acc loop independent ! { dg-line l_loop_k[incr c_loop_k] }
+ ! { dg-note {variable 'k' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_k$c_loop_k }
! { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } l_loop_k$c_loop_k }
! { dg-optimized "assigned OpenACC seq loop parallelism" "" { target *-*-* } l_loop_k$c_loop_k }
do k = 1, N
@@ -112,24 +129,27 @@ program main
!TODO Should the following turn into "gang-single" instead of "parloops"?
!TODO The problem is that the first STMT is 'if (y <= 4) goto <D.2547>; else goto <D.2548>;', thus "parloops".
- if (y < 5) then ! { dg-message "note: beginning 'parloops' part in OpenACC 'kernels' region" }
+ ! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
+ if (y < 5) then
!$acc loop independent ! { dg-line l_loop_j[incr c_loop_j] }
! { dg-missed "unparallelized loop nest in OpenACC 'kernels' region: it's executed conditionally" "" { target *-*-* } l_loop_j$c_loop_j }
+ ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
do j = 1, N
b(j) = f_w (c(j))
end do
end if
!$acc end kernels
- !$acc kernels
- ! { dg-bogus "\[Ww\]arning: region contains gang partitioned code but is not gang partitioned" "TODO 'kernels'" { xfail *-*-* } .-1 }
+ !$acc kernels ! { dg-line l_compute[incr c_compute] }
+ ! { dg-bogus "\[Ww\]arning: region contains gang partitioned code but is not gang partitioned" "TODO 'kernels'" { xfail *-*-* } l_compute$c_compute }
y = f_g (a(5)) ! { dg-line l_part[incr c_part] }
!TODO If such a construct is placed in its own part (like it is, here), can't this actually use gang paralelism, instead of "gang-single"?
- ! { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" "" { target *-*-* } l_part$c_part }
+ ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } l_part$c_part }
! { dg-optimized "assigned OpenACC gang worker vector loop parallelism" "" { target *-*-* } l_part$c_part }
!$acc loop independent ! { dg-line l_loop_j[incr c_loop_j] }
- ! { dg-message "note: parallelized loop nest in OpenACC 'kernels' region" "" { target *-*-* } l_loop_j$c_loop_j }
+ ! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_j$c_loop_j }
+ ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
! { dg-optimized "assigned OpenACC gang loop parallelism" "" { target *-*-* } l_loop_j$c_loop_j }
do j = 1, N
b(j) = y + f_w (c(j)) ! { dg-optimized "assigned OpenACC worker vector loop parallelism" }
@@ -137,18 +157,22 @@ program main
!$acc end kernels
!$acc kernels
- y = 3 ! { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" }
+ ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
+ y = 3
!$acc loop independent ! { dg-line l_loop_j[incr c_loop_j] }
- ! { dg-message "note: parallelized loop nest in OpenACC 'kernels' region" "" { target *-*-* } l_loop_j$c_loop_j }
+ ! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_j$c_loop_j }
+ ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_j$c_loop_j }
! { dg-optimized "assigned OpenACC gang worker loop parallelism" "" { target *-*-* } l_loop_j$c_loop_j }
do j = 1, N
b(j) = y + f_v (c(j)) ! { dg-optimized "assigned OpenACC vector loop parallelism" }
end do
- z = 2 ! { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" }
+ ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
+ z = 2
!$acc end kernels
- !$acc kernels ! { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" }
+ ! { dg-note {beginning 'gang-single' part in OpenACC 'kernels' region} {} { target *-*-* } .+1 }
+ !$acc kernels
!$acc end kernels
end program main
diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95
index 688ed0a..ceb07fb 100644
--- a/gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95
@@ -3,9 +3,12 @@
! { dg-additional-options "--param=openacc-kernels=decompose" }
! { dg-additional-options "-fdump-tree-omp_oacc_kernels_decompose" }
+! { dg-additional-options -Wuninitialized }
+
program test
implicit none
integer :: q, i, j, k, m, n, o, p, r, s, t, u, v, w
+ ! { dg-note {'i' was declared here} {} { target *-*-* } .-1 }
logical :: l = .true.
!$acc kernels if(l) async num_gangs(i) num_workers(i) vector_length(i) &
@@ -13,6 +16,7 @@ program test
!$acc no_create(n) &
!$acc present(o), pcopy(p), pcopyin(r), pcopyout(s), pcreate(t) &
!$acc deviceptr(u)
+ ! { dg-warning {'i' is used uninitialized} {} { target *-*-* } .-1 }
!$acc end kernels
end program test
diff --git a/gcc/testsuite/gfortran.dg/goacc/modules.f95 b/gcc/testsuite/gfortran.dg/goacc/modules.f95
index 19a2abe..1e8d826 100644
--- a/gcc/testsuite/gfortran.dg/goacc/modules.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/modules.f95
@@ -1,4 +1,4 @@
-! { dg-do compile }
+! { dg-additional-options -Wuninitialized }
MODULE reduction_test
@@ -18,6 +18,8 @@ SUBROUTINE reduction_kernel(x_min,x_max,y_min,y_max,arr,sum)
!$ACC DATA PRESENT(arr) COPY(sum)
!$ACC PARALLEL LOOP REDUCTION(+ : sum)
+ ! { dg-bogus {'sum\.[0-9]+' is used uninitialized} TODO { xfail *-*-* } .-1 }
+ ! { dg-note {'sum\.[0-9]+' was declared here} {} { target *-*-* } .-2 }
DO k=y_min,y_max
DO j=x_min,x_max
sum=sum*arr(j,k)
diff --git a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-kernels.f90 b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-kernels.f90
index 60cb630..73812fe 100644
--- a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-kernels.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-kernels.f90
@@ -2,11 +2,16 @@
! See also 'c-c++-common/goacc/nested-reductions-1-kernels.c'.
+! { dg-additional-options -Wuninitialized }
+
subroutine acc_kernels ()
implicit none (type, external)
integer :: i, j, k, sum, diff
!$acc kernels
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
!$acc loop reduction(+:sum)
do i = 1, 10
do j = 1, 10
@@ -94,6 +99,9 @@ subroutine acc_kernels_loop ()
integer :: h, i, j, k, l, sum, diff
!$acc kernels loop
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
do h = 1, 10
!$acc loop reduction(+:sum)
do i = 1, 10
@@ -192,6 +200,9 @@ subroutine acc_kernels_loop_reduction ()
integer :: h, i, j, k, sum, diff
!$acc kernels loop reduction(+:sum)
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
do h = 1, 10
do i = 1, 10
do j = 1, 10
diff --git a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-parallel.f90 b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-parallel.f90
index 2915d67..9494f34 100644
--- a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-parallel.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-parallel.f90
@@ -2,11 +2,16 @@
! See also 'c-c++-common/goacc/nested-reductions-1-parallel.c'.
+! { dg-additional-options -Wuninitialized }
+
subroutine acc_parallel ()
implicit none (type, external)
integer :: i, j, k, sum, diff
!$acc parallel
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
!$acc loop reduction(+:sum)
do i = 1, 10
do j = 1, 10
@@ -94,6 +99,9 @@ subroutine acc_parallel_loop ()
integer :: h, i, j, k, l, sum, diff
!$acc parallel loop
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
do h = 1, 10
!$acc loop reduction(+:sum)
do i = 1, 10
@@ -183,6 +191,9 @@ subroutine acc_parallel_reduction ()
integer :: i, j, k, sum, diff
!$acc parallel reduction(+:sum)
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
do i = 1, 10
do j = 1, 10
do k = 1, 10
@@ -296,6 +307,9 @@ subroutine acc_parallel_loop_reduction ()
integer :: h, i, j, k, sum, diff
!$acc parallel loop reduction(+:sum)
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
do h = 1, 10
do i = 1, 10
do j = 1, 10
diff --git a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-routine.f90 b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-routine.f90
index 17a5861..f89e9fe 100644
--- a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-routine.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-routine.f90
@@ -2,13 +2,17 @@
! See also 'c-c++-common/goacc/nested-reductions-1-routine.c'.
+! { dg-additional-options -Wuninitialized }
+
subroutine acc_routine ()
implicit none (type, external)
!$acc routine gang
integer :: i, j, k, sum, diff
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum)
+ ! { dg-warning {'sum' is used uninitialized} {} { target *-*-* } .-1 }
do i = 1, 10
do j = 1, 10
do k = 1, 10
@@ -17,6 +21,7 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop collapse(2) reduction(+:sum)
do i = 1, 10
do j = 1, 10
@@ -26,6 +31,7 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum)
do i = 1, 10
!$acc loop reduction(+:sum)
@@ -36,6 +42,7 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum)
do i = 1, 10
!$acc loop collapse(2) reduction(+:sum)
@@ -46,6 +53,7 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum)
do i = 1, 10
do j = 1, 10
@@ -56,6 +64,7 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum)
do i = 1, 10
!$acc loop reduction(+:sum)
@@ -67,7 +76,9 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum) reduction(-:diff)
+ ! { dg-warning {'diff' is used uninitialized} {} { target *-*-* } .-1 }
do i = 1, 10
!$acc loop reduction(+:sum)
do j = 1, 10
diff --git a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-kernels.f90 b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-kernels.f90
index 6ee41843..8b143e9 100644
--- a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-kernels.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-kernels.f90
@@ -2,11 +2,16 @@
! See also 'c-c++-common/goacc/nested-reductions-2-kernels.c'.
+! { dg-additional-options -Wuninitialized }
+
subroutine acc_kernels ()
implicit none (type, external)
integer :: i, j, k, l, sum, diff
!$acc kernels
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
!$acc loop reduction(+:sum)
do i = 1, 10
!$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
@@ -126,6 +131,9 @@ subroutine acc_kernels_loop ()
integer :: h, i, j, k, l, sum, diff
!$acc kernels loop
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
do h = 1, 10
!$acc loop reduction(+:sum)
do i = 1, 10
@@ -266,6 +274,9 @@ subroutine acc_kernels_loop_reduction ()
integer :: h, i, j, k, l, sum, diff
!$acc kernels loop reduction(+:sum)
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
do h = 1, 10
!$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
do i = 1, 10
diff --git a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-parallel.f90 b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-parallel.f90
index 8fa2cab..99cd22c 100644
--- a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-parallel.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-parallel.f90
@@ -2,11 +2,16 @@
! See also 'c-c++-common/goacc/nested-reductions-2-parallel.c'.
+! { dg-additional-options -Wuninitialized }
+
subroutine acc_parallel ()
implicit none (type, external)
integer :: i, j, k, l, sum, diff
!$acc parallel
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
!$acc loop reduction(+:sum)
do i = 1, 10
!$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
@@ -126,6 +131,9 @@ subroutine acc_parallel_loop ()
integer :: h, i, j, k, l, sum, diff
!$acc parallel loop
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
do h = 1, 10
!$acc loop reduction(+:sum)
do i = 1, 10
@@ -257,6 +265,9 @@ subroutine acc_parallel_reduction ()
integer :: i, j, k, l, sum, diff
!$acc parallel reduction(+:sum)
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
!$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
do i = 1, 10
!$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
@@ -376,6 +387,9 @@ subroutine acc_parallel_loop_reduction ()
integer :: h, i, j, k, l, sum, diff
!$acc parallel loop reduction(+:sum)
+ ! implicit 'copy (sum, diff)'
+ ! { dg-warning {'sum' is used uninitialized} TODO { xfail *-*-* } .-2 }
+ ! { dg-warning {'diff' is used uninitialized} TODO { xfail *-*-* } .-3 }
do h = 1, 10
!$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
do i = 1, 10
diff --git a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-routine.f90 b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-routine.f90
index cc7802e..d60ec58 100644
--- a/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-routine.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-routine.f90
@@ -2,12 +2,16 @@
! See also 'c-c++-common/goacc/nested-reductions-2-routine.c'.
+! { dg-additional-options -Wuninitialized }
+
subroutine acc_routine ()
implicit none (type, external)
!$acc routine gang
integer :: i, j, k, l, sum, diff
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum)
+ ! { dg-warning {'sum' is used uninitialized} {} { target *-*-* } .-1 }
do i = 1, 10
!$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
do j = 1, 10
@@ -18,6 +22,7 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum)
do i = 1, 10
!$acc loop collapse(2) ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
@@ -31,6 +36,7 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum)
do i = 1, 10
!$acc loop ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
@@ -46,6 +52,7 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum)
do i = 1, 10
!$acc loop reduction(-:sum) ! { dg-warning "conflicting reduction operations for .sum." }
@@ -57,6 +64,7 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum)
do i = 1, 10
!$acc loop reduction(-:sum) ! { dg-warning "conflicting reduction operations for .sum." }
@@ -68,6 +76,7 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum)
do i = 1, 10
!$acc loop reduction(-:sum) ! { dg-warning "conflicting reduction operations for .sum." }
@@ -83,6 +92,7 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum)
do i = 1, 10
!$acc loop reduction(-:sum) ! { dg-warning "conflicting reduction operations for .sum." }
@@ -98,7 +108,9 @@ subroutine acc_routine ()
end do
end do
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
!$acc loop reduction(+:sum) reduction(-:diff)
+ ! { dg-warning {'diff' is used uninitialized} {} { target *-*-* } .-1 }
do i = 1, 10
!$acc loop reduction(-:diff) ! { dg-warning "nested loop in reduction needs reduction clause for .sum." }
do j = 1, 10
diff --git a/gcc/testsuite/gfortran.dg/goacc/orphan-reductions-1.f90 b/gcc/testsuite/gfortran.dg/goacc/orphan-reductions-1.f90
new file mode 100644
index 0000000..8eed080
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc/orphan-reductions-1.f90
@@ -0,0 +1,210 @@
+! Verify that gang reduction on orphan OpenACC loops reported as errors.
+
+! { dg-do compile }
+
+subroutine s1
+ implicit none
+
+ integer, parameter :: n = 100
+ integer :: i, sum
+ sum = 0
+
+ !$acc parallel reduction(+:sum)
+ do i = 1, n
+ sum = sum + 1
+ end do
+ !$acc end parallel
+
+ !$acc parallel loop gang reduction(+:sum)
+ do i = 1, n
+ sum = sum + 1
+ end do
+
+ !$acc parallel
+ !$acc loop gang reduction(+:sum)
+ do i = 1, n
+ sum = sum + 1
+ end do
+ !$acc end parallel
+end subroutine s1
+
+subroutine s2
+ implicit none
+ !$acc routine gang
+
+ integer, parameter :: n = 100
+ integer :: i, j, sum
+ sum = 0
+
+ !$acc loop gang reduction(+:sum) ! { dg-error "gang reduction on an orphan loop" }
+ do i = 1, n
+ sum = sum + 1
+ end do
+
+ !$acc loop reduction(+:sum)
+ ! { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
+ do i = 1, n
+ !$acc loop gang reduction(+:sum) ! { dg-error "gang reduction on an orphan loop" }
+ do j = 1, n
+ sum = sum + 1
+ end do
+ end do
+end subroutine s2
+
+integer function f1 ()
+ implicit none
+
+ integer, parameter :: n = 100
+ integer :: i, sum
+ sum = 0
+
+ !$acc parallel reduction(+:sum)
+ do i = 1, n
+ sum = sum + 1
+ end do
+ !$acc end parallel
+
+ !$acc parallel loop gang reduction(+:sum)
+ do i = 1, n
+ sum = sum + 1
+ end do
+
+ !$acc parallel
+ !$acc loop gang reduction(+:sum)
+ do i = 1, n
+ sum = sum + 1
+ end do
+ !$acc end parallel
+
+ f1 = sum
+end function f1
+
+integer function f2 ()
+ implicit none
+ !$acc routine gang
+
+ integer, parameter :: n = 100
+ integer :: i, j, sum
+ sum = 0
+
+ !$acc loop gang reduction(+:sum) ! { dg-error "gang reduction on an orphan loop" }
+ do i = 1, n
+ sum = sum + 1
+ end do
+
+ !$acc loop reduction(+:sum)
+ ! { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
+ do i = 1, n
+ !$acc loop gang reduction(+:sum) ! { dg-error "gang reduction on an orphan loop" }
+ do j = 1, n
+ sum = sum + 1
+ end do
+ end do
+
+ f2 = sum
+end function f2
+
+module m
+contains
+ subroutine s3
+ implicit none
+
+ integer, parameter :: n = 100
+ integer :: i, sum
+ sum = 0
+
+ !$acc parallel reduction(+:sum)
+ do i = 1, n
+ sum = sum + 1
+ end do
+ !$acc end parallel
+
+ !$acc parallel loop gang reduction(+:sum)
+ do i = 1, n
+ sum = sum + 1
+ end do
+
+ !$acc parallel
+ !$acc loop gang reduction(+:sum)
+ do i = 1, n
+ sum = sum + 1
+ end do
+ !$acc end parallel
+ end subroutine s3
+
+ subroutine s4
+ implicit none
+ !$acc routine gang
+
+ integer, parameter :: n = 100
+ integer :: i, j, sum
+ sum = 0
+
+ !$acc loop gang reduction(+:sum) ! { dg-error "gang reduction on an orphan loop" }
+ do i = 1, n
+ sum = sum + 1
+ end do
+
+ !$acc loop reduction(+:sum)
+ ! { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
+ do i = 1, n
+ !$acc loop gang reduction(+:sum) ! { dg-error "gang reduction on an orphan loop" }
+ do j = 1, n
+ sum = sum + 1
+ end do
+ end do
+ end subroutine s4
+
+ integer function f3 ()
+ implicit none
+
+ integer, parameter :: n = 100
+ integer :: i, sum
+ sum = 0
+
+ !$acc parallel reduction(+:sum)
+ do i = 1, n
+ sum = sum + 1
+ end do
+ !$acc end parallel
+
+ !$acc parallel loop gang reduction(+:sum)
+ do i = 1, n
+ sum = sum + 1
+ end do
+
+ !$acc parallel
+ !$acc loop gang reduction(+:sum)
+ do i = 1, n
+ sum = sum + 1
+ end do
+ !$acc end parallel
+
+ f3 = sum
+ end function f3
+
+ integer function f4 ()
+ implicit none
+ !$acc routine gang
+
+ integer, parameter :: n = 100
+ integer :: i, j, sum
+ sum = 0
+
+ !$acc loop gang reduction(+:sum) ! { dg-error "gang reduction on an orphan loop" }
+ do i = 1, n
+ sum = sum + 1
+ end do
+
+ !$acc loop reduction(+:sum)
+ ! { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
+ do i = 1, n
+ !$acc loop gang reduction(+:sum) ! { dg-error "gang reduction on an orphan loop" }
+ do j = 1, n
+ sum = sum + 1
+ end do
+ end do
+
+ f4 = sum
+ end function f4
+end module m
diff --git a/gcc/testsuite/gfortran.dg/goacc/orphan-reductions-2.f90 b/gcc/testsuite/gfortran.dg/goacc/orphan-reductions-2.f90
new file mode 100644
index 0000000..47f8a32
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc/orphan-reductions-2.f90
@@ -0,0 +1,93 @@
+! Verify that we diagnose "gang reduction on an orphan loop" for automatically
+! assigned gang level of parallelism.
+
+! { dg-do compile }
+! { dg-additional-options "-fopt-info-optimized-omp" }
+! { dg-additional-options "-Wopenacc-parallelism" }
+
+subroutine s1
+ implicit none
+ !$acc routine gang
+ ! { dg-bogus "\[Ww\]arning: region is worker partitioned but does not contain worker partitioned code" "TODO default 'gang' 'vector'" { xfail *-*-* } .-3 }
+ !TODO It's the compiler's own decision to not use 'worker' parallelism here, so it doesn't make sense to bother the user about it.
+ integer i, sum
+
+ sum = 0
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
+ !$acc loop reduction (+:sum) ! { dg-optimized "assigned OpenACC gang vector loop parallelism" }
+ do i = 1, 10
+ sum = sum + 1
+ end do
+end subroutine s1
+
+subroutine s2
+ implicit none
+ !$acc routine gang
+ integer i, j, sum
+
+ sum = 0
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
+ !$acc loop reduction (+:sum) ! { dg-optimized "assigned OpenACC gang worker loop parallelism" }
+ do i = 1, 10
+ !$acc loop reduction (+:sum) ! { dg-optimized "assigned OpenACC vector loop parallelism" }
+ do j = 1, 10
+ sum = sum + 1
+ end do
+ end do
+end subroutine s2
+
+subroutine s3
+ implicit none
+ !$acc routine gang
+ integer i, j, k, sum
+
+ sum = 0
+ ! { dg-error "gang reduction on an orphan loop" "" { target *-*-* } .+1 }
+ !$acc loop reduction (+:sum) ! { dg-optimized "assigned OpenACC gang loop parallelism" }
+ do i = 1, 10
+ !$acc loop reduction (+:sum) ! { dg-optimized "assigned OpenACC worker loop parallelism" }
+ do j = 1, 10
+ !$acc loop reduction (+:sum) ! { dg-optimized "assigned OpenACC vector loop parallelism" }
+ do k = 1, 10
+ sum = sum + 1
+ end do
+ end do
+ end do
+end subroutine s3
+
+subroutine s4
+ implicit none
+
+ integer i, j, k, sum
+
+ sum = 0
+ !$acc parallel copy(sum)
+ !$acc loop reduction (+:sum) ! { dg-optimized "assigned OpenACC gang vector loop parallelism" }
+ do i = 1, 10
+ sum = sum + 1
+ end do
+ !$acc end parallel
+
+ !$acc parallel copy(sum)
+ !$acc loop reduction (+:sum) ! { dg-optimized "assigned OpenACC gang worker loop parallelism" }
+ do i = 1, 10
+ !$acc loop reduction (+:sum) ! { dg-optimized "assigned OpenACC vector loop parallelism" }
+ do j = 1, 10
+ sum = sum + 1
+ end do
+ end do
+ !$acc end parallel
+
+ !$acc parallel copy(sum)
+ !$acc loop reduction (+:sum) ! { dg-optimized "assigned OpenACC gang loop parallelism" }
+ do i = 1, 10
+ !$acc loop reduction (+:sum) ! { dg-optimized "assigned OpenACC worker loop parallelism" }
+ do j = 1, 10
+ !$acc loop reduction (+:sum) ! { dg-optimized "assigned OpenACC vector loop parallelism" }
+ do k = 1, 10
+ sum = sum + 1
+ end do
+ end do
+ end do
+ !$acc end parallel
+end subroutine s4
diff --git a/gcc/testsuite/gfortran.dg/goacc/orphan-reductions-3.f90 b/gcc/testsuite/gfortran.dg/goacc/orphan-reductions-3.f90
new file mode 100644
index 0000000..1e0b1d6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc/orphan-reductions-3.f90
@@ -0,0 +1,89 @@
+! Verify that the error message for gang reductions on orphaned OpenACC loops
+! is not reported for non-orphaned loops.
+
+! { dg-additional-options "-Wopenacc-parallelism" }
+
+subroutine kernels
+ implicit none
+
+ integer, parameter :: n = 100
+ integer :: i, sum
+ sum = 0
+
+ !$acc kernels
+ !$acc loop gang reduction(+:sum) ! { dg-bogus "gang reduction on an orphan loop" }
+ do i = 1, n
+ sum = sum + 1
+ end do
+ !$acc end kernels
+end subroutine kernels
+
+subroutine parallel
+ implicit none
+
+ integer, parameter :: n = 100
+ integer :: i, sum
+ sum = 0
+
+ !$acc parallel
+ !$acc loop gang reduction(+:sum) ! { dg-bogus "gang reduction on an orphan loop" }
+ do i = 1, n
+ sum = sum + 1
+ end do
+ !$acc end parallel
+end subroutine parallel
+
+subroutine serial
+ implicit none
+
+ integer, parameter :: n = 100
+ integer :: i, sum
+ sum = 0
+
+ !$acc serial ! { dg-warning "region contains gang partitioned code but is not gang partitioned" }
+ !$acc loop gang reduction(+:sum) ! { dg-bogus "gang reduction on an orphan loop" }
+ do i = 1, n
+ sum = sum + 1
+ end do
+ !$acc end serial
+end subroutine serial
+
+subroutine kernels_combined
+ implicit none
+
+ integer, parameter :: n = 100
+ integer :: i, sum
+ sum = 0
+
+ !$acc kernels loop gang reduction(+:sum) ! { dg-bogus "gang reduction on an orphan loop" }
+ do i = 1, n
+ sum = sum + 1
+ end do
+end subroutine kernels_combined
+
+subroutine parallel_combined
+ implicit none
+
+ integer, parameter :: n = 100
+ integer :: i, sum
+ sum = 0
+
+ !$acc parallel loop gang reduction(+:sum) ! { dg-bogus "gang reduction on an orphan loop" }
+ do i = 1, n
+ sum = sum + 1
+ end do
+end subroutine parallel_combined
+
+subroutine serial_combined
+ implicit none
+
+ integer, parameter :: n = 100
+ integer :: i, sum
+ sum = 0
+
+ !$acc serial loop gang reduction(+:sum) ! { dg-bogus "gang reduction on an orphan loop" }
+ ! { dg-warning "region contains gang partitioned code but is not gang partitioned" "" { target *-*-* } .-1 }
+ do i = 1, n
+ sum = sum + 1
+ end do
+end subroutine serial_combined
diff --git a/gcc/testsuite/gfortran.dg/goacc/parallel-tree.f95 b/gcc/testsuite/gfortran.dg/goacc/parallel-tree.f95
index c51cb2a..6110d93 100644
--- a/gcc/testsuite/gfortran.dg/goacc/parallel-tree.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/parallel-tree.f95
@@ -2,12 +2,15 @@
! test for tree-dump-original and spaces-commas
+! { dg-additional-options -Wuninitialized }
+
! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
! aspects of that functionality.
program test
implicit none
integer :: q, i, j, k, m, n, o, p, r, s, t, u, v, w
+ ! { dg-note {'i' was declared here} {} { target *-*-* } .-1 }
logical :: l = .true.
!$acc parallel if(l) async num_gangs(i) num_workers(i) vector_length(i) &
@@ -15,9 +18,10 @@ program test
!$acc no_create(n) &
!$acc present(o), pcopy(p), pcopyin(r), pcopyout(s), pcreate(t) &
!$acc deviceptr(u), private(v), firstprivate(w)
- ! { dg-warning "region is gang partitioned but does not contain gang partitioned code" "" { target *-*-* } .-1 }
- ! { dg-warning "region is worker partitioned but does not contain worker partitioned code" "" { target *-*-* } .-2 }
- ! { dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } .-3 }
+ ! { dg-warning {'i' is used uninitialized} {} { target *-*-* } .-1 }
+ ! { dg-warning "region is gang partitioned but does not contain gang partitioned code" "" { target *-*-* } .-2 }
+ ! { dg-warning "region is worker partitioned but does not contain worker partitioned code" "" { target *-*-* } .-3 }
+ ! { dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } .-4 }
!$acc end parallel
end program test
diff --git a/gcc/testsuite/gfortran.dg/goacc/pr93464.f90 b/gcc/testsuite/gfortran.dg/goacc/pr93464.f90
index 9221065..c92f1d3 100644
--- a/gcc/testsuite/gfortran.dg/goacc/pr93464.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/pr93464.f90
@@ -1,13 +1,16 @@
-! { dg-do compile }
-!
! PR fortran/93464
!
! Contributed by G. Steinmetz
-!
+
+! { dg-additional-options -Wuninitialized }
+
program p
character :: c(2) = 'a'
character, allocatable :: z(:)
+ ! { dg-note {'z' declared here} {} { target *-*-* } .-1 }
!$acc parallel
+ ! { dg-warning {'z\.dim\[0\]\.ubound' is used uninitialized} {} { target *-*-* } .-1 }
+ ! { dg-warning {'z\.dim\[0\]\.lbound' is used uninitialized} {} { target *-*-* } .-2 }
!$omp target
z = c
!$acc end parallel
diff --git a/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute-loop.f90 b/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute-loop.f90
index bcd7159..c825a95 100644
--- a/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute-loop.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute-loop.f90
@@ -4,6 +4,8 @@
! { dg-additional-options "--param=openacc-privatization=noisy" } for
! testing/documenting aspects of that functionality.
+! { dg-additional-options -Wuninitialized }
+
! See also '../../c-c++-common/goacc/privatization-1-compute-loop.c'.
!TODO More cases should be added here.
@@ -38,6 +40,7 @@ contains
! (See C/C++ example.)
a = g (i, j, a, c)
+ ! { dg-warning {'a' is used uninitialized} TODO { xfail *-*-* } .-1 }
x = a
!$acc atomic write
y = a
@@ -50,7 +53,6 @@ contains
! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
! { dg-note {variable 'y' in 'private' clause is candidate for adjusting OpenACC privatization level} "" { target *-*-* } l_loop$c_loop }
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_loop$c_loop }
- ! { dg-note {variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
! { dg-note {variable 'y' ought to be adjusted for OpenACC privatization level: 'vector'} "" { target *-*-* } l_loop$c_loop }
!$acc end parallel
end subroutine f
diff --git a/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90 b/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90
index 31f998d..a88203e 100644
--- a/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90
@@ -4,6 +4,8 @@
! { dg-additional-options "--param=openacc-privatization=noisy" } for
! testing/documenting aspects of that functionality.
+! { dg-additional-options -Wuninitialized }
+
! See also '../../c-c++-common/goacc/privatization-1-compute.c'.
!TODO More cases should be added here.
@@ -11,13 +13,13 @@
! passed to 'incr' may be unset, and in that case, it will be set to [...]",
! so to maintain compatibility with earlier Tcl releases, we manually
! initialize counter variables:
-! { dg-line l_dummy[variable c_compute 0] }
+! { dg-line l_dummy[variable c_compute 0 c_function 0] }
! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
! "WARNING: dg-line var l_dummy defined, but not used".
module m
contains
- subroutine f (i, j, a)
+ subroutine f (i, j, a) ! { dg-line l_function[incr c_function] }
implicit none
integer :: i, j, a
integer :: x, y
@@ -35,6 +37,12 @@ contains
! (See C/C++ example.)
a = g (i, j, a, c)
+ ! { dg-warning {'i' is used uninitialized} {} { target *-*-* } .-1 }
+ ! { dg-note {'i' was declared here} {} { target *-*-* } l_function$c_function }
+ ! { dg-warning {'j' is used uninitialized} {} { target *-*-* } .-3 }
+ ! { dg-note {'j' was declared here} {} { target *-*-* } l_function$c_function }
+ ! { dg-warning {'a' is used uninitialized} {} { target *-*-* } .-5 }
+ ! { dg-note {'a' was declared here} {} { target *-*-* } l_function$c_function }
x = a
!$acc atomic write ! ... to force 'TREE_ADDRESSABLE'.
y = a
@@ -43,6 +51,5 @@ contains
! { dg-note {variable 'j' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO3" { xfail *-*-* } l_compute$c_compute }
! { dg-note {variable 'a' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO4" { xfail *-*-* } l_compute$c_compute }
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute }
- ! { dg-note {variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_compute$c_compute }
end subroutine f
end module m
diff --git a/gcc/testsuite/gfortran.dg/goacc/privatization-1-routine_gang-loop.f90 b/gcc/testsuite/gfortran.dg/goacc/privatization-1-routine_gang-loop.f90
index db6d822..74c740f 100644
--- a/gcc/testsuite/gfortran.dg/goacc/privatization-1-routine_gang-loop.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/privatization-1-routine_gang-loop.f90
@@ -4,6 +4,8 @@
! { dg-additional-options "--param=openacc-privatization=noisy" } for
! testing/documenting aspects of that functionality.
+! { dg-additional-options -Wuninitialized }
+
! See also '../../c-c++-common/goacc/privatization-1-routine_gang-loop.c'.
!TODO More cases should be added here.
@@ -38,6 +40,7 @@ contains
! (See C/C++ example.)
a = g (i, j, a, c)
+ ! { dg-warning {'a' is used uninitialized} TODO { xfail *-*-* } .-1 }
x = a
!$acc atomic write
y = a
@@ -50,7 +53,6 @@ contains
! { dg-note {variable 'x' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
! { dg-note {variable 'y' in 'private' clause is candidate for adjusting OpenACC privatization level} "" { target *-*-* } l_loop$c_loop }
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_loop$c_loop }
- ! { dg-note {variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
! { dg-note {variable 'y' ought to be adjusted for OpenACC privatization level: 'vector'} "" { target *-*-* } l_loop$c_loop }
end subroutine f
end module m
diff --git a/gcc/testsuite/gfortran.dg/goacc/privatization-1-routine_gang.f90 b/gcc/testsuite/gfortran.dg/goacc/privatization-1-routine_gang.f90
index 725bd5e..59bd43e 100644
--- a/gcc/testsuite/gfortran.dg/goacc/privatization-1-routine_gang.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/privatization-1-routine_gang.f90
@@ -4,6 +4,8 @@
! { dg-additional-options "--param=openacc-privatization=noisy" } for
! testing/documenting aspects of that functionality.
+! { dg-additional-options -Wuninitialized }
+
! See also '../../c-c++-common/goacc/privatization-1-routine_gang.c'.
!TODO More cases should be added here.
@@ -43,5 +45,4 @@ contains
! { dg-note {variable 'j' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_routine$c_routine }
! { dg-note {variable 'a' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_routine$c_routine }
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { xfail *-*-* } l_routine$c_routine }
- ! { dg-note {variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "TODO" { xfail *-*-* } l_routine$c_routine }
end module m
diff --git a/gcc/testsuite/gfortran.dg/goacc/uninit-dim-clause.f95 b/gcc/testsuite/gfortran.dg/goacc/uninit-dim-clause.f95
index 59e923f..1045439 100644
--- a/gcc/testsuite/gfortran.dg/goacc/uninit-dim-clause.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/uninit-dim-clause.f95
@@ -6,6 +6,9 @@
subroutine acc_parallel
implicit none
integer :: i, j, k
+ ! { dg-note {'i' was declared here} {} { target *-*-* } .-1 }
+ ! { dg-note {'j' was declared here} {} { target *-*-* } .-2 }
+ ! { dg-note {'k' was declared here} {} { target *-*-* } .-3 }
!$acc parallel num_gangs(i) ! { dg-warning "is used uninitialized" }
! { dg-warning "region is gang partitioned but does not contain gang partitioned code" "" { target *-*-* } .-1 }
@@ -23,6 +26,9 @@ end subroutine acc_parallel
subroutine acc_kernels
implicit none
integer :: i, j, k
+ ! { dg-note {'i' was declared here} {} { target *-*-* } .-1 }
+ ! { dg-note {'j' was declared here} {} { target *-*-* } .-2 }
+ ! { dg-note {'k' was declared here} {} { target *-*-* } .-3 }
!$acc kernels num_gangs(i) ! { dg-warning "is used uninitialized" }
!$acc end kernels
diff --git a/gcc/testsuite/gfortran.dg/goacc/uninit-firstprivate-clause.f95 b/gcc/testsuite/gfortran.dg/goacc/uninit-firstprivate-clause.f95
index cd5d189..9615fee 100644
--- a/gcc/testsuite/gfortran.dg/goacc/uninit-firstprivate-clause.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/uninit-firstprivate-clause.f95
@@ -11,6 +11,7 @@ end subroutine test
subroutine test2
INTEGER :: i
+ ! { dg-note {'i' was declared here} {} { target *-*-* } .-1 }
!$acc parallel firstprivate (i) ! { dg-warning "is used uninitialized" }
i = 1
diff --git a/gcc/testsuite/gfortran.dg/goacc/uninit-if-clause.f95 b/gcc/testsuite/gfortran.dg/goacc/uninit-if-clause.f95
index 73eb4ee..a059bd9 100644
--- a/gcc/testsuite/gfortran.dg/goacc/uninit-if-clause.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/uninit-if-clause.f95
@@ -4,6 +4,10 @@
program test
implicit none
logical :: b, b2, b3, b4
+ ! { dg-note {'b' was declared here} {} { target *-*-* } .-1 }
+ ! { dg-note {'b2' was declared here} {} { target *-*-* } .-2 }
+ ! { dg-note {'b3' was declared here} {} { target *-*-* } .-3 }
+ ! { dg-note {'b4' was declared here} {} { target *-*-* } .-4 }
integer :: data, data2
!$acc parallel if(b) ! { dg-warning "is used uninitialized" }
diff --git a/gcc/testsuite/gfortran.dg/goacc/uninit-use-device-clause.f95 b/gcc/testsuite/gfortran.dg/goacc/uninit-use-device-clause.f95
index 35310d1..f661f51 100644
--- a/gcc/testsuite/gfortran.dg/goacc/uninit-use-device-clause.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/uninit-use-device-clause.f95
@@ -3,6 +3,7 @@
subroutine test
integer, pointer :: p
+ ! { dg-note {'p' was declared here} {} { target *-*-* } .-1 }
!$acc host_data use_device(p) ! { dg-warning "is used uninitialized" }
!$acc end host_data
diff --git a/gcc/testsuite/gfortran.dg/goacc/wait.f90 b/gcc/testsuite/gfortran.dg/goacc/wait.f90
index 9cdbcdf..60018bc 100644
--- a/gcc/testsuite/gfortran.dg/goacc/wait.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/wait.f90
@@ -1,12 +1,16 @@
! Ensure that ACC WAIT accept integer arguments.
+! { dg-additional-options -Wuninitialized }
+
subroutine foo (wqueue)
implicit none
integer :: wqueue, waitno
+ ! { dg-note {'waitno' was declared here} {} { target *-*-* } .-1 }
integer, parameter :: waitp = 100
!$acc wait (wqueue)
!$acc wait (waitno)
+ ! { dg-warning {'waitno' is used uninitialized} {} { target *-*-* } .-1 }
!$acc wait (waitp)
!$acc wait (0)
end subroutine foo
diff --git a/gcc/testsuite/gfortran.dg/gomp/affinity-clause-1.f90 b/gcc/testsuite/gfortran.dg/gomp/affinity-clause-1.f90
index 13bdd36..08c7740 100644
--- a/gcc/testsuite/gfortran.dg/gomp/affinity-clause-1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/affinity-clause-1.f90
@@ -22,12 +22,12 @@ end
! { dg-final { scan-tree-dump-times "D\\.\[0-9\]+ = .integer.kind=4.. __builtin_cosf ..real.kind=4.. a \\+ 1.0e\\+0\\);" 2 "original" } }
-! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) jj=2:5:2, integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):\\*\\(c_char \\*\\) &b\\\[.* <?i>? \\+ -1\\\]\\) affinity\\(iterator\\(integer\\(kind=4\\) jj=2:5:2, integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):\\*\\(c_char \\*\\) &d\\\[\\(.*jj \\* 5 \\+ .* <?i>?\\) \\+ -6\\\]\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) jj=2:5:2, integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):b\\\[.* <?i>? \\+ -1\\\]\\) affinity\\(iterator\\(integer\\(kind=4\\) jj=2:5:2, integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):d\\\[\\(.*jj \\* 5 \\+ .* <?i>?\\) \\+ -6\\\]\\)" 1 "original" } }
-! { dg final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) i=D.3938:5:1\\):\\*\\(c_char \\*\\) &b\\\[\\(.* <?i>? \\+ -1\\\]\\) affinity\\(iterator\\(integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):\\*\\(c_char \\*\\) &d\\\[\\(\\(integer\\(kind=8\\)\\) i \\+ -1\\) \\* 6\\\]\\)" 1 "original" } }
+! { dg final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):b\\\[\\(.* <?i>? \\+ -1\\\]\\) affinity\\(iterator\\(integer\\(kind=4\\) i=D\\.\[0-9\]+:5:1\\):d\\\[\\(\\(integer\\(kind=8\\)\\) i \\+ -1\\) \\* 6\\\]\\)" 1 "original" } }
! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) i=1:5:1\\):a\\)\[^ \]" 1 "original" } }
! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) i=1:5:1\\):a\\) affinity\\(iterator\\(integer\\(kind=4\\) i=1:5:1\\):\\*x\\)" 1 "original" } }
-! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) k=7:4:-1, integer\\(kind=8\\) j=1:5:1\\):\\*\\(c_char \\*\\) &b\\\[\\(?\\(integer\\(kind=.\\).* \[jk\] \\+ .*\[kj\]\\) \\+ -1\\\]\\) affinity\\(iterator\\(integer\\(kind=4\\) k=7:4:-1, integer\\(kind=8\\) j=1:5:1\\):a\\) affinity\\(cc\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) k=7:4:-1, integer\\(kind=8\\) j=1:5:1\\):b\\\[\\(?\\(integer\\(kind=.\\).* \[jk\] \\+ .*\[kj\]\\) \\+ -1\\\]\\) affinity\\(iterator\\(integer\\(kind=4\\) k=7:4:-1, integer\\(kind=8\\) j=1:5:1\\):a\\) affinity\\(cc\\)" 1 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/affinity-clause-3.f90 b/gcc/testsuite/gfortran.dg/gomp/affinity-clause-3.f90
index 3fd39fe..eebe4dd 100644
--- a/gcc/testsuite/gfortran.dg/gomp/affinity-clause-3.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/affinity-clause-3.f90
@@ -11,4 +11,4 @@ subroutine foo
!$omp end task
end
! { dg-final { scan-tree-dump-times "= ibar \\(&C\\." 3 "gimple" } }
-! { dg-final { scan-tree-dump-times "= ibar \\(j\\." 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "= ibar \\(&j" 1 "gimple" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/affinity-clause-5.f90 b/gcc/testsuite/gfortran.dg/gomp/affinity-clause-5.f90
index 538b5a5..c23fee0 100644
--- a/gcc/testsuite/gfortran.dg/gomp/affinity-clause-5.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/affinity-clause-5.f90
@@ -18,6 +18,6 @@ end
! { dg-final { scan-tree-dump-times "pragma omp task affinity\\(iterator\\)" 1 "original" } }
-! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(\\*\\(c_char \\*\\) &iterator\\\[2\\\]\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\\[2\\\]\\)" 1 "original" } }
-! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) i=1:10:1\\):\\*\\(c_char \\*\\) &iterator\\\[.* <?i>? \\+ -1\\\]\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp task affinity\\(iterator\\(integer\\(kind=4\\) i=1:10:1\\):iterator\\\[.* <?i>? \\+ -1\\\]\\)" 1 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/allocate-1.f90 b/gcc/testsuite/gfortran.dg/gomp/allocate-1.f90
new file mode 100644
index 0000000..8bc6b76
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/allocate-1.f90
@@ -0,0 +1,137 @@
+! { dg-do compile }
+
+module omp_lib_kinds
+ use iso_c_binding, only: c_int, c_intptr_t
+ implicit none
+ private :: c_int, c_intptr_t
+ integer, parameter :: omp_allocator_handle_kind = c_intptr_t
+
+ integer (kind=omp_allocator_handle_kind), &
+ parameter :: omp_null_allocator = 0
+ integer (kind=omp_allocator_handle_kind), &
+ parameter :: omp_default_mem_alloc = 1
+ integer (kind=omp_allocator_handle_kind), &
+ parameter :: omp_large_cap_mem_alloc = 2
+ integer (kind=omp_allocator_handle_kind), &
+ parameter :: omp_const_mem_alloc = 3
+ integer (kind=omp_allocator_handle_kind), &
+ parameter :: omp_high_bw_mem_alloc = 4
+ integer (kind=omp_allocator_handle_kind), &
+ parameter :: omp_low_lat_mem_alloc = 5
+ integer (kind=omp_allocator_handle_kind), &
+ parameter :: omp_cgroup_mem_alloc = 6
+ integer (kind=omp_allocator_handle_kind), &
+ parameter :: omp_pteam_mem_alloc = 7
+ integer (kind=omp_allocator_handle_kind), &
+ parameter :: omp_thread_mem_alloc = 8
+end module
+
+subroutine bar (a, b, c)
+ implicit none
+ integer :: a
+ integer :: b
+ integer :: c
+ c = a + b
+end
+
+subroutine bar2 (a, b, c)
+ implicit none
+ integer :: a
+ integer :: b(15)
+ integer :: c
+ c = a + b(1)
+end
+
+subroutine foo(x, y)
+ use omp_lib_kinds
+ implicit none
+ integer :: x
+ integer :: z
+
+ integer, dimension(15) :: y
+ integer :: r
+ integer :: i
+ integer c1, c2, c3, c4
+ integer (kind=omp_allocator_handle_kind) :: h
+ common /B1/ c1, c2
+ common /B2/ c3, c4
+
+ r = 0
+ h = omp_default_mem_alloc;
+
+
+ !$omp parallel private(/B1/, c3, c4) allocate(/B1/, /B2/)
+ !$omp end parallel
+
+ !$omp parallel private(/B1/, /B2/) allocate(h:/B1/, /B2/)
+ !$omp end parallel
+
+ !$omp parallel private(/B1/, /B2/) allocate(omp_large_cap_mem_alloc:/B1/, c3, c4)
+ !$omp end parallel
+
+ !$omp parallel allocate (x) allocate (h : y) &
+ !$omp allocate (omp_large_cap_mem_alloc:z) firstprivate (x, y, z)
+ call bar2 (x, y, z);
+ !$omp end parallel
+
+ !$omp task private (x) firstprivate (z) allocate (omp_low_lat_mem_alloc:x,z)
+ call bar (0, x, z);
+ !$omp end task
+
+ !$omp target teams distribute parallel do private (x) firstprivate (y) &
+ !$omp allocate ((omp_default_mem_alloc + 0):z) allocate &
+ !$omp (omp_default_mem_alloc: x, y) allocate (h: r) lastprivate (z) reduction(+:r)
+ do i = 1, 10
+ call bar (0, x, z);
+ call bar2 (1, y, r);
+ end do
+ !$omp end target teams distribute parallel do
+
+ !$omp single private (x) allocate (omp_low_lat_mem_alloc:x)
+ x=1
+ !$omp end single
+
+ !$omp single allocate (omp_low_lat_mem_alloc:x) private (x)
+ !$omp end single
+
+ !$omp parallel
+ !$omp do allocate (x) private (x)
+ do i = 1, 64
+ x = 1;
+ end do
+ !$omp end parallel
+
+ !$omp sections private (x) allocate (omp_low_lat_mem_alloc: x)
+ x = 1;
+ !$omp section
+ x = 2;
+ !$omp section
+ x = 3;
+ !$omp end sections
+
+ !$omp taskgroup task_reduction(+:r) allocate (omp_default_mem_alloc : r)
+ call bar (r, r, r);
+ !$omp end taskgroup
+
+ !$omp teams private (x) firstprivate (y) allocate (h : x, y)
+ call bar2 (x, y, r);
+ !$omp end teams
+
+ !$omp taskloop lastprivate (x) reduction (+:r) allocate (h : x, r)
+ do i = 1, 16
+ call bar (0, r, r);
+ x = i;
+ end do
+ !$omp end taskloop
+
+ !$omp taskgroup task_reduction(+:r) allocate (omp_default_mem_alloc : r)
+ !$omp taskloop firstprivate (x) in_reduction (+:r) &
+ !$omp allocate (omp_default_mem_alloc : x, r)
+ do i = 1, 16
+ call bar (x, r, r);
+ end do
+ !$omp end taskloop
+ !$omp end taskgroup
+ !$omp taskwait
+end subroutine
+
diff --git a/gcc/testsuite/gfortran.dg/gomp/allocate-2.f90 b/gcc/testsuite/gfortran.dg/gomp/allocate-2.f90
new file mode 100644
index 0000000..657ff44
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/allocate-2.f90
@@ -0,0 +1,45 @@
+! { dg-do compile }
+
+module omp_lib_kinds
+ use iso_c_binding, only: c_int, c_intptr_t
+ implicit none
+ private :: c_int, c_intptr_t
+ integer, parameter :: omp_allocator_handle_kind = c_intptr_t
+
+end module
+
+subroutine foo(x)
+ use omp_lib_kinds
+ implicit none
+ integer :: x
+
+ !$omp task allocate (x) ! { dg-error "'x' specified in 'allocate' clause at .1. but not in an explicit privatization clause" }
+ x=1
+ !$omp end task
+
+ !$omp parallel allocate (x) ! { dg-error "'x' specified in 'allocate' clause at .1. but not in an explicit privatization clause" }
+ x=2
+ !$omp end parallel
+
+ !$omp parallel allocate (x) shared (x) ! { dg-error "'x' specified in 'allocate' clause at .1. but not in an explicit privatization clause" }
+ x=3
+ !$omp end parallel
+
+ !$omp parallel private (x) allocate (x) allocate (x) ! { dg-warning "'x' appears more than once in 'allocate' clauses at .1." }
+ x=4
+ !$omp end parallel
+
+ !$omp parallel private (x) allocate (x, x) ! { dg-warning "'x' appears more than once in 'allocate' clauses at .1." }
+ x=5
+ !$omp end parallel
+
+ !$omp parallel allocate (0_1: x) private(x) ! { dg-error "Expected integer expression of the 'omp_allocator_handle_kind' kind at .1." }
+ x=6
+ !$omp end parallel
+
+ !$omp parallel private (x) allocate (0.1 : x) ! { dg-error "Expected integer expression of the 'omp_allocator_handle_kind' kind at .1." }
+ x=7
+ !$omp end parallel
+
+end subroutine
+
diff --git a/gcc/testsuite/gfortran.dg/gomp/allocate-3.f90 b/gcc/testsuite/gfortran.dg/gomp/allocate-3.f90
new file mode 100644
index 0000000..7b57be9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/allocate-3.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+
+subroutine foo(x)
+ implicit none
+ integer :: x
+ integer :: i
+
+ !$omp parallel do simd private (x) allocate (x) ! { dg-error "'x' specified in 'allocate' clause at .1. but not in an explicit privatization clause" }
+ do i = 1, 64
+ x = i
+ end do
+ !$omp end parallel do simd
+
+end subroutine
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-10.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-10.f90
new file mode 100644
index 0000000..bafc88b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-10.f90
@@ -0,0 +1,32 @@
+! PR middle-end/28046 for the original C tet.
+! { dg-do compile }
+! { dg-options "-fopenmp -fdump-tree-ompexp" }
+! { dg-require-effective-target cas_int }
+
+module m
+ implicit none
+ integer a(3), b
+ type t_C
+ integer :: x, y
+ end type
+ type(t_C) :: c
+
+ interface
+ integer function bar(); end
+ integer function baz(); end
+ end interface
+ pointer :: baz
+contains
+subroutine foo
+!$omp atomic
+ a(2) = a(2) + bar ()
+!$omp atomic
+ b = b + bar ()
+!$omp atomic
+ c%y = c%y + bar ()
+!$omp atomic
+ b = b + baz ()
+end
+end module
+
+! { dg-final { scan-tree-dump-times "__atomic_fetch_add" 4 "ompexp" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-12.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-12.f90
new file mode 100644
index 0000000..a097076
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-12.f90
@@ -0,0 +1,364 @@
+! PR middle-end/45423 - for the original C/C++ testcase
+! { dg-do compile }
+! { dg-options "-fopenmp -fdump-tree-gimple -g0 -Wno-deprecated" }
+! atomicvar should never be referenced in between the barrier and
+! following #pragma omp atomic_load.
+! { dg-final { scan-tree-dump-not "barrier\[^#\]*atomicvar" "gimple" } }
+
+module m
+ implicit none
+ logical :: atomicvar, c
+ integer :: i, atomicvar2, c2
+contains
+integer function foo ()
+ !$omp barrier
+ !$omp atomic
+ atomicvar = atomicvar .or. .true.
+ !$omp barrier
+ !$omp atomic
+ atomicvar = atomicvar .or. .false.
+ !$omp barrier
+ !$omp atomic
+ atomicvar = atomicvar .or. c
+ !$omp barrier
+ !$omp atomic
+ atomicvar = atomicvar .and. .true.
+ !$omp barrier
+ !$omp atomic
+ atomicvar = atomicvar .and. .false.
+ !$omp barrier
+ !$omp atomic
+ atomicvar = atomicvar .and. c
+ !$omp barrier
+ !$omp atomic
+ atomicvar = atomicvar .neqv. .true.
+ !$omp barrier
+ !$omp atomic
+ atomicvar = atomicvar .neqv. .false.
+ !$omp barrier
+ !$omp atomic
+ atomicvar = atomicvar .neqv. c
+ !$omp barrier
+ !$omp atomic
+ atomicvar = atomicvar .eqv. .true.
+ !$omp barrier
+ !$omp atomic
+ atomicvar = atomicvar .eqv. .false.
+ !$omp barrier
+ !$omp atomic
+ atomicvar = atomicvar .eqv. c
+ !$omp barrier
+ !$omp atomic
+ atomicvar = .true. .or. atomicvar
+ !$omp barrier
+ !$omp atomic
+ atomicvar = .false. .or. atomicvar
+ !$omp barrier
+ !$omp atomic
+ atomicvar = c .or. atomicvar
+ !$omp barrier
+ !$omp atomic
+ atomicvar = .true. .and. atomicvar
+ !$omp barrier
+ !$omp atomic
+ atomicvar = .false. .and. atomicvar
+ !$omp barrier
+ !$omp atomic
+ atomicvar = c .and. atomicvar
+ !$omp barrier
+ !$omp atomic
+ atomicvar = .true. .neqv. atomicvar
+ !$omp barrier
+ !$omp atomic
+ atomicvar = .false. .neqv. atomicvar
+ !$omp barrier
+ !$omp atomic
+ atomicvar = c .neqv. atomicvar
+ !$omp barrier
+ !$omp atomic
+ atomicvar = .true. .eqv. atomicvar
+ !$omp barrier
+ !$omp atomic
+ atomicvar = .false. .eqv. atomicvar
+ !$omp barrier
+ !$omp atomic
+ atomicvar = c .eqv. atomicvar
+ !$omp barrier
+ foo = 0
+end
+
+integer function bar ()
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ior (atomicvar2, -1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ior (atomicvar2, 0)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ior (atomicvar2, 1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ior (atomicvar2, 2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ior (atomicvar2, c2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ior (-1, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ior (0, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ior (1, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ior (2, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ior (c2, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ieor (atomicvar2, -1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ieor (atomicvar2, 0)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ieor (atomicvar2, 1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ieor (atomicvar2, 2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ieor (atomicvar2, c2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ieor (-1, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ieor (0, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ieor (1, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ior (2, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = ior (c2, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = iand (atomicvar2, -1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = iand (atomicvar2, 0)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = iand (atomicvar2, 1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = iand (atomicvar2, 2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = iand (atomicvar2, c2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = iand (-1, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = iand (0, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = iand (1, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = iand (2, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = iand (c2, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = min (atomicvar2, -1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = min (atomicvar2, 0)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = min (atomicvar2, 1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = min (atomicvar2, 2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = min (atomicvar2, c2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = min (-1, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = min (0, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = min (1, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = min (2, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = min (c2, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = max (atomicvar2, -1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = max (atomicvar2, 0)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = max (atomicvar2, 1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = max (atomicvar2, 2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = max (atomicvar2, c2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = max (-1, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = max (0, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = max (1, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = max (2, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = max (c2, atomicvar2)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 + (-1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 + 0
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 + 1
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 + 2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 + c2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = -1 + atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = 0 + atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = 1 + atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = 2 + atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = c2 + atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 - (-1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 - 0
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 - 1
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 - 2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 - c2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = -1 - atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = 0 - atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = 1 - atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = 2 - atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = c2 - atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 * (-1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 * 0
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 * 1
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 * 2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 * c2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = (-1) * atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = 0 * atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = 1 * atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = 2 * atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = c2 * atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 / (-1)
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 / 0
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 / 1
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 / 2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = atomicvar2 / c2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = (-1) / atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = 0 / atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = 1 / atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = 2 / atomicvar2
+ !$omp barrier
+ !$omp atomic
+ atomicvar2 = c2 / atomicvar2
+ !$omp barrier
+ bar = 0
+end
+end module
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-15.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-15.f90
new file mode 100644
index 0000000..4c81791
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-15.f90
@@ -0,0 +1,44 @@
+! { dg-do compile }
+! { dg-options "-fopenmp" }
+module m
+ implicit none
+ integer :: x = 6
+end module m
+
+program main
+ use m
+ implicit none
+ integer v
+ !$omp atomic
+ x = x * 7 + 6 ! { dg-error "assignment must be var = var op expr or var = expr op var" }
+ !$omp atomic
+ x = ieor (x * 7, 6) ! { dg-error "intrinsic arguments except one must not reference 'x'" }
+ !$omp atomic update
+ x = x - 8 + 6 ! { dg-error "var = var op expr not mathematically equivalent to var = var op \\(expr\\)" }
+ !$omp atomic
+ x = ior (ieor (x, 7), 2) ! { dg-error "intrinsic arguments except one must not reference 'x'" }
+ !$omp atomic
+ x = x / 7 * 2 ! { dg-error "var = var op expr not mathematically equivalent to var = var op \\(expr\\)" }
+ !$omp atomic
+ x = x / 7 / 2 ! { dg-error "var = var op expr not mathematically equivalent to var = var op \\(expr\\)" }
+ !$omp atomic capture
+ v = x; x = x * 7 + 6 ! { dg-error "assignment must be var = var op expr or var = expr op var" }
+ !$omp atomic capture
+ v = x; x = ieor(x * 7, 6) ! { dg-error "intrinsic arguments except one must not reference 'x'" }
+ !$omp atomic capture
+ v = x; x = x - 8 + 6 ! { dg-error "var = var op expr not mathematically equivalent to var = var op \\(expr\\)" }
+ !$omp atomic capture
+ v = x; x = ior (ieor(x, 7), 2) ! { dg-error "intrinsic arguments except one must not reference 'x'" }
+ !$omp atomic capture
+ v = x; x = x / 7 * 2 ! { dg-error "var = var op expr not mathematically equivalent to var = var op \\(expr\\)" }
+ !$omp atomic capture
+ v = x; x = x / 7 / 2 ! { dg-error "var = var op expr not mathematically equivalent to var = var op \\(expr\\)" }
+ !$omp atomic capture
+ x = x * 7 + 6; v = x ! { dg-error "assignment must be var = var op expr or var = expr op var" }
+ !$omp atomic capture
+ x = ieor(x * 7, 6); v = x ! { dg-error "intrinsic arguments except one must not reference 'x'" }
+ !$omp atomic capture
+ x = x - 8 + 6; v = x ! { dg-error "var = var op expr not mathematically equivalent to var = var op \\(expr\\)" }
+ !$omp atomic capture
+ x = ior(ieor(x, 7), 2); v = x ! { dg-error "intrinsic arguments except one must not reference 'x'" }
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-16.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-16.f90
new file mode 100644
index 0000000..7660858
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-16.f90
@@ -0,0 +1,36 @@
+! { dg-do compile }
+! { dg-options "-fopenmp" }
+
+module m
+ implicit none
+ integer :: x = 6
+contains
+
+subroutine foo ()
+ integer v
+ !$omp atomic seq_cst read
+ v = x
+ !$omp atomic seq_cst, read
+ v = x
+ !$omp atomic seq_cst write
+ x = v
+ !$omp atomic seq_cst ,write
+ x = v
+ !$omp atomic seq_cst update
+ x = x + v;
+ !$omp atomic seq_cst , update
+ x = v + x;
+ !$omp atomic seq_cst capture
+ v = x; x = x + 2;
+ !$omp atomic seq_cst, capture
+ v = x; x = 2 + x;
+ !$omp atomic read , seq_cst
+ v = x
+ !$omp atomic write ,seq_cst
+ x = v
+ !$omp atomic update, seq_cst
+ x = x + v
+ !$omp atomic capture, seq_cst
+ x = x + 2; v = x
+end
+end module m
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-17.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-17.f90
new file mode 100644
index 0000000..d6864f5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-17.f90
@@ -0,0 +1,41 @@
+module m
+implicit none
+integer i, v
+real f
+contains
+
+subroutine foo ()
+ !$omp atomic release, hint (0), update
+ i = i + 1
+ !$omp atomic hint(0)seq_cst
+ i = i + 1
+ !$omp atomic relaxed,update,hint (0)
+ i = i + 1
+ !$omp atomic release
+ i = i + 1
+ !$omp atomic relaxed
+ i = i + 1
+ !$omp atomic acq_rel capture
+ i = i + 1; v = i
+ !$omp atomic capture,acq_rel , hint (1)
+ i = i + 1; v = i
+ !$omp atomic hint(0),acquire capture
+ i = i + 1; v = i
+ !$omp atomic read acquire
+ v = i
+ !$omp atomic acq_rel read
+ v = i
+ !$omp atomic release,write
+ i = v
+ !$omp atomic write,acq_rel
+ i = v
+ !$omp atomic hint(1),update,release
+ f = f + 2.0
+ !$omp atomic update ,acquire
+ i = i + 1
+ !$omp atomic acq_rel update
+ i = i + 1
+ !$omp atomic acq_rel,hint(0)
+ i = i + 1
+end
+end module
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-18.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-18.f90
new file mode 100644
index 0000000..9bc6f63
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-18.f90
@@ -0,0 +1,27 @@
+module m
+implicit none
+integer i, v
+real f
+contains
+subroutine foo (j)
+integer, value :: j
+ !$omp atomic update,update ! { dg-error "Duplicated atomic clause: unexpected update clause" }
+ i = i + 1
+ !$omp atomic seq_cst release ! { dg-error "Duplicated memory-order clause: unexpected release clause" }
+ i = i + 1
+ !$omp atomic read,release ! { dg-error "ATOMIC READ at .1. incompatible with RELEASE clause" }
+ v = i
+ !$omp atomic acquire , write ! { dg-error "ATOMIC WRITE at .1. incompatible with ACQUIRE clause" }
+ i = v
+ !$omp atomic capture hint (0) capture ! { dg-error "Duplicated 'capture' clause" }
+ v = i = i + 1
+ !$omp atomic hint(j + 2) ! { dg-error "Value of HINT clause at .1. shall be a valid constant hint expression" }
+ i = i + 1
+ !$omp atomic hint(f)
+ ! { dg-error "HINT clause at .1. requires a scalar INTEGER expression" "" { target *-*-* } .-1 }
+ ! { dg-error "Value of HINT clause at .1. shall be a valid constant hint expression" "" { target *-*-* } .-2 }
+ i = i + 1
+ !$omp atomic foobar ! { dg-error "Failed to match clause" }
+ i = i + 1
+end
+end module
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-19.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-19.f90
new file mode 100644
index 0000000..ade4c94
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-19.f90
@@ -0,0 +1,39 @@
+! { dg-do compile }
+! { dg-additional-options "-fdump-tree-original" }
+! { dg-final { scan-tree-dump-times "omp atomic release" 1 "original" } }
+! { dg-final { scan-tree-dump-times "omp atomic relaxed" 3 "original" } }
+! { dg-final { scan-tree-dump-times "omp atomic read relaxed" 1 "original" } }
+! { dg-final { scan-tree-dump-times "omp atomic capture relaxed" 1 "original" } }
+
+module mod
+ implicit none
+ integer i, j, k, l, m, n
+
+contains
+
+subroutine foo ()
+ !$omp atomic release
+ i = i + 1;
+end
+end
+
+module m2
+use mod
+implicit none
+!$omp requires atomic_default_mem_order (relaxed)
+
+contains
+subroutine bar ()
+ integer v;
+ !$omp atomic
+ j = j + 1
+ !$omp atomic update
+ k = k + 1
+ !$omp atomic read
+ v = l
+ !$omp atomic write
+ m = v
+ !$omp atomic capture
+ n = n + 1; v = n
+end
+end module m2
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-2.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-2.f90
index 1de418d..b6c1b6a 100644
--- a/gcc/testsuite/gfortran.dg/gomp/atomic-2.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-2.f90
@@ -3,13 +3,13 @@
subroutine bar
integer :: i, v
real :: f
- !$omp atomic update acq_rel hint("abc") ! { dg-error "OMP ATOMIC UPDATE at .1. incompatible with ACQ_REL or ACQUIRE clauses" }
+ !$omp atomic update acq_rel hint("abc")
! { dg-error "HINT clause at .1. requires a scalar INTEGER expression" "" { target *-*-* } .-1 }
! { dg-error "Value of HINT clause at .1. shall be a valid constant hint expression" "" { target *-*-* } .-2 }
i = i + 1
!$omp end atomic
- !$omp atomic acq_rel ! { dg-error "OMP ATOMIC UPDATE at .1. incompatible with ACQ_REL or ACQUIRE clauses" }
+ !$omp atomic acq_rel
i = i + 1
!$omp end atomic
@@ -18,7 +18,7 @@ subroutine bar
v = i
!$omp end atomic
- !$omp atomic acq_rel , hint (1), update ! { dg-error "OMP ATOMIC UPDATE at .1. incompatible with ACQ_REL or ACQUIRE clauses" }
+ !$omp atomic acq_rel , hint (1), update
i = i + 1
!$omp end atomic
@@ -27,44 +27,10 @@ subroutine bar
v = i
!$omp end atomic
- !$omp atomic write capture ! { dg-error "multiple atomic clauses" }
+ !$omp atomic write capture ! { dg-error "with CAPTURE clause is incompatible with READ or WRITE" }
i = 2
v = i
!$omp end atomic
!$omp atomic foobar ! { dg-error "Failed to match clause" }
end
-
-! moved here from atomic.f90
-subroutine openmp51_foo
- integer :: x, v
- !$omp atomic update seq_cst capture ! { dg-error "multiple atomic clauses" }
- x = x + 2
- v = x
- !$omp end atomic
- !$omp atomic seq_cst, capture, update ! { dg-error "multiple atomic clauses" }
- x = x + 2
- v = x
- !$omp end atomic
- !$omp atomic capture, seq_cst ,update ! { dg-error "multiple atomic clauses" }
- x = x + 2
- v = x
- !$omp end atomic
-end
-
-subroutine openmp51_bar
- integer :: i, v
- real :: f
- !$omp atomic relaxed capture update ! { dg-error "multiple atomic clauses" }
- i = i + 1
- v = i
- !$omp end atomic
- !$omp atomic update capture,release , hint (1) ! { dg-error "multiple atomic clauses" }
- i = i + 1
- v = i
- !$omp end atomic
- !$omp atomic hint(0),update relaxed capture ! { dg-error "multiple atomic clauses" }
- i = i + 1
- v = i
- !$omp end atomic
-end
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-20.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-20.f90
new file mode 100644
index 0000000..29193e1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-20.f90
@@ -0,0 +1,39 @@
+! { dg-do compile }
+! { dg-additional-options "-fdump-tree-original" }
+! { dg-final { scan-tree-dump-times "omp atomic release" 1 "original" } }
+! { dg-final { scan-tree-dump-times "omp atomic seq_cst" 3 "original" } }
+! { dg-final { scan-tree-dump-times "omp atomic read seq_cst" 1 "original" } }
+! { dg-final { scan-tree-dump-times "omp atomic capture seq_cst" 1 "original" } }
+
+module mod
+implicit none
+integer i, j, k, l, m, n
+
+contains
+subroutine foo ()
+ !$omp atomic release
+ i = i + 1
+end
+end module
+
+module m2
+use mod
+implicit none
+!$omp requires atomic_default_mem_order (seq_cst)
+
+contains
+
+subroutine bar ()
+ integer v
+ !$omp atomic
+ j = j + 1
+ !$omp atomic update
+ k = k + 1
+ !$omp atomic read
+ v = l
+ !$omp atomic write
+ m = v
+ !$omp atomic capture
+ n = n + 1; v = n
+end
+end module
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-21.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-21.f90
new file mode 100644
index 0000000..febcdbb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-21.f90
@@ -0,0 +1,93 @@
+! { dg-do compile }
+! { dg-additional-options "-fdump-tree-original" }
+
+module mod
+implicit none
+
+integer i, j, k, l, m, n
+contains
+
+subroutine foo ()
+ !$omp atomic release
+ i = i + 1
+end
+end module
+
+module m2
+use mod
+implicit none
+!$omp requires atomic_default_mem_order (acq_rel)
+
+contains
+subroutine bar ()
+ integer v
+ !$omp atomic
+ j = j + 1
+ !$omp atomic update
+ k = k + 1
+ !$omp atomic read
+ v = l
+ !$omp atomic write
+ m = v
+ !$omp atomic capture
+ n = n + 1; v = n
+end
+
+! { dg-final { scan-tree-dump-times "#pragma omp atomic release" 5 "original" } }
+! { dg-final { scan-tree-dump-times "v = #pragma omp atomic capture acq_rel" 1 "original" } }
+! { dg-final { scan-tree-dump-times "v = #pragma omp atomic read acquire" 1 "original" } }
+
+subroutine foobar()
+ integer :: aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk, nn, oo, pp, qq
+
+ !$omp atomic compare
+ if (ii == jj) ii = kk
+
+! #pragma omp atomic release
+! TARGET_EXPR <D.4241, &ii> = *TARGET_EXPR <D.4241, &ii> == jj \\? kk : *TARGET_EXPR <D.4241, &ii>;
+!
+! { dg-final { scan-tree-dump-times "TARGET_EXPR <D.\[0-9\]+, &ii> = \\*TARGET_EXPR <D.\[0-9\]+, &ii> == jj \\? kk : \\*TARGET_EXPR <D.\[0-9\]+, &ii>;" 1 "original" } }
+
+ !$omp atomic compare, capture
+ if (nn == oo) then
+ nn = pp
+ else
+ qq = nn
+ endif
+
+! TARGET_EXPR <D.4244, 0> = #pragma omp atomic capture acq_rel
+! TARGET_EXPR <D.4242, &nn> = NON_LVALUE_EXPR <TARGET_EXPR <D.4243, 0> = *TARGET_EXPR <D.4242, &nn> == oo> ? pp : *TARGET_EXPR <D.4242, &nn>;, if (TARGET_EXPR <D.4243, 0>)
+! {
+! <<< Unknown tree: void_cst >>>
+! }
+! else
+! {
+! qq = TARGET_EXPR <D.4244, 0>;
+! };
+!
+! { dg-final { scan-tree-dump-times "TARGET_EXPR <D.\[0-9\]+, 0> = #pragma omp atomic capture acq_rel" 1 "original" } }
+! { dg-final { scan-tree-dump-times "TARGET_EXPR <D.\[0-9\]+, &nn> = NON_LVALUE_EXPR <TARGET_EXPR <D.\[0-9\]+, 0> = \\*TARGET_EXPR <D.\[0-9\]+, &nn> == oo> \\? pp : \\*TARGET_EXPR <D.\[0-9\]+, &nn>;, if \\(TARGET_EXPR <D.\[0-9\]+, 0>\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "<<< Unknown tree: void_cst >>>" 1 "original" } }
+! { dg-final { scan-tree-dump-times "qq = TARGET_EXPR <D.\[0-9\]+, 0>;" 1 "original" } }
+
+ !$omp atomic capture compare
+ aa = bb
+ if (bb == cc) bb = dd
+
+! aa = #pragma omp atomic capture acq_rel
+! TARGET_EXPR <D.4245, &bb> = *TARGET_EXPR <D.4245, &bb> == cc ? dd : *TARGET_EXPR <D.4245, &bb>;
+!
+! { dg-final { scan-tree-dump-times "aa = #pragma omp atomic capture acq_rel" 1 "original" } }
+! { dg-final { scan-tree-dump-times "TARGET_EXPR <D.\[0-9\]+, &bb> = \\*TARGET_EXPR <D.\[0-9\]+, &bb> == cc \\? dd : \\*TARGET_EXPR <D.\[0-9\]+, &bb>;" 1 "original" } }
+
+ !$omp atomic capture compare
+ if (ee == ff) ee = gg
+ hh = ee
+
+! hh = #pragma omp atomic capture acq_rel
+! TARGET_EXPR <D.4246, &ee> = *TARGET_EXPR <D.4246, &ee> == ff ? gg : *TARGET_EXPR <D.4246, &ee>;
+!
+! { dg-final { scan-tree-dump-times "hh = #pragma omp atomic capture acq_rel" 1 "original" } }
+! { dg-final { scan-tree-dump-times "TARGET_EXPR <D.\[0-9\]+, &ee> = \\*TARGET_EXPR <D.\[0-9\]+, &ee> == ff \\? gg : \\*TARGET_EXPR <D.\[0-9\]+, &ee>;" 1 "original" } }
+end
+end module
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-22.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-22.f90
new file mode 100644
index 0000000..584c0d3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-22.f90
@@ -0,0 +1,24 @@
+module mod
+integer i, j
+
+contains
+subroutine foo ()
+ integer v
+ !$omp atomic release
+ i = i + 1
+ !$omp atomic read
+ v = j
+end
+end module
+
+module m2
+!$omp requires atomic_default_mem_order (acq_rel) ! OK
+contains
+subroutine bar
+ !$omp atomic release
+ i = i + 1
+!$omp requires atomic_default_mem_order (acq_rel) ! { dg-error "must appear in the specification part of a program unit" }
+ !$omp atomic read
+ v = j
+end subroutine
+end module m2
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-24.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-24.f90
new file mode 100644
index 0000000..235826e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-24.f90
@@ -0,0 +1,13 @@
+! PR c/101297
+
+module m
+implicit none
+integer :: i
+contains
+subroutine foo ()
+ !$omp atomic update, ! { dg-error "Clause expected at .1. after trailing comma" }
+ i = i + 1
+ !$omp atomic update,, ! { dg-error "Failed to match clause" }
+ i = i + 1
+end
+end module
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-25.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-25.f90
new file mode 100644
index 0000000..a501c1f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-25.f90
@@ -0,0 +1,53 @@
+! { dg-do compile }
+
+module m
+use iso_fortran_env
+implicit none
+integer, parameter :: mrk = maxval(real_kinds)
+integer x, r, z
+real(kind(4.0d0)) d, v
+real(mrk) ld
+
+contains
+subroutine foo (y, e, f)
+ integer :: y
+ real(kind(4.0d0)) :: e
+ real(mrk) :: f
+ !$omp atomic update seq_cst fail(acquire)
+ x = min(x, y)
+ !$omp atomic relaxed fail(relaxed)
+ d = max (e, d)
+ !$omp atomic fail(SEQ_CST)
+ d = min (d, f)
+ !$omp atomic seq_cst compare fail(relaxed)
+ if (x == 7) x = 24
+ !$omp atomic compare
+ if (x == 7) x = 24
+ !$omp atomic compare
+ if (x == 123) x = 256
+ !$omp atomic compare
+ if (ld == f) ld = 5.0_mrk
+ !$omp atomic compare
+ if (x == 9) then
+ x = 5
+ endif
+ !$omp atomic compare update capture seq_cst fail(acquire)
+ if (x == 42) then
+ x = f
+ else
+ v = x
+ endif
+ !$omp atomic capture compare weak
+ if (x == 42) then
+ x = f
+ else
+ v = x
+ endif
+ !$omp atomic capture compare fail(seq_cst)
+ if (d == 8.0) then
+ d = 16.0
+ else
+ v = d
+ end if
+end
+end module
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-26.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-26.f90
new file mode 100644
index 0000000..6448bd9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-26.f90
@@ -0,0 +1,99 @@
+! { dg-do compile }
+
+module m
+implicit none
+integer x
+real d
+
+contains
+
+real function foo (y, e, f)
+ integer :: y
+ real v, e
+ real(8) :: f
+ !$omp atomic compare compare ! { dg-error "Duplicated 'compare' clause" }
+ if (x == y) x = d
+ !$omp atomic compare fail(seq_cst) fail(seq_cst) ! { dg-error "Duplicated 'fail' clause" }
+ if (x == y) x = d
+ !$omp atomic compare,fail(seq_cst),fail(relaxed) ! { dg-error "Duplicated 'fail' clause" }
+ if (x == y) x = d
+ !$omp atomic compare weak weak ! { dg-error "Duplicated 'weak' clause" }
+ if (x == y) x = d
+ !$omp atomic read capture ! { dg-error "CAPTURE clause is incompatible with READ or WRITE" }
+ v = d
+ !$omp atomic capture, write ! { dg-error "CAPTURE clause is incompatible with READ or WRITE" }
+ d = v; v = v + 1 ! { dg-error "Unexpected ..OMP ATOMIC statement" "" { target *-*-* } .-1 }
+ foo = v
+end
+
+real function bar (y, e, f)
+ integer :: y
+ real v, e
+ real(8) :: f
+ !$omp atomic read compare ! { dg-error "COMPARE clause is incompatible with READ or WRITE" }
+ if (x == y) x = d
+ !$omp atomic compare, write ! { dg-error "COMPARE clause is incompatible with READ or WRITE" }
+ if (x == y) x = d
+ !$omp atomic read fail(seq_cst) ! { dg-error "FAIL clause is incompatible with READ or WRITE" }
+ v = d
+ !$omp atomic fail(relaxed), write ! { dg-error "FAIL clause is incompatible with READ or WRITE" }
+ d = v
+ !$omp atomic fail(relaxed) update ! { dg-error "FAIL clause requiries either the COMPARE clause or using the intrinsic MIN/MAX procedure" }
+ d = d + 3.0
+ !$omp atomic fail(relaxed) ! { dg-error "FAIL clause requiries either the COMPARE clause or using the intrinsic MIN/MAX procedure" }
+ d = d + 3.0
+ !$omp atomic capture fail(relaxed) ! { dg-error "FAIL clause requiries either the COMPARE clause or using the intrinsic MIN/MAX procedure" }
+ v = d; d = d + 3.0
+ !$omp atomic read weak ! { dg-error "WEAK clause requires COMPARE clause" }
+ v = d
+ !$omp atomic weak, write ! { dg-error "WEAK clause requires COMPARE clause" }
+ d = v
+ !$omp atomic weak update ! { dg-error "WEAK clause requires COMPARE clause" }
+ d = d + 3.0
+ !$omp atomic weak ! { dg-error "WEAK clause requires COMPARE clause" }
+ d = d + 3.0
+ !$omp atomic capture weak ! { dg-error "WEAK clause requires COMPARE clause" }
+ d = d + 3.0; v = d
+ !$omp atomic capture
+ d = d + 3.0; v = x ! { dg-error "capture statement reads from different variable than update statement writes" }
+ !$omp atomic compare fail ! { dg-error "Expected '\\\(' after 'fail'" }
+ if (x == y) x = d
+ !$omp atomic compare fail( ! { dg-error "Expected SEQ_CST, ACQUIRE or RELAXED" }
+ if (x == y) x = d
+ !$omp atomic compare fail() ! { dg-error "Expected SEQ_CST, ACQUIRE or RELAXED" }
+ if (x == y) x = d
+ !$omp atomic compare fail(foobar) ! { dg-error "Expected SEQ_CST, ACQUIRE or RELAXED" }
+ if (x == y) x = d
+ !$omp atomic compare fail(acq_rel) ! { dg-error "Expected SEQ_CST, ACQUIRE or RELAXED" }
+ if (x == y) x = d
+ !$omp atomic compare fail(release) ! { dg-error "Expected SEQ_CST, ACQUIRE or RELAXED" }
+ if (x == y) x = d
+ !$omp atomic compare fail(seq_cst ! { dg-error "Failed to match clause" }
+ if (x == y) x = d
+ bar = v
+end
+
+subroutine foobar
+ implicit none
+ integer :: i, j, k
+
+ !$omp atomic compare write ! { dg-error "COMPARE clause is incompatible with READ or WRITE" }
+ if (i == 1) i = 5
+
+ !$omp atomic compare
+ if (k == 5) i = 7 ! { dg-error "For !.OMP ATOMIC COMPARE, the first operand in comparison at .1. must be the variable 'i' that the update statement writes into at .2." }
+
+ !$omp atomic compare
+ if (j == i) i = 8 ! { dg-error "For !.OMP ATOMIC COMPARE, the first operand in comparison at .1. must be the variable 'i' that the update statement writes into at .2." }
+
+ !$omp atomic compare
+ if (i == 5) i = 8
+
+ !$omp atomic compare
+ if (5 == i) i = 8 ! { dg-error "Expected scalar intrinsic variable at .1. in atomic comparison" }
+
+ !$omp atomic compare
+ if (i == 5) i = i + 8 ! { dg-error "20: expr in !.OMP ATOMIC COMPARE assignment var = expr must be scalar and cannot reference var" }
+
+end subroutine
+end module
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-27.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-27.f90
new file mode 100644
index 0000000..5f7311a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-27.f90
@@ -0,0 +1,34 @@
+! PR fortran/104328
+! { dg-do compile }
+
+subroutine foo
+ integer :: k = 1
+ !$omp atomic compare
+ if ( k == 2 ) then ! { dg-error "unexpected !.OMP ATOMIC expression" }
+ end if
+end
+subroutine bar
+ real :: x = 1
+ !$omp atomic compare
+ if ( x == 2 ) then ! { dg-error "unexpected !.OMP ATOMIC expression" }
+ end if
+end
+subroutine baz
+ integer :: i
+ !$omp atomic capture
+ i = 1
+ i = i + 1. ! { dg-error "!.OMP ATOMIC capture-statement requires a scalar variable of intrinsic type" }
+end
+subroutine qux
+ integer :: i = 0
+ !$omp atomic capture
+ i = i + 1.0
+ i = i + 1.0 ! { dg-error "!.OMP ATOMIC capture-statement requires a scalar variable of intrinsic type" }
+end
+subroutine garply
+ logical :: k = .true.
+ !$omp atomic capture compare
+ if ( k ) then ! { dg-error "unexpected !.OMP ATOMIC expression" }
+ else
+ end if
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-28.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic-28.f90
new file mode 100644
index 0000000..91e29c9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-28.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! PR fortran/104329
+!
+! Contributed by G. Steinmetz
+!
+subroutine z1
+ character(:), allocatable :: x(:)
+ x = ['123']
+ !$omp atomic update
+ x = (x) ! { dg-error "OMP ATOMIC statement must set a scalar variable of intrinsic type" }
+end
+
+subroutine z2
+ character(:), allocatable :: x(:)
+ x = ['123']
+ !$omp atomic update
+ x = 'a' // x // 'e' ! { dg-error "OMP ATOMIC statement must set a scalar variable of intrinsic type" }
+end
+
+
+subroutine z3
+ character(:), allocatable :: x(:)
+ x = ['123']
+ !$omp atomic capture
+ x = 'a' // x // 'e' ! { dg-error "OMP ATOMIC statement must set a scalar variable of intrinsic type" }
+ x = x
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic.f90 b/gcc/testsuite/gfortran.dg/gomp/atomic.f90
index b4caf03..ca12796 100644
--- a/gcc/testsuite/gfortran.dg/gomp/atomic.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic.f90
@@ -3,14 +3,13 @@
! { dg-final { scan-tree-dump-times "#pragma omp atomic relaxed" 4 "original" } }
! { dg-final { scan-tree-dump-times "#pragma omp atomic release" 4 "original" } }
-! { dg-final { scan-tree-dump-times "v = #pragma omp atomic capture relaxed" 2 "original" } }
-! { dg-final { scan-tree-dump-times "v = #pragma omp atomic capture release" 1 "original" } }
+! { dg-final { scan-tree-dump-times "v = #pragma omp atomic capture relaxed" 4 "original" } }
+! { dg-final { scan-tree-dump-times "v = #pragma omp atomic capture release" 2 "original" } }
! { dg-final { scan-tree-dump-times "v = #pragma omp atomic read acquire" 1 "original" } }
! { dg-final { scan-tree-dump-times "#pragma omp atomic seq_cst" 7 "original" } }
! { dg-final { scan-tree-dump-times "v = #pragma omp atomic read seq_cst" 3 "original" } }
-! { dg-final { scan-tree-dump-times "v = #pragma omp atomic capture seq_cst" 3 "original" } }
-
+! { dg-final { scan-tree-dump-times "v = #pragma omp atomic capture seq_cst" 6 "original" } }
subroutine foo ()
integer :: x, v
@@ -85,3 +84,36 @@ subroutine bar
!$omp atomic hint(1),update,release
f = f + 2.0
end
+
+subroutine openmp51_foo
+ integer :: x, v
+ !$omp atomic update seq_cst capture
+ x = x + 2
+ v = x
+ !$omp end atomic
+ !$omp atomic seq_cst, capture, update
+ x = x + 2
+ v = x
+ !$omp end atomic
+ !$omp atomic capture, seq_cst ,update
+ x = x + 2
+ v = x
+ !$omp end atomic
+end
+
+subroutine openmp51_bar
+ integer :: i, v
+ real :: f
+ !$omp atomic relaxed capture update
+ i = i + 1
+ v = i
+ !$omp end atomic
+ !$omp atomic update capture,release , hint (1)
+ i = i + 1
+ v = i
+ !$omp end atomic
+ !$omp atomic hint(0),update relaxed capture
+ i = i + 1
+ v = i
+ !$omp end atomic
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/clauses-1.f90 b/gcc/testsuite/gfortran.dg/gomp/clauses-1.f90
new file mode 100644
index 0000000..9280185
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/clauses-1.f90
@@ -0,0 +1,667 @@
+! { dg-do compile }
+
+module m
+ use iso_c_binding, only: c_intptr_t
+ implicit none (external, type)
+
+ integer(c_intptr_t), parameter :: &
+ omp_null_allocator = 0, &
+ omp_default_mem_alloc = 1, &
+ omp_large_cap_mem_alloc = 2, &
+ omp_const_mem_alloc = 3, &
+ omp_high_bw_mem_alloc = 4, &
+ omp_low_lat_mem_alloc = 5, &
+ omp_cgroup_mem_alloc = 6, &
+ omp_pteam_mem_alloc = 7, &
+ omp_thread_mem_alloc = 8
+
+ integer, parameter :: &
+ omp_allocator_handle_kind = c_intptr_t
+
+ integer :: t
+ !$omp threadprivate (t)
+
+ integer :: f, l, ll, r, r2
+ !$omp declare target (f, l, ll, r, r2)
+
+contains
+
+subroutine foo (d, m, i1, i2, i3, p, idp, s, nte, tl, nth, g, nta, fi, pp, q, dd, ntm)
+ !$omp declare target (foo)
+ integer :: d, m, p, idp, s, nte, tl, nth, g, nta, pp, q, dd, ntm
+ logical :: i1, i2, i3, fi
+ pointer :: q
+ integer :: i
+
+ !$omp distribute parallel do &
+ !$omp& private (p) firstprivate (f) collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) order(concurrent) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp distribute parallel do simd &
+ !$omp& private (p) firstprivate (f) collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) if(simd: i1) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) nontemporal(ntm) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) order(concurrent) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp distribute simd &
+ !$omp& private (p) firstprivate (f) collapse(1) dist_schedule(static, 16) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) reduction(+:r) if(i1) nontemporal(ntm) &
+ !$omp& order(concurrent) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+end
+
+subroutine qux (p)
+ !$omp declare target (qux)
+ integer, value :: p
+
+ !$omp loop bind(teams) order(concurrent) &
+ !$omp& private (p) lastprivate (l) collapse(1) reduction(+:r)
+ do l = 1, 64
+ ll = ll + 1
+ end do
+end
+
+subroutine baz (d, m, i1, i2, i3, p, idp, s, nte, tl, nth, g, nta, fi, pp, q, dd, ntm)
+ integer :: d, m, p, idp, s, nte, tl, nth, g, nta, pp, q, dd, ntm
+ logical :: i1, i2, i3, fi
+ pointer :: q
+ integer :: i
+ !$omp distribute parallel do &
+ !$omp& private (p) firstprivate (f) collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) copyin(t) &
+ !$omp& allocate (p)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp distribute parallel do &
+ !$omp& private (p) firstprivate (f) collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) order(concurrent) &
+ !$omp& allocate (p)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp distribute parallel do simd &
+ !$omp& private (p) firstprivate (f) collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) if(simd: i1) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) nontemporal(ntm) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) copyin(t) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+
+ !$omp distribute parallel do simd &
+ !$omp& private (p) firstprivate (f) collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) if(simd: i1) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) nontemporal(ntm) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) order(concurrent) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+
+ !$omp distribute simd &
+ !$omp& private (p) firstprivate (f) collapse(1) dist_schedule(static, 16) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) reduction(+:r) if(i1) nontemporal(ntm) &
+ !$omp& order(concurrent) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+
+ !$omp loop bind(parallel) order(concurrent) &
+ !$omp& private (p) lastprivate (l) collapse(1) reduction(+:r)
+ do l = 1, 64
+ ll = ll + 1
+ end do
+end
+
+subroutine bar (d, m, i1, i2, i3, p, idp, s, nte, tl, nth, g, nta, fi, pp, q, dd, ntm)
+ integer :: d, m, p, idp, s, nte, tl, nth, g, nta, pp, q, dd(0:5), ntm
+ logical :: i1, i2, i3, fi
+ pointer :: q
+ integer :: i
+
+ !$omp do simd &
+ !$omp& private (p) firstprivate (f) lastprivate (l) linear (ll:1) reduction(+:r) schedule(static, 4) collapse(1) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) nontemporal(ntm) if(i1) order(concurrent) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+ !$omp end do simd nowait
+
+ !$omp parallel do &
+ !$omp& private (p) firstprivate (f) if (parallel: i2) default(shared) shared(s) copyin(t) reduction(+:r) num_threads (nth) &
+ !$omp& proc_bind(spread) lastprivate (l) linear (ll:1) ordered schedule(static, 4) collapse(1) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+
+ !$omp parallel do &
+ !$omp& private (p) firstprivate (f) if (parallel: i2) default(shared) shared(s) copyin(t) reduction(+:r) num_threads (nth) &
+ !$omp& proc_bind(spread) lastprivate (l) linear (ll:1) schedule(static, 4) collapse(1) order(concurrent) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+
+ !$omp parallel do simd &
+ !$omp& private (p) firstprivate (f) if (i2) default(shared) shared(s) copyin(t) reduction(+:r) num_threads (nth) &
+ !$omp& proc_bind(spread) lastprivate (l) linear (ll:1) schedule(static, 4) collapse(1) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) nontemporal(ntm) order(concurrent) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+
+ !$omp parallel sections &
+ !$omp& private (p) firstprivate (f) if (parallel: i2) default(shared) shared(s) copyin(t) reduction(+:r) num_threads (nth) &
+ !$omp& proc_bind(spread) lastprivate (l) &
+ !$omp& allocate (f)
+ !$omp section
+ block; end block
+ !$omp section
+ block; end block
+ !$omp end parallel sections
+
+ !$omp target parallel &
+ !$omp& device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) &
+ !$omp& depend(inout: dd(0)) in_reduction(+:r2) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ !$omp end target parallel nowait
+
+ !$omp target parallel do &
+ !$omp& device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) linear (ll:1) ordered schedule(static, 4) collapse(1) depend(inout: dd(0)) &
+ !$omp& in_reduction(+:r2) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+ !$omp end target parallel do nowait
+
+ !$omp target parallel do &
+ !$omp& device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) linear (ll:1) schedule(static, 4) collapse(1) depend(inout: dd(0)) order(concurrent) &
+ !$omp& in_reduction(+:r2) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+ !$omp end target parallel do nowait
+
+ !$omp target parallel do simd &
+ !$omp& device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& if (parallel: i2) default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) linear (ll:1) schedule(static, 4) collapse(1) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) depend(inout: dd(0)) nontemporal(ntm) if (simd: i3) order(concurrent) &
+ !$omp& in_reduction(+:r2) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+ !$omp end target parallel do simd nowait
+
+ !$omp target teams &
+ !$omp& device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& shared(s) default(shared) reduction(+:r) num_teams(nte - 1:nte) thread_limit(tl) depend(inout: dd(0)) &
+ !$omp& in_reduction(+:r2) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ !$omp end target teams nowait
+
+ !$omp target teams distribute &
+ !$omp& device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) order(concurrent) &
+ !$omp& collapse(1) dist_schedule(static, 16) depend(inout: dd(0)) in_reduction(+:r2) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ do i = 1, 64
+ end do
+ !$omp end target teams distribute nowait
+
+ !$omp target teams distribute parallel do &
+ !$omp& device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) &
+ !$omp& collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) depend(inout: dd(0)) order(concurrent) &
+ !$omp& in_reduction(+:r2) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+ !$omp end target teams distribute parallel do nowait
+
+ !$omp target teams distribute parallel do simd &
+ !$omp& device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) &
+ !$omp& collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) order(concurrent) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) depend(inout: dd(0)) nontemporal(ntm) if (simd: i3) &
+ !$omp& in_reduction(+:r2) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+ !$omp end target teams distribute parallel do simd nowait
+
+ !$omp target teams distribute simd &
+ !$omp& device(d) map (tofrom: m) if (i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) &
+ !$omp& collapse(1) dist_schedule(static, 16) order(concurrent) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) depend(inout: dd(0)) nontemporal(ntm) &
+ !$omp& in_reduction(+:r2) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+ !$omp end target teams distribute simd nowait
+
+ !$omp target simd &
+ !$omp& device(d) map (tofrom: m) if (target: i1) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& safelen(8) simdlen(4) lastprivate (l) linear(ll: 1) aligned(q: 32) reduction(+:r) &
+ !$omp& depend(inout: dd(0)) nontemporal(ntm) if(simd:i3) order(concurrent) &
+ !$omp& in_reduction(+:r2) &
+ !$omp& allocate (omp_default_mem_alloc:f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+ !$omp end target simd nowait
+
+ !$omp taskgroup task_reduction(+:r2) &
+ !$omp& allocate (r2)
+ !$omp taskloop simd &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) collapse(1) untied &
+ !$omp& if(taskloop: i1) if(simd: i2) final(fi) mergeable priority (pp) &
+ !$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) in_reduction(+:r2) nontemporal(ntm) &
+ !$omp& order(concurrent) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+ !$omp end taskgroup
+
+ !$omp taskgroup task_reduction(+:r) &
+ !$omp& allocate (r)
+ !$omp taskloop simd &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) collapse(1) untied if(i1) &
+ !$omp& final(fi) mergeable nogroup priority (pp) &
+ !$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) in_reduction(+:r) nontemporal(ntm) &
+ !$omp& order(concurrent) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+ !$omp end taskgroup
+
+ !$omp taskwait
+ !$omp taskloop simd &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) collapse(1) if(taskloop: i1) &
+ !$omp& final(fi) priority (pp) safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(+:r) if (simd: i3) nontemporal(ntm) &
+ !$omp& order(concurrent) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll + 1
+ end do
+
+ !$omp target depend(inout: dd(0)) in_reduction(+:r2)
+ !$omp teams distribute &
+ !$omp& private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) &
+ !$omp& collapse(1) dist_schedule(static, 16) order(concurrent) &
+ !$omp& allocate (omp_default_mem_alloc: f)
+ do i = 1, 64
+ end do
+ !$omp end target nowait
+
+ !$omp target
+ !$omp teams distribute parallel do &
+ !$omp& private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) &
+ !$omp& collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) order(concurrent) &
+ !$omp& allocate (omp_default_mem_alloc: f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+ !$omp end target
+
+ !$omp target
+ !$omp teams distribute parallel do simd &
+ !$omp& private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) &
+ !$omp& collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) order(concurrent) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) if (simd: i3) nontemporal(ntm) &
+ !$omp& allocate (omp_default_mem_alloc: f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+ !$omp end target
+
+ !$omp target
+ !$omp teams distribute simd &
+ !$omp& private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) &
+ !$omp& collapse(1) dist_schedule(static, 16) order(concurrent) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) if(i3) nontemporal(ntm) &
+ !$omp& allocate (omp_default_mem_alloc: f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+ !$omp end target
+
+ !$omp teams distribute parallel do &
+ !$omp& private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) &
+ !$omp& collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) copyin(t) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp teams distribute parallel do &
+ !$omp& private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) &
+ !$omp& collapse(1) dist_schedule(static, 16) order(concurrent) &
+ !$omp& if (parallel: i2) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp teams distribute parallel do simd &
+ !$omp& private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) &
+ !$omp& collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) if (simd: i3) nontemporal(ntm) copyin(t) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp teams distribute parallel do simd &
+ !$omp& private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) &
+ !$omp& collapse(1) dist_schedule(static, 16) &
+ !$omp& if (parallel: i2) num_threads (nth) proc_bind(spread) &
+ !$omp& lastprivate (l) schedule(static, 4) order(concurrent) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) if (simd: i3) nontemporal(ntm) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp teams distribute simd &
+ !$omp& private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) &
+ !$omp& collapse(1) dist_schedule(static, 16) order(concurrent) &
+ !$omp& safelen(8) simdlen(4) aligned(q: 32) if(i3) nontemporal(ntm) &
+ !$omp& allocate(f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp parallel master &
+ !$omp& private (p) firstprivate (f) if (parallel: i2) default(shared) shared(s) reduction(+:r) &
+ !$omp& num_threads (nth) proc_bind(spread) copyin(t) &
+ !$omp& allocate (f)
+ !$omp end parallel master
+
+ !$omp parallel masked &
+ !$omp& private (p) firstprivate (f) if (parallel: i2) default(shared) shared(s) reduction(+:r) &
+ !$omp& num_threads (nth) proc_bind(spread) copyin(t) filter (d) &
+ !$omp& allocate (f)
+ !$omp end parallel masked
+
+ !$omp taskgroup task_reduction (+:r2) &
+ !$omp& allocate (r2)
+ !$omp master taskloop &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) collapse(1) untied &
+ !$omp& if(taskloop: i1) final(fi) mergeable priority (pp) &
+ !$omp& reduction(default, +:r) in_reduction(+:r2) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+ !$omp end taskgroup
+
+ !$omp taskgroup task_reduction (+:r2) &
+ !$omp& allocate (r2)
+ !$omp masked taskloop &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) collapse(1) untied &
+ !$omp& if(taskloop: i1) final(fi) mergeable priority (pp) reduction(default, +:r) in_reduction(+:r2) filter (d) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+ !$omp end taskgroup
+
+ !$omp taskgroup task_reduction (+:r2) &
+ !$omp& allocate (r2)
+ !$omp master taskloop simd &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) collapse(1) untied &
+ !$omp& if(taskloop: i1) if(simd: i2) final(fi) mergeable priority (pp) &
+ !$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) in_reduction(+:r2) nontemporal(ntm) &
+ !$omp& order(concurrent) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+ !$omp end taskgroup
+
+ !$omp taskgroup task_reduction (+:r2) &
+ !$omp& allocate (r2)
+ !$omp masked taskloop simd &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) collapse(1) untied &
+ !$omp& if(taskloop: i1) if(simd: i2) final(fi) mergeable priority (pp) &
+ !$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) in_reduction(+:r2) nontemporal(ntm) &
+ !$omp& order(concurrent) filter (d) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+ !$omp end taskgroup
+
+ !$omp parallel master taskloop &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) collapse(1) untied &
+ !$omp& if(taskloop: i1) final(fi) mergeable priority (pp) &
+ !$omp& reduction(default, +:r) if (parallel: i2) num_threads (nth) proc_bind(spread) copyin(t) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp parallel masked taskloop &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) collapse(1) untied &
+ !$omp& if(taskloop: i1) final(fi) mergeable priority (pp) &
+ !$omp& reduction(default, +:r) if (parallel: i2) num_threads (nth) proc_bind(spread) copyin(t) filter (d) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp parallel master taskloop simd &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) collapse(1) untied &
+ !$omp& if(taskloop: i1) if(simd: i2) final(fi) mergeable priority (pp) &
+ !$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) nontemporal(ntm) if (parallel: i2) &
+ !$omp& num_threads (nth) proc_bind(spread) copyin(t) order(concurrent) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp parallel masked taskloop simd &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) collapse(1) untied &
+ !$omp& if(taskloop: i1) if(simd: i2) final(fi) mergeable priority (pp) &
+ !$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) nontemporal(ntm) if (parallel: i2) &
+ !$omp& num_threads (nth) proc_bind(spread) copyin(t) order(concurrent) filter (d) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp taskgroup task_reduction (+:r2) &
+ !$omp& allocate (r2)
+ !$omp master taskloop &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) collapse(1) &
+ !$omp& untied if(i1) final(fi) mergeable priority (pp) reduction(default, +:r) in_reduction(+:r2)
+ do i = 1, 64
+ ll = ll +1
+ end do
+ !$omp end taskgroup
+
+ !$omp taskgroup task_reduction (+:r2) &
+ !$omp& allocate (r2)
+ !$omp masked taskloop &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) collapse(1) &
+ !$omp& untied if(i1) final(fi) mergeable priority (pp) reduction(default, +:r) in_reduction(+:r2) filter (d)
+ do i = 1, 64
+ ll = ll +1
+ end do
+ !$omp end taskgroup
+
+ !$omp taskgroup task_reduction (+:r2) &
+ !$omp& allocate (r2)
+ !$omp master taskloop simd &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) collapse(1) untied if(i1) &
+ !$omp& final(fi) mergeable priority (pp) safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) &
+ !$omp& in_reduction(+:r2) nontemporal(ntm) order(concurrent) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+ !$omp end taskgroup
+
+ !$omp taskgroup task_reduction (+:r2) &
+ !$omp& allocate (r2)
+ !$omp masked taskloop simd &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) collapse(1) untied &
+ !$omp& if(i1) final(fi) mergeable priority (pp) safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) &
+ !$omp& in_reduction(+:r2) nontemporal(ntm) order(concurrent) filter (d) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+ !$omp end taskgroup
+
+ !$omp parallel master taskloop &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) collapse(1) untied &
+ !$omp& if(i1) final(fi) mergeable priority (pp) reduction(default, +:r) num_threads (nth) proc_bind(spread) copyin(t) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp parallel masked taskloop &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) collapse(1) untied &
+ !$omp& if(i1) final(fi) mergeable priority (pp) reduction(default, +:r) num_threads (nth) proc_bind(spread) &
+ !$omp& copyin(t) filter (d) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp parallel master taskloop simd &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) collapse(1) untied &
+ !$omp& if(i1) final(fi) mergeable priority (pp) safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) &
+ !$omp& nontemporal(ntm) num_threads (nth) proc_bind(spread)copyin(t) order(concurrent) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp parallel masked taskloop simd &
+ !$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) collapse(1) untied if(i1) &
+ !$omp& final(fi) mergeable priority (pp) safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) &
+ !$omp& nontemporal(ntm) num_threads (nth) proc_bind(spread) copyin(t) order(concurrent) filter (d) &
+ !$omp& allocate (f)
+ do i = 1, 64
+ ll = ll +1
+ end do
+
+ !$omp loop bind(thread) order(concurrent) &
+ !$omp& private (p) lastprivate (l) collapse(1) reduction(+:r)
+ do l = 1, 64
+ ll = ll + 1
+ end do
+
+ !$omp parallel loop &
+ !$omp& private (p) firstprivate (f) default(shared) shared(s) copyin(t) reduction(+:r) num_threads (nth) &
+ !$omp& proc_bind(spread) lastprivate (l) collapse(1) bind(parallel) order(concurrent) if (parallel: i2) &
+ !$omp& allocate (f)
+ do l = 1, 64
+ ll = ll + 1
+ end do
+
+ !$omp parallel loop &
+ !$omp& private (p) firstprivate (f) default(shared) shared(s) copyin(t) reduction(+:r) num_threads (nth) &
+ !$omp& proc_bind(spread) lastprivate (l) collapse(1) if (parallel: i2) &
+ !$omp& allocate (f)
+ do l = 1, 64
+ ll = ll + 1
+ end do
+
+ !$omp teams loop &
+ !$omp& private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) &
+ !$omp& collapse(1) lastprivate (l) bind(teams) &
+ !$omp& allocate (f)
+ do l = 1, 64
+ end do
+
+ !$omp teams loop &
+ !$omp& private(p) firstprivate (f) shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) &
+ !$omp& collapse(1) lastprivate (l) order(concurrent) &
+ !$omp& allocate (f)
+ do l = 1, 64
+ end do
+
+ !$omp target parallel loop &
+ !$omp& device(d) map (tofrom: m) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& default(shared) shared(s) reduction(+:r) num_threads (nth) proc_bind(spread) &
+ !$omp& depend(inout: dd(0)) lastprivate (l) order(concurrent) collapse(1) in_reduction(+:r2) &
+ !$omp& if (target: i1) if (parallel: i2) &
+ !$omp& allocate (omp_default_mem_alloc: f)
+ do l = 1, 64
+ end do
+ !$omp end target parallel loop nowait
+
+ !$omp target teams loop &
+ !$omp& device(d) map (tofrom: m) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& shared(s) default(shared) reduction(+:r) num_teams(nte-1:nte) thread_limit(tl) depend(inout: dd(0)) &
+ !$omp& lastprivate (l) bind(teams) collapse(1) in_reduction(+:r2) if (target: i1) &
+ !$omp& allocate (omp_default_mem_alloc: f)
+ do l = 1, 64
+ end do
+ !$omp end target teams loop nowait
+
+ !$omp target teams loop &
+ !$omp& device(d) map (tofrom: m) private (p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) &
+ !$omp& shared(s) default(shared) reduction(+:r) num_teams(nte) thread_limit(tl) depend(inout: dd(0)) &
+ !$omp& lastprivate (l) order(concurrent) collapse(1) in_reduction(+:r2) if (target: i1) &
+ !$omp& allocate (omp_default_mem_alloc: f)
+ do l = 1, 64
+ end do
+ !$omp end target teams loop nowait
+
+end
+end module
diff --git a/gcc/testsuite/gfortran.dg/gomp/collapse1.f90 b/gcc/testsuite/gfortran.dg/gomp/collapse1.f90
index 1a06eab..01cfc82 100644
--- a/gcc/testsuite/gfortran.dg/gomp/collapse1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/collapse1.f90
@@ -24,7 +24,7 @@ subroutine collapse1
end do
!$omp parallel do collapse(2) shared(j)
do i = 1, 3
- do j = 4, 6 ! { dg-error "iteration variable present on clause other than PRIVATE or LASTPRIVATE" }
+ do j = 4, 6 ! { dg-error "iteration variable present on clause other than PRIVATE, LASTPRIVATE or ALLOCATE" }
end do
end do
!$omp parallel do collapse(2)
diff --git a/gcc/testsuite/gfortran.dg/gomp/defaultmap-4.f90 b/gcc/testsuite/gfortran.dg/gomp/defaultmap-4.f90
index 89bbe87..7b182b5 100644
--- a/gcc/testsuite/gfortran.dg/gomp/defaultmap-4.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/defaultmap-4.f90
@@ -56,16 +56,18 @@ end
! { dg-final { scan-tree-dump-times "map\\(alloc:\\*aii \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(alloc:aii \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(alloc:arr \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) aarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) dtaarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) str1aarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) str5aarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) strxaarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(c_char \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxparr\\\] \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxaarr\\\] \\* restrict\\) strxaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\* restrict\\) str5aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\* restrict\\) str1aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(struct t\\\[0:\\\] \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(struct t\\\[0:\\\] \\* restrict\\) dtaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(alloc:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) aarr\\.data \\\[len:" 1 "gimple" } }
+
! { dg-final { scan-tree-dump-times "map\\(alloc:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\* restrict\\) str1aarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(alloc:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\* restrict\\) str5aarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(alloc:\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxaarr\\\] \\* restrict\\) strxaarr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
@@ -103,21 +105,23 @@ end
! { dg-final { scan-tree-dump-times "map\\(always_pointer:\\(struct t\\\[0:\\\] \\*\\) dtparr\\.data \\\[pointer assign, bias: 0\\\]\\)" 2 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(to:aarr \\\[pointer set, len:" 2 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(to:arr \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxparr\\\] \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(struct t\\\[0:\\\] \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
+
! { dg-final { scan-tree-dump-times "map\\(to:dtaarr \\\[pointer set, len:" 2 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(to:dtarr \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(to:dt \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(to:dtparr \\\[pointer set, len:" 2 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*aii \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) aarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) dtaarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str1aarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str5aarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) strxaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxaarr\\\] \\* restrict\\) strxaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\* restrict\\) str5aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\* restrict\\) str1aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(struct t\\\[0:\\\] \\* restrict\\) dtaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) aarr\\.data \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*dta \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*str1a \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*str5a \\\[len:" 1 "gimple" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/defaultmap-5.f90 b/gcc/testsuite/gfortran.dg/gomp/defaultmap-5.f90
index d6b32dc..1391274 100644
--- a/gcc/testsuite/gfortran.dg/gomp/defaultmap-5.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/defaultmap-5.f90
@@ -86,16 +86,16 @@ end
! { dg-final { scan-tree-dump-times "map\\(to:aarr \\\[pointer set, len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(to:\\*aii \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(to:arr \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) aarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) dtaarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) str1aarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) str5aarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) strxaarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(c_char \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxparr\\\] \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxaarr\\\] \\* restrict\\) strxaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\* restrict\\) str5aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\* restrict\\) str1aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(struct t\\\[0:\\\] \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(struct t\\\[0:\\\] \\* restrict\\) dtaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(to:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) aarr\\.data \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(to:dtaarr \\\[pointer set, len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(to:\\*dta \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(to:dtarr \\\[len:" 1 "gimple" } }
@@ -103,11 +103,11 @@ end
! { dg-final { scan-tree-dump-times "map\\(to:dtparr \\\[pointer set, len:" 2 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(to:\\*dtp \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:arr \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxparr\\\] \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(struct t\\\[0:\\\] \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:dtarr \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:dt \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*dtp \\\[len:" 1 "gimple" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/defaultmap-6.f90 b/gcc/testsuite/gfortran.dg/gomp/defaultmap-6.f90
index fabf771..9a81d0f 100644
--- a/gcc/testsuite/gfortran.dg/gomp/defaultmap-6.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/defaultmap-6.f90
@@ -65,16 +65,16 @@ end
! { dg-final { scan-tree-dump-times "map\\(to:dtparr \\\[pointer set, len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*aii \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:arr \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) aarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) dtaarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str1aarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str5aarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) strxaarr\\.data \\\[len:" 1 "gimple" } }
-! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(c_char \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxparr\\\] \\*\\) strxparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:\\.strxaarr\\\] \\* restrict\\) strxaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\*\\) str5parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:5\\\] \\* restrict\\) str5aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\*\\) str1parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(character\\(kind=1\\)\\\[0:\\\]\\\[1:1\\\] \\* restrict\\) str1aarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\*\\) parr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(struct t\\\[0:\\\] \\*\\) dtparr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(struct t\\\[0:\\\] \\* restrict\\) dtaarr\\.data \\\[len:" 1 "gimple" } }
+! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) aarr\\.data \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:\\*dta \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:dtarr \\\[len:" 1 "gimple" } }
! { dg-final { scan-tree-dump-times "map\\(tofrom:dt \\\[len:" 1 "gimple" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/gomp.exp b/gcc/testsuite/gfortran.dg/gomp/gomp.exp
index 0549409..45ef226 100644
--- a/gcc/testsuite/gfortran.dg/gomp/gomp.exp
+++ b/gcc/testsuite/gfortran.dg/gomp/gomp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Copyright (C) 2005-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f90 b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f90
new file mode 100644
index 0000000..c3de772
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f90
@@ -0,0 +1,27 @@
+! Test to ensure that IS_DEVICE_PTR is removed for non-used variables.
+
+! { dg-do compile }
+! { dg-additional-options "-fdump-tree-gimple" }
+
+program main
+ use iso_c_binding
+ implicit none
+
+ integer :: x, y
+ call foo (x, y)
+
+contains
+ subroutine foo (a, b)
+ integer, target :: a, b
+
+ !$omp target data map(a, b) use_device_ptr(a, b)
+ !$omp target is_device_ptr(a, b)
+ a = 42
+ !$omp end target
+ !$omp end target data
+ end subroutine foo
+
+end program main
+
+! { dg-final { scan-tree-dump "is_device_ptr\\(a\\)" "gimple" } }
+! { dg-final { scan-tree-dump-not "is_device_ptr\\(b\\)" "gimple" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/map-3.f90 b/gcc/testsuite/gfortran.dg/gomp/map-3.f90
index bdd2890..2f0a792 100644
--- a/gcc/testsuite/gfortran.dg/gomp/map-3.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/map-3.f90
@@ -34,5 +34,5 @@ end
! { dg-final { scan-tree-dump-times "#pragma omp target data use_device_addr\\(x\\)" 1 "original" } }
! { dg-final { scan-tree-dump-times "#pragma omp target data use_device_addr\\(x2\\)" 1 "original" } }
! { dg-final { scan-tree-dump-times "#pragma omp target exit data map\\(release:x\\)" 1 "original" } }
-! { dg-final { scan-tree-dump-times "#pragma omp target data map\\(tofrom:\\*\\(c_char \\*\\) y.data \\\[len: .*\\) map\\(to:y \\\[pointer set, len: .*\\) map\\(alloc:.*y.data \\\[pointer assign, bias: 0\\\]\\) use_device_addr\\(y\\)" 1 "original" } }
-! { dg-final { scan-tree-dump-times "#pragma omp target data map\\(tofrom:\\*\\(c_char \\*\\) z.data \\\[len: .*\\) map\\(to:z \\\[pointer set, len: .*\\) map\\(alloc:.*z.data \\\[pointer assign, bias: 0\\\]\\) use_device_addr\\(z\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target data map\\(tofrom:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\*\\) y.data \\\[len: .*\\) map\\(to:y \\\[pointer set, len: .*\\) map\\(alloc:.*y.data \\\[pointer assign, bias: 0\\\]\\) use_device_addr\\(y\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target data map\\(tofrom:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\*\\) z.data \\\[len: .*\\) map\\(to:z \\\[pointer set, len: .*\\) map\\(alloc:.*z.data \\\[pointer assign, bias: 0\\\]\\) use_device_addr\\(z\\)" 1 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/nowait-2.f90 b/gcc/testsuite/gfortran.dg/gomp/nowait-2.f90
new file mode 100644
index 0000000..d18459b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/nowait-2.f90
@@ -0,0 +1,315 @@
+! Cross check that it is accepted without nowait
+subroutine bar()
+implicit none
+integer :: i, a(5)
+!$omp atomic write
+i = 5
+!$omp end atomic
+
+!$omp critical
+!$omp end critical
+
+!$omp distribute
+do i = 1, 5
+end do
+!$omp end distribute
+
+!$omp distribute parallel do
+do i = 1, 5
+end do
+!$omp end distribute parallel do
+
+!$omp distribute parallel do simd
+do i = 1, 5
+end do
+!$omp end distribute parallel do simd
+
+!$omp distribute simd
+do i = 1, 5
+end do
+!$omp end distribute simd
+
+!$omp masked
+!$omp end masked
+
+!$omp masked taskloop
+do i = 1, 5
+end do
+!$omp end masked taskloop
+
+!$omp masked taskloop simd
+do i = 1, 5
+end do
+!$omp end masked taskloop simd
+
+!$omp master
+!$omp end master
+
+!$omp master taskloop
+do i = 1, 5
+end do
+!$omp end master taskloop
+
+!$omp master taskloop simd
+do i = 1, 5
+end do
+!$omp end master taskloop simd
+
+!$omp ordered
+!$omp end ordered
+
+!$omp parallel
+!$omp end parallel
+
+!$omp parallel workshare
+a(:) = 5
+!$omp end parallel workshare
+
+!$omp parallel do
+do i = 1, 5
+end do
+!$omp end parallel do
+
+!$omp parallel do simd
+do i = 1, 5
+end do
+!$omp end parallel do simd
+
+!$omp parallel sections
+ !$omp section
+ block; end block
+!$omp end parallel sections
+
+!$omp parallel masked
+!$omp end parallel masked
+
+!$omp parallel masked taskloop
+do i = 1, 5
+end do
+!$omp end parallel masked taskloop
+
+!$omp parallel masked taskloop simd
+do i = 1, 5
+end do
+!$omp end parallel masked taskloop simd
+
+!$omp parallel master
+!$omp end parallel master
+
+!$omp parallel master taskloop
+do i = 1, 5
+end do
+!$omp end parallel master taskloop
+
+!$omp parallel master taskloop simd
+do i = 1, 5
+end do
+!$omp end parallel master taskloop simd
+
+!$omp simd
+do i = 1, 5
+end do
+!$omp end simd
+
+!$omp task
+!$omp end task
+
+!$omp taskgroup
+!$omp end taskgroup
+
+!$omp taskloop
+do i = 1, 5
+end do
+!$omp end taskloop
+
+!$omp taskloop simd
+do i = 1, 5
+end do
+!$omp end taskloop simd
+
+!$omp teams
+!$omp end teams
+
+!$omp teams distribute
+do i = 1, 5
+end do
+!$omp end teams distribute
+
+!$omp teams distribute parallel do
+do i = 1, 5
+end do
+!$omp end teams distribute parallel do
+
+!$omp teams distribute parallel do simd
+do i = 1, 5
+end do
+!$omp end teams distribute parallel do simd
+
+!$omp teams distribute simd
+do i = 1, 5
+end do
+!$omp end teams distribute simd
+
+!$omp target data map(tofrom:i)
+!$omp end target data
+
+end
+
+! invalid nowait
+
+subroutine foo
+implicit none
+integer :: i, a(5)
+!$omp atomic write
+i = 5
+!$omp end atomic nowait ! { dg-error "Unexpected junk" }
+
+!$omp critical
+!$omp end critical nowait ! { dg-error "Unexpected junk" }
+
+!$omp distribute
+do i = 1, 5
+end do
+!$omp end distribute nowait ! { dg-error "Unexpected junk" }
+
+!$omp distribute parallel do
+do i = 1, 5
+end do
+!$omp end distribute parallel do nowait ! { dg-error "Unexpected junk" }
+
+!$omp distribute parallel do simd
+do i = 1, 5
+end do
+!$omp end distribute parallel do simd nowait ! { dg-error "Unexpected junk" }
+
+!$omp parallel sections
+ !$omp section
+ block; end block
+!$omp end parallel sections nowait ! { dg-error "Unexpected junk" }
+
+!$omp distribute simd
+do i = 1, 5
+end do
+!$omp end distribute simd nowait ! { dg-error "Unexpected junk" }
+
+!$omp masked
+!$omp end masked nowait ! { dg-error "Unexpected junk" }
+
+!$omp masked taskloop
+do i = 1, 5
+end do
+!$omp end masked taskloop nowait ! { dg-error "Unexpected junk" }
+
+!$omp masked taskloop simd
+do i = 1, 5
+end do
+!$omp end masked taskloop simd nowait ! { dg-error "Unexpected junk" }
+
+!$omp master
+!$omp end master nowait ! { dg-error "Unexpected junk" }
+
+!$omp master taskloop
+do i = 1, 5
+end do
+!$omp end master taskloop nowait ! { dg-error "Unexpected junk" }
+
+!$omp master taskloop simd
+do i = 1, 5
+end do
+!$omp end master taskloop simd nowait ! { dg-error "Unexpected junk" }
+
+!$omp ordered
+!$omp end ordered nowait ! { dg-error "Unexpected junk" }
+
+!$omp parallel
+!$omp end parallel nowait ! { dg-error "Unexpected junk" }
+
+!$omp parallel workshare
+a(:) = 5
+!$omp end parallel workshare nowait ! { dg-error "Unexpected junk" }
+
+!$omp parallel do
+do i = 1, 5
+end do
+!$omp end parallel do nowait ! { dg-error "Unexpected junk" }
+
+!$omp parallel do simd
+do i = 1, 5
+end do
+!$omp end parallel do simd nowait ! { dg-error "Unexpected junk" }
+
+!$omp parallel masked
+!$omp end parallel masked nowait ! { dg-error "Unexpected junk" }
+
+!$omp parallel masked taskloop
+do i = 1, 5
+end do
+!$omp end parallel masked taskloop nowait ! { dg-error "Unexpected junk" }
+
+!$omp parallel masked taskloop simd
+do i = 1, 5
+end do
+!$omp end parallel masked taskloop simd nowait ! { dg-error "Unexpected junk" }
+
+!$omp parallel master
+!$omp end parallel master nowait ! { dg-error "Unexpected junk" }
+
+!$omp parallel master taskloop
+do i = 1, 5
+end do
+!$omp end parallel master taskloop nowait ! { dg-error "Unexpected junk" }
+
+!$omp parallel master taskloop simd
+do i = 1, 5
+end do
+!$omp end parallel master taskloop simd nowait ! { dg-error "Unexpected junk" }
+
+!$omp simd
+do i = 1, 5
+end do
+!$omp end simd nowait ! { dg-error "Unexpected junk" }
+
+!$omp task
+!$omp end task nowait ! { dg-error "Unexpected junk" }
+
+!$omp taskgroup
+!$omp end taskgroup nowait ! { dg-error "Unexpected junk" }
+
+!$omp taskloop
+do i = 1, 5
+end do
+!$omp end taskloop nowait ! { dg-error "Unexpected junk" }
+
+!$omp taskloop simd
+do i = 1, 5
+end do
+!$omp end taskloop simd nowait ! { dg-error "Unexpected junk" }
+
+!$omp teams
+!$omp end teams nowait ! { dg-error "Unexpected junk" }
+
+!$omp teams distribute
+do i = 1, 5
+end do
+!$omp end teams distribute nowait ! { dg-error "Unexpected junk" }
+
+!$omp teams distribute parallel do
+do i = 1, 5
+end do
+!$omp end teams distribute parallel do nowait ! { dg-error "Unexpected junk" }
+
+!$omp teams distribute parallel do simd
+do i = 1, 5
+end do
+!$omp end teams distribute parallel do simd nowait ! { dg-error "Unexpected junk" }
+
+!$omp teams distribute simd
+do i = 1, 5
+end do
+!$omp end teams distribute simd nowait ! { dg-error "Unexpected junk" }
+
+!$omp target data map(tofrom:i)
+!$omp end target data nowait ! { dg-error "Unexpected junk" }
+
+end ! { dg-error "Unexpected END statement" }
+! { dg-prune-output "Unexpected end of file" }
diff --git a/gcc/testsuite/gfortran.dg/gomp/nowait-3.f90 b/gcc/testsuite/gfortran.dg/gomp/nowait-3.f90
new file mode 100644
index 0000000..a58b8fd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/nowait-3.f90
@@ -0,0 +1,118 @@
+! { dg-additional-options "-fdump-tree-original" }
+
+subroutine foo
+implicit none
+integer :: i, a(5)
+
+!$omp do
+do i = 1, 5
+end do
+!$omp end do nowait
+
+!$omp do simd
+do i = 1, 5
+end do
+!$omp end do simd nowait
+
+!$omp scope
+!$omp end scope nowait
+
+!$omp sections
+ !$omp section
+ block; end block
+!$omp end sections nowait
+
+!$omp single
+!$omp end single nowait
+
+!$omp target
+!$omp end target nowait
+
+!$omp target parallel
+!$omp end target parallel nowait
+
+!$omp target parallel do
+do i = 1, 5
+end do
+!$omp end target parallel do nowait
+
+!$omp target parallel do simd
+do i = 1, 5
+end do
+!$omp end target parallel do simd nowait
+
+!$omp target parallel loop
+do i = 1, 5
+end do
+!$omp end target parallel loop nowait
+
+!$omp target teams distribute parallel do
+do i = 1, 5
+end do
+!$omp end target teams distribute parallel do nowait
+
+!$omp target teams distribute parallel do simd
+do i = 1, 5
+end do
+!$omp end target teams distribute parallel do simd nowait
+
+!$omp target simd
+do i = 1, 5
+end do
+!$omp end target simd nowait
+
+!$omp target teams
+!$omp end target teams nowait
+
+!$omp target teams distribute
+do i = 1, 5
+end do
+!$omp end target teams distribute nowait
+
+!$omp target teams distribute simd
+do i = 1, 5
+end do
+!$omp end target teams distribute simd nowait
+
+!$omp target teams loop
+do i = 1, 5
+end do
+!$omp end target teams loop nowait
+
+!$omp workshare
+A(:) = 5
+!$omp end workshare nowait
+end
+
+! Note: internally, for '... parallel do ...', 'nowait' is always added
+! such that for 'omp end target parallel do nowait', 'nowait' is on both
+! 'target' as specified in the OpenMP spec and and on 'do' due to internal usage.
+
+! Expected with 'nowait'
+
+! { dg-final { scan-tree-dump-times "#pragma omp for nowait" 6 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp for schedule\\(static\\) nowait" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp sections nowait" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp single nowait" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target nowait" 12 "original" } }
+
+! Never:
+
+! { dg-final { scan-tree-dump-not "#pragma omp distribute\[^\n\r]*nowait" "original" } }
+! { dg-final { scan-tree-dump-not "#pragma omp loop\[^\n\r]*nowait" "original" } }
+! { dg-final { scan-tree-dump-not "#pragma omp parallel\[^\n\r]*nowait" "original" } }
+! { dg-final { scan-tree-dump-not "#pragma omp section\[^s\]\[^\n\r]*nowait" "original" } }
+! { dg-final { scan-tree-dump-not "#pragma omp simd\[^\n\r]*nowait" "original" } }
+! { dg-final { scan-tree-dump-not "#pragma omp teams\[^\n\r]*nowait" "original" } }
+
+! Sometimes or never with nowait:
+
+! { dg-final { scan-tree-dump-times "#pragma omp distribute\[\n\r]" 4 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp loop\[\n\r]" 2 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp parallel\[\n\r]" 6 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp section\[\n\r]" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp simd linear\\(i:1\\)\[\n\r]" 5 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp teams\[\n\r]" 6 "original" } }
+
+! { dg-final { scan-tree-dump-times "#pragma omp target\[\n\r]" 0 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp for\[\n\r]" 0 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/num-teams-1.f90 b/gcc/testsuite/gfortran.dg/gomp/num-teams-1.f90
new file mode 100644
index 0000000..df31cc7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/num-teams-1.f90
@@ -0,0 +1,53 @@
+module m
+ implicit none (type, external)
+
+ interface
+ integer function fn(i); integer :: i; end
+ end interface
+
+contains
+
+subroutine foo
+ !$omp teams num_teams (4 : 6)
+ !$omp end teams
+
+ !$omp teams num_teams (7)
+ !$omp end teams
+end
+
+subroutine bar
+ !$omp target teams num_teams (5 : 19)
+ !$omp end target teams
+
+ !$omp target teams num_teams (21)
+ !$omp end target teams
+end
+
+subroutine baz
+ !$omp teams num_teams (fn (1) : fn (2))
+ !$omp end teams
+
+ !$omp teams num_teams (fn (3))
+ !$omp end teams
+end
+
+subroutine qux
+ !$omp target teams num_teams (fn (4) : fn (5))
+ !$omp end target teams
+
+ !$omp target teams num_teams (fn (6))
+ !$omp end target teams
+end
+
+subroutine corge
+ !$omp target
+ !$omp teams num_teams (fn (7) : fn (8))
+ !$omp end teams
+ !$omp end target
+
+ !$omp target
+ !$omp teams num_teams (fn (9))
+ !$omp end teams
+ !$omp end target
+end
+end module m
diff --git a/gcc/testsuite/gfortran.dg/gomp/num-teams-2.f90 b/gcc/testsuite/gfortran.dg/gomp/num-teams-2.f90
new file mode 100644
index 0000000..e7814a1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/num-teams-2.f90
@@ -0,0 +1,37 @@
+module m
+ implicit none (type, external)
+
+contains
+
+subroutine foo (i)
+ integer :: i
+
+ !$omp teams num_teams (6 : 4) ! { dg-warning "NUM_TEAMS lower bound at .1. larger than upper bound at .2." }
+ !$omp end teams
+
+ !$omp teams num_teams (-7) ! { dg-warning "INTEGER expression of NUM_TEAMS clause at .1. must be positive" }
+ !$omp end teams
+
+ !$omp teams num_teams (i : -7) ! { dg-warning "INTEGER expression of NUM_TEAMS clause at .1. must be positive" }
+ !$omp end teams
+
+ !$omp teams num_teams (-7 : 8) ! { dg-warning "INTEGER expression of NUM_TEAMS clause at .1. must be positive" }
+ !$omp end teams
+end
+
+subroutine bar (i)
+ integer :: i
+
+ !$omp target teams num_teams (6 : 4) ! { dg-warning "NUM_TEAMS lower bound at .1. larger than upper bound at .2." }
+ !$omp end target teams
+
+ !$omp target teams num_teams (-7) ! { dg-warning "INTEGER expression of NUM_TEAMS clause at .1. must be positive" }
+ !$omp end target teams
+
+ !$omp target teams num_teams (i : -7) ! { dg-warning "INTEGER expression of NUM_TEAMS clause at .1. must be positive" }
+ !$omp end target teams
+
+ !$omp target teams num_teams (-7 : 8) ! { dg-warning "INTEGER expression of NUM_TEAMS clause at .1. must be positive" }
+ !$omp end target teams
+end
+end module
diff --git a/gcc/testsuite/gfortran.dg/gomp/openmp-simd-4.f90 b/gcc/testsuite/gfortran.dg/gomp/openmp-simd-4.f90
index 4a17fb9..17375e0 100644
--- a/gcc/testsuite/gfortran.dg/gomp/openmp-simd-4.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/openmp-simd-4.f90
@@ -45,17 +45,17 @@ do i = 1, 5
end do
!$omp parallel do firstprivate(i)
-do i = 1, 5 ! { dg-error "PARALLEL DO iteration variable present on clause other than PRIVATE or LASTPRIVATE" }
+do i = 1, 5 ! { dg-error "PARALLEL DO iteration variable present on clause other than PRIVATE, LASTPRIVATE or ALLOCATE" }
x(i) = 42
end do
!$omp parallel do simd firstprivate(i)
-do i = 1, 5 ! { dg-error "PARALLEL DO SIMD iteration variable present on clause other than PRIVATE, LASTPRIVATE or LINEAR" }
+do i = 1, 5 ! { dg-error "PARALLEL DO SIMD iteration variable present on clause other than PRIVATE, LASTPRIVATE, ALLOCATE or LINEAR" }
x(i) = 42
end do
!$omp simd linear(i) collapse(2)
-do i = 1, 5 ! { dg-error "SIMD iteration variable present on clause other than PRIVATE or LASTPRIVATE" }
+do i = 1, 5 ! { dg-error "SIMD iteration variable present on clause other than PRIVATE, LASTPRIVATE or ALLOCATE" }
do j = 1, 2
y(j, i) = 52
end do
diff --git a/gcc/testsuite/gfortran.dg/gomp/order-6.f90 b/gcc/testsuite/gfortran.dg/gomp/order-6.f90
index c8aeecb..8d7f9c5 100644
--- a/gcc/testsuite/gfortran.dg/gomp/order-6.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/order-6.f90
@@ -8,7 +8,7 @@ module m
end
integer function omp_get_num_threads ()
end
- integer function omp_target_is_present (x, i)
+ integer function omp_target_is_present (x, i) bind(c)
import :: c_ptr
type(c_ptr) :: x
integer, value :: i
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr102431.f90 b/gcc/testsuite/gfortran.dg/gomp/pr102431.f90
new file mode 100644
index 0000000..71efed8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr102431.f90
@@ -0,0 +1,10 @@
+! PR middle-end/102431
+
+program pr102431
+ integer :: a(2)
+ a(:) = 0
+ !$omp parallel loop reduction(+:a)
+ do i = 1, 8
+ a = a + 1
+ end do
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr102621.f90 b/gcc/testsuite/gfortran.dg/gomp/pr102621.f90
new file mode 100644
index 0000000..ca1e2d4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr102621.f90
@@ -0,0 +1,12 @@
+! This program used to ICE in convert_nonlocal_reference_op due to
+! incorrect scoping of AFFINITY clause iterator variables.
+
+program p
+ integer :: a(8)
+ !$omp task affinity (iterator(j=1:8) : a(j))
+ !$omp end task
+contains
+ integer function f(x)
+ class(*) :: x
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr103643.f90 b/gcc/testsuite/gfortran.dg/gomp/pr103643.f90
new file mode 100644
index 0000000..3b409f5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr103643.f90
@@ -0,0 +1,19 @@
+! PR middle-end/103643
+! { dg-do compile }
+
+program test_task_affinity
+ implicit none
+ integer i
+ integer, allocatable :: A(:)
+
+ allocate (A(10))
+
+ !$omp target
+ !$omp task affinity(A)
+ do i = 1, 10
+ A(i) = 0
+ end do
+ !$omp end task
+ !$omp end target
+
+end program test_task_affinity
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr103695.f90 b/gcc/testsuite/gfortran.dg/gomp/pr103695.f90
new file mode 100644
index 0000000..cc9764e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr103695.f90
@@ -0,0 +1,18 @@
+! This test case used to ICE in verify_ssa due to the iterator variable j
+! incorrectly being inserted into program scope.
+
+program p
+ integer :: i
+ do i = 1, 3
+ call sub (s(i))
+ end do
+contains
+ function s(n) result(z)
+ integer, target, intent(in) :: n
+ integer, pointer :: z
+ integer :: a(8), b(8), c(8)
+ !$omp task affinity (iterator(j=1:8) : a(j), b(j), c(j))
+ !$omp end task
+ z => n
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr78260-2.f90 b/gcc/testsuite/gfortran.dg/gomp/pr78260-2.f90
index c58ad93..f5d8885 100644
--- a/gcc/testsuite/gfortran.dg/gomp/pr78260-2.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/pr78260-2.f90
@@ -48,10 +48,10 @@ contains
end subroutine sub
end module m
-! { dg-final { scan-tree-dump-times "#pragma omp target data map\\(tofrom:\\*\\(c_char \\*\\) arr.data \\\[len: D.\[0-9\]+ \\* 4\\\]\\) map\\(to:arr \\\[pointer set, len: ..\\\]\\) map\\(alloc:\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) arr.data \\\[pointer assign, bias: 0\\\]\\)" 1 "original" } }
-! { dg-final { scan-tree-dump-times "#pragma omp target update to\\(\\*\\(c_char \\*\\) arr.data \\\[len: D.\[0-9\]+ \\* 4\\\]\\)" 1 "original" } }
-! { dg-final { scan-tree-dump-times "#pragma omp target data map\\(tofrom:\\*\\(c_char \\*\\) __result->data \\\[len: D.\[0-9\]+ \\* 4\\\]\\) map\\(to:\\*__result \\\[pointer set, len: ..\\\]\\) map\\(alloc:\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) __result->data \\\[pointer assign, bias: 0\\\]\\) map\\(alloc:__result \\\[pointer assign, bias: 0\\\]\\)" 1 "original" } }
-! { dg-final { scan-tree-dump-times "#pragma omp target update to\\(\\*\\(c_char \\*\\) __result->data \\\[len: D.\[0-9\]+ \\* 4\\\]\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target data map\\(tofrom:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) arr.data \\\[len: D.\[0-9\]+ \\* 4\\\]\\) map\\(to:arr \\\[pointer set, len: ..\\\]\\) map\\(alloc:\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) arr.data \\\[pointer assign, bias: 0\\\]\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target update to\\(\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) arr.data \\\[len: D.\[0-9\]+ \\* 4\\\]\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target data map\\(tofrom:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) __result->data \\\[len: D.\[0-9\]+ \\* 4\\\]\\) map\\(to:\\*__result \\\[pointer set, len: ..\\\]\\) map\\(alloc:\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) __result->data \\\[pointer assign, bias: 0\\\]\\) map\\(alloc:__result \\\[pointer assign, bias: 0\\\]\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp target update to\\(\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) __result->data \\\[len: D.\[0-9\]+ \\* 4\\\]\\)" 1 "original" } }
! { dg-final { scan-tree-dump-times "#pragma omp target data map\\(tofrom:\\*__result.0\\) map\\(alloc:__result.0 \\\[pointer assign, bias: 0\\\]\\)" 2 "original" } }
! { dg-final { scan-tree-dump-times "#pragma omp target update to\\(\\*__result.0\\)" 2 "original" } }
! { dg-final { scan-tree-dump-times "#pragma omp target data map\\(tofrom:__result_f1\\)" 1 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr78260-3.f90 b/gcc/testsuite/gfortran.dg/gomp/pr78260-3.f90
index 4ca3e36..64851b3 100644
--- a/gcc/testsuite/gfortran.dg/gomp/pr78260-3.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/pr78260-3.f90
@@ -70,5 +70,5 @@ end subroutine sub
! { dg-final { scan-tree-dump-times "#pragma omp task depend\\(inout:__result_f1\\)" 2 "original" } }
! { dg-final { scan-tree-dump-times "#pragma omp task depend\\(inout:\\*__result.0\\)" 4 "original" } }
-! { dg-final { scan-tree-dump-times "#pragma omp task depend\\(inout:\\*\\(c_char \\*\\) __result->data\\)" 2 "original" } }
-! { dg-final { scan-tree-dump-times "#pragma omp task depend\\(inout:\\*\\(c_char \\*\\) arr.data\\)" 2 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp task depend\\(inout:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) __result->data\\)" 2 "original" } }
+! { dg-final { scan-tree-dump-times "#pragma omp task depend\\(inout:\\*\\(integer\\(kind=4\\)\\\[0:\\\] \\* restrict\\) arr.data\\)" 2 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/requires-8.f90 b/gcc/testsuite/gfortran.dg/gomp/requires-8.f90
index 3c32ae9..eadfcaf 100644
--- a/gcc/testsuite/gfortran.dg/gomp/requires-8.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/requires-8.f90
@@ -4,7 +4,7 @@ contains
subroutine foo
interface
subroutine bar2
- !$!omp requires dynamic_allocators
+ !$omp requires dynamic_allocators
end subroutine
end interface
!$omp target
diff --git a/gcc/testsuite/gfortran.dg/gomp/target-has-device-addr-1.f90 b/gcc/testsuite/gfortran.dg/gomp/target-has-device-addr-1.f90
new file mode 100644
index 0000000..db3fa46
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/target-has-device-addr-1.f90
@@ -0,0 +1,36 @@
+! { dg-do compile }
+
+implicit none
+
+integer, target :: x
+integer, pointer :: ptr
+integer :: a(5)
+
+!$omp target has_device_addr(x)
+!$omp end target
+!$omp target has_device_addr(ptr)
+!$omp end target
+!$omp target has_device_addr(a)
+!$omp end target
+!$omp target has_device_addr(a(2:3))
+!$omp end target
+!$omp target has_device_addr(a(:3))
+!$omp end target
+!$omp target has_device_addr(a(2:))
+!$omp end target
+!$omp target has_device_addr(a(2))
+!$omp end target
+
+!$omp target has_device_addr(x) has_device_addr(x) ! { dg-error "'x' present on multiple clauses" }
+!$omp end target
+
+!$omp target private(x) has_device_addr(x) ! { dg-error "'x' present on multiple clauses" }
+!$omp end target
+!$omp target has_device_addr(x) private(x) ! { dg-error "'x' present on multiple clauses" }
+!$omp end target
+!$omp target firstprivate(x) has_device_addr(x) ! { dg-error "'x' present on multiple clauses" }
+!$omp end target
+!$omp target has_device_addr(x) firstprivate(x) ! { dg-error "'x' present on multiple clauses" }
+!$omp end target
+
+end \ No newline at end of file
diff --git a/gcc/testsuite/gfortran.dg/gomp/target-has-device-addr-2.f90 b/gcc/testsuite/gfortran.dg/gomp/target-has-device-addr-2.f90
new file mode 100644
index 0000000..7fc92b3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/target-has-device-addr-2.f90
@@ -0,0 +1,27 @@
+! Test to ensure that HAS_DEVICE_ADDR is removed for non-used variables.
+
+! { dg-do compile }
+! { dg-additional-options "-fdump-tree-gimple" }
+
+program main
+ use iso_c_binding
+ implicit none
+
+ integer :: x, y
+ call foo (x, y)
+
+contains
+ subroutine foo (a, b)
+ integer :: a, b
+
+ !$omp target data map(a) use_device_addr(a)
+ !$omp target has_device_addr(a)
+ a = 42
+ !$omp end target
+ !$omp end target data
+ end subroutine foo
+
+end program main
+
+! { dg-final { scan-tree-dump "has_device_addr\\(a\\)" "gimple" } }
+! { dg-final { scan-tree-dump-not "has_device_addr\\(b\\)" "gimple" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/teams-3.f90 b/gcc/testsuite/gfortran.dg/gomp/teams-3.f90
new file mode 100644
index 0000000..fac3393
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/teams-3.f90
@@ -0,0 +1,65 @@
+! PR middle-end/102972
+
+module m
+implicit none (type, external)
+interface
+subroutine omp_set_num_teams (num_teams); integer :: num_teams; end
+subroutine omp_set_teams_thread_limit (thread_limit); integer :: thread_limit; end
+subroutine omp_set_num_teams_8 (num_teams); integer(8) :: num_teams; end
+subroutine omp_set_num_teams_9 (num_teams); integer :: num_teams; end
+subroutine omp_set_teams_thread_limit_8 (thread_limit); integer(8) :: thread_limit; end
+integer function omp_get_num_teams (); end
+integer function omp_get_team_size (level); integer :: level; end
+integer function omp_get_team_num (); end
+integer function omp_get_max_teams (); end
+integer function omp_get_teams_thread_limit (); end
+logical function omp_is_initial_device (); end
+integer function omp_get_num_threads (); end
+end interface
+
+contains
+
+subroutine valid ()
+ integer :: i, n
+ !$omp teams
+ !$omp distribute
+ do i = 1, 64
+ end do
+
+ n = omp_get_num_teams ()
+ if (n >= omp_get_team_num ()) &
+ error stop
+
+ !$omp parallel do
+ do i = 1, 64
+ if (.not.omp_is_initial_device () .or. omp_get_num_threads () < 0) &
+ error stop
+ end do
+
+ !$omp loop
+ do i = 1, 64
+ end do
+ !$omp end teams
+end
+
+subroutine invalid_nest ()
+ integer :: i, n
+ !$omp teams
+ !$omp distribute parallel do simd
+ do i = 1, 64
+ end do
+
+ n = 0
+ n = n + omp_get_team_size (0) ! { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_team_size\[^\n\r]*' strictly nested in a 'teams' region" }
+ n = n + omp_get_num_teams ()
+ n = n + omp_get_team_num ()
+ call omp_set_num_teams (n) ! { dg-error "OpenMP runtime API call '\[^\n\r]*omp_set_num_teams\[^\n\r]*' strictly nested in a 'teams' region" }
+ call omp_set_num_teams_8 (4_8) ! { dg-error "OpenMP runtime API call '\[^\n\r]*omp_set_num_teams_8\[^\n\r]*' strictly nested in a 'teams' region" }
+ call omp_set_num_teams_9 (4) ! OK - but misnamed user function
+ n = n + omp_get_max_teams () ! { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_max_teams\[^\n\r]*' strictly nested in a 'teams' region" }
+ n = n + omp_get_teams_thread_limit () ! { dg-error "OpenMP runtime API call '\[^\n\r]*omp_get_teams_thread_limit\[^\n\r]*' strictly nested in a 'teams' region" }
+ call omp_set_teams_thread_limit (n) ! { dg-error "OpenMP runtime API call '\[^\n\r]*omp_set_teams_thread_limit'\[^\n\r]* strictly nested in a 'teams' region" }
+ call omp_set_teams_thread_limit_8 (3_8) ! { dg-error "OpenMP runtime API call '\[^\n\r]*omp_set_teams_thread_limit_8'\[^\n\r]* strictly nested in a 'teams' region" }
+ !$omp end teams
+end
+end module
diff --git a/gcc/testsuite/gfortran.dg/gomp/teams-4.f90 b/gcc/testsuite/gfortran.dg/gomp/teams-4.f90
new file mode 100644
index 0000000..422c2c9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/teams-4.f90
@@ -0,0 +1,47 @@
+! PR middle-end/102972
+
+module m
+implicit none (type, external)
+
+! Note: Those are module functions - not an interface
+! Hence, they are internally manged to contain the module name!
+
+contains
+
+subroutine omp_set_num_teams (num_teams); integer :: num_teams; end
+subroutine omp_set_teams_thread_limit (thread_limit); integer :: thread_limit; end
+subroutine omp_set_num_teams_8 (num_teams); integer(8) :: num_teams; end
+subroutine omp_set_num_teams_9 (num_teams); integer :: num_teams; end
+subroutine omp_set_teams_thread_limit_8 (thread_limit); integer(8) :: thread_limit; end
+integer function omp_get_num_teams (); omp_get_num_teams = 0; end
+integer function omp_get_team_size (level); integer :: level; omp_get_team_size = 0; end
+integer function omp_get_team_num (); omp_get_team_num = 0; end
+integer function omp_get_max_teams (); omp_get_max_teams = 0; end
+integer function omp_get_teams_thread_limit (); omp_get_teams_thread_limit = 0; end
+logical function omp_is_initial_device (); omp_is_initial_device = .true.; end
+integer function omp_get_num_threads (); omp_get_num_threads = 0; end
+end module
+
+subroutine nest_test ()
+ use m
+ implicit none (type, external)
+
+ integer :: i, n
+ !$omp teams
+ !$omp distribute parallel do simd
+ do i = 1, 64
+ end do
+
+ n = 0
+ n = n + omp_get_team_size (0)
+ n = n + omp_get_num_teams ()
+ n = n + omp_get_team_num ()
+ call omp_set_num_teams (n)
+ call omp_set_num_teams_8 (4_8)
+ call omp_set_num_teams_9 (4)
+ n = n + omp_get_max_teams ()
+ n = n + omp_get_teams_thread_limit ()
+ call omp_set_teams_thread_limit (n)
+ call omp_set_teams_thread_limit_8 (3_8)
+ !$omp end teams
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/unexpected-end.f90 b/gcc/testsuite/gfortran.dg/gomp/unexpected-end.f90
index 96f10b5..70f54f9 100644
--- a/gcc/testsuite/gfortran.dg/gomp/unexpected-end.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/unexpected-end.f90
@@ -16,12 +16,12 @@
!$omp end DO SIMD ! { dg-error "Unexpected !.OMP END DO SIMD" }
-!$omp end LOOP ! { dg-error "Unclassifiable OpenMP directive" }
+!$omp end LOOP ! { dg-error "Unexpected !.OMP END LOOP" }
!$omp parallel loop
do i = 1, 5
end do
-!$omp end LOOP ! { dg-error "Unclassifiable OpenMP directive" }
+!$omp end LOOP ! { dg-error "Unexpected !.OMP END LOOP" }
!$omp end MASKED ! { dg-error "Unexpected !.OMP END MASKED" }
@@ -44,7 +44,7 @@ end do
!$omp end PARALLEL DO SIMD ! { dg-error "Unexpected !.OMP END PARALLEL DO SIMD" }
!$omp loop
-!$omp end PARALLEL LOOP ! { dg-error "Unexpected junk" }
+!$omp end PARALLEL LOOP ! { dg-error "Unexpected !.OMP END PARALLEL LOOP" }
!$omp end PARALLEL MASKED ! { dg-error "Unexpected !.OMP END PARALLEL MASKED" }
@@ -80,7 +80,7 @@ end do
!$omp end TARGET PARALLEL DO SIMD ! { dg-error "Unexpected !.OMP END TARGET PARALLEL DO SIMD" }
-!$omp end TARGET PARALLEL LOOP ! { dg-error "Unexpected junk" }
+!$omp end TARGET PARALLEL LOOP ! { dg-error "Unexpected !.OMP END TARGET PARALLEL LOOP" }
!$omp end TARGET SIMD ! { dg-error "Unexpected !.OMP END TARGET SIMD" }
@@ -94,7 +94,7 @@ end do
!$omp end TARGET TEAMS DISTRIBUTE SIMD ! { dg-error "Unexpected !.OMP END TARGET TEAMS DISTRIBUTE SIMD" }
-!$omp end TARGET TEAMS LOOP ! { dg-error "Unexpected junk" }
+!$omp end TARGET TEAMS LOOP ! { dg-error "Unexpected !.OMP END TARGET TEAMS LOOP" }
!$omp end TASK ! { dg-error "Unexpected !.OMP END TASK" }
@@ -114,7 +114,7 @@ end do
!$omp end TEAMS DISTRIBUTE SIMD ! { dg-error "Unexpected !.OMP END TEAMS DISTRIBUTE SIMD" }
-!$omp end TEAMS LOOP ! { dg-error "Unexpected junk" }
+!$omp end TEAMS LOOP ! { dg-error "Unexpected !.OMP END TEAMS LOOP" }
!$omp end WORKSHARE ! { dg-error "Unexpected !.OMP END WORKSHARE" }
diff --git a/gcc/testsuite/gfortran.dg/graphite/graphite.exp b/gcc/testsuite/gfortran.dg/graphite/graphite.exp
index b22ec4a..1c9ac49 100644
--- a/gcc/testsuite/gfortran.dg/graphite/graphite.exp
+++ b/gcc/testsuite/gfortran.dg/graphite/graphite.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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/ieee/ieee.exp b/gcc/testsuite/gfortran.dg/ieee/ieee.exp
index d4f820c..529e16c 100644
--- a/gcc/testsuite/gfortran.dg/ieee/ieee.exp
+++ b/gcc/testsuite/gfortran.dg/ieee/ieee.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gfortran.dg/ieee/ieee_10.f90 b/gcc/testsuite/gfortran.dg/ieee/ieee_10.f90
index c3ffffc..a596504 100644
--- a/gcc/testsuite/gfortran.dg/ieee/ieee_10.f90
+++ b/gcc/testsuite/gfortran.dg/ieee/ieee_10.f90
@@ -12,8 +12,10 @@ program foo
real x
real(8) y
- x = ieee_value(x, ieee_signaling_nan)
- if (.not. ieee_is_nan(x)) stop 1
+ ! At this point it is unclear what the behavior should be
+ ! for -ffpe-trap=invalid with a signaling NaN
+ !x = ieee_value(x, ieee_signaling_nan)
+ !if (.not. ieee_is_nan(x)) stop 1
x = ieee_value(x, ieee_quiet_nan)
if (.not. ieee_is_nan(x)) stop 2
@@ -22,8 +24,10 @@ program foo
x = ieee_value(x, ieee_negative_inf)
if (ieee_is_finite(x)) stop 4
- y = ieee_value(y, ieee_signaling_nan)
- if (.not. ieee_is_nan(y)) stop 5
+ ! At this point it is unclear what the behavior should be
+ ! for -ffpe-trap=invalid with a signaling NaN
+ !y = ieee_value(y, ieee_signaling_nan)
+ !if (.not. ieee_is_nan(y)) stop 5
y = ieee_value(y, ieee_quiet_nan)
if (.not. ieee_is_nan(y)) stop 6
diff --git a/gcc/testsuite/gfortran.dg/ieee/ieee_9.f90 b/gcc/testsuite/gfortran.dg/ieee/ieee_9.f90
index 5e0ac36..e5935ec 100644
--- a/gcc/testsuite/gfortran.dg/ieee/ieee_9.f90
+++ b/gcc/testsuite/gfortran.dg/ieee/ieee_9.f90
@@ -1,71 +1,45 @@
-! { dg-do run { xfail arm*-*-gnueabi arm*-*-gnueabihf } }
-! { dg-skip-if "PR89639" { hppa*-*-linux* } }
+! { dg-do run }
program foo
use ieee_arithmetic
use iso_fortran_env
+ implicit none
+
+ ! This allows us to test REAL128 if it exists, and still compile
+ ! on platforms were it is not present
+ ! https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89639
+ integer, parameter :: large = merge(real128, real64, real128 > 0)
+
integer i, p
real x
x = 4
i = 4
- if (int8 > 0) then
- if (real32 > 0) then
- p = int(ieee_scalb(real(x, real32), int(i, int8)))
- if (p /= 64) stop 1
- endif
- if (real64 > 0) then
- p = int(ieee_scalb(real(x, real64), int(i, int8)))
- if (p /= 64) stop 2
- endif
- if (real128 > 0) then
- p = int(ieee_scalb(real(x, real128), int(i, int8)))
- if (p /= 64) stop 3
- end if
- end if
+ p = int(ieee_scalb(real(x, real32), int(i, int8)))
+ if (p /= 64) stop 1
+ p = int(ieee_scalb(real(x, real64), int(i, int8)))
+ if (p /= 64) stop 2
+ p = int(ieee_scalb(real(x, large), int(i, int8)))
+ if (p /= 64) stop 3
- if (int16 > 0) then
- if (real32 > 0) then
- p = int(ieee_scalb(real(x, real32), int(i, int16)))
- if (p /= 64) stop 4
- endif
- if (real64 > 0) then
- p = int(ieee_scalb(real(x, real64), int(i, int16)))
- if (p /= 64) stop 5
- endif
- if (real128 > 0) then
- p = int(ieee_scalb(real(x, real128), int(i, int16)))
- if (p /= 64) stop 6
- end if
- end if
+ p = int(ieee_scalb(real(x, real32), int(i, int16)))
+ if (p /= 64) stop 4
+ p = int(ieee_scalb(real(x, real64), int(i, int16)))
+ if (p /= 64) stop 5
+ p = int(ieee_scalb(real(x, large), int(i, int16)))
+ if (p /= 64) stop 6
- if (int32 > 0) then
- if (real32 > 0) then
- p = int(ieee_scalb(real(x, real32), int(i, int32)))
- if (p /= 64) stop 7
- endif
- if (real64 > 0) then
- p = int(ieee_scalb(real(x, real64), int(i, int32)))
- if (p /= 64) stop 8
- endif
- if (real128 > 0) then
- p = int(ieee_scalb(real(x, real128), int(i, int32)))
- if (p /= 64) stop 9
- end if
- end if
+ p = int(ieee_scalb(real(x, real32), int(i, int32)))
+ if (p /= 64) stop 7
+ p = int(ieee_scalb(real(x, real64), int(i, int32)))
+ if (p /= 64) stop 8
+ p = int(ieee_scalb(real(x, large), int(i, int32)))
+ if (p /= 64) stop 9
- if (int64 > 0) then
- if (real32 > 0) then
- p = int(ieee_scalb(real(x, real32), int(i, int64)))
- if (p /= 64) stop 10
- endif
- if (real64 > 0) then
- p = int(ieee_scalb(real(x, real64), int(i, int64)))
- if (p /= 64) stop 11
- endif
- if (real128 > 0) then
- p = int(ieee_scalb(real(x, real128), int(i, int64)))
- if (p /= 64) stop 12
- end if
- end if
+ p = int(ieee_scalb(real(x, real32), int(i, int64)))
+ if (p /= 64) stop 10
+ p = int(ieee_scalb(real(x, real64), int(i, int64)))
+ if (p /= 64) stop 11
+ p = int(ieee_scalb(real(x, large), int(i, int64)))
+ if (p /= 64) stop 12
end program foo
diff --git a/gcc/testsuite/gfortran.dg/ieee/signaling_1.f90 b/gcc/testsuite/gfortran.dg/ieee/signaling_1.f90
new file mode 100644
index 0000000..19fee28
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/ieee/signaling_1.f90
@@ -0,0 +1,92 @@
+! { dg-do run { target { ! ia32 } } }
+! x87 / x86-32 ABI is unsuitable for signaling NaNs
+!
+! { dg-additional-sources signaling_1_c.c }
+! { dg-additional-options "-w" }
+! The -w option is needed to make cc1 not report a warning for
+! the -fintrinsic-modules-path option passed by ieee.exp
+!
+program test
+ use, intrinsic :: iso_c_binding
+ use, intrinsic :: ieee_arithmetic
+ implicit none
+
+ interface
+ real(kind=c_float) function create_nansf () bind(c)
+ import :: c_float
+ end function
+
+ real(kind=c_double) function create_nans () bind(c)
+ import :: c_double
+ end function
+
+ real(kind=c_long_double) function create_nansl () bind(c)
+ import :: c_long_double
+ end function
+ end interface
+
+ real(kind=c_float) :: x
+ real(kind=c_double) :: y
+ real(kind=c_long_double) :: z
+
+ if (ieee_support_nan(x)) then
+ x = create_nansf()
+ if (ieee_class(x) /= ieee_signaling_nan) stop 100
+ if (.not. ieee_is_nan(x)) stop 101
+ if (ieee_is_negative(x)) stop 102
+ if (ieee_is_finite(x)) stop 103
+ if (ieee_is_normal(x)) stop 104
+ if (.not. ieee_unordered(x, x)) stop 105
+ if (.not. ieee_unordered(x, 1._c_float)) stop 106
+
+ x = ieee_value(x, ieee_quiet_nan)
+ if (ieee_class(x) /= ieee_quiet_nan) stop 107
+ if (.not. ieee_is_nan(x)) stop 108
+ if (ieee_is_negative(x)) stop 109
+ if (ieee_is_finite(x)) stop 110
+ if (ieee_is_normal(x)) stop 111
+ if (.not. ieee_unordered(x, x)) stop 112
+ if (.not. ieee_unordered(x, 1._c_double)) stop 113
+ end if
+
+ if (ieee_support_nan(y)) then
+ y = create_nans()
+ if (ieee_class(y) /= ieee_signaling_nan) stop 200
+ if (.not. ieee_is_nan(y)) stop 201
+ if (ieee_is_negative(y)) stop 202
+ if (ieee_is_finite(y)) stop 203
+ if (ieee_is_normal(y)) stop 204
+ if (.not. ieee_unordered(y, x)) stop 205
+ if (.not. ieee_unordered(y, 1._c_double)) stop 206
+
+ y = ieee_value(y, ieee_quiet_nan)
+ if (ieee_class(y) /= ieee_quiet_nan) stop 207
+ if (.not. ieee_is_nan(y)) stop 208
+ if (ieee_is_negative(y)) stop 209
+ if (ieee_is_finite(y)) stop 210
+ if (ieee_is_normal(y)) stop 211
+ if (.not. ieee_unordered(y, y)) stop 212
+ if (.not. ieee_unordered(y, 1._c_double)) stop 213
+ end if
+
+ if (ieee_support_nan(z)) then
+ z = create_nansl()
+ if (ieee_class(z) /= ieee_signaling_nan) stop 300
+ if (.not. ieee_is_nan(z)) stop 301
+ if (ieee_is_negative(z)) stop 302
+ if (ieee_is_finite(z)) stop 303
+ if (ieee_is_normal(z)) stop 304
+ if (.not. ieee_unordered(z, z)) stop 305
+ if (.not. ieee_unordered(z, 1._c_long_double)) stop 306
+
+ z = ieee_value(z, ieee_quiet_nan)
+ if (ieee_class(z) /= ieee_quiet_nan) stop 307
+ if (.not. ieee_is_nan(z)) stop 308
+ if (ieee_is_negative(z)) stop 309
+ if (ieee_is_finite(z)) stop 310
+ if (ieee_is_normal(z)) stop 311
+ if (.not. ieee_unordered(z, z)) stop 312
+ if (.not. ieee_unordered(z, 1._c_double)) stop 313
+ end if
+
+end program test
diff --git a/gcc/testsuite/gfortran.dg/ieee/signaling_1_c.c b/gcc/testsuite/gfortran.dg/ieee/signaling_1_c.c
new file mode 100644
index 0000000..ab19bb7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/ieee/signaling_1_c.c
@@ -0,0 +1,14 @@
+float create_nansf (void)
+{
+ return __builtin_nansf("");
+}
+
+double create_nans (void)
+{
+ return __builtin_nans("");
+}
+
+long double create_nansl (void)
+{
+ return __builtin_nansl("");
+}
diff --git a/gcc/testsuite/gfortran.dg/ieee/signaling_2.f90 b/gcc/testsuite/gfortran.dg/ieee/signaling_2.f90
new file mode 100644
index 0000000..03b04c7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/ieee/signaling_2.f90
@@ -0,0 +1,74 @@
+! { dg-do run { target { ! ia32 } } }
+! x87 / x86-32 ABI is unsuitable for signaling NaNs
+!
+! { dg-require-effective-target issignaling } */
+! The companion C source needs access to the issignaling macro.
+!
+! { dg-additional-sources signaling_2_c.c }
+! { dg-additional-options "-w" }
+! The -w option is needed to make cc1 not report a warning for
+! the -fintrinsic-modules-path option passed by ieee.exp
+!
+program test
+ use, intrinsic :: iso_c_binding
+ use, intrinsic :: ieee_arithmetic
+ implicit none
+
+ interface
+ integer(kind=c_int) function isnansf (x) bind(c)
+ import :: c_float, c_int
+ real(kind=c_float), value :: x
+ end function
+
+ integer(kind=c_int) function isnans (x) bind(c)
+ import :: c_double, c_int
+ real(kind=c_double), value :: x
+ end function
+
+ integer(kind=c_int) function isnansl (x) bind(c)
+ import :: c_long_double, c_int
+ real(kind=c_long_double), value :: x
+ end function
+ end interface
+
+ real(kind=c_float) :: x
+ real(kind=c_double) :: y
+ real(kind=c_long_double) :: z
+
+ if (ieee_support_nan(x)) then
+ x = ieee_value(x, ieee_signaling_nan)
+ if (ieee_class(x) /= ieee_signaling_nan) stop 100
+ if (.not. ieee_is_nan(x)) stop 101
+ if (isnansf(x) /= 1) stop 102
+
+ x = ieee_value(x, ieee_quiet_nan)
+ if (ieee_class(x) /= ieee_quiet_nan) stop 103
+ if (.not. ieee_is_nan(x)) stop 104
+ if (isnansf(x) /= 0) stop 105
+ end if
+
+ if (ieee_support_nan(y)) then
+ y = ieee_value(y, ieee_signaling_nan)
+ if (ieee_class(y) /= ieee_signaling_nan) stop 100
+ if (.not. ieee_is_nan(y)) stop 101
+ if (isnans(y) /= 1) stop 102
+
+ y = ieee_value(y, ieee_quiet_nan)
+ if (ieee_class(y) /= ieee_quiet_nan) stop 103
+ if (.not. ieee_is_nan(y)) stop 104
+ if (isnans(y) /= 0) stop 105
+ end if
+
+ if (ieee_support_nan(z)) then
+ z = ieee_value(z, ieee_signaling_nan)
+ if (ieee_class(z) /= ieee_signaling_nan) stop 100
+ if (.not. ieee_is_nan(z)) stop 101
+ if (isnansl(z) /= 1) stop 102
+
+ z = ieee_value(z, ieee_quiet_nan)
+ if (ieee_class(z) /= ieee_quiet_nan) stop 103
+ if (.not. ieee_is_nan(z)) stop 104
+ if (isnansl(z) /= 0) stop 105
+ end if
+
+end program test
diff --git a/gcc/testsuite/gfortran.dg/ieee/signaling_2_c.c b/gcc/testsuite/gfortran.dg/ieee/signaling_2_c.c
new file mode 100644
index 0000000..ea7fc04
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/ieee/signaling_2_c.c
@@ -0,0 +1,8 @@
+#define _GNU_SOURCE
+#include <math.h>
+#include <float.h>
+
+int isnansf (float x) { return issignaling (x) ? 1 : 0; }
+int isnans (double x) { return issignaling (x) ? 1 : 0; }
+int isnansl (long double x) { return issignaling (x) ? 1 : 0; }
+
diff --git a/gcc/testsuite/gfortran.dg/ieee/signaling_3.f90 b/gcc/testsuite/gfortran.dg/ieee/signaling_3.f90
new file mode 100644
index 0000000..ff2585d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/ieee/signaling_3.f90
@@ -0,0 +1,43 @@
+! { dg-do run { target { ! ia32 } } }
+! x87 / x86-32 ABI is unsuitable for signaling NaNs
+!
+program test
+ use, intrinsic :: iso_c_binding
+ use, intrinsic :: ieee_arithmetic
+ implicit none
+
+ real(kind=c_float) :: x
+ real(kind=c_double) :: y
+ real(kind=c_long_double) :: z
+
+ if (ieee_support_nan(x)) then
+ x = ieee_value(x, ieee_signaling_nan)
+ if (ieee_class(x) /= ieee_signaling_nan) stop 100
+ if (.not. ieee_is_nan(x)) stop 101
+
+ x = ieee_value(x, ieee_quiet_nan)
+ if (ieee_class(x) /= ieee_quiet_nan) stop 103
+ if (.not. ieee_is_nan(x)) stop 104
+ end if
+
+ if (ieee_support_nan(y)) then
+ y = ieee_value(y, ieee_signaling_nan)
+ if (ieee_class(y) /= ieee_signaling_nan) stop 100
+ if (.not. ieee_is_nan(y)) stop 101
+
+ y = ieee_value(y, ieee_quiet_nan)
+ if (ieee_class(y) /= ieee_quiet_nan) stop 103
+ if (.not. ieee_is_nan(y)) stop 104
+ end if
+
+ if (ieee_support_nan(z)) then
+ z = ieee_value(z, ieee_signaling_nan)
+ if (ieee_class(z) /= ieee_signaling_nan) stop 100
+ if (.not. ieee_is_nan(z)) stop 101
+
+ z = ieee_value(z, ieee_quiet_nan)
+ if (ieee_class(z) /= ieee_quiet_nan) stop 103
+ if (.not. ieee_is_nan(z)) stop 104
+ end if
+
+end program test
diff --git a/gcc/testsuite/gfortran.dg/illegal_boz_arg_2.f90 b/gcc/testsuite/gfortran.dg/illegal_boz_arg_2.f90
new file mode 100644
index 0000000..3e5f6b6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/illegal_boz_arg_2.f90
@@ -0,0 +1,6 @@
+! { dg-do compile }
+! PR fortran/103412
+
+program p
+ integer, parameter :: a = sizeof(z'1') ! { dg-error "cannot be an actual" }
+end
diff --git a/gcc/testsuite/gfortran.dg/illegal_boz_arg_3.f90 b/gcc/testsuite/gfortran.dg/illegal_boz_arg_3.f90
new file mode 100644
index 0000000..59fefa9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/illegal_boz_arg_3.f90
@@ -0,0 +1,7 @@
+! { dg-do compile }
+! PR fortran/103778
+
+program p
+ use iso_c_binding, only : c_sizeof
+ integer, parameter :: a = c_sizeof(z'1') ! { dg-error "cannot appear" }
+end
diff --git a/gcc/testsuite/gfortran.dg/implicit_14.f90 b/gcc/testsuite/gfortran.dg/implicit_14.f90
index 8282c1f..422d913 100644
--- a/gcc/testsuite/gfortran.dg/implicit_14.f90
+++ b/gcc/testsuite/gfortran.dg/implicit_14.f90
@@ -4,5 +4,5 @@
! Support Fortran 2018's IMPLICIT NONE with spec list
! (currently implemented as vendor extension)
-implicit none (type) ! { dg-error "Fortran 2018: IMPORT NONE with spec list at \\(1\\)" }
+implicit none (type) ! { dg-error "Fortran 2018: IMPLICIT NONE with spec list at \\(1\\)" }
end
diff --git a/gcc/testsuite/gfortran.dg/index_5.f90 b/gcc/testsuite/gfortran.dg/index_5.f90
new file mode 100644
index 0000000..4dc2ce4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/index_5.f90
@@ -0,0 +1,25 @@
+! { dg-do compile }
+!
+! PR fortran/97896
+! An ICE occured with INDEX when the KIND argument was present
+! because of a mismatch between the number of arguments expected
+! during the scalarization process and the number of arguments actually
+! used.
+!
+! Test contributed by Harald Anlauf <anlauf@gcc.gnu.org>, based on an initial
+! submission by G. Steinmetz <gscfq@t-online.de>.
+
+program p
+ implicit none
+ logical :: a(2)
+ integer :: b(2)
+ integer(8) :: d(2)
+ b = index ('xyxyz','yx', back=a)
+ b = index ('xyxyz','yx', back=a, kind=4)
+ d = index ('xyxyz','yx', back=a, kind=8)
+ b = index ('xyxyz','yx', back=a, kind=8)
+ d = index ('xyxyz','yx', back=a, kind=4)
+ b = index ('xyxyz','yx', a, 4)
+ d = index ('xyxyz','yx', a, 8)
+end
+
diff --git a/gcc/testsuite/gfortran.dg/inline_matmul_17.f90 b/gcc/testsuite/gfortran.dg/inline_matmul_17.f90
index d2ca8e2..cff4b6c 100644
--- a/gcc/testsuite/gfortran.dg/inline_matmul_17.f90
+++ b/gcc/testsuite/gfortran.dg/inline_matmul_17.f90
@@ -45,4 +45,4 @@ program main
c = matmul(a, bfunc())
if (any(c-d /= 0)) STOP 6
end program main
-! { dg-final { scan-tree-dump-times "matmul_r4" 2 "optimized" } }
+! { dg-final { scan-tree-dump-not "matmul_r4" "optimized" } }
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_pack_6.f90 b/gcc/testsuite/gfortran.dg/intrinsic_pack_6.f90
new file mode 100644
index 0000000..917944d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/intrinsic_pack_6.f90
@@ -0,0 +1,57 @@
+! { dg-do run }
+! PR libfortran/103634 - Runtime crash with PACK on zero-sized arrays
+! Exercise PACK intrinsic for cases when it calls pack_internal
+
+program p
+ implicit none
+ type t
+ real :: r(24) = -99.
+ end type
+ type(t), allocatable :: new(:), old(:), vec(:)
+ logical, allocatable :: mask(:)
+ integer :: n, m
+! m = 1 ! works
+ m = 0 ! failed with SIGSEGV in pack_internal
+ do m = 0, 2
+ print *, m
+ allocate (old(m), mask(m), vec(m))
+ if (m > 0) vec(m)% r(1) = 42
+ mask(:) = .true.
+ n = count (mask)
+ allocate (new(n))
+
+ mask(:) = .false.
+ if (size (pack (old, mask)) /= 0) stop 1
+ mask(:) = .true.
+ if (size (pack (old, mask)) /= m) stop 2
+ new(:) = pack (old, mask) ! this used to segfault for m=0
+
+ mask(:) = .false.
+ if (size (pack (old, mask, vector=vec)) /= m) stop 3
+ new(:) = t()
+ new(:) = pack (old, mask, vector=vec) ! this used to segfault for m=0
+ if (m > 0) then
+ if ( new( m )% r(1) /= 42) stop 4
+ if (any (new(:m-1)% r(1) /= -99)) stop 5
+ end if
+
+ if (m > 0) mask(m) = .true.
+ if (size (pack (old, mask, vector=vec)) /= m) stop 6
+ new(:) = t()
+ new(:) = pack (old, mask, vector=vec) ! this used to segfault for m=0
+ if (m > 0) then
+ if (new(1)% r(1) /= -99) stop 7
+ end if
+ if (m > 1) then
+ if (new(m)% r(1) /= 42) stop 8
+ end if
+
+ if (size (pack (old(:0), mask(:0), vector=vec)) /= m) stop 9
+ new(:) = t()
+ new(:) = pack (old(:0), mask(:0), vector=vec) ! did segfault for m=0
+ if (m > 0) then
+ if (new(m)% r(1) /= 42) stop 10
+ end if
+ deallocate (old, mask, new, vec)
+ end do
+end
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_short-long.f90 b/gcc/testsuite/gfortran.dg/intrinsic_short-long.f90
new file mode 100644
index 0000000..3f3f3cc
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/intrinsic_short-long.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+!
+! Checking for removal of SHORT and LONG intrinsics.
+!
+ real,parameter :: a=3.1415927
+ integer :: i
+
+ i=SHORT(a) ! { dg-error "has been removed" }
+ i=LONG(a) ! { dg-error "has been removed" }
+
+ end
diff --git a/gcc/testsuite/gfortran.dg/iostat_5.f90 b/gcc/testsuite/gfortran.dg/iostat_5.f90
new file mode 100644
index 0000000..1e72dfd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/iostat_5.f90
@@ -0,0 +1,16 @@
+! PR libfortran/101255
+! { dg-do run }
+
+program test
+ use ISO_FORTRAN_ENV, only: IOSTAT_EOR, IOSTAT_END
+ implicit none
+ character(len=50) :: err
+ integer :: i
+
+ err = ""
+ flush(99, iostat=i, iomsg=err)
+
+ if (err == "") stop 1
+ if (i >= 0) stop 2
+ if (i == IOSTAT_EOR .or. i == IOSTAT_END) stop 3
+end
diff --git a/gcc/testsuite/gfortran.dg/len_trim.f90 b/gcc/testsuite/gfortran.dg/len_trim.f90
new file mode 100644
index 0000000..77e3d30
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/len_trim.f90
@@ -0,0 +1,33 @@
+! { dg-do compile }
+! { dg-options "-O -Wall -Wconversion-extra -fdump-tree-original" }
+! { dg-final { scan-tree-dump-not "_gfortran_stop_numeric" "original" } }
+! PR fortran/87711 - ICE in gfc_trans_transfer
+! PR fortran/87851 - return type for len_trim
+
+program main
+ implicit none
+ character(3), parameter :: a(1) = 'aa'
+ character(3) :: b = "bb"
+ character(3) :: c(1) = 'cc'
+ integer(4), parameter :: l4(1) = len_trim (a, kind=4)
+ integer(8), parameter :: l8(1) = len_trim (a, kind=8)
+ integer :: kk(1) = len_trim (a)
+ integer(4) :: mm(1) = len_trim (a, kind=4)
+ integer(8) :: nn(1) = len_trim (a, kind=8)
+ kk = len_trim (a)
+ mm = len_trim (a, kind=4)
+ nn = len_trim (a, kind=8)
+ mm = len_trim (a, 4)
+ nn = len_trim (a, 8)
+ kk = len_trim ([b])
+ mm = len_trim ([b],kind=4)
+ nn = len_trim ([b],kind=8)
+ mm = len_trim ([b], 4)
+ nn = len_trim ([b], 8)
+ kk = len_trim (c)
+ mm = len_trim (c, kind=4)
+ nn = len_trim (c, kind=8)
+ mm = len_trim (c, 4)
+ nn = len_trim (c, 8)
+ if (any (l4 /= 2_4) .or. any (l8 /= 2_8)) stop 1
+end program main
diff --git a/gcc/testsuite/gfortran.dg/lto/lto.exp b/gcc/testsuite/gfortran.dg/lto/lto.exp
index 5bb7ffd..5c72d3f 100644
--- a/gcc/testsuite/gfortran.dg/lto/lto.exp
+++ b/gcc/testsuite/gfortran.dg/lto/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/maskl_1.f90 b/gcc/testsuite/gfortran.dg/maskl_1.f90
new file mode 100644
index 0000000..56350e2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/maskl_1.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+!
+! PR fortran/103789
+! Check the absence of ICE when generating calls to MASKL with a KIND argument.
+
+program p
+ integer :: z(2), y(2), x(2)
+ y = [1, 13]
+ z = maskl(y, kind=4) + 1
+ x = maskl(y, 4) + 1
+end program p
diff --git a/gcc/testsuite/gfortran.dg/masklr_3.f90 b/gcc/testsuite/gfortran.dg/masklr_3.f90
new file mode 100644
index 0000000..eb689f0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/masklr_3.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+! PR fortran/103777 - ICE in gfc_simplify_maskl
+! Contributed by G.Steinmetz
+
+program p
+ print *, maskl([999]) ! { dg-error "must be less than or equal" }
+ print *, maskr([999]) ! { dg-error "must be less than or equal" }
+ print *, maskl([-999]) ! { dg-error "must be nonnegative" }
+ print *, maskr([-999]) ! { dg-error "must be nonnegative" }
+ print *, maskl([32],kind=4)
+ print *, maskl([33],kind=4) ! { dg-error "must be less than or equal" }
+ print *, maskl([64],kind=8)
+ print *, maskl([65],kind=8) ! { dg-error "must be less than or equal" }
+end
diff --git a/gcc/testsuite/gfortran.dg/maskr_1.f90 b/gcc/testsuite/gfortran.dg/maskr_1.f90
new file mode 100644
index 0000000..f8ccdd1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/maskr_1.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+!
+! PR fortran/103789
+! Check the absence of ICE when generating calls to MASKR with a KIND argument.
+
+program p
+ integer :: z(2), y(2), x(2)
+ y = [1, 13]
+ z = maskr(y, kind=4) + 1
+ x = maskr(y, 4) + 1
+end program p
diff --git a/gcc/testsuite/gfortran.dg/minmaxloc_15.f90 b/gcc/testsuite/gfortran.dg/minmaxloc_15.f90
new file mode 100644
index 0000000..e4eba35
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/minmaxloc_15.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! PR fortran/103473 - ICE in simplify_minmaxloc_nodim
+! Test case by Gerhard Steinmetz.
+
+subroutine s
+ implicit none
+ integer, parameter :: a(+'1') = [1] ! { dg-error "unary numeric operator" }
+ print *, minloc (a)
+end
+
+! { dg-prune-output "Parameter array" }
diff --git a/gcc/testsuite/gfortran.dg/move_alloc_8.f90 b/gcc/testsuite/gfortran.dg/move_alloc_8.f90
index f624b70..d968ea0 100644
--- a/gcc/testsuite/gfortran.dg/move_alloc_8.f90
+++ b/gcc/testsuite/gfortran.dg/move_alloc_8.f90
@@ -60,7 +60,7 @@ subroutine test2 (x, px)
integer, allocatable :: a
type(t2), pointer :: ta
- call move_alloc (px, ta) ! { dg-error "cannot be INTENT.IN." }
+ call move_alloc (px, ta) ! { dg-error "must be ALLOCATABLE" }
call move_alloc (x%a, a) ! { dg-error "cannot be INTENT.IN." }
call move_alloc (x%ptr%a, a) ! OK (3)
call move_alloc (px%a, a) ! OK (4)
@@ -84,7 +84,7 @@ subroutine test3 (x, px)
integer, allocatable :: a
class(t2), pointer :: ta
- call move_alloc (px, ta) ! { dg-error "cannot be INTENT.IN." }
+ call move_alloc (px, ta) ! { dg-error "must be ALLOCATABLE" }
call move_alloc (x%a, a) ! { dg-error "cannot be INTENT.IN." }
call move_alloc (x%ptr%a, a) ! OK (6)
call move_alloc (px%a, a) ! OK (7)
diff --git a/gcc/testsuite/gfortran.dg/overload_4.f90 b/gcc/testsuite/gfortran.dg/overload_4.f90
new file mode 100644
index 0000000..43207e3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/overload_4.f90
@@ -0,0 +1,27 @@
+! { dg-do run }
+! { dg-additional-options "-Wno-intrinsic-shadow" }
+! PR fortran/103782 - ICE overloading an intrinsic like dble or real
+! Contributed by Urban Jost
+
+program runtest
+ implicit none
+ interface dble
+ procedure to_double
+ end interface dble
+ interface real
+ procedure floor ! not really FLOOR...
+ end interface real
+ if (any (dble ([10.0d0,20.0d0]) - [10.0d0,20.0d0] /= 0.d0)) stop 1
+ if (any (real ([1.5,2.5]) - [1.5,2.5] /= 0.0 )) stop 2
+contains
+ elemental function to_double (valuein) result(d_out)
+ doubleprecision,intent(in) :: valuein
+ doubleprecision :: d_out
+ d_out=valuein
+ end function to_double
+ elemental function floor (valuein) result(d_out) ! not really FLOOR...
+ real, intent(in) :: valuein
+ real :: d_out
+ d_out=valuein
+ end function floor
+end program runtest
diff --git a/gcc/testsuite/gfortran.dg/pointer_intent_9.f90 b/gcc/testsuite/gfortran.dg/pointer_intent_9.f90
new file mode 100644
index 0000000..30ddd02
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pointer_intent_9.f90
@@ -0,0 +1,33 @@
+! { dg-do compile }
+! PR fortran/103418
+! Validate checks for dummy arguments with INTENT(IN), pointer attribute
+
+module m
+ type t
+ real, pointer :: a, b(:)
+ end type t
+contains
+ subroutine s1 (a, b, c, d, e)
+ real, pointer, intent(in) :: a, b(:)
+ type(t), intent(in) :: c
+ class(t), intent(in) :: d
+ type(t), pointer, intent(in) :: e
+ real, pointer :: pa, pb(:)
+ call random_number (a) ! legal
+ call random_number (b)
+ call cpu_time (a)
+ call system_clock (count_rate=a)
+ call random_number (c% a)
+ call random_number (c% b)
+ call random_number (d% a)
+ call random_number (d% b)
+ call random_number (e% a)
+ call random_number (e% b)
+ call move_alloc (a, pa) ! { dg-error "must be ALLOCATABLE" }
+ call move_alloc (b, pb) ! { dg-error "must be ALLOCATABLE" }
+ allocate (a) ! { dg-error "pointer association context" }
+ allocate (b(10)) ! { dg-error "pointer association context" }
+ allocate (c% a) ! { dg-error "pointer association context" }
+ allocate (c% b(10)) ! { dg-error "pointer association context" }
+ end subroutine s1
+end module
diff --git a/gcc/testsuite/gfortran.dg/pr101329.f90 b/gcc/testsuite/gfortran.dg/pr101329.f90
new file mode 100644
index 0000000..b82210d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr101329.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! PR fortran/101329 - ICE: Invalid expression in gfc_element_size
+
+program p
+ use iso_c_binding
+ implicit none
+ integer(c_int), pointer :: ip4
+ integer(c_int64_t), pointer :: ip8
+ print *, c_sizeof (c_null_ptr) ! valid
+ print *, c_sizeof (null ()) ! { dg-error "is not interoperable" }
+ print *, c_sizeof (null (ip4)) ! { dg-error "is not interoperable" }
+ print *, c_sizeof (null (ip8)) ! { dg-error "is not interoperable" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr101762.f90 b/gcc/testsuite/gfortran.dg/pr101762.f90
new file mode 100644
index 0000000..9ffd754
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr101762.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! PR fortran/101762 - ICE on non-constant pointer initialization targets
+! Contributed by G.Steinmetz
+
+program p
+ integer, target :: a(3) = [7, 8, 9]
+ integer, pointer :: x => a(3)
+ integer, pointer :: y => a(n()) ! { dg-error "constant expression" }
+ integer, pointer :: z(:) => a(:n()) ! { dg-error "constant expression" }
+ character(7), target :: c = "abcdefg"
+ character(3), pointer :: c0 => c(2:4)
+ character(3), pointer :: c1 => c(m():) ! { dg-error "constant expression" }
+ character(3), pointer :: c2 => c(:m()) ! { dg-error "constant expression" }
+ print *, x, y
+contains
+ pure integer function k ()
+ k = 2
+ end function k
+ subroutine s ()
+ integer, pointer :: yy => a(k()) ! { dg-error "constant expression" }
+ print *, yy
+ end subroutine s
+end
diff --git a/gcc/testsuite/gfortran.dg/pr102332.f90 b/gcc/testsuite/gfortran.dg/pr102332.f90
new file mode 100644
index 0000000..f955709
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr102332.f90
@@ -0,0 +1,69 @@
+! { dg-do compile }
+! PR fortran/102332 - ICE in select_type_set_tmp
+! Contributed by G.Steinmetz
+
+program p
+ type t
+ real :: a, b
+ end type
+ class(t), allocatable :: x ! Valid
+ select type (y => x)
+ type is (t)
+ y%a = 0
+ end select
+end
+
+subroutine s0 (x)
+ type t
+ real :: a, b
+ end type
+ class(t) :: x ! Valid
+ select type (y => x)
+ type is (t)
+ y%a = 0
+ end select
+end
+
+subroutine s1
+ type t
+ real :: a, b
+ end type
+ class(t) :: x ! { dg-error "must be dummy, allocatable or pointer" }
+ select type (y => x)
+ type is (t)
+ y%a = 0
+ end select
+end
+
+subroutine s3
+ type t
+ real :: a, b
+ end type
+ class(t) :: x ! { dg-error "must be dummy, allocatable or pointer" }
+ select type (y => x)
+ class is (t)
+ y%a = 0
+ end select
+end
+
+subroutine s2
+ type t
+ real :: a, b
+ end type
+ class(t) :: x ! { dg-error "must be dummy, allocatable or pointer" }
+ select type (y => x)
+ type default ! { dg-error "Expected" }
+ y%a = 0
+ end select
+end
+
+subroutine s4
+ type t
+ real :: a, b
+ end type
+ class(t) :: x ! { dg-error "must be dummy, allocatable or pointer" }
+ select type (y => x)
+ class default
+ y%a = 0
+ end select
+end
diff --git a/gcc/testsuite/gfortran.dg/pr102520.f90 b/gcc/testsuite/gfortran.dg/pr102520.f90
index 1c98c18..d2ea8f3 100644
--- a/gcc/testsuite/gfortran.dg/pr102520.f90
+++ b/gcc/testsuite/gfortran.dg/pr102520.f90
@@ -5,8 +5,6 @@ program p
type t
end type
type(t), parameter :: a(4) = shape(1) ! { dg-error "Incompatible" }
- type(t), parameter :: b(2,2) = reshape(a,[2,2]) ! { dg-error "Incompatible" }
- type(t), parameter :: c(2,2) = transpose(b) ! { dg-error "Unclassifiable" }
+ type(t), parameter :: b(2,2) = reshape(a,[2,2]) ! { dg-error "must be an array" }
+ type(t), parameter :: c(2,2) = transpose(b) ! { dg-error "must be of rank 2" }
end
-
-! { dg-error "Different shape for array assignment" " " { target *-*-* } 7 }
diff --git a/gcc/testsuite/gfortran.dg/pr102715.f90 b/gcc/testsuite/gfortran.dg/pr102715.f90
new file mode 100644
index 0000000..7b29a1c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr102715.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! PR fortran/102715 - ICE in gfc_simplify_transpose
+
+program p
+ type t
+ end type
+ type(t), parameter :: a(4) = t()
+ type(t), parameter :: b(2,2) = reshape(a, [2]) ! { dg-error "Rank mismatch" }
+ type(t), parameter :: c(2,2) = transpose(b) ! { dg-error "must be of rank 2" }
+ type(t), parameter :: s2(*) = b(2,:) ! { dg-error "Syntax error" }
+ type(t), parameter :: x(*,*) = reshape(a, [2]) ! { dg-error "Rank mismatch" }
+ type(t), parameter :: s3(*) = x(2,:) ! { dg-error "Syntax error" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr102817.f90 b/gcc/testsuite/gfortran.dg/pr102817.f90
new file mode 100644
index 0000000..c081a69
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr102817.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! PR fortran/102817 - ICE in gfc_clear_shape
+
+program test
+ type t
+ integer :: a(1,2) = 3
+ end type t
+ type(t), parameter :: u = t(4)
+ type(t), parameter :: x(1) = t(4)
+ integer, parameter :: p(1,2) = (x(1)%a)
+ integer :: z(1,2) = (x(1)%a)
+ integer :: y(1,2), v(1,2), w(1,2)
+ v = (u %a)
+ w = x(1)%a
+ y = (x(1)%a)
+ print *, v, w, y, z, p
+end
diff --git a/gcc/testsuite/gfortran.dg/pr102860.f90 b/gcc/testsuite/gfortran.dg/pr102860.f90
new file mode 100644
index 0000000..d0a7356
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr102860.f90
@@ -0,0 +1,10 @@
+! PR middle-end/102860
+! { dg-do compile { target { powerpc*-*-* } } }
+! { dg-require-effective-target powerpc_vsx_ok }
+! { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power10" } }
+! { dg-options "-O2 -mcpu=power10" }
+
+function foo(a)
+ integer(kind=4) :: a(1024)
+ a(:) = modulo (a(:), 39)
+end function
diff --git a/gcc/testsuite/gfortran.dg/pr103258.f90 b/gcc/testsuite/gfortran.dg/pr103258.f90
new file mode 100644
index 0000000..4521fcd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr103258.f90
@@ -0,0 +1,14 @@
+! { dg-do compile}
+! { dg-additional-options "-Wno-pedantic" }
+!
+! Test from PR103258. This used to ICE due to incorrectly marking the
+! no-implicit-type error for n and m in the character length expression
+! as already diagnosed during early resolution, when in fact errors are
+! ignored in that parsing context. We now expect the errors to be diagnosed
+! at the point of the first use of each symbol.
+
+subroutine s(n) ! { dg-error "Symbol 'n' .*has no IMPLICIT type" }
+implicit none
+character(n+m) :: c ! { dg-error "Symbol 'm' .*has no IMPLICIT type" }
+entry e(m)
+end
diff --git a/gcc/testsuite/gfortran.dg/pr103286.f90 b/gcc/testsuite/gfortran.dg/pr103286.f90
new file mode 100644
index 0000000..1c18b71
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr103286.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! { dg-options "std=gnu" }
+! PR fortran/103286 - ICE in resolve_select
+
+program p
+ select case (.true.) ! { dg-warning "Extension: Conversion" }
+ case (1_8)
+ case (:0) ! { dg-error "Logical range in CASE statement" }
+ case (2:) ! { dg-error "Logical range in CASE statement" }
+ end select
+end
diff --git a/gcc/testsuite/gfortran.dg/pr103366.f90 b/gcc/testsuite/gfortran.dg/pr103366.f90
new file mode 100644
index 0000000..d5d25de
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr103366.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+!
+! Test the fix for PR103366.
+!
+! Contributed by Gerhardt Steinmetz <gscfq@t-online.de>
+!
+program p
+ call u([1])
+contains
+ subroutine s(x) bind(c)
+ type(*) :: x(..)
+ end
+ subroutine u(x)
+ class(*) :: x(..)
+ call s(x) ! Used to ICE here
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/pr103505.f90 b/gcc/testsuite/gfortran.dg/pr103505.f90
new file mode 100644
index 0000000..522e53e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr103505.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! PR fortran/103505 - this used to ICE in compare_bound_mpz_t
+! Testcase by G.Steinmetz
+
+program p
+ integer, parameter :: a((2.)) = [4,8] ! { dg-error "scalar INTEGER" }
+ integer, parameter :: z(1:(2.)) = [4,8] ! { dg-error "scalar INTEGER" }
+ print *, a(1:1) ! { dg-error "Syntax error" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr103588.f90 b/gcc/testsuite/gfortran.dg/pr103588.f90
new file mode 100644
index 0000000..198e176
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr103588.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! PR fortran/103588 - ICE: Simplification error in gfc_ref_dimen_size
+! Contributed by G.Steinmetz
+
+program p
+ integer, parameter :: a(:) = [1,2] ! { dg-error "cannot be automatic or of deferred shape" }
+ integer :: b(2) = a(::a(1)) ! { dg-error "Invalid" }
+end
diff --git a/gcc/testsuite/gfortran.dg/pr103606.f90 b/gcc/testsuite/gfortran.dg/pr103606.f90
new file mode 100644
index 0000000..4328318
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr103606.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+! PR fortran/103606 - ICE in resolve_fl_procedure
+! Contributed by G.Steinmetz
+
+program p
+ type t
+ end type
+contains
+ elemental function f() result(z) ! { dg-error "CLASS variable" }
+ class(t) :: z
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/pr103607.f90 b/gcc/testsuite/gfortran.dg/pr103607.f90
new file mode 100644
index 0000000..a6a2c4f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr103607.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+! PR fortran/103607 - ICE in do_subscript, at fortran/frontend-passes.c:2927
+! Contributed by G.Steinmetz
+
+program p
+ integer :: i, x(abs(2.)) ! { dg-error "must be of INTEGER type" }
+ do i = 1, 2
+ x(i) = 0
+ end do
+end
+
+! { dg-prune-output "must have constant shape" }
diff --git a/gcc/testsuite/gfortran.dg/pr103609.f90 b/gcc/testsuite/gfortran.dg/pr103609.f90
new file mode 100644
index 0000000..57f6a3b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr103609.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! PR fortran/103609 - ICE in gfc_sym_get_dummy_args
+! Contributed by G.Steinmetz
+
+program p
+ implicit none
+ integer :: i
+ do i = 1, 2
+ call s
+ end do
+contains
+ subroutine s
+ call sub(x) ! { dg-error "has no IMPLICIT type" }
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/pr103691.f90 b/gcc/testsuite/gfortran.dg/pr103691.f90
new file mode 100644
index 0000000..f1f551e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr103691.f90
@@ -0,0 +1,9 @@
+! PR fortran/103691
+! { dg-do compile }
+! { dg-options "-O2 -g" }
+
+program pr103691
+ real, parameter :: a(0) = 2.0
+ real, allocatable :: b(:)
+ allocate (b, mold=a)
+end
diff --git a/gcc/testsuite/gfortran.dg/pr103692.f90 b/gcc/testsuite/gfortran.dg/pr103692.f90
new file mode 100644
index 0000000..9687a3c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr103692.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+! PR fortran/103692 - ICE in expand_constructor
+! Contributed by G.Steinmetz
+
+program p
+ character(3), parameter :: a(4) = 'abc'
+ character(*), parameter :: b(*) = (a(2:1))
+ character(*), parameter :: y(*) = [(a(2:1))]
+ character(*), parameter :: u(*) = a(2:1)
+ character(*), parameter :: v(*) = [a(2:1)]
+ character(*), parameter :: w(-1) = (a(2:1))
+ character(*), parameter :: x(-1) = a(2:1)
+ character(5), parameter :: c(3,3) = 'def'
+ character(*), parameter :: d(*) = [(c(2:1,2:))]
+ character(*), parameter :: e(*,*) = (c(2:1,2:))
+ if (len(b) /= 3 .or. size (b) /= 0) stop 1
+ if (len(y) /= 3 .or. size (y) /= 0) stop 2
+ if (len(d) /= 5 .or. size (d) /= 0) stop 3
+ if (len(e) /= 5 .or. any (shape (e) /= [0,2])) stop 4
+end
+
+! { dg-final { scan-tree-dump-not "_gfortran_stop_numeric" "original" } }
diff --git a/gcc/testsuite/gfortran.dg/pr103898.f90 b/gcc/testsuite/gfortran.dg/pr103898.f90
new file mode 100644
index 0000000..6b4bb30
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr103898.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+
+! This test used to ICE during gimplification (PR103898).
+
+Module g
+contains
+ function mysize(array, dim)
+ integer :: mysize
+ integer, dimension(:), intent(in) :: array
+ integer, optional, intent(in) :: dim
+ if (present(dim)) then
+ mysize = size(array, dim=dim)
+ endif
+ end function mysize
+end module
diff --git a/gcc/testsuite/gfortran.dg/pr104466.f90 b/gcc/testsuite/gfortran.dg/pr104466.f90
new file mode 100644
index 0000000..ec0e458
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr104466.f90
@@ -0,0 +1,116 @@
+! { dg-do compile }
+! { dg-options "-std=legacy -O2 --param max-inline-insns-auto=0 --param max-inline-insns-single=0 -fdump-tree-lim2-details" }
+
+ MODULE mod_param
+ integer, parameter :: Ngrids = 1
+ integer, dimension(Ngrids) :: N
+ END
+ MODULE mod_forces
+ TYPE T_FORCES
+ real, pointer :: sustr(:,:)
+ real, pointer :: svstr(:,:)
+ real, pointer :: bustr(:,:)
+ real, pointer :: bvstr(:,:)
+ real, pointer :: srflx(:,:)
+ real, pointer :: stflx(:,:,:)
+ END TYPE
+ TYPE (T_FORCES), allocatable :: FORCES(:)
+ END
+ MODULE mod_grid
+ TYPE T_GRID
+ real, pointer :: f(:,:)
+ real, pointer :: Hz(:,:,:)
+ real, pointer :: z_r(:,:,:)
+ real, pointer :: z_w(:,:,:)
+ END TYPE
+ TYPE (T_GRID), allocatable :: GRID(:)
+ END
+ MODULE mod_scalars
+ USE mod_param
+ END
+ MODULE mod_mixing
+ TYPE T_MIXING
+ integer, pointer :: ksbl(:,:)
+ real, pointer :: Akv(:,:,:)
+ real, pointer :: Akt(:,:,:,:)
+ real, pointer :: alpha(:,:)
+ real, pointer :: beta(:,:)
+ real, pointer :: bvf(:,:,:)
+ real, pointer :: hsbl(:,:)
+ real, pointer :: ghats(:,:,:,:)
+ END TYPE
+ TYPE (T_MIXING), allocatable :: MIXING(:)
+ END
+ MODULE mod_ocean
+ TYPE T_OCEAN
+ real, pointer :: pden(:,:,:)
+ real, pointer :: u(:,:,:,:)
+ real, pointer :: v(:,:,:,:)
+ END TYPE
+ TYPE (T_OCEAN), allocatable :: OCEAN(:)
+ END
+ MODULE lmd_skpp_mod
+ PRIVATE
+ PUBLIC lmd_skpp
+ CONTAINS
+ SUBROUTINE lmd_skpp
+ USE mod_forces
+ USE mod_grid
+ USE mod_mixing
+ USE mod_ocean
+ integer tile
+ integer UBi, UBj
+ CALL lmd_skpp_tile (ng, tile, LBi, UBi, LBj, UBj, &
+ IminS, ImaxS, JminS, JmaxS, nstp0, &
+ GRID(ng) % f, GRID(ng) % Hz, &
+ GRID(ng) % z_r, GRID(ng) % z_w, &
+ OCEAN(ng) % u, OCEAN(ng) % v, &
+ OCEAN(ng) % pden, FORCES(ng) % srflx, &
+ FORCES(ng) % stflx, FORCES(ng) % bustr, &
+ FORCES(ng) % bvstr, FORCES(ng) % sustr, &
+ FORCES(ng) % svstr, MIXING(ng) % alpha, &
+ MIXING(ng) % beta, MIXING(ng) % bvf, &
+ MIXING(ng) % ghats, MIXING(ng) % Akt, &
+ MIXING(ng) % Akv, MIXING(ng) % hsbl, MIXING(ng) % ksbl)
+ END
+ SUBROUTINE lmd_skpp_tile (ng, tile, LBi, UBi, LBj, UBj, &
+ IminS, ImaxS, JminS, JmaxS, nstp, f, Hz, z_r, z_w, &
+ u, v, pden, srflx, stflx, bustr, bvstr, sustr, svstr, &
+ alpha, beta, bvf, &
+ ghats, Akt, Akv, hsbl, ksbl)
+ USE mod_scalars
+ integer tile
+ integer UBi, UBj
+ real f(:,:)
+ real Hz(:,:,:)
+ real z_r(:,:,:)
+ real z_w(:,:,:)
+ real u(:,:,:,:)
+ real v(:,:,:,:)
+ real pden(:,:,:)
+ real srflx(:,:)
+ real stflx(:,:,:)
+ real alpha(:,:)
+ real beta(:,:)
+ real bustr(:,:)
+ real bvstr(:,:)
+ real sustr(:,:)
+ real svstr(:,:)
+ real bvf(:,:,:)
+ real Akt(:,:,:,:)
+ real Akv(:,:,:)
+ real hsbl(:,:)
+ integer ksbl(:,:)
+ real ghats(:,:,:,:)
+ DO j=Jstr,Jend
+ DO iik=IstrIstr,z_w(i,j,N(ng))
+ IF (hsbl0.gt.z_w0) THEN
+ ksbl=zbl
+ END IF
+ END DO
+ END DO
+ END
+ END
+
+! { dg-final { scan-tree-dump-not ": dependent" "lim2" } }
+! { dg-final { scan-tree-dump "Moving statement\[\n\r\]_\[0-9\]+ = n" "lim2" } }
diff --git a/gcc/testsuite/gfortran.dg/pr24823.f b/gcc/testsuite/gfortran.dg/pr24823.f
index c6f638f..93cd8a3 100644
--- a/gcc/testsuite/gfortran.dg/pr24823.f
+++ b/gcc/testsuite/gfortran.dg/pr24823.f
@@ -61,8 +61,8 @@
IF( ISYM.EQ.0 ) THEN
END IF
END IF
- A( I-J+KUU+1, J ) = ZLATM2( M, N, I, J, KL, KU,
- $ DR, IPVTNG, IWORK, SPARSE )
+ A( I-J+KUU+1, J ) = ZLATM2( M, N, I, J, KL, KU, ! { dg-warning "More actual than formal" }
+ $ DR, IPVTNG, IWORK, SPARSE ) ! { dg-warning "Type mismatch" }
END IF
END IF
END IF
diff --git a/gcc/testsuite/gfortran.dg/pr39937.f b/gcc/testsuite/gfortran.dg/pr39937.f
index 17d3eb4..ed28693 100644
--- a/gcc/testsuite/gfortran.dg/pr39937.f
+++ b/gcc/testsuite/gfortran.dg/pr39937.f
@@ -20,7 +20,7 @@ C { dg-options "-std=legacy" }
END IF
CALL DLALN2( .FALSE., 2, 2, SMIN, ONE,
$ T( J-1, J-1 ), LDT, ONE, ONE, ! { dg-warning "Type mismatch" }
- $ XNORM, IERR )
+ $ XNORM, IERR ) ! { dg-warning "Type mismatch" }
CALL DAXPY( J-2, -X( 1, 1 ), T( 1, J-1 ), 1,
$ WORK( 1+N ), 1 )
CALL DAXPY( J-2, -X( 2, 2 ), T( 1, J ), 1,
diff --git a/gcc/testsuite/gfortran.dg/pr41011.f b/gcc/testsuite/gfortran.dg/pr41011.f
index 5a32185..c032310 100644
--- a/gcc/testsuite/gfortran.dg/pr41011.f
+++ b/gcc/testsuite/gfortran.dg/pr41011.f
@@ -1,6 +1,6 @@
! { dg-do compile }
! { dg-options "-O3 -std=legacy" }
- CALL UVSET(NX,NY,NZ,HVAR,ZET,NP,DZ,DKM,UM,VM,UG,VG,TM,DCDX, ! { dg-warning "Rank mismatch" }
+ CALL UVSET(NX,NY,NZ,HVAR,ZET,NP,DZ,DKM,UM,VM,UG,VG,TM,DCDX, ! { dg-warning "Rank mismatch|Invalid procedure argument" }
*ITY,ISH,NSMT,F)
CALL DCTDX(NX,NY,NX1,NFILT,C(MLAG),DCDX(MLAG),HELP,HELPA,
* HELP,HELPA,FY,FYC,SAVEY)
@@ -18,6 +18,6 @@
*WORK(*)
IF(IH.EQ.0) THEN
CALL PADEC(DKM,VM,HVAR,WORK(LWM),WORK(LWG), ! { dg-warning "Rank mismatch" }
- * WORK(LF),NZ,WORK(LA),WORK(LB),WORK(LC),ITY)
+ * WORK(LF),NZ,WORK(LA),WORK(LB),WORK(LC),ITY) ! { dg-warning "Type mismatch" }
ENDIF
END
diff --git a/gcc/testsuite/gfortran.dg/pr47614.f b/gcc/testsuite/gfortran.dg/pr47614.f
index 500d210..6be2c96 100644
--- a/gcc/testsuite/gfortran.dg/pr47614.f
+++ b/gcc/testsuite/gfortran.dg/pr47614.f
@@ -1,6 +1,7 @@
! { dg-do run { target { powerpc*-*-* } } }
! { dg-skip-if "" { powerpc*-*-darwin* } }
! { dg-options "-O3 -funroll-loops -ffast-math -mcpu=power4" }
+! { dg-options "-O3 -funroll-loops -ffast-math" { target powerpc64le*-*-linux* } }
SUBROUTINE SFCPAR(ZET,NZ,ZMH,TSL,TMES)
diff --git a/gcc/testsuite/gfortran.dg/pr53787.f90 b/gcc/testsuite/gfortran.dg/pr53787.f90
index f366a30..412bbc7 100644
--- a/gcc/testsuite/gfortran.dg/pr53787.f90
+++ b/gcc/testsuite/gfortran.dg/pr53787.f90
@@ -1,5 +1,5 @@
! { dg-do compile }
-! { dg-options "-O3 -fdump-ipa-cp-details -fno-inline -fwhole-program" }
+! { dg-options "-O3 -fdump-ipa-cp-details -fno-ipa-sra -fno-inline -fwhole-program" }
real x(10)
n = 10
diff --git a/gcc/testsuite/gfortran.dg/pr61318.f90 b/gcc/testsuite/gfortran.dg/pr61318.f90
index 57da52d..7752ecd 100644
--- a/gcc/testsuite/gfortran.dg/pr61318.f90
+++ b/gcc/testsuite/gfortran.dg/pr61318.f90
@@ -18,5 +18,5 @@ end module gbl_interfaces
program test
use gbl_message
use gbl_interfaces
- call gagout(seve%e,'Some string') ! { dg-error "Type mismatch in argument" }
+ call gagout(seve%e,'Some string') ! { dg-error "Type mismatch in argument|More actual than formal" }
end program test
diff --git a/gcc/testsuite/gfortran.dg/pr67804.f90 b/gcc/testsuite/gfortran.dg/pr67804.f90
new file mode 100644
index 0000000..e2009a5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr67804.f90
@@ -0,0 +1,25 @@
+! { dg-do compile }
+! PR fortran/67804 - ICE on bad type in structure constructor in DATA statement
+! Contributed by G.Steinmetz
+
+program p
+ type t
+ character :: c
+ end type
+ type u
+ character, pointer :: c
+ end type
+ type(t) :: x0, x1, x2, x3, x4, x5, x6, x7, x8, x9
+ type(u) :: y6
+ data x0 /t('a')/ ! OK
+ data x1 /t(1)/ ! { dg-error "Cannot convert" }
+ data x2 /t(1.)/ ! { dg-error "Cannot convert" }
+ data x3 /t(1d1)/ ! { dg-error "Cannot convert" }
+ data x4 /t((0.,1.))/ ! { dg-error "Cannot convert" }
+ data x5 /t(.true.)/ ! { dg-error "Cannot convert" }
+ data x6 /t(null())/ ! { dg-error "neither a POINTER nor ALLOCATABLE" }
+ data x7 /t(['1'])/ ! { dg-error "The rank of the element" }
+ data x8 /t([1])/ ! { dg-error "Cannot convert" }
+ data x9 /t(z'0')/ ! { dg-error "Cannot convert" }
+ data y6 /u(null())/ ! OK
+end
diff --git a/gcc/testsuite/gfortran.dg/pr68019.f90 b/gcc/testsuite/gfortran.dg/pr68019.f90
index 2e304c3..77fd55b 100644
--- a/gcc/testsuite/gfortran.dg/pr68019.f90
+++ b/gcc/testsuite/gfortran.dg/pr68019.f90
@@ -9,5 +9,5 @@ program p
integer :: n
end type
type(t), parameter :: vec(*) = [(t(i), i = 1, 4)]
- type(t), parameter :: arr(*) = reshape(vec, [2, 2]) ! { dg-error "ranks 1 and 2 in assignment" }
+ type(t), parameter :: arr(*) = reshape(vec, [2, 2]) ! { dg-error "Rank mismatch" }
end
diff --git a/gcc/testsuite/gfortran.dg/pr68153.f90 b/gcc/testsuite/gfortran.dg/pr68153.f90
index 1a360f8..46a3bc0 100644
--- a/gcc/testsuite/gfortran.dg/pr68153.f90
+++ b/gcc/testsuite/gfortran.dg/pr68153.f90
@@ -5,5 +5,5 @@
!
program foo
integer, parameter :: a(2) = [2, -2]
- integer, parameter :: b(2,2) = reshape([1, 2, 3, 4], a) ! { dg-error "cannot be negative" }
+ integer, parameter :: b(2,2) = reshape([1, 2, 3, 4], a) ! { dg-error "negative" }
end program foo
diff --git a/gcc/testsuite/gfortran.dg/pr69419.f90 b/gcc/testsuite/gfortran.dg/pr69419.f90
new file mode 100644
index 0000000..7329808
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr69419.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib" }
+! PR fortran/69419 - ICE on invalid coarray in common
+
+blockdata b
+ real x ! { dg-error "must be in COMMON" }
+ common /c/ x[*] ! { dg-error "cannot be a coarray" }
+ data x /1.0/
+end
diff --git a/gcc/testsuite/gfortran.dg/pr84784.f90 b/gcc/testsuite/gfortran.dg/pr84784.f90
new file mode 100644
index 0000000..3129b92
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr84784.f90
@@ -0,0 +1,27 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -fdefault-integer-8" }
+! { dg-require-effective-target fortran_integer_16 }
+! PR fortran/84784 - ICEs: verify_gimple failed with -fdefault-integer-8
+
+ use iso_fortran_env, only : team_type, STAT_FAILED_IMAGE
+ implicit none
+ type(team_type) :: team
+ integer :: new_team
+ new_team = mod(this_image(),2)+1
+ form team (new_team,team)
+ change team (team)
+ if (team_number() /= new_team) STOP 1
+ end team
+ if (image_status (1) == STAT_FAILED_IMAGE) ERROR STOP "cannot recover"
+ if (runtime_popcnt(0_16) /= 0) STOP 2
+ if (runtime_poppar(1_16) /= 1) STOP 3
+contains
+ integer function runtime_popcnt (i)
+ integer(kind=16), intent(in) :: i
+ runtime_popcnt = popcnt(i)
+ end function
+ integer function runtime_poppar (i)
+ integer(kind=16), intent(in) :: i
+ runtime_poppar = poppar(i)
+ end function
+end
diff --git a/gcc/testsuite/gfortran.dg/pr91497.f90 b/gcc/testsuite/gfortran.dg/pr91497.f90
index d324b3b..f4005e5 100644
--- a/gcc/testsuite/gfortran.dg/pr91497.f90
+++ b/gcc/testsuite/gfortran.dg/pr91497.f90
@@ -1,4 +1,6 @@
-! { dg-do compile { target { i?86-*-* x86_64-*-* } } }
+! { dg-do compile }
+! { dg-require-effective-target fortran_real_10 }
+! { dg-require-effective-target fortran_real_16 }
! { dg-options "-Wall" }
! Code contributed by Manfred Schwarb <manfred99 at gmx dot ch>
! PR fortran/91497
@@ -8,13 +10,13 @@
!
program foo
- real*4 a,aa
- real*8 b,bb
- real*10 c,cc
- real*16 d
- integer*2 e,ee
- integer*4 f,ff
- integer*8 g,gg
+ real(4) a,aa
+ real(8) b,bb
+ real(10) c,cc
+ real(16) d
+ integer(2) e,ee
+ integer(4) f,ff
+ integer(8) g,gg
PARAMETER(a=3.1415927_4)
PARAMETER(b=3.1415927_8)
PARAMETER(c=3.1415927_10)
@@ -36,11 +38,10 @@ program foo
aa=CEILING(b)
aa=CEILING(c)
aa=CEILING(d)
- !---unknown but documented type conversions:
+ !---DEC specific type conversions (-fdec):
!!aa=FLOATI(e)
!!aa=FLOATJ(f)
!!aa=FLOATK(g)
- !---documentation is wrong for sngl:
aa=SNGL(c)
aa=SNGL(d)
bb=REAL(c, kind=8)
@@ -98,7 +99,7 @@ program foo
ff=IFIX(a)
ff=IDINT(b)
ff=IDNINT(b)
- !---LONG not allowed anymore in gfortran 10 (?):
+ !---LONG support got removed:
!!ff=LONG(a)
!!ff=LONG(b)
!!ff=LONG(c)
diff --git a/gcc/testsuite/gfortran.dg/pr91497_2.f90 b/gcc/testsuite/gfortran.dg/pr91497_2.f90
new file mode 100644
index 0000000..28aa4bd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr91497_2.f90
@@ -0,0 +1,124 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+! Code contributed by Manfred Schwarb <manfred99 at gmx dot ch>
+! PR fortran/91497
+!
+! Prior to applying the patch for this PR, the following code
+! would generate numerous conversion warnings.
+! Additional test case to cover all targets.
+!
+program foo
+
+ real(4) a, aa
+ real(8) b, bb
+ integer(2) e, ee
+ integer(4) f, ff
+ integer(8) g, gg
+ complex(4) ww
+ complex(8) xx
+ PARAMETER(a=3.1415927_4)
+ PARAMETER(b=3.1415927_8)
+ PARAMETER(e=123_2)
+ PARAMETER(f=123_4)
+ PARAMETER(g=123_8)
+
+ aa=REAL(b) ! was: Change of value in conversion from 'REAL(8)' to 'REAL(4)'
+ aa=REAL(e)
+ aa=REAL(f)
+ aa=REAL(g)
+ aa=REAL(b, kind=4) ! was: Change of value in conversion from 'REAL(8)' to 'REAL(4)'
+ bb=REAL(a, kind=8)
+
+ aa=FLOAT(f)
+ bb=DFLOAT(g)
+ aa=SNGL(b) ! was: Change of value in conversion from 'REAL(8)' to 'REAL(4)'
+ aa=AINT(a)
+ bb=AINT(b)
+ aa=AINT(b, kind=4)
+ bb=DINT(b)
+ aa=ANINT(a)
+ bb=ANINT(b)
+ aa=ANINT(b, kind=4)
+ bb=DNINT(b)
+ aa=AMAX0(f, f)
+ aa=AMIN0(f, f)
+ aa=AMAX0(g, g)
+ aa=AMIN0(g, g)
+
+ ee=INT(a)
+ ee=INT(a, kind=2) ! was: Change of value in conversion from 'REAL(4)' to 'INTEGER(2)'
+ ee=INT(b, kind=2) ! was: Change of value in conversion from 'REAL(8)' to 'INTEGER(2)'
+ ee=INT(f, kind=2)
+ ee=INT(g, kind=2)
+ ff=INT(b)
+ ff=INT(a, kind=4) ! was: Change of value in conversion from 'REAL(4)' to 'INTEGER(4)'
+ ff=INT(b, kind=4) ! was: Change of value in conversion from 'REAL(8)' to 'INTEGER(4)'
+ ff=INT(f, kind=4)
+ ff=INT(g, kind=4)
+ gg=INT(a)
+ gg=INT(a, kind=8) ! was: Change of value in conversion from 'REAL(4)' to 'INTEGER(8)'
+ gg=INT(b, kind=8) ! was: Change of value in conversion from 'REAL(8)' to 'INTEGER(8)'
+ gg=INT(f, kind=8)
+ gg=INT(g, kind=8)
+
+ ee=IFIX(a)
+ ff=IFIX(a)
+ gg=IFIX(a)
+ ee=IDINT(b)
+ ff=IDINT(b)
+ gg=IDINT(b)
+ ee=INT2(a) ! was: Change of value in conversion from 'REAL(4)' to 'INTEGER(2)'
+ ee=INT2(b) ! was: Change of value in conversion from 'REAL(8)' to 'INTEGER(2)'
+ ee=INT2(f)
+ ee=INT2(g)
+ gg=INT8(a) ! was: Change of value in conversion from 'REAL(4)' to 'INTEGER(8)'
+ gg=INT8(b) ! was: Change of value in conversion from 'REAL(8)' to 'INTEGER(8)'
+ gg=INT8(f)
+ gg=INT8(g)
+
+ ff=FLOOR(b)
+ ee=FLOOR(b, kind=2)
+ ff=FLOOR(b, kind=4)
+ gg=FLOOR(b, kind=8)
+ ff=CEILING(b)
+ ee=CEILING(b, kind=2)
+ ff=CEILING(b, kind=4)
+ gg=CEILING(b, kind=8)
+ ff=MAX1(a, a) ! was: Change of value in conversion from 'REAL(4)' to 'INTEGER(4)'
+ ff=MIN1(a, a) ! was: Change of value in conversion from 'REAL(4)' to 'INTEGER(4)'
+ gg=MAX1(b, b) ! was: Change of value in conversion from 'REAL(8)' to 'INTEGER(4)'
+ gg=MIN1(b, b) ! was: Change of value in conversion from 'REAL(8)' to 'INTEGER(4)'
+
+ ee=NINT(a, kind=2)
+ ee=NINT(b, kind=2)
+ ff=NINT(a)
+ ff=NINT(b)
+ ff=NINT(a, kind=4)
+ ff=NINT(b, kind=4)
+ gg=NINT(a, kind=8)
+ gg=NINT(b, kind=8)
+ ee=IDNINT(b)
+ ff=IDNINT(b)
+ gg=IDNINT(b)
+
+ ww=COMPLEX(a, a)
+ ww=COMPLEX(e, e)
+ ww=COMPLEX(g, g)
+ ww=COMPLEX(a, g)
+ xx=COMPLEX(b, g)
+ ww=CMPLX(a, a)
+ ww=CMPLX(b, b, kind=4)
+ xx=CMPLX(a, a, kind=8)
+
+ aa=REAL(ww)
+ bb=REAL(xx)
+ aa=REALPART(ww)
+ bb=REALPART(xx)
+ aa=AIMAG(ww)
+ bb=AIMAG(xx)
+ aa=IMAG(ww)
+ bb=IMAG(xx)
+ bb=DIMAG(xx)
+ aa=IMAGPART(ww)
+ bb=IMAGPART(xx)
+end
diff --git a/gcc/testsuite/gfortran.dg/pr93604.f90 b/gcc/testsuite/gfortran.dg/pr93604.f90
index 2c695d3..4040155 100644
--- a/gcc/testsuite/gfortran.dg/pr93604.f90
+++ b/gcc/testsuite/gfortran.dg/pr93604.f90
@@ -5,6 +5,6 @@ program p
integer :: a
end type
type(t) :: x
- data x /t(z'1')/ ! { dg-error "cannot appear in a structure constructor" }
+ data x /t(z'1')/ ! { dg-error "BOZ" }
end
diff --git a/gcc/testsuite/gfortran.dg/pr98076.f90 b/gcc/testsuite/gfortran.dg/pr98076.f90
new file mode 100644
index 0000000..d1288a4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr98076.f90
@@ -0,0 +1,293 @@
+! { dg-do run }
+! { dg-require-effective-target fortran_large_int }
+!
+! Check that we can print large integer values
+
+program test
+ implicit none
+ ! 128-bit integer kind
+ integer, parameter :: k = selected_int_kind(38)
+
+ character(len=39) :: s
+ character(len=100) :: buffer
+ integer(kind=k) :: n
+ integer :: i
+
+ ! Random checks
+ do i = 1, 1000
+ call random_digits(s)
+ read(s,*) n
+ write(buffer,'(I0.38)') n
+ print *, s
+ print *, buffer
+ if (adjustl(buffer) /= adjustl(s)) stop 2
+ end do
+
+ ! Systematic check
+ call check(0_k, "0")
+ call check(1_k, "1")
+ call check(9_k, "9")
+ call check(10_k, "10")
+ call check(11_k, "11")
+ call check(99_k, "99")
+ call check(100_k, "100")
+ call check(101_k, "101")
+ call check(999_k, "999")
+ call check(1000_k, "1000")
+ call check(1001_k, "1001")
+ call check(9999_k, "9999")
+ call check(10000_k, "10000")
+ call check(10001_k, "10001")
+ call check(99999_k, "99999")
+ call check(100000_k, "100000")
+ call check(100001_k, "100001")
+ call check(999999_k, "999999")
+ call check(1000000_k, "1000000")
+ call check(1000001_k, "1000001")
+ call check(9999999_k, "9999999")
+ call check(10000000_k, "10000000")
+ call check(10000001_k, "10000001")
+ call check(99999999_k, "99999999")
+ call check(100000000_k, "100000000")
+ call check(100000001_k, "100000001")
+ call check(999999999_k, "999999999")
+ call check(1000000000_k, "1000000000")
+ call check(1000000001_k, "1000000001")
+ call check(9999999999_k, "9999999999")
+ call check(10000000000_k, "10000000000")
+ call check(10000000001_k, "10000000001")
+ call check(99999999999_k, "99999999999")
+ call check(100000000000_k, "100000000000")
+ call check(100000000001_k, "100000000001")
+ call check(999999999999_k, "999999999999")
+ call check(1000000000000_k, "1000000000000")
+ call check(1000000000001_k, "1000000000001")
+ call check(9999999999999_k, "9999999999999")
+ call check(10000000000000_k, "10000000000000")
+ call check(10000000000001_k, "10000000000001")
+ call check(99999999999999_k, "99999999999999")
+ call check(100000000000000_k, "100000000000000")
+ call check(100000000000001_k, "100000000000001")
+ call check(999999999999999_k, "999999999999999")
+ call check(1000000000000000_k, "1000000000000000")
+ call check(1000000000000001_k, "1000000000000001")
+ call check(9999999999999999_k, "9999999999999999")
+ call check(10000000000000000_k, "10000000000000000")
+ call check(10000000000000001_k, "10000000000000001")
+ call check(99999999999999999_k, "99999999999999999")
+ call check(100000000000000000_k, "100000000000000000")
+ call check(100000000000000001_k, "100000000000000001")
+ call check(999999999999999999_k, "999999999999999999")
+ call check(1000000000000000000_k, "1000000000000000000")
+ call check(1000000000000000001_k, "1000000000000000001")
+ call check(9999999999999999999_k, "9999999999999999999")
+ call check(10000000000000000000_k, "10000000000000000000")
+ call check(10000000000000000001_k, "10000000000000000001")
+ call check(99999999999999999999_k, "99999999999999999999")
+ call check(100000000000000000000_k, "100000000000000000000")
+ call check(100000000000000000001_k, "100000000000000000001")
+ call check(999999999999999999999_k, "999999999999999999999")
+ call check(1000000000000000000000_k, "1000000000000000000000")
+ call check(1000000000000000000001_k, "1000000000000000000001")
+ call check(9999999999999999999999_k, "9999999999999999999999")
+ call check(10000000000000000000000_k, "10000000000000000000000")
+ call check(10000000000000000000001_k, "10000000000000000000001")
+ call check(99999999999999999999999_k, "99999999999999999999999")
+ call check(100000000000000000000000_k, "100000000000000000000000")
+ call check(100000000000000000000001_k, "100000000000000000000001")
+ call check(999999999999999999999999_k, "999999999999999999999999")
+ call check(1000000000000000000000000_k, "1000000000000000000000000")
+ call check(1000000000000000000000001_k, "1000000000000000000000001")
+ call check(9999999999999999999999999_k, "9999999999999999999999999")
+ call check(10000000000000000000000000_k, "10000000000000000000000000")
+ call check(10000000000000000000000001_k, "10000000000000000000000001")
+ call check(99999999999999999999999999_k, "99999999999999999999999999")
+ call check(100000000000000000000000000_k, "100000000000000000000000000")
+ call check(100000000000000000000000001_k, "100000000000000000000000001")
+ call check(999999999999999999999999999_k, "999999999999999999999999999")
+ call check(1000000000000000000000000000_k, "1000000000000000000000000000")
+ call check(1000000000000000000000000001_k, "1000000000000000000000000001")
+ call check(9999999999999999999999999999_k, "9999999999999999999999999999")
+ call check(10000000000000000000000000000_k, "10000000000000000000000000000")
+ call check(10000000000000000000000000001_k, "10000000000000000000000000001")
+ call check(99999999999999999999999999999_k, "99999999999999999999999999999")
+ call check(100000000000000000000000000000_k, "100000000000000000000000000000")
+ call check(100000000000000000000000000001_k, "100000000000000000000000000001")
+ call check(999999999999999999999999999999_k, "999999999999999999999999999999")
+ call check(1000000000000000000000000000000_k, "1000000000000000000000000000000")
+ call check(1000000000000000000000000000001_k, "1000000000000000000000000000001")
+ call check(9999999999999999999999999999999_k, "9999999999999999999999999999999")
+ call check(10000000000000000000000000000000_k, "10000000000000000000000000000000")
+ call check(10000000000000000000000000000001_k, "10000000000000000000000000000001")
+ call check(99999999999999999999999999999999_k, "99999999999999999999999999999999")
+ call check(100000000000000000000000000000000_k, "100000000000000000000000000000000")
+ call check(100000000000000000000000000000001_k, "100000000000000000000000000000001")
+ call check(999999999999999999999999999999999_k, "999999999999999999999999999999999")
+ call check(1000000000000000000000000000000000_k, "1000000000000000000000000000000000")
+ call check(1000000000000000000000000000000001_k, "1000000000000000000000000000000001")
+ call check(9999999999999999999999999999999999_k, "9999999999999999999999999999999999")
+ call check(10000000000000000000000000000000000_k, "10000000000000000000000000000000000")
+ call check(10000000000000000000000000000000001_k, "10000000000000000000000000000000001")
+ call check(99999999999999999999999999999999999_k, "99999999999999999999999999999999999")
+ call check(100000000000000000000000000000000000_k, "100000000000000000000000000000000000")
+ call check(100000000000000000000000000000000001_k, "100000000000000000000000000000000001")
+ call check(999999999999999999999999999999999999_k, "999999999999999999999999999999999999")
+ call check(1000000000000000000000000000000000000_k, "1000000000000000000000000000000000000")
+ call check(1000000000000000000000000000000000001_k, "1000000000000000000000000000000000001")
+ call check(9999999999999999999999999999999999999_k, "9999999999999999999999999999999999999")
+ call check(10000000000000000000000000000000000000_k, "10000000000000000000000000000000000000")
+ call check(10000000000000000000000000000000000001_k, "10000000000000000000000000000000000001")
+ call check(99999999999999999999999999999999999999_k, "99999999999999999999999999999999999999")
+ call check(100000000000000000000000000000000000000_k, "100000000000000000000000000000000000000")
+ call check(100000000000000000000000000000000000001_k, "100000000000000000000000000000000000001")
+ call check(109999999999999999999999999999999999999_k, "109999999999999999999999999999999999999")
+
+ call check(-1_k, "-1")
+ call check(-9_k, "-9")
+ call check(-10_k, "-10")
+ call check(-11_k, "-11")
+ call check(-99_k, "-99")
+ call check(-100_k, "-100")
+ call check(-101_k, "-101")
+ call check(-999_k, "-999")
+ call check(-1000_k, "-1000")
+ call check(-1001_k, "-1001")
+ call check(-9999_k, "-9999")
+ call check(-10000_k, "-10000")
+ call check(-10001_k, "-10001")
+ call check(-99999_k, "-99999")
+ call check(-100000_k, "-100000")
+ call check(-100001_k, "-100001")
+ call check(-999999_k, "-999999")
+ call check(-1000000_k, "-1000000")
+ call check(-1000001_k, "-1000001")
+ call check(-9999999_k, "-9999999")
+ call check(-10000000_k, "-10000000")
+ call check(-10000001_k, "-10000001")
+ call check(-99999999_k, "-99999999")
+ call check(-100000000_k, "-100000000")
+ call check(-100000001_k, "-100000001")
+ call check(-999999999_k, "-999999999")
+ call check(-1000000000_k, "-1000000000")
+ call check(-1000000001_k, "-1000000001")
+ call check(-9999999999_k, "-9999999999")
+ call check(-10000000000_k, "-10000000000")
+ call check(-10000000001_k, "-10000000001")
+ call check(-99999999999_k, "-99999999999")
+ call check(-100000000000_k, "-100000000000")
+ call check(-100000000001_k, "-100000000001")
+ call check(-999999999999_k, "-999999999999")
+ call check(-1000000000000_k, "-1000000000000")
+ call check(-1000000000001_k, "-1000000000001")
+ call check(-9999999999999_k, "-9999999999999")
+ call check(-10000000000000_k, "-10000000000000")
+ call check(-10000000000001_k, "-10000000000001")
+ call check(-99999999999999_k, "-99999999999999")
+ call check(-100000000000000_k, "-100000000000000")
+ call check(-100000000000001_k, "-100000000000001")
+ call check(-999999999999999_k, "-999999999999999")
+ call check(-1000000000000000_k, "-1000000000000000")
+ call check(-1000000000000001_k, "-1000000000000001")
+ call check(-9999999999999999_k, "-9999999999999999")
+ call check(-10000000000000000_k, "-10000000000000000")
+ call check(-10000000000000001_k, "-10000000000000001")
+ call check(-99999999999999999_k, "-99999999999999999")
+ call check(-100000000000000000_k, "-100000000000000000")
+ call check(-100000000000000001_k, "-100000000000000001")
+ call check(-999999999999999999_k, "-999999999999999999")
+ call check(-1000000000000000000_k, "-1000000000000000000")
+ call check(-1000000000000000001_k, "-1000000000000000001")
+ call check(-9999999999999999999_k, "-9999999999999999999")
+ call check(-10000000000000000000_k, "-10000000000000000000")
+ call check(-10000000000000000001_k, "-10000000000000000001")
+ call check(-99999999999999999999_k, "-99999999999999999999")
+ call check(-100000000000000000000_k, "-100000000000000000000")
+ call check(-100000000000000000001_k, "-100000000000000000001")
+ call check(-999999999999999999999_k, "-999999999999999999999")
+ call check(-1000000000000000000000_k, "-1000000000000000000000")
+ call check(-1000000000000000000001_k, "-1000000000000000000001")
+ call check(-9999999999999999999999_k, "-9999999999999999999999")
+ call check(-10000000000000000000000_k, "-10000000000000000000000")
+ call check(-10000000000000000000001_k, "-10000000000000000000001")
+ call check(-99999999999999999999999_k, "-99999999999999999999999")
+ call check(-100000000000000000000000_k, "-100000000000000000000000")
+ call check(-100000000000000000000001_k, "-100000000000000000000001")
+ call check(-999999999999999999999999_k, "-999999999999999999999999")
+ call check(-1000000000000000000000000_k, "-1000000000000000000000000")
+ call check(-1000000000000000000000001_k, "-1000000000000000000000001")
+ call check(-9999999999999999999999999_k, "-9999999999999999999999999")
+ call check(-10000000000000000000000000_k, "-10000000000000000000000000")
+ call check(-10000000000000000000000001_k, "-10000000000000000000000001")
+ call check(-99999999999999999999999999_k, "-99999999999999999999999999")
+ call check(-100000000000000000000000000_k, "-100000000000000000000000000")
+ call check(-100000000000000000000000001_k, "-100000000000000000000000001")
+ call check(-999999999999999999999999999_k, "-999999999999999999999999999")
+ call check(-1000000000000000000000000000_k, "-1000000000000000000000000000")
+ call check(-1000000000000000000000000001_k, "-1000000000000000000000000001")
+ call check(-9999999999999999999999999999_k, "-9999999999999999999999999999")
+ call check(-10000000000000000000000000000_k, "-10000000000000000000000000000")
+ call check(-10000000000000000000000000001_k, "-10000000000000000000000000001")
+ call check(-99999999999999999999999999999_k, "-99999999999999999999999999999")
+ call check(-100000000000000000000000000000_k, "-100000000000000000000000000000")
+ call check(-100000000000000000000000000001_k, "-100000000000000000000000000001")
+ call check(-999999999999999999999999999999_k, "-999999999999999999999999999999")
+ call check(-1000000000000000000000000000000_k, "-1000000000000000000000000000000")
+ call check(-1000000000000000000000000000001_k, "-1000000000000000000000000000001")
+ call check(-9999999999999999999999999999999_k, "-9999999999999999999999999999999")
+ call check(-10000000000000000000000000000000_k, "-10000000000000000000000000000000")
+ call check(-10000000000000000000000000000001_k, "-10000000000000000000000000000001")
+ call check(-99999999999999999999999999999999_k, "-99999999999999999999999999999999")
+ call check(-100000000000000000000000000000000_k, "-100000000000000000000000000000000")
+ call check(-100000000000000000000000000000001_k, "-100000000000000000000000000000001")
+ call check(-999999999999999999999999999999999_k, "-999999999999999999999999999999999")
+ call check(-1000000000000000000000000000000000_k, "-1000000000000000000000000000000000")
+ call check(-1000000000000000000000000000000001_k, "-1000000000000000000000000000000001")
+ call check(-9999999999999999999999999999999999_k, "-9999999999999999999999999999999999")
+ call check(-10000000000000000000000000000000000_k, "-10000000000000000000000000000000000")
+ call check(-10000000000000000000000000000000001_k, "-10000000000000000000000000000000001")
+ call check(-99999999999999999999999999999999999_k, "-99999999999999999999999999999999999")
+ call check(-100000000000000000000000000000000000_k, "-100000000000000000000000000000000000")
+ call check(-100000000000000000000000000000000001_k, "-100000000000000000000000000000000001")
+ call check(-999999999999999999999999999999999999_k, "-999999999999999999999999999999999999")
+ call check(-1000000000000000000000000000000000000_k, "-1000000000000000000000000000000000000")
+ call check(-1000000000000000000000000000000000001_k, "-1000000000000000000000000000000000001")
+ call check(-9999999999999999999999999999999999999_k, "-9999999999999999999999999999999999999")
+ call check(-10000000000000000000000000000000000000_k, "-10000000000000000000000000000000000000")
+ call check(-10000000000000000000000000000000000001_k, "-10000000000000000000000000000000000001")
+ call check(-99999999999999999999999999999999999999_k, "-99999999999999999999999999999999999999")
+ call check(-100000000000000000000000000000000000000_k, "-100000000000000000000000000000000000000")
+ call check(-100000000000000000000000000000000000001_k, "-100000000000000000000000000000000000001")
+ call check(-109999999999999999999999999999999999999_k, "-109999999999999999999999999999999999999")
+
+contains
+
+ subroutine check (i, str)
+ implicit none
+ integer(kind=k), intent(in), value :: i
+ character(len=*), intent(in) :: str
+
+ character(len=100) :: buffer
+ write(buffer,*) i
+ if (adjustl(buffer) /= adjustl(str)) stop 1
+ end subroutine
+
+ subroutine random_digits (str)
+ implicit none
+ integer, parameter :: l = 38
+ character(len=l+1) :: str
+ real :: r
+ integer :: i, d
+
+ str = ""
+ do i = 2, l+1
+ call random_number(r)
+ d = floor(r * 10)
+ str(i:i) = achar(48 + d)
+ end do
+
+ call random_number(r)
+ if (r > 0.5) then
+ str(1:1) = '-'
+ end if
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/pr99853.f90 b/gcc/testsuite/gfortran.dg/pr99853.f90
new file mode 100644
index 0000000..421a656
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr99853.f90
@@ -0,0 +1,29 @@
+! { dg-do compile }
+! { dg-options "-std=f2018" }
+! PR fortran/99853
+
+subroutine s1 ()
+ select case (.true.) ! { dg-error "Cannot convert" }
+ case (1_8) ! { dg-error "must be of type LOGICAL" }
+ end select
+end
+
+subroutine s2 ()
+ select case (.false._1) ! { dg-error "Cannot convert" }
+ case (2:3) ! { dg-error "must be of type LOGICAL" }
+ end select
+end
+
+subroutine s3 ()
+ select case (3_2) ! { dg-error "Cannot convert" }
+ case (.false.) ! { dg-error "must be of type INTEGER" }
+ end select
+end
+
+subroutine s4 (i)
+ select case (i) ! { dg-error "Cannot convert" }
+ case (.true._8) ! { dg-error "must be of type INTEGER" }
+ end select
+end
+
+! { dg-prune-output "Cannot convert" }
diff --git a/gcc/testsuite/gfortran.dg/prof/prof.exp b/gcc/testsuite/gfortran.dg/prof/prof.exp
index cf01059..a17840b 100644
--- a/gcc/testsuite/gfortran.dg/prof/prof.exp
+++ b/gcc/testsuite/gfortran.dg/prof/prof.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2022 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/reshape_7.f90 b/gcc/testsuite/gfortran.dg/reshape_7.f90
index d752650..4216cb6 100644
--- a/gcc/testsuite/gfortran.dg/reshape_7.f90
+++ b/gcc/testsuite/gfortran.dg/reshape_7.f90
@@ -4,7 +4,7 @@
subroutine p0
integer, parameter :: sh(2) = [2, 3]
integer, parameter :: &
- & a(2,2) = reshape([1, 2, 3, 4], sh) ! { dg-error "Different shape" }
+ & a(2,2) = reshape([1, 2, 3, 4], sh) ! { dg-error "not enough elements" }
if (a(1,1) /= 0) STOP 1
end subroutine p0
diff --git a/gcc/testsuite/gfortran.dg/reshape_9.f90 b/gcc/testsuite/gfortran.dg/reshape_9.f90
new file mode 100644
index 0000000..dc52e26
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reshape_9.f90
@@ -0,0 +1,31 @@
+! { dg-do compile }
+! PR fortran/103411 - ICE in gfc_conv_array_initializer
+! Based on testcase by G. Steinmetz
+! Test simplifications for checks of shape argument to reshape intrinsic
+
+program p
+ integer :: i
+ integer, parameter :: a(2) = [2,2]
+ integer, parameter :: u(5) = [1,2,2,42,2]
+ integer, parameter :: v(1,3) = 2
+ integer, parameter :: d(2,2) = reshape([1,2,3,4,5], a)
+ integer, parameter :: c(2,2) = reshape([1,2,3,4], a)
+ integer, parameter :: b(2,2) = &
+ reshape([1,2,3], a) ! { dg-error "not enough elements" }
+ print *, reshape([1,2,3], a) ! { dg-error "not enough elements" }
+ print *, reshape([1,2,3,4], a)
+ print *, reshape([1,2,3,4,5], a)
+ print *, b, c, d
+ print *, reshape([1,2,3], [(u(i),i=1,2)])
+ print *, reshape([1,2,3], [(u(i),i=2,3)]) ! { dg-error "not enough elements" }
+ print *, reshape([1,2,3], &
+ [(u(i)*(-1)**i,i=2,3)]) ! { dg-error "has negative element" }
+ print *, reshape([1,2,3,4], u(5:3:-2))
+ print *, reshape([1,2,3], u(5:3:-2)) ! { dg-error "not enough elements" }
+ print *, reshape([1,2,3,4], u([5,3]))
+ print *, reshape([1,2,3] , u([5,3])) ! { dg-error "not enough elements" }
+ print *, reshape([1,2,3,4], v(1,2:))
+ print *, reshape([1,2,3], v(1,2:)) ! { dg-error "not enough elements" }
+ print *, reshape([1,2,3,4], v(1,[2,1]))
+ print *, reshape([1,2,3] , v(1,[2,1])) ! { dg-error "not enough elements" }
+end
diff --git a/gcc/testsuite/gfortran.dg/scan_3.f90 b/gcc/testsuite/gfortran.dg/scan_3.f90
new file mode 100644
index 0000000..2a9ed08
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/scan_3.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+!
+! PR fortran/103789
+! Check the absence of ICE when generating calls to SCAN with a KIND argument.
+
+program p
+ character(len=10) :: y(2)
+ integer :: z(2), x(2), w(2), v(2)
+ y = ['abc', 'def']
+ z = scan(y, 'e', kind=4) + 1
+ x = scan(y, 'e', back=.false., kind=4) + 1
+ w = scan(y, 'e', .false., kind=4) + 1
+ v = scan(y, 'e', .false., 4) + 1
+end program p
diff --git a/gcc/testsuite/gfortran.dg/select_10.f90 b/gcc/testsuite/gfortran.dg/select_10.f90
new file mode 100644
index 0000000..2d9b017
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/select_10.f90
@@ -0,0 +1,25 @@
+! { dg-do compile }
+! PR fortran/103776 - ICE in gfc_compare_string
+! Contributed by G.Steinmetz
+
+program p
+ integer :: n
+ select case (n)
+ case ([1]) ! { dg-error "must be scalar" }
+ end select
+ select case (n)
+ case (:[2]) ! { dg-error "must be scalar" }
+ end select
+ select case (n)
+ case (['1']) ! { dg-error "must be scalar" }
+ end select
+ select case (n)
+ case (['1']:2) ! { dg-error "must be scalar" }
+ end select
+ select case (n)
+ case(['1']:['2']) ! { dg-error "must be scalar" }
+ end select
+ select case (n)
+ case(1:['2']) ! { dg-error "must be scalar" }
+ end select
+end
diff --git a/gcc/testsuite/gfortran.dg/select_9.f90 b/gcc/testsuite/gfortran.dg/select_9.f90
new file mode 100644
index 0000000..c580e81
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/select_9.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! PR fortran/103591 - ICE in gfc_compare_string
+! Contributed by G.Steinmetz
+
+program p
+ integer :: n
+ select case (n)
+ case ('1':2.) ! { dg-error "cannot be REAL" }
+ end select
+end
diff --git a/gcc/testsuite/gfortran.dg/shape_11.f90 b/gcc/testsuite/gfortran.dg/shape_11.f90
new file mode 100644
index 0000000..127d221
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/shape_11.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+! PR fortran/103610 - ICE while simplifying SHAPE
+! Contributed by G.Steinmetz
+
+program p
+ integer, parameter :: a(-1) = 1
+ integer, parameter :: b(1) = maskl(shape(a))
+ integer, parameter :: c(1) = shape(a)
+ integer, parameter :: d(1) = maskr(shape(a))
+ if (b(1) /= 0) stop 1
+ if (c(1) /= 0) stop 2
+ if (d(1) /= 0) stop 3
+end
+
+! { dg-final { scan-tree-dump-not "_gfortran_stop_numeric" "original" } }
diff --git a/gcc/testsuite/gfortran.dg/transfer_char_kind4.f90 b/gcc/testsuite/gfortran.dg/transfer_char_kind4.f90
new file mode 100644
index 0000000..5f1fe69
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_char_kind4.f90
@@ -0,0 +1,115 @@
+! { dg-do run }
+! PR fortran/83079 - ICE and wrong code with TRANSFER and character(kind=4)
+! Exercise TRANSFER intrinsic to check character result length and shape
+
+program p
+ implicit none
+ character(len=*,kind=4), parameter :: a = 4_'ABCDEF'
+ character(len=6,kind=4) :: b = 4_'abcdef'
+ character(len=*,kind=4), parameter :: c = 4_'XY'
+ character(len=2,kind=4) :: d = 4_'xy'
+ integer :: k, l
+ k = len (a)
+ l = len (c)
+
+! print *, transfer(4_'xy', [4_'a'])
+
+ ! TRANSFER with rank-0 result
+ call chk0 (transfer (4_'ABCD', 4_'XY'), 2, 1)
+ call chk0 (transfer (4_'ABCD', c ), l, 2)
+ call chk0 (transfer (4_'ABCD', d ), l, 3)
+ call chk0 (transfer (a , 4_'XY'), 2, 4)
+ call chk0 (transfer (a , c ), l, 5)
+ call chk0 (transfer (a , d ), l, 6)
+ call chk0 (transfer (b , 4_'XY'), 2, 7)
+ call chk0 (transfer (b , c ), l, 8)
+ call chk0 (transfer (b , d ), l, 9)
+
+ call chk0 (transfer ([4_'ABCD'], 4_'XY'), 2, 11)
+ call chk0 (transfer ([4_'ABCD'], c ), l, 12)
+ call chk0 (transfer ([4_'ABCD'], d ), l, 13)
+ call chk0 (transfer ([a ], 4_'XY'), 2, 14)
+ call chk0 (transfer ([a ], c ), l, 15)
+ call chk0 (transfer ([a ], d ), l, 16)
+ call chk0 (transfer ([b ], 4_'XY'), 2, 17)
+ call chk0 (transfer ([b ], c ), l, 18)
+ call chk0 (transfer ([b ], d ), l, 19)
+
+ ! TRANSFER with rank-1 result
+ call chk1 (transfer (4_'ABCD', [4_'XY']), 2, 2, 21)
+ call chk1 (transfer (4_'ABCD', [c] ), 2, 2, 22)
+ call chk1 (transfer (4_'ABCD', [d] ), 2, 2, 23)
+ call chk1 (transfer (a , [4_'XY']), 2, k/2, 24)
+ call chk1 (transfer (a , [c] ), l, k/l, 25)
+ call chk1 (transfer (a , [d] ), l, k/l, 26)
+ call chk1 (transfer (b , [4_'XY']), 2, k/2, 27)
+ call chk1 (transfer (b , [c] ), l, k/l, 28)
+ call chk1 (transfer (b , [d] ), l, k/l, 29)
+
+ call chk1 (transfer (4_'ABCD', 4_'XY',size=2), 2, 2, 31)
+ call chk1 (transfer (4_'ABCD', c ,size=2), 2, 2, 32)
+ call chk1 (transfer (4_'ABCD', d ,size=2), 2, 2, 33)
+ call chk1 (transfer (a , 4_'XY',size=3), 2, 3, 34)
+ call chk1 (transfer (a , c ,size=3), l, 3, 35)
+ call chk1 (transfer (a , d ,size=3), l, 3, 36)
+ call chk1 (transfer (b , 4_'XY',size=3), 2, 3, 37)
+ call chk1 (transfer (b , c ,size=3), l, 3, 38)
+ call chk1 (transfer (b , d ,size=3), l, 3, 39)
+
+ call chk1 (transfer (4_'ABCD', [4_'XY'],size=2), 2, 2, 41)
+ call chk1 (transfer (4_'ABCD', [c] ,size=2), 2, 2, 42)
+ call chk1 (transfer (4_'ABCD', [d] ,size=2), 2, 2, 43)
+ call chk1 (transfer (a , [4_'XY'],size=3), 2, 3, 44)
+ call chk1 (transfer (a , [c] ,size=3), l, 3, 45)
+ call chk1 (transfer (a , [d] ,size=3), l, 3, 46)
+ call chk1 (transfer (b , [4_'XY'],size=3), 2, 3, 47)
+ call chk1 (transfer (b , [c] ,size=3), l, 3, 48)
+ call chk1 (transfer (b , [d] ,size=3), l, 3, 49)
+
+ call chk1 (transfer ([4_'ABCD'], [4_'XY']), 2, 2, 51)
+ call chk1 (transfer ([4_'ABCD'], [c] ), 2, 2, 52)
+ call chk1 (transfer ([4_'ABCD'], [d] ), 2, 2, 53)
+ call chk1 (transfer ([a ], [4_'XY']), 2, k/2, 54)
+ call chk1 (transfer ([a ], [c] ), l, k/l, 55)
+ call chk1 (transfer ([a ], [d] ), l, k/l, 56)
+ call chk1 (transfer ([b ], [4_'XY']), 2, k/2, 57)
+ call chk1 (transfer ([b ], [c] ), l, k/l, 58)
+ call chk1 (transfer ([b ], [d] ), l, k/l, 59)
+
+ call chk1 (transfer (4_'ABCD', c ,size=4/l), l, 4/l, 62)
+ call chk1 (transfer (4_'ABCD', d ,size=4/l), l, 4/l, 63)
+ call chk1 (transfer (a , 4_'XY',size=k/2), 2, k/2, 64)
+ call chk1 (transfer (a , c ,size=k/l), l, k/l, 65)
+ call chk1 (transfer (a , d ,size=k/l), l, k/l, 66)
+ call chk1 (transfer (b , 4_'XY',size=k/2), 2, k/2, 67)
+ call chk1 (transfer (b , c ,size=k/l), l, k/l, 68)
+ call chk1 (transfer (b , d ,size=k/l), l, k/l, 69)
+
+contains
+ ! Validate rank-0 result
+ subroutine chk0 (str, l, stopcode)
+ character(kind=4,len=*), intent(in) :: str
+ integer, intent(in) :: l, stopcode
+ integer :: i, p
+ i = len (str)
+ p = verify (str, a // b) ! Check for junk characters
+ if (i /= l .or. p > 0) then
+ print *, stopcode, "len=", i, i == l, ">", str, "<"
+ stop stopcode
+ end if
+ end subroutine chk0
+
+ ! Validate rank-1 result
+ subroutine chk1 (str, l, m, stopcode)
+ character(kind=4,len=*), intent(in) :: str(:)
+ integer, intent(in) :: l, m, stopcode
+ integer :: i, j, p
+ i = len (str)
+ j = size (str)
+ p = maxval (verify (str, a // b)) ! Check for junk characters
+ if (i /= l .or. j /= m .or. p > 0) then
+ print *, stopcode, "len=", i, i == l, "size=", j, j == m, ">", str, "<"
+ stop stopcode
+ end if
+ end subroutine chk1
+end
diff --git a/gcc/testsuite/gfortran.dg/transfer_check_6.f90 b/gcc/testsuite/gfortran.dg/transfer_check_6.f90
new file mode 100644
index 0000000..dffd091
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_check_6.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! PR fortran/104227 - ICE virtual memory exhausted
+! Contributed by G.Steinmetz
+
+program p
+ type t
+ end type
+ type(t) :: x(2)
+ print *, transfer(1, x) ! { dg-error "shall not have storage size 0" }
+ x = transfer(1, x) ! { dg-error "shall not have storage size 0" }
+end
diff --git a/gcc/testsuite/gfortran.dg/transfer_simplify_11.f90 b/gcc/testsuite/gfortran.dg/transfer_simplify_11.f90
index 0911f9d..409e476 100644
--- a/gcc/testsuite/gfortran.dg/transfer_simplify_11.f90
+++ b/gcc/testsuite/gfortran.dg/transfer_simplify_11.f90
@@ -4,5 +4,5 @@
integer, parameter :: N = 2
character(len=1) :: chr(N)
chr = transfer(repeat("x",ncopies=N),[character(len=1) ::], N)
- if (chr(1) /= 'x' .and. chr(2) /= 'x') STOP 1
+ if (chr(1) /= 'x' .or. chr(2) /= 'x') STOP 1
end
diff --git a/gcc/testsuite/gfortran.dg/transfer_simplify_13.f90 b/gcc/testsuite/gfortran.dg/transfer_simplify_13.f90
new file mode 100644
index 0000000..bafb046
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_simplify_13.f90
@@ -0,0 +1,34 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+! PR fortran/104127 - ICE in get_array_charlen
+! Contributed by G.Steinmetz
+
+program p
+ character(4) :: mold = "XYZ"
+ integer :: i = 0
+ integer, parameter :: l1 = len (transfer('ab', 'xyz', size=0))
+ integer, parameter :: s1 = size (transfer('ab', 'xyz', size=0))
+ integer, parameter :: l4 = len (transfer(4_'abcd', 4_'xy', size=0))
+ integer, parameter :: s4 = size (transfer(4_'abcd', 4_'xy', size=0))
+ integer, parameter :: l2 = len (transfer('ab', mold, size=0))
+ integer, parameter :: l3 = len (transfer('ab', mold, size=1))
+ integer, parameter :: l5 = len (transfer('ab',['xyz'], size=0))
+ integer, parameter :: s5 = size (transfer('ab',['xyz'], size=0))
+ call sub0 ( transfer('a', 'y', size=0) )
+ call sub1 ([transfer('a', 'y', size=0)])
+ call sub2 ([transfer('a',['y'],size=0)])
+ call sub3 ( transfer('a', 'y', size=1) )
+ call sub4 ([transfer('a', 'y', size=1)])
+ call sub5 ( transfer('a', 'y', size=i) )
+ call sub6 ( transfer(1_'abcd', 1_'xy' , size=0))
+ call sub7 ( transfer(1_'abcd',[1_'xy'], size=0))
+ call sub8 ( transfer(4_'abcd', 4_'xy' , size=0))
+ call sub9 ( transfer(4_'abcd',[4_'xy'], size=0))
+ print *, transfer('abcd', 'xy', size=0)
+ if (l1 /= 3 .or. s1 /= 0) stop 1
+ if (l4 /= 2 .or. s4 /= 0) stop 2
+ if (l2 /= 4 .or. l3 /= 4) stop 3
+ if (l5 /= 3 .or. s5 /= 0) stop 4
+end
+
+! { dg-final { scan-tree-dump-not "_gfortran_stop_numeric" "original" } }
diff --git a/gcc/testsuite/gfortran.dg/transfer_simplify_14.f90 b/gcc/testsuite/gfortran.dg/transfer_simplify_14.f90
new file mode 100644
index 0000000..dfb997d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_simplify_14.f90
@@ -0,0 +1,27 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+! PR fortran/104128 - ICE in gfc_widechar_to_char
+! Contributed by G.Steinmetz
+
+program p
+ implicit none
+ integer, parameter :: k = 4
+ character(*), parameter :: a = 'abc'
+ character(*,kind=4), parameter :: b = 'abc'
+ character(2,kind=k), parameter :: s = k_"FG"
+ character(*,kind=1), parameter :: x = transfer (s, 'abcdefgh')
+ character(2,kind=k), parameter :: t = transfer (x, s)
+ character(2,kind=k) :: u = transfer (x, s)
+ logical, parameter :: l = (s == t)
+ print *, transfer (a , 4_'xy', size=2)
+ print *, transfer ('xyz', [b], size=2)
+ print *, s
+ print *, t
+ print *, u
+ if (.not. l) stop 1
+ if (t /= s) stop 2
+ if (u /= s) stop 3 ! not optimized away
+end
+
+! { dg-final { scan-tree-dump-times "_gfortran_stop_numeric" 1 "original" } }
+! { dg-final { scan-tree-dump "_gfortran_stop_numeric \\(3, 0\\);" "original" } }
diff --git a/gcc/testsuite/gfortran.dg/transfer_simplify_15.f90 b/gcc/testsuite/gfortran.dg/transfer_simplify_15.f90
new file mode 100644
index 0000000..cdbec97
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_simplify_15.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! PR fortran/104311 - ICE out of memory
+! Contributed by G.Steinmetz
+
+program p
+ type t
+ end type
+ type(t) :: x(2)
+ print *, transfer(1,x,2) ! { dg-error "shall not have storage size 0" }
+ print *, transfer(1,x,huge(1)) ! { dg-error "shall not have storage size 0" }
+end
diff --git a/gcc/testsuite/gfortran.dg/ubsan/ubsan.exp b/gcc/testsuite/gfortran.dg/ubsan/ubsan.exp
index e44d946..a2b02b2 100644
--- a/gcc/testsuite/gfortran.dg/ubsan/ubsan.exp
+++ b/gcc/testsuite/gfortran.dg/ubsan/ubsan.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2021 Free Software Foundation, Inc.
+# Copyright (C) 2021-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gfortran.dg/vect/vect-8.f90 b/gcc/testsuite/gfortran.dg/vect/vect-8.f90
index c8a7d89..ca72ddc 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect-8.f90
+++ b/gcc/testsuite/gfortran.dg/vect/vect-8.f90
@@ -704,6 +704,7 @@ CALL track('KERNEL ')
RETURN
END SUBROUTINE kernel
-! { dg-final { scan-tree-dump-times "vectorized 24 loops" 1 "vect" { target aarch64*-*-* } } }
+! { dg-final { scan-tree-dump-times "vectorized 25 loops" 1 "vect" { target aarch64_sve } } }
+! { dg-final { scan-tree-dump-times "vectorized 24 loops" 1 "vect" { target { aarch64*-*-* && { ! aarch64_sve } } } } }
! { dg-final { scan-tree-dump-times "vectorized 2\[234\] loops" 1 "vect" { target { vect_intdouble_cvt && { ! aarch64*-*-* } } } } }
! { dg-final { scan-tree-dump-times "vectorized 17 loops" 1 "vect" { target { { ! vect_intdouble_cvt } && { ! aarch64*-*-* } } } } }
diff --git a/gcc/testsuite/gfortran.dg/vect/vect.exp b/gcc/testsuite/gfortran.dg/vect/vect.exp
index f6feae1..c6b9fc0 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect.exp
+++ b/gcc/testsuite/gfortran.dg/vect/vect.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/verify_3.f90 b/gcc/testsuite/gfortran.dg/verify_3.f90
new file mode 100644
index 0000000..c8b26b7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/verify_3.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+!
+! PR fortran/103789
+! Check the absence of ICE when generating calls to VERIFY with a KIND argument.
+
+program p
+ character(len=10) :: y(2)
+ integer :: z(2), x(2), w(2), v(2)
+ y = ['abc', 'def']
+ z = verify(y, 'e', kind=4) + 1
+ x = verify(y, 'e', back=.false., kind=4) + 1
+ w = verify(y, 'e', .false., kind=4) + 1
+ x = verify(y, 'e', .false., 4) + 1
+end program p
diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp b/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp
index 2117a6c..1163816 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2003-2022 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.fortran-torture/execute/execute.exp b/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp
index 4de1a86..073f601 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2003-2022 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/aggr26.adb b/gcc/testsuite/gnat.dg/aggr26.adb
index 0466473..45370fd 100644
--- a/gcc/testsuite/gnat.dg/aggr26.adb
+++ b/gcc/testsuite/gnat.dg/aggr26.adb
@@ -3,7 +3,7 @@
procedure Aggr26 is
type Row is array (Positive) of Integer;
- H : array (Positive) of Row := (others => (others => 0)); -- { dg-warning "\"Storage_Error\" will be raised at run time" }
+ H : array (Positive) of Row := (others => (others => 0)); -- { dg-warning "Storage_Error will be raised at run time" }
begin
null;
diff --git a/gcc/testsuite/gnat.dg/dg.exp b/gcc/testsuite/gnat.dg/dg.exp
index e9b1389..2838600 100644
--- a/gcc/testsuite/gnat.dg/dg.exp
+++ b/gcc/testsuite/gnat.dg/dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 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/div_zero.adb b/gcc/testsuite/gnat.dg/div_zero.adb
new file mode 100644
index 0000000..de88951
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/div_zero.adb
@@ -0,0 +1,24 @@
+-- { dg-do run }
+-- { dg-skip-if "divide does not trap" { powerpc*-*-* } }
+
+-- This test requires architecture- and OS-specific support code for unwinding
+-- through signal frames (typically located in *-unwind.h) to pass. Feel free
+-- to disable it if this code hasn't been implemented yet.
+
+procedure Div_Zero is
+
+ pragma Suppress (All_Checks);
+
+ function Zero return Integer is
+ begin
+ return 0;
+ end;
+
+ D : Integer := Zero;
+
+begin
+ D := 1 / D;
+ raise Program_Error;
+exception
+ when Constraint_Error => null;
+end;
diff --git a/gcc/testsuite/gnat.dg/gcov/gcov.exp b/gcc/testsuite/gnat.dg/gcov/gcov.exp
index e667248..310acd6 100644
--- a/gcc/testsuite/gnat.dg/gcov/gcov.exp
+++ b/gcc/testsuite/gnat.dg/gcov/gcov.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/generic_comp.adb b/gcc/testsuite/gnat.dg/generic_comp.adb
new file mode 100644
index 0000000..8c7b16f
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/generic_comp.adb
@@ -0,0 +1,39 @@
+-- { dg-do run }
+
+procedure Generic_Comp is
+
+ generic
+ type Element_Type is private;
+ type Index_Type is (<>);
+ type Array_Type is array (Index_Type range <>) of Element_Type;
+ with function ">" (Left, Right : Element_Type) return Boolean is <>;
+ procedure Gen (Data: in out Array_Type);
+
+ procedure Gen (Data: in out Array_Type) is
+ begin
+ if not (Data'Length > 1)
+ or else not (Integer'(Data'Length) > 1)
+ or else not Standard.">" (Data'Length, 1)
+ or else not Standard.">" (Integer'(Data'Length), 1)
+ then
+ raise Program_Error;
+ end if;
+ end;
+
+ type My_Array is array (Positive range <>) of Integer;
+
+ function Less_Than (L, R : Integer) return Boolean is
+ begin
+ return L < R;
+ end;
+
+ procedure Chk_Down is new Gen (Element_Type => Integer,
+ Index_Type => Positive,
+ Array_Type => My_Array,
+ ">" => Less_Than);
+
+ Data : My_Array (1 .. 2);
+
+begin
+ Chk_Down (Data);
+end;
diff --git a/gcc/testsuite/gnat.dg/lto25.adb b/gcc/testsuite/gnat.dg/lto25.adb
new file mode 100644
index 0000000..242c8d6
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/lto25.adb
@@ -0,0 +1,14 @@
+-- { dg-do run }
+-- { dg-options "-O2 -flto" { target lto } }
+
+with Opt96_Pkg; use Opt96_Pkg;
+
+procedure Lto25 is
+ R : Rec;
+ D : Data;
+begin
+ D.Foo.Bar := (0.02, 0.01);
+ if R.F (D) /= 30 then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/opt96.adb b/gcc/testsuite/gnat.dg/opt96.adb
new file mode 100644
index 0000000..d91368b
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt96.adb
@@ -0,0 +1,14 @@
+-- { dg-do run }
+-- { dg-options "-O2" }
+
+with Opt96_Pkg; use Opt96_Pkg;
+
+procedure Opt96 is
+ R : Rec;
+ D : Data;
+begin
+ D.Foo.Bar := (0.02, 0.01);
+ if R.F (D) /= 30 then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/opt96_pkg.adb b/gcc/testsuite/gnat.dg/opt96_pkg.adb
new file mode 100644
index 0000000..60fdb0d
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt96_pkg.adb
@@ -0,0 +1,16 @@
+package body Opt96_Pkg is
+
+ function F (D : Data) return Integer is
+ X : constant Long_Float := Long_Float (D.Foo.Bar.X);
+ Y : constant Long_Float := Long_Float (D.Foo.Bar.Y);
+ begin
+ return Integer ((X * 1000.0) + (Y * 1000.0));
+ end;
+
+ function F (Self : Rec; D : Data'Class) return Integer is
+ Base_Data : constant Data := Data (D);
+ begin
+ return F (Base_Data);
+ end;
+
+end Opt96_Pkg;
diff --git a/gcc/testsuite/gnat.dg/opt96_pkg.ads b/gcc/testsuite/gnat.dg/opt96_pkg.ads
new file mode 100644
index 0000000..7939c38
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt96_pkg.ads
@@ -0,0 +1,32 @@
+with System;
+
+package Opt96_Pkg is
+
+ type Baz_Type is delta (1.0 / 2.0**16) range 0.0 .. 1.0 - (1.0 / 2.0**16);
+ for Baz_Type'Small use (1.0 / 2.0**16);
+ for Baz_Type'Size use 16;
+
+ type Bar_Type is record
+ X : Baz_Type;
+ Y : Baz_Type;
+ end record;
+ for Bar_Type use record
+ X at 0 range 0 .. 15;
+ Y at 2 range 0 .. 15;
+ end record;
+ for Bar_Type'Bit_Order use System.High_Order_First;
+ for Bar_Type'Scalar_Storage_Order use System.High_Order_First;
+
+ type Foo_Type is record
+ Bar : Bar_Type;
+ end record;
+
+ type Data is tagged record
+ Foo : Foo_Type;
+ end record;
+
+ type Rec is tagged null record;
+
+ function F (Self : Rec; D : Data'Class) return Integer;
+
+end Opt96_Pkg;
diff --git a/gcc/testsuite/gnat.dg/opt97.adb b/gcc/testsuite/gnat.dg/opt97.adb
new file mode 100644
index 0000000..1bf6a75
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt97.adb
@@ -0,0 +1,25 @@
+-- { dg-do compile }
+-- { dg-options "-O2 -fdump-tree-optimized" }
+
+with System.Unsigned_Types; use System.Unsigned_Types;
+
+function Opt97 (X, Y : Unsigned) return Unsigned is
+
+ pragma Suppress (All_Checks);
+
+ Z : Unsigned;
+
+begin
+ if X >= 2 then
+ return 0;
+ end if;
+
+ Z := Y;
+ if X = 1 then
+ Z := Y + 4;
+ end if;
+
+ return Z / X;
+end;
+
+-- { dg-final { scan-tree-dump "/" "optimized" } }
diff --git a/gcc/testsuite/gnat.dg/specs/specs.exp b/gcc/testsuite/gnat.dg/specs/specs.exp
index e5eb34e..fa0551d 100644
--- a/gcc/testsuite/gnat.dg/specs/specs.exp
+++ b/gcc/testsuite/gnat.dg/specs/specs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 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/sso/sso.exp b/gcc/testsuite/gnat.dg/sso/sso.exp
index f60e8ea..1838e40 100644
--- a/gcc/testsuite/gnat.dg/sso/sso.exp
+++ b/gcc/testsuite/gnat.dg/sso/sso.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 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.dg/dg.exp b/gcc/testsuite/go.dg/dg.exp
index fdf53e7..15d9f70 100644
--- a/gcc/testsuite/go.dg/dg.exp
+++ b/gcc/testsuite/go.dg/dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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 ef3b9df..f39b055 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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 f167545..a402388 100644
--- a/gcc/testsuite/go.test/go-test.exp
+++ b/gcc/testsuite/go.test/go-test.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 Free Software Foundation, Inc.
# Written by Ian Lance Taylor <iant@google.com>.
# This program is free software; you can redistribute it and/or modify
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue14652.go b/gcc/testsuite/go.test/test/fixedbugs/issue14652.go
index d53b412..586663b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/issue14652.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue14652.go
@@ -1,4 +1,4 @@
-// errorcheck
+// compile
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -6,4 +6,5 @@
package p
-var x any // ERROR "undefined: any|undefined type .*any.*"
+// any is now permitted instead of interface{}
+var x any
diff --git a/gcc/testsuite/jit.dg/all-non-failing-tests.h b/gcc/testsuite/jit.dg/all-non-failing-tests.h
index 84ef54a..29afe06 100644
--- a/gcc/testsuite/jit.dg/all-non-failing-tests.h
+++ b/gcc/testsuite/jit.dg/all-non-failing-tests.h
@@ -181,6 +181,13 @@
#undef create_code
#undef verify_code
+/* test-global-init-rvalue.c */
+#define create_code create_code_global_init_rvalue
+#define verify_code verify_code_global_init_rvalue
+#include "test-global-init-rvalue.c"
+#undef create_code
+#undef verify_code
+
/* test-global-set-initializer.c */
#define create_code create_code_global_set_initializer
#define verify_code verify_code_global_set_initializer
@@ -188,6 +195,20 @@
#undef create_code
#undef verify_code
+/* test-builtin-types.c */
+#define create_code create_code_builtin_types
+#define verify_code verify_code_builtin_types
+#include "test-builtin-types.c"
+#undef create_code
+#undef verify_code
+
+/* test-tls.c */
+#define create_code create_code_tls
+#define verify_code verify_code_tls
+#include "test-tls.c"
+#undef create_code
+#undef verify_code
+
/* test-hello-world.c */
#define create_code create_code_hello_world
#define verify_code verify_code_hello_world
@@ -195,6 +216,9 @@
#undef create_code
#undef verify_code
+/* test-link-section-assembler.c: This can't be in the testcases array as it
+ doesn't have a verify_code implementation. */
+
/* test-linked-list.c */
#define create_code create_code_linked_list
#define verify_code verify_code_linked_list
@@ -202,6 +226,13 @@
#undef create_code
#undef verify_code
+/* test-local-init-rvalue.c */
+#define create_code create_code_local_init_rvalue
+#define verify_code verify_code_local_init_rvalue
+#include "test-local-init-rvalue.c"
+#undef create_code
+#undef verify_code
+
/* test-long-names.c */
#define create_code create_code_long_names
#define verify_code verify_code_long_names
@@ -230,6 +261,9 @@
#undef create_code
#undef verify_code
+/* test-pr103562.c: We don't add this one, since it touches
+ the optimization level of the context as a whole. */
+
/* test-pr66700-observing-write-through-ptr.c */
#define create_code create_code_pr66700_observing_write_through_ptr
#define verify_code verify_code_pr66700_observing_write_through_ptr
@@ -265,6 +299,13 @@
#undef create_code
#undef verify_code
+/* test-reflection.c */
+#define create_code create_code_reflection
+#define verify_code verify_code_reflection
+#include "test-reflection.c"
+#undef create_code
+#undef verify_code
+
/* test-string-literal.c */
#define create_code create_code_string_literal
#define verify_code verify_code_string_literal
@@ -401,12 +442,21 @@ const struct testcase testcases[] = {
{"functions",
create_code_functions,
verify_code_functions},
+ {"builtin-types",
+ create_code_builtin_types,
+ verify_code_builtin_types},
+ {"global_rvalue_init",
+ create_code_global_init_rvalue,
+ verify_code_global_init_rvalue},
{"hello_world",
create_code_hello_world,
verify_code_hello_world},
{"linked_list",
create_code_linked_list,
verify_code_linked_list},
+ {"local_rvalue_init",
+ create_code_local_init_rvalue,
+ verify_code_local_init_rvalue},
{"long_names",
create_code_long_names,
verify_code_long_names},
@@ -434,6 +484,9 @@ const struct testcase testcases[] = {
{"reading_struct ",
create_code_reading_struct ,
verify_code_reading_struct },
+ {"reflection",
+ create_code_reflection ,
+ verify_code_reflection },
{"string_literal",
create_code_string_literal,
verify_code_string_literal},
@@ -443,6 +496,9 @@ const struct testcase testcases[] = {
{"switch",
create_code_switch,
verify_code_switch},
+ {"tls",
+ create_code_tls,
+ verify_code_tls},
{"types",
create_code_types,
verify_code_types},
diff --git a/gcc/testsuite/jit.dg/jit.exp b/gcc/testsuite/jit.dg/jit.exp
index 10b98bd..3568dbb 100644
--- a/gcc/testsuite/jit.dg/jit.exp
+++ b/gcc/testsuite/jit.dg/jit.exp
@@ -864,6 +864,39 @@ proc jit-verify-assembler { args } {
jit-run-executable ${executable_from_asm} ${dg-output-text}
}
+# Assuming that a .s file has been written out named
+# OUTPUT_FILENAME, check that the argument matches the
+# output file.
+# For use by the test-link-section-assembler.c testcase.
+proc jit-verify-assembler-output { args } {
+ verbose "jit-verify-assembler: $args"
+
+ set dg-output-text [lindex $args 0]
+ verbose "dg-output-text: ${dg-output-text}"
+
+ upvar 2 name name
+ verbose "name: $name"
+
+ upvar 2 prog prog
+ verbose "prog: $prog"
+ set asm_filename [jit-get-output-filename $prog]
+ verbose " asm_filename: ${asm_filename}"
+
+ # Read the assembly file.
+ set f [open $asm_filename r]
+ set content [read $f]
+ close $f
+
+ # Verify that the assembly matches the regex.
+ if { ![regexp ${dg-output-text} $content] } {
+ fail "${asm_filename} output pattern test, is ${content}, should match ${dg-output-text}"
+ verbose "Failed test for output pattern ${dg-output-text}" 3
+ } else {
+ pass "${asm_filename} output pattern test, ${dg-output-text}"
+ verbose "Passed test for output pattern ${dg-output-text}" 3
+ }
+
+}
# Assuming that a .o file has been written out named
# OUTPUT_FILENAME, invoke the driver to try to turn it into
# an executable, and try to run the result.
diff --git a/gcc/testsuite/jit.dg/test-builtin-types.c b/gcc/testsuite/jit.dg/test-builtin-types.c
new file mode 100644
index 0000000..15b026c
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-builtin-types.c
@@ -0,0 +1,43 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+
+#include "libgccjit.h"
+
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ CHECK_NON_NULL (gcc_jit_context_get_builtin_function (ctxt, "__atomic_fetch_add_4"));
+
+ gcc_jit_function *atomic_load = gcc_jit_context_get_builtin_function (ctxt, "__atomic_load_8");
+
+ gcc_jit_type *void_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_VOID);
+ gcc_jit_type *const_void_type =
+ gcc_jit_type_get_const (gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_VOID));
+ gcc_jit_type *volatile_void_ptr =
+ gcc_jit_type_get_pointer (gcc_jit_type_get_volatile (const_void_type));
+ gcc_jit_type *long_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_LONG);
+ gcc_jit_type *int_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
+ gcc_jit_function *func =
+ gcc_jit_context_new_function (ctxt, NULL, GCC_JIT_FUNCTION_EXPORTED, void_type, "atomics", 0, NULL, 0);
+
+ gcc_jit_lvalue *variable = gcc_jit_function_new_local (func, NULL, long_type, "variable");
+ gcc_jit_rvalue *builtin_args[2];
+ gcc_jit_rvalue *param1 = gcc_jit_lvalue_get_address(variable, NULL);
+ builtin_args[0] = gcc_jit_context_new_cast(ctxt, NULL, param1, volatile_void_ptr);
+ builtin_args[1] = gcc_jit_context_new_rvalue_from_long(ctxt, int_type, 0);
+ gcc_jit_context_new_call (ctxt, NULL, atomic_load, 2, builtin_args);
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Verify that no errors were emitted. */
+ CHECK_NON_NULL (result);
+}
diff --git a/gcc/testsuite/jit.dg/test-error-bad-assignment.c b/gcc/testsuite/jit.dg/test-error-bad-assignment.c
new file mode 100644
index 0000000..fea2b37
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-bad-assignment.c
@@ -0,0 +1,78 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ /* Let's try to inject the equivalent of:
+
+ void
+ test_fn ()
+ {
+ long integer;
+ volatile const void *variable;
+ variable = &integer;
+ long aligned_integer __attribute__((aligned(4)));
+ variable = &aligned_integer;
+ }
+
+ and verify that the API complains about the mismatching types
+ in the assignments.
+ */
+ gcc_jit_type *void_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_VOID);
+ gcc_jit_type *long_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_LONG);
+ gcc_jit_type *const_void_type =
+ gcc_jit_type_get_const (void_type);
+ gcc_jit_type *volatile_void_ptr =
+ gcc_jit_type_get_pointer (gcc_jit_type_get_volatile (const_void_type));
+
+ gcc_jit_function *func =
+ gcc_jit_context_new_function (ctxt, NULL,
+ GCC_JIT_FUNCTION_EXPORTED,
+ void_type,
+ "test_fn",
+ 0, NULL,
+ 0);
+
+ gcc_jit_lvalue *integer = gcc_jit_function_new_local (func, NULL, long_type, "integer");
+ gcc_jit_rvalue *address = gcc_jit_lvalue_get_address(integer, NULL);
+
+ gcc_jit_lvalue *variable = gcc_jit_function_new_local (func, NULL, volatile_void_ptr, "variable");
+ gcc_jit_block *initial =
+ gcc_jit_function_new_block (func, "initial");
+ gcc_jit_block_add_assignment(initial, NULL, variable, address);
+
+ gcc_jit_type *aligned_long_type = gcc_jit_type_get_aligned (long_type, 4);
+ gcc_jit_lvalue *aligned_integer = gcc_jit_function_new_local (func, NULL, aligned_long_type, "aligned_integer");
+ gcc_jit_rvalue *aligned_address = gcc_jit_lvalue_get_address(aligned_integer, NULL);
+
+ gcc_jit_block_add_assignment(initial, NULL, variable, aligned_address);
+
+ gcc_jit_block_end_with_void_return (initial, NULL);
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error messages were emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ "gcc_jit_block_add_assignment:"
+ " mismatching types:"
+ " assignment to variable (type: volatile const void *)"
+ " from &integer (type: long *)");
+
+ CHECK_STRING_VALUE (gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_block_add_assignment:"
+ " mismatching types:"
+ " assignment to variable (type: volatile const void *)"
+ " from &aligned_integer (type: long __attribute__((aligned(4))) *)");
+}
+
diff --git a/gcc/testsuite/jit.dg/test-error-ctor-array-wrong-obj.c b/gcc/testsuite/jit.dg/test-error-ctor-array-wrong-obj.c
new file mode 100644
index 0000000..6b54b85
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-ctor-array-wrong-obj.c
@@ -0,0 +1,54 @@
+/*
+
+ Test that the proper error is triggered when we build a ctor
+ for an array type, but has the type wrong on an element.
+
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_INT);
+ gcc_jit_type *float_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_FLOAT);
+
+ gcc_jit_type *arr_type =
+ gcc_jit_context_new_array_type (ctxt, 0, int_type, 10);
+
+ gcc_jit_rvalue *frv = gcc_jit_context_new_rvalue_from_double (ctxt,
+ float_type,
+ 12);
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor
+ (ctxt, 0,
+ arr_type,
+ 1,
+ &frv);
+
+ CHECK_VALUE (ctor, NULL);
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ "gcc_jit_context_new_array_constructor: array element "
+ "value types differ from types in 'values' (element "
+ "type: int)('values' type: float)");
+ CHECK_STRING_VALUE (gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_context_new_array_constructor: array element "
+ "value types differ from types in 'values' (element "
+ "type: int)('values' type: float)");
+}
diff --git a/gcc/testsuite/jit.dg/test-error-ctor-struct-too-big.c b/gcc/testsuite/jit.dg/test-error-ctor-struct-too-big.c
new file mode 100644
index 0000000..6bc2045
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-ctor-struct-too-big.c
@@ -0,0 +1,71 @@
+/*
+
+ Test that the proper error is triggered when we build a ctor
+ for an struct type, but have too many fields and values.
+
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_INT);
+
+ gcc_jit_field *b1 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "a");
+ gcc_jit_field *b2 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "b");
+ gcc_jit_field *b3 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "c");
+ gcc_jit_field *fields_b[] = {b1, b2, b3};
+
+ gcc_jit_type *struct_bar_type =
+ gcc_jit_struct_as_type (
+ gcc_jit_context_new_struct_type (ctxt,
+ 0,
+ "bar",
+ 3,
+ fields_b));
+
+ gcc_jit_field *fields_ctor[] = {b1, b2, b3, b3};
+ gcc_jit_rvalue *values[] = {0,0,0,0};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_bar_type,
+ 4,
+ fields_ctor,
+ values);
+
+ CHECK_VALUE (ctor, NULL);
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ "gcc_jit_context_new_struct_constructor: more values in "
+ "constructor (n=4) than fields in target struct "
+ "bar (n=3)");
+ CHECK_STRING_VALUE (gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_context_new_struct_constructor: more values in "
+ "constructor (n=4) than fields in target struct "
+ "bar (n=3)");
+}
diff --git a/gcc/testsuite/jit.dg/test-error-ctor-struct-wrong-field-obj.c b/gcc/testsuite/jit.dg/test-error-ctor-struct-wrong-field-obj.c
new file mode 100644
index 0000000..bc191e1
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-ctor-struct-wrong-field-obj.c
@@ -0,0 +1,86 @@
+/*
+
+ Test that the proper error is triggered when we build a ctor
+ for an struct type, but try to use a field object that was not
+ used to create the struct type.
+
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_INT);
+
+ gcc_jit_field *b1 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "a");
+ gcc_jit_field *b2 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "b");
+ gcc_jit_field *b3 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "c");
+ gcc_jit_field *b4 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "d");
+ gcc_jit_field *b5 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "d");
+ gcc_jit_field *fields_b[] = {b1, b2, b3, b4, b5};
+
+ gcc_jit_type *struct_bar_type =
+ gcc_jit_struct_as_type (
+ gcc_jit_context_new_struct_type (ctxt,
+ 0,
+ "bar",
+ 5,
+ fields_b));
+
+
+ gcc_jit_field *b44 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "c");
+
+ gcc_jit_field *fields_ctor[] = {b1, b2, b44, b5};
+ gcc_jit_rvalue *values[] = {0,0,0,0};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_bar_type,
+ 4,
+ fields_ctor,
+ values);
+
+ CHECK_VALUE (ctor, NULL);
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ "gcc_jit_context_new_struct_constructor: field object "
+ "at index 2 (c), was not used when creating the "
+ "struct bar");
+ CHECK_STRING_VALUE (gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_context_new_struct_constructor: field object "
+ "at index 2 (c), was not used when creating the "
+ "struct bar");
+}
diff --git a/gcc/testsuite/jit.dg/test-error-ctor-struct-wrong-type.c b/gcc/testsuite/jit.dg/test-error-ctor-struct-wrong-type.c
new file mode 100644
index 0000000..364610b
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-ctor-struct-wrong-type.c
@@ -0,0 +1,76 @@
+/*
+
+ Test that the proper error is triggered when we build a ctor
+ for an struct type, but has the type wrong on a field.
+
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_INT);
+ gcc_jit_type *float_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_FLOAT);
+
+ gcc_jit_field *b1 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "a");
+ gcc_jit_field *b2 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "b");
+ gcc_jit_field *b3 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "c");
+ gcc_jit_field *fields_b[] = {b1, b2, b3};
+
+ gcc_jit_type *struct_bar_type =
+ gcc_jit_struct_as_type (
+ gcc_jit_context_new_struct_type (ctxt,
+ 0,
+ "bar",
+ 3,
+ fields_b));
+ gcc_jit_rvalue *frv = gcc_jit_context_new_rvalue_from_double (ctxt,
+ float_type,
+ 12);
+
+ gcc_jit_field *fields_ctor[] = {b2};
+ gcc_jit_rvalue *values[] = {frv};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_bar_type,
+ 1,
+ fields_ctor,
+ values);
+
+ CHECK_VALUE (ctor, NULL);
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ "gcc_jit_context_new_struct_constructor: value and "
+ "field not the same unqualified type, at index 0 "
+ "(struct bar.b: int)(value type: float)");
+ CHECK_STRING_VALUE (gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_context_new_struct_constructor: value and "
+ "field not the same unqualified type, at index 0 "
+ "(struct bar.b: int)(value type: float)");
+}
diff --git a/gcc/testsuite/jit.dg/test-error-ctor-struct-wrong-type2.c b/gcc/testsuite/jit.dg/test-error-ctor-struct-wrong-type2.c
new file mode 100644
index 0000000..c2309de
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-ctor-struct-wrong-type2.c
@@ -0,0 +1,77 @@
+/*
+
+ Test that the proper error is triggered when we build a ctor
+ for an struct type, but has the type wrong on a field.
+
+ Like test-error-ctor-struct-wrong-type.c, but with implicit fields.
+
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_INT);
+ gcc_jit_type *float_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_FLOAT);
+
+ gcc_jit_field *b1 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "a");
+ gcc_jit_field *b2 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "b");
+ gcc_jit_field *b3 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "c");
+ gcc_jit_field *fields_b[] = {b1, b2, b3};
+
+ gcc_jit_type *struct_bar_type =
+ gcc_jit_struct_as_type (
+ gcc_jit_context_new_struct_type (ctxt,
+ 0,
+ "bar",
+ 3,
+ fields_b));
+ gcc_jit_rvalue *frv = gcc_jit_context_new_rvalue_from_double (ctxt,
+ float_type,
+ 12);
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_bar_type,
+ 1,
+ 0,
+ &frv);
+
+ CHECK_VALUE (ctor, NULL);
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ "gcc_jit_context_new_struct_constructor: value and "
+ "field not "
+ "the same unqualified type, "
+ "at index 0 (struct bar.a: int)(value type: float)");
+ CHECK_STRING_VALUE (gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_context_new_struct_constructor: value and "
+ "field not "
+ "the same unqualified type, "
+ "at index 0 (struct bar.a: int)(value type: float)");
+}
diff --git a/gcc/testsuite/jit.dg/test-error-ctor-union-wrong-field-name.c b/gcc/testsuite/jit.dg/test-error-ctor-union-wrong-field-name.c
new file mode 100644
index 0000000..2bf8ee4
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-ctor-union-wrong-field-name.c
@@ -0,0 +1,76 @@
+/*
+
+ Test that the proper error is triggered when we build a ctor
+ for an union type, but don't provide a correct field.
+
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_INT);
+ gcc_jit_type *float_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_FLOAT);
+ gcc_jit_type *double_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_DOUBLE);
+
+ gcc_jit_field *b1 = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "a");
+ gcc_jit_field *b2 = gcc_jit_context_new_field (ctxt,
+ 0,
+ float_type,
+ "b");
+ gcc_jit_field *b3 = gcc_jit_context_new_field (ctxt,
+ 0,
+ double_type,
+ "c");
+ gcc_jit_field *fields_b[] = {b1, b2, b3};
+
+ gcc_jit_type *union_bar_type =
+ gcc_jit_context_new_union_type (ctxt,
+ 0,
+ "bar",
+ 3,
+ fields_b);
+
+ gcc_jit_field *b33 = gcc_jit_context_new_field (ctxt,
+ 0,
+ double_type,
+ "c");
+
+ gcc_jit_rvalue *val =
+ gcc_jit_context_new_rvalue_from_double (ctxt, double_type, 1);
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_union_constructor
+ (ctxt, 0,
+ union_bar_type,
+ b33,
+ val);
+
+ CHECK_VALUE (ctor, NULL);
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ "gcc_jit_context_new_union_constructor: field object (c)"
+ " was not used when creating the type union bar");
+ CHECK_STRING_VALUE (gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_context_new_union_constructor: field object (c)"
+ " was not used when creating the type union bar");
+}
diff --git a/gcc/testsuite/jit.dg/test-error-global-already-init.c b/gcc/testsuite/jit.dg/test-error-global-already-init.c
new file mode 100644
index 0000000..ecead87
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-global-already-init.c
@@ -0,0 +1,46 @@
+/*
+
+ Test that we can't set the initializer on a global twice.
+
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
+
+ gcc_jit_lvalue *bar = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_lvalueinit_int_0");
+
+ gcc_jit_global_set_initializer_rvalue (
+ bar,
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 1));
+ gcc_jit_global_set_initializer_rvalue (
+ bar,
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 1));
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ "gcc_jit_global_set_initializer_rvalue: global variable "
+ "already initialized: global_lvalueinit_int_0");
+ CHECK_STRING_VALUE (gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_global_set_initializer_rvalue: global variable "
+ "already initialized: global_lvalueinit_int_0");
+}
diff --git a/gcc/testsuite/jit.dg/test-error-global-common-section.c b/gcc/testsuite/jit.dg/test-error-global-common-section.c
new file mode 100644
index 0000000..2f99454
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-global-common-section.c
@@ -0,0 +1,54 @@
+/*
+
+ Test that the proper error is triggered when we initialize
+ a global with a global that has no DECL_INITIAL (and is marked
+ DECL_COMMON(NODE) = 1).
+
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_INT);
+
+ /* const int foo;
+ int bar = foo;
+ */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ gcc_jit_type_get_const (int_type),
+ "global_const_int_0");
+ gcc_jit_lvalue *bar = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_lvalueinit_int_0");
+ gcc_jit_global_set_initializer_rvalue (bar,
+ gcc_jit_lvalue_as_rvalue (foo));
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ "unable to convert initial value for the global "
+ "variable global_lvalueinit_int_0 to a compile-time"
+ " constant");
+ CHECK_STRING_VALUE (gcc_jit_context_get_last_error (ctxt),
+ "unable to convert initial value for the global "
+ "variable global_lvalueinit_int_0 to a compile-time"
+ " constant");
+}
diff --git a/gcc/testsuite/jit.dg/test-error-global-init-too-small-array.c b/gcc/testsuite/jit.dg/test-error-global-init-too-small-array.c
new file mode 100644
index 0000000..2a3db7a
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-global-init-too-small-array.c
@@ -0,0 +1,65 @@
+/*
+
+ Test that the proper error is triggered when we initialize
+ a global array with a ctor with too many values.
+
+ Using gcc_jit_global_set_initializer_rvalue()
+
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{ /* float foo[1] = {1,2}; */
+
+ gcc_jit_type *float_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_FLOAT);
+ gcc_jit_type *arr_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ float_type,
+ 1);
+ gcc_jit_rvalue *rval_1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 1);
+ gcc_jit_rvalue *rval_2 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 2);
+
+ gcc_jit_rvalue *values[] = {rval_1, rval_2};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ arr_type,
+ 2,
+ values);
+ if (!ctor)
+ return;
+
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ arr_type,
+ "global_floatarr_12");
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ "gcc_jit_context_new_array_constructor: array "
+ "constructor has more values than the array type's "
+ "length (array type length: 1, constructor length: 2)");
+ CHECK_STRING_VALUE (gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_context_new_array_constructor: array "
+ "constructor has more values than the array type's "
+ "length (array type length: 1, constructor length: 2)");
+}
diff --git a/gcc/testsuite/jit.dg/test-error-global-lvalue-init.c b/gcc/testsuite/jit.dg/test-error-global-lvalue-init.c
new file mode 100644
index 0000000..65aa8a8
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-global-lvalue-init.c
@@ -0,0 +1,60 @@
+/*
+
+ Test that the proper error is triggered when we initialize
+ a global with another non-const global's rvalue.
+
+ Using gcc_jit_global_set_initializer_rvalue()
+
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_INT);
+
+ gcc_jit_lvalue *foo;
+ { /* int bar; */
+ foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_lvalueinit_int1");
+ gcc_jit_rvalue *rval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval);
+ }
+ { /* int foo = bar; */
+
+ gcc_jit_lvalue *bar = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_lvalueinit_int2");
+ gcc_jit_global_set_initializer_rvalue (bar,
+ gcc_jit_lvalue_as_rvalue (foo));
+ }
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ "unable to convert initial value for the global variable"
+ " global_lvalueinit_int2 to a compile-time constant");
+ CHECK_STRING_VALUE (gcc_jit_context_get_last_error (ctxt),
+ "unable to convert initial value for the global variable"
+ " global_lvalueinit_int2 to a compile-time constant");
+}
diff --git a/gcc/testsuite/jit.dg/test-error-global-nonconst-init.c b/gcc/testsuite/jit.dg/test-error-global-nonconst-init.c
new file mode 100644
index 0000000..9dffe06
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-global-nonconst-init.c
@@ -0,0 +1,80 @@
+/*
+
+ Test that the proper error is triggered when we initialize
+ a global with a function call.
+
+ Using gcc_jit_global_set_initializer_rvalue()
+
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_INT);
+
+ gcc_jit_function *fn_int_3;
+ { /* int foo () { int local = 3; return local;} */
+ fn_int_3 =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ int_type,
+ "fn_int_3",
+ 0,
+ 0,
+ 0);
+ gcc_jit_block *block = gcc_jit_function_new_block (fn_int_3, "start");
+ gcc_jit_lvalue *local = gcc_jit_function_new_local (fn_int_3,
+ 0,
+ int_type,
+ "local");
+ gcc_jit_rvalue *rval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+
+ gcc_jit_block_add_assignment (block, 0, local, rval);
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ gcc_jit_lvalue_as_rvalue(local));
+
+ }
+
+ { /* int bar = foo(); */
+ gcc_jit_rvalue *rval =
+ gcc_jit_context_new_call (ctxt,
+ 0,
+ fn_int_3,
+ 0,0);
+
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_nonconst_int");
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval);
+ }
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Ensure that the bad API usage prevents the API giving a bogus
+ result back. */
+ CHECK_VALUE (result, NULL);
+
+ /* Verify that the correct error message was emitted. */
+ CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt),
+ "unable to convert initial value for the global variable"
+ " global_nonconst_int to a compile-time constant");
+ CHECK_STRING_VALUE (gcc_jit_context_get_last_error (ctxt),
+ "unable to convert initial value for the global variable"
+ " global_nonconst_int to a compile-time constant");
+}
diff --git a/gcc/testsuite/jit.dg/test-fuzzer.c b/gcc/testsuite/jit.dg/test-fuzzer.c
index 4fd49dac..6fa95d9 100644
--- a/gcc/testsuite/jit.dg/test-fuzzer.c
+++ b/gcc/testsuite/jit.dg/test-fuzzer.c
@@ -193,12 +193,18 @@ get_random_type (fuzzer *f)
static gcc_jit_type *
make_random_type (fuzzer *f)
{
- switch (fuzzer_randrange (f, 0, 5))
+ switch (fuzzer_randrange (f, 0, 8))
{
case 0:
return gcc_jit_type_get_pointer (get_random_type (f));
case 1:
return gcc_jit_type_get_const (get_random_type (f));
+ case 2:
+ return gcc_jit_type_get_vector (get_random_type (f), 4);
+ case 3:
+ return gcc_jit_type_get_volatile (get_random_type (f));
+ case 4:
+ return gcc_jit_type_get_aligned (get_random_type (f), 4);
default:
{
/* Create a struct. */
diff --git a/gcc/testsuite/jit.dg/test-global-init-rvalue.c b/gcc/testsuite/jit.dg/test-global-init-rvalue.c
new file mode 100644
index 0000000..4866462
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-global-init-rvalue.c
@@ -0,0 +1,1643 @@
+/* This testcase checks that gcc_jit_global_set_initializer_rvalue() works
+ with rvalues, especially with gcc_jit_context_new_*_constructor() for
+ struct, unions and arrays. */
+
+#include <stdio.h>
+#include <string.h>
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_INT);
+ gcc_jit_type *short_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_SHORT);
+ gcc_jit_type *pint_type = gcc_jit_type_get_pointer (int_type);
+ gcc_jit_type *double_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_DOUBLE);
+ gcc_jit_type *float_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_FLOAT);
+ gcc_jit_type *bool_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_BOOL);
+ gcc_jit_type *char_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_CHAR);
+ gcc_jit_type *cpchar_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_CONST_CHAR_PTR);
+ gcc_jit_type *size_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_SIZE_T);
+
+ /* Make a struct: struct fi { float f; int i;} */
+ gcc_jit_field *fi_f = gcc_jit_context_new_field (ctxt,
+ 0,
+ float_type,
+ "f");
+ gcc_jit_field *fi_i = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "i");
+ gcc_jit_field *fields[] = {fi_f, fi_i};
+
+ gcc_jit_type *struct_fi_type =
+ gcc_jit_struct_as_type (
+ gcc_jit_context_new_struct_type (ctxt,
+ 0,
+ "fi",
+ 2,
+ fields));
+
+ /* Make a struct:
+
+ struct bar {
+ int ii;
+ struct fi fi;
+ float ff;
+ }
+ */
+ gcc_jit_field *bar_ff = gcc_jit_context_new_field (ctxt,
+ 0,
+ float_type,
+ "ff");
+ gcc_jit_field *bar_ii = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "ii");
+ gcc_jit_field *bar_fi = gcc_jit_context_new_field (ctxt,
+ 0,
+ struct_fi_type,
+ "fi");
+ gcc_jit_field *fields2[] = {bar_ff, bar_fi, bar_ii};
+
+ gcc_jit_type *struct_bar_type =
+ gcc_jit_struct_as_type (
+ gcc_jit_context_new_struct_type (ctxt,
+ 0,
+ "bar",
+ 3,
+ fields2));
+
+ /* Make an union:
+
+ union ubar {
+ float ff;
+ int ii;
+ };
+ */
+ gcc_jit_field *ubar_ff = gcc_jit_context_new_field (ctxt,
+ 0,
+ float_type,
+ "ff");
+ gcc_jit_field *ubar_ii = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "ii");
+ gcc_jit_field *fields3[] = {ubar_ff, ubar_ii};
+
+ gcc_jit_type *ubar = gcc_jit_context_new_union_type (ctxt,
+ 0,
+ "ubar",
+ 2,
+ fields3);
+
+ { /* struct bar bar = {.ff=1, .fi={.f=2, .i=3}, .ii=4};
+ I.e. nested ctors and with fields specified
+ */
+ gcc_jit_lvalue *bar = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ struct_bar_type,
+ "global_struct_bar_1234_1");
+
+ gcc_jit_rvalue *fval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 2);
+ gcc_jit_rvalue *ival = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+
+ gcc_jit_rvalue *vals[] = { fval, ival};
+ gcc_jit_field *fields[] = {fi_f, fi_i};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 2,
+ fields,
+ vals);
+
+ ival = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 4);
+ fval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 1);
+
+ gcc_jit_rvalue *vals2[] = {fval, ctor, ival};
+ gcc_jit_field *fields2[] = {bar_ff, bar_fi, bar_ii};
+
+ gcc_jit_rvalue *ctor_bar = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_bar_type,
+ 3,
+ fields2,
+ vals2);
+
+ gcc_jit_global_set_initializer_rvalue (bar, ctor_bar);
+ }
+ { /* struct bar bar = {1, {2, 3}, 4};
+ I.e. nested ctors and fields implicit in definition order (fields=NULL)
+ */
+ gcc_jit_lvalue *bar = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ struct_bar_type,
+ "global_struct_bar_1234_2");
+
+ gcc_jit_rvalue *fval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 2);
+ gcc_jit_rvalue *ival = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+
+ gcc_jit_rvalue *vals[] = { fval, ival};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 2,
+ 0,
+ vals);
+
+ ival = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 4);
+ fval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 1);
+
+ gcc_jit_rvalue *vals2[] = {fval, ctor, ival};
+
+ gcc_jit_rvalue *ctor_bar = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_bar_type,
+ 3,
+ 0,
+ vals2);
+
+ gcc_jit_global_set_initializer_rvalue (bar, ctor_bar);
+ }
+ { /* struct fi foo = {.f=2, .i=3}; */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ struct_fi_type,
+ "global_struct_fi_23_1");
+
+ gcc_jit_rvalue *fval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 2);
+ gcc_jit_rvalue *ival = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+
+ gcc_jit_rvalue *vals[] = { fval, ival};
+ gcc_jit_field *fields[] = {fi_f, fi_i};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 2,
+ fields,
+ vals);
+
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* struct fi foo = {2, 3}; */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ struct_fi_type,
+ "global_struct_fi_23_2");
+
+ gcc_jit_rvalue *fval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 2);
+ gcc_jit_rvalue *ival = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+
+ gcc_jit_rvalue *vals[] = { fval, ival};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 2,
+ 0,
+ vals);
+
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* struct fi foo = {.i=0, .f=0}; (null init) */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ struct_fi_type,
+ "global_struct_fi_00_1");
+
+ gcc_jit_rvalue *vals[] = { 0, 0};
+ gcc_jit_field *fields[] = {fi_f, fi_i};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 2,
+ fields,
+ vals);
+
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* struct fi foo = {0, 0}; (null fields, null elements in values) */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ struct_fi_type,
+ "global_struct_fi_00_2");
+
+ gcc_jit_rvalue *vals[] = { 0, 0};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 2,
+ 0,
+ vals);
+
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* struct fi foo = {.i = 0} (null init);
+
+ Null init values. */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ struct_fi_type,
+ "global_struct_fi_0_1");
+
+ gcc_jit_rvalue *vals[] = {0};
+ gcc_jit_field *fields[] = {fi_i};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 1,
+ fields,
+ vals);
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* struct fi foo = {0};
+
+ Null init values. */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ struct_fi_type,
+ "global_struct_fi_0_2");
+
+ gcc_jit_rvalue *vals[] = {0};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 1,
+ 0,
+ vals);
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* struct fi foo = {}; (null init)
+
+ Null fields and values. */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ struct_fi_type,
+ "global_struct_fi_6");
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 0,
+ 0,
+ 0);
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* struct fi foo = {2 * 2, 3}; */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ struct_fi_type,
+ "global_struct_fi_3");
+
+ gcc_jit_rvalue *fval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 2);
+ gcc_jit_rvalue *fval2 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 2);
+ gcc_jit_rvalue *ival = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_rvalue *rval_mul = gcc_jit_context_new_binary_op (ctxt, 0,
+ GCC_JIT_BINARY_OP_MULT,
+ float_type,
+ fval,
+ fval2);
+
+ gcc_jit_rvalue *vals[] = { rval_mul, ival};
+ gcc_jit_field *fields[] = {fi_f, fi_i};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 2,
+ fields,
+ vals);
+
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* union ubar foo = {.ff = 3}; */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ ubar,
+ "global_union_ufoo_ff3");
+
+ gcc_jit_rvalue *fval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 3);
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_union_constructor (
+ ctxt,
+ 0,
+ ubar,
+ ubar_ff,
+ fval);
+
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* union ubar foo = {.ii = 2}; */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ ubar,
+ "global_union_ufoo_ii2");
+
+ gcc_jit_rvalue *ival = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 2);
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_union_constructor (
+ ctxt,
+ 0,
+ ubar,
+ ubar_ii,
+ ival);
+
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* union ubar foo = {1.1f}; should init first field */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ ubar,
+ "global_union_ufoo_ff1c1");
+
+ gcc_jit_rvalue *fval = gcc_jit_context_new_rvalue_from_double (
+ ctxt, float_type, 1.1);
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_union_constructor (
+ ctxt,
+ 0,
+ ubar,
+ 0,
+ fval);
+
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* union ubar foo = (union ubar){}; */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ ubar,
+ "global_union_ufoo_0");
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_union_constructor (
+ ctxt,
+ 0,
+ ubar,
+ 0,
+ 0);
+
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* int foo = 3; */
+ gcc_jit_rvalue *rval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_int1_3");
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval);
+ }
+ { /* const volatile int foo = 3; */
+ gcc_jit_rvalue *rval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ gcc_jit_type_get_const (gcc_jit_type_get_volatile (int_type)),
+ "global_cvint1_3");
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval);
+ }
+ { /* Try the above, but with opposite order of global and literal calls */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_int2_3");
+ gcc_jit_rvalue *rval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval);
+ }
+ { /* int foo = 3 * (3 + 3) */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_int3_18");
+ gcc_jit_rvalue *rval3_0 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_rvalue *rval3_1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_rvalue *rval3_2 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_rvalue *rval_plus = gcc_jit_context_new_binary_op (ctxt, 0,
+ GCC_JIT_BINARY_OP_PLUS,
+ int_type,
+ rval3_0,
+ rval3_1);
+ gcc_jit_rvalue *rval_mul = gcc_jit_context_new_binary_op (ctxt, 0,
+ GCC_JIT_BINARY_OP_MULT,
+ int_type,
+ rval_plus,
+ rval3_2);
+
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval_mul);
+ }
+ { /* int foo = ~(-(((((2 | 8) & 15) ^ 0) << 3 >> 2 - 1) / 2)); */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_int_alotofoperators");
+ gcc_jit_rvalue *rval_0 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 2);
+ gcc_jit_rvalue *rval_1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 8);
+ gcc_jit_rvalue *rval_2 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 15);
+ gcc_jit_rvalue *rval_3 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 0);
+ gcc_jit_rvalue *rval_4 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_rvalue *rval_5 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 2);
+ gcc_jit_rvalue *rval_6 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 1);
+ gcc_jit_rvalue *rval_7 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 2);
+
+ gcc_jit_rvalue *rval_or = gcc_jit_context_new_binary_op (ctxt, 0,
+ GCC_JIT_BINARY_OP_BITWISE_OR,
+ int_type,
+ rval_0,
+ rval_1);
+ gcc_jit_rvalue *rval_and = gcc_jit_context_new_binary_op (ctxt, 0,
+ GCC_JIT_BINARY_OP_BITWISE_AND,
+ int_type,
+ rval_or,
+ rval_2);
+ gcc_jit_rvalue *rval_xor = gcc_jit_context_new_binary_op (ctxt, 0,
+ GCC_JIT_BINARY_OP_BITWISE_XOR,
+ int_type,
+ rval_and,
+ rval_3);
+ gcc_jit_rvalue *rval_lsh = gcc_jit_context_new_binary_op (ctxt, 0,
+ GCC_JIT_BINARY_OP_LSHIFT,
+ int_type,
+ rval_xor,
+ rval_4);
+ gcc_jit_rvalue *rval_rsh = gcc_jit_context_new_binary_op (ctxt, 0,
+ GCC_JIT_BINARY_OP_RSHIFT,
+ int_type,
+ rval_lsh,
+ rval_5);
+ gcc_jit_rvalue *rval_min = gcc_jit_context_new_binary_op (ctxt, 0,
+ GCC_JIT_BINARY_OP_MINUS,
+ int_type,
+ rval_rsh,
+ rval_6);
+ gcc_jit_rvalue *rval_div = gcc_jit_context_new_binary_op (ctxt, 0,
+ GCC_JIT_BINARY_OP_DIVIDE,
+ int_type,
+ rval_min,
+ rval_7);
+ gcc_jit_rvalue *rval_umin = gcc_jit_context_new_unary_op (ctxt, 0,
+ GCC_JIT_UNARY_OP_MINUS,
+ int_type,
+ rval_div);
+ gcc_jit_rvalue *rval_neg = gcc_jit_context_new_unary_op (ctxt, 0,
+ GCC_JIT_UNARY_OP_BITWISE_NEGATE,
+ int_type,
+ rval_umin);
+
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval_neg);
+ }
+ { /* int foo = 3; int *pfoo = &foo; */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_int4_3");
+ gcc_jit_rvalue *rval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval);
+
+ gcc_jit_lvalue *pfoo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ pint_type,
+ "global_pint5");
+ gcc_jit_global_set_initializer_rvalue (pfoo,
+ gcc_jit_lvalue_get_address (foo, 0));
+ }
+ { /* static int foo; int *pfoo = &foo; */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_INTERNAL,
+ int_type,
+ "global_int5_3");
+
+ gcc_jit_lvalue *pfoo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ pint_type,
+ "global_pint6");
+ gcc_jit_global_set_initializer_rvalue (pfoo,
+ gcc_jit_lvalue_get_address (foo, 0));
+
+ gcc_jit_function *fn =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ gcc_jit_type_get_pointer(int_type),
+ "fn_pint_0",
+ 0,
+ 0,
+ 0);
+
+ gcc_jit_block *block = gcc_jit_function_new_block (fn, "start");
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ gcc_jit_lvalue_get_address (foo, 0));
+ }
+ { /* int foo = 3; int *pfoo = &foo + 1; */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_int6_3");
+ gcc_jit_rvalue *rval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval);
+
+ gcc_jit_lvalue *pfoo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ pint_type,
+ "global_pint7");
+ gcc_jit_global_set_initializer_rvalue (pfoo,
+ gcc_jit_lvalue_get_address (
+ gcc_jit_context_new_array_access(
+ ctxt,
+ 0,
+ gcc_jit_lvalue_get_address(foo, 0),
+ gcc_jit_context_one(ctxt, int_type)),
+ 0));
+ }
+ { /* double foo = 3; */
+ gcc_jit_lvalue *double1 = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ double_type,
+ "global_double1_3");
+ gcc_jit_rvalue *rval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, double_type, 3);
+ gcc_jit_global_set_initializer_rvalue (double1,
+ rval);
+ }
+ { /* double foo = 3 * 3 + 3 */
+ gcc_jit_lvalue *double1 = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ double_type,
+ "global_double2_12");
+ gcc_jit_rvalue *rval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, double_type, 3);
+ gcc_jit_rvalue *rval_mul = gcc_jit_context_new_binary_op (ctxt, 0,
+ GCC_JIT_BINARY_OP_MULT,
+ double_type,
+ rval,
+ rval);
+ gcc_jit_rvalue *rval_plus = gcc_jit_context_new_binary_op (ctxt, 0,
+ GCC_JIT_BINARY_OP_PLUS,
+ double_type,
+ rval_mul,
+ rval);
+ gcc_jit_global_set_initializer_rvalue (double1,
+ rval_plus);
+ }
+ { /* bool foo = 3 + 3 <= 6; */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ bool_type,
+ "global_bool1_1");
+ gcc_jit_rvalue *rval3_0 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_rvalue *rval3_1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_rvalue *rval6 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 6);
+ gcc_jit_rvalue *rval_plus = gcc_jit_context_new_binary_op (ctxt,
+ 0,
+ GCC_JIT_BINARY_OP_PLUS,
+ int_type,
+ rval3_0,
+ rval3_1);
+ gcc_jit_rvalue *rval_le = gcc_jit_context_new_comparison (ctxt,
+ 0,
+ GCC_JIT_COMPARISON_LE,
+ rval_plus,
+ rval6);
+
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval_le);
+ }
+ gcc_jit_lvalue *global_intarr_1234;
+ { /* int foo[] = {1,2,3,4}; */
+
+ gcc_jit_type *arr_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ int_type,
+ 4);
+ gcc_jit_rvalue *rval_1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 1);
+ gcc_jit_rvalue *rval_2 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 2);
+ gcc_jit_rvalue *rval_3 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_rvalue *rval_4 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 4);
+
+ gcc_jit_rvalue *values[] = {rval_1, rval_2, rval_3, rval_4};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ arr_type,
+ 4,
+ values);
+ global_intarr_1234 = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ arr_type,
+ "global_intarr_1234");
+ gcc_jit_global_set_initializer_rvalue (global_intarr_1234, ctor);
+ }
+ { /* float foo[4] = {1,2}; */
+
+ gcc_jit_type *arr_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ float_type,
+ 4);
+ gcc_jit_rvalue *rval_1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 1);
+ gcc_jit_rvalue *rval_2 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 2);
+
+ gcc_jit_rvalue *values[] = {rval_1, rval_2};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ arr_type,
+ 2,
+ values);
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ arr_type,
+ "global_floatarr_12");
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* float foo[4] = {1,2};
+ With different array objects of same size and type. */
+
+ gcc_jit_type *arr_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ float_type,
+ 4);
+ gcc_jit_type *arr_type1 = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ float_type,
+ 4);
+ gcc_jit_rvalue *rval_1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 1);
+ gcc_jit_rvalue *rval_2 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 2);
+
+ gcc_jit_rvalue *values[] = {rval_1, rval_2};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ arr_type1,
+ 2,
+ values);
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ arr_type,
+ "global_floatarr_12_2");
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* float foo[4] = {1,2,0}; (null init) */
+
+ gcc_jit_type *arr_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ float_type,
+ 4);
+ gcc_jit_rvalue *rval_1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 1);
+ gcc_jit_rvalue *rval_2 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 2);
+
+ gcc_jit_rvalue *values[] = {rval_1, rval_2, 0};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ arr_type,
+ 2,
+ values);
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ arr_type,
+ "global_floatarr_120");
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* float foo[4] = {}; (null init) */
+
+ gcc_jit_type *arr_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ float_type,
+ 4);
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ arr_type,
+ 0,
+ 0);
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ arr_type,
+ "global_floatarr_0000");
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* float foo[4] = {NULL , NULL, 3, NULL, 5, 6}; (null init) */
+
+ gcc_jit_type *arr_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ float_type,
+ 8);
+ gcc_jit_rvalue *rval3 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 3);
+ gcc_jit_rvalue *rval5 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 5);
+ gcc_jit_rvalue *rval6 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 6);
+
+ gcc_jit_rvalue *values[] = {0, 0, rval3, 0, rval5, rval6, 0 };
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ arr_type,
+ 7,
+ values);
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ arr_type,
+ "global_floatarr_00305600");
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* int *foo[4] = {0, &global_intarr_1234[1], 0}; */
+
+ gcc_jit_type *arr_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ pint_type,
+ 4);
+ gcc_jit_rvalue *rval_1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 1);
+ gcc_jit_lvalue *arr_access = gcc_jit_context_new_array_access (
+ ctxt,
+ 0,
+ gcc_jit_lvalue_as_rvalue (global_intarr_1234),
+ rval_1);
+ gcc_jit_rvalue *rval_2 = gcc_jit_lvalue_get_address (arr_access, 0);
+ gcc_jit_rvalue *rval_3 = gcc_jit_context_null (ctxt, pint_type);
+
+ gcc_jit_rvalue *values[] = {0, rval_2, rval_3};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ arr_type,
+ 2,
+ values);
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ arr_type,
+ "global_pintarr_x2xx");
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* char foo[4] = {'q','w','e',0}; */
+
+ gcc_jit_type *arr_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ char_type,
+ 4);
+
+
+ gcc_jit_rvalue *rvals[] = {
+ gcc_jit_context_new_rvalue_from_int ( ctxt, char_type, 'q'),
+ gcc_jit_context_new_rvalue_from_int ( ctxt, char_type, 'w'),
+ gcc_jit_context_new_rvalue_from_int ( ctxt, char_type, 'e'),
+ gcc_jit_context_new_rvalue_from_int ( ctxt, char_type, 0)
+ };
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ arr_type,
+ 4,
+ rvals);
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ arr_type,
+ "global_chararr_qwe");
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* int foo[2][2] = {{1,2},{3,4}}; */
+
+ gcc_jit_type *row_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ int_type,
+ 2);
+
+ gcc_jit_type *arr_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ row_type,
+ 2);
+ gcc_jit_rvalue *rvals_row0[] = {
+ gcc_jit_context_new_rvalue_from_int ( ctxt, int_type, 1),
+ gcc_jit_context_new_rvalue_from_int ( ctxt, int_type, 2)
+ };
+ gcc_jit_rvalue *rvals_row1[] = {
+ gcc_jit_context_new_rvalue_from_int ( ctxt, int_type, 3),
+ gcc_jit_context_new_rvalue_from_int ( ctxt, int_type, 4)
+ };
+
+ gcc_jit_rvalue *ctor_row0 =
+ gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ row_type,
+ 2,
+ rvals_row0);
+ gcc_jit_rvalue *ctor_row1 =
+ gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ row_type,
+ 2,
+ rvals_row1);
+ gcc_jit_rvalue *ctors_row[] = {ctor_row0, ctor_row1};
+
+ gcc_jit_rvalue *ctor_arr =
+ gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ arr_type,
+ 2,
+ ctors_row);
+
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ arr_type,
+ "global_int2x2matrix_1234");
+
+ gcc_jit_global_set_initializer_rvalue (foo, ctor_arr);
+ }
+ { /* const char *foo[4] = {"qwe", "asd"}; */
+
+ gcc_jit_type *arr_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ cpchar_type,
+ 4);
+
+
+ gcc_jit_rvalue *rvals[] = {
+ gcc_jit_context_new_string_literal (ctxt, "qwe"),
+ gcc_jit_context_new_string_literal (ctxt, "asd")
+ };
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ arr_type,
+ 2,
+ rvals);
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ arr_type,
+ "global_cpchararr_qwe_asd");
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ { /* const int foo = 3;
+ int bar = foo;
+ */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ gcc_jit_type_get_const (int_type),
+ "global_const_int_3");
+ gcc_jit_rvalue *rval3 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval3);
+ gcc_jit_lvalue *bar = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_lvalueinit_int_3");
+ gcc_jit_global_set_initializer_rvalue (bar,
+ gcc_jit_lvalue_as_rvalue (foo));
+ }
+ { /* int foo = 3 * 2;
+ int arr[] = {1,2,3,4};
+ int *bar = &arr[2] + 1
+
+ Example in the docs.
+ */
+
+ gcc_jit_type *arr_type = gcc_jit_context_new_array_type (ctxt,
+ 0,
+ int_type,
+ 4);
+ gcc_jit_rvalue *rval_1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 1);
+ gcc_jit_rvalue *rval_2 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 2);
+ gcc_jit_rvalue *rval_3 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_rvalue *rval_4 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 4);
+
+ gcc_jit_rvalue *values[] = {rval_1, rval_2, rval_3, rval_4};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (ctxt,
+ 0,
+ arr_type,
+ 4,
+ values);
+ gcc_jit_lvalue *global_intarr_1234 =
+ gcc_jit_context_new_global (ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ arr_type,
+ "global_intarr_1234_2");
+
+ gcc_jit_global_set_initializer_rvalue (global_intarr_1234, ctor);
+
+ gcc_jit_lvalue *bar =
+ gcc_jit_context_new_global (ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_int_6");
+ gcc_jit_global_set_initializer_rvalue
+ (bar,
+ gcc_jit_context_new_binary_op
+ (ctxt, 0, GCC_JIT_BINARY_OP_MULT,
+ int_type,
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 3),
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 2)));
+
+ gcc_jit_lvalue *pfoo =
+ gcc_jit_context_new_global (ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ gcc_jit_type_get_pointer (int_type),
+ "global_pint_4");
+ /* int *bar = &arr[2] + 1;
+
+ In practice we could just do &foo[3]
+ but just prove folding this works. */
+ gcc_jit_global_set_initializer_rvalue (
+ pfoo,
+ gcc_jit_lvalue_get_address (
+ gcc_jit_context_new_array_access (
+ ctxt, 0,
+ gcc_jit_lvalue_get_address (
+ gcc_jit_context_new_array_access (
+ ctxt, 0,
+ gcc_jit_lvalue_as_rvalue (global_intarr_1234),
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 2)),
+ 0),
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 1)),
+ 0));
+ }
+ { /* static int bar = 11;
+ int foo () { return bar; } */
+
+ gcc_jit_lvalue *bar = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_INTERNAL,
+ int_type,
+ "global_static_int_11");
+ gcc_jit_rvalue *rval1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 11);
+ gcc_jit_global_set_initializer_rvalue (bar,
+ rval1);
+
+ gcc_jit_function *fn11 =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ int_type,
+ "fn_int_11",
+ 0,
+ 0,
+ 0);
+ gcc_jit_block *block = gcc_jit_function_new_block (fn11, "start");
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ gcc_jit_lvalue_as_rvalue(bar));
+ }
+ { /* static const int cbar = 11;
+ int cfoo () { return cbar; } */
+
+ gcc_jit_lvalue *bar = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_INTERNAL,
+ gcc_jit_type_get_const (int_type),
+ "global_static_cint_11");
+ gcc_jit_rvalue *rval1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 11);
+ gcc_jit_global_set_initializer_rvalue (bar,
+ rval1);
+
+ gcc_jit_function *fn11 =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ int_type,
+ "fn_cint_11",
+ 0,
+ 0,
+ 0);
+ gcc_jit_block *block = gcc_jit_function_new_block (fn11, "start");
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ gcc_jit_lvalue_as_rvalue(bar));
+ }
+ { /* static const int cbar = 12;
+ const int* cfoo () { return &cbar; } */
+
+ gcc_jit_lvalue *bar = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_INTERNAL,
+ gcc_jit_type_get_const (int_type),
+ "global_static_cint_12");
+ gcc_jit_rvalue *rval1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 12);
+ gcc_jit_global_set_initializer_rvalue (bar,
+ rval1);
+
+ gcc_jit_function *fn11 =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ gcc_jit_type_get_pointer(int_type),
+ "fn_cint_12",
+ 0,
+ 0,
+ 0);
+
+ gcc_jit_block *block = gcc_jit_function_new_block (fn11, "start");
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ gcc_jit_lvalue_get_address (bar, 0));
+ }
+ { /* const int foo = 3;
+ short bar = (short)foo;
+
+ Assure casts fold
+ */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ gcc_jit_type_get_const (int_type),
+ "global_const_int_4");
+ gcc_jit_rvalue *rval3 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval3);
+ gcc_jit_lvalue *bar = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ short_type,
+ "global_lvalueinit_short_3");
+ gcc_jit_global_set_initializer_rvalue (
+ bar,
+ gcc_jit_context_new_cast( ctxt, 0,
+ gcc_jit_lvalue_as_rvalue (foo),
+ short_type));
+ }
+ { /* const int foo = 3;
+ const int const *bar = &foo; */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ gcc_jit_type_get_const (int_type),
+ "global_const_int_6");
+ gcc_jit_rvalue *rval3 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval3);
+ gcc_jit_lvalue *bar = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ gcc_jit_type_get_const (
+ gcc_jit_type_get_pointer (
+ gcc_jit_type_get_const (
+ int_type))),
+ "global_lvalueinit_cpcint_3");
+ gcc_jit_global_set_initializer_rvalue (
+ bar,
+ gcc_jit_lvalue_get_address (foo, 0));
+ }
+ { /* const int __attribute__ ((aligned (64))) foo = 3;
+ int bar = foo;
+
+ Assure alignement does not make the constant "miss"
+ or something strange.
+ */
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ gcc_jit_type_get_const (gcc_jit_type_get_aligned (int_type, 64)),
+ "global_const_int_7");
+ gcc_jit_rvalue *rval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 4);
+ gcc_jit_global_set_initializer_rvalue (foo,
+ rval);
+ gcc_jit_lvalue *bar = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ int_type,
+ "global_lvalueinit_int_4");
+ gcc_jit_global_set_initializer_rvalue (bar,
+ gcc_jit_lvalue_as_rvalue (foo));
+ }
+ {
+ /* union upintsize { size_t s; int *p } u = {.s = 0xEEEFBEEF}; */
+ gcc_jit_field *f1 = gcc_jit_context_new_field (ctxt,
+ 0,
+ size_type,
+ "s");
+ gcc_jit_field *f2 = gcc_jit_context_new_field (ctxt,
+ 0,
+ pint_type,
+ "p");
+ gcc_jit_field *fields1[] = {f1, f2};
+
+ gcc_jit_type *ubar = gcc_jit_context_new_union_type (ctxt,
+ 0,
+ "upintsize",
+ 2,
+ fields1);
+ gcc_jit_lvalue *foo = gcc_jit_context_new_global (
+ ctxt, NULL,
+ GCC_JIT_GLOBAL_EXPORTED,
+ gcc_jit_type_get_const (ubar),
+ "global_const_upintsize_1");
+
+ gcc_jit_rvalue *val = gcc_jit_context_new_rvalue_from_long (
+ ctxt, size_type, 0xEEEFBEEF);
+
+ gcc_jit_rvalue *ctor =
+ gcc_jit_context_new_union_constructor (ctxt,
+ 0,
+ ubar,
+ f1,
+ val);
+
+ gcc_jit_global_set_initializer_rvalue (foo, ctor);
+ }
+ {/*
+ struct B;
+ struct A { B* b; };
+ struct B { A* a; };
+ extern struct B b;
+ struct A a = {.b = b};
+ struct B b = {.a = a};
+
+ See that opaque structs and circular pointers works.
+ */
+
+ gcc_jit_struct *struct_B =
+ gcc_jit_context_new_opaque_struct(ctxt,
+ 0, "B");
+
+ gcc_jit_field *fields_A[] =
+ {
+ gcc_jit_context_new_field (ctxt, 0,
+ gcc_jit_type_get_pointer (
+ gcc_jit_struct_as_type (struct_B)),
+ "b")
+ };
+
+ gcc_jit_struct *struct_A =
+ gcc_jit_context_new_struct_type(ctxt, 0, "A", 1, fields_A);
+
+ gcc_jit_field *fields_B[] =
+ {
+ gcc_jit_context_new_field (ctxt, 0,
+ gcc_jit_type_get_pointer (
+ gcc_jit_struct_as_type (struct_A)),
+ "a")
+ };
+
+ gcc_jit_struct_set_fields (struct_B, 0, 1, fields_B);
+
+ gcc_jit_lvalue *a =
+ gcc_jit_context_new_global (ctxt, 0, GCC_JIT_GLOBAL_EXPORTED,
+ gcc_jit_struct_as_type (struct_A),
+ "a_glb");
+ gcc_jit_lvalue *b =
+ gcc_jit_context_new_global (ctxt, 0, GCC_JIT_GLOBAL_EXPORTED,
+ gcc_jit_struct_as_type (struct_B),
+ "b_glb");
+ gcc_jit_rvalue *b_addr = gcc_jit_lvalue_get_address( b, 0);
+ gcc_jit_rvalue *a_ctor =
+ gcc_jit_context_new_struct_constructor (ctxt, 0,
+ gcc_jit_struct_as_type (struct_A),
+ 1, 0,
+ &b_addr);
+ gcc_jit_rvalue *a_addr = gcc_jit_lvalue_get_address( a, 0);
+ gcc_jit_rvalue *b_ctor =
+ gcc_jit_context_new_struct_constructor (ctxt, 0,
+ gcc_jit_struct_as_type (struct_B),
+ 1, 0,
+ &a_addr);
+
+ gcc_jit_global_set_initializer_rvalue(a, a_ctor);
+ gcc_jit_global_set_initializer_rvalue(b, b_ctor);
+ }
+}
+
+struct fi {
+ float f;
+ int i;
+};
+
+struct bar1 {
+ float ff;
+ struct fi fi;
+ int ii;
+};
+
+union ubar1 {
+ float ff;
+ int ii;
+};
+
+union upintsize {
+ size_t s;
+ int *p;
+};
+
+struct B_glb;
+struct A_glb {
+ struct B_glb *b;
+};
+struct B_glb {
+ struct A_glb *a;
+};
+
+int test_aligned64_works_in_linker_1 __attribute__ ((aligned (64))) = 0;
+int test_aligned64_works_in_linker_2 __attribute__ ((aligned (64))) = 0;
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ CHECK_NON_NULL (result);
+
+ {
+ struct bar1 *bar =
+ gcc_jit_result_get_global (result, "global_struct_bar_1234_1");
+
+ CHECK_VALUE (bar->ff, 1);
+ CHECK_VALUE (bar->fi.f, 2);
+ CHECK_VALUE (bar->fi.i, 3);
+ CHECK_VALUE (bar->ii, 4);
+ }
+ {
+ struct bar1 *bar =
+ gcc_jit_result_get_global (result, "global_struct_bar_1234_2");
+
+ CHECK_VALUE (bar->ff, 1);
+ CHECK_VALUE (bar->fi.f, 2);
+ CHECK_VALUE (bar->fi.i, 3);
+ CHECK_VALUE (bar->ii, 4);
+ }
+ {
+ struct fi *fi = gcc_jit_result_get_global (result, "global_struct_fi_23_1");
+
+ CHECK_VALUE (fi->f, 2);
+ CHECK_VALUE (fi->i, 3);
+ }
+ {
+ struct fi *fi = gcc_jit_result_get_global (result, "global_struct_fi_23_2");
+
+ CHECK_VALUE (fi->f, 2);
+ CHECK_VALUE (fi->i, 3);
+ }
+ {
+ struct fi *fi = gcc_jit_result_get_global (result, "global_struct_fi_00_1");
+
+ CHECK_VALUE (fi->f, 0);
+ CHECK_VALUE (fi->i, 0);
+ }
+ {
+ struct fi *fi = gcc_jit_result_get_global (result, "global_struct_fi_00_2");
+
+ CHECK_VALUE (fi->f, 0);
+ CHECK_VALUE (fi->i, 0);
+ }
+ {
+ struct fi *fi = gcc_jit_result_get_global (result, "global_struct_fi_0_1");
+
+ CHECK_VALUE (fi->f, 0);
+ CHECK_VALUE (fi->i, 0);
+ }
+ {
+ struct fi *fi = gcc_jit_result_get_global (result, "global_struct_fi_0_2");
+
+ CHECK_VALUE (fi->f, 0);
+ CHECK_VALUE (fi->i, 0);
+ }
+ {
+ struct fi *fi = gcc_jit_result_get_global (result, "global_struct_fi_6");
+
+ CHECK_VALUE (fi->f, 0);
+ CHECK_VALUE (fi->i, 0);
+ }
+ {
+ struct fi *fi = gcc_jit_result_get_global (result, "global_struct_fi_3");
+
+ CHECK_VALUE (fi->f, 2 * 2);
+ CHECK_VALUE (fi->i, 3);
+ }
+ {
+ union ubar1 *foo = gcc_jit_result_get_global (result,
+ "global_union_ufoo_ff3");
+ CHECK_VALUE (foo->ff, 3);
+ }
+ {
+ union ubar1 *foo = gcc_jit_result_get_global (result,
+ "global_union_ufoo_ii2");
+ CHECK_VALUE (foo->ii, 2);
+ }
+ {
+ union ubar1 *foo = gcc_jit_result_get_global (result,
+ "global_union_ufoo_ff1c1");
+ CHECK_VALUE (foo->ff, 1.1f);
+ }
+ {
+ union ubar1 *foo = gcc_jit_result_get_global (result,
+ "global_union_ufoo_0");
+ CHECK_VALUE (foo->ii, 0);
+ }
+ {
+ int *foo = gcc_jit_result_get_global (result, "global_int1_3");
+
+ CHECK_VALUE (*foo, 3);
+ }
+ {
+ int *foo = gcc_jit_result_get_global (result, "global_cvint1_3");
+
+ CHECK_VALUE (*foo, 3);
+ }
+ {
+ int *foo = gcc_jit_result_get_global (result, "global_int2_3");
+
+ CHECK_VALUE (*foo, 3);
+ }
+ {
+ int *foo = gcc_jit_result_get_global (result, "global_int3_18");
+
+ CHECK_VALUE (*foo, 18);
+ }
+ {
+ int *foo = gcc_jit_result_get_global (result, "global_int_alotofoperators");
+
+ CHECK_VALUE (*foo, ~(-((((((2 | 8) & 15) ^ 0) << 3 >> 2) - 1) / 2)));
+ }
+ {
+ int *foo = gcc_jit_result_get_global (result, "global_int4_3");
+ int **pfoo = gcc_jit_result_get_global (result, "global_pint5");
+
+ CHECK_VALUE (*foo, 3);
+ CHECK_VALUE (foo, *pfoo);
+ CHECK_VALUE (**pfoo, 3);
+ }
+ {
+ int * (*foo) (void) = gcc_jit_result_get_code (result, "fn_pint_0");
+ int **pfoo = gcc_jit_result_get_global (result, "global_pint6");
+
+ CHECK_VALUE (*foo (), 0);
+ CHECK_VALUE (foo (), *pfoo);
+ CHECK_VALUE (**pfoo, 0);
+ }
+ {
+ int *foo = gcc_jit_result_get_global (result, "global_int6_3");
+ int **pfoo = gcc_jit_result_get_global (result, "global_pint7");
+
+ CHECK_VALUE (*foo, 3);
+ CHECK_VALUE (foo + 1, *pfoo);
+ CHECK_VALUE (*(*pfoo - 1), 3);
+ }
+ {
+ double *foo = gcc_jit_result_get_global (result, "global_double1_3");
+
+ CHECK_VALUE (*foo, 3);
+ }
+ {
+ double *foo = gcc_jit_result_get_global (result, "global_double2_12");
+
+ CHECK_VALUE (*foo, 12);
+ }
+ {
+ _Bool *foo = gcc_jit_result_get_global (result, "global_bool1_1");
+
+ CHECK_VALUE (*foo, 1);
+ }
+ {
+ int *foo = gcc_jit_result_get_global (result, "global_intarr_1234");
+
+ CHECK_VALUE (foo[0], 1);
+ CHECK_VALUE (foo[1], 2);
+ CHECK_VALUE (foo[2], 3);
+ CHECK_VALUE (foo[3], 4);
+ }
+ {
+ float *foo = gcc_jit_result_get_global (result, "global_floatarr_12");
+
+ CHECK_VALUE (foo[0], 1);
+ CHECK_VALUE (foo[1], 2);
+ CHECK_VALUE (foo[2], 0);
+ CHECK_VALUE (foo[3], 0);
+ }
+ {
+ float *foo = gcc_jit_result_get_global (result, "global_floatarr_12_2");
+
+ CHECK_VALUE (foo[0], 1);
+ CHECK_VALUE (foo[1], 2);
+ CHECK_VALUE (foo[2], 0);
+ CHECK_VALUE (foo[3], 0);
+ }
+ {
+ float *foo = gcc_jit_result_get_global (result, "global_floatarr_120");
+
+ CHECK_VALUE (foo[0], 1);
+ CHECK_VALUE (foo[1], 2);
+ CHECK_VALUE (foo[2], 0);
+ CHECK_VALUE (foo[3], 0);
+ }
+ {
+ float *foo = gcc_jit_result_get_global (result, "global_floatarr_0000");
+
+ CHECK_VALUE (foo[0], 0);
+ CHECK_VALUE (foo[1], 0);
+ CHECK_VALUE (foo[2], 0);
+ CHECK_VALUE (foo[3], 0);
+ }
+ {
+ float *foo = gcc_jit_result_get_global (result, "global_floatarr_00305600");
+
+ float key[] = {0,0,3,0,5,6,0,0};
+
+ CHECK_VALUE (memcmp (foo, key, sizeof key), 0);
+ }
+ {
+ int **foo = gcc_jit_result_get_global (result, "global_pintarr_x2xx");
+
+ CHECK_VALUE (foo[0], 0);
+ CHECK_VALUE (*foo[1], 2);
+ }
+ {
+ char *foo = gcc_jit_result_get_global (result, "global_chararr_qwe");
+ const char *key = "qwe";
+ CHECK_VALUE (strcmp (foo, key), 0);
+ }
+ {
+ int *foo = gcc_jit_result_get_global (result, "global_int2x2matrix_1234");
+
+ for (int i = 0; i < 4; i++)
+ CHECK_VALUE (foo[i], i + 1);
+ }
+ {
+ const char **foo =
+ gcc_jit_result_get_global (result, "global_cpchararr_qwe_asd");
+
+ CHECK_VALUE (strcmp (foo[0], "qwe"), 0);
+ CHECK_VALUE (strcmp (foo[1], "asd"), 0);
+ }
+ {
+ int *foo = gcc_jit_result_get_global (result, "global_lvalueinit_int_3");
+
+ CHECK_VALUE (*foo, 3);
+ }
+ {
+ int **pint =
+ gcc_jit_result_get_global (result, "global_pint_4");
+ int *foo =
+ gcc_jit_result_get_global (result, "global_int_6");
+ CHECK_VALUE (**pint, 4);
+ CHECK_VALUE (*foo, 6);
+ }
+ {
+ int (*fn)(void) = gcc_jit_result_get_code (result, "fn_int_11");
+ CHECK_VALUE (fn (), 11);
+ }
+ {
+ int (*fn)(void) = gcc_jit_result_get_code (result, "fn_cint_11");
+ CHECK_VALUE (fn (), 11);
+ }
+ {
+ int *(*fn)(void) = gcc_jit_result_get_code (result, "fn_cint_12");
+ CHECK_VALUE (*fn (), 12);
+ }
+ {
+ short *foo =
+ gcc_jit_result_get_code (result, "global_lvalueinit_short_3");
+ CHECK_VALUE (*foo, 3);
+ }
+ {
+ int **foo =
+ gcc_jit_result_get_code (result, "global_lvalueinit_cpcint_3");
+ CHECK_VALUE (**foo, 3);
+ }
+ {
+ int *foo =
+ gcc_jit_result_get_code (result, "global_lvalueinit_int_4");
+ CHECK_VALUE (*foo, 4);
+
+ int *bar =
+ gcc_jit_result_get_code (result, "global_const_int_7");
+ CHECK_VALUE (*bar, 4);
+ /* The linker does not have to support up to 64 alignment, so test that
+ it does before testing that it works in libgccjit. */
+ if ((size_t) &test_aligned64_works_in_linker_1 % 64 == 0 &&
+ (size_t) &test_aligned64_works_in_linker_2 % 64 == 0)
+ CHECK_VALUE ((size_t) bar % 64, 0); /* __attribute__ ((aligned (64))) */
+ }
+ {
+ union upintsize *foo =
+ gcc_jit_result_get_code (result, "global_const_upintsize_1");
+ CHECK_VALUE (foo->p, (void*)0xEEEFBEEF);
+ }
+ {
+ struct A_glb *a =
+ gcc_jit_result_get_code (result, "a_glb");
+ struct B_glb *b =
+ gcc_jit_result_get_code (result, "b_glb");
+
+ CHECK_VALUE (a->b, b);
+ CHECK_VALUE (b->a, a);
+ }
+}
diff --git a/gcc/testsuite/jit.dg/test-link-section-assembler.c b/gcc/testsuite/jit.dg/test-link-section-assembler.c
new file mode 100644
index 0000000..a90b00e
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-link-section-assembler.c
@@ -0,0 +1,37 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+
+#define TEST_COMPILING_TO_FILE
+#define OUTPUT_KIND GCC_JIT_OUTPUT_KIND_ASSEMBLER
+#define OUTPUT_FILENAME "output-of-test-link-section-assembler.c.s"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ /* Let's try to inject the equivalent of:
+ int foo __attribute__((section(".section")));
+ */
+ gcc_jit_type *int_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
+ gcc_jit_lvalue *foo =
+ gcc_jit_context_new_global (
+ ctxt, NULL, GCC_JIT_GLOBAL_EXPORTED, int_type, "foo");
+ gcc_jit_lvalue_set_link_section(foo, ".my_section");
+
+ gcc_jit_function *func_main =
+ gcc_jit_context_new_function (ctxt, NULL,
+ GCC_JIT_FUNCTION_EXPORTED,
+ int_type,
+ "main",
+ 0, NULL,
+ 0);
+ gcc_jit_rvalue *zero = gcc_jit_context_zero (ctxt, int_type);
+ gcc_jit_block *block = gcc_jit_function_new_block (func_main, NULL);
+ gcc_jit_block_end_with_return (block, NULL, zero);
+}
+
+/* { dg-final { jit-verify-output-file-was-created "" } } */
+/* { dg-final { jit-verify-assembler-output ".section .my_section" } } */
diff --git a/gcc/testsuite/jit.dg/test-local-init-rvalue.c b/gcc/testsuite/jit.dg/test-local-init-rvalue.c
new file mode 100644
index 0000000..1d74679
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-local-init-rvalue.c
@@ -0,0 +1,707 @@
+#include <stdio.h>
+#include "libgccjit.h"
+#include "harness.h"
+
+/* This testcase checks that gcc_jit_context_new_constructor() works
+ with locals. Tests that constructors can be used as return
+ values or function call values. Test that constructors can have side
+ effects and be assigned to locals.
+ */
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_INT);
+ gcc_jit_type *pint_type = gcc_jit_type_get_pointer (int_type);
+ gcc_jit_type *double_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_DOUBLE);
+ gcc_jit_type *float_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_FLOAT);
+ gcc_jit_type *bool_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_BOOL);
+ gcc_jit_type *char_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_CHAR);
+ gcc_jit_type *size_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_SIZE_T);
+ gcc_jit_type *voidptr_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_VOID_PTR);
+ gcc_jit_type *void_type = gcc_jit_context_get_type (ctxt,
+ GCC_JIT_TYPE_VOID);
+
+ /* Make a struct: struct fi { float f; int i;} */
+ gcc_jit_field *fi_f = gcc_jit_context_new_field (ctxt,
+ 0,
+ float_type,
+ "f");
+ gcc_jit_field *fi_i = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "i");
+ gcc_jit_field *fields[] = {fi_f, fi_i};
+
+ gcc_jit_type *struct_fi_type =
+ gcc_jit_struct_as_type (
+ gcc_jit_context_new_struct_type (ctxt,
+ 0,
+ "fi",
+ 2,
+ fields));
+
+ /* Make a struct:
+
+ struct bar {
+ int ii;
+ int arr[50];
+ float ff;
+ char cc;
+ }
+ */
+ gcc_jit_field *bar_ff = gcc_jit_context_new_field (ctxt,
+ 0,
+ float_type,
+ "ff");
+ gcc_jit_field *bar_ii = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "ii");
+ gcc_jit_field *bar_cc = gcc_jit_context_new_field (ctxt,
+ 0,
+ char_type,
+ "cc");
+ gcc_jit_type *int50arr_type =
+ gcc_jit_context_new_array_type (ctxt,
+ 0,
+ int_type,
+ 50);
+ gcc_jit_field *bar_fi = gcc_jit_context_new_field (ctxt,
+ 0,
+ int50arr_type,
+ "arr");
+ gcc_jit_field *fields2[] = {bar_ff, bar_fi, bar_ii, bar_cc};
+
+ gcc_jit_type *struct_bar_type =
+ gcc_jit_struct_as_type (
+ gcc_jit_context_new_struct_type (ctxt,
+ 0,
+ "bar",
+ 4,
+ fields2));
+
+ /* Make an union:
+
+ union ubar {
+ float ff;
+ int ii;
+ };
+ */
+ gcc_jit_field *ubar_ff = gcc_jit_context_new_field (ctxt,
+ 0,
+ float_type,
+ "ff");
+ gcc_jit_field *ubar_ii = gcc_jit_context_new_field (ctxt,
+ 0,
+ int_type,
+ "ii");
+ gcc_jit_field *fields3[] = {ubar_ff, ubar_ii};
+ gcc_jit_type *ubar = gcc_jit_context_new_union_type (ctxt,
+ 0,
+ "ubar",
+ 2,
+ fields3);
+
+ (void) ubar;
+ (void) struct_bar_type;
+ (void) struct_fi_type;
+ (void) bool_type;
+ (void) double_type;
+ (void) pint_type;
+ (void) voidptr_type;
+ (void) size_type;
+
+ gcc_jit_function *fn_int_3;
+ { /* int foo () { int local = 3; return local;} */
+ fn_int_3 =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ int_type,
+ "fn_int_3",
+ 0,
+ 0,
+ 0);
+ gcc_jit_block *block = gcc_jit_function_new_block (fn_int_3, "start");
+ gcc_jit_lvalue *local = gcc_jit_function_new_local (fn_int_3,
+ 0,
+ int_type,
+ "local");
+ gcc_jit_rvalue *rval = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 3);
+
+ gcc_jit_block_add_assignment (block, 0, local, rval);
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ gcc_jit_lvalue_as_rvalue(local));
+ }
+ { /* struct fi foo() { return (struct fi){1,2};} */
+ gcc_jit_function *fn =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ struct_fi_type,
+ "fn_fi_1_2",
+ 0,
+ 0,
+ 0);
+ gcc_jit_block *block = gcc_jit_function_new_block (fn, "start");
+
+ gcc_jit_rvalue *rval_f1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 1);
+ gcc_jit_rvalue *rval_i2 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 2);
+
+ gcc_jit_rvalue *vals[] = { rval_f1, rval_i2};
+ gcc_jit_field *fields[] = {fi_f, fi_i};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 2,
+ fields,
+ vals);
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ ctor);
+ }
+ { /*
+ struct fi foo()
+ {
+ struct fi local = {1,2};
+ local = (struct fi){5,6};
+ return local;
+ }
+ */
+ gcc_jit_function *fn =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ struct_fi_type,
+ "fn_fi_5_6",
+ 0,
+ 0,
+ 0);
+ gcc_jit_lvalue *local = gcc_jit_function_new_local (fn,
+ 0,
+ struct_fi_type,
+ "local");
+ gcc_jit_block *block = gcc_jit_function_new_block (fn, "start");
+
+ {
+ gcc_jit_rvalue *rval_f1 =
+ gcc_jit_context_new_rvalue_from_int (ctxt, float_type, 1);
+ gcc_jit_rvalue *rval_i2 =
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 2);
+
+ gcc_jit_rvalue *vals[] = { rval_f1, rval_i2};
+ gcc_jit_field *fields[] = {fi_f, fi_i};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 2,
+ fields,
+ vals);
+ gcc_jit_block_add_assignment (block, 0, local, ctor);
+ }
+ {
+ gcc_jit_rvalue *rval_f1 =
+ gcc_jit_context_new_rvalue_from_int (ctxt, float_type, 5);
+ gcc_jit_rvalue *rval_i2 =
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 6);
+
+ gcc_jit_rvalue *vals[] = { rval_f1, rval_i2};
+ gcc_jit_field *fields[] = {fi_f, fi_i};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 2,
+ fields,
+ vals);
+ gcc_jit_block_add_assignment (block, 0, local, ctor);
+ }
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ gcc_jit_lvalue_as_rvalue(local));
+ }
+ { /* struct fi foo() { struct fi local = {1, fn_int_3()};
+ return local;}
+
+ The ctor has a side effect (funccall) */
+ gcc_jit_function *fn =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ struct_fi_type,
+ "fn_fi_1_3",
+ 0,
+ 0,
+ 0);
+ gcc_jit_lvalue *local = gcc_jit_function_new_local (fn,
+ 0,
+ struct_fi_type,
+ "local");
+ gcc_jit_block *block = gcc_jit_function_new_block (fn, "start");
+
+ {
+ gcc_jit_rvalue *rval_f1 =
+ gcc_jit_context_new_rvalue_from_int (ctxt, float_type, 1);
+ gcc_jit_rvalue *rval_i2 =
+ gcc_jit_context_new_call (ctxt, 0, fn_int_3, 0, 0);
+
+ gcc_jit_rvalue *vals[] = { rval_f1, rval_i2};
+ gcc_jit_field *fields[] = {fi_f, fi_i};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 2,
+ fields,
+ vals);
+ gcc_jit_block_add_assignment (block, 0, local, ctor);
+ }
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ gcc_jit_lvalue_as_rvalue(local));
+ }
+ { /* struct fi foo(fi) { return fi;}
+ struct fi bar() { return foo((struct fi){3, 4}); }
+ */
+
+ gcc_jit_param *fi_param =
+ gcc_jit_context_new_param (ctxt, 0, struct_fi_type, "fi");
+
+ gcc_jit_function *fn0 =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ struct_fi_type,
+ "fn_fi_x_x",
+ 1,
+ &fi_param,
+ 0);
+ gcc_jit_block *block0 = gcc_jit_function_new_block (fn0, "start");
+ gcc_jit_block_end_with_return (block0,
+ 0,
+ gcc_jit_param_as_rvalue (
+ gcc_jit_function_get_param (fn0, 0)));
+
+ gcc_jit_function *fn =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ struct_fi_type,
+ "fn_fi_3_4",
+ 0,
+ 0,
+ 0);
+ gcc_jit_block *block = gcc_jit_function_new_block (fn, "start");
+
+ gcc_jit_rvalue *rval_f1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, float_type, 3);
+ gcc_jit_rvalue *rval_i2 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 4);
+
+ gcc_jit_rvalue *vals[] = { rval_f1, rval_i2};
+ gcc_jit_field *fields[] = {fi_f, fi_i};
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_fi_type,
+ 2,
+ fields,
+ vals);
+
+ gcc_jit_rvalue *call = gcc_jit_context_new_call (ctxt, 0, fn0, 1, &ctor);
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ call);
+ }
+ { /*
+ void foo(struct bar *b) { *b = (struct bar) {.arr = {1,2}; }
+ */
+
+ gcc_jit_param *param =
+ gcc_jit_context_new_param (ctxt, 0,
+ gcc_jit_type_get_pointer (struct_bar_type),
+ "b");
+
+
+ gcc_jit_function *fn =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ void_type,
+ "fn_pbar_12",
+ 1,
+ &param,
+ 0);
+ gcc_jit_block *block = gcc_jit_function_new_block (fn, "start");
+
+ gcc_jit_rvalue *rval_i1 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 1);
+ gcc_jit_rvalue *rval_i2 = gcc_jit_context_new_rvalue_from_int (
+ ctxt, int_type, 2);
+
+ gcc_jit_rvalue *arr_vals[] = { rval_i1, rval_i2};
+
+ gcc_jit_rvalue *arr_ctor = gcc_jit_context_new_array_constructor
+ (ctxt, 0,
+ int50arr_type,
+ 2,
+ arr_vals);
+
+ gcc_jit_rvalue *str_ctor = gcc_jit_context_new_struct_constructor
+ (ctxt,
+ 0,
+ struct_bar_type,
+ 1,
+ &bar_fi,
+ &arr_ctor);
+
+ gcc_jit_param *p0 = gcc_jit_function_get_param (fn, 0);
+ gcc_jit_lvalue *lv0 = gcc_jit_param_as_lvalue (p0);
+ gcc_jit_lvalue *deref =
+ gcc_jit_rvalue_dereference (gcc_jit_lvalue_as_rvalue (lv0), 0);
+
+ gcc_jit_block_add_assignment (block, 0,
+ deref,
+ str_ctor);
+
+ gcc_jit_block_end_with_void_return (block, 0);
+ }
+ { /* struct bar foo() { struct bar local = {};
+ return local;}
+ */
+ gcc_jit_function *fn =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ struct_bar_type,
+ "fn_bar_0s",
+ 0,
+ 0,
+ 0);
+ gcc_jit_lvalue *local =
+ gcc_jit_function_new_local (fn,
+ 0,
+ struct_bar_type,
+ "local");
+ gcc_jit_block *block = gcc_jit_function_new_block (fn, "start");
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_struct_constructor
+ (ctxt, 0,
+ struct_bar_type,
+ 0,
+ 0,
+ 0);
+ gcc_jit_block_add_assignment (block, 0, local, ctor);
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ gcc_jit_lvalue_as_rvalue(local));
+ }
+ { /* struct bar foo() { struct bar local;
+ local.arr = (int [50]){1,2,3,4,5,6};
+ return local;}
+ */
+ gcc_jit_function *fn =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ struct_bar_type,
+ "fn_bar_123s",
+ 0,
+ 0,
+ 0);
+ gcc_jit_lvalue *local =
+ gcc_jit_function_new_local (fn,
+ 0,
+ struct_bar_type,
+ "local");
+ gcc_jit_block *block = gcc_jit_function_new_block (fn, "start");
+
+ gcc_jit_rvalue *values[6];
+
+ for (int i = 0; i < 6; i++)
+ values[i] = gcc_jit_context_new_rvalue_from_int (ctxt, int_type, i + 1);
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor
+ (ctxt, 0,
+ int50arr_type,
+ 6,
+ values);
+
+ gcc_jit_lvalue *arr_lv = gcc_jit_lvalue_access_field (local,
+ 0,
+ bar_fi);
+ gcc_jit_block_add_assignment (block, 0, arr_lv, ctor);
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ gcc_jit_lvalue_as_rvalue(local));
+ }
+ { /* int[50] foo() { int arr[50];
+ arr = (int [50]){1,2,3,4,5,6};
+ return arr;}
+
+ N.B: Not a typo, returning an array.
+ */
+ gcc_jit_function *fn =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ int50arr_type,
+ "fn_int50arr_123s",
+ 0,
+ 0,
+ 0);
+ gcc_jit_lvalue *local =
+ gcc_jit_function_new_local (fn,
+ 0,
+ int50arr_type,
+ "local");
+ gcc_jit_block *block = gcc_jit_function_new_block (fn, "start");
+
+ gcc_jit_rvalue *values[6];
+
+ for (int i = 0; i < 6; i++)
+ values[i] = gcc_jit_context_new_rvalue_from_int (ctxt, int_type, i + 1);
+
+ gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (
+ ctxt,
+ 0,
+ int50arr_type,
+ 6,
+ values);
+
+ gcc_jit_block_add_assignment (block, 0, local, ctor);
+
+ gcc_jit_block_end_with_return (block,
+ 0,
+ gcc_jit_lvalue_as_rvalue(local));
+ }
+ { /*
+ Verify that circular linked lists compiles, .e.g.
+ that visit_children does not run in circles or something.
+
+ struct llist { struct llist *next; };
+
+ bool foo (void)
+ {
+ volatile struct llist a;
+ volatile struct llist b;
+
+ a = (struct llist) {.next = &b};
+ b = (struct llist) {.next = &a};
+
+ return a.next == &b;
+ }
+ */
+ gcc_jit_struct *llist =
+ gcc_jit_context_new_opaque_struct(ctxt,
+ 0, "llist_lcl");
+ gcc_jit_field *fields[] =
+ {
+ gcc_jit_context_new_field (ctxt, 0,
+ gcc_jit_type_get_pointer (
+ gcc_jit_struct_as_type (llist)),
+ "next")
+ };
+ gcc_jit_struct_set_fields (llist, 0, 1, fields);
+ gcc_jit_type *t_llist = gcc_jit_struct_as_type (llist);
+
+ gcc_jit_function *fn =
+ gcc_jit_context_new_function (ctxt,
+ 0,
+ GCC_JIT_FUNCTION_EXPORTED,
+ bool_type,
+ "fn_llist",
+ 0,
+ 0,
+ 0);
+ gcc_jit_block *block = gcc_jit_function_new_block (fn, "start");
+
+ gcc_jit_lvalue *a =
+ gcc_jit_function_new_local (fn,
+ 0,
+ gcc_jit_type_get_volatile (t_llist),
+ "a");
+ gcc_jit_lvalue *b =
+ gcc_jit_function_new_local (fn,
+ 0,
+ gcc_jit_type_get_volatile (t_llist),
+ "b");
+
+ gcc_jit_rvalue *a_addr = gcc_jit_lvalue_get_address( a, 0);
+ gcc_jit_rvalue *b_addr = gcc_jit_lvalue_get_address( b, 0);
+
+ gcc_jit_rvalue *a_ctor = gcc_jit_context_new_struct_constructor (
+ ctxt,
+ 0,
+ t_llist,
+ 1,
+ 0,
+ &b_addr);
+
+ gcc_jit_rvalue *b_ctor = gcc_jit_context_new_struct_constructor (
+ ctxt,
+ 0,
+ t_llist,
+ 1,
+ 0,
+ &a_addr);
+
+ gcc_jit_block_add_assignment (block, 0,
+ a, a_ctor);
+ gcc_jit_block_add_assignment (block, 0,
+ b, b_ctor);
+
+ gcc_jit_rvalue *cmp =
+ gcc_jit_context_new_comparison (
+ ctxt, 0,
+ GCC_JIT_COMPARISON_EQ,
+ gcc_jit_rvalue_access_field (gcc_jit_lvalue_as_rvalue (a),
+ 0, fields[0]),
+ gcc_jit_context_new_cast (ctxt, 0,
+ gcc_jit_lvalue_get_address (b, 0),
+ gcc_jit_type_get_pointer (t_llist)));
+
+ gcc_jit_block_end_with_return (block,
+ 0, cmp);
+ }
+}
+
+struct fi2 {
+ float f;
+ int i;
+};
+
+struct bar2 {
+ float ff;
+ int arr[50];
+ int ii;
+ char c;
+};
+
+union ubar2 {
+ float ff;
+ int ii;
+};
+
+struct int50arr {
+ int arr[50];
+};
+
+void __attribute__((optimize(0)))
+scramble_stack(void)
+ {
+ char *p = alloca(100);
+ for (int i = 0; i < 100; i++)
+ *p++ = 0xF0;
+ asm(""); /* Mark for side-effect */
+ }
+
+void __attribute__((optimize(0)))
+scramble_arr (char *arr, int len)
+{
+ for (int i = 0; i < len; i++)
+ *arr++ = i;
+ asm(""); /* Mark for side-effect */
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ CHECK_NON_NULL (result);
+
+ {
+ struct fi2 (*fn) (void) = gcc_jit_result_get_code (result, "fn_fi_1_2");
+ scramble_stack ();
+ struct fi2 fi = fn ();
+ CHECK_VALUE (fi.f, 1);
+ CHECK_VALUE (fi.i, 2);
+ }
+ {
+ struct fi2 (*fn) (void) = gcc_jit_result_get_code (result, "fn_fi_5_6");
+ struct fi2 fi = fn ();
+ CHECK_VALUE (fi.f, 5);
+ CHECK_VALUE (fi.i, 6);
+ }
+ {
+ struct fi2 (*fn) (void) = gcc_jit_result_get_code (result, "fn_fi_1_3");
+ struct fi2 fi = fn ();
+ CHECK_VALUE (fi.f, 1);
+ CHECK_VALUE (fi.i, 3);
+ }
+ {
+ struct fi2 (*fn) (void) = gcc_jit_result_get_code (result, "fn_fi_3_4");
+ struct fi2 fi = fn ();
+ CHECK_VALUE (fi.f, 3);
+ CHECK_VALUE (fi.i, 4);
+ }
+ {
+ scramble_stack();
+ struct bar2 (*fn) (void) = gcc_jit_result_get_code (result, "fn_bar_0s");
+ struct bar2 bar = fn ();
+ struct bar2 key = {};
+
+ CHECK_VALUE (bar.ff, 0);
+ CHECK_VALUE (bar.ii, 0);
+ CHECK_VALUE (memcmp (&bar.arr, &key.arr, sizeof (key.arr)), 0);
+ }
+ {
+
+ void (*fn) (struct bar2 *) = gcc_jit_result_get_code (result, "fn_pbar_12");
+
+ struct bar2 bar = (struct bar2) {};
+
+ scramble_arr ((char*)&bar, sizeof bar);
+ scramble_stack();
+
+ fn (&bar);
+
+ struct bar2 key = {.arr = {1,2}};
+ __builtin_clear_padding (&key);
+
+ CHECK_VALUE (memcmp (&bar, &key, sizeof (key)), 0);
+ }
+ {
+ scramble_stack();
+ struct bar2 (*fn) (void) = gcc_jit_result_get_code (result, "fn_bar_123s");
+ struct bar2 bar = fn ();
+ struct bar2 key = {.arr = {1,2,3,4,5,6} };
+
+ CHECK_VALUE (memcmp (&bar.arr, &key.arr, sizeof (key.arr)), 0);
+ }
+ {
+ scramble_stack ();
+ /* This is abit shady. Lets just pretend that array returns à la Fortran
+ is the same thing as returning a struct with an array in it in C. */
+ struct int50arr (*fn) (void) =
+ gcc_jit_result_get_code (result, "fn_int50arr_123s");
+ struct int50arr ans = fn ();
+ int key[50] = {1,2,3,4,5,6};
+
+ CHECK_VALUE (memcmp (ans.arr, key, sizeof (key)), 0);
+ }
+ {
+ _Bool (*fn) (void) = gcc_jit_result_get_code (result, "fn_llist");
+ CHECK_VALUE (fn (), 1);
+ }
+}
diff --git a/gcc/testsuite/jit.dg/test-pr103562.c b/gcc/testsuite/jit.dg/test-pr103562.c
new file mode 100644
index 0000000..de361b9
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-pr103562.c
@@ -0,0 +1,62 @@
+#include <libgccjit.h>
+#include "harness.h"
+
+struct my_struct { long a; long b; long c; };
+
+void create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ /* Create the equivalent of:
+ struct my_struct { long a; long b; long c; };
+ static struct my_struct deref(struct my_struct *ptr) { return *ptr; }
+ long get_a(struct my_struct *s) { return deref(s).a; }
+ and compile it at -O1. */
+ gcc_jit_context_set_int_option(ctxt, GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL, 1);
+
+ gcc_jit_type *long_type = gcc_jit_context_get_type(ctxt, GCC_JIT_TYPE_LONG);
+ gcc_jit_field* fields[3] = {
+ gcc_jit_context_new_field(ctxt, NULL, long_type, "a"),
+ gcc_jit_context_new_field(ctxt, NULL, long_type, "b"),
+ gcc_jit_context_new_field(ctxt, NULL, long_type, "c"),
+ };
+ gcc_jit_struct *my_struct =
+ gcc_jit_context_new_struct_type(ctxt, NULL, "my_struct", 3, fields);
+ gcc_jit_type *my_struct_type = gcc_jit_struct_as_type(my_struct);
+ gcc_jit_type *my_struct_ptr_type = gcc_jit_type_get_pointer(my_struct_type);
+
+ /* struct my_struct deref(struct my_struct *ptr) { return *ptr; } */
+ gcc_jit_param *param_deref =
+ gcc_jit_context_new_param(ctxt, NULL, my_struct_ptr_type, "ptr");
+ gcc_jit_function *func_deref = gcc_jit_context_new_function(
+ ctxt, NULL, GCC_JIT_FUNCTION_INTERNAL,
+ my_struct_type, "deref",
+ 1, &param_deref,
+ 0);
+ gcc_jit_block *blockDeref = gcc_jit_function_new_block(func_deref, NULL);
+ gcc_jit_block_end_with_return(
+ blockDeref, NULL,
+ gcc_jit_lvalue_as_rvalue(gcc_jit_rvalue_dereference(gcc_jit_param_as_rvalue(param_deref), NULL)));
+
+ /* long get_a(struct my_struct *s) { return deref(s).a; } */
+ gcc_jit_param *param_get_a = gcc_jit_context_new_param(ctxt, NULL, my_struct_ptr_type, "s");
+ gcc_jit_function *func_get_a = gcc_jit_context_new_function(
+ ctxt, NULL, GCC_JIT_FUNCTION_EXPORTED,
+ long_type, "get_a",
+ 1, &param_get_a,
+ 0);
+ gcc_jit_block *block_get_a = gcc_jit_function_new_block(func_get_a, NULL);
+ gcc_jit_rvalue *argsForDeref[1] = {gcc_jit_param_as_rvalue(param_get_a)};
+ gcc_jit_rvalue *callDeref = gcc_jit_context_new_call(ctxt, NULL, func_deref, 1, argsForDeref);
+ gcc_jit_block_end_with_return(
+ block_get_a, NULL,
+ gcc_jit_rvalue_access_field(callDeref, NULL, fields[0]));
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ typedef long(*fn_type) (struct my_struct*);
+ fn_type get_a = (fn_type) gcc_jit_result_get_code(result, "get_a");
+
+ struct my_struct s = {1, 2, 3};
+ CHECK_VALUE (get_a(&s), 1);
+}
diff --git a/gcc/testsuite/jit.dg/test-reflection.c b/gcc/testsuite/jit.dg/test-reflection.c
new file mode 100644
index 0000000..112a245
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-reflection.c
@@ -0,0 +1,95 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "libgccjit.h"
+
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ /* Do nothing. */
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ /* Get the built-in functions. */
+ gcc_jit_function *builtin_sin =
+ gcc_jit_context_get_builtin_function (ctxt, "sin");
+
+ CHECK_VALUE (gcc_jit_function_get_param_count(builtin_sin), 1);
+
+ gcc_jit_type *double_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_DOUBLE);
+ CHECK_VALUE (gcc_jit_function_get_return_type(builtin_sin), double_type);
+ CHECK (!gcc_jit_type_is_integral(double_type));
+
+ gcc_jit_type *bool_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_BOOL);
+ CHECK (gcc_jit_type_is_bool(bool_type));
+ CHECK (!gcc_jit_type_is_integral(bool_type));
+
+ gcc_jit_type *aligned_bool_type =
+ gcc_jit_type_get_aligned(gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_BOOL), 8);
+ CHECK (gcc_jit_type_is_bool(aligned_bool_type));
+ CHECK (bool_type != aligned_bool_type);
+ CHECK_VALUE (gcc_jit_type_unqualified(aligned_bool_type), bool_type);
+
+ CHECK_VALUE (gcc_jit_type_unqualified(gcc_jit_type_get_const(bool_type)), bool_type);
+ CHECK_VALUE (gcc_jit_type_unqualified(gcc_jit_type_get_volatile(bool_type)), bool_type);
+
+ gcc_jit_type *int64 =
+ gcc_jit_context_get_int_type(ctxt, 8, 1);
+ CHECK (gcc_jit_type_is_integral(int64));
+ gcc_jit_type *uint64 =
+ gcc_jit_context_get_int_type(ctxt, 8, 0);
+ CHECK (gcc_jit_type_is_integral(uint64));
+ gcc_jit_type *int8 =
+ gcc_jit_context_get_int_type(ctxt, 1, 1);
+ CHECK (gcc_jit_type_is_integral(int8));
+ gcc_jit_type *uint8 =
+ gcc_jit_context_get_int_type(ctxt, 1, 0);
+ CHECK (gcc_jit_type_is_integral(uint8));
+
+ CHECK (!gcc_jit_type_dyncast_vector(double_type));
+ gcc_jit_type *vec_type = gcc_jit_type_get_vector (double_type, 4);
+ gcc_jit_vector_type *vector_type = gcc_jit_type_dyncast_vector(vec_type);
+ CHECK (vector_type);
+ CHECK (vec_type != double_type);
+ CHECK_VALUE (gcc_jit_vector_type_get_element_type(vector_type), double_type);
+ CHECK_VALUE (gcc_jit_vector_type_get_num_units(vector_type), 4);
+
+ CHECK (!gcc_jit_type_is_pointer(double_type));
+ CHECK_VALUE (gcc_jit_type_is_pointer(gcc_jit_type_get_pointer(double_type)), double_type);
+
+ gcc_jit_type* params[2] = {int8, uint64};
+ gcc_jit_type *function_ptr_type = gcc_jit_context_new_function_ptr_type(ctxt, NULL, int64, 2, params, 0);
+ CHECK (!gcc_jit_type_dyncast_function_ptr_type (int64));
+ gcc_jit_function_type *function_type = gcc_jit_type_dyncast_function_ptr_type (function_ptr_type);
+ CHECK (function_type);
+ int param_count = gcc_jit_function_type_get_param_count(function_type);
+ CHECK_VALUE (param_count, 2);
+ gcc_jit_type *return_type = gcc_jit_function_type_get_return_type(function_type);
+ CHECK_VALUE (return_type, int64);
+ gcc_jit_type *param1 = gcc_jit_function_type_get_param_type(function_type, 0);
+ CHECK_VALUE (param1, int8);
+ gcc_jit_type *param2 = gcc_jit_function_type_get_param_type(function_type, 1);
+ CHECK_VALUE (param2, uint64);
+
+ gcc_jit_field *field1 = gcc_jit_context_new_field (ctxt, NULL, uint64, "field1");
+ gcc_jit_field *field2 = gcc_jit_context_new_field (ctxt, NULL, double_type, "field2");
+ gcc_jit_field *fields[2] = { field1, field2 };
+ gcc_jit_struct *struct_type = gcc_jit_context_new_struct_type (ctxt, NULL, "testStruct", 2, fields);
+ CHECK_VALUE (gcc_jit_struct_get_field_count(struct_type), 2);
+ CHECK_VALUE (gcc_jit_struct_get_field(struct_type, 0), field1);
+ CHECK_VALUE (gcc_jit_struct_get_field(struct_type, 1), field2);
+ CHECK (!gcc_jit_type_is_struct(double_type));
+ gcc_jit_struct *struct_ty = gcc_jit_type_is_struct(gcc_jit_struct_as_type(struct_type));
+ CHECK_VALUE (struct_ty, struct_type);
+
+ CHECK (!gcc_jit_type_dyncast_array(double_type));
+ gcc_jit_type* array_type = gcc_jit_context_new_array_type(ctxt, NULL, double_type, 1);
+ CHECK_VALUE (gcc_jit_type_dyncast_array(array_type), double_type);
+}
+
diff --git a/gcc/testsuite/jit.dg/test-sum-of-squares.c b/gcc/testsuite/jit.dg/test-sum-of-squares.c
index f095f41..cfcf5b2 100644
--- a/gcc/testsuite/jit.dg/test-sum-of-squares.c
+++ b/gcc/testsuite/jit.dg/test-sum-of-squares.c
@@ -133,10 +133,10 @@ verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
An example of using gcc_jit_context_enable_dump to verify a property
of the compile.
- In this case, verify that vrp is able to deduce the
- bounds of the iteration variable. Specifically, verify that some
- variable is known to be in the range negative infinity to some
- expression based on param "n" (actually n-1). */
- CHECK_STRING_CONTAINS (dump_vrp1, "[-INF, n_");
+ In particular, this example verifies that we can read the dump from a
+ pass with multiple instances. Given that the format of the VRP dump
+ is subject to change, merely verify that it contains the function
+ name. */
+ CHECK_STRING_CONTAINS (dump_vrp1, ";; Function loop_test");
free (dump_vrp1);
}
diff --git a/gcc/testsuite/jit.dg/test-tls.c b/gcc/testsuite/jit.dg/test-tls.c
new file mode 100644
index 0000000..3b20182
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-tls.c
@@ -0,0 +1,64 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+
+#include "libgccjit.h"
+
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ /* Let's try to inject the equivalent of:
+
+ _Thread_local int foo;
+
+ int test_using_tls()
+ {
+ foo = 42;
+ return foo;
+ }
+ */
+ gcc_jit_type *int_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
+
+ gcc_jit_lvalue *foo =
+ gcc_jit_context_new_global (
+ ctxt, NULL, GCC_JIT_GLOBAL_EXPORTED, int_type, "foo");
+ gcc_jit_lvalue_set_tls_model (foo, GCC_JIT_TLS_MODEL_GLOBAL_DYNAMIC);
+
+ /* Build the test_fn. */
+ gcc_jit_function *test_fn =
+ gcc_jit_context_new_function (ctxt, NULL,
+ GCC_JIT_FUNCTION_EXPORTED,
+ int_type,
+ "test_using_tls",
+ 0, NULL,
+ 0);
+ gcc_jit_block *block = gcc_jit_function_new_block (test_fn, NULL);
+ gcc_jit_block_add_assignment (
+ block, NULL,
+ foo,
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 42));
+ gcc_jit_block_end_with_return (block,
+ NULL,
+ gcc_jit_lvalue_as_rvalue (foo));
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ typedef int (*fn_type) (void);
+ CHECK_NON_NULL (result);
+
+ fn_type test_using_tls =
+ (fn_type)gcc_jit_result_get_code (result, "test_using_tls");
+ CHECK_NON_NULL (test_using_tls);
+ int return_value = test_using_tls();
+ CHECK_VALUE (return_value, 42);
+
+ int *foo = (int *)gcc_jit_result_get_global (result, "foo");
+ CHECK_NON_NULL (foo);
+ CHECK_VALUE (*foo, 42);
+}
diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
index e926dc3..7e0f85d 100644
--- a/gcc/testsuite/lib/asan-dg.exp
+++ b/gcc/testsuite/lib/asan-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 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/atomic-dg.exp b/gcc/testsuite/lib/atomic-dg.exp
index cc19d27..86dcfa6 100644
--- a/gcc/testsuite/lib/atomic-dg.exp
+++ b/gcc/testsuite/lib/atomic-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 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/c-compat.exp b/gcc/testsuite/lib/c-compat.exp
index 5403091..5b5beae 100644
--- a/gcc/testsuite/lib/c-compat.exp
+++ b/gcc/testsuite/lib/c-compat.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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/c-torture.exp b/gcc/testsuite/lib/c-torture.exp
index e56f98f..ce4bedc 100644
--- a/gcc/testsuite/lib/c-torture.exp
+++ b/gcc/testsuite/lib/c-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2021 Free Software Foundation, Inc.
+# Copyright (C) 1992-2022 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/clearcap.exp b/gcc/testsuite/lib/clearcap.exp
index ff6dba3..23a9e4b 100644
--- a/gcc/testsuite/lib/clearcap.exp
+++ b/gcc/testsuite/lib/clearcap.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2021 Free Software Foundation, Inc.
+# Copyright (C) 2014-2022 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/compat.exp b/gcc/testsuite/lib/compat.exp
index b7b7466..d414ba7 100644
--- a/gcc/testsuite/lib/compat.exp
+++ b/gcc/testsuite/lib/compat.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2022 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 e983986..1ddb76b 100644
--- a/gcc/testsuite/lib/copy-file.exp
+++ b/gcc/testsuite/lib/copy-file.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2021 Free Software Foundation, Inc.
+# Copyright (C) 2003-2022 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 bfb6487..5aa5057 100644
--- a/gcc/testsuite/lib/dejapatches.exp
+++ b/gcc/testsuite/lib/dejapatches.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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 bb0ce46..97fb32d 100644
--- a/gcc/testsuite/lib/dg-pch.exp
+++ b/gcc/testsuite/lib/dg-pch.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2021 Free Software Foundation, Inc.
+# Copyright (C) 2003-2022 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/file-format.exp b/gcc/testsuite/lib/file-format.exp
index 6ef4c13..f196e58 100644
--- a/gcc/testsuite/lib/file-format.exp
+++ b/gcc/testsuite/lib/file-format.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2022 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/fortran-modules.exp b/gcc/testsuite/lib/fortran-modules.exp
index 234d1c9..794ed5a 100644
--- a/gcc/testsuite/lib/fortran-modules.exp
+++ b/gcc/testsuite/lib/fortran-modules.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 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/fortran-torture.exp b/gcc/testsuite/lib/fortran-torture.exp
index d6759aa..ca0fe54 100644
--- a/gcc/testsuite/lib/fortran-torture.exp
+++ b/gcc/testsuite/lib/fortran-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2021 Free Software Foundation, Inc.
+# Copyright (C) 2003-2022 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
@@ -138,8 +138,8 @@ proc fortran-torture-compile { src option } {
return
}
- if [string match "*internal compiler error*" $comp_output] then {
- gfortran_fail $testcase "$option (internal compiler error)"
+ if [regexp -line -- "internal compiler error.*" $comp_output ice] then {
+ gfortran_fail $testcase "$option ($ice)"
catch { remote_file build delete $output }
return
}
@@ -263,8 +263,8 @@ proc fortran-torture-execute { src } {
continue
}
- if [string match "*internal compiler error*" $comp_output] then {
- gfortran_fail $testcase "$option (internal compiler error)"
+ if [regexp -line -- "internal compiler error.*" $comp_output ice] then {
+ gfortran_fail $testcase "$option ($ice)"
catch { remote_file build delete $executable }
continue
}
diff --git a/gcc/testsuite/lib/g++-dg.exp b/gcc/testsuite/lib/g++-dg.exp
index c360770..a1bc370 100644
--- a/gcc/testsuite/lib/g++-dg.exp
+++ b/gcc/testsuite/lib/g++-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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
@@ -52,12 +52,13 @@ proc g++-dg-runtest { testcases flags default-extra-flags } {
if { [llength $gpp_std_list] > 0 } {
set std_list $gpp_std_list
} else {
- set std_list { 98 14 17 2a }
+ set std_list { 98 14 17 20 }
}
set option_list { }
foreach x $std_list {
# Handle "concepts" as C++17 plus Concepts TS.
- if { $x eq "concepts" } then { set x "17 -fconcepts" }
+ if { $x eq "concepts" } then { set x "17 -fconcepts"
+ } elseif { $x eq "impcx" } then { set x "23 -fimplicit-constexpr" }
lappend option_list "${std_prefix}$x"
}
} else {
diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp
index eea7900..3744ebe 100644
--- a/gcc/testsuite/lib/g++.exp
+++ b/gcc/testsuite/lib/g++.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2021 Free Software Foundation, Inc.
+# Copyright (C) 1992-2022 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-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
index d17308d..42ef1d8 100644
--- a/gcc/testsuite/lib/gcc-defs.exp
+++ b/gcc/testsuite/lib/gcc-defs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2022 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,8 +38,8 @@ proc ${tool}_check_compile {testcase option objname gcc_output} {
return 0
}
- if [string match "*internal compiler error*" $gcc_output] then {
- ${tool}_fail $testcase "$option (internal compiler error)"
+ if [regexp -line -- "internal compiler error.*" $gcc_output ice] then {
+ ${tool}_fail $testcase "$option ($ice)"
return 0
}
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 7edd070..8c28997 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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
@@ -315,13 +315,13 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
# to avoid a second failure for excess errors.
# "Error reporting routines re-entered" ICE says "Internal" rather than
# "internal", so match that too.
- if [string match {*[Ii]nternal compiler error*} $comp_output] {
+ if [regexp -line -- {[Ii]nternal compiler error.*} $comp_output ice] {
upvar 2 name name
if { $expect_ice == 0 } {
- fail "$name (internal compiler error)"
+ fail "$name ($ice)"
} else {
# We expected an ICE and we got it.
- xfail "$name (internal compiler error)"
+ xfail "$name ($ice)"
# Prune the ICE from the output.
set comp_output [prune_ices $comp_output]
}
@@ -1191,8 +1191,18 @@ proc process-message { msgproc msgprefix dgargs } {
upvar dg-messages dg-messages
if { [llength $dgargs] == 5 } {
- set num [get-absolute-line [lindex $dgargs 0] [lindex $dgargs 4]]
- set dgargs [lreplace $dgargs 4 4 $num]
+ set useline [lindex $dgargs 0]
+
+ # Resolve absolute line number.
+ set line [get-absolute-line $useline [lindex $dgargs 4]]
+ set dgargs [lreplace $dgargs 4 4 $line]
+
+ if { $line != $useline } {
+ # Make sure that we get unique test names if different USELINEs
+ # refer to the same LINE.
+ set comment "[lindex $dgargs 2] at line $useline"
+ set dgargs [lreplace $dgargs 2 2 $comment]
+ }
}
# Process the dg- directive, including adding the regular expression
diff --git a/gcc/testsuite/lib/gcc-gdb-test.exp b/gcc/testsuite/lib/gcc-gdb-test.exp
index b3cdbb9..8b35579 100644
--- a/gcc/testsuite/lib/gcc-gdb-test.exp
+++ b/gcc/testsuite/lib/gcc-gdb-test.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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-simulate-thread.exp b/gcc/testsuite/lib/gcc-simulate-thread.exp
index 6af2df9..2ed57b1 100644
--- a/gcc/testsuite/lib/gcc-simulate-thread.exp
+++ b/gcc/testsuite/lib/gcc-simulate-thread.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2021 Free Software Foundation, Inc.
+# Copyright (C) 2011-2022 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 4d80606..1b25ebe 100644
--- a/gcc/testsuite/lib/gcc.exp
+++ b/gcc/testsuite/lib/gcc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2021 Free Software Foundation, Inc.
+# Copyright (C) 1992-2022 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/gcov.exp b/gcc/testsuite/lib/gcov.exp
index f330965..9d5b2cd 100644
--- a/gcc/testsuite/lib/gcov.exp
+++ b/gcc/testsuite/lib/gcov.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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 +17,8 @@
# Verify various kinds of gcov output: line counts, branch percentages,
# and call return percentages. None of this is language-specific.
+load_lib "target-supports.exp"
+
global GCOV
#
@@ -274,17 +276,13 @@ proc run-gcov-pytest { args } {
set testcase [remote_download host $testcase]
set result [remote_exec host $GCOV "$testcase -i"]
- set pytest_cmd "python3 -m pytest --color=no -rap -s --tb=no"
- set result [remote_exec host "$pytest_cmd --version"]
- set status [lindex $result 0]
- if { $status != 0 } then {
- unsupported "$subdir/$testcase run-gcov-pytest python3 pytest missing"
+ set pytest_script [lindex $args 1]
+ if { ![check_effective_target_pytest3] } {
+ unsupported "$pytest_script pytest python3 is missing"
return
}
- set pytest_script [lindex $args 1]
setenv GCOV_PATH $testcase
- verbose "pytest_script: $srcdir $subdir $pytest_script" 2
spawn -noecho python3 -m pytest --color=no -rap -s --tb=no $srcdir/$subdir/$pytest_script
set prefix "\[^\r\n\]*"
diff --git a/gcc/testsuite/lib/gdc-dg.exp b/gcc/testsuite/lib/gdc-dg.exp
index 953f8d8..ebd0093 100644
--- a/gcc/testsuite/lib/gdc-dg.exp
+++ b/gcc/testsuite/lib/gdc-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 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/gdc-utils.exp b/gcc/testsuite/lib/gdc-utils.exp
index 33c0145..ffbaa27 100644
--- a/gcc/testsuite/lib/gdc-utils.exp
+++ b/gcc/testsuite/lib/gdc-utils.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 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,15 @@ proc gdc-convert-args { args } {
set compilable_output_file_ext "di"
lappend out "-H"
+ } elseif [string match "-HC" $arg] {
+ upvar 1 compilable_output_file_ext compilable_output_file_ext
+ upvar 1 name name
+ set compilable_output_file_ext "h"
+ lappend out "-fdump-c++-spec=[file rootname $name].h"
+
+ } elseif [string match "-HC=verbose" $arg] {
+ lappend out "-fdump-c++-spec-verbose"
+
} elseif { [regexp -- {^-I([\w+/-]+)} $arg pattern path] } {
lappend out "-I$path"
@@ -54,11 +63,11 @@ proc gdc-convert-args { args } {
} elseif { [string match "-boundscheck" $arg]
|| [string match "-boundscheck=on" $arg] } {
- lappend out "-fbounds-check"
+ lappend out "-fbounds-check=on"
} elseif { [string match "-boundscheck=off" $arg]
|| [string match "-noboundscheck" $arg] } {
- lappend out "-fno-bounds-check"
+ lappend out "-fbounds-check=off"
} elseif [string match "-boundscheck=safeonly" $arg] {
lappend out "-fbounds-check=safeonly"
@@ -66,6 +75,12 @@ proc gdc-convert-args { args } {
} elseif [string match "-c" $arg] {
lappend out "-c"
+ } elseif [regexp -- {^-check=(\w+)=off} $arg pattern value] {
+ lappend out "-fno-check=$value"
+
+ } elseif [string match "-checkaction=context" $arg] {
+ lappend out "-fcheckaction=context"
+
} elseif [string match "-d" $arg] {
lappend out "-Wno-deprecated"
@@ -79,23 +94,35 @@ proc gdc-convert-args { args } {
} elseif [regexp -- {^-debug=(\w+)} $arg pattern value] {
lappend out "-fdebug=$value"
+ } elseif [string match "-dip25" $arg] {
+ lappend out "-fpreview=dip25"
+
} elseif [string match "-dip1000" $arg] {
- lappend out "-ftransition=dip1000"
+ lappend out "-fpreview=dip1000"
- } elseif [string match "-dip25" $arg] {
- lappend out "-ftransition=dip25"
+ } elseif [string match "-dip1008" $arg] {
+ lappend out "-fpreview=dip1008"
} elseif [string match "-dw" $arg] {
lappend out "-Wdeprecated"
lappend out "-Wno-error"
+ } elseif [regexp -- {^-extern-std=([\w+]+)} $arg pattern value] {
+ lappend out "-fextern-std=$value"
+
} elseif [string match "-fPIC" $arg] {
lappend out "-fPIC"
+ } elseif [string match "-fPIE" $arg] {
+ lappend out "-fPIE"
+
} elseif { [string match "-g" $arg]
|| [string match "-gc" $arg] } {
lappend out "-g"
+ } elseif [string match "-ignore" $arg] {
+ lappend out "-fignore-unknown-pragmas"
+
} elseif [string match "-inline" $arg] {
lappend out "-finline-functions"
@@ -108,11 +135,17 @@ proc gdc-convert-args { args } {
} elseif [string match "-O" $arg] {
lappend out "-O2"
+ } elseif [regexp -- {^-preview=(\w+)} $arg pattern value] {
+ lappend out "-fpreview=[string tolower $value]"
+
} elseif [string match "-release" $arg] {
lappend out "-frelease"
+ } elseif [regexp -- {^-revert=(\w+)} $arg pattern value] {
+ lappend out "-frevert=[string tolower $value]"
+
} elseif [regexp -- {^-transition=(\w+)} $arg pattern value] {
- lappend out "-ftransition=$value"
+ lappend out "-ftransition=[string tolower $value]"
} elseif [string match "-unittest" $arg] {
lappend out "-funittest"
@@ -126,6 +159,16 @@ proc gdc-convert-args { args } {
} elseif [regexp -- {^-version=(\w+)} $arg pattern value] {
lappend out "-fversion=$value"
+ } elseif [string match "-o-" $arg] {
+ upvar 2 compilable_do_what compilable_do_what
+ set compilable_do_what "compile"
+
+ } elseif [string match "-vgc" $arg] {
+ lappend out "-ftransition=nogc"
+
+ } elseif [string match "-vtemplates" $arg] {
+ lappend out "-ftransition=templates"
+
} elseif [string match "-vtls" $arg] {
lappend out "-ftransition=tls"
@@ -184,10 +227,15 @@ proc gdc-copy-file { srcdir filename } {
# the test.
# EXTRA_CPP_SOURCES: List of extra C++ files to build and link along with
# the test.
+# CXXFLAGS: list of extra arguments passed when compiling C++
+# sources defined in EXTRA_CPP_SOURCES.
+# EXTRA_OBJC_SOURCES: List of extra Objective-C file to build and link along
+# with the test. Currently not handled.
# EXTRA_FILES: List of extra files to copy for the test runs.
# PERMUTE_ARGS: The set of arguments to permute in multiple compiler
# invocations. An empty set means only one permutation
# with no arguments.
+# ARG_SETS: Not handled.
# LINK: Enables linking.
# TEST_OUTPUT: The output expected from the compilation.
# POST_SCRIPT: Not handled.
@@ -241,6 +289,10 @@ proc gdc-convert-test { base test } {
# LINK sets dg-do-what-default "link"
set compilable_do_what "link"
+ } elseif [regexp -- {ARG_SETS} $copy_line] {
+ # ARG_SETS is not handled.
+ regsub -- {ARG_SETS.*$} $copy_line "" out_line
+
} elseif [regexp -- {POST_SCRIPT} $copy_line] {
# POST_SCRIPT is not handled
@@ -279,6 +331,16 @@ proc gdc-convert-test { base test } {
lappend extra_sources "extra-files/$srcfile"
}
+ } elseif [regexp -- {CXXFLAGS\s*:\s*(.*)} $copy_line match args] {
+ # Both C++ and D sources are compiled together, so include each
+ # other's command line flags too.
+ set new_option "{ dg-additional-options \"$args\" }"
+ regsub -- {CXXFLAGS.*$} $copy_line $new_option out_line
+
+ } elseif [regexp -- {EXTRA_OBJC_SOURCES\s*:\s*(.*)} $copy_line match sources] {
+ # EXTRA_OBJC_SOURCES is not handled.
+ regsub -- {EXTRA_OBJC_SOURCES.*$} $copy_line "" out_line
+
} elseif [regexp -- {EXTRA_FILES\s*:\s*(.*)} $copy_line match files] {
# EXTRA_FILES are appended to extra_files list
foreach file $files {
@@ -365,6 +427,11 @@ proc gdc-convert-test { base test } {
}
fail_compilation {
+ # Fail compilation tests only check for language errors from the
+ # front-end. No need to run all permutations of the default DFLAGS.
+ if { $PERMUTE_ARGS == $DEFAULT_DFLAGS } {
+ set PERMUTE_ARGS ""
+ }
puts $fdout "// { dg-final { output-exists-not } }"
}
}
@@ -434,7 +501,7 @@ proc gdc-do-test { testcases } {
regexp -- "(.*)/(.+)/(.+)\.(.+)$" $test match base type name ext
# Convert to DG test.
- set imports [format "-I%s/%s" $base $type]
+ set imports [format "-I%s" $type]
set cleanup_extra_files ""
set compilable_do_what "compile"
set filename "[gdc-convert-test $base $type/$name.$ext]"
diff --git a/gcc/testsuite/lib/gdc.exp b/gcc/testsuite/lib/gdc.exp
index 3dd3e67..73bc617 100644
--- a/gcc/testsuite/lib/gdc.exp
+++ b/gcc/testsuite/lib/gdc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2022 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/gfortran-dg.exp b/gcc/testsuite/lib/gfortran-dg.exp
index e390112..7407be4 100644
--- a/gcc/testsuite/lib/gfortran-dg.exp
+++ b/gcc/testsuite/lib/gfortran-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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/gfortran.exp b/gcc/testsuite/lib/gfortran.exp
index 43f4d4e..5f692d8 100644
--- a/gcc/testsuite/lib/gfortran.exp
+++ b/gcc/testsuite/lib/gfortran.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2021 Free Software Foundation, Inc.
+# Copyright (C) 2003-2022 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 7e5bc488..199c9c2 100644
--- a/gcc/testsuite/lib/gnat-dg.exp
+++ b/gcc/testsuite/lib/gnat-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 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 b33911e..2b732da 100644
--- a/gcc/testsuite/lib/gnat.exp
+++ b/gcc/testsuite/lib/gnat.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 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 95e9c27..9aa77ef 100644
--- a/gcc/testsuite/lib/go-dg.exp
+++ b/gcc/testsuite/lib/go-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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 28247a1..f86eb89 100644
--- a/gcc/testsuite/lib/go-torture.exp
+++ b/gcc/testsuite/lib/go-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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
@@ -88,8 +88,8 @@ proc go-torture-compile { src option } {
return
}
- if [string match "*internal compiler error*" $comp_output] then {
- go_fail $testcase "$option (internal compiler error)"
+ if [regexp -line -- "internal compiler error.*" $comp_output ice] then {
+ go_fail $testcase "$option ($ice)"
catch { remote_file build delete $output }
return
}
@@ -224,8 +224,8 @@ proc go-torture-execute { src } {
continue
}
- if [string match "*internal compiler error*" $comp_output] then {
- go_fail $testcase "$option (internal compiler error)"
+ if [regexp -line -- "internal compiler error.*" $comp_output ice] then {
+ go_fail $testcase "$option ($ice)"
catch { remote_file build delete $executable }
continue
}
diff --git a/gcc/testsuite/lib/go.exp b/gcc/testsuite/lib/go.exp
index 7b0cf34..019f2cd 100644
--- a/gcc/testsuite/lib/go.exp
+++ b/gcc/testsuite/lib/go.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/hwasan-dg.exp b/gcc/testsuite/lib/hwasan-dg.exp
index 2b98aa4..54d0f60 100644
--- a/gcc/testsuite/lib/hwasan-dg.exp
+++ b/gcc/testsuite/lib/hwasan-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 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/lto.exp b/gcc/testsuite/lib/lto.exp
index d0e0dc6..35f1ec5 100644
--- a/gcc/testsuite/lib/lto.exp
+++ b/gcc/testsuite/lib/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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-g++.exp b/gcc/testsuite/lib/mike-g++.exp
index 7dda88d..22f01b8 100644
--- a/gcc/testsuite/lib/mike-g++.exp
+++ b/gcc/testsuite/lib/mike-g++.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1988-2021 Free Software Foundation, Inc.
+# Copyright (C) 1988-2022 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 ea13b69..f485632 100644
--- a/gcc/testsuite/lib/mike-gcc.exp
+++ b/gcc/testsuite/lib/mike-gcc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1988-2021 Free Software Foundation, Inc.
+# Copyright (C) 1988-2022 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/multiline.exp b/gcc/testsuite/lib/multiline.exp
index 0e151b6..d31331b 100644
--- a/gcc/testsuite/lib/multiline.exp
+++ b/gcc/testsuite/lib/multiline.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2021 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 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
@@ -331,7 +331,7 @@ proc _build_multiline_regex { multiline index } {
# Support arbitrary followup text on each non-empty line,
# to deal with comments containing containing DejaGnu
# directives.
- append rexp ".*"
+ append rexp "\[^\\n\\r\]*"
}
}
append rexp "\n"
diff --git a/gcc/testsuite/lib/obj-c++-dg.exp b/gcc/testsuite/lib/obj-c++-dg.exp
index bf40c62..7ea54ed 100644
--- a/gcc/testsuite/lib/obj-c++-dg.exp
+++ b/gcc/testsuite/lib/obj-c++-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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 2ba252d..fe94158 100644
--- a/gcc/testsuite/lib/obj-c++.exp
+++ b/gcc/testsuite/lib/obj-c++.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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-dg.exp b/gcc/testsuite/lib/objc-dg.exp
index 0d8aba1..64a2630 100644
--- a/gcc/testsuite/lib/objc-dg.exp
+++ b/gcc/testsuite/lib/objc-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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 6e9a039..a0c0118 100644
--- a/gcc/testsuite/lib/objc-torture.exp
+++ b/gcc/testsuite/lib/objc-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2021 Free Software Foundation, Inc.
+# Copyright (C) 1992-2022 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 e8f52d8..7ac7134 100644
--- a/gcc/testsuite/lib/objc.exp
+++ b/gcc/testsuite/lib/objc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2021 Free Software Foundation, Inc.
+# Copyright (C) 1992-2022 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 0c77012..33c3cfb 100644
--- a/gcc/testsuite/lib/options.exp
+++ b/gcc/testsuite/lib/options.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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 6d65190..749aa4d 100644
--- a/gcc/testsuite/lib/plugin-support.exp
+++ b/gcc/testsuite/lib/plugin-support.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/profopt.exp b/gcc/testsuite/lib/profopt.exp
index 25f45ec..ac7712a 100644
--- a/gcc/testsuite/lib/profopt.exp
+++ b/gcc/testsuite/lib/profopt.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2022 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/prune.exp b/gcc/testsuite/lib/prune.exp
index 1314248..4224985 100644
--- a/gcc/testsuite/lib/prune.exp
+++ b/gcc/testsuite/lib/prune.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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
@@ -96,6 +96,13 @@ proc prune_gcc_output { text } {
# Ignore stabs obsoletion warnings
regsub -all "(^|\n)\[^\n\]*\[Ww\]arning: STABS debugging information is obsolete and not supported anymore\[^\n\]*" $text "" text
+ # Ignore missing lto jobserver for tests that do more than 1 LTRANS unit
+ regsub -all "(^|\n)\[^\n\]*lto\[^\n\]*: warning: using serial compilation of \[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*lto\[^\n\]*: note: see the \[^\n\]*'-flto' option documentation\[^\n\]* for more information" $text "" text
+
+ # Many tests that use visibility will still pass on platforms that don't support it.
+ regsub -all "(^|\n)\[^\n\]*lto1: warning: visibility attribute not supported in this configuration; ignored\[^\n\]*" $text "" text
+
# If dg-enable-nn-line-numbers was provided, then obscure source-margin
# line numbers by converting them to "NN" form.
set text [maybe-handle-nn-line-numbers $text]
diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp
index 0dcb893..a80630b 100644
--- a/gcc/testsuite/lib/scanasm.exp
+++ b/gcc/testsuite/lib/scanasm.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2021 Free Software Foundation, Inc.
+# Copyright (C) 2000-2022 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/scandump.exp b/gcc/testsuite/lib/scandump.exp
index 616e164..85217cc 100644
--- a/gcc/testsuite/lib/scandump.exp
+++ b/gcc/testsuite/lib/scandump.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2021 Free Software Foundation, Inc.
+# Copyright (C) 2000-2022 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 2cc4b8f..09bb072 100644
--- a/gcc/testsuite/lib/scanipa.exp
+++ b/gcc/testsuite/lib/scanipa.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2021 Free Software Foundation, Inc.
+# Copyright (C) 2000-2022 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/scanlang.exp b/gcc/testsuite/lib/scanlang.exp
index f9759f0..f090cee 100644
--- a/gcc/testsuite/lib/scanlang.exp
+++ b/gcc/testsuite/lib/scanlang.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2021 Free Software Foundation, Inc.
+# Copyright (C) 2000-2022 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/scanltranstree.exp b/gcc/testsuite/lib/scanltranstree.exp
index 62417c4..9e78308 100644
--- a/gcc/testsuite/lib/scanltranstree.exp
+++ b/gcc/testsuite/lib/scanltranstree.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2021 Free Software Foundation, Inc.
+# Copyright (C) 2000-2022 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/scanoffload.exp b/gcc/testsuite/lib/scanoffload.exp
index 6a58707..c9c5f03 100644
--- a/gcc/testsuite/lib/scanoffload.exp
+++ b/gcc/testsuite/lib/scanoffload.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 Free Software Foundation, Inc.
+# Copyright (C) 2020-2022 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/scanoffloadrtl.exp b/gcc/testsuite/lib/scanoffloadrtl.exp
index 0288769..36b0f15 100644
--- a/gcc/testsuite/lib/scanoffloadrtl.exp
+++ b/gcc/testsuite/lib/scanoffloadrtl.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2021 Free Software Foundation, Inc.
+# Copyright (C) 2018-2022 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/scanoffloadtree.exp b/gcc/testsuite/lib/scanoffloadtree.exp
index 093a3ab..7e77727 100644
--- a/gcc/testsuite/lib/scanoffloadtree.exp
+++ b/gcc/testsuite/lib/scanoffloadtree.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2021 Free Software Foundation, Inc.
+# Copyright (C) 2018-2022 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 4867d9a..6790cdc 100644
--- a/gcc/testsuite/lib/scanrtl.exp
+++ b/gcc/testsuite/lib/scanrtl.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2022 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/scantree.exp b/gcc/testsuite/lib/scantree.exp
index c79100f..d52c99a 100644
--- a/gcc/testsuite/lib/scantree.exp
+++ b/gcc/testsuite/lib/scantree.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2021 Free Software Foundation, Inc.
+# Copyright (C) 2000-2022 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/scanwpaipa.exp b/gcc/testsuite/lib/scanwpaipa.exp
index 991c4d5..a2d8c6a 100644
--- a/gcc/testsuite/lib/scanwpaipa.exp
+++ b/gcc/testsuite/lib/scanwpaipa.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2021 Free Software Foundation, Inc.
+# Copyright (C) 2018-2022 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 4f68cd3..d09cd51 100644
--- a/gcc/testsuite/lib/target-libpath.exp
+++ b/gcc/testsuite/lib/target-libpath.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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-supports-dg.exp b/gcc/testsuite/lib/target-supports-dg.exp
index 94ba79e..aa2164b 100644
--- a/gcc/testsuite/lib/target-supports-dg.exp
+++ b/gcc/testsuite/lib/target-supports-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 1c8b1eb..4463cc8 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2022 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
@@ -3632,8 +3632,10 @@ proc check_effective_target_vect_complex_add_float { } {
proc check_effective_target_vect_complex_add_double { } {
return [check_cached_effective_target_indexed vect_complex_add_double {
expr {
- ([check_effective_target_aarch64_sve2]
- && [check_effective_target_aarch64_little_endian])
+ (([check_effective_target_arm_v8_3a_complex_neon_ok]
+ && [check_effective_target_aarch64_little_endian])
+ || ([check_effective_target_aarch64_sve2]
+ && [check_effective_target_aarch64_little_endian]))
}}]
}
@@ -4848,7 +4850,8 @@ foreach { armfunc armflag armdefs } {
v8m_base "-march=armv8-m.base -mthumb -mfloat-abi=soft"
__ARM_ARCH_8M_BASE__
v8m_main "-march=armv8-m.main -mthumb" __ARM_ARCH_8M_MAIN__
- v8_1m_main "-march=armv8.1-m.main -mthumb" __ARM_ARCH_8M_MAIN__ } {
+ v8_1m_main "-march=armv8.1-m.main -mthumb" __ARM_ARCH_8M_MAIN__
+ v9a "-march=armv9-a" __ARM_ARCH_9A__ } {
eval [string map [list FUNC $armfunc FLAG $armflag DEFS $armdefs ] {
proc check_effective_target_arm_arch_FUNC_ok { } {
return [check_no_compiler_messages arm_arch_FUNC_ok assembly {
@@ -6178,21 +6181,21 @@ proc check_effective_target_powerpc_sqrt { } {
# Return 1 if this is a PowerPC target supporting -maltivec.
proc check_effective_target_powerpc_altivec_ok { } {
- if { ([istarget powerpc*-*-*]
- && ![istarget powerpc-*-linux*paired*])
- || [istarget rs6000-*-*] } {
- # AltiVec is not supported on AIX before 5.3.
- if { [istarget powerpc*-*-aix4*]
- || [istarget powerpc*-*-aix5.1*]
- || [istarget powerpc*-*-aix5.2*] } {
- return 0
- }
- return [check_no_compiler_messages powerpc_altivec_ok object {
- int dummy;
- } "-maltivec"]
- } else {
- return 0
- }
+ # Not PowerPC, then not ok
+ if { !([istarget powerpc*-*-*] || [istarget rs6000-*-*]) } { return 0 }
+
+ # Paired Single, then not ok
+ if { [istarget powerpc-*-linux*paired*] } { return 0 }
+
+ # AltiVec is not supported on AIX before 5.3.
+ if { [istarget powerpc*-*-aix4*]
+ || [istarget powerpc*-*-aix5.1*]
+ || [istarget powerpc*-*-aix5.2*] } { return 0 }
+
+ # Return true iff compiling with -maltivec does not error.
+ return [check_no_compiler_messages powerpc_altivec_ok object {
+ int dummy;
+ } "-maltivec"]
}
# Return 1 if this is a PowerPC target supporting -mpower8-vector
@@ -6625,6 +6628,12 @@ proc check_effective_target_powerpc_elfv2 { } {
}
}
+# Return 1 if this is a PowerPC target supporting -mrop-protect
+
+proc check_effective_target_rop_ok { } {
+ return [check_effective_target_power10_ok] && [check_effective_target_powerpc_elfv2]
+}
+
# The VxWorks SPARC simulator accepts only EM_SPARC executables and
# chokes on EM_SPARC32PLUS or EM_SPARCV9 executables. Return 1 if the
# test environment appears to run executables on such a simulator.
@@ -7584,95 +7593,157 @@ proc check_effective_target_vect_element_align_preferred { } {
# Return zero if the desirable pattern isn't found.
# It's used by Warray-bounds/Wstringop-overflow testcases which are
# regressed by O2 vectorization, refer to PR102697/PR102462/PR102706
-proc check_vect_slp_aligned_store_usage { pattern macro } {
+proc check_vect_slp_store_usage { pattern macro } {
global tool
set result [check_compile slp_aligned_store_usage assembly {
- char a[16] __attribute__ ((aligned (16)));
- short b[4] __attribute__((aligned(8)));
- int c[4] __attribute__((aligned(16)));
- #ifdef TEST_V8QI
+ extern void sink (void* );
+ #define Ac8 (AC8){ 0, 1, 2, 3, 4, 5, 6, 7 }
+ #define Ac16 (AC16){ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }
+ #ifdef TEST_V16QI
+ typedef struct AC16 { char a[16]; } AC16;
+ extern char a16[16];
void
- foo ()
+ foo1 ()
{
- a[0] = 0;
- a[1] = 1;
- a[2] = 2;
- a[3] = 3;
- a[4] = 4;
- a[5] = 5;
- a[6] = 6;
- a[7] = 7;
- }
- #elif TEST_V16QI
+ *(AC16*)a16 = Ac16;
+ }
+ #elif TEST_V8QI
+ typedef struct AC8 { char a[8]; } AC8;
+ extern char a8[8];
void
- foo1 ()
+ foo ()
{
- a[0] = 0;
- a[1] = 1;
- a[2] = 2;
- a[3] = 3;
- a[4] = 4;
- a[5] = 5;
- a[6] = 6;
- a[7] = 7;
- a[8] = 8;
- a[9] = 9;
- a[10] = 10;
- a[11] = 11;
- a[12] = 12;
- a[13] = 13;
- a[14] = 14;
- a[15] = 15;
+ *(AC8*)a8 = Ac8;
}
#elif TEST_V4QI
+ struct A1
+ {
+ char n;
+ char a[3];
+ };
+
+ extern void sink (void*);
void
foo2 ()
{
- a[0] = 0;
- a[1] = 1;
- a[2] = 2;
- a[3] = 3;
+ struct A1 a = { 0, { } };
+ a.a[0] = 3;
+ a.a[1] = 4;
+ a.a[2] = 5;
+ sink (&a);
+ }
+ #elif TEST_V4QI_2
+ extern char p[4];
+ void
+ foo2_2 ()
+ {
+ p[0] = 0;
+ p[1] = 1;
+ p[2] = 2;
+ p[3] = 3;
+ }
+ #elif TEST_V4QI_3
+ #define Ac4 (AC4){ 0, 1, 2, 3 }
+ typedef struct AC4 { char a[4]; } AC4;
+ extern char a[4];
+ void
+ foo ()
+ {
+ *(AC4*)a = Ac4;
}
#elif TEST_V2QI
+ struct A2
+ {
+ char a[2];
+ };
void
foo3 ()
{
- a[0] = 0;
- a[1] = 1;
+ struct A2 a;
+ a.a[0] = 3;
+ a.a[1] = 4;
+ sink (&a);
+ }
+ #elif TEST_V2QI_2
+ extern char p[2];
+ void
+ foo3_2 ()
+ {
+ p[0] = 0;
+ p[1] = 1;
+ }
+ #elif TEST_V4HI
+ struct Ax
+ {
+ int n;
+ short a[4];
+ };
+ void
+ foo5 (struct Ax *p)
+ {
+ p->a[0] = 0;
+ p->a[1] = 1;
+ p->a[2] = 2;
+ p->a[3] = 3;
}
#elif TEST_V2HI
+ extern char b[4];
void
foo4 ()
{
- b[0] = 0;
- b[1] = 1;
+ *(short*) b = 0;
+ *(short*) (b + 2) = 1;
}
- #elif TEST_V4HI
+ #elif TEST_V2HI_2
+ struct Ax
+ {
+ int n;
+ short a[2];
+ };
void
- foo5 ()
+ foo4_2 (struct Ax *p)
{
- b[0] = 0;
- b[1] = 1;
- b[2] = 2;
- b[3] = 3;
+ p->a[0] = 0;
+ p->a[1] = 1;
}
- #elif TEST_V2SI
+ #elif TEST_V4SI
+ struct A { int i; };
+ struct B { int j; struct A a[4]; };
+
+ struct C
+ {
+ struct B b1;
+ struct B b2;
+ };
+ char cbuf2[2 * sizeof (struct C)] = { };
void
foo6 ()
{
- c[0] = 0;
- c[1] = 1;
+ struct C *p = (struct C*)&cbuf2;
+ p->b2.a[0].i = 0;
+ p->b2.a[1].i = 0;
+ p->b2.a[2].i = 0;
+ p->b2.a[3].i = 0;
}
- #elif TEST_V4SI
+ #elif TEST_V2SI
+ struct A { int i; };
+ struct B { int j; struct A a[2]; };
+
+ struct C
+ {
+ struct B b1;
+ struct B b2;
+ };
+ char cbuf2[2 * sizeof (struct C)] = { };
void
- foo7 ()
+ foo6 ()
{
- c[0] = 0;
- c[1] = 1;
- c[2] = 2;
- c[3] = 3;
+ struct C *p = (struct C*)&cbuf2;
+ p->b2.a[0].i = 0;
+ p->b2.a[1].i = 0;
}
+
#endif
} "-O2 -fopt-info-all -D$macro" ]
@@ -7691,75 +7762,172 @@ proc check_vect_slp_aligned_store_usage { pattern macro } {
# Return the true if target support vectorization of 2-byte char stores
# with 2-byte aligned address at plain O2.
-proc check_effective_target_vect_slp_v2qi_store { } {
+# NB: This target should be removed after real issues are fixed for
+# -Wstringop-overflow with O2 vect. Be careful if you want to reuse
+# this target since tests in check_vect_slp_store_usage
+# is the exact match of relative testcases
+proc check_effective_target_vect_slp_v2qi_store_align { } {
set pattern {add new stmt: MEM <vector\(2\) char>}
set macro "TEST_V2QI"
- return [check_cached_effective_target vect_slp_v2qi_store {
- expr [check_vect_slp_aligned_store_usage $pattern $macro] }]
+ return [check_cached_effective_target vect_slp_v2qi_store_align {
+ expr [check_vect_slp_store_usage $pattern $macro] }]
+}
+# Return the true if target support vectorization of 2-byte char stores
+# with unaligned address at plain O2.
+proc check_effective_target_vect_slp_v2qi_store_unalign { } {
+ set pattern {add new stmt: MEM <vector\(2\) char>}
+ set macro "TEST_V2QI_2"
+ return [check_cached_effective_target vect_slp_v2qi_store_unalign {
+ expr [check_vect_slp_store_usage $pattern $macro ] }]
}
# Return the true if target support vectorization of 4-byte char stores
# with 4-byte aligned address at plain O2.
-proc check_effective_target_vect_slp_v4qi_store { } {
+# NB: This target should be removed after real issues are fixed for
+# -Wstringop-overflow with O2 vect. Be careful if you want to reuse
+# this target since tests in check_vect_slp_store_usage
+# is the exact match of relative testcases
+proc check_effective_target_vect_slp_v4qi_store_align { } {
set pattern {add new stmt: MEM <vector\(4\) char>}
set macro "TEST_V4QI"
- return [check_cached_effective_target vect_slp_v4qi_store {
- expr [check_vect_slp_aligned_store_usage $pattern $macro ] }]
+ return [check_cached_effective_target vect_slp_v4qi_store_align {
+ expr [check_vect_slp_store_usage $pattern $macro ] }]
+}
+
+# Return the true if target support vectorization of 4-byte char stores
+# with unaligned address at plain O2.
+proc check_effective_target_vect_slp_v4qi_store_unalign { } {
+ set pattern {add new stmt: MEM <vector\(4\) char>}
+ set macro "TEST_V4QI_2"
+ return [check_cached_effective_target vect_slp_v4qi_store_unalign {
+ expr [check_vect_slp_store_usage $pattern $macro ] }]
+}
+
+# Return the true if target support block move for
+# 8-byte aligned 4-byte size struct initialization.
+proc check_effective_target_struct_4char_block_move { } {
+ set pattern {not vectorized: more than one data ref in stmt:}
+ set macro "TEST_V4QI_3"
+ return [check_cached_effective_target struct_4char_block_move {
+ expr [check_vect_slp_store_usage $pattern $macro ] }]
+}
+
+# Return the true if target support vectorization of 4-byte char stores
+# with unaligned address or store them with a constant pool at plain O2.
+proc check_effective_target_vect_slp_v4qi_store_unalign_1 { } {
+ set pattern {add new stmt: MEM <vector\(4\) char>}
+ set macro "TEST_V4QI_3"
+ return [check_cached_effective_target vect_slp_v4qi_store_unalign_1 {
+ expr { [check_vect_slp_store_usage $pattern $macro ]
+ || [check_effective_target_struct_4char_block_move] } }]
+}
+
+# Return the true if target support block move for
+# 8-byte aligned 8-byte size struct initialization.
+proc check_effective_target_struct_8char_block_move { } {
+ set pattern {not vectorized: more than one data ref in stmt:}
+ set macro "TEST_V8QI"
+ return [check_cached_effective_target struct_8char_block_move {
+ expr [check_vect_slp_store_usage $pattern $macro ] }]
}
# Return the true if target support vectorization of 8-byte char stores
-# with 8-byte aligned address at plain O2.
-proc check_effective_target_vect_slp_v8qi_store { } {
+# with unaligned address or store them with a constant pool at plain O2.
+# NB: This target should be removed after real issues are fixed for
+# -Wstringop-overflow with O2 vect. Be careful if you want to reuse
+# this target since tests in check_vect_slp_store_usage
+# is the exact match of relative testcases
+proc check_effective_target_vect_slp_v8qi_store_unalign_1 { } {
set pattern {add new stmt: MEM <vector\(8\) char>}
set macro "TEST_V8QI"
- return [check_cached_effective_target vect_slp_v8qi_store {
- expr [check_vect_slp_aligned_store_usage $pattern $macro ] }]
+ return [check_cached_effective_target vect_slp_v8qi_store_unalign_1 {
+ expr { [check_vect_slp_store_usage $pattern $macro ]
+ || [check_effective_target_struct_8char_block_move] } }]
+}
+
+# Return the true if target support block move for
+# 8-byte aligned 16-byte size struct initialization.
+proc check_effective_target_struct_16char_block_move { } {
+ set pattern {not vectorized: more than one data ref in stmt:}
+ set macro "TEST_V16QI"
+ return [check_cached_effective_target struct_16char_block_move {
+ expr [check_vect_slp_store_usage $pattern $macro ] }]
}
# Return the true if target support vectorization of 16-byte char stores
-# with 16-byte aligned address at plain O2.
-proc check_effective_target_vect_slp_v16qi_store { } {
+# with unaligned address or store them with a constant pool at plain O2.
+# NB: This target should be removed after real issues are fixed for
+# -Wstringop-overflow with O2 vect. Be careful if you want to reuse
+# this target since tests in check_vect_slp_store_usage
+# is the exact match of relative testcases
+proc check_effective_target_vect_slp_v16qi_store_unalign_1 { } {
set pattern {add new stmt: MEM <vector\(16\) char>}
set macro "TEST_V16QI"
- return [check_cached_effective_target vect_slp_v16qi_store {
- expr [check_vect_slp_aligned_store_usage $pattern $macro ] }]
+ return [check_cached_effective_target vect_slp_v16qi_store_unalign_1 {
+ expr { [check_vect_slp_store_usage $pattern $macro ]
+ || [check_effective_target_struct_16char_block_move] } }]
}
# Return the true if target support vectorization of 4-byte short stores
-# with 4-byte aligned address at plain O2.
-proc check_effective_target_vect_slp_v2hi_store { } {
+# with unaligned address at plain O2.
+# NB: This target should be removed after real issues are fixed for
+# -Wstringop-overflow with O2 vect. Be careful if you want to reuse
+# this target since tests in check_vect_slp_store_usage
+# is the exact match of relative testcases
+proc check_effective_target_vect_slp_v2hi_store_unalign { } {
set pattern {add new stmt: MEM <vector\(2\) short int>}
set macro "TEST_V2HI"
- return [check_cached_effective_target vect_slp_v2hi_store {
- expr [check_vect_slp_aligned_store_usage $pattern $macro ] }]
+ return [check_cached_effective_target vect_slp_v2hi_store_unalign {
+ expr [check_vect_slp_store_usage $pattern $macro ] }]
+}
+
+# Return the true if target support vectorization of 4-byte short stores
+# with 4-byte aligned address at plain O2.
+proc check_effective_target_vect_slp_v2hi_store_align { } {
+ set pattern {add new stmt: MEM <vector\(2\) short int>}
+ set macro "TEST_V2HI_2"
+ return [check_cached_effective_target vect_slp_v2hi_store_align {
+ expr [check_vect_slp_store_usage $pattern $macro ] }]
}
# Return the true if target support vectorization of 8-byte short stores
-# with 8-byte aligned address at plain O2.
-proc check_effective_target_vect_slp_v4hi_store { } {
+# with unaligned address at plain O2.
+# NB: This target should be removed after real issues are fixed for
+# -Wstringop-overflow with O2 vect. Be careful if you want to reuse
+# this target since tests in check_vect_slp_store_usage
+# is the exact match of relative testcases
+proc check_effective_target_vect_slp_v4hi_store_unalign { } {
set pattern {add new stmt: MEM <vector\(4\) short int>}
set macro "TEST_V4HI"
- return [check_cached_effective_target vect_slp_v4hi_store {
- expr [check_vect_slp_aligned_store_usage $pattern $macro ] }]
+ return [check_cached_effective_target vect_slp_v4hi_store_unalign {
+ expr [check_vect_slp_store_usage $pattern $macro ] }]
}
# Return the true if target support vectorization of 8-byte int stores
# with 8-byte aligned address at plain O2.
-proc check_effective_target_vect_slp_v2si_store { } {
+# NB: This target should be removed after real issues are fixed for
+# -Wstringop-overflow with O2 vect. Be careful if you want to reuse
+# this target since tests in check_vect_slp_store_usage
+# is the exact match of relative testcases
+proc check_effective_target_vect_slp_v2si_store_align { } {
set pattern {add new stmt: MEM <vector\(2\) int>}
set macro "TEST_V2SI"
- return [check_cached_effective_target vect_slp_v2si_store {
- expr [check_vect_slp_aligned_store_usage $pattern $macro ] }]
+ return [check_cached_effective_target vect_slp_v2si_store_align {
+ expr [check_vect_slp_store_usage $pattern $macro ] }]
}
# Return the true if target support vectorization of 16-byte int stores
-# with 16-byte aligned address at plain O2.
-proc check_effective_target_vect_slp_v4si_store { } {
+# with unaligned address at plain O2.
+# NB: This target should be removed after real issues are fixed for
+# -Wstringop-overflow with O2 vect. Be careful if you want to reuse
+# this target since tests in check_vect_slp_store_usage
+# is the exact match of relative testcases
+proc check_effective_target_vect_slp_v4si_store_unalign { } {
set pattern {add new stmt: MEM <vector\(4\) int>}
set macro "TEST_V4SI"
- return [check_cached_effective_target vect_slp_v4si_store {
- expr [check_vect_slp_aligned_store_usage $pattern $macro ] }]
+ return [check_cached_effective_target vect_slp_v4si_store_unalign {
+ expr [check_vect_slp_store_usage $pattern $macro ] }]
}
# Return 1 if we can align stack data to the preferred vector alignment.
@@ -7841,6 +8009,12 @@ proc check_effective_target_vect_masked_store { } {
|| [istarget amdgcn*-*-*] }]
}
+# Return 1 if the target supports vector gather loads via internal functions.
+
+proc check_effective_target_vect_gather_load_ifn { } {
+ return [expr { [check_effective_target_aarch64_sve] }]
+}
+
# Return 1 if the target supports vector scatter stores.
proc check_effective_target_vect_scatter_store { } {
@@ -10088,6 +10262,10 @@ proc check_effective_target_concepts { } {
return [check-flags { "" { } { -fconcepts } }]
}
+proc check_effective_target_implicit_constexpr { } {
+ return [check-flags { "" { } { -fimplicit-constexpr } }]
+}
+
# Return 1 if expensive testcases should be run.
proc check_effective_target_run_expensive_tests { } {
@@ -11544,3 +11722,39 @@ proc check_effective_target___OPTIMIZE__ {} {
#endif
} [current_compiler_flags]]
}
+
+# Return 1 if python3 (>= 3.6) is available.
+
+proc check_effective_target_recent_python3 { } {
+ set result [remote_exec host "python3 -c \"import sys; assert sys.version_info >= (3, 6)\""]
+ set status [lindex $result 0]
+ if { $status == 0 } then {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+# Return 1 if python3 contains a module
+
+proc check_effective_target_python3_module { module } {
+ set result [remote_exec host "python3 -c \"import $module\""]
+ set status [lindex $result 0]
+ if { $status == 0 } then {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+# Return 1 if pytest module is available for python3.
+
+proc check_effective_target_pytest3 { } {
+ set result [remote_exec host "python3 -m pytest --color=no -rap -s --tb=no --version"]
+ set status [lindex $result 0]
+ if { $status == 0 } then {
+ return 1;
+ } else {
+ return 0;
+ }
+}
diff --git a/gcc/testsuite/lib/target-utils.exp b/gcc/testsuite/lib/target-utils.exp
index 37aa01e..2c20993 100644
--- a/gcc/testsuite/lib/target-utils.exp
+++ b/gcc/testsuite/lib/target-utils.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2021 Free Software Foundation, Inc.
+# Copyright (C) 2014-2022 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-dg.exp b/gcc/testsuite/lib/timeout-dg.exp
index 500f090..ad94b50 100644
--- a/gcc/testsuite/lib/timeout-dg.exp
+++ b/gcc/testsuite/lib/timeout-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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 76cec94..6cc930f 100644
--- a/gcc/testsuite/lib/timeout.exp
+++ b/gcc/testsuite/lib/timeout.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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 a7884ef..a63fb07 100644
--- a/gcc/testsuite/lib/torture-options.exp
+++ b/gcc/testsuite/lib/torture-options.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2022 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
index 838c951..fcc20d0 100644
--- a/gcc/testsuite/lib/tsan-dg.exp
+++ b/gcc/testsuite/lib/tsan-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 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/ubsan-dg.exp b/gcc/testsuite/lib/ubsan-dg.exp
index 850429a..1c617d8 100644
--- a/gcc/testsuite/lib/ubsan-dg.exp
+++ b/gcc/testsuite/lib/ubsan-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+# Copyright (C) 2013-2022 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/wrapper.exp b/gcc/testsuite/lib/wrapper.exp
index 8bc3e72..5a601b2 100644
--- a/gcc/testsuite/lib/wrapper.exp
+++ b/gcc/testsuite/lib/wrapper.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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 f847cd0..f947767 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2010-2022 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 0712355..27bae63 100644
--- a/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm
+++ b/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm
@@ -2,7 +2,7 @@
// { dg-do run { target *-*-darwin* } }
// { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } }
-// { dg-skip-if "Headers incompatible with 10.4 APIs" { *-*-darwin1[1-9]* *-*-darwin2[0-9]* } { "-fnext-runtime" } { "" } }
+// { dg-skip-if "Headers incompatible with 10.4 APIs" { *-*-darwin1[1-9]* *-*-darwin2* } { "-fnext-runtime" } { "" } }
// { 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" } { "" } }
diff --git a/gcc/testsuite/obj-c++.dg/dg.exp b/gcc/testsuite/obj-c++.dg/dg.exp
index ca0c0ed..eebe253 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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/lto/lto.exp b/gcc/testsuite/obj-c++.dg/lto/lto.exp
index 22f2f7a..551063c 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2010-2022 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/objc-gc-3.mm b/gcc/testsuite/obj-c++.dg/objc-gc-3.mm
index 45ffbc5..18f2cbe 100644
--- a/gcc/testsuite/obj-c++.dg/objc-gc-3.mm
+++ b/gcc/testsuite/obj-c++.dg/objc-gc-3.mm
@@ -3,7 +3,7 @@
/* Contributed by Ziemowit Laski <zlaski@apple.com> */
/* { dg-do compile } */
-/* { dg-skip-if "GC API is an error from Darwin16." { *-*-darwin1[6-9]* *-*-darwin2[0-9]* } { "-fnext-runtime" } { "" } } */
+/* { dg-skip-if "GC API is an error from Darwin16." { *-*-darwin1[6-9]* *-*-darwin2* } { "-fnext-runtime" } { "" } } */
/* { dg-options "-fobjc-gc" } */
/* { dg-prune-output "cc1objplus: warning: '-fobjc-gc' is ignored for '-fgnu-runtime'" } */
diff --git a/gcc/testsuite/obj-c++.dg/plugin/plugin.exp b/gcc/testsuite/obj-c++.dg/plugin/plugin.exp
index 2170816..d32c70c 100644
--- a/gcc/testsuite/obj-c++.dg/plugin/plugin.exp
+++ b/gcc/testsuite/obj-c++.dg/plugin/plugin.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/property/property.exp b/gcc/testsuite/obj-c++.dg/property/property.exp
index 7cb9258..4c82f51 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2022 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/strings/strings.exp b/gcc/testsuite/obj-c++.dg/strings/strings.exp
index 2d2384f..c2149b0 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2010-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp b/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp
index 6dc1718..a191107 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2010-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/objc-obj-c++-shared/TestsuiteObject.m b/gcc/testsuite/objc-obj-c++-shared/TestsuiteObject.m
index 0c0a26c..e653699 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-2021 Free Software Foundation, Inc.
+ Copyright (C) 2011-2022 Free Software Foundation, Inc.
Contributed by Nicola Pero
This file is part of GCC.
diff --git a/gcc/testsuite/objc.dg/attributes/attributes.exp b/gcc/testsuite/objc.dg/attributes/attributes.exp
index 28503d8..ecb1ccc 100644
--- a/gcc/testsuite/objc.dg/attributes/attributes.exp
+++ b/gcc/testsuite/objc.dg/attributes/attributes.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2021 Free Software Foundation, Inc.
+# Copyright (C) 2010-2022 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 51d94785..4af07f9 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/gnu-encoding/gnu-encoding.exp b/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp
index 8017e2f..6297e16 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/lto/lto.exp b/gcc/testsuite/objc.dg/lto/lto.exp
index 8363258..9bd8531 100644
--- a/gcc/testsuite/objc.dg/lto/lto.exp
+++ b/gcc/testsuite/objc.dg/lto/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2021 Free Software Foundation, Inc.
+# Copyright (C) 2010-2022 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/objc-gc-4.m b/gcc/testsuite/objc.dg/objc-gc-4.m
index 8102a5a..1b2d9674 100644
--- a/gcc/testsuite/objc.dg/objc-gc-4.m
+++ b/gcc/testsuite/objc.dg/objc-gc-4.m
@@ -3,7 +3,7 @@
/* Contributed by Ziemowit Laski <zlaski@apple.com> */
/* { dg-do compile } */
-/* { dg-skip-if "GC API is an error from Darwin16." { *-*-darwin1[6-9]* *-*-darwin2[0-9]* } { "-fnext-runtime" } { "" } } */
+/* { dg-skip-if "GC API is an error from Darwin16." { *-*-darwin1[6-9]* *-*-darwin2* } { "-fnext-runtime" } { "" } } */
/* { dg-options "-fobjc-gc" } */
/* { dg-prune-output "cc1obj: warning: '-fobjc-gc' is ignored for '-fgnu-runtime'" } */
diff --git a/gcc/testsuite/objc.dg/pch/pch.exp b/gcc/testsuite/objc.dg/pch/pch.exp
index 194be21..5f0905e 100644
--- a/gcc/testsuite/objc.dg/pch/pch.exp
+++ b/gcc/testsuite/objc.dg/pch/pch.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/plugin/plugin.exp b/gcc/testsuite/objc.dg/plugin/plugin.exp
index b4f0d41..1390506 100644
--- a/gcc/testsuite/objc.dg/plugin/plugin.exp
+++ b/gcc/testsuite/objc.dg/plugin/plugin.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2022 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/pr103639.m b/gcc/testsuite/objc.dg/pr103639.m
new file mode 100644
index 0000000..c46e0d4
--- /dev/null
+++ b/gcc/testsuite/objc.dg/pr103639.m
@@ -0,0 +1,101 @@
+/* PR objc/103639 */
+/* { dg-do run } */
+/* { dg-skip-if "No NeXT fast enum. pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-sources "../objc-obj-c++-shared/nsconstantstring-class-impl.m" } */
+/* { dg-additional-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
+
+#import "../objc-obj-c++-shared/TestsuiteObject.m"
+#ifndef __NEXT_RUNTIME__
+#include <objc/NXConstStr.h>
+#else
+#include "../objc-obj-c++-shared/nsconstantstring-class.h"
+#endif
+
+extern int printf (const char *, ...);
+#include <stdlib.h>
+
+/* A mini-array implementation that can be used to test fast
+ enumeration. You create the array with some objects; you can
+ mutate the array, and you can fast-enumerate it.
+ */
+@interface MyArray : TestsuiteObject
+{
+ unsigned int length;
+ id *objects;
+ unsigned long mutated;
+}
+- (id) initWithLength: (unsigned int)l objects: (id *)o;
+- (void) mutate;
+- (unsigned long)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state
+ objects:(id *)stackbuf
+ count:(unsigned long)len;
+@end
+
+@implementation MyArray : TestsuiteObject
+- (id) initWithLength: (unsigned int)l
+ objects: (id *)o
+{
+ length = l;
+ objects = o;
+ mutated = 0;
+ return self;
+}
+- (void) mutate
+{
+ mutated = 1;
+}
+- (unsigned long)countByEnumeratingWithState: (struct __objcFastEnumerationState*)state
+ objects: (id*)stackbuf
+ count: (unsigned long)len
+{
+ unsigned long i, batch_size;
+
+ /* We keep how many objects we served in the state->state counter. So the next batch
+ will contain up to length - state->state objects. */
+ batch_size = length - state->state;
+
+ /* Make obvious adjustments. */
+ if (batch_size < 0)
+ batch_size = 0;
+
+ if (batch_size > len)
+ batch_size = len;
+
+ /* Copy the objects. */
+ for (i = 0; i < batch_size; i++)
+ stackbuf[i] = objects[i];
+
+ state->state += batch_size;
+ state->itemsPtr = stackbuf;
+ state->mutationsPtr = &mutated;
+
+ return batch_size;
+}
+@end
+
+int check = 0;
+
+int
+main()
+{
+ id *objects = malloc (sizeof (id) * 2);
+ objects[0] = @"a";
+ objects[1] = @"b";
+
+ MyArray *array = [[MyArray alloc] initWithLength: 2 objects: objects];
+
+ int someVar = 0;
+ for (id object in array) {
+ switch (someVar) {
+ case 0:
+ break;
+ }
+ ++check;
+ }
+
+ if (check != 2)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/objc.dg/property/property.exp b/gcc/testsuite/objc.dg/property/property.exp
index b3108f9..ddb9ee3 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/special/special.exp b/gcc/testsuite/objc.dg/special/special.exp
index 600f577..41294dc 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2022 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/strings/strings.exp b/gcc/testsuite/objc.dg/strings/strings.exp
index f4cea1c..bc6bb2e 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2010-2022 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/objc.dg/torture/strings/strings.exp b/gcc/testsuite/objc.dg/torture/strings/strings.exp
index 7411383..f921d91 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-2021 Free Software Foundation, Inc.
+# Copyright (C) 2010-2022 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/compile/compile.exp b/gcc/testsuite/objc/compile/compile.exp
index a3f35f0..2133ecd 100644
--- a/gcc/testsuite/objc/compile/compile.exp
+++ b/gcc/testsuite/objc/compile/compile.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2021 Free Software Foundation, Inc.
+# Copyright (C) 1991-2022 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 9708690..01a5ca3 100644
--- a/gcc/testsuite/objc/execute/exceptions/exceptions.exp
+++ b/gcc/testsuite/objc/execute/exceptions/exceptions.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2021 Free Software Foundation, Inc.
+# Copyright (C) 1991-2022 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 db93329..ab42d1c 100644
--- a/gcc/testsuite/objc/execute/execute.exp
+++ b/gcc/testsuite/objc/execute/execute.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2021 Free Software Foundation, Inc.
+# Copyright (C) 1991-2022 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